summaryrefslogtreecommitdiff
path: root/spec/ruby/optional/capi/ext/numeric_spec.c
AgeCommit message (Expand)Author
2020-04-08Suppress -Wshorten-64-to-32 warningsNobuyoshi Nakada
2020-02-28Update to ruby/spec@41bf282Benoit Daloze
2019-01-20Update to ruby/spec@35a9fbaeregon
2018-01-29Update to ruby/spec@83063a3eregon
2017-12-27Update to ruby/spec@0fe33aceregon
2017-12-01Update to ruby/spec@bacedc5eregon
2017-09-20Move spec/rubyspec to spec/ruby for consistencyeregon
rc1&id2=5fd508805288d9f9f5f3a8025e76200698420c89'>.travis.yml19
-rw-r--r--BSDL2
-rw-r--r--ChangeLog27346
-rw-r--r--Makefile.in40
-rw-r--r--NEWS739
-rw-r--r--README25
-rw-r--r--README.EXT154
-rw-r--r--README.EXT.ja129
-rw-r--r--README.ja2
-rw-r--r--addr2line.c473
-rw-r--r--array.c1142
-rw-r--r--bcc32/Makefile.sub617
-rw-r--r--bcc32/README.bcc32130
-rwxr-xr-xbcc32/configure.bat163
-rwxr-xr-xbcc32/mkexports.rb26
-rw-r--r--bcc32/setup.mak179
-rw-r--r--benchmark/bm_app_aobench.rb292
-rw-r--r--benchmark/bm_hash_flatten.rb9
-rw-r--r--benchmark/bm_hash_keys.rb9
-rw-r--r--benchmark/bm_hash_shift.rb10
-rw-r--r--benchmark/bm_hash_values.rb9
-rw-r--r--benchmark/bm_so_binary_trees.rb9
-rw-r--r--benchmark/bm_vm1_gc_short_lived.rb10
-rw-r--r--benchmark/bm_vm1_gc_short_with_complex_long.rb27
-rw-r--r--benchmark/bm_vm1_gc_short_with_long.rb13
-rw-r--r--benchmark/bm_vm1_gc_short_with_symbol.rb15
-rw-r--r--benchmark/bm_vm1_gc_wb_ary.rb10
-rw-r--r--benchmark/bm_vm1_gc_wb_obj.rb13
-rw-r--r--benchmark/bm_vm_thread_queue.rb18
-rw-r--r--benchmark/gc/aobench.rb1
-rw-r--r--benchmark/gc/binary_trees.rb1
-rw-r--r--benchmark/gc/gcbench.rb56
-rw-r--r--benchmark/gc/hash1.rb11
-rw-r--r--benchmark/gc/hash2.rb7
-rw-r--r--benchmark/gc/null.rb1
-rw-r--r--benchmark/gc/pentomino.rb1
-rw-r--r--benchmark/gc/rdoc.rb13
-rw-r--r--benchmark/gc/redblack.rb366
-rw-r--r--benchmark/gc/ring.rb29
-rw-r--r--bignum.c7101
-rwxr-xr-xbin/erb4
-rwxr-xr-xbin/irb11
-rwxr-xr-xbin/rake4
-rwxr-xr-xbootstraptest/runner.rb17
-rw-r--r--bootstraptest/test_autoload.rb40
-rw-r--r--bootstraptest/test_class.rb10
-rw-r--r--bootstraptest/test_literal.rb5
-rw-r--r--bootstraptest/test_literal_suffix.rb54
-rw-r--r--bootstraptest/test_method.rb44
-rw-r--r--bootstraptest/test_thread.rb16
-rw-r--r--class.c502
-rw-r--r--common.mk245
-rw-r--r--compar.c32
-rw-r--r--compile.c1103
-rw-r--r--complex.c116
-rw-r--r--configure.in1398
-rw-r--r--constant.h4
-rw-r--r--cont.c164
-rw-r--r--debug.c6
-rw-r--r--defs/gmake.mk29
-rw-r--r--defs/id.def18
-rw-r--r--dir.c456
-rw-r--r--dln.h19
-rw-r--r--dln_find.c40
-rw-r--r--dmyencoding.c2
-rw-r--r--dmyversion.c2
-rw-r--r--doc/ChangeLog-1.8.0152
-rw-r--r--doc/ChangeLog-1.9.36
-rw-r--r--doc/ChangeLog-2.0.024015
-rw-r--r--doc/ChangeLog-YARV178
-rw-r--r--doc/NEWS-1.8.721
-rw-r--r--doc/NEWS-1.9.131
-rw-r--r--doc/NEWS-1.9.247
-rw-r--r--doc/NEWS-1.9.352
-rw-r--r--doc/NEWS-2.0.0531
-rw-r--r--doc/contributing.rdoc459
-rw-r--r--doc/contributors.rdoc778
-rw-r--r--doc/dtrace_probes.rdoc178
-rw-r--r--doc/globals.rdoc20
-rw-r--r--doc/irb/irb.rd.ja52
-rw-r--r--doc/maintainers.rdoc322
-rw-r--r--doc/marshal.rdoc313
-rw-r--r--doc/pty/README84
-rw-r--r--doc/pty/README.expect22
-rw-r--r--doc/rake/CHANGES440
-rw-r--r--doc/rake/README196
-rw-r--r--doc/rake/command_line_usage.rdoc169
-rw-r--r--doc/rake/example/Rakefile138
-rw-r--r--doc/rake/example/Rakefile235
-rw-r--r--doc/rake/example/a.c6
-rw-r--r--doc/rake/example/b.c6
-rw-r--r--doc/rake/example/main.c11
-rw-r--r--doc/rake/glossary.rdoc51
-rw-r--r--doc/rake/jamis.rb591
-rw-r--r--doc/rake/proto_rake.rdoc127
-rw-r--r--doc/rake/rakefile.rdoc557
-rw-r--r--doc/rake/rational.rdoc151
-rw-r--r--doc/rake/release_notes/rake-0.8.7.rdoc55
-rw-r--r--doc/rake/release_notes/rake-0.9.0.rdoc112
-rw-r--r--doc/rake/release_notes/rake-0.9.1.rdoc52
-rw-r--r--doc/rake/release_notes/rake-0.9.2.2.rdoc55
-rw-r--r--doc/rake/release_notes/rake-0.9.2.rdoc49
-rw-r--r--doc/rake/release_notes/rake-0.9.3.rdoc102
-rw-r--r--doc/rake/release_notes/rake-0.9.4.rdoc110
-rw-r--r--doc/rake/release_notes/rake-0.9.5.rdoc114
-rw-r--r--doc/rake/release_notes/rake-0.9.6.rdoc127
-rw-r--r--doc/re.rdoc (renamed from doc/regexp.rdoc)140
-rw-r--r--doc/rubygems/ChangeLog5689
-rw-r--r--doc/rubygems/History.txt852
-rw-r--r--doc/rubygems/LICENSE.txt53
-rw-r--r--doc/rubygems/README41
-rw-r--r--doc/security.rdoc144
-rw-r--r--doc/standard_library.rdoc125
-rw-r--r--doc/syntax.rdoc27
-rw-r--r--doc/syntax/assignment.rdoc455
-rw-r--r--doc/syntax/calling_methods.rdoc349
-rw-r--r--doc/syntax/control_expressions.rdoc500
-rw-r--r--doc/syntax/exceptions.rdoc17
-rw-r--r--doc/syntax/literals.rdoc16
-rw-r--r--doc/syntax/methods.rdoc219
-rw-r--r--doc/syntax/miscellaneous.rdoc107
-rw-r--r--doc/syntax/modules_and_classes.rdoc17
-rw-r--r--doc/syntax/precedence.rdoc60
-rw-r--r--doc/syntax/refinements.rdoc266
-rw-r--r--enc/Makefile.in1
-rw-r--r--enc/depend11
-rw-r--r--enc/encdb.c4
-rw-r--r--enc/euc_jp.c8
-rw-r--r--enc/shift_jis.c2
-rw-r--r--enc/trans/japanese_euc.trans4
-rw-r--r--enc/trans/utf8_mac-tbl.rb23655
-rw-r--r--enc/trans/utf8_mac.trans157
-rw-r--r--enc/utf_16_32.h2
-rw-r--r--encoding.c218
-rw-r--r--enum.c283
-rw-r--r--enumerator.c718
-rw-r--r--error.c182
-rw-r--r--eval.c311
-rw-r--r--eval_error.c48
-rw-r--r--eval_intern.h61
-rw-r--r--eval_jump.c60
-rw-r--r--ext/-test-/bignum/big2str.c54
-rw-r--r--ext/-test-/bignum/bigzero.c26
-rw-r--r--ext/-test-/bignum/depend7
-rw-r--r--ext/-test-/bignum/div.c36
-rw-r--r--ext/-test-/bignum/extconf.rb7
-rw-r--r--ext/-test-/bignum/init.c11
-rw-r--r--ext/-test-/bignum/intpack.c88
-rw-r--r--ext/-test-/bignum/mul.c66
-rw-r--r--ext/-test-/bignum/str2big.c39
-rw-r--r--ext/-test-/bug-3571/bug.c2
-rw-r--r--ext/-test-/bug_reporter/bug_reporter.c24
-rw-r--r--ext/-test-/bug_reporter/extconf.rb1
-rw-r--r--ext/-test-/class/class2name.c14
-rw-r--r--ext/-test-/class/extconf.rb7
-rw-r--r--ext/-test-/class/init.c11
-rw-r--r--ext/-test-/debug/depend3
-rw-r--r--ext/-test-/debug/extconf.rb6
-rw-r--r--ext/-test-/debug/init.c11
-rw-r--r--ext/-test-/debug/inspector.c32
-rw-r--r--ext/-test-/debug/profile_frames.c43
-rw-r--r--ext/-test-/exception/dataerror.c31
-rw-r--r--ext/-test-/exception/depend3
-rw-r--r--ext/-test-/exception/ensured.c25
-rw-r--r--ext/-test-/file/depend2
-rw-r--r--ext/-test-/file/extconf.rb7
-rw-r--r--ext/-test-/file/init.c11
-rw-r--r--ext/-test-/file/stat.c27
-rw-r--r--ext/-test-/iter/break.c15
-rw-r--r--ext/-test-/iter/extconf.rb8
-rw-r--r--ext/-test-/iter/init.c11
-rw-r--r--ext/-test-/iter/yield.c16
-rw-r--r--ext/-test-/method/arity.c22
-rw-r--r--ext/-test-/method/extconf.rb6
-rw-r--r--ext/-test-/method/init.c11
-rw-r--r--ext/-test-/num2int/depend1
-rw-r--r--ext/-test-/num2int/num2int.c130
-rw-r--r--ext/-test-/old_thread_select/depend6
-rw-r--r--ext/-test-/postponed_job/depend1
-rw-r--r--ext/-test-/postponed_job/extconf.rb1
-rw-r--r--ext/-test-/postponed_job/postponed_job.c53
-rw-r--r--ext/-test-/printf/depend3
-rw-r--r--ext/-test-/printf/printf.c69
-rw-r--r--ext/-test-/rational/depend3
-rw-r--r--ext/-test-/rational/extconf.rb7
-rw-r--r--ext/-test-/rational/rat.c38
-rw-r--r--ext/-test-/recursion/extconf.rb2
-rw-r--r--ext/-test-/recursion/recursion.c28
-rw-r--r--ext/-test-/string/cstr.c8
-rw-r--r--ext/-test-/string/depend5
-rw-r--r--ext/-test-/string/extconf.rb1
-rw-r--r--ext/-test-/string/normalize.c18
-rw-r--r--ext/-test-/symbol/extconf.rb2
-rw-r--r--ext/-test-/symbol/type.c50
-rw-r--r--ext/-test-/tracepoint/depend1
-rw-r--r--ext/-test-/tracepoint/extconf.rb1
-rw-r--r--ext/-test-/tracepoint/gc_hook.c80
-rw-r--r--ext/-test-/tracepoint/tracepoint.c97
-rw-r--r--ext/-test-/wait_for_single_fd/depend6
-rw-r--r--ext/-test-/win32/dln/extconf.rb1
-rw-r--r--ext/.document4
-rw-r--r--ext/Setup1
-rw-r--r--ext/Setup.atheos1
-rw-r--r--ext/Setup.emx3
-rw-r--r--ext/Setup.nacl1
-rw-r--r--ext/Setup.nt2
-rw-r--r--ext/bigdecimal/bigdecimal.c3876
-rw-r--r--ext/bigdecimal/bigdecimal.gemspec7
-rw-r--r--ext/bigdecimal/bigdecimal.h34
-rw-r--r--ext/bigdecimal/depend2
-rw-r--r--ext/bigdecimal/lib/bigdecimal/jacobian.rb1
-rw-r--r--ext/bigdecimal/lib/bigdecimal/math.rb88
-rw-r--r--ext/bigdecimal/lib/bigdecimal/newton.rb3
-rw-r--r--ext/bigdecimal/lib/bigdecimal/util.rb36
-rw-r--r--ext/bigdecimal/sample/linear.rb1
-rw-r--r--ext/bigdecimal/sample/nlsolve.rb2
-rw-r--r--ext/coverage/coverage.c2
-rw-r--r--ext/coverage/depend11
-rw-r--r--ext/coverage/extconf.rb1
-rw-r--r--ext/curses/curses.c4329
-rw-r--r--ext/curses/depend1
-rw-r--r--ext/curses/extconf.rb116
-rw-r--r--ext/curses/hello.rb30
-rw-r--r--ext/curses/mouse.rb53
-rw-r--r--ext/curses/rain.rb76
-rw-r--r--ext/curses/view.rb91
-rw-r--r--ext/curses/view2.rb149
-rw-r--r--ext/date/date_core.c249
-rw-r--r--ext/date/date_parse.c10
-rw-r--r--ext/date/date_strftime.c4
-rw-r--r--ext/date/date_strptime.c4
-rw-r--r--ext/date/depend6
-rw-r--r--ext/dbm/dbm.c17
-rw-r--r--ext/dbm/depend1
-rw-r--r--ext/dbm/extconf.rb18
-rw-r--r--ext/digest/bubblebabble/bubblebabble.c32
-rw-r--r--ext/digest/bubblebabble/depend4
-rw-r--r--ext/digest/depend3
-rw-r--r--ext/digest/digest.c56
-rw-r--r--ext/digest/lib/digest.rb10
-rw-r--r--ext/digest/lib/digest/hmac.rb2
-rw-r--r--ext/digest/md5/depend7
-rw-r--r--ext/digest/md5/md5.c2
-rw-r--r--ext/digest/rmd160/depend7
-rw-r--r--ext/digest/sha1/depend9
-rw-r--r--ext/digest/sha2/depend9
-rw-r--r--ext/digest/sha2/sha2.c9
-rw-r--r--ext/dl/callback/depend2
-rw-r--r--ext/dl/cfunc.c22
-rw-r--r--ext/dl/cptr.c3
-rw-r--r--ext/dl/depend15
-rw-r--r--ext/dl/dl.c6
-rw-r--r--ext/dl/dl.h2
-rw-r--r--ext/dl/lib/dl/func.rb3
-rw-r--r--ext/dl/win32/extconf.rb3
-rw-r--r--ext/dl/win32/lib/Win32API.rb (renamed from ext/win32/lib/Win32API.rb)0
-rw-r--r--ext/dl/win32/lib/win32/registry.rb (renamed from ext/win32/lib/win32/registry.rb)129
-rw-r--r--ext/dl/win32/lib/win32/resolv.rb (renamed from ext/win32/lib/win32/resolv.rb)5
-rw-r--r--ext/dl/win32/lib/win32/sspi.rb (renamed from ext/win32/lib/win32/sspi.rb)2
-rw-r--r--ext/etc/depend4
-rw-r--r--ext/etc/etc.c140
-rwxr-xr-xext/extmk.rb84
-rw-r--r--ext/fcntl/depend1
-rw-r--r--ext/fcntl/fcntl.c188
-rw-r--r--ext/fiddle/closure.c21
-rw-r--r--ext/fiddle/depend4
-rw-r--r--ext/fiddle/extconf.rb5
-rw-r--r--ext/fiddle/fiddle.c6
-rw-r--r--ext/fiddle/function.c13
-rw-r--r--ext/fiddle/handle.c14
-rw-r--r--ext/fiddle/lib/fiddle.rb9
-rw-r--r--ext/fiddle/pointer.c3
-rw-r--r--ext/fiddle/win32/extconf.rb3
-rw-r--r--ext/fiddle/win32/lib/win32/registry.rb845
-rw-r--r--ext/fiddle/win32/lib/win32/resolv.rb379
-rw-r--r--ext/gdbm/depend1
-rw-r--r--ext/gdbm/gdbm.c5
-rw-r--r--ext/io/console/console.c42
-rw-r--r--ext/io/console/depend4
-rw-r--r--ext/io/console/extconf.rb12
-rw-r--r--ext/io/console/io-console.gemspec9
-rw-r--r--ext/io/console/lib/console/size.rb2
-rw-r--r--ext/io/nonblock/depend4
-rw-r--r--ext/io/nonblock/nonblock.c31
-rw-r--r--ext/io/wait/depend4
-rw-r--r--ext/io/wait/wait.c2
-rw-r--r--ext/json/fbuffer/fbuffer.h8
-rw-r--r--ext/json/generator/generator.c84
-rw-r--r--ext/json/generator/generator.h9
-rw-r--r--ext/json/lib/json.rb4
-rw-r--r--ext/json/lib/json/add/bigdecimal.rb7
-rw-r--r--ext/json/lib/json/common.rb32
-rw-r--r--ext/json/lib/json/generic_object.rb31
-rw-r--r--ext/json/lib/json/version.rb2
-rw-r--r--ext/json/parser/parser.c8
-rw-r--r--ext/json/parser/parser.rl8
-rw-r--r--ext/nkf/depend4
-rw-r--r--ext/nkf/nkf-utf8/nkf.c12
-rw-r--r--ext/nkf/nkf-utf8/nkf.h4
-rw-r--r--ext/nkf/nkf-utf8/utf8tbl.c1
-rw-r--r--ext/nkf/nkf-utf8/utf8tbl.h1
-rw-r--r--ext/objspace/depend13
-rw-r--r--ext/objspace/object_tracing.c490
-rw-r--r--ext/objspace/objspace.c366
-rw-r--r--ext/objspace/objspace.h20
-rw-r--r--ext/objspace/objspace_dump.c431
-rw-r--r--ext/openssl/depend6
-rw-r--r--ext/openssl/extconf.rb5
-rw-r--r--ext/openssl/lib/openssl/bn.rb5
-rw-r--r--ext/openssl/lib/openssl/buffering.rb48
-rw-r--r--ext/openssl/lib/openssl/config.rb169
-rw-r--r--ext/openssl/lib/openssl/digest.rb29
-rw-r--r--ext/openssl/lib/openssl/ssl.rb29
-rw-r--r--ext/openssl/openssl_missing.c4
-rw-r--r--ext/openssl/ossl.c135
-rw-r--r--ext/openssl/ossl.h2
-rw-r--r--ext/openssl/ossl_asn1.c54
-rw-r--r--ext/openssl/ossl_bn.c52
-rw-r--r--ext/openssl/ossl_config.c9
-rw-r--r--ext/openssl/ossl_engine.c158
-rw-r--r--ext/openssl/ossl_hmac.c100
-rw-r--r--ext/openssl/ossl_ocsp.c2
-rw-r--r--ext/openssl/ossl_pkcs7.c4
-rw-r--r--ext/openssl/ossl_pkey_dh.c4
-rw-r--r--ext/openssl/ossl_pkey_dsa.c2
-rw-r--r--ext/openssl/ossl_pkey_ec.c10
-rw-r--r--ext/openssl/ossl_pkey_rsa.c5
-rw-r--r--ext/openssl/ossl_ssl.c94
-rw-r--r--ext/openssl/ossl_x509attr.c4
-rw-r--r--ext/openssl/ossl_x509name.c4
-rw-r--r--ext/openssl/ossl_x509store.c8
-rw-r--r--ext/pathname/depend3
-rw-r--r--ext/pathname/pathname.c69
-rw-r--r--ext/psych/depend3
-rw-r--r--ext/psych/lib/psych.rb258
-rw-r--r--ext/psych/lib/psych/class_loader.rb101
-rw-r--r--ext/psych/lib/psych/deprecated.rb3
-rw-r--r--ext/psych/lib/psych/exception.rb13
-rw-r--r--ext/psych/lib/psych/json/stream.rb1
-rw-r--r--ext/psych/lib/psych/nodes/node.rb4
-rw-r--r--ext/psych/lib/psych/scalar_scanner.rb35
-rw-r--r--ext/psych/lib/psych/stream.rb1
-rw-r--r--ext/psych/lib/psych/streaming.rb15
-rw-r--r--ext/psych/lib/psych/syntax_error.rb7
-rw-r--r--ext/psych/lib/psych/visitors/json_tree.rb7
-rw-r--r--ext/psych/lib/psych/visitors/to_ruby.rb146
-rw-r--r--ext/psych/lib/psych/visitors/yaml_tree.rb103
-rw-r--r--ext/psych/lib/psych/y.rb2
-rw-r--r--ext/psych/psych.gemspec12
-rw-r--r--ext/psych/psych_to_ruby.c4
-rw-r--r--ext/psych/yaml/emitter.c8
-rw-r--r--ext/psych/yaml/scanner.c34
-rw-r--r--ext/psych/yaml/yaml.h4
-rw-r--r--ext/pty/depend7
-rw-r--r--ext/pty/lib/expect.rb24
-rw-r--r--ext/pty/pty.c164
-rw-r--r--ext/racc/cparse/README3
-rw-r--r--ext/racc/cparse/cparse.c50
-rw-r--r--ext/racc/cparse/depend1
-rw-r--r--ext/rbconfig/sizeof/depend3
-rw-r--r--ext/rbconfig/sizeof/extconf.rb2
-rw-r--r--ext/readline/README.ja51
-rw-r--r--ext/readline/depend6
-rw-r--r--ext/readline/extconf.rb7
-rw-r--r--ext/readline/readline.c840
-rw-r--r--ext/ripper/depend19
-rw-r--r--ext/ripper/eventids2.c6
-rw-r--r--ext/sdbm/_sdbm.c4
-rw-r--r--ext/sdbm/depend4
-rw-r--r--ext/sdbm/init.c41
-rw-r--r--ext/socket/.document1
-rw-r--r--ext/socket/ancdata.c98
-rw-r--r--ext/socket/basicsocket.c47
-rw-r--r--ext/socket/constants.c2
-rw-r--r--ext/socket/depend8
-rw-r--r--ext/socket/extconf.rb754
-rw-r--r--ext/socket/getaddrinfo.c10
-rw-r--r--ext/socket/getnameinfo.c8
-rw-r--r--ext/socket/ifaddr.c457
-rw-r--r--ext/socket/init.c78
-rw-r--r--ext/socket/ipsocket.c51
-rw-r--r--ext/socket/lib/socket.rb122
-rw-r--r--ext/socket/mkconstants.rb96
-rw-r--r--ext/socket/option.c205
-rw-r--r--ext/socket/raddrinfo.c380
-rw-r--r--ext/socket/rubysocket.h219
-rw-r--r--ext/socket/socket.c294
-rw-r--r--ext/socket/sockport.h71
-rw-r--r--ext/socket/tcpserver.c27
-rw-r--r--ext/socket/tcpsocket.c4
-rw-r--r--ext/socket/udpsocket.c13
-rw-r--r--ext/socket/unixserver.c6
-rw-r--r--ext/socket/unixsocket.c47
-rw-r--r--ext/stringio/depend7
-rw-r--r--ext/stringio/stringio.c88
-rw-r--r--ext/strscan/depend9
-rw-r--r--ext/strscan/strscan.c55
-rw-r--r--ext/syslog/depend4
-rw-r--r--ext/syslog/lib/syslog/logger.rb26
-rw-r--r--ext/syslog/syslog.c5
-rw-r--r--ext/thread/extconf.rb3
-rw-r--r--ext/thread/thread.c604
-rw-r--r--ext/tk/ChangeLog.tkextlib2
-rw-r--r--ext/tk/MANUAL_tcltklib.eng24
-rw-r--r--ext/tk/MANUAL_tcltklib.eucj (renamed from ext/tk/MANUAL_tcltklib.ja)0
-rw-r--r--ext/tk/README.1st2
-rw-r--r--ext/tk/README.ActiveTcl2
-rw-r--r--ext/tk/README.tcltklib16
-rw-r--r--ext/tk/extconf.rb143
-rw-r--r--ext/tk/lib/tk/canvas.rb11
-rw-r--r--ext/tk/lib/tk/image.rb2
-rw-r--r--ext/tk/lib/tk/msgcat.rb41
-rw-r--r--ext/tk/lib/tk/namespace.rb7
-rw-r--r--ext/tk/lib/tk/text.rb2
-rw-r--r--ext/tk/lib/tkextlib/SUPPORT_STATUS15
-rw-r--r--ext/tk/lib/tkextlib/blt/component.rb2
-rw-r--r--ext/tk/lib/tkextlib/blt/tree.rb2
-rw-r--r--ext/tk/lib/tkextlib/blt/treeview.rb2
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb2
-rwxr-xr-xext/tk/lib/tkextlib/pkg_checker.rb2
-rw-r--r--ext/tk/lib/tkextlib/tile/style.rb4
-rw-r--r--ext/tk/lib/tkextlib/tktable/tktable.rb2
-rw-r--r--ext/tk/old-README.tcltklib.eucj (renamed from ext/tk/old-README.tcltklib.ja)0
-rw-r--r--ext/tk/sample/demos-en/text.rb2
-rw-r--r--ext/tk/sample/demos-en/tree.rb2
-rw-r--r--ext/tk/sample/demos-en/widget6
-rw-r--r--ext/tk/sample/demos-jp/tree.rb2
-rw-r--r--ext/tk/sample/demos-jp/widget6
-rw-r--r--ext/tk/sample/figmemo_sample.rb2
-rw-r--r--ext/tk/sample/msgs_tk/README2
-rw-r--r--ext/tk/sample/scrollframe.rb2
-rw-r--r--ext/tk/sample/tkextlib/blt/readme.txt2
-rw-r--r--ext/tk/sample/tkextlib/bwidget/Orig_LICENSE.txt12
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/Orig_LICENSE.txt24
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/notebook.rb2
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/notebook2.rb2
-rw-r--r--ext/tk/sample/tkextlib/tcllib/Orig_LICENSE.txt8
-rw-r--r--ext/tk/sample/tkextlib/tkimg/demo.rb2
-rw-r--r--ext/tk/sample/tkextlib/tkimg/readme.txt2
-rw-r--r--ext/tk/sample/tkextlib/tktable/Orig_LICENSE.txt4
-rw-r--r--ext/tk/sample/tkextlib/treectrl/readme.txt2
-rw-r--r--ext/tk/sample/tkextlib/vu/Orig_LICENSE.txt4
-rw-r--r--ext/tk/sample/tktextframe.rb2
-rw-r--r--ext/tk/tcltklib.c121
-rw-r--r--ext/tk/tkutil/tkutil.c36
-rw-r--r--ext/win32/extconf.rb3
-rw-r--r--ext/win32/lib/win32/importer.rb14
-rw-r--r--ext/win32ole/extconf.rb11
-rw-r--r--ext/win32ole/lib/win32ole.rb22
-rw-r--r--ext/win32ole/sample/olegen.rb8
-rw-r--r--ext/win32ole/win32ole.c237
-rw-r--r--ext/zlib/depend5
-rw-r--r--ext/zlib/zlib.c62
-rw-r--r--file.c422
-rw-r--r--gc.c5428
-rw-r--r--gc.h15
-rw-r--r--golf_prelude.rb37
-rw-r--r--goruby.c2
-rw-r--r--hash.c833
-rw-r--r--include/ruby/backward/classext.h2
-rw-r--r--include/ruby/backward/rubysig.h8
-rw-r--r--include/ruby/debug.h36
-rw-r--r--include/ruby/defines.h178
-rw-r--r--include/ruby/encoding.h41
-rw-r--r--include/ruby/intern.h131
-rw-r--r--include/ruby/io.h23
-rw-r--r--include/ruby/missing.h35
-rw-r--r--include/ruby/oniguruma.h12
-rw-r--r--include/ruby/re.h8
-rw-r--r--include/ruby/regex.h8
-rw-r--r--include/ruby/ruby.h488
-rw-r--r--include/ruby/st.h39
-rw-r--r--include/ruby/thread.h8
-rw-r--r--include/ruby/util.h8
-rw-r--r--include/ruby/version.h10
-rw-r--r--include/ruby/vm.h8
-rw-r--r--include/ruby/win32.h120
-rw-r--r--insns.def209
-rw-r--r--internal.h569
-rw-r--r--io.c936
-rw-r--r--iseq.c234
-rw-r--r--iseq.h14
-rw-r--r--lib/English.rb42
-rw-r--r--lib/README93
-rwxr-xr-xlib/abbrev.rb4
-rw-r--r--lib/base64.rb2
-rw-r--r--lib/benchmark.rb80
-rw-r--r--lib/cgi.rb21
-rw-r--r--lib/cgi/cookie.rb60
-rw-r--r--lib/cgi/core.rb23
-rw-r--r--lib/cgi/html.rb295
-rw-r--r--lib/cgi/session.rb8
-rw-r--r--lib/cgi/util.rb50
-rw-r--r--lib/cmath.rb2
-rw-r--r--lib/csv.rb163
-rw-r--r--lib/debug.rb32
-rw-r--r--lib/delegate.rb70
-rw-r--r--lib/drb/drb.rb95
-rw-r--r--lib/drb/eq.rb2
-rw-r--r--lib/drb/extserv.rb2
-rw-r--r--lib/drb/gw.rb42
-rw-r--r--lib/drb/invokemethod.rb2
-rw-r--r--lib/drb/observer.rb3
-rw-r--r--lib/drb/ssl.rb162
-rw-r--r--lib/drb/timeridconv.rb16
-rw-r--r--lib/drb/unix.rb7
-rw-r--r--lib/e2mmap.rb22
-rw-r--r--lib/erb.rb23
-rw-r--r--lib/fileutils.rb516
-rw-r--r--lib/find.rb40
-rw-r--r--lib/forwardable.rb44
-rw-r--r--lib/getoptlong.rb2
-rw-r--r--lib/gserver.rb15
-rw-r--r--lib/ipaddr.rb7
-rw-r--r--lib/irb.rb55
-rw-r--r--lib/irb/completion.rb40
-rw-r--r--lib/irb/context.rb16
-rw-r--r--lib/irb/ext/save-history.rb20
-rw-r--r--lib/irb/inspector.rb2
-rw-r--r--lib/irb/lc/.document4
-rw-r--r--lib/irb/lc/help-message26
-rw-r--r--lib/irb/lc/ja/help-message20
-rw-r--r--lib/irb/notifier.rb4
-rw-r--r--lib/irb/workspace.rb2
-rw-r--r--lib/logger.rb77
-rw-r--r--lib/matrix.rb26
-rw-r--r--lib/matrix/eigenvalue_decomposition.rb16
-rw-r--r--lib/matrix/lup_decomposition.rb10
-rw-r--r--lib/minitest/.document2
-rw-r--r--lib/minitest/README.txt155
-rw-r--r--lib/minitest/benchmark.rb43
-rw-r--r--lib/minitest/hell.rb6
-rw-r--r--lib/minitest/mock.rb8
-rw-r--r--lib/minitest/parallel_each.rb46
-rw-r--r--lib/minitest/spec.rb274
-rw-r--r--lib/minitest/unit.rb249
-rw-r--r--lib/mkmf.rb343
-rw-r--r--lib/mutex_m.rb58
-rw-r--r--lib/net/ftp.rb21
-rw-r--r--lib/net/http.rb35
-rw-r--r--lib/net/http/generic_request.rb22
-rw-r--r--lib/net/http/header.rb10
-rw-r--r--lib/net/http/response.rb6
-rw-r--r--lib/net/http/responses.rb5
-rw-r--r--lib/net/imap.rb46
-rw-r--r--lib/net/pop.rb20
-rw-r--r--lib/net/smtp.rb28
-rw-r--r--lib/observer.rb15
-rw-r--r--lib/open-uri.rb37
-rw-r--r--lib/open3.rb193
-rw-r--r--lib/optparse.rb63
-rw-r--r--lib/ostruct.rb14
-rw-r--r--lib/pp.rb140
-rw-r--r--lib/prettyprint.rb205
-rw-r--r--lib/prime.rb125
-rw-r--r--lib/profiler.rb51
-rw-r--r--lib/racc/parser.rb249
-rw-r--r--lib/racc/rdoc/grammar.en.rdoc226
-rw-r--r--lib/rake.rb2
-rw-r--r--lib/rake/alt_system.rb7
-rw-r--r--lib/rake/application.rb242
-rw-r--r--lib/rake/backtrace.rb16
-rw-r--r--lib/rake/classic_namespace.rb11
-rw-r--r--lib/rake/clean.rb31
-rw-r--r--lib/rake/contrib/ftptools.rb24
-rw-r--r--lib/rake/contrib/sys.rb194
-rw-r--r--lib/rake/dsl_definition.rb29
-rw-r--r--lib/rake/ext/core.rb3
-rw-r--r--lib/rake/ext/module.rb38
-rw-r--r--lib/rake/ext/string.rb4
-rw-r--r--lib/rake/file_list.rb42
-rw-r--r--lib/rake/file_task.rb3
-rw-r--r--lib/rake/file_utils.rb20
-rw-r--r--lib/rake/file_utils_ext.rb6
-rw-r--r--lib/rake/gempackagetask.rb17
-rw-r--r--lib/rake/invocation_chain.rb42
-rw-r--r--lib/rake/lib/.document1
-rw-r--r--lib/rake/linked_list.rb103
-rw-r--r--lib/rake/packagetask.rb17
-rw-r--r--lib/rake/promise.rb2
-rw-r--r--lib/rake/pseudo_status.rb5
-rw-r--r--lib/rake/rdoctask.rb236
-rw-r--r--lib/rake/ruby182_test_unit_fix.rb6
-rw-r--r--lib/rake/runtest.rb4
-rw-r--r--lib/rake/scope.rb42
-rw-r--r--lib/rake/task.rb120
-rw-r--r--lib/rake/task_arguments.rb15
-rw-r--r--lib/rake/task_manager.rb60
-rw-r--r--lib/rake/tasklib.rb2
-rw-r--r--lib/rake/testtask.rb17
-rw-r--r--lib/rake/thread_history_display.rb2
-rw-r--r--lib/rake/thread_pool.rb14
-rw-r--r--lib/rake/trace_output.rb5
-rw-r--r--lib/rake/version.rb10
-rw-r--r--lib/rake/win32.rb5
-rw-r--r--lib/rbconfig/obsolete.rb2
-rw-r--r--lib/rdoc.rb7
-rw-r--r--lib/rdoc/any_method.rb54
-rw-r--r--lib/rdoc/attr.rb2
-rw-r--r--lib/rdoc/class_module.rb33
-rw-r--r--lib/rdoc/code_object.rb128
-rw-r--r--lib/rdoc/comment.rb3
-rw-r--r--lib/rdoc/constant.rb10
-rw-r--r--lib/rdoc/context.rb22
-rw-r--r--lib/rdoc/cross_reference.rb2
-rw-r--r--lib/rdoc/extend.rb116
-rw-r--r--lib/rdoc/generator/darkfish.rb79
-rw-r--r--lib/rdoc/generator/template/darkfish/_footer.rhtml8
-rw-r--r--lib/rdoc/generator/template/darkfish/_head.rhtml22
-rw-r--r--lib/rdoc/generator/template/darkfish/_sidebar_VCS_info.rhtml7
-rw-r--r--lib/rdoc/generator/template/darkfish/_sidebar_classes.rhtml6
-rw-r--r--lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml7
-rw-r--r--lib/rdoc/generator/template/darkfish/_sidebar_in_files.rhtml7
-rw-r--r--lib/rdoc/generator/template/darkfish/_sidebar_includes.rhtml7
-rw-r--r--lib/rdoc/generator/template/darkfish/_sidebar_installed.rhtml9
-rw-r--r--lib/rdoc/generator/template/darkfish/_sidebar_methods.rhtml8
-rw-r--r--lib/rdoc/generator/template/darkfish/_sidebar_navigation.rhtml14
-rw-r--r--lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml10
-rw-r--r--lib/rdoc/generator/template/darkfish/_sidebar_parent.rhtml7
-rw-r--r--lib/rdoc/generator/template/darkfish/_sidebar_search.rhtml18
-rw-r--r--lib/rdoc/generator/template/darkfish/_sidebar_sections.rhtml9
-rw-r--r--lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml13
-rw-r--r--lib/rdoc/generator/template/darkfish/class.rhtml77
-rw-r--r--lib/rdoc/generator/template/darkfish/fonts.css167
-rw-r--r--lib/rdoc/generator/template/darkfish/fonts/Lato-Light.ttfbin94668 -> 0 bytes-rw-r--r--lib/rdoc/generator/template/darkfish/fonts/Lato-LightItalic.ttfbin94196 -> 0 bytes-rw-r--r--lib/rdoc/generator/template/darkfish/fonts/Lato-Regular.ttfbin96184 -> 0 bytes-rw-r--r--lib/rdoc/generator/template/darkfish/fonts/Lato-RegularItalic.ttfbin95316 -> 0 bytes-rw-r--r--lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Bold.ttfbin71200 -> 0 bytes-rw-r--r--lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Regular.ttfbin71692 -> 0 bytes-rw-r--r--lib/rdoc/generator/template/darkfish/index.rhtml18
-rw-r--r--lib/rdoc/generator/template/darkfish/js/darkfish.js31
-rw-r--r--lib/rdoc/generator/template/darkfish/js/search.js25
-rw-r--r--lib/rdoc/generator/template/darkfish/page.rhtml18
-rw-r--r--lib/rdoc/generator/template/darkfish/rdoc.css467
-rw-r--r--lib/rdoc/generator/template/darkfish/servlet_not_found.rhtml10
-rw-r--r--lib/rdoc/generator/template/darkfish/servlet_root.rhtml38
-rw-r--r--lib/rdoc/generator/template/darkfish/table_of_contents.rhtml31
-rw-r--r--lib/rdoc/generator/template/json_index/.document1
-rw-r--r--lib/rdoc/include.rb118
-rw-r--r--lib/rdoc/known_classes.rb1
-rw-r--r--lib/rdoc/markdown.rb2169
-rw-r--r--lib/rdoc/markdown/literals_1_9.rb27
-rw-r--r--lib/rdoc/markup.rb25
-rw-r--r--lib/rdoc/markup/attribute_manager.rb5
-rw-r--r--lib/rdoc/markup/formatter.rb6
-rw-r--r--lib/rdoc/markup/heading.rb13
-rw-r--r--lib/rdoc/markup/parser.rb13
-rw-r--r--lib/rdoc/markup/pre_process.rb2
-rw-r--r--lib/rdoc/markup/to_html.rb105
-rw-r--r--lib/rdoc/markup/to_html_crossref.rb3
-rw-r--r--lib/rdoc/markup/to_joined_paragraph.rb2
-rw-r--r--lib/rdoc/markup/to_markdown.rb12
-rw-r--r--lib/rdoc/markup/verbatim.rb2
-rw-r--r--lib/rdoc/method_attr.rb14
-rw-r--r--lib/rdoc/mixin.rb120
-rw-r--r--lib/rdoc/normal_class.rb4
-rw-r--r--lib/rdoc/normal_module.rb4
-rw-r--r--lib/rdoc/options.rb82
-rw-r--r--lib/rdoc/parser.rb15
-rw-r--r--lib/rdoc/parser/c.rb56
-rw-r--r--lib/rdoc/parser/ruby.rb1163
-rw-r--r--lib/rdoc/rdoc.rb9
-rw-r--r--lib/rdoc/ri/driver.rb281
-rw-r--r--lib/rdoc/ri/paths.rb12
-rw-r--r--lib/rdoc/ruby_lex.rb229
-rw-r--r--lib/rdoc/ruby_token.rb81
-rw-r--r--lib/rdoc/rubygems_hook.rb11
-rw-r--r--lib/rdoc/servlet.rb74
-rw-r--r--lib/rdoc/stats.rb109
-rw-r--r--lib/rdoc/store.rb18
-rw-r--r--lib/rdoc/test_case.rb39
-rw-r--r--lib/rdoc/text.rb2
-rw-r--r--lib/rdoc/tom_doc.rb32
-rw-r--r--lib/rdoc/top_level.rb7
-rw-r--r--lib/resolv-replace.rb2
-rw-r--r--lib/resolv.rb442
-rw-r--r--lib/rexml/attribute.rb7
-rw-r--r--lib/rexml/document.rb34
-rw-r--r--lib/rexml/element.rb9
-rw-r--r--lib/rexml/entity.rb2
-rw-r--r--lib/rexml/formatters/pretty.rb2
-rw-r--r--lib/rexml/parsers/baseparser.rb28
-rw-r--r--lib/rexml/parsers/sax2parser.rb30
-rw-r--r--lib/rexml/parsers/streamparser.rb6
-rw-r--r--lib/rexml/parsers/treeparser.rb6
-rw-r--r--lib/rexml/parsers/ultralightparser.rb2
-rw-r--r--lib/rexml/sax2listener.rb16
-rw-r--r--lib/rexml/security.rb27
-rw-r--r--lib/rexml/streamlistener.rb12
-rw-r--r--lib/rexml/text.rb59
-rw-r--r--lib/rinda/rinda.rb50
-rw-r--r--lib/rinda/ring.rb274
-rw-r--r--lib/rinda/tuplespace.rb4
-rw-r--r--lib/rss/0.9.rb33
-rw-r--r--lib/rss/1.0.rb32
-rw-r--r--lib/rss/2.0.rb31
-rw-r--r--lib/rss/atom.rb83
-rw-r--r--lib/rss/content.rb2
-rw-r--r--lib/rss/dublincore.rb2
-rw-r--r--lib/rss/image.rb4
-rw-r--r--lib/rss/itunes.rb2
-rw-r--r--lib/rss/maker.rb26
-rw-r--r--lib/rss/parser.rb2
-rw-r--r--lib/rss/rexmlparser.rb5
-rw-r--r--lib/rss/rss.rb66
-rw-r--r--lib/rss/slash.rb2
-rw-r--r--lib/rss/syndication.rb3
-rw-r--r--lib/rss/taxonomy.rb4
-rw-r--r--lib/rss/trackback.rb4
-rw-r--r--lib/rss/utils.rb92
-rw-r--r--lib/rss/xmlparser.rb3
-rw-r--r--lib/rubygems.rb372
-rw-r--r--lib/rubygems/LICENSE.txt54
-rw-r--r--lib/rubygems/available_set.rb200
-rw-r--r--lib/rubygems/basic_specification.rb232
-rw-r--r--lib/rubygems/command_manager.rb77
-rw-r--r--lib/rubygems/commands/build_command.rb19
-rw-r--r--lib/rubygems/commands/cert_command.rb110
-rw-r--r--lib/rubygems/commands/check_command.rb7
-rw-r--r--lib/rubygems/commands/cleanup_command.rb14
-rw-r--r--lib/rubygems/commands/contents_command.rb167
-rw-r--r--lib/rubygems/commands/dependency_command.rb158
-rw-r--r--lib/rubygems/commands/environment_command.rb126
-rw-r--r--lib/rubygems/commands/fetch_command.rb16
-rw-r--r--lib/rubygems/commands/help_command.rb132
-rw-r--r--lib/rubygems/commands/install_command.rb195
-rw-r--r--lib/rubygems/commands/list_command.rb23
-rw-r--r--lib/rubygems/commands/mirror_command.rb6
-rw-r--r--lib/rubygems/commands/outdated_command.rb21
-rw-r--r--lib/rubygems/commands/owner_command.rb19
-rw-r--r--lib/rubygems/commands/pristine_command.rb62
-rw-r--r--lib/rubygems/commands/push_command.rb49
-rw-r--r--lib/rubygems/commands/query_command.rb88
-rw-r--r--lib/rubygems/commands/rdoc_command.rb8
-rw-r--r--lib/rubygems/commands/search_command.rb31
-rw-r--r--lib/rubygems/commands/setup_command.rb94
-rw-r--r--lib/rubygems/commands/sources_command.rb198
-rw-r--r--lib/rubygems/commands/specification_command.rb20
-rw-r--r--lib/rubygems/commands/stale_command.rb10
-rw-r--r--lib/rubygems/commands/uninstall_command.rb45
-rw-r--r--lib/rubygems/commands/unpack_command.rb20
-rw-r--r--lib/rubygems/commands/update_command.rb207
-rw-r--r--lib/rubygems/commands/which_command.rb24
-rw-r--r--lib/rubygems/commands/yank_command.rb18
-rw-r--r--lib/rubygems/compatibility.rb9
-rw-r--r--lib/rubygems/config_file.rb104
-rw-r--r--lib/rubygems/core_ext/kernel_gem.rb6
-rwxr-xr-xlib/rubygems/core_ext/kernel_require.rb40
-rw-r--r--lib/rubygems/defaults.rb54
-rw-r--r--lib/rubygems/dependency.rb6
-rw-r--r--lib/rubygems/dependency_installer.rb408
-rw-r--r--lib/rubygems/dependency_list.rb2
-rw-r--r--lib/rubygems/dependency_resolver.rb562
-rw-r--r--lib/rubygems/doctor.rb28
-rw-r--r--lib/rubygems/errors.rb31
-rw-r--r--lib/rubygems/exceptions.rb145
-rw-r--r--lib/rubygems/ext.rb3
-rw-r--r--lib/rubygems/ext/build_error.rb6
-rw-r--r--lib/rubygems/ext/builder.rb194
-rw-r--r--lib/rubygems/ext/cmake_builder.rb4
-rw-r--r--lib/rubygems/ext/configure_builder.rb4
-rw-r--r--lib/rubygems/ext/ext_conf_builder.rb62
-rw-r--r--lib/rubygems/ext/rake_builder.rb7
-rw-r--r--lib/rubygems/gem_runner.rb26
-rw-r--r--lib/rubygems/gemcutter_utilities.rb123
-rw-r--r--lib/rubygems/indexer.rb10
-rw-r--r--lib/rubygems/install_default_message.rb12
-rw-r--r--lib/rubygems/install_update_options.rb3
-rw-r--r--lib/rubygems/installer.rb174
-rw-r--r--lib/rubygems/installer_test_case.rb5
-rw-r--r--lib/rubygems/name_tuple.rb25
-rw-r--r--lib/rubygems/package.rb110
-rw-r--r--lib/rubygems/package/old.rb43
-rw-r--r--lib/rubygems/package/tar_test_case.rb18
-rw-r--r--lib/rubygems/package/tar_writer.rb47
-rw-r--r--lib/rubygems/package_task.rb7
-rw-r--r--lib/rubygems/path_support.rb10
-rw-r--r--lib/rubygems/platform.rb22
-rw-r--r--lib/rubygems/psych_additions.rb4
-rw-r--r--lib/rubygems/psych_tree.rb4
-rw-r--r--lib/rubygems/rdoc.rb13
-rw-r--r--lib/rubygems/remote_fetcher.rb262
-rw-r--r--lib/rubygems/request.rb274
-rw-r--r--lib/rubygems/request_set.rb360
-rw-r--r--lib/rubygems/request_set/gem_dependency_api.rb521
-rw-r--r--lib/rubygems/request_set/lockfile.rb579
-rw-r--r--lib/rubygems/requirement.rb88
-rw-r--r--lib/rubygems/resolver.rb471
-rw-r--r--lib/rubygems/resolver/activation_request.rb165
-rw-r--r--lib/rubygems/resolver/api_set.rb110
-rw-r--r--lib/rubygems/resolver/api_specification.rb79
-rw-r--r--lib/rubygems/resolver/best_set.rb31
-rw-r--r--lib/rubygems/resolver/composed_set.rb39
-rw-r--r--lib/rubygems/resolver/conflict.rb122
-rw-r--r--lib/rubygems/resolver/current_set.rb13
-rw-r--r--lib/rubygems/resolver/dependency_request.rb97
-rw-r--r--lib/rubygems/resolver/git_set.rb119
-rw-r--r--lib/rubygems/resolver/git_specification.rb35
-rw-r--r--lib/rubygems/resolver/index_set.rb74
-rw-r--r--lib/rubygems/resolver/index_specification.rb69
-rw-r--r--lib/rubygems/resolver/installed_specification.rb40
-rw-r--r--lib/rubygems/resolver/installer_set.rb155
-rw-r--r--lib/rubygems/resolver/local_specification.rb16
-rw-r--r--lib/rubygems/resolver/lock_set.rb78
-rw-r--r--lib/rubygems/resolver/lock_specification.rb58
-rw-r--r--lib/rubygems/resolver/requirement_list.rb81
-rw-r--r--lib/rubygems/resolver/set.rb27
-rw-r--r--lib/rubygems/resolver/spec_specification.rb58
-rw-r--r--lib/rubygems/resolver/specification.rb89
-rw-r--r--lib/rubygems/resolver/stats.rb44
-rw-r--r--lib/rubygems/resolver/vendor_set.rb83
-rw-r--r--lib/rubygems/resolver/vendor_specification.rb24
-rw-r--r--lib/rubygems/security.rb49
-rw-r--r--lib/rubygems/security/policy.rb105
-rw-r--r--lib/rubygems/security/signer.rb34
-rw-r--r--lib/rubygems/security/trust_dir.rb18
-rw-r--r--lib/rubygems/server.rb24
-rw-r--r--lib/rubygems/source.rb130
-rw-r--r--lib/rubygems/source/git.rb218
-rw-r--r--lib/rubygems/source/installed.rb35
-rw-r--r--lib/rubygems/source/local.rb129
-rw-r--r--lib/rubygems/source/lock.rb48
-rw-r--r--lib/rubygems/source/specific_file.rb67
-rw-r--r--lib/rubygems/source/vendor.rb27
-rw-r--r--lib/rubygems/source_list.rb86
-rw-r--r--lib/rubygems/source_local.rb91
-rw-r--r--lib/rubygems/source_specific_file.rb28
-rw-r--r--lib/rubygems/spec_fetcher.rb71
-rw-r--r--lib/rubygems/specification.rb685
-rw-r--r--lib/rubygems/ssl_certs/.document1
-rw-r--r--lib/rubygems/ssl_certs/AddTrustExternalCARoot.pem90
-rw-r--r--lib/rubygems/ssl_certs/Class3PublicPrimaryCertificationAuthority.pem14
-rw-r--r--lib/rubygems/ssl_certs/DigiCertHighAssuranceEVRootCA.pem23
-rw-r--r--lib/rubygems/ssl_certs/Entrust_net-Secure-Server-Certification-Authority.pem90
-rw-r--r--lib/rubygems/ssl_certs/EntrustnetSecureServerCertificationAuthority.pem28
-rw-r--r--lib/rubygems/ssl_certs/GeoTrustGlobalCA.pem20
-rw-r--r--lib/rubygems/ssl_certs/VerisignClass3PublicPrimaryCertificationAuthority-G2.pem57
-rw-r--r--lib/rubygems/ssl_certs/ca-bundle.pem3366
-rw-r--r--lib/rubygems/stub_specification.rb176
-rw-r--r--lib/rubygems/syck_hack.rb6
-rw-r--r--lib/rubygems/test_case.rb541
-rw-r--r--lib/rubygems/test_utilities.rb207
-rw-r--r--lib/rubygems/uninstaller.rb53
-rw-r--r--lib/rubygems/uri_formatter.rb49
-rw-r--r--lib/rubygems/user_interaction.rb264
-rw-r--r--lib/rubygems/util.rb121
-rw-r--r--lib/rubygems/util/list.rb48
-rw-r--r--lib/rubygems/util/stringio.rb34
-rw-r--r--lib/rubygems/validator.rb8
-rw-r--r--lib/rubygems/version.rb30
-rw-r--r--lib/rubygems/version_option.rb10
-rw-r--r--lib/scanf.rb9
-rw-r--r--lib/securerandom.rb86
-rw-r--r--lib/set.rb71
-rw-r--r--lib/shell.rb2
-rw-r--r--lib/shell/command-processor.rb7
-rw-r--r--lib/shell/filter.rb2
-rw-r--r--lib/shellwords.rb2
-rw-r--r--lib/sync.rb2
-rw-r--r--lib/tempfile.rb52
-rw-r--r--lib/test/unit.rb47
-rw-r--r--lib/test/unit/assertions.rb109
-rw-r--r--lib/test/unit/parallel.rb20
-rw-r--r--lib/test/unit/testcase.rb2
-rw-r--r--lib/thread.rb363
-rw-r--r--lib/thwait.rb2
-rw-r--r--lib/time.rb20
-rw-r--r--lib/timeout.rb49
-rw-r--r--lib/tmpdir.rb2
-rw-r--r--lib/tracer.rb52
-rw-r--r--lib/tsort.rb242
-rw-r--r--lib/un.rb34
-rw-r--r--lib/uri/common.rb306
-rw-r--r--lib/uri/ftp.rb17
-rw-r--r--lib/uri/generic.rb37
-rw-r--r--lib/weakref.rb12
-rw-r--r--lib/webrick.rb4
-rw-r--r--lib/webrick/accesslog.rb9
-rw-r--r--lib/webrick/cgi.rb52
-rw-r--r--lib/webrick/compat.rb2
-rw-r--r--lib/webrick/config.rb32
-rw-r--r--lib/webrick/cookie.rb71
-rw-r--r--lib/webrick/htmlutils.rb5
-rw-r--r--lib/webrick/httpauth/authenticator.rb20
-rw-r--r--lib/webrick/httpauth/basicauth.rb2
-rw-r--r--lib/webrick/httpauth/digestauth.rb26
-rw-r--r--lib/webrick/httpauth/htdigest.rb9
-rw-r--r--lib/webrick/httpauth/htpasswd.rb9
-rw-r--r--lib/webrick/httpproxy.rb24
-rw-r--r--lib/webrick/httprequest.rb151
-rw-r--r--lib/webrick/httpresponse.rb90
-rw-r--r--lib/webrick/https.rb24
-rw-r--r--lib/webrick/httpserver.rb16
-rw-r--r--lib/webrick/httpservlet/cgihandler.rb19
-rw-r--r--lib/webrick/httpservlet/filehandler.rb118
-rw-r--r--lib/webrick/httpservlet/prochandler.rb13
-rw-r--r--lib/webrick/httpstatus.rb2
-rw-r--r--lib/webrick/httputils.rb141
-rw-r--r--lib/webrick/httpversion.rb28
-rw-r--r--lib/webrick/log.rb23
-rw-r--r--lib/webrick/server.rb74
-rw-r--r--lib/webrick/ssl.rb72
-rw-r--r--lib/webrick/utils.rb26
-rw-r--r--lib/webrick/version.rb4
-rw-r--r--lib/xmlrpc.rb4
-rw-r--r--lib/xmlrpc/client.rb34
-rw-r--r--lib/xmlrpc/config.rb2
-rw-r--r--lib/xmlrpc/datetime.rb2
-rw-r--r--lib/xmlrpc/httpserver.rb2
-rw-r--r--lib/xmlrpc/server.rb6
-rw-r--r--lib/yaml.rb67
-rw-r--r--lib/yaml/dbm.rb77
-rw-r--r--load.c255
-rw-r--r--loadpath.c92
-rw-r--r--localeinit.c65
-rw-r--r--man/rake.142
-rw-r--r--man/ri.13
-rw-r--r--man/ruby.114
-rw-r--r--marshal.c297
-rw-r--r--math.c357
-rw-r--r--method.h20
-rw-r--r--miniinit.c30
-rw-r--r--misc/inf-ruby.el2
-rw-r--r--misc/rdoc-mode.el2
-rw-r--r--misc/ruby-additional.el199
-rw-r--r--misc/ruby-electric.el563
-rw-r--r--misc/ruby-mode.el158
-rw-r--r--misc/ruby-style.el1
-rw-r--r--missing/crypt.c2
-rw-r--r--missing/file.h2
-rw-r--r--missing/flock.c4
-rw-r--r--missing/isnan.c15
-rw-r--r--nacl/README.nacl2
-rw-r--r--node.h24
-rw-r--r--numeric.c1440
-rw-r--r--object.c574
-rw-r--r--pack.c549
-rw-r--r--parse.y736
-rw-r--r--probes.d228
-rw-r--r--proc.c682
-rw-r--r--process.c1167
-rw-r--r--random.c359
-rw-r--r--range.c396
-rw-r--r--rational.c477
-rw-r--r--re.c71
-rw-r--r--regcomp.c48
-rw-r--r--regenc.h8
-rw-r--r--regexec.c22
-rw-r--r--regint.h23
-rw-r--r--regparse.c75
-rw-r--r--regparse.h8
-rw-r--r--ruby.c171
-rw-r--r--ruby_atomic.h62
-rw-r--r--safe.c32
-rw-r--r--sample/cal.rb10
-rw-r--r--sample/coverage.rb2
-rw-r--r--sample/drb/README.rd (renamed from sample/drb/README.rdoc)6
-rw-r--r--sample/drb/README.rd.ja (renamed from sample/drb/README.ja.rdoc)2
-rw-r--r--sample/drb/dbiff.rb22
-rw-r--r--sample/drb/dchats.rb20
-rw-r--r--sample/drb/dlogd.rb4
-rw-r--r--sample/drb/gw_cu.rb2
-rw-r--r--sample/drb/http0.rb60
-rw-r--r--sample/drb/http0serv.rb106
-rw-r--r--sample/drb/old_tuplespace.rb74
-rw-r--r--sample/drb/simpletuple.rb8
-rw-r--r--sample/dualstack-fetch.rb2
-rw-r--r--sample/dualstack-httpd.rb32
-rw-r--r--sample/exyacc.rb24
-rw-r--r--sample/fib.awk8
-rw-r--r--sample/fib.pl4
-rw-r--r--sample/fib.scm4
-rw-r--r--sample/freq.rb2
-rw-r--r--sample/from.rb38
-rw-r--r--sample/logger/app.rb2
-rw-r--r--sample/mkproto.rb22
-rw-r--r--sample/observ.rb8
-rw-r--r--sample/occur.pl8
-rw-r--r--sample/occur.rb2
-rw-r--r--sample/occur2.rb2
-rw-r--r--sample/openssl/c_rehash.rb38
-rw-r--r--sample/openssl/certstore.rb52
-rw-r--r--sample/openssl/crlstore.rb32
-rwxr-xr-xsample/optparse/opttest.rb70
-rw-r--r--sample/pty/expect_sample.rb2
-rw-r--r--sample/rcs.awk54
-rwxr-xr-xsample/test.rb49
-rw-r--r--sample/trick2013/README.md13
-rw-r--r--sample/trick2013/kinaba/authors.markdown3
-rw-r--r--sample/trick2013/kinaba/entry.rb1
-rw-r--r--sample/trick2013/kinaba/remarks.markdown37
-rw-r--r--sample/trick2013/mame/authors.markdown3
-rw-r--r--sample/trick2013/mame/entry.rb97
-rw-r--r--sample/trick2013/mame/music-box.mp4bin580724 -> 0 bytes-rw-r--r--sample/trick2013/mame/remarks.markdown47
-rw-r--r--sample/trick2013/shinh/authors.markdown2
-rw-r--r--sample/trick2013/shinh/entry.rb10
-rw-r--r--sample/trick2013/shinh/remarks.markdown4
-rw-r--r--sample/trick2013/yhara/authors.markdown3
-rw-r--r--sample/trick2013/yhara/entry.rb28
-rw-r--r--sample/trick2013/yhara/remarks.en.markdown23
-rw-r--r--sample/trick2013/yhara/remarks.markdown24
-rw-r--r--sample/trojan.rb2
-rw-r--r--signal.c120
-rw-r--r--siphash.c6
-rw-r--r--sparc.c11
-rw-r--r--sprintf.c239
-rw-r--r--st.c132
-rw-r--r--strftime.c3
-rw-r--r--string.c1214
-rw-r--r--struct.c586
-rw-r--r--template/GNUmakefile.in6
-rw-r--r--template/encdb.h.tmpl14
-rw-r--r--template/id.h.tmpl33
-rw-r--r--template/ruby.pc.in36
-rw-r--r--template/sizes.c.tmpl30
-rw-r--r--template/verconf.h.in61
-rw-r--r--template/yarvarch.ja14
-rw-r--r--test/-ext-/bignum/test_big2str.rb29
-rw-r--r--test/-ext-/bignum/test_bigzero.rb13
-rw-r--r--test/-ext-/bignum/test_div.rb28
-rw-r--r--test/-ext-/bignum/test_mul.rb137
-rw-r--r--test/-ext-/bignum/test_pack.rb374
-rw-r--r--test/-ext-/bignum/test_str2big.rb37
-rw-r--r--test/-ext-/bug_reporter/test_bug_reporter.rb17
-rw-r--r--test/-ext-/class/test_class2name.rb18
-rw-r--r--test/-ext-/debug/test_debug.rb58
-rw-r--r--test/-ext-/debug/test_profile_frames.rb104
-rw-r--r--test/-ext-/exception/test_data_error.rb14
-rw-r--r--test/-ext-/exception/test_ensured.rb32
-rw-r--r--test/-ext-/file/test_stat.rb14
-rw-r--r--test/-ext-/iter/test_iter_break.rb12
-rw-r--r--test/-ext-/iter/test_yield_block.rb21
-rw-r--r--test/-ext-/marshal/test_usrmarshal.rb3
-rw-r--r--test/-ext-/method/test_arity.rb37
-rw-r--r--test/-ext-/num2int/test_num2int.rb374
-rw-r--r--test/-ext-/old_thread_select/test_old_thread_select.rb5
-rw-r--r--test/-ext-/postponed_job/test_postponed_job.rb28
-rw-r--r--test/-ext-/rational/test_rat.rb31
-rw-r--r--test/-ext-/string/test_cstr.rb25
-rw-r--r--test/-ext-/string/test_ellipsize.rb2
-rw-r--r--test/-ext-/string/test_normalize.rb106
-rw-r--r--test/-ext-/symbol/test_inadvertent_creation.rb111
-rw-r--r--test/-ext-/symbol/test_type.rb120
-rw-r--r--test/-ext-/test_printf.rb149
-rw-r--r--test/-ext-/test_recursion.rb36
-rw-r--r--test/-ext-/tracepoint/test_tracepoint.rb80
-rw-r--r--test/-ext-/typeddata/test_typeddata.rb15
-rw-r--r--test/-ext-/wait_for_single_fd/test_wait_for_single_fd.rb2
-rw-r--r--test/bigdecimal/test_bigdecimal.rb189
-rw-r--r--test/bigdecimal/test_bigdecimal_util.rb13
-rw-r--r--test/cgi/test_cgi_tag_helper.rb1
-rw-r--r--test/cgi/test_cgi_util.rb27
-rw-r--r--test/coverage/test_coverage.rb2
-rwxr-xr-xtest/csv/test_features.rb55
-rwxr-xr-xtest/csv/test_interface.rb25
-rwxr-xr-xtest/csv/test_row.rb7
-rwxr-xr-xtest/csv/test_serialization.rb158
-rw-r--r--test/csv/ts_all.rb1
-rw-r--r--test/date/test_date.rb9
-rw-r--r--test/date/test_date_parse.rb15
-rw-r--r--test/date/test_switch_hitter.rb53
-rw-r--r--test/dbm/test_dbm.rb9
-rwxr-xr-xtest/digest/test_digest.rb44
-rw-r--r--test/dl/test_base.rb12
-rw-r--r--test/dl/test_dl2.rb27
-rw-r--r--test/drb/drbtest.rb53
-rw-r--r--test/drb/ignore_test_drb.rb16
-rw-r--r--test/drb/test_drb.rb52
-rw-r--r--test/drb/test_drbssl.rb10
-rw-r--r--test/drb/test_drbunix.rb10
-rw-r--r--test/drb/ut_array.rb2
-rw-r--r--test/drb/ut_array_drbssl.rb2
-rw-r--r--test/drb/ut_eq.rb2
-rw-r--r--test/dtrace/helper.rb27
-rw-r--r--test/dtrace/test_array_create.rb2
-rw-r--r--test/dtrace/test_cmethod.rb2
-rw-r--r--test/dtrace/test_function_entry.rb2
-rw-r--r--test/dtrace/test_gc.rb2
-rw-r--r--test/dtrace/test_hash_create.rb2
-rw-r--r--test/dtrace/test_load.rb2
-rw-r--r--test/dtrace/test_method_cache.rb28
-rw-r--r--test/dtrace/test_object_create_start.rb2
-rw-r--r--test/dtrace/test_raise.rb2
-rw-r--r--test/dtrace/test_require.rb2
-rw-r--r--test/dtrace/test_singleton_function.rb2
-rw-r--r--test/dtrace/test_string.rb2
-rw-r--r--test/erb/test_erb.rb5
-rw-r--r--test/fiddle/helper.rb12
-rw-r--r--test/fiddle/test_c_struct_entry.rb10
-rw-r--r--test/fiddle/test_c_union_entity.rb9
-rw-r--r--test/fiddle/test_cparser.rb10
-rw-r--r--test/fiddle/test_func.rb17
-rw-r--r--test/fiddle/test_handle.rb15
-rw-r--r--test/fiddle/test_import.rb9
-rw-r--r--test/fiddle/test_pointer.rb9
-rw-r--r--test/fileutils/fileasserts.rb23
-rw-r--r--test/fileutils/test_dryrun.rb21
-rw-r--r--test/fileutils/test_fileutils.rb195
-rw-r--r--test/fileutils/test_nowrite.rb21
-rw-r--r--test/fileutils/test_verbose.rb19
-rw-r--r--test/fileutils/visibility_tests.rb41
-rw-r--r--test/gdbm/test_gdbm.rb100
-rw-r--r--test/io/console/test_io_console.rb72
-rw-r--r--test/io/wait/test_io_wait.rb6
-rw-r--r--test/json/fixtures/fail18.json2
-rwxr-xr-xtest/json/test_json.rb34
-rwxr-xr-xtest/json/test_json_addition.rb56
-rw-r--r--test/json/test_json_encoding.rb2
-rwxr-xr-xtest/json/test_json_fixtures.rb2
-rwxr-xr-xtest/json/test_json_generate.rb79
-rw-r--r--test/json/test_json_generic_object.rb58
-rw-r--r--test/json/test_json_string_matching.rb9
-rwxr-xr-xtest/json/test_json_unicode.rb2
-rw-r--r--test/logger/test_logger.rb145
-rw-r--r--test/minitest/test_minitest_benchmark.rb16
-rw-r--r--test/minitest/test_minitest_mock.rb71
-rw-r--r--test/minitest/test_minitest_spec.rb131
-rw-r--r--test/minitest/test_minitest_unit.rb400
-rw-r--r--test/mkmf/base.rb11
-rw-r--r--test/mkmf/test_config.rb17
-rw-r--r--test/mkmf/test_constant.rb37
-rw-r--r--test/mkmf/test_framework.rb32
-rw-r--r--test/mkmf/test_have_library.rb10
-rw-r--r--test/mkmf/test_have_macro.rb8
-rw-r--r--test/mkmf/test_libs.rb86
-rw-r--r--test/net/http/test_http.rb120
-rw-r--r--test/net/http/test_http_request.rb22
-rw-r--r--test/net/http/test_httpresponse.rb26
-rw-r--r--test/net/http/test_https.rb1
-rw-r--r--test/net/http/utils.rb4
-rw-r--r--test/net/imap/test_imap_response_parser.rb68
-rw-r--r--test/net/smtp/test_smtp.rb38
-rw-r--r--test/objspace/test_objspace.rb164
-rw-r--r--test/open-uri/test_open-uri.rb15
-rw-r--r--test/openssl/test_asn1.rb8
-rw-r--r--test/openssl/test_bn.rb35
-rw-r--r--test/openssl/test_cipher.rb9
-rw-r--r--test/openssl/test_config.rb26
-rw-r--r--test/openssl/test_digest.rb2
-rw-r--r--test/openssl/test_pair.rb73
-rw-r--r--test/openssl/test_pkcs12.rb2
-rw-r--r--test/openssl/test_pkey_ec.rb32
-rw-r--r--test/openssl/test_ssl.rb70
-rw-r--r--test/openssl/test_x509crl.rb1
-rw-r--r--test/openssl/test_x509store.rb5
-rw-r--r--test/optparse/test_acceptable.rb195
-rw-r--r--test/optparse/test_optparse.rb3
-rw-r--r--test/ostruct/test_ostruct.rb27
-rw-r--r--test/pathname/test_pathname.rb16
-rw-r--r--test/profile_test_all.rb90
-rw-r--r--test/psych/helper.rb60
-rw-r--r--test/psych/test_alias_and_anchor.rb2
-rw-r--r--test/psych/test_array.rb2
-rw-r--r--test/psych/test_boolean.rb2
-rw-r--r--test/psych/test_class.rb2
-rw-r--r--test/psych/test_coder.rb6
-rw-r--r--test/psych/test_date_time.rb23
-rw-r--r--test/psych/test_deprecated.rb8
-rw-r--r--test/psych/test_document.rb2
-rw-r--r--test/psych/test_emitter.rb2
-rw-r--r--test/psych/test_encoding.rb116
-rw-r--r--test/psych/test_engine_manager.rb2
-rw-r--r--test/psych/test_exception.rb40
-rw-r--r--test/psych/test_hash.rb2
-rw-r--r--test/psych/test_json_tree.rb2
-rw-r--r--test/psych/test_merge_keys.rb71
-rw-r--r--test/psych/test_nil.rb2
-rw-r--r--test/psych/test_null.rb2
-rw-r--r--test/psych/test_numeric.rb6
-rw-r--r--test/psych/test_object.rb2
-rw-r--r--test/psych/test_object_references.rb2
-rw-r--r--test/psych/test_omap.rb2
-rw-r--r--test/psych/test_parser.rb2
-rw-r--r--test/psych/test_psych.rb30
-rw-r--r--test/psych/test_safe_load.rb97
-rw-r--r--test/psych/test_scalar.rb2
-rw-r--r--test/psych/test_scalar_scanner.rb4
-rw-r--r--test/psych/test_serialize_subclasses.rb2
-rw-r--r--test/psych/test_set.rb2
-rw-r--r--test/psych/test_stream.rb2
-rw-r--r--test/psych/test_string.rb69
-rw-r--r--test/psych/test_struct.rb2
-rw-r--r--test/psych/test_symbol.rb2
-rw-r--r--test/psych/test_tainted.rb16
-rw-r--r--test/psych/test_to_yaml_properties.rb2
-rw-r--r--test/psych/test_tree_builder.rb2
-rw-r--r--test/psych/test_yaml.rb13
-rw-r--r--test/psych/test_yamldbm.rb2
-rw-r--r--test/psych/test_yamlstore.rb2
-rw-r--r--test/psych/visitors/test_to_ruby.rb8
-rw-r--r--test/psych/visitors/test_yaml_tree.rb4
-rw-r--r--test/rake/helper.rb506
-rw-r--r--test/rake/support/rakefile_definitions.rb444
-rw-r--r--test/rake/support/ruby_runner.rb33
-rw-r--r--test/rake/test_rake_application.rb42
-rw-r--r--test/rake/test_rake_application_options.rb69
-rw-r--r--test/rake/test_rake_backtrace.rb52
-rw-r--r--test/rake/test_rake_clean.rb46
-rw-r--r--test/rake/test_rake_definitions.rb5
-rw-r--r--test/rake/test_rake_dsl.rb37
-rw-r--r--test/rake/test_rake_file_creation_task.rb4
-rw-r--r--test/rake/test_rake_file_list.rb47
-rw-r--r--test/rake/test_rake_file_task.rb12
-rw-r--r--test/rake/test_rake_file_utils.rb8
-rw-r--r--test/rake/test_rake_ftp_file.rb41
-rw-r--r--test/rake/test_rake_functional.rb42
-rw-r--r--test/rake/test_rake_invocation_chain.rb18
-rw-r--r--test/rake/test_rake_linked_list.rb84
-rw-r--r--test/rake/test_rake_makefile_loader.rb4
-rw-r--r--test/rake/test_rake_multi_task.rb5
-rw-r--r--test/rake/test_rake_name_space.rb2
-rw-r--r--test/rake/test_rake_path_map.rb35
-rw-r--r--test/rake/test_rake_rake_test_loader.rb5
-rw-r--r--test/rake/test_rake_rdoc_task.rb83
-rw-r--r--test/rake/test_rake_reduce_compat.rb47
-rw-r--r--test/rake/test_rake_rules.rb59
-rw-r--r--test/rake/test_rake_scope.rb44
-rw-r--r--test/rake/test_rake_task.rb86
-rw-r--r--test/rake/test_rake_task_arguments.rb37
-rw-r--r--test/rake/test_rake_task_manager.rb31
-rw-r--r--test/rake/test_rake_task_manager_argument_resolution.rb17
-rw-r--r--test/rake/test_rake_task_with_arguments.rb24
-rw-r--r--test/rake/test_rake_test_task.rb3
-rw-r--r--test/rake/test_rake_thread_pool.rb67
-rw-r--r--test/rake/test_rake_top_level_functions.rb40
-rw-r--r--test/rake/test_sys.rb20
-rw-r--r--test/rake/test_thread_history_display.rb22
-rw-r--r--test/rake/test_trace_output.rb9
-rw-r--r--test/rdoc/test_rdoc_any_method.rb126
-rw-r--r--test/rdoc/test_rdoc_attr.rb4
-rw-r--r--test/rdoc/test_rdoc_class_module.rb79
-rw-r--r--test/rdoc/test_rdoc_code_object.rb149
-rw-r--r--test/rdoc/test_rdoc_constant.rb4
-rw-r--r--test/rdoc/test_rdoc_context.rb17
-rw-r--r--test/rdoc/test_rdoc_context_section.rb7
-rw-r--r--test/rdoc/test_rdoc_cross_reference.rb7
-rw-r--r--test/rdoc/test_rdoc_generator_darkfish.rb90
-rw-r--r--test/rdoc/test_rdoc_generator_json_index.rb11
-rw-r--r--test/rdoc/test_rdoc_generator_ri.rb8
-rw-r--r--test/rdoc/test_rdoc_markdown.rb27
-rw-r--r--test/rdoc/test_rdoc_markdown_test.rb7
-rw-r--r--test/rdoc/test_rdoc_markup_attribute_manager.rb121
-rw-r--r--test/rdoc/test_rdoc_markup_document.rb7
-rw-r--r--test/rdoc/test_rdoc_markup_formatter.rb32
-rw-r--r--test/rdoc/test_rdoc_markup_heading.rb9
-rw-r--r--test/rdoc/test_rdoc_markup_parser.rb7
-rw-r--r--test/rdoc/test_rdoc_markup_pre_process.rb18
-rw-r--r--test/rdoc/test_rdoc_markup_raw.rb7
-rw-r--r--test/rdoc/test_rdoc_markup_to_html.rb86
-rw-r--r--test/rdoc/test_rdoc_markup_to_html_crossref.rb7
-rw-r--r--test/rdoc/test_rdoc_markup_to_html_snippet.rb8
-rw-r--r--test/rdoc/test_rdoc_markup_to_markdown.rb6
-rw-r--r--test/rdoc/test_rdoc_method_attr.rb8
-rw-r--r--test/rdoc/test_rdoc_normal_class.rb5
-rw-r--r--test/rdoc/test_rdoc_normal_module.rb5
-rw-r--r--test/rdoc/test_rdoc_options.rb148
-rw-r--r--test/rdoc/test_rdoc_parser.rb25
-rw-r--r--test/rdoc/test_rdoc_parser_c.rb124
-rw-r--r--test/rdoc/test_rdoc_parser_changelog.rb7
-rw-r--r--test/rdoc/test_rdoc_parser_rd.rb7
-rw-r--r--test/rdoc/test_rdoc_parser_ruby.rb357
-rw-r--r--test/rdoc/test_rdoc_rd_block_parser.rb8
-rw-r--r--test/rdoc/test_rdoc_rd_inline_parser.rb1
-rw-r--r--test/rdoc/test_rdoc_rdoc.rb45
-rw-r--r--test/rdoc/test_rdoc_ri_driver.rb31
-rw-r--r--test/rdoc/test_rdoc_ruby_lex.rb137
-rw-r--r--test/rdoc/test_rdoc_rubygems_hook.rb2
-rw-r--r--test/rdoc/test_rdoc_servlet.rb124
-rw-r--r--test/rdoc/test_rdoc_stats.rb302
-rw-r--r--test/rdoc/test_rdoc_store.rb77
-rw-r--r--test/rdoc/test_rdoc_text.rb74
-rw-r--r--test/rdoc/test_rdoc_tom_doc.rb60
-rw-r--r--test/rdoc/test_rdoc_top_level.rb18
-rw-r--r--test/rdoc/xref_test_case.rb2
-rw-r--r--test/readline/test_readline.rb217
-rw-r--r--test/readline/test_readline_history.rb35
-rw-r--r--test/rexml/data/tutorial.xml2
-rw-r--r--test/rexml/parse/test_document_type_declaration.rb47
-rw-r--r--test/rexml/parse/test_notation_declaration.rb97
-rw-r--r--test/rexml/parser/test_sax2.rb200
-rw-r--r--test/rexml/parser/test_tree.rb40
-rw-r--r--test/rexml/parser/test_ultra_light.rb67
-rw-r--r--test/rexml/rexml_test_utils.rb1
-rw-r--r--test/rexml/test_attributes.rb22
-rw-r--r--test/rexml/test_attributes_mixin.rb3
-rw-r--r--test/rexml/test_changing_encoding.rb1
-rw-r--r--test/rexml/test_contrib.rb18
-rw-r--r--test/rexml/test_core.rb4
-rw-r--r--test/rexml/test_doctype.rb3
-rw-r--r--test/rexml/test_document.rb10
-rw-r--r--test/rexml/test_encoding.rb2
-rw-r--r--test/rexml/test_entity.rb38
-rw-r--r--test/rexml/test_jaxen.rb2
-rw-r--r--test/rexml/test_light.rb2
-rw-r--r--test/rexml/test_lightparser.rb2
-rw-r--r--test/rexml/test_listener.rb10
-rw-r--r--test/rexml/test_namespace.rb2
-rw-r--r--test/rexml/test_notationdecl_mixin.rb58
-rw-r--r--test/rexml/test_notationdecl_parsetest.rb23
-rw-r--r--test/rexml/test_order.rb2
-rw-r--r--test/rexml/test_rexml_issuezilla.rb2
-rw-r--r--test/rexml/test_sax.rb2
-rw-r--r--test/rexml/test_stream.rb23
-rw-r--r--test/rexml/test_text.rb19
-rw-r--r--test/rexml/test_xml_declaration.rb1
-rw-r--r--test/rexml/test_xpath.rb2
-rw-r--r--test/rinda/test_rinda.rb261
-rw-r--r--test/ripper/test_files.rb62
-rw-r--r--test/ripper/test_parser_events.rb22
-rw-r--r--test/ripper/test_scanner_events.rb73
-rw-r--r--test/rss/rss-assertions.rb2
-rw-r--r--test/rss/rss-testcase.rb2
-rw-r--r--test/rss/test_1.0.rb2
-rw-r--r--test/rss/test_2.0.rb2
-rw-r--r--test/rss/test_accessor.rb2
-rw-r--r--test/rss/test_atom.rb2
-rw-r--r--test/rss/test_content.rb2
-rw-r--r--test/rss/test_dublincore.rb2
-rw-r--r--test/rss/test_image.rb2
-rw-r--r--test/rss/test_inherit.rb2
-rw-r--r--test/rss/test_itunes.rb2
-rw-r--r--test/rss/test_maker_0.9.rb2
-rw-r--r--test/rss/test_maker_1.0.rb2
-rw-r--r--test/rss/test_maker_2.0.rb2
-rw-r--r--test/rss/test_maker_atom_entry.rb2
-rw-r--r--test/rss/test_maker_atom_feed.rb2
-rw-r--r--test/rss/test_maker_content.rb2
-rw-r--r--test/rss/test_maker_dc.rb2
-rw-r--r--test/rss/test_maker_image.rb2
-rw-r--r--test/rss/test_maker_itunes.rb2
-rw-r--r--test/rss/test_maker_slash.rb2
-rw-r--r--test/rss/test_maker_sy.rb2
-rw-r--r--test/rss/test_maker_taxo.rb2
-rw-r--r--test/rss/test_maker_trackback.rb2
-rw-r--r--test/rss/test_maker_xml-stylesheet.rb2
-rw-r--r--test/rss/test_parser.rb12
-rw-r--r--test/rss/test_parser_1.0.rb2
-rw-r--r--test/rss/test_parser_2.0.rb2
-rw-r--r--test/rss/test_parser_atom_entry.rb2
-rw-r--r--test/rss/test_parser_atom_feed.rb2
-rw-r--r--test/rss/test_setup_maker_0.9.rb2
-rw-r--r--test/rss/test_setup_maker_1.0.rb2
-rw-r--r--test/rss/test_setup_maker_2.0.rb2
-rw-r--r--test/rss/test_setup_maker_atom_entry.rb2
-rw-r--r--test/rss/test_setup_maker_atom_feed.rb2
-rw-r--r--test/rss/test_setup_maker_itunes.rb2
-rw-r--r--test/rss/test_setup_maker_slash.rb2
-rw-r--r--test/rss/test_slash.rb2
-rw-r--r--test/rss/test_syndication.rb2
-rw-r--r--test/rss/test_taxonomy.rb2
-rw-r--r--test/rss/test_to_s.rb2
-rw-r--r--test/rss/test_trackback.rb2
-rw-r--r--test/rss/test_version.rb2
-rw-r--r--test/rss/test_xml-stylesheet.rb2
-rw-r--r--test/ruby/allpairs.rb1
-rw-r--r--test/ruby/enc/test_emoji.rb6
-rw-r--r--test/ruby/enc/test_utf16.rb8
-rw-r--r--test/ruby/envutil.rb198
-rw-r--r--test/ruby/lbtest.rb2
-rw-r--r--test/ruby/marshaltestlib.rb102
-rw-r--r--test/ruby/test_alias.rb23
-rw-r--r--test/ruby/test_argf.rb54
-rw-r--r--test/ruby/test_arity.rb4
-rw-r--r--test/ruby/test_array.rb274
-rw-r--r--test/ruby/test_autoload.rb162
-rw-r--r--test/ruby/test_backtrace.rb51
-rw-r--r--test/ruby/test_basicinstructions.rb15
-rw-r--r--test/ruby/test_beginendblock.rb131
-rw-r--r--test/ruby/test_bignum.rb40
-rw-r--r--test/ruby/test_case.rb19
-rw-r--r--test/ruby/test_class.rb44
-rw-r--r--test/ruby/test_comparable.rb14
-rw-r--r--test/ruby/test_complex.rb26
-rw-r--r--test/ruby/test_complexrational.rb12
-rw-r--r--test/ruby/test_defined.rb28
-rw-r--r--test/ruby/test_dir.rb80
-rw-r--r--test/ruby/test_dir_m17n.rb191
-rw-r--r--test/ruby/test_econv.rb19
-rw-r--r--test/ruby/test_encoding.rb20
-rw-r--r--test/ruby/test_enum.rb33
-rw-r--r--test/ruby/test_enumerator.rb75
-rw-r--r--test/ruby/test_env.rb33
-rw-r--r--test/ruby/test_eval.rb35
-rw-r--r--test/ruby/test_exception.rb151
-rw-r--r--test/ruby/test_fiber.rb74
-rw-r--r--test/ruby/test_file.rb228
-rw-r--r--test/ruby/test_file_exhaustive.rb231
-rw-r--r--test/ruby/test_fixnum.rb86
-rw-r--r--test/ruby/test_flip.rb29
-rw-r--r--test/ruby/test_float.rb70
-rw-r--r--test/ruby/test_fnmatch.rb178
-rw-r--r--test/ruby/test_gc.rb162
-rw-r--r--test/ruby/test_hash.rb484
-rw-r--r--test/ruby/test_integer.rb54
-rw-r--r--test/ruby/test_integer_comb.rb13
-rw-r--r--test/ruby/test_io.rb692
-rw-r--r--test/ruby/test_io_m17n.rb131
-rw-r--r--test/ruby/test_iseq.rb52
-rw-r--r--test/ruby/test_keyword.rb161
-rw-r--r--test/ruby/test_lambda.rb44
-rw-r--r--test/ruby/test_lazy_enumerator.rb153
-rw-r--r--test/ruby/test_m17n.rb204
-rw-r--r--test/ruby/test_m17n_comb.rb235
-rw-r--r--test/ruby/test_marshal.rb158
-rw-r--r--test/ruby/test_math.rb11
-rw-r--r--test/ruby/test_method.rb221
-rw-r--r--test/ruby/test_module.rb575
-rw-r--r--test/ruby/test_notimp.rb26
-rw-r--r--test/ruby/test_numeric.rb120
-rw-r--r--test/ruby/test_object.rb220
-rw-r--r--test/ruby/test_objectspace.rb24
-rw-r--r--test/ruby/test_optimization.rb1
-rw-r--r--test/ruby/test_pack.rb25
-rw-r--r--test/ruby/test_parse.rb31
-rw-r--r--test/ruby/test_primitive.rb4
-rw-r--r--test/ruby/test_proc.rb95
-rw-r--r--test/ruby/test_process.rb391
-rw-r--r--test/ruby/test_rand.rb40
-rw-r--r--test/ruby/test_range.rb207
-rw-r--r--test/ruby/test_rational.rb32
-rw-r--r--test/ruby/test_refinement.rb334
-rw-r--r--test/ruby/test_regexp.rb174
-rw-r--r--test/ruby/test_require.rb429
-rw-r--r--test/ruby/test_rubyoptions.rb267
-rw-r--r--test/ruby/test_rubyvm.rb16
-rw-r--r--test/ruby/test_settracefunc.rb193
-rw-r--r--test/ruby/test_signal.rb116
-rw-r--r--test/ruby/test_sleep.rb11
-rw-r--r--test/ruby/test_sprintf.rb56
-rw-r--r--test/ruby/test_sprintf_comb.rb46
-rw-r--r--test/ruby/test_string.rb178
-rw-r--r--test/ruby/test_stringchar.rb8
-rw-r--r--test/ruby/test_struct.rb195
-rw-r--r--test/ruby/test_super.rb53
-rw-r--r--test/ruby/test_symbol.rb46
-rw-r--r--test/ruby/test_syntax.rb75
-rw-r--r--test/ruby/test_system.rb60
-rw-r--r--test/ruby/test_thread.rb220
-rw-r--r--test/ruby/test_time.rb120
-rw-r--r--test/ruby/test_transcode.rb168
-rw-r--r--test/ruby/test_unicode_escape.rb2
-rw-r--r--test/ruby/test_weakmap.rb134
-rw-r--r--test/ruby/test_whileuntil.rb8
-rw-r--r--test/ruby/test_yield.rb11
-rw-r--r--test/ruby/ut_eof.rb4
-rw-r--r--test/rubygems/ca_cert.pem23
-rw-r--r--test/rubygems/client.pem49
-rw-r--r--test/rubygems/encrypted_private_key.pem30
-rw-r--r--test/rubygems/insure_session.rb43
-rw-r--r--test/rubygems/invalid_client.pem49
-rw-r--r--test/rubygems/specifications/bar-0.0.2.gemspec9
-rw-r--r--test/rubygems/specifications/foo-0.0.1.gemspecbin269 -> 0 bytes-rw-r--r--test/rubygems/test_bundled_ca.rb60
-rw-r--r--test/rubygems/test_gem.rb812
-rw-r--r--test/rubygems/test_gem_available_set.rb19
-rw-r--r--test/rubygems/test_gem_command_manager.rb44
-rw-r--r--test/rubygems/test_gem_commands_build_command.rb4
-rw-r--r--test/rubygems/test_gem_commands_cert_command.rb182
-rw-r--r--test/rubygems/test_gem_commands_cleanup_command.rb41
-rw-r--r--test/rubygems/test_gem_commands_contents_command.rb36
-rw-r--r--test/rubygems/test_gem_commands_dependency_command.rb58
-rw-r--r--test/rubygems/test_gem_commands_environment_command.rb10
-rw-r--r--test/rubygems/test_gem_commands_fetch_command.rb99
-rw-r--r--test/rubygems/test_gem_commands_help_command.rb12
-rw-r--r--test/rubygems/test_gem_commands_install_command.rb616
-rw-r--r--test/rubygems/test_gem_commands_list_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_outdated_command.rb19
-rw-r--r--test/rubygems/test_gem_commands_owner_command.rb61
-rw-r--r--test/rubygems/test_gem_commands_pristine_command.rb128
-rw-r--r--test/rubygems/test_gem_commands_push_command.rb116
-rw-r--r--test/rubygems/test_gem_commands_query_command.rb326
-rw-r--r--test/rubygems/test_gem_commands_search_command.rb12
-rw-r--r--test/rubygems/test_gem_commands_setup_command.rb100
-rw-r--r--test/rubygems/test_gem_commands_sources_command.rb103
-rw-r--r--test/rubygems/test_gem_commands_specification_command.rb71
-rw-r--r--test/rubygems/test_gem_commands_stale_command.rb4
-rw-r--r--test/rubygems/test_gem_commands_uninstall_command.rb68
-rw-r--r--test/rubygems/test_gem_commands_unpack_command.rb46
-rw-r--r--test/rubygems/test_gem_commands_update_command.rb325
-rw-r--r--test/rubygems/test_gem_commands_which_command.rb6
-rw-r--r--test/rubygems/test_gem_config_file.rb159
-rw-r--r--test/rubygems/test_gem_dependency_installer.rb293
-rw-r--r--test/rubygems/test_gem_dependency_list.rb34
-rw-r--r--test/rubygems/test_gem_dependency_resolution_error.rb28
-rw-r--r--test/rubygems/test_gem_dependency_resolver.rb327
-rw-r--r--test/rubygems/test_gem_doctor.rb2
-rw-r--r--test/rubygems/test_gem_ext_builder.rb323
-rw-r--r--test/rubygems/test_gem_ext_cmake_builder.rb16
-rw-r--r--test/rubygems/test_gem_ext_configure_builder.rb22
-rw-r--r--test/rubygems/test_gem_ext_ext_conf_builder.rb94
-rw-r--r--test/rubygems/test_gem_ext_rake_builder.rb4
-rw-r--r--test/rubygems/test_gem_gem_runner.rb30
-rw-r--r--test/rubygems/test_gem_gemcutter_utilities.rb63
-rw-r--r--test/rubygems/test_gem_impossible_dependencies_error.rb45
-rw-r--r--test/rubygems/test_gem_indexer.rb15
-rw-r--r--test/rubygems/test_gem_install_update_options.rb5
-rw-r--r--test/rubygems/test_gem_installer.rb414
-rw-r--r--test/rubygems/test_gem_local_remote_options.rb2
-rw-r--r--test/rubygems/test_gem_name_tuple.rb22
-rw-r--r--test/rubygems/test_gem_package.rb294
-rw-r--r--test/rubygems/test_gem_package_old.rb52
-rw-r--r--test/rubygems/test_gem_package_tar_reader.rb17
-rw-r--r--test/rubygems/test_gem_package_tar_reader_entry.rb2
-rw-r--r--test/rubygems/test_gem_package_tar_writer.rb134
-rw-r--r--test/rubygems/test_gem_package_task.rb25
-rw-r--r--test/rubygems/test_gem_path_support.rb17
-rw-r--r--test/rubygems/test_gem_platform.rb18
-rw-r--r--test/rubygems/test_gem_rdoc.rb2
-rw-r--r--test/rubygems/test_gem_remote_fetcher.rb425
-rw-r--r--test/rubygems/test_gem_request.rb279
-rw-r--r--test/rubygems/test_gem_request_set.rb280
-rw-r--r--test/rubygems/test_gem_request_set_gem_dependency_api.rb684
-rw-r--r--test/rubygems/test_gem_request_set_lockfile.rb849
-rw-r--r--test/rubygems/test_gem_requirement.rb41
-rw-r--r--test/rubygems/test_gem_resolver.rb597
-rw-r--r--test/rubygems/test_gem_resolver_activation_request.rb63
-rw-r--r--test/rubygems/test_gem_resolver_api_set.rb167
-rw-r--r--test/rubygems/test_gem_resolver_api_specification.rb104
-rw-r--r--test/rubygems/test_gem_resolver_best_set.rb30
-rw-r--r--test/rubygems/test_gem_resolver_conflict.rb75
-rw-r--r--test/rubygems/test_gem_resolver_dependency_request.rb20
-rw-r--r--test/rubygems/test_gem_resolver_git_set.rb148
-rw-r--r--test/rubygems/test_gem_resolver_git_specification.rb100
-rw-r--r--test/rubygems/test_gem_resolver_index_set.rb28
-rw-r--r--test/rubygems/test_gem_resolver_index_specification.rb89
-rw-r--r--test/rubygems/test_gem_resolver_installed_specification.rb49
-rw-r--r--test/rubygems/test_gem_resolver_installer_set.rb22
-rw-r--r--test/rubygems/test_gem_resolver_local_specification.rb45
-rw-r--r--test/rubygems/test_gem_resolver_lock_set.rb57
-rw-r--r--test/rubygems/test_gem_resolver_lock_specification.rb87
-rw-r--r--test/rubygems/test_gem_resolver_requirement_list.rb20
-rw-r--r--test/rubygems/test_gem_resolver_specification.rb32
-rw-r--r--test/rubygems/test_gem_resolver_vendor_set.rb67
-rw-r--r--test/rubygems/test_gem_resolver_vendor_specification.rb83
-rw-r--r--test/rubygems/test_gem_security.rb60
-rw-r--r--test/rubygems/test_gem_security_policy.rb230
-rw-r--r--test/rubygems/test_gem_security_signer.rb36
-rw-r--r--test/rubygems/test_gem_security_trust_dir.rb6
-rw-r--r--test/rubygems/test_gem_server.rb106
-rw-r--r--test/rubygems/test_gem_source.rb157
-rw-r--r--test/rubygems/test_gem_source_fetch_problem.rb19
-rw-r--r--test/rubygems/test_gem_source_git.rb231
-rw-r--r--test/rubygems/test_gem_source_installed.rb28
-rw-r--r--test/rubygems/test_gem_source_list.rb26
-rw-r--r--test/rubygems/test_gem_source_local.rb37
-rw-r--r--test/rubygems/test_gem_source_lock.rb114
-rw-r--r--test/rubygems/test_gem_source_specific_file.rb40
-rw-r--r--test/rubygems/test_gem_source_vendor.rb27
-rw-r--r--test/rubygems/test_gem_spec_fetcher.rb192
-rw-r--r--test/rubygems/test_gem_specification.rb1104
-rw-r--r--test/rubygems/test_gem_stub_specification.rb143
-rw-r--r--test/rubygems/test_gem_uninstaller.rb44
-rw-r--r--test/rubygems/test_gem_uri_formatter.rb28
-rw-r--r--test/rubygems/test_gem_util.rb31
-rw-r--r--test/rubygems/test_gem_validator.rb9
-rw-r--r--test/rubygems/test_gem_version.rb35
-rw-r--r--test/rubygems/test_gem_version_option.rb64
-rw-r--r--test/rubygems/test_require.rb39
-rw-r--r--test/runner.rb22
-rw-r--r--test/sdbm/test_sdbm.rb67
-rw-r--r--test/shell/test_command_processor.rb69
-rw-r--r--test/socket/test_nonblock.rb16
-rw-r--r--test/socket/test_socket.rb100
-rw-r--r--test/socket/test_sockopt.rb18
-rw-r--r--test/socket/test_tcp.rb38
-rw-r--r--test/socket/test_udp.rb33
-rw-r--r--test/socket/test_unix.rb85
-rw-r--r--test/stringio/test_stringio.rb24
-rw-r--r--test/strscan/test_stringscanner.rb14
-rw-r--r--test/syslog/test_syslog_logger.rb102
-rw-r--r--test/test_curses.rb12
-rw-r--r--test/test_delegate.rb47
-rw-r--r--test/test_find.rb34
-rw-r--r--test/test_mathn.rb108
-rw-r--r--test/test_open3.rb1
-rw-r--r--test/test_prime.rb2
-rw-r--r--test/test_pty.rb1
-rw-r--r--test/test_rbconfig.rb53
-rw-r--r--test/test_set.rb80
-rw-r--r--test/test_tempfile.rb39
-rw-r--r--test/test_time.rb2
-rw-r--r--test/test_timeout.rb28
-rw-r--r--test/test_tracer.rb4
-rw-r--r--test/test_tsort.rb56
-rw-r--r--test/test_weakref.rb19
-rw-r--r--test/testunit/test_hideskip.rb29
-rw-r--r--test/testunit/test_parallel.rb2
-rw-r--r--test/testunit/test_redefinition.rb14
-rw-r--r--test/testunit/test_sorting.rb14
-rw-r--r--test/thread/test_cv.rb5
-rw-r--r--test/thread/test_queue.rb52
-rw-r--r--test/uri/test_common.rb59
-rw-r--r--test/uri/test_generic.rb39
-rw-r--r--test/webrick/test_cgi.rb4
-rw-r--r--test/webrick/test_filehandler.rb6
-rw-r--r--test/webrick/test_htmlutils.rb20
-rw-r--r--test/webrick/test_httpauth.rb166
-rw-r--r--test/webrick/test_httpproxy.rb2
-rw-r--r--test/webrick/test_httpresponse.rb92
-rw-r--r--test/webrick/test_httputils.rb4
-rw-r--r--test/webrick/test_server.rb2
-rw-r--r--test/webrick/utils.rb7
-rw-r--r--test/win32ole/test_err_in_callback.rb29
-rw-r--r--test/win32ole/test_thread.rb25
-rw-r--r--test/win32ole/test_win32ole.rb7
-rw-r--r--test/win32ole/test_win32ole_variant.rb32
-rw-r--r--test/xmlrpc/test_client.rb23
-rw-r--r--test/xmlrpc/test_cookie.rb13
-rw-r--r--test/xmlrpc/test_datetime.rb2
-rw-r--r--test/xmlrpc/test_features.rb2
-rw-r--r--test/xmlrpc/test_marshal.rb2
-rw-r--r--test/xmlrpc/test_parser.rb2
-rw-r--r--test/xmlrpc/test_webrick_server.rb13
-rw-r--r--test/xmlrpc/webrick_testing.rb26
-rw-r--r--test/zlib/test_zlib.rb719
-rw-r--r--thread.c854
-rw-r--r--thread_native.h23
-rw-r--r--thread_pthread.c443
-rw-r--r--thread_pthread.h14
-rw-r--r--thread_win32.c71
-rw-r--r--thread_win32.h6
-rw-r--r--time.c277
-rw-r--r--timev.h21
-rwxr-xr-xtool/bisect.sh42
-rwxr-xr-xtool/change_maker.rb4
-rwxr-xr-xtool/config.guess1522
-rwxr-xr-xtool/config.sub1771
-rw-r--r--tool/config_files.rb8
-rwxr-xr-xtool/enc-unicode.rb11
-rwxr-xr-xtool/file2lastrev.rb103
-rwxr-xr-xtool/gen_dummy_probes.rb15
-rwxr-xr-xtool/gen_ruby_tapset.rb105
-rw-r--r--tool/generic_erb.rb4
-rwxr-xr-xtool/get-config_files7
-rwxr-xr-xtool/ifchange17
-rwxr-xr-xtool/instruction.rb10
-rwxr-xr-xtool/make-snapshot24
-rwxr-xr-xtool/merger.rb28
-rwxr-xr-xtool/mkconfig.rb46
-rwxr-xr-xtool/mkrunnable.rb89
-rw-r--r--tool/probes_to_wiki.rb16
-rwxr-xr-xtool/rbinstall.rb71
-rwxr-xr-xtool/rbuninstall.rb67
-rwxr-xr-xtool/rubytest.rb3
-rwxr-xr-xtool/strip-rdoc.rb1
-rw-r--r--tool/transcode-tblgen.rb98
-rwxr-xr-xtool/update-deps258
-rw-r--r--tool/vcs.rb112
-rw-r--r--tool/vpath.rb9
-rw-r--r--transcode.c126
-rw-r--r--transcode_data.h8
-rw-r--r--util.c66
-rw-r--r--variable.c186
-rw-r--r--version.c72
-rw-r--r--version.h17
-rw-r--r--vm.c540
-rw-r--r--vm_backtrace.c324
-rw-r--r--vm_core.h167
-rw-r--r--vm_debug.h8
-rw-r--r--vm_dump.c172
-rw-r--r--vm_eval.c255
-rw-r--r--vm_exec.c13
-rw-r--r--vm_exec.h19
-rw-r--r--vm_insnhelper.c378
-rw-r--r--vm_insnhelper.h29
-rw-r--r--vm_method.c460
-rw-r--r--vm_opts.h2
-rw-r--r--vm_trace.c384
-rw-r--r--vsnprintf.c37
-rw-r--r--win32/Makefile.sub100
-rw-r--r--win32/README.win328
-rwxr-xr-xwin32/configure.bat55
-rw-r--r--win32/file.c256
-rwxr-xr-xwin32/ifchange.bat24
-rwxr-xr-xwin32/rm.bat4
-rw-r--r--win32/rtname.cmd18
-rw-r--r--win32/setup.mak99
-rw-r--r--win32/win32.c896
1683 files changed, 79479 insertions, 157122 deletions
diff --git a/.document b/.document
index 9a5067bc52..f955928c89 100644
--- a/.document
+++ b/.document
@@ -10,9 +10,12 @@
prelude.rb
# the lib/ directory (which has its own .document file)
+
lib
+
# and some of the ext/ directory (which has its own .document file)
+
ext
# rdoc files
diff --git a/.gdbinit b/.gdbinit
index 17be7d8779..b67115b6a2 100644
--- a/.gdbinit
+++ b/.gdbinit
@@ -1,34 +1,80 @@
-define hook-run
- set $color_type = 0
- set $color_highlite = 0
- set $color_end = 0
-end
-
-define ruby_gdb_init
- if !$color_type
- set $color_type = "\033[31m"
- end
- if !$color_highlite
- set $color_highlite = "\033[36m"
- end
- if !$color_end
- set $color_end = "\033[m"
- end
+define rp
if ruby_dummy_gdb_enums.special_consts
end
-end
-
-# set prompt \033[36m(gdb)\033[m\040
-
-define rp
- ruby_gdb_init
if (VALUE)($arg0) & RUBY_FIXNUM_FLAG
printf "FIXNUM: %ld\n", (long)($arg0) >> 1
else
if ((VALUE)($arg0) & ~(~(VALUE)0<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG
set $id = (($arg0) >> RUBY_SPECIAL_SHIFT)
- printf "%sSYMBOL%s: ", $color_type, $color_end
- rp_id $id
+ if $id == '!' || $id == '+' || $id == '-' || $id == '*' || $id == '/' || $id == '%' || $id == '<' || $id == '>' || $id == '`'
+ printf "SYMBOL(:%c)\n", $id
+ else
+ if $id == idDot2
+ echo SYMBOL(:..)\n
+ else
+ if $id == idDot3
+ echo SYMBOL(:...)\n
+ else
+ if $id == idUPlus
+ echo SYMBOL(:+@)\n
+ else
+ if $id == idUMinus
+ echo SYMBOL(:-@)\n
+ else
+ if $id == idPow
+ echo SYMBOL(:**)\n
+ else
+ if $id == idCmp
+ echo SYMBOL(:<=>)\n
+ else
+ if $id == idLTLT
+ echo SYMBOL(:<<)\n
+ else
+ if $id == idLE
+ echo SYMBOL(:<=)\n
+ else
+ if $id == idGE
+ echo SYMBOL(:>=)\n
+ else
+ if $id == idEq
+ echo SYMBOL(:==)\n
+ else
+ if $id == idEqq
+ echo SYMBOL(:===)\n
+ else
+ if $id == idNeq
+ echo SYMBOL(:!=)\n
+ else
+ if $id == idEqTilde
+ echo SYMBOL(:=~)\n
+ else
+ if $id == idNeqTilde
+ echo SYMBOL(:!~)\n
+ else
+ if $id == idAREF
+ echo SYMBOL(:[])\n
+ else
+ if $id == idASET
+ echo SYMBOL(:[]=)\n
+ else
+ printf "SYMBOL(%ld)\n", $id
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
else
if ($arg0) == RUBY_Qfalse
echo false\n
@@ -44,51 +90,80 @@ define rp
else
if (VALUE)($arg0) & RUBY_IMMEDIATE_MASK
if ((VALUE)($arg0) & RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG
- printf "%sFLONUM%s: %g\n", $color_type, $color_end, (double)rb_float_value($arg0)
+ printf "FLONUM: %g\n", (double)rb_float_value($arg0)
else
echo immediate\n
end
else
set $flags = ((struct RBasic*)($arg0))->flags
- if ($flags & RUBY_FL_PROMOTED)
- printf "[PROMOTED] "
- end
if ($flags & RUBY_T_MASK) == RUBY_T_NONE
- printf "%sT_NONE%s: ", $color_type, $color_end
+ printf "T_NONE: "
print (struct RBasic *)($arg0)
else
if ($flags & RUBY_T_MASK) == RUBY_T_NIL
- printf "%sT_NIL%s: ", $color_type, $color_end
+ printf "T_NIL: "
print (struct RBasic *)($arg0)
else
if ($flags & RUBY_T_MASK) == RUBY_T_OBJECT
- printf "%sT_OBJECT%s: ", $color_type, $color_end
+ printf "T_OBJECT: "
print (struct RObject *)($arg0)
else
if ($flags & RUBY_T_MASK) == RUBY_T_CLASS
- printf "%sT_CLASS%s%s: ", $color_type, ($flags & RUBY_FL_SINGLETON) ? "*" : "", $color_end
+ printf "T_CLASS%s: ", ($flags & RUBY_FL_SINGLETON) ? "*" : ""
rp_class $arg0
else
if ($flags & RUBY_T_MASK) == RUBY_T_ICLASS
- printf "%sT_ICLASS%s: ", $color_type, $color_end
+ printf "T_ICLASS: "
rp_class $arg0
else
if ($flags & RUBY_T_MASK) == RUBY_T_MODULE
- printf "%sT_MODULE%s: ", $color_type, $color_end
+ printf "T_MODULE: "
rp_class $arg0
else
if ($flags & RUBY_T_MASK) == RUBY_T_FLOAT
- printf "%sT_FLOAT%s: %.16g ", $color_type, $color_end, (((struct RFloat*)($arg0))->float_value)
+ printf "T_FLOAT: %.16g ", (((struct RFloat*)($arg0))->float_value)
print (struct RFloat *)($arg0)
else
if ($flags & RUBY_T_MASK) == RUBY_T_STRING
- printf "%sT_STRING%s: ", $color_type, $color_end
- rp_string $arg0 $flags
+ printf "T_STRING: "
+ set print address off
+ output (char *)(($flags & RUBY_FL_USER1) ? \
+ ((struct RString*)($arg0))->as.heap.ptr : \
+ ((struct RString*)($arg0))->as.ary)
+ set print address on
+ printf " bytesize:%ld ", ($flags & RUBY_FL_USER1) ? \
+ ((struct RString*)($arg0))->as.heap.len : \
+ (($flags & (RUBY_FL_USER2|RUBY_FL_USER3|RUBY_FL_USER4|RUBY_FL_USER5|RUBY_FL_USER6)) >> RUBY_FL_USHIFT+2)
+ if !($flags & RUBY_FL_USER1)
+ printf "(embed) "
+ else
+ if ($flags & RUBY_FL_USER2)
+ printf "(shared) "
+ end
+ if ($flags & RUBY_FL_USER3)
+ printf "(assoc) "
+ end
+ end
+ printf "encoding:%d ", ($flags & RUBY_ENCODING_MASK) >> RUBY_ENCODING_SHIFT
+ if ($flags & RUBY_ENC_CODERANGE_MASK) == 0
+ printf "coderange:unknown "
+ else
+ if ($flags & RUBY_ENC_CODERANGE_MASK) == RUBY_ENC_CODERANGE_7BIT
+ printf "coderange:7bit "
+ else
+ if ($flags & RUBY_ENC_CODERANGE_MASK) == RUBY_ENC_CODERANGE_VALID
+ printf "coderange:valid "
+ else
+ printf "coderange:broken "
+ end
+ end
+ end
+ print (struct RString *)($arg0)
else
if ($flags & RUBY_T_MASK) == RUBY_T_REGEXP
set $regsrc = ((struct RRegexp*)($arg0))->src
set $rsflags = ((struct RBasic*)$regsrc)->flags
- printf "%sT_REGEXP%s: ", $color_type, $color_end
+ printf "T_REGEXP: "
set print address off
output (char *)(($rsflags & RUBY_FL_USER1) ? \
((struct RString*)$regsrc)->as.heap.ptr : \
@@ -112,7 +187,7 @@ define rp
if ($flags & RUBY_T_MASK) == RUBY_T_ARRAY
if ($flags & RUBY_FL_USER1)
set $len = (($flags & (RUBY_FL_USER3|RUBY_FL_USER4)) >> (RUBY_FL_USHIFT+3))
- printf "%sT_ARRAY%s: len=%ld ", $color_type, $color_end, $len
+ printf "T_ARRAY: len=%ld ", $len
printf "(embed) "
if ($len == 0)
printf "{(empty)} "
@@ -122,7 +197,7 @@ define rp
end
else
set $len = ((struct RArray*)($arg0))->as.heap.len
- printf "%sT_ARRAY%s: len=%ld ", $color_type, $color_end, $len
+ printf "T_ARRAY: len=%ld ", $len
if ($flags & RUBY_FL_USER2)
printf "(shared) shared="
output/x ((struct RArray*)($arg0))->as.heap.aux.shared
@@ -140,18 +215,18 @@ define rp
print (struct RArray *)($arg0)
else
if ($flags & RUBY_T_MASK) == RUBY_T_FIXNUM
- printf "%sT_FIXNUM%s: ", $color_type, $color_end
+ printf "T_FIXNUM: "
print (struct RBasic *)($arg0)
else
if ($flags & RUBY_T_MASK) == RUBY_T_HASH
- printf "%sT_HASH%s: ", $color_type, $color_end,
+ printf "T_HASH: ",
if ((struct RHash *)($arg0))->ntbl
printf "len=%ld ", ((struct RHash *)($arg0))->ntbl->num_entries
end
print (struct RHash *)($arg0)
else
if ($flags & RUBY_T_MASK) == RUBY_T_STRUCT
- printf "%sT_STRUCT%s: len=%ld ", $color_type, $color_end, \
+ printf "T_STRUCT: len=%ld ", \
(($flags & (RUBY_FL_USER1|RUBY_FL_USER2)) ? \
($flags & (RUBY_FL_USER1|RUBY_FL_USER2)) >> (RUBY_FL_USHIFT+1) : \
((struct RStruct *)($arg0))->as.heap.len)
@@ -161,7 +236,7 @@ define rp
((struct RStruct *)($arg0))->as.heap.ptr)
else
if ($flags & RUBY_T_MASK) == RUBY_T_BIGNUM
- printf "%sT_BIGNUM%s: sign=%d len=%ld ", $color_type, $color_end, \
+ printf "T_BIGNUM: sign=%d len=%ld ", \
(($flags & RUBY_FL_USER1) != 0), \
(($flags & RUBY_FL_USER2) ? \
($flags & (RUBY_FL_USER5|RUBY_FL_USER4|RUBY_FL_USER3)) >> (RUBY_FL_USHIFT+3) : \
@@ -175,59 +250,59 @@ define rp
((struct RBignum*)($arg0))->as.heap.digits)
else
if ($flags & RUBY_T_MASK) == RUBY_T_RATIONAL
- printf "%sT_RATIONAL%s: ", $color_type, $color_end
+ printf "T_RATIONAL: "
print (struct RRational *)($arg0)
else
if ($flags & RUBY_T_MASK) == RUBY_T_COMPLEX
- printf "%sT_COMPLEX%s: ", $color_type, $color_end
+ printf "T_COMPLEX: "
print (struct RComplex *)($arg0)
else
if ($flags & RUBY_T_MASK) == RUBY_T_FILE
- printf "%sT_FILE%s: ", $color_type, $color_end
+ printf "T_FILE: "
print (struct RFile *)($arg0)
output *((struct RFile *)($arg0))->fptr
printf "\n"
else
if ($flags & RUBY_T_MASK) == RUBY_T_TRUE
- printf "%sT_TRUE%s: ", $color_type, $color_end
+ printf "T_TRUE: "
print (struct RBasic *)($arg0)
else
if ($flags & RUBY_T_MASK) == RUBY_T_FALSE
- printf "%sT_FALSE%s: ", $color_type, $color_end
+ printf "T_FALSE: "
print (struct RBasic *)($arg0)
else
if ($flags & RUBY_T_MASK) == RUBY_T_DATA
if ((struct RTypedData *)($arg0))->typed_flag == 1
- printf "%sT_DATA%s(%s): ", $color_type, $color_end, ((struct RTypedData *)($arg0))->type->wrap_struct_name
+ printf "T_DATA(%s): ", ((struct RTypedData *)($arg0))->type->wrap_struct_name
print (struct RTypedData *)($arg0)
else
- printf "%sT_DATA%s: ", $color_type, $color_end
+ printf "T_DATA: "
print (struct RData *)($arg0)
end
else
if ($flags & RUBY_T_MASK) == RUBY_T_MATCH
- printf "%sT_MATCH%s: ", $color_type, $color_end
+ printf "T_MATCH: "
print (struct RMatch *)($arg0)
else
if ($flags & RUBY_T_MASK) == RUBY_T_SYMBOL
- printf "%sT_SYMBOL%s: ", $color_type, $color_end
+ printf "T_SYMBOL: "
print (struct RBasic *)($arg0)
else
if ($flags & RUBY_T_MASK) == RUBY_T_UNDEF
- printf "%sT_UNDEF%s: ", $color_type, $color_end
+ printf "T_UNDEF: "
print (struct RBasic *)($arg0)
else
if ($flags & RUBY_T_MASK) == RUBY_T_NODE
- printf "%sT_NODE%s(", $color_type, $color_end
+ printf "T_NODE("
output (enum node_type)(($flags&RUBY_NODE_TYPEMASK)>>RUBY_NODE_TYPESHIFT)
printf "): "
print *(NODE *)($arg0)
else
if ($flags & RUBY_T_MASK) == RUBY_T_ZOMBIE
- printf "%sT_ZOMBIE%s: ", $color_type, $color_end
+ printf "T_ZOMBIE: "
print (struct RData *)($arg0)
else
- printf "%sunknown%s: ", $color_type, $color_end
+ printf "unknown: "
print (struct RBasic *)($arg0)
end
end
@@ -266,165 +341,12 @@ document rp
Print a Ruby's VALUE.
end
-define rp_id
- set $id = (ID)$arg0
- if $id == '!' || $id == '+' || $id == '-' || $id == '*' || $id == '/' || $id == '%' || $id == '<' || $id == '>' || $id == '`'
- printf "(:%c)\n", $id
- else
- if $id == idDot2
- printf "(:..)\n"
- else
- if $id == idDot3
- printf "(:...)\n"
- else
- if $id == idUPlus
- printf "(:+@)\n"
- else
- if $id == idUMinus
- printf "(:-@)\n"
- else
- if $id == idPow
- printf "(:**)\n"
- else
- if $id == idCmp
- printf "(:<=>)\n"
- else
- if $id == idLTLT
- printf "(:<<)\n"
- else
- if $id == idLE
- printf "(:<=)\n"
- else
- if $id == idGE
- printf "(:>=)\n"
- else
- if $id == idEq
- printf "(:==)\n"
- else
- if $id == idEqq
- printf "(:===)\n"
- else
- if $id == idNeq
- printf "(:!=)\n"
- else
- if $id == idEqTilde
- printf "(:=~)\n"
- else
- if $id == idNeqTilde
- printf "(:!~)\n"
- else
- if $id == idAREF
- printf "(:[])\n"
- else
- if $id == idASET
- printf "(:[]=)\n"
- else
- if $id <= tLAST_OP_ID
- printf "O"
- else
- set $id_type = $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
- end
- printf "(%ld): ", $id
- rb_numtable_entry global_symbols.id_str $id
- if $rb_numtable_rec
- rp_string $rb_numtable_rec
- else
- echo undef\n
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
-end
-document rp_id
- Print an ID.
-end
-
-define rp_string
- set $flags = ((struct RBasic*)($arg0))->flags
- set print address off
- output (char *)(($flags & RUBY_FL_USER1) ? \
- ((struct RString*)($arg0))->as.heap.ptr : \
- ((struct RString*)($arg0))->as.ary)
- set print address on
- printf " bytesize:%ld ", ($flags & RUBY_FL_USER1) ? \
- ((struct RString*)($arg0))->as.heap.len : \
- (($flags & (RUBY_FL_USER2|RUBY_FL_USER3|RUBY_FL_USER4|RUBY_FL_USER5|RUBY_FL_USER6)) >> RUBY_FL_USHIFT+2)
- if !($flags & RUBY_FL_USER1)
- printf "(embed) "
- else
- if ($flags & RUBY_FL_USER2)
- printf "(shared) "
- end
- if ($flags & RUBY_FL_USER3)
- printf "(assoc) "
- end
- end
- printf "encoding:%d ", ($flags & RUBY_ENCODING_MASK) >> RUBY_ENCODING_SHIFT
- if ($flags & RUBY_ENC_CODERANGE_MASK) == 0
- printf "coderange:unknown "
- else
- if ($flags & RUBY_ENC_CODERANGE_MASK) == RUBY_ENC_CODERANGE_7BIT
- printf "coderange:7bit "
- else
- if ($flags & RUBY_ENC_CODERANGE_MASK) == RUBY_ENC_CODERANGE_VALID
- printf "coderange:valid "
- else
- printf "coderange:broken "
- end
- end
- end
- print (struct RString *)($arg0)
-end
-document rp_string
- Print the content of a String.
-end
-
define rp_class
printf "(struct RClass *) %p", (void*)$arg0
if ((struct RClass *)($arg0))->ptr.origin != $arg0
printf " -> %p", ((struct RClass *)($arg0))->ptr.origin
end
printf "\n"
- rb_classname $arg0
print *(struct RClass *)($arg0)
print *((struct RClass *)($arg0))->ptr
end
@@ -456,257 +378,257 @@ end
# Print members of ruby node.
define nd_head
- printf "%su1.node%s: ", $color_highlite, $color_end
+ printf "u1.node: "
rp ($arg0).u1.node
end
define nd_alen
- printf "%su2.argc%s: ", $color_highlite, $color_end
+ printf "u2.argc: "
p ($arg0).u2.argc
end
define nd_next
- printf "%su3.node%s: ", $color_highlite, $color_end
+ printf "u3.node: "
rp ($arg0).u3.node
end
define nd_cond
- printf "%su1.node%s: ", $color_highlite, $color_end
+ printf "u1.node: "
rp ($arg0).u1.node
end
define nd_body
- printf "%su2.node%s: ", $color_highlite, $color_end
+ printf "u2.node: "
rp ($arg0).u2.node
end
define nd_else
- printf "%su3.node%s: ", $color_highlite, $color_end
+ printf "u3.node: "
rp ($arg0).u3.node
end
define nd_orig
- printf "%su3.value%s: ", $color_highlite, $color_end
+ printf "u3.value: "
rp ($arg0).u3.value
end
define nd_resq
- printf "%su2.node%s: ", $color_highlite, $color_end
+ printf "u2.node: "
rp ($arg0).u2.node
end
define nd_ensr
- printf "%su3.node%s: ", $color_highlite, $color_end
+ printf "u3.node: "
rp ($arg0).u3.node
end
define nd_1st
- printf "%su1.node%s: ", $color_highlite, $color_end
+ printf "u1.node: "
rp ($arg0).u1.node
end
define nd_2nd
- printf "%su2.node%s: ", $color_highlite, $color_end
+ printf "u2.node: "
rp ($arg0).u2.node
end
define nd_stts
- printf "%su1.node%s: ", $color_highlite, $color_end
+ printf "u1.node: "
rp ($arg0).u1.node
end
define nd_entry
- printf "%su3.entry%s: ", $color_highlite, $color_end
+ printf "u3.entry: "
p ($arg0).u3.entry
end
define nd_vid
- printf "%su1.id%s: ", $color_highlite, $color_end
+ printf "u1.id: "
p ($arg0).u1.id
end
define nd_cflag
- printf "%su2.id%s: ", $color_highlite, $color_end
+ printf "u2.id: "
p ($arg0).u2.id
end
define nd_cval
- printf "%su3.value%s: ", $color_highlite, $color_end
+ printf "u3.value: "
rp ($arg0).u3.value
end
define nd_cnt
- printf "%su3.cnt%s: ", $color_highlite, $color_end
+ printf "u3.cnt: "
p ($arg0).u3.cnt
end
define nd_tbl
- printf "%su1.tbl%s: ", $color_highlite, $color_end
+ printf "u1.tbl: "
p ($arg0).u1.tbl
end
define nd_var
- printf "%su1.node%s: ", $color_highlite, $color_end
+ printf "u1.node: "
rp ($arg0).u1.node
end
define nd_ibdy
- printf "%su2.node%s: ", $color_highlite, $color_end
+ printf "u2.node: "
rp ($arg0).u2.node
end
define nd_iter
- printf "%su3.node%s: ", $color_highlite, $color_end
+ printf "u3.node: "
rp ($arg0).u3.node
end
define nd_value
- printf "%su2.node%s: ", $color_highlite, $color_end
+ printf "u2.node: "
rp ($arg0).u2.node
end
define nd_aid
- printf "%su3.id%s: ", $color_highlite, $color_end
+ printf "u3.id: "
p ($arg0).u3.id
end
define nd_lit
- printf "%su1.value%s: ", $color_highlite, $color_end
+ printf "u1.value: "
rp ($arg0).u1.value
end
define nd_frml
- printf "%su1.node%s: ", $color_highlite, $color_end
+ printf "u1.node: "
rp ($arg0).u1.node
end
define nd_rest
- printf "%su2.argc%s: ", $color_highlite, $color_end
+ printf "u2.argc: "
p ($arg0).u2.argc
end
define nd_opt
- printf "%su1.node%s: ", $color_highlite, $color_end
+ printf "u1.node: "
rp ($arg0).u1.node
end
define nd_recv
- printf "%su1.node%s: ", $color_highlite, $color_end
+ printf "u1.node: "
rp ($arg0).u1.node
end
define nd_mid
- printf "%su2.id%s: ", $color_highlite, $color_end
+ printf "u2.id: "
p ($arg0).u2.id
end
define nd_args
- printf "%su3.node%s: ", $color_highlite, $color_end
+ printf "u3.node: "
rp ($arg0).u3.node
end
define nd_noex
- printf "%su1.id%s: ", $color_highlite, $color_end
+ printf "u1.id: "
p ($arg0).u1.id
end
define nd_defn
- printf "%su3.node%s: ", $color_highlite, $color_end
+ printf "u3.node: "
rp ($arg0).u3.node
end
define nd_old
- printf "%su1.id%s: ", $color_highlite, $color_end
+ printf "u1.id: "
p ($arg0).u1.id
end
define nd_new
- printf "%su2.id%s: ", $color_highlite, $color_end
+ printf "u2.id: "
p ($arg0).u2.id
end
define nd_cfnc
- printf "%su1.cfunc%s: ", $color_highlite, $color_end
+ printf "u1.cfunc: "
p ($arg0).u1.cfunc
end
define nd_argc
- printf "%su2.argc%s: ", $color_highlite, $color_end
+ printf "u2.argc: "
p ($arg0).u2.argc
end
define nd_cname
- printf "%su1.id%s: ", $color_highlite, $color_end
+ printf "u1.id: "
p ($arg0).u1.id
end
define nd_super
- printf "%su3.node%s: ", $color_highlite, $color_end
+ printf "u3.node: "
rp ($arg0).u3.node
end
define nd_modl
- printf "%su1.id%s: ", $color_highlite, $color_end
+ printf "u1.id: "
p ($arg0).u1.id
end
define nd_clss
- printf "%su1.value%s: ", $color_highlite, $color_end
+ printf "u1.value: "
rp ($arg0).u1.value
end
define nd_beg
- printf "%su1.node%s: ", $color_highlite, $color_end
+ printf "u1.node: "
rp ($arg0).u1.node
end
define nd_end
- printf "%su2.node%s: ", $color_highlite, $color_end
+ printf "u2.node: "
rp ($arg0).u2.node
end
define nd_state
- printf "%su3.state%s: ", $color_highlite, $color_end
+ printf "u3.state: "
p ($arg0).u3.state
end
define nd_rval
- printf "%su2.value%s: ", $color_highlite, $color_end
+ printf "u2.value: "
rp ($arg0).u2.value
end
define nd_nth
- printf "%su2.argc%s: ", $color_highlite, $color_end
+ printf "u2.argc: "
p ($arg0).u2.argc
end
define nd_tag
- printf "%su1.id%s: ", $color_highlite, $color_end
+ printf "u1.id: "
p ($arg0).u1.id
end
define nd_tval
- printf "%su2.value%s: ", $color_highlite, $color_end
+ printf "u2.value: "
rp ($arg0).u2.value
end
@@ -745,9 +667,12 @@ define rb_numtable_entry
end
define rb_id2name
- ruby_gdb_init
- printf "%sID%s: ", $color_type, $color_end
- rp_id $arg0
+ rb_numtable_entry global_symbols.id_str (ID)$arg0
+ if $rb_numtable_rec
+ rp $rb_numtable_rec
+ else
+ echo undef\n
+ end
end
document rb_id2name
Print the name of id
@@ -758,7 +683,7 @@ define rb_method_entry
set $rb_method_entry_id = (ID)$arg1
set $rb_method_entry_me = (rb_method_entry_t *)0
while !$rb_method_entry_me && $rb_method_entry_klass
- rb_numtable_entry $rb_method_entry_klass->m_tbl_wrapper->tbl $rb_method_entry_id
+ rb_numtable_entry $rb_method_entry_klass->m_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
@@ -776,20 +701,15 @@ document rb_method_entry
end
define rb_classname
- # up to 128bit int
- set $rb_classname_permanent = "0123456789ABCDEF"
- set $rb_classname = classname($arg0, $rb_classname_permanent)
- if $rb_classname != RUBY_Qnil
- rp $rb_classname
- else
- echo anonymous class/module\n
- end
+ call classname($arg0)
+ rb_p $
+ print *(struct RClass*)($arg0)
end
define rb_ancestors
set $rb_ancestors_module = $arg0
while $rb_ancestors_module
- rp_class $rb_ancestors_module
+ rp $rb_ancestors_module
set $rb_ancestors_module = ((struct RClass *)($rb_ancestors_module))->ptr.super
end
end
@@ -802,7 +722,7 @@ define rb_backtrace
end
define iseq
- if ruby_dummy_gdb_enums.special_consts
+ if dummy_gdb_enums.special_consts
end
if ($arg0)->type == ISEQ_ELEMENT_NONE
echo [none]\n
diff --git a/.gitignore b/.gitignore
index dee365b3c6..5808bf1082 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,7 +23,6 @@
.ppack
.svn
Makefile
-Makefile.old
extconf.h
y.output
y.tab.c
@@ -37,7 +36,6 @@ y.tab.c
/ChangeLog.pre1_1
/Doxyfile
/GNUmakefile
-/GNUmakefile.old
/README.atheos
/README.fat-patch
/README.v6
@@ -84,7 +82,6 @@ y.tab.c
/rubicon
/ruby
/ruby-man.rd.gz
-/sizes.c
/test.rb
/tmp
/transdb.h
@@ -106,9 +103,6 @@ y.tab.c
/ext/dl/callback/callback-*.c
/ext/dl/callback/callback.c
-# /ext/rbconfig/
-/ext/rbconfig/sizeof/sizes.c
-
# /ext/ripper/
/ext/ripper/eventids1.c
/ext/ripper/eventids2table.c
@@ -128,10 +122,6 @@ y.tab.c
/spec/mspec
/spec/rubyspec
-# /tool/
-/tool/config.guess
-/tool/config.sub
-
# /win32/
/win32/*.ico
/win32/.time
diff --git a/.travis.yml b/.travis.yml
index 8db00587d6..db25c9eb08 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -38,19 +38,11 @@ install: "sudo apt-get -qq build-dep ruby1.9.1 2>/dev/null"
# 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"
- "autoconf"
- - "mkdir config_1st config_2nd"
- - "./configure -C --with-gcc=$CC"
- - "cp -pr config.status .ext/include config_1st"
- - "make reconfig"
- - "cp -pr config.status .ext/include config_2nd"
- - "diff -ru config_1st config_2nd"
+ - "./configure --with-gcc=$CC"
- "make -sj encs"
- "make -sj exts"
-script:
- - "make test OPTS=-v"
-# - "make test-all TESTS='-v'"
+script: "make test OPTS=-v"
# Branch matrix. Not all branches are Travis-ready so we limit branches here.
branches:
@@ -69,13 +61,6 @@ notifications:
template:
- "%{message} by @%{author}: See %{build_url}"
- # Update ruby-head installed on Travis CI so other projects can test against it.
- webhooks:
- urls:
- - "https://rubies.travis-ci.org/rebuild/ruby-head"
- on_success: always
- on_failure: never
-
# Local Variables:
# mode: YAML
# coding: utf-8-unix
diff --git a/BSDL b/BSDL
index a009caefea..82725534fa 100644
--- a/BSDL
+++ b/BSDL
@@ -1,4 +1,4 @@
-Copyright (C) 1993-2013 Yukihiro Matsumoto. All rights reserved.
+Copyright (C) 1993-2010 Yukihiro Matsumoto. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
diff --git a/ChangeLog b/ChangeLog
index 0349f7c13a..ef2bfb6531 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,18112 +1,22470 @@
-Wed Dec 25 16:58:31 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Jan 7 21:40:36 2013 Shugo Maeda <shugo@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]
+ * vm_method.c (Init_eval_method): main.public and main.private
+ should be private.
- * vm.c (rb_vm_cref_in_context): return ruby level cref if self is
- same.
+ * proc.c (Init_Proc): main.define_method should be private.
-Wed Dec 25 16:35:34 2013 Yusuke Endoh <mame@tsg.ne.jp>
+ * test/ruby/test_module.rb: related test.
- * 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.)
+Mon Jan 7 20:48:47 2013 Shugo Maeda <shugo@ruby-lang.org>
-Tue Dec 24 23:47:50 2013 Koichi Sasada <ko1@atdot.net>
+ * eval.c (Init_eval): main.include should be private.
+ [ruby-core:51293] [Bug #7670]
- * README.EXT: add a refer to URL.
+ * test/ruby/test_module.rb (test_top_include_is_private): a new test
+ for the above change.
-Tue Dec 24 23:47:50 2013 Koichi Sasada <ko1@atdot.net>
+Mon Jan 7 20:29:50 2013 Shugo Maeda <shugo@ruby-lang.org>
- * README.EXT: add a document about RGenGC.
- Reviewed by havenwood.
- [misc #8962]
+ * NEWS: remove description about `require "refinement"'.
- * README.EXT.ja: ditto.
+Mon Jan 7 20:15:49 2013 Shugo Maeda <shugo@ruby-lang.org>
-Mon Dec 23 19:00:00 2013 Eric Hodel <drbrain@segment7.net>
+ * eval.c (Init_eval): enable Refinements by default.
+ [ruby-core:51286] [Bug #7667]
- * test/rubygems/test_gem_ext_builder.rb: Fix warning due to ambiguous
- expression.
+ * eval.c (rb_mod_refine, top_using): show a warning when
+ Module#refine or main.using is called at the first time.
-Mon Dec 23 16:13:10 2013 Eric Hodel <drbrain@segment7.net>
+ * ext/refinement/*: removed the extension library "refinement".
- * 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.
+ * test/ruby/test_refinement.rb: fix for the above changes.
-Mon Dec 23 16:12:24 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+Mon Jan 7 17:34:22 2013 Koichi Sasada <ko1@atdot.net>
- * array.c: Have to_h raise on elements that are not key-value pairs
- [#9239]
+ * include/ruby/ruby.h (RUBY_EVENT_SPECIFIED_LINE): make it special.
+ This flag is not contained by RUBY_EVENT_TRACEPOINT_ALL.
+ This event is experimental one. It is possible to remove/rename
+ flag name after 2.0.1.
- * enum.c: ditto
+ * vm_trace.c (get_event_id): return :line if SPECIFIED_LINE was
+ occurred. `:specified_line' never been returned.
-Sun Dec 22 19:22:52 2013 Eric Hodel <drbrain@segment7.net>
+Mon Jan 7 15:42:10 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/rdoc.rb: Set RDoc to release version.
+ * parse.y (f_kwrest): allow bare kwrest_mark as valid syntax. its
+ semantics is still undefined. [Bug #7662] [ruby-core:51269]
-Sun Dec 22 19:22:31 2013 Eric Hodel <drbrain@segment7.net>
+Mon Jan 7 15:31:58 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/rubygems.rb: Set RubyGems to release version.
+ * parse.y (f_kwrest): reject duplicated kwrest argument name.
-Sun Dec 22 19:22:01 2013 Eric Hodel <drbrain@segment7.net>
+Mon Jan 7 15:24:10 2013 Koichi Sasada <ko1@atdot.net>
- * lib/rubygems.rb (module Gem): Fix comment for
- Gem::load_path_insert_index.
+ * vm_trace.c (rb_threadptr_exec_event_hooks_orig): pop tag before
+ JUMP_TAG() if frame is `finish' frame.
+ Without this patch, there is an inconsistency between control
+ frame stack and tags stack.
+ [Bug #7668]
-Sun Dec 22 18:08:42 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * test/ruby/test_settracefunc.rb: add a test for above.
- * win32/Makefile.sub (fake.rb): fixed wrong RUBY_PLATFORM, to correctly
- install win32.h.
- [ruby-core:58801][Bug #9199] reported by arton.
+Mon Jan 7 15:21:48 2013 NAKAMURA Usaku <usa@ruby-lang.org>
-Fri Dec 20 17:52:50 2013 Koichi Sasada <ko1@atdot.net>
+ * Makefile.in, common.mk (fake, yes-fake, no-make): these dependecies
+ are not platform dependent.
- * vm_method.c: check definition of
- GLOBAL_METHOD_CACHE_SIZE and GLOBAL_METHOD_CACHE_MASK.
+ * win32/Makefile.sub ($(arch)-fake.rb): workaround.
-Fri Dec 20 17:03:10 2013 Koichi Sasada <ko1@atdot.net>
+Mon Jan 7 12:09:24 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * include/ruby/ruby.h: rename OBJ_WRITE and OBJ_WRITTEN into
- RB_OBJ_WRITE and RB_OBJ_WRITTEN.
+ * vm_insnhelper.c (vm_callee_setup_arg_complex, vm_yield_setup_block_args):
+ set keyrest hash after making rest array, so that the last element
+ will not be overwritten. [ruby-core:51278] [Bug #7665]
- * 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.
+Mon Jan 7 09:37:24 2013 Koichi Sasada <ko1@atdot.net>
-Fri Dec 20 16:01:35 2013 Koichi Sasada <ko1@atdot.net>
+ * NEWS: add a NEWS entry about RubyVM.
- * include/ruby/ruby.h: add a comment for WB interfaces.
+Sun Jan 6 19:06:57 2013 Yuki Yugui Sonoda <yugui@yugui.jp>
-Fri Dec 20 16:00:52 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * win32/Makefile.sub: Fix build with VC.
+ Patch by Charlie Savage. Fixes [ruby-core:51261]
- * 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]
+Sun Jan 6 18:43:48 2013 Yuki Yugui Sonoda <yugui@yugui.jp>
-Fri Dec 20 14:19:12 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * bootstraptest/test_io.rb: add a test for [ruby-dev:46834].
- * configure.in (AC_ARG_WITH): use withval directly.
- fix failure on FreeBSD.
- http://fb32.rubyci.org/~chkbuild/ruby-trunk/log/20131217T070301Z.diff.html.gz
+ * io.c (rb_cloexec_fcntl_dupfd) Use an emulation with dup(2) when
+ fcntl(2) and/or F_DUPFD is unavailable.
+ Suggested by akr.
-Fri Dec 20 14:00:01 2013 Aman Gupta <ruby@tmm1.net>
+ * configure.in (HAVE_FCNTL): NativeClient does not provide fcntl(2).
- * 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
+Sun Jan 6 11:11:26 2013 Eric Hodel <drbrain@segment7.net>
-Fri Dec 20 07:07:35 2013 Eric Hodel <drbrain@segment7.net>
+ * doc/syntax/modules_and_classes.rdoc: Fixed typo.
- * lib/rubygems: Update to RubyGems master 03d6ae7. Changes include:
+Sun Jan 6 05:35:18 2013 Eric Hodel <drbrain@segment7.net>
- * Fixed typos.
+ * doc/syntax/modules_and_classes.rdoc: Added singleton classes
+ documentation.
- * Relaxed Gem.ruby test for ruby packagers that do not use `ruby`.
+Sun Jan 6 02:22:00 2013 Zachary Scott <zachary@zacharyscott.net>
- * test/rubygems: ditto.
+ * lib/webrick/httpservlet/abstract.rb (WEBrick::HTTPServlet): Typo in
+ example. Patch by shlensky [Fixes #232 on github]
-Thu Dec 19 14:03:04 2013 Koichi Sasada <ko1@atdot.net>
+Sat Jan 5 21:15:10 2013 NARUSE, Yui <naruse@ruby-lang.org>
- * gc.c (heap_get_freeobj): improve hot path performance.
+ * lib/net/http/generic_request.rb:
+ Amazon ECA API and GTE/1.3 disallow requests whose host has port
+ number if its port number equals to default port number of the
+ scheme. [Bug #7650]
- * 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.
+Sat Jan 5 13:58:59 2013 Eric Hodel <drbrain@segment7.net>
-Thu Dec 19 12:05:17 2013 Eric Hodel <drbrain@segment7.net>
+ * doc/syntax/modules_and_classes.rdoc: Improved description of methods
+ on a module or class as suggested by Tobias Buhlmann
- * lib/rubygems: Update to RubyGems master af60443. Changes include:
+Sat Jan 5 13:38:07 2013 Masaki Matsushita <glass.saga@gmail.com>
- * Improved speed of `gem install --ignore-dependencies`.
+ * string.c (rb_str_enumerate_lines): fix invalid byte sequence error
+ when a separator is passed. The patch is from yoshidam (Yoshida
+ Masato).
+ [Bug #7646] [ruby-dev:46827]
- * Open read-write for exclusive flock. [ruby-trunk - Bug #9257]
+ * test/ruby/test_string.rb: a test for above.
- * Remove specification before install to prevent infinite loop.
+Sat Jan 5 12:25:42 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Dec 19 11:23:49 2013 Aman Gupta <ruby@tmm1.net>
+ * test/ruby/envutil.rb (Test::Unit::Assertions#assert_in_out_err):
+ check stdout and stderr both.
- * vm_insnhelper.c (vm_call_iseq_setup_normal): simple for loop
- condition optimization. this area shows up as a hotspot in VM
- profiles.
+Sat Jan 5 10:21:54 2013 Eric Hodel <drbrain@segment7.net>
-Thu Dec 19 10:50:13 2013 Koichi Sasada <ko1@atdot.net>
+ * doc/syntax/modules_and_classes.rdoc: Added documentation of syntax
+ for Modules and Classes.
+ * doc/syntax/methods.rdoc: Moved some text to the Modules and
+ Classes syntax document.
- * gc.c (newobj_of): don't need to RBASIC_SET_CLASS() which includes WB
- here because created obj is always YOUNG/INFANT.
+Sat Jan 5 08:38:27 2013 Eric Hodel <drbrain@segment7.net>
-Thu Dec 19 10:48:37 2013 Koichi Sasada <ko1@atdot.net>
+ * doc/syntax/methods.rdoc: Added return values and scope sections,
+ slightly modified from the original patch. Fixes #227 from github by
+ Dave Brown.
- * benchmark/gc/gcbench.rb: check GC::OPTS availability
- for not MRI 2.1.0.
+Sat Jan 5 08:21:41 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Thu Dec 19 03:10:30 2013 Aman Gupta <ruby@tmm1.net>
+ * io.c (rb_cloexec_fcntl_dupfd): improve #ifdef condition.
+ * io.c (rb_maygvl_fd_fix_cloexec): ditto.
- * gc.c (heap_get_freeobj): remove redundant assignment. heap->freelist
- is set after the while() loop already.
+Sat Jan 5 07:54:59 2013 Eric Hodel <drbrain@segment7.net>
-Thu Dec 19 01:54:30 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/rubygems/commands/cleanup_command.rb: Clean all possible gems
+ using multiple passes. Fixes RubyGems bug #422. Refactored for
+ maintainability.
+ * test/rubygems/test_gem_commands_cleanup_command.rb: Test for above.
- * test/runner.rb: fix commit miss on r44278.
+Sat Jan 5 05:04:39 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Thu Dec 19 00:26:11 2013 Koichi Sasada <ko1@atdot.net>
+ * gc.c (vm_xrealloc): add a few comment why we avoid realloc(ptr,0).
- * gc.c (garbage_collect_body): lazy_sweep setting should work
- without USE_RGENGC.
+Fri Jan 4 20:17:06 2013 Yuki Yugui Sonoda <yugui@yugui.jp>
-Wed Dec 18 23:31:04 2013 Koichi Sasada <ko1@atdot.net>
+ * Makefile.in (RBCONFIG): Moved from common.mk in order to use the
+ variable in Makefile.in.
- * gc.c (gc_profile_dump_major_reason): fix this function because major_reason
- can be OR of multiple reasons.
+ * win32/Makefile.sub (RBCONFIG): Ditto.
- * gc.c (gc_profile_dump_on): ditto.
+Fri Jan 4 19:45:50 2013 Yuki Yugui Sonoda <yugui@yugui.jp>
-Wed Dec 18 17:03:00 2013 Koichi Sasada <ko1@atdot.net>
+ * common.mk (run, parse): Use BTESTRUBY instead of MINIRUBY to handle
+ cross-compiling cases, e.g. NativeClient.
- * gc.c (gc_profile_record_get): should return an empty array
- when profiling is active.
+Fri Jan 4 17:58:16 2013 Yuki Yugui Sonoda <yugui@yugui.jp>
-Wed Dec 18 16:49:40 2013 Koichi Sasada <ko1@atdot.net>
+ * common.mk (yes-btest): btest depends on also $(arch)-fake.rb and
+ rbconfig.rb on building for NativeClient.
- * gc.c (gc_profile_clear, gc_profile_enable): remove rest_sweep().
+ * Makefile.in (fake): Avoid generating $(arch)-fake.rb unless cross
+ compiling.
- * gc.c: check objspace->profile.current_record before inserting
- profiling record by new macro gc_prof_enabled().
+ * configure.in (CROSS_COMPILING): New substitution.
-Wed Dec 18 14:32:06 2013 Koichi Sasada <ko1@atdot.net>
+Fri Jan 4 16:26:45 2013 Eric Hodel <drbrain@segment7.net>
- * vm_exec.h (VM_DEBUG_STACKOVERFLOW): added.
- disable stack overflow check for every stack pushing as default.
+ * lib/rubygems/doctor.rb: Process directories in order in case the
+ filesystem doesn't. [ruby-trunk - Bug #7618]
- * vm_exec.c (vm_stack_overflow_for_insn): ditto.
+ Process specifications before other directories in case of bugs.
+ * test/rubygems/test_gem_doctor.rb: Test for above.
-Wed Dec 18 10:00:22 2013 Eric Hodel <drbrain@segment7.net>
+ * lib/rubygems.rb: Updated version.
- * lib/rubygems: Update to RubyGems master d8f12e2. This increases the
- speed of `gem install --ignore-dependencies` which helps bundler
- tests.
- * test/rubygems: ditto.
+ * test/rubygems/test_require.rb: Fixed double require of
+ benchmark.rb. RubyGems bug #420.
-Wed Dec 18 09:00:17 2013 Koichi Sasada <ko1@atdot.net>
+ * test/rubygems/test_gem_commands_check_command.rb: Fixed unused
+ variable warnings.
+ * test/rubygems/test_gem_commands_query_command.rb: ditto
+ * test/rubygems/test_gem_installer.rb: ditto
- * test/ruby/test_gc.rb (test_expand_heap): allow +/-1 diff.
+Fri Jan 4 15:05:25 2013 Eric Hodel <drbrain@segment7.net>
-Tue Dec 17 23:44:15 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+ * lib/rdoc/cross_reference.rb: Fixed matching of C#=== or #===. RDoc
+ bug #164
+ * test/rdoc/test_rdoc_cross_reference.rb: Test for above.
- * test/ruby/test_io.rb: fix duplicated test name.
+ * lib/rdoc/parser/changelog.rb: Fixed parsing of dates. RDoc bug #165
+ * test/rdoc/test_rdoc_parser_changelog.rb: Test for above.
-Tue Dec 17 20:15:00 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/rdoc/parser.rb: Fixed parsing multibyte files with incomplete
+ characters at byte 1024. [ruby-trunk - Bug #6393]
+ Fixed handling of -E. [ruby-trunk - Bug #6392]
+ * test/rdoc/test_rdoc_options.rb: Test for above.
+ * test/rdoc/test_rdoc_parser.rb: ditto.
+ * test/rdoc/test_rdoc_parser_c.rb: ditto.
+ * test/rdoc/test_rdoc_parser_changelog.rb: ditto.
+ * test/rdoc/test_rdoc_parser_markdown.rb: ditto.
+ * test/rdoc/test_rdoc_parser_rd.rb: ditto.
+ * test/rdoc/test_rdoc_rdoc.rb: ditto.
- * hash.c (rb_hash_reject): revert to deprecated behavior, with
- warnings, due to compatibility for HashWithDifferentAccess.
- [ruby-core:59154] [Bug #9223]
+ * lib/rdoc/tom_doc.rb: Fixed parsing of [] in TomDoc arguments list.
+ RDoc bug #167
+ * test/rdoc/test_rdoc_tom_doc.rb: Test for above.
-Tue Dec 17 17:30:56 2013 Akinori MUSHA <knu@iDaemons.org>
+ * lib/rdoc.rb: Update version.
- * misc/ruby-electric.el: Import version 2.1.1 from
- https://github.com/knu/ruby-electric.el.
+Fri Jan 4 11:51:00 2013 Zachary Scott <zachary@zacharyscott.net>
- * ruby-electric-delete-backward-char: Enable support for number
- prefix.
+ * lib/forwardable.rb: Fix rdoc parameters for ::def_single_delegator.
+ Patch by Vladimir Andrijevik [Github Fixes #230]
- * ruby-electric-curlies: Fix electric operation after an open
- curly.
+Fri Jan 4 00:35:11 2013 Yuki Yugui Sonoda <yugui@yugui.jp>
-Tue Dec 17 16:19:09 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ Fix failures on btest for NativeClient.
+ * bootstraptest/runner.rb (nacl?): New method to distinguish NaCl
+ cross build.
- * 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]
+ * bootstraptest/test_io.rb: Skip unsupported operations.
-Tue Dec 17 10:48:04 2013 Aman Gupta <ruby@tmm1.net>
+ * bootstraptest/test_literal.rb: ditto.
- * 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 Jan 4 00:29:40 2013 Yuki Yugui Sonoda <yugui@yugui.jp>
-Tue Dec 17 05:18:17 2013 Eric Hodel <drbrain@segment7.net>
+ * io.c (rb_cloexec_fcntl_dupfd): Fix failures in
+ bootstrap_test/test_io.rb. NativeClient does not support F_DUPFD
+ but supports dup2(2).
- * lib/rubygems: Update to RubyGems master 1c5f4b3. Allows rubygems
- repackagers to disable backward-compatible shared gem directory
- behavior.
- * test/rubygems: ditto.
+Thu Jan 3 17:46:50 2013 Kouhei Sutou <kou@cozmixng.org>
-Tue Dec 17 05:14:35 2013 Eric Hodel <drbrain@segment7.net>
+ * lib/rexml/element.rb (REXML::Elements#add): Remove too much
+ "elements" in document. Sorry...
- * NEWS (RDoc): Update version number so I don't have to change it
- for the final release.
+Thu Jan 3 17:42:32 2013 Kouhei Sutou <kou@cozmixng.org>
-Mon Dec 16 19:19:19 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/rexml/element.rb (REXML::Elements#each): Add missing
+ "elements" in document. [ruby-talk:402713]
+ Reported by Wesley Rishel. Thanks!!!
- * gc.c (rb_objspace_markable_object_p): should check special_const_p
- first (by is_markable_object()).
+Thu Jan 3 15:13:00 2013 Zachary Scott <zachary@zacharyscott.net>
-Mon Dec 16 19:12:54 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/psych/lib/psych.rb (Psych.load): Return value of
+ Psych::SyntaxError.message should be same as example.
+ Patch by Ippei Obayashi [ruby-core:51193] [Bug #7636]
- * ext/objspace/objspace.c (reachable_object_from_root_i): use
- compare_by_identity hash to avoid hash modify problem
- during iteration.
- [Bug #9252]
+Thu Jan 3 14:58:00 2013 Zachary Scott <zachary@zacharyscott.net>
- * ext/objspace/objspace.c (reachable_objects_from_root): ditto.
+ * lib/forwardable.rb (SingleForwardable): Fix example in overview
+ Patch by Vladimir Andrijevik [Github Fixes #231]
-Mon Dec 16 18:16:28 2013 Koichi Sasada <ko1@atdot.net>
+Thu Jan 3 14:32:47 2013 Yuki Yugui Sonoda <yugui@yugui.jp>
- * gc.c (gc_verify_internal_consistency): should not use
- rb_objspace_each_objects() because it call rest_sweep().
+ * configure.in (OBJCOPY): Fixes build error for NativeClient.
+ Avoid disabling OBJCOPY for NativeClient.
-Mon Dec 16 18:07:30 2013 Koichi Sasada <ko1@atdot.net>
+ * thread_pthread.c (rb_reserved_fd_p): USE_SLEEPY_TIMER_THREAD is
+ always defined. Fixes compilation error for NativeClient.
- * gc.c (rb_objspace_markable_object_p): fix last commit (build error).
+Wed Jan 02 03:09:00 2012 Zachary Scott <zachary@zacharyscott.net>
-Mon Dec 16 18:04:28 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/zlib/zlib.c (Zlib::GzipReader): Fix typo by zed_0xff
+ [Fixes Github #229]
- * gc.c (rb_objspace_markable_object_p): it should be live objects.
+Wed Jan 02 02:29:00 2012 Zachary Scott <zachary@zacharyscott.net>
-Mon Dec 16 18:00:51 2013 Koichi Sasada <ko1@atdot.net>
+ * hash.c (rb_hash_update): Revert documentation from r38672
+ See: https://github.com/ruby/ruby/pull/228#issuecomment-11791013
- * gc.c (rb_objspace_each_objects): should not clear dont_lazy_sweep
- flag in nested case.
+Wed Jan 02 02:16:00 2012 Zachary Scott <zachary@zacharyscott.net>
-Mon Dec 16 16:40:35 2013 Koichi Sasada <ko1@atdot.net>
+ * hash.c (rb_hash_update): Documentation for Hash#merge and shallow
+ copies Patch by Yorick Peterse [Fixes Github #228]
- * 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.
+Mon Dec 31 15:10:00 2012 Zachary Scott <zachary@zacharyscott.net>
- * test/ruby/test_alias.rb: add a test.
+ * vm_backtrace.c: Add documentation for Kernel#caller_locations,
+ Kernel#caller, and Thread::Backtrace::Location
-Mon Dec 16 14:14:22 2013 Koichi Sasada <ko1@atdot.net>
+Mon Dec 31 13:05:00 2012 Zachary Scott <zachary@zacharyscott.net>
- * gc.c: use gc_verify_internal_consistency() instead of
- gc_check_before_marks_i() for check consistency
- on RGENGC_CHECK_MODE >= 2.
+ * test/ruby/test_backtrace.rb: Add test for r37957 [Feature #7434]
-Mon Dec 16 14:01:48 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Sun Dec 30 23:33:36 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * process.c (make_clock_result): add :second as a unit for
- Process.clock_gettime.
+ * parse.y (simple_re_meta): escaped closing parenthesis has different
+ meaning. [Bug #7610] [ruby-core:51088]
-Mon Dec 16 13:10:54 2013 Koichi Sasada <ko1@atdot.net>
+Sun Dec 30 12:09:47 2012 Charlie Somerville <charlie@charliesomerville.com>
- * gc.c: introduce GC.verify_internal_consistency method to verify GC
- internal data structure.
+ * configure.in: use 4 argument form of AC_CHECK_HEADERS to force
+ autoconf to use compiler's result
- Now this method only checks generation (old/young) consistency.
+Sun Dec 30 10:58:04 2012 Kazuki Tsujimoto <kazuki@callcc.net>
-Mon Dec 16 11:49:26 2013 Aman Gupta <ruby@tmm1.net>
+ * test/ruby/test_keyword.rb: add a test for passing hash
+ as a last argument. [ruby-dev:46712] [Bug #7529]
- * gc.c (gc_info_decode): Fix build errors when compiled with
- RGENGC_ESTIMATE_OLDMALLOC=0
- * gc.c (objspace_malloc_increase): ditto
+Sun Dec 30 10:51:29 2012 Kazuki Tsujimoto <kazuki@callcc.net>
-Sun Dec 15 13:38:29 2013 Koichi Sasada <ko1@atdot.net>
+ * vm_insnhelper.c: set keyword hash on Proc/block calls.
+ [ruby-core:51172] [Bug #7630]
- * ext/objspace/objspace.c (reachable_object_from_root_i):
- reachable objects should not include categories and
- category_objects because it is noisy information.
+ * test/ruby/test_keyword.rb: add tests for above.
- 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?
+Sat Dec 29 21:57:11 2012 Keiju Ishitsuka <keiju@ishitsuka.com>
-Sun Dec 15 07:09:28 2013 Eric Hodel <drbrain@segment7.net>
+ * lib/irb/completion.rb: treat rightly completion for symbol on irb
+ [Bug #7632].
- * lib/rdoc: Update to RDoc master 263a9e5. This improves the
- accessibility of the search box.
+Sat Dec 29 21:51:30 2012 Shugo Maeda <shugo@ruby-lang.org>
-Sat Dec 14 17:39:00 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/curses/curses.c (window_cury, window_curx, window_maxy,
+ window_maxx, window_begy, window_begx): use RB_UNUSED_VAR()
+ to suppress unused-but-set-variable warnings.
- * vm_insnhelper.c (vm_callee_setup_arg_complex): count post
- arguments as mandatory arguments. [ruby-core:57706] [Bug #8993]
+Sat Dec 29 16:45:00 2012 Zachary Scott <zachary@zacharyscott.net>
- * vm_insnhelper.c (vm_yield_setup_block_args): ditto.
+ * iseq.c (RubyVM::InstructionSequence): rdoc formatting
-Sat Dec 14 16:26:46 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Dec 29 15:28:00 2012 Zachary Scott <zachary@zacharyscott.net>
- * configure.in (rubylibprefix): replace exec_prefix as well as
- bindir and libdir. a patch by kimuraw (Wataru Kimura) at
- [ruby-dev:47852]. [Bug #9160]
+ * iseq.c (RubyVM::InstructionSequence): Add rdoc for new iseq features
+ added from r38085, this includes ::of, #path, #absolute_path,
+ #label, #base_label, #first_lineno, and #inspect
-Sat Dec 14 14:42:53 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Dec 29 14:06:00 2012 Zachary Scott <zachary@zacharyscott.net>
- * 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]
+ * iseq.c (rb_iseq_line_trace_all, rb_iseq_line_trace_specify): Add
+ rdoc for experimental C level api of iseq, from r38076
-Sat Dec 14 13:01:45 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Dec 29 11:37:36 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * proc.c (mnew_from_me): method by respond_to_missing? should be
- owned by the original class.
+ * object.c (rb_obj_clone): attach clone to its singleton class during
+ cloning singleton class so that singleton_method_added will be called
+ on it. based on the patch by shiba (satoshi shiba)[Bug #5283] in
+ [ruby-dev:44477]. [Bug #5283]
-Sat Dec 14 11:55:31 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Dec 29 10:10:39 2012 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]
+ * configure.in (crt_externs.h): use standard macro AC_CHECK_HEADERS.
-Sat Dec 14 11:44:52 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Dec 28 23:12:44 2012 Charlie Somerville <charlie@charliesomerville.com>
- * 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]
+ * configure.in: check for the whether crt_externs.h is present when compiling
+ for darwin (this header is missing in the iOS SDK)
+ * eval_intern.h: check HAVE_CRT_EXTERNS_H before including crt_externs.h, if
+ not defined, include missing/crt_externs.h instead
+ * hash.c: ditto
+ * missing/setproctitle.c: ditto
+ * missing/crt_externs.h: declare _NSGetEnviron() function and define environ
+ for iOS
-Sat Dec 14 11:25:56 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Dec 28 21:40:36 2012 Keiju Ishitsuka <keiju@ishitsuka.com>
- * object.c (rb_mod_const_defined): support nested class path as
- well as const_get. [Feature #7414]
+ * lib/irb/context.rb: IRB::Context#new: Check from JobManager
+ inside IRB namespace [Bug #7628]. Thanks rafaelfranca for bug
+ report and its patch.
-Sat Dec 14 01:31:52 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Dec 28 17:06:17 2012 Akinori MUSHA <knu@iDaemons.org>
- * eval.c (rb_rescue2): reuse tags pushed for body proc to protect
- rescue proc too.
+ * misc/ruby-electric.el (ruby-electric-curlies): Automatically
+ indent closing curly brackets when
+ ruby-electric-newline-before-closing-bracket is true.
-Sat Dec 14 01:15:51 2013 Masaya Tarui <tarui@ruby-lang.org>
+Fri Dec 28 11:50:42 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c (wmap_final_func): Bugfix. Should update *value to new pointer.
+ * vm_insnhelper.c (vm_yield_setup_block_args): pass single argument to
+ single optional parameter unchanged without splatting. [Bug #7621]
+ [ruby-dev:46801]
-Sat Dec 14 01:05:46 2013 Tanaka Akira <akr@fsij.org>
+Fri Dec 28 11:17:47 2012 Shugo Maeda <shugo@ruby-lang.org>
- * 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]
+ * proc.c (method_eq): fix the documentation to refer to owner.
+ [ruby-core:51105] [Bug #7613]
- * lib/cgi/core.rb: Ditto.
+ * test/ruby/test_method.rb (test_alias_onwer): new test to confirm
+ that `a == b' returns false if owners of a and b are different.
- * lib/drb/ssl.rb: Ditto.
+Fri Dec 28 07:07:43 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Sat Dec 14 00:34:31 2013 Naohisa Goto <ngotogenome@gmail.com>
+ * def/id.def: use split(/^/) instead of String#lines to support
+ Ruby 1.8.5 as BASERUBY.
- * internal.h (ruby_sized_xrealloc2): fix typo introduced in r44117,
- which cause compile error on Solaris.
+Thu Dec 27 21:56:56 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Sat Dec 14 00:22:16 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * variable.c (rb_mod_remove_const): fix segv caused by r38558.
- * thread.c: (exec_recursive): use rb_catch_protect() instead of
- rb_catch_obj() and PUSH_TAG(), and reduce pushing tags and
- machine stack usage.
+Tue Dec 28 01:13:48 2012 James Edward Gray II <james@graysoftinc.com>
-Sat Dec 14 00:18:08 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/csv.rb: Added more Hash methods to CSV::Row.
- * proc.c (mnew_from_me): achieve the original defined_class from
- prepended iclass, to fix inherited owner.
+Thu Dec 27 23:27:15 2012 Keiju Ishitsuka <keiju@ishitsuka.com>
- * proc.c (method_owner): return the defined class, but not the
- class which the method object is created from.
+ * lib/irb/ruby-lex.rb: make lex_state to EXPR_END when next token
+ is an operator after SYMBEG [Bug #6378].
-Fri Dec 13 22:29:21 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Dec 27 21:30:21 2012 Keiju Ishitsuka <keiju@ishitsuka.com>
- * proc.c (method_owner): return the class where alias is defined, not
- the class original method is defined.
+ * lib/irb/ruby-lex.rb: allow to handle recursive heredocs on
+ irb[Bug #5648].
- * vm_method.c (rb_method_entry_make, rb_alias): store the originally
- defined class in me. [Bug #7993] [Bug #7842] [Bug #9236]
+Thu Dec 27 20:45:29 2012 Masaki Matsushita <glass.saga@gmail.com>
- * vm_method.c (rb_method_entry_get_without_cache): cache included
- module but not iclass.
+ * ext/stringio/stringio.c (strio_getline): fix not to raise TypeError
+ when limit is nil.
+ [Bug #7232] [ruby-core:48531]
-Fri Dec 13 16:27:17 2013 Aman Gupta <ruby@tmm1.net>
+ * test/stringio/test_stringio.rb: a test for above.
- * gc.c (gc_info_decode): Use :major_by=>:nofree as fallback reason
- when other trigger conditions are present.
+Thu Dec 27 21:08:23 2012 Charlie Somerville <charlie@charliesomerville.com>
-Fri Dec 13 13:25:30 2013 Koichi Sasada <ko1@atdot.net>
+ * vm_core.h (VM_DEFINECLASS_TYPE): explicit cast to enum type to avoid 64->32
+ shorten warning
- * error.c: add Exception#backtrace_locations.
- Now, there are no setter and independent from Exception#backtrace.
- [Feature #8960]
+Thu Dec 27 20:11:29 2012 Masaki Matsushita <glass.saga@gmail.com>
- * eval.c (setup_exception): set backtrace locations for `bt_location'
- special attribute.
+ * ext/stringio/stringio.c (strio_ungetc): raise IOError instead of RuntimeError
+ if the string is frozen.
+ [Bug #7231] [ruby-core:48530]
- * vm_backtrace.c (rb_backtrace_to_location_ary): added.
+ * ext/stringio/stringio.c (strio_ungetbyte): ditto.
- * internal.h: ditto.
+ * test/stringio/test_stringio.rb: a test for above.
- * test/ruby/test_backtrace.rb: add a test for
- Exception#backtrace_locations.
+Wed Dec 26 23:55:18 2012 Keiju Ishitsuka <keiju@ishitsuka.com>
-Fri Dec 13 12:01:07 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/irb/context.rb: fix IRB::Inspector#keys_with_inspector [Bug #7598]
- * gc.c (garbage_collect_body): use rb_bug() and explicit error message
- instead of using assert().
- [Bug #9222]
+Wed Dec 26 23:26:15 2012 Keiju Ishitsuka <keiju@ishitsuka.com>
-Fri Dec 13 11:52:41 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/irb/context.rb: IRB::Context#use_readline= has been obsolete
+ [Bug #6339].
- * array.c: fix comment to remove the word "shady".
+Wed Dec 26 21:32:46 2012 Keiju Ishitsuka <keiju@ishitsuka.com>
- * variable.c: ditto.
+ * lib/irb/context.rb: make a correct prompt from
+ IRB.conf[:IRB_NAME] on irb [Bug #6338]. Patched by sho-h.
-Fri Dec 13 11:33:55 2013 Koichi Sasada <ko1@atdot.net>
+Wed Dec 26 21:09:19 2012 Keiju Ishitsuka <keiju@ishitsuka.com>
- * 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".
+ * lib/irb/ext/math-mode.rb: make not able to change math-mode
+ after irb starting [Bug #6302]. Patched by sho-h.
-Fri Dec 13 10:04:23 2013 Eric Hodel <drbrain@segment7.net>
+Wed Dec 26 12:52:36 2012 Keiju Ishitsuka <keiju@ishitsuka.com>
- * 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.
+ * lib/irb/init.rb: change default debug level for
+ irb[ruby-dev:46805], [Bug #6301].
-Fri Dec 13 09:50:49 2013 Eric Hodel <drbrain@segment7.net>
+Wed Dec 26 11:54:11 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * lib/rubygems: Update to RubyGems master ddac51f. Changes:
+ * configure.in: enable -fPIE when checking -pie for fixing
+ OpenBSD build error. Patch by George Koehler. Thank you!
+ [Bug #7606] [ruby-core:51082]
- * Allow override for the shared gem installation directory for
- rubygems packagers.
+Wed Dec 26 07:31:24 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * Lock gem cache files for read and write to improve thread safety.
+ * string.c (rb_enc_cr_str_copy_for_substr): empty string is always
+ valid or 7bit.
- * Use io/console when available.
+ * string.c (rb_str_enumerate_lines, rb_str_chop): reduce duplicated
+ code.
- * Minor cleanup.
+ * string.c (rb_str_enumerate_chars): prevent shared copy from GC.
- * test/rubygems: ditto.
+Wed Dec 26 01:31:16 2012 Keiju Ishitsuka <keiju@ishitsuka.com>
-Fri Dec 13 08:15:31 2013 Aman Gupta <ruby@tmm1.net>
+ * lib/irb/init.rb, lib/irb/context.rb: fix conf.debug_level=
+ [Bug #6301] and fix irb command option: -- irb_debug_level for irb.
- * 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.
+Wed Dec 26 00:59:18 2012 Keiju Ishitsuka <keiju@ishitsuka.com>
-Wed Dec 13 02:00:00 2013 Kenta Murata <mrkn@mrkn.jp>
+ * lib/irb/ruby-lex.rb: improve RubyLex performance for large files
+ [Bug #5202]. Patch by ryanmelt.
- * ext/bigdecimal/bigdecimal.c (VpSetPTR): fix for limitation of the resulting
- precision.
- [ruby-core:50269] [Bug #7458]
+Tue Dec 25 22:21:06 2012 Keiju Ishitsuka <keiju@ishitsuka.com>
- * test/bigdecimal/test_bigdecimal.rb (test_limit): add tests for the above
- change.
+ * lib/irb/output-method.rb: raise right exception when
+ IRB::OutputMethod#print don't defined [Bug #6657].
-Wed Dec 13 01:56:00 2013 Kenta Murata <mrkn@mrkn.jp>
+Tue Dec 25 22:06:33 2012 Koichi Sasada <ko1@atdot.net>
- * ext/bigdecimal/bigdecimal.c (VpAddAbs): put out a conditional branch from
- the inside of while-loop.
+ * vm_trace.c (rb_threadptr_exec_event_hooks_and_pop_frame):
+ pop a frame before JUMP_TAG() if exception occurred.
+ This change fix bug of Ruby 1.9.
+ [ruby-core:51128] [ruby-trunk - Bug #7624]
- * ext/bigdecimal/bigdecimal.c (VpSubAbs): ditto.
+ * vm_core.h (EXEC_EVENT_HOOK_AND_POP_FRAME): add to use
+ `rb_threadptr_exec_event_hooks_and_pop_frame()'.
-Wed Dec 13 01:53:00 2013 Kenta Murata <mrkn@mrkn.jp>
+ * vm.c (vm_exec): use EXEC_EVENT_HOOK_AND_POP_FRAME() while
+ exception handling. While exception handling, if an exception
+ is raised in hooks, need to pop current frame and raise this
+ raised exception by hook.
- * ext/bigdecimal/bigdecimal.c (VPrint): be a static function, support another
- dump formats, and add more information of the given bigdecimal.
+ * test/ruby/test_settracefunc.rb: add a test.
- * ext/bigdecimal/bigdecimal.h: ditto.
+Tue Dec 25 21:08:53 2012 Keiju Ishitsuka <keiju@ishitsuka.com>
-Wed Dec 11 16:45:58 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/irb/init.rb, lib/irb/lc/ja/error.rb, lib/irb/lc/error.rb:
+ raise exception when illegal RC_NAME_GENERATOR defined [Bug #6455].
- * eval.c (rb_raise_jump): call c_return hook immediately after
- popping `raise' frame.
- Patches by deivid (David Rodriguez). [Bug #8886]
+Tue Dec 25 19:22:17 2012 Keiju Ishitsuka <keiju@ishitsuka.com>
- * test/ruby/test_settracefunc.rb: catch up this fix.
+ * lib/irb/workspace.rb: define method to private on top-level irb
+ [Bug #5776]. Patch by davidbalbert.
-Wed Dec 11 16:01:26 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Dec 25 19:09:51 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * 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]
+ * bignum.c, include/ruby/intern.h (rb_big_eql): exported.
-Wed Dec 11 15:36:15 2013 Aman Gupta <ruby@tmm1.net>
+ * thread.c (recursive_check): object_id maybe a Bignum, not Fixnum on
+ LLP64. see also r38493 and r38548.
+ reported by Heesob Park at [ruby-core:51083] [Bug #7607], and patched
+ by shirosaki at [ruby-core:51095]
- * compile.c (iseq_specialized_instruction): emit opt_aset instruction
- to optimize Hash#[]= and Array#[]= when called with Fixnum argument.
- [Bug #9227] [ruby-core:58956]
+Tue Dec 25 18:53:35 2012 Koichi Sasada <ko1@atdot.net>
-Wed Dec 11 04:54:03 2013 Eric Hodel <drbrain@segment7.net>
+ * vm_core.h, eval_intern.h (CHECK_STACK_OVERFLOW): move
+ CHECK_STACK_OVERFLOW() to vm_core.h and rename to
+ CHECK_VM_STACK_OVERFLOW().
+ This change is only move and rename.
- * lib/rubygems: Update to RubyGems master ec8ed22. Notable changes
- include:
+ * tool/instruction.rb: catch up above changes.
- * Renamed extension_install_dir to extension_dir (backwards
- compatible).
+ * vm.c, vm_insnhelper.c: ditto.
- * Fixed creation of gem.deps.rb.lock file from
- TestGemRequestSet#test_install_from_gemdeps_install_dir
+ * vm_insnhelper.c (vm_stackoverflow): add a function to unify
+ raising vm stackoverflow exception.
- * Fixed a typo and some documentation.
+Tue Dec 25 16:16:54 2012 Koichi Sasada <ko1@atdot.net>
- * test/rubygems: ditto.
+ * vm_core.h (RUBY_VM_THREAD_VM_STACK_SIZE): change default
+ VM stack size (128 KB or 256 KB -> 512 KB or 1024 KB).
+ This re-sizing corrects smaller value introduced at r38478.
+ Newer value is same VM stack size of Ruby 1.9.
+ [ruby-dev:46797] [ruby-trunk - Bug #7603]
-Wed Dec 11 03:18:08 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+Tue Dec 25 13:38:12 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * insns.def: Fix optimization bug of Float#/ [Bug #9238]
+ * error.c (compile_err_append, compile_warn_print, warn_print): use
+ rb_write_error_str() instead of writing to rb_stderr directly.
-Tue Dec 10 23:58:30 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * io.c (rb_write_error_str): a stopgap measure not to unblock GVL.
+ warning from require seems to still have race condition errors.
- * 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]
+Tue Dec 25 00:59:29 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Dec 10 23:44:42 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * node.h (NODE_OP_CDECL), compile.c (iseq_compile_each),
+ parse.y (stmt, arg): allow scoped constant op-assignment.
+ [ruby-core:40154] [Bug #5449]
- * array.c (rb_ary_hash): add salt to differentiate false and empty
- array. [ruby-core:58993] [Bug #9231]
+Mon Dec 24 04:56:48 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * hash.c (rb_any_hash, rb_hash_hash): ditto.
+ * lib/net/http/generic_request.rb (Net::HTTPGenericRequest):
+ set content-length to zero on empty post requests
+ by Gregory Ostermayr <gregory.ostermayr@gmail.com>
+ https://github.com/ruby/ruby/pull/201 fix GH-201
-Tue Dec 10 18:16:09 2013 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
+Sun Dec 23 19:09:16 2012 Koichi Sasada <ko1@atdot.net>
- * man/ruby.1: [DOC] Use www.ruby-toolbox.com instead of RAA.
+ * thread.c: rename methods:
+ from Thread.async_interrupt_timing to Thread.handle_interrupt,
+ from Thread.async_interrupted? to Thread.pending_interrupt?.
+ Also rename option from `defer' to `never'.
+ [ruby-core:51074] [ruby-trunk - Feature #6762]
-Tue Dec 10 17:21:30 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_core.c, thread.c: rename functions and data structure
+ `async_errinfo' to `pending_interrupt'.
- * gc.c (wmap_finalize, wmap_aset_update): use simple malloced array
- instead of T_ARRAY, to reduce GC pressure.
+ * thread.c: add global variables sym_immediate, sym_on_blocking and
+ sym_never.
-Tue Dec 10 15:56:48 2013 Aman Gupta <ruby@tmm1.net>
+ * cont.c, process.c, vm.c, signal.c: ditto.
- * 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
+ * lib/sync.rb, lib/thread.rb: catch up this renaming.
-Tue Dec 10 15:46:03 2013 Koichi Sasada <ko1@atdot.net>
+ * test/ruby/test_thread.rb: ditto.
- * gc.c (allrefs_add): push obj only if allrefs table doesn't have
- obj.
+Sun Dec 23 17:57:30 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c (allrefs_roots_i): ditto.
+ * lib/profiler.rb (Profiler__::PROFILE_PROC, print_profile): store
+ profile data per threads for concurrent-execution.
+ [ruby-core:22046] [Bug #1152]
-Tue Dec 10 15:28:10 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/profiler.rb (Profiler__::Wrapper): support calling singleton
+ methods of an instance of BasicObject.
- * 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
+ * lib/profiler.rb (Profiler__::PROFILE_PROC): use TracePoint.
-Tue Dec 10 15:15:37 2013 Koichi Sasada <ko1@atdot.net>
+Sun Dec 23 16:13:00 2012 Zachary Scott <zachary@zacharyscott.net>
- * gc.c (gc_marks_check): disable GC during checking and
- restore malloc_increase info.
+ * lib/erb.rb: typos for ERB::new link
-Tue Dec 10 14:41:53 2013 Aman Gupta <ruby@tmm1.net>
+Sun Dec 23 16:06:00 2012 Zachary Scott <zachary@zacharyscott.net>
- * 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]
+ * lib/erb.rb: Document ERB::new trim_mode '-' for lines ending in -%>
+ [ruby-core:51084] [Bug #7608]
-Tue Dec 10 11:20:56 2013 Aman Gupta <ruby@tmm1.net>
+Sun Dec 23 15:25:00 2012 Zachary Scott <zachary@zacharyscott.net>
- * 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)
+ * lib/irb/ruby-lex.rb: Add handling for %i and %I quoting to irb
+ Patch by flori [ruby-core:49550] [Bug #7392] [Github Issue #157]
-Tue Dec 10 07:48:29 2013 Aman Gupta <ruby@tmm1.net>
+Sun Dec 23 15:05:48 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * 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
+ * vm_eval.c (rb_check_funcall_with_hook): rb_check_funcall with hook
+ which is called before calling method_missing or target method.
-Tue Dec 10 06:14:11 2013 Eric Hodel <drbrain@segment7.net>
+ * marshal.c (w_object, r_object0): use rb_check_funcall_with_hook
+ instead of respond_to? and call.
- * ext/.document: Remove curses from documentable directories.
+Sun Dec 23 14:52:00 2012 Zachary Scott <zachary@zacharyscott.net>
-Tue Dec 10 04:55:36 2013 Zachary Scott <e@zzak.io>
+ * re.c (rb_reg_eqq): doc: #=== is not a synonym for #=~, added example
+ [ruby-dev:46746] [Bug #7571]
- * ext/openssl/lib/openssl/digest.rb: Deprecate OpenSSL::Digest::Digest
- [Fixes GH-446] https://github.com/ruby/ruby/pull/446
+Sun Dec 23 14:35:13 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Dec 10 00:41:42 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+ * thread.c (BLOCKING_REGION): if fail_if_interrupted is false ignore
+ the result of blocking_region_begin(), since it always is true in
+ that case. suppress "uninitialized" warnings.
- * ext/thread/thread.c: [DOC] add call-seq alias for Queue#enq, #<<, etc.
+Sun Dec 23 09:34:07 2012 Eric Hodel <drbrain@segment7.net>
- * ext/thread/thread.c (Init_thread): use rb_define_alias instead of
- rb_alias to document alias.
+ * lib/rubygems/commands/check_command.rb: Added --doctor and --dry-run
+ options to clean up after failed uninstallation.
+ * test/rubygems/test_gem_commands_check_command.rb: Test for above.
-Mon Dec 9 20:00:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * lib/rubygems/commands/push_command.rb: Allow pushes from RubyGems
+ 2.0.0.preview3
- * internal.h (RCLASS_SERIAL): Add RCLASS_SERIAL as a convenience
- accessor for RCLASS_EXT(klass)->class_serial.
+ * lib/rubygems/commands/update_command.rb: Use Gem.ruby_version
- * class.c, vm_insnhelper.c, vm_method.c: Use RCLASS_SERIAL
+ * lib/rubygems/dependency.rb: Update style.
-Mon Dec 9 19:50:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * lib/rubygems/installer.rb: Ensure installed gem specifications will
+ be useable. Refactor.
+ * test/rubygems/test_gem_installer.rb: ditto.
- * 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.
+ * lib/rubygems/validator.rb: Fixed bug with unreadable files.
-Mon Dec 9 18:50:43 2013 Aman Gupta <ruby@tmm1.net>
+ * lib/rubygems.rb: Fixed broken methods.
+ * test/rubygems/test_gem.rb: Test for above.
- * 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
+ * test/rubygems/test_gem_commands_push_command.rb: Fixed overridden
+ Gem.latest_rubygems_version
-Mon Dec 9 18:10:10 2013 Koichi Sasada <ko1@atdot.net>
+Sun Dec 23 01:52:01 2012 Akinori MUSHA <knu@iDaemons.org>
- * vm.c (vm_stat): renamed from ruby_vm_stat.
- Should not use ruby_ prefix here.
+ * io.c (rb_io_lines, rb_io_bytes, rb_io_chars, rb_io_codepoints):
+ Deprecate IO#{lines,bytes,chars,codepoints} and those of ARGF.
+ [Feature #6670]
-Mon Dec 9 16:13:31 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/stringio/stringio.c (strio_lines, strio_bytes, strio_chars)
+ (strio_codepoints): Deprecate
+ StringIO#{lines,bytes,chars,codepoints}. [Feature #6670]
- * gc.c (wmap_size): add ObjectSpace::WeakMap#size and #length.
+ * ext/zlib/zlib.c (rb_gzreader_lines, rb_gzreader_bytes):
+ Deprecate Zlib::GzipReader#{lines,bytes}. [Feature #6670]
-Mon Dec 9 15:26:17 2013 Shugo Maeda <shugo@ruby-lang.org>
+Sat Dec 23 01:35:00 2012 Zachary Scott <zachary@zacharyscott.net>
- * test/test_curses.rb: removed.
+ * lib/optparse.rb: Documentation for OptionParser to remove 'shadowed
+ outer local variable' from example and make obvious ARGV with
+ non-option arguments.
+ Patch by Marcus Stollsteimer [ruby-core:47460] [Bug #6997]
-Mon Dec 9 13:36:55 2013 Shugo Maeda <shugo@ruby-lang.org>
+Sat Dec 23 00:08:00 2012 Kenta Murata <mrkn@mrkn.jp>
- * ext/curses, sample/curses: removed curses.
+ * include/ruby/intern.h: add the prototype declaration of
+ rb_num_coerce_bit.
- * NEWS: added an entry for the above change.
+ * numeric.c (rb_num_coerce_bit): the new coerce function for bitwise
+ binary operation.
-Mon Dec 9 12:26:05 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * bignum.c (rb_big_and): use coerce to convert the argument, which isn't
+ a Fixnum nor a Bignum, to the corresponding Integer object so that
+ bitwise operations can support Integer-mimic objects.
+ [Bug #1792] [ruby-core:39491]
- * 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]
+ * bignum.c (rb_big_or): ditto.
- * variable.c (rb_class_path_cached): returns cached class path
- only, without searching and allocating new class path string.
+ * bignum.c (rb_big_xor): ditto.
-Mon Dec 9 11:14:26 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * numeric.c (bit_coerce): ditto.
- * 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]
+ * numeric.c (fix_and): ditto.
-Mon Dec 9 08:40:40 2013 Eric Hodel <drbrain@segment7.net>
+ * numeric.c (fix_or): ditto.
- * lib/rubygems: Update to RubyGems master bf37240. Fixes useless
- error message with `gem install -g` with no gem dependencies file.
- * test/rubygems: ditto.
+ * numeric.c (fix_xor): ditto.
-Mon Dec 9 04:52:25 2013 Eric Hodel <drbrain@segment7.net>
+ * test/ruby/test_integer.rb: add tests for the above changes.
- * NEWS: Update RubyGems entry with notable features.
+ * test/ruby/test_bignum.rb: ditto.
-Mon Dec 9 04:43:54 2013 Eric Hodel <drbrain@segment7.net>
+Sun Dec 23 00:04:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/.document: Add syslog/lib and thread/thread.c to documentable
- items. [ruby-trunk - Bug #9228]
+ * internal.h (QUOTE, QUOTE_ID): quote unprintable chars in strings and
+ IDs. [Bug #7574] [ruby-dev:46749]
-Mon Dec 9 04:28:50 2013 Eric Hodel <drbrain@segment7.net>
+ * string.c (rb_str_quote_unprintable): ditto.
- * 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.
+Sat Dec 22 23:59:18 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Dec 9 02:10:32 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * error.c (rb_compile_error, rb_compile_warn, rb_compile_warning),
+ (rb_warn, rb_warning): support PRIsVALUE.
- * 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
+Sat Dec 22 22:04:58 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
-Sun Dec 8 20:47:35 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * cont.c (rb_fiber_start): unify conditions.
- * class.c (rb_get_kwargs): when values is non-null, remove
- extracted keywords from the rest keyword argument.
+Sat Dec 22 21:47:55 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sun Dec 8 20:26:54 2013 Yutaka Kanemoto <kanemoto@ruby-lang.org>
+ * io.c (rb_io_wait_writable): use rb_thread_check_ints() instead
+ of rb_thread_fd_writable().
+ * io.c (rb_io_wait_readable): ditto.
- * common.mk (ruby.imp): avoid circular dependency on AIX
+Sat Dec 22 20:31:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Dec 8 20:21:00 2013 Kenta Murata <mrkn@mrkn.jp>
+ * object.c (rb_mod_const_get): symbol cannot be nested constant name.
- * 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]
+Sat Dec 22 19:26:35 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/bigdecimal/test_bigdecimal.rb: add tests for the above change.
+ * object.c (rb_mod_const_get): check more strictly. [ruby-dev:46748]
+ [Bug #7573]
-Sun Dec 8 18:28:20 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+Wed Dec 19 02:34:48 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
- * NEWS: [DOC] update NEWS about GC.
+ * cont.c (rb_fiber_start): in case of jump with TAG_FATAL,
+ enqueue error into async_errinfo_queue, because you cannot call
+ TH_TAG_JUMP() in this function. [ruby-dev:45218] [Bug #5993]
-Sun Dec 8 17:52:24 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+ * thread.c (rb_threadptr_execute_interrupts): now INT2FIX(TAG_FATAL)
+ can be popped from async_errinfo_queue.
- * object.c: [DOC] document Module#singleton_class?.
+ * vm.c (rb_vm_make_jump_tag_but_local_jump): revert r38441.
+ rb_vm_make_jump_tag_but_local_jump() shouldn't return exception
+ in case of state == TAG_FATAL.
-Sun Dec 8 16:19:28 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/ruby/test_fiber.rb (test_exit_in_fiber): fix a test to illuminate
+ Thread.exit should terminate current Thread.
- * class.c (rb_get_kwargs): if optional is negative, unknown
- keywords are allowed.
+Sat Dec 22 13:15:08 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
- * vm_insnhelper.c (vm_callee_setup_keyword_arg): check unknown
- keywords.
+ * gc.c (obj_id_to_ref): add a macro to treat Bignum object id.
+ This follows the change r38493.
-Sun Dec 8 14:55:12 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+ * gc.c (id2ref): fix for working fine with Bignum object id on x64
+ Windows.
+ * gc.c (wmap_finalize): ditto.
- * array.c (rb_ary_shuffle_bang, rb_ary_sample): rename local variables.
+Sat Dec 22 11:30:21 2012 Masaki Matsushita <glass.saga@gmail.com>
-Sun Dec 8 13:59:38 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+ * struct.c (make_struct): remove junk ID check to allow members who
+ have junk name like "foo\000".
+ * test/ruby/test_struct.rb: Test for above.
+ [Bug #7575] [ruby-dev:46750]
- * array.c (rb_ary_shuffle_bang, rb_ary_sample): check
- unknown keywords.
+Sat Dec 22 05:34:54 2012 Eric Hodel <drbrain@segment7.net>
- * test/ruby/test_array.rb (test_shuffle, test_sample): tests for
- the above.
+ * lib/net/http.rb: Requests may be created with a URI which sets the
+ Host header. Responses contain the requested URI for easier redirect
+ following. [ruby-trunk - Feature #6482]
+ * lib/net/http/generic_request.rb: ditto.
+ * lib/net/http/response.rb: ditto.
+ * NEWS (net/http): Updated for above.
+ * test/net/http/test_http.rb: Tests for above.
+ * test/net/http/test_http.rb: ditto.
+ * test/net/http/test_httpresponse.rb: ditto.
-Sun Dec 8 13:01:11 2013 Aman Gupta <ruby@tmm1.net>
+Sat Dec 22 02:35:00 2012 Zachary Scott <zachary@zacharyscott.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
+ * lib/irb/slex.rb(#match): Typo, should be D_DETAIL
+ [ruby-core:51071] [Bug#7600]
-Sun Dec 8 11:59:40 2013 Aman Gupta <ruby@tmm1.net>
+Sat Dec 22 02:29:00 2012 Zachary Scott <zachary@zacharyscott.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]
+ * lib/irb/input-method.rb, lib/irb.rb: Typo in
+ InputMethod#readable_atfer_eof? to #readable_after_eof?
+ [ruby-core:51069] [Bug #7599]
-Sun Dec 8 11:21:00 2013 Aman Gupta <ruby@tmm1.net>
+Sat Dec 22 02:19:38 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * 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
+ * vm_dump.c (rb_vm_bugreport): revert r38533.
+ * addr2line.c (fill_lines): add ELF sanity check.
+ [Bug #7597] [ruby-dev:46786]
-Sun Dec 8 10:45:05 2013 Aman Gupta <ruby@tmm1.net>
+Sat Dec 22 02:05:00 2012 Zachary Scott <zachary@zacharyscott.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
+ * lib/irb/inspector.rb, lib/irb/context.rb: Move IRB::INSPECTORS and
+ class methods to IRB::Inspector [ruby-core:51067][Bug #7598]
-Sun Dec 8 10:22:38 2013 Aman Gupta <ruby@tmm1.net>
+Sat Dec 22 00:28:46 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * 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
+ * object.c (rb_obj_hash): shouldn't assume object_id can be long.
+ based on a patch by Heesob Park at [ruby-core:51060].
+ cf. [Backport #7454]
-Sun Dec 8 10:24:20 2013 Eric Hodel <drbrain@segment7.net>
+Fri Dec 21 23:15:25 2012 Kouhei Sutou <kou@cozmixng.org>
- * lib/rubygems.rb: Update version for upcoming ruby 2.1.0 RC.
+ * ext/fiddle/lib/fiddle/struct.rb (Fiddle::CStructEntity#set_ctypes):
+ CPtr -> Pointer.
+ * test/fiddle/test_c_struct_entry.rb
+ (Fiddle::TestCStructEntity#test_aref_pointer):
+ Added the test for the above.
-Sun Dec 8 10:21:36 2013 Eric Hodel <drbrain@segment7.net>
+Fri Dec 21 23:12:05 2012 Kouhei Sutou <kou@cozmixng.org>
- * lib/rubygems: Update to RubyGems master 14749ce. This fixes bugs
- handling of gem dependencies lockfiles (Gemfile.lock).
+ * ext/fiddle/lib/fiddle/struct.rb (Fiddle::CStructEntity#set_ctypes):
+ CPtr -> Pointer.
+ * test/fiddle/test_c_struct_entry.rb
+ (Fiddle::TestCStructEntity#test_aref_pointer_array):
+ Added the test for the above.
- * test/rubygems: ditto.
+Fri Dec 21 22:43:36 2012 Kouhei Sutou <kou@cozmixng.org>
-Sun Dec 8 09:40:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * ext/fiddle/lib/fiddle/import.rb (Fiddle::Importer#sizeof):
+ CPtr -> Pointer.
+ * test/fiddle/test_import.rb (Fiddle::TestImport#test_sizeof):
+ Added the test for the above.
- * array.c (rb_ary_or): use RHASH_TBL_RAW instead of RHASH_TBL
+Fri Dec 21 22:34:17 2012 Koichi Sasada <ko1@atdot.net>
- * process.c (rb_execarg_fixup): use RHASH_TBL_RAW and insert write
- barriers where appropriate
+ * test/ruby/test_iseq.rb: disable a test which checks features
+ removed at r38532.
- * vm.c (kwmerge_i): use RHASH_TBL_RAW
+Fri Dec 21 22:02:00 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * vm.c (HASH_ASET): use rb_hash_aset instead of calling directly into
- st_insert
+ * win32/{dir.h,win32.c} (rb_w32_readdir): removed old rb_w32_readdir()
+ and renamed from rb_w32_readdir_with_enc().
+ [ruby-core:24864] [Feature #1927]
-Sat Dec 7 11:15:52 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * dir.c (READDIR): follow above change.
- * 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]
+Fri Dec 21 21:12:54 2012 Masaya Tarui <tarui@ruby-lang.org>
-Sat Dec 7 08:25:00 2013 Richo Healey <richo@psych0tik.net>
+ * vm_dump.c (rb_vm_bugreport): commentout addr2line call temporarily
+ in order to avoid segv. anyone can fix addr2line?
+ [Bug #7597] [ruby-dev:46786]
- * test/ruby/test_struct.rb: Add regression test for question marks and
- bangs in struct members. [Closes GH-468]
+Fri Dec 21 20:38:28 2012 Koichi Sasada <ko1@atdot.net>
-Fri Dec 6 19:33:39 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * iseq.c (Init_ISeq): remove definition of the following methods:
+ ISeq#line_trace_all and ISeq#line_trace_specify because they are
+ half baked.
+ C APIs are remained as experimental. These functions will be
+ renamed, removed their parameters may be changed.
+ You can use these methods by C exts. Please give us your comments.
- * class.c (rb_extract_keywords, rb_get_kwargs): move from
- vm_insnhelper.c.
+Fri Dec 21 20:21:04 2012 Koichi Sasada <ko1@atdot.net>
-Fri Dec 6 19:18:02 2013 Koichi Sasada <ko1@atdot.net>
+ * vm_trace.c (tracepoint_new): add code to support specified thread.
+ But not tested and this feature is not supported officially.
- * gc.c: change oldmalloc meaning.
- Increase oldmalloc_increase with malloc_increase
- instead of using obj_memsize_of().
+Fri Dec 21 19:37:15 2012 Koichi Sasada <ko1@atdot.net>
- This change will avoid the danger of memory full without major GC.
+ * ruby.c (process_options): need to acquire env from TOPLEVEL_BINDING
+ each time.
+ `bind->env' may update after `eval()'.
+ [Bug #7536]
-Fri Dec 6 19:08:48 2013 Koichi Sasada <ko1@atdot.net>
+Fri Dec 21 18:46:50 2012 Koichi Sasada <ko1@atdot.net>
- * gc.c (atomic_sub_nounderflow): not 0 but val itself.
+ * include/ruby/debug.h, vm_core.h: define rb_trace_arg_t at
+ include/ruby/debug.h (move from vm_core.h).
-Fri Dec 6 18:37:11 2013 Koichi Sasada <ko1@atdot.net>
+Fri Dec 21 17:48:15 2012 Koichi Sasada <ko1@atdot.net>
- * gc.c (rb_objspace_alloc, Init_heap): initialize
- oldmalloc_increase_limit at Init_heap.
+ * vm_core.h, vm_trace.c: fix multi-threading bug for tracing.
+ Move `trace_arg' from rb_tp_t::trace_arg to rb_thread_t::trace_arg.
+ `trace_arg' may changed by multiple threads.
+ rb_thread_t::trace_arg can represent rb_thread_t::trace_running
+ (null or non-null) and rb_thread_t::trace_running is removed.
+ After that, `rb_tp_t' is not needed to check tracing or not
+ (A running thread knows tracing or not). This is why I remove
+ tp_attr_check_active() and make new function get_trace_arg().
- rb_objspace_alloc() is not called on some platforms.
+ And this modification disable to work the following code:
+ TracePoint.trace{|tp|
+ Thread.new{p tp.event} # access `tp' from other threads.
+ }
+ I believe nobody mix threads at trace procedure.
+ This is current limitation.
+ [Bug #7590]
-Fri Dec 6 18:33:39 2013 Koichi Sasada <ko1@atdot.net>
+ * cont.c (fiber_switch, rb_cont_call): use rb_thread_t::trace_arg
+ instead of rb_thread_t::trace_running.
- * gc.c (garbage_collect_body): bug fix.
- initialize after recording.
+ * test/ruby/test_settracefunc.rb: add a multi-threading test.
-Fri Dec 6 17:49:46 2013 Koichi Sasada <ko1@atdot.net>
+Fri Dec 21 16:38:08 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c (atomic_sub_nounderflow): added to simplify atomic sub with
- care about underflow.
+ * template/id.h.tmpl (ID2ATTRSET): compile time constant macro for
+ ID_ATTRSET.
- * gc.c (objspace_malloc_increase): use it.
+ * defs/id.def (KeywordError): check duplication.
-Fri Dec 6 17:10:44 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * defs/id.def: support for other scope IDs,
+ ID_{INSTANCE,GLOBAL,CONST,CLASS}.
- * vm_insnhelper.c (rb_get_kwargs): get keyword argument values from an
- option hash, not only checking keys.
+Fri Dec 21 14:45:00 2012 Zachary Scott <zachary@zacharyscott.net>
- * dir.c (dir_initialize): use rb_get_kwargs.
+ * lib/irb.rb, lib/irb/*: Documentation for IRB
- * gc.c (gc_start_internal): ditto.
+Fri Dec 21 11:31:02 2012 Eric Hodel <drbrain@segment7.net>
-Fri Dec 6 16:47:45 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/rake/*: Updated to rake 0.9.6
+ * doc/rake/*: ditto
+ * test/rake/*: ditto
- * misc/ruby-mode.el (ruby-brace-to-do-end): split single line block.
+Fri Dec 21 08:56:34 2012 Masaya Tarui <tarui@ruby-lang.org>
- * misc/ruby-mode.el (ruby-do-end-to-brace): shrink single line block
- to one line.
+ * vm_trace.c (rb_suppress_tracing): remove unused variable 'vm_tracing'
-Fri Dec 6 16:16:30 2013 Koichi Sasada <ko1@atdot.net>
+Fri Dec 21 01:01:45 2012 Masaya Tarui <tarui@ruby-lang.org>
- * gc.c (gc_start_internal): do not use rb_gc_start() and rb_gc().
+ * lib/irb/completion.rb (CompletionProc): support completion of
+ instance variables. [ruby-dev:46710] [Bug #7520]
-Fri Dec 6 15:24:30 2013 Koichi Sasada <ko1@atdot.net>
+Thu Dec 20 20:58:25 2012 Masaya Tarui <tarui@ruby-lang.org>
- * gc.c (gc_start_internal, rb_gc): do not need
- heap_pages_free_unused_pages() here.
- It was done in after_sweep().
+ * vm_trace.c (rb_suppress_tracing): bugfix for vm->trace_running
+ counter. And if tracing is already true, vm_trace_running ops is
+ skipped to control overflow.
- * gc.c (rb_gc): The reason is now GPR_FLAG_CAPI.
+Thu Dec 20 18:29:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Dec 6 14:05:19 2013 Aman Gupta <ruby@tmm1.net>
+ * include/ruby/ruby.h (RTEST, NIL_P): make bare expressions without
+ outermost parentheses.
- * 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.
+Thu Dec 20 17:29:00 2012 Shugo Maeda <shugo@ruby-lang.org>
-Fri Dec 6 11:51:28 2013 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
+ * NEWS: fix the description for Refinements.
- * lib/erb.rb: [DOC] fix broken link, Use rubygems.org and www.ruby-toolbox.com instead of RAA.
- [Bug #9197]
+Thu Dec 20 16:53:59 2012 Shugo Maeda <shugo@ruby-lang.org>
-Fri Dec 6 10:50:54 2013 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
+ * vm_core.h (rb_vm_defineclass_type_t),
+ compile.c (iseq_compile_each), insns.def (defineclass): change the
+ meaning of the third operand of defineclass as follows:
+ lower 3bits: the type of the defineclass
+ 0 = class, 1 = singleton class, 2 = module
+ 4th bit: a flag represents whether the defineclass is scoped
+ 0 = not scoped (e.g., class Foo)
+ 1 = scoped (e.g., class Bar::Baz)
+ 5th bit: a flag represents whether the superclass is specified
+ 0 = not specified (e.g., class Foo)
+ 1 = specified (e.g., class Bar < Foo)
+ If the superclass is specified and is not a class, a TypeError
+ should be raised. [ruby-dev:46747] [Bug #7572]
- * lib/webrick/httprequest.rb: [DOC] Fix broken link of CGI specification by @udzura [fix GH-466]
+ * test/ruby/test_class.rb: related test.
-Thu Dec 6 01:27:00 2013 Kenta Murata <mrkn@mrkn.jp>
+Thu Dec 20 16:52:37 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * 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]
+ * NEWS: announce AEAD encryption support in the OpenSSL extension.
- * test/bigdecimal/test_bigdecimal.rb: add tests case for the above change.
+Thu Dec 20 16:40:13 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * test/bigdecimal/test_bigdecimal_util.rb: ditto.
+ * gc.c (nonspecial_obj_id): VALUE is not compatible with Fixnum on
+ LLP64 platform, such as 64bit Windows.
+ reported by Heesob Park at [ruby-core:50255] [Bug #7454], and the
+ fix is suggested by akr.
-Thu Dec 5 22:18:01 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Dec 20 16:39:04 2012 Martin Bosslet <Martin.Bosslet@gmail.com>
- * 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]
+ * ext/openssl/ossl_cipher.c: fix errors for installations that do not
+ feature Authenticated Encryption.
+ * ext/openssl/extconf.rb: detect presence of EVP_CTRL_GCM_GET_TAG to
+ determine whether Authenticated Encryption can be used.
+ [Feature #6980] [ruby-core:47426]
-Thu Dec 5 21:53:29 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Dec 20 15:55:46 2012 Martin Bosslet <Martin.Bosslet@gmail.com>
- * array.c (rb_ary_or): lhs elements are preferred, so should not
- replace with rhs elements.
+ * ext/openssl/ossl.c: do not use FIPS_mode_set if not available.
+ * test/openssl/utils.rb: revise comment about setting FIPS mode to
+ false.
+ * test/openssl/test_fips.rb: remove tests that cause errors on
+ ruby-ci.
+ [Feature #6946] [ruby-core:47345]
- * test/ruby/test_array.rb (test_OR_in_order): import the test failed
- by r43969 from rubyspec/core/array/union_spec.rb.
+Thu Dec 20 15:22:59 2012 Eric Hodel <drbrain@segment7.net>
-Thu Dec 5 21:05:42 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/rdoc/parser/ruby.rb: Ignore methods defined on constants to
+ prevent modules with the names of constants from appearing in the
+ documentation.
+ * test/rdoc/test_rdoc_parser_ruby.rb: Test for the above.
- * gc.c (gc_info_decode): fix to avoid syntax error on VS2012.
+Thu Dec 20 15:00:33 2012 Martin Bosslet <Martin.Bosslet@gmail.com>
-Thu Dec 5 19:35:35 2013 Martin Duerst <duerst@it.aoyama.ac.jp>
+ * ext/openssl/ossl_cipher.c: add support for Authenticated Encryption
+ with Associated Data (AEAD) for OpenSSL versions that support the
+ GCM encryption mode. It's the only mode supported for now by OpenSSL
+ itself. Add Cipher#authenticated? to detect whether a chosen mode
+ does support Authenticated Encryption.
+ * test/openssl/test_cipher.rb: add tests for Authenticated Encryption.
+ [Feature #6980] [ruby-core:47426] Thank you, Stephen Touset for
+ providing a patch!
- * st.c: tweaked comment
+Thu Dec 20 12:56:53 2012 Eric Hodel <drbrain@segment7.net>
-Thu Dec 5 19:21:10 2013 Aman Gupta <ruby@tmm1.net>
+ * lib/rdoc/markup/to_html.rb (class RDoc): Added current heading and
+ top links to headings.
+ * lib/rdoc/generator/template/darkfish/rdoc.css: ditto
+ * test/rdoc/test_rdoc_generator_markup.rb: Test for above
+ * test/rdoc/test_rdoc_markup_to_html.rb: ditto
- * 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
+ * test/rdoc/test_rdoc_comment.rb: Removed trailing whitespace.
- * gc.c (gc_stat_internal): raise TypeError on wrong type
- * gc.c (gc_stat): fix error message
+Thu Dec 20 11:05:26 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Dec 5 18:18:08 2013 Aman Gupta <ruby@tmm1.net>
+ * test/ruby/envutil.rb (assert_valid_syntax): move from
+ test_syntax.rb.
- * 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
+ * test/ruby/envutil.rb (assert_normal_exit): validate syntax before
+ running because this assertion passes even if the code fails by
+ SyntaxError.
-Thu Dec 5 17:44:53 2013 Koichi Sasada <ko1@atdot.net>
+Thu Dec 20 10:29:58 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * gc.c: change function names vm_ prefix to objspace_ prefix.
- They are objspace_ functionality.
+ * test/openssl/test_pkey_dh.rb: revert special treatment of
+ FIPS-capable installations since FIPS mode is now disabled for the
+ tests.
-Thu Dec 5 16:11:04 2013 Aman Gupta <ruby@tmm1.net>
+Thu Dec 20 10:23:12 2012 Martin Bosslet <Martin.Bosslet@gmail.com>
- * 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
+ * ext/openssl/ossl.c: add OpenSSL.fips_mode= to allow enabling FIPS
+ mode manually.
+ * test/openssl/utils.rb: turn off FIPS mode for tests. This prevents
+ OpenSSL installations with FIPS mode enabled by default from raising
+ FIPS-related errors during the tests.
+ * test/openssl/test_fips.rb: add tests for FIPS-capable OpenSSL
+ installations.
+ [Feature #6946] [ruby-core:47345]
-Thu Dec 5 14:40:41 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Dec 20 06:59:52 2012 Koichi Sasada <ko1@atdot.net>
- * hash.c (rb_hash): revert r43981 and bail out to the outermost frame
- when recursion is detected.
+ * vm.c: support variable VM/Machine stack sizes.
+ Specified by the following environment variables:
+ - RUBY_THREAD_VM_STACK_SIZE: vm stack size used at thread creation.
+ default: 128KB (32bit CPU) or 256KB (64bit CPU).
+ - RUBY_THREAD_MACHINE_STACK_SIZE: machine stack size used at thread
+ creation. default: 512KB or 1024KB.
+ - RUBY_FIBER_VM_STACK_SIZE: vm stack size used at fiber creation.
+ default: 64KB or 128KB.
+ - RUBY_FIBER_MACHINE_STACK_SIZE: machine stack size used at fiber
+ creation. default: 256KB or 256KB.
+ This values are specified at launched timing. You can not change
+ these values at running time.
+ Environ variables are only *hints* because:
+ - They are aligned to 4KB.
+ - They have minimum values (depend on OSs).
+ - Machine stack settings are ignored by some OSs.
+ Default values especially fiber stack sizes are increased.
+ This change affect Fiber's behavior:
+ (1) You can run more complex program on a Fiber.
+ (2) You can not make many (thousands) Fibers because of
+ lack of address space (on 32bit CPU).
+ If (2) bothers you,
+ (a) Use 64bit CPU with big memory, or
+ (b) Specify RUBY_FIBER_(VM|MACHINE)_STACK_SIZE correctly.
+ You need to choose correct stack size carefully. These values
+ are completely rely on systems (OS/compiler and so on).
+ [Feature #4614], [Bug #7212]
-Thu Dec 5 13:47:15 2013 Koichi Sasada <ko1@atdot.net>
+ * vm_core.h (rb_vm_t::default_params): add to record above settings.
- * gc.c (vm_malloc_size): added.
- return malloc_usable_size() if possible.
+ * vm.c (RubyVM::DEFAULT_PARAMS): add new constant to see
+ above setting.
- * 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.
+ * thread_pthread.c: support RUBY_THREAD_MACHINE_STACK_SIZE.
- * gc.c (vm_xmalloc, vm_xrealloc, vm_xfree): use vm_malloc_size()
- to detect collect allocated size.
+ * cont.c: support RUBY_FIBER_(VM|MACHINE)_STACK_SIZE.
- * gc.c (vm_malloc_increase): refactoring.
+ * test/ruby/test_fiber.rb: add tests for above.
-Thu Dec 5 13:19:03 2013 Aman Gupta <ruby@tmm1.net>
+ * test/ruby/test_thread.rb: ditto.
- * 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 20 06:25:44 2012 Koichi Sasada <ko1@atdot.net>
-Thu Dec 5 10:47:56 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/ruby/test_fiber.rb: remove a strange single quote character.
+ With this character, this script exits by SyntaxError.
- * ruby_atomic.h (ATOMIC_PTR_EXCHANGE): atomic exchange function for
- a generic pointer.
+Thu Dec 20 01:03:00 2012 Zachary Scott <zachary@zacharyscott>
-Thu Dec 5 10:47:09 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/.document: Add missing ext modules to .document
+ Patch by Ryunosuke SATO [Fixes Github #224]
- * 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]
+Wed Dec 19 23:52:16 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Thu Dec 5 09:07:59 2013 Aman Gupta <ruby@tmm1.net>
+ * ruby.c (load_file_internal): use original C string as the filename
+ for parser.
+ reported by whiteleaf at [ruby-list:49085] [ruby-dev:46738]
+ [Bug #7562]
- * 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 19 23:36:12 2012 Naohisa Goto <ngotogenome@gmail.com>
-Wed Dec 4 13:02:13 2013 Aman Gupta <ruby@tmm1.net>
+ * marshal.c (marshal_dump, marshal_load): fix SEGV during make rdoc
+ and test failure in TestMarshal#test_gc and test_context_switch
+ on SPARC Solaris 10 compiled with Oracle Solaris Studio 12.3.
+ [Bug #7591] [ruby-dev:46772]
- * 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 19 19:34:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Dec 4 12:57:24 2013 Aman Gupta <ruby@tmm1.net>
+ * object.c (rb_mod_const_get): nul byte is invalid as constant name.
- * 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 19 17:54:18 2012 Masaya Tarui <tarui@ruby-lang.org>
-Wed Dec 4 12:47:54 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_trace.c (rb_threadptr_exec_event_hooks): get rid of race
+ condition. [Bug #7589] [ruby-dev:46763]
- * lib/delegate.rb (Delegator#method_missing): ignore the target if not
- set, and delegate to global methods. [ruby-core:58572] [Bug #9155]
+Wed Dec 19 16:30:28 2012 Eric Hodel <drbrain@segment7.net>
- * lib/delegate.rb (Delegator#respond_to_missing): ditto.
+ * doc/syntax/literals.rdoc: Added 0d decimal format. Thanks Nobu!
- * lib/delegate.rb (SimpleDelegator#__getobj__): yield and return if
- not delegated but a block is given, like as Hash#fetch.
+Wed Dec 19 16:19:36 2012 Eric Hodel <drbrain@segment7.net>
- * lib/delegate.rb (DelegateClass#__getobj__): ditto.
+ * doc/syntax/methods.rdoc: Fixed typo. Thanks to Josh Susser.
-Tue Dec 3 23:48:18 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Dec 19 16:18:22 2012 Eric Hodel <drbrain@segment7.net>
- * configure.in: check malloc_size() availability.
+ * lib/rubygems/commands/query_command.rb: Refactored to improve
+ maintainability.
+ * test/rubygems/test_gem_commands_query_command.rb: Note default gems
+ in gem list details.
- * gc.c: use malloc_size() with malloc/malloc.h if available.
+ * lib/rubygems/uninstaller.rb: Detect all gems for uninstallation.
+ This allows duplicate installs of default gems to be removed.
+ * lib/rubygems/specification.rb: Allow use of ::each_spec.
+ * lib/rubygems/test_case.rb: Added install_default_gems.
+ * test/rubygems/test_gem_commands_uninstall_command.rb: Moved test
+ down to the uninstaller tests.
+ * test/rubygems/test_gem_uninstaller.rb: Test for uninstallation of
+ default gems and duplicate default gems.
-Tue Dec 3 23:06:20 2013 Narihiro Nakamura <authornari@gmail.com>
+Wed Dec 19 15:23:50 2012 Eric Hodel <drbrain@segment7.net>
- * object.c (rb_obj_clone): don't copy FL_WB_PROTECTED of a
- original object.
+ * doc/syntax/methods.rdoc: Add () around keyword arguments example for
+ consistency. Thanks to Josh Susser.
-Tue Dec 3 22:32:18 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Dec 19 01:51:24 2012 CHIKANAGA Tomoyuki <nagachika@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.
+ * vm.c (rb_vm_jump_tag_but_local_jump): remove unnecessary 2nd
+ argument.
- * hash.c (rb_hash): detect recursion for all `hash' methods. each
- `hash' methods no longer need to use rb_exec_recursive().
+ * load.c (rb_load_internal): ditto.
-Tue Dec 3 21:53:15 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * eval_intern.h (rb_vm_jump_tag_but_local_jump): ditto.
- * 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 18 18:57:58 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Tue Dec 3 20:18:46 2013 Narihiro Nakamura <authornari@gmail.com>
+ * io.c (rb_io_wait_writable): don't use rb_thread_wait_fd()
+ because it is for waiting until io readable.
- * object.c (rb_obj_clone): Protect FL_PROMOTED and FL_WB_PROTECTED
- flags of a destination object.
+ * io.c (rb_io_wait_writable): always use rb_thread_fd_writable()
+ instead of bare rb_wait_for_single_fd(). we shouldn't ignore
+ return value.
+ * io.c (rb_io_wait_readable): ditto. always use rb_thread_wait_fd().
-Tue Dec 3 20:16:38 2013 Masaki Matsushita <glass.saga@gmail.com>
+Tue Dec 18 18:55:33 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * array.c (rb_hash_rehash): use hash_alloc() instead of rb_hash_new(),
- to hide temporary object from ObjectSpace. [Bug #9187]
+ * thread.c (rb_thread_wait_fd_rw): fix infinite loop bug.
+ rb_wait_for_single_fd() never return positive number.
-Tue Dec 3 17:11:47 2013 Aman Gupta <ruby@tmm1.net>
+Tue Dec 18 17:24:40 2012 Eric Hodel <drbrain@segment7.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.
+ * lib/rdoc/encoding.rb: Do not remove #! line from document when
+ setting encoding. This allows ruby executables to be parsed as ruby
+ files.
+ * test/rdoc/test_rdoc_encoding.rb: Test for above.
-Tue Dec 3 17:01:45 2013 Aman Gupta <ruby@tmm1.net>
+ * lib/rdoc/parser.rb: Set the parser file name of ruby executables
+ correctly.
+ * test/rdoc/test_rdoc_parser.rb: Test for above.
+
+Tue Dec 18 16:46:15 2012 Eric Hodel <drbrain@segment7.net>
+
+ * doc/syntax/literals.rdoc: Used simplified heredoc example that
+ doesn't include method definition. Added heredoc with backticks.
+
+Tue Dec 18 16:38:51 2012 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rdoc/store.rb: Work around RDoc stores from older versions of
+ RDoc.
+ * test/rdoc/test_rdoc_store.rb: Test for above.
- * 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 18 16:31:20 2012 Eric Hodel <drbrain@segment7.net>
-Tue Dec 3 14:05:49 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * lib/rdoc/ruby_lex.rb: Return a TkHEREDOC instead of a TkSTRING when
+ the heredoc identifier is followed by a line-end. This allows proper
+ display of some HEREDOCs in source view.
+ * lib/rdoc/ruby_token.rb: Added TkHEREDOC
+ * test/rdoc/test_rdoc_ruby_lex.rb: Test for above.
+
+Tue Dec 18 09:45:14 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
+
+ * vm.c (rb_vm_make_jump_tag_but_local_jump): take care of the case
+ TAG_JUMP() with TAG_FATAL (ex. rb_fatal()). [ruby-core:50917]
+ [Bug #7570]
+
+ * test/ruby/test_fiber.rb (test_fatal_in_fiber): add a test for above.
+
+ * ext/-test-/fatal/extconf.rb, ext/-test-/fatal/rb_fatal.c: ditto.
+
+Tue Dec 18 13:17:00 2012 Zachary Scott <zachary@zacharyscott.net>
+
+ * vm_trace.c (tracepoint_attr_defined_class): Clean up rdoc for
+ TracePoint#defined_class
+
+Tue Dec 18 12:15:59 2012 Eric Hodel <drbrain@segment7.net>
- * array.c (rb_ary_uniq_bang): remove duplicate code.
+ * lib/rubygems/specification.rb: Fixed ruby output of requirements
+ with multiple version specifiers.
+ * test/rubygems/test_gem_ext_cmake_builder.rb: Only look for specific
+ lines in cmake output. Should fix [ruby-trunk - Bug #7579]
-Tue Dec 3 13:40:42 2013 Masaki Matsushita <glass.saga@gmail.com>
+Tue Dec 18 11:45:26 2012 Eric Hodel <drbrain@segment7.net>
- * array.c (ary_add_hash): set and return values because string keys
- will be frozen. [ruby-core:58809] [Bug #9202]
+ * doc/syntax/literals.rdoc: Added 0o octal integers.
- * array.c (rb_ary_uniq_bang): ditto.
+Tue Dec 18 12:28:52 2012 Martin Bosslet <Martin.Bosslet@gmail.com>
- * array.c (rb_ary_or): ditto.
+ * test/openssl/test_ssl.rb: Use :TLSv1_2_client explicitly in
+ test_tls_v1_2 to prevent upstream bug.
+ [Bug #7197] [ruby-dev:46240]
- * array.c (rb_ary_uniq): ditto.
+Tue Dec 18 11:52:34 2012 Martin Bosslet <Martin.Bosslet@gmail.com>
- * test/ruby/test_array.rb: tests for above.
+ * ext/openssl/lib/ssl.rb: Enable insertion of empty fragments as a
+ countermeasure for the BEAST attack by default. The default options
+ of OpenSSL::SSL:SSLContext are now:
+ OpenSSL::SSL::OP_ALL & ~OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS
+ [Bug #5353] [ruby-core:39673]
- The patch is from normalperson (Eric Wong).
+ * test/openssl/test_ssl.rb: Adapt tests to new SSLContext default.
-Tue Dec 3 12:20:21 2013 Aman Gupta <ruby@tmm1.net>
+ * NEWS: Announce the new default.
- * 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 18 06:36:12 2012 Koichi Sasada <ko1@atdot.net>
-Tue Dec 3 12:17:59 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * method.h: remove `VM_METHOD_TYPE_CFUNC_FRAMELESS' method type.
+ This method type is for optimized CFUNC such as Fixnum#+ and so on.
+ This feature is half-baked and no way to use them.
+ [Background]
+ Now, VM has opt_plus instructions to optimize `+' methods for
+ some Classes (such as Fixnum, Float (flonum)). We call this
+ type of instructions as `specialized instructions'.
+ This simple technique improve simple program dramatically.
+ However, we can make specialized instructions for only several
+ types (classes) and selectors (method names) because a large
+ instruction will be slow. In other words, this technique has no
+ extensibility.
+ To overcome this problem, VM_METHOD_TYPE_CFUNC_FRAMELESS was
+ introduced (r37198). This type is a variant of CFUNC, but called
+ their functions directly without building a method frame.
+ Any CFUNC method can be defined as frameless methods if a method
+ is not needed to make method frame. Frameless methods are faster
+ as specialized instructions (a bit slower, but no need to care).
+ No problem described at
+ http://charlie.bz/blog/why-do-singleton-methods-make-ruby-slow
+ because this technique doesn't see class, but see method body
+ itself. Alias is also no problem.
+ [Problem]
+ However, we can't set frameless method type for polymorphic methods
+ such as Array#[]. Necessity for method frame depends on which
+ parameter type. For example, Fixnum#+ needs method frame if
+ coerce is needed. Current VM_METHOD_TYPE_CFUNC_FRAMELESS is not
+ flexible and need more tuning to introduce it.
+ Expected behavior of frameless method type may be:
+ result = optimized_cfunc(params); /* call optimized cfunc */
+ if (result == Qundef) { result = normal_cfunc(); }
+ This is why I say this feature is half-baked.
+ We need to learn primitive method in Smalltalk more.
+ (I heard this name at RubyConf Taiwan this month. Thanks!)
+ [Conclusion]
+ I remove this feature and consider again.
+ This feature goes to next minor (2.1?).
+ Nobody may use this feature and there is no compatibility issue.
- * lib/rdoc/constant.rb (RDoc::Constant#documented?): workaround for
- NoMethodError when the original of alias is not found.
+ * proc.c (rb_method_entry_arity): ditto.
-Tue Dec 3 10:43:58 2013 Eric Hodel <drbrain@segment7.net>
+ * vm_eval.c, vm_insnhelper.c, vm_method.c: ditto.
- * 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 18 04:58:22 2012 Koichi Sasada <ko1@atdot.net>
-Tue Dec 3 09:42:27 2013 Eric Hodel <drbrain@segment7.net>
+ * vm_trace.c (fill_id_and_klass): TracePoint#defined_class returns
+ singleton class. `set_trace_func' passed attached class (which is
+ attached/modified by singleton class) by 6th block parameter if it
+ is singleton class. Previous behavior follows this spec.
+ However, this method named `defined_class' should return singleton
+ class directly because singleton methods are defined in singleton
+ class. There are no compatible issue because TracePoint is introduced
+ after 2.0.
+ But compatibility with `set_trace_func' is broken. This means that
+ you can not replace all `set_trace_func' code with TracePoint
+ without consideration of this behavior.
+ [Bug #7554]
- * lib/rdoc: Update to RDoc master 900de99. Changes include:
+ * test/ruby/test_settracefunc.rb: change a test to catch up
+ an above change.
- Fixed documentation display of constants
+Tue Dec 18 03:03:10 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- Fixed handling of unknown parsers
+ * ext/psych/lib/psych/visitors/to_ruby.rb: speed up node mapping so
+ common cases are evaluated first. Thanks Kevin Menard!
- * test/rdoc: ditto.
+Tue Dec 18 02:35:00 2012 Zachary Scott <zachary@zacharyscott.net>
-Mon Dec 2 22:30:10 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * lib/optparse.rb: Remove 'developer documentation' section from rdoc
+ Patch by Marcus Stollsteimer [ruby-core:50526][Bug #7504]
- * hash.c (getenv): fixed test failures introduced by r43950.
- [ruby-core:58774] [Bug #9195] reported by phasis68 (Heesob Park).
+Tue Dec 18 02:35:00 2012 Zachary Scott <zachary@zacharyscott.net>
-Mon Dec 2 21:49:19 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * lib/matrix.rb (#lup): typo in example [ruby-core:50946][Bug #7582]
- * hash.c (rb_hash_rehash): make temporary st_table under the control
- of GC. [Bug #9187]
+Mon Dec 17 18:03:34 2012 Charlie Somerville <charlie@charliesomerville.com>
- * test/ruby/test_hash.rb: add a test for above.
+ * class.c (rewrite_cref_stack, clone_method): rewrite a method's cref
+ stack when cloning into a new class to allow lexical const lookup to
+ work as expected [ruby-core:47834] [Bug #7107]
+ * test/ruby/test_class.rb (class TestClass): related test
-Mon Dec 2 17:23:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+Mon Dec 17 13:56:55 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * 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]
+ * io.c (io_flush_buffer_sync2): avoid to return 0. because
+ rb_thread_call_without_gvl2 uses 0 internally.
+ * io.c (io_flush_buffer_async2): adapt the above.
-Mon Dec 2 14:16:52 2013 Eric Hodel <drbrain@segment7.net>
+Mon Dec 17 12:05:32 2012 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.
+ * doc/syntax/methods.rdoc: Added a description of singleton methods.
-Mon Dec 2 05:52:33 2013 Eric Hodel <drbrain@segment7.net>
+Mon Dec 17 11:35:57 2012 Eric Hodel <drbrain@segment7.net>
- * lib/rubygems: Update to RubyGems master baa965b. Notable changes:
+ * doc/.document: Added doc/syntax
- Copy directories to lib/ when installing extensions. This completes
- the fix for [ruby-trunk - Bug #9106]
+Mon Dec 17 11:25:32 2012 Eric Hodel <drbrain@segment7.net>
- * test/rubygems: ditto.
+ * doc/syntax.rdoc: Added syntax guide table of contents
+ * doc/syntax/exceptions.rdoc: Syntax guide for exceptions
+ * doc/syntax/literals.rdoc: Syntax guide for literals
+ * doc/syntax/methods.rdoc: Syntax guide for methods
-Mon Dec 2 02:03:47 2013 Shota Fukumori <her@sorah.jp>
+Mon Dec 17 07:59:40 2012 Eric Hodel <drbrain@segment7.net>
- * test/ruby/test_case.rb (test_nomethoderror):
- Add test related to r43913, r43914
+ * lib/rubygems.rb: Updated VERSION
-Mon Dec 2 00:53:01 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * test/rubygems/test_gem_installer.rb: Fixed ambiguous first argument
+ warning.
- * hash.c (getenv): use ANSI codepage version of getenv() for miniruby
- on Windows.
- [ruby-core:58732] [Bug #9189] reported by phasis68 (Heesob Park).
+ * test/rubygems/test_gem_rdoc.rb: RDoc generation depends on installed
+ version of RDoc.
-Sun Dec 1 22:14:27 2013 Zachary Scott <e@zzak.io>
+Sun Dec 16 02:04:41 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * 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.
+ * signal.c (rb_sigaltstack_size): cast sysconf() return value
+ explicitly. Fix compile error on Mac OS X.
-Sun Dec 1 18:03:26 2013 Zachary Scott <e@zzak.io>
+Sun Dec 16 00:39:43 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
- * doc/maintainers.rdoc: [DOC] Current maintainers of Ruby
+ * cont.c (rb_fiber_start): don't enqueue Qnil to async_errinfo_queue.
+ rb_vm_make_jump_tag_but_local_jump() could return Qnil (ex. when
+ finished by Thread.exit). [ruby-dev:45218] [Bug #5993]
-Sun Dec 1 17:17:36 2013 Zachary Scott <e@zzak.io>
+ * test/ruby/test_fiber.rb (test_exit_in_fiber): add test for it.
- * doc/contributing.rdoc: [DOC] Current branch maintainers
+Sat Dec 15 23:56:51 2012 Naohisa Goto <ngotogenome@gmail.com>
-Sun Dec 1 17:16:36 2013 Zachary Scott <e@zzak.io>
+ * ext/fiddle/pointer.c (rb_fiddle_ptr2cptr): fix error message
+ forgotten to be changed from DL to Fiddle.
- * doc/contributing.rdoc: [DOC] Reporting other (ruby-lang.org) issues
+Sat Dec 15 23:14:32 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sun Dec 1 17:15:51 2013 Zachary Scott <e@zzak.io>
+ * signal.c (default_handler): remove rb_register_sigaltstack()
+ call. sigaltstack was already registered when creating threads.
- * doc/contributing.rdoc: [DOC] Current platform maintainers
+Sat Dec 15 23:08:56 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sun Dec 1 17:14:55 2013 Zachary Scott <e@zzak.io>
+ * signal.c (rb_sigaltstack_size): new. calculate stack size for
+ sigsegv handler. enlarge value when x86 or x86_64 on Linux.
+ Linux has very small MINSIGSTKSZ size (2048 bytes) and
+ our sigsegv routine need 5KiB at least. [Bug #7141]
+ * internal.h: add declaration of rb_sigaltstack_size().
+ * vm_core.h: remove ALT_STACK_SIZE definition.
- * doc/contributing.rdoc: [DOC] Reporting downstream distro issues
+ * signal.c (rb_register_sigaltstack): replace ALT_STACK_SIZE with
+ rb_sigaltstack_size();
+ * gc.c (Init_heap): ditto.
+ * vm.c (th_init): ditto.
-Sun Dec 1 14:37:20 2013 Masaki Matsushita <glass.saga@gmail.com>
+Sat Dec 15 18:24:21 2012 Tadayoshi Funaba <tadf@dotrb.org>
- * hash.c (rb_hash_to_a): specify array capa.
+ * rational.c (f_round_common): should check overflow.
-Sun Dec 1 14:15:36 2013 Masaki Matsushita <glass.saga@gmail.com>
+Sat Dec 15 18:00:00 2012 Tadayoshi Funaba <tadf@dotrb.org>
- * hash.c (rb_hash_rehash): fix to free new st_table when exception
- is raised in do_hash(). [Bug #9187]
+ * rational.c (float_rationalize): reduced.
-Sun Dec 1 11:57:59 2013 Zachary Scott <e@zzak.io>
+Sat Dec 15 14:18:44 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * ext/openssl/lib/openssl/buffering.rb: Fix warning in copyright
+ * io.c (finish_writeconv): uses rb_write_internal2 if
+ fptr->write_lock have.
-Sun Dec 1 08:27:28 2013 Eric Hodel <drbrain@segment7.net>
+Sat Dec 15 13:57:08 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * lib/rubygems: Update to RubyGems master 66e5c39. Notable changes:
+ * thread.c (rb_mutex_owned_p): remove static.
+ * io.c (io_flush_buffer): don't hold mutex if already have.
+ Now recursive lock may occur when following scenario.
+ fptr_finalize -> finish_writeconv_sync -> finish_writeconv
+ -> io_fflush.
- Implement gem.deps.rb (Gemfile) .lock support
+Sat Dec 15 13:38:30 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- Fixed `gem uninstall` for a relative directory in GEM_HOME.
+ * io.c (io_flush_buffer): uses io_flush_buffer_async2 instead of
+ io_flush_buffer_async.
+ * io.c (io_flush_buffer_async2): new helper function for
+ io_flush_buffer. It uses rb_thread_call_without_gvl2() instead
+ of rb_thread_io_blocking_region.
+ * io.c (io_flush_buffer_sync2): new helper function for
+ io_flush_buffer_async2.
- * test/rubygems: ditto.
+Sat Dec 15 13:04:26 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sun Dec 1 06:00:49 2013 Aman Gupta <ruby@tmm1.net>
+ * io.c (internal_write_func2): new helper function for rb_write_internal2().
+ * io.c (rb_write_internal2): new function. it uses
+ rb_thread_call_without_gvl2() instead of rb_thread_io_blocking_region().
+ * io.c (rb_binwrite_string): uses rb_write_internal2 instead of
+ rb_write_internal. [Bug #7134]
- * test/ruby/test_gc.rb (test_gc_reason): Force minor GC by consuming
- free slots to fix test.
+Sat Dec 15 12:55:29 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sat Nov 30 21:22:11 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * io.c (rb_io_wait_writable): add to call rb_thread_wait_fd()
+ likes rb_io_wait_readable.
- * dir.c (dir_initialize): check unknown keywords. [ruby-dev:47152]
- [Bug #8060]
+Sat Dec 15 11:54:50 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sat Nov 30 18:05:38 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * io.c (rb_io_wait_writable): don't call rb_thread_fd_writable()
+ when EINTR. EINTR mean signal interrupt was happen. We don't
+ need any wait.
- * 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 Dec 15 11:53:36 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sat Nov 30 17:46:35 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * thread.c (rb_thread_wait_fd_rw): remove silly rb_thread_alone()
+ check.
- * 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 Dec 15 10:22:38 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Nov 30 16:25:14 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * thread.c (rb_thread_polling): revert but deprecate.
- * 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]
+ * include/ruby/intern.h (rb_thread_polling): deprecate.
-Sat Nov 30 13:28:13 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Dec 15 08:37:01 2012 Masaya Tarui <tarui@ruby-lang.org>
- * siphash.c (sip_hash24): fix for aligned word access little endian
- platforms. [ruby-core:58658] [Bug #9172]
+ * test/rubygems/test_gem_ext_cmake_builder.rb (test_self_build):
+ get rid of false positive.
-Sat Nov 30 13:21:15 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Dec 15 08:05:56 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * vm_eval.c (rb_yield_block): implement non-nil block argument.
+ * test/ruby/test_thread.rb (test_uninitialized, test_backtrace,
+ test_thread_timer_and_interrupt, test_thread_join_in_trap,
+ test_thread_join_current, test_thread_join_main_thread,
+ test_main_thread_status_at_exit, test_thread_status_in_trap,
+ test_thread_status_raise_after_kill, test_mutex_owned,
+ test_mutex_owned2): move these tests from TestThreadGroup class
+ to TestThread because they are not thread group tests.
-Fri Nov 29 20:59:39 2013 Masaya Tarui <tarui@ruby-lang.org>
+ * test/ruby/test_thread.rb (test_thread_status_raise_after_kill):
+ add t.join.
- * 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.
+ * test/ruby/test_threadgroup.rb: new file. moved ThreadGroup test
+ from test_thread.rb.
-Fri Nov 29 20:43:57 2013 Masaya Tarui <tarui@ruby-lang.org>
+Sat Dec 15 08:02:11 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * 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.
+ * test/ruby/test_thread.rb (TestThread::Thread::new.): remove
+ th.abort_on_exception change. Test template shouldn't change
+ global flag. It prevent to test a normal case.
-Fri Nov 29 18:06:45 2013 Shota Fukumori <her@sorah.jp>
+Sat Dec 15 06:15:14 2012 Eric Hodel <drbrain@segment7.net>
- * test/ruby/test_case.rb (test_method_missing): Test for r43913.
+ * configure.in (HAVE_GCC_ATOMIC_BUILTINS): Set -march=i486 to enable
+ __sync_val_compare_and_swap. Patch by KOSAKI Motohiro.
+ [ruby-trunk - Bug #7485]
-Fri Nov 29 17:53:22 2013 Shota Fukumori <her@sorah.jp>
+Sat Dec 15 03:42:34 2012 Naohisa Goto <ngotogenome@gmail.com>
- * vm_insnhelper.c (check_match): Fix SEGV with VM_CHECKMATCH_TYPE_CASE
- and class of `pattern` has `method_missing`
- [Bug #8872] [ruby-core:58606]
+ * ext/.document: add fiddle/pointer.c, fiddle/handle.c, and
+ fiddle/win32/lib as documentation.
-Fri Nov 29 17:06:09 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Dec 15 03:06:40 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * vm_eval.c (rb_yield_block): yield block with rb_block_call_func
- arguments.
+ * file.c (rb_file_flock): use rb_thread_wait_for() instead of
+ rb_thread_polling(). When getting EAGAIN, we need to wait a
+ while even if no multi threading.
+ * thread.c (sleep_for_polling, rb_thread_polling) removed.
- * range.c (range_each): use rb_yield_block.
+Sat Dec 15 00:03:31 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * include/ruby/ruby.h (RB_BLOCK_CALL_FUNC_ARGLIST): constify argv.
+ * signal.c (rb_f_kill): remove rb_thread_polling() because this
+ has no good effect and makes meaningless 100ms delay. 1)
+ when sending signal to another process, waiting has just silly.
+ 2) when sending signal to current process, 100ms is often not
+ enough time to wait. It depend on kernel behavior. And,
+ rb_thread_polling() doesn't make sense anyway. When rb_thread_alone()
+ is true, it doesn't wait at all and Process.kill() users don't
+ expect threading changes Process.kill() behavior. [Bug #7560]
- * enum.c (rb_enum_values_pack): ditto.
+Fri Dec 14 17:10:57 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * vm_eval.c (rb_block_call, rb_check_block_call): ditto.
+ * parse.y (parser_params): parser_tokline to track the line number at
+ which token started. [ruby-dev:46737] [Bug #7559]
- * include/ruby/ruby.h (RB_BLOCK_CALL_FUNC_ARGLIST): for declaration
- argument list of rb_block_call_func.
+ * parse.y (fcall): operation with starting line number.
-Fri Nov 29 11:26:43 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * parse.y (command, primary, method_call): point method name line.
- * include/ruby/ruby.h (rb_block_call_func): add blockarg. block
- function can take block argument, e.g., proc {|&blockarg| ...}.
+ * parse.y (gettable_gen): return token line for __LINE__.
-Thu Nov 28 21:43:48 2013 Zachary Scott <e@zzak.io>
+Fri Dec 14 16:56:59 2012 Shugo Maeda <shugo@ruby-lang.org>
- * doc/dtrace_probes.rdoc: [DOC] Import dtrace probes doc from wiki
+ * vm_insnhelper.c (vm_call_super_method): remove volatile introduced
+ in r38365.
-Thu Nov 28 21:17:32 2013 Zachary Scott <e@zzak.io>
+ * vm_insnhelper.c (vm_call_method): use __forceinline to prevent
+ VC++ to make vm_call_general and vm_call_super_method as the same
+ method. Thanks, Heesob Park. [Bug #7556] [ruby-core:50867]
- * 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.
+Fri Dec 14 14:59:14 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Nov 28 21:16:18 2013 Zachary Scott <e@zzak.io>
+ * test/ruby/envutil.rb (Test::Unit::Assertions#assert_separately):
+ take file and line by using caller_locations if not given.
- * doc/contributing.rdoc: [DOC] Add coding style heading for patch
- rules
+ * test/ruby/envutil.rb (Test::Unit::Assertions#assert_separately):
+ count assertions in separated tests.
-Thu Nov 28 21:15:45 2013 Zachary Scott <e@zzak.io>
+Fri Dec 14 14:16:42 2012 Eric Hodel <drbrain@segment7.net>
- * doc/contributing.rdoc: [DOC] Add notes about deciding what to patch
+ * lib/rdoc/rubygems_hook.rb: Fixed generation of documentation.
+ Disabled rdoc generation by default to match RubyGems defaults.
+ Reduced diff with RubyGems::RDoc.
+ * test/rdoc/test_rdoc_rubygems_hook.rb: Tests for the above.
+ * test/rubygems/test_gem_rdoc.rb: ditto.
-Thu Nov 28 19:43:45 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * lib/rdoc/store.rb: Removed useless variable assignment
- * benchmark/bm_hash_flatten.rb: added. r43896 is about 4 times faster
- than 2.0.0p353.
+Fri Dec 14 13:58:40 2012 Eric Hodel <drbrain@segment7.net>
- * benchmark/bm_hash_keys.rb: added. r43896 is about 5 times faster
- than 2.0.0p353.
+ * lib/rubygems/commands/rdoc_command.rb: When overwriting
+ documentation, remove existing documentation first.
- * benchmark/bm_hash_values.rb: added. r43896 is about 5 times faster
- than 2.0.0p353.
+ * lib/rubygems/server.rb: Fixed documentation links.
+ * test/rubygems/test_gem_server.rb: Test for the above.
-Thu Nov 28 19:29:04 2013 Zachary Scott <e@zzak.io>
+ * lib/rubygems/rdoc.rb: Reduced diff with RDoc::RubyGemsHook
+ * test/rubygems/test_gem_rdoc.rb: ditto
- * doc/contributing.rdoc: [DOC] Add notes about slideshow proposals
- from wiki page: HowToRequestFeatures
+Fri Dec 14 04:08:05 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Thu Nov 28 17:34:42 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * test/ruby/envutil.rb (Test::Unit::Assertions#assert_separately):
+ added to execute given test source on separate process,
+ catch its resulted exception and raise it on main process.
- * st.c: add st_values() and st_values_check().
+Fri Dec 14 07:43:44 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * include/ruby/st.h: add prototypes for above.
+ * ext/psych/lib/psych/visitors/yaml_tree.rb: quote strings that begin
+ with non-word characters. Thanks Alex Tambellini!
+ * test/psych/test_yaml.rb: appropriate test case
- * hash.c (rb_hash_values): use st_values_check() for performance
- improvement if VALUE and st_data_t are compatible.
+Thu Dec 13 23:14:17 2012 Shugo Maeda <shugo@ruby-lang.org>
-Thu Nov 28 17:14:14 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * vm_insnhelper.c (vm_call_super_method): a workaround for the
+ failure of TestRefinement#test_refine_recursion in Windows.
+ See [ruby-core:50871] for details.
- * st.c (st_keys): fix not to use Qundef in st.c.
+Thu Dec 13 23:10:52 Charlie Somerville <charlie@charliesomerville.com>
- * include/ruby/st.h: define modified prototype.
+ * object.c (Init_Object): use rb_mod_init_copy for Class#initialize_copy
+ * class.c (rb_class_init_copy): rename to class_init_copy_check, performs type
+ checks on arguments to prevent reinitialization of initialized class
+ [ruby-core:50869] [Bug #7557]
+ * class.c (rb_mod_init_copy): use class_init_copy_check if receiver is T_CLASS
+ * test/ruby/test_class.rb (class TestClass): related test
- * hash.c (rb_hash_keys): use modified st_keys().
+Thu Dec 13 16:53:10 2012 Eric Hodel <drbrain@segment7.net>
-Thu Nov 28 16:34:43 2013 Aman Gupta <ruby@tmm1.net>
+ * lib/rdoc/class_module.rb: Fixed duplicate comments for classes and
+ modules from C.
+ * test/rdoc/test_rdoc_class_module.rb: Test for the above.
- * 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.
+ * lib/rdoc/parser/c.rb: Reload C variable names to allow proper
+ updates of an ri store for C files.
+ * lib/rdoc/rdoc.rb: ditto.
+ * lib/rdoc/store.rb: ditto.
+ * test/rdoc/test_rdoc_parser_c.rb: Test for the above.
+ * test/rdoc/test_rdoc_store.rb: ditto.
-Thu Nov 28 16:15:47 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Dec 13 14:20:00 2012 Zachary Scott <zachary@zacharyscott.net>
- * win32/win32.c (rb_w32_dup2): extract from rb_cloexec_dup2() and
- redirect_dup2().
+ * lib/irb*: merge doc from doc/irb/ird.rd and improve overall
+ documentation of IRB
+ * doc/irb/irb.rd: remove stale documentation
-Tue Nov 28 14:40:00 2013 Akira Matsuda <ronnie@dio.jp>
+Thu Dec 13 14:10:00 2012 Shugo Maeda <shugo@ruby-lang.org>
- * lib/drb/ssl.rb: [Doc] Fix typo
+ * marshal.c (r_entry0): don't taint classes and modules because
+ Marshal.load just returns the dumped classes and modules.
+ [Bug #7325] [ruby-core:49198]
-Thu Nov 28 13:56:05 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/ruby/test_marshal.rb: related test.
- * common.mk (Doxyfile): tool/file2lastrev.rb needs running with
- BASERUBY since r43617. [ruby-dev:47823] [Bug #9169]
+Thu Dec 13 14:10:13 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Thu Nov 28 09:18:39 2013 Koichi Sasada <ko1@atdot.net>
+ * test/ruby/test_require.rb (TestRequire#test_loaded_features_encoding):
+ need to check compatibility, not equality of encodings.
- * 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 Dec 13 14:02:15 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Thu Nov 28 01:35:08 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * file.c (rb_file_join): check encoding compatibility before joining
+ strings.
- * st.c (st_keys): fix to use st_index_t for size of hash.
+Thu Dec 13 13:06:27 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Nov 28 00:36:52 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * proc.c (umethod_bind): allow another form of method transplanting
+ from a module via UnboundMethod. [ruby-core:34267][Feature #4254]
- * st.c (st_keys): define st_keys(). it writes each key to buffer.
+Thu Dec 13 12:07:25 2012 Shugo Maeda <shugo@ruby-lang.org>
- * hash.c (rb_hash_keys): use st_keys() for performance improvement
- if st_data_t and VALUE are compatible.
+ * include/ruby/ruby.h (RB_UNUSED_VAR): new macro to suppress
+ warnings for unused variables.
- * include/ruby/st.h: define macro ST_DATA_COMPATIBLE_P() to predicate
- whether st_data_t and passed type are compatible.
+ * ext/bigdecimal/bigdecimal.c (ENTER): use RB_UNUSED_VAR() to
+ suppress annoying warnings by -Wunused-but-set-variable in gcc 4.6.
- * configure.in: check existence of builtin function to use in
- ST_DATA_COMPATIBLE_P().
+Thu Dec 13 11:22:33 2012 Koichi Sasada <ko1@atdot.net>
-Thu Nov 28 00:07:28 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * method.h: remove "VM_METHOD_TYPE__MAX" from rb_method_type_t.
+ rb_method_type_t is not a number and "_MAX" causes misunderstanding.
- * ruby_atomic.h: remove duplicate definitions between ATOMIC_XXX
- and ATOMIC_SIZE_XXX.
+ * proc.c (rb_method_entry_arity): ditto.
-Wed Nov 27 23:55:50 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * vm_eval.c (vm_call0_body): ditto.
- * ruby_atomic.h: define ATOMIC_SIZE_CAS() with
- __atomic_compare_exchange_n() and refactoring.
+ * vm_insnhelper.c (vm_call_method): ditto.
-Tue Nov 27 21:43:00 2013 Akira Matsuda <ronnie@dio.jp>
+Wed Dec 12 21:40:45 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/irb/notifier.rb: [Doc] Fix typo
- * ext/json/lib/json/common.rb: Ditto.
+ * lib/tmpdir.rb (Dir::Tmpname#create): deal with a prefix name which
+ starts with tilde as a plain name, not expanding as home directory.
+ [ruby-core:50793] [Bug #7547]
-Tue Nov 27 18:04:57 2013 Akira Matsuda <ronnie@dio.jp>
+Wed Dec 12 19:48:59 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * lib/irb/notifier.rb: Fix typo
+ * ext/json: merge JSON 1.7.5.
+ fix tests and other fixes.
-Wed Nov 27 17:54:57 2013 Koichi Sasada <ko1@atdot.net>
+Wed Dec 12 18:30:29 2012 Shugo Maeda <shugo@ruby-lang.org>
- * gc.c (gc_mark_stacked_objects): check only when check_mode > 0.
+ * class.c (rb_prepend_module): move refined methods from the origin
+ of a class to the class, because refinements should have priority
+ over prepended modules.
-Wed Nov 27 16:07:19 2013 Aman Gupta <ruby@tmm1.net>
+ * test/ruby/test_refinement.rb: related test.
- * test/ruby/test_gc.rb (class TestGc): Fix warning in
- test_expand_heap.
+Wed Dec 12 18:27:09 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Nov 27 15:55:52 2013 Aman Gupta <ruby@tmm1.net>
+ * time.c (zone_str): lookup or insert by using st_update() at once.
- * 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 Dec 12 15:30:11 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Wed Nov 27 15:21:17 2013 Aman Gupta <ruby@tmm1.net>
+ * configure.in: add -fno-omit-frame-pointer if libexecinfo is used.
+ At least on FreeBSD ruby will crash on getting C backtrace
+ when it is compiled with other than -O0.
- * 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.
+ * vm_dump.c: enable backtrace on FreeBSD even if with optimizations.
-Wed Nov 27 15:12:55 2013 Koichi Sasada <ko1@atdot.net>
+Wed Dec 12 16:08:04 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c (gc_page_sweep): disable debug print.
+ * test/rdoc/test_rdoc_rdoc.rb (TestRDocRDoc#test_normalized_file_list_non_file_directory):
+ use File::NULL for portability if possible.
-Wed Nov 27 15:05:59 2013 Koichi Sasada <ko1@atdot.net>
+Wed Dec 12 16:07:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c (gc_stat): add new information heap_eden_page_length and
- heap_tomb_page_length.
+ * method.h (rb_method_flag_t): name a magic number for NOEX_SAFE and
+ NOEX_WITH as NOEX_SAFE_SHIFT_OFFSET.
- * 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).
+ * method.h (rb_method_type_t, method_optimized_type): C89 forbids a
+ comma after the last element in enum.
-Wed Nov 27 15:02:53 2013 Aman Gupta <ruby@tmm1.net>
+ * proc.c (rb_method_entry_arity), vm_eval.c (vm_call0_body),
+ vm_insnhelper.c (vm_call_method): add VM_METHOD_TYPE__MAX case.
- * 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 Dec 12 14:16:35 2012 Eric Hodel <drbrain@segment7.net>
-Wed Nov 27 14:50:02 2013 Eric Hodel <drbrain@segment7.net>
+ * lib/rdoc/class_module.rb: Added RDoc::ClassModule#documented? which
+ checks comment_location. Hide RDoc::ClassModule#comment=.
+ * test/rdoc/test_rdoc_class_module.rb: Test for above.
- * lib/rinda/ring.rb: Announce RingServer for the same process.
- [ruby-trunk - Bug #9163]
- * test/rinda/test_rinda.rb: Tests for the above.
+ * lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml:
+ Fix display of the table of contents in the sidebar.
-Wed Nov 27 14:37:33 2013 Aman Gupta <ruby@tmm1.net>
+ * lib/rdoc/generator/template/darkfish/table_of_contents.rhtml:
+ Use #comment_location when displaying classes or modules.
- * 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]
+ * test/rdoc/test_rdoc_store.rb: Use comment_location.
-Wed Nov 27 14:24:55 2013 Aman Gupta <ruby@tmm1.net>
+Wed Dec 12 13:40:52 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * 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.
+ * vm_insnhelper.c (vm_getivar): no uninitialized instance variables
+ warnings for non-object if attr method.
-Wed Nov 27 10:39:39 2013 Aman Gupta <ruby@tmm1.net>
+Wed Dec 12 06:43:37 2012 Benoit Daloze <eregontp@gmail.com>
- * gc.c: Rename rb_heap_t members:
- used -> page_length
- limit -> total_slots
+ * iseq.c (rb_iseq_parameters): fix limit for optional arguments.
-Wed Nov 27 08:24:49 2013 Aman Gupta <ruby@tmm1.net>
+ * test/ruby/test_keyword.rb: tests for above.
- * 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.
+ * vm_core.h (struct rb_iseq_struct): update documentation
+ with keyword arguments. [Bug #7540] [ruby-core:50735]
-Wed Nov 27 07:13:54 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+Wed Dec 12 03:45:41 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/psych/lib/psych.rb: psych version 2.0.2
- * ext/psych/psych.gemspec: ditto
+ * vm.c (vm_exec): pass exceptions while handling an exception.
-Wed Nov 27 06:40:18 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+ * vm_trace.c (rb_threadptr_exec_event_hooks): propagate exceptions.
+ revert r38293 partially.
- * 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
+Wed Dec 12 03:09:05 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Nov 27 04:46:55 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+ * sample/test.rb (Progress#initialize): add --verbose option and show
+ messages in one line unless --verbose is given.
- * 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
+Wed Dec 12 01:47:02 2012 Shugo Maeda <shugo@ruby-lang.org>
-Wed Nov 27 02:26:58 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * eval.c (rb_using_refinement): make the method table of an iclass
+ for a refinement that of the refinement, not that of the origin of
+ the refinement, which is set by rb_include_class_new(). This
+ change is needed to make module prepend into a refinement work
+ properly.
- * string.c (str_new4): copy the original capacity so that memsize of
- frozen shared string returns correct size.
+ * test/ruby/test_refinement.rb: related test.
-Wed Nov 27 02:20:13 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Dec 12 01:05:04 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * array.c (rb_ary_hash): should not ignore the rest of recursive
- constructs.
+ * tool/make-snapshot: add --disable-rubygem to both MINIRUBY and RUBY.
+ On making miniprelude.c, it seems use MINIRUBY. this fixes #7541
+ but rubygems also needs to be fixed for older rubies.
- * hash.c (rb_hash_hash): ditto.
+Wed Dec 12 00:32:11 2012 Naohisa Goto <ngotogenome@gmail.com>
- * range.c (range_hash): ditto.
+ * test/dl/test_func.rb (test_name_with_block, test_bind, test_qsort1):
+ call unbind to release the callback closure because maximum number
+ of callbacks is limited to DL::MAX_CALLBACK (== 5) with pure DL
+ without Fiddle.
- * struct.c (rb_struct_hash): ditto.
+Wed Dec 12 00:13:34 2012 Naohisa Goto <ngotogenome@gmail.com>
- * test/-ext-/test_recursion.rb (TestRecursion): separate from
- test/ruby/test_thread.rb.
+ * ext/dl/lib/dl/func.rb (DL::Function#unbind, #bound?): suppress
+ NoMethodError when Fiddle is available. [ruby-core:50756] [Bug #7543]
+ * test/dl/test_func.rb (test_bound*, test_unbind*): tests for the above.
-Tue Nov 26 22:43:36 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Dec 11 19:38:37 2012 Naohisa Goto <ngotogenome@gmail.com>
- * hash.c (rb_hash): cut off if recursion detected to get rid of stack
- overflow. [ruby-core:58567] [Bug #9151]
+ * ext/fiddle/function.c (Fiddle::Function.new): new keyword argument
+ :name to set the name attribute.
+ * ext/fiddle/lib/fiddle/import.rb (import_function, bind_function):
+ set function name by using the :name keyword argument.
+ Re-fixes r38243. [ruby-core:50566]
+ * test/fiddle/test_function.rb (test_name): test for the :name keyword
+ argument and Fiddle::Function#name.
-Tue Nov 26 20:02:39 2013 Koichi Sasada <ko1@atdot.net>
+Tue Dec 11 16:57:33 2012 Eric Hodel <drbrain@segment7.net>
- * test/ruby/test_settracefunc.rb: add tests for a_call/a_return
- by Brandur <brandur@mutelight.org> [Feature #9120]
+ * common.mk: Added --pages-dir to rdoc creation. Now doc/ items show
+ up at top-level.
+ * .document: Moved doc/* entries to doc/.document
+ * doc/.document: ditto
-Tue Nov 26 19:29:52 2013 Koichi Sasada <ko1@atdot.net>
+Tue Dec 11 16:44:37 2012 Eric Hodel <drbrain@segment7.net>
- * common.mk: add useful config "set breakpoint pending on"
- for run.gdb.
+ * lib/rdoc/options.rb: Added --page-dir option for moving pages in
+ doc/ to the top-level.
+ * lib/rdoc/rdoc.rb: ditto.
+ * test/rdoc/test_rdoc_options.rb: Test for the above.
+ * test/rdoc/test_rdoc_rdoc.rb: ditto.
-Tue Nov 26 19:17:47 2013 Koichi Sasada <ko1@atdot.net>
+Tue Dec 11 15:24:05 2012 Eric Hodel <drbrain@segment7.net>
- * ext/objspace/object_tracing.c (newobj_i): skip class_path if class
- is frozen.
+ * ext/pathname/lib/pathname.rb: Hide private methods from RDoc.
- rb_class_path() can modify frozen classes (and causes errors).
- This patch is temporary. We need no-modification/no-allocation
- class path function.
+Tue Dec 11 15:11:29 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Tue Nov 26 18:12:13 2013 Koichi Sasada <ko1@atdot.net>
+ * tool/make-snapshot (BASERUBY): add --disable-gem to avoid load gems.
+ [Bug #7541] [ruby-core:50736]
- * vm_trace.c: skip "exception check" and "reentrant check (only normal
- events) for internal events.
+Tue Dec 11 12:00:19 2012 NARUSE, Yui <naruse@ruby-lang.org>
- Reentrant check for internal events are remaining.
+ * ext/dl/win32/extconf.rb: Fix typo
+ by Santiago Pastorino <santiago@wyeworks.com>
+ https://github.com/ruby/ruby/pull/221 fix GH-221
-Tue Nov 26 17:38:16 2013 Koichi Sasada <ko1@atdot.net>
+Tue Dec 11 01:53:37 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
- * vm_trace.c: prohibit to specify normal events and internal events
- simultaneously.
- I will introduce special care for internal events later.
+ * lib/matrix: alias {row|column}_size to {row|column}_count and use
+ the latter.
+ [Bug #7369] [ruby-core:49409]
- * ext/-test-/tracepoint/tracepoint.c: test this behavior.
+Tue Dec 11 00:26:58 2012 Shugo Maeda <shugo@ruby-lang.org>
- * test/-ext-/tracepoint/test_tracepoint.rb: ditto.
+ * fix the behavior when a module is included into a refinement.
+ This change is a little tricky, so it might be better to prohibit
+ module inclusion to refinements.
-Tue Nov 26 16:30:31 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * include/ruby/ruby.h (RMODULE_INCLUDED_INTO_REFINEMENT): new flag
+ to represent that a module (iclass) is included into a refinement.
- * 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]
+ * class.c (include_modules_at): set RMODULE_INCLUDED_INTO_REFINEMENT
+ if klass is a refinement.
-Tue Nov 26 14:23:17 2013 Aman Gupta <ruby@tmm1.net>
+ * eval.c (rb_mod_refine): set the superclass of a refinement to the
+ refined class for super.
- * 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.
+ * eval.c (rb_using_refinement): skip the above superclass (the
+ refined class) when creating iclasses for refinements. Otherwise,
+ `using Refinement1; using Refinement2' creates iclasses:
+ <Refinement2> -> <RefinedClass> -> <Refinement1> -> RefinedClass,
+ where <Module> is an iclass for Module, so RefinedClass is
+ searched before Refinement1. The correct iclasses should be
+ <Refinement2> -> <Refinement1> -> RefinedClass.
-Tue Nov 26 11:43:19 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * vm_insnhelper.c (vm_search_normal_superclass): if klass is an
+ iclass for a refinement, use the refinement's superclass instead
+ of the iclass's superclass. Otherwise, multiple refinements are
+ searched by super. For example, if a refinement Refinement2
+ includes a module M (i.e., Refinement2 -> <M> -> RefinedClass,
+ and if refinements iclasses are <Refinement2> -> <M>' ->
+ <Refinement1> -> RefinedClass, then super in <Refinement2> should
+ use Refinement2's superclass <M> instead of <Refinement2>'s
+ superclass <M>'.
- * 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
+ * vm_insnhelper.c (vm_search_super_method): do not raise a
+ NotImplementError if current_defined_class is a module included
+ into a refinement. Because of the change of
+ vm_search_normal_superclass(), the receiver might not be an
+ instance of the module('s iclass).
- * configure.in: check existence of __atomic functions.
+ * test/ruby/test_refinement.rb: related test.
-Tue Nov 26 10:57:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Dec 10 18:35:25 2012 Shugo Maeda <shugo@ruby-lang.org>
- * ext/bigdecimal/bigdecimal.gemspec: revert Gem::Specification#date
- for snapshot/release tarballs.
+ * vm_method.c (rb_method_entry_without_refinements): use
+ rb_resolve_refined_method() to search superclasses if
+ me->def->orig_me is 0. This change fixes make test-all
+ TESTS="json ruby/test_refinement.rb".
-Tue Nov 26 06:42:50 2013 Aman Gupta <ruby@tmm1.net>
+ * test/ruby/test_refinement.rb: related test.
- * NEWS: Add ObjectSpace.after_gc_{start,end}_hook=
- * ext/objspace/objspace_dump.c: [DOC] catch up dump/dump_all to r43679
+Mon Dec 10 17:59:07 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Tue Nov 26 04:12:10 2013 Eric Hodel <drbrain@segment7.net>
+ * ext/fiddle/win32/*: library ports from DL to Fiddle.
- * lib/rubygems: Update to RubyGems master 612f85a. Notable changes:
+ * ext/dl/win32/extconf.rb: check fiddle. often case dl compiled prior
+ to fiddle, so this change is no meaning. in most cases, simply
+ fiddle/win32 overwrite dl/win32.
- Fixed installation and activation of git: and path: gems via
- Gem.use_gemdeps
+Mon Dec 10 15:23:35 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- Improved documentation coverage
+ * vm_trace.c (rb_threadptr_exec_event_hooks): exceptions in event
+ hooks should not propagate outside.
- * test/rubygems: ditto.
+Mon Dec 10 15:11:06 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Nov 25 22:23:03 2013 Zachary Scott <e@zzak.io>
+ * compile.c (iseq_compile_each): count flip-flop state in local iseq
+ not in each iseqs, so that the keys can be other than hidden
+ strings. [ruby-core:47253] [Bug #6899]
- * lib/xmlrpc.rb: [DOC] Fix link to xmlrpc4r site [Bug #9148]
- Patch by Giorgos Tsiftsis
+ * vm_insnhelper.c (lep_svar_get, lep_svar_set, vm_getspecial): store
+ flip-flop states in an array instead of a hash.
-Mon Nov 25 19:48:10 2013 Zachary Scott <e@zzak.io>
+ * iseq.c (set_relation): main iseq also can has local scope.
- * 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.
+Mon Dec 10 10:36:12 2012 Narihiro Nakamura <authornari@gmail.com>
-Mon Nov 25 14:34:42 2013 Zachary Scott <e@zzak.io>
+ * lib/irb/magic-file.rb: set a encoding, which is detected from
+ the file to read, to the internal encoding.
+ [Bug #4281][ruby-dev:43036]
- * ext/bigdecimal/bigdecimal.gemspec: bump BigDecimal to 1.2.3 for
- proper release date in RubyGems
+Mon Dec 10 09:40:19 2012 Eric Hodel <drbrain@segment7.net>
-Mon Nov 25 14:25:08 2013 Zachary Scott <e@zzak.io>
+ * lib/rubygems/ext/cmake_builder.rb: Added a builder for cmake.
+ * lib/rubygems/ext.rb: ditto.
+ * lib/rubygems/installer.rb: ditto.
+ * test/rubygems/test_gem_ext_cmake_builder.rb: Test for above.
- * ext/bigdecimal/bigdecimal.gemspec: Remove Gem::Specification#date
- We should rely on rubygems to create the date the gem was released
- for each version.
+Mon Dec 10 09:13:08 2012 Eric Hodel <drbrain@segment7.net>
-Mon Nov 25 06:53:30 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/rubygems/package.rb: Omit directories when packaging gems like
+ RubyGems 1.8.x
+ * test/rubygems/test_gem_package.rb: Test for above.
- * internal.h: do not use ruby_sized_xrealloc() and ruby_sized_xfree()
- if HAVE_MALLOC_USABLE_SIZE (or _WIN32) is defined.
+Sun Dec 9 17:36:59 2012 Shugo Maeda <shugo@ruby-lang.org>
- We don't need these function if malloc_usable_size() is available.
+ * vm_insnhelper.c (vm_call_opt_send): Kernel#send should not use
+ refinements.
- * gc.c: catch up this change.
+ * proc.c (mnew): Kernel#method, Kernel#public_method,
+ Module#instance_method, and Module#public_instance_method should
+ not use refinements.
- * gc.c: define HAVE_MALLOC_USABLE_SIZE on _WIN32.
+ * vm_method.c (rb_method_boundp): Kernel#respond_to? should not use
+ refinements.
- * 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.
+ * test/ruby/test_refinement.rb: related test.
- * string.c (rb_str_resize): ditto.
+Sun Dec 9 06:19:04 2012 Eric Hodel <drbrain@segment7.net>
-Mon Nov 25 05:05:04 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/rdoc/markdown/entities.rb: Added documentation.
- * test/-ext-/tracepoint/test_tracepoint.rb: catch up GC.stat changes
- at r43835.
+ * lib/rdoc/parser/ruby.rb: Updated style
-Mon Nov 25 04:45:59 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/rdoc/ruby_lex.rb: Parse characters up to \u{FFFFF}
+ * test/rdoc/test_rdoc_ruby_lex.rb: Test for above.
- * gc.c: continue to change OLDSPACE -> OLDMALLOC.
- RGENGC_ESTIMATE_OLDSPACE -> RGENGC_ESTIMATE_OLDMALLOC.
+Sat Dec 8 22:38:35 2012 Shugo Maeda <shugo@ruby-lang.org>
- * gc.c: add a new major GC reason GPR_FLAG_MAJOR_BY_OLDMALLOC.
+ * eval.c (rb_mod_refine): don't override Module#include. It's
+ unnecessary now because refinements are activated only in refine
+ blocks.
-Mon Nov 25 04:16:09 2013 Koichi Sasada <ko1@atdot.net>
+Sat Dec 8 22:33:26 2012 Shugo Maeda <shugo@ruby-lang.org>
- * 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()
+ * eval.c: remove Module#refinements.
-Mon Nov 25 04:03:12 2013 Koichi Sasada <ko1@atdot.net>
+ * test/ruby/test_refinement.rb: remove tests for Module#refinements.
- * 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
+Sat Dec 8 13:17:55 2012 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
+ * eval.c (top_using): raise a RuntimeError if using is called in a
+ module definition or a method definition.
- Quote from RDoc of GC.stat():
- "The contents of the hash are implementation specific and may
- be changed in the future."
+ * test/ruby/test_refinement.rb: related test.
- * test/ruby/test_gc.rb: catch up this change.
+Sat Dec 8 15:01:35 2012 Eric Hodel <drbrain@segment7.net>
-Mon Nov 25 03:59:45 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/rubygems/commands/cleanup_command.rb: Skip default gems when
+ cleaning up.
+ * test/rubygems/test_gem_commands_cleanup_command.rb: Test for above.
- * test/ruby/test_gc.rb: catch up last commit.
- Now RUBY_GC_OLDSPACE_LIMIT(...) is RUBY_GC_OLDMALLOC_LIMIT(...).
+ * lib/rubygems/commands/query_command.rb: Fixed listing remote gems.
-Mon Nov 25 03:10:46 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/rubygems/dependency_installer.rb: Ignore non-files when looking
+ for local gems.
+ * test/rubygems/test_gem_dependency_installer.rb: Test for above.
- * gc.c: change terminology OLDSPACE -> OLDMALLOC.
- (oldspace -> oldmalloc for variable names)
+ * lib/rubygems/uninstaller.rb: The user must confirm uninstalling gems
+ that have dependencies.
+ * test/rubygems/test_gem_uninstaller.rb: Test for above.
- 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.
+ * lib/rubygems.rb (module Gem): Updated version.
-Mon Nov 25 00:50:03 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * test/rubygems/*.pem: Updated to run in FIPS mode.
+ * test/rubygems/test_gem_security.rb: ditto.
+ * test/rubygems/test_gem_security_signer.rb: ditto.
- * internal.h: use __builtin_bswap16() if possible.
+Sat Dec 8 12:34:01 2012 Shugo Maeda <shugo@ruby-lang.org>
- * configure.in: check existence of __builtin_bswap16().
+ * vm_insnhelper.c (vm_search_normal_superclass): super in a
+ refinement always uses the refined class as its superclass.
-Sun Nov 24 22:24:19 2013 Tanaka Akira <akr@fsij.org>
+ * test/ruby/test_refinement.rb: related test.
- * bignum.c (bigxor_int): Apply BIGLO for long in a BDIGIT expression.
- (bigor_int): Ditto.
- (bigand_int): Ditto.
+Sat Dec 8 11:59:59 2012 Shugo Maeda <shugo@ruby-lang.org>
-Sun Nov 24 18:13:23 2013 Tanaka Akira <akr@fsij.org>
+ * eval.c (rb_mod_refine): raise an ArgumentError if a given
+ block is of a Proc object.
- * include/ruby/defines.h (SIZEOF_ACTUAL_BDIGIT): Defined.
+ * vm_insnhelper.c (vm_call_method): store refined methods in inline
+ cache to improve performance. It's safe now because blocks cannot
+ be yielded with different refinements in the new specification.
- * include/ruby/ruby.h (RBIGNUM_EMBED_LEN_MAX): Use
- SIZEOF_ACTUAL_BDIGIT instead of SIZEOF_BDIGITS.
- SIZEOF_BDIGITS can be different to sizeof(BDIGIT).
+ * test/ruby/test_refinement.rb: related test.
-Sun Nov 24 13:49:08 2013 Tanaka Akira <akr@fsij.org>
+Sat Dec 8 11:17:53 2012 Shugo Maeda <shugo@ruby-lang.org>
- * include/ruby/defines.h: Don't use int128_t for Bignum.
- It's not always faster.
+ * eval.c (rb_mod_refine), vm_eval.c (rb_yield_refine_block):
+ Module#refine activates all refinements defined in that module
+ only in a given block.
- * bignum.c: Ditto.
+ * string.c (sym_to_proc, sym_call): don't use refinements.
-Sun Nov 24 10:18:15 2013 Aman Gupta <ruby@tmm1.net>
+ * test/ruby/test_refinement.rb: related test.
- * NEWS: Add details about new debugging features and APIs.
+Sat Dec 8 09:24:42 2012 Eric Hodel <drbrain@segment7.net>
-Sun Nov 24 09:37:20 2013 Andrew Vit <andrew@avit.ca>
+ * ext/openssl/ossl_x509name.c: Completed documentation for
+ OpenSSL::X509::Name.
- * lib/csv.rb: Optimize header hashes by freezing string keys.
- [ruby-core:58510]
+Sat Dec 8 07:57:12 2012 Koichi Sasada <ko1@atdot.net>
-Sun Nov 24 09:18:06 2013 Aman Gupta <ruby@tmm1.net>
+ * ext/objspace/objspace.c (iow_size): return size of internal object
+ for ObjectSpace.memsize_of().
- * 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/).
+ * test/objspace/test_objspace.rb: add a test.
-Sun Nov 24 08:38:00 2013 Kyle Stevens <kstevens715@gmail.com>
+Tue Dec 08 02:39:23 2012 James Edward Gray II <james@graysoftinc.com>
- * 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.
+ * lib/csv.rb: A fix for row comparison by Stephen Wattam. [Bug #7528]
-Sun Nov 24 01:03:00 2013 Kenta Murata <mrkn@mrkn.jp>
+Sat Dec 8 01:27:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/bigdecimal/bigdecimal.c (BigDecimal_power): Use FIX2LONG instead
- of FIX2INT to avoid conversion error.
+ * lib/test/unit.rb (Test::Unit::Runner#_run_parallel): no need to
+ check all reports.
-Sun Nov 24 00:44:30 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Dec 8 00:10:34 2012 Shugo Maeda <shugo@ruby-lang.org>
- * include/ruby/ruby.h (RBIGNUM_EMBED_LEN_MAX): define by macros
- defined in defines.h, instead of complex and repeated expression.
+ * vm_eval.c (yield_under, eval_under): do not activate refinements
+ of the receiver in module_eval and instance_eval.
-Sat Nov 23 22:22:26 2013 Tanaka Akira <akr@fsij.org>
+ * eval.c (ruby_Init_refinement): undef Class#refine.
- * include/ruby/ruby.h (RBIGNUM_EMBED_LEN_MAX): Limit the value to
- less than 8.
+ * eval.c (ruby_Init_refinement): remove Module#using.
-Sat Nov 23 19:52:00 2013 Kenta Murata <mrkn@mrkn.jp>
+ * eval.c (ruby_Init_refinement): main.using should be private.
- * ext/bigdecimal/lib/bigdecimal/math.rb (BigMath.E): Use BigMath.exp.
- [Feature #6857] [ruby-core:47130]
+ * eval.c (rb_mod_refine): the argument of Module#refine should not
+ be a module.
-Sat Nov 23 19:46:00 2013 Kenta Murata <mrkn@mrkn.jp>
+ * insns.def (defineclass): do not activate refinements in a class or
+ module.
- * 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]
+Fri Dec 7 23:42:11 2012 Shugo Maeda <shugo@ruby-lang.org>
-Sat Nov 23 19:20:00 2013 Kenta Murata <mrkn@mrkn.jp>
+ * ext/refinement/refinement.c: include ruby/ruby.h instead of the
+ declaration of rb_warn().
- * ext/bigdecimal/bigdecimal.c (BigDecimal_div2): The signature was
- changed to allow us to pass arguments directly.
+Fri Dec 7 16:07:00 2012 Zachary Scott <zachary@zacharyscott.net>
- * ext/bigdecimal/bigdecimal.c (BigDecimal_div3): Added for the role of
- the old BigDecimal_div2.
+ * doc/etc.rd: Removed stale documentation file
+ * ext/etc/etc.c: Merged documentation from doc/etc.rd and updated
+ rdoc, added documentation for Etc::Passwd and Etc::Group
-Sat Nov 23 12:31:00 2013 Koichi Sasada <ko1@atdot.net>
+Fri Dec 7 16:00:57 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * gc.c: fix global variable name.
- Now we have following environments (and related variable names).
+ * lib/test/unit.rb (Test::Unit::Runner#_run_parallel): no need to
+ retry skipped test. this fix makes 40% faster the whole test-all
+ with -j5 on Windows.
- * 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)
+Fri Dec 7 14:22:29 2012 Eric Hodel <drbrain@segment7.net>
- * obsolete
- * RUBY_FREE_MIN -> RUBY_GC_HEAP_FREE_SLOTS (from 2.1)
- * RUBY_HEAP_MIN_SLOTS -> RUBY_GC_HEAP_INIT_SLOTS (from 2.1)
+ * lib/rdoc/markup/to_joined_paragraph.rb: Completed documentation
+ * lib/rdoc/parser/c.rb: ditto
+ * lib/rdoc/parser/changelog.rb: ditto
+ * lib/rdoc/servlet.rb: ditto
+ * lib/rdoc/store.rb: ditto
- * RUBY_GC_MALLOC_LIMIT
- * RUBY_GC_MALLOC_LIMIT_MAX (new from 2.1)
- * RUBY_GC_MALLOC_LIMIT_GROWTH_FACTOR (new from 2.1)
+ * lib/rdoc/store.rb: Improved HTML error page. Completed
+ documentation
- * 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)
+ * lib/rdoc/parser/ruby.rb: Fixed bug attaching a comment to A::B = 42
+ * test/rdoc/test_rdoc_parser_ruby.rb: Test for above
- * test/ruby/test_gc.rb: catch up this change.
+ * test/rdoc/test_rdoc_comment.rb: Removed garbage
-Sat Nov 23 09:45:49 2013 Aman Gupta <ruby@tmm1.net>
+Fri Dec 7 14:03:59 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * marshal.c (w_object): Use HASH_PROC_DEFAULT directly from internal.h
+ * lib/timeout.rb (Timeout#timeout): since async_interrupt_timing
+ re-raises a deferred exception, replace the timeout exception with
+ Timeout::Error after it. [Bug #7503]
-Sat Nov 23 08:43:23 2013 Aman Gupta <ruby@tmm1.net>
+Fri Dec 7 13:07:00 2012 Zachary Scott <zachary@zacharyscott.net>
- * gc.c: Rename heap_pages_swept_num to heap_pages_swept_slots to
- clarify meaning (number of slots, not pages).
+ * doc/forwardable.rd: Remove stale documentation file
+ * lib/forwardable.rb: Merge documentation from doc/forwardable.rd
-Sat Nov 23 08:23:23 2013 Aman Gupta <ruby@tmm1.net>
+Fri Dec 7 09:47:35 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * lib/set.rb (class SortedSet): Fix source_location for methods
- defined via eval.
+ * time.c (time_mdump): dump timezone string to private instance variable
+ on marshaling.
-Sat Nov 23 03:44:03 2013 Eric Hodel <drbrain@segment7.net>
+ * time.c (time_mload): load timezone string from private instance
+ variable named 'zone'.
- * lib/rubygems: Update to RubyGems master dcce4ff. Important changes
- in this commit:
+Fri Dec 7 01:15:07 2012 Naohisa Goto <ngotogenome@gmail.com>
- Remove automatic detection of gem dependencies files. This prevents a
- security hole as described in [ruby-core:58490]
+ * ext/fiddle/lib/fiddle/function.rb (Fiddle::Function#name): new
+ attribute needed to switch Win32::Registry from DL to Fiddle.
- Fixed bugs for installing git gems.
+ * ext/fiddle/lib/fiddle/import.rb (import_function, bind_function):
+ set function name to the returned Fiddle::Function object.
- * test/rubygems: ditto.
+Fri Dec 7 00:11:44 2012 Shugo Maeda <shugo@ruby-lang.org>
-Fri Nov 22 22:30:00 2013 Kenta Murata <mrkn@mrkn.jp>
+ * test/ruby/test_refinement.rb: fix some tests to use neither
+ Module#using nor Module#module_eval.
- * ext/bigdecimal/bigdecimal.c (BigDecimal_power):
- Round the result value only if the precision is given.
+Thu Dec 6 23:27:50 2012 Shugo Maeda <shugo@ruby-lang.org>
-Fri Nov 22 17:20:50 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * eval.c (ruby_Init_refinement): a new function to enable
+ Refinements with a warning "Refinements are experimental...".
- * transcode.c (str_transcode0): don't scrub invalid chars if
- str.encode doesn't have explicit invalid: :replace.
- workaround fix for see #8995
+ * ext/refinement/refinement.c, ext/refinement/extconf.rb: a new
+ extension library to enable Refinements.
-Fri Nov 22 17:11:26 2013 Narihiro Nakamura <authornari@gmail.com>
+Thu Dec 6 18:23:05 2012 Shugo Maeda <shugo@ruby-lang.org>
- * include/ruby/intern.h, internal.h: Expose rb_gc_count().
+ * revised r37993 to avoid SEGV/ILL in tests. In r37993, a method
+ entry with VM_METHOD_TYPE_REFINED holds only the original method
+ definition, so ci->me is set to a method entry allocated in the
+ stack, and it causes SEGV/ILL. In this commit, a method entry
+ with VM_METHOD_TYPE_REFINED holds the whole original method entry.
+ Furthermore, rb_thread_mark() is changed to mark cfp->klass to
+ avoid GC for iclasses created by copy_refinement_iclass().
-Fri Nov 22 17:07:00 2013 Kenta Murata <mrkn@mrkn.jp>
+ * vm_method.c (rb_method_entry_make): add a method entry with
+ VM_METHOD_TYPE_REFINED to the class refined by the refinement if
+ the target module is a refinement. When a method entry with
+ VM_METHOD_TYPE_UNDEF is invoked by vm_call_method(), a method with
+ the same name is searched in refinements. If such a method is
+ found, the method is invoked. Otherwise, the original method in
+ the refined class (rb_method_definition_t::body.orig_me) is
+ invoked. This change is made to simplify the normal method lookup
+ and to improve the performance of normal method calls.
- * ext/bigdecimal/bigdecimal.gemspec: version 1.2.2.
+ * vm_method.c (EXPR1, search_method, rb_method_entry),
+ vm_eval.c (rb_call0, rb_search_method_entry): do not use
+ refinements for method lookup.
-Fri Nov 22 17:04:00 2013 Kenta Murata <mrkn@mrkn.jp>
+ * vm_insnhelper.c (vm_call_method): search methods in refinements if
+ ci->me is VM_METHOD_TYPE_REFINED. If the method is called by
+ super (i.e., ci->call == vm_call_super_method), skip the same
+ method entry as the current method to avoid infinite call of the
+ same method.
- * ext/bigdecimal/bigdecimal.c (BigDecimal_data_type):
- Use RUBY_TYPED_FREE_IMMEDIATELY only if it is available.
+ * class.c (include_modules_at): add a refined method entry for each
+ method defined in a module included in a refinement.
-Fri Nov 22 16:49:00 2013 Kenta Murata <mrkn@mrkn.jp>
+ * class.c (rb_prepend_module): set an empty table to
+ RCLASS_M_TBL(klass) to add refined method entries, because
+ refinements should have priority over prepended modules.
- * ext/bigdecimal/bigdecimal.c (BigDecimal_power): Round the result value.
- [Bug #8818] [ruby-core:56802]
+ * proc.c (mnew): use rb_method_entry_with_refinements() to get
+ a refined method.
- * test/bigdecimal/test_bigdecimal.rb: Add a test for the above fix.
+ * vm.c (rb_thread_mark): mark cfp->klass for iclasses created by
+ copy_refinement_iclass().
-Fri Nov 22 16:25:43 2013 Koichi Sasada <ko1@atdot.net>
+ * vm.c (Init_VM), cont.c (fiber_init): initialize th->cfp->klass.
- * gc.c (heap_set_increment): accept minimum additional page number.
+ * test/ruby/test_refinement.rb (test_inline_method_cache): do not skip
+ the test because it should pass successfully.
- * gc.c (gc_after_sweep): allocate pages to allocate at least
- RUBY_HEAP_MIN_SLOTS.
- [Bug #9137]
+ * test/ruby/test_refinement.rb (test_redefine_refined_method): new
+ test for the case a refined method is redefined.
-Fri Nov 22 16:19:52 2013 Narihiro Nakamura <authornari@gmail.com>
+Thu Dec 6 17:29:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * include/ruby/intern.h (rb_gc_set_params): Deprecate
- rb_gc_set_params because it's only used in ruby internal.
+ * parse.y (parser_here_document): flush string content between new
+ line and :string_embexpr. [ruby-core:48703] [Bug #7255]
- * internal.h (ruby_gc_set_params): Declare rb_gc_set_params's
- alias function.
+Thu Dec 6 16:35:21 2012 Eric Hodel <drbrain@segment7.net>
- * gc.c: ditto.
+ * test/rake/helper.rb: Load envutil correctly. Removed useless rescue
+ for signal propagation tests
+ * lib/rake/file_utils.rb: Prefer the built ruby.
+ * test/rake/test_rake_functional.rb: ditto
- * ruby.c: use ruby_gc_set_params.
+Thu Dec 6 15:20:34 2012 Eric Hodel <drbrain@segment7.net>
-Fri Nov 22 14:55:00 2013 Kenta Murata <mrkn@mrkn.jp>
+ * lib/rdoc/context.rb: Don't warn for duplicate methods while loading.
+ * test/rdoc/test_rdoc_context.rb: Test for above.
- * ext/bigdecimal/bigdecimal.c (BigMath_s_exp): Insert rb_thread_check_ints.
+Thu Dec 6 14:26:22 2012 Eric Hodel <drbrain@segment7.net>
-Fri Nov 22 14:35:00 2013 Kenta Murata <mrkn@mrkn.jp>
+ * lib/rubygems/command_manager.rb: Removed string concatenation
+ syntax. [Bug #6265]
+ * lib/rubygems/commands/install_command.rb: ditto
+ * lib/rubygems/commands/uninstall_command.rb: ditto
+ * lib/rubygems/indexer.rb: ditto
+ * lib/rubygems/security/policy.rb: ditto
+ * lib/rubygems/security.rb: ditto
+ * lib/rubygems/uninstaller.rb: ditto
+ * test/rubygems/test_gem_commands_cert_command.rb: ditto
+ * test/rubygems/test_gem_package.rb: ditto
+ * test/rubygems/test_gem_security.rb: ditto
+ * test/rubygems/test_gem_security_policy.rb: ditto
- * ext/bigdecimal/bigdecimal.c (BigMath_s_exp): Fix the inserting points
- of RB_GC_GUARDs.
+Thu Dec 6 14:10:08 2012 Eric Hodel <drbrain@segment7.net>
-Fri Nov 22 14:31:00 2013 Kenta Murata <mrkn@mrkn.jp>
+ * lib/rubygems/package.rb: Set rubygems_version before validation.
+ Fixes issue with bundler.
+ * test/rubygems/test_gem_package.rb: Test for above.
- * ext/bigdecimal/bigdecimal.c: Fix indentation.
+ * lib/rubygems/remote_fetcher.rb: Only update the cache when we have
+ permission. [ruby-trunk - Bug #7509]
+ * lib/rubygems/source.rb (class Gem): ditto
+ * test/rubygems/test_gem_remote_fetcher.rb: Test for above.
+ * lib/rubygems/test_utilities.rb: ditto
-Fri Nov 22 14:03:00 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * lib/rubygems/specification.rb: Derive base_dir properly for default
+ gems. [ruby-trunk - Bug #7496]
+ * test/rubygems/test_gem_specification.rb: Test for above.
- * ext/nkf: merge nkf 2.1.3 2a2f2c5.
+ * lib/rubygems.rb: Untaint Dir.pwd when searching for gemdeps files
+ for operation under $SAFE=1
-Fri Nov 22 12:43:52 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Dec 06 12:07:11 2012 Koichi Sasada <ko1@atdot.net>
- * util.c (ruby_strtod): ignore too long fraction part, which does not
- affect the result.
+ * vm_trace.c: TracePoint#enable should not cause an error
+ when it is already enabled. TracePoint#disable is too.
+ [ruby-core:50561] [ruby-trunk - Bug #7513]
-Fri Nov 22 12:17:14 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/ruby/test_settracefunc.rb: add tests.
- * ext/openssl/lib/openssl/buffering.rb (OpenSSL::Buffering#initialize):
- initialize of a module should pass arguments to super.
+Thu Dec 6 07:19:58 2012 Eric Hodel <drbrain@segment7.net>
-Fri Nov 22 12:02:58 2013 Tanaka Akira <akr@fsij.org>
+ * lib/rdoc*: Improved display of ChangeLog files as HTML.
+ * test/rdoc*: Test for above.
- * test/ruby/test_settracefunc.rb: Ignore events from other threads.
+Thu Dec 6 04:34:19 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Fri Nov 22 10:35:57 2013 Koichi Sasada <ko1@atdot.net>
+ * thread.c (rb_uninterruptible): helper function for providing
+ temporary async_interrupt_timing(Object => :defer)
- * vm.c (ruby_vm_destruct): do not use ruby_xfree() after freeing
- objspace.
+ * io.c (rb_f_p): use rb_uninterruptible.
+ * io.c (rb_f_p_internal): helper function for rb_f_p().
+ * io.c (struct rb_f_p_arg): new struct for rb_f_p_internal.
- * gc.c (ruby_mimfree): added. It is similar to ruby_mimmalloc().
+ * test/ruby/test_thread.rb (test_async_interrupt_and_p): test for
+ the above.
- * internal.h: ditto.
+Thu Dec 6 04:27:10 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * io.c (io_binwrite): check interrupt before io issue.
+ * test/ruby/test_thread.rb (test_async_interrupt_and_io):
+ test for the above.
-Fri Nov 22 09:42:35 2013 Zachary Scott <e@zzak.io>
+Thu Dec 6 01:10:36 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/digest/test_digest.rb: Reverse order of assert_equal
- Reported by @splattael
+ * vm_eval.c (rb_method_call_status): use Qundef as no self instead of
+ the current self.
-Fri Nov 22 09:03:16 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * vm_eval.c (send_internal): public_send does not consider how it is
+ called, as mentioned in r14173. patched by charliesome (Charlie
+ Somerville). [ruby-core:50489] [Bug #7499]
- * gc.c: fix build failure on FreeBSD introduced by r43763.
- malloc_usable_size() is defined by malloc_np.h on FreeBSD.
+Wed Dec 5 23:50:23 2012 Narihiro Nakamura <authornari@gmail.com>
- * configure.in: check malloc.h and malloc_np.h.
+ * gc.c (getrusage_time): uses clock_gettime() with
+ CLOCK_PROCESS_CPUTIME_ID when available, which provides a 1ns
+ precision on linux. [ruby-core:50495] [Bug #7500]
+ patched by Aman Gupta.
-Fri Nov 22 08:27:13 2013 Eric Hodel <drbrain@segment7.net>
+Wed Dec 5 22:46:02 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/rubygems: Update to RubyGems master 50a8210. Important changes
- in this commit:
+ * vm.c (rb_vm_make_proc): save the proc made from the given block so
+ that it will not get collected. [ruby-core:50545] [Bug #7507]
- 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.
+Wed Dec 5 22:13:57 2012 Naohisa Goto <ngotogenome@gmail.com>
- * test/rubygems: ditto.
+ * ext/dl/lib/dl/func.rb (DL::Function#bind): When Fiddle is used,
+ @ptr should be updated. This fixes SEGV raised in DL::Function#call
+ after calling DL::Function#bind. [Bug #7516] [ruby-dev:46708]
-Thu Nov 21 22:33:59 2013 Koichi Sasada <ko1@atdot.net>
+ * test/dl/test_func.rb (test_bind): test for the above
- * gc.c: RGENGC_CHECK_MODE should be 0.
+Wed Dec 5 18:53:00 2012 Masaya Tarui <tarui@ruby-lang.org>
-Thu Nov 21 21:40:00 2013 Kenta Murata <mrkn@mrkn.jp>
+ * thread.c (rb_thread_s_async_interrupt_timing): have to check ints
+ before jumping out.
+ * test/ruby/test_thread.rb (test_async_interrupt_with_return): add test
+ rescue has to catch a queued async exception at the time of return.
+ * test/ruby/test_thread.rb (test_async_interrupt_with_break): add test
+ rescue has to catch a queued async exception at the time of break.
- * ext/bigdecimal/bigdecimal.c (VpAlloc): Fix the expr to adjust the size
- of the digit array.
+Wed Dec 5 16:54:28 2012 Koichi Sasada <ko1@atdot.net>
-Thu Nov 21 21:36:00 2013 Kenta Murata <mrkn@mrkn.jp>
+ * test/ruby/memory_status.rb: suppress warning.
+ A patch from NAKAMURA Usaku.
- * ext/bigdecimal/bigdecimal.c (BigDecimal_sqrt): Fix the precision of
- the result BigDecimal of sqrt.
- [Bug #5266] [ruby-dev:44450]
+Wed Dec 5 16:06:54 2012 Eric Hodel <drbrain@segment7.net>
- * test/bigdecimal/test_bigdecimal.rb: add tests for the above changes.
+ * lib/rdoc/parser/changelog.rb: Parse more ChangeLog file variations.
+ * test/rdoc/test_rdoc_parser_changelog.rb: Test for above.
-Thu Nov 21 18:49:02 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Dec 5 12:17:11 2012 Naohisa Goto <ngotogenome@gmail.com>
- * gc.c (vm_xrealloc, vm_xfree): use malloc_usable_size() to obtain old
- size if available.
+ * ext/dl/lib/dl/func.rb (DL::Function#initialize, DL::Function#bind):
+ ABI should be set by using CFunc#calltype even when Fiddle is used.
+ When Fiddle is used and a block is given, name should not be ignored.
+ [ruby-core:50562] [Bug #7514]
-Thu Nov 21 18:47:29 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/dl/lib/dl/import.rb (DL::Importer#bind_function): should respect
+ abi and name when Fiddle is used.
- * lib/delegate.rb (SimpleDelegator#__getobj__): target object must be set.
+ * test/dl/test_func.rb (test_name_with_block): test for "name" method
+ with giving a block.
- * lib/delegate.rb (DelegateClass#__getobj__): ditto.
+Wed Dec 5 11:55:00 2012 Zachary Scott <zachary@zacharyscott.net>
-Thu Nov 21 18:28:42 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * doc/shell.rd, doc/shell.rd.ja: Removed stale doc files
+ * lib/shell.rb, lib/shell/*: Merge and updates docs from doc/shell.rd*
- * lib/tempfile.rb (Tempfile#initialize): use class method to get rid
- of warnings when $VERBOSE.
+Wed Dec 5 11:42:38 2012 Koichi Sasada <ko1@atdot.net>
-Thu Nov 21 17:43:29 2013 Koichi Sasada <ko1@atdot.net>
+ * test/ruby/test_settracefunc.rb: disable trace.
- * gc.c: rename initial_xxx variables to gc_params.xxx.
- They are not only used initial values.
+Wed Dec 5 11:37:37 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- Chikanaga-san: Congratulations on RubyPrize!
+ * lib/mkmf.rb (MakeMakefile#macro_defined?): use clearly different
+ strings from conflict markers.
-Thu Nov 21 17:16:00 2013 Koichi Sasada <ko1@atdot.net>
+Wed Dec 5 04:25:00 2012 Zachary Scott <zachary@zacharyscott.net>
- * 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)
+ * lib/README: Add rdoc modeline directive and formatting libs
- 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)
+Wed Dec 5 04:04:02 2012 Masaya Tarui <tarui@ruby-lang.org>
- * gc.c (initial_malloc_limit): rename to initial_malloc_limit_min.
+ * test/ruby/test_thread.rb (test_async_interrupt_blocking): bugfix
+ about deferred check
-Thu Nov 21 16:51:34 2013 Zachary Scott <e@zzak.io>
+Wed Dec 5 03:35:37 2012 Masaya Tarui <tarui@ruby-lang.org>
- * ext/digest/bubblebabble/bubblebabble.c: Teach RDoc digest/bubblebabble
+ * vm_core.h (RUBY_VM_CHECK_INTS_BLOCKING): check async queue everytime.
+ * thread.c (sleep_forever): check RUBY_VM_CHECK_INTS_BLOCKING first.
+ * thread.c (sleep_timeval): ditto.
+ * test/ruby/test_thread.rb (test_async_interrupt_blocking): add a test
+ exceptions are correctly deferred and raised on :on_blocking context.
-Thu Nov 21 16:50:16 2013 Zachary Scott <e@zzak.io>
+Wed Dec 5 02:36:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/digest/test_digest.rb: Add more tests for digest/bubblebabble
+ * common.mk, defs/id.def, template/id.c.tmpl: generate id.c as well as id.h.
-Thu Nov 21 16:32:47 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Dec 5 00:56:21 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * lib/delegate.rb (Delegator#method_missing): try private methods defined in
- Kernel after the target. [Fixes GH-449]
+ * thread.c (rb_mutex_owned_p): new method that return current
+ thread have the target mutex or not. [Feature #7505] [ruby-dev:46697]
+ * test/ruby/test_thread.rb (test_mutex_owned, test_mutex_owned2):
+ test for the above.
+ * NEWS: new for the above.
-Thu Nov 21 16:25:08 2013 Akinori MUSHA <knu@iDaemons.org>
+Wed Dec 5 00:05:47 2012 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
- * test/uri/test_generic.rb (URI#test_merge): Test uri + URI(path)
- in addition to uri + path.
+ * lib/erb.rb (make_compiler, add_put_cmd, add_insert_cmd): extract
+ methods.
-Thu Nov 21 15:36:08 2013 Zachary Scott <e@zzak.io>
+Tue Dec 4 18:21:04 2012 Naohisa Goto <ngotogenome@gmail.com>
- * ext/openssl/lib/openssl/buffering.rb: [DOC] Fix HEREDOC comment for
- OpenSSL::Buffering which breaks overview because of RDoc bug
+ * test/ruby/memory_status.rb (Memory): use fiddle/types if available.
-Thu Nov 21 14:46:57 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * test/ruby/memory_status.rb (Memory::Win32): :stdcall is needed on
+ x86 WIN32. This commit partly reverts r38054.
- * 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.
+Tue Dec 4 18:05:58 2012 Naohisa Goto <ngotogenome@gmail.com>
- * signal.c (check_stack_overflow, CHECK_STACK_OVERFLOW): now defined on
- Windows, too.
+ * ext/fiddle/lib/fiddle/types.rb: copied from ext/dl/lib/dl/types.rb
+ and modified for Fiddle, needed for migration from DL to Fiddle.
- * thread_win32.c (ruby_stack_overflowed_p): ditto.
+Tue Dec 4 17:57:09 2012 Naohisa Goto <ngotogenome@gmail.com>
-Thu Nov 21 14:18:24 2013 Zachary Scott <e@zzak.io>
+ * ext/fiddle/lib/fiddle/import.rb (import_function, bind_function):
+ should respect call_type for migration from DL to Fiddle.
+ [Bug #7484] [ruby-core:50405]
- * 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
+Tue Dec 4 16:54:00 2012 Eric Hodel <drbrain@segment7.net>
-Thu Nov 21 14:06:02 2013 Koichi Sasada <ko1@atdot.net>
+ * .document: Added ChangeLog and doc/ChangeLog-* as documentation
- * gc.c (gc_marks_check): do not dump all refs.
+Tue Dec 4 16:47:46 2012 Eric Hodel <drbrain@segment7.net>
- * gc.c (allrefs_dump_i): fix output format.
+ * lib/rdoc/parser/changelog.rb: Added a ChangeLog parser to RDoc.
+ * lib/rdoc/parser.rb: ditto
+ * test/rdoc/test_rdoc_parser_changelog.rb: Test for above.
-Thu Nov 21 13:43:07 2013 Koichi Sasada <ko1@atdot.net>
+Tue Dec 4 16:23:32 2012 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.
+ * marshal.c (path2class, path2module): use PRIsVALUE.
- [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.
+ * marshal.c (w_object, marshal_dump, marshal_load): use
+ rb_check_funcall if possible.
- [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.)
+ * marshal.c (w_object, marshal_dump, r_object0, marshal_load): use
+ RB_GC_GUARD() (directly or indirectly) instead of volatile.
- [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".
+ * variable.c (rb_path_to_class): prevent the argument from GC.
- * 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.
+Tue Dec 04 13:55:07 2012 Koichi Sasada <ko1@atdot.net>
-Thu Nov 21 13:40:20 2013 Zachary Scott <e@zzak.io>
+ * vm_opts.h: enable optimization - operand unification.
+ Operand unification technique enable to combine
+ an instruction and specific operands and make new
+ instruction.
- * lib/observer.rb: [DOC] Clarify default observer method.
- By @edward [Fixes GH-450] https://github.com/ruby/ruby/pull/450
+ * defs/opt_operand.def: add several configuration
+ of operand unification.
-Thu Nov 21 13:32:53 2013 Zachary Scott <e@zzak.io>
+ * insns.def: use `int' instead to suppress warning.
- * 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
+Mon Dec 3 17:58:53 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Thu Nov 21 10:45:22 2013 Zachary Scott <e@zzak.io>
+ * parse.y: replace parser->enc with current_enc.
- * ext/openssl/lib/openssl/buffering.rb: Remove unused arguments from
- OpenSSL::Buffering.new [Fixes GH-445]
+Tue Dec 4 08:33:46 2012 Eric Hodel <drbrain@segment7.net>
-Thu Nov 21 10:30:47 2013 Zachary Scott <e@zzak.io>
+ * README.EXT: Converted to RDoc format
+ * README.EXT.ja: ditto
- * test/digest/test_digest.rb: Add test for Digest::SHA256.bubblebabble
+Tue Dec 4 08:32:10 2012 Eric Hodel <drbrain@segment7.net>
-Wed Nov 20 20:54:01 2013 Masaya Tarui <tarui@ruby-lang.org>
+ * lib/rdoc/ri/driver.rb: Fixed ri page display for files with
+ extensions.
+ * test/rdoc/test_rdoc_ri_driver.rb: Test for above
- * tool/instruction.rb : fix typo.
+Tue Dec 4 04:11:50 2012 Eric Hodel <drbrain@segment7.net>
-Wed Nov 20 19:45:22 2013 Tanaka Akira <akr@fsij.org>
+ * .document: Add NEWS for `ri ruby:NEWS`
+ * NEWS: Set format as rdoc
+ * doc/NEWS-1.8.7: ditto
+ * doc/NEWS-1.9.1: ditto
+ * doc/NEWS-1.9.2: ditto
+ * doc/NEWS-1.9.3: ditto
- * random.c (rand_init): Make it possible to specify arbitrary array
- for init_genrand().
+Mon Dec 3 20:37:22 2012 Koichi Sasada <ko1@atdot.net>
-Wed Nov 20 17:34:13 2013 Koichi Sasada <ko1@atdot.net>
+ * vm_exec.c: check VM_COLLECT_USAGE_DETAILS.
- * 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()).
+Mon Dec 3 20:28:02 2012 Koichi Sasada <ko1@atdot.net>
-Wed Nov 20 11:46:38 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * compile.c (iseq_specialized_instruction):
+ change condition of using `opt_send_simple'.
+ More method invocations can be simple.
- * 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.
+Mon Dec 3 20:03:38 2012 Koichi Sasada <ko1@atdot.net>
-Wed Nov 20 01:39:02 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/ruby/test_objectspace.rb: skip RuntimeError
+ which says a message "can't modify frozen File".
+ Is that correct behavior?
- * lib/rdoc/constant.rb (RDoc::Constant#documented?): workaround for
- NoMethodError when the original of alias is not found.
+Mon Dec 03 20:00:19 2012 Koichi Sasada <ko1@atdot.net>
-Tue Nov 19 23:38:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_exec.c: vm_analysis_insn should be static.
- * configure.in (--with-os-version-style): option to transform target
- OS version string.
+Mon Dec 3 19:10:12 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Nov 19 21:27:33 2013 Tanaka Akira <akr@fsij.org>
+ * random.c (Init_Random), rational.c (Init_Rational): make marshal
+ methods private. [Feature #6539]
- * test/net/http/utils.rb (spawn_server): Specify zero for port to
- avoid reusing an allocated port.
+Mon Dec 3 18:29:27 2012 Koichi Sasada <ko1@atdot.net>
- * test/net/http/test_http.rb: Don't specify port here.
+ * iseq.h: iseq_catch_table_entry::catch_type should be
+ Fixnum because they are pushed into Array in a compiler.
+ [Bug #7502]
- * test/net/http/test_https.rb: Ditto.
+ * test/ruby/test_objectspace.rb: add a test of this issue.
-Tue Nov 19 18:52:10 2013 Koichi Sasada <ko1@atdot.net>
+Mon Dec 3 18:25:16 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c (heap_is_swept_object): use heap_page::before_sweep flag.
+ * template/id.h.tmpl (preserved_ids): "empty?" is not an attribute name.
-Tue Nov 19 18:49:32 2013 Koichi Sasada <ko1@atdot.net>
+Mon Dec 3 16:23:09 2012 Koichi Sasada <ko1@atdot.net>
- * gc.c (rb_objspace_reachable_objects_from_root): do major marking.
+ * vm_backtrace.c (vm_backtrace_to_ary): check negative size (2nd arg).
-Tue Nov 19 18:45:40 2013 Koichi Sasada <ko1@atdot.net>
+Mon Dec 3 15:50:33 2012 Akinori MUSHA <knu@iDaemons.org>
- * 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.
+ * misc/ruby-additional.el (ruby-mode-set-encoding): Unbreak by
+ fixing a typo, s/set/setq/.
- * string.c (rb_fstring): use rb_gc_resurrect.
+Mon Dec 3 14:14:19 2012 Koichi Sasada <ko1@atdot.net>
- * internal.h: add decl.
+ * compile.c (iseq_compile_each): joke shouldn't use id.h defined ids.
-Tue Nov 19 09:47:02 2013 Eric Hodel <drbrain@segment7.net>
+ * id.c (Init_id): ditto.
- * lib/rdoc: Update to RDoc master a1195ce. Changes include:
+ * common.mk: fix dependency.
- Improved accessibility of the main sidebar navigation.
+Mon Dec 3 12:43:35 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- Fixed handling of regexp options in HTML source highlighting.
+ * misc/ruby-mode.el (ruby-block-end-re, ruby-delimiter)
+ (ruby-mode-syntax-table, ruby-parse-partial, ruby-beginning-of-indent):
+ merge from Emacs.
- * test/rdoc: ditto.
+ * misc/ruby-mode.el (ruby-calculate-indent): fix indentation of
+ argument lines in parentheses. [Bug #5140]
-Tue Nov 19 09:33:52 2013 Eric Hodel <drbrain@segment7.net>
+Mon Dec 3 07:52:41 2012 Eric Hodel <drbrain@segment7.net>
- * lib/rubygems: Update to RubyGems master 6a3d9f9. Changes include:
+ * lib/rdoc/parser.rb: Improved modeline support. Patch by nobu.
+ * test/rdoc/test_rdoc_parser.rb: Test for above.
- Compatibly renamed Gem::DependencyResolver to Gem::Resolver.
+Sun Dec 3 00:06:00 2012 Kenta Murata <mrkn@mrkn.jp>
- Added support for git gems in gem.deps.rb and Gemfile.
+ * ext/bigdecimal/bigdecimal.c (BigDecimal_new): stop checking string
+ taintness. [Bug #5508] [ruby-core:40510]
- Fixed resolver bugs.
+Sun Dec 2 19:26:47 2012 Masaya Tarui <tarui@ruby-lang.org>
- * test/rubygems: ditto.
+ * thread.c (RB_GC_SAVE_MACHINE_CONTEXT, rb_gc_save_machine_context):
+ extract rb_gc_save_machine_context to RB_GC_SAVE_MACHINE_CONTEXT.
+ NOTE: machine_regs and machine_stack_end must be set in current scope.
- * lib/rubygems/LICENSE.txt: Updated to license from RubyGems trunk.
- [ruby-trunk - Bug #9086]
+Sun Dec 2 18:46:24 2012 Koichi Sasada <ko1@atdot.net>
- * lib/rubygems/commands/which_command.rb: RubyGems now indicates
- failure when any file is missing. [ruby-trunk - Bug #9004]
+ * array.c, enum.c, insns.def, io.c, numeric.c, parse.y, process.c,
+ range.c: use prepared IDs.
+ A patch from charliesome (Charlie Somerville).
+ [Bug #7495]
- * 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]
+ * common.mk: add dependency to id.h.
+ * common.mk: replace ID_H_INCLUDES with id.h.
-Tue Nov 19 07:21:56 2013 Tanaka Akira <akr@fsij.org>
+Sun Dec 2 16:48:00 2012 Zachary Scott <zachary@zacharyscott.net>
- * configure.in (LOCALTIME_OVERFLOW_PROBLEM): Define it for cross
- compiling.
- [ruby-core:58391] [Bug #9119] Reported by Luis Lavena.
- Analyzed by Heesob Park.
+ * lib/weakref.rb (rdoc): Clean up usage, add example,
+ note ArgumentError on WeakRef.new
+
+Sun Dec 2 16:45:00 2012 Zachary Scott <zachary@zacharyscott.net>
+
+ * gc.c (WeakMap): Add doc for internal reference, use lib/weakref.rb
+
+Sun Dec 2 07:24:23 2012 Eric Hodel <drbrain@segment7.net>
-Tue Nov 19 05:55:05 2013 Eric Hodel <drbrain@segment7.net>
+ * lib/rdoc/parser.rb: Parse files with a -*- rdoc -*- modeline
+ * test/rdoc/test_rdoc_parser.rb: Test for above
- * lib/rdoc/rubygems_hook.rb: Remove debugging puts committed by
- accident.
+Sun Dec 2 06:02:00 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Mon Nov 18 22:47:54 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * gc.h (SET_MACHINE_STACK_END): add volatile for preventing
+ harmful optimization. [ruby-dev:46665] [Bug #7468]
- * 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]
+Sun Dec 2 05:01:58 2012 Koichi Sasada <ko1@atdot.net>
- * vm_eval.c (rb_catch_obj): now th->tag points previous tag until
- TH_EXEC_TAG().
+ * iseq.c (rb_iseq_line_trace_each): iterate `line' event only.
- * thread_pthread.c (ruby_init_stack): set stack_start properly by
- get_main_stack() if possible.
+ * test/ruby/test_iseq.rb: add a test for this change.
-Mon Nov 18 22:45:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sun Dec 2 02:46:04 2012 Koichi Sasada <ko1@atdot.net>
- * eval_jump.c (rb_exec_end_proc): unlink and free procs data before
- calling for each procs. [Bug #9110]
+ * vm_trace.c: add TracePoint#inspect.
-Sun Nov 17 06:33:32 2013 Shota Fukumori <her@sorah.jp>
+ * test/ruby/test_settracefunc.rb: add a test for this change.
- * configure.in: Use $LIBS for base of $SOLIBS, also in darwin.
- By this fix, environment that libgmp is located in $LIBS can build
- ruby.
+Sat Dec 1 21:18:19 2012 Koichi Sasada <ko1@atdot.net>
-Sun Nov 17 01:56:32 2013 Tanaka Akira <akr@fsij.org>
+ * test/ruby/test_backtrace.rb: add a test for
+ Thread::Backtrace::Location#inspect.
+ BTW, tests for `caller_locations' are not enough.
+ Any volunteers are welcome.
- * thread_pthread.c (rb_thread_create_timer_thread): Show error
- message instead of error number.
- (thread_create_core): Ditto.
+Sat Dec 1 21:06:58 2012 Koichi Sasada <ko1@atdot.net>
- * cont.c (fiber_machine_stack_alloc): Ditto.
+ * vm_backtrace.c (location_inspect_m): add
+ Thread::Backtrace::Location#inspect.
+ It same as loc_obj.to_s.inspect.
-Sat Nov 16 18:28:08 2013 Kouhei Sutou <kou@cozmixng.org>
+Sat Dec 1 19:24:09 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/rexml/parsers/ultralightparser.rb
- (REXML::Parsers::UltraLightParser#parse): Fix wrong :start_doctype
- position.
- [Bug #9061] [ruby-dev:47778]
- Patch by Ippei Obayashi. Thanks!!!
+ * io.c (rb_io_puts): recurse for the argument itself, not converted
+ array elements. [ruby-core:42444] [Bug #5986]
- * test/rexml/parser/test_ultra_light.rb: Add a test for this case.
+Sat Dec 1 19:01:36 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Nov 16 02:13:56 2013 Masaya Tarui <tarui@ruby-lang.org>
+ * marshal.c (w_object, r_object0): call private marshal methods.
+ [Feature #6539]
- * cont.c : Introduce ensure rollback mechanism. Please see below.
+Sat Dec 1 18:52:22 2012 Eric Hodel <drbrain@segment7.net>
- * internal.h (ruby_register_rollback_func_for_ensure): catch up above change.
- Add rollback mechanism API.
+ * lib/rubygems/commands/cleanup_command.rb: Fix cleanup command for
+ multiple gems. [ruby-trunk - #7481] by Kouhei Sutou
+ * test/rubygems/test_gem_commands_cleanup_command.rb: Test for above.
+ * lib/rubygems.rb: Autoload Gem::Source to prevent test failures
- * vm_core.h (typedef struct rb_vm_struct): catch up above change.
- Introduce ensure-rollback relation table.
+Sat Dec 1 18:17:00 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * vm_core.h (typedef struct rb_thread_struct): catch up above change.
- Introduce ensure stack.
+ * complex.c (Init_Complex), time.c (Init_Time): make marshal methods
+ private. [Feature #6539]
- * eval.c (rb_ensure): catch up above change.
- Introduce ensure stack.
+ * object.c (Init_Object): make remove_instance_variable public.
+ [Feature #6539]
- * hash.c : New function for rollback ensure, and register it to
- ensure-rollback relation table. [ruby-dev:47803] [Bug #9105]
+ * id.c (Init_id), template/id.h.tmpl: add initialize_{copy,clone,dup}
+ and respond_to_missing?.
- 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.
+ * vm_method.c (rb_method_entry_make): make above methods private.
+ [Feature #6539]
- Current API is unstable, and only internal use.
+Sat Dec 1 16:40:22 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- 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.
+ * test/ruby/test_thread.rb: move ConditionVariable related test
+ into test/thread/test_cv.rb.
+ * test/thread/test_cv.rb: new file.
+ * test/thread/test_cv.rb (test_condvar_empty_signal): new tests.
+ * test/thread/test_cv.rb (test_condvar_empty_broadcast): ditto.
-Sat Nov 16 00:18:36 2013 Masaki Matsushita <glass.saga@gmail.com>
+Sat Dec 1 15:14:25 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * eval_jump.c (rb_exec_end_proc): fix double free or corruption error
- when reentering by callcc. [ruby-core:58329] [Bug #9110]
+ * test/ruby/test_thread.rb (test_cv_wait_deadlock): enable
+ cv deadlock test.
- * test/ruby/test_beginendblock.rb: test for above.
+Sat Dec 1 14:23:33 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Fri Nov 15 01:06:04 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/thread.rb (ConditionVariable): use hash instead of array for
+ @waiters.
+ * test/thread/test_queue.rb (test_sized_queue_and_wakeup): remove
+ a test because @waiters no longer have a chance to duplicated. Now it's
+ a hash.
- * 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]
+Sat Dec 1 17:16:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/objspace/test_objspace.rb (TestObjSpace#dump_my_heap_please):
- remove temporary output file.
+ * misc/ruby-electric.el (ruby-electric-curlies): use kill-region
+ instead of interactive command delete-backward-char.
-Thu Nov 14 23:39:00 2013 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
+Sat Dec 1 17:12:55 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] remove example of
- Rational#to_d without argument. [Bug #8958]
+ * misc/inf-ruby.el (inferior-ruby-mode): fix the
+ compilation-shell-minor-mode configuration. a patch by
+ j2petkov (Jean-Christophe Petkovich) in [ruby-core:46518].
+ [Bug #6742]
-Thu Nov 14 20:24:15 2013 Naohisa Goto <ngotogenome@gmail.com>
+Sat Dec 1 15:05:30 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ruby_atomic.h (ATOMIC_SIZE_CAS): fix compile error on Solaris
- since r43460.
+ * dir.c (glob_helper): use NAMLEN() to tell the length of d_name
+ instead of strlen(), which can access beyond the boundary.
-Thu Nov 14 19:53:00 2013 Tanaka Akira <akr@fsij.org>
+Sat Dec 1 13:48:13 2012 Eric Hodel <drbrain@segment7.net>
- * 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.
+ * lib/rubygems/specification.rb: Don't add default gems to $LOAD_PATH
+ as they are already there.
-Thu Nov 14 11:33:47 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Dec 1 12:22:17 2012 Kouhei Sutou <kou@cozmixng.org>
- * hash.c (foreach_safe_i, hash_foreach_iter): deal with error detected
- by ST_CHECK.
+ * re-added r38053 that is reverted by r38061. Problems by r38053
+ are resolved by r38096. r38096 removed GEM_SKIP configuration.
- * st.c (st_foreach_check): call with non-error argument in normal case.
+ The below is ChangeLog of r38053:
-Thu Nov 14 02:37:14 2013 Zachary Scott <e@zzak.io>
+ * defs/default_gems: Add base directory column.
- * ext/thread/thread.c: [DOC] This patch accomplishes the following:
+ * tool/rbinstall.rb:
+ - Install .gemspecs of default gem to
+ #{GEM_HOME}/specifications/default/.
+ - Update files parameter of .gemspecs by relative path from
+ library directory.
- - 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]
+Sat Dec 1 11:09:12 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-Thu Nov 14 01:11:54 2013 Zachary Scott <e@zzak.io>
+ * variable.c (rb_class_path_no_cache): add a function to get the class
+ path without caching the computed path. Some classes are frozen, and
+ will raise an exception without this.
- * ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] +precision+ is required
+ * probes.d (cmethod-entry, cmethod-return): separate cmethods from
+ regular methods to match set trace func.
-Wed Nov 13 19:21:36 2013 Zachary Scott <e@zzak.io>
+ * probes_helper.h: refactor macros. Fix probes to avoid calling
+ #inspect when profiling.
- * ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] Document the required
- +precision+ argument for Rational#to_d [Bug #8958]
+ * insns.def: update for use with new macros.
-Wed Nov 13 19:02:05 2013 Zachary Scott <e@zzak.io>
+ * vm_eval.c: ditto
- * 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.
+ * vm_insnhelper.c: ditto
- Patched by @stomar [Bug #9027]
+ * test/dtrace/test_singleton_function.rb: fix test for new output.
-Wed Nov 13 18:32:12 2013 Zachary Scott <e@zzak.io>
+ * test/dtrace/test_cmethod.rb: test the cmethod probes.
- * ext/openssl/ossl_config.c: [DOC] Document the following:
+Sat Dec 1 09:44:16 2012 Eric Hodel <drbrain@segment7.net>
- - OpenSSL::ConfigError
- - OpenSSL::Config::DEFAULT_CONFIG_FILE
+ * test/rdoc/test_rdoc_options.rb: Windows drive letters are
+ case-insensitive.
- Patched by @vbatts via GH-436
- https://github.com/ruby/ruby/pull/436
+Sat Dec 1 09:42:13 2012 Eric Hodel <drbrain@segment7.net>
-Wed Nov 13 18:03:00 2013 Zachary Scott <e@zzak.io>
+ * lib/rubygems.rb: Search for gem deps file up the directory tree.
+ * test/rubygems/test_gem.rb: Test for above.
- * 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.
+Sat Dec 1 09:33:32 2012 Eric Hodel <drbrain@segment7.net>
- Based on a patch by @vbatts via GH-436
- https://github.com/ruby/ruby/pull/436
+ * test/runner.rb: Set GEM_HOME, GEM_PATH and GEM_SKIP to empty set.
+ With default_gem support in RubyGems GEM_SKIP prevents loading of
+ built-in gems.
-Wed Nov 13 17:19:36 2013 Zachary Scott <e@zzak.io>
+Sat Dec 1 07:16:17 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
- * ext/openssl/lib/openssl/config.rb: In #parse use +string+ for +str+
+ * compile.c (ADD_CATCH_ENTRY): add a cast to fix SEGV with x64 mingw
+ on Windows 8. Without cast, 0 might be non zero value at higher bits
+ in rb_ary_new3().
+ [ruby-core:50258] [Bug #7456]
-Wed Nov 13 17:09:45 2013 Zachary Scott <e@zzak.io>
+Sat Dec 1 04:07:57 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * ext/openssl/lib/openssl/*.rb: [DOC] Document the following:
+ * parse.y (parser.utf8): remove unused property.
- - Integer#to_bn
- - OpenSSL::Buffering module
- - Deprecated OpenSSL::Digest::Digest compatibility class
- - OpenSSL::Config
+ * parse.y (UTF8_ENC): remove unused macro.
- These changes were based on a patch by @vbatts via GH-436
- https://github.com/ruby/ruby/pull/436
+ * parse.y (parser_tokadd_utf8): use rb_utf8_encoding() directly.
-Wed Nov 13 10:55:43 2013 Zachary Scott <e@zzak.io>
+Sat Dec 1 03:49:45 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * doc/regexp.rdoc: [DOC] Fix typo in Special global variables section.
- Reported by Alex Johnson on ruby-doc.org
+ * lib/sync.rb (Sync_m#sync_synchronize): add Thread.async_interrupt_timing
+ for protecting from async interrupt.
+ * lib/sync.rb (Sync_m#sync_lock): ditto.
-Wed Nov 13 10:43:19 2013 Zachary Scott <e@zzak.io>
+Sat Dec 1 03:38:04 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * hash.c: [DOC] Adds an example for Hash#store
+ * lib/thread.rb (ConditionVariable#broadcast): s/RuntimeError/StandardError/
+ * lib/thread.rb (ConditionVariable#signal): ditto.
-Wed Nov 13 09:03:40 2013 Zachary Scott <e@zzak.io>
+Sat Dec 1 03:29:52 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * 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
+ * lib/thread.rb (SizedQueue#pop): rewrite by using ConditionVariable.
+ * lib/thread.rb (SizedQueue#push): ditto.
+ * lib/thread.rb (SizedQueue#max): ditto.
+ * lib/thread.rb (Queue#pop): ditto.
+ * lib/thread.rb (Queue#push): ditto.
-Tue Nov 12 10:15:14 2013 Eric Hodel <drbrain@segment7.net>
+ * lib/thread.rb (SizedQueue#num_waiting): adopt the above changes.
+ * lib/thread.rb (SizedQueue#initialize): ditto.
+ * lib/thread.rb (Queue#num_waiting): ditto.
+ * lib/thread.rb (Queue#initialize): ditto.
+ * test/thread/test_queue.rb (test_sized_queue_and_wakeup): ditto.
- * test/rubygems/insure_session.rb: Remove unused test file.
+Sat Dec 1 03:45:47 2012 Koichi Sasada <ko1@atdot.net>
-Tue Nov 12 09:16:24 2013 Eric Hodel <drbrain@segment7.net>
+ * thread.c (Thread.async_interrupt_timing): fix RDoc.
+ :never is not used any more.
- * lib/rubygems: Update to RubyGems master b9213d7. Changes include:
+Sat Dec 1 02:56:19 2012 Koichi Sasada <ko1@atdot.net>
- Fixed tests on Windows (I hope) by forcing platform for
- platform-dependent tests.
+ * iseq.c: add RubyVM::InstructionSequence (ISeq) inspection methods.
+ * ISeq#path returns path of this ISeq written.
+ * ISeq#absolute_path returns absolute path.
+ * ISeq#label returns label (method name and so on).
+ * ISeq#base_label returns base label (see Thread::Backtrace::Location).
+ * ISeq#first_lineno returns first line number of this ISeq.
+ * ISeq.of(obj) returns ISeq object which obj (Proc or Method)
+ is contains.
- Fixed File.exists? warnings.
+ * test/ruby/test_iseq.rb: add tests.
- Improved testing infrastructure.
+Sat Dec 1 02:58:51 2012 Eric Hodel <drbrain@segment7.net>
- * test/rubygems: ditto.
+ * include/ruby/ruby.h (rb_event_flag_t): Maintain integer precision
+ for clang error (VALUE aka unsigned long vs unsigned int)
+
+Sat Dec 1 02:53:18 2012 Eric Hodel <drbrain@segment7.net>
+
+ * test/rubygems/test_gem_dependency_installer.rb: Use Gem.read_binary
+ instead of File.binread for ruby 1.8 compatibility in the rubygems
+ source repository. Updates r38075
+
+Sat Dec 1 02:33:20 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * thread.c (rb_threadptr_interrupt_mask, async_interrupt_timing_func):
+ merge into them into rb_thread_s_async_interrupt_timing.
+ * thread.c (rb_thread_s_async_interrupt_timing): ditto.
+
+Sat Dec 1 02:11:47 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * thread.c (rb_threadptr_interrupt_mask): add argument check.
+ * thread.c (async_interrupt_timing_arg_check_i): helper function
+ for the above.
+ * test/ruby/test_thread.rb (test_async_interrupt_timing_invalid_argument):
+ test for the above.
+
+Sat Dec 1 01:19:34 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * lib/thread.rb (ConditionVariable#broadcast): protect from
+ async interrupt by using Thread.async_interrupt_timing.
+ * lib/thread.rb (ConditionVariable#signal): ditto.
+ * lib/thread.rb (ConditionVariable#wait): ditto.
+
+Sat Dec 1 02:04:23 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+
+ * test/ruby/envutil.rb (Test::Unit::Assertions#assert_in_out_err):
+ raise if assert_in_out_err misused.
+
+Sat Dec 1 02:08:16 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * test/rdoc/test_rdoc_rubygems_hook.rb
+ (TestRDocRubygemsHook#test_setup_unwritable): 1. check the existence
+ of the file(directory) before touch it. 2. remove test
+ file(directory) after the test. see [ruby-core:50388].
+
+Sat Dec 1 01:51:06 2012 Koichi Sasada <ko1@atdot.net>
+
+ [EXPERIMENTAL]
+ * iseq.c: add following two methods.
+ * ISeq#line_trace_all returns all line traces (line numbers)
+ * ISeq#line_trace_specify(pos, set) set `pos'th line event to
+ specified_line event (if set is true).
+ These features are introduced for debuggers (mainly to make
+ breakpoint).
+
+ * iseq.h: add decl. of C APIs.
+
+ * test/ruby/test_iseq.rb: add tests.
+
+ * vm_trace.c: add `specified_line' event.
+
+ * include/ruby/ruby.h: ditto.
+
+Sat Dec 1 01:49:52 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * test/rubygems/test_gem_dependency_installer.rb: gems are of course
+ binary files, so use a binary reading method when reading it.
+ see [ruby-core:50388].
+
+Sat Dec 1 01:21:07 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * lib/rubygems/command.rb (Gem::Command#get_all_gem_names_and_versions):
+ who assumes that the pathname of a gem never contains ':' ?
+ yes, on Unixen pathnames can contain ':', and on Windows they almost
+ certainly contain ':'. see [ruby-core:50388].
+
+ * lib/rubygems/requirement.rb (Gem::Requirement::PATTERN_RAW): extract
+ the regexp to match the version specifier from PATTERN to use in
+ above method.
+
+Sat Dec 1 00:48:19 2012 Naohisa Goto <ngotogenome@gmail.com>
+
+ * ext/fiddle/extconf.rb, ext/fiddle/function.c
+ (Fiddle::Function::STDCALL): FFI_STDCALL is not a macro, but an
+ enumeration. [ruby-core:50398] [Bug #7483]
+
+Sat Dec 1 00:08:55 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * test/rubygems/test_gem_installer.rb
+ (TestGemInstaller#test_check_executable_overwrite_other_non_gem):
+ on Windows, rubygems always generate a wrapper .bat file when
+ installing a file into bin, so testing no-overwrite a wrapper file
+ and a non-wrapper file is nonsense. see [ruby-core:50388].
+
+Fri Nov 30 23:39:58 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * test/rubygems/test_gem_installer.rb
+ (TestGemInstaller#test_check_executable_overwrite_default_bin_dir):
+ if the executable to be overwritten was generated by rubygems, the
+ error message differs from the only copied one's.
+ see [ruby-core:50388].
+
+Fri Nov 30 23:27:26 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * test/rubygems/test_gem_ext_ext_conf_builder.rb
+ (TestGemExtExtConfBuilder::test_class_make): reading with binary mode
+ of course introduce \r on Windows. see [ruby-core:50388].
+
+Fri Nov 30 23:11:37 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * lib/rubygems/specification.rb
+ (Gem::Specification.validate_permissions): don't check executability
+ of the source on Windows. they will be wrapped to .bat files when
+ installing. see [ruby-core:50388].
+
+Fri Nov 30 22:44:14 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * vm_core.h (rb_vm_struct): add thread_destruct_lock field.
+ * thread.c (Init_Thread): ditto.
+ * thread.c (rb_vm_gvl_destroy): ditto.
+
+ * thread.c (thread_start_func_2): make sure vm->running_thread
+ don't point to dead thread.
+ * thread.c (timer_thread_function): close a race against thread
+ destruction. [Bug #4911][ruby-dev:43859]
+
+ * vm_core.h (rb_thread_set_current): reset running time of
+ current thread instead of previous thread. We no longer
+ assume previous running thread still live.
+
+Fri Nov 30 21:57:43 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * revert r38053 because it causes too many test failures.
+ if you've already installed r38053 or later, remove the installed
+ lib/ruby/gems/2.0.0 directory and reinstall this revision or later.
+
+Fri Nov 30 21:07:56 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * lib/test/unit/parallel.rb (Test::Unit::Worker.run): wrap LoadError
+ because it's Gem::LoadError sometimes. see [Bug #6882]
+
+Fri Nov 30 20:47:44 2012 Koichi Sasada <ko1@atdot.net>
+
+ * thread.c: TracePoint#self returns invoking/exiting thread object
+ at thread_begin/end event.
+
+ * test/ruby/test_settracefunc.rb: fix test.
+
+Fri Nov 30 19:55:17 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * test/ruby/memory_status.rb (Memory::Win32): use fiddle instead of dl,
+ but I doubt fiddle is not compatible with dl. (if you are interested,
+ see the diff.) [ruby-core:50194] [Bug #7443]
+
+Fri Nov 30 19:37:44 2012 Kouhei Sutou <kou@cozmixng.org>
+
+ * defs/default_gems: Add base directory column.
+
+ * tool/rbinstall.rb:
+ - Install .gemspecs of default gem to
+ #{GEM_HOME}/specifications/default/.
+ - Update files parameter of .gemspecs by relative path from
+ library directory.
+
+Fri Nov 30 19:30:00 2012 Zachary Scott <zachary@zacharyscott.net>
+
+ * vm_trace.c:
+ tracepoint_attr_return_value (TracePoint#return_value):
+ include `:b_return` for method doc
+ tracepoint_enable_m, tracepoint_disable_m (#enable/#disable):
+ don't have block argument, document block scope
+
+Fri Nov 30 18:52:56 2012 Koichi Sasada <ko1@atdot.net>
+
+ * vm_trace.c (tracepoint_disable_m, tracepoint_enable_m):
+ fix block parameter.
+ No argument should be given to a block which is passed
+ to TracePoint#enable (and disable).
+
+Fri Nov 30 18:23:26 2012 Koichi Sasada <ko1@atdot.net>
+
+ * thread.c: rename Thread.control_interrupt
+ to Thread.async_interrupt_timing.
+ The option name `:never' is also changed to `:defer'.
+ [ruby-core:50375] [ruby-trunk - Feature #6762]
+
+ * thread.c: remove Thread.check_interrupt.
+ This method is difficult to understand by name.
+
+ * thread.c: add Thread.async_interrupted?.
+ This method check any deferred async interrupts.
+
+ * test/ruby/test_thread.rb: change tests for above.
+
+Fri Nov 30 18:24:00 2012 Zachary Scott <zachary@zacharyscott.net>
+
+ * vm_trace.c: Documentation for TracePoint API
+ [ruby-core:47243] [Feature #6895]
+
+Fri Nov 30 17:43:50 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * string.c (rb_str_cmp_m): try to compare with to_str result if
+ possible before calling <=> method. [ruby-core:49279] [Bug #7342]
+
+ * string.c (rb_str_cmp_m): use rb_check_funcall instead of respond_to
+ and call.
+
+ * string.c (rb_str_cmp_m): return fixed value, one of -1,0,+1 always.
+
+Fri Nov 30 16:19:14 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * vm_dump.c (rb_vm_bugreport): get rid of calling methods in sigsegv
+ handler. based on a patch by charliesome (Charlie Somerville)
+ [ruby-core:49573] [Bug #7402]
+
+Fri Nov 30 16:05:44 2012 Eric Hodel <drbrain@segment7.net>
+
+ * NEWS: Added RubyGems 2.0.0
+
+Fri Nov 30 15:24:37 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * parse.y (parser_yylex): fix false usage of local variable, it cannot
+ appear in fname state [ruby-core:49659] [Bug #7408]
+
+Fri Nov 30 15:20:12 2012 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/package.rb: Load YAML for building gems.
+ * test/rubygems/test_gem_commands_contents_command.rb: Sort expected
+ output of default gem contents. Re-fixes r38004 and r38005.
+
+Fri Nov 30 15:15:00 2012 Zachary Scott <zachary@zacharyscott.net>
+
+ * vm_trace.c (set_trace_func): Formatting of params and events
+
+Fri Nov 30 14:45:00 2012 Zachary Scott <zachary@zacharyscott.net>
+
+ * lib/net/http.rb: Net::HTTP::Patch to list of HTTP Request Classes
+ Patch by Ryunosuke SATO [Fixes #217 on github]
+
+Fri Nov 30 14:05:00 2012 Zachary Scott <zachary@zacharyscott.net>
+
+ * lib/cgi.rb: CGI example for HTML generation
+ Patch by Marcus Stollsteimer [ruby-core:50303] [Bug #7465]
+
+Fri Nov 30 13:52:00 2012 Zachary Scott <zachary@zacharyscott.net>
+
+ * time.c: Documentation improvements, grammar and formatting
+ Patch by Bernd Homuth [ruby-core:49203] [Bug #7326]
+
+Fri Nov 30 13:48:33 2012 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rdoc.rb: Set version to 4.0.0.preview2
+ * lib/rubygems.rb: Set version to 2.0.0.preview2
+
+Fri Nov 30 13:11:53 2012 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/commands/setup_command.rb: Remove old files on install
+ of RubyGems. (not by rbinstall.rb).
+ * test/rubygems/test_gem_commands_setup_command.rb: Test for above.
+
+Fri Nov 30 12:47:59 2012 Akinori MUSHA <knu@iDaemons.org>
+
+ * lib/abbrev.rb (Abbrev#abbrev): A fixed string prefix pattern
+ should only match the beginning of each word, not the beginning
+ of every line in it.
+
+ * lib/abbrev.rb (Abbrev#abbrev): Stop using a regexp that causes a
+ false warning. [Bug #7471]
+
+Fri Nov 30 12:30:55 2012 Akinori MUSHA <knu@iDaemons.org>
+
+ * test/test_abbrev.rb: Add tests for lib/abbrev.rb.
+
+Fri Nov 30 12:27:51 2012 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/spec_fetcher.rb: Allow prerelease spec fetching to fail
+ for bundler.
+ * test/rubygems/test_gem_spec_fetcher.rb: Test for above.
+
+Fri Nov 30 12:20:53 2012 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rake/backtrace.rb: Removed duplication in
+ Rake::Backtrace::SUPPRESSED_PATHS
+ * test/rake/test_rake_backtrace.rb: Skip tests when tmpdir is in the
+ suppressed pattern.
+
+Fri Nov 30 11:07:45 2012 Shugo Maeda <shugo@ruby-lang.org>
+
+ * revert r37993 to avoid SEGV in tests.
+
+Fri Nov 30 10:38:54 2012 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rdoc/ri/driver.rb: Relaxed matching for pages to be more
+ user-friendly.
+ * test/rdoc/test_rdoc_ri_driver.rb: Test for above.
+
+Fri Nov 30 09:50:16 2012 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rdoc/markdown.rb: Fixed warnings with -w
+
+Fri Nov 30 09:38:22 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * include/ruby/ruby.h (RB_GC_GUARD_PTR): add note.
+
+ * vm_backtrace.c (backtrace_to_str_ary): use RB_GC_GUARD() instead of
+ RB_GC_GUARD_PTR() which has no effect.
+ (backtrace_to_location_ary): ditto.
+ (vm_backtrace_to_ary): ditto.
+
+Fri Nov 30 09:22:52 2012 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/commands/contents_command.rb: Sort output from command.
+ Replaces r38004, r38005
+ * test/rubygems/test_gem_commands_contents_command.rb: ditto.
+
+ * lib/rubygems/defaults.rb: Use Gem.path_separator for jruby support.
+ * lib/rubygems/path_support.rb: ditto
+
+Fri Nov 30 08:34:03 2012 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rdoc/generator/darkfish.rb: Silenced warning
+ * test/rdoc/test_rdoc_rdoc.rb: ditto
+
+ * lib/rdoc/markup/parser.rb: Use byteslice when available for
+ performance
+ * test/rdoc/test_rdoc_markup_parser.rb: Test for above
+ * lib/rdoc/test_case.rb: ditto
+
+ * lib/rdoc/parser/ruby.rb: Fixed bug parsing yield({})
+ * test/rdoc/test_rdoc_parser_ruby.rb (end):
+
+ * lib/rdoc/rubygems_hook.rb: Skip default gems. Display generator
+ name properly.
+ * test/rdoc/test_rdoc_rubygems_hook.rb: Test for above
+
+ * lib/rdoc/servlet.rb: Fixed typo.
+
+Fri Nov 30 08:09:56 2012 Narihiro Nakamura <authornari@gmail.com>
+
+ * gc.c : remove a unused function.
+
+Fri Nov 30 07:46:42 2012 Narihiro Nakamura <authornari@gmail.com>
+
+ * gc.c (rb_objspace_call_finalizer): finalize_deferred may free up
+ a object which is reachable from a part after this function,
+ e.g. ruby_vm_destruct(). [ruby-dev:46647] [Bug #7452]
+
+ * test/ruby/test_gc.rb (test_finalizing_main_thread): add a test
+ for above.
+
+Fri Nov 30 07:43:44 2012 Koichi Sasada <ko1@atdot.net>
+
+ * thread.c (rb_thread_interrupted): avoid warning of
+ implicit conversion.
+
+ * thread.c (rb_threadptr_execute_interrupts): ditto.
+
+Fri Nov 30 07:34:28 2012 Koichi Sasada <ko1@atdot.net>
+
+ * vm_backtrace.c: add GC guards.
+
+Fri Nov 30 07:21:33 2012 Koichi Sasada <ko1@atdot.net>
+
+ [EXPERIMENTAL: NEED DISCUSS]
+ * vm_trace.c: add events
+ * :thread_begin - hook at thread beginning.
+ * :thread_end - hook at thread ending.
+ * :b_call - hook at block enter.
+ * :b_return - hook at block leave.
+ This change slow down block invocation.
+ Please try and give us feedback until 2.0 code freeze.
+
+ * include/ruby/ruby.h: ditto.
+
+ * compile.c (rb_iseq_compile_node): ditto.
+
+ * insns.def: ditto.
+
+ * thread.c: ditto.
+
+ * vm.c: ditto.
+
+ * include/ruby/debug.h: add a comment.
+
+ * test/ruby/test_settracefunc.rb: add a tests.
+
+Fri Nov 30 06:56:30 2012 Ryan Davis <ryand-ruby@zenspider.com>
+
+ * test/minitest/*: Imported minitest 4.3.2 (r8027)
+
+Fri Nov 30 04:16:29 2012 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rake/*: Updated to rake 0.9.5
+ * test/rake/*: ditto.
+ * NEWS: ditto.
+
+Fri Nov 30 02:53:47 2012 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * vm.c: add a return hook when a method raises an exception.
+
+ * probes_helper.h: look up klass and method if none are provided.
+
+ * eval.c: update macro usage.
+
+ * vm_eval.c: ditto.
+
+ * vm_insnhelper.c: ditto.
+
+ * test/dtrace/test_function_entry.rb: test for change.
+
+Fri Nov 30 02:27:12 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * compile.c (compile_array_): refix r37991 remove assertion:
+ it is true only if type == COMPILE_ARRAY_TYPE_HASH.
+ [ruby-dev:46658] [Bug #7466]
- * test/rdoc/test_rdoc_rubygems_hook.rb: Switch to util_spec like
+ * vm.c (m_core_hash_from_ary): add assertion instead of above.
+
+ * vm.c (m_core_hash_merge_ary): ditto.
+
+Thu Nov 29 19:15:14 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * compile.c (compile_array_): hash elements must be paired even for
+ literal elements. [ruby-dev:46658] [Bug #7466]
+
+Thu Nov 29 22:39:35 2012 Naohisa Goto <ngotogenome@gmail.com>
+
+ * ext/openssl/ossl_ssl.c (ssl_npn_encode_protocol_i): fix byte order
+ issue on big-endian architecture [ruby-core:50292] [Bug #7463]
+
+Thu Nov 29 22:23:31 2012 Hiroshi Nakamura <nahi@ruby-lang.org>
+
+ * test/openssl/test_cipher.rb (test_ctr_if_exists): add CTR mode test
+ if underlying OpenSSL supports it. See #4408
+
+Thu Nov 29 21:42:16 2012 Shugo Maeda <shugo@ruby-lang.org>
+
+ * vm_method.c (rb_method_entry_make): add a method entry with
+ VM_METHOD_TYPE_REFINED to the class refined by the refinement if
+ the target module is a refinement. When a method entry with
+ VM_METHOD_TYPE_UNDEF is invoked by vm_call_method(), a method with
+ the same name is searched in refinements. If such a method is
+ found, the method is invoked. Otherwise, the original method in
+ the refined class (rb_method_definition_t::body.orig_def) is
+ invoked. This change is made to simplify the normal method lookup
+ and to improve the performance of normal method calls.
+
+ * vm_method.c (EXPR1, search_method, rb_method_entry),
+ vm_eval.c (rb_call0, rb_search_method_entry): do not use
+ refinements for method lookup.
+
+ * vm_insnhelper.c (vm_call_method): search methods in refinements if
+ ci->me is VM_METHOD_TYPE_REFINED. If the method is called by
+ super (i.e., ci->call == vm_call_super_method), skip the same
+ method entry as the current method to avoid infinite call of the
+ same method.
+
+ * class.c (include_modules_at): add a refined method entry for each
+ method defined in a module included in a refinement.
+
+ * class.c (rb_prepend_module): set an empty table to
+ RCLASS_M_TBL(klass) to add refined method entries, because
+ refinements should have priority over prepended modules.
+
+ * proc.c (mnew): use rb_method_entry_with_refinements() to get
+ a refined method.
+
+ * test/ruby/test_refinement.rb (test_inline_method_cache): do not skip
+ the test because it should pass successfully.
+
+ * test/ruby/test_refinement.rb (test_redefine_refined_method): new
+ test for the case a refined method is redefined.
+
+Thu Nov 29 17:45:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * variable.c (rb_const_set): show namespace in warning messages.
+ [Feature #7190]
+
+Thu Nov 29 17:31:53 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/rubygems.rb (Gem.load_yaml): return if Kernel#gem is not defined
+ yet. This causes crash if test-all requires libraries in a certain
+ order. A simple reproducible code is
+ ruby --disable-gem -e'require"yaml";require"minitest/autorun"'
+
+Thu Nov 29 17:19:26 2012 Eric Hodel <drbrain@segment7.net>
+
+ * lib/tracer.rb: Updated to match removal of custom_require from
RubyGems.
+ * test/test_tracer.rb: ditto. Improved failure message if the test
+ fails
-Mon Nov 11 18:31:12 2013 Aman Gupta <ruby@tmm1.net>
+Thu Nov 29 17:15:00 2012 Zachary Scott <zachary@zacharyscott.net>
- * 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.
+ * gc.c: Documentation for GC, GC::Profiler, ObjectSpace, and
+ ObjectSpace::WeakMap [ruby-core:50245] [Bug #7449]
-Mon Nov 11 04:36:14 2013 Eric Hodel <drbrain@segment7.net>
+Thu Nov 29 17:12:26 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * 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.
+ * tool/generic_erb.rb, tool/id2token.rb: add --path-separator option
+ for mingw where make and built ruby live in different world.
-Mon Nov 11 03:15:56 2013 Koichi Sasada <ko1@atdot.net>
+ * tool/vpath.rb: extract from tool/instruction.rb.
- * 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.
+Thu Nov 29 17:11:06 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Nov 11 02:51:17 2013 Eric Hodel <drbrain@segment7.net>
+ * test/io/wait/test_io_wait.rb (TestIOWait#fill_pipe):
+ Errno::EWOULDBLOCK may not be the same as Errno::EAGAIN. patch by
+ phasis68 (Heesob Park) at [ruby-core:49894]. [Bug #7420]
- * lib/rubygems: Update to RubyGems master 4bdc4f2. Important changes
- in this commit:
+Thu Nov 29 17:03:38 2012 Eric Hodel <drbrain@segment7.net>
- RubyGems now chooses the test server port reliably. Patch by akr.
+ * lib/rubygems/test_case.rb: Determine path to certificates to avoid
+ build-dir problems.
+ * test/rubygems/test_gem_security_signer.rb: Use predetermined paths
+ to avoid build-dir problems.
- Partial implementation of bundler's Gemfile format.
+Thu Nov 29 16:18:14 2012 Eric Hodel <drbrain@segment7.net>
- Refactorings to improve the new resolver.
+ * lib/rubygems/test_case.rb: Disable loading of keys and certificates
+ outside rubygems or ruby tests as the files are not available (or
+ necessary).
- Fixes bugs in the resolver.
+Thu Nov 29 16:14:41 2012 Koichi Sasada <ko1@atdot.net>
- * test/rubygems: Tests for the above.
+ * vm_backtrace.c (rb_debug_inspector_open): use RARRAY_LENINT() for
+ int variable.
-Mon Nov 11 01:02:06 2013 Zachary Scott <e@zzak.io>
+Thu Nov 29 15:59:55 2012 Koichi Sasada <ko1@atdot.net>
- * 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
+ * include/ruby/debug.h: add rb_debug_inspector_* APIs.
-Sun Nov 10 23:47:05 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+ * vm_backtrace.c: ditto.
- * gc.c (rb_gcdebug_print_obj_condition): catch up recent changes
- to compile on GC_DEBUG.
+ * common.mk: add dependency from vm_backtrace.o to
+ include/ruby/debug.h.
-Sun Nov 10 22:16:19 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * proc.c (rb_binding_new_with_cfp): constify.
- * error.c (exc_cause): captured previous exception.
+ * vm.c (rb_vm_get_ruby_level_next_cfp): constify.
- * eval.c (make_exception): capture previous exception automagically.
- [Feature #8257]
+ * vm_core.h, vm_trace.c: move decls.
-Sun Nov 10 08:37:20 2013 Zachary Scott <e@zzak.io>
+Thu Nov 29 15:56:14 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * thread.c: [DOC] Remove duplicate reference
+ * lib/rdoc/test_case.rb (RDoc::TestCase#verbose_capture_io):
+ defined for asserts of warnings.
-Sun Nov 10 08:09:29 2013 Zachary Scott <e@zzak.io>
+ * test/rdoc: use verbose_capture_io on asserts of warnings.
+ they failed when tests was run with RUBYOPT=-W0.
- * lib/drb/drb.rb: [DOC] promote better windows-safe filename regular
- expression in DRb Logger example. Reported by Chris Pheonix
- [Bug #9074]
+Thu Nov 29 15:53:38 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Sun Nov 10 08:03:05 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/psych/extconf.rb: added --enable-bundled-libyaml option. this
+ enforces using bundled libyaml.
- * gc.c (rb_define_finalizer, rb_undefine_finalizer): rename and export
- finalizer functions.
+Thu Nov 29 15:51:54 2012 Eric Hodel <drbrain@segment7.net>
-Sun Nov 10 07:41:22 2013 Zachary Scott <e@zzak.io>
+ * lib/rubygems*: Updated to RubyGems 2.0
+ * test/rubygems*: ditto.
- * lib/weakref.rb: [DOC] fix typos by @xaviershay [Fixes GH-439]
- https://github.com/ruby/ruby/pull/439
+ * common.mk (prelude): Updated for RubyGems 2.0 source rearrangement.
-Sun Nov 10 06:14:39 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * tool/change_maker.rb: Allow invalid UTF-8 characters in source
+ files.
- * compile.c (iseq_compile_each): emit opt_str_freeze if the #freeze
- method is called on a static string literal with no arguments.
+Thu Nov 29 15:38:14 2012 Koichi Sasada <ko1@atdot.net>
- * defs/id.def (firstline): add freeze so idFreeze is available
+ * include/ruby/debug.h: provide rb_tracearg_*() APIs,
+ instead of rb_tracepoint_attr_*().
+ These APIs are for debuggers/profilers.
+ They will be explained in another docs sometime.
- * 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
+ * vm_trace.c: ditto.
- * string.c (Init_String): define String#freeze
+Thu Nov 29 15:10:45 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * vm.c (vm_init_redefined_flag): define BOP_FREEZE on String class as
- a basic operation
+ * test/minitest/test_minitest_unit.rb: restore orig_verbose only
+ if it is set. This broke rdoc's tests.
+ http://u64.rubyci.org/~chkbuild/ruby-trunk/log/20121129T050102Z.diff.html.gz
- * vm_insnhelper.h: ditto
+Thu Nov 29 14:56:30 2012 Koichi Sasada <ko1@atdot.net>
- [Feature #8992] [ruby-core:57705]
+ * vm_trace.c (rb_tracepoint_attr_method_id):
+ rename TracePoint#id to TracePoint#method_id.
-Sun Nov 10 01:34:14 2013 Koichi Sasada <ko1@atdot.net>
+ * include/ruby/debug.h: ditto.
- * 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.
+ * test/ruby/test_settracefunc.rb: ditto,
-Sun Nov 10 00:39:26 2013 Koichi Sasada <ko1@atdot.net>
+Thu Nov 29 14:49:10 2012 Koichi Sasada <ko1@atdot.net>
- * benchmark/gc/gcbench.rb: output version description and GC::OPTS.
+ * vm_trace.c (rb_tracepoint_attr_defined_class):
+ rename TracePoint#klass to TracePoint#defined_class.
+ [ruby-core:50187] Re: [ruby-trunk - Feature #6895]
-Sun Nov 10 00:36:42 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * include/ruby/debug.h: ditto.
- * gc.c (should_be_callable): allow private call since rb_eval_cmd
- calls even private methods.
+ * test/ruby/test_settracefunc.rb: ditto.
-Sun Nov 10 00:33:17 2013 Zachary Scott <e@zzak.io>
+Thu Nov 29 14:27:57 2012 Koichi Sasada <ko1@atdot.net>
- * lib/racc/rdoc/grammar.en.rdoc: [DOC] fix typo by Tsuyoshi Sawada
- [Bug #9077]
+ * gc.c (gc_stat): prepare Symbol objects at first time
+ to make it fast.
-Sat Nov 9 22:35:35 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Nov 29 14:02:15 2012 Koichi Sasada <ko1@atdot.net>
- * 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].
+ * gc.c (gc_stat): GC.stat supports new information
+ * total_allocated_object: total allocated object number.
+ * total_freed_object: total freed object number.
+ Above two numbers are only accumulated and they will
+ overflow (return to 0). Please use them as a hint.
-Sat Nov 9 20:56:12 2013 Narihiro Nakamura <authornari@gmail.com>
+Thu Nov 29 12:13:54 2012 Ryan Davis <ryand-ruby@zenspider.com>
- * ext/objspace/object_tracing.c: use declarations in internal.h.
+ * lib/minitest/*: Imported minitest 4.3.2 (r8026)
+ * test/minitest/*: ditto
- * ext/objspace/objspace.c: ditto
+Thu Nov 29 11:06:06 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sat Nov 9 20:32:59 2013 Tanaka Akira <akr@fsij.org>
+ * thread.c (thread_start_func_2): remove unused code. When
+ th->safe_level == 4, th->errinfo never be thrown. So, to
+ create new exception makes no sense.
- * 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.
+Thu Nov 29 10:29:53 2012 Koichi Sasada <ko1@atdot.net>
-Sat Nov 9 15:00:16 2013 Zachary Scott <e@zzak.io>
+ * vm_backtrace.c: same as a last patch.
- * io.c: [DOC] ARGF.gets may return nil [Bug #9029] patch by znz
+Thu Nov 29 10:24:25 2012 Koichi Sasada <ko1@atdot.net>
-Sat Nov 9 14:54:52 2013 Zachary Scott <e@zzak.io>
+ * vm_backtrace.c: use `long' for return values of `NUM2LONG()'.
- * lib/rss/*: [DOC] document various constants @steveklabnik [Bug #8812]
+Thu Nov 29 09:52:08 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Sat Nov 9 14:50:09 2013 Zachary Scott <e@zzak.io>
+ * thread.c (do_select): suppress warning (uninitialized value warning)
+ with UNINITIALIZED_VAR().
- * lib/rss/rss.rb: [DOC] document Time#w3cdtf by @steveklabnik
- [Bug #8821]
+Thu Nov 29 09:36:09 2012 Koichi Sasada <ko1@atdot.net>
-Sat Nov 9 14:29:04 2013 Zachary Scott <e@zzak.io>
+ * eval.c (ruby_cleanup): delay THREAD_KILLED timing.
+ It should be located just before rb_thread_terminate_all().
- * ext/dl/cfunc.c: [DOC] fix typo in example [Bug #8944]
- Patched by Heesob Park
+Thu Nov 29 09:10:17 2012 Koichi Sasada <ko1@atdot.net>
-Sat Nov 9 13:59:58 2013 Zachary Scott <e@zzak.io>
+ * vm_backtrace.c (vm_backtrace_to_ary): support range argument
+ like Array#[].
+ [ruby-core:50092] [ruby-trunk - Feature #7434]
+ Test and document is not available. Please help us.
- * lib/test/unit/assertions.rb: [DOC] better example for assert_send()
- Patch by Andrew Grimm [Bug #8975]
+Thu Nov 29 06:46:33 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sat Nov 9 12:45:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * thread.c (thread_start_func_2): small cleanups.
- * 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.
+Thu Nov 29 06:37:08 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * insns.def: ditto
- * vm_core.h: ditto
- * vm_insnhelper.c: ditto
+ * thread.c (thread_start_func_2): remove unused code.
+ this function never be used for main thread.
+
+Thu Nov 29 06:27:55 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * thread.c (thread_start_func_2): remove unused code.
+ errinfo = th->errinfo; and errinfo = rb_errinfo(); are
+ the same.
+
+Thu Nov 29 05:26:32 2012 Koichi Sasada <ko1@atdot.net>
-Sat Nov 9 12:31:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * vm_backtrace.c (backtrace_to_str_ary2): rename to backtrace_to_str_ary.
- * 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.
+ * vm_backtrace.c (rb_backtrace_to_str_ary): use `backtrace_to_str_ary()'.
+ * vm_backtrace.c (backtrace_to_frame_ary): rename to
+ backtrace_to_location_ary.
+
+Thu Nov 29 05:19:25 2012 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * probes.d: Change function-entry probe to method-entry.
* insns.def: ditto
- * internal.h: ditto
+ * probes_helper.h: ditto
+ * test/dtrace/test_function_entry.rb: ditto
+ * test/dtrace/test_singleton_function.rb: ditto
* vm.c: ditto
- * vm_core.h: ditto
+ * vm_eval.c: ditto
* vm_insnhelper.c: ditto
- * vm_insnhelper.h: ditto
- * vm_method.c: ditto
-Sat Nov 9 09:22:29 2013 Masaya Tarui <tarui@ruby-lang.org>
+Thu Nov 29 04:45:17 2012 Koichi Sasada <ko1@atdot.net>
- * gc.c (gc_page_sweep, rgengc_rememberset_mark): Refactoring.
- Get bitmaps directly.
+ * vm_backtrace.c: rename Class name from
+ ::RubyVM::Backtrace and ::RubyVM::Backtrace::Location
+ to ::Thread::Backtrace and ::Thread::Backtrace::Location.
-Sat Nov 9 09:16:36 2013 Masaya Tarui <tarui@ruby-lang.org>
+Wed Nov 28 23:52:02 2012 Masaya Tarui <tarui@ruby-lang.org>
- * gc.c (RVALUE_PROMOTE_INFANT): Refactoring. Remove duplicated nonsense
- code.
+ * NEWS (Thread) remove incompatible changes about trap.
-Sat Nov 9 09:04:48 2013 Masaya Tarui <tarui@ruby-lang.org>
+Wed Nov 28 23:39:01 2012 Koichi Sasada <ko1@atdot.net>
- * gc.c (gc_marks_test): Bugfix. Fix a struct member name for build
- with RGENGC_CHECK_MODE.
+ * thread.c (rb_mutex_sleep): fix to allow spurious wakeup.
+ [ruby-dev:46654] [ruby-trunk - Bug #7455]
-Sat Nov 9 08:58:23 2013 Masaya Tarui <tarui@ruby-lang.org>
+ * NEWS: write about spurious wakeup.
- * 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.
+Wed Nov 28 22:57:23 2012 Koichi Sasada <ko1@atdot.net>
-Sat Nov 9 07:41:41 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * thread_win32.c: catch up latest change of BLOCKING_REGION.
- * internal.h (rb_vm_backtrace_object, rb_gc_count): make prototype
- declarations, not old-K&R style.
+Wed Nov 28 22:54:21 2012 Koichi Sasada <ko1@atdot.net>
-Sat Nov 9 06:11:14 2013 vo.x (Vit Ondruch) <vondruch@redhat.com>
+ * vm_insnhelper.c (vm_call_method): fix undefined behavior.
+ Should not access scope local variable from outer scope.
- * 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].
+Wed Nov 28 22:20:55 2012 Masaya Tarui <tarui@ruby-lang.org>
-Sat Nov 9 01:59:18 2013 Aman Gupta <ruby@tmm1.net>
+ * test/ruby/test_thread.rb (test_thread_status_in_trap): change test for
+ thread status in trap. now can accept Thread#join and Thread#value in trap.
- * 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.
+Wed Nov 28 21:58:47 2012 Koichi Sasada <ko1@atdot.net>
-Sat Nov 9 00:26:50 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * include/ruby/thread.h (rb_thread_call_without_gvl2): change
+ meaning of function.
+ This function is called with same parameters of
+ `rb_thread_call_without_gvl()'.
+ However, if interrupts are detected, then return immediately.
- * 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].
+ * thread.c: implement `rb_thread_call_without_gvl2()'.
-Fri Nov 8 18:35:31 2013 Masaki Matsushita <glass.saga@gmail.com>
+Wed Nov 28 21:31:21 2012 Masaya Tarui <tarui@ruby-lang.org>
- * lib/open3.rb: receive arguments as keyword arguments.
+ * thread.c (thread_join_sleep): check spurious wakeup by itself for
+ corresponding status change in trap context.
+ * vm_core.h (struct rb_thread_struct): add rb_thread_list_t and use as join_list for
+ reentry by trap context.
+ * thread.c (thread_start_func_2): ditto.
+ * thread.c (remove_from_join_list): ditto.
+ * thread.c (rb_thread_atfork): ditto.
+ * thread.c (thread_join): ditto. & remove trap handler check.
+ * thread.c (sleep_forever): add argument : spurious_check.
+ * thread.c (sleep_timeval): ditto.
+ * thread.c (rb_thread_sleep_forever): set spurious_check.
+ * thread.c (rb_thread_sleep_deadly): ditto.
+ * thread.c (sleep_for_polling): ditto.
+ * thread.c (rb_thread_wait_for): ditto.
+ * thread.c (sleep_wait_for_interrupt): bypass spurious_check.
-Fri Nov 8 13:19:26 2013 Masaki Matsushita <glass.saga@gmail.com>
+Wed Nov 28 21:23:18 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * io.c (rb_io_open_with_args): use RARRAY_CONST_PTR().
+ * ext/psych/yaml/emitter.c (yaml_emitter_write_indicator): constify.
- * io.c (rb_scan_open_args): use const qualifier for above.
+ * ext/psych/yaml/emitter.c (yaml_emitter_write_block_scalar_hints):
+ ditto.
- * io.c (rb_open_file): ditto.
+ * ext/psych/extconf.rb: mingw32 also needs macros for win32, not
+ only mswin32.
- * io.c (rb_io_open_with_args): ditto.
+ * ext/psych/extconf.rb: compile sources in the source directory
+ without copying by using VPATH.
-Fri Nov 8 11:35:06 2013 Masaki Matsushita <glass.saga@gmail.com>
+Wed Nov 28 21:18:57 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * dir.c, pack.c, ruby.c, struct.c, vm_eval.c: use RARRAY_CONST_PTR().
+ * lib/mkmf.rb (MakeMakefile#each_compile_rules): splat $(*VPATH*) for
+ each VPATH elements.
-Fri Nov 8 10:58:02 2013 Masaki Matsushita <glass.saga@gmail.com>
+Wed Nov 28 16:40:14 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * compile.c (iseq_build_from_ary_exception): use RARRAY_CONST_PTR().
+ * vm_core.h (enum rb_thread_status): remove THREAD_TO_KILL
+ * vm_core.h (struct rb_thread_struct): add to_kill field
+ * thread.c (terminate_i): convert THREAD_TO_KILL to to_kill.
+ * thread.c (rb_threadptr_to_kill): ditto.
+ * thread.c (rb_thread_kill): ditto.
+ * thread.c (rb_thread_wakeup_alive): ditto.
+ * thread.c (thread_list_i): ditto.
+ * thread.c (static const char): ditto.
+ * thread.c (thread_status_name): ditto.
+ * thread.c (rb_thread_status): ditto.
+ * thread.c (rb_thread_inspect): ditto.
+ * vm_backtrace.c (thread_backtrace_to_ary): ditto.
- * compile.c (iseq_build_from_ary_body): ditto.
+ * thread.c (rb_threadptr_execute_interrupts): fix thread status
+ overwritten issue. [Bug #7450] [ruby-core:50249]
-Fri Nov 8 10:49:34 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * test/ruby/test_thread.rb (test_hread_status_raise_after_kill):
+ test for the above.
+ * test/ruby/test_thread.rb (test_thread_status_in_trap): test for
+ thread status in trap.
+ * test/ruby/test_thread.rb (test_status_and_stop_p): remove
+ Thread.control_interrupt unsafe test. Thread#kill no longer
+ changes thread status. Instead of, Thread#kill receiver changes
+ their own status when receiving kill signal.
- * enumerator.c (append_method): use RARRAY_CONST_PTR().
+Wed Nov 28 16:21:46 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * enumerator.c (lazy_init_iterator): ditto.
+ * thread.c (struct rb_mutex_struct): add allow_trap field.
+ * internal.h (rb_mutex_allow_trap): added.
+ * thread.c (rb_mutex_lock, rb_mutex_unlock): check mutex->allow_trap.
+ * thread.c (mutex_sleep): remove trap check because it uses
+ rb_mutex_lock and rb_mutex_unlock internally.
+ * thread.c (rb_mutex_allow_trap): new helper function for the above.
-Fri Nov 8 02:44:29 2013 Koichi Sasada <ko1@atdot.net>
+ * io.c (io_binwrite): mark fptr->write_lock as writable in trap.
- * 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]
+ * test/ruby/test_signal.rb (test_trap_puts): test for the above.
- This workaround introduces possibility to set malloc_limit as
- wrong value (*1). However, this may be rare case. So I commit it.
+Wed Nov 28 16:59:12 2012 Koichi Sasada <ko1@atdot.net>
- *1: Without rest_sweep() here, gc_rest_sweep() can decrease
- malloc_increase due to ruby_sized_xfree().
+ * proc.c: remove Proc#== and Proc#eql?.
+ Proc objects compared with their object ids.
+ [Bug #4559]
-Fri Nov 8 02:50:25 2013 Zachary Scott <e@zzak.io>
+ * test/ruby/test_proc.rb: remove related test.
- * lib/securerandom.rb: [DOC] specify arguments passed to ::random_bytes
- By @chastell [Fixes GH-412] https://github.com/ruby/ruby/pull/412
+Wed Nov 28 16:41:04 2012 Eric Hodel <drbrain@segment7.net>
-Fri Nov 8 02:43:01 2013 Zachary Scott <e@zzak.io>
+ * lib/rdoc/servlet.rb: Add support for serving documentation from a
+ subdirectory.
+ * lib/rdoc/generator/darkfish.rb: ditto
+ * test/rdoc/test_rdoc_servlet.rb: Test for above
+ * test/rdoc/test_rdoc_servlet.rb: ditto
- * ext/objspace/object_tracing.c: [DOC] trace_object_allocations_stop
- By @srawlins [Fixes GH-421] https://github.com/ruby/ruby/pull/421
+Wed Nov 28 15:37:17 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Fri Nov 8 02:34:20 2013 Zachary Scott <e@zzak.io>
+ * configure.in: fix r37294: run only on i[3-6]86-linux.
- * 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
+Wed Nov 28 15:31:11 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Fri Nov 8 02:14:37 2013 Zachary Scott <e@zzak.io>
+ * io.c (FMODE_SYNCWRITE): removed unused macro.
- * array.c: [DOC] Add note about negative indices in Array overview
- By @ckaenzig [Fixes GH-427] https://github.com/ruby/ruby/pull/427
+Wed Nov 28 15:19:25 2012 Naohisa Goto <ngotogenome@gmail.com>
-Fri Nov 8 02:09:12 2013 Zachary Scott <e@zzak.io>
+ * configure.in: revert r37911, r37906 and r37904 which break build
+ with non-gcc and/or non-IA32 compilers, e.g. Solaris Studio,
+ Fujitsu C Compiler. [ruby-dev:46646] [Bug #7451]
- * lib/csv.rb: [DOC] Fix typo in CSV.parse_line by @funky-bibimbap
- [Fixes GH-430] https://github.com/ruby/ruby/pull/430
+Wed Nov 28 14:50:55 2012 Koichi Sasada <ko1@atdot.net>
-Fri Nov 8 01:01:54 2013 Zachary Scott <e@zzak.io>
+ * ext/psych/extconf.rb: copy sources into build directory,
+ not into srcdir.
- * golf_prelude.rb: syntax formatting for whitespace [Fixes GH-425]
- Patch by @edward https://github.com/ruby/ruby/pull/425
+Wed Nov 28 14:34:06 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Thu Nov 7 19:36:09 2013 Koichi Sasada <ko1@atdot.net>
+ * thread.c (rb_mutex_lock): moved trap context check from
+ rb_mutex_trylock because try_lock have no change to make
+ a deadlock.
+ * thread.c (rb_mutex_trylock): ditto.
+ * NEWS: news for the above.
- * gc.c: modify malloc_limit strategy.
+Wed Nov 28 13:39:54 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * fix default values:
- GC_MALLOC_LIMIT_GROWTH_FACTOR
- GC_MALLOC_LIMIT: 8MB -> 16MB
- GC_MALLOC_LIMIT_MAX: 384MB -> 32MB
+ * thread.c (thread_s_new): uses main_thread->status instead of
+ th->inhibit_thread_creation for preventing thread creation.
+ * vm_core.h (rb_vm_struct): remove inhibit_thread_creation field.
+ * thread.c (rb_thread_terminate_all): ditto.
- * 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.
+Wed Nov 28 13:27:29 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-Thu Nov 7 11:06:05 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * ext/psych/extconf.rb: use embedded libyaml if no system libyaml is
+ found. [ruby-core:49463]
+ * ext/psych/lib/psych.rb: updating to psych 2.0.0
+ * ext/psych/lib/psych/deprecated.rb: updated docs
+ * ext/psych/psych.gemspec: updated to psych 2.0.0
+ * ext/psych/psych.h: fixing header file include for rename
+ * ext/psych/psych_emitter.c: renamed to avoid libyaml conflict.
+ * ext/psych/psych_emitter.h: ditto
+ * ext/psych/psych_parser.c: ditto
+ * ext/psych/psych_parser.h: ditto
+ * ext/psych/psych_to_ruby.c: ditto
+ * ext/psych/psych_to_ruby.h: ditto
+ * ext/psych/psych_yaml_tree.c: ditto
+ * ext/psych/psych_yaml_tree.h: ditto
+ * ext/psych/yaml/LICENSE: embedding libyaml 0.1.4
+ * ext/psych/yaml/api.c: ditto
+ * ext/psych/yaml/config.h: ditto
+ * ext/psych/yaml/dumper.c: ditto
+ * ext/psych/yaml/emitter.c: ditto
+ * 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.h: ditto
+ * ext/psych/yaml/yaml_private.h: ditto
+
+Wed Nov 28 12:54:59 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * thread.c (thread_join): A trap handler check was moved from
+ thread_join_m because Thread#value should be raised an exception
+ too.
+ * thread.c (thread_join_m): remove trap handler check.
+ * test/ruby/test_thread.rb (test_thread_join_in_trap): add test
+ for thread#value.
+ * NEWS: documentation fix for the above.
+
+Wed Nov 28 11:07:00 2012 Zachary Scott <zachary@zacharyscott.net>
+
+ * ext/fiddle/closure.c: Documentation for Fiddle
+ * ext/fiddle/lib/fiddle/import.rb: ditto
+ * ext/fiddle/lib/fiddle/value.rb: ditto
+ * ext/fiddle/lib/fiddle/pack.rb: ditto
+ * ext/fiddle/lib/fiddle/cparser.rb: ditto
+ * ext/fiddle/lib/fiddle/struct.rb: ditto
+ * ext/fiddle/lib/fiddle/function.rb: ditto
+
+Wed Nov 28 09:15:51 2012 Ryan Davis <ryand-ruby@zenspider.com>
+
+ * ext/strscan/strscan.c: Added #charpos for multibyte string position.
+ * test/strscan/test_stringscanner.rb: ditto
+
+Wed Nov 28 09:00:34 2012 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * ext/fiddle/fiddle.c: adding alignment constants for compatibility
+ with DL.
+ * ext/fiddle/fiddle.h: ditto
+ * ext/fiddle/lib/fiddle/cparser.rb: importing the C parser for DL
+ backwards compatibility.
+ * ext/fiddle/lib/fiddle/import.rb: importing the import DSL for DL
+ backwards compatibility.
+ * ext/fiddle/lib/fiddle/pack.rb: importing structure pack for DL
+ backwards compatibility.
+ * ext/fiddle/lib/fiddle/value.rb: ditto
+ * ext/fiddle/lib/fiddle/struct.rb: importing struct DSL for DL backwards
+ compatibility.
+ * test/dl/test_c_struct_entry.rb: importing tests
+ * test/dl/test_c_union_entity.rb: ditto
+ * test/dl/test_cparser.rb: ditto
+ * test/dl/test_import.rb: ditto
+ * test/fiddle/test_c_struct_entry.rb: ditto
+ * test/fiddle/test_c_union_entity.rb: ditto
+ * test/fiddle/test_cparser.rb: ditto
+ * test/fiddle/test_import.rb: ditto
- * array.c (rb_ary_shuffle_bang): use RARRAY_PTR_USE() without WB
- because there are not new relations.
+Wed Nov 28 08:56:00 2012 Zachary Scott <zachary@zacharyscott.net>
-Thu Nov 7 10:34:12 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * doc/globals.rdoc: Add documentation file for magic globals
+ [ruby-core:29048] [Bug #3022]
- * array.c (rb_ary_sample): use rb_ary_dup().
+Wed Nov 28 08:55:00 2012 Zachary Scott <zachary@zacharyscott.net>
-Thu Nov 7 09:39:41 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * .document: Add README's to be included with docs
- * 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]
+Wed Nov 28 08:26:00 2012 Zachary Scott <zachary@zacharyscott.net>
-Wed Nov 6 21:30:55 2013 Masaya Tarui <tarui@ruby-lang.org>
+ * ext/dl/lib/dl.rb: Deprecation notice for DL
- * gc.c (gc_before_sweep): Change algorithm of malloc_limit to
- conservative for closing to memory consumption of ruby 2.0.
+Wed Nov 28 08:25:00 2012 Zachary Scott <zachary@zacharyscott.net>
- * gc.c (GC_MALLOC_LIMIT, GC_MALLOC_LIMIT_GROWTH_FACTOR):
- Adjust parameters for new algorithm.
+ * ext/fiddle/closure.c: Documentation for Fiddle
+ * ext/fiddle/pointer.c: ditto
+ * ext/fiddle/function.c: ditto
+ * ext/fiddle/lib/fiddle.rb: ditto
+ * ext/fiddle/fiddle.c: ditto
+ * ext/fiddle/handle.c: ditto
-Wed Nov 6 21:16:51 2013 Masaki Matsushita <glass.saga@gmail.com>
+Wed Nov 28 04:53:40 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * array.c (rb_ary_shift_m): use RARRAY_PTR_USE() without WB because
- there are not new relations.
+ * ext/fiddle/handle.c: Make Fiddle independent of DL, copy DL::Handle
+ to Fiddle::Handle.
+ * ext/fiddle/pointer.c: Make Fiddle independent of DL, copy
+ DL::Pointer to Fiddle::Pointer.
+ * test/fiddle/test_func.rb: relevant tests
+ * test/fiddle/test_handle.rb: ditto
+ * test/fiddle/test_pointer.rb: ditto
+ * ext/dl/lib/dl/struct.rb: use Fiddle::Pointer if available
+ * ext/fiddle/extconf.rb: check for dlfcn.h
+ * ext/fiddle/fiddle.c: add constants for sizeof() things
+ * ext/fiddle/fiddle.h: include dlfcn.h
+ * ext/fiddle/function.c: expose a C function for creating new
+ Fiddle::Function objects.
+ * ext/fiddle/lib/fiddle.rb: include constants for dl backwards compat
+ * ext/fiddle/lib/fiddle/function.rb: read the pointer from the
+ function for dl backwards compat.
+ * test/dl/test_callback.rb: check the addresses of the pointers rather
+ than their types.
+ * test/fiddle/helper.rb: remove dependency on dl
+ * test/fiddle/test_closure.rb: ditto
+ * test/fiddle/test_fiddle.rb: ditto
-Wed Nov 6 21:05:20 2013 Masaki Matsushita <glass.saga@gmail.com>
+Wed Nov 28 03:03:28 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * array.c (rb_ary_reverse): use RARRAY_PTR_USE().
+ * configure.in (opt-dir): don't use non portable flag -E of sed.
-Wed Nov 6 19:30:44 2013 Masaya Tarui <tarui@ruby-lang.org>
+Wed Nov 28 02:55:35 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * common.mk (help): add texts about gcbench.
+ * configure.in (ARCH_FLAG): __sync_val_compare_and_swap_4 needs
+ -march=$target_cpu on at least linux gcc 4.1.
+ patched by KOSAKI Motohiro
-Wed Nov 6 16:32:32 2013 Martin Duerst <duerst@it.aoyama.ac.jp>
+Tue Nov 27 22:03:09 2012 Akinori MUSHA <knu@iDaemons.org>
- * lib/open3.rb: tweaked grammar in comments
+ * string.c (rb_str_enumerate_chars, rb_str_enumerate_codepoints)
+ (rb_str_enumerate_lines): Dummy initialization of ary has been
+ replaced with UNINITIALIZED_VAR().
-Wed Nov 6 11:46:36 2013 Masaki Matsushita <glass.saga@gmail.com>
+Tue Nov 27 21:29:00 2012 Kenta Murata <mrkn@mrkn.jp>
- * array.c (rb_ary_sample): use RARRAY_AREF() and RARRAY_PTR_USE()
- instead of RARRAY_PTR().
+ * bignum.c (bigdivrem): optimize the way to retry calculation of
+ bigdivrem so that the calculation is started from the point where
+ the last interruption was occurred.
-Wed Nov 6 10:37:07 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * bignum.c (bigdivrem1): ditto.
- * array.c (rb_ary_and): defer hash creation and some refactoring.
+ * test/ruby/test_bignum.rb: add a test case for rb_bigdivrem in the
+ case that an interruption is occurred during bigdivrem1 is running.
-Wed Nov 6 09:14:31 2013 Koichi Sasada <ko1@atdot.net>
+Tue Nov 27 19:56:43 2012 Koichi Sasada <ko1@atdot.net>
- * benchmark/bm_vm1_gc_short_lived.rb: added.
- These GC benchmarks do not reflect practical applications.
- They are only for tuning.
+ * vm.c (rb_vm_make_env_object): make Proc object if Env is possible
+ to point block.
+ [ruby-core:41038] [ruby-trunk - Bug #5634]
- * benchmark/bm_vm1_gc_short_with_complex_long.rb: added.
+ * vm.c (rb_vm_make_proc): No need to make Proc object here.
- * benchmark/bm_vm1_gc_short_with_long.rb: added.
+ * bootstraptest/test_proc.rb: add tests.
- * benchmark/bm_vm1_gc_short_with_symbol.rb: added.
+Tue Nov 27 18:51:06 2012 Naohisa Goto <ngotogenome@gmail.com>
- * benchmark/bm_vm1_gc_wb_ary.rb: added.
+ * ruby_atomic.h (ATOMIC_CAS): added for Solaris and other platforms.
+ * ruby_atomic.h, signal.c (NEED_RUBY_ATOMIC_OPS): renamed from
+ NEED_RUBY_ATOMIC_EXCHANGE.
+ * signal.c (ruby_atomic_compare_and_swap): naive, non-atomic
+ compare-and-swap implementation only used for platforms without
+ valid support for atomic operations.
- * benchmark/bm_vm1_gc_wb_obj.rb: added.
+Tue Nov 27 17:43:46 2012 Eric Hodel <drbrain@segment7.net>
- * benchmark/bm_vm_thread_queue.rb: added.
- This benchmark is added to know how fast C version of thread.so.
+ * lib/rdoc/*: Added --root option for building documentation outside
+ the source directory.
+ * test/rdoc/*: ditto
+ * common.mk (rdoc): Added --root to rdoc rule
-Wed Nov 6 09:13:32 2013 Koichi Sasada <ko1@atdot.net>
+Tue Nov 27 16:24:45 2012 Eric Hodel <drbrain@segment7.net>
- * gc.c: define RGENGC_ESTIMATE_OLDSPACE == 0 if USE_RGENGC is 0.
+ * test/rdoc/test_rdoc_ri_paths.rb: Fixed duplicate path bug which
+ caused windows failures.
-Wed Nov 6 07:13:18 2013 Koichi Sasada <ko1@atdot.net>
+Tue Nov 27 16:06:00 2012 Eric Hodel <drbrain@segment7.net>
- * gc.c (Init_GC): add GC::OPTS to show options.
+ * test/rdoc/test_rdoc_generator_darkfish.rb: Updated tests for windows
+ * test/rdoc/test_rdoc_options.rb: ditto
+ * test/rdoc/test_rdoc_parser.rb: ditto
+ * test/rdoc/test_rdoc_rdoc.rb: ditto
+ * test/rdoc/test_rdoc_ri_driver.rb: ditto
+ * test/rdoc/test_rdoc_servlet.rb: ditto
-Wed Nov 6 07:12:17 2013 Koichi Sasada <ko1@atdot.net>
+Tue Nov 27 15:13:51 2012 Eric Hodel <drbrain@segment7.net>
- * benchmark/gc/gcbench.rb: add some options to make quiet.
+ * common.mk (rdoc): Set --debug for rdoc generation in case of bugs
-Wed Nov 6 04:14:25 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+Tue Nov 27 14:56:45 2012 Eric Hodel <drbrain@segment7.net>
- * 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
+ * lib/rdoc/rubygems_hook.rb: Updated for (upcoming) RubyGems 2
+ import.
+ * test/rdoc/test_rdoc_rubygems_hook.rb: ditto
-Tue Nov 5 21:21:47 2013 Tanaka Akira <akr@fsij.org>
+Tue Nov 27 13:59:29 2012 Narihiro Nakamura <authornari@gmail.com>
- * test/ruby/test_thread.rb (test_thread_join_in_trap):
- Run the test in a different process.
+ * NEWS: add improvements of the garbage collector.
-Tue Nov 5 20:14:32 2013 Masaya Tarui <tarui@ruby-lang.org>
+Tue Nov 27 13:27:46 2012 Eric Hodel <drbrain@segment7.net>
- * gc.c (is_live_object): A hidden object may be a live object.
- [ruby-dev:47788] [Bug #9072]
+ * lib/rdoc*: Updated to RDoc 4.0 (pre-release)
+ * bin/rdoc: ditto
+ * test/rdoc*: ditto
+ * NEWS: Updated with RDoc 4.0 information
-Tue Nov 5 13:37:19 2013 Koichi Sasada <ko1@atdot.net>
+Tue Nov 27 12:17:11 2012 Koichi Sasada <ko1@atdot.net>
- * 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.
+ * thread.c (rb_thread_terminate_all): retry broadcast only when
+ an exception is raised.
- 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'.
+Tue Nov 27 12:02:25 2012 Koichi Sasada <ko1@atdot.net>
- To implement this feature, move memsize_of() function from
- ext/objspace/objspace.c and expose rb_obj_memsize_of().
+ * thread.c (rb_thread_terminate_all): broadcast terminate event
+ not only an interrupt exception but any exceptions.
- 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.
+Tue Nov 27 10:55:09 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- The macro RGENGC_ESTIMATE_OLDSPACE enables/disables this feature,
- and turned off as default.
+ * eval.c (ruby_cleanup): set thread status to THREAD_KILLED
+ for preventing thr.raise.
+ * test/ruby/test_thread.rb (test_main_thread_status_at_exit):
+ test for the above.
- We need to compare 3gen GC and this feature carefully.
- (it is possible to enable both feature)
- We need a help to compare them.
+Tue Nov 27 10:31:29 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * internal.h: expose rb_obj_memsize_of().
+ * thread.c (rb_thread_terminate_all): suppress a warning.
- * ext/objspace/objspace.c: use rb_obj_memsize_of() function.
+Tue Nov 27 09:29:11 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * cont.c (fiber_memsize): fix to check NULL.
+ * thread.c (thread_join): raises ThreadError if target thread
+ is a main thread.
+ * test/ruby/test_thread.rb (test_thread_join_main_thread):
+ test for the above.
+ * NEWS: news for the above.
- * variable.c (autoload_memsize): ditto.
+Tue Nov 27 09:24:47 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * vm.c (vm_memsize): ditto.
+ * thread.c (thread_join): raises ThreadError if target thread
+ is a current thread.
+ * test/ruby/test_thread.rb (test_thread_join_current):
+ test for the above.
+ * NEWS: news for the above.
-Tue Nov 5 04:03:07 2013 Koichi Sasada <ko1@atdot.net>
+Tue Nov 27 09:59:16 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c (GC_MALLOC_LIMIT_MAX): fix default value 512MB -> 384MB.
- 512MB is huge.
+ * ext/extmk.rb (extmake): close mkmf.log for each libraries so that
+ failure messages are not mixed.
-Tue Nov 5 03:31:23 2013 Koichi Sasada <ko1@atdot.net>
+Tue Nov 27 09:58:48 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c: add 3gen GC patch, but disabled as default.
+ * ext/digest/*/extconf.rb, ext/openssl/extconf.rb: get git rid of
+ post-1.8 feature require_relative for cross compilation.
+ [ruby-core:50160] [Bug #7439]
- 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.
+Tue Nov 27 09:17:59 2012 Koichi Sasada <ko1@atdot.net>
- 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.
+ * NEWS: add TracePoint.
- 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.
+Tue Nov 27 08:16:03 2012 Koichi Sasada <ko1@atdot.net>
- To solve this problem, generational GC with more generations
- technique is known. This patch implements three generations gen GC.
+ * vm_trace.c: rename TracePoint#file and TracePoint#line
+ to TracePoint#path and TracePoint#lineno respectively.
+ They are consistent to RubyVM::Backtrace::Location.
- 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.
+ * include/ruby/debug.h: ditto.
- Representation of generations:
- * Infant: !FL_PROMOTED and !oldgen_bitmap [00]
- * Young : FL_PROMOTED and !oldgen_bitmap [10]
- * Old : FL_PROMOTED and oldgen_bitmap [11]
+ * vm_core.h: ditto.
- 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.
+ * test/ruby/test_settracefunc.rb: ditto.
- To evaluate this feature on more applications, I commit this patch.
- Reports are very welcome.
+Tue Nov 27 08:04:26 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- This patch includes some refactoring (renaming names, etc).
+ * thread.c (rb_thread_terminate_all): broadcast eTerminateSignal
+ again when Ctrl-C was pressed. [Feature #1952] [ruby-dev:39107]
- * include/ruby/ruby.h: catch up 3gen GC.
+Tue Nov 27 07:58:03 2012 Koichi Sasada <ko1@atdot.net>
- * .gdbinit: fix to show a prompt "[PROMOTED]" for promoted objects.
+ * vm_core.h: add members to rb_trace_arg_t:
+ * `klass_solved' represents klass and id is checked.
+ * `line' represents line calculated from cfp.
+ * `file' represents line calculated from cfp.
-Tue Nov 5 00:05:51 2013 Koichi Sasada <ko1@atdot.net>
+ * vm_trace.c: fix to use above data structures.
+ No need to calculate klass and id, line and file
+ pairs for each trace points.
- * node.h: catch up comments for last commit.
+Tue Nov 27 07:47:09 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Tue Nov 5 00:02:00 2013 Koichi Sasada <ko1@atdot.net>
+ * thread.c (rb_thread_terminate_all): add RUBY_VM_CHECK_INTS_BLOCKING().
+ Otherwise the loop in this function behave as busy loop because
+ native_sleep() return immediately when RUBY_VM_INTERRUPTED() is true.
- * include/ruby/ruby.h: rename FL_OLDGEN to FL_PROMOTED.
- This flag represents that "this object is promoted at least once."
+Tue Nov 27 04:12:49 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c, debug.c, object.c: catch up this change.
+ * ext/extmk.rb (extmake): git rid of post-1.8 features for cross
+ compilation. [ruby-core:50160] [Bug #7439]
-Mon Nov 4 22:20:16 2013 Tanaka Akira <akr@fsij.org>
+Tue Nov 27 00:13:41 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * test/xmlrpc: Don't use fixed ports: 8070 and 8071.
+ * thread.c (rb_mutex_trylock, rb_mutex_unlock, mutex_sleep):
+ raises ThreadError if called from trap handler as Thread#join.
+ * NEWS: news for the above.
-Mon Nov 4 15:25:52 2013 Tanaka Akira <akr@fsij.org>
+Mon Nov 26 23:55:33 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * test/xmlrpc/webrick_testing.rb (start_server): Initialize the server
- at main thread to fail early.
+ * NEWS: update for Thread#join incompatible change.
-Mon Nov 4 10:08:17 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Nov 26 22:44:24 2012 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
+ * thread.c (rb_thread_terminate_all): use native_sleep() instead
+ of rb_thread_schedule(). Otherwise, it consume 100% cpu meaninglessly.
+ [Bug #5368] [ruby-dev:44546]
+ * thread.c (thread_start_func_2): last sub-thread wakes up main thread.
-Sun Nov 3 23:06:51 2013 Tanaka Akira <akr@fsij.org>
+Mon Nov 26 21:16:04 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * sample/test.rb: Make temporary file names unique.
+ * vm_core.h (RUBY_VM_SET_TIMER_INTERRUPT, RUBY_VM_SET_INTERRUPT)
+ (RUBY_VM_SET_FINALIZER_INTERRUPT, RUBY_VM_SET_TRAP_INTERRUPT)
+ (RUBY_VM_INTERRUPTED): use enum symbol instead of immediate value.
+ * thread.c (thread_join_m, rb_threadptr_execute_interrupts): ditto.
+ * signal.c (signal_exec): ditto.
-Sun Nov 3 20:41:17 2013 Tanaka Akira <akr@fsij.org>
+Mon Nov 26 20:23:20 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * test/xmlrpc: Wrap definitions by TestXMLRPC module.
+ * thread.c (thread_join_m): use th->interrupt_mask instead of
+ th->in_trap.
-Sun Nov 3 20:23:38 2013 Tanaka Akira <akr@fsij.org>
+ * vm_core.h (struct rb_thread_struct): remove in_trap member.
+ * signal.c (signal_exec): ditto.
+ * thread.c (thread_create_core): ditto.
+ * thread.c (Init_Thread): ditto.
- * test/xmlrpc/webrick_testing.rb (stop_server): Don't try to shutdown
- the server if the server is not started.
+Mon Nov 26 20:23:49 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Sun Nov 3 09:35:47 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/ruby/test_argf.rb (TestArgf#test_chars): since marshal data is
+ binary, shouldn't pass via text mode. use base64 encoded data.
- * load.c (rb_feature_p): deal with default loadable suffixes.
+Mon Nov 26 19:45:18 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * load.c (load_lock): initialize statically linked extensions.
+ * ruby_atomic.h (ATOMIC_CAS): new macro for compare-and-exchange.
- * load.c (search_required, rb_require_safe): deal with statically
- linked extensions.
+ * vm_core.h (struct rb_thread_struct): add interrupt_mask member.
+ * thread.c (thread_create_core, Init_Thread): initialize
+ th->thread_mask.
- * load.c (ruby_init_ext): defer initialization of statically linked
- extensions until required actually. [Bug #8883]
+ * vm_core.h (RUBY_VM_INTERRUPTED_ANY): new macro for avoiding
+ bare th->interrupt_flag.
+ * vm_core.h (RUBY_VM_INTERRUPTED, RUBY_VM_INTERRUPTED): check
+ th->interrupt_mask.
+ * thread.c (set_unblock_function, rb_thread_schedule): replace
+ th->interrupt_flag with RUBY_VM_INTERRUPTED_ANY()
-Sat Nov 2 15:14:33 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * signal.c (signal_exec): set up thread->interrupt_mask for
+ preventing recursive trap handler.
+ * vm_core.h (RUBY_VM_CHECK_INTS, RUBY_VM_CHECK_INTS_BLOCKING): ditto.
- * lib/logger.rb (Logger::LogDevice::LogDeviceMutex#lock_shift_log):
- open file can't be removed or renamed on Windows. [ruby-dev:47790]
- [Bug #9046]
+ * thread.c (rb_threadptr_execute_interrupts):
+ don't process interrupt if it is masked.
+ [Bug #6009] [ruby-core:42524]
- * test/logger/test_logger.rb (TestLogDevice#run_children): don't use
- fork.
+Mon Nov 26 19:43:42 2012 Koichi Sasada <ko1@atdot.net>
-Sat Nov 2 07:08:43 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * iseq.c (make_compile_option_value): add trace_instruction option.
+ a patch by davidbalbert (David Albert).
+ [Bug #6786]
- * 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]
+Mon Nov 26 19:10:53 2012 Koichi Sasada <ko1@atdot.net>
-Fri Nov 1 23:24:31 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * bootstraptest/test_thread.rb: try to `join' each 100
+ threads.
+ This benchmark seems consuming long time on travis-ci
+ several times (and make `failure').
- * gc.c (wmap_mark_map): mark live objects only, but delete zombies.
- [ruby-dev:47787] [Bug #9069]
+Mon Nov 26 18:22:56 2012 Koichi Sasada <ko1@atdot.net>
-Fri Nov 1 22:45:54 2013 Masaya Tarui <tarui@ruby-lang.org>
+ * common.mk: specify label `built-ruby'.
- * gc.c (struct heap_page, gc_page_sweep, gc_sweep): Refactoring for
- performance. Add before_sweep condition to heap_page structure.
+ * benchmark/driver.rb: quote path.
- * gc.c (rb_gc_force_recycle): Use before_sweep member.
+Mon Nov 26 18:26:28 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * gc.c (heap_is_before_sweep, is_before_sweep): Remove. They have not
- already been used.
+ * signal.c (signal_exec): add volatile to make sure setjmp safe.
-Fri Nov 1 22:20:28 2013 Masaya Tarui <tarui@ruby-lang.org>
+Mon Nov 26 18:19:47 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * gc.c (make_deferred): Refactoring. Collect codes which should be
- atomic.
+ * signal.c (signal_exec): suppress "warning: variable 'signum'
+ might be clobbered by 'longjmp' or 'vfork'" warning.
- * gc.c (make_io_deferred, obj_free, rb_objspace_call_finalizer,
- gc_page_sweep): Correspond to the above.
+Mon Nov 26 18:15:47 2012 Koichi Sasada <ko1@atdot.net>
-Fri Nov 1 21:40:35 2013 Masaya Tarui <tarui@ruby-lang.org>
+ * benchmark/driver.rb: accept multiple `-e'.
+ You don't need to use `;' separation character.
+ [ruby-core:50139] [ruby-trunk - Bug #7380]
- * gc.c (typedef struct rb_objspace): Refactoring. Move some members
- into profile member.
+Mon Nov 26 17:10:04 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * gc.c (newobj_of): Correspond to the above.
+ * string.c (rb_str_enumerate_chars, rb_str_enumerate_codepoints)
+ (rb_str_enumerate_lines): suppress "may be used uninitialized in
+ this function" warning.
- * gc.c (finalize_list): Ditto.
+Mon Nov 26 17:00:12 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * gc.c (objspace_live_num): Ditto.
+ * vm_core.h (rb_thread_struct): added 'in_trap' member for marking
+ running trap handler.
+ * signal.c (signal_exec): turn on in_trap when running trap.
+ * thread.c (Init_Thread, thread_create_core): initialize in_trap
+ when creating new threads.
+ * thread.c (thread_join_m): raise ThreadError when running trap
+ handler.Bug [#6416][ruby-core:44956]
+ * test/ruby/test_thread.rb (test_thread_join_in_trap): new test
+ for the above.
- * gc.c (gc_page_sweep): Ditto.
+Mon Nov 26 16:36:13 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * gc.c (rb_gc_force_recycle): Ditto.
+ * io.c (argf_each_codepoint): add missing ARGF#codepoints [Bug #7438]
- * gc.c (garbage_collect_body): Ditto.
+Mon Nov 26 15:50:29 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * gc.c (rb_gc_count): Ditto.
+ * bignum.c (bigdivrem): restart calculation when bigdivrem1 was
+ interrupted by signal. Otherwise, ruby script may see a garbage
+ value.
- * gc.c (gc_stat): Ditto.
+Mon Nov 26 15:33:02 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * gc.c (gc_prof_set_heap_info): Ditto.
+ * bignum.c (big_div_struct): added volatile to 'stop' member.
+ Otherwise, "if (bds->stop)" check in bigdivrem1 don't read
+ memory and ignore interrupt.
+ * bignum.c (bigdivrem, rb_big_stop): ditto.
- * gc.c (gc_profile_dump_on): Ditto.
+Mon Nov 26 12:11:09 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Nov 1 20:53:56 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * win32/Makefile.sub (DLNOBJ): missing in r37821.
- * string.c (rb_str_scrub): fix typo, should yield invalid byte
- sequence to be scrubbed. reported by znz at IRC.
+Mon Nov 26 10:50:19 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Fri Nov 1 17:25:30 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/ruby/test_process.rb (test_setsid): added a few wait for
+ preventing that Process.getsid(io.pid) makes Errno::ESRCH.
- * gc.c (is_live_object): finalizer may not run because of lazy-sweep.
- [ruby-dev:47786] [Bug #9069]
+Sun Nov 25 22:34:00 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-Fri Nov 1 16:55:52 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * array.c (ary_resize_smaller): new function to resize array.
- * string.c (rb_str_scrub): export with fixed length arguments, and
- allow nil as replacement string instead of omitting.
+ * array.c (rb_ary_delete): refactoring to extract a function.
-Fri Nov 1 06:20:44 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * array.c (rb_ary_delete_same): refactoring.
+ It renames function, reduces duplicated code and removes unused
+ code.
- * 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]
+ * gc.c (wmap_final_func): follow the above change.
-Fri Nov 1 01:08:33 2013 Koichi Sasada <ko1@atdot.net>
+ * internal.h (rb_ary_delete_same): ditto.
- * benchmark/gc/gcbench.rb: print HWM (high water mark) if possible.
+Sun Nov 25 22:27:33 2012 Benoit Daloze <eregontp@gmail.com>
-Thu Oct 31 21:48:31 2013 Kouhei Sutou <kou@cozmixng.org>
+ * array.c: fixes for the updated documentation in r35858:
+ Typos and #take/#drop accept to take/drop 0 elements.
- * lib/rexml/parsers/streamparser.rb: Add dependency file require.
- [Bug #9062] [ruby-dev:47779]
- Reported by Ippei Obayashi. Thanks!!!
+Sun Nov 25 19:43:29 2012 Kazuki Tsujimoto <kazuki@callcc.net>
-Thu Oct 31 14:09:32 2013 Koichi Sasada <ko1@atdot.net>
+ * NEWS: add a news about iconv.
- * vm_method.c (rb_method_entry_make): fix to pass an ISeq value.
- OBJ_WRITTEN() accepts only VALUE.
+Sun Nov 25 03:49:23 2012 Akinori MUSHA <knu@iDaemons.org>
-Wed Oct 30 19:07:57 2013 Akinori MUSHA <knu@iDaemons.org>
+ * lib/set.rb, test/test_set.rb: Move tests embedded in lib/set.rb
+ to test/test_set.rb.
- * 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]
+Sun Nov 25 03:44:50 2012 Akinori MUSHA <knu@iDaemons.org>
-Wed Oct 30 12:44:28 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * string.c (rb_str_each_line, rb_str_lines): String#lines now
+ returns an array instead of an enumerator. Passing a block is
+ deprecated but still supported for backwards compatibility.
+ Based on the patch by yhara. [Feature #6670]
- * win32/Makefile.sub (config.status): add missing variables,
- PLATFORM_DIR and THREAD_MODEL.
+ * string.c (rb_str_each_char, rb_str_chars): Ditto for
+ String#chars.
-Wed Oct 30 12:20:32 2013 Tanaka Akira <akr@fsij.org>
+ * string.c (rb_str_each_codepoint, rb_str_codepoints): Ditto for
+ String#codepoints.
- * time.c (v2w): Normalize a rational value to an integer if possible.
- [ruby-core:58070] [Bug #9059] reported by Isaac Schwabacher.
+ * string.c (rb_str_each_byte, rb_str_bytes): Ditto for
+ String#bytes.
-Wed Oct 30 12:08:41 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * NEWS: Add notes for the above changes.
- * array.c (rb_ary_uniq_bang): use rb_ary_modify_check() instead of
- rb_ary_modify() because the array will be unshared soon.
+Sun Nov 25 02:07:37 2012 Akinori MUSHA <knu@iDaemons.org>
-Wed Oct 30 03:25:10 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+ * test/ruby/envutil.rb (Test::Unit::Assertions#assert_warning)
+ (Test::Unit::Assertions#assert_warn), test/ruby/envutil.rb,
+ test/ruby/test_enumerator.rb, test/ruby/test_io_m17n.rb,
+ test/ruby/test_regexp.rb, test/ruby/test_syntax.rb:
+ assert_warn() and assert_warning() are reversed.
- * ext/psych/lib/psych/visitors/yaml_tree.rb: make less garbage when
- testing if a string is binary.
+Sat Nov 24 21:08:50 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-Wed Oct 30 03:08:24 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+ * gc.c (wmap_final_func): rename variables to clarify the meaning.
+ In wmap2obj the key is WeakRef and the value is referenced object.
+ In obj2wmap the key is referenced object and the value is an array
+ of WeakRef.
- * 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
+ * gc.c (wmap_finalize): ditto.
+ [ruby-core:49044] [Bug #7304]
- * test/psych/test_string.rb: test for fix
+Sat Nov 24 21:01:55 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-Tue Oct 29 23:01:18 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * array.c (rb_ary_delete_same_obj): new function for WeakRef.
+ This deletes same objects as item argument in the array.
- * array.c (rb_ary_zip): some refactoring.
+ * internal.h (rb_ary_delete_same_obj): add a declaration.
-Tue Oct 29 22:11:37 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * gc.c (wmap_final_func): remove WeakRef object reference from the
+ array. rb_ary_delete() is not usable because it uses rb_equal() to
+ compare object references.
- * array.c (rb_ary_uniq_bang): use st_foreach() instead of for loop.
+ * gc.c (wmap_finalize): remove recycled object references from weak
+ map hash properly. How to get object reference from object id was
+ wrong. st_delete() doesn't work properly if key and value arguments
+ are same. The key of obj2wmap is referenced object and the value of
+ obj2wmap is WeakRef array.
-Tue Oct 29 20:01:58 2013 Koichi Sasada <ko1@atdot.net>
+ * gc.c (wmap_aset): obj2wmap should contain WeakRef array in the
+ definition.
- * add RUBY_TYPED_FREE_IMMEDIATELY to data types which only use
- safe functions during garbage collection such as xfree().
+ * test/test_weakref.rb
+ (TestWeakRef#test_not_reference_different_object,
+ TestWeakRef#test_weakref_finalize): add tests for above.
+ [ruby-core:49044] [Bug #7304]
- 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.
+Sat Nov 24 19:44:41 2012 NARUSE, Yui <naruse@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/nkf/nkf-utf8/nkf.c (unicode_iconv_combine): returning flags are
+ nkf_char.
- * cont.c: ditto.
+Sat Nov 24 19:29:18 2012 Tadayoshi Funaba <tadf@dotrb.org>
- * dir.c: ditto.
+ * test/ruby/test_rubyoptions.rb (test_usage, test_usage_long):
+ reduced, renamed.
- * encoding.c: ditto.
+Sat Nov 24 13:10:14 2012 Koichi Sasada <ko1@atdot.net>
- * enumerator.c: ditto.
+ * vm_trace.c (rb_tracepoint_attr_raised_exception): should not check
+ value before event checking.
- * error.c: ditto.
+ * vm_trace.c (rb_tracepoint_attr_return_value): ditto.
- * file.c: ditto.
+ * test/ruby/test_settracefunc.rb: add tests for TracePoint#return_value
+ and TracePoint#raised_exception.
- * gc.c: ditto.
+Sat Nov 24 12:47:27 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
- * io.c: ditto.
+ * test/ruby/test_process.rb (TestProcess#test_setsid): "./ruby-trunk"
+ doesn't work on all environments. EnvUtil.rubybin would be suitable.
- * iseq.c: ditto.
+Sat Nov 24 12:28:04 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+
+ * array.c (rb_ary_aref): fix Segmentation fault at TestArray#test_aref
+ on x64 mingw. Variable argument of rb_scan_args() should be a pointer
+ (VALUE *), but 0 of variable argument seems not equal to null pointer
+ on x64 mingw.
+
+Sat Nov 24 11:47:14 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * process.c (proc_getsid): adds new method for getting session id.
+ Contributed from fumiyas (Fumiyasu SATOH). Thank you!
+ [Feature #6757] [ruby-dev:45977]
+ * configure.in: adds getsid check.
+ * test/ruby/test_process.rb (TestProcess#test_setsid): new test
+ for the above.
+ * NEWS: news for the above.
+
+Sat Nov 24 10:59:14 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * thread.c (thread_create_core): don't use th->thread_id before
+ initialized.
+
+Sat Nov 24 00:00:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ruby.c (proc_options, process_options, ruby_process_options): take
+ care of the case argc is 0, and check if argv has NULL.
+ [ruby-core:49889] [Bug #7423]
+
+Sat Nov 24 00:00:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in (--disable-dln): option to disable dynamic linking
+ feature. [ruby-core:37676] [Feature #4946]
+
+Fri Nov 23 23:44:41 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/mkmf.rb (MakeMakefile#pkg_config): strip all white spaces for
+ mingw64+MSYS pkg-config which erroneously emits extra newlines.
+ [ruby-core:47998] [Bug #7163]
+
+Fri Nov 23 17:31:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ruby.c (usage): wrap description lines if options are too long.
+
+Fri Nov 23 11:13:46 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * test/ruby/test_rubyoptions.rb (TestRubyOptions#test_usage2): refine
+ assertion.
+
+ * test/ruby/test_rubyoptions.rb (TestRubyOptions#test_usage2): now
+ --help option is for modern terminals.
+
+Fri Nov 23 10:45:00 2012 Zachary Scott <zachary@zacharyscott.net>
+
+ * ext/socket/ipsocket.c (IPSocket#peeraddr): Fix example
+ [ruby-core:46429] [Bug #6732]
+
+Fri Nov 23 02:40:00 2012 Zachary Scott <zachary@zacharyscott.net>
+
+ * lib/cgi/core.rb: Documentation for CGI#header alias
+ Based on a patch by Marcus Stollsteimer
+ [ruby-core:49585] [Bug #7405]
+
+Thu Nov 22 23:48:10 2012 Narihiro Nakamura <authornari@gmail.com>
+
+ * gc.c (is_swept_object): extract from is_dead_object().
+
+ * gc.c (rb_gcdebug_print_obj_condition): add the function for debug.
+ This function shows some conditions of given object (e.g.,
+ marked, in heap, swept).
+
+ * gc.c (rb_gcdebug_sentinel): add the function for debug.
+ This function allow check to inadvertently free up an object.
+
+Thu Nov 22 23:45:18 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+
+ * array.c (rb_ary_shared_with_p): fix cache validity check.
+ If #pop or #shift has been called against $: or $", the array will
+ be still shared with the snapshot. We check array length for cache
+ validity.
+ [ruby-core:49518] [Bug #7383]
+
+ * test/ruby/test_require.rb
+ (TestRequire#test_require_with_array_pop,
+ TestRequire#test_require_with_array_shift): add tests for above.
+
+Thu Nov 22 21:48:48 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * common.mk, win32/Makefile.sub (probes.dmyh): now be made in current
+ (=build) directory if build from the repository.
+
+Thu Nov 22 21:34:51 2012 Tadayoshi Funaba <tadf@dotrb.org>
+
+ * test/ruby/test_rubyoptions.rb: added a test.
+
+Thu Nov 22 20:32:07 2012 Tadayoshi Funaba <tadf@dotrb.org>
+
+ * complex.c (string_to_c_strict, string_to_c): check NUL.
+ * rational.c (string_to_r_strict, string_to_r): ditto.
+
+Thu Nov 22 20:21:45 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * Makefile.in (.dmyh.h): removed $(VPATH). GNU make don't
+ recognize suffix rule with VPATH.
+
+Thu Nov 22 18:11:27 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * common.mk, Makefile.in, win32/Makefile.sub (.dmyh.h): nmake merges
+ explicit rules for same target, but not merges explicit rules and
+ implicit rules -- always explicit rules win. So, need to add an
+ explicit rule for probes.h. [Bug #7421] [ruby-core:49839]
+
+Thu Nov 22 18:01:28 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * Makefile.in (probes.o): add -C to ignore #include in probes.d.
+
+ * probes.d: include vm_opts.h instead of vm_core.h.
+
+ * vm_opts.h (VM_COLLECT_USAGE_DETAILS): move definition from vm_core.h.
+
+Thu Nov 22 17:45:17 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * ext/nkf/nkf-utf8: Merge b0a6577a521d1bba5e19853f95d5c4b9be1072b5.
+ Support JIS X 0213 and some bugfixes.
+
+Thu Nov 22 17:39:37 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * tool/gen_dummy_probes.rb: don't change #include, #if and #endif
+ lines. [Bug #7370]
+
+Thu Nov 22 16:58:26 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * Makefile.in: run preprocessor when making probe.h
+ * probes.d: define probe insn and insn__operand only when
+ VM_COLLECT_USAGE_DETAILS is 1. [Bug #7370]
+
+Thu Nov 22 16:20:49 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * vm.c: Don't define vm_collect_usage_operand() and
+ static void vm_collect_usage_insn() when disabling
+ VM_COLLECT_USAGE_DETAILS. (refix r37796)
+
+Thu Nov 22 15:26:02 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * vm_insnhelper.h: partly revert r37631 (DTrace support).
+ "vm usage information is always collected, so uncomment the
+ functions." causes performance impact. [Bug #7370]
+ Off course this revert disables related probes.
+
+Thu Nov 22 14:14:36 2012 Akinori MUSHA <knu@iDaemons.org>
+
+ * re.c (rb_memsearch_ss): Apply performance improvement to short
+ byte array search for platforms without memmem(3).
+ [Feature #6311] [ruby-dev:45530]
+
+Thu Nov 22 12:52:19 2012 Akinori MUSHA <knu@iDaemons.org>
- * marshal.c: ditto.
+ * test/ruby/test_string.rb (TestString#test_index): Add some
+ corner cases to tests for String#index, which might fail if ruby
+ directly used a buggy memmem(3) implementation.
+Thu Nov 22 08:06:42 2012 Narihiro Nakamura <authornari@gmail.com>
+
+ * test/ruby/test_gc.rb (test_profiler_clear): fix wrong method
+ calls [Bug #7419] [ruby-core:49828].
+
+Thu Nov 22 02:22:33 2012 Tadayoshi Funaba <tadf@dotrb.org>
+
+ * NEWS: edited (order etc).
+
+Wed Nov 21 22:52:59 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/io/wait/wait.c (io_wait_readable): add alias wait_readable.
+
+ * ext/io/wait/wait.c (io_wait_writable): this is easier to use than
+ IO.select for a single IO object and is immune to the
+ limitations/inefficiency of select() on platforms where poll/ppoll
+ is available. patched by Eric Wong. [Feature #4646]
+
+Wed Nov 21 22:27:52 2012 Narihiro Nakamura <authornari@gmail.com>
+
+ * gc.c (garbage_collect): remove a duplicative probe.
+
+Wed Nov 21 22:08:48 2012 Narihiro Nakamura <authornari@gmail.com>
+
+ * gc.c (gc_profile_clear): realloc profile records if its size is
+ higher than the threshold, GC_PROFILE_RECORD_DEFAULT_SIZE * 2.
+
+Wed Nov 21 21:53:29 2012 Tadayoshi Funaba <tadf@dotrb.org>
+
+ * complex.c (nucomp_to_c): added.
+
+Wed Nov 21 21:35:38 2012 Tadayoshi Funaba <tadf@dotrb.org>
+
+ * include/ruby/util.h: removed extra semicolon in definition of
+ macro.
+ * compile.c: ditto.
+ * cont.c: ditto.
+ * math.c: ditto.
+ * node.c: ditto.
* parse.y: ditto.
- * proc.c: ditto.
+Wed Nov 21 18:46:37 2012 Tadayoshi Funaba <tadf@dotrb.org>
- * process.c: ditto.
+ * rational.c (read_digits): due to a bit tighter rb_cstr_to_inum().
- * random.c: ditto.
+Wed Nov 21 16:13:37 2012 Koichi Sasada <ko1@atdot.net>
- * thread.c: ditto.
+ * benchmark/bm_so_nsieve_bits.rb: add an encoding pragma because
+ this benchmark using strings (literals) as binary sequence.
+ Now, they are UTF-8 strings. [ruby-dev:46578]
- * time.c: ditto.
+Wed Nov 21 00:57:43 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * transcode.c: ditto.
+ * file.c (Init_File): null device definition uses rb_define_const
+ instead of rb_file_const.
- * variable.c: ditto.
+Wed Nov 21 00:28:18 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * vm.c: ditto.
+ * test/ruby/test_m17n_comb.rb (test_str_crypt): Use RbConfig to get
+ libc's directory. Patched by Vit Ondruch [ruby-core:49763] [Bug #7312]
+
+Tue Nov 20 23:28:26 2012 Masaki Matsushita <glass.saga@gmail.com>
+
+ * marshal.c: add marshal readahead. marshalized Array, Hash and Struct
+ have size at least number of its elements, marshal readahead will
+ read the certain readable length and buffer when it needs more bytes.
+ marshal readahead prevents many calls to IO#getbyte and IO#read,
+ then it enables performance improvement.
+ [ruby-dev:45637] [Feature #6440]
+
+Tue Nov 20 22:35:02 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * Makefile.in (.d.h): replace char * to const char * because somehow
+ current dtrace removes const of function declaration in probes.d.
+
+Tue Nov 20 21:41:04 2012 Koichi Sasada <ko1@atdot.net>
+
+ * include/ruby/debug.h: introduced.
+ Debugging/profiling features will be located.
+
+ * vm_trace.c: expose C-level TracePoint APIs.
+ Note that they are experimental.
+
+ * vm_trace.c, include/ruby/debug.h: rename `rb_hook_flag_t'
+ to `rb_event_hook_flag_t'.
+ Macro names `RUBY_HOOK_FLAG_*' are also renamed to
+ `RUBY_EVENT_HOOK_FLAG_*'.
+
+ * debug.h, vm_debug.h: rename debug.h to vm_debug.h.
+
+ * common.mk: ditto.
+
+ * debug.c, main.c, vm_core.h: ditto.
+
+Tue Nov 20 21:12:37 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * configure.in (RUBY_DTRACE_AVAILABLE): only check dtrace availability.
+
+ * configure.in (RUBY_DTRACE_POSTPROCESS): restore.
+
+Tue Nov 20 21:22:44 2012 Masaki Suketa <masaki.suketa@nifty.ne.jp>
+
+ * test/win32ole/test_win32ole_type.rb (test_implemented_ole_types):
+ IShellDispatch6 bundled in Windows 8. Thanks to phasis68 (Heesob
+ Park). [ruby-core:49580][Bug #7403]
+
+Tue Nov 20 21:06:41 2012 Tadayoshi Funaba <tadf@dotrb.org>
+
+ * complex.c: some improvements.
+ * rational.c: ditto.
+
+Tue Nov 20 21:01:16 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * common.mk (incs): BSD make cannot deal with non-prefixed dependency
+ and prefixed target.
+
+Tue Nov 20 20:10:23 2012 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * array.c (rb_ary_bsearch): fix rdoc bug (O(n log n) -> O(log n)).
+ Patch by Charlie Somerville. [ruby-core:49661] [Bug #7409]
+
+ * range.c (range_bsearch): ditto.
+
+Tue Nov 20 19:02:44 2012 Koichi Sasada <ko1@atdot.net>
+
+ * vm_trace.c: rename and add TracePoint APIs.
+ (1) TracePoint.new(...){...} creates a new trace point
+ but does not make it enable.
+ (2) TracePoint.trace(...){...} creates a new trace point
+ and enable it (same as old behavior).
+ (3) TracePoint#enable make it enable (renamed from TracePoint#retrace).
+ If block given, when enable only in block.
+ (4) TracePoint#disable make it disable (renamed from TracePoint#untrace).
+ If block given, when disable only in block.
+ (5) TracePoint#enabled? returns this trace is enable or not.
+ [Feature #6895]
+
+ * test/ruby/test_settracefunc.rb: add tests.
+
+Tue Nov 20 18:35:05 2012 Koichi Sasada <ko1@atdot.net>
+
+ * vm_trace.c: add two methods:
+ (1) TracePoint#return_value which returns return
+ value on the :return and :c_return event.
+ (2) TracePoint#raised_exception which returns raised exception
+ value on the :raise event.
+ Each methods raise RuntimeError if it is called at unsupported
+ event.
+ Please review and give us feedback until next preview
+ release (Dec/2012) of Ruby 2.0.0.
+ [Feature #6895]
+
+ * insns.def, vm.c, vm_eval.c, vm_insnhelper.c, eval.c, thread.c:
+ ditto.
+
+ * vm_trace.c, vm_core.h: move definition of rb_trace_arg_t from
+ vm_trace.c to vm_core.h.
+ Caller fills rb_trace_arg_t and pass the pointer of this variable.
+
+ * test/ruby/test_settracefunc.rb: fix tests to test this change.
+
+Tue Nov 20 17:31:12 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * configure.in: fix dtrace didn't work on darwin.
+
+ * configure.in (RUBY_DTRACE_AVAILABLE): unify RUBY_DTRACE_POSTPROCESS
+ and RUBY_DTRACE_BSD_BROKEN.
+
+Tue Nov 20 15:20:00 2012 Zachary Scott <zachary@zacharyscott.net>
+
+ * file.c (File.extname): Documentation for extname on dotfiles and
+ files ending with a dot. Also, added example for this.
+ [ruby-core:47852] [Bug #7112]
+
+Tue Nov 20 14:19:20 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * test/ruby/test_signal.rb (TestSignal#test_signame): fix windows
+ test failure. Process.kill on windows can't send a signal to
+ another process.
+
+Tue Nov 20 13:58:11 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * io.c (Init_IO): moved all rb_file_const() into file.c.
+ * file.c (Init_File): replace with rb_file_const() with
+ rb_define_const() because RDoc don't care rb_file_const.
+ [Bug #5530]
+
+Tue Nov 20 12:35:00 2012 Zachary Scott <zachary@zacharyscott.net>
+
+ * ruby.c (usage_msg): Fix typo [ruby-core:49205] [Bug #7327]
+
+Tue Nov 20 12:35:00 2012 Zachary Scott <zachary@zacharyscott.net>
+
+ * file.c (File::NULL): Document File::NULL constant
+ [ruby-core:49384] [Bug #7365]
+
+Tue Nov 20 12:05:15 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * win32/win32.c (rb_w32_read): Windows 8 fixed one of a bug of console
+ API.
+ based on the patch by Heesob Park at [ruby-core:49479] [Bug #7379]
+
+Tue Nov 20 11:14:33 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * configure.in (--enable-dtrace): always call RUBY_DTRACE_BSD_BROKEN
+ for portability.
+ As the note, FreeBSD 8 has DTrace as the optional
+ feature (it is enabled by the build option), but doesn't have USDT.
+ FreeBSD 9 has USDT but they are still optional. FreeBSD 10 will
+ enable them by default.
+ The variable $rb_cv_prog_dtrace_g is "yes" only on FreeBSD 9 with
+ optional DTrace or FreeBSD 10. If it is "no", you cannot know
+ whether it doesn't need -G or DTrace is disabled. (by checking
+ error code, you can know)
+
+Mon Nov 19 22:55:48 2012 Naohisa Goto <ngotogenome@gmail.com>
+
+ * configure.in (--enable-dtrace): change help message
+
+Tue Nov 20 11:05:00 2012 Zachary Scott <zachary@zacharyscott.net>
+
+ * lib/tracer.rb (Tracer.trace_func): printf to stdout
+ Patch by Michal Fojtik [ruby-core:45219] [Bug #6490]
+
+Mon Nov 19 21:24:18 2012 Naohisa Goto <ngotogenome@gmail.com>
+
+ * vm_dump.c: not to include probes.h because the code does not depend
+ on it.
+ * common.mk (vm_dump.$(OBJEXT)): remove dependency on probes.h
+
+Tue Nov 20 10:14:22 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * thread.c (rb_thread_s_check_interrupt): removed redundant
+ GET_THREAD().
+
+Tue Nov 20 10:12:46 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * thread.c (rb_threadptr_async_errinfo_active_p): added a small
+ comment.
+
+Tue Nov 20 10:05:56 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * thread.c (rb_thread_blocking_region_end): replaced GET_THREAD()
+ with ruby_thread_from_native(). We don't have GVL here.
+
+Tue Nov 20 09:56:15 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * thread.c (rb_threadptr_execute_interrupts) removed.
+ * thread.c (rb_threadptr_execute_interrupts_common) renamed to
+ rb_threadptr_execute_interrupts. I.e. unified
+ rb_threadptr_execute_interrupts and rb_threadptr_execute_interrupts_common.
+ * thread.c (rb_thread_schedule, rb_thread_execute_interrupts) s/_common//.
+
+Tue Nov 20 09:48:34 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * signal.c (rb_get_next_signal): removed pointless signal
+ disabling. pthread_sigmask() only changes current thread
+ mask.
+
+Tue Nov 20 09:36:55 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * signal.c (install_sighandler): added comments why we need
+ rb_disable_interrupt().
+
+Tue Nov 20 09:31:33 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * signal.c (rb_disable_interrupt, rb_enable_interrupt): removed
+ USE_TRAP_MASK.
+ * signal.c (trap_arg, trap_ensure): removed.
+ * signal.c (trap, sig_trap): removed pointless signal disabling.
+ We don't need it because we no longer run trap handler on signal
+ handler context.
+
+Tue Nov 20 09:20:49 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * prelude.rb: Moved Mutex#synchronize to
+ * thread.c (rb_mutex_synchronize_m): here. [Bug #4266]
+
+Tue Nov 20 08:36:15 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * signal.c (sig_signame): implements Signal.signame method
+ [Feature #5613]
+ * test/ruby/test_signal.rb (test_signame): adds test for above
+ * NEWS: add an item about above
+
+Mon Nov 19 16:30:59 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * struct.c (rb_struct_each_pair): yield associated pairs so that
+ an unsplat argument can get both, for consistency with Hash,
+ OpenStruct, and etc. [ruby-dev:46533] [Bug #7382]
+
+Mon Nov 19 16:17:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in (LIBS): libelf is need on only FreeBSD.
+
+Mon Nov 19 16:08:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * common.mk (RUBYLIB): purelib option in runruby.rb is deprecated
+ since r28841, so set to an empty list to get rid of a bogus path in
+ child processes, which caused an insecure operation exception in
+ test/ruby/test_encoding.rb:test_unsafe.
+
+Mon Nov 19 15:40:50 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
+
+ * .travis.yml (script): add OPTS=-v, requested by @_ko1.
+
+Mon Nov 19 15:09:07 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * configure.in: fix didn't enable_dtrace=yes on auto.
+
+ * configure.in: see enable_dtrace for adding libelf on FreeBSD.
+
+ * common.mk: VPATH is not needed.
+
+Mon Nov 19 14:55:51 2012 Koichi Sasada <ko1@atdot.net>
+
+ * thread.c: add `Thread#backtrace_locations' method.
+ This method is similar to `caller_locations' method for
+ specific method.
+ And fix to accept `level' and `n' parameters for `Thread#backtrace'
+ and `Thread#backtrace_locations'.
+ `caller' (and `caller_locations') do not return `caller' method
+ frame.
+ However, `Thread#backtrace' (and `Thread#backtrace_locations')
+ return `Thread#backtrace' method frame itself
+ if `Thread.current.backtrace' was called.
* vm_backtrace.c: ditto.
- * vm_trace.c: ditto.
+ * internal.h: ditto.
- * ext/bigdecimal/bigdecimal.c: ditto.
+ * test/ruby/test_backtrace.rb: add tests.
- * ext/objspace/objspace.c: ditto.
+Mon Nov 19 14:54:32 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * ext/stringio/stringio.c: ditto.
+ * Makefile.in, common.mk (probes.h): moved to common.mk and changed to
+ see $(srcdir).
- * ext/strscan/strscan.c: ditto.
+ * common.mk (probes.dmyh): now created it on $(srcdir) always.
-Tue Oct 29 19:48:33 2013 Koichi Sasada <ko1@atdot.net>
+ * win32/Makefile.sub (.SUFFIXES): removed common suffix.
- * include/ruby/ruby.h: fix typo (FL_WB_PROTECT -> FL_WB_PROTECTED).
+Mon Nov 19 10:00:10 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Tue Oct 29 18:45:08 2013 Koichi Sasada <ko1@atdot.net>
+ * Makefile.in (.SUFFIX): bsdmake needs .SUFFIX is defined before use.
- * vm_trace.c (tp_free): removed because empty free function.
- Use RUBY_TYPED_NEVER_FREE instead.
+ * common.mk: fix path of probes.dmyh.
-Tue Oct 29 18:37:33 2013 Koichi Sasada <ko1@atdot.net>
+ * common.mk (vm_dump.o): depend probes.h.
- * 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).
+ * configure.in: FreeBSD's USDT requires libelf.
- * gc.c (obj_free): support RUBY_TYPED_FREE_IMMEDIATELY.
+Mon Nov 19 01:11:59 2012 Naohisa Goto <ngotogenome@gmail.com>
-Tue Oct 29 16:49:03 2013 Koichi Sasada <ko1@atdot.net>
+ * vm_core.h, probes_helper.h (RUBY_DTRACE_FUNC_ENTRY_HOOK,
+ RUBY_DTRACE_FUNC_RETURN_HOOK): move from vm_core.h to new file
+ probes_helper.h for narrowing dependency to probes.h.
+ * common.mk (VM_CORE_H_INCLUDES): remove dependency to probes.h.
+ * common.mk (vm.$(OBJEXT)): add dependency to probes_helper.h.
+ * vm.c, vm_insnhelper.c: include probes_helper.h.
- * gc.c (vm_malloc_increase): decrease it more carefully.
+Sun Nov 18 16:33:00 2012 Naohisa Goto <ngotogenome@gmail.com>
-Tue Oct 29 16:24:52 2013 Koichi Sasada <ko1@atdot.net>
+ * configure.in, Makefile.in, common.mk: support DTrace on Solaris 10,
+ based on r26235 by Yugui. On Solaris 10, low optimization level
+ may also be needed, e.g. optflags="-xO1" or "-xO0" with Oracle
+ SolarisStudio 12.3 cc.
- * gc.c (heap_page_resurrect): return a page in tomb heap even if
- freelist is NULL.
+ * configure.in (--enable-dtrace): new option to enable/disable
+ DTrace support. By default, trying to enable if dtrace command
+ is found on the system. It is disabled when cross compiling.
-Tue Oct 29 15:46:30 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * configure.in (RUBY_DTRACE_POSTPROCESS): new macro. checks whether
+ the dtrace on the system needs postprocessing with "dtrace -G".
+ The postprocessing is needed on Solaris 10 and other platforms.
- * ruby_atomic.h (ATOMIC_SIZE_CAS): new macro, compare and swap size_t.
+ * configure.in (RUBY_DTRACE_BSD_BROKEN): new macro. checks whether
+ the dtrace supports USDT.
-Tue Oct 29 12:08:05 2013 Tanaka Akira <akr@fsij.org>
+ * configure.in (DTRACE): move after RUBY_DTRACE_POSTPROCESS.
- * ext/readline/readline.c (readline_getc): Consider
- NULL as input.
+ * configure.in (LD): On Solaris, /usr/ccs/bin/ld is preferred.
-Tue Oct 29 11:10:08 2013 Aman Gupta <ruby@tmm1.net>
+ * configure.in, Makefile.in, common.mk (DTRACE_OBJ): new macro for
+ DTrace probe object generated by postprocessing with "dtrace -G".
- * 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.
+ * Makefile.in, common.mk (probes.$(OBJEXT)): DTrace probe object
+ generated by the postprocessing. New file probes.stamp is for
+ rebuilding related objects that may be modified by "dtrace -G".
-Tue Oct 29 09:53:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * configure.in, Makefile.in, common.mk (DTRACE_GLOMMED_OBJ): new
+ macro for DTrace static library hacks.
- * 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.
+ * configure.in, Makefile.in (LIBRUBY_A_OBJS): ditto.
- * 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
+ * Makefile.in, common.mk (ruby-glommed.$(OBJEXT)): new target with
+ rule for DTrace static library hacks.
- * class.c, include/ruby/intern.h, variable.c, vm_method.c: add
- rb_clear_constant_cache
+ * common.mk (DTRACE_DEPENDENT_OBJS): objects depended on probes.h.
- * compile.c, vm_core.h, vm_insnhelper.c: rename vmstat field in
- rb_call_info_struct to method_state
+Sun Nov 18 09:31:47 2012 Tadayoshi Funaba <tadf@dotrb.org>
- * vm_method.c: rename vmstat field in struct cache_entry to method_state
+ * complex.c (read_comp): mathn compliant.
+ * rational.c (read_num): ditto.
-Mon Oct 28 23:26:04 2013 Tanaka Akira <akr@fsij.org>
+Sun Nov 18 02:50:12 2012 Luis Lavena <luislavena@gmail.com>
- * test/readline/test_readline.rb (teardown): Clear Readline.input and
- Readline.output.
+ * win32/file.c (replace_to_long_name): correct logic around wildcard
+ characters detection and ensure wide-chars are used as pattern.
+ [ruby-core:49451] [Bug #7374]
-Mon Oct 28 21:35:31 2013 Tanaka Akira <akr@fsij.org>
+Sun Nov 18 02:02:46 2012 Tadayoshi Funaba <tadf@dotrb.org>
- * ext/-test-/file/depend, ext/-test-/postponed_job/depend,
- ext/-test-/tracepoint/depend: New files for dependencies.
+ * complex.c (read_comp): modified handling of polar form.
-Mon Oct 28 15:32:18 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sun Nov 18 00:50:44 2012 Tadayoshi Funaba <tadf@dotrb.org>
- * ext/openssl/depend (ossl.o): work around of dependency of
- thread_native.h, which depends on headers by THREAD_MODEL.
- [ruby-dev:47777]
+ * complex.c (read_comp): fixed handling of polar form.
- * ext/openssl/extconf.rb: need THREAD_MODEL.
+Sun Nov 18 00:14:46 2012 Tadayoshi Funaba <tadf@dotrb.org>
-Mon Oct 28 14:57:01 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * complex.c (string_to_c_strict, string_to_c): rewrote without regexp.
+ * rational.c (string_to_r_strict, string_to_r): ditto.
- * load.c (ruby_init_ext): share feature names between frame name and
- provided features.
+Sat Nov 17 23:53:05 2012 Tadayoshi Funaba <tadf@dotrb.org>
-Mon Oct 28 14:41:27 2013 Akinori MUSHA <knu@iDaemons.org>
+ * complex.c (make_patterns): should not accept extra sign.
- * misc/ruby-electric.el: Import ruby-electric.el 2.1 from
- https://github.com/knu/ruby-electric.el.
+Sat Nov 17 21:45:12 Luis Lavena <luislavena@gmail.com>
- * Hitting the newline-and-indent key within a comment fires
- comment-indent-new-line.
+ * win32/file.c (replace_to_long_name): skip expansion for all wildcard
+ characters.
+ [ruby-core:49451] [Bug #7374]
- * Introduce a new feature
- `ruby-electric-autoindent-on-closing-char`.
+ * test/ruby/test_file_exhaustive.rb: add more assertions to test.
- * Fix fallback behavior of ruby-electric-space/return that
- caused error with auto-complete.
+Sat Nov 17 12:14:50 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-Mon Oct 28 13:17:17 2013 Or Cohen <orc@fewbytes.com>
+ * ext/psych/lib/psych/visitors/yaml_tree.rb: use literal YAML style
+ when emitting multi-line strings. Thanks @atambo
- * error.c (name_err_to_s): remove no longer needed overriding, since
- r30455 which made exc_to_s almost same. Fixes [GH-413].
+ * test/psych/test_yaml.rb: test for change.
-Mon Oct 28 12:42:11 2013 Tanaka Akira <akr@fsij.org>
+Sat Nov 17 12:03:41 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * common.mk, ext/objspace/depend, ext/coverage/depend,
- ext/-test-/debug/depend, ext/date/depend: Update dependencies.
+ * ext/psych/lib/psych/scalar_scanner.rb: avoid raising exceptions when
+ parsing Floats and Integers. Thanks riffraff [ruby-core:44426]
+ * test/psych/test_numeric.rb: associated test
-Mon Oct 28 09:29:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+Sat Nov 17 11:34:31 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
- * vm.c: vm_clear_all_cache is not necessary now we use a 64 bit counter
- for global state version.
+ * st.c (st_update): pass the key in st_table so that we can free
+ memory of the key in st_table when deleting.
+ [ruby-core:49220] [Bug #7330]
- * vm_insnhelper.h: ruby_vm_global_state_version overflow is unnecessary
+ * test/-ext-/st/test_update.rb
+ (Bug::StTable#test_pass_objects_in_st_table): add a test.
-Mon Oct 28 07:47:32 2013 Aman Gupta <ruby@tmm1.net>
+Sat Nov 17 11:26:36 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * vm_backtrace.c (rb_profile_frame_classpath): do not use rb_inspect
- directly, since it might have a custom implementation or show ivars.
+ * ext/psych/lib/psych/core_ext.rb: move Kernel#y so that it can
+ manually be required as 'psych/y'.
-Mon Oct 28 04:10:41 2013 Aman Gupta <ruby@tmm1.net>
+ * ext/psych/lib/psych/y.rb: ditto
- * 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.
+Sat Nov 17 08:13:48 2012 Benoit Daloze <eregontp@gmail.com>
-Mon Oct 28 00:52:36 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/abbrev.rb: fix r37113. Correct examples, fix style
+ and show explicit dependency (require 'abbrev').
- * struct.c (new_struct): fix warning message, class name and encoding.
+Sat Nov 17 07:35:15 2012 Luis Lavena <luislavena@gmail.com>
-Sun Oct 27 20:53:08 2013 Tanaka Akira <akr@fsij.org>
+ * win32/file.c (replace_to_long_name): skip automatic path expansion
+ when wildcard character is used. [ruby-core:49451] [Bug #7374]
- * 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.
+ * test/ruby/test_file_exhaustive.rb: add a test for above.
- [ruby-dev:47033] [Bug #8749] reported by Nobuhiro IMAI.
- [ruby-core:57951] [Bug #9040] reported by Eamonn Webster.
+Sat Nov 17 00:50:23 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
-Sat Oct 26 19:31:28 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+ * marshal.c (w_object): add flonum to arg->data to keep reference index
+ consistency. [ruby-core:49323] [Bug #7348]
- * gc.c: catch up recent changes to compile on GC_DEBUG,
- RGENGC_CHECK_MODE.
+ * test/ruby/test_marshal.rb: add a test for above.
-Sat Oct 26 19:08:00 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Nov 17 00:40:25 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * range.c (range_initialize_copy): disallow to modify after
- initialized.
+ * common.mk (incs): dist files need probes.dmyh.
-Sat Oct 26 17:48:54 2013 Tanaka Akira <akr@fsij.org>
+ * common.mk (probes.dmyh): depends on generator script.
- * lib/open-uri.rb (meta_add_field): : Re-implemented.
- [ruby-core:58017] [Bug #9051] patch by Eamonn Webster.
+ * Makefile.in, common.mk, configure.in, win32/Makefile.sub (probes.h):
+ select generating with dtrace or copying dummy file by suffix rules.
-Sat Oct 26 14:35:09 2013 Koichi Sasada <ko1@atdot.net>
+Fri Nov 16 19:24:10 2012 Koichi Sasada <ko1@atdot.net>
- * gc.c (gc_profile_dump_on): use "Page" terminology.
+ * thread.c (rb_thread_call_without_gvl2): change the parameter of
+ `func' from `int *skip_interrupt' to `VALUE *flags'.
+ If (flags & RUBY_CALL_WO_GVL_FLAG_SKIP_CHECK_INTS) is not zero,
+ then skip checking interrupt.
+ [ruby-core:46547]
-Sat Oct 26 13:25:45 2013 Koichi Sasada <ko1@atdot.net>
+ * include/ruby/thread.h: ditto.
- * gc.c (gc_sweep, gc_heap_lazy_sweep): fix measurement code.
- We only need one sweep time measurement without lazy sweep.
+Fri Nov 16 18:59:05 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Sat Oct 26 11:59:13 2013 Tanaka Akira <akr@fsij.org>
+ * Makefile.in (no-dtrace-probes.h): dmyprobes.h is in srcdir.
- * 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).
+ * common.mk (dmyprobes.h): ditto.
-Sat Oct 26 11:35:22 2013 Koichi Sasada <ko1@atdot.net>
+Fri Nov 16 17:57:15 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c: tuning parameters.
+ * Makefile.in (probes.h): split build commands for dtrace-available
+ and unavailable platforms.
- * gc.c (GC_MALLOC_LIMIT): change default value to 16MB.
+ * Makefile.in (incs): probes.h is a platform dependent file, so it
+ cannot be a part of prereq target. move it to all-incs.
- * gc.c (GC_MALLOC_LIMIT_GROWTH_FACTOR): change default value to 2.0.
+ * configure.in (DTRACE): move after AC_PROG_CC since cross_compiling
+ is set in it.
- * gc.c (gc_before_sweep): change decrease ratio of `malloc_limit'
- from 1/4 to 1/10.
+ * configure.in (DTRACE): ignore non-prefixed version if
+ cross-compiling.
-Sat Oct 26 11:30:07 2013 Koichi Sasada <ko1@atdot.net>
+ * Makefile.in, win32/Makefile.sub (probes.h): fix copying dmyprobes.h
+ path when outplace-build.
- * 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.
+Fri Nov 16 15:27:36 2012 Masaki Matsushita <glass.saga@gmail.com>
-Sat Oct 26 06:35:41 2013 Masaya Tarui <tarui@ruby-lang.org>
+ * lib/net/pop.rb (POP3.certs): fix typo in comment.
+ patch from no6v (Nobuhiro IMAI) <nov@yo.rim.or.jp>.
+ [ruby-dev:46519] [Bug #7355]
- * gc.c (gc_before_heap_sweep): Restructure code to mean clearly.
- heap->freelist is connected to end of list.
+Fri Nov 16 12:36:47 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Sat Oct 26 04:01:35 2013 Koichi Sasada <ko1@atdot.net>
+ * test/rake/helper.rb (Rake::TestCase#setup): revert r37669.
+ @orig_PWD should be the original pwd.
- * 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.
+ * test/rake/test_*.rb: don't use @orig_PWD to load libraries.
+ It should be specified with relative path from the file.
-Thu Oct 24 21:57:24 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+Fri Nov 16 10:22:52 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * parse.y: Remove +(binary) and -(binary) special cases
- [Feature #9048]
+ * test/rake/helper.rb (Rake::TestCase#setup): @orig_PWD shouldn't be
+ Dir.pwd when the build directory is different from source directory.
-Thu Oct 24 12:45:53 2013 Zachary Scott <e@zzak.io>
+Fri Nov 16 09:41:08 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * object.c: [DOC] Document first argument also takes string for:
+ * lib/rake/version.rb: workaround fix to build. see #7366
+ [ruby-dev:46522]
- rb_mod_const_get, rb_mod_const_set, rb_mod_const_defined
+Fri Nov 16 07:23:18 2012 Eric Hodel <drbrain@segment7.net>
- Also added note about NameError exception for invalid constant name
+ * lib/rake*: Updated to rake 0.9.4
+ http://rake.rubyforge.org/doc/release_notes/rake-0_9_4_rdoc.html for
+ a list of changes in 0.9.4.
-Thu Oct 24 12:23:58 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * test/rake*: ditto
- * thread.c (rb_thread_terminate_all): add a comment why we need
- state check and call terminate_i again.
+ * NEWS: ditto
-Thu Oct 24 12:15:02 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Fri Nov 16 06:58:52 2012 Eric Hodel <drbrain@segment7.net>
- * thread.c (rb_thread_terminate_all): add a comment why infinite
- sleep is safe.
+ * lib/rake*: Updated to rake 0.9.3. See
+ http://rake.rubyforge.org/doc/release_notes/rake-0_9_3_rdoc.html for
+ a list of changes in 0.9.3.
-Thu Oct 24 07:41:42 2013 Aman Gupta <ruby@tmm1.net>
+ * test/rake*: ditto
- * 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.
+ * bin/rake: ditto
-Thu Oct 24 01:34:12 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * NEWS: ditto
- * include/ruby/win32.h (rb_infinity_float): suppress overflow in
- constant arithmetic warnings. [ruby-core:57981] [Bug #9044]
+Thu Nov 15 22:39:32 2012 Yusuke Endoh <mame@tsg.ne.jp>
-Thu Oct 24 00:11:24 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+ * range.c (range_bsearch): fix some bugs: a documentation bug, a wrong
+ condition, missed break in switch/case, and workaround for GCC
+ optimization. See [ruby-core:49364] in detail. A great patch from
+ Heesob Park. [Bug #7352] [Feature #4766]
- * 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]
+ * array.c (rb_ary_bsearch): fix similar bug (missed break).
- * test/ostruct/test_ostruct.rb: Added tests for above.
+ * test/ruby/test_range.rb: add two test cases for above.
-Thu Oct 24 00:10:22 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+Thu Nov 15 22:41:57 2012 Koichi Sasada <ko1@atdot.net>
- * array.c: Add Array#to_h [Feature #7292]
+ * vm_exec.h (GENTRY): GENTRY should be pointer size.
+ A patch by yoshidam (Yoshida Masato) [Bug #7332].
- * enum.c: Add Enumerable#to_h
+Thu Nov 15 13:20:00 2012 Zachary Scott <zachary@zacharyscott.net>
-Wed Oct 23 23:48:28 2013 Aman Gupta <ruby@tmm1.net>
+ * man/erb.1: Fix grammar and copyright dates
+ * man/goruby.1: ditto
+ * man/irb.1: ditto
+ * man/rake.1: ditto
+ * man/ri.1: ditto
+ * man/ruby.1: ditto
+ Patch by Arthur Gunn
+ [Fixes Github #210]
- * 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--
+Thu Nov 15 11:35:00 2012 Zachary Scott <zachary@zacharyscott.net>
-Wed Oct 23 22:51:03 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * man/ruby.1: Grammar edits for man page
+ Based on a patch by Michael Endsley [Fixes Github #183]
- * win32/Makefile.sub (config.h): VC 2013 supports C99 mathematics
- functions. [ruby-core:57981] [Bug #9044]
+Thu Nov 15 00:47:20 2012 Yusuke Endoh <mame@tsg.ne.jp>
-Wed Oct 23 19:13:18 2013 Koichi Sasada <ko1@atdot.net>
+ * array.c (rb_ary_bsearch): add Array#bsearch for binary search.
+ [ruby-core:36390] [Feature #4766]
- * gc.c: move increment from heap to heap_pages.
- Share `increment' information with heaps.
+ * test/ruby/test_array.rb: add a test for above.
- * gc.c: change ratio of heap_pages_free_min_page
- to 0.80.
- This change means slow down page freeing speed.
+ * range.c (range_bsearch): add Range#bsearch for binary search.
+ [ruby-core:36390] [Feature #4766]
-Wed Oct 23 17:52:03 2013 Koichi Sasada <ko1@atdot.net>
+ * test/ruby/test_range.rb: add a test for above
- * gc.c (heap_pages_free_unused_pages): cast to (int) for size_t
- variable `i'.
+ * NEWS: added the two new methods.
-Wed Oct 23 17:39:35 2013 Koichi Sasada <ko1@atdot.net>
+Wed Nov 14 13:25:00 2012 Zachary Scott <zachary@zacharyscott.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.
+ * lib/fileutils.rb (chmod): Add "X" to modes, convert format to table
+ [ruby-core:48965] [Bug #7288]
- 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)
+Wed Nov 14 11:51:00 2012 Zachary Scott <zachary@zacharyscott.net>
- To introduce this patch, there are several tuning of GC parameters.
+ * lib/csv.rb (init_comments): Document private method #init_comments.
+ Based on a patch from Vincent Batts [ruby-core:49172] [Bug #7319]
-Wed Oct 23 14:20:56 2013 Koichi Sasada <ko1@atdot.net>
+Wed Nov 14 00:54:00 2012 Kenta Murata <mrkn@mrkn.jp>
- * gc.c (gc_prof_sweep_timer_stop): catch up recent changes
- to compile on GC_PROFILE_MORE_DETAIL=1.
+ * Makefile.in (probes.h): create from probes.d
-Wed Oct 23 11:43:27 2013 Zachary Scott <e@zzak.io>
+Tue Nov 13 18:44:01 2012 Koichi Sasada <ko1@atdot.net>
- * file.c: [DOC] fix rdoc format of File#expand_path from r43386
+ * vm_insnhelper.c (vm_call_cfunc_with_frame): don't use ci after
+ EXEC_EVENT_HOOK because ci can be overridden.
-Tue Oct 22 21:58:28 2013 URABE Shyouhei <shyouhei@ruby-lang.org>
+ * vm_eval.c: ditto.
- * vm_core.h (enum): avoid syntax error.
+ * method.h: change invoker's parameters types.
- * method.h: ditto.
+ * vm_method.c (call_cfunc_invoker_func): ditto.
- * internal.h: ditto.
+Tue Nov 13 18:01:54 2012 Shugo Maeda <shugo@ruby-lang.org>
-Tue Oct 22 19:53:16 2013 Koichi Sasada <ko1@atdot.net>
+ * eval.c (rb_mod_using): raise an ArgumentError if cyclic using is
+ detected. based on the patch by Charlie Somerville.
+ [ruby-core:49092] Bug #7308
- * gc.c (Init_heap): move logics from heap_pages_init() and remove
- heap_pages_init().
+ * test/ruby/test_refinement.rb: related test.
-Tue Oct 22 19:19:05 2013 Koichi Sasada <ko1@atdot.net>
+Tue Nov 13 17:40:04 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * 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.
+ * common.mk (vm_insnhelper.c): this target is useless and causes
+ ruby always need rebuild.
- * 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.
+Tue Nov 13 17:35:49 2012 Koichi Sasada <ko1@atdot.net>
- 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.
+ * compile.c (insn_data_to_s_detail): remove debug lines.
- Now, there is only one heap called `eden', which is a space for all
- new generated objects.
+Tue Nov 13 17:28:47 2012 Koichi Sasada <ko1@atdot.net>
-Tue Oct 22 18:26:12 2013 Tanaka Akira <akr@fsij.org>
+ * vm_insnhelper.c (vm_caller_setup_args): save and restore
+ ci->argc and ci->blockptr before and after method invocations
+ because these method dispatches can override call_info.
- * 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.
+ * bootstraptest/test_method.rb: add tests for this fix.
-Tue Oct 22 16:57:48 2013 Benoit Daloze <eregontp@gmail.com>
+Tue Nov 13 16:38:02 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * file.c (File#expand_path): [DOC] improve documentation of File#expand_path.
- Based on patch by Prathamesh Sonpatki. [ruby-core:57734] [Bug #9002]
+ * common.mk (dmyprobes.h): always create for make dist.
-Tue Oct 22 15:59:51 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * Makefile.in (probes.h): create or copy dmyprobes.h
- * dir.c (glob_helper): don't skip current directories if FNM_DOTMATCH
- is given. [ruby-core:53108] [Bug #8006]
+ * win32/Makefile.sub: only do copy dmyprobes.h.
-Tue Oct 22 14:53:11 2013 Koichi Sasada <ko1@atdot.net>
+Tue Nov 13 15:37:21 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * 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.
+ * Makefile.in (.SUFFIX): .SUFFIX is needed here for .d.h on bsd make.
- * 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.
+Tue Nov 13 15:34:35 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * vm_trace.c (rb_postponed_job_register_one): check interrupt
- carefully.
+ * common.mk Makefile.in win32/Makefile.sub (.d.h): it's not common.
- * vm_trace.c (rb_postponed_job_register_one): use additional space
- to avoid buffer full.
+Tue Nov 13 12:27:11 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * gc.c (gc_finalize_deferred_register): check failure.
+ * configure.in: disable dtrace because it doesn't work on FreeBSD.
- * thread.c (rb_threadptr_execute_interrupts): check
- `postponed_job_interrupt' immediately. There is a possibility
- to miss this flag.
+ * common.mk (clean-local): rm probes.h.
-Tue Oct 22 12:11:16 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * common.mk (parse.o): depend $(PROBES_H_INCLUDES).
- * configure.in: check if the given CFLAGS and LDFLAGS are working, and
- bail out early if not.
+ * common.mk (.d.h): moved from Makefile.in and use BASERUBY.
-Tue Oct 22 00:06:57 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * tool/gen_dummy_probes.rb: reimplemented with ruby because sed is not
+ available on Windows Microsoft VC++ environment.
- * file.c (rb_file_exists_p): warn deprecated name. [Bug #9041]
+Tue Nov 13 12:30:26 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Mon Oct 21 23:57:53 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * win32/README.win32: added mention about build directory. currently
+ we can not build ruby in win32 directory. this problem is reported
+ by Masahiro Kitajima <katonbo@katontech.com>.
- * encoding.c (load_encoding): should preserve outer errinfo, so that
- expected exception may not be lost. [ruby-core:57949] [Bug #9038]
+Tue Nov 13 11:03:47 2012 Masaki Matsushita <glass.saga@gmail.com>
-Sun Oct 20 15:41:22 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * re.c (rb_memsearch_ss): performance improvement by using memmem(3) if
+ possible. [ruby-dev:45530] [Feature #6311]
- * 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]
+ * configure.in: check existence of memmem(3) and that it is not broken.
-Sun Oct 20 15:29:05 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Nov 13 06:50:02 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * error.c (rb_syserr_fail_path_in): new function split from
- rb_sys_fail_path_in to raise SystemCallError without errno.
+ * probes.d: add DTrace probe declarations. [ruby-core:27448]
- * internal.h (rb_syserr_fail_path): like rb_sys_fail_path but without
- errno.
+ * array.c (empty_ary_alloc, ary_new): added array create DTrace probe.
-Sun Oct 20 13:58:47 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * compile.c (rb_insns_name): allowing DTrace probes to access
+ instruction sequence name.
- * include/ruby/ruby.h (rb_obj_wb_unprotect, rb_obj_written),
- (rb_obj_write): suppress unused-parameter warnings.
+ * Makefile.in: translate probes.d file to appropriate header file.
-Sun Oct 20 10:32:48 2013 Eric Hodel <drbrain@segment7.net>
+ * common.mk: declare dependencies on the DTrace header.
- * lib/rubygems: Update RubyGems to master 0886307. This commit
- improves documentation and should bring ruby above 75% documented on
- rubyci.
+ * configure.in: add a test for existence of DTrace.
-Sun Oct 20 09:30:56 2013 Eric Hodel <drbrain@segment7.net>
+ * eval.c (setup_exception): add a probe for when an exception is
+ raised.
- * lib/rubygems: Update to RubyGems master 3de7e0f. Changes:
+ * gc.c: Add DTrace probes for mark begin and end, and sweep begin and
+ end.
- Only attempt to build extensions for newly-installed gems. This
- prevents compilation attempts at gem activation time for gems that
- already have extensions built.
+ * hash.c (empty_hash_alloc): Add a probe for hash allocation.
- Fix crash in the dependency resolver for dependencies that cannot be
- resolved.
+ * insns.def: Add probes for function entry and return.
- * test/rubygems: ditto.
+ * internal.h: function declaration for compile.c change.
-Sun Oct 20 05:24:29 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * load.c (rb_f_load): add probes for `load` entry and exit, require
+ entry and exit, and wrapping search_required for load path search.
- * variable.c (rb_class2name): should return real class name, not
- singleton class or iclass.
+ * object.c (rb_obj_alloc): added a probe for general object creation.
-Sun Oct 20 04:18:48 2013 Aman Gupta <ruby@tmm1.net>
+ * parse.y (yycompile0): added a probe around parse and compile phase.
- * variable.c (rb_class2name): call rb_tmp_class_path() directly to
- avoid extra rb_str_dup() from rb_class_name().
+ * string.c (empty_str_alloc, str_new): DTrace probes for string
+ allocation.
-Sat Oct 19 19:59:02 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/dtrace/*: tests for DTrace probes.
- * win32/file.c (code_page): use simple array instead of st_table.
+ * vm.c (vm_invoke_proc): add probes for function return on exception
+ raise, hash create, and instruction sequence execution.
- * encoding.c (rb_locale_encindex): defer initialization of win32 code
- page table until encoding db loaded.
+ * vm_core.h: add probe declarations for function entry and exit.
-Sat Oct 19 08:25:05 2013 Koichi Sasada <ko1@atdot.net>
+ * vm_dump.c: add probes header file.
- * 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.
+ * vm_eval.c (vm_call0_cfunc, vm_call0_cfunc_with_frame): add probe on
+ function entry and return.
-Sat Oct 19 07:14:40 2013 Eric Hodel <drbrain@segment7.net>
+ * vm_exec.c: expose instruction number to instruction name function.
- * lib/rubygems: Update to RubyGems master 42543b6. Changes:
+ * vm_insnhelper.c: add function entry and exit probes for cfunc
+ methods.
- Fix `gem update` for gems with multiple platforms.
+ * vm_insnhelper.h: vm usage information is always collected, so
+ uncomment the functions.
- * test/rubygems: ditto.
+Mon Nov 12 19:14:50 2012 Akinori MUSHA <knu@iDaemons.org>
-Sat Oct 19 06:55:52 2013 Eric Hodel <drbrain@segment7.net>
+ * configure.in (isinf, isnan): isinf() and isnan() are macros on
+ DragonFly which cannot be found by AC_REPLACE_FUNCS(). This
+ workaround enforces the fact that they exist on DragonFly.
- * lib/rubygems: Update to RubyGems master 0a3814b. Changes:
+Mon Nov 12 15:59:38 2012 Shugo Maeda <shugo@ruby-lang.org>
- Fixed extension directory in Gem::Specification#require_paths.
+ * vm_core.h (rb_call_info_t::refinements), compile.c (new_callinfo),
+ vm_insnhelper.c (vm_search_method): revert r37616 because it's too
+ slow. [ruby-dev:46477]
- Allow installation of gems when $HOME is nonexistent or unwritable.
+ * test/ruby/test_refinement.rb (test_inline_method_cache): skip
+ the test until the bug is fixed efficiently.
- Use proper API in InstallCommand.
+Mon Nov 12 14:28:01 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- Improve support for path option in gem dependency files.
+ * win32/mkexports.rb (each_export): skip garbage generated by VS2012's
+ nmake.
+ reported and patched by Yoshida Masato at [Bug #7333] [ruby-dev:46484]
- Remove warnings.
+Sun Nov 11 18:58:55 2012 Tadayoshi Funaba <tadf@dotrb.org>
- * test/rubygems: ditto.
+ * test/date/test_date_{parse,strptime}.rb: changed the format of
+ some extra messages.
+
+Sun Nov 11 18:41:34 2012 Tadayoshi Funaba <tadf@dotrb.org>
-Fri Oct 18 15:23:34 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/date/date_parse.c (date__parse): revised the tight parser
+ (about handling of apostrophes).
- * 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").
+Sun Nov 11 15:39:04 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- See https://bugs.ruby-lang.org/attachments/4008/data-heap_structure.png.
+ * hash.c (rb_hash_s_create): just warn for wrong elements now.
+ [ruby-dev:46440] [Bug #7300]
-Fri Oct 18 09:40:43 2013 Eric Hodel <drbrain@segment7.net>
+ * hash.c (rb_hash_s_create): refine error messages.
- * lib/rubygems: Update to RubyGems master cee6788. Changes:
+ * error.c (rb_builtin_class_name): share for above.
- Fix test failure on vc10-x64 Server on rubyci.org due to attempting
- to File.chmod where it is not supported.
+Sun Nov 11 15:12:18 2012 Shugo Maeda <shugo@ruby-lang.org>
- Continuing work on improved gem dependencies file (Gemfile) support.
+ * eval.c (top_using): remove Kernel#using, and add main.using instead.
- * test: ditto.
+ * test/ruby/test_refinement.rb: related test.
+
+Sun Nov 11 13:41:01 2012 Shugo Maeda <shugo@ruby-lang.org>
-Fri Oct 18 06:02:49 2013 Eric Hodel <drbrain@segment7.net>
+ * eval.c (rb_using_refinement, rb_mod_using, f_using): clear method
+ cache only when using is called explicitly.
- * lib/rubygems: Update to RubyGems master f738c67. Changes:
+ * test/ruby/test_refinement.rb: related test.
- Fixed test bug for ruby with ENABLE_SHARED = no
+Sun Nov 11 12:56:34 2012 Masaki Matsushita <glass.saga@gmail.com>
- * test/rubygems: ditto.
+ * lib/pstore.rb (PStore): fix not to replace ThreadError raised in
+ #transaction block with PStore::Error.
+ [ruby-core:39238] [Bug #5269]
+
+Sun Nov 11 11:36:19 2012 Shugo Maeda <shugo@ruby-lang.org>
+
+ * vm_core.h (rb_call_info_t::refinements), compile.c (new_callinfo):
+ add a new field for inline method cache.
+
+ * vm_insnhelper.c (vm_search_method): check rb_call_info_t::refinements
+ not to confuse inline method cache when module_eval is used with
+ refinements.
+
+ * test/ruby/test_refinement.rb: related test.
+
+Sun Nov 11 08:45:45 2012 Martin Duerst <duerst@it.aoyama.ac.jp>
+
+ * ruby.c: removed a comma before "before"
+
+Sat Nov 10 23:02:31 2012 Narihiro Nakamura <authornari@gmail.com>
+
+ * gc.c: move immutable fields from struct heaps_slot and struct
+ sorted_heaps_slot into struct heaps_header.
+ Based on a patch from Sokolov Yura [Feature #6199][ruby-core:43592]
+
+Sat Nov 10 19:28:16 2012 Tadayoshi Funaba <tadf@dotrb.org>
+
+ * complex.c: modified doc.
+ * rational.c: ditto.
+
+Sat Nov 10 18:20:10 2012 Tadayoshi Funaba <tadf@dotrb.org>
+
+ * ext/date/date_parse.c: edited about era.
+
+Sat Nov 10 12:13:41 2012 Kouhei Sutou <kou@cozmixng.org>
+
+ * tool/rbinstall.rb: Don't install *.gemspec under lib/.
+ [ruby-core:48966] [Bug #7289]
+ Reported by Vit Ondruch. Thanks!!!
+
+Sat Nov 10 00:49:26 2012 Naohisa Goto <ngotogenome@gmail.com>
+
+ * ruby_atomic.h: renamed from atomic.h to avoid header file name
+ conflict on Solaris 10. [ruby-dev:46414] [Bug #7287]
+
+ * gc.c, signal.c, vm_core.h, common.mk: reflect the rename from
+ atomic.h to ruby_atomic.h.
+
+Sat Nov 10 00:46:57 2012 Naohisa Goto <ngotogenome@gmail.com>
+
+ * atomic.h: Revert r37491 which is a temporary workaround.
+
+Sat Nov 10 00:33:31 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * siphash.h: check configure macros before include newer headers.
+
+Fri Nov 9 23:33:05 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/erb.rb (ERB#run, ERB#result): eval under isolated bindings for
+ safe concurrent use. [ruby-core:47638] [Bug #7046]
+
+Fri Nov 9 23:05:06 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * random.c (BYTE_ORDER): define using configured WORDS_BIGENDIAN.
+
+ * siphash.c (sip_init_state): use union to suppress warnings by gcc
+ 4.7.
+
+Fri Nov 9 19:40:03 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * array.c (rb_ary_splice): fix r37583 doesn't consider the case when
+ beg > array length.
+
+Fri Nov 9 16:11:58 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * random.c (rb_memhash): use siphash.
+
+Fri Nov 9 16:08:46 2012 Sokolov Yura funny-falcon <funny.falcon@gmail.com>
+
+ * array.c: speedup Array#unshift by using space in shared array.
+ [Feature #6638]
+ - when array owns its shared array (ARY_SHARED_NUM == 1), and there
+ is enough space then try unshift values directly into shared
+ array.
+ - when resulting array is big (~>64 items) then make it shared with
+ enough room for future #unshifts, and then insert into shared
+ array.
+
+ * array.c (rb_ary_splice): use shared array in rb_ary_slice.
+ [Feature #6638]
+ - use ary_ensure_room_for_push when rb_ary_slice used to add at the
+ end of array, cause rb_ary_concat use rb_ary_slice.
+
+ * array.c (ary_ensure_room_for_push): make array really suitable for
+ queue. [Feature #6638]
+ when array is shared (which happens after Array#shift), and
+ ARY_SHARED_NUM == 1 (which is very often when array used as queue),
+ then make rb_ary_push push directly into shared array.
+
+ * array.c (rb_ary_modify): steal shared array's container when
+ ARY_SHARED_NUM == 1. [Feature #6638]
+ - Do not allocate new memory in rb_ary_modify when ARY_SHARED_NUM == 1
+ and length almost same.
+ - Store ARY_CAPA instead of RARRAY_LEN in ary_make_shared, to make
+ it useful.
+ - Fix rb_ary_sort_bang accordantly.
-Fri Oct 18 00:57:07 2013 Tanaka Akira <akr@fsij.org>
+Fri Nov 9 16:00:00 2012 Zachary Scott <zzak@zacharyscott.net>
- * 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.
+ * ext/bigdecimal/bigdecimal.c: Documentation for BigDecimal
+ Based on a patch from Vincent Batts [ruby-core:49047] [Bug #7305]
-Thu Oct 17 18:50:08 2013 Koichi Sasada <ko1@atdot.net>
+Fri Nov 9 15:25:42 2012 Akinori MUSHA <knu@iDaemons.org>
- * 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.
+ * lib/shellwords.rb (Shellwords#shellescape): Add back my original
+ real world example with some enhancement.
-Thu Oct 17 18:45:41 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/shellwords.rb (Shellwords#shelljoin): Undo part of the
+ previous rdoc change. This new example using a string-only
+ array was not in line with the description.
- * string.c (STR_HEAP_SIZE): includes TERM_LEN(str).
+Fri Nov 9 12:58:13 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * string.c (rb_str_memsize): use STR_HEAP_SIZE().
+ * string.c (rb_str_crypt): crypt(3) may return NULL.
+ Latest glibc (2.16?) crypt(3) actually returns NULL. [Bug #7312]
-Thu Oct 17 17:43:00 2013 Shugo Maeda <shugo@ruby-lang.org>
+Fri Nov 9 12:07:06 2012 Akinori MUSHA <knu@iDaemons.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.
+ * include/ruby/ruby.h (alloca), eval_intern.h (alloca), gc.c
+ (alloca): Make alloca() globally available by moving the
+ ultimate ifdef's to ruby/ruby.h. Gcc hides its builtin alloca()
+ when compiling with -ansi, and linking thus fails on platforms
+ that lack their own alloca() implementation in libc, which
+ include OpenBSD and some ports of NetBSD. We use alloca()
+ everywhere including from within third party C extensions, so
+ alloca() must be made globally available. [Bug #7307]
- * vm_method.c (rb_method_entry_without_refinements): return 0 when
- the original method of a refined method is undef to avoid SEGV.
+ * addr2line.c (alloca): Replace the alloca() part with the
+ ultimate ifdef's. [Bug #7307]
+
+Fri Nov 9 09:30:00 2012 Zachary Scott <zachary@zacharyscott.net>
+
+ * io.c (IO#new):
+ Fix indentation from r37444
+ [ruby-core:48052] [Bug #7179]
+
+Fri Nov 9 07:36:00 2012 Kenta Murata <mrkn@mrkn.jp>
+
+ * bignum.c (bigmul0): enable big_mul_toom3.
+ [ruby-core:48552] [Bug #7242]
+
+ * bignum.c (bigmul1_toom3): fix incorrect calculation.
+ the patch is made by Heesob Park.
+ [ruby-core:48552] [Bug #7242]
+
+Fri Nov 9 05:33:00 2012 Kenta Murata <mrkn@mrkn.jp>
+
+ * bignum.c (bigmul0): disable big_mul_toom3 temporarily.
+ [ruby-core:48552] [Bug #7242]
+
+ * test/ruby/test_bignum.rb (test_mul_large_numbers):
+ add a test for bigmul1_toom3 suggested in [Bug #7242].
+
+Thu Nov 8 21:57:59 2012 Masaki Matsushita <glass.saga@gmail.com>
+
+ * re.c (rb_memsearch): performance improvement by using memchr().
+ [ruby-dev:45397] [Feature #6173]
+
+Thu Nov 8 19:02:50 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/net/protocol.rb (Net::InternetMessageIO#each_crlf_line):
+ treat \r as newline as mame pointed. [ruby-dev:46425] [Bug #7278]
+
+Thu Nov 8 11:32:11 2012 Akinori MUSHA <knu@iDaemons.org>
+
+ * configure.in (--with-opt-dir): Avoid nesting of double quotes
+ inside backquotes, since some traditional shells like PD KSH
+ (which OpenBSD's /bin/sh bases on) fail to parse them.
+
+Thu Nov 8 09:34:00 2012 Kenta Murata <mrkn@cookpad.com>
+
+ * numeric.c: Add a caution that the results of the comparing
+ operations of two NaNs are undefined.
+ [#1720] [ruby-dev:38725] [ruby-core:36966]
+
+Thu Nov 8 04:45:21 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+
+ * include/ruby/intern.h: Restore rb_enumeratorize as it was before
+ r37497 and introduce rb_enumeratorize_with_size instead. [#7302]
+
+ * enumerator.c: ditto.
+
+Wed Nov 7 15:22:37 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * numeric.c (ruby_float_step): fix r37514: it yielded with NaN
+ if the unit is infinity.
+
+Wed Nov 7 15:46:12 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
+
+ * lib/webrick.rb: fix typo. reported by Rohit Arondekar.
+ https://github.com/ruby/ruby/pull/211
+
+Wed Nov 7 15:34:12 2012 Takeyuki FUJIOKA <xibbar@ruby-lang.org>
+
+ * lib/cgi/core.rb: alias CGI#http_header to CGI#header.
+
+Wed Nov 7 12:49:39 2012 Shugo Maeda <shugo@ruby-lang.org>
+
+ * eval.c (rb_mod_refine): set RMODULE_IS_REFINEMENT to a created
+ refinement module, and don't override method_added.
+
+ * vm_method.c (rb_method_entry_make): check redefinition of
+ optimized methods when a method is added to a refinement module.
+ [ruby-core:48970] [Bug #7290]
* test/ruby/test_refinement.rb: related test.
-Thu Oct 17 17:38:36 2013 Koichi Sasada <ko1@atdot.net>
+Wed Nov 7 11:48:14 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * misc/ruby-additional.el (ruby-mode-set-encoding): now encoding needs
+ to be set always explicitly actually. [Feature #6679]
+
+Wed Nov 7 09:15:58 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * object.c (rb_mod_const_get): avoid inadvertent symbol creation.
+
+Wed Nov 7 07:52:50 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * enum.c (rb_enum_cycle_size): prefix with rb.
+
+Wed Nov 7 04:32:15 2012 Luis Lavena <luislavena@gmail.com>
+
+ * test/ruby/test_file_exhaustive.rb: Remove FIXME skip on Windows
+ specific test because the test in question was already fixed.
+
+Wed Nov 7 03:45:12 2012 Luis Lavena <luislavena@gmail.com>
+
+ * ext/zlib/extconf.rb: Recognize zlibwapi as linking library.
+ Patch by Daniel Berger.
+
+ [ruby-core:44979] [Feature #6421]
+
+Wed Nov 7 02:06:40 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+
+ * enumerator.c: New method #size; constructor accepts size.
+ Have #to_enum accept a block
+ Warn when using deprecated form of constructor
+ Support #size for enumerators created from enumerators
+ Support for lazy.{map|flat_map|...}.size.
+
+ * include/ruby/intern.h: RETURN_SIZED_ENUMERATOR for support of
+ sized enumerators.
- * gc.c, internal.h: rename ruby_xsizefree/realloc to
- rb_sized_free/realloc.
+ * array.c: Support for various enumerator.size.
- * array.c: catch up these changes.
+ * enum.c: ditto.
+
+ * hash.c: ditto.
+
+ * numeric.c: ditto.
+
+ * range.c: ditto.
* string.c: ditto.
-Thu Oct 17 17:32:51 2013 Koichi Sasada <ko1@atdot.net>
+ * struct.c: ditto.
- * array.c, string.c: use ruby_xsizedfree() and ruby_xsizedrealloc().
+ * vm_eval.c: ditto.
- * internal.h (SIZED_REALLOC_N): define a macro as REALLOC_N().
+Tue Nov 6 20:40:28 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-Thu Oct 17 17:11:17 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * object.c (rb_mod_const_get): Fix constant missing exception class
+ and message to maintain backwards compatibility. Constant search
+ should start at Object when constant starts with '::'
- * win32/win32.c (console_emulator_p): check by comparison between
- module handle of WriteConsoleW and kernel32.dll.
+ * test/ruby/test_module.rb: test for fixes
- * configure.in, win32/Makefile.sub, win32/setup.mak: no longer need
- psapi.lib.
+Tue Nov 6 16:50:00 2012 Masaki Matsushita <glass.saga@gmail.com>
-Thu Oct 17 16:53:30 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/tempfile.rb (Tempfile#inspect): fix confusing #inspect.
+ previous Tempfile#inspect says it is a File, but actually
+ it is not a File.
- * 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]
+ t = Tempfile.new("foo") #=> #<File:/tmp/foo20121106-31970-1ffbum0>
+ t.is_a? File #=> false
-Thu Oct 17 14:21:34 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ now Tempfile#inspect returns like:
- * win32/file.c (rb_file_expand_path_internal): fix memory leaks at
- a non-absolute home exception.
+ t = Tempfile.new("foo")
+ #=> #<Tempfile:/tmp/foo20121106-31970-1ffbum0>
-Thu Oct 17 14:06:39 2013 Koichi Sasada <ko1@atdot.net>
+ [ruby-core:47544] [Bug #7027]
- * 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.
+Tue Nov 6 16:22:30 2012 Naohisa Goto <ngotogenome@gmail.com>
-Thu Oct 17 12:30:16 2013 Tanaka Akira <akr@fsij.org>
+ * atomic.h: add #include <sys/atomic.h> for the workaround of
+ header file name conflict of atomic.h with /usr/include/atomic.h
+ on Solaris 10. [ruby-dev:46414] [Bug #7287]
- * lib/tsort.rb (TSort.each_strongly_connected_component_from):
- Extracted from TSort#each_strongly_connected_component_from.
+Tue Nov 6 14:38:00 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Thu Oct 17 11:07:06 2013 Eric Hodel <drbrain@segment7.net>
+ * test/win32ole/test_win32ole.rb: now source encoding is UTF-8, so
+ binary strings in old scripts are dangerous.
- * lib/rubygems: Update to RubyGems master 941c21a. Changes:
+Tue Nov 6 14:25:09 2012 NARUSE, Yui <naruse@ruby-lang.org>
- Restored method bundler wants to remove for compatibility.
+ * lib/net/protocol.rb (Net::InternetMessageIO#each_crlf_line):
+ don't use /n in universal regexp. [ruby-dev:46394] [Bug #7278]
- Improvements to Gemfile compatibility.
+Tue Nov 6 09:42:26 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * test/rubygems: ditto.
+ * string.c (rb_str_b): Add String#b, returning a copied string
+ whose encoding is ASCII-8BIT. [ruby-dev:45992] [Feature #6767]
-Thu Oct 17 08:08:11 2013 Koichi Sasada <ko1@atdot.net>
+Tue Nov 6 09:37:57 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * ext/objspace/object_tracing.c (newobj_i): add workaround.
- some bugs hits this check.
+ * ruby.c (load_file_internal): set default source encoding as
+ UTF-8 instead of US-ASCII. [ruby-core:46021] [Feature #6679]
- * ext/objspace/object_tracing.c (object_allocations_reporter_i): cast as pointer.
+ * parse.y (parser_initialize): set default parser encoding as
+ UTF-8 instead of US-ASCII.
-Thu Oct 17 07:36:53 2013 Eric Hodel <drbrain@segment7.net>
+Tue Nov 6 05:48:06 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
- * lib/rubygems: Update to RubyGems master 2abce58. Changes:
+ * test/ruby/test_require.rb
+ (TestRequire#test_require_to_path_redefined_in_load_path,
+ TestRequire#test_require_to_str_redefined_in_load_path):
+ Suppress method redefined warning when test-all with RUBYOPT=-w.
- Fixed documentation generation when sdoc and json are installed as
- gems.
+Thu Nov 8 00:24:14 2012 Akinori MUSHA <knu@iDaemons.org>
- Added some missing documentation.
+ * ext/curses/view.rb: Do not fail if the file to view is shorter
+ than the screen height.
-Thu Oct 17 07:10:26 2013 Zachary Scott <e@zzak.io>
+Mon Nov 5 11:40:00 2012 Mark Somerville <mark@scottishclmibs.com>
- * ext/curses/curses.c: [DOC] Cleaned up formatting consistency of rdoc
- comments for Curses, including period spacing and column width.
+ * thread_pthread.c (rb_reserved_fd_p): fix typo in macro check
+ that prevented the ifdef ever being true.
+ [Bug #7281] [ruby-core:48940]
- This patch also fixed some typos. Thanks to @postmodern for the patch!
- [Fixes GH-420] https://github.com/ruby/ruby/pull/420
+Mon Nov 5 23:28:57 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-Thu Oct 17 06:58:42 2013 Zachary Scott <e@zzak.io>
+ * file.c (rb_get_path_check_to_string): extract from
+ rb_get_path_check(). We change the spec not to call to_path of
+ String object.
- * 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
+ * file.c (rb_get_path_check_convert): extract from rb_get_path_check().
-Thu Oct 17 05:52:31 2013 Zachary Scott <e@zzak.io>
+ * file.c (rb_get_path_check): follow the above change.
- * 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
+ * file.c (rb_file_expand_path_fast): remove check_expand_path_args().
+ Instead we call it in load.c.
-Thu Oct 17 05:40:33 2013 Koichi Sasada <ko1@atdot.net>
+ * file.c (rb_find_file_ext_safe): use rb_get_expanded_load_path() to
+ reduce expand cost.
- * gc.c (objspace_each_objects): do not skip empty RVALUEs.
+ * file.c (rb_find_file_safe): ditto.
-Thu Oct 17 05:31:31 2013 Koichi Sasada <ko1@atdot.net>
+ * internal.h (rb_get_expanded_load_path): add a declaration.
- * error.c (rb_bug_reporter_add): return simply 0 if failed.
- Please check return value.
+ * internal.h (rb_get_path_check_to_string, rb_get_path_check_convert):
+ add declarations.
-Thu Oct 17 05:17:33 2013 Koichi Sasada <ko1@atdot.net>
+ * load.c (rb_construct_expanded_load_path): fix for compatibility.
+ Same checks in rb_get_path_check() are added. We don't replace
+ $LOAD_PATH and ensure that String object of $LOAD_PATH are frozen.
+ We don't freeze non String object and expand it every time. We add
+ arguments for expanding load path partially and checking if load path
+ have relative paths or non String objects.
- * 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.
+ * load.c (load_path_getcwd): get current working directory for checking
+ if it's changed when getting load path.
-Wed Oct 16 22:35:27 2013 Zachary Scott <e@zzak.io>
+ * load.c (rb_get_expanded_load_path): fix for rebuilding cache properly.
+ We check if current working directory is changed and rebuild expanded
+ load path cache. We expand paths which start with ~ (User HOME) and
+ non String objects every time for compatibility. We make this
+ accessible from other source files.
- * ext/io/nonblock/nonblock.c: use rb_cIO instead of VALUE
+ * load.c (rb_feature_provided): call rb_get_path() since we changed
+ rb_file_expand_path_fast() not to call it.
-Wed Oct 16 17:45:13 2013 Koichi Sasada <ko1@atdot.net>
+ * load.c (Init_load): initialize vm->load_path_check_cache.
- * bootstraptest/runner.rb: check nil before calling `signal?'
- for a process status.
+ * vm.c (rb_vm_mark): mark vm->load_path_check_cache for GC.
-Wed Oct 16 17:37:17 2013 Koichi Sasada <ko1@atdot.net>
+ * vm_core.h (rb_vm_struct): add vm->load_path_check_cache to store data
+ to check load path cache validity.
- * 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.
+ * test/ruby/test_require.rb (TestRequire): add tests for require
+ compatibility related to cached expanded load path.
+ [ruby-core:47970] [Bug #7158]
- * ext/-test-/bug_reporter/bug_reporter.c: add a test for this C-API.
+Mon Nov 5 23:26:05 2012 Greg Price <price@mit.edu>
- * ext/-test-/bug_reporter/extconf.rb: ditto.
+ * load.c (rb_get_expanded_load_path): cache the expanded load
+ path. This saves 4KB of allocation and some stats for every
+ element of the load path (so nearly a MB in my Rails app)
+ on every require.
- * test/-ext-/bug_reporter/test_bug_reporter.rb: ditto.
+ * load.c (rb_construct_expanded_load_path): ensure that $LOAD_PATH
+ entries are frozen strings. The user must mutate $LOAD_PATH
+ itself rather than its individual entries.
-Wed Oct 16 15:14:21 2013 Koichi Sasada <ko1@atdot.net>
+ * vm_core.h (rb_vm_struct): add fields.
- * NEWS: add a line into NEWS for last commit.
+ * vm.c (rb_vm_mark): mark new fields.
-Wed Oct 16 15:09:14 2013 Koichi Sasada <ko1@atdot.net>
+ * ruby.c (process_options): modify $LOAD_PATH directly rather than
+ its elements.
+ Patch by Greg Price.
+ [ruby-core:47970] [Bug #7158]
- * 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.
+Mon Nov 5 23:24:42 2012 Greg Price <price@mit.edu>
- * test/objspace/test_objspace.rb: add a test.
+ * load.c (rb_feature_p, rb_provide_feature): index $LOADED_FEATURES
+ so that require isn't so slow.
-Wed Oct 16 15:00:21 2013 Eric Hodel <drbrain@segment7.net>
+ * load.c (rb_provide_feature, get_loaded_features_index): ensure
+ that $LOADED_FEATURES entries are frozen strings. The user
+ must mutate $LOADED_FEATURES itself rather than its individual
+ entries.
- * lib/rubygems: Update to RubyGems master b955554. Changes:
+ * load.c (reset_loaded_features_snapshot): add a new function to reset
+ vm->loaded_features_snapshot.
- Fixed NameError for Gem::Ext due to re-entering file lookup in
- RubyGems' overridden require. Bug by Koichi Sasada.
+ * load.c (get_loaded_features_index_raw): add a new function to get
+ the loaded-features index.
- Fixed possible circular require warning in tests.
+ * load.c (features_index_add_single): add a new function to add to the
+ loaded-features index a single feature.
- Used existing constant for `gem install -g` dependency file list.
+ * load.c (features_index_add): add a new function to add to the
+ loaded-features index all the required entries for `feature`.
- * test/rubygems: ditto.
+ * vm_core.h (rb_vm_struct): add fields.
-Wed Oct 16 09:42:42 2013 Eric Hodel <drbrain@segment7.net>
+ * vm.c (rb_vm_mark): mark new fields.
- * lib/rubygems: Update to RubyGems master 278d00d. Changes:
+ * include/ruby/intern.h (rb_hash_clear): declare function.
- Fixes building extensions without a "clean" make rule
+ * hash.c (rb_hash_clear): make function non-static.
+ Patch by Greg Price.
+ [ruby-core:47970] [Bug #7158]
- Adds gem dependency file autodetection to "gem install -g"
+Mon Nov 5 23:23:51 2012 Greg Price <price@mit.edu>
- * test/rubygems: Tests for the above.
+ * array.c (rb_ary_shared_with_p): new function.
+ Expose whether two arrays are shared (read-only, C only).
-Wed Oct 16 09:12:23 2013 Eric Hodel <drbrain@segment7.net>
+ * include/ruby/intern.h (rb_ary_shared_with_p): declare.
+ Patch by Greg Price.
+ [ruby-core:47970] [Bug #7158]
- * lib/rubygems: Update to RubyGems master commit 2a74263. This fixes
- several bugs in RubyGems 2.2.0.preview.1.
+Mon Nov 5 23:21:14 2012 Greg Price <price@mit.edu>
- * test/rubygems: ditto.
+ * load.c (loaded_feature_path): clarify and briefly comment
+ function. These clarifications have no effect on the behavior
+ of the function.
+
+ * load.c (rb_feature_p): explain the search loop. Especially
+ useful because the logic is complicated as described in the
+ second paragraph.
+ Patch by Greg Price.
+ [ruby-core:47970] [Bug #7158]
+
+Mon Nov 5 22:45:03 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-Wed Oct 16 07:25:02 2013 Aman Gupta <ruby@tmm1.net>
+ * ext/dl/win32/lib/Win32API.rb (Win32API#call): use 64bit pointer for x64
+ Windows. This would fix
+ TestSecureRandom#test_s_random_bytes_without_openssl error.
+ [ruby-core:47451] [Bug #6990]
- * gc.c (gc_mark_roots): rename roots to be categories
- instead of function names.
+Mon Nov 5 22:09:26 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-Tue Oct 15 19:18:13 2013 Koichi Sasada <ko1@atdot.net>
+ * cygwin/GNUmakefile.in (uncommon.mk): link *.res.o.
+ EXTOBJES is defined in uncommon.mk. *.res.o setting should be below
+ uncommon.mk.
+ [ruby-core:48858] [Bug #7277]
- * 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.
+Mon Nov 5 11:35:11 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * gc.c (gc_mark_roots): separate from gc_marks_body().
+ * thread_pthread.c (native_thread_init, native_thread_destroy):
+ removed HAVE_PTHREAD_CONDATTR_INIT check because this silly
+ #ifdef makes use-uninitialized-var issue and (2) native_cond_initialize()
+ already have a right platform and caller don't need any additional care.
+ [Bug #6825]
-Tue Oct 15 17:47:59 2013 Tanaka Akira <akr@fsij.org>
+Mon Nov 5 10:57:59 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * process.c: Fix a typo. MacOS X doesn't have ENOTSUPP.
+ * lib/cgi/core.rb: check if Tempfile is defined before use it.
-Mon Oct 14 12:32:52 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/cgi/core.rb: remove tempfiles only if tempfiles exist
- * ruby.c (process_options): load statically linked extensions before
- rubygems, because of ext/thread.
+Mon Nov 5 12:17:00 2012 Zachary Scott <zachary@zacharyscott.net>
- * ruby.c (process_options): use gem_prelude instead of requiring
- rubygems directly when --enable=gems is given.
+ * lib/uri/http.rb (URI::HTTP.build): Fix example
+ Patch by Carina C. Zona
+ [Fixes #209 Github]
- * Makefile.in (DEFAULT_PRELUDES): always use gem_prelude regardless of
- --disable-rubygems.
+Mon Nov 5 09:55:05 2012 Takeyuki FUJIOKA <xibbar@ruby-lang.org>
-Mon Oct 14 11:07:51 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/cgi/core.rb: remove tempfile more early.
- * 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.
+Sun Nov 4 20:29:46 2012 Takeyuki FUJIOKA <xibbar@ruby-lang.org>
- * lib/mkmf.rb (create_makefile): ranlib on static library, not DLLIB.
+ * lib/cgi.rb, lib/cgi/*/rb: rename CGI#header to CGI#http_header,
+ add and update HTML5 tag generator. [Bug #7110]
+ Patch provided by Marcus Stollsteimer, thank you !
-Sun Oct 13 23:53:40 2013 Andrew Grimm <andrew.j.grimm@gmail.com>
+Sun Nov 4 11:47:39 2012 Masaki Matsushita <glass.saga@gmail.com>
- * vsnprintf.c: Fix spelling from compliment to complement.
- Patch by @agrimm.
+ * lib/fileutils.rb (module FileUtils): repatch [ruby-core:39622]
+ [Feature #5337]. improve performance of FileUtils.compare_stream.
+ [ruby-core:47545] [Feature #7028]
- * include/ruby/ruby.h: ditto
+Sun Nov 4 11:27:54 2012 Masaki Matsushita <glass.saga@gmail.com>
-Sun Oct 13 20:59:27 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * array.c (recursive_equal): fix to return true when self and other
+ are resized to same size and the current index become out of
+ range.
- * vm.c (Init_BareVM): initialize defined_module_hash here,
- Init_top_self() is too late to register core classes/modules.
+ * test/ruby/test_array.rb: add a test for the above.
- * compile.c (compile_array_): no hash to merge if it is empty.
+Sun Nov 4 10:19:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * vm.c (m_core_hash_merge_kwd): just check keys if only one argument
- is given, without merging.
+ * dir.c (file_s_fnmatch): match with expanding braces if FNM_EXTGLOB
+ is set. [ruby-core:40037] [Feature #5422]
-Sat Oct 12 06:35:01 2013-10-11 Eric Hodel <drbrain@segment7.net>
+Sat Nov 3 23:38:15 2012 Tadayoshi Funaba <tadf@dotrb.org>
- * lib/rake: Update to rake 10.1.0
- * bin/rake: ditto.
- * test/rake: ditto.
+ * complex.c: modified doc.
+ * rational.c: ditto.
- * NEWS: Update NEWS to include rake 10.1.0 and links to release notes.
+Sat Nov 3 22:38:55 2012 Tadayoshi Funaba <tadf@dotrb.org>
-Sat Oct 12 03:26:04 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/date/date_core.c: modified doc.
- * class.c, variable.c, gc.c (rb_class_tbl): removed.
+Sat Nov 3 18:35:55 2012 Kazuki Tsujimoto <kazuki@callcc.net>
- * 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.
+ * vm.c (rb_vm_rewrite_ep_in_errinfo, vm_rewrite_ep_in_errinfo):
+ merge code and remove `rb_vm_rewrite_ep_in_errinfo'.
- * gc.c (RGENGC_PRINT_TICK): disable (revert).
+Sat Nov 3 18:15:24 2012 Kazuki Tsujimoto <kazuki@callcc.net>
-Sat Oct 12 03:24:49 2013 Koichi Sasada <ko1@atdot.net>
+ * vm.c, proc.c: avoid unnecessary `rb_vm_rewrite_ep_in_errinfo'
+ calls.
- * vm_method.c (rb_gc_mark_unlinked_live_method_entries):
- revert last commit to introduce debug prints.
+Sat Nov 3 17:53:43 2012 Kouhei Sutou <kou@cozmixng.org>
-Fri Oct 11 21:05:19 2013 Koichi Sasada <ko1@atdot.net>
+ * bin/testrb: Use only Test::Unit::AutoRunner in test-unit gem
+ compatible API to be available by both test/unit bundled in Ruby
+ and test-unit gem.
+ * lib/test/unit.rb (Test::Unit::AutoRunner): Move codes from testrb.
- * internal.h, parse.y: use `full_mark' instead of `full_marking'.
+Sat Nov 3 14:56:21 2012 Tadayoshi Funaba <tadf@dotrb.org>
-Fri Oct 11 20:58:16 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/date/date_parse.c (parse_eu): should capture apostrophe too.
- * gc.c: use terminology `full_mark' instead of `minor_gc'
- in mark functions.
+Sat Nov 3 14:46:15 2012 Tadayoshi Funaba <tadf@dotrb.org>
-Fri Oct 11 20:46:09 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/date/date_parse.c (date__parse): revised the tight parser.
- * gc.c: use __GNUC__ instead of __GCC__.
+Sat Nov 3 14:43:42 2012 Kouhei Sutou <kou@cozmixng.org>
-Fri Oct 11 20:35:59 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/rexml/xmldecl.rb (REXML::XMLDecl#content): Add missing \A
+ and \z.
- * 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.
+Sat Nov 3 14:42:55 2012 Kouhei Sutou <kou@cozmixng.org>
- * internal.h: change prototype of rb_gc_mark_symbols().
+ * lib/rexml/output.rb (REXML::Output#initialize): Use normalized
+ encoding name.
-Fri Oct 11 19:27:22 2013 Akinori MUSHA <knu@iDaemons.org>
+Sat Nov 3 14:41:17 2012 Kouhei Sutou <kou@cozmixng.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.
+ * lib/rexml/output.rb (REXML::Output): Don't output BOM in middle
+ of the output string.
+ * test/rexml/test_document.rb: Add a test for the above change.
- * ruby-forward-sexp is inappropriate here because it moves the
- cursor past the keyword.
+Sat Nov 3 14:09:55 2012 Kouhei Sutou <kou@cozmixng.org>
- * Fix a reversed looking-back check in
- ruby-electric--block-beg-keyword-at-point-p.
+ * NEWS: Add an item about REXML::Document#write.
- * Do not add end again if space or return is hit repeatedly
- after a block beginning keyword.
+Sat Nov 3 13:46:49 2012 Kouhei Sutou <kou@cozmixng.org>
-Fri Oct 11 18:12:47 2013 Koichi Sasada <ko1@atdot.net>
+ * test/rexml/test_document.rb: Fix tests that expect encoding name
+ isn't normalized.
- * ext/objspace/gc_hook.c: prohibit reentrant.
+Sat Nov 3 13:26:00 2012 Zachary Scott <zachary@zacharyscott.net>
-Fri Oct 11 18:11:34 2013 Koichi Sasada <ko1@atdot.net>
+ * dir.c (Dir#glob):
+ Documentation for pattern section, backslash subsection
+ Patch by Eric Bouchut
+ [ruby-core:48528] [Bug #7230]
- * vm_trace.c (rb_postponed_job_flush): fix bit operation.
+Sat Nov 3 13:26:00 2012 Zachary Scott <zachary@zacharyscott.net>
-Fri Oct 11 17:33:24 2013 Akinori MUSHA <knu@iDaemons.org>
+ * io.c (IO#new):
+ Documentation for IO#open modes and formatting
+ [ruby-core:48052] [Bug #7179]
- * 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.
+Sat Nov 3 13:01:02 2012 Kouhei Sutou <kou@cozmixng.org>
- * 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.
+ * test/rexml/test_encoding.rb (EncodingTester#test_in_different_out):
+ Fix a test that expects encoding in XML declaration is changed by
+ Output's encoding. It is dropped feature.
- * Add ruby-electric-mode-hook.
+Sat Nov 3 12:49:45 2012 Kouhei Sutou <kou@cozmixng.org>
- * Use a remap in binding ruby-electric-delete-backward-char.
+ * lib/rexml/document.rb (REXML::Document#write): Document encoding
+ option. Now different encoding between XML file's encoding and
+ XML declaration's encoding is support.
+ [Feature #4872] (work in progress)
+ * lib/rexml/xmldecl.rb (REXML::XMLDecl#write): Always use XMLDecl's
+ encoding.
+ * test/rexml/test_document.rb: Update tests for the above change.
- * 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
+Sat Nov 3 12:18:35 2012 Masaki Matsushita <glass.saga@gmail.com>
- * block-mid keywords (then, else, elsif, when, rescue and
- ensure) also become electric with automatic reindentation.
+ * array.c (recursive_equal): fix not to make invalid pointers when
+ self and other are resized to same size in #== of their elements.
+ [ruby-dev:46373] [Feature #6177]
- * Add standardized comments for ELPA integration.
+Sat Nov 3 12:06:15 2012 Kouhei Sutou <kou@cozmixng.org>
- * Fix interaction with smartparens-mode by disabling its end
- keyword completion, since ruby-electric has become more clever
- at it.
+ * test/rexml/test_xml_declaration.rb (TestXmlDeclaration#test_*):
+ Remove needless prefix from test names.
- * The custom variable `ruby-electric-keywords` is changed to
- `ruby-electric-keywords-alist`, allowing user to fine-grained
- configuration.
+Sat Nov 3 12:04:52 2012 Kouhei Sutou <kou@cozmixng.org>
-Fri Oct 11 16:53:28 2013 Koichi Sasada <ko1@atdot.net>
+ * test/rexml/test_xml_declaration_parent_child.rb: Rename to ...
+ * test/rexml/test_xml_declaration.rb: ... this.
- * vm_trace.c (rb_postponed_job_flush): simplify.
+Sat Nov 3 11:43:00 2012 Zachary Scott <zachary@zacharyscott.net>
-Fri Oct 11 03:36:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * hash.c (rb_hash_delete): Correct grammar
+ Patch by Glenn Oppegard
+ [Fixes #208 Github]
- * thread.c (rb_threadptr_execute_interrupts): flush postponed job only
- once at last.
+Sat Nov 3 11:28:28 2012 Narihiro Nakamura <authornari@gmail.com>
- * 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]
+ * NEWS: add a news about GC::Profiler.raw_data.
-Thu Oct 10 23:04:00 2013 Masaki Matsushita <glass.saga@gmail.com>
+Sat Nov 3 11:01:32 2012 Narihiro Nakamura <authornari@gmail.com>
- * array.c (rb_ary_or): remove unused variables.
+ * NEWS: add a news about rb_newobj_of() and NEWOBJ_OF().
-Thu Oct 10 23:01:16 2013 Masaki Matsushita <glass.saga@gmail.com>
+Sat Nov 3 10:17:41 2012 Narihiro Nakamura <authornari@gmail.com>
- * array.c (rb_ary_or): use rb_hash_keys().
+ * eval.c (f_current_dirname): add the new method for Kernel.
+ This method almost same as File.dirname(__FILE__). One
+ different behavior is it returns nil when __FILE__ returns nil.
+ [Feature #3346]
-Thu Oct 10 21:36:16 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * NEWS: ditto
- * array.c (rb_ary_compact_bang): use ary_resize_smaller().
+ * test/ruby/test_method.rb: related test.
-Thu Oct 10 17:25:28 2013 Koichi Sasada <ko1@atdot.net>
+Sat Nov 3 09:03:34 2012 Shugo Maeda <shugo@ruby-lang.org>
- * vm.c (vm_exec): support :b_return event for "lambda{return}.call".
- [Bug #8622]
+ * test/ruby/test_refinement.rb (test_new_method_by_send,
+ test_new_method_by_method_object): add tests for Kernel#send and
+ Kernel#method with refinements.
- * test/ruby/test_settracefunc.rb: add a test.
+ * test/ruby/test_refinement.rb (test_symbol_to_proc): add a test
+ calling a proc created by Symbol#to_proc outside the scope where
+ a refinement is closed over.
+
+Sat Nov 3 04:14:19 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * vm.c (rb_vm_rewrite_ep_in_errinfo): rewrite all catch points in
+ errinfo, not only the topmost frame. based on the patch by
+ ktsj (Kazuki Tsujimoto) in [ruby-dev:45656]. [Bug #6460]
+
+Fri Nov 2 20:11:17 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/mkmf.rb (MakeMakefile#timestamp_file): remove @ which looks like
+ configure variables.
+
+ * lib/mkmf.rb (MakeMakefile#timestamp_file): use .-. instead of !, a
+ special character of NMAKE and BSD make. [Bug #7265]
+
+Fri Nov 2 17:55:39 2012 Shota Fukumori <sorah@tubusu.net>
+
+ * lib/test/unit.rb (_run_parallel): Delete status line before showing
+ results. Patch by Hiroshi Shirosaki. [Bug #6897] [ruby-core:47250]
+
+ * lib/test/unit.rb (_run_parallel): Fix strange result when disabled retrying.
+ Patch by Hiroshi Shirosaki. [Bug #6897] [ruby-core:47250]
+
+Fri Nov 2 17:52:12 2012 Shugo Maeda <shugo@ruby-lang.org>
+
+ * object.c (rb_mod_to_s): Module#{to_s,inspect}, when invoked on
+ a refinement, returns a string in the format #<refinement:C@M>,
+ where C is a refined class and M is a module at which the refinement
+ is defined.
+
+ * eval.c (rb_mod_refine): store information on a refinement for the
+ above change.
+
+ * test/ruby/test_refinement.rb: related test.
+
+Fri Nov 2 16:57:52 2012 Shota Fukumori <sorah@tubusu.net>
+
+ * vm_dump.c (rb_vm_bugreport): Because of many log directories,
+ making directory lists readable.
+
+Fri Nov 2 16:44:00 2012 Kenta Murata <mrkn@mrkn.jp>
+
+ * vm_dump.c (rb_vm_bugreport): add ~/Library/Logs/DiagnosticReports
+ in the locations list of crash reports.
+
+Fri Nov 2 14:52:52 2012 Masaki Matsushita <glass.saga@gmail.com>
+
+ * array.c (recursive_equal): performance improvement by avoiding
+ overhead to call rb_ary_elt().
+ [ruby-dev:45412] [Feature #6177]
+
+Fri Nov 2 14:47:53 2012 Shugo Maeda <shugo@ruby-lang.org>
+
+ * string.c (sym_to_proc, sym_call): A Proc created by Symbol#to_proc
+ should close over the current refinements.
+ [ruby-dev:46345] [Bug #7261]
+
+ * vm_eval.c (rb_call0, rb_search_method_entry,
+ rb_funcall_passing_block_with_refinements): add a new argument
+ `refinements' for the above changes.
+
+ * test/ruby/test_refinement.rb: related test.
+
+Fri Nov 2 08:24:28 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * proc.c (top_define_method): new method, main.define_method.
+ [ruby-core:45715] [Feature #6609]
+
+ * eval.c (top_include): fix a warning message, main is not a class or
+ module.
+
+Fri Nov 2 04:41:33 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/mkmf.rb (MakeMakefile#timestamp_file): use ! instead of %, a GNU
+ make special character.
+
+Fri Nov 2 04:40:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * test/ruby/test_process.rb (test_execopts_preserve_env_on_exec_failure):
+ use never existing file in the current temporary directory.
+
+Fri Nov 2 04:23:20 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * tool/merger.rb: add feature to tag preview/rc.
+
+Fri Nov 2 03:23:37 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/mkmf.rb: fix for if config["libdir"] is nil.
+
+Thu Nov 1 23:06:01 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * tool/make-snapshot: fix wrong regexp for releasing preview.
+ patched by mame.
+
+Thu Nov 1 22:27:11 2012 Koichi Sasada <ko1@atdot.net>
+
+ * NEWS: add a news about objspace,
+ ObjectSpace.reachable_objects_from.
+
+Thu Nov 1 21:57:00 2012 Kenta Murata <mrkn@mrkn.jp>
+
+ * ext/bigdecimal/bigdecimal.c (BigDecimal_new),
+ test/bigdecimal/test_bigdecimal.rb:
+ Fix exception message of BigDecimal constructor with a Float.
+
+Thu Nov 1 21:52:20 2012 Kenta Murata <mrkn@mrkn.jp>
+
+ * ext/bigdecimal/bigdecimal.c (BigDecimal_add),
+ test/bigdecimal/test_bigdecimal.rb:
+ need to specify precision for converting Rational and Float.
+ [ruby-core:48045] [Bug #7176]
+
+Thu Nov 1 21:42:20 2012 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * test/ruby/test_process.rb: Revert r37404. My ubuntu box has
+ actually the directory named "/nonexistent"... Sorry.
+
+Thu Nov 1 21:28:28 2012 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * test/ruby/test_process.rb: Process.exec raised EACCES on Linux
+ 3.5.0-17-generic. This is a temporal fix to rescue that exception.
+ Needs kosaki's review.
+
+Thu Nov 1 21:19:56 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * iseq.c (set_relation): parent_iseq need to be set regardless iseq
+ type. fix r37397.
+
+Thu Nov 1 19:47:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * thread_pthread.c (RUBY_STACK_MIN): may not a compile time constant.
+ fix r37079. [ruby-dev:46322] [Bug #7247]
+
+Thu Nov 1 16:44:36 2012 Shugo Maeda <shugo@ruby-lang.org>
+
+ * NEWS: add note for Module#refine, Module#refinements,
+ Module#using, and Kernel#using.
+
+Thu Nov 1 14:41:47 2012 Shugo Maeda <shugo@ruby-lang.org>
+
+ * eval.c (rb_using_module): using should be used indirectly.
+ [ruby-dev:46326] [Feature #7251]
+
+Wed Oct 31 18:17:38 2012 Narihiro Nakamura <authornari@gmail.com>
+
+ * gc.c (gc_profile_record): don't define unused variables when
+ GC_PROFILE_MORE_DETAIL is 0.
+
+Wed Oct 31 18:10:53 2012 Narihiro Nakamura <authornari@gmail.com>
+
+ * gc.c (gc_prof_mark_timer_stop): count is not initialized.
+
+Wed Oct 31 09:28:24 2012 Eric Hodel <drbrain@segment7.net>
+
+ * thread.c (rb_thread_call_without_gvl2): Note that ubf() may or may
+ not be called with the GVL. Hinted that rb_thread_call_with_gvl()
+ can be used to access ruby functionality.
+
+Wed Oct 31 09:06:54 2012 Eric Hodel <drbrain@segment7.net>
+
+ * thread.c (rb_thread_call_without_gvl2): Update documentation to
+ natural English.
+ * thread.c (rb_thread_call_with_gvl): ditto.
+
+Wed Oct 31 02:53:07 2012 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * ext/dl/lib/dl/struct.rb: fix strange require order. [ruby-dev:45702]
+
+ * ext/dl/lib/dl/value.rb: ditto
+
+ * test/dl/test_c_struct_entry.rb: remove strange require order from
+ tests.
+
+ * test/dl/test_c_union_entity.rb: ditto
+
+Tue Oct 30 23:59:32 2012 Shugo Maeda <shugo@ruby-lang.org>
+
+ * eval.c (rb_mod_refine): fix the error message when no block is
+ given. [ruby-dev:46319] [Bug #7244]
+
+ * test/ruby/test_refinement.rb: related test.
+
+Tue Oct 30 19:27:48 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * process.c (redirect_dup2): set standard handles when new fd is stdio,
+ because if there is no allocated console at the moment Windows does
+ not automatically associate it for child process's standard handle.
+ this is adhoc workaround.
+ reported by Martin Thiede at [ruby-core:48542] [Bug #7239].
+
+ * io.c (rb_cloexec_dup2): ditto.
+
+Tue Oct 30 03:08:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/rbconfig/obsolete.rb (Config): re-introduce warnings for a
+ lame-duck. [ruby-core:46836] [Bug #6809]
+
+Tue Oct 30 02:20:10 2012 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * thread.c: added Thread#thread_variable_(get|set),
+ Thread#thread_variable?, and Thread#thread_variables for operating
+ on variables that are local to threads. [ruby-core:47790]
+
+ * vm.c: ditto
+
+ * test/ruby/test_thread.rb: tests for thread variables.
+
+Mon Oct 29 18:22:58 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/stringio/stringio.c (strio_close): close separately per each
+ instances, as well as IO.
+
+Mon Oct 29 10:22:00 2012 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * ext/psych/lib/psych/handlers/recorder.rb: added a class for
+ recording YAML parse and emit events.
+
+ * ext/psych/lib/psych/handler.rb: adding a list of events so that
+ handler classes can more easily be meta-programmed.
+
+ * test/psych/handlers/test_recorder.rb: tests for the change.
+
+Mon Oct 29 05:48:52 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+
+ * lib/ostruct.rb: Add [] and []=, base on a patch by Thomas Sawyer.
+ Also accept {Open}Struct as argument to new.
+ Add #eql?, #hash & #each_pair
+ Protect new_ostruct_member
+
+Mon Oct 29 03:20:58 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+
+ * lib/matrix.rb: Fix determinant_e [ruby-dev:46305] [Bug #7228]
+
+Sun Oct 28 23:52:25 2012 Kouhei Sutou <kou@cozmixng.org>
+
+ * test/rexml/test_document.rb: Add tests for parsing XML encoded
+ by UTF-8 with BOM.
+
+Sun Oct 28 23:47:09 2012 Kouhei Sutou <kou@cozmixng.org>
+
+ * lib/rexml/source.rb: Move encoding detection code to base class.
+ * lib/rexml/encoding.rb: Remove needless encoding detection code.
+
+Sun Oct 28 21:40:13 2012 Kouhei Sutou <kou@cozmixng.org>
+
+ * lib/rexml/parsers/baseparser.rb: Fix a bug that UTF-8 is used
+ for UTF-16XX encoded XML that doesn't have encoding="UTF-16" in
+ XML declaration.
+ * test/rexml/test_document.rb: Add tests for the above change.
+
+Sun Oct 28 21:37:34 2012 Kouhei Sutou <kou@cozmixng.org>
+
+ * test/rexml/test_document.rb: Group tests that they parse
+ UTF-16XX encoded XML that has encoding="UTF-16" in XML declaration.
+
+Sun Oct 28 21:25:11 2012 Kouhei Sutou <kou@cozmixng.org>
+
+ * lib/rexml/source.rb (REXML::IOSource#initialize): Reduce
+ @line_break initialize code. It should be done only in #encoding=.
+ * lib/rexml/parsers/baseparser.rb: Don't set UTF-16 encoding to
+ source by encoding="UTF-16" in XML declaration because UTF-16XX
+ source encoding should be set in Source#initialize or
+ IOSource#initialize. They should handle BOM. Parser should not
+ consider about it.
+
+Sun Oct 28 21:18:37 2012 Kouhei Sutou <kou@cozmixng.org>
+
+ * test/rexml/test_document.rb: Add tests for parsing XML encoded
+ by UTF-16 with BOM.
+
+Sun Oct 28 19:12:11 2012 Tadayoshi Funaba <tadf@dotrb.org>
+
+ * ext/date/date_parse.c (iso8601_{ext,bas}_time): should not match
+ empty string.
+
+Sun Oct 28 18:51:33 2012 Tadayoshi Funaba <tadf@dotrb.org>
+
+ * ext/date/date_parse.c (date__parse): revised the tight parser.
+
+Sun Oct 28 15:41:50 2012 Kouhei Sutou <kou@cozmixng.org>
+
+ * lib/rexml/document.rb (REXML::Document#write): Add :encoding option
+ to support custom XML encoding.
+ [Feature #4872] (work in progress)
+ * test/rexml/test_document.rb: Add tests for the above change.
+
+Sun Oct 28 15:00:19 2012 Kouhei Sutou <kou@cozmixng.org>
+
+ * lib/rexml/document.rb (REXML::Document#write): Remove needless
+ indent in document.
+
+Sun Oct 28 14:59:14 2012 Kouhei Sutou <kou@cozmixng.org>
+
+ * lib/rexml/document.rb (REXML::Document#write): Accept options
+ Hash as argument.
+ * test/rexml/test_document.rb: Add tests for the above change.
+
+Sun Oct 28 14:09:44 2012 Kouhei Sutou <kou@cozmixng.org>
+
+ * lib/rexml/document.rb (REXML::Document#write): Fix wrong usage
+ in document.
+
+Sun Oct 28 14:03:48 2012 Kouhei Sutou <kou@cozmixng.org>
+
+ * lib/rexml/document.rb (REXML::Document#write): Fix wrong method
+ names in document.
+
+Sun Oct 28 10:12:15 2012 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * ext/psych/lib/psych/visitors/yaml_tree.rb: `tree` should return the
+ same thing on every call.
+
+ * test/psych/visitors/test_yaml_tree.rb: related test.
+
+Sun Oct 28 10:05:03 2012 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * ext/psych/lib/psych/visitors/yaml_tree.rb: YAML Tree object should
+ be able to take an emitter object as it's output.
+
+ * test/psych/visitors/test_yaml_tree.rb: related test.
+
+Sun Oct 28 08:23:16 2012 Koichi Sasada <ko1@atdot.net>
+
+ * bignum.c (bignew_1): Bignum instances are frozen.
+ Feature #3222
+
+ * include/ruby/ruby.h: Fixnum instances are also frozen.
+
+ * class.c (singleton_class_of): check Bignum before
+ singleton checking.
+
+ * test/ruby/test_bignum.rb: add a test.
+
+ * test/ruby/test_fixnum.rb: ditto.
+
+ * test/ruby/marshaltestlib.rb, test/ruby/test_eval.rb,
+ test/ruby/test_object.rb: catch up above changes.
+
+Sun Oct 28 04:38:06 2012 Koichi Sasada <ko1@atdot.net>
+
+ * vm.c (vm_define_method): remove type and frozen checking.
+ Checking is done in `rb_singleton_class()'.
+
+Sun Oct 28 00:49:06 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * parse.y (assign_in_cond): warn for static content object assignments
+ in conditional statements. [ruby-dev:43083] [Feature #4299]
+
+Sat Oct 27 23:33:41 2012 Benoit Daloze <eregontp@gmail.com>
+
+ * gc.c (gc_profile_result, gc_profile_report): use internal structures
+ to avoid allocations and progressively print the output for #report.
+ [ruby-core:47163] [Bug #6865]
+
+Sat Oct 27 11:01:10 2012 Koichi Sasada <ko1@atdot.net>
+
+ * numeric.c (rb_float_new_in_heap), include/ruby/ruby.h:
+ make all Float objects frozen.
+ [ruby-dev:46081] [ruby-trunk - Feature #6936]
+ Most part of patch by NARUSE, Yui <naruse@ruby-lang.org>.
+
+ * class.c (singleton_class_of): raise TypeError when
+ trying to define a singleton method on Float objects.
+
+ * vm.c (vm_define_method): ditto.
+
+ * test/ruby/marshaltestlib.rb: catch up above changes.
+
+ * test/ruby/test_class.rb: ditto.
+
+ * test/test_pp.rb: ditto.
+
+Sat Oct 27 10:50:53 2012 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * object.c (rb_mod_const_get): make sure the constant name is
+ converted to a string before searching. [ruby-core:48405]
+
+Sat Oct 27 10:12:13 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
+
+ * iseq.c (rb_iseq_compile_with_option): Instead of testing
+ respond_to, just check if the argument is actually a file,
+ because by calling user-defined gets something weired can
+ happen. Patch by Glass_saga. [ruby-dev:40202] [Bug #2861]
+
+ * parse.y (ripper_initialize): ditto.
+
+Sat Oct 27 10:07:57 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * parse.y (enum lex_state_e): [EXPERIMENTAL] lex_state as bit field /
+ IS_lex_state() macro. based on the patch by Dave B in
+ [ruby-core:23503]. [Feature #1493]
+
+Sat Oct 27 10:05:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * include/ruby/win32.h (fstat): use _fstati64() instead of fstati64()
+ on mingw32.
+
+Sat Oct 27 06:28:33 2012 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * object.c (rb_mod_const_get): const_get accepts qualified constant
+ strings. e.g. Object.const_get("Foo::Bar::Baz") [ruby-core:41404]
+
+ * test/ruby/test_module.rb: tests for new behavior
+
+Fri Oct 26 13:24:20 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * parse.y (literal_concat_gen): merge fixed strings across
+ concatenated literals, after an interpolation.
+
+Thu Oct 25 17:48:54 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * win32/win32.c (has_redirection): should use shell (cmd.exe) when
+ the commandline contains '&'.
+ reported by Roger Pack at [ruby-core:47912] [Bug #7143], and
+ patched by Heesob Park at [ruby-core:47931].
+
+Thu Oct 25 15:00:08 2012 Koichi Sasada <ko1@atdot.net>
+
+ * include/ruby/ruby.h, class.c: remove (revert)
+ `rb_add_method_cfunc_frameless()' API.
+ This API is not mature to become an official API.
+ For example, we can not use this API with
+ `rb_define_private_method()'.
+
+ * method.h, vm_method.c (rb_add_method_cfunc_frameless): removed.
+
+Thu Oct 25 13:35:07 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * tool/mkconfig.rb: remove string literal concatenation.
+
+Wed Oct 24 18:49:16 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/objspace/objspace.c (type2sym, count_objects_size): use enum
+ instead of size_t which may be larger than actual values.
+
+Wed Oct 24 17:41:24 2012 Koichi Sasada <ko1@atdot.net>
+
+ * benchmark/driver.rb: add `-x' or `--exclude' option
+ to specify exclude benchmark name pattern.
+ You can specify "-x foo" if you want to exclude the benchmarks
+ if the name of benchmark contains `foo'.
+
+Wed Oct 24 11:57:24 2012 Narihiro Nakamura <authornari@gmail.com>
+
+ * gc.c (gc_prepare_free_objects): rename to match the behavior of
+ this function.
+
+Wed Oct 24 11:55:19 2012 Koichi Sasada <ko1@atdot.net>
+
+ * ext/objspace/objspace.c (reachable_object_from_i): change data
+ structure of the result of reachable objects. Keys of table
+ contains object_id of each reachable objects. Value of table
+ is an object itself or an instance of InternalObjectWrapper.
+ To avoid duplication, we use st_table and object_id keys.
+
+ * ext/objspace/objspace.c (type2sym): bug fix.
+ Should use `i' instead of `type'.
+
+Wed Oct 24 10:33:09 2012 Koichi Sasada <ko1@atdot.net>
+
+ * gc.c (garbage_collect, gc_marks): move the location of
+ clear and restore rb_objspace_t::mark_func_data
+ from garbage_collect() to gc_marks().
+
+Wed Oct 24 10:17:45 2012 Koichi Sasada <ko1@atdot.net>
+
+ * ext/objspace/objspace.c (Init_objspace): add a new method
+ `ObjectSpace::InternalObjectWrapper#internal_object_id' which returns
+ an object id of a wrapped internal object.
+
+Wed Oct 24 08:55:04 2012 Koichi Sasada <ko1@atdot.net>
+
+ * ext/objspace/objspace.c (ObjectSpace.reachable_objects_from):
+ internal object support.
+ If given object `obj' has references to internal objects
+ (such as T_NODE objects), then this method returns instances of
+ `ObjectSpace::InternalObjectWrapper' instead of that internal objects.
+ This instance contains a reference to an internal object and you can
+ check the type of internal object using
+ `ObjectSpace::InternalObjectWrapper#type' method.
+ Rdoc of `InternalObjectWrapper' is not prepared yet.
+
+ * gc.c (rb_objspace_reachable_objects_from), gc.h: change
+ an interface of 'rb_objspace_reachable_objects_from()'
+
+ * gc.c, gc.h: add two APIs
+ - rb_objspace_markable_object_p(obj): check markable or not.
+ - rb_objspace_internal_object_p(obj): check internal or not.
+
+Wed Oct 24 05:52:36 2012 Koichi Sasada <ko1@atdot.net>
+
+ * vm_insnhelper.c (vm_call_method): remove `default' and
+ add a case for `VM_METHOD_TYPE_UNDEF'.
+
+Wed Oct 24 05:41:18 2012 Koichi Sasada <ko1@atdot.net>
+
+ * eval_error.c (error_print), vm_eval.c (eval_string_with_cref),
+ vm_trace.c (rb_suppress_tracing): use TH_PUSH_TAG() instead of
+ PUSH_TAG().
+
+Wed Oct 24 05:17:52 2012 Koichi Sasada <ko1@atdot.net>
+
+ * vm_eval.c (vm_call0_body): remove RUBY_VM_CHECK_INTS()
+ after method invocation using rb_call0().
+
+ * vm_eval.c (vm_call0_body): remove default section on top of
+ switch statement and add cases for `VM_METHOD_TYPE_CFUNC_FRAMELESS'
+ and `VM_METHOD_TYPE_UNDEF'.
+
+ * vm_eval.c (vm_call0_body): remove useless brackets.
+
+Tue Oct 23 22:34:49 2012 Koichi Sasada <ko1@atdot.net>
+
+ * thread.c (thread_raise_m): check interrupts after Thread#raise
+ if a target thread is the current thread because the behavior
+ of Thread.current.raise is expected to perform same as
+ Kernel.raise (by rubyspec).
+
+Tue Oct 23 17:08:39 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ruby.c (usage, process_options): show more info in --help.
+ [EXPERIMENTAL] [ruby-core:48072] [Bug #7184]
+
+Tue Oct 23 14:20:43 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * misc/ruby-electric.el using variable `last-command-event' instead of
+ obsolete `last-command-char', so that work with Emacs trunk.
+ a patch by Victor Deryagin <vderyagin AT gmail.com>.
+
+Tue Oct 23 14:06:47 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in (visibility_option): visibility attribute is not
+ available before GCC 4, so do not use -fvisibility option in that
+ case. [ruby-core:48147] [Bug #7205]
+
+Tue Oct 23 12:57:29 2012 Koichi Sasada <ko1@atdot.net>
+
+ * vm_core.h, vm_insnhelper.c, vm_eval.c (OPT_CALL_CFUNC_WITHOUT_FRAME):
+ add a new optimization and its macro `OPT_CALL_CFUNC_WITHOUT_FRAME'.
+ This optimization makes all cfunc method calls `frameless', which
+ is faster than ordinal cfunc method call.
+ If `frame' is needed (for example, it calls another method with
+ `rb_funcall()'), then build a frame. In other words, this
+ optimization delays frame building.
+ However, to delay the frame building, we need additional overheads:
+ (1) Store the last call information.
+ (2) Check the delayed frame building before the frame is needed.
+ (3) Overhead to build a delayed frame.
+ rb_thread_t::passed_ci is storage of delayed cfunc call information.
+ (1) is lightweight because it is only 1 assignment to `passed_ci'.
+ To achieve (2), we modify GET_THREAD() to check `passed_ci' every
+ time. It causes 10% overhead on my environment.
+ This optimization only works for cfunc methods which do not need
+ their `frame'.
+ After evaluation on my environment, this optimization does not
+ effective every time. Because of this evaluation results, this
+ optimization is disabled at default.
+
+ * vm_insnhelper.c, vm.c: add VM_PROFILE* macros to measure behaviour
+ of VM internals. I will extend this feature.
+
+ * vm_method.c, method.h: change parameters of the `invoker' function.
+ Receive `func' pointer as the first parameter.
+
+Tue Oct 23 06:21:05 2012 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * ext/psych/parser.c: just get the constant defined in Ruby.
+
+ * ext/psych/lib/psych/syntax_error.rb: Psych::SyntaxError now inherits
+ from StandardError rather than SyntaxError. Thanks Eric Hodel!
+
+ * test/psych/test_exception.rb: tests for change.
+
+Tue Oct 23 06:17:36 2012 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * ext/psych/lib/psych/scalar_scanner.rb: Cache symbols while
+ tokenizing. Thanks Kevin Menard!
+
+Tue Oct 23 06:15:40 2012 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * ext/psych/lib/psych/scalar_scanner.rb: Updated the RegExp to catch
+ Strings earlier in the tokenization process. Thanks Kevin Menard!
+
+Tue Oct 23 06:12:39 2012 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * ext/psych/lib/psych/visitors/to_ruby.rb: Handle nil tags specially
+ to avoid slow method_missing calls. Thanks Kevin Menard!
+
+Tue Oct 23 06:07:57 2012 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * ext/psych/lib/psych/scalar_scanner.rb: Ignore bad timestamps. If
+ something looks like a timestamp but has an invalid component, treat
+ it as a string instead of throwing an ArgumentError.
+ Thanks Rhett Sutphin!
+
+ * test/psych/test_scalar_scanner.rb: appropriate tests.
+
+Tue Oct 23 06:04:07 2012 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * ext/psych/lib/psych/scalar_scanner.rb: Fix scalar_scanner to
+ understand strings starting with an underscore and containing only
+ digits. Thanks Kelley Reynolds.
+
+ * test/psych/test_scalar_scanner.rb: test for fix
+
+Tue Oct 23 06:00:41 2012 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * ext/psych/lib/psych.rb: Changed comment in psych.rb to update new
+ home page for libyaml. Thanks to Carolyn Ann.
+
+Sun Oct 21 19:12:59 2012 Kazuki Tsujimoto <kazuki@callcc.net>
+
+ * vm_core.h (rb_vm_t::trace_running): add a new field
+ `trace_running' to store vm global tracing status.
+
+ * vm_trace.c: fix SEGV bug. event_hook was free'd
+ even when the hook is still used in another thread.
+ [ruby-dev:46141] [Bug #7032]
+
+Sun Oct 21 19:12:42 2012 Kazuki Tsujimoto <kazuki@callcc.net>
+
+ * vm_core.h (rb_vm_t::trace_flag): remove `trace_flag'
+ which is no longer used.
+
+Sun Oct 21 18:34:27 2012 Tadayoshi Funaba <tadf@dotrb.org>
+
+ * ext/date/date_parse.c (date__parse): uses more tight parser if
+ defined TIGHT_PARSER. now inactivated; because it introduces
+ incompatibilities and it is a bit slow.
+
+Sat Oct 20 15:35:06 2012 Narihiro Nakamura <authornari@gmail.com>
+
+ * include/ruby/ruby.h: add C APIs.
+ VALUE rb_newobj_of(VALUE klass, VALUE flags)
+ #define NEWOBJ_OF(obj,type,klass,flags)
+ These allow to change a allocation strategy depending on klass
+ or flags.
+
+ * gc.c: ditto
+
+ * array.c: use new C API.
+ * bignum.c: ditto
+ * class.c: ditto
+ * complex.c: ditto
+ * ext/socket/ancdata.c: ditto
+ * ext/socket/option.c: ditto
+ * hash.c: ditto
+ * io.c: ditto
+ * marshal.c: ditto
+ * numeric.c: ditto
+ * object.c: ditto
+ * random.c: ditto
+ * range.c: ditto
+ * rational.c: ditto
+ * re.c: ditto
+ * string.c: ditto
+ * struct.c: ditto
+ [Feature #7177][Feature #7047]
+
+Sat Oct 20 12:50:00 2012 Zachary Scott <zachary@zacharyscott.net>
+
+ * ext/socket/socket.c: Documentation for Socket
+ Based on a patch by David Albert
+ [Bug #7105] [ruby-core:47828]
+
+Sat Oct 20 11:00:00 2012 Zachary Scott <zachary@zacharyscott.net>
+
+ * lib/open-uri.rb: Documentation for OpenURI
+
+Sat Oct 20 06:18:34 2012 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * hash.c (initialize_copy): unset the default proc if there isn't one
+ for the target hash, call to_hash, check frozen status.
+
+Fri Oct 19 22:22:01 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * vm.c (rb_vm_jump_tag_but_local_jump): pass through thrown objects.
+ [ruby-dev:46234] [Bug #7185]
+
+ * vm_eval.c (rb_eval_cmd): if state is non-zero, val should be nil and
+ rb_vm_jump_tag_but_local_jump() just jump tag.
+
+Fri Oct 19 22:11:55 2012 Benoit Daloze <eregontp@gmail.com>
+
+ * pack.c (pack_unpack): set encoding of the
+ 'H','h','B' and 'B' modifiers to US-ASCII.
+
+ * test/ruby/test_pack.rb: tests for the above.
+ [ruby-core:47653][Bug #7050]
+
+ * test/test_securerandom.rb: tests for SecureRandom.hex
+ from tenderlove. [ruby-core:46792][Bug #6799]
+
+Fri Oct 19 19:29:11 2012 Koichi Sasada <ko1@atdot.net>
+
+ * method.h (rb_method_cfunc_t::invoker): add new field (func ptr)
+ `invoker'. `invoker' function invoke cfunc body
+ (rb_method_cfunc_t::func).
+ `invoker' is set at method definition timing.
+ With this change, the big `switch' (branch) in `call_cfunc()'
+ is no longer needed.
+ However, the performance benefit is only a bit.
+
+ * vm_core.h (rb_call_info_t::aux::func): add a new field to store
+ cfunc body function pointer.
+
+ * vm_method.c (call_cfunc_invoker_func): add a new function which
+ returns a suitable invoke function.
+
+ * vm_method.c (setup_method_cfunc_struct): added.
+
+ * vm_method.c (rb_add_method): fix to set `invoker'.
+
+ * vm_eval.c (vm_call0_body): catch up above changes.
+
+ * vm_insnhelper.c (call_cfunc): removed.
+
+ * vm_insnhelper.c (vm_call_cfunc): fix to call cfunc body
+ with `invoker' function.
+
+Fri Oct 19 16:55:58 2012 Koichi Sasada <ko1@atdot.net>
+
+ * eval.c, vm_eval.c: use TH_PUSH_TAG() instead of PUSH_TAG().
+
+Fri Oct 19 11:13:55 2012 Koichi Sasada <ko1@atdot.net>
+
+ * benchmark/driver.rb: remove unexpected `output'.
+ (commit miss)
+
+Fri Oct 19 10:24:03 2012 Koichi Sasada <ko1@atdot.net>
+
+ * vm_insnhelper.c (vm_search_method): remove needless local variable.
+
+Fri Oct 19 10:22:26 2012 Koichi Sasada <ko1@atdot.net>
+
+ * benchmark/bmx_temp.rb: removed.
+ This file should not be in repository.
+
+Fri Oct 19 10:20:10 2012 Koichi Sasada <ko1@atdot.net>
+
+ * benchmark/driver.rb: add new option `--ruby-arg [ARG]'
+ which is passed as a launch parameter for each ruby's execution.
+ ($ ruby [ARG] [File])
+
+Thu Oct 18 18:42:35 2012 Koichi Sasada <ko1@atdot.net>
+
+ * insns.def (opt_send_simple): move the location of
+ `opt_send_simple' to the place near `send' definition.
+ (to take care about icache locality).
+
+Thu Oct 18 18:29:25 2012 Koichi Sasada <ko1@atdot.net>
+
+ * insns.def (send): remove unused condition.
+ This condition will be true after r37258.
+
+ * vm_insnhelper.c (vm_caller_setup_args): remove `UNLIKELY' on
+ checking blockiseq (it seems `LIKELY').
+
+Thu Oct 18 17:31:58 2012 Koichi Sasada <ko1@atdot.net>
+
+ * insns.def (opt_send_simple): introduce new instruction used
+ when no need to care about block and splat.
+
+ * compile.c: use the `opt_send_simple' instruction.
+
+Thu Oct 18 16:44:07 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * vm_method.c (rb_add_method_cfunc, rb_add_method_cfunc_frameless):
+ check arity earlier at definition time.
+
+Thu Oct 18 15:11:31 2012 Koichi Sasada <ko1@atdot.net>
+
+ * vm_insnhelper.c: add `inline' keyword to several functions.
+ Compilers (gcc) are conservative than I expected.
+
+Thu Oct 18 15:01:15 2012 Koichi Sasada <ko1@atdot.net>
+
+ * include/ruby/ruby.h: add a decl. of
+ `rb_define_frameless_method()'.
+
+Thu Oct 18 14:31:17 2012 Koichi Sasada <ko1@atdot.net>
+
+ * compile.c (new_callinfo): set a temporary index of callinfo
+ (used in `iseq_set_sequence()') to rb_call_info_t::aux::index.
+ rb_call_info_t::argc is initialized by same value of
+ rb_call_info_t::orig_argc.
+
+Thu Oct 18 14:11:08 2012 Koichi Sasada <ko1@atdot.net>
+
+ * class.c (rb_define_frameless_method): rename from
+ rb_define_method_fast(). Defined method with this C API
+ does not make a method frame. It is bit lightweight than
+ ordinal C functions. Now only 0 or 1 argc are permitted.
+
+ * method.h (VM_METHOD_TYPE_CFUNC_FRAMELESS): rename macro name
+ from VM_METHOD_TYPE_CFUNC_FAST.
+
+ * vm_insnhelper.c, vm_method.c: rename related functions.
+
+ * proc.c (rb_method_entry_arity): catch up above changes.
+
+Thu Oct 18 10:30:34 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * parse.y (assignable_gen): fail if yyerror occurred. fix a bug in
+ r36973.
+
+Thu Oct 18 09:23:03 2012 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * hash.c (initialize_copy): duping should rehash the hash.
+
+ * test/ruby/test_hash.rb: added a test to ensure rehash.
+
+Wed Oct 17 21:16:47 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+
+ * common.mk (WPROGRAM): need same dependencies as PROGRAM.
+
+ * cygwin/GNUmakefile.in (uncommon.mk): move include position
+ below WPROGRAM definition to be defined in uncommon.mk.
+
+ * ext/extmk.rb (all, static): fix make rubyw.exe failure with make -jN.
+ If make of ruby.exe and rubyw.exe run in parallel, link dll and link
+ exe run in parallel, which causes link failure on mingw. To fix this,
+ we make ruby.exe and rubyw.exe in one make process.
+ [ruby-core:48007] [Bug #7165]
+
+Wed Oct 17 16:25:34 2012 Koichi Sasada <ko1@atdot.net>
+
+ * benchmark/bm_vm2_method_missing.rb: add a benchmark to measure
+ performance of invoking `method_missing'.
+
+Wed Oct 17 16:23:17 2012 Koichi Sasada <ko1@atdot.net>
+
+ * vm_insnhelper.c (vm_getivar): fix to use `aux.index' instead of
+ `aux.opt_pc'.
+
+Wed Oct 17 16:03:54 2012 Koichi Sasada <ko1@atdot.net>
+
+ * vm_insnhelper.c (vm_call_method_missing): make a refactoring
+ about method_missing process. Use `vm_call_method()' to invoke
+ `method_missing' method instead of `rb_funcall2()'.
+ In `vm_call_method()', set fastpath to `vm_call_method_missing()'
+ if it can be cached.
+
+ * vm_core.h (rb_call_info_t): add new field
+ `rb_call_info_t::aux::missing_reason' to pass the reason to
+ `vm_call_method_missing()'.
+
+Wed Oct 17 15:33:12 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in (opt-dir): allow multiple directories separated by
+ $PATH_SEPARATOR as well as dir_config in mkmf.rb. [ruby-core:47868]
+ [Bug #7120]
+
+Wed Oct 17 15:08:13 2012 Shugo Maeda <shugo@ruby-lang.org>
+
+ * lib/net/imap.rb: fix Net::IMAP::ResponseParser to accept
+ message/delivery-status ([ruby-core:47920] [Bug #7146]),
+ message/rfc822 attachments ([ruby-core:47921] [Bug #7147]), and
+ (BODY ("MIXED")) ([ruby-core:47951] [Bug #7153]).
+ patched by Tony Arkles.
+
+ * test/net/imap/test_imap_response_parser.rb: related test.
+
+Wed Oct 17 11:04:48 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * test/ruby/test_hash.rb (TestHash#test_dup_equality): added a new test
+ to show the problem of r37232.
+
+Wed Oct 17 10:48:40 2012 Shugo Maeda <shugo@ruby-lang.org>
+
+ * vm_insnhelper.c (vm_search_method): fix a build error that occurs
+ when OPT_INLINE_METHOD_CACHE is 0.
+
+Wed Oct 17 08:46:47 2012 Koichi Sasada <ko1@atdot.net>
+
+ * benchmark/bm_vm2_dstr.rb: add a benchmark to measure
+ performance of dynamic generated string ("foo#{bar}baz").
+
+Wed Oct 17 08:32:46 2012 Koichi Sasada <ko1@atdot.net>
+
+ * compile.c (compile_dstr_fragments): use `putobject' instead of
+ `putstring' for all of strings used by NODE_DSTR because
+ ruby users can not grab this string.
+ For example, the string object of "baz" in "foo#{bar}baz"
+ is located by `putobject' (users can not touch "baz" object
+ directly). This change reduces GC pressure.
+ This improvement is suggested by Aaron Patterson.
+
+Wed Oct 17 08:02:57 2012 Koichi Sasada <ko1@atdot.net>
+
+ * thread.c (rb_threadptr_interrupt_mask): fix to check interrupt
+ after interrupt_mask changed.
+
+Wed Oct 17 06:42:47 2012 Koichi Sasada <ko1@atdot.net>
+
+ * vm_insnhelper.c (vm_call_method): fix to return value immediately.
+ Remove CHECK_INTS() after that method dispatch.
-Thu Oct 10 13:52:37 2013 Koichi Sasada <ko1@atdot.net>
+Wed Oct 17 06:25:56 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * 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.
+ * hash.c (initialize_copy): copy the underlying st_table on dup,
+ rather than copying the hash key by key. [ruby-core:48009]
- * vm_core.h: change data structure.
+ * test/ruby/test_hash.rb: relevant tests for initialize_copy
-Thu Oct 10 11:11:33 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Oct 17 06:17:44 2012 Koichi Sasada <ko1@atdot.net>
- * vm.c (Init_VM): hide also the singleton class of frozen-core, not
- only frozen-core itself.
+ * vm_insnhelper.c (vm_call_iseq_setup_2): separate tailcall and normal
+ method frame setup functions.
+ Add checking interrupts at the tailcall setup function.
-Thu Oct 10 06:02:08 2013 Koichi Sasada <ko1@atdot.net>
+Wed Oct 17 05:35:37 2012 Koichi Sasada <ko1@atdot.net>
- * test/ruby/test_rand.rb: fix r43224. local variable `e' is
- no longer available.
+ * benchmark/bm_vm1_yield.rb: add a benchmark to measure `yield'
+ (invoke empty block) performance.
-Thu Oct 10 00:02:35 2013 Yusuke Endoh <mame@tsg.ne.jp>
+ * benchmark/bm_vm2_method_with_block.rb: add a benchmark to measure
+ method invocation with empty block.
- * 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 17 05:05:07 2012 Koichi Sasada <ko1@atdot.net>
-Wed Oct 9 23:57:02 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_insnhelper.c (vm_invoke_block): vm_caller_setup_args() can skip
+ when splat flag is not set.
- * object.c (id_for_attr): avoid inadvertent symbol creation.
+Wed Oct 17 01:53:47 2012 Koichi Sasada <ko1@atdot.net>
-Wed Oct 9 18:03:01 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_insnhelper.c (vm_getivar, vm_setivar): support index inline cache
+ with rb_call_info_t to speedup `attr' getter and setter.
+ Cached index is stored in rb_call_info_t::aux::index.
+ `index' == 0 means not cached. `index' > 0 means cached and cached
+ index is `index - 1'.
- * vm_method.c (rb_attr): preserve encoding of the attribute ID in
+ * insns.def ((get|set)instancevariable): use new wrapper functions
+ vm_(get|set)instancevariable() defined in vm_insnhelper.c.
+
+ * vm_core.h (rb_call_info_t::aux): introduce new union data because
+ opt_pc can share with index.
+
+Tue Oct 16 22:24:44 2012 Koichi Sasada <ko1@atdot.net>
+
+ * benchmark/driver.rb (show_results): Show speedup ratio
+ with first executables score at last of results
+ if two or more executables are given.
+
+Tue Oct 16 21:59:01 2012 Koichi Sasada <ko1@atdot.net>
+
+ * benchmark/driver.rb: some refactoring.
+ (1) Remove `average differential'.
+ In this benchmark driver, We should not care about `average'.
+ We use fastest score because this score should not include
+ any disturbances (affections of background process, etc).
+ If you care about timing affect, I recommend `median'
+ score with more than 5 examinations rather than simple
+ `average' score (`average' score was affected by error scores).
+ (2) Show log file name.
+ (3) Change default directory from './' to driver's directory.
+
+Tue Oct 16 14:56:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * file.c (rb_file_join): need to check again after any conversion run.
+ [ruby-core:48012] [Bug #7168]
+
+Tue Oct 16 12:52:14 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+
+ * test/ruby/envutil.rb (Test::Unit::Assertions#assert_file):
+ rename from file_assertion.
+
+Tue Oct 16 11:30:18 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * file.c (rb_file_join): hide the result under construction until
+ return.
+
+ * file.c (rb_file_join): check nul-byte only for strings, since
+ FilePathStringValue() does it. [ruby-core:48012] [Bug #7168]
+
+ * file.c (rb_file_join): path names must be ASCII-compatible.
+ [ruby-core:48012] [Bug #7168]
+
+ * file.c (check_path_encoding): new function to ensure path name
+ encoding to be ASCII-compatible.
+
+Tue Oct 16 09:40:04 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * test/ruby/test_regexp.rb
+ (TextRegexp#test_raw_hyphen_and_tk_char_type_after_range): use
+ Regexp.new instead of literal to ignore a parser warning.
+
+Tue Oct 16 09:30:30 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * test/ruby/test_regexp.rb
+ (TextRegexp#test_raw_hyphen_and_tk_char_type_after_range): ignoring
+ warnings are already set in setup method.
+
+Tue Oct 16 06:44:06 2012 Koichi Sasada <ko1@atdot.net>
+
+ * vm_insnhelper.c (VM_CALLEE_SETUP_ARG): fix wrong condition.
+
+Tue Oct 16 06:29:18 2012 Koichi Sasada <ko1@atdot.net>
+
+ * vm_insnhelper.c (vm_call_method): disable CI_SET_FASTPATH() if
+ this method call needs splat argument because cached functions
+ (vm_call_attrset, vm_call_ivar, vm_call_cfunc_fast_(unary|binary))
+ do not check an arity.
+
+ * bootstraptest/test_method.rb: add a test to check an above issue.
+
+Tue Oct 16 06:15:44 2012 Koichi Sasada <ko1@atdot.net>
+
+ * method.h: introduce new method type VM_METHOD_TYPE_CFUNC_FAST.
+ This method is similar to VM_METHOD_TYPE_CFUNC methods, but
+ called cfunc without building new frame (does not push new control
+ frame). If error is occurred in cfunc, the backtrace only shows
+ caller frame and upper.
+ This kind of methods can be added by rb_define_method_fast().
+ This feature is similar to specialized instructions (opt_plus, etc),
+ but more flexible (but a bit slower).
+
+ * class.c (rb_define_method_fast): added.
+ Maybe it will be renamed soon.
+
+ * vm_insnhelper.c (vm_call_method): support method type
+ VM_METHOD_TYPE_CFUNC_FAST.
+
+ * proc.c (rb_method_entry_arity): catch up new method type.
+
+ * vm_method.c (rb_add_method_cfunc_fast): added.
+
+Tue Oct 16 02:32:29 2012 Koichi Sasada <ko1@atdot.net>
+
+ * vm_insnhelper.h (CI_SET_FASTPATH): add new parameter `enabled'.
+ If `enable' is 0 then CI_SET_FASTPATH() doesn't work.
+ And add new configuration option OPT_CALL_FASTPATH. If this macro
+ was defined by 0, then CI_SET_FASTPATH() doesn't work any more.
+
+ * vm_insnhelper.c (vm_call_method): Pass `0' for `enabled' parameter
+ of CI_SET_FASTPATH if this method is protected.
+
+Tue Oct 16 02:17:35 2012 Koichi Sasada <ko1@atdot.net>
+
+ * vm_core.h (VM_CALL_*): rename VM_CALL_*_BIT
+ to VM_CALL_* (remove `_BIT' suffix).
+ Add comments on each macros.
+ Remove unused macro VM_CALL_TAILRECURSION_BIT.
+
+ * compile.c, iseq.c, insns.def, vm_insnhelper.c: ditto.
+
+Mon Oct 15 22:14:44 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * test/ruby/envutil.rb (Test::Unit::Assertions#file_assertion):
+ rewrite file assertions.
+
+Mon Oct 15 09:41:17 2012 Koichi Sasada <ko1@atdot.net>
+
+ * vm_insnhelper.c (VM_CALLEE_SETUP_ARG): skip CI_SET_FASTPATH() if
+ it was called from vm_yield_setup_args().
+
+Mon Oct 15 05:20:13 2012 Koichi Sasada <ko1@atdot.net>
+
+ * vm_insnhelper.h CI_SET_FASTPATH: introduce new macro
+ `CI_SET_FASTPATH(ci, func)'. This macro set `ci->call' as `func'.
+ `func' (ci->call) is called at the last of `send'
+ (and `invokesuper') instruction.
+ `CI_SET_FASTPATH' does not set `ci->call' when the method
+ (stored in `ci->me') is `protected'.
+
+ * vm_insnhelper.c (vm_call_method): use `CI_SET_FASTPATH'.
+ After several checking (visibility, argc checking), the result of
+ checking can be reused until re-definition of this method
+ with inline method cache.
+
+ Note that this optimization is now experimental.
+ If you find any problem about it, please tell us.
+
+Mon Oct 15 04:51:55 2012 Koichi Sasada <ko1@atdot.net>
+
+ * vm_insnhelper.c: refactoring.
+ - move all `call' related functions to the last of file.
+ - make functions for respective method types in vm_call_method().
+ (all functions have same function parameters)
+
+ * vm_core.h: add `opt_pc' field in `rb_call_info_t'
+ as temporal variable.
+
+ * vm_eval.c (vm_call0_body): catch up above changes.
+
+Mon Oct 15 03:51:46 2012 Koichi Sasada <ko1@atdot.net>
+
+ * benchmark/bm_vm1_attr_ivar(_set).rb: added (for method dispatch speed).
+
+ * benchmark/bm_vm1_float_simple.rb: added (for flonum/float).
+
+Mon Oct 15 02:51:16 2012 Koichi Sasada <ko1@atdot.net>
+
+ * vm_eval.c (vm_call0_body): add new function.
+ `vm_call0()' makes call_info struct and calls `vm_call0_body()'
+ with this struct. In near future, `vm_call0()' will be removed
+ because all of `vm_call0()' users setup call_info struct by itself.
+
+Mon Oct 15 01:38:06 2012 Koichi Sasada <ko1@atdot.net>
+
+ * insns.def (send, invokesuper, invokeblock, opt_*), vm_core.h:
+ use only a `ci' (rb_call_info_t) parameter instead of using
+ parameters such as `op_id', 'op_argc', `blockiseq' and flag.
+ These information are stored in rb_call_info_t at the compile
+ time.
+ This technique simplifies parameter passing at related
+ function calls (~10% speedups for simple method invocation at
+ my machine).
+ `rb_call_info_t' also has new function pointer variable `call'.
+ This `call' variable enables to customize method (block)
+ invocation process for each place. However, it always call
+ `vm_call_general()' at this changes.
+ `rb_call_info_t' also has temporary variables for method
+ (block) invocation.
+
+ * vm_core.h, compile.c, insns.def: introduce VM_CALL_ARGS_SKIP_SETUP
+ VM_CALL macro. This flag indicates that this call can skip
+ caller_setup (block arg and splat arg).
+
+ * compile.c: catch up above changes.
+
+ * iseq.c: catch up above changes (especially for TS_CALLINFO).
+
+ * tool/instruction.rb: catch up above changes.
+
+ * vm_insnhelper.c, vm_insnhelper.h: ditto. Macros and functions
+ parameters are changed.
+
+ * vm_eval.c (vm_call0): ditto (it will be rewritten soon).
+
+Sun Oct 14 12:30:44 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ruby.c (rb_f_sub, rb_f_gsub): pass the given block.
+ [ruby-core:47967] [Bug #7157]
+
+Sat Oct 13 23:15:39 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * regparse.c (parse_char_class): should match with a hyphen after a
+ range in a character class.
+
+ * test/ruby/test_regexp.rb (TestRegexp#test_char_class): fixed wrong
+ test.
+
+ * test/ruby/test_regexp.rb (TestRegexp#check): now can accept the
error message.
-Wed Oct 9 17:40:16 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/ruby/test_regexp.rb
+ (TextRegexp#test_raw_hyphen_and_tk_char_type_after_range): renamed
+ because the previous name was wrong.
+
+ * test/ruby/test_regexp.rb
+ (TextRegexp#test_raw_hyphen_and_tk_char_type_after_range): added
+ more test pattern.
+
+Sat Oct 13 03:01:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * file.c (realpath_rec): prevent link from GC while link_names refers
+ the content.
+
+Sat Oct 13 01:37:48 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * test/ruby/test_regexp.rb
+ (TestRegexp#test_raw_hyphen_and_type_char_after_range): added new
+ test. ref [ruby-core:47115] [Backport #6853]
+
+Fri Oct 12 21:55:08 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+
+ * include/ruby/win32.h (rb_w32_pow): set floating point precision
+ for mingw-w64 x86 pow(). This improves the precision of pow() on
+ Windows XP for TestFloat#test_round_with_precision failure.
+ [ruby-core:47911] [Bug #7142]
+
+Fri Oct 12 21:37:25 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+
+ * test/webrick/test_cgi.rb (TestWEBrickCGI#test_cgi): skip a test
+ depending on locale on Windows. ENV[] doesn't work properly if
+ console code page is not equal to file system encoding.
+ [ruby-core:47910] [Bug #7140]
+
+Fri Oct 12 20:40:29 2012 Tanaka Akira <akr@fsij.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]
+ * process.c (posix_sh_cmds): the command name of colon is ":".
-Wed Oct 9 13:53:14 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Oct 12 18:18:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * compar.c (cmp_eq): fail if recursion. [ruby-core:57736] [Bug #9003]
+ * file.c (rb_get_path_check): path name must not contain NUL bytes.
- * thread.c (rb_exec_recursive_paired_outer): new function which is
- combination of paired and outer variants.
+Fri Oct 12 16:06:20 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Wed Oct 9 09:18:14 2013 Koichi Sasada <ko1@atdot.net>
+ * tool/merger.rb: now can merge revision(s) without --ticket again.
- * 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().
+Fri Oct 12 14:10:41 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/-test-/debug/profile_frames.c,
- test/-ext-/debug/test_profile_frames.rb: fix a test for this change.
+ * lib/mkmf.rb (dir_config, init_mkmf): use configured libdir value as
+ default library path. [ruby-core:43726] [Bug #6207]
+Fri Oct 12 05:25:00 2012 Zachary Scott <zzak@ruby-lang.org>
-Wed Oct 9 00:55:51 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/timeout.rb (timeout):
+ Remove paragraph on wrong implementation detail.
+ [ruby-core:47739] [Bug #7088]
- * load.c (load_lock): display backtrace to $stderr at circular
- require.
+Thu Oct 11 23:09:46 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * vm_backtrace.c (rb_backtrace_print_to): new function to print
- backtrace to the given output.
+ * string.c (rb_str_sub{seq,pos,str}, rb_str_each_{line,codepoint}):
+ prevent String copies from GC. [ruby-core:47881] [Bug #7135]
-Tue Oct 8 21:03:35 2013 Koichi Sasada <ko1@atdot.net>
+Thu Oct 11 07:40:50 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * 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 (insn_operand_intern): cast op to rb_call_info_t* before
+ compare with iseq->callinfo_entries whose type is rb_call_info_t*.
- * iseq.c (rb_iseq_klass), internal.h: add new internal function
- rb_iseq_method_name().
+Thu Oct 11 03:37:08 2012 Koichi Sasada <ko1@atdot.net>
- * ext/-test-/debug/profile_frames.c (profile_frames),
- test/-ext-/debug/test_profile_frames.rb: add a test.
+ * bootstraptest/test_block.rb: add tests for block with super.
-Tue Oct 8 16:11:11 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Oct 11 02:54:07 2012 Koichi Sasada <ko1@atdot.net>
- * array.c (rb_ary_uniq): use rb_hash_values(), as well as the case no
- block is given.
+ * vm_dump.c: fix debug prints to catch up recent changes
+ such as VM data structures.
- * internal.h: define rb_hash_values() as internal API.
+Thu Oct 11 02:50:34 2012 Koichi Sasada <ko1@atdot.net>
-Tue Oct 8 13:53:21 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * iseq.c (insn_operand_intern): add support disasm TS_CALLINFO
+ operands.
- * array.c (rb_ary_uniq): use rb_hash_keys().
+Wed Oct 10 15:12:48 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * internal.h: define rb_hash_keys() as internal API.
+ * test/ruby/test_process.rb (TestProcess#test_execopts_gid): skip on
+ windows because the platform does not have Process.group method.
+ patched by Jon Forums in [ruby-core:47878] [Bug #7133].
- * hash.c (rb_hash_keys): ditto.
+Tue Oct 9 23:18:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Oct 8 10:56:39 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * test/ruby/envutil.rb (assert_file, assert_file_not): more
+ descriptive assertions for File predicates.
- * 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 9 18:01:37 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Oct 8 05:58:12 2013 Tanaka Akira <akr@fsij.org>
+ * array.c (rb_ary_sample): use rb_random_ulong_limited, since
+ precision of long may be larger than double.
- * lib/time.rb (Time.strptime): Time.strptime('0', '%s') returns local
- time Time object as Ruby 2.0 and before.
+ * random.c (rb_random_ulong_limited): new function to return a random
+ value from 0 upto limit as unsigned long, similarly to
+ rb_genrand_ulong_limited but with arbitrary RNG object.
-Tue Oct 8 05:40:37 2013 Eric Hodel <drbrain@segment7.net>
+Tue Oct 9 17:13:27 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * .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
+ * process.c (rb_execarg_addopt, rb_execarg_run_options): add :uid and
+ :gid options. [ruby-core:47414] [Feature #6975]
-Tue Oct 8 04:28:25 2013 Akinori MUSHA <knu@iDaemons.org>
+Tue Oct 9 14:36:11 2012 Koichi Sasada <ko1@atdot.net>
- * 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.
+ * iseq.c (iseq_free): fix memory leak.
+ rb_iseq_t::callinfo_entries should be freed.
-Tue Oct 8 04:12:45 2013 Akinori MUSHA <knu@iDaemons.org>
+Tue Oct 9 14:28:18 2012 Koichi Sasada <ko1@atdot.net>
- * misc/ruby-additional.el (ruby-mode-set-encoding): Add a missing
- else clause to unbreak with `cp932`, etc.
+ * vm_core.h (rb_call_info_t): add new type `rb_call_info_t'.
+ This data structure contains information including inline method
+ cache. After that, `struct iseq_inline_cache_entry' does not
+ need to contain inline cache for method invocation.
+ Other information will be added to this data structure.
- * misc/ruby-mode.el (ruby-mode-set-encoding): Ditto.
+ * vm_core.h (rb_iseq_t): add `callinfo_entries' and `callinfo_size'
+ members to `rb_iseq_t'.
-Tue Oct 8 03:57:34 2013 Akinori MUSHA <knu@iDaemons.org>
+ * insns.def, compile.c: Use CALL_INFO instead of IC.
- * misc/ruby-additional.el (ruby-mode-set-encoding): Use
- `default-buffer-file-coding-system` if the :prefer-utf-8
- property is not available.
+ * tool/instruction.rb: support CALL_INFO as operand type.
- * misc/ruby-mode.el (ruby-mode-set-encoding): Ditto.
+ * vm_insnhelper.c, vm_insnhelper.h: ditto.
- * misc/ruby-additional.el (ruby-encoding-map): Override the
- default value.
+Sun Oct 7 23:54:33 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
-Tue Oct 8 03:19:19 2013 Akinori MUSHA <knu@iDaemons.org>
+ * ext/zlib/zlib.c (zstream_run_func): don't call inflate() when
+ z->stream.avail_in == 0. it return Z_BUF_ERROR.
+ but deflate() could be called with z->stream->avail_in == 0 because
+ it has hidden buffer in z->stream->state (opaque structure).
+ fix for gem install error. [ruby-dev:46149] [Bug #7040]
- * misc/ruby-additional.el (ruby-mode-set-encoding): Add support
- for `prefer-utf-8` which was introduced in Emacs trunk.
+Mon Oct 8 23:55:41 2012 Shugo Maeda <shugo@ruby-lang.org>
- * 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.
+ * eval.c (rb_mod_refinements): new method Module#refinements.
- * misc/ruby-additional.el (ruby-mode-set-encoding): Add support
- for encodings mapped to nil in `ruby-encoding-map`.
+ * test/ruby/test_refinement.rb: add new tests for the above changes.
- * 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.
+Mon Oct 8 23:02:19 2012 Shugo Maeda <shugo@ruby-lang.org>
- * misc/ruby-additional.el (ruby-encoding-map): Add type
- declaration for better customize UI.
+ * eval.c, gc.c, iseq.c, node.h, vm_insnhelper.c, vm_insnhelper.h,
+ vm_method.c: rename omod and overlaid modules to refinements.
- * misc/ruby-mode.el: Ditto for the above.
+ * eval.c (hidden_identity_hash_new): renamed from identity_hash_new.
-Tue Oct 8 00:14:53 2013 Akinori MUSHA <knu@iDaemons.org>
+Sun Oct 7 04:50:00 2012 Zachary Scott <zzak@ruby-lang.org>
- * misc/ruby-additional.el: Add a standard header and footer,
- including (provide 'ruby-additional).
+ * lib/abbrev.rb: Documentation examples for Abbrev.
+ [ruby-core:47442] [Bug #6985]
-Mon Oct 7 22:52:45 2013 Akinori MUSHA <knu@iDaemons.org>
+Sun Oct 7 04:50:00 2012 Zachary Scott <zzak@ruby-lang.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.
+ * thread.c (rb_thread_aref):
+ Grammar in Thread documentation.
+ Patch by Steve Klabnik [ruby-core:47799] [Bug #7099]
- * misc/ruby-electric.el (ruby-electric-keywords): New custom
- variable to replace `ruby-electric-simple-keywords-re` with.
+Sun Oct 7 04:37:00 2012 Zachary Scott <zzak@ruby-lang.org>
-Mon Oct 7 22:52:16 2013 Akinori MUSHA <knu@iDaemons.org>
+ * string.c (rb_str_match):
+ Clarify behavior for captured strings and local variable assignment
+ Patch by Marcus Stollsteimer [ruby-core:47668] [Bug #7062]
- * 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.
+Sat Oct 6 18:31:36 2012 Shugo Maeda <shugo@ruby-lang.org>
-Mon Oct 7 22:45:20 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_opts.h (OPT_GLOBAL_METHOD_CACHE): new build option to
+ enable/disable global method caching. [ruby-dev:46203] [Bug #7111]
- * cont.c (FIBER_USE_NATIVE): split long conditions.
+ * vm_method.c (rb_method_entry_get_with_omod): don't use global
+ method cache if OPT_GLOBAL_METHOD_CACHE is 0.
-Mon Oct 7 20:29:31 2013 Zachary Scott <e@zzak.io>
+Sat Oct 6 16:32:04 2012 Shugo Maeda <shugo@ruby-lang.org>
- * lib/time.rb: [DOC] typo in Time.rb overview by @srt32 [Fixes GH-416]
- https://github.com/ruby/ruby/pull/416
+ * vm_method.c (search_method): check omod only once for performance.
-Mon Oct 7 20:07:20 2013 Tanaka Akira <akr@fsij.org>
+Sat Oct 6 09:42:04 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/time.rb (Time.strptime): Use :offset.
- Patch by Felipe Contreras. [ruby-core:57694]
+ * enc/encdb.c, enc/utf_16_32.h (ENC_DUMMY_UNICODE): endian-less wide
+ UTF encodings are dummy but Unicode.
-Mon Oct 7 16:47:27 2013 Koichi Sasada <ko1@atdot.net>
+ * encoding.c (rb_encdb_set_unicode): set Unicode flag.
- * test/-ext-/debug/test_profile_frames.rb: rename class C to
- something long name because one test depends on absence of
- class ::C.
+ * template/encdb.h.tmpl: allow ENC_DUMMY variants.
-Mon Oct 7 16:33:10 2013 Koichi Sasada <ko1@atdot.net>
+ * encoding.c (rb_enc_unicode_p): oniguruma provides Unicode flag.
- * ext/-test-/debug/profile_frames.c:
- test/-ext-/debug/test_profile_frames.rb: add a test for new C-APIs.
+Fri Oct 5 17:18:42 JST 2012 TAKANO Mitsuhiro <tak@no32.tk>
-Mon Oct 7 16:12:36 2013 Koichi Sasada <ko1@atdot.net>
+ * template/Doxyfile.tmpl: remove SHOW_DIRECTORIES and
+ HTML_ALIGN_MEMBERS lines. They have been obsolete in
+ Doxygen version 1.8.2.
- * 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.
+Fri Oct 5 15:26:18 2012 Koichi Sasada <ko1@atdot.net>
- * 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.
+ * ext/objspace/objspace.c: add ObjectSpace#reachable_objects_from.
+ This method returns an array of objects referenced by given object.
+ If given object is special objects such as true/false/nil/Fixnum etc
+ then it returns nil. See rdoc for details.
+ [ruby-core:39772]
- 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.
+ * test/objspace/test_objspace.rb: add a test for this method.
- * vm_backtrace.c: implement above APIs.
+ * gc.c: add rb_objspace_reachable_objects_from().
+ To make this function, add several member `mark_func_data'
+ to rb_objspace_t. If mark_func_data is not null, then
+ gc_mark() calls mark_func_data::mark_func.
- * iseq.c (rb_iseq_klass): return local_iseq's class.
+ * gc.h: export rb_objspace_reachable_objects_from().
-Mon Oct 7 14:26:01 2013 Koichi Sasada <ko1@atdot.net>
+Thu Oct 4 23:40:04 2012 Narihiro Nakamura <authornari@gmail.com>
- * proc.c: catch up last commit.
- Type of return value of rb_iseq_first_lineno() is now VALUE.
+ * gc.c (init_heap): call init_mark_stack before to allocate
+ altstack. This change avoid the stack overflow at the signal
+ handler on 32bit, but I don't understand reason... [Feature #7095]
- * vm_insnhelper.c (argument_error): ditto.
+Thu Oct 4 22:39:27 2012 Koichi Sasada <ko1@atdot.net>
- * vm_method.c (rb_method_entry_make): ditto.
+ * insns.def (getlocal, setlocal): remove old getlocal/setlocal
+ instructions and rename getdaynmic/setdynamic instructions
+ to getlocal/setlocal.
-Mon Oct 7 14:07:45 2013 Koichi Sasada <ko1@atdot.net>
+ * compile.c: ditto.
- * 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: remove TS_DINDEX.
- * 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.
+ * vm_exec.h (dindex_t): remove type definition of `dindex_t'.
- * proc.c. vm_insnhelper.c, vm_method.c: catch up this change.
+ * tool/instruction.rb: ditto.
-Sun Oct 6 08:37:39 2013 Zachary Scott <e@zzak.io>
+Thu Oct 4 21:44:17 2012 Koichi Sasada <ko1@atdot.net>
- * lib/webrick.rb: [DOC] fix grammar in WEBrick overview [Fixes GH-413]
- Based on patch by @chastell https://github.com/ruby/ruby/pull/413
+ * vm.c (vm_analysis_insn|operand|register): use st_insert
+ instead of using rb_hash_aset() because rb_hash_aset()
+ check $SAFE.
-Sat Oct 5 11:21:01 2013 Aaron Pfeifer <aaron.pfeifer@gmail.com>
+Thu Oct 4 21:15:26 2012 Koichi Sasada <ko1@atdot.net>
- * thread.c (terminate_atfork_i): fix locking mutexes not unlocked in
- forks when not tracked in thread. [ruby-core:55102] [Bug #8433]
+ * vm.c (VM_COLLECT_USAGE_DETAILS): make new VM usage analysis
+ hooks (old macro name is COLLECT_USAGE_ANALYSIS).
+ This feature is only for VM developers. (I'm not sure I can use
+ `VM developers' (the plural form) in this sentence).
+ If VM_COLLECT_USAGE_DETAILS is not 0, VM enables the following
+ usage collection features:
+ (1) instruction: collect instruction usages.
+ (2) operand: collect operand usages.
+ (3) register: collect register usages.
+ The results are stored in
+ RubyVM::USAGE_ANALYSIS_INSN for (1, 2),
+ RubyVM::USAGE_ANALYSIS_INSN_BIGRAM for (1) and
+ RubyVM::USAGE_ANALYSIS_REGS for (3).
+ You can stop collecting usages with
+ RubyVM::USAGE_ANALYSIS_INSN_STOP(),
+ RubyVM::USAGE_ANALYSIS_OPERAND_STOP(),
+ RubyVM::USAGE_ANALYSIS_REGISTER_STOP()
+ for (1), (2), (3) respectively.
+ You can also change the hook functions by setting
+ C level global variables
+ `ruby_vm_collect_usage_func_(insn|operand|register)'
+ for (1), (2), (3) respectively.
+ See codes for more details.
-Fri Oct 4 19:54:09 2013 Zachary Scott <e@zzak.io>
+ * tool/instruction.rb: fix macro names.
- * ext/dbm/dbm.c: [DOC] Fix wrong constant name in DBM by @edward
- [Fixes GH-409] https://github.com/ruby/ruby/pull/409
+ * iseq.c (insn_operand_intern): make it export (used in vm.c).
+ fix to skip several processes if not needed (pointer is 0).
-Fri Oct 4 19:49:42 2013 Aman Gupta <ruby@tmm1.net>
+ * vm_dump.c: move codes for collection features to vm.c.
- * gc.c: rename heap.free_num as heap.swept_num to clarify meaning and
- avoid confusion with objspace_free_num().
+ * vm_exec.h: rename macro and function names.
-Fri Oct 4 19:02:01 2013 Aman Gupta <ruby@tmm1.net>
+ * vm_insnhelper.h: ditto.
- * 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.
+Thu Oct 4 18:59:14 2012 Koichi Sasada <ko1@atdot.net>
-Fri Oct 4 18:53:42 2013 Aman Gupta <ruby@tmm1.net>
+ * test/ruby/test_settracefunc.rb (test_tracepoint):
+ remove unused test case.
+ (this test case is redefined by newer tests)
- * gc.c: add rb_objspace.limit to keep accurate count of total heap
- slots [ruby-core:57633] [Bug #8983]
+Thu Oct 4 17:24:51 2012 Narihiro Nakamura <authornari@gmail.com>
-Fri Oct 4 09:32:33 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * gc.c (rb_objspace_call_finalizer): call gc_mark_stacked_objects
+ at suitable point.
- * 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 4 16:31:29 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Oct 3 18:20:47 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * gc.c (rb_objspace_call_finalizer): mark self-referencing finalizers
+ before run finalizers, to fix SEGV from btest on 32bit.
- * win32/win32.c (console_emulator_p, constat_handle): disable built-in
- console colorizing when console-emulator-like DLL is injected.
- [Feature #8201]
+ * gc.c (gc_mark_stacked_objects): extract from gc_marks().
-Thu Oct 3 18:01:44 2013 Koichi Sasada <ko1@atdot.net>
+Thu Oct 4 11:43:28 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c: define gc_profile_record::allocated_size if
- CALC_EXACT_MALLOC_SIZE is true.
+ * thread_pthread.c (ruby_init_stack): round stack limit to page size
+ boundary to calculate stack size more precisely. [ruby-dev:46174]
+ [Bug #7084]
-Thu Oct 3 13:42:51 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Oct 3 19:51:57 2012 Narihiro Nakamura <authornari@gmail.com>
- * common.mk (yes-test-sample): use RUNRUBY instead of MINIRUBY to set
- runtime library path and run the built ruby. [Bug #8971]
+ * gc.c: Use the non-recursive marking instead of recursion. The
+ recursion marking of CRuby needs checking stack overflow and the
+ fail-safe system, but these systems not good at partial points,
+ for example, marking deep tree structures. [ruby-dev:46184]
+ [Feature #7095]
-Thu Oct 3 00:17:15 2013 Akinori MUSHA <knu@iDaemons.org>
+ * configure.in (GC_MARK_STACKFRAME_WORD): removed. It's used by
+ checking stack overflow of marking.
- * misc/ruby-additional.el: Properly quote the body. An unquoted
- body given to eval-after-load is evaluated immediately!
+ * win32/Makefile.sub (GC_MARK_STACKFRAME_WORD): ditto.
-Wed Oct 2 21:38:30 2013 Yusuke Endoh <mame@tsg.ne.jp>
+Wed Oct 3 15:33:02 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * 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.
+ * thread_pthread.c (ruby_init_stack): use getrlimit() for the main
+ thread on Mac OS X, since pthread_get_stack{addr,size}_np()
+ return the default value always, but not the ulimit value.
+ [ruby-dev:46174] [Bug #7084]
-Wed Oct 2 21:37:04 2013 Yusuke Endoh <mame@tsg.ne.jp>
+Wed Oct 3 11:43:15 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * random.c (make_seed_value): a local array declaration was accessed
- out of scope. Coverity Scan found this bug.
+ * io.c (rb_io_reopen): improvement to accept optional arguments.
+ a patch by Glass_saga (Masaki Matsushita) in [ruby-core:47806].
+ [Feature #7103]
-Wed Oct 2 18:52:40 2013 Koichi Sasada <ko1@atdot.net>
+Wed Oct 3 04:36:11 2012 Eric Hodel <drbrain@segment7.net>
- * gc.c: relax GC condition due to malloc_limit.
+ * ext/openssl/ossl_x509store.c (ossl_x509store_add_file): Added
+ documentation
+ * ext/openssl/ossl_x509store.c (ossl_x509store_set_default_paths):
+ ditto
+ * ext/openssl/ossl_x509store.c (ossl_x509store_add_cert): ditto
- * gc.c (GC_MALLOC_LIMIT_MAX): change default value
- (256MB -> 512MB) and permit zero to ignore max value.
+Wed Oct 3 02:23:37 2012 Shugo Maeda <shugo@ruby-lang.org>
- * gc.c (vm_malloc_increase, vm_xrealloc): do not cause GC on realloc.
+ * error.c (exc_to_s, name_err_to_s, name_err_mesg_to_str): do not
+ taint messages.
- * gc.c (gc_before_sweep): change debug messages.
+Tue Oct 2 16:47:06 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Oct 2 16:26:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * eval.c (identity_hash_new): hide internal hashes for refinements.
- * io.c (rb_io_close_read): duplex IO should wait its child process
- even after close_read.
+ * eval.c (rb_mod_refine): no default value.
-Wed Oct 2 15:39:13 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Mon Oct 1 22:54:02 2012 Shugo Maeda <shugo@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
+ * eval.c (identity_hash_new): new function to create a new identity
+ hash.
-Wed Oct 2 14:19:57 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * eval.c (rb_overlay_module, rb_mod_using, rb_mod_refine): use
+ identity_hash_new().
- * io.c (rb_io_close_write): detach tied IO for writing before closing
- to get rid of race condition. [ruby-list:49598]
+Mon Oct 1 02:34:53 2012 Akinori MUSHA <knu@iDaemons.org>
- * 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.
+ * configure.in (--with-opt-dir): Make this also work on DLDFLAGS
+ so LIBRUBY_SO links fine with libexecinfo installed in a
+ non-system directory.
-Tue Oct 1 23:44:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+Sun Sep 30 23:32:00 2012 Kenta Murata <mrkn@mrkn.jp>
- * 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.
+ * vm_dump.c (rb_vm_bugreport): add /Library/Logs/DiagnosticReports
+ in the list of locations of crash reports.
-Tue Oct 1 22:03:48 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sun Sep 30 21:18:03 2012 NARUSE, Yui <naruse@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]
+ * string.c (rb_str_concat): use memcpy to copy a string which contains
+ NUL characters. [ruby-core:47751] [Bug #7090]
-Tue Oct 1 20:54:33 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Sep 29 19:41:53 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
- * file.c (stat_new_0): constify.
+ * test/ruby/envutil.rb (EnvUtil#invoke_ruby): kill child process
+ before Timeout::Error is raised. rmdir of mktmpdir fails with
+ EACCES if child process is alive on Windows.
- * file.c (rb_stat_new): constify and export. based on a patch by
- Hanmac (Hans Mackowiak) at [ruby-core:53225]. [Feature #8050]
+ * test/thread/test_queue.rb (TestQueue): increase timeout.
+ This test takes long time on Windows XP.
-Tue Oct 1 16:03:42 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Sep 29 19:41:33 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
- * include/ruby/ruby.h (ruby_safe_level_4_warning): needed by extension
- libraries which check safe level 4. [ruby-dev:47517] [Bug #8652]
+ * test/net/http/test_http.rb (TestNetHTTP#test_proxy_address):
+ clear environment variables. If http_proxy environment variable was
+ set, the test failed.
-Mon Sep 30 23:14:36 2013 Zachary Scott <e@zzak.io>
+ * test/net/http/test_http.rb (TestNetHTTP#test_proxy_port): ditto.
- * ext/objspace/objspace.c: [DOC] Cleaned up many rdoc formatting
- issues and several duplicate grammar bugs.
+Sat Sep 29 19:41:11 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-Mon Sep 30 23:01:01 2013 Zachary Scott <e@zzak.io>
+ * test/drb/drbtest.rb (DRbCore#teardown):
+ Use Process.kill :KILL on Windows because Process.kill :INT silently
+ fails on Windows 7 and raises EINVAL on Windows XP for spawned
+ process with new_pgroup: false.
- * ext/objspace/object_tracing.c: [DOC] Adjust rdoc formatting and fix
- small grammar typo
+ * test/drb/drbtest.rb (DRbAry#teardown): ditto.
-Mon Sep 30 17:28:39 2013 Koichi Sasada <ko1@atdot.net>
+Sat Sep 29 19:40:32 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
- * ext/objspace/object_tracing.c: [DOC] add some notes for
- ObjectSpace::trace_object_allocations.
+ * test/ruby/test_unicode_escape.rb (TestUnicodeEscape#test_basic):
+ set script encoding to work with LANG=C. It would work on both
+ Windows and Unix. Refix of r37051.
-Mon Sep 30 16:46:58 2013 Koichi Sasada <ko1@atdot.net>
+Sat Sep 29 11:21:06 2012 Shugo Maeda <shugo@ruby-lang.org>
- * 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.
+ * vm_insnhelper.c (rb_vm_using_modules): use using_modules before
+ klass to fix method lookup order, and use klass even if klass is
+ not a module to make refinements in class_eval invoked on classes
+ work.
- * test/objspace/test_objspace.rb: add a test for new methods.
+ * eval.c (rb_using_module): accept a class as the second argument.
- * NEWS: add a description for new methods.
+ * eval.c (rb_mod_using, f_using): raise a TypeError if the argument
+ is not a module.
-Mon Sep 30 11:18:04 2013 Koichi Sasada <ko1@atdot.net>
+ * test/ruby/test_refinement.rb: add new tests for the above changes.
- * 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].
+Sat Sep 29 02:18:57 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-Mon Sep 30 10:40:20 2013 Shugo Maeda <shugo@ruby-lang.org>
+ * test/ruby/test_unicode_escape.rb (TestUnicodeEscape#test_basic):
+ Use ruby only on Windows since the test fails on Unix with LANG=C.
+ [ruby-core:47709] [Bug #7076]
- * vm_method.c (rb_undef): raise a NameError if the original method
- of a refined method is not defined.
+Fri Sep 28 22:19:31 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
- * vm_insnhelper.c (rb_method_entry_eq): added NULL check to avoid SEGV.
+ * test/ruby/test_unicode_escape.rb (TestUnicodeEscape#test_basic):
+ echo command doesn't work properly against non-ascii character on
+ Windows with chcp 437. Instead we use ruby.
+ [ruby-core:47709] [Bug #7076]
+
+Fri Sep 28 17:54:31 2012 Koichi Sasada <ko1@atdot.net>
+
+ * vm_insnhelper.c (vm_setup_method): refactoring.
+ Remove src_argc and use iseq->arg_size directly.
+
+Fri Sep 28 17:26:27 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/rubygems/installer.rb (check_that_user_bin_dir_is_in_path):
+ test_generate_bin_bindir_with_user_install_warning(TestGemInstaller)
+ fails on Windows with msys bash. It makes comparing paths
+ case-insensitive.
+ pick from upstream to fix a failure of test-all [ruby-core:47711]
+ https://github.com/rubygems/rubygems/commit/c474edb2f3704206f04da1c8c6cf9fb079d84abe
+
+Fri Sep 28 15:44:45 2012 Shugo Maeda <shugo@ruby-lang.org>
+
+ * vm_method.c (search_method): copy refinement iclasses to search
+ superclasses correctly.
* test/ruby/test_refinement.rb: related test.
-Sun Sep 29 23:45:42 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Sep 28 15:15:41 2012 Koichi Sasada <ko1@atdot.net>
- * parse.y (rb_id_attrset, intern_str): allow junk attrset ID for
- Struct.
+ * insns.def (opt_checkenv): remove unused instruction `opt_checkenv'.
- * 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.
+ * compile.c (iseq_compile_each): ditto.
-Sun Sep 29 18:45:05 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+ * node.h: remove unused node `NODE_OPTBLOCK'.
- * 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]
+ * ext/objspace/objspace.c, gc.c (gc_mark_children): ditto.
- * test/ruby/test_keyword.rb: tests for the above.
+Fri Sep 28 13:14:34 2012 Koichi Sasada <ko1@atdot.net>
-Sat Sep 28 23:25:56 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_core.h: now VM_DEBUG_BP_CHECK should be 1.
- * math.c (math_log, math_log2, math_log10): fix for Bignum argument.
- numbits should be add only when right shifted.
+Fri Sep 28 12:51:54 2012 Koichi Sasada <ko1@atdot.net>
-Sat Sep 28 14:30:29 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * vm_core.h: remove rb_control_frame_t::bp (bp: base pointer).
+ `bp' can be calculate by `sp' (stack pointer) of previous frame.
+ Now, `bp_check' field is remained for debug. You can eliminate
+ this field by setting VM_DEBUG_BP_CHECK as 0.
- * 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.
+ * vm_insnhelper.c (vm_base_ptr): add `vm_base_ptr(cfp).
+ This function calculates base pointer from cfp.
-Sat Sep 28 00:19:41 2013 Shugo Maeda <shugo@ruby-lang.org>
+ * vm_insnhelper.c (vm_setup_method): push `recv' value on top of
+ value stack (before method parameters).
+ This change is for keeping consistency with normal method dispatch.
- * ext/curses/extconf.rb: check the size of chtype.
+ * insns.def: fix to use vm_base_ptr().
- * ext/curses/curses.c (NUM2CH, CH2NUM): use proper macros for
- the size of chtype.
+ * vm.c (vm_exec): ditto.
- [ruby-core:56090] [Bug #8659]
+ * vm_dump.c: remove `bp' related dumps.
-Fri Sep 27 18:33:23 2013 Koichi Sasada <ko1@atdot.net>
+ * cont.c (fiber_init): fix to check VM_DEBUG_BP_CHECK.
- * gc.c: add two GC tuning environment variables.
- RUBY_GC_MALLOC_LIMIT_MAX and RUBY_GC_MALLOC_LIMIT_GROWTH_FACTOR.
- See r43067 for details.
+Fri Sep 28 10:40:51 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c (rb_gc_set_params): refactoring. And change verbose notation.
- Mostly duplicated functions get_envparam_int/double is not cool.
- Please rewrite it.
+ * io.c (rb_io_reopen): accept File::Constants as well as mode string.
+ based on the patch by Glass_saga (Masaki Matsushita) in
+ [ruby-core:47694]. [Feature #7067]
- * test/ruby/test_gc.rb: fix a test for this change.
+Thu Sep 27 18:36:51 2012 Shugo Maeda <shugo@ruby-lang.org>
-Fri Sep 27 17:44:41 2013 Koichi Sasada <ko1@atdot.net>
+ * eval.c (rb_overlay_module, rb_mod_refine): accept a module as the
+ argument of Module#refine.
- * gc.c (GC_MALLOC_LIMIT): 8,000,000 -> 8 * 1,024 * 1,024.
+ * vm_method.c (search_method): if klass is an iclass, lookup the
+ original module of the iclass in omod in order to allow
+ refinements of modules.
-Fri Sep 27 17:19:39 2013 Koichi Sasada <ko1@atdot.net>
+ * test/ruby/test_refinement.rb: add tests for the above changes.
- * gc.c (gc_before_sweep): cast to size_t to suppress warnings.
+Thu Sep 27 18:12:20 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-Fri Sep 27 17:07:55 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/syslog/lib/syslog/logger.rb: add a formatter to the
+ Syslog::Logger object. [Bug #7065]
+ * test/syslog/test_syslog_logger.rb: ditto.
- * 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.
+Wed Sep 26 16:39:57 2012 Koichi Sasada <ko1@atdot.net>
-Fri Sep 27 16:32:27 2013 Koichi Sasada <ko1@atdot.net>
+ * insns.def: add new instruction `opt_empty_p' for optimize `empty?'
+ method. Apply a patch proposed at [ruby-dev:46120]
+ [ruby-trunk - Feature #6972] by Glass_saga (Masaki Matsushita).
- * 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.
+ * compile.c (iseq_specialized_instruction), vm.c, vm_insnhelper.h:
+ ditto.
- * 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.
+ * id.c, template/id.h.tmpl: ditto.
- * gc.c (ruby_gc_params_t): add initial_malloc_limit_factor and
- initial_malloc_limit_max.
+ * test/ruby/test_optimization.rb: test for this changes.
- * gc.c (vm_malloc_prepare, vm_xrealloc): use vm_malloc_increase to
- add and check malloc_increase.
+Tue Sep 25 09:59:26 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Sep 27 01:05:00 2013 Zachary Scott <e@zzak.io>
+ * insns.def (invokesuper): klass in cfp is not valid in at_exit and
+ END blocks. [ruby-core:47680] [Bug #7064]
- * re.c: [DOC] arguments of Regexp::union receive #to_regexp [Bug #8205]
+Tue Sep 25 08:11:11 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Fri Sep 27 00:39:27 2013 Zachary Scott <e@zzak.io>
+ * iseq.c (rb_iseq_defined_string): the index of defined_strings must
+ be the value of type - 1.
- * struct.c: [DOC] grammar of ArgumentError in Struct.new [Bug #8936]
- Patch by Prathamesh Sonpatki
+Mon Sep 24 17:36:51 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Sep 26 22:11:56 2013 Zachary Scott <e@zzak.io>
+ * compile.c (defined_expr), insns.def (defined): share single frozen
+ strings. [EXPERIMENTAL] [ruby-core:47558][Feature #7035]
- * 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
+ * iseq.c (rb_iseq_defined_string): make expression strings.
-Thu Sep 26 22:08:11 2013 Zachary Scott <e@zzak.io>
+Mon Sep 24 11:22:36 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * lib/observer.rb: [DOC] syntax improvement in example by @chastell
- [Fixes GH-400] https://github.com/ruby/ruby/pull/400
+ * tool/merger.rb: add --ticket option to add ticket number.
-Thu Sep 26 22:03:15 2013 Zachary Scott <e@zzak.io>
+Sun Sep 23 21:51:59 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/digest/digest.c: [DOC] typo in overview by @chastell
- [Fixes GH-399] https://github.com/ruby/ruby/pull/399
+ * lib/mkmf.rb (String#unspace): unescape with backslashes. normal
+ makes need to escape spaces with backslashes. nmake is not the
+ case. [Bug #7036]
-Thu Sep 26 22:00:42 2013 Zachary Scott <e@zzak.io>
+ * lib/mkmf.rb (create_makefile): use timestamp file dependencies for
+ directories.
- * ext/openssl/ossl.c: [DOC] typo in example by @zoranzaric
- [Fixes GH-401] https://github.com/ruby/ruby/pull/401
+ * lib/mkmf.rb: unexpand macros.
-Thu Sep 26 21:07:49 2013 Akinori MUSHA <knu@iDaemons.org>
+ * lib/mkmf.rb (LIBPATHFLAG): no needs to escape library path here.
- * misc/ruby-electric.el (ruby-electric-delete-backward-char): Add
- support for smartparens-mode.
+ * lib/mkmf.rb (MakeMakefile#configuration): make prefix paths
+ internal to deal with in Makefile.
- * 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.
+ * lib/mkmf.rb (MakeMakefile#mkintpath): not a global function now.
-Thu Sep 26 16:51:00 2013 Shota Fukumori <her@sorah.jp>
+Sun Sep 23 02:33:37 2012 Benoit Daloze <eregontp@gmail.com>
- * insns.def (opt_regexpmatch2): Check String#=~ hasn't overridden
- before calling rb_reg_match().
+ * complex.c: Fix examples of r36993.
+ Keep the simple definition, mathematics define the result.
+ Based on patch by Robin Dupret. Fixes #188 on github.
- * test/ruby/test_string.rb: Test for above.
+Sat Sep 22 07:15:00 2012 Zachary Scott <zzak@ruby-lang.org>
- * vm.c (vm_init_redefined_flag): Add BOP flag for String#=~
+ * ext/ripper/lib/ripper.rb:
+ Match sample output to Ripper.sexp from current trunk version.
+ [Bug #6929]
- [ruby-core:57385] [Bug #8953]
+Thu Sep 20 23:05:11 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Thu Sep 26 16:43:42 2013 Akinori MUSHA <knu@iDaemons.org>
+ * thread_pthread.c (native_cond_initialize): destroy condattr
+ after using it. Patch by Stanislav Sedov. Thank you.
+ [Bug #7041] [ruby-core:47619]
- * 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 20 22:53:02 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Thu Sep 26 16:24:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * thread_pthread.c (native_cond_initialize): clean up #ifdef condition.
- * insns.def (opt_regexpmatch1): check Regexp#=~ is not defined before
- calling rb_reg_match()
+Thu Sep 20 16:42:44 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * test/ruby/test_regexp.rb: add test
+ * lib/drb/ssl.rb (DRb::DRbSSLSocket::SSLConfig::DEFAULT): add
+ SSLTmpDhCallback for configuration option.
- * vm.c (ruby_vm_redefined_flag): change type to short[]
+ * lib/drb/ssl.rb (setup_ssl_context): copy the value of tmp_dh_callback.
- * vm.c (vm_redefinition_check_flag): return REGEXP_REDEFINED_OP_FLAG if
- klass == rb_cRegexp
+ * test/drb/ut_array_drbssl.rb: set tmp_dh_callback to suppress warning.
- * vm.c (vm_init_redefined_flag): setup BOP flag for Regexp#=~
+ * test/drb/ut_drb_drbssl.rb: ditto.
- * vm_insnhelper.h: add REGEXP_REDEFINED_OP_FLAG
+Thu Sep 20 10:56:08 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- [ruby-core:57385] [Bug #8953]
+ * test/drb/ut_drb.rb: revert a part of r36987, and get rid of a warning
+ with another method. if the substitution is removed, the ExtSrv
+ object will be GC'ed and some tests will be blocked.
-Thu Sep 26 14:46:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Sep 20 07:20:00 2012 Zachary Scott <zzak@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]
+ * complex.c: Examples for Complex Documentation.
+ Patch by Robin Dupret.
+ Fixes #184 on github.
-Wed Sep 25 17:41:29 2013 Koichi Sasada <ko1@atdot.net>
+Thu Sep 20 07:15:00 2012 Zachary Scott <zzak@ruby-lang.org>
- * 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]
+ * ext/ripper/lib/ripper.rb: Documentation for Ripper.
+ +:void_stmt+ is meaningless
+ [Bug #6929] [ruby-core:47507]
-Wed Sep 25 17:12:08 2013 Koichi Sasada <ko1@atdot.net>
+Thu Sep 20 07:05:00 2012 Zachary Scott <zzak@ruby-lang.org>
- * 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).
+ * lib/csv.rb (Object#CSV, Array#to_csv, String#parse_csv):
+ Examples and documentation for CSV.
+ [Bug #6880] [ruby-core:47218]
- * 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.
+Thu Sep 20 00:42:20 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Sep 25 16:58:33 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * array.c (take_items), enum.c (enum_zip): raise TypeError at
+ non-enumerable objects, not NoMethodError. [ruby-dev:46145]
+ [Bug #7038]
- * internal.h (rb_float_value, rb_float_new): move inline functions
- from ruby/ruby.h.
+ * vm_eval.c (rb_check_block_call): check_funcall variant with block
+ function.
- * numeric.c (rb_float_value, rb_float_new): define external functions
- for extension libraries.
+Tue Sep 18 17:51:29 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Wed Sep 25 15:37:02 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/openssl/ossl_ssl.c (ossl_sslctx_attrs): add npn_select_db to
+ suppress warning: instance variable @npn_select_cb not initialized
- * test/rdoc/test_rdoc_generator_darkfish.rb: add a guard for windows.
+Sun Sep 16 17:47:00 2012 Eric Hodel <drbrain@segment7.net>
-Wed Sep 25 09:53:11 2013 Eric Hodel <drbrain@segment7.net>
+ * tool/change_maker.rb: Update svn detection for subversion 1.7's
+ single .svn directory.
- * lib/rubygems: Fix CVE-2013-4363. Miscellaneous minor improvements.
+Sun Sep 16 11:39:12 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/rubygems: Tests for the above.
+ * io.c (io_set_read_length): if the read length equals to the buffer
+ string size then nothing to do. or ensure the string modifiable
+ before setting the length only when the former is shorter. based on
+ the patch in [ruby-core:47541] by Hiroshi Shirosaki.
+ [ruby-core:46586] [Bug #6764]
-Tue Sep 24 17:38:56 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sun Sep 16 08:57:52 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * string.c (rb_str_inspect): get rid of out-of-bound access.
+ * configure.in (strict_warnflags): separate strict flags from
+ warnflags only for core. [ruby-dev:46105]
- * string.c (rb_str_inspect): when a UTF-16/32 string doesn't have a
- BOM, inspect as a dummy encoding string.
+Sun Sep 16 08:16:05 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Sep 24 17:15:10 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * .editorconfig: add. [ruby-core:47548] [Feature #7030]
- * enc/encdb.c (ENC_DUMMY_UNICODE): make BOM-encodings dummy.
+Sat Sep 15 01:56:40 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * encoding.c (enc_autoload): keep dummy encodings dummy.
+ * ext/nkf/nkf-utf8/nkf.c: Merge upstream: 50a383c84.
+ [ruby-dev:46128] [Bug #7005]
-Tue Sep 24 16:41:15 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Sep 15 00:20:04 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * ext/win32/lib/win32/registry.rb (Win32::Registry#write): data size
- is in bytes, not chars. terminators should be placed automatically.
+ * ext/nkf/nkf.c (rb_nkf_convert): suppress warning.
-Tue Sep 24 16:39:36 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Sep 14 04:05:00 2012 Zachary Scott <zzak@ruby-lang.org>
- * ext/win32/lib/win32/registry.rb (Win32::Registry#each_value): encode
- name.
+ * array.c (rb_ary_diff, rb_ary_uniq):
+ Enhance documentation for array uniqueness
+ Based on a patch by Robin Dupret
+ [Bug #6872] [ruby-core:47209]
- * ext/win32/lib/win32/registry.rb (Win32::Registry#each_key): ditto.
+Fri Sep 14 03:30:00 2012 Zachary Scott <zzak@ruby-lang.org>
- * ext/win32/lib/win32/registry.rb (Win32::Registry#export_string):
- encode to locale encoding if default internal is not set.
+ * array.c (rb_ary_select):
+ Update documentation for Array#select
+ * enum.c (enum_find_all, enum_reject):
+ Update documentation for Enumerable#find_all and Enumerable#reject
+ Based on a patch by Jeff Saracco
+ [Bug #6908] [ruby-core:47285] [Fixes #166 on github]
-Tue Sep 24 16:35:09 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Sep 14 00:20:00 2012 Zachary Scott <zzak@ruby-lang.org>
- * ext/win32/lib/win32/registry.rb (Win32::Registry::API#EnumKey):
- size of the name is in WCHARs, not in bytes.
+ * signal.c (rb_f_kill):
+ Update documentation for Process.kill to reflect kill(2)
+ Patch by Richo Healey
-Tue Sep 24 14:07:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+Thu Sep 13 21:40:49 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
- * gc.c (free_method_cache_entry_i): unused function
+ * lib/securerandom.rb (SecureRandom.random_bytes):
+ Use 64bit value as pointer for Windows x64 to fix SystemCallError.
- * gc.c (rb_free_mc_table): ditto
+ * lib/securerandom.rb (SecureRandom.lastWin32ErrorMessage):
+ Set proper encoding to avoid invalid byte sequence error.
+ [ruby-core:47451] [Bug #6990]
- * internal.h (method_cache_entry_t): unused struct
+Thu Sep 13 11:20:00 2012 Zachary Scott <zzak@ruby-lang.org>
- * vm_method.c (verify_method_cache): remove unused variable
+ * lib/optparse.rb: Remove unreachable email address from documentation
+ [Bug #6996] [ruby-core:47459]
- * vm_method.c (rb_method_entry): ditto
+Thu Sep 13 11:20:00 2012 Zachary Scott <zzak@ruby-lang.org>
-Tue Sep 24 14:01:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * lib/xmlrpc.rb: Documentation for XMLRPC
+ * lib/xmlrpc/datetime.rb: ditto.
+ * lib/xmlrpc/parser.rb: ditto.
+ * lib/xmlrpc/client.rb: ditto.
+ * lib/xmlrpc/utils.rb: ditto.
+ * lib/xmlrpc/README.rdoc: ditto.
+ * lib/xmlrpc/create.rb: ditto.
+ * lib/xmlrpc/base64.rb: ditto.
+ * lib/xmlrpc/config.rb: ditto.
+ * lib/xmlrpc/httpserver.rb: ditto.
+ * lib/xmlrpc/server.rb: ditto.
+ * lib/xmlrpc/marshal.rb: ditto.
+ * lib/xmlrpc/README.txt: ditto.
+ [Bug #6909] [ruby-core:47286]
- * class.c (class_alloc): remove mc_tbl
+Thu Sep 13 10:22:11 2012 Takashi Toyoshima <toyoshim@gmail.com>
- * gc.c (obj_free): ditto
+ * configure.in: Don't use PIE on Haiku because loader support is not
+ enough.
- * internal.h (struct rb_classext_struct): ditto
+Thu Sep 13 08:20:00 2012 Zachary Scott <zzak@ruby-lang.org>
- * method.h (rb_method_entry): remove ent param
+ * lib/shellwords.rb: Documentation for Shellwords.
- * vm_method.c: restore the global method cache. Per class cache tables
- turned out to be far too slow.
+Thu Sep 13 08:00:00 2012 Zachary Scott <zzak@ruby-lang.org>
- [ruby-core:57289] [Bug #8930]
+ * ext/ripper/lib/ripper.rb: Documentation for Ripper.
+ * ext/ripper/lib/ripper/lexer.rb: ditto.
+ * ext/ripper/lib/ripper/sexp.rb: ditto.
+ * ext/ripper/lib/ripper/filter.rb: ditto.
+ * ext/ripper/lib/ripper/core.rb: ditto.
+ [Bug #6929] [ruby-core:47309]
-Tue Sep 24 12:51:07 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Sep 12 22:59:07 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/win32/lib/win32/registry.rb (Win32::Registry::API): need
- Constants.
+ * vm_insnhelper.c (vm_method_missing, vm_call_method): reuse arguments
+ on the VM stack and get rid of ALLOCA.
- * ext/win32/lib/win32/registry.rb (Win32::Registry::API#EnumValue):
- size of the name is in WCHARs, not in bytes.
+Wed Sep 12 22:45::00 2012 Zachary Scott <zzak@ruby-lang.org>
-Mon Sep 23 22:16:09 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/pathname/lib/pathname.rb: Documentation for Pathname.
+ * ext/pathname/pathname.c: ditto.
+ [Bug #6947] [ruby-core:47354]
- * 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 10 10:19:34 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Mon Sep 23 12:11:26 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * enc/depend: fixed wrong change in a part of r34802.
- * hash.c (env_each_pair): do not call rb_assoc_new() if
- it isn't needed.
+Sun Sep 9 22:02:50 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Mon Sep 23 10:42:30 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/socket/basicsocket.c (rsock_bsock_send):
+ avoid unnecessary select() calls before doing I/O
+ Patch by Eric Wong. [Feature #4538] [ruby-core:35586]
+ * ext/socket/init.c (rsock_s_recvfrom): ditto.
+ * ext/socket/init.c (rsock_s_accept): ditto.
+ * ext/socket/udpsocket.c (udp_send): ditto.
+ * io.c (io_fflush): ditto.
+ * io.c (io_binwrite): ditto.
+ * io.c (rb_io_syswrite): ditto.
- * 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 10 01:38:51 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Mon Sep 23 05:07:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * io.c (nogvl_close, maygvl_close, nogvl_fclose, maygvl_fclose):
+ suppress integer <-> pointer cast warnings.
+ [Feature #4570] [ruby-core:35711]
- * include/ruby/intern.h (rb_ary_cat): move from internal.h, since it
- is described in README.EXT.
+Mon Sep 10 01:36:00 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sun Sep 22 20:55:20 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+ * io.c (rb_io_close): notify fd close before releasing gvl.
+ * io.c (fptr_finalize): modify fptr->mode before releasing gvl.
+ remove unnecessary rb_thread_fd_close().
+ [Feature #4570] [ruby-core:35711]
- * vm_insnhelper.c (vm_make_proc_with_iseq): fix bug message.
- This is follow up to changes in r42637.
+Mon Sep 10 00:16:34 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Sun Sep 22 20:35:38 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+ * process.c: exec() requires to be single threaded also on Haiku.
+ by Takashi Toyoshima <toyoshim@gmail.com>
+ https://github.com/ruby/ruby/pull/178
- * ext/-test-/tracepoint/tracepoint.c (Init_tracepoint): prevent from GC.
+Sun Sep 9 21:21:15 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sun Sep 22 19:00:28 2013 Benoit Daloze <eregontp@gmail.com>
+ * lib/thread.rb (Queue#pop): Fixed double registration issue when
+ mutex.sleep is interrupted. [Bug #5258] [ruby-dev:44448]
+ * lib/thread.rb (SizedQueue#push): ditto.
- * 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.
+ * test/thread/test_queue.rb (test_sized_queue_and_wakeup,
+ test_queue_pop_interrupt, test_sized_queue_pop_interrupt,
+ test_sized_queue_push_interrupt): new tests.
-Sat Sep 21 20:11:06 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sun Sep 9 20:20:31 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * 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]
+ * lib/sync.rb (Sync_m#sync_lock): Fixed wakeup/raise unsafe code.
+ Patched by Masaki Matsushita. [Bug #5355] [ruby-dev:44521]
-Sat Sep 21 01:04:25 2013 Zachary Scott <e@zzak.io>
+ * test/thread/test_sync.rb (test_sync_lock_and_wakeup,
+ test_sync_upgrade_and_wakeup, test_sync_lock_and_raise):
+ new test.
- * lib/benchmark.rb: [DOC] grammar of Benchmark#bm [Bug #8888]
- Patch by Prathamesh Sonpatki
+Sun Sep 9 18:39:46 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sat Sep 21 00:50:02 2013 Zachary Scott <e@zzak.io>
+ * include/ruby/intern.h (rb_thread_blocking_region): Added
+ a comment of recommended alternative way.
- * enumerator.c: [DOC] Enumerator#each arguments documentation [GH-388]
- Patch by @kachick https://github.com/ruby/ruby/pull/388
+Sun Sep 9 18:37:05 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sat Sep 21 00:49:16 2013 Zachary Scott <e@zzak.io>
+ * lib/sync.rb (Sync_m): Removed RCS_ID.
- * enum.c: [DOC] Enumerable#to_a accepts arguments [GH-388]
- Patch by @kachick https://github.com/ruby/ruby/pull/388
+Sun Sep 9 18:21:03 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sat Sep 21 00:47:44 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/ruby/test_io.rb (test_advise_pipe): new test to check
+ io.advise() against anonymous io object don't make crash.
+ made by Eric Wong. [Bug #6081] [ruby-core:42880]
- * string.c (rb_str_conv_enc_opts): make sure to scan coderange to get
- rid of unnecessary conversion.
+Sun Sep 9 16:47:12 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sat Sep 21 00:21:08 2013 Zachary Scott <e@zzak.io>
+ * io.c (nogvl_close, maygvl_close, nogvl_fclose, maygvl_fclose):
+ new functions.
+ * io.c (fptr_finalize): release GVL if possible.
+ Patched by Eric Wong. [Feature #4570] [ruby-core:35711]
- * ext/openssl/lib/openssl/ssl.rb: [DOC] Document OpenSSL::SSLServer
- Based on a patch by Rafal Lisowski [Bug #8758]
+Sun Sep 9 16:08:48 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Fri Sep 20 23:54:03 2013 Zachary Scott <e@zzak.io>
+ * io.c (io_bufread): removed unnecessary rb_thread_wait_fd().
+ Patch by Eric Wong. [Bug #6629] [ruby-core:45789]
+ * io.c (rb_io_sysread): ditto.
+ * io.c (copy_stream_fallback_body): ditto.
- * lib/gserver.rb: [DOC] correct gserver.rb license [Bug #8913]
+Sun Sep 9 15:21:52 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Fri Sep 20 23:48:34 2013 Zachary Scott <e@zzak.io>
+ * thread.c (rb_mutex_lock): stop multiple threads use
+ pthread_cond_timedwait() concurrently. [Bug #6278] [ruby-core:44275]
- * ext/psych/yaml/yaml.h: [DOC] merge upstream typo fix by @GreenGeorge
- https://github.com/tenderlove/psych/pull/161
+Sat Sep 8 18:52:22 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Sep 20 23:37:40 2013 Zachary Scott <e@zzak.io>
+ * internal.h (struct rb_classext_struct): move allocator function into
+ rb_classext_t from ordinary method table. [ruby-dev:46121]
+ [Feature #6993]
- * lib/securerandom.rb: [DOC] SecureRandom.hex length argument
- [Fixes GH-394] Patch by @avdi https://github.com/ruby/ruby/pull/394
+ * object.c (rb_obj_alloc): call allocator function directly.
-Fri Sep 20 23:34:48 2013 Zachary Scott <e@zzak.io>
+ * vm_method.c (rb_define_alloc_func, rb_undef_alloc_func)
+ (rb_get_alloc_func): use allocator function in rb_classext_t.
- * benchmark/bm_app_answer.rb: removed duplicate code [Fixes GH-393]
- Patch by @gouravtiwari https://github.com/ruby/ruby/pull/393
+Fri Sep 7 01:21:51 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Sep 20 23:24:08 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/extmk.rb (extmake), lib/mkmf.rb (have_framework): fix splitting
+ options with an argument, not using NUL as special character.
+ [ruby-core:47447] [Bug #6987]
- * common.mk (btest, btest-ruby, test-knownbug): add $(RUN_OPTS) to
- ruby to be run, so that tests are runnable before making exts.
+Thu Sep 6 14:49:49 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * common.mk (test-sample): ditto, and use $(MINIRUBY) as rubytest.rb
- does not need extension libraries.
+ * .gdbinit (rp): FLONUM support.
- * tool/rubytest.rb: pass $(RUN_OPTS) to testing ruby using --run-opt.
+ * include/ruby/ruby.h (ruby_special_consts): define FLONUM constants
+ always, so that they are available from gdb.
-Fri Sep 20 15:01:46 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * include/ruby/ruby.h (RB_FLOAT_TYPE_P): merge FLONUM and non-FLONUM
+ versions. inline TYPE() comparison and FLONUM_P() should be
+ optimized away on non-FLONUM.
- * parse.y (intern_str): sigil only names are junk, at least one
- identifier character is needed. [ruby-dev:47723] [Bug #8928]
+Thu Sep 6 08:20:55 2012 Ryan Davis <ryand-ruby@zenspider.com>
- * parse.y (rb_enc_symname_type): fix out of bound access.
+ * lib/minitest/*: Imported minitest 3.4.0 (r7762)
+ * test/minitest/*: ditto
-Fri Sep 20 14:14:32 2013 Tanaka Akira <akr@fsij.org>
+Wed Sep 5 19:20:53 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * ext/-test-/printf/printf.c (printf_test_call): Fix an end of buffer
- argument.
+ * parse.y (rb_warn4S): renamed from rb_warn4(), because the case in
+ r36911 takes a string.
-Thu Sep 19 16:59:02 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * parse.y (rb_warn4S): use ripper_warnS() for ripper.
- * parse.y (lambda): adjust position to the beginning of the block.
+ * parse.y (ripper_warnS): now it is used.
-Thu Sep 19 16:25:06 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Sep 5 15:51:52 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
- * vsnprintf.c (BSD_vfprintf): initialize cp so that size is 0 in the
- commented case. fix an accidental bug at r16716.
+ * .travis.yml (notifications): [experimental] update notification
+ template.
-Thu Sep 19 14:33:14 2013 Koichi Sasada <ko1@atdot.net>
+Wed Sep 5 15:21:12 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * NEWS: add a news for r42974.
+ * parse.y (rb_warn4): added as a rb_warn variant to warn with explicit
+ source file name and line in parse.y.
-Thu Sep 19 14:12:02 2013 Koichi Sasada <ko1@atdot.net>
+ * parse.y (warn_unused_var): use rb_warn4 to suppress warning on ripper.
- * include/ruby/ruby.h: make Symbol objects frozen.
- [Feature #8906]
- I want to freeze this good day, too.
+Wed Sep 5 13:30:04 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/ruby/test_eval.rb: catch up this change.
+ * dir.c (glob_make_pattern): names under recursive need to be single
+ basenames to match for each name. [ruby-core:47418] [Bug #6977]
- * test/ruby/test_symbol.rb: add a test to check frozen symbols.
+Tue Sep 4 20:55:17 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-Thu Sep 19 09:11:33 2013 Eric Hodel <drbrain@segment7.net>
+ * test/ruby/envutil.rb (EnvUtil#invoke_ruby): show Timeout::Error
+ instead of IOError if the timeout has expired.
- * NEWS: Update for RDoc 4.1.0.preview.1 and RubyGems 2.2.0.preview.1
+ * test/test_pstore.rb
+ (PStoreTest#test_pstore_files_are_accessed_as_binary_files):
+ increase timeout because this test is slow on Windows.
+ [ruby-core:47402] [Bug #6965]
-Thu Sep 19 08:59:41 2013 Eric Hodel <drbrain@segment7.net>
+Tue Sep 4 11:28:57 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
- * lib/rdoc/markdown/literals_1_9.rb: Fix trailing whitespace.
+ * vm_eval.c (ruby_eval_string_from_file_protect): initializer
+ element is not computable at load time.
- Previously kpeg (which generates this file) added trailing
- whitespace, but this bug is now fixed.
+Tue Sep 4 07:48:35 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * lib/rdoc/markdown.rb: ditto.
+ * test/openssl/test_asn1_rb:
+ test/openssl/test_ssl_session.rb:
+ test/openssl/test_x509name.rb:
+ test/openssl/test_buffering.rb:
+ test/openssl/test_x509cert.rb:
+ test/openssl/test_ssl.rb: Refactor code that leads to warnings on
+ Ruby CI.
-Thu Sep 19 08:33:14 2013 Eric Hodel <drbrain@segment7.net>
+Tue Sep 4 07:02:56 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * lib/rdoc: Update to RDoc 4.1.0.preview.1
+ * test/openssl/utils.rb: Use DSS1 as DSA signature digest for all
+ OpenSSL versions < 1.0.0.
+ [Feature #6946] [ruby-core:47405]
- RDoc 4.1.0 contains a number of enhancements including a new default
- style and accessibility support. You can see the changelog here:
+Mon Sep 3 21:22:37 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- https://github.com/rdoc/rdoc/blob/v4.1.0.preview.1/History.rdoc
+ * include/ruby/ruby.h (rb_float_value): suppress warnings.
+ [ruby-core:47406][Bug #6971]
- * test/rdoc: ditto.
+Mon Sep 3 14:49:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Sep 19 07:16:26 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+ * lib/matrix.rb (Vector#magnitude): accumulate squares of absolute
+ values to fix for complex vector. [ruby-dev:46100] [Bug #6966]
- * ext/psych/lib/psych.rb: updating Psych version
+Mon Sep 3 10:09:36 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * ext/psych/psych.gemspec: ditto
+ * ext/openssl/extconf.rb: Detect OpenSSL_FIPS macro
+ ext/openssl/ossl.c: Expose OpenSSL::OPENSSL_FIPS constant to
+ indicate whether OpenSSL runs in FIPS mode.
+ test/openssl/test_pkey_dh.rb: Generate 256 bit keys for
+ non-FIPS installations to improve test performance (e.g. for
+ rubyci).
+ test/openssl/utils.rb: Replace DSS1 as certificate signature
+ digest with SHA1 for FIPS installations when using DSA by
+ introducing TestUtils::DSA_SIGNATURE_DIGEST.
+ test/openssl/test_x509cert.rb:
+ test/openssl/test_x509crl.rb:
+ test/openssl/test_x509req.rb: Use DSA_SIGNATURE_DIGEST
+ NEWS: Introduce OpenSSL::OPENSSL_FIPS
-Thu Sep 19 06:39:40 2013 Eric Hodel <drbrain@segment7.net>
+ These changes allow running the OpenSSL tests in FIPS mode
+ while keeping a high performance for non-FIPS installations.
+ Introduction of OpenSSL::OPENSSL_FIPS allows for applications
+ to react to special requirements when using OpenSSL in FIPS mode.
+ [Feature #6946] [ruby-core:47345]
- * lib/rubygems/dependency_resolver.rb: Switch the iterative resolver
- algorithm from recursive to iterative to avoid possible
- SystemStackError.
+Sun Sep 2 21:46:28 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-Thu Sep 19 06:29:30 2013 Eric Hodel <drbrain@segment7.net>
+ * test/openssl/utils.rb: Use a cached DH key instead of generating a
+ new one each time.
- * lib/rubygems: Update to RubyGems 2.2.0.preview.1
+Sun Sep 2 05:41:28 2012 NARUSE, Yui <naruse@ruby-lang.org>
- This brings several new features to RubyGems summarized here:
+ * lib/webrick/ssl.rb (WEBrick::Config::SSL): add new key
+ SSLTmpDhCallback to set SSLContext#tmp_dh_callback.
- https://github.com/rubygems/rubygems/blob/v2.2.0.preview.1/History.txt
+ * lib/webrick/ssl.rb (WEBrick::GenericServer#setup_ssl_context):
+ follow above.
- * test/rubygems: ditto.
+Sat Sep 1 18:50:50 2012 Akinori MUSHA <knu@iDaemons.org>
-Wed Sep 18 23:14:58 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * lib/set.rb (#initialize_copy, #eql): Use instance_variable_get
+ instead of instance_eval.
- * 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]
+Fri Aug 31 21:47:56 2012 Kouhei Sutou <kou@cozmixng.org>
- * 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.
+ * lib/test/unit/test-unit.gemspec: Make test/unit default gem.
+ [Feature #6875] [ruby-dev:46051]
-Wed Sep 18 16:32:15 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Aug 31 18:35:02 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * proc.c (mnew_from_me): allocate structs after allocated wrapper
- object successfully, to get rid of potential memory leak.
+ * ext/openssl/extconf.rb: Check existence of OPENSSL_NPN_NEGOTIATED.
+ ext/ossl_ssl.c: Support Next Protocol Negotiation. Protocols to be
+ advertised by the server can be set in the SSLContext by using
+ SSLContext#npn_protocols=, protocol selection on the client is
+ supported by providing a selection callback with
+ SSLContext#npn_select_cb. The protocol that was finally negotiated
+ is available through SSL#npn_protocol.
+ test/openssl/test_ssl.rb: Add tests for Next Protocol Negotiation.
+ NEWS: add news about NPN support.
+ [Feature #6503] [ruby-core:45272]
-Tue Sep 17 15:54:03 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Aug 31 17:38:43 2012 Akinori MUSHA <knu@iDaemons.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/set.rb (Set#{each,reject!,select!}, SortedSet#each): Pass
+ the original block through instead of creating one that only
+ yields the passed argument.
- * lib/test/unit/assertions.rb (Test::Unit::Assertions#assert_throw):
- assertion for throw. MiniTest::Assertions#assert_throws discards
- the caught value.
+Fri Aug 31 16:23:20 2012 Akinori MUSHA <knu@iDaemons.org>
- * lib/test/unit/assertions.rb (Test::Unit::Assertions#assert_nothing_thrown):
- returns the result of the given block.
+ * lib/ipaddr.rb: Introduce several new error classes where only
+ ArgumentError and StandardError were used. IPAddr::Error is
+ their common ancestor class that inherits from ArgumentError for
+ backward compatibility. Submitted by Jon Daniel. Fixes #173 on
+ GitHub.
-Tue Sep 17 12:55:58 2013 Eric Hodel <drbrain@segment7.net>
+Fri Aug 31 14:51:27 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * doc/regexp.rdoc: [DOC] Replace paragraphs in verbatim sections with
- plain paragraphs to improve readability as ri and HTML.
+ * test/bigdecimal/test_bigdecimal.rb (TestBigDecimal#test_to_f): added
+ for previous commit.
-Mon Sep 16 07:32:35 2013 Tadayoshi Funaba <tadf@dotrb.org>
+Fri Aug 31 14:32:05 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * complex.c: removed meaningless lines.
- * rational.c: ditto.
+ * ext/bigdecimal/bigdecimal.c (BigDecimal_to_f): use self's sign to
+ determine 0.0 and Inf's sign instead of internal double value's.
+ Reported by phasis68 (Heesob Park) at [ruby-core:47381] [Bug #6955]
-Mon Sep 16 00:44:23 2013 Masaki Matsushita <glass.saga@gmail.com>
+Fri Aug 31 14:31:17 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/socket/mkconstants.rb: define MSG_FASTOPEN.
- [ruby-core:57138] [Feature #8897]
+ * template/id.h.tmpl, tool/id2token.rb: make id.h independent from
+ parse.h, and make parse.c dependent on it instead.
-Sun Sep 15 13:31:23 2013 Tadayoshi Funaba <tadf@dotrb.org>
+Fri Aug 31 14:27:39 2012 Nobuyoshi Nakada <nobu@ruby-lang.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.
+ * lib/mkmf.rb (create_makefile): fix race conditions at install-ext.
+ target files need to depend on destination directory timestamp
+ files, not phony targets.
-Sat Sep 14 06:08:10 2013 Eric Hodel <drbrain@segment7.net>
+Fri Aug 31 14:03:45 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * dir.c (dir_s_glob): [DOC] Improve wording and layout.
+ * vm_trace.c (clean_hooks): do not access freed memory.
- * dir.c (file_s_fnmatch): ditto.
+ * vm_trace.c (rb_threadptr_exec_event_hooks): fix uninitialized state
+ when no events is executed.
- * 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 Aug 30 18:21:51 2012 Tanaka Akira <akr@fsij.org>
-Thu Sep 12 14:58:58 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * io.c (rb_io_close): call rb_last_status_clear.
- * lib/uri/generic.rb (URI::Generic.find_proxy): return nil if
- http_proxy environment variable is empty string.
- [ruby-core:57140] [Bug #8898]
+Thu Aug 30 16:17:52 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Sep 13 10:40:28 2013 Eric Hodel <drbrain@segment7.net>
+ * ext/bigdecimal/bigdecimal.c (BigDecimal_to_f): check underflow since
+ strtod() sets errno to ERANGE at underflow too. [ruby-core:47342]
+ [Bug #6944]
- * lib/rubygems: Update to RubyGems 2.1.3
+Thu Aug 30 12:44:43 2012 Akinori MUSHA <knu@iDaemons.org>
- Fixed installing platform gems
+ * lib/set.rb (Set#{<,>,<=,>=}): Define comparison operators as
+ shorthand for the {proper_}{subset?,superset?} methods (finally).
+ Given a push by Alexander E. Fischer.
- Restored concurrent requires
+Thu Aug 30 09:21:01 2012 NARUSE, Yui <naruse@ruby-lang.org>
- Fixed installing gems with extensions with --install-dir
+ * lib/uri/ftp.rb (URI::FTP#initialize): raise InvalidURIError if "//"
+ is not present [ruby-core:47344] [Bug #6945]
- Fixed `gem fetch -v` to install the latest version
+Thu Aug 30 07:45:12 2012 Luis Lavena <luislavena@gmail.com>
- Fixed installing gems with "./" in their files entries
+ * test/ruby/test_file_exhaustive.rb: fix test introduced in r36811 for
+ posix environments where HOME is not defined. [ruby-core:47322]
- * test/rubygems/test_gem_package.rb: Tests for the above.
+Wed Aug 29 23:42:59 2012 Tanaka Akira <akr@fsij.org>
- * NEWS: Updated for RubyGems 2.1.3
+ * internal.h (rb_last_status_clear): declared.
-Thu Sep 12 22:40:03 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * process.c (rb_last_status_clear): exported.
+ (rb_f_system): call rb_last_status_clear.
- * configure.in (RUBY_CHECK_SIGNEDNESS): macro to check signedness of a
- type.
+ * io.c (rb_f_backquote): call rb_last_status_clear.
- * configure.in (size_t): must be unsigned.
- [ruby-core:57149] [Feature #8890]
+Wed Aug 29 22:01:15 2012 Tanaka Akira <akr@fsij.org>
-Thu Sep 12 22:37:08 2013 Anton Ovchinnikov <revolver112@gmail.com>
+ * process.c (rb_f_system): check failures of waitpid.
+ [ruby-talk:398687]
- * 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]
+Wed Aug 29 15:03:04 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Sep 12 21:35:46 2013 Naohisa Goto <ngotogenome@gmail.com>
+ * configure.in (LIBDIR_BASENAME): use configured libdir value to fix
+ --enable-load-relative on systems where libdir is not default value,
+ overridden in config.site files. [ruby-core:47267] [Bug #6903]
- * Makefile.in (libruby-static.a): change LDFLAGS order. LDFLAGS may
- include library path that should be specified before LIBS.
- [ruby-dev:47707] [Bug #8901]
+ * ruby.c (ruby_init_loadpath_safe): ditto.
-Thu Sep 12 20:07:29 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Aug 29 14:34:41 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * vsnprintf.c (MAXEXP, MAXFRACT): calculate depending on constants in
- float.h.
+ * addr2line.c: SIZE_MAX is defined in stdint.h, so r36755 breaks
+ 32bit FreeBSD. [ruby-core:47360] [Bug #6948]
- * vsnprintf.c (BSD_vfprintf): limit length for cvt() to get rid of
- buffer overflow. [ruby-core:57023] [Bug #8864]
+Wed Aug 29 04:50:04 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * vsnprintf.c (exponent): make expbuf size more precise.
+ * test/openssl/utils.rb
+ test/openssl/test_pair.rb
+ test/openssl/test_pkey_dh.rb: Use 1024 bit DH parameters to satisfy
+ OpenSSL FIPS requirements. Patch by Vit Ondruch.
+ [Bug #6938] [ruby-core:47326]
-Wed Sep 11 17:30:45 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Aug 28 22:31:49 2012 CHIKANAGA Tomoyuki <nagachika@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]
+ * insns.def (checkmatch): suppress warnings. [ruby-core:47339]
+ [Bug #6930]
-Wed Sep 11 07:55:17 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Tue Aug 28 20:03:54 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * thread.c (rb_mutex_unlock): Mutex#unlock no longer raise
- an exception even if uses on trap. [Bug #8891]
+ * configure.in: Fixing Haiku R1/alpha3 build with gcc-4.4.4.
+ - omit ANSI standard flags to compile socket extension where
+ anonymous union is required.
+ - remove redundant -be flags.
+ by Takashi Toyoshima <toyoshim@gmail.com>
+ https://github.com/ruby/ruby/pull/168
-Tue Sep 10 14:37:01 2013 Shota Fukumori <sorah@tubusu.net>
+Tue Aug 28 11:32:37 2012 Yuki Yugui Sonoda <yugui@google.com>
- * vm_backtrace.c (vm_backtrace_to_ary): Ignore the second argument if
- it is nil. [Bug #8884] [ruby-core:57094]
+ * nacl/GNUmakefile.in (.rbconfig.time): r36828 was incomplete.
+ It did not run correctly on clean build.
- * test/ruby/test_backtrace.rb (test_caller_with_nil_length):
- Test for above.
+Tue Aug 28 09:25:20 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Tue Sep 10 12:39:17 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * win32/Makefile.sub (Makefile): make to depend on common.mk, to
+ stop and force to re-run make process when common.mk is changed.
- * class.c (method_entry_i): should exclude refined methods from
- instance method list. [ruby-core:57080] [Bug #8881]
+Mon Aug 27 20:19:49 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-Tue Sep 10 12:05:04 2013 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+ * test/etc/test_etc.rb (TestEtc#test_getgrgid): fix for non unique GID.
+ No unixen systems guarantee that GID is unique. Etc.getgrgid would
+ not return the first entry in the order of Etc.group for shared GID.
+ [ruby-core:47312] [Bug #6935]
- * io.c (rb_f_printf): [DOC] add missing parenthesis in rdoc.
+Mon Aug 27 18:19:36 2012 Koichi Sasada <ko1@atdot.net>
-Tue Sep 10 10:08:00 2013 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+ * include/ruby/ruby.h (rb_float_value): optimize it.
+ This technique was pointed by shinichiro.hamaji
+ <http://shinh.skr.jp/m/?date=20120825#p02>.
- * NEWS: Update RubyGems note.
+Mon Aug 27 15:08:25 2012 Yuki Yugui Sonoda <yugui@google.com>
-Tue Sep 10 09:51:22 2013 Eric Hodel <drbrain@segment7.net>
+ * common.mk (vm_trace.o): Added a missing dependency.
- * lib/rubygems: Update to RubyGems 2.1.0. Fixes CVE-2013-4287.
+Sun Aug 26 09:29:32 2012 Yuki Sonoda (Yugui) <yugui@yugui.jp>
- See http://rubygems.rubyforge.org/rubygems-update/CVE-2013-4287_txt.html
- for CVE information.
+ * nacl/GNUmakefile.in (package): make package should install
+ example.html for nacl build
- See http://rubygems.rubyforge.org/rubygems-update/History_txt.html#label-2.1.0+%2F+2013-09-09
- for release notes.
+ Patch by Takashi Toyoshima <toyoshim AT gmail.com>.
- * test/rubygems: Tests for the above.
+Sun Aug 26 09:22:33 2012 Yuki Sonoda (Yugui) <yugui@yugui.jp>
-Mon Sep 9 21:31:45 2013 Tanaka Akira <akr@fsij.org>
+ * nacl/GNUmakefile.in (CC, LD, NM, AR, AS, RANLIB, OBJDUMP, OBJCOPY)
+ Rewrites these variables instead of PATH.
+ NaCl port uses a toolchain which is specified by NACL_SDK_ROOT
+ environment variable. Originally, NaCl build added the toolchain
+ under the NACL_SDK_ROOT to the PATH. But updating PATH doesn't work
+ on Mac.
+ (RBCONFIG): Replaces configs with the variable updates above.
- * 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/
+ * configure.in: Thus it is no longer necessary to check $PATH.
- * time.c: Ditto.
+ Based on a patch by Takashi Toyoshima <toyoshim AT gmail.com>.
- * ext/socket/ancdata.c: Ditto.
+Sun Aug 26 16:53:00 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Sep 9 16:55:59 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * insns.def (checkmatch): suppress warnings. [ruby-core:47310]
+ [Bug #6930]
- * 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]
+ * vm_core.h (VM_FRAME_TYPE_FINISH_P): ditto.
-Mon Sep 9 09:14:58 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Aug 24 15:42:28 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * tool/rbinstall.rb (Gem::Specification#initialize): default date to
- RUBY_RELEASE_DATE. [ruby-core:57072] [Bug #8878]
+ * lib/mkmf.rb (create_makefile): use timestamp for destination
+ directories to make them before making or copying files there.
+ [ruby-dev:46067] [Bug #6904]
- * tool/rbinstall.rb (Gem::Specification#to_ruby): add date.
+Fri Aug 24 12:40:15 2012 Luis Lavena <luislavena@gmail.com>
-Sun Sep 8 16:01:54 2013 Tanaka Akira <akr@fsij.org>
+ * configure.in (mingw): add shlwapi to the list of dependency
+ libs for Windows.
+ * win32/Makefile.sub (EXTSOLIBS): ditto.
- * rational.c (f_gcd): Relax the condition to use GMP.
+ * internal.h: declare internal functions rb_w32_init_file,
+ rb_file_expand_path_internal and rb_file_expand_path_fast.
-Sun Sep 8 13:56:38 2013 Masaki Suketa <masaki.suketa@nifty.ne.jp>
+ * file.c (Init_File): invoke Windows initialization rb_w32_init_file
- * ext/win32ole/win32ole.c (folevariant_initialize): check type of
- element of array.
+ * win32/file.c (rb_file_load_path_internal): new function.
+ Windows-specific implementation that replaces file_expand_path.
+ [Bug #6836][ruby-core:46996]
- * test/win32ole/test_win32ole_variant.rb (test_s_new_ary): ditto.
+ * win32/file.c (rb_w32_init_file): new function. Initialize codepage
+ cache for faster conversion encodings lookup.
-Sat Sep 7 21:33:10 2013 Tanaka Akira <akr@fsij.org>
+ * file.c (file_expand_path): rename to rb_file_expand_path_internal.
+ Conditionally exclude from Windows.
- * math.c (math_log): Test the sign for bignums.
- (math_log2): Ditto.
- (math_log10): Ditto.
+ * file.c (rb_file_expand_path_fast): new function. delegates to
+ rb_file_expand_path_internal without performing a hit to the
+ filesystem.
-Sat Sep 7 20:25:47 2013 Tanaka Akira <akr@fsij.org>
+ * file.c (file_expand_path_1): use rb_file_expand_path_internal without
+ path expansion (used by require).
+ * file.c (rb_find_file_ext_safe): ditto.
+ * file.c (rb_find_file_safe): ditto.
- * math.c (math_log): Support bignums bigger than 2**1024.
- (math_log2): Ditto.
- (math_log10): Ditto.
+ * load.c (rb_get_expanded_load_path): use rb_file_expand_path_fast.
+ * load.c (rb_feature_provided): ditto.
-Sat Sep 7 15:36:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * file.c (rb_file_expand_path): use rb_file_expand_path_internal with
+ path expansion.
+ * file.c (rb_file_absolute_path): ditto.
- * vm_eval.c (vm_call0): fix prototype, the id parameter should be of
- type ID, not VALUE
+ * test/ruby/test_file_exhaustive.rb: new tests to exercise
+ rb_file_expand_path_internal implementation and compliance with
+ existing behaviors.
- * 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]
+Fri Aug 24 07:35:24 2012 Eric Hodel <drbrain@segment7.net>
- * test/ruby/test_refinement.rb: add test
+ * lib/net/http/backward.rb (class Net): Restored Net::HTTPSession to
+ fix backwards-compatibility with ancient Net::HTTP. [Bug #6889]
-Sat Sep 7 13:49:40 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+Thu Aug 23 20:58:55 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
- * variable.c (classname): the name of class that has
- non class id should not be nil. This bug was introduced
- in r36577.
+ * common.mk: support `make id.h` without `rm .id.h.time` after
+ `rm id.h`.
- * test/thread/test_cv.rb: test for change.
+Thu Aug 23 20:48:45 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Sat Sep 7 13:29:22 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+ * test/ruby/test_fixnum.rb (TestFixnum#test_singleton_method): new test.
- * lib/find.rb (Find.find): respect the encodings of arguments.
- [ruby-dev:47530] [Feature #8657]
+ * test/ruby/test_bignum.rb (TestBignum#test_singleton_method): ditto.
- * test/test_find.rb: add tests.
+ * test/ruby/test_float.rb (TestFloat#test_singleton_method): ditto.
-Sat Sep 7 10:40:32 2013 Tanaka Akira <akr@fsij.org>
+ * test/ruby/test_symbol.rb (TestSymbol#test_singleton_method): ditto.
- * ext/socket/mkconstants.rb (TCP_FASTOPEN): Defined for TCP fast open.
- [ruby-core:57048] [Feature #8871] patch by Masaki Matsushita.
+Thu Aug 23 20:34:32 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Fri Sep 6 23:53:31 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * class.c (singleton_class_of): flonum can't have singleton class.
- * common.mk: use RUNRUBY instead of MINIRUBY because MINIRUBY can't
- require extension libraries. The patch is from nobu
- (Nobuyoshi Nakada).
+ * vm.c (vm_define_method): flonum can't have singleton method.
- * ext/thread/extconf.rb: for build ext/thread/thread.c.
+Thu Aug 23 19:18:33 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * include/ruby/intern.h: ditto.
+ * common.mk (win32/*): macro RUBY_H_INCLUDES is not defined there,
+ so need to move dependency rules under the definition of it.
+
+Thu Aug 23 19:16:20 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * win32/Makefile.sub: refactoring. remove unused rules, and update
+ some rules which are not used usually to fit current macros.
+
+Thu Aug 23 16:46:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * file.c (rb_find_file_ext_safe, rb_find_file_safe): default to
+ US-ASCII for encdb and transdb.
+
+ * load.c (search_required): keep encoding of feature name. set
+ loading path to filesystem encoding. [Bug #6377][ruby-core:44750]
+
+ * ruby.c (add_modules, require_libraries): assume default external
+ encoding as well as ARGV.
+
+Thu Aug 23 16:20:04 2012 Koichi Sasada <ko1@atdot.net>
+
+ * include/ruby/ruby.h: introduce flonum technique for
+ 64bit CPU environment (sizeof(double) == sizeof(VALUE)).
+ flonum technique enables to avoid double object creation
+ if the double value d is in range about between
+ 1.72723e-77 < |d| <= 1.15792e+77 or 0.0.
+ flonum Float value is immediate and their lowest two bits
+ are b10.
+ If flonum is activated, then USE_FLONUM macro is 1.
+ I'll write detailed in this technique on
+ https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/Flonum_tech
+
+ * benchmark/bmx_temp.rb: add an benchmark for simple
+ Float calculation.
+
+ * gc.c (id2ref, rb_obj_id): add flonum Float support.
+
+ * include/ruby/intern.h: move decl of rb_float_new(double)
+ to include/ruby/ruby.h.
+
+ * insns.def, vm.c, vm_insnhelper.c: add flonum optimization
+ and simplify source code.
+
+ * vm_insnhelper.h (FLONUM_2_P): added.
+
+ * marshal.c: support flonum output.
+
+ * numeric.c (rb_float_new_in_heap): added.
+
+ * parse.y: support flonum.
+
+ * random.c: ditto.
+
+Thu Aug 23 16:12:40 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * lib/mkmf.rb (create_makefile): add dependency to header files when
+ depend files don't exist. now we can remove simple (and often
+ wrong) depend files in most cases.
+
+Thu Aug 23 16:02:20 2012 Koichi Sasada <ko1@atdot.net>
+
+ * ext/date/depend: add dependency to $(ruby_headers).
+
+Thu Aug 23 12:51:39 2012 Shugo Maeda <shugo@ruby-lang.org>
+
+ * insns.def (invokesuper): reverted r36640 partially to make super
+ in a thread work correctly. [ruby-core:47284] [Bug #6907]
+
+ * test/ruby/test_super.rb: related test.
+
+Thu Aug 23 12:30:20 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * win32/configure.bat: support --with(out)?-ext(ensions) options.
+
+Thu Aug 23 11:52:04 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * configure.in: Fixing Haiku build.
+ - -lbe is not required for linking
+ - stack protector doesn't work for now because of the default gcc's
+ bug
+ by Takashi Toyoshima <toyoshim@gmail.com>
+ https://github.com/ruby/ruby/pull/167
+
+ * signal.c (ruby_signal): haiku doesn't have SIGBUS.
+
+Thu Aug 23 11:32:44 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * test/open-uri/test_open-uri.rb (TestOpenURI#test_read_timeout): this
+ test expects that the server thread will be killed in sleep, but 0.01
+ sec is too short to reach there.
+
+Thu Aug 23 10:49:28 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * configure.in: use the value of --with-opt-dir on building ruby
+ itself. [ruby-dev:46064] [Bug #6900]
+
+Thu Aug 23 10:36:35 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * common.mk (ID_H_TARGET): revert a part of r36724 and r36751. they
+ break mswin build from clean source.
+
+Thu Aug 23 02:37:35 2012 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * ext/syck: removed. Fixes [ruby-core:43360]
+
+ * test/syck: removed.
+
+ * lib/yaml.rb: only require psych, show a warning if people try to set
+ the engine to syck.
+
+Thu Aug 23 01:46:53 2012 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * insns.def: search up the cf stack for an object that is an instance
+ of the recipient class. Fixes [ruby-core:47186]
+
+ * test/ruby/test_super.rb: related test.
+
+Wed Aug 22 19:46:24 2012 Tadayoshi Funaba <tadf@dotrb.org>
+
+ * ext/date/date_core.c: [ruby-core:47266].
+
+Wed Aug 22 19:41:19 2012 Tadayoshi Funaba <tadf@dotrb.org>
+
+ * ext/date/date_core.c: [ruby-core:47226].
+
+Wed Aug 22 16:57:04 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/mkmf.rb (configuration): extract least ruby headers list as
+ ruby_headers, so depend files can use default dependency
+ explicitly.
+
+Wed Aug 22 15:27:50 2012 Koichi Sasada <ko1@atdot.net>
+
+ * vm_insnhelper.c (vm_setup_method): fix last commit of
+ vm_insnhelper.c (r36771). [ruby-dev:46065] [Bug #6901]
+ Should not disable tail call opt on FINISH_FRAME.
+ This flag should be propagated correctly.
+
+Wed Aug 22 14:05:23 2012 Koichi Sasada <ko1@atdot.net>
+
+ * vm_trace.c: support TracePoint. [ruby-trunk - Feature #6895]
+
+ * test/ruby/test_settracefunc.rb: add tests for above.
+
+ * proc.c (rb_binding_new_with_cfp): add an internal function.
+
+ * vm.c (rb_vm_control_frame_id_and_class): add an internal function.
+
+ * vm_trace.c: add rb_add_event_hook2() and rb_thread_add_event_hook2().
+ Give us the good name for them!
+
+Wed Aug 22 11:38:16 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
+
+ * .travis.yml (before_script): Turned out that make -j is broken.
+
+Wed Aug 22 11:23:35 2012 Shugo Maeda <shugo@ruby-lang.org>
+
+ * vm_insnhelper.c (vm_setup_method): should not enable tail call
+ optimization for frames with VM_FRAME_FLAG_FINISH.
+ [ruby-dev:46065] [Bug #6901]
+
+Wed Aug 22 11:20:47 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/rubygems/test_case.rb: run test with psych if exist.
+
+Thu Aug 16 12:09:51 2012 Yuki Yugui Sonoda <yugui@google.com>
+
+ * nacl/pepper_main.c (init_loadpath): Pushes the correct load path on
+ other architectures than x86_64. Fixes #6873.
+
+Wed Aug 15 19:37:33 2012 Yuki Yugui Sonoda <yugui@google.com>
+
+ * configure.in (ac_cv_func_shutdown): shutdown(2) has a dummy
+ implementation but has no declaration and does not work in
+ NativeClient SDK pepper_20.
+
+Wed Aug 15 19:29:29 2012 Yuki Yugui Sonoda <yugui@google.com>
+
+ * common.mk (vm_backtrace.o): Added missing dependencies.
+
+ * ext/nkf/depend (nkf.o): ditto.
+
+ * ext/ripper/depend (ripper.o) ditto.
+
+Wed Aug 22 07:27:00 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/cgi/util.rb (CGI.escapeHTML): use &#39;
+ [ruby-core:47221] [Bug #6861]
+
+Tue Aug 21 21:59:22 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
+
+ * lib/observer.rb: fix typo. https://github.com/ruby/ruby/pull/162 by
+ unsymbol (Philip Cunningham).
+
+Tue Aug 21 20:30:06 2012 Benoit Daloze <eregontp@gmail.com>
+
+ * test/fileutils/test_fileutils.rb (TestFileUtils#teardown):
+ do not assume cwd is TMPROOT and never remove current directory.
+ [ruby-core:47224][Bug #6884]
+
+Tue Aug 21 17:29:56 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * addr2line.c (fill_lines): need check and cast of the file size of
+ target binary because there are some platforms which off_t > size_t.
+
+Tue Aug 21 17:07:58 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
+
+ * .travis.yml (compiler): [experimental] clang support.
+
+Tue Aug 21 15:44:27 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * ext/dl/lib/dl/func.rb (DL::Function#bind): fixes an error in
+ test/dl/test_import.rb (DL::TestImport#test_carried_function)
+ introduced by r36718.
+ the instance of the anonymous class which wraps the block should have
+ same methods and instance variables of self.
+
+Tue Aug 21 14:29:22 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * win32/Makefile.sub (scriptbin.mk): no need to include twice.
+
+Tue Aug 21 10:52:08 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * test/unit/test.rb (Test::Unit::ProxyError): new exception class to
+ wrap exceptions raised in workers in parallel test mode.
+
+ * test/unit/parallel.rb (Test::Unit::Worker#puke): use above wrapper
+ exception.
+ [Bug #6882] [ruby-dev:46054]
+
+Tue Aug 21 10:40:06 2012 Koichi Sasada <ko1@atdot.net>
+
+ * test_continuation.rb (tracing_with_thread_set_trace_func):
+ fix to use Thread#set_trace_func(nil), not set_trace_func(nil).
+
+Tue Aug 21 09:32:41 2012 Ryan Davis <ryand-ruby@zenspider.com>
+
+ * lib/minitest/*: Imported minitest 3.3.0 (r7676)
+ * test/minitest/*: ditto
+
+Tue Aug 21 09:05:32 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * test/testunit/tests_for_parallel/ptest_forth.rb: added a test case
+ which causes an error.
+
+ * test/testunit/test_parallel.rb: follow above change.
+ see [Bug #6882]
+
+Tue Aug 21 05:43:00 2012 James Edward Gray II <james@graysoftinc.com>
+
+ * lib/csv.rb: Fixes #161 on github
+ * lib/csv.rb: You can now specify a pattern for :skip_lines.
+ Matching lines will not be passed to the CSV parser.
+ * lib/csv.rb: Patch by Christian Schwartz.
+
+Tue Aug 21 05:25:41 2012 Eric Hodel <drbrain@segment7.net>
+
+ * re.c (rb_reg_initialize_m): Forgot to update output for or'd-options
+ example.
+
+Tue Aug 21 05:18:03 2012 Eric Hodel <drbrain@segment7.net>
+
+ * re.c (rb_reg_initialize_m): Update example to show that regexp
+ options use | an not || to avoid confusion.
+
+Mon Aug 20 23:02:27 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * parse.y: more descriptive token names in syntax error messages.
+
+Mon Aug 20 20:36:30 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * vm_insnhelper.c (vm_call_method): follow iclasses as klass in cfp
+ but not included modules. [ruby-core:47241] [Bug #6891]
+
+ * vm_insnhelper.c (vm_call_bmethod): pass defined_class to follow
+ proper ancestors. [ruby-core:47241] [Bug #6891]
+
+Mon Aug 20 11:40:27 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+
+ * common.mk: fix failed to make with -j2.
+ https://gist.github.com/3397935
+
+Mon Aug 20 10:51:01 2012 Shota Fukumori <sorah@tubusu.net>
+
+ * lib/test/unit.rb, lib/test/unit/parallel.rb:
+ generate error message (String) in parallel.rb instead of
+ marshalling Exception. Fixes [Bug #6882] [ruby-dev:46054]
+
+Sun Aug 19 01:24:32 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
+
+ * enum.c: fix docs. https://github.com/ruby/ruby/pull/129 by
+ richardkmichael (Richard Michael).
+
+Sun Aug 19 00:47:26 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
+
+ * lib/fileutils.rb: fix typo.
+ https://github.com/ruby/ruby/pull/155 by simonc (Simon COURTOIS).
+
+Sat Aug 18 09:57:46 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * enc/depend: fix inplace-build condition. enc.mk is generated with
+ setting $srcdir to enc, but pwd is still top build directory.
+ [ruby-core:47236] [Bug #6888]
+
+Fri Aug 17 23:28:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * object.c (rb_any_to_s, rb_obj_inspect): preserve encodings of class
+ name and instance variable names.
+
+Fri Aug 17 12:39:33 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * ext/dl/lib/dl/func.rb (DL::Function#bind): allow to return/break from
+ the callback method. (Fiddle already allows it.)
+ [Bug #6389] [ruby-dev:45604]
+
+Thu Aug 16 19:54:24 2012 Koichi Sasada <ko1@atdot.net>
+
+ * vm_trace.c, vm_core.h: simplify tracing mechanism.
+
+ (1) add rb_hook_list_t data structure which includes
+ hooks, events (flag) and `need_clean' flag.
+ If the last flag is true, then clean the hooks list.
+ In other words, deleted hooks are contained by `hooks'.
+ Cleanup process should run before traversing the list.
+ (2) Change check mechanism
+ See EXEC_EVENT_HOOK() in vm_core.h.
+ (3) Add `raw' hooks APIs
+ Normal hooks are guarded from exception by rb_protect().
+ However, this protection is overhead for too simple
+ functions which never cause exceptions. `raw' hooks
+ are executed without protection and faster.
+ Now, we only provide registration APIs. All `raw'
+ hooks are kicked under protection (same as normal hooks).
+
+ * include/ruby/ruby.h: remove internal data definition and
+ macros.
+
+ * internal.h (ruby_suppress_tracing), vm_trace.c: rename
+ ruby_suppress_tracing() to rb_suppress_tracing()
+ and remove unused function parameter.
+
+ * parse.y: fix to use renamed rb_suppress_tracing().
+
+ * thread.c (thread_create_core): no need to set RUBY_VM_VM.
+
+ * vm.c (mark_event_hooks): move definition to vm_trace.c.
+
+ * vm.c (ruby_vm_event_flags): add a global variable.
+ This global variable represents all of Threads and VM's
+ event masks (T1#events | T2#events | ... | VM#events).
+ You can check the possibility kick trace func or not
+ with ruby_vm_event_flags.
+ ruby_vm_event_flags is maintained by vm_trace.c.
+
+ * cont.c (fiber_switch, rb_cont_call): restore tracing status.
+ [Feature #4347]
+
+ * test/ruby/test_continuation.rb: ditto.
+
+Thu Aug 16 19:15:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * object.c (rb_class_initialize): forbid inheriting uninitialized
+ class. another class tree not based on BasicObject cannot exist.
+ [ruby-core:47148][Bug #6863]
+
+Thu Aug 16 11:52:06 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * test/-ext-/test_printf.rb (Test_SPrintf#test_{taint,untrust}): use
+ plain object so that the results of to_s and inspect are infected.
+ [ruby-dev:46053] [Bug #6881]
+
+Thu Aug 16 09:46:07 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * strftime.c: remove unnecessary macros to check traditional C.
+ https://github.com/ruby/ruby/pull/46 by lateau (Daehyub Kim).
+
+ * vsnprintf.c: remove K&R.
+
+Wed Aug 15 20:47:49 2012 Benoit Daloze <eregontp@gmail.com>
+
+ * object.c (rb_obj_inspect): Kernel#inspect: do not call #to_s. A class
+ can now benefit from the nice default #inspect even if it defines #to_s.
+ Also, there is no more unexpected change in #inspect result.
+
+ * NEWS: Add note about the change.
+
+ * bignum.c, io.c, numeric.c, object.c, proc.c, vm.c (Init_*):
+ Adapt internal structures (by aliasing #inspect to #to_s) so they
+ don't rely on the removed behavior (#inspect calling overridden #to_s).
+
+ * test/ruby/test_object.rb (test_inspect): add tests for Kernel#inspect.
+
+ * lib/pp.rb (class PP): do not call #to_s anymore, as #inspect
+ no more does (mame).
+
+ * test/test_pp.rb (class PPInspectTest): remove related assertion (mame).
+ [ruby-core:43238][Feature #6130]
+
+ * test/drb/drbtest.rb (DRbCore#teardown, DRbAry#teardown):
+ adapt DRb tests with the new change (shirosaki).
+ [ruby-core:47182][Bug #6866]
+
+Wed Aug 15 18:05:37 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * lib/test/unit.rb (Test::Unit::Runner#failed): need to delete the
+ status line if the status is skipped and -q is specified.
+
+Wed Aug 15 16:26:52 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * sprintf.c (ruby__sfvextra): the result should be infected by the
+ given strings.
+
+ * sprintf.c (ruby__sfvwrite): set buffer length and exclude
+ uninitialized garbage to get correct coderange.
+
+Wed Aug 15 16:20:09 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * common.mk (ID_H_TARGET): make timestamp file of id.h so that the
+ header will not be remade repetitively.
+
+Wed Aug 15 11:39:53 2012 Koichi Sasada <ko1@atdot.net>
+
+ * vm_trace.c: separate trace_func related functions from
+ thread.c.
* thread.c: ditto.
- * lib/thread.rb: removed and replaced by ext/thread/thread.c.
+ * common.mk: add vm_trace.o.
- * 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]
+ * inits.c: call Init_vm_trace().
- * 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]
+Tue Aug 14 16:25:46 2012 Shugo Maeda <shugo@ruby-lang.org>
-Fri Sep 6 22:47:12 2013 Tanaka Akira <akr@fsij.org>
+ * test/erb/test_erb.rb (test_html_escape): add assertions for the
+ cases where the argument is not a String.
- * configure.in: Define ac_cv_func_clock_getres to yes for mingw*.
+Tue Aug 14 16:03:31 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Fri Sep 6 21:04:10 2013 Tanaka Akira <akr@fsij.org>
+ * win32/win32.c (check_valid_dir): reject "..." as directory name.
+ [Bug #6851]
- * 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.
+Tue Aug 14 16:02:51 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * internal.h (rb_gcd_normal): Declared.
- (rb_gcd_gmp): Ditto.
+ * test/ruby/test_file_exhaustive.rb
+ (TestFileExhaustive#test_stat_dotted_prefix): added.
- * ext/-test-/rational: New directory.
+Tue Aug 14 15:39:09 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * test/-ext-/rational: New directory.
+ * test/ruby/test_file_exhaustive.rb
+ (TestFileExhaustive#test_stat_drive_root): added.
-Fri Sep 6 14:23:22 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Aug 14 10:38:17 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * win32/win32.c (clock_getres): required as well as clock_gettime().
- [ruby-dev:47699] [Bug #8869]
+ * lib/erb.rb (ERB::Util.html_escape): fix r36687: call to_s before
+ passing it to CGI.escapeHTML.
-Fri Sep 6 11:45:27 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Aug 13 13:13:19 2012 Shugo Maeda <shugo@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.
+ * lib/erb.rb (ERB::Util.html_escape): use CGI.escapeHTML to escape
+ single quotes. [ruby-core:47138] [Bug #6861]
-Fri Sep 6 02:37:22 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+Sun Aug 12 11:57:20 2012 Kazuki Tsujimoto <kazuki@callcc.net>
- * ext/psych/lib/psych/visitors/yaml_tree.rb: use double quotes when
- strings start with special characters.
- https://github.com/tenderlove/psych/issues/157
+ * vm.c (invoke_block_from_c): fix unintentional block passing.
+ [ruby-dev:45071] [Bug #5832]
- * test/psych/test_string.rb: test for change.
+Fri Aug 10 08:41:28 2012 Eric Hodel <drbrain@segment7.net>
-Fri Sep 6 00:05:14 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * gc.c (gc_malloc_allocated_size): RDoc does not process macros, so
+ mention this method is only available when ruby is built with
+ CALC_EXACT_MALLOC_SIZE
+ * gc.c (gc_malloc_allocations): ditto
- * class.c (rewrite_cref_stack): remove recursion.
+Thu Aug 9 23:46:51 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Sep 5 18:05:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * tool/mkrunnable.rb: see build_os instead of target arch for
+ cross-compiling.
- * string.c (fstring_cmp): take string encoding into account when
- comparing fstrings [ruby-core:57037] [Bug #8866]
+ * configure.in (MINIRUBY): use real path for include path.
- * test/ruby/test_string.rb: add test
+ * template/fake.rb.in (builddir): remove duplications
-Thu Sep 5 17:25:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Aug 9 20:03:11 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
- * string.c (rb_fstring, rb_str_free): use st_data_t instead of VALUE.
+ * test/ruby/test_file_exhaustive.rb
+ (TestFileExhaustive#test_stat_special_file): add a test.
+ GetFileAttributesExW fails to get attributes of special files
+ such as pagefile.sys.
- * string.c (rb_fstring): get rid of duplicating already frozen object.
+ * win32/win32.c (check_valid_dir): for performance, check the path
+ by FindFirstFileW only if the path contains "..."
-Thu Sep 5 14:01:22 2013 Eric Hodel <drbrain@segment7.net>
+ * win32/win32.c (winnt_stat): use GetFileAttributesExW instead of
+ FindFirstFileW since GetFileAttributesExW is faster.
+ Based on the patch by Dusan D. Majkic.
+ [ruby-core:47083] [Feature #6845]
- * lib/optparse.rb: The Integer acceptable now allows binary and
- hexadecimal numbers per the documentation. [ruby-trunk - Bug #8865]
+Thu Aug 9 18:33:46 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- DecimalInteger, OctalInteger, DecimalNumeric now validate their input
- before converting to a number. [ruby-trunk - Bug #8865]
+ * ruby.c (proc_options): show version only once even if -v and
+ --version are given together.
+ http://twitter.com/d6rkaiz/status/233491797085671424
- * test/optparse/test_acceptable.rb: Tests for the above, tests for all
- numeric acceptables for existing behavior.
+Thu Aug 9 12:37:22 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Thu Sep 5 13:49:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * test/openssl/test_config.rb (OpenSSL#test_constants): skip this
+ test if platform is Mac OS X or Windows. [Bug #6830]
- * include/ruby/ruby.h: add RSTRING_FSTR flag
+Wed Aug 8 22:51:30 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * internal.h: add rb_fstring() prototype
+ * vm_eval.c (eval_under): singletons other than special constants
+ don't need cref-scope hack.
- * string.c (rb_fstring): deduplicate frozen string literals
+Wed Aug 8 22:45:38 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * string.c (rb_str_free): delete fstrings from frozen_strings table when
- they are GC'd
+ * common.mk (.y.h): split from .y.c rule to manage dependency on
+ parse.h. [ruby-core:46741] [Bug #6789]
- * string.c (Init_String): initialize frozen_strings table
+ * common.mk (id.h): keep old file unless changed.
-Thu Sep 5 12:48:00 2013 Kenta Murata <mrkn@cookpad.com>
+Wed Aug 8 17:11:20 2012 Koichi Sasada <ko1@atdot.net>
- * configure.in (with_gmp): set with_gmp no if it is empty.
+ * compile.c (ADD_INSNL): make ADD_INSNL as alias of ADD_INSN1.
-Thu Sep 5 10:41:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+Wed Aug 8 17:08:14 2012 Koichi Sasada <ko1@atdot.net>
- * vm_insnhelper.c (vm_getivar): use class sequence to check class
- identity, instead of pointer + vm state
+ * bootstrap/test_exception.rb: fix a last committed test.
- * vm_insnhelper.c (vm_setivar): ditto
+Wed Aug 8 16:27:58 2012 Koichi Sasada <ko1@atdot.net>
-Thu Sep 5 08:20:58 2013 Tanaka Akira <akr@fsij.org>
+ * compile.c, insns.def (checkmatch):
+ remove checkincludearray instruction and
+ add new instruction checkmatch.
+ This change is to solve
+ [Bug #4438] "rescue args type check omitted".
- * 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.
+ * iseq.c: increment ISEQ_MAJOR_VERSION because removal of
+ checkincludearray instruction.
- * internal.h (rb_big_divrem_gmp): Declared.
+ * vm_core.h: add several definitions for
+ the checkmatch instruction.
-Thu Sep 5 06:22:42 2013 Tanaka Akira <akr@fsij.org>
+ * vm_insnhelper.c (check_match): added.
- * bignum.c (bary_divmod_normal): Reduce temporary array allocations.
+ * bootstraptest/test_exception.rb: add a test.
-Thu Sep 5 02:17:06 2013 Tanaka Akira <akr@fsij.org>
+ * test/ruby/test_exception.rb: ditto.
- * bignum.c (rb_big_divrem_normal): Add GC guards.
+Wed Aug 8 05:51:20 2012 Eric Hodel <drbrain@segment7.net>
-Thu Sep 5 00:38:32 2013 Tanaka Akira <akr@fsij.org>
+ * proc.c (method_clone): Added documentation. Patch by Robin Dupret.
+ Fixes #152 on github.
- * bignum.c (rb_big_divrem_normal): New function.
+Tue Aug 7 20:19:29 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * internal.h (rb_big_divrem_normal): Declared.
+ * ext/readline/readline.c (Init_readline): rl_catch_signals=0 returns
+ back. Without this, on FreeBSD9 and readline 6.2 irb can't catch ^C.
+ [Bug #5423]
- * ext/-test-/bignum/div.c: New file.
+Tue Aug 7 20:12:39 2012 Koichi Sasada <ko1@atdot.net>
- * test/-ext-/bignum/test_div.rb: New file.
+ * vm_exec.c, insns.def (leave): solve problems on
+ OPT_CALL_THREADED_CODE.
+ Catch up finish frame structure on OPT_CALL_THREADED_CODE.
-Thu Sep 5 00:08:44 2013 Tanaka Akira <akr@fsij.org>
+ * vm_core.h: add rb_thread_t#retval for temporary space on
+ OPT_CALL_THREADED_CODE.
- * bignum.c (bigdivrem_normal): Removed.
- (bary_divmod_normal): New function.
- (bary_divmod): Use bary_divmod_normal.
- (bigdivrem): Use bary_divmod_normal.
+ * vm.c (th_init): clear rb_thread_t#retval as Qundef.
-Wed Sep 4 23:02:12 2013 Tanaka Akira <akr@fsij.org>
+ * vm_dump.c (rb_vmdebug_debug_print_pre): fix debug print format.
- * bignum.c (bigdivrem): Useless declaration removed.
+Tue Aug 7 11:58:27 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Wed Sep 4 22:56:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/ruby/test_require.rb (TestRequire#test_require_twice): added.
- * numeric.c (NUM_STEP_GET_INF): split from NUM_STEP_SCAN_ARGS(), since
- inf is not used in num_step_size().
+Tue Aug 7 11:35:37 2012 Shugo Maeda <shugo@ruby-lang.org>
-Wed Sep 4 20:22:43 2013 Tanaka Akira <akr@fsij.org>
+ * vm_method.c (rb_redefine_opt_method): use RCLASS_ORIGIN to avoid
+ SEGV when a module-prepended class is refined.
- * bignum.c (bigdivrem_normal): Add assertions.
+Tue Aug 7 10:46:37 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Wed Sep 4 19:18:40 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/ruby/test_file_exhaustive.rb
+ (TestFileExhaustive#test_expand_path*): refactoring. split the method
+ into some chunks of the same kind of tests.
- * internal.h (vm_state_version_t): prefer LONG_LONG to uint64_t.
+Tue Aug 7 00:31:09 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Sep 4 16:28:14 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * class.c (rb_special_singleton_class_of): utility function.
- * internal.h (vm_state_version_t): use uint64_t when it is larger than
- LONG_LONG, and fallback to unsigned long.
+ * vm_eval.c (eval_under): special deal for class variable scope with
+ instance_eval.
-Wed Sep 4 15:37:05 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * vm_eval.c (rb_obj_instance_eval, rb_obj_instance_exec): allow method
+ definition in instance_eval of special constants. [ruby-core:28324]
+ [Bug #2788]
- * enc/trans/utf8_mac-tbl.rb: fix r42789.
- Fix conversion table and logic. [ruby-dev:47680]
+Tue Aug 7 00:23:58 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Sep 4 14:08:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * variable.c (CVAR_LOOKUP): split into helper functions.
- * 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.
+Mon Aug 6 19:15:11 2012 Masaki Suketa <masaki.suketa@nifty.ne.jp>
- [ruby-core:55053] [Feature #8426] [GH-387]
+ * test/win32ole/test_win32ole_variant.rb: setting WIN32OLE.locale
+ to pass some assertion. Thanks to Hiroshi Shirosaki.
+ [ruby-core:46873][Bug #6814]
-Wed Sep 4 11:13:40 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Aug 6 15:54:50 2012 Shugo Maeda <shugo@ruby-lang.org>
- * 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]
+ * internal.h, class.c, eval.c, insns.def: find the appropriate
+ receiver for super called in instance_eval. If such a receiver is
+ not found, raise NoMethodError. [ruby-dev:39772] [Bug #2402]
-Wed Sep 4 11:11:37 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Aug 6 14:54:38 2012 Shugo Maeda <shugo@ruby-lang.org>
- * configure.in (SOLIBS): LIBRUBY_SO also needs linking with gmp, to
- run worker processes in test-all on non-ELF platforms.
+ * include/ruby/ruby.h, eval.c, vm_insnhelper.c: fix typo.
-Tue Sep 3 23:01:41 2013 Kouhei Sutou <kou@cozmixng.org>
+Mon Aug 6 13:13:58 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/rexml/parser/test_tree.rb
- (TestTreeParser::TestInvalid#test_unmatched_close_tag):
- Compute expected value from test value.
+ * vm_eval.c (vm_call_super): since cfp->klass is always class or
+ iclass, no search from method entry.
-Tue Sep 3 22:59:58 2013 Kouhei Sutou <kou@cozmixng.org>
+ * insns.def (defined): now should use klass in the current control
+ frame to search superclass, not me->klass. reported by naruse.
- * 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.
+Mon Aug 6 11:19:19 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Tue Sep 3 22:57:57 2013 Kouhei Sutou <kou@cozmixng.org>
+ * test/etc/test_etc.rb (TestEtc#test_getpwuid): `s' is never set to nil.
- * test/rexml/parser/test_tree.rb: Fix test name to describe test
- content.
+Mon Aug 6 11:08:48 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Tue Sep 3 22:54:46 2013 Kouhei Sutou <kou@cozmixng.org>
+ * test/syslog/test_syslog_logger.rb: skip unless Syslog module is
+ available.
- * 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.
+Mon Aug 6 00:40:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Sep 3 22:03:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/bigdecimal/bigdecimal.c (BigMath_s_log): fix format specifier.
- * string.c (rb_enc_str_new_cstr): new function to create a string from
- the C-string pointer with the specified encoding.
+Mon Aug 6 00:39:24 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Sep 3 21:41:37 2013 Akira Matsuda <ronnie@dio.jp>
+ * include/ruby/ruby.h (NUM2ULONG): optimize by inline as well as
+ NUM2LONG, and cast to unsigned long explicitly for the platforms
+ where SIZEOF_VALUE is larger than SIZEOF_LONG.
- * eval.c (Init_eval): Make Module#include and Module#prepend public
- [Feature #8846]
+ * include/ruby/ruby.h (NUM2SSIZET): fix type to cast.
- * test/ruby/test_module.rb (class TestModule): Test for above
+Sun Aug 5 21:10:36 2012 Narihiro Nakamura <authornari@gmail.com>
-Tue Sep 3 21:35:19 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * gc.c : if ENABLE_VM_OBJSPACE is 1, rest_sweep is not defined.
+ remove unused declarations. [ruby-core:47004] [Bug #6837]
- * thread_pthread.c (sys/dyntune.h): for gettune().
+Sun Aug 5 19:31:57 2012 Narihiro Nakamura <authornari@gmail.com>
- * thread_pthread.c (hpux_attr_getstackaddr): fix missing *.
- [ruby-core:56983] [Feature #8793]
+ * gc.c: just move functions and so on. I don't touch any internal
+ implementation.
-Tue Sep 3 20:12:46 2013 Tanaka Akira <akr@fsij.org>
+Sun Aug 5 13:22:29 2012 NARUSE, Yui <naruse@ruby-lang.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.
+ * configure.in: use gcc-4.2 prior to clang, gcc, and cc if exist for
+ the use of Snow Leopard's old clang. see also r36594, r36610, r36611.
- * internal.h (rb_str2big_gmp): Declared.
+Sun Aug 5 06:55:10 2012 Tadayoshi Funaba <tadf@dotrb.org>
-Tue Sep 3 19:44:40 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * ext/date/date_{core,strftime}.c: [ruby-core:46990].
- * ext/win32/lib/win32/registry.rb (Win32::Registry#values): added.
- [Feature #7763] [ruby-core:51783]
+Sat Aug 4 22:56:20 2012 Narihiro Nakamura <authornari@gmail.com>
-Tue Sep 3 18:26:00 2013 Akinori MUSHA <knu@iDaemons.org>
+ * gc.c: use inline functions instead of macros, and close up
+ related codes for the profiler.
- * misc/inf-ruby.el (inf-ruby-keys, run-ruby): Add magic autoload
- comments.
+Sat Aug 4 20:37:56 2012 Narihiro Nakamura <authornari@gmail.com>
- * misc/rdoc-mode.el (rdoc-mode): Ditto.
+ * gc.c (gc_mark_children): use gc_mark_ptr instead of marking
+ a object directly.
- * misc/ruby-electric.el (ruby-electric-mode): Ditto.
+Sat Aug 4 10:02:03 2012 Shugo Maeda <shugo@ruby-lang.org>
- * misc/ruby-style.el (ruby-style-c-mode): Ditto.
+ * test/ruby/test_alias.rb (test_super_in_aliased_module_method):
+ add a test case for [ruby-dev:46028], which fails in 1.8.
-Tue Sep 3 17:06:15 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+Sat Aug 4 01:56:06 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/ruby/test_rubyoptions.rb
- (TestRubyOptions::SEGVTest::ExpectedStderr): the URL was changed at
- r42800.
+ * vm_insnhelper.c (vm_search_normal_superclass): no longer needs
+ receiver, klass is always unique in the ancestors now.
-Tue Sep 3 14:48:25 2013 Zachary Scott <e@zzak.io>
+Sat Aug 4 01:27:40 2012 Shugo Maeda <shugo@ruby-lang.org>
- * lib/thread.rb: [DOC] CV#wait typo by @avdi [Fixes GH-386]
- https://github.com/ruby/ruby/pull/386
+ * insns.def (invokesuper): reverted r36612 so that super in an
+ aliased method will not call the same method.
-Tue Sep 3 14:37:53 2013 Zachary Scott <e@zzak.io>
+Fri Aug 3 19:26:10 2012 Shugo Maeda <shugo@ruby-lang.org>
- * error.c: [DOC] Update bug tracker url by @ScotterC [Fixes GH-390]
- https://github.com/ruby/ruby/pull/390
+ * insns.def (invokesuper): don't skip the same class. instead, use
+ rb_method_entry_get_with_omod() to avoid infinite loop when
+ super is used with refinements. [ruby-core:30450] [Bug #3351]
-Tue Sep 3 12:45:23 2013 Tanaka Akira <akr@fsij.org>
+Fri Aug 3 19:21:19 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (rb_str2big_poweroftwo): New function.
- (rb_str2big_normal): Ditto.
- (rb_str2big_karatsuba): Ditto.
+ * configure.in: use clang prior to gcc only when self-compiling on
+ darwin. search default compilers on other platforms. [Bug #6816]
- * internal.h (rb_str2big_poweroftwo): Declared.
- (rb_str2big_normal): Ditto.
- (rb_str2big_karatsuba): Ditto.
+Fri Aug 3 17:25:49 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * ext/-test-/bignum/str2big.c: New file.
+ * configure.in: move RUBY_MINGW32 after AC_PROG_CC.
+ RUBY_MINGW32 uses AC_TRY_CPP and it sets CC and CPP. [Bug #6816]
- * test/-ext-/bignum/test_str2big.rb: New file.
+ * configure.in: don't use AC_PROG_CC in AS_CASE.
- * ext/-test-/bignum/depend: Add the dependency for str2big.c.
+Fri Aug 3 17:21:52 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Sep 3 12:09:08 2013 Tanaka Akira <akr@fsij.org>
+ * test/runner.rb: get rid of loading previously installed gems.
+ [ruby-dev:46025]
- * process.c (rb_clock_gettime): Support times() based monotonic clock.
- (rb_clock_getres): Ditto.
+Fri Aug 3 16:40:01 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
-Tue Sep 3 12:03:02 2013 Tanaka Akira <akr@fsij.org>
+ * .travis.yml (notifications): [experimental] IRC notifications.
- * bignum.c (str2big_scan_digits): Extracted from rb_cstr_to_inum.
+Thu Aug 2 20:32:29 2012 Shugo Maeda <shugo@ruby-lang.org>
-Tue Sep 3 11:23:57 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * eval.c (rb_mod_using): new method Module#using. [experimental]
- * 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.
+ * eval.c (rb_mod_refine): new method Module#refine. [experimental]
-Tue Sep 3 11:00:28 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * eval.c (f_using): new method Kernel#using. [experimental]
- * win32/win32.c (do_select): constify timeout.
+Thu Aug 2 20:08:02 2012 Shugo Maeda <shugo@ruby-lang.org>
- * win32/win32.c (rb_w32_select_with_thread): constify 10ms wait and
- 0ms wait structs.
+ * class.c, insns.def, method.h, proc.c, vm.c, vm_core.h, vm_eval.c,
+ vm_insnhelper.c, vm_insnhelper.h, vm_method.c: add klass to
+ rb_control_frame_t to implement super correctly.
-Tue Sep 3 10:03:42 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+Thu Aug 2 13:23:08 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * 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".
+ * configure.in (AC_PROG_CC): AC_PROG_CC tries clang at first on
+ darwin. [Bug #6816]
-Tue Sep 3 08:20:46 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Thu Aug 2 11:39:25 2012 Narihiro Nakamura <authornari@gmail.com>
- * 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]
+ * gc.c: return true or false. Patch by Dirkjan Bussink. [Bug #6821]
-Tue Sep 3 07:49:25 2013 Akinori MUSHA <knu@iDaemons.org>
+ * test/ruby/test_gc.rb: add test-case for this bug.
- * 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.
+Thu Aug 2 10:51:12 2012 Martin Bosslet <Martin.Bosslet@gmail.com>
- * test/ruby/test_float.rb (TestFloat#test_num2dbl): Revert.
+ * ext/openssl/lib/openssl/digest.rb
+ test/openssl/test_digest.rb: Add Digest module function to OpenSSL
+ module and test it. Patch provided by Eric Hodel.
+ [ruby-core:46908][Feature #6819]
- * test/ruby/test_numeric.rb (TestNumeric#test_step): Fix test
- cases for the above change.
+Wed Aug 1 22:29:12 2012 Benoit Daloze <eregontp@gmail.com>
-Tue Sep 3 07:39:58 2013 Tanaka Akira <akr@fsij.org>
+ * ext/digest/digest.c (hexencode_str_new): return an ASCII string
- * bignum.c (bytes_2comp): Define it only for little endian
- environment.
+ * test/digest: tests for all kind of digests encodings
+ [ruby-core:46792][Bug #6799]
-Tue Sep 3 07:31:29 2013 Akinori MUSHA <knu@iDaemons.org>
+Wed Aug 1 05:50:53 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
- * numeric.c (NUM_STEP_SCAN_ARGS): Numeric#step should raise
- TypeError if a non-numeric parameter is given.
+ * test/ruby/test_rubyoptions.rb (TestRubyOptions#test_encoding):
+ Fix test_encoding failure on Windows.
+ With chcp 65001, 1252 and 437, test_encoding failed. Test result
+ depends on locale because LANG environment variable doesn't affect
+ locale on Windows.
+ [ruby-core:46872] [Bug #6813]
- * test/ruby/test_float.rb (TestFloat#test_num2dbl): Allow nil as
- step, as with the keyword argument.
+Wed Aug 1 00:33:19 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/ruby/test_numeric.rb (TestNumeric#test_step): Add tests for
- nil as step or limit.
+ * class.c (include_class_new): fix duplication of prepended module.
+ since m_tbl of prepended module is always zero, copy from its
+ copy iclass of original.
-Tue Sep 3 07:28:49 2013 Tanaka Akira <akr@fsij.org>
+Tue Jul 31 18:22:34 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * 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.
+ * variable.c (classname): tell if found name is permanent. search
+ tmp_classpath only if class id is set. [ruby-core:42865][Bug #6078]
-Tue Sep 3 03:17:26 2013 Koichi Sasada <ko1@atdot.net>
+ * variable.c (rb_class_path): duplicate found temporary path.
- * 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.
+ * variable.c (rb_set_class_path_string, rb_set_class_path): set class
+ id to find classpath.
- * test/ruby/test_super.rb: add a test for above.
+Tue Jul 31 10:36:12 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-Mon Sep 2 23:46:29 2013 Akinori MUSHA <knu@iDaemons.org>
+ * ext/psych/lib/psych.rb: updated to released version.
- * 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]
+ * ext/psych/psych.gemspec: ditto
- * numeric.c (num_step): Optimize for infinite loop.
+Tue Jul 31 06:18:06 2012 Eric Hodel <drbrain@segment7.net>
-Mon Sep 2 22:55:59 2013 Tanaka Akira <akr@fsij.org>
+ * time.c (time_sec): Remove extra wording about leap seconds and refer
+ directly to Wikipedia's leap second page for further information.
+ [Bug #6749]
- * bignum.c (ISDIGIT): Unused macro removed.
+Mon Jul 30 23:01:47 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Mon Sep 2 22:49:15 2013 Tanaka Akira <akr@fsij.org>
+ * lib/rubygems/platform.rb (Gem::Platform#initialize): Support pattern
+ like x86_64-netbsd6.99.7.
- * bignum.c (str2big_poweroftwo): Extracted from rb_cstr_to_inum.
- (str2big_normal): Ditto.
- (str2big_karatsuba): Ditto.
+Mon Jul 30 21:00:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Sep 2 14:39:29 2013 Akinori MUSHA <knu@iDaemons.org>
+ * variable.c (find_class_path): no retry when preferred is given.
- * ruby.c (Process#setproctitle): [DOC] Fix and improve rdoc.
+ * variable.c (classname): if classid is set try it to find full
+ qualified class path, and then try arbitrary class path. try
+ tmp_classpath at last even if enclosing namespace is anonymous.
+ fix r36574. [ruby-core:42865][Bug #6078]
- * ruby.c (Process#argv0): [DOC] Improve rdoc.
+ * variable.c (rb_set_class_path_string, rb_set_class_path): set
+ tmp_classpath instead of classpath if the name is not permanent.
-Mon Sep 2 14:15:00 2013 Kenta Murata <mrkn@cookpad.com>
+Mon Jul 30 14:24:20 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * NEWS: fix description of number literal suffixes.
+ * variable.c: store anonymous class path in tmp_classpath but not in
+ classpath. [ruby-core:42865][Bug #6078]
-Mon Sep 2 14:01:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+Mon Jul 30 13:11:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/rake/test_rake_rules.rb: add space after string literal to
- prevent conflict with string options syntax "foo"opts
+ * configure.in (DLDFLAGS): on Darwin, deprecate -flat_namespace to get
+ rid of huge imported symbols table.
- * test/rss/rss-assertions.rb: ditto
+ * configure.in (LIBRUBY_RELATIVE): libruby_so is not made when
+ disable-shared, so no absolute path is used for it and executable
+ file is runnable anywhere.
-Mon Sep 2 12:28:38 2013 Tanaka Akira <akr@fsij.org>
+Mon Jul 30 01:30:10 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
- * test/ruby/test_bignum.rb (test_interrupt_during_to_s): Disable it
- when GMP is used.
+ * common.mk: add a dependency. [ruby-core:46741] [Bug #6789]
-Mon Sep 2 07:02:10 2013 Tanaka Akira <akr@fsij.org>
+Sun Jul 29 15:44:47 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
- * bignum.c (Init_Bignum): Define Bignum::GMP_VERSION when GMP is used.
+ * thread.c (thread_create_core): hide th->async_errinfo_mask_stack from
+ ObjectSpace.each_object. refix of r36539.
-Mon Sep 2 01:46:14 2013 Tanaka Akira <akr@fsij.org>
+Sun Jul 29 23:57:27 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (big2str_generic): Reduce arguments.
- (big2str_gmp): Ditto.
- (rb_big2str1): Follow the above change.
+ * ext/socket/option.c (inet_ntop): use rb_w32_inet_ntop, instead of
+ inet_ntop directly, which is unavailable on older version Windows.
-Mon Sep 2 00:08:08 2013 Tanaka Akira <akr@fsij.org>
+ * win32/win32.c (rb_w32_inet_ntop): type should be const.
- * 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.
+Sun Jul 29 14:20:34 2012 Kazuki Tsujimoto <kazuki@callcc.net>
-Sun Sep 1 23:30:47 2013 Tanaka Akira <akr@fsij.org>
+ * thread.c (Init_Thread): does not need to set klass
+ explicitly.
- * bignum.c (GMP_BIG2STR_DIGITS): New constant.
- (big2str_gmp): New function.
- (rb_big2str1): Use big2str_gmp for big bignums.
+Sun Jul 29 06:21:04 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
- * internal.h (rb_big2str_gmp): Declared.
+ * win32/win32.c: suppress warning redeclared on mingw64.
+ *_s functions are declared if MINGW_HAS_SECURE_API is defined.
+ Follow up r36556.
- * ext/-test-/bignum/big2str.c (big2str_gmp): New method.
+Sun Jul 29 00:28:46 2012 Narihiro Nakamura <authornari@gmail.com>
-Sun Sep 1 22:37:51 2013 Tanaka Akira <akr@fsij.org>
+ * gc.c: remove unused initialization.
- * bignum.c (bary_mul_gmp): Use mpz_init and mpz_clear instead of
- mpz_inits and mpz_clears.
- Older GMP don't have them.
+Sat Jul 28 16:26:09 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-Sun Sep 1 21:17:54 2013 Tanaka Akira <akr@fsij.org>
+ * win32/win32.c (gmtime_r): use _gmtime64_s() with x86_64-w64-mingw32.
- * test/net/http/test_http.rb (test_bind_to_local_port): Choose an open
- port more reliably.
+ * win32/win32.c (localtime_r): use _localtime64_s() with
+ x86_64-w64-mingw32. Since FileTimeToSystemTime() seems not work with
+ large value under x64. Mingw-w64 doesn't have these declaration.
+ [ruby-core:46780] [Bug #6794]
-Sun Sep 1 20:32:40 2013 Tanaka Akira <akr@fsij.org>
+Fri Jul 27 18:25:51 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * 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.
+ * io.c (rb_io_check_io): make public.
- * internal.h (rb_big2str_poweroftwo): Declared.
- (rb_big2str_generic): Ditto.
+ * process.c (check_exec_redirect): try conversion to IO on redirect
+ parameters. [ruby-core:44181] [Bug #6269]
- * ext/-test-/bignum/big2str.c: New file.
+Fri Jul 27 17:58:12 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/-ext-/bignum/test_big2str.rb: New file.
+ * configure.in (RUBY_CPPOUTFILE): get rid of variable conflict so
+ CPPFLAGS is not duplicated. [ruby-core:43097] [Bug #6119]
-Sun Sep 1 15:21:21 2013 Tanaka Akira <akr@fsij.org>
+Fri Jul 27 12:12:36 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * bignum.c (big2str_2bdigits): Renamed from big2str_orig.
+ * win32/mkexports.rb: should not export DllMain().
+ reported by luis at [ruby-core:46743] [Bug #6790], solved by
+ Heesob Park, and confirmed by nobu.
-Sun Sep 1 13:02:24 2013 Tanaka Akira <akr@fsij.org>
+Thu Jul 26 14:51:29 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
- * bignum.c: Remove BITSPERDIG >= INT_MAX test. The static assertion,
- SIZEOF_BDIGITS <= sizeof(BDIGIT) is enough.
+ * test/net/http/test_https.rb (TestNetHTTPS#test_session_reuse):
+ localhost is not (always) 127.0.0.1. Don't expect that.
-Sun Sep 1 11:38:26 2013 Tanaka Akira <akr@fsij.org>
+Thu Jul 26 07:18:38 2012 <kanemoto@ruby-lang.org>
- * bignum.c (maxpow_in_bdigit): Removed.
+ * ext/json/fbuffer/fbuffer.h: avoid compilation error on AIX by
+ -ansi -std=iso9899:199409 (r36038). [ruby-core:46744] [Bug #6791].
-Sun Sep 1 10:30:42 2013 Tanaka Akira <akr@fsij.org>
+Thu Jul 26 00:42:23 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
- * numeric.c (rb_fix_bit_length): Moved from bignum.c.
+ * thread.c (thread_create_core, Init_Thread): hide
+ th->async_errinfo_queue and th->async_errinfo_mask_stack from
+ ObjectSpace.each_object.
-Sun Sep 1 09:55:45 2013 Tanaka Akira <akr@fsij.org>
+Wed Jul 25 17:41:05 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * internal.h (bit_length): Moved from bignum.c.
- (nlz_int): Ditto.
- (nlz_long): Ditto.
- (nlz_long_long): Ditto.
- (nlz_int128): Ditto.
+ * complex.c, rational.c: compatible marshal loader for compatibilities
+ with 1.8. [ruby-core:45775] [Bug #6625]
-Sun Sep 1 03:32:22 2013 Tanaka Akira <akr@fsij.org>
+Wed Jul 25 17:17:05 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (bit_length): Renamed from bitsize.
+ * atomic.h: prefer GCC atomic builtins than Windows APIs, if possible,
+ since they are generic.
-Sun Sep 1 00:07:09 2013 Tanaka Akira <akr@fsij.org>
+Wed Jul 25 11:16:57 2012 Eric Hodel <drbrain@segment7.net>
- * bignum.c (rb_big_bit_length): New method.
- (rb_fix_bit_length): Ditto.
- [ruby-core:56247] [Feature #8700]
+ * lib/net/.document: Removed. All files in net/ should be included in
+ RDoc.
-Sat Aug 31 22:18:29 2013 Tanaka Akira <akr@fsij.org>
+Wed Jul 25 10:00:23 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * process.c (rb_clock_getres): New method.
- (timetick2dblnum_reciprocal): New function.
+ * test/testunit/test_redefinition.rb: broken class/method names.
- * configure.in: Check clock_getres.
+Wed Jul 25 09:26:32 2012 NARUSE, Yui <naruse@ruby-lang.org>
- [ruby-core:56780] [Feature #8809] accepted as a CRuby feature at
- DevelopersMeeting20130831Japan
- https://bugs.ruby-lang.org/projects/ruby/wiki/DevelopersMeeting20130831Japan
+ * lib/cgi/html.rb: Use << instead of +=.
+ `a += b` is syntax sugar of `a = a + b`; it creates a new string
+ object. `a << b` is concatenation and doesn't create new object.
-Sat Aug 31 21:02:07 2013 Tanaka Akira <akr@fsij.org>
+Wed Jul 25 09:16:26 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * 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.
+ * lib/cgi/html.rb (element_init): suppress redefine warning.
+ Don't define methods if they are already defined.
- * configure.in: Detect GMP.
+Wed Jul 25 09:05:38 2012 Eric Hodel <drbrain@segment7.net>
- [ruby-core:56658] [Feature #8796]
+ * lib/net/http.rb: Added SSL session reuse across connections for a
+ single instance to speed up connection. [Feature #5341]
+ * NEWS: ditto
+ * test/net/http/test_https.rb: Tests for #5341
-Sat Aug 31 15:03:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+Wed Jul 25 06:54:24 2012 Eric Hodel <drbrain@segment7.net>
- * compile.c (NODE_MATCH3): pass CALL_INFO to opt_regexpmatch2
+ * doc/re.rdoc: Fix spelling
- * insns.def (opt_regexpmatch2): use CALL_SIMPLE_METHOD to call =~ if
- the receiver is not a T_STRING [Bug #8847] [ruby-core:56916]
+Wed Jul 25 06:49:12 2012 Eric Hodel <drbrain@segment7.net>
-Sat Aug 31 14:07:11 2013 Tanaka Akira <akr@fsij.org>
+ * re.c (rb_reg_s_last_match): Update $~ to reference Regexp
+ documentation about "special global variables". [Bug #6723]
- * lib/securerandom.rb (random_bytes): Use Process.clock_gettime.
+Wed Jul 25 06:28:56 2012 Eric Hodel <drbrain@segment7.net>
-Sat Aug 31 00:25:15 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * iseq.c: Added documentation. Patch by David Albert. [Bug #6785]
- * include/ruby/encoding.h (rb_{ascii8bit,utf8,usascii}_encindex): get
- rid of conflict with macros defined in internal.h.
+Wed Jul 25 03:05:06 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-Fri Aug 30 22:37:57 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * parse.y: added symbols and qsymbols productions for %i and %I
+ support. %i{ .. } returns a list of symbols without interpolation,
+ %I{ .. } returns a list of symbols with interpolation. Thanks to
+ Josh Susser for inspiration of this feature. [Feature #4985]
- * thread_pthread.c (native_thread_init_stack): wait the creator thread
- to fill machine stack info, if get_stack_of() is available.
+ * ext/ripper/eventids2.c: added ripper events for %i and %I.
- * thread_pthread.c (native_thread_create): fill the created thread
- stack info after starting, if get_stack_of() is available.
+ * test/ripper/test_parser_events.rb: ripper tests
- * thread_pthread.c (native_thread_create): define attr only if it is
- used, and merge pthread_create() calls.
+ * test/ripper/test_scanner_events.rb: ditto
- * thread_pthread.c (get_main_stack): separate function to get stack of
- main thread.
+ * test/ruby/test_array.rb: test for %i and %I behavior
-Thu Aug 29 18:05:33 2013 Koichi Sasada <ko1@atdot.net>
+Tue Jul 24 23:34:43 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
- * struct.c (rb_struct_define_without_accessor_under): added.
- This function is similar to rb_define_class_under() against
- rb_define_class().
+ * include/ruby/win32.h (rb_w32_pow): add new function.
+ We use powl() instead of broken pow() for x64-mingw32. This workaround
+ fixes test failures related to floating point numeric.
+ [ruby-core:46686] [Bug #6784]
- * include/ruby/intern.h: add a declaration of this function.
+Tue Jul 24 15:01:24 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Thu Aug 29 17:03:10 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * win32/win32.c (rb_w32_socket, rb_w32_socketpair): remember the family
+ in the high word of socklist value.
- * 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]
+ * win32/win32.c (overlapped_socket_io, recvmsg, sendmsg, setfl): follow
+ above changes.
-Thu Aug 29 05:35:58 2013 Eric Hodel <drbrain@segment7.net>
+ * win32/win32.c (rb_w32_getsockname): set remembered family to the
+ argument when OS's function fails.
- * 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.
+Tue Jul 24 12:35:13 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Thu Aug 29 02:40:45 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+ * test/ruby/test_dir_m17n.rb: remove a garbage.
- * ext/psych/lib/psych/scalar_scanner.rb: invalid floats should be
- treated as strings.
- https://github.com/tenderlove/psych/issues/156
+ * test/ruby/test_dir_m17n.rb: convert from ascii-8bit to other encoding
+ with 8bit bytes always fails.
- * test/psych/test_string.rb: test for change
+Tue Jul 24 12:32:18 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Wed Aug 28 17:20:07 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/ruby/test_dir_m17n.rb: sorry, typo.
- * 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]
+Tue Jul 24 12:13:26 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Wed Aug 28 11:24:20 2013 Michal Rokos <michal@rokos.cz>
+ * test/ruby/test_dir_m17n.rb: refactoring. RE should be in the left side
+ of the =~ operator, and compare the result with nil is meaningless.
- * configure.in (sys/pstat.h): fix missing header check for
- missing/setproctitle.c on HP-UX. [ruby-core:56644] [Bug #8792]
+Tue Jul 24 11:35:20 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Wed Aug 28 04:54:33 2013 Eric Hodel <drbrain@segment7.net>
+ * test/ruby/test_pack.rb (test_pack_unpack_M): was redefined
+ accidentally.
- * ext/openssl/ossl_ssl.c (ossl_ssl_read): Replace duplicate
- wait_writable with wait_readable.
+Tue Jul 24 09:31:18 2012 Eric Hodel <drbrain@segment7.net>
-Tue Aug 27 17:18:40 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/rubygems: Updated to RubyGems 1.8.24, a bugfix release.
- * lib/timeout.rb (Timeout#timeout): skip rescue clause only when no
- exception class is given.
+Tue Jul 24 08:30:15 2012 Luis Lavena <luislavena@gmail.com>
-Tue Aug 27 17:02:58 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/ruby/test_dir_m17n.rb (create_and_check_raw_file_name): add new
+ helper method to ease encoding testing. Patch by Oleg Sukhodolsky.
+ [ruby-core:46589][Bug #6765]
- * 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]
+ * test/ruby/test_dir_m17n.rb (test_filename_extutf8): use filesystem
+ encoding when reading entries and comparing.
-Tue Aug 27 17:02:33 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/ruby/test_dir_m17n.rb (test_filename_utf8_raw_name): removed.
- * io.c (copy_stream_body): move common open flags.
+ * test/ruby/test_dir_m17n.rb (test_filename_utf8_raw_jp_name): split test.
-Tue Aug 27 16:56:50 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Jul 24 08:09:30 2012 Luis Lavena <luislavena@gmail.com>
- * enumerator.c (enumerator_size): use rb_check_funcall() instead of
- respond_to? and call.
+ * test/win32ole/test_win32ole_method.rb (is_ruby64?): Correct platform
+ used to identify mingw-w64 (x64-mingw32). Patch by Hiroshi Shirosaki.
+ [ruby-core:46651][Bug #6782]
- * enumerator.c (enumerator_each): ensure that argument array size
- does not overflow at appending.
+Tue Jul 24 07:22:58 2012 Eric Hodel <drbrain@segment7.net>
-Tue Aug 27 16:46:05 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * time.c (time_sec): Updated description of leap seconds for accuracy.
+ Based on patch by Marcus Stollsteimer. [Bug #6749]
- * array.c (rb_ary_index, rb_ary_rindex): use optimized equality to
- improve performance. [Feature #8820]
+Tue Jul 24 07:03:11 2012 Eric Hodel <drbrain@segment7.net>
- * vm_insnhelper.c (rb_equal_opt): optimized equality function.
+ * string.c (rb_str_sub): Fixed wording of documentation to match the
+ replacement operation. Minor cleanup of markup. [Bug #6719]
+ * string.c (rb_str_sub_bang): Minor wording change for clarity, minor
+ cleanup of markup.
-Tue Aug 27 16:11:05 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Jul 23 23:58:40 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * vm_insnhelper.c (opt_eq_func): use RBASIC_CLASS() instead of HEAP_CLASS_OF().
+ * enc/Makefile.in (TARGET_NAME, TARGET_ENTRY): needed for EXTDLDFLAGS
+ on some platforms. [ruby-core:46600] [Bug #6768]
- * 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.
+ * enc/depend: no longer needs tweaking DLDFLAGS for TARGET names.
-Tue Aug 27 16:08:26 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Jul 23 22:48:19 2012 Tanaka Akira <akr@fsij.org>
- * vm_eval.c (rb_check_funcall, rb_check_funcall_with_hook): constify
- argv.
+ * lib/open-uri.rb: use respond_to? to test Tempfile.
+ [ruby-dev:45995] [Bug #6781] reported by hsbt (Hiroshi SHIBATA).
-Tue Aug 27 13:03:33 2013 Koichi Sasada <ko1@atdot.net>
+Mon Jul 23 14:43:34 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/stringio/stringio.c (strio_read_nonblock): declare local
- variables at the first of function.
+ * configure.in (LIBPATHENV): LIBPATH is used on AIX, but not
+ SHLIB_PATH which was carelessly copied from HP/UX. suggested by
+ Perry Smith at [ruby-core:46397]. [Bug #6728]
-Tue Aug 27 11:51:37 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+Mon Jul 23 01:55:08 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
- * enumerator.c: Allow Enumerator size argument to be any callable.
- Patch by Avdi Grimm. [bug #8641] [ruby-core:56032] [fix GH-362]
+ * test/uri/test_generic.rb (URI#test_find_proxy): add tests with
+ empty *_proxy env variables.
- * test/ruby/test_enumerator.rb: Test for above
+Mon Jul 23 01:47:26 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-Tue Aug 27 11:46:31 2013 Koichi Sasada <ko1@atdot.net>
+ * test/uri/test_generic.rb (URI#with_env): unset proxy related env
+ variables. [Bug #6774]
- * gc.c (gc_profile_clear): do rest_sweep() before clearing
- profile.current_record.
+ * test/uri/test_generic.rb (URI#test_find_proxy): fix failures
+ when proxy related env variables already set. [Bug #6774]
-Tue Aug 27 07:35:05 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+Sun Jul 22 23:58:48 2012 NARUSE, Yui <naruse@ruby-lang.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
+ * thread.c (rb_threadptr_execute_interrupts_common): increase
+ running_time_us on THREAD_TO_KILL like on THREAD_RUNNABLE.
+ This cause not to switch from a thread which is to be killed
+ on FreeBSD and Mac OS X. see also the test.
+ This issue maybe exist for long time but happens after r36430.
-Tue Aug 27 05:24:34 2013 Eric Hodel <drbrain@segment7.net>
+Sat Jul 21 06:21:45 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * lib/rubygems: Import RubyGems 2.1.0 Release Candidate
- * test/rubygems: ditto.
+ * lib/net/http.rb: fixes for r36476. [Feature #6546]
+ http://u64.rubyci.org/~chkbuild/ruby-trunk/log/20120720T030101Z.diff.html.gz
-Mon Aug 26 16:24:58 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/net/http.rb (Net::HTTP.newobj): return back for compatibility.
- * parse.y (parser_nextc): warn carriage return in middle of line.
- [ruby-core:56240] [Feature #8699]
+ * lib/net/http.rb (Net::HTTP.new): set default_port if proxy port is
+ not given.
-Mon Aug 26 15:27:39 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/net/http.rb (Net::HTTP#initialize): ditto.
- * lib/timeout.rb (Timeout#timeout): should not be caught by rescue
- clause. [Bug #8730]
+ * lib/net/http.rb (Net::HTTP#proxy?): return true or false.
-Mon Aug 26 14:44:26 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/net/http.rb (Net::HTTP#proxy_address): check proxy_uri is not nil.
- * array.c (rb_ary_splice): use RARRAY_PTR_USE() without WB because
- there are not new relations.
+ * lib/net/http.rb (Net::HTTP#proxy_port): ditto.
- * enum.c (enum_sort_by): ditto.
+Sat Jul 21 23:12:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * struct.c (setup_struct): use RARRAY_RAWPTR().
+ * thread_pthread.c (ruby_init_stack): STACK_GROW_DIR_DETECTION is
+ necessary on platforms with unknown stack direction. [Bug #6761]
- * vm_eval.c (yield_under): ditto.
+Sat Jul 21 15:13:42 2012 Shota Fukumori <sorah@tubusu.net>
- * ext/pathname/pathname.c (path_entries): use RARRAY_AREF().
+ * lib/test/unit/testcase.rb (method_added): refactoring.
- * ext/pathname/pathname.c (path_s_glob): ditto.
+Sat Jul 21 14:06:41 2012 Shota Fukumori <sorah@tubusu.net>
-Mon Aug 26 13:11:10 2013 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+ * lib/test/unit/testcase.rb: warn when test_* method is redefined.
+ Patch by mame (Yusuke Endoh). [Feature #2643] [ruby-core:27790]
- * array.c (ary_ensure_room_for_push): fix typo in r42658.
+ * test/testunit/test_redefinition.rb: Test for above.
-Mon Aug 26 12:37:10 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/testunit/test4test_redefinition.rb: Ditto.
- * template/sizes.c.tmpl: generate automatically by extracting
- RUBY_CHECK_SIZEOF from configure.in.
+Sat Jul 21 08:41:14 2012 Eric Hodel <drbrain@segment7.net>
-Mon Aug 26 10:16:59 2013 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+ * lib/logger.rb: Updated example in Logger comment to match other
+ examples and fixed a bug. Patch by Marcus Stollsteimer.
+ [Bug #6759]
- * process.c (gcd_timetick_int): Renamed from gcd_timtick_int.
+Fri Jul 20 17:20:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Aug 25 21:02:15 2013 Tanaka Akira <akr@fsij.org>
+ * random.c (rb_random_real): refine error message.
- * sizes.c (Init_sizes): Define the size of clock_t.
+Fri Jul 20 11:03:17 2012 Eric Hodel <drbrain@segment7.net>
-Sun Aug 25 01:47:47 2013 Tanaka Akira <akr@fsij.org>
+ * NEWS: Updated net/http for automatic proxy detection (#6546) and
+ automatic gzip and deflate compression (#6492, #6494).
- * bignum.c (BARY_SHORT_MUL): Renamed from BARY_MUL1.
- (bary_short_mul): Renamed from bary_mul1.
+Fri Jul 20 10:55:38 2012 Eric Hodel <drbrain@segment7.net>
-Sat Aug 24 10:35:09 2013 Tanaka Akira <akr@fsij.org>
+ * lib/net/http.rb: Net::HTTP now automatically detects and uses
+ proxies from the environment. A proxy may also be specified as
+ before.
- * process.c (rb_clock_gettime): The emulated clock names changed.
+ Net::HTTP::Proxy still creates anonymous classes, but these classes
+ are only used to store configuration information. When an HTTP
+ instance is created the configuration is now copied.
-Fri Aug 23 22:22:07 2013 Tanaka Akira <akr@fsij.org>
+ Additionally, Net::HTTP::ProxyDelta is no longer used by Net::HTTP
- * process.c (rb_clock_gettime): Add a cast to fix compile error by
- -Werror,-Wshorten-64-to-32.
+ [Feature #6546]
+ * lib/open-uri.rb: Moved URI::Generic#find_proxy to uri/generic.
+ * lib/uri/generic.rb: Imported find_proxy from open-uri.
+ * test/open-uri/test_open-uri.rb: Moved proxy-discovery tests to URI.
+ * test/uri/test_generic.rb: Imported proxy-discovery tests from
+ open-uri.
+ * test/net/http/test_http.rb: Added tests for proxy behavior.
-Fri Aug 23 22:12:13 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Jul 20 09:34:11 2012 Eric Hodel <drbrain@segment7.net>
- * process.c (rb_intern): no symbol cache while initialization.
+ * test/socket/test_socket.rb: Ignore IPv6 unique local addresses on OS
+ X (iCloud Back to my Mac addresses) for test_udp_socket since they do
+ not act as loopback addresses. [Bug #6692]
-Fri Aug 23 22:07:45 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Jul 20 09:32:14 2012 Eric Hodel <drbrain@segment7.net>
- * configure.in (clock_t): needs time.h.
+ * ext/socket/raddrinfo.c (addrinfo_ipv6_unique_local_p): Added
+ Addrinfo#ipv6_unique_local? to detect RFC 4193 unique local
+ addresses. Part of #6692
+ * ext/socket/rubysocket.h: Add IN6_IS_ADDR_UNIQUE_LOCAL macro if
+ missing.
+ * test/socket/test_addrinfo.rb: Test for ipv6_unique_local?
-Fri Aug 23 21:37:28 2013 Tanaka Akira <akr@fsij.org>
+Fri Jul 20 07:40:32 2012 Eric Hodel <drbrain@segment7.net>
- * process.c (reduce_factors): New function.
- (timetick2dblnum): Use reduce_factors.
- (timetick2integer): Ditto.
- (make_clock_result): Follow the above change.
- (rb_clock_gettime): Ditto.
+ * lib/net/http/response.rb: Automatically inflate gzip and
+ deflate-encoded response bodies. [Feature #6942]
+ * lib/net/http/generic_request.rb: Automatically accept gzip and
+ deflate content-encoding for requests. [Feature #6494]
+ * lib/net/http/request.rb: Updated documentation for #6494.
+ * lib/net/http.rb: Updated documentation for #6492 and #6494, removed
+ Content-Encoding handling now present in Net::HTTPResponse.
+ * test/net/http/test_httpresponse.rb: Tests for #6492
+ * test/net/http/test_http_request.rb: Tests for #6494
+ * test/open-uri/test_open-uri.rb (test_content_encoding): Updated test
+ for automatic content-encoding handling.
-Fri Aug 23 21:00:55 2013 Tanaka Akira <akr@fsij.org>
+Fri Jul 20 03:42:54 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * 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.
+ * thread_pthread.c: use #ifdef, not #if.
-Fri Aug 23 20:50:40 2013 Tanaka Akira <akr@fsij.org>
+Thu Jul 19 15:08:40 2012 Koichi Sasada <ko1@atdot.net>
- * 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.
+ * thread.c (rb_thread_s_control_interrupt,
+ rb_thread_s_check_interrupt): added for
+ Thread.control_interrupt and Thread.check_interrupt.
+ See details on rdoc.
+ I'll make an ticket for this feature.
-Fri Aug 23 18:39:04 2013 Koichi Sasada <ko1@atdot.net>
+ * test/ruby/test_thread.rb: add a test for Thread.control_interrupt.
- * array.c (ary_make_shared): shared ary as shady. Need more effort to
- make it normal object.
+ * thread.c (rb_threadptr_raise): make a new exception object
+ even if argc is 0.
- * array.c (rb_ary_modify): use RARRAY_PTR_USE() without WB because
- there are not new relations.
+ * thread.c (rb_thread_kill): kill thread immediately if target thread
+ is current thread.
- * array.c (ary_ensure_room_for_unshift): use RARRAY_RAWPTR() because
- there are not new relations.
+ * vm_core.h (RUBY_VM_CHECK_INTS_BLOCKING): added.
+ CHECK_INTS while/after blocking operation.
-Fri Aug 23 11:25:57 2013 Koichi Sasada <ko1@atdot.net>
+ * vm_core.h (RUBY_VM_CHECK_INTS): require rb_thread_t ptr.
- * array.c: introduce ARY_SHARED_OCCUPIED(shared).
+ * cont.c (fiber_switch): use replaced RUBY_VM_CHECK_INTS().
-Fri Aug 23 11:07:08 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * eval.c (ruby_cleanup): ditto.
- * win32/Makefile.sub (config.h): now SIZEOF_CLOCK_T is needed for
- unsigned_clock_t.
+ * insns.def: ditto.
-Thu Aug 22 22:01:04 2013 Tanaka Akira <akr@fsij.org>
+ * process.c (rb_waitpid): ditto.
- * process.c (rb_clock_gettime): Strip "s" from unit names.
+ * vm_eval.c (vm_call0): ditto.
-Thu Aug 22 20:14:59 2013 Tanaka Akira <akr@fsij.org>
+ * vm_insnhelper.c (vm_call_method): ditto.
- * process.c (unsigned_clock_t): Defined.
- (rb_clock_gettime): Consider clock_t overflow for
- ISO_C_CLOCK_BASED_CLOCK_PROCESS_CPUTIME_ID.
+Thu Jul 19 22:46:48 2012 Tanaka Akira <akr@fsij.org>
- * configure.in: Check the size of clock_t.
+ * test/ruby/test_io.rb: remove temporally files early.
-Thu Aug 22 16:22:48 2013 Koichi Sasada <ko1@atdot.net>
+Thu Jul 19 15:38:35 2012 Shugo Maeda <shugo@ruby-lang.org>
- * compile.c (build_postexe_iseq): fix to setup the local table.
+ * variable.c (rb_mod_class_variables): return inherited variables
+ except when the optional argument is set to false.
+ [ruby-dev:44034] [Bug #4971]
-Thu Aug 22 15:42:43 2013 Koichi Sasada <ko1@atdot.net>
+ * variable.c (rb_mod_constants): fix typo in documentation.
- * compile.c (rb_iseq_compile_node): accept NODE_IFUNC to support
- custom compilation.
+Thu Jul 19 14:30:43 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * compile.c (NODE_POSTEXE): compile to
- "ONCE{ VMFrozenCore::core#set_postexe{...} }" with a new custom
- compiler `build_postexe_iseq()'.
+ * internal.h: move mark function declarations that should be private.
- * vm.c (m_core_set_postexe): remove parameters (passed by a block).
+Thu Jul 19 14:18:22 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Thu Aug 22 06:54:15 2013 Tanaka Akira <akr@fsij.org>
+ * ext/socket/init.c (rsock_init_sock): need to update max fd on all
+ platforms.
- * process.c (rb_clock_gettime): Change emulation symbols for
- Process.clock_gettime.
+Thu Jul 19 14:15:48 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Aug 22 06:24:54 2013 Tanaka Akira <akr@fsij.org>
+ * thread.c (rb_gc_mark_threads): remove deprecated function.
- * process.c (make_clock_result): Extracted from rb_clock_gettime.
+Thu Jul 19 13:28:03 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Wed Aug 21 22:30:51 2013 Tanaka Akira <akr@fsij.org>
+ * test/net/http/test_http.rb (TestNetHTTPLocalBind#test_bind_to_local*):
+ re-enable the tests because now it's OK on windows.
- * process.c (rb_clock_gettime): clock() based CLOCK_PROCESS_CPUTIME_ID
- emulation implemented.
+Thu Jul 19 13:26:25 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Wed Aug 21 21:02:37 2013 Tanaka Akira <akr@fsij.org>
+ * ext/socket/extconf.rb: now enable IPv6 by default on mswin.
- * process.c (rb_proc_times): Use RB_GC_GUARD to guard objects from GC.
+Thu Jul 19 09:33:46 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-Wed Aug 21 20:33:01 2013 Tanaka Akira <akr@fsij.org>
+ * ext/psych/emitter.c (initialize): allow a configuration object to be
+ passed to the constructor so that mutation isn't required after
+ instantiation.
- * process.c (get_clk_tck): Extracted from rb_proc_times.
- (rb_clock_gettime): times() based CLOCK_PROCESS_CPUTIME_ID emulation
- is implemented.
+ * ext/psych/lib/psych/handler.rb: add configuration object
-Wed Aug 21 19:31:48 2013 Tanaka Akira <akr@fsij.org>
+ * ext/psych/lib/psych/visitors/emitter.rb: use configuration object if
+ extra configuration is present.
- * process.c: POSIX_GETTIMEOFDAY_CLOCK_REALTIME is renamed to
- SUS_GETTIMEOFDAY_CLOCK_REALTIME.
+Thu Jul 19 08:20:25 2012 Tanaka Akira <akr@fsij.org>
-Wed Aug 21 19:17:46 2013 Tanaka Akira <akr@fsij.org>
+ * test/ruby/test_file.rb: remove temporally files early.
- * process.c (rb_clock_gettime): CLOCK_PROCESS_CPUTIME_ID emulation
- using getrusage is implemented.
+Thu Jul 19 07:37:41 2012 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
-Wed Aug 21 17:34:27 2013 Tanaka Akira <akr@fsij.org>
+ * test/drb/drbtest.rb: fixed: can't delete unix domain sockets problem.
- * gc.c (getrusage_time): Fallback clock_gettime to getrusage when
- clock_gettime fails.
- Reported by Eric Saxby. [ruby-core:56762] [Bug #8805]
+Thu Jul 19 03:41:20 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Wed Aug 21 02:32:32 2013 Koichi Sasada <ko1@atdot.net>
+ * bignum.c: Added #include <strings.h> for ffs(). Patch by Perry
+ Smith. Thank you. [Bug #6748]
- * insns.def: fix regexp's once option behavior.
- fix [ruby-trunk - Bug #6701]
+Thu Jul 19 01:56:02 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * insns.def: remove `onceinlinecache' and introduce `once' instruction.
- `once' doesn't use `setinlinecache' insn any more.
+ * include/ruby/intern.h (rb_num_zerodiv): Added NORETURN.
+ Patched by Xi Wang. [Bug #6736]
- * vm_core.h: `union iseq_inline_storage_entry' to store once data.
+Wed Jul 18 23:57:38 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * compile.c: catch up above changes.
+ * pack.c (pack_pack): round down too long uuencode width. folding
+ width in uuencode format cannot be longer than 63 bytes.
- * iseq.c: ditto.
+Wed Jul 18 23:04:18 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * vm.c, vm_insnhelper.c: ditto. fix `m_core_set_postexe()' which
- is depend on `onceinlinecache' insn.
+ * ext/dbm/dbm.c (fdbm_empty_p): fix wrong condition introduced in r36438.
- * test/ruby/test_regexp.rb: add tests.
+ * ext/sdbm/init.c (fsdbm_empty_p): ditto.
- * iseq.c: ISEQ_MINOR_VERSION to 1 (should increment major?)
+Wed Jul 18 23:08:57 2012 Tanaka Akira <akr@fsij.org>
-Wed Aug 21 02:30:15 2013 Koichi Sasada <ko1@atdot.net>
+ * test/ruby/test_beginendblock.rb: remove temporally files early.
- * gc.c (rb_gcdebug_print_obj_condition): add printing information.
+Wed Jul 18 22:43:02 2012 Tanaka Akira <akr@fsij.org>
-Tue Aug 20 13:38:00 2013 Naohisa Goto <ngotogenome@gmail.com>
+ * test/ruby/test_autoload.rb: remove temporally files early.
- * 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]
+Wed Jul 18 21:59:46 2012 Tanaka Akira <akr@fsij.org>
-Tue Aug 20 02:32:52 2013 Zachary Scott <e@zzak.io>
+ * test/ruby/test_argf.rb: use temporally directory.
- * 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.
+Wed Jul 18 19:41:19 2012 Tanaka Akira <akr@fsij.org>
- This patch was based on a patch submitted by Steve Klabnik.
- [ruby-core:56694] [Bug #8778]
+ * test/openssl/test_config.rb: remove temporally files early.
-Tue Aug 20 02:10:19 2013 Zachary Scott <e@zzak.io>
+Wed Jul 18 17:45:26 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/rss/rss.rb: [DOC] Document for constants by Steve Klabnik
- [ruby-core:56705] [Bug #8798]
+ * error.c (rb_builtin_type_name): map by index.
-Tue Aug 20 02:01:10 2013 Zachary Scott <e@zzak.io>
+Wed Jul 18 16:17:40 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/rss/xmlparser.rb: [DOC] Hide legacy constant from rdoc
- Patch by Steve Klabnik [ruby-core:56708] [Bug #8799]
+ * lib/mkmf.rb (have_framework): get rid of separating -framework
+ option and its argument and dealing with the argument as a library
+ or an object name. if $LDFLAGS were an array...
-Tue Aug 20 01:52:05 2013 Zachary Scott <e@zzak.io>
+Wed Jul 18 16:09:10 2012 Shugo Maeda <shugo@ruby-lang.org>
- * 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]
+ * ext/curses/extconf.rb: support PDCurses. patched by Luis Lavena.
+ [ruby-core:46485] [Feature #6735]
-Tue Aug 20 01:19:22 2013 Tanaka Akira <akr@fsij.org>
+Wed Jul 18 15:50:25 2012 Shugo Maeda <shugo@ruby-lang.org>
- * configure.in: Define ac_cv_func_clock_gettime to yes for mingw*.
+ * parse.y (primary): allow an empty grouped expression as the
+ operand of the not operator (e.g., not ()).
+ [ruby-core:45976] [Bug #6674]
-Mon Aug 19 21:31:35 2013 Tanaka Akira <akr@fsij.org>
+ * parse.y (parser_yylex): show no warning for a grouped expression
+ as the operand of the not operator (e.g., not (a)) or as an
+ argument of a method call without parentheses (e.g., foo (a)).
+ [ruby-core:39050] [Bug #5214]
- * 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.
+Wed Jul 18 15:33:21 2012 Koichi Sasada <ko1@atdot.net>
-Mon Aug 19 20:55:12 2013 Koichi Sasada <ko1@atdot.net>
+ * thread.c (rb_thread_call_without_gvl2): added.
+ it can skip last CHECK_INTS. See document for more details.
+ Document about it was updated a bit.
- * gc.c: fix around GC_DEBUG.
+ * include/ruby/thread.h (decl. of rb_thread_call_without_gvl2): added.
- * gc.c (RVALUE::line): should be VALUE. On some environment
- (such as mswin64), `int' introduces alignment mismatch.
+ * thread.c (rb_thread_call_with_gvl): remove "EXPERIMENTAL!"
+ warning from a document.
- * gc.c (newobj_of): add an assertion to check VALUE alignment.
+Wed Jul 18 14:53:21 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c (aligned_malloc): `&' is low priority than `=='.
+ * configure.in (EXTDLDFLAGS): split options for each extension
+ libraries, and unused in ruby.pc. [Bug #6734]
- * gc.c: define GC_DEBUG everytime and use it as value 0 or 1.
+ * lib/mkmf.rb (MakeMakefile#configuration): add EXTDLDFLAGS.
-Mon Aug 19 17:43:44 2013 Koichi Sasada <ko1@atdot.net>
+Wed Jul 18 14:47:23 2012 Koichi Sasada <ko1@atdot.net>
- * test/ruby/test_fiber.rb: collect garbage fibers immediately.
+ * thread.c: fix last commit miss.
-Mon Aug 19 17:41:49 2013 Koichi Sasada <ko1@atdot.net>
+Wed Jul 18 14:16:51 2012 Koichi Sasada <ko1@atdot.net>
- * test/profile_test_all.rb: add `failed?' information.
+ * thread.c (rb_threadptr_async_errinfo_*): manage async errors queue.
+ Async events such as an exception throwed by Thread#raise,
+ Thread#kill and thread termination (after main thread termination)
+ will be queued to th->async_errinfo_queue.
+ - clear: clear the queue.
+ - enque: enque err object into queue.
+ - deque: deque err object from queue.
+ - active_p: return 1 if the queue should be checked.
+ rb_thread_t#thrown_errinfo was removed.
-Mon Aug 19 17:00:53 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_core.h: add declarations of rb_threadptr_async_errinfo_*.
+ remove rb_thread_t#thrown_errinfo field and
+ add rb_thread_t#async_errinfo_queue (queue body: Array),
+ rb_thread_t#async_errinfo_queue_checked (flag),
+ rb_thread_t#async_errinfo_mask_stack(Array, not used yet).
- * process.c (retry_fork): retry with GC if ENOMEM occurred, to free
- swap/kernel space.
+ * vm.c (rb_thread_mark): fix a mark function.
-Mon Aug 19 13:28:47 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * cont.c (rb_fiber_start): enque an error.
- * include/ruby/win32.h (CLOCK_MONOTONIC): typo.
+ * process.c (after_fork): clear async errinfo queue.
- * win32/win32.c: removed duplicated declarations.
+Wed Jul 18 14:25:55 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
-Mon Aug 19 13:03:08 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * pack.c: (ditto) bitwise operations are not char. Apply explicit
+ casts on them.
- * configure.in (clock_gettime): should not overwrite cache variable
- with different condition. otherwise -lrt is not linked and the link
- fails, after reconfig.
+Wed Jul 18 12:59:50 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
-Mon Aug 19 12:56:49 2013 Tanaka Akira <akr@fsij.org>
+ * encoding.c (load_encoding): explicit cast to suppress warning.
+ Though the cast truncates some bits, from heuristic analysis I
+ believe it is OK to do so here.
- * process.c (Init_process): Add constants: CLOCK_REALTIME_ALARM and
- CLOCK_BOOTTIME_ALARM.
+ * bignum.c (rb_cstr_to_inum): ditto.
-Sun Aug 18 20:17:41 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+Wed Jul 18 12:55:54 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * variable.c, vm_method.c: remove dead code.
+ * lib/benchmark.rb: Fix Benchmark.benchmark output with an empty
+ caption. patched by Benoit Daloze. [ruby-core:45719] [Bug #6610]
- * test/ruby/test_fiber.rb, test/ruby/test_thread.rb:
- change accordingly.
+Wed Jul 18 10:00:54 2012 Eric Hodel <drbrain@segment7.net>
-Sun Aug 18 19:32:26 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+ * lib/debug.rb: Added toplevel documentation. Based on patch by Oscar
+ Del Ben. [Bug #6743], fixes #146 on github.
- * error.c, file.c, gc.c, hash.c, thread.c, variable.c, vm_eval.c, bin/erb:
- $SAFE=4 is obsolete.
+Wed Jul 18 09:33:59 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Sun Aug 18 14:30:47 2013 Tanaka Akira <akr@fsij.org>
+ * test/win32ole/test_win32ole_event.rb (TestWIN32OLE_EVENT): use
+ standard skip method to skip tests.
- * process.c (rb_clock_gettime): Rename POSIX_TIME_CLOCK_REALTIME to
- ISO_C_TIME_CLOCK_REALTIME.
+Wed Jul 18 09:26:45 2012 Eric Hodel <drbrain@segment7.net>
-Sun Aug 18 14:22:45 2013 Tanaka Akira <akr@fsij.org>
+ * lib/logger.rb: Updated typos and output to match modern Logger
+ output. Patch by Marcus Stollsteimer. [Bug #6738]
- * configure.in: Revert r42604. It causes linking librt on systems
- with newer glibc uselessly.
+Wed Jul 18 07:59:29 2012 Takeyuki FUJIOKA <xibbar@ruby-lang.org>
-Sun Aug 18 13:18:38 2013 Tanaka Akira <akr@fsij.org>
+ * lib/cgi/util.rb (CGI.escapeHTML,unescapeHTML): Add &apos; for HTML5
+ escaping.
+ [Feature #6620]
- * process.c (Init_process): Add constants: CLOCK_REALTIME_COARSE,
- CLOCK_MONOTONIC_COARSE and CLOCK_BOOTTIME.
+Tue Jul 17 22:17:13 2012 Tanaka Akira <akr@fsij.org>
-Sun Aug 18 12:41:50 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/open-uri.rb: call io.close! for Tempfile.
- * 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.
+Tue Jul 17 16:41:32 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Sun Aug 18 10:05:12 2013 Tanaka Akira <akr@fsij.org>
+ * proc.c (rb_proc_arity): return normal value (not -n-1) if it is not
+ a labmda, or it is a labmda and no arg_opts. [Bug #5694]
- * bignum.c (rb_big2str1): Make an expression more explicit.
+Tue Jul 17 03:56:34 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-Sun Aug 18 03:18:45 2013 Tanaka Akira <akr@fsij.org>
+ * ext/psych/lib/psych/visitors/to_ruby.rb: strings with YAML anchors
+ are properly referenced. Patched by Joe Rafaniello via Github:
+ https://github.com/tenderlove/psych/pull/69
+ * ext/psych/lib/psych/visitors/yaml_tree.rb: ditto
+ * test/psych/test_alias_and_anchor.rb: test for change
- * bignum.c (rb_big2str1): Use power_level instead of bitsize(xn).
+Mon Jul 16 23:20:24 2012 Tanaka Akira <akr@fsij.org>
-Sun Aug 18 00:44:58 2013 Tanaka Akira <akr@fsij.org>
+ * bignum.c (rb_integer_float_cmp): use FIXNUM_MIN and FIXNUM_MAX,
+ instead of LONG_MIN and LONG_MAX.
- * bignum.c (BIGDIVREM_EXTRA_WORDS): Redefine to 1.
- (bigdivrem_num_extra_words): Removed.
- (bigdivrem_normal): Simplified.
- (big2str_karatsuba): Ditto.
+Mon Jul 16 22:50:41 2012 Tanaka Akira <akr@fsij.org>
-Sat Aug 17 23:25:19 2013 Benoit Daloze <eregontp@gmail.com>
+ * numeric.c (flo_to_s): use the exponential form if the integer part
+ is longer than or equal DBL_DIG.
+ [ruby-dev:45960] [ruby-trunk - Bug #6741]
- * test/ruby/test_time.rb: use the in_timezone() helper
- and define it at the top with other helpers.
+Mon Jul 16 22:01:00 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-Sat Aug 17 22:20:47 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/readline/readline.c: fixed docs. [Bug #6740][ruby-core:46501]
+ patched by Nobuhiro IMAI.
- * time.c (time_mload): ignore auxiliary data, offset and zone, if
- invalid. [ruby-core:56648] [Bug #8795]
+Mon Jul 16 19:24:01 2012 Tanaka Akira <akr@fsij.org>
-Sat Aug 17 20:11:49 2013 Benoit Daloze <eregontp@gmail.com>
+ * bignum.c (rb_integer_float_eq): new function.
+ (rb_big_eq): use rb_integer_float_eq.
- * 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
+ * internal.h (rb_integer_float_eq): declared.
-Fri Aug 16 18:12:05 2013 Koichi Sasada <ko1@atdot.net>
+ * numeric.c (flo_eq): use rb_integer_float_eq.
+ (fix_equal): ditto.
- * test/profile_test_all.rb: fix typo.
+Mon Jul 16 19:02:31 2012 Tanaka Akira <akr@fsij.org>
-Fri Aug 16 18:09:20 2013 Koichi Sasada <ko1@atdot.net>
+ * bignum.c (rb_integer_float_cmp): rename a local variable.
- * test/profile_test_all.rb: remove space characters from test names.
+Mon Jul 16 18:40:26 2012 Tanaka Akira <akr@fsij.org>
-Fri Aug 16 17:32:02 2013 Koichi Sasada <ko1@atdot.net>
+ * bignum.c (rb_integer_float_cmp): renamed from rb_big_float_cmp.
- * test/profile_test_all.rb: refactoring memory profiling tool for
- test-all.
- Add profiling targets /proc/meminfo and /proc/self/status.
+ * internal.h: follow the above change.
- * test/runner.rb: accept other than 'true'.
+ * numeric.c: ditto.
-Fri Aug 16 11:23:35 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+Mon Jul 16 17:57:54 2012 Tanaka Akira <akr@fsij.org>
- * file.c (rb_file_size, rb_file_flock): improve performance of Windows.
+ * bignum.c (rb_big_float_cmp): compare an integer and float precisely.
+ [ruby-core:31376] [Bug #3589] reported by Tomasz Wegrzanowski.
- * file.c (rb_file_truncate): removed unnecessary #ifdef.
+Mon Jul 16 17:29:45 2012 Tanaka Akira <akr@fsij.org>
- * test/test_file.rb (TestFile#test_truncate_size): added an assertion
- for File#size.
+ * bignum.c (rb_big_float_cmp): support fixnum for argument x.
-Fri Aug 16 10:07:59 2013 Tanaka Akira <akr@fsij.org>
+ * numeric.c (fix_equal): use rb_big_float_cmp.
+ (fix_cmp): ditto.
+ (fix_gt): ditto.
+ (fix_ge): ditto.
+ (fix_lt): ditto.
+ (fix_le): ditto.
+ (flo_eq): ditto.
+ (flo_cmp): use rb_big_float_cmp for fixnum argument.
+ (flo_gt): ditto.
+ (flo_ge): ditto.
+ (flo_lt): ditto.
+ (flo_le): ditto.
- * 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.
+Mon Jul 16 17:05:53 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-Fri Aug 16 09:17:00 2013 Tanaka Akira <akr@fsij.org>
+ * test/fileutils/test_fileutils.rb: add test for FileUtils#uptodate?
- * bignum.c (bary_small_rshift): Specify the higher BDIGIT instead of
- sign bit.
- (big_shift3): Follow the above change.
+Mon Jul 16 16:56:12 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-Fri Aug 16 02:20:39 2013 Tanaka Akira <akr@fsij.org>
+ * lib/fileutils.rb (FileUtils.uptodate?): remove useless parameter.
+ patched by Oscar Del Ben.[Bug #6708][ruby-core:46256]
- * bignum.c (bary_mul_toom3): Reduce a branch.
+Mon Jul 16 15:37:56 2012 Tanaka Akira <akr@fsij.org>
-Fri Aug 16 02:14:09 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * bignum.c (rb_big_eq): use rb_big_float_cmp.
- * process.c (rb_clock_gettime): add CLOCK_MONOTONIC support on OS X.
- http://developer.apple.com/library/mac/qa/qa1398/_index.html
- [Feature #8658]
+Mon Jul 16 15:00:45 2012 Tanaka Akira <akr@fsij.org>
-Fri Aug 16 01:37:43 2013 Tanaka Akira <akr@fsij.org>
+ * internal.h (rb_big_float_cmp): declared.
- * bignum.c (bigdivrem_single): Use shift when y is a power of two.
+ * bignum.c (rb_big_float_cmp): extracted from rb_big_cmp and big_op.
+ (rb_big_cmp): use rb_big_float_cmp.
+ (big_op): ditto.
-Fri Aug 16 01:09:33 2013 Tanaka Akira <akr@fsij.org>
+ * numeric.c (flo_cmp): use rb_big_float_cmp.
+ (flo_gt): ditto.
+ (flo_ge): ditto.
+ (flo_lt): ditto.
+ (flo_le): ditto.
- * bignum.c (bigdivrem_restoring): Use bigdivrem_single if non-topmost
- BDIGITs of y are zero.
+Mon Jul 16 14:14:21 2012 Tanaka Akira <akr@fsij.org>
-Fri Aug 16 00:33:12 2013 Tanaka Akira <akr@fsij.org>
+ * bignum.c (enum big_op_t): new type.
+ (big_op): use enum big_op_t.
+ (big_gt): ditto.
+ (big_ge): ditto.
+ (big_lt): ditto.
+ (big_le): ditto.
- * bignum.c (rb_big2str1): Truncate topmost zeros of x.
+Sat Jul 14 18:18:48 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Aug 16 00:00:57 2013 Tanaka Akira <akr@fsij.org>
+ * array.c (rb_get_values_at): fill with nil out of range.
+ [ruby-core:43678] [Bug #6203]
- * bignum.c (bary_divmod): Simplify an expression.
+Sat Jul 14 17:17:55 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-Thu Aug 15 23:26:12 2013 Tanaka Akira <akr@fsij.org>
+ * cont.c (cont_restore_0): improve docs. [Bug #6706][ruby-core:46243]
+ patched by Oscar Del Ben via https://github.com/ruby/ruby/pull/140
- * bignum.c (bigdivrem_normal): Remove a local variable.
+Sat Jul 14 17:08:13 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Aug 15 23:08:32 2013 Tanaka Akira <akr@fsij.org>
+ * hash.c (rb_hash_s_create): raise an exception, when input elements
+ are not one or two elements arrays. [ruby-core:39945] [Bug #5406]
- * bignum.c (big2str_karatsuba): Use bigdivrem_restoring directly to
- reduce working buffer and memory copy.
- (rb_big2str1): Allocate working buffer for big2str_karatsuba here.
+Sat Jul 14 16:16:48 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Aug 15 20:51:29 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * lib/test/unit.rb (Test::Unit::Runner#_run_parallel): use
+ Array#uniq!.
- * io.c, internal.h (rb_io_flush_raw): new function to select calling
- fsync() (on Windows).
+ * lib/test/unit.rb (Test::Unit::Runner#deal): deal tasks to workers.
- * io.c (rb_io_flush_raw): use above function.
+ * lib/test/unit.rb (Test::Unit::Runner#quit_workers): close and kill
+ all workers.
- * file.c (rb_file_truncate): use above function.
+ * lib/test/unit.rb (Test::Unit::Runner#delete_worker): delete dead
+ worker from working set.
- * test/ruby/test_file.rb (TestFile#test_truncate_size): test for
- above changes.
+ * lib/test/unit.rb (Test::Unit::Runner#launch_worker): add new worker
+ to working set.
-Thu Aug 15 18:39:31 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * lib/test/unit.rb (Test::Unit::Runner#launch_worker): extract.
- * win32/win32.c (clock_gettime): improve precision when freq is less
- than and nearly equals 10**9.
+ * lib/test/unit.rb (Test::Unit::Runner#start_watchdog): extract.
-Thu Aug 15 17:43:15 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/test/unit.rb (Test::Unit::Runner#_run_parallel): move
+ initializations with nothing to release outside begin/ensure.
- * gc.c (gc_lazy_sweep): remove heap_increment() here because heap_inc
- may be 0.
+Sat Jul 14 16:04:24 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Aug 15 16:59:56 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * array.c (rb_ary_join): should not infected by separator if it is not
+ used. [ruby-core:42161][Bug #5902]
- * io.c (rb_io_rewind): remove fsync() for Windows to improve the
- performance.
+Sat Jul 14 02:31:55 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Aug 15 16:30:23 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * include/ruby/intern.h (rb_thread_blocking_region): fix declarations
+ prototypes without arguments in C++ have different meanings than C.
- * test/fileutils/test_fileutils.rb (TestFileUtils#test_rmdir):
- FileUtils.rmdir ignores Errno::ENOTEMPTY, so, in such cases, this
- assertion is nonsense.
+Thu Jul 12 12:32:26 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Aug 15 15:49:35 2013 Tanaka Akira <akr@fsij.org>
+ * test/runner.rb: skip default gems to get rid of loading old versions
+ before installation.
- * process.c (rb_clock_gettime): [DOC] FreeBSD 7.1 supports
- CLOCK_THREAD_CPUTIME_ID.
- http://www.freebsd.org/releases/7.1R/relnotes.html
+Thu Jul 12 11:44:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Aug 15 14:30:23 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * string.c (rb_str_new_frozen): since the result object should have
+ same tainted/untrusted bits with the original object, return new
+ object if the shared object unmatch. [ruby-core:39745][Bug #5374]
- * include/ruby/win32.h, win32/Makefile.sub, win32/win32.c
- (clock_gettime): [experimental] emulates clock_gettime(2) of posix.
+Thu Jul 12 10:46:39 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Thu Aug 15 02:32:40 2013 Zachary Scott <e@zzak.io>
+ * test/net/http/test_http.rb (TestNetHTTPLocalBind#test_bind_to_local*):
+ cannot cross between network interfaces on Windows, so skip this test
+ until we find better test.
- * hash.c (rb_hash_aset): [DOC] Document key dup patch by @kachick
- [Fixes GH-382] https://github.com/ruby/ruby/pull/382
+Thu Jul 12 08:48:33 2012 Ryan Davis <ryand-ruby@zenspider.com>
-Wed Aug 14 14:28:39 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * lib/minitest/*: Imported minitest 3.2.0 (r7598)
+ * test/minitest/*: ditto
- * 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]
+Thu Jul 12 05:11:41 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * NEWS: documents about above change and def-expr (see r42337).
+ * insns.def (defined): use method entry and id in cfp for proper
+ superclass, since klass in iseq is shared by dynamically defined
+ methods from the same block. [ruby-core:45831][Bug #6644]
- * test/ruby/test_module.rb: tests about above change.
+Thu Jul 12 01:49:07 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Wed Aug 14 00:51:14 2013 Tanaka Akira <akr@fsij.org>
+ * lib/net/http.rb (Net::HTTP#connect): use local_host and local_port
+ if specified. patched by Ricardo Amorim [Feature #6617]
- * bignum.c (bigdivrem_restoring): xn argument removed.
- (bigdivrem_normal): Follow the above change.
+Wed Jul 11 17:36:39 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Aug 14 00:18:39 2013 Tanaka Akira <akr@fsij.org>
+ * ext/extmk.rb: append ENCOBJS to DLDOBJS but not EXTSOLIBS which is
+ not a target, to compile enc/encinit.c.
- * bignum.c (big_div_struct): Remove xn and j field. Add zn field.
- (bigdivrem1): Follow the above change.
- (bigdivrem_restoring): Ditto.
+Wed Jul 11 12:38:20 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Tue Aug 13 23:38:17 2013 Tanaka Akira <akr@fsij.org>
+ * ext/openssl/ossl_pkey_ec.c (ossl_ec_point_mul): nonstatic initializer
+ of an aggregate type is a C99ism.
- * bignum.c (big_div_struct): ynzero field removed.
- (bigdivrem1): Follow the above change.
- (bigdivrem_restoring): Ditto.
+ * ext/openssl/ossl_pkey_ec.c (ossl_ec_point_mul): get rid of VC++
+ warnings.
-Tue Aug 13 23:01:16 2013 Tanaka Akira <akr@fsij.org>
+Mon Jul 9 16:11:30 2012 Yuki Yugui Sonoda <yugui@google.com>
- * bignum.c (bigdivrem_restoring): Extracted from bigdivrem_normal.
+ * vm_eval.c (rb_eval_string_from_file,
+ rb_eval_string_from_file_protect): new functions to replace
+ rb_compile_main_from_string() and ruby_eval_main().
-Tue Aug 13 22:12:59 2013 Kenichi Kamiya <kachick1@gmail.com>
+ * nacl/pepper_ruby.c: Follows the change in vm_eval.c
- * random.c (rb_random_ulong_limited): coerce before check negative.
- [Fixes GH-379]
+Mon Jul 9 14:05:42 2012 Yuki Yugui Sonoda <yugui@google.com>
-Tue Aug 13 21:52:15 2013 Kenichi Kamiya <kachick1@gmail.com>
+ Reverts a half of r36079. As we discussed on ruby-dev@ and IRC,
+ we do not need to disclose intermediate representation of program.
+ The program embedding CRuby should use rb_eval_string family.
+ * include/ruby/ruby.h (ruby_opaque_t): removed.
+ (ruby_compile_main_from_file, ruby_compile_main_from_string,
+ ruby_eval_main): removed.
- * object.c (Init_Object): undef Module#prepend_features on Class, as
- well as Module#append_features. [Fixes GH-376]
+ * eval.c (ruby_eval_main_internal): became ruby_exec_internal() again.
+ (ruby_eval_main): removed.
- * test_class.rb: Added test for above. And ensure type checking
- on similar methods as module_function.
+ * ruby.c (PREPARE_PARSE_MAIN) reverted.
+ (parse_and_compile_main, ruby_compile_main_from_file,
+ ruby_compile_main_from_string): removed
-Tue Aug 13 08:52:18 2013 Zachary Scott <e@zzak.io>
+Wed Jul 11 10:16:38 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * doc/syntax/literals.rdoc: [DOC] String literal concat by @cknadler
- [Fixes GH-380] https://github.com/ruby/ruby/pull/380
+ * include/ruby.h (HAVE_RUBY_THREAD_H): to show ruby/thread.h to be
+ available. fixup of r36355.
-Mon Aug 12 23:07:21 2013 Masaya Tarui <tarui@ruby-lang.org>
+Wed Jul 11 03:26:47 2012 Eric Hodel <drbrain@segment7.net>
- * gc.c (gc_marks_test): inhibit gc for st's operation.
+ * ext/zlib/zlib.c: Added streaming support to inflate processing.
+ This allows zlib streams to be processed without huge memory growth.
+ [Feature #6612]
+ * NEWS: ditto
+ * ext/zlib/zlib.c (zstream_expand_buffer): Uses rb_yield when a block
+ is given for streaming support. Refactored to use
+ zstream_expand_buffer_into to remove duplicate code.
+ * ext/zlib/zlib.c (zstream_expand_buffer_protect): Added wrapper
+ function to pass jump state back through GVL-free section to allow
+ zstream clean-up before terminating the ruby call.
+ * ext/zlib/zlib.c (zstream_expand_buffer_without_gvl): Acquire GVL to
+ yield processed chunk of output stream.
+ * ext/zlib/zlib.c (zstream_detach_buffer): When a block is given,
+ returns Qnil mid-stream and yields the output buffer at the end of
+ the stream.
+ * test/zlib/test_zlib.rb: Updated tests
-Mon Aug 12 15:59:50 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Jul 10 22:57:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y (parser_whole_match_p): treat CR in middle of a line as a
- mere whitespace.
+ * include/ruby/thread.h: new header file for thread stuff.
-Mon Aug 12 15:16:58 2013 Koichi Sasada <ko1@atdot.net>
+ * thread.c (rb_thread_call_without_gvl): export. [Feature#4328]
+ returns void* instead of VALUE. [Feature #5543]
- * 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.
+ * thread.c (rb_thread_blocking_region): deprecate. [ruby-core:46295]
- * test/ruby/test_module.rb: add a test for WB miss.
+Tue Jul 10 10:48:59 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Mon Aug 12 13:47:54 2013 Zachary Scott <e@zzak.io>
+ * include/ruby/win32.h (NT, NtInitialize): removed unused old macros.
- * process.c: [DOC] RDoc formatting of Process.clock_gettime
+Tue Jul 10 10:43:37 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Mon Aug 12 13:29:09 2013 Zachary Scott <e@zzak.io>
+ * configure.in: removed --enable/disable-win95 options. (see r36342)
- * lib/yaml/dbm.rb: [DOC] Document call-seq for YAML::DBM
+Tue Jul 10 00:44:41 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Mon Aug 12 12:57:26 2013 Zachary Scott <e@zzak.io>
+ * include/ruby/ruby.h: Removed RUBY_GLOBAL_SETUP completely. It is
+ no meaning definition since r24894.
+ * main.c: ditto.
+ * nacl/pepper_main.c: ditto.
- * 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.
+Mon Jul 9 23:59:36 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Mon Aug 12 12:53:39 2013 Zachary Scott <e@zzak.io>
+ * dln.c: Simplify and make consistent an ifdef for Mac OS X.
+ * ext/socket/rubysocket.h: ditto.
+ * ext/tk/stubs.c: ditto.
+ * io.c: ditto.
+ * process.c: ditto.
+ * signal.c: ditto.
+ * vm_dump.c: ditto.
- * ext/dbm/dbm.c: [DOC] Reformat headings of DBM class
+Mon Jul 9 17:37:35 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Mon Aug 12 12:46:31 2013 Zachary Scott <e@zzak.io>
+ * win32/win32.c (win95_stat): removed unnecessary macro.
- * 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.
+Mon Jul 9 17:22:16 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Mon Aug 12 02:51:32 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * win32/configure.bat, win32/setup.mak, win32/Makefile.sub: omitted
+ Win9x support. removed --enable/disable-win95 options.
- * 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.
+ * include/ruby/win32.h, file.c, win32/win32.c: ditto.
- * ext/readline/readline.c (readline_s_set_output): ditto.
+ * win32/README.win32: ditto.
-Sun Aug 11 23:27:00 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Jul 9 13:28:34 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * file.c (rb_str_encode_ospath): OS path encoding on Mac OS X is also
- fixed.
+ * configure.in (DLDFLAGS): use TARGET_ENTRY to specify an entry point
+ instead of TARGET which may contain non-identifier characters.
-Sun Aug 11 22:57:24 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/mkmf.rb (create_makefile): add TARGET_NAME which is the first
+ part consists of only word characters. [ruby-core:46248][Bug #6709]
- * 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]
+Sun Jul 8 07:36:19 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Aug 11 19:11:45 2013 Kouhei Sutou <kou@cozmixng.org>
+ * parse.y (shadowing_lvar_gen, warn_unused_var): no warnings for
+ variables starting with _. [ruby-core:46160][Feature #6693]
- * test/rexml/parser/test_sax2.rb: Expand abbreviated class name.
+Sat Jul 7 23:07:30 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
-Sun Aug 11 19:06:03 2013 Kouhei Sutou <kou@cozmixng.org>
+ * test/csv/test_features.rb: add require for Tempfile.
+ * test/csv/test_serialization.rb: ditto.
- * 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.
+Fri Jul 6 06:49:50 2012 Eric Hodel <drbrain@segment7.net>
-Sun Aug 11 18:44:04 2013 Kouhei Sutou <kou@cozmixng.org>
+ * array.c (rb_ary_aref): Added a description of the behavior of
+ index positioning. [Bug #6680]
+ * array.c (rb_ary_aset): ditto. Reordered sentences for clarity.
+ * string.c (rb_str_aref_m): Added a description of the behavior of
+ index positioning
- * lib/rexml/sax2listener.rb (REXML::SAX2Listener#elementdecl): Fix wrong
- examples. [Bug #8731] [ruby-dev:47582]
- Reported by Ippei Obayashi.
+Fri Jul 6 05:38:44 2012 Eric Hodel <drbrain@segment7.net>
-Sun Aug 11 18:42:13 2013 Kouhei Sutou <kou@cozmixng.org>
+ * string.c (rb_str_bytesize): Improve documentation. Patch by Oscar
+ Del Ben from github issue #138.
+ * string.c (rb_str_empty): ditto.
+ * string.c (rb_str_times): ditto.
+ * string.c (rb_str_dump): ditto.
+ * string.c (rb_str_center): ditto.
- * lib/rexml/parsers/sax2parser.rb
- (REXML::Parsers::SAX2Parser#handle_entitydecl): Extract.
+Fri Jul 6 04:05:59 2012 Eric Hodel <drbrain@segment7.net>
-Sun Aug 11 18:40:25 2013 Kouhei Sutou <kou@cozmixng.org>
+ * ext/zlib/zlib.c (zstream_expand_buffer_without_gvl): Use
+ ruby_xrealloc() to avoid crash with CALC_EXACT_MALLOC_SIZE.
- * 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.
+Thu Jul 5 17:32:19 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Aug 11 18:08:40 2013 Kouhei Sutou <kou@cozmixng.org>
+ * internal.h: move ThreadShield declarations from intern.h.
- * 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.
+Thu Jul 5 16:00:24 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Aug 11 18:07:39 2013 Kouhei Sutou <kou@cozmixng.org>
+ * thread.c (ThreadShield): rename from Barrier.
- * lib/rexml/parsers/baseparser.rb
- (REXML::Parsers::BaseParser#pull_event): Support optional NDATA
- in external ID entity declaration.
+Thu Jul 5 15:14:50 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Aug 11 17:54:07 2013 Kouhei Sutou <kou@cozmixng.org>
+ * bootstraptest/runner.rb (show_progress): refine error output. do not
+ count non-empty error message, but just warn.
- * 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.
+ * bootstraptest/runner.rb (error): show errors immediately if tty.
-Sun Aug 11 17:41:41 2013 Kouhei Sutou <kou@cozmixng.org>
+Thu Jul 5 12:28:11 2012 Akinori MUSHA <knu@iDaemons.org>
- * test/rexml/parser/test_sax2.rb: Add SAX2 API test.
+ * test/net/http/test_httpresponses.rb: Add a test file for
+ Net::HTTPResponses and put a test case for the previous bug.
-Sun Aug 11 15:10:40 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Jul 5 06:33:52 2012 Mark Dodwell <mark@mkdynamic.co.uk>
- * parse.y (rb_enc_symname_type): allow ID_ATTRSET for ID_INSTANCE,
- ID_GLOBAL, ID_CLASS, ID_JUNK too. [Bug #8756]
+ * lib/net/http/responses.rb: Fix 4xx classes to inherit correctly
+ from Net::HTTPClientError. [Bug #6700]
-Sun Aug 11 13:17:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+Wed Jul 4 21:55:35 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * include/ruby/encoding.h: Reduce ENCODING_INLINE_MAX to 127 as this
- should be sufficient to represent all the encodings Ruby supports.
+ * ruby.c (proc_options): warn only if -K and -w option is specified.
+ see also r36274 [Feature #5206]
-Sun Aug 11 11:54:38 2013 Tanaka Akira <akr@fsij.org>
+Wed Jul 4 21:41:44 2012 Naohisa Goto <ngotogenome@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]
+ * gc.c, atomic.h (ATOMIC_SIZE_*): moved from gc.c to atomic.h
+ [ruby-dev:45909]
-Sun Aug 11 10:40:48 2013 Zachary Scott <e@zzak.io>
+Wed Jul 4 19:13:15 2012 Masaki Suketa <masaki.suketa@nifty.ne.jp>
- * lib/time.rb: [DOC] Correcting rdoc visibility of time.rb constants
- Reported by Tanaka Akira [ruby-core:56517]
+ * test/win32ole/test_win32ole.rb (test_s_codepage_changed):
+ FileSystemObject only supports ANSI or UTF-16LE encoding.
+ Patch by h.shirosaki (Hiroshi Shirosaki) [ruby-trunk - Bug #6650]
-Sun Aug 11 04:48:14 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Wed Jul 4 11:52:12 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * 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.
+ * gc.c (ATOMIC_SIZE_*): 64bit Windows support.
-Sun Aug 11 03:26:07 2013 Tanaka Akira <akr@fsij.org>
+Wed Jul 4 11:11:28 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (bitsize): Fix a conditional expression.
+ * eval.c (rb_frame_callee, rb_f_callee_name): fix to return the
+ called id. this longstanding bug has been caused and blocked by
+ the structure of old rb_control_frame_t and rb_iseq_t.
-Sun Aug 11 02:44:03 2013 Zachary Scott <e@zzak.io>
+ * vm_insnhelper.c (vm_push_frame): set proper method entry.
- * lib/time.rb: [DOC] Document constants by @markijbema [Fixes GH-377]
- https://github.com/ruby/ruby/pull/377
+Wed Jul 4 08:29:31 2012 Eric Hodel <drbrain@segment7.net>
-Sun Aug 11 01:28:52 2013 Tanaka Akira <akr@fsij.org>
+ * array.c (rb_ary_aref): Updated documentation to indicate the
+ starting index is an index into the array or string. Updated
+ examples to show behavior of indexes at the end of an array or
+ string. Based on patch by Marcus Stollsteimer. [Bug #6680]
+ * array.c (rb_ary_aset): ditto.
+ * string.c (rb_str_aref): ditto. Also added descriptive argument
+ names to call-seq section.
- * 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
+Wed Jul 4 07:05:59 2012 Eric Hodel <drbrain@segment7.net>
-Sat Aug 10 13:53:22 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/zlib/test_zlib.rb (test_inflate_partial_input): Added test for
+ inflating incomplete zlib streams.
- * parse.y (rb_id_attrset): allow other than ID_ATTRSET.
+Tue Jul 3 23:14:16 2012 Naohisa Goto <ngotogenome@gmail.com>
- * parse.y (intern_str): ditto. try stem ID for ID_INSTANCE,
- ID_GLOBAL, ID_CLASS, ID_JUNK too. [Bug #8756]
+ * gc.c (ATOMIC_SIZE_EXCHANGE): fix function name on Solaris [Bug #6689]
+ [ruby-dev:45904]
-Sat Aug 10 12:49:50 2013 Kouhei Sutou <kou@cozmixng.org>
+Tue Jul 3 16:07:49 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * 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?)
+ * gc.c (vm_malloc_fixup, vm_xrealloc, vm_xfree, after_gc_sweep): use
+ atomic operations to update malloc_params.
-Sat Aug 10 12:47:19 2013 Kouhei Sutou <kou@cozmixng.org>
+Tue Jul 3 14:50:16 2012 Eric Hodel <drbrain@segment7.net>
- * 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.
+ * ext/zlib/zlib.c (zstream_run_func): Don't exit run loop for buffer
+ error. [Feature #6615]
+ * ext/zlib/zlib.c: Fix style to match existing functions.
-Sat Aug 10 12:43:15 2013 Kouhei Sutou <kou@cozmixng.org>
+Tue Jul 3 12:05:51 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * 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.
+ * ext/dl/cfunc.c (rb_dlcfunc_call): also needed the workaround for VC8
+ for x64. [ruby-dev:45875] [Bug #6676]
+ reported by aves_ramphastos (Seigo Ishigane)
-Sat Aug 10 12:39:00 2013 Kouhei Sutou <kou@cozmixng.org>
+Tue Jul 3 11:56:46 2012 Eric Hodel <drbrain@segment7.net>
- * test/rexml/parse/test_document_type_declaration.rb: Add tests for
- parsing document type declaration.
+ * ext/zlib/zlib.c (zstream_detach_buffer): Refactored tainting of
+ output string, moving it from the callee to zstream_detach_buffer.
+ * ext/zlib/zlib.c (rb_zstream_finish): ditto
+ * ext/zlib/zlib.c (rb_zstream_flush_next_out): ditto
+ * ext/zlib/zlib.c (rb_deflate_deflate): ditto
+ * ext/zlib/zlib.c (rb_deflate_flush): ditto
+ * ext/zlib/zlib.c (rb_inflate_inflate): ditto
-Sat Aug 10 12:00:45 2013 Kouhei Sutou <kou@cozmixng.org>
+Tue Jul 3 11:16:06 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * 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!!!
+ * common.mk (runnable): make symbolic links to run in build directory.
-Sat Aug 10 11:58:24 2013 Kouhei Sutou <kou@cozmixng.org>
+Tue Jul 3 10:46:06 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * test/rexml/parse/test_notation_declaration.rb (#test_system_public):
- Add a test for PUBLIC notation and SYSTEM notation order case.
+ * ruby.c (proc_options): warn if -K option is specified. [Feature #5206]
-Sat Aug 10 11:31:35 2013 Kouhei Sutou <kou@cozmixng.org>
+Tue Jul 3 06:12:13 2012 Eric Hodel <drbrain@segment7.net>
- * 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.
+ * object.c (Init_Object): Added RDoc location pointers for
+ Kernel#methods, Kernel#protected_methods, Kernel#private_methods and
+ Kernel#public_methods. [Bug #6666]
-Sat Aug 10 09:20:21 2013 Zachary Scott <e@zzak.io>
+Tue Jul 3 06:02:54 2012 Eric Hodel <drbrain@segment7.net>
- * NEWS: [DOC] typo in example reported by @moretea
- https://github.com/ruby/ruby/commit/a39e724#commitcomment-3831489
+ * ext/zlib/zlib.c (zstream_run): Process zlib streams without GVL.
+ [Feature #6615]
+ * NEWS: ditto.
-Sat Aug 10 09:19:04 2013 Zachary Scott <e@zzak.io>
+Mon Jul 2 22:13:04 2012 Tanaka Akira <akr@fsij.org>
- * proc.c: [DOC] rdoc code formatting
+ * thread.c (rb_thread_aref): add explanation for why Thread#[] and
+ Thread#[]= are fiber-local and not thread-local.
+ reported by Julien A. [ruby-core:41606] [ruby-trunk - Bug #5750]
-Sat Aug 10 09:12:01 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Jul 2 21:25:55 2012 Tanaka Akira <akr@fsij.org>
- * parse.y (rb_id_attrset): check if the argument is valid type as an
- attribute.
+ * time.c (timew_out_of_timet_range): specialization for
+ SIZEOF_TIME_T == SIZEOF_INT64_T.
-Sat Aug 10 05:44:08 2013 Zachary Scott <e@zzak.io>
+Mon Jul 2 17:06:32 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/rss/trackback.rb: [DOC] Hide RSS::Trackback from rdoc
- Patch by Steve Klabnik [Bug #8755] [ruby-core:56456]
+ * class.c (rb_include_module): include modules after the origin.
-Sat Aug 10 04:52:21 2013 Tanaka Akira <akr@fsij.org>
+ * class.c (include_modules_at): skip prepended modules.
- * bignum.c (big_div_struct): Use size_t.
- (bigdivrem1): Ditto.
- (bigdivrem_num_extra_words): Ditto.
- (bigdivrem_single): Ditto.
- (bigdivrem_normal): Ditto.
- (bary_divmod): Ditto.
+ * class.c (rb_prepend_module): now basic.klass in ICLASS refers the
+ old original class/module. [ruby-dev:45868][Bug #6662]
-Fri Aug 9 23:47:15 2013 Kouhei Sutou <kou@cozmixng.org>
+ * class.c (rb_mod_ancestors): ditto.
- * 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!!!
+ * vm_method.c (search_method): search method entry from the origin
+ iclass.
-Fri Aug 9 22:51:10 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Jul 2 05:54:58 2012 Tadayoshi Funaba <tadf@dotrb.org>
- * configure.in (XLDFLAGS, LIBRUBYARG_STATIC): CoreFoundation framework
- option is now needed always, regardless enable-shared.
- [ruby-core:56467] [Bug #8759]
+ * ext/date/date_core.c: [ruby-core:46058].
-Fri Aug 9 22:20:51 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Jul 2 05:35:43 2012 Tadayoshi Funaba <tadf@dotrb.org>
- * ruby.c (load_file_internal): use rb_parser_compile_string_path and
- rb_parser_compile_file_path, String path name versions. [Bug #8753]
+ * ext/date/date_core.c (d_lite_marshal_load): accepts old dump.
-Fri Aug 9 07:16:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+Mon Jul 2 03:21:53 2012 Ayumu AIZAWA <ayumu.aizawa@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.
+ * README.EXT.ja: fixed args of have_struct_member() ,
+ create_makefile() same as r35977. however, mkmf.rb include
+ no Japanese-docs, so Appendix C was not removed. [Bug #6597]
-Fri Aug 9 19:13:54 2013 Koichi Sasada <ko1@atdot.net>
+Fri Jun 29 05:08:41 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * NEWS: update about new methods for Binding.
+ * lib/test/unit/parallel.rb: workaround fix for rubygems.
+ RubyGems can't find rake if the source directory is not equal to
+ the directory which is running the test. [Bug #6604]
-Fri Aug 9 18:48:09 2013 Koichi Sasada <ko1@atdot.net>
+Thu Jun 28 20:33:15 2012 Luis Lavena <luislavena@gmail.com>
- * proc.c: add Binding#local_variable_get/set/defined?
- to access local variables which a binding contains.
- Most part of implementation by nobu.
+ * test/win32ole/test_win32ole.rb (test_s_codepage_changed):
+ FileSystemObject only supports ANSI or UTF-16LE encoding.
+ Patch by bosko (Bosko Ivanisevic) [ruby-trunk - Bug #6650]
- * test/ruby/test_proc.rb: add a tests for above.
+Thu Jun 28 09:27:09 2012 CHIKANAGA Tomoyuki <nagachika@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.
+ * class.c (class_instance_method_list): consider prepended Class/Module
+ when recur != 0. [ruby-dev:45863] [Bug #6660]
-Fri Aug 9 14:02:01 2013 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
+ * test/ruby/test_module.rb (test_prepend_instance_methods_false): add
+ a test for it.
- * tool/make-snapshot: Fix order of priority for option parameter.
-Fri Aug 9 12:06:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Jun 28 06:12:42 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * file.c (rb_str_normalize_ospath): normalize to Normalization Form C
- using CFString.
+ * class.c (rb_mod_ancestors): fix ancestors order.
+ [ruby-core:45919][Bug #6658] [ruby-dev:45861][Bug #6659]
-Fri Aug 9 10:53:57 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+Wed Jun 27 21:28:59 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
- * time.c (get_timeval, get_new_timeval): use rb_obj_class()
- instead of CLASS_OF() because CLASS_OF() may return
- a singleton class.
+ * lib/racc/parser.rb: NotImplementError is not exist.
-Fri Aug 9 10:42:11 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+ * lib/irb/output-method.rb (IRB::OutputMethod#print): ditto.
- * vm_insnhelper.c (vm_invoke_block): returning from lambda proc
- now always exits from the Proc. [ruby-core:56193] [Feature #8693]
+Wed Jun 27 21:31:13 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * NEWS, test/ruby/test_lambda.rb: ditto. Patch by nobu.
+ * class.c (rb_prepend_module): ancestors of prepending module also
+ should be included. [ruby-core:45914][Bug #6654]
-Fri Aug 9 00:10:32 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Jun 27 21:01:32 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * enumerator.c (lazy_zip_func): fix non-single argument. fix
- out-of-bound access and pack multiple yielded values.
- [ruby-core:56383] [Bug #8735]
+ * class.c (class_instance_method_list): m_tbl in prepended
+ class/module is NULL. [ruby-core:45915][Bug #6655]
-Thu Aug 8 23:01:20 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Jun 27 16:48:48 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * 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]
+ * class.c (rb_prepend_module): prepend module into another module.
-Thu Aug 8 21:56:44 2013 Tanaka Akira <akr@fsij.org>
+ * eval.c (rb_mod_prepend): new method Module#prepend. [Feature #1102]
- * time.c (time_overflow_p): Avoid signed integer overflow.
- (rb_time_new): Fix overflow condition.
+Wed Jun 27 09:15:46 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Aug 8 19:58:02 2013 Koichi Sasada <ko1@atdot.net>
+ * io.c (is_popen_fork): check if fork and raise NotImplementedError if
+ unavailable.
- * thread.c (rb_threadptr_pending_interrupt_check_mask):
- use RARRAY_RAWPTR() instead of RARRAY_PTR() because
- there is no new reference.
+ * io.c (rb_io_s_popen): allow environment variables hash and exec
+ options as flat parameters, not in an array arguments.
+ [Feature#6651] [EXPERIMENTAL]
-Thu Aug 8 19:56:52 2013 Koichi Sasada <ko1@atdot.net>
+ * process.c (rb_execarg_extract_options): extract exec options, but no
+ exceptions on non-exec options and returns them as a Hash.
- * string.c (rb_str_format_m): use RARRAY_RAWPTR() instead of
- RARRAY_PTR() because there is no new reference.
+ * process.c (rb_execarg_setenv): set environment variables.
-Thu Aug 8 19:55:51 2013 Koichi Sasada <ko1@atdot.net>
+Tue Jun 26 16:57:14 2012 Koichi Sasada <ko1@atdot.net>
- * include/ruby/ruby.h: define USE_RGENGC_LOGGING_WB_UNPROTECT.
+ * thread_pthread.c (register_cached_thread_and_wait):
+ return immediately if malloc() failed.
+ [ruby-core:43960] [ruby-trunk - Bug #6235]
-Thu Aug 8 16:44:25 2013 Koichi Sasada <ko1@atdot.net>
+ * thread_pthread.c (USE_THREAD_CACHE): check already defined or not.
- * 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.
+Tue Jun 26 10:01:56 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Aug 8 15:37:53 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * io.c (rb_io_s_popen): revert r36213 "popen: shell commands with
+ envvar" because it disabled to let single command bypass shell.
- * 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.
+Mon Jun 25 17:49:28 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Aug 8 14:54:18 2013 Shugo Maeda <shugo@ruby-lang.org>
+ * class.c (rb_mix_module): revert Module#mix.
- * NEWS: add description of incompatibility introduced by r42396.
- [ruby-core:56329] [Bug #8722]
+Mon Jun 25 16:57:38 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Aug 8 14:50:36 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * proc.c (rb_mod_define_method): allow method transplanting from a
+ module to either class or module. [ruby-core:34267][Feature #4254]
- * common.mk (mini): portable target to build miniruby
+Mon Jun 25 11:34:45 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * common.mk (bisect): run git-bisect with miniruby
+ * internal.h: use rb_pid_t instead of pid_t because of there is no
+ definition of pid_t here on Windows.
- * common.mk (bisect-ruby): run git-bisect with ruby
+Mon Jun 25 00:25:01 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * tool/bisect.sh: script for git-bisect
+ * configure.in (for stack end address): remove human68k specific
+ check. It is no longer supported.
-Thu Aug 8 12:11:43 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+Sun Jun 24 23:02:17 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * 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.
+ * io.c (pipe_open): merge win32 code using spawnv().
-Thu Aug 8 10:27:18 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sun Jun 24 22:53:42 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * range.c (range_last): revert r42400. [Bug #8739]
+ * process.c (check_exec_fds): separate check_exec_fds_1() since
+ nonstatic initializer of an aggregate type is not allowed by C89.
-Thu Aug 8 10:26:25 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sun Jun 24 07:47:17 2012 Tanaka Akira <akr@fsij.org>
- * file.c (rb_str_normalize_ospath): extract and move from dir.c.
+ * internal.h (rb_execarg): options field removed.
-Thu Aug 8 05:59:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * process.c: follow the rb_execarg change.
- * test/openssl/test_ssl.rb: Fix test for CVE-2013-4073.
- Patch by Antonio Terceiro. [Bug #8750] [ruby-core:56437]
+Sat Jun 23 23:48:21 2012 Tanaka Akira <akr@fsij.org>
-Thu Aug 8 03:37:38 2013 Eric Hodel <drbrain@segment7.net>
+ * process.c (proc_spawn_cmd): unused variable removed to suppress a
+ warning.
+ (save_env): ditto.
- * 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.
+ [ruby-core:45797] reported by Luis Lavena.
-Wed Aug 7 23:06:26 2013 Akinori MUSHA <knu@iDaemons.org>
+Sat Jun 23 23:19:31 2012 Tanaka Akira <akr@fsij.org>
- * ruby.c (Process.argv0): New method to return the original value
- of $0. [Feature #8696]
+ * internal.h (rb_execarg): add new_pgroup_given and new_pgroup_flag
+ fields.
-Wed Aug 7 23:05:55 2013 Akinori MUSHA <knu@iDaemons.org>
+ * process.c (EXEC_OPTION_NEW_PGROUP): removed.
+ (proc_spawn_cmd): take a struct rb_execarg argument.
+ use the new fields.
+ (rb_execarg_addopt): use the new fields.
+ (rb_spawn_process): follow the proc_spawn_cmd change.
- * ruby.c (Process.setproctitle): New method to change the title of
- the running process that is shown in ps(1). [Feature #8696]
+ [ruby-core:45794] [ruby-trunk - Bug #6633] reported by Luis Lavena.
-Wed Aug 7 20:05:38 2013 Tanaka Akira <akr@fsij.org>
+Sat Jun 23 20:26:36 2012 Tanaka Akira <akr@fsij.org>
- * bignum.c (rb_big_odd_p): Check the bignum length.
- (rb_big_even_p): Ditto.
+ * internal.h (rb_execarg): add fd_dup2, fd_close, fd_open,
+ fd_dup2_child fields.
-Wed Aug 7 19:29:26 2013 Tanaka Akira <akr@fsij.org>
+ * process.c (EXEC_OPTION_DUP2): removed.
+ (EXEC_OPTION_CLOSE): removed.
+ (EXEC_OPTION_OPEN): removed.
+ (EXEC_OPTION_DUP2_CHILD): removed.
+ (mark_exec_arg): mark the new fields.
+ (check_exec_redirect1): change condition for default option.
+ (check_exec_redirect): take a struct rb_execarg argument.
+ use the new fields.
+ (rb_execarg_addopt): follow the check_exec_redirect change.
+ (check_exec_fds): use the new fields.
+ (save_redirect_fd): ditto.
- * bignum.c (dbl2big): A condition simplified.
+Sat Jun 23 19:01:18 2012 Tanaka Akira <akr@fsij.org>
-Wed Aug 7 16:34:30 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * process.c (rb_execarg_fixup): fix envopts condition.
- * test/webrick/test_cgi.rb (TestWEBrickCGI#{start_cgi_server,test_cgi}):
- mswin is not only mswin32 but also mswin64. [Bug #8746]
+Sat Jun 23 18:44:13 2012 Tanaka Akira <akr@fsij.org>
-Wed Aug 7 16:19:12 2013 Koichi Sasada <ko1@atdot.net>
+ * process.c (check_exec_redirect1): extracted from
+ check_exec_redirect.
- * cont.c (rb_fiber_start): use RARRAY_RAWPTR() instead of
- RARRAY_PTR() because there is no new reference.
+Sat Jun 23 17:22:02 2012 Tanaka Akira <akr@fsij.org>
- * proc.c (curry): ditto.
+ * process.c (save_env): don't use EXEC_OPTION_UNSETENV_OTHERS.
+ (rb_execarg_run_options): ditto.
- * proc.c (rb_proc_call): remove line break.
+Sat Jun 23 17:04:08 2012 Tanaka Akira <akr@fsij.org>
-Wed Aug 7 13:20:12 2013 Koichi Sasada <ko1@atdot.net>
+ * internal.h (rb_execarg): add env_modification field.
- * random.c (random_load): use RARRAY_RAWPTR() instead of
- RARRAY_PTR() because there is no new reference.
+ * process.c (EXEC_OPTION_ENV): removed.
+ (mark_exec_arg): mark env_modification field.
+ (rb_exec_fillarg): update the new field, instead of options array.
+ (rb_execarg_fixup): use the new field.
+ (save_env): ditto.
+ (rb_execarg_run_options): ditto.
-Wed Aug 7 12:58:23 2013 Koichi Sasada <ko1@atdot.net>
+Sat Jun 23 16:27:01 2012 Tanaka Akira <akr@fsij.org>
- * thread.c (thread_start_func_2): use RARRAY_RAWPTR() instead of
- RARRAY_PTR() because there is no new reference.
+ * internal.h (rb_execarg): add rlimit_limits field.
-Wed Aug 7 09:00:24 2013 Zachary Scott <e@zzak.io>
+ * process.c (EXEC_OPTION_RLIMIT): removed.
+ (mark_exec_arg): mark rlimit_limits field.
+ (rb_execarg_addopt): update the new fields, instead of options array.
+ (run_exec_rlimit): use the new field.
+ (rb_execarg_run_options): clear sarg using MEMZERO. use the new
+ field.
- * string.c: [DOC] Description of rb_str_equal [Fixes GH-375]
- Based on a patch by @markijbema
- https://github.com/ruby/ruby/pull/375
+Sat Jun 23 14:29:25 2012 Tanaka Akira <akr@fsij.org>
-Wed Aug 7 08:30:38 2013 Zachary Scott <e@zzak.io>
+ * internal.h (rb_execarg): add chdir_given and chdir_dir fields.
- * 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
+ * process.c (EXEC_OPTION_CHDIR): removed.
+ (mark_exec_arg): mark chdir_dir field.
+ (rb_execarg_addopt): update the new fields, instead of options array.
+ (rb_execarg_run_options): use the new fields.
-Wed Aug 7 07:46:23 2013 Zachary Scott <e@zzak.io>
+Sat Jun 23 13:20:47 2012 Tanaka Akira <akr@fsij.org>
- * lib/rss/utils.rb: [DOC] RSS::Utils by Steve Klabnik [Bug #8745]
+ * internal.h (rb_execarg): add close_others_given, close_others_do and
+ close_others_maxhint fields.
-Wed Aug 7 07:38:39 2013 Tanaka Akira <akr@fsij.org>
+ * process.c (EXEC_OPTION_CLOSE_OTHERS): removed.
+ (rb_execarg_addopt): update the new fields, instead of options array.
+ (check_exec_fds): take eargp as an argument. update the
+ close_others_maxhint field.
+ (rb_execarg_fixup): follow the argument change of check_exec_fds.
+ (rb_execarg_run_options): use the new fields.
- * 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.
+Sat Jun 23 10:41:59 2012 Tanaka Akira <akr@fsij.org>
-Tue Aug 6 22:38:15 2013 Zachary Scott <e@zzak.io>
+ * internal.h (rb_execarg): add unsetenv_others_given and
+ unsetenv_others_do fields.
- * time.c: [DOC] Typo in Time overview by @sparr [Fixes GH-374]
- https://github.com/ruby/ruby/pull/374
+ * process.c (EXEC_OPTION_UNSETENV_OTHERS): removed.
+ (rb_execarg_addopt): update the new fields, instead of options array.
+ (rb_execarg_fixup): use the new fields.
-Tue Aug 6 22:35:32 2013 Zachary Scott <e@zzak.io>
+Sat Jun 23 09:35:47 2012 Tanaka Akira <akr@fsij.org>
- * lib/rss/1.0.rb: [DOC] Document RSS10 by Steve Klabnik [Bug #8740]
+ * process.c: use the variable name "soptions" for sargp->options.
-Tue Aug 6 22:14:11 2013 Kouji Takao <kouji.takao@gmail.com>
+Sat Jun 23 09:17:49 2012 Tanaka Akira <akr@fsij.org>
- * ext/readline/readline.c (readline_s_delete_text): remove
- checking "$SAFE == 4".
+ * process.c: use the name "sargp" for struct rb_execarg variables
+ consistently for saving process attributes.
- * ext/readline/readline.c: fix rdoc, remove "Raises SecurityError"
- and add "Raises NotImplementedError".
+ * io.c: ditto.
-Tue Aug 6 22:04:38 2013 Kouji Takao <kouji.takao@gmail.com>
+Sat Jun 23 07:59:57 2012 Tanaka Akira <akr@fsij.org>
- * ext/readline/readline.c, test/readline/test_readline.rb: fix
- indent.
+ * process.c: use the name "eargp" for struct rb_execarg variables
+ consistently except for saving process attributes.
-Tue Aug 6 21:59:56 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * io.c: ditto.
- * range.c (range_last): return nil for empty range, or in the case the
- predecessor is smaller than the begin. [Bug #8739]
+ * ext/pty/pty.c: ditto.
-Tue Aug 6 21:48:31 2013 Kouji Takao <kouji.takao@gmail.com>
+Wed Jun 20 18:27:03 2012 Yuki Yugui Sonoda <yugui@google.com>
- * ext/readline/readline.c (readline_s_set_point, Init_readline):
- add Readline.point=(pos). Patched by naruse. [ruby-dev:47535]
- [Feature #8675]
+ * common.mk: Add missing dependencies.
-Tue Aug 6 21:14:11 2013 Kouji Takao <kouji.takao@gmail.com>
+Fri Jun 22 20:27:39 2012 Tanaka Akira <akr@fsij.org>
- * 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]
+ * internal.h (rb_execarg): add pgroup_given and pgroup_pgid fields.
-Tue Aug 6 17:56:40 2013 Koichi Sasada <ko1@atdot.net>
+ * process.c (EXEC_OPTION_PGROUP): removed.
+ (rb_execarg_addopt): update the new fields, instead of options array.
+ (run_exec_pgroup): take a struct rb_execarg argument. refer the new
+ fields.
+ (rb_execarg_run_options): follow run_exec_pgroup change.
- * vm_insnhelper.c (vm_push_frame): change type of stack_max to size_t.
+Fri Jun 22 18:48:51 2012 Kouhei Sutou <kou@cozmixng.org>
-Tue Aug 6 17:42:47 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * README.EXT, README.EXT.ja: use "sval" for the third argument
+ name of Data_Wrap_Struct().
+ Suggested by @satoh_fumiyasu. Thanks!!!
- * range.c (range_last): exclude the last number of the exclusive range
- if the end is Numeric. [ruby-dev:47587] [Bug #8739]
+Fri Jun 22 18:04:26 2012 Koichi Sasada <ko1@atdot.net>
-Tue Aug 6 17:42:21 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * iseq.c, vm_eval.c: set th->base_block properly.
+ th->base_block is information for (a) parsing, (b) compiling
+ and (c) setting up the frame to execute the program passed by
+ `eval' method. For example, (1) parser need to know up-level
+ variables to detect it is variable or method without paren.
+ Befor (a), (b) and (c), VM set th->base_block by passed bindng
+ (or previous frame information). After execute (a), (b) and (c),
+ VM should clear th->base_block. However, if (a), (b) or (c)
+ raises an exception, then th->base_block is not cleared.
+ Problem is that the uncleared value th->balo_block is used for
+ irrelevant iseq compilation. It causes SEGV or critical error.
+ I tried to solve this problem: to clear them before exception,
+ but finally I found out that it is difficult to do it (Ruby
+ program can be run in many places).
+ Because of this background, I set th->base_block before
+ compiling iseq and restore it after compiling.
+ Basically, th->base_block is dirty hack (similar to global
+ variable) and this patch is also dirty.
- * win32/win32.c (rb_w32_conv_from_wchar): converted string to CP_UTF8
- should have UTF-8 encoding. otherwise no conversion takes place
- later.
+ * bootstraptest/test_eval.rb: add a test for above.
-Tue Aug 6 17:21:38 2013 Koichi Sasada <ko1@atdot.net>
+ * internal.h: remove unused decl.
- * 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.
+ * iseq.c (rb_iseq_compile_with_option): add base_block parameter.
+ set th->base_block before compilation and restore it after
+ compilation.
- * vm_core.h (CHECK_VM_STACK_OVERFLOW0): add to share the stack overflow
- checking code.
+ * ruby.c (require_libraries): pass 0 as base_block instead of
+ setting th->base_block
- * insns.def: catch up this change.
+ * tool/compile_prelude.rb (prelude_eval): apply above changes.
* vm.c, vm_eval.c: ditto.
- * test/ruby/test_exception.rb: add a stack overflow test.
- This code is reported by nobu.
+ * vm_core.h: add comments.
-Tue Aug 6 17:02:17 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Jun 22 18:19:38 2012 Tanaka Akira <akr@fsij.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.
+ * process.c: pass struct rb_execarg value instead of its options
+ field for saving process attribute changing functions.
+ (save_redirect_fd): take a struct rb_execarg argument.
+ (run_exec_dup2): ditto.
+ (run_exec_close): ditto.
+ (run_exec_open): ditto.
+ (run_exec_dup2_child): ditto.
+ (run_exec_pgroup): ditto.
+ (run_exec_rlimit): ditto.
+ (save_env): ditto.
+ (rb_execarg_run_options): follow the above functions change.
-Tue Aug 6 16:14:32 2013 Shugo Maeda <shugo@ruby-lang.org>
+Fri Jun 22 17:55:48 2012 Koichi Sasada <ko1@atdot.net>
- * vm_eval.c (eval_string_with_cref): copy cref to limit the scope of
- refinements in the eval string. [ruby-core:56329] [Bug #8722]
+ * test/ruby/test_backtrace.rb: decrease recursion depth
+ to reduce consuming stack size.
- * test/ruby/test_refinement.rb: related test.
+Fri Jun 22 13:36:50 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Aug 6 12:23:12 2013 Tanaka Akira <akr@fsij.org>
+ * random.c (random_init, random_load): cannot initialize frozen object
+ again, nor with tainted/untrusted object. [Bug #6540]
- * bignum.c (rb_big_realloc): Use VALGRIND_MAKE_MEM_UNDEFINED to
- declare undefined memory area.
- (bignew_1): Ditto.
+Fri Jun 22 13:32:33 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * internal.h (VALGRIND_MAKE_MEM_DEFINED): Moved from gc.c
- (VALGRIND_MAKE_MEM_UNDEFINED): Ditto.
+ * error.c (rb_check_copyable): new function, to ensure the target is
+ not frozen and the source is not tainted nor untrusted.
-Tue Aug 6 01:40:37 2013 Zachary Scott <e@zzak.io>
+Fri Jun 22 05:55:20 2012 Eric Hodel <drbrain@segment7.net>
- * process.c: [DOC] Document caveats of command form of Process.spawn
- with regard to the shell and OS. Patched by Steve Klabnik [Bug #8550]
+ * eval.c (ruby_cleanup): Fixed typo. Patch by Trever Dawe.
+ Fixes #131 (github). [ruby-trunk - Bug #6619]
-Tue Aug 6 01:28:35 2013 Zachary Scott <e@zzak.io>
+Thu Jun 21 21:16:58 2012 Tanaka Akira <akr@fsij.org>
- * lib/rss/0.9.rb: [DOC] Typo in example [Bug #8732]
+ * process.c (rb_execarg_addopt): take a VALUE argument instead of
+ struct rb_execarg.
+ (rb_exec_arg_addopt): follow the rb_execarg_addopt change.
+ (check_exec_options_i): ditto.
-Tue Aug 6 01:22:37 2013 Zachary Scott <e@zzak.io>
+ * io.c (pipe_open): follow the rb_execarg_addopt change.
- * lib/rss/2.0.rb: [DOC] Document RSS::Rss by Steve Klabnik #8740
- * lib/rss/atom.rb: [DOC] Typo in rdoc by Steve Klabnik
+ * internal.h (rb_execarg_addopt): follow the definition change.
-Mon Aug 5 23:47:59 2013 Tanaka Akira <akr@fsij.org>
+Thu Jun 21 20:34:19 2012 Tanaka Akira <akr@fsij.org>
- * bignum.c: Rename local variables.
+ * process.c (rb_exec_fillarg): take a VALUE argument instead of
+ struct rb_execarg.
+ (rb_check_exec_options): ditto.
+ (check_exec_options_i): ditto.
-Mon Aug 5 22:23:59 2013 Zachary Scott <e@zzak.io>
+Thu Jun 21 19:48:05 2012 Tanaka Akira <akr@fsij.org>
- * 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
+ * process.c (rb_exec_async_signal_safe): use rb_execarg_run_options
+ instead of rb_run_exec_options_err.
+ (rb_spawn_process): ditto.
-Mon Aug 5 17:38:15 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Jun 21 19:02:43 2012 Tanaka Akira <akr@fsij.org>
- * 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]
+ * process.c (rb_exec_fillarg): take a VALUE argument instead of
+ struct rb_execarg.
+ (rb_execarg_init): follow the rb_exec_fillarg change.
- * 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.
+Thu Jun 21 18:36:43 2012 Tanaka Akira <akr@fsij.org>
-Mon Aug 5 11:51:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * process.c (rb_execarg_init): take a VALUE argument instead of
+ struct rb_execarg.
+ (rb_execarg_new): follow the rb_execarg_init change.
+ (rb_exec_arg_init): ditto.
- * include/ruby/encoding.h: document which user flags are used by
- ENCODING_MASK for better greppability
+ * internal.h (rb_execarg_init): follow the definition change.
-Mon Aug 5 10:01:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+Thu Jun 21 17:20:44 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * object.c (rb_class_inherited_p): allow iclasses to be tested for
- inheritance. [Bug #8686] [ruby-core:56174]
+ * parse.y (new_args_tail_gen): fix GC problem of keyword rest
+ argument. the wrapped struct should be bound to the wrapping node
+ before assignment of child nodes, to get rid of the case the
+ children are referred by only the struct pointer which is not a
+ subject of GC. [ruby-core:45744]
- * test/ruby/test_method.rb: add test
+Thu Jun 21 07:06:52 2012 Koichi Sasada <ko1@atdot.net>
-Mon Aug 5 06:13:48 2013 Zachary Scott <e@zzak.io>
+ * error.c (err_append): rename err_append() to compile_err_append()
+ and move definition body. err_append() is used only by compiling.
- * enumerator.c: [DOC] Remove reference to Enumerator::Lazy#cycle
- Patch by @kachick [Fixes GH-372]
- https://github.com/ruby/ruby/pull/372
+Thu Jun 21 06:21:54 2012 Tanaka Akira <akr@fsij.org>
-Mon Aug 5 03:57:16 2013 Zachary Scott <e@zzak.io>
+ * process.c (rb_execarg_fixup): take a VALUE argument instead of
+ struct rb_execarg.
- * lib/rss/0.9.rb: [DOC] Document RSS09 by Steve Klabnik [Bug #8732]
+ * internal.h (rb_execarg_fixup): follow the definition change.
-Mon Aug 5 03:35:11 2013 Zachary Scott <e@zzak.io>
+ * io.c (pipe_open): follow rb_execarg_fixup change.
- * lib/rexml/attribute.rb: [DOC] Update example for #namespace
- Patch by Ippei Obayashi [Bug #8685] [ruby-core:56173]
+ * ext/pty/pty.c (establishShell): ditto.
-Sun Aug 4 21:08:29 2013 Masaki Matsushita <glass.saga@gmail.com>
+Wed Jun 20 21:25:37 2012 Tanaka Akira <akr@fsij.org>
- * array.c (rb_ary_zip): performance implement by using
- ALLOCA_N() to allocate tmp buffer.
+ * internal.h (struct rb_execarg): add umask_given and umask_mask
+ fields.
-Sun Aug 4 07:14:49 2013 Tanaka Akira <akr@fsij.org>
+ * process.c (STATIC_ASSERT): removed.
+ (rb_execarg_addopt): follow the rb_execarg change.
+ (rb_execarg_run_options): ditto.
- * README.EXT, README.EXT.ja: Mention rb_integer_pack and
- rb_integer_unpack.
+Wed Jun 20 20:38:23 2012 Tanaka Akira <akr@fsij.org>
-Sun Aug 4 01:54:45 2013 Tanaka Akira <akr@fsij.org>
+ * internal.h (struct rb_execarg) moved and renamed from
+ struct rb_exec_arg in intern.h.
- * 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.
+ * include/ruby/intern.h (struct rb_exec_arg): refer Data object which
+ contains struct rb_execarg.
-Sun Aug 4 00:57:58 2013 Tanaka Akira <akr@fsij.org>
+ * process.c: use struct rb_execarg instead of struct rb_exec_arg
+ except functions declared in intern.h.
+ (rb_exec_arg_addopt): extract a pointer to struct rb_execarg from
+ struct rb_exec_arg.
+ (rb_exec_arg_init): ditto.
+ (rb_exec_arg_fixup): ditto.
+ (rb_run_exec_options_err): ditto.
+ (rb_run_exec_options): ditto.
+ (rb_exec_err): ditto.
+ (rb_exec): ditto.
- * bignum.c (big2str_karatsuba): Don't allocate new temporary buffer
- if the buffer is enough for current invocation.
+ * io.c: use struct rb_execarg instead of struct rb_exec_arg.
-Sun Aug 4 00:22:34 2013 Tanaka Akira <akr@fsij.org>
+ * ext/pty/pty.c: ditto.
- * 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.
+Wed Jun 20 19:13:25 2012 Tanaka Akira <akr@fsij.org>
-Sat Aug 3 22:47:11 2013 Tanaka Akira <akr@fsij.org>
+ * internal.h (rb_execarg_new): declared.
+ (rb_execarg_get): ditto.
- * 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.
+ * process.c (mark_exec_arg): new function.
+ (free_exec_arg): ditto.
+ (memsize_exec_arg): ditto.
+ (exec_arg_data_type): defined.
+ (rb_execarg_new): new function.
+ (rb_execarg_get): ditto.
+ (rb_f_exec): use rb_execarg_new.
+ (rb_spawn_internal): ditto.
+ (rb_f_spawn): ditto.
-Sat Aug 3 22:23:31 2013 Tanaka Akira <akr@fsij.org>
+ * io.c (pipe_open_v): use rb_execarg_new.
+ (pipe_open_s): ditto.
- * 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.
+ * ext/pty/pty.c (establishShell): use rb_execarg_new.
-Sat Aug 3 13:30:04 2013 Tanaka Akira <akr@fsij.org>
+Wed Jun 20 16:36:14 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * 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.
+ * missing/setproctitle.c (environ): use (*_NSGetEnviron()) instead of
+ environ on Darwin for namespace cleanness, same as [ruby-core:00537].
+ [ruby-core:45615] [Bug #6576]
-Sat Aug 3 10:33:52 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Jun 20 11:33:04 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y (parser_set_integer_literal): use rb_rational_raw1() for
- integral rational because no reduction is needed with 1.
+ * process.c (rb_execarg_addopt): always make Fixnum, and ignore higher
+ bits in too large umask value.
-Sat Aug 3 09:46:07 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Jun 20 11:24:35 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/etc/etc.c (setup_passwd, setup_group): set proper encodings to
- string members.
+ * lib/test/unit.rb (Test::Unit::Runner#_run_parallel): deal with
+ sudden-death of workers.
-Sat Aug 3 09:30:57 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Jun 18 20:34:20 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * struct.c (rb_struct_define_under): new function to define Struct
- under the given namespace, not under Struct. [Feature #8264]
+ * time.c (init_leap_second_info): fix non-ANSI function declaration.
- * ext/etc/etc.c: use rb_struct_define_under.
+Mon Jun 18 20:29:04 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sat Aug 3 06:55:29 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * ruby.c (rb_f_sub): use ansi style declaration.
+ * ruby.c (rb_f_gsub): ditto.
+ * ruby.c (rb_f_chomp): ditto.
- * 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]
+Mon Jun 18 20:26:23 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sat Aug 3 04:23:48 2013 Eric Hodel <drbrain@segment7.net>
+ * random.c (rb_random_int32): get rid of "warning: constant 0x100000000
+ is so big it is long" warning.
- * doc/syntax/refinements.rdoc: Remove mention of instance_eval and
- module_eval from scope section per:
- http://twitter.com/shugomaeda/status/363219951336693761
+Mon Jun 18 20:07:23 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sat Aug 3 02:22:05 2013 Tanaka Akira <akr@fsij.org>
+ * dir.c (dir_initialize): get rid of "unused return: argc = rb_scan_args()"
+ warning.
- * bignum.c (big2str_orig): Refactored.
+Mon Jun 18 19:31:20 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sat Aug 3 01:20:19 2013 Tanaka Akira <akr@fsij.org>
+ * include/ruby/missing.h: include math.h before checking INFINITY
+ and NAN. Otherwise, strange macro redefinition will occur.
- * bignum.c (bigadd_core): Removed.
- (bigadd): Use bary_add instead of bigadd_core.
+Mon Jun 18 19:12:37 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sat Aug 3 00:52:43 2013 Tanaka Akira <akr@fsij.org>
+ * array.c (ary_reverse): use ansi style declaration.
- * bignum.c (rb_big2str1): Simplify power_level calculation.
+Tue Jun 19 18:43:50 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Aug 3 00:34:20 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * include/ruby/backward/rubysig.h: fix visibility. [Bug #6607]
- * array.c (rb_ary_zip): use rb_ary_new2() to create buffer
- if rb_block_arity() > 1.
+Tue Jun 19 17:51:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Aug 3 00:12:00 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * process.c (rb_execarg_run_options): do not call any methods in the
+ async-signal-safe function. mask has been checked with NUM2MODET()
+ already and converted with LONG2NUM().
- * NEWS: Add the description that IO#seek supports SEEK_DATA
- and SEEK_HOLE.
+Tue Jun 19 11:59:56 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Fri Aug 2 23:57:57 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * ext/readline/readline.c (Init_readline): don't set 0 to
+ rl_catch_signals and rl_catch_sigwinch. [Bug #5423]
- * 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 Jun 19 11:52:59 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * test/ruby/test_syntax.rb (TestSyntax#test_value_of_def): test for
- above changes.
+ * ext/readline/readline.c (readline_s_get_special_prefixes): suppress
+ warning: uninitialized instance variable.
-Fri Aug 2 23:54:11 2013 Masaki Matsushita <glass.saga@gmail.com>
+Tue Jun 19 11:43:16 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * array.c (rb_ary_zip): performance improvement by avoiding
- array creation if rb_block_arity() > 1.
+ * ext/readline/readline.c (readline_getc): fix editline compatibility
+ broken by r36123. [Bug #6601]
-Fri Aug 2 23:50:53 2013 Tanaka Akira <akr@fsij.org>
+Mon Jun 18 17:10:08 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (power_cache_get_power): Apply bigtrunc to the result of
- bigsq.
- (big2str_karatsuba): Fix number of leading zero characters.
+ * string.c (rb_str_subpos): split from rb_str_substr. returns
+ adjusted position for substring.
-Fri Aug 2 23:48:36 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Jun 18 10:42:57 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y (parser_yylex): calculate denominator directly as powers of
- ten, not parsing string.
+ * ext/readline/readline.c (readline_getc): deal with ESC just followed
+ by ASCII as meta prefix in incremental search mode. based on the
+ patch from rctay (Tay Ray Chuan) at [ruby-core:45682]. [Bug #6601]
- * parse.y (parser_number_literal_suffix): return bit set of found
- suffixes.
+Sun Jun 17 22:23:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y (parser_set_number_literal, parser_set_integer_literal):
- split from parser_number_literal_suffix to set yylval.
+ * dir.c (rb_file_directory_p): move documentation for Dir.exist? from
+ file.c so that the proper description will be shown instead of the
+ documentation of File.directory?. [ruby-core:45685]
- * parse.y (parser_yylex): parse rational number literal with decimal
- point precisely.
+Sun Jun 17 16:21:01 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y (simple_numeric): integrate numeric literals and simplify
- numeric rules.
+ * thread_win32.h (rb_thread_lock_t): make a union for USE_WIN32_MUTEX.
+ this internal is used only in thread_win32.c, but has to be complete
+ to define rb_thread_t.
- * ext/ripper/eventids2.c (ripper_init_eventids2): ripper support for
- new literals, tRATIONAL and tIMAGINARY.
+ * thread_win32.c (native_mutex_lock, native_mutex_destroy): fix for
+ USE_WIN32_MUTEX.
-Fri Aug 2 18:33:28 2013 Tanaka Akira <akr@fsij.org>
+ * thread_win32.c (native_cond_timedwait_ms): rename reserved pattern
+ name. user defined symbols should not start with __.
- * bignum.c (big2str_karatsuba): Reduce power_level more than one at
- recursion, if possible.
- (rb_big2str1): Follow the above change.
+Sat Jun 16 19:24:01 2012 Tadayoshi Funaba <tadf@dotrb.org>
-Fri Aug 2 12:25:15 2013 Tanaka Akira <akr@fsij.org>
+ * ext/date/date_core.c: define date_sg_t.
- * 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.
+Sat Jun 16 18:46:57 2012 Tadayoshi Funaba <tadf@dotrb.org>
-Fri Aug 2 10:39:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * ext/date/date_tmx.h: offset in struct tmx_funcs is now int.
+ * ext/date/date_strftime.c: ditto.
+ * ext/date/date_core.c: ditto.
- * 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]
+Sat Jun 16 18:31:46 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bootstraptest/test_literal_suffix.rb (assert_equal): add test
+ * eval.c (ruby_setup): set running state in the normal case before
+ popping a tag.
-Fri Aug 2 09:14:47 2013 Eric Hodel <drbrain@segment7.net>
+Sat Jun 16 07:46:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * doc/syntax/refinements.rdoc: Improve description of where you may
- activate refinements.
+ * lib/test/unit.rb (Test::Unit::Runner#_run_parallel): format workers
+ results in the parent.
-Fri Aug 2 07:45:55 2013 Tanaka Akira <akr@fsij.org>
+Sat Jun 16 07:12:56 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (big2str_orig): Remove len argument.
- (big2str_karatsuba): Ditto.
- (rb_big2str1): Follow above change.
+ * tool/runruby.rb (File.realpath): return real path of expanded path.
+ [Bug #6598]
-Thu Aug 2 02:32:00 2013 Kenta Murata <mrkn@mrkn.jp>
+Sat Jun 16 07:12:28 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * NEWS: Add the description of number literal suffixes.
+ * bootstraptest/runner.rb (main): ignore -j option for compatibility
+ with test/unit.
-Thu Aug 2 00:02:00 2013 Kenta Murata <mrkn@mrkn.jp>
+Sat Jun 16 07:11:52 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bootstraptest/test_literal_suffix.rb: add two test cases to
- examine that "1if true" and "1rescue nil" are recognized as 1.
+ * lib/test/unit.rb (Test::Unit::Runner#puke): modify only result and
+ drop useless reports, not override entirely.
-Thu Aug 1 23:45:00 2013 Kenta Murata <mrkn@mrkn.jp>
+ * lib/test/unit/parallel.rb (Test::Unit::Worker#_run_suite): report
+ unformatted results. formatting messages is not a workers task.
- * rational.c (rb_flt_rationalize_with_prec): new public C function
- to rationalize a Float instance with a precision.
+ * lib/test/unit/parallel.rb (Test::Unit::Worker#puke): store raw
+ results.
- * rational.c (rb_flt_rationalize): new public C function to
- rationalize a Float instance. A precision is calculated from
- the given float number.
+Sat Jun 16 01:27:14 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * include/ruby/intern.h: Add rb_flt_rationalize_with_prec and
- rb_flt_rationalize.
+ * ext/psych/lib/psych.rb: bumping psych to 1.3.3
+ * ext/psych/psych.gemspec: ditto
- * parse.y: implement number literal suffixes, 'r' and 'i'.
- [ruby-core:55096] [Feature #8430]
+Fri Jun 15 20:54:28 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
- * bootstraptest/test_literal_suffix.rb: add tests for parser to scan
- number literals with the above tsuffixes.
+ * vm_backtrace.c (backtrace_collect): rename from backtreace_collect.
-Thu Aug 1 23:55:08 2013 Tanaka Akira <akr@fsij.org>
+Fri Jun 15 19:22:13 2012 Koichi Sasada <ko1@atdot.net>
- * bignum.c (rb_big2str1): Remove a local variable.
+ * vm_core.h: remove VM_FRAME_MAGIC_FINISH (finish frame type).
+ Before this commit:
+ `finish frame' was place holder which indicates that VM loop
+ needs to return function.
+ If a C method calls a Ruby methods (a method written by Ruby),
+ then VM loop will be (re-)invoked. When the Ruby method returns,
+ then also VM loop should be escaped. `finish frame' has only
+ one instruction `finish', which returns VM loop function.
+ VM loop function executes `finish' instruction, then VM loop
+ function returns itself.
+ With such mechanism, `leave' instruction (which returns one
+ frame from current scope) doesn't need to check that this `leave'
+ should also return from VM loop function.
+ Strictly, one branch can be removed from `leave' instruction.
+ Consideration:
+ However, pushing the `finish frame' needs costs because
+ it needs several memory accesses. The number of pushing
+ `finish frame' is greater than I had assumed. Of course,
+ pushing `finish frame' consumes additional control frame.
+ Moreover, recent processors has good branch prediction,
+ with which we can ignore such trivial checking.
+ After this commit:
+ Finally, I decide to remove `finish frame' and `finish'
+ instruction. Some parts of VM depend on `finish frame',
+ so the new frame flag VM_FRAME_FLAG_FINISH is introduced.
+ If this frame should escape from VM function loop, then
+ the result of VM_FRAME_TYPE_FINISH_P(cfp) is true.
+ `leave' instruction checks this flag every time.
+ I measured performance on it. However on my environments,
+ it improves some benchmarks and slows some benchmarks down.
+ Maybe it is because of C compiler optimization parameters.
+ I'll re-visit here if this cause problems.
-Thu Aug 1 23:33:01 2013 Tanaka Akira <akr@fsij.org>
+ * insns.def (leave, finish): remove finish instruction.
- * bignum.c (rb_cstr_to_inum): Use power_cache_get_power.
+ * vm.c, vm_eval.c, vm_exec.c, vm_backtrace.c, vm_dump.c:
+ apply above changes.
-Thu Aug 1 21:02:48 2013 Tanaka Akira <akr@fsij.org>
+Fri Jun 15 19:11:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (rb_big2str1): Raise an error for too big number.
+ * lib/test/unit.rb (Test::Unit::Runner#puke): always add skipped
+ results to the report for parallel test. [Bug #6595]
-Thu Aug 1 20:46:29 2013 Tanaka Akira <akr@fsij.org>
+Fri Jun 15 09:01:35 2012 Yuki Yugui Sonoda <yugui@google.com>
- * bignum.c (power_cache_get_power): Hide cached Bignum objects.
+ * nacl/pepper_main.c: Removed an unnecessary and erroneous inclusion.
-Thu Aug 1 19:15:05 2013 Tanaka Akira <akr@fsij.org>
+Thu Jun 14 22:59:56 2012 Nobuyoshi Nakada <nobu@ruby-lang.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.
+ * configure.in (RUBY_CPPOUTFILE): check if output is really sent to
+ specified file to tell if -o option works. [ruby-dev:45742]
+ [Bug#6591]
-Thu Aug 1 12:37:58 2013 Tanaka Akira <akr@fsij.org>
+ * configure.in (RUBY_CPPOUTFILE): check if output file is actually
+ created. [ruby-dev:45742] [Bug#6591]
- * 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.
+Thu Jun 14 22:10:50 2012 Tanaka Akira <akr@fsij.org>
-Thu Aug 1 07:36:27 2013 Tanaka Akira <akr@fsij.org>
+ * process.c (proc_exec_sh): don't strip leading spaces of the script.
- * bignum.c (big2str_orig): Use temporary buffer when trim mode.
+Thu Jun 14 15:54:02 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Thu Aug 1 06:28:48 2013 Tanaka Akira <akr@fsij.org>
+ * file.c (rb_file_s_basename, rb_file_s_dirname): documentation fix.
+ File.basename and File.dirname support File::ALT_SEPARATOR.
- * bignum.c (big2str_orig): Simplified because RBIGNUM_LEN(x) <= 2 now.
- (big2str_struct): Two fields added: hbase2, hbase2_numdigits.
- (rb_big2str1): Initialize above fields.
+Thu Jun 14 11:10:10 2012 Yuki Yugui Sonoda <yugui@google.com>
-Thu Aug 1 04:06:17 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * nacl/pepper_main.c: Applies the new embedding API to pepper_ruby.
- * 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]
+Thu Jun 14 10:44:41 2012 Yuki Yugui Sonoda <yugui@google.com>
- * test/test_rdoc_markup_pre_process.rb (TestRDocMarkupPreProcess#setup):
- fix input_file_name, as the test script is not pre-processed.
+ * include/ruby/ruby.h: Grouped APIs for embedding CRuby interpreter.
+ (ruby_setup, ruby_compile_main_from_file,
+ ruby_compile_main_from_string, ruby_eval_main,
+ ruby_set_script_name): new APIs to embed CRuby.
+ (ruby_opaque_t) Opaque pointer to an internal data, to NODE or iseq
+ in particular.
-Thu Aug 1 01:45:18 2013 Tanaka Akira <akr@fsij.org>
+ * eval.c (ruby_setup): Similar to ruby_init but returns an error code
+ instead of exit(3) on error.
+ (ruby_eval_main): Similar to ruby_exec_node but returns the
+ evaluation result.
+ (ruby_eval_main_internal): renamed from ruby_exec_internal.
- * bignum.c (big2str_karatsuba): Fix a condition of power_level.
+ * ruby.c (toplevel_context): new helper function.
+ (PREPARE_EVAL_MAIN): moved.
+ (process_options): refactored with new functions.
+ (parse_and_compile_main) new helper function.
+ (ruby_compile_main_from_file, ruby_compile_main_from_string) new API
+ (ruby_set_script_name): new API.
-Thu Aug 1 01:09:02 2013 Tanaka Akira <akr@fsij.org>
- * 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.
+Thu Jun 14 10:39:48 2012 Yuki Yugui Sonoda <yugui@google.com>
-Wed Jul 31 23:59:28 2013 Tanaka Akira <akr@fsij.org>
+ * eval.c: Add doxygen comments.
- * bignum.c (big2str_find_n1): Change the return type to size_t.
- (big2str_orig): Ditto.
- (big2str_karatsuba): Ditto.
- (rb_big2str1): Follow the above changes.
+ * ruby.c: ditto.
-Wed Jul 31 23:19:06 2013 Tanaka Akira <akr@fsij.org>
+ * thread_pthread.c: 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.
+ * version.c: ditto.
-Wed Jul 31 22:59:47 2013 Kouhei Sutou <kou@cozmixng.org>
+ * vm_core.h: ditto.
- * test/rexml/parse/test_notation_declaration.rb: Change class
- name to follow file name change.
+Thu Jun 14 10:16:07 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Wed Jul 31 22:57:50 2013 Kouhei Sutou <kou@cozmixng.org>
+ * configure.in: revert r36071 and add NetBSD to blacklist of -ansi.
- * test/rexml/test_notationdecl_parsetest.rb: Rename to ...
- * test/rexml/parse/test_notation_declaration.rb: ... this.
+Thu Jun 14 07:59:12 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Wed Jul 31 22:54:39 2013 Kouhei Sutou <kou@cozmixng.org>
+ * thread_pthread.c (get_stack): Linux is the only OS which includes
+ the size of guard page into the stack size.
- * test/rexml/test_notationdecl_mixin.rb: Remove duplicated tests.
+Thu Jun 14 06:21:00 2012 Eric Hodel <drbrain@segment7.net>
-Wed Jul 31 22:52:55 2013 Kouhei Sutou <kou@cozmixng.org>
+ * lib/drb/drb.rb: Replace broken links to the English DRb book.
+ Patch by Zachary Scott. [ruby-trunk - Bug #6544]
- * test/rexml/test_notationdecl_parsetest.rb: Fix typos in expected
- value.
- pubilc ->
- public
- ^^
+Thu Jun 14 06:17:47 2012 Eric Hodel <drbrain@segment7.net>
-Wed Jul 31 22:50:51 2013 Kouhei Sutou <kou@cozmixng.org>
+ * lib/observer.rb: Update broken link to the Programming Ruby book.
+ Patch by Zachary Scott. [ruby-trunk - Bug #6536]
+ * lib/drb/drb.rb: ditto.
- * test/rexml/test_notationdecl_parsetest.rb: Add tests that focus
- system literal in external ID system notation declaration.
+Thu Jun 14 05:23:05 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Wed Jul 31 22:36:21 2013 Tanaka Akira <akr@fsij.org>
+ * regparse.c (PFETCH_READY): suppress Wunused-but-set-variable.
- * 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.
+ * regparse.c (is_onechar_cclass): restructured to clarify that c is
+ used iff found == 1.
-Wed Jul 31 22:04:36 2013 Kouhei Sutou <kou@cozmixng.org>
+Thu Jun 14 02:54:17 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * test/rexml/test_notationdecl_parsetest.rb: Fix a typo.
- Extern ID ->
- ExternalID
- ^^
+ * configure.in: use -fbuiltin with -ansi -std=iso9899:199409.
+ This prevents errors introduced by disabling builtin functions,
+ which is the sub-effect of -ansi/-std.
+ Now NetBSD can use -ansi -std=iso9899:199409.
+ Maybe mingw, cygwin and darwin can also.
-Wed Jul 31 22:01:36 2013 Kouhei Sutou <kou@cozmixng.org>
+Thu Jun 14 02:53:30 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * test/rexml/test_notationdecl_parsetest.rb: Add tests that focus
- public ID in external ID notation declaration.
+ * Makefile.in: don't remove macros. now name2ctype uses macros.
-Wed Jul 31 22:01:24 2013 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+ * tool/enc-unicode.rb: add comment why it uses Hash#index.
- * parse.y: fix build error with bison-3.0.
+ * enc/unicode/{name2ctype.kwd,name2ctype.src,name2ctype.h.blt}:
+ update to follow the current name2ctype.h.
+ FYI current Unicode version is 6.1.
-Wed Jul 31 21:58:53 2013 Kouhei Sutou <kou@cozmixng.org>
+Thu Jun 14 00:16:59 2012 Akinori MUSHA <knu@iDaemons.org>
- * test/rexml/test_notationdecl_parsetest.rb: Split test patterns.
+ * lib/net/http/responses.rb, lib/webrick/httpstatus.rb: Add HTTP
+ response codes added in RFCs 2817 and 4918. [ruby-core:45547]
+ [Feature #6569]
-Wed Jul 31 21:42:33 2013 Kouhei Sutou <kou@cozmixng.org>
+ * lib/net/http/responses.rb: Rename Net::HTTPMultipleChoice to
+ Net::HTTPMultipleChoices, leaving the former as alias to the
+ latter for backward compatibility. [ruby-core:45547]
+ [Feature #6569]
- * test/rexml/test_notationdecl_parsetest.rb: Group tests.
+ * lib/net/http/responses.rb: Add comments about unused,
+ still-in-draft and private extension response codes.
+ [ruby-core:45547] [Feature #6569]
-Wed Jul 31 21:37:51 2013 Kouhei Sutou <kou@cozmixng.org>
+Wed Jun 13 22:44:32 2012 Naohisa Goto <ngotogenome@gmail.com>
- * test/rexml/test_notationdecl_mixin.rb (TestNotationDecl#test_name):
- Move to ...
- * test/rexml/test_notationdecl_parsetest.rb
- (TestNotationDecl#test_name): ... here.
+ * test/dl/test_func.rb (test_qsort1, test_qsort2): use TYPE_SIZE_T
+ for size_t variables. [ruby-dev:45733] [Bug #6584]
-Wed Jul 31 21:37:47 2013 Kouhei Sutou <kou@cozmixng.org>
+Wed Jun 13 22:18:01 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Jul 31 21:31:49 2013 Kouhei Sutou <kou@cozmixng.org>
+ * configure.in: remove -ansi and -std options for lgamma_r() and
+ finite().
- * test/rexml/test_notationdecl_parsetest.rb: Remove setup because it
- doesn't share anything with other tests.
+Wed Jun 13 21:46:34 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Jul 31 21:24:55 2013 Kouhei Sutou <kou@cozmixng.org>
+ * configure.in: cygwin does not provide some declarations in strict
+ ANSI mode.
- * 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.
+Wed Jun 13 20:19:59 2012 Tanaka Akira <akr@fsij.org>
-Wed Jul 31 21:20:08 2013 Kouhei Sutou <kou@cozmixng.org>
+ * process.c (rb_fork_internal): move a variable declaration.
- * test/rexml/test_notationdecl_parsetest.rb: remove a needless shebang.
+Wed Jun 13 17:54:38 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
-Wed Jul 31 20:11:01 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * regparse.c (PFETCH_READY): this line was to suppress warning,
+ but did emit warnings if -Wuninitialized was set. Assigning
+ NULL instead if pfetch_prev should suffice the situation.
- * string.c (rb_str_rindex): fix bug introduced in r42269.
- "".rindex("") should return 0.
- (str_rindex): ditto.
+Wed Jun 13 17:51:05 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Jul 31 19:55:33 2013 Tanaka Akira <akr@fsij.org>
+ * configure.in: cygwin needs C99 for some stuff, e.g.,
+ pthread_attr_setstacksize, sched_yield.
- * 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.
+Wed Jun 13 17:50:43 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Jul 31 18:32:25 2013 Akinori MUSHA <knu@iDaemons.org>
+ * Makefile.in (.c.i): add warnflags to make the result consistent with
+ compilation.
- * lib/uri/common.rb (URI.decode_www_form_component): Use String#b.
+Wed Jun 13 15:12:07 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
-Wed Jul 31 18:24:02 2013 Shugo Maeda <shugo@ruby-lang.org>
+ * configure.in: On Windows platforms, system provided headers are
+ VC++ optimized. That is, C++ habits are often contaminated into
+ various headers. Most frequent situation is the use of //
+ comments. We bypass ANSI C mode for them. Otherwise extension
+ libs cannot include those headers.
- * eval.c (rb_mod_refine, mod_using, top_using): don't show
- warnings because Refinements are no longer experimental.
- [ruby-core:55993] [Feature #8632]
+Wed Jun 13 13:39:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/ruby/test_refinement.rb: related test.
+ * include/ruby/win32.h: get rid of C99 style one line comments.
- * NEWS: fixes for the above change.
+Wed Jun 13 13:39:04 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Jul 31 17:55:55 2013 Shota Fukumori <her@sorah.jp>
+ * encoding.c (enc_alias_internal): use strdup defined as macro.
- * lib/uri/common.rb (URI.decode_www_form_component):
- Don't raise error when str includes multibyte characters.
+Wed Jun 13 10:20:27 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Jul 31 17:45:39 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * process.c (rb_exec_fillarg): get rid of SIZE_T_MAX which may need
+ more headers.
- * string.c (rb_str_rindex): performance improvement by using
- memrchr(3).
+ * process.c (rb_exec_fillarg): fix array element size. "continue" and
+ "readonly" exceeded the size.
-Wed Jul 31 16:43:30 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * process.c (rb_exec_fillarg): use shell if the first word is reserved
+ or special built-in name.
+ http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html
- * string.c (rb_str_rindex): refactoring and avoid to call str_nth() if
- pos == 0.
+ * process.c (rb_exec_fillarg): treat '=' only in the first word. if
+ the first word does not contain '=', it is the command name and
+ environment assignments cannot be anymore.
-Wed Jul 31 14:41:36 2013 Akinori MUSHA <knu@iDaemons.org>
+Tue Jun 12 23:45:36 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * lib/set.rb: [DOC] Add a couple of notes on Hash as storage.
- ref. [Feature #6589]
+ * lib/mkmf.rb: add dummy clean-static target to prevent errors for the
+ case real clean-static target doesn't exist.
-Wed Jul 31 14:38:52 2013 Akinori MUSHA <knu@iDaemons.org>
+Tue Jun 12 22:49:42 2012 Naohisa Goto <ngotogenome@gmail.com>
- * lib/set.rb: [DOC] Fix example result. Hash is now ordered.
+ * process.c (rb_exec_arg_fixup): fix compile error
-Wed Jul 31 14:38:10 2013 Akinori MUSHA <knu@iDaemons.org>
+Tue Jun 12 21:40:13 2012 Tanaka Akira <akr@fsij.org>
- * lib/set.rb: [DOC] Use the term "sorted" instead of "ordered"
- when mentioning SortSet.
+ * process.c (rb_exec_fillarg): treat '=' character as a meta
+ character to detect assignments preceding command name.
-Wed Jul 31 12:18:47 2013 Tanaka Akira <akr@fsij.org>
+Tue Jun 12 20:29:19 2012 Tanaka Akira <akr@fsij.org>
- * bignum.c (big2str_struct): New structure.
- (big2str_orig): Use big2str_struct.
- (big2str_karatsuba): Ditto.
- (rb_big2str1): Ditto.
+ * include/ruby/intern.h (rb_exec_arg_init): deprecated.
+ (rb_exec_arg_addopt): ditto.
+ (rb_exec_arg_fixup): ditto.
+ (rb_run_exec_options): ditto.
+ (rb_run_exec_options_err): ditto.
-Wed Jul 31 12:02:16 2013 Zachary Scott <e@zzak.io>
+ * internal.h (rb_execarg_init): declared.
+ (rb_execarg_addopt): ditto.
+ (rb_execarg_fixup): ditto.
+ (rb_execarg_run_options): ditto.
- * lib/rubygems.rb: [DOC] typo in url patch by @Red54 [Fixes #369]
- https://github.com/ruby/ruby/pull/369
+ * process.c: call rb_execarg_addopt, rb_execarg_fixup,
+ rb_execarg_run_options, rb_execarg_init.
+ (rb_execarg_addopt): renamed from rb_exec_arg_addopt.
+ (rb_exec_arg_addopt): stub to call rb_execarg_addopt.
+ (rb_execarg_init): renamed from rb_exec_arg_init.
+ (rb_exec_arg_init): stub to call rb_execarg_init.
+ (rb_execarg_fixup): renamed from rb_exec_arg_fixup.
+ (rb_exec_arg_fixup): stub to call rb_execarg_fixup.
+ (rb_execarg_run_options): renamed from rb_run_exec_options_err.
+ (rb_run_exec_options_err): stub to call rb_execarg_run_options.
+ (rb_run_exec_options): call rb_execarg_run_options.
-Wed Jul 31 07:09:07 2013 Eric Hodel <drbrain@segment7.net>
+ * io.c: call rb_execarg_addopt, rb_execarg_fixup,
+ rb_execarg_run_options, rb_execarg_init.
- * lib/rubygems: Import RubyGems from master as of commit 523551c
- * test/rubygems: ditto.
+ * ext/pty/pty.c (establishShell): call rb_execarg_init and
+ rb_execarg_fixup.
-Tue Jul 30 22:21:54 2013 Masaki Matsushita <glass.saga@gmail.com>
+Tue Jun 12 18:39:59 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
- * test/ruby/test_hash.rb: add a test for enumeration order of Hash.
+ * configure.in: enable strict ANSI mode by default in case of GCC,
+ requested by _ko1.
-Tue Jul 30 18:52:27 2013 Akinori MUSHA <knu@iDaemons.org>
+Tue Jun 12 06:40:23 2012 Tanaka Akira <akr@fsij.org>
- * 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.
+ * process.c (rb_exec_fillarg): detect '#' as a meta character.
-Tue Jul 30 17:16:15 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Jun 11 22:15:44 2012 Tanaka Akira <akr@fsij.org>
- * sprintf.c (ruby__sfvextra): add QUOTE flag to escape unprintable
- characters.
+ * include/ruby/intern.h (rb_proc_exec_n): deprecated.
+ (rb_exec): ditto.
+ (rb_exec_err): ditto.
+ (rb_fork): ditto.
+ (rb_fork_err): ditto.
-Tue Jul 30 11:00:52 2013 Zachary Scott <e@zzak.io>
+Mon Jun 11 18:49:52 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * ext/curses/extconf.rb: [DOC] nodoc to reduce Object pollution
+ * configure.in: on checking libexecinfo, don't specify /use/local.
+ On FreeBSD people must specify --with-opt-dir or --with-execinfo-dir.
-Tue Jul 30 08:19:42 2013 Tanaka Akira <akr@fsij.org>
+Mon Jun 11 12:14:37 2012 Koichi Sasada <ko1@atdot.net>
+
+ * vm_core.h: remove lfp (local frame pointer) and rename
+ dfp (dynamic frame pointer) to ep (environment pointer).
+ This change make VM `normal' (similar to other interpreters).
+ Before this commit:
+ Each frame has two env pointers lfp and dfp. lfp points
+ local environment which is method/class/toplevel frame.
+ lfp[0] is block pointer.
+ dfp is block local frame. dfp[0] points previous (parent)
+ environment pointer.
+ lfp == dfp when frame is method/class/toplevel.
+ You can get lfp from dfp by traversing previous environment
+ pointers.
+ After this commit:
+ Each frame has only `ep' to point respective environment.
+ If there is parent environment, then ep[0] points parent
+ environment (as dfp). If there are no more environment,
+ then ep[0] points block pointer (as lfp). We call such ep
+ as `LEP' (local EP). We add some macros to get LEP and to
+ detect LEP or not.
+ In short, we replace dfp and lfp with ep and LEP.
+ rb_block_t and rb_binding_t member `lfp' and `dfp' are removed
+ and member `ep' is added.
+ rename rb_thread_t's member `local_lfp' and `local_svar' to
+ `root_lep' and `root_svar'.
+ (VM_EP_PREV_EP(ep)): get previous environment pointer. This macro
+ assume that ep is not LEP.
+ (VM_EP_BLOCK_PTR(ep)): get block pointer. This macro assume
+ that ep is LEP.
+ (VM_EP_LEP_P(ep)): detect ep is LEP or not.
+ (VM_ENVVAL_BLOCK_PTR(ptr)): make block pointer.
+ (VM_ENVVAL_BLOCK_PTR_P(v)): detect v is block pointer.
+ (VM_ENVVAL_PREV_EP_PTR(ptr)): make prev environment pointer.
+ (VM_ENVVAL_PREV_EP_PTR_P(v)): detect v is prev env pointer.
+
+ * vm.c: apply above changes.
+ (VM_EP_LEP(ep)): get LEP.
+ (VM_CF_LEP(cfp)): get LEP of cfp->ep.
+ (VM_CF_PREV_EP(cfp)): utility function VM_EP_PREV_EP(cfp->ep).
+ (VM_CF_BLOCK_PTR(cfp)): utility function VM_EP_BLOCK_PTR(cfp->ep).
+
+ * vm.c, vm_eval.c, vm_insnhelper.c, vm_insnhelper.h, insns.def:
+ apply above changes.
- * sizes.c (Init_sizes): Define sizes only if the type actually exists.
+ * cont.c: ditto.
-Mon Jul 29 22:55:26 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * eval.c, eval_intern.h: ditto.
- * sizes.c (Init_sizes): define RbConfig::SIZEOF. [Feature #8568]
+ * proc.c: ditto.
-Mon Jul 29 22:25:20 2013 Zachary Scott <e@zzak.io>
+ * thread.c: ditto.
- * 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
+ * vm_dump.c: ditto.
-Mon Jul 29 22:16:11 2013 Tanaka Akira <akr@fsij.org>
+ * vm_exec.h: fix function name (on vm debug mode).
- * bignum.c (LOG2_KARATSUBA_BIG2STR_DIGITS): Renamed from
- LOG2_KARATSUBA_DIGITS.
- (KARATSUBA_BIG2STR_DIGITS): Renamed from KARATSUBA_DIGITS.
+Mon Jun 11 11:52:18 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
-Mon Jul 29 22:04:45 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * compile.c (iseq_set_sequence): nonstatic initializer of an
+ aggregate type is a C99ism.
- * hash.c (rb_hash_compare_by_id): add function prototype.
+ * compile.c (enum compile_array_type_t): comma at the end of enum
+ list is a C99ism.
-Mon Jul 29 21:53:41 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * vm_backtrace.c (enum LOCATION_TYPE): ditto.
- * hash.c (rb_hash_compare_by_id): don't call rb_hash_rehash()
- if self.compare_by_identity? == true.
+Mon Jun 11 06:31:33 2012 Tanaka Akira <akr@fsij.org>
-Mon Jul 29 21:29:48 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * process.c (rb_proc_exec_n): revert the function removed at r35889.
- * 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.
+Mon Jun 11 06:20:50 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * test/ruby/test_hash.rb: add a test for above.
+ * thread_pthread.c (rb_thread_create_timer_thread): assign return
+ value to the variable err.
-Mon Jul 29 21:15:30 2013 Akinori MUSHA <knu@iDaemons.org>
+Mon Jun 11 06:17:06 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * 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().
+ * thread_pthread.c (native_cond_initialize): fix typo in r36022.
+ this cause a failure on FreeBSD 8.2 amd64.
+ http://fbsd.rubyci.org/~chkbuild/ruby-trunk/log/20120610T130201Z.diff.html.gz
-Mon Jul 29 21:06:42 2013 Akinori MUSHA <knu@iDaemons.org>
+Mon Jun 11 05:21:57 2012 Koichi Sasada <ko1@atdot.net>
- * 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.
+ * .gdbinit (SDR): add SDR function. It's only for VM debugging.
- * enumerator.c (generator_init): Ditto.
+Sun Jun 10 21:50:45 2012 Yuki Sonoda (Yugui) <yugui@yugui.jp>
-Mon Jul 29 20:14:24 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * nacl/nacl_config.rb: Fixed for 32bit hosts.
- * hash.c (rb_hash_assoc): revert r42224. table->type->compare is
- called only if hashes are matched.
+Sun Jun 10 20:23:14 2012 Yuki Sonoda (Yugui) <yugui@yugui.jp>
- * test/ruby/test_hash.rb: add a test to check using #== to compare.
+ Fixes threading on NativeClient.
-Mon Jul 29 17:00:31 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * thread_pthread.c (timer_thread_sleep): Extracted out a function from
+ thread_timer(). Added an alternative implementation for platforms
+ that lacks select(2) or pipe(2).
+ (rb_thread_create_timer_thread, native_cond_initialize,
+ native_cond_destroy): Replaced wrong HAVE_XXX checks.
- * parse.y (yycompile): store file name as String to keep the encoding.
+ * configure.in (pthread_attr_init): New check.
- * parse.y (rb_parser_compile_string_path, rb_parser_compile_file_path):
- new functions to pass file name as a String.
+Sun Jun 10 21:30:11 2012 Tanaka Akira <akr@fsij.org>
- * parse.y (gettable_gen): return a copy of the original file name, not
- a copy in filesystem encoding.
+ * process.c (rb_exec_without_timer_thread): renamed from rb_exec_err.
+ (rb_exec_err): new stub function to call
+ rb_exec_without_timer_thread.
+ (rb_f_exec): call rb_exec_without_timer_thread.
+ (rb_exec): call rb_exec_without_timer_thread.
- * vm_eval.c (eval_string_with_cref): use Qundef instead of "(eval)".
+Sun Jun 10 21:13:10 2012 Tanaka Akira <akr@fsij.org>
-Mon Jul 29 16:53:18 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * process.c (rb_fork): call rb_fork_internal instead of rb_fork_err.
- * hash.c (rb_hash_initialize_copy): copy st_table type even if empty.
- [ruby-core:56256] [Bug #8703]
+Sun Jun 10 20:55:59 2012 Tanaka Akira <akr@fsij.org>
-Mon Jul 29 16:34:29 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * process.c (rb_fork_ruby): call rb_fork_internal directly.
- * hash.c (rb_hash_initialize_copy): clear old table before copy new
- table.
+Sun Jun 10 20:19:40 2012 Tanaka Akira <akr@fsij.org>
-Mon Jul 29 16:34:09 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * process.c (rb_fork_ruby): new function.
+ (rb_f_fork): use rb_fork_ruby instead of rb_fork.
+ (rb_daemon): ditto.
- * hash.c (rb_hash_assoc): aggregate object can be initialized only
- with link time constants.
+ * io.c (pipe_open): use rb_fork_ruby instead of rb_fork.
-Mon Jul 29 14:54:44 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * internal.h (rb_fork_ruby): declared.
- * hash.c (rb_hash_assoc): performance improvement by replacing
- compare function in RHASH(hash)->ntbl->type temporarily.
+Sun Jun 10 18:58:16 2012 Akinori MUSHA <knu@iDaemons.org>
-Mon Jul 29 14:52:46 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/net/http/response.rb: Remove a duplicated rdoc and leave a
+ pointer.
- * lib/mkmf.rb (xsystem): expand environment variable in all macros not
- expanded with RbConfig. [Bug #8702]
+ * lib/net/http/responses.rb: Add RFC numbers to base on.
- * test/mkmf/test_framework.rb (create_framework): replace all $@ not
- only once.
+Sun Jun 10 18:31:42 2012 Yuki Sonoda (Yugui) <yugui@yugui.jp>
-Mon Jul 29 06:54:30 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * configure.in (RUBY_NACL): Warns if $PATH does not contain the path
+ to NativeClient SDK. PATH variable redefinition in GNUmakefile does
+ not work for GNU make 3.81.
- * win32/win32.c (rb_w32_pipe): use enum for compile time constants,
- instead of const int for debugging.
+Sun Jun 10 17:54:36 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Jul 29 00:11:49 2013 Tanaka Akira <akr@fsij.org>
+ * gc.h (IS_STACK_DIR_UPPER): utility macro.
- * bignum.c (bigdivrem): Specialized implementation added for
- nx == 2 && ny == 2
+ * thread_pthread.c (get_stack): seems stack size does not include
+ guard size on Mac OS X.
-Sun Jul 28 20:28:41 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * thread_pthread.c (ruby_init_stack): adjust stack size for offset of
+ addr from the bottom.
- * io.c (io_getpartial): use rb_str_locktmp_ensure().
- [ruby-core:56121] [Bug #8669]
+Sun Jun 10 15:49:47 2012 Tanaka Akira <akr@fsij.org>
- * io.c (rb_io_sysread): ditto.
+ * process.c (retry_fork): call after_fork except in a child process.
+ (rb_fork_internal): restrict after_fork call condition.
- * test/ruby/test_io.rb: add tests for above.
+Sun Jun 10 14:19:33 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Sun Jul 28 20:10:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * configure.in: NetBSD 6 adds libexecinfo but it only works on amd64.
+ http://www.mail-archive.com/source-changes-full@netbsd.org/msg38729.html
- * ext/extmk.rb (extmake): should make static libraries for extensions
- to be statically linked. [Bug #7948]
+Sun Jun 10 12:43:23 2012 Tanaka Akira <akr@fsij.org>
-Sun Jul 28 17:38:32 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * process.c (rb_f_exec): call rb_exec_async_signal_safe except on
+ Mac OS X. cf. the comment in before_exec_non_async_signal_safe.
- * string.c: add internal API rb_str_locktmp_ensure().
+Sun Jun 10 12:15:18 2012 Tanaka Akira <akr@fsij.org>
- * io.c (io_fread): use rb_str_locktmp_ensure().
- [ruby-core:56121] [Bug #8669]
+ * io.c (popen_exec): don't call rb_thread_atfork_before_exec. use
+ rb_exec_async_signal_safe instead of rb_exec_err.
+ (pipe_open): use rb_fork_async_signal_safe instead of rb_fork_err.
- * test/ruby/test_io.rb: add a test for above.
+Sun Jun 10 11:44:57 2012 Tanaka Akira <akr@fsij.org>
-Sun Jul 28 13:04:39 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * process.c (rb_fork_internal): call after_fork only unless
+ chfunc_is_async_signal_safe.
- * 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]
+Sun Jun 10 11:33:01 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * test/ruby/test_io.rb: Add tests for above.
+ * ext/openssl/ossl_pkey_ec.c
+ test/openssl/test_pkey_ec.rb: Add support for EC_POINT_mul.
+ Patch provided by Sambasiva Suda. Thanks!
+ [ruby-core:44408][ruby-trunk - Feature #6310]
-Sun Jul 28 12:41:39 2013 Tanaka Akira <akr@fsij.org>
+Sun Jun 10 10:48:15 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * bignum.c (absint_numwords_generic): The char_bit variable changed
- to static constant.
+ * lib/openssl/ssl.rb: Use a simple random number to generate the
+ session id. MD5, as was used before, causes problems when
+ using a FIPS version of OpenSSL. Issue was found by Jared
+ Jennings, thank you!
+ [ruby-trunk - Bug #6137]
-Sun Jul 28 12:03:23 2013 Tanaka Akira <akr@fsij.org>
+Sun Jun 10 10:27:34 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * bignum.c: Constify bary_* functions.
+ * NEWS: Add note about the new private key export behavior.
-Sun Jul 28 11:12:07 2013 Tanaka Akira <akr@fsij.org>
+Sun Jun 10 10:24:51 2012 Tanaka Akira <akr@fsij.org>
- * 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]
+ * process.c (rb_exec_async_signal_safe): exported.
-Sun Jul 28 10:54:26 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/pty/extconf.rb: modify $INCFLAGS to include internal.h
- * win32/win32.c (rb_w32_pipe): fix pipe name formatting. as "%x" may
- not contain '0' at all, fill at fixed position instead.
+ * ext/pty/pty.c: include internal.h.
+ (chfunc): don't call rb_thread_atfork_before_exec. use
+ rb_exec_async_signal_safe instead of rb_f_exec.
+ (establishShell): set up earg. use rb_fork_async_signal_safe
+ instead of rb_fork_err.
-Sun Jul 28 00:35:14 2013 Tanaka Akira <akr@fsij.org>
+ * internal.h (rb_exec_async_signal_safe): declared.
+ (rb_fork_async_signal_safe): declared.
- * bignum.c (rb_big_size): Return the bignum "bytewise" size.
- [ruby-core:55578] [Feature #8553]
- This is accepted by matz on DevelopersMeeting20130727Japan.
+Sun Jun 10 10:21:37 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-Sun Jul 28 00:07:48 2013 Tanaka Akira <akr@fsij.org>
+ * ext/openssl/ossl.c
+ ext/openssl/ossl_pkey_rsa.c
+ ext/openssl/ossl_pkey_dsa.c
+ ext/openssl/ossl_pkey_ec.c: Forbid export passwords that are less
+ than four characters long, as OpenSSL itself does not allow this.
+ Issue found by Eric Hodel.
+ * ext/openssl/ossl_pkey_ec.c: Add export as an alias of to_pem,
+ following the PKey interface contract.
+ * test/openssl/test_pkey_dsa.rb
+ test/openssl/test_pkey_rsa.rb
+ test/openssl/test_pkey_ec.rb: Add tests that assert correct
+ behaviour when dealing with passwords that are less than four
+ characters long.
+ [ruby-core: 42281][ruby-trunk - Bug #5951]
- * include/ruby/intern.h (rb_integer_pack): Declaration moved from
- internal.h.
- (rb_integer_unpack): Ditto.
- [ruby-core:42813] [Feature #6065]
+Sun Jun 10 10:14:26 2012 Tanaka Akira <akr@fsij.org>
-Fri Jul 26 23:18:13 2013 Kouhei Sutou <kou@cozmixng.org>
+ * process.c (rb_f_exec): use rb_exec_arg_prepare.
- * NEWS: Add a new feature that REXML::Parsers::StreamParser
- supports "entity" event.
+Sun Jun 10 06:43:51 2012 Tanaka Akira <akr@fsij.org>
-Fri Jul 26 23:14:31 2013 Kouhei Sutou <kou@cozmixng.org>
+ * process.c: split after_exec into async-signal-safe part and rest.
+ (after_exec_async_signal_safe): extracted from after_exec.
+ (after_exec_non_async_signal_safe): ditto.
+ (after_exec): call them.
+ (rb_exec_async_signal_safe): call after_exec_async_signal_safe.
+ (rb_exec_err): call after_exec_non_async_signal_safe instead of
+ after_exec.
- * 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 Jun 10 06:21:10 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-Fri Jul 26 23:05:27 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * NEWS: document new features of Ruby OpenSSL.
- * parse.y (parser_yylex): separate numeric literal from succeeding
- token, and treat 'e' as floating point number only if followed by
- exponent part.
+Sun Jun 10 03:09:41 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-Fri Jul 26 22:14:10 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/openssl/ossl.c: Fix error in example. Patch by David Albert.
- * vm_exec.h (CHECK_VM_STACK_OVERFLOW_FOR_INSN): surround with
- do/while (0), and remove unnecessary casts.
+ Add/extend existing documentation. Examples now also cover RSA
+ signatures and PBKDF2.
+ [ruby-core: 45154][ruby-trunk - Bug #6475]
-Fri Jul 26 20:12:07 2013 Akinori MUSHA <knu@iDaemons.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
+Sun Jun 10 01:41:45 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-Fri Jul 26 19:25:17 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/openssl/ossl_ssl.c: Introduce SSLContext#renegotiation_cb and
+ remove SSLContext#disable_client_renegotiation and related
+ functionality introduced in r35797. The new callback approach
+ gives clients maximum flexibility to decide on their own what to
+ do on renegotiation attempts.
+ Add documentation for SSL module and SSLError.
+ * test/openssl/test_ssl.rb: Add a test for
+ SSLContext#renegotiation_cb.
- * 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).
+Sun Jun 10 01:37:18 2012 Tanaka Akira <akr@fsij.org>
-Fri Jul 26 18:30:14 2013 Koichi Sasada <ko1@atdot.net>
+ * process.c (rb_fork_internal): initialize exc.
- * array.c (ary_memcpy): cast to int to suppress a warning.
+Sun Jun 10 00:19:25 2012 Tanaka Akira <akr@fsij.org>
-Fri Jul 26 18:21:58 2013 Koichi Sasada <ko1@atdot.net>
+ * process.c: don't use non async-signal-safe functions in a child
+ process before exec, for invoking a command.
+ (rb_exec_atfork): call rb_exec_async_signal_safe only.
+ (retry_fork): take chfunc_is_async_signal_safe argument. call
+ before_fork and after_fork only unless chfunc_is_async_signal_safe.
+ (send_child_error): take chfunc_is_async_signal_safe argument.
+ send an exception only unless chfunc_is_async_signal_safe.
+ (recv_child_error): take chfunc_is_async_signal_safe argument.
+ receive an exception only unless chfunc_is_async_signal_safe.
+ (rb_fork_internal): renamed from rb_fork_err and take
+ chfunc_is_async_signal_safe argument.
+ use rb_protect only unless chfunc_is_async_signal_safe.
+ (rb_fork_err): call rb_fork_internal with false as
+ chfunc_is_async_signal_safe.
+ (rb_fork_async_signal_safe): call rb_fork_internal with true as
+ chfunc_is_async_signal_safe.
+ (rb_spawn_process): call rb_fork_async_signal_safe instead of
+ rb_fork_err.
- * 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.
+Sat Jun 9 23:57:03 2012 Tanaka Akira <akr@fsij.org>
-Fri Jul 26 17:49:26 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * process.c (rb_fork_err): rewrite a complex "if" statement.
- * win32/file.c (fix_string_encoding): fix target encoding. the
- parameter `encoding' is not the target encoding but the original
- encoding.
+Sat Jun 9 23:44:29 2012 Tanaka Akira <akr@fsij.org>
-Fri Jul 26 14:05:19 2013 Zachary Scott <e@zzak.io>
+ * process.c (before_exec_async_signal_safe): extracted from
+ before_exec.
+ (before_exec_non_async_signal_safe): ditto.
+ (before_exec): call before_exec_async_signal_safe and
+ before_exec_non_async_signal_safe.
+ (rb_exec_async_signal_safe): call before_exec_async_signal_safe.
+ (rb_exec_err): call before_exec_non_async_signal_safe instead of
+ before_exec.
- * ext/fiddle/*: [DOC] More doc on dlopen and RTLD_DEFAULT from r42184
+Sat Jun 9 23:36:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Jul 26 13:08:53 2013 Zachary Scott <e@zzak.io>
+ * iseq.c (iseq_load, insn_operand_intern, rb_iseq_disasm)
+ (rb_iseq_parameters): use rb_id2str() instead of rb_id2name() to
+ keep encoding.
- * ext/fiddle/lib/fiddle.rb: [DOC] Document Fiddle.dlopen(nil)
- * ext/fiddle/handle.c: [DOC] Document Fiddle::Handle.new(nil)
+ * string.c (rb_str_symname_p): new function that checks if the string
+ is valid as a symbol name. split from sym_inspect().
-Fri Jul 26 13:04:15 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Jun 9 22:27:05 2012 Tanaka Akira <akr@fsij.org>
- * load.c (rb_load_internal): use rb_load_file_str() to keep path
- encoding.
+ * process.c (retry_fork): rewrite a complex "for" statement by
+ simple statements.
- * load.c (rb_require_safe): search in OS path encoding for Windows.
+Sat Jun 9 21:50:04 2012 Tanaka Akira <akr@fsij.org>
- * ruby.c (rb_load_file_str): load file with keeping path encoding.
+ * process.c (retry_fork): extracted from rb_fork_err.
+ (send_child_error): ditto.
+ (recv_child_error): 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]
+Sat Jun 9 17:21:48 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * file.c (rb_str_encode_ospath): simplify using rb_str_conv_enc().
+ * iseq.c (iseq_load): type is a symbol, and invalid as ID in common.
- * win32/file.c (fix_string_encoding): simplify with rb_str_conv_enc().
+Sat Jun 9 10:57:14 2012 Tanaka Akira <akr@fsij.org>
- * win32/file.c (convert_mb_to_wchar): use bare pointer instead of
- VALUE, and remove useless argument.
+ * process.c (rb_exec_async_signal_safe): extracted from rb_exec_err.
-Fri Jul 26 11:42:07 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Jun 9 09:31:07 2012 Tanaka Akira <akr@fsij.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]
+ * process.c: simplified because close_others option is always
+ enabled by default.
+ (rb_f_exec): don't need to set the option.
+ (rb_exec_arg_prepare): don't need to set the option. don't need
+ default_close_others argument.
+ (rb_spawn_internal): don't need to give default_close_others
+ argument for rb_exec_arg_prepare. don't need default_close_others
+ argument.
+ (rb_spawn_err): don't need to give default_close_others
+ argument for rb_spawn_internal.
+ (rb_spawn): don't need to give default_close_others
+ argument for rb_spawn_internal.
+ (rb_f_system): don't need to give default_close_others argument for
+ rb_spawn_internal.
+ (rb_f_spawn): don't need to give default_close_others argument for
+ rb_exec_arg_prepare.
-Fri Jul 26 01:37:45 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Sat Jun 9 09:00:58 2012 Tanaka Akira <akr@fsij.org>
- * include/ruby/ruby.h: check defined(USE_RGENGC_LOGGING_WB_UNPROTECT)
+ * process.c (rb_proc_exec): call before_exec() here addition to
+ rb_exec_err.
-Fri Jul 26 01:21:41 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Sat Jun 9 08:30:52 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * file.c (rb_file_expand_path_internal): fix r42160; skip '~'.
+ * thread_pthread.c (ruby_init_stack): use stack info if possible.
-Thu Jul 25 17:53:18 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Sat Jun 9 08:21:32 2012 Eric Hodel <drbrain@segment7.net>
- * lib/net/http.rb (Net::HTTP#connect): disable Nagle's algorithm on
- HTTP connection. [ruby-core:56158] [Feature #8681]
+ * README.EXT (prepare extconf.rb): Added note to see MakeMakefile for
+ documentation of extconf.rb functions. Patch by Zachary Scott.
+ [ruby-trunk - Feature #6522]
+ * README.EXT (Appendix C): Removed in favor of MakeMakefile.
+ Patch by Zachary Scott.
+ * lib/mkmf.rb: Merged documentation from README.EXT Appendix C. Patch
+ by Zachary Scott.
-Thu Jul 25 17:49:42 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Sat Jun 9 08:16:47 2012 Eric Hodel <drbrain@segment7.net>
- * re.c (rb_reg_to_s): convert closing parenthesis to the target encoding
- if it is ASCII incompatible encoding. [ruby-core:56063] [Bug #8650]
+ * doc/re.rdoc: Completed wording in the description of the =~ operator.
+ [ruby-trunk - Bug #6529]
-Thu Jul 25 17:21:21 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Jun 9 08:09:38 2012 Eric Hodel <drbrain@segment7.net>
- * 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.
+ * string.c (rb_str_start_with): Removed "p" from start_with? examples
+ to match other String method examples. [ruby-trunk - Bug #6553]
+ * string.c (rb_str_end_with): Updated end_with? to use code markup
+ instead of italic.
-Thu Jul 25 17:17:52 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Jun 9 07:56:03 2012 Eric Hodel <drbrain@segment7.net>
- * file.c (rb_file_expand_path_internal): should clear coderange after
- copying user name as binary data.
+ * lib/benchmark.rb: Updated formatting of Benchmark documentation for
+ consistency. [ruby-trunk - Bug #6533]
-Thu Jul 25 16:17:55 2013 Koichi Sasada <ko1@atdot.net>
+Sat Jun 9 07:46:26 2012 Eric Hodel <drbrain@segment7.net>
- * encoding.c (check_encoding): Check T_DATA or not.
- is_data_encoding(obj) assumes that `obj' is T_DATA.
+ * lib/delegate.rb: Added documentation for Delegator#!. Patch by
+ Zachary Scott. [ruby-trunk - Feature #6534]
-Thu Jul 25 13:06:46 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Jun 9 07:39:50 2012 Eric Hodel <drbrain@segment7.net>
- * dir.c (dir_s_home): use rb_home_dir_of and rb_default_home_dir.
+ * lib/net/http/responses.rb: Add RFC 6585 response codes. Patch by
+ Sangil Jung. [ruby-trunk - Feature #6480]
+ * lib/net/http/response.rb: ditto
+ * lib/net/http.rb: ditto
+ * lib/webrick/httpstatus.rb: ditto
- * 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.
+Sat Jun 9 01:24:28 2012 Tanaka Akira <akr@fsij.org>
- * file.c (rb_default_home_dir): split from rb_home_dir() for the home
- directry of the current user.
+ * process.c (rb_exec_err): before_exec() call moved from proc_exec_cmd
+ and proc_exec_sh.
+ (rb_proc_exec): ditto.
-Thu Jul 25 12:32:11 2013 Koichi Sasada <ko1@atdot.net>
+Sat Jun 9 01:11:07 2012 Tanaka Akira <akr@fsij.org>
- * ext/openssl/ossl.c: support additional three thread synchronization
- functions. [ruby-trunk - Bug #8386]
+ * include/ruby/intern.h (rb_exec_arg_init): declaration changed to
+ return a value.
-Thu Jul 25 07:15:58 2013 Eric Hodel <drbrain@segment7.net>
+ * process.c (rb_exec_arg_init): return a value.
- * lib/rubygems: Import RubyGems from master as of commit 4ff70cc
- * test/rubygems: ditto.
+Fri Jun 8 23:44:14 2012 Tanaka Akira <akr@fsij.org>
-Wed Jul 24 20:57:44 2013 Koichi Sasada <ko1@atdot.net>
+ * process.c: don't check the availability of FD_CLOEXEC. It should
+ be available if fork() is available.
- * compile.c (iseq_set_arguments): use RARRAY_RAWPTR() instead of
- RARRAY_PTR() because there is no new reference.
+ * io.c: ditto.
- * compile.c (iseq_set_exception_table): ditto.
+Fri Jun 8 22:39:32 2012 Tanaka Akira <akr@fsij.org>
-Wed Jul 24 19:49:54 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * process.c (rb_fork_err): revert r35955. The condition needs !chfunc
+ to close ep[0] and ep[1]. The catched exception is re-raised
+ immediately after that if status is not NULL.
- * lib/uri/generic.rb (find_proxy): raise BadURIError if the URI is
- a relative URI. [Bug #8645]
+Fri Jun 8 19:43:33 2012 Tanaka Akira <akr@fsij.org>
-Wed Jul 24 18:56:06 2013 Koichi Sasada <ko1@atdot.net>
+ * process.c (rb_exec_err): after_exec() call moved from proc_exec_cmd
+ and proc_exec_sh.
+ (rb_proc_exec): ditto.
- * vm_insnhelper.c (vm_expandarray): use RARRAY_RAWPTR() instead of
- RARRAY_PTR() because there is no new reference.
+Fri Jun 8 19:00:59 2012 Tanaka Akira <akr@fsij.org>
- * vm_insnhelper.c (vm_caller_setup_args): ditto.
+ * process.c (ARGV_COUNT): unused macro removed.
+ (ARGV_SIZE): ditto.
+ (ALLOC_ARGV): ditto.
+ (ALLOC_ARGV_WITH_STR): ditto.
- * vm_insnhelper.c (vm_yield_setup_block_args): ditto.
+Fri Jun 8 16:19:33 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Jul 24 18:40:11 2013 Koichi Sasada <ko1@atdot.net>
+ * test/runner.rb (src_testdir): expand real path so that
+ TestGem#test_self_find_files does not fail by aliased load path when
+ srcdir contains a symbolic link.
- * array.c, gc.c: move ary_unprotect_logging() into
- rb_gc_unprotect_logging() which is general version
+ * tool/runruby.rb (srcdir): ditto.
- * include/ruby/ruby.h: add USE_RGENGC_LOGGING_WB_UNPROTECT
- to enable.
+Fri Jun 8 12:04:39 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Jul 24 17:37:50 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * process.c (rb_fork_err): error state in the child process is prior
+ to exceptions in proc_syswait().
- * file.c (rb_file_expand_path_internal): preserve the file name
- encoding in an exception message.
+ * process.c (rb_fork_err): determine status on errors.
-Wed Jul 24 08:04:49 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/pty/pty.c (establishShell): reraise exception if something
+ raised during sleep.
- * test/-ext-/tracepoint/test_tracepoint.rb: add GC on/off to count
- GC events strictly.
+ * ext/pty/pty.c (establishShell): now needs status to protect from
+ exceptions in rb_fork_err().
-Tue Jul 23 23:19:24 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Thu Jun 7 22:13:05 2012 Tanaka Akira <akr@fsij.org>
- * ext/openssl/extconf.rb (CRYPTO_THREADID): check exist or not.
+ * process.c (rb_fork_err): Fix the condition to use rb_protect.
- * 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.
+Thu Jun 7 20:29:12 2012 Tanaka Akira <akr@fsij.org>
- * 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
+ * include/ruby/intern.h: rb_exec_arg and related stuff moved back from
+ internal.h
- * ext/openssl/ossl.c (ossl_threadid_func): defined for above.
+Thu Jun 7 15:53:03 2012 Koichi Sasada <ko1@atdot.net>
-Tue Jul 23 20:47:36 2013 Tanaka Akira <akr@fsij.org>
+ * .gdbinit: add function `trace_machine_instructions' to trace
+ in native machine assemble.
+ See https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/MachineInstructionsTraceWithGDB
+ for more details.
- * bignum.c: Move functions.
+Wed Jun 6 21:31:21 2012 Tanaka Akira <akr@fsij.org>
-Tue Jul 23 20:14:55 2013 Tanaka Akira <akr@fsij.org>
+ * process.c (proc_exec_cmd) renamed from proc_exec_v.
+ (proc_exec_sh): renamed from rb_proc_exec_e.
+ (proc_spawn_cmd_internal): renamed from proc_spawn_v.
+ (proc_spawn_cmd): renamed from proc_spawn_n.
+ (proc_spawn_sh): renamed from proc_spawn.
- * bignum.c (bary_divmod): Add special cases for x < y easily detected
- and nx == 2 && ny == 2.
+Wed Jun 6 21:18:47 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Tue Jul 23 19:48:38 2013 Koichi Sasada <ko1@atdot.net>
+ * process.c (try_with_sh): please take care of the macro defined by
+ you.
- * thread_(pthread|win32).h: rename rb_thread_cond_t to
- rb_nativethread_cond_t.
+Wed Jun 6 20:45:08 2012 Tanaka Akira <akr@fsij.org>
- * thread.c, thread_pthread.c, thread_win32.c, vm_core.h: catch up
- renaming.
+ * process.c (proc_exec_v): don't call dln_find_exe_r here because it
+ is not async-signal-safe and proc_exec_v is called in a child
+ process.
+ command_abspath field of rb_exec_arg.
+ (rb_exec_fillarg): call dln_find_exe_r and set command_abspath.
+ (rb_exec_err): Give the absolute path of the invoking command for
+ proc_exec_v, instead of the command name.
-Tue Jul 23 19:44:32 2013 Koichi Sasada <ko1@atdot.net>
+ * internal.h: add command_abspath field for rb_exec_arg.
- * thread_native.h: add rb_nativethread_self() which returns
- current running native thread identifier.
+Wed Jun 6 20:08:01 2012 Tanaka Akira <akr@fsij.org>
- * thread_[pthread|win32].c: implement rb_nativethread_self().
+ * process.c (try_with_sh): take envp argument.
+ (exec_with_sh): ditto. use it for execve.
+ (proc_exec_v): provide envp for try_with_sh.
-Tue Jul 23 19:34:11 2013 Koichi Sasada <ko1@atdot.net>
+Wed Jun 6 13:25:04 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * thread_pthread.h, thread_win32.h: rename rb_thread_id_t to
- rb_nativethread_id_t.
+ * win32/win32.c, include/ruby/win32.h (rb_w32_wrap_io_handle): new API.
+ this API wraps an I/O handle (HANDLE or SOCKET) and returns fd.
+ the second parameter should be combination of O_*, for example,
+ O_RDWR | O_BINARY | O_NOINHERIT.
- * thread_pthread.c, vm_core.h: use rb_nativethread_id_t.
+ * win32/win32.c, include/ruby/win32.h (rb_w32_unwrap_io_handle): new
+ API. this API unwraps an I/O handle and close the fd (not closes
+ the handle itself).
-Tue Jul 23 18:56:11 2013 Koichi Sasada <ko1@atdot.net>
+ [Feature #4906] [ruby-core:37227]
- * 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.
+Wed Jun 6 13:18:26 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Tue Jul 23 18:44:15 2013 Koichi Sasada <ko1@atdot.net>
+ * win32/win32.c (rb_w32_close): of course, console handle is not socket.
- * thread_native.h: added.
- Move native thread related lines from vm_core.h.
- And declare several functions "rb_nativethread_lock_*",
- manipulate locking.
+Wed Jun 6 12:37:43 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * common.mk: add thread_native.h.
+ * process.c (rb_run_exec_options_err): allocate a temporary buffer for
+ run_exec_dup2() for restoring fds on non-fork environments.
- * thread.c: add functions "rb_nativethread_lock_*".
+Wed Jun 6 09:45:21 2012 NAKAMURA Usaku <usa@ruby-lang.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.
+ * test/dl/test_c_{struct_entry,union_entity}.rb: sorry, typos.
-Tue Jul 23 16:14:57 2013 Koichi Sasada <ko1@atdot.net>
+Wed Jun 6 05:27:54 2012 Tanaka Akira <akr@fsij.org>
- * gc.c (gc_before_sweep): fix spacing.
+ * process.c (rb_exec_fillarg): check use_shell field before accessing
+ a union field.
-Tue Jul 23 15:57:11 2013 Koichi Sasada <ko1@atdot.net>
+Wed Jun 6 04:58:44 2012 Tanaka Akira <akr@fsij.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.
+ * process.c (rb_spawn_process): prog variable is not used for Unix.
- * 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.
+Wed Jun 6 00:20:37 2012 Tanaka Akira <akr@fsij.org>
- * gc.c (gc_slot_sweep): do not need to clear slot->freelist.
+ * internal.h (rb_exec_arg_init): change return type to void.
-Tue Jul 23 09:34:49 2013 Zachary Scott <e@zzak.io>
+ * process.c (rb_exec_arg_init): don't return a value.
+ (rb_exec_arg_prepare): ditto.
+ (rb_spawn_process): don't take the prog argument. extract the
+ information from earg.
+ (rb_spawn_internal): follow rb_spawn_process change.
+ (rb_f_spawn): ditto.
- * sample/drb/README*.rdoc: [DOC] migrate DRb sample READMEs to rdoc
+ * io.c (pipe_open): don't take the prog argument. extract the
+ information from eargp.
+ (pipe_open_v): follow pipe_open change.
+ (pipe_open_s): ditto.
-Tue Jul 23 09:28:05 2013 Zachary Scott <e@zzak.io>
+Tue Jun 5 23:51:33 2012 Tanaka Akira <akr@fsij.org>
- * lib/drb/invokemethod.rb: [DOC] nodoc InvokeMethod18Mixin
+ * internal.h (rb_exec_arg): use union to represent command invocation
+ with/without shell.
-Tue Jul 23 08:44:37 2013 Eric Hodel <drbrain@segment7.net>
+ * process.c: follow the rb_exec_arg change.
- * 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.
+ * io.c (pipe_open): ditto.
-Tue Jul 23 08:11:32 2013 Zachary Scott <e@zzak.io>
+Tue Jun 5 22:28:46 2012 Tanaka Akira <akr@fsij.org>
- * lib/rexml/streamlistener.rb: [DOC] Fix examples in
- REXML::StreamListener#entitydecl patch by Ippei Obayashi [Bug #8665]
+ * internal.h: rb_exec_arg and related stuff moved from intern.h
-Tue Jul 23 07:44:59 2013 Eric Hodel <drbrain@segment7.net>
+ * include/ruby/intern.h (rb_proc_exec_n): removed.
- * lib/rubygems: Import RubyGems from master as of commit b165260
- * test/rubygems: ditto.
+Tue Jun 5 21:57:22 2012 Tanaka Akira <akr@fsij.org>
-Tue Jul 23 07:14:31 2013 Tanaka Akira <akr@fsij.org>
+ * process.c (rb_exec_arg_fixup): allocate a temporary buffer for
+ run_exec_dup2 here because it should be async-signal-safe.
+ (run_exec_dup2): use the temporary buffer.
+ (run_exec_dup2_tmpbuf_size): new function.
- * bignum.c (bary_mulsub_1xN): New function.
- (bary_mul_toom3): Use bary_mulsub_1xN.
+ * include/ruby/intern.h (rb_exec_arg): add dup2_tmpbuf field.
-Tue Jul 23 03:32:23 2013 Tanaka Akira <akr@fsij.org>
+Tue Jun 5 20:13:15 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * 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.
+ * object.c (rb_obj_init_copy): should check if trusted too.
-Tue Jul 23 01:34:45 2013 Tanaka Akira <akr@fsij.org>
+Tue Jun 5 19:59:13 2012 Tanaka Akira <akr@fsij.org>
- * bignum.c (bigdivrem_mulsub): Extracted from bigdivrem1.
- (bigdivrem1): Use bary_add.
+ * process.c (strtok): declaration removed because it is not used.
-Mon Jul 22 18:39:52 2013 Masaki Matsushita <glass.saga@gmail.com>
+Tue Jun 5 19:33:51 2012 Tanaka Akira <akr@fsij.org>
- * string.c (rb_str_enumerate_chars): specify array capa
- with str_strlen().
+ * process.c (proc_spawn): don't detect simple command line here
+ because rb_exec_fillarg already did.
- * string.c (rb_str_enumerate_codepoints): ditto.
+Tue Jun 5 19:21:10 2012 Tanaka Akira <akr@fsij.org>
-Mon Jul 22 18:01:33 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * process.c (rb_exec_fillarg): bail out a loop eagerly.
- * string.c (rb_str_enumerate_chars): specify array capa.
+Tue Jun 5 19:15:14 2012 Tanaka Akira <akr@fsij.org>
-Mon Jul 22 17:24:14 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * process.c: add comments about async-signal-safe.
- * string.c (rb_str_each_char_size): performance improvement by
- using rb_str_length().
+ * io.c: ditto.
-Mon Jul 22 16:32:48 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Jun 5 09:25:10 2012 Eric Hodel <drbrain@segment7.net>
- * vm_eval.c (eval_string_with_cref): check by Check_TypedStruct
- instead of rb_obj_is_kind_of.
+ * io.c: Edited documentation for IO and File open and new and
+ Kernel#open for consistency and clarity.
-Mon Jul 22 13:19:22 2013 Koichi Sasada <ko1@atdot.net>
+Mon Jun 4 21:53:56 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * array.c (ary_resize_capa): use RARRAY_RAWPTR() because
- this code creates no new references.
+ * win32/win32.c (rb_w32_sysinit): let the system not display the
+ critical-error-handler message box and the Windows Error Reporting
+ dialog. [ruby-core:45389] [Bug #6535]
-Mon Jul 22 12:58:18 2013 Koichi Sasada <ko1@atdot.net>
+Mon Jun 4 19:36:25 2012 Tanaka Akira <akr@fsij.org>
- * array.c (ary_memfill): added.
+ * process.c (rb_exec_fillarg): allocate one more element before
+ beginning in argv_str for try_with_sh.
- * array.c (rb_ary_initialize): use ary_memfill().
+ * internal.h (ARGVSTR2ARGC): adjust for the above change.
+ (ARGVSTR2ARGV): ditto.
- * array.c (rb_ary_fill): ditto.
+Mon Jun 4 19:17:06 2012 Tanaka Akira <akr@fsij.org>
- * array.c (rb_ary_slice_bang): use RARRAY_RAWPTR() because
- this code creates no new references.
+ * internal.h (ARGVSTR2ARGC): defined.
+ (ARGVSTR2ARGV): defined.
-Mon Jul 22 10:09:46 2013 Koichi Sasada <ko1@atdot.net>
+ * process.c (proc_exec_v): use ARGVSTR2ARGV.
+ (rb_spawn_process): use ARGVSTR2ARGC and ARGVSTR2ARGV.
- * gc.c (gc_slot_sweep): need to add empty RVALUE as freeobj.
+ * io.c (pipe_open): use ARGVSTR2ARGV.
-Mon Jul 22 09:48:31 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Jun 4 16:13:00 2012 Koichi Sasada <ko1@atdot.net>
- * 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].
+ * vm_insnhelper.h: remove magical code "lfp[0] & 0x02".
+ Current VM doesn't use this bit.
-Mon Jul 22 09:24:19 2013 Kouji Takao <kouji@takao7.net>
+ * vm_core.h (RUBY_VM_GET_BLOCK_PTR): added.
- * 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.
+ * eval.c (rb_block_given_p): use RUBY_VM_GET_BLOCK_PTR().
- Thanks, Nobuyoshi Nakada, for the patch.
+ * vm_eval.c (rb_f_block_given_p): ditto.
-Mon Jul 22 03:15:54 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Jun 4 15:39:33 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/date/date_parse.c (rfc2822_cb): check if wday is given, since it
- can be omitted.
+ * win32/win32.c (constat_apply): apply VT100 functions.
+ [ruby-core:44958] [Feature #6418]
-Mon Jul 22 00:15:20 2013 Tanaka Akira <akr@fsij.org>
+ * win32/win32.c (constat_parse): parse some VT100 escape sequence.
- * bignum.c (bary_sq_fast): Refine expressions.
+Mon Jun 4 14:06:12 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Sun Jul 21 21:08:59 2013 Tanaka Akira <akr@fsij.org>
+ * process.c (rb_exec_err): should preserve errno.
- * 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.
+Mon Jun 4 13:10:11 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Sun Jul 21 09:58:19 2013 Tanaka Akira <akr@fsij.org>
+ * test/dl/test_c_{struct_entry,union_entity}.rb: broken require.
- * 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.
+Mon Jun 4 12:01:21 2012 Koichi Sasada <ko1@atdot.net>
-Sun Jul 21 08:12:16 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+ * test/ruby/test_backtrace.rb: fix test.
+ Windows path includes `:' character.
- * proc.c (proc_to_s): use PRIsVALUE to preserve the result encoding.
+Mon Jun 4 11:42:39 2012 Koichi Sasada <ko1@atdot.net>
-Sun Jul 21 03:36:18 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * vm_core.h (rb_location_t): fix type and field name.
+ (1) rename rb_location_t to rb_iseq_location_t.
+ (2) rename field names of rb_iseq_location_t to adjust
+ RubyVM::Backtrace::Location methods.
+ (2-1) filename -> path
+ (2-2) filepath -> absolute_path
+ (2-3) basename -> base_label
+ (2-4) name -> label
+ (3) rename filed name rb_iseq_location_t#line_no to
+ rb_iseq_location_t#first_lineno to clear purpose of this field.
+ (4) The field names rb_binding_t#(filename|line_no) are also renamed
+ to rb_binding_t#(path|first_lineno).
- * hash.c (rb_hash_flatten): use NUM2INT to raise TypeError on 32bit
- platform. it's introduced by r42039
+ * compile.c: apply above changes.
-Sun Jul 21 01:07:45 2013 Benoit Daloze <eregontp@gmail.com>
+ * iseq.c: ditto.
- * 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]
+ * proc.c: ditto.
-Sat Jul 20 22:44:50 2013 Zachary Scott <e@zzak.io>
+ * vm*.c: ditto.
- * common.mk: Document running a single test [Fixes GH-363]
- Patch by Avdi Grimm https://github.com/ruby/ruby/pull/363
+Mon Jun 4 11:40:28 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Jul 20 22:39:56 2013 Zachary Scott <e@zzak.io>
+ * marshal.c (r_object0): also load TYPE_USRMARSHAL, TYPE_DATA using
+ compatible loader.
- * sample/*: whitespace patch by Sergio Campama [Fixes GH-364]
- https://github.com/ruby/ruby/pull/364
+Mon Jun 4 11:33:42 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Sat Jul 20 22:33:13 2013 Zachary Scott <e@zzak.io>
+ * process.c (rb_run_exec_options_err): restore save_env() call for
+ non-fork environments.
- * doc/regexp.rdoc: [DOC] Fix typo in example [Fixes GH-365]
- Patch by Juanito Fatas https://github.com/ruby/ruby/pull/365
+ * process.c (rb_exec_err): restore environments after the failure of
+ exec to fix [ruby-core:44093] [Bug #6249] on non-fork environments
-Sat Jul 20 17:46:03 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Mon Jun 4 10:42:04 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * string.c (rb_str_succ): add missing case NEIGHBOR_WRAPPED.
- r42078 caused buggy behavior like "\xFF".b -> "\x01\xFF".b
+ * io.c (pipe_open): follow up changes in r35889.
-Sat Jul 20 15:22:38 2013 Koichi Sasada <ko1@atdot.net>
+ * process.c (proc_spawn_n): now uses char ** instead of VALUE *.
- * array.c (rb_ary_resize): use simple memcpy because there are no new
- references.
+ * process.c (rb_spawn_process): prog is now VALUE of String, not char *.
-Sat Jul 20 15:02:51 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Jun 4 06:12:43 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * safe.c (ruby_safe_level_4_warning): define for old extension
- libraries. [Bug #8652]
+ * marshal.c (r_object0): remove old warning for _alloc.
-Sat Jul 20 14:38:00 2013 Koichi Sasada <ko1@atdot.net>
+Mon Jun 4 04:24:06 2012 Tadayoshi Funaba <tadf@dotrb.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.
+ * marshal.c: experimental test aborted.
+ * complex.c: ditto.
+ * rational.c: ditto.
+ * include/ruby/intern.h: ditto.
-Sat Jul 20 12:14:07 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Jun 4 00:45:18 2012 Tanaka Akira <akr@fsij.org>
- * string.c (enc_succ_char, enc_pred_char): consider wchar case.
- [ruby-core:56071] [Bug #8653]
+ * process.c (rb_spawn_process): fix for Windows. not tested.
- * string.c (rb_str_succ): do not replace with invalid char.
+Mon Jun 4 00:11:51 2012 Tanaka Akira <akr@fsij.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.
+ * process.c (rb_proc_exec_e): don't use ISSPACE(). \f, \r and \v
+ are not word separator in Bourne shell.
- * include/ruby/encoding.h (rb_enc_code_to_mbclen): declaration and
- shortcut macro.
+Sun Jun 3 23:47:30 2012 Tanaka Akira <akr@fsij.org>
-Fri Jul 19 21:59:12 2013 Koichi Sasada <ko1@atdot.net>
+ * include/ruby/intern.h (rb_exec_arg): remove argc and argv fields.
+ add use_shell, argv_str and argv_buf fields.
- * gc.c: declare type_name() at the beginning of file.
+ * process.c (rb_proc_exec_e): don't split shell command line arguments
+ here to avoid memory allocation in a child process.
+ (rb_exec_fillarg): split shell command line arguments here.
+ (proc_exec_v): takes argv_str argument instead of argv.
+ (rb_proc_exec_ne): removed.
+ (rb_proc_exec_n): removed.
+ (rb_run_exec_options_err): don't initialize the removed fields.
+ (rb_exec_err): don't initialize the removed fields.
+ call proc_exec_v directly instead of rb_proc_exec_ne.
+ (rb_spawn_process): use use_shell field.
-Fri Jul 19 21:35:09 2013 Koichi Sasada <ko1@atdot.net>
+Sun Jun 3 21:53:00 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * array.c: reduce shady operations.
+ * GPL: update text of GPLv2. [ruby-core:44488] [Bug #6328]
+ http://www.gnu.org/licenses/gpl-2.0.txt
- * 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().
+Sun Jun 3 21:22:52 2012 Tanaka Akira <akr@fsij.org>
- * array.c (rb_ary_shift): use RARRAY_PTR_USE() without WB because
- there are not new relations.
+ * process.c (rb_exec_getargs): remove rb_exec_arg argument.
- * array.c (ary_ensure_room_for_unshift): ditto.
+Sun Jun 3 21:14:26 2012 Tadayoshi Funaba <tadf@dotrb.org>
- * array.c (rb_ary_sort_bang): ditto.
+ * marshal.c: calls directly rb_{Complex,Rational}_marshal_load().
+ But now disabled. [experimental]
+ * complex.c: followed the above.
+ * rational.c: ditto.
+ * include/ruby/intern.h: ditto.
- * array.c (rb_ary_delete_at): ditto.
+Sun Jun 3 21:18:17 2012 Tanaka Akira <akr@fsij.org>
- * array.c (rb_ary_reverse_m): use RARRAY_RAWPTR() because
- there are not new relations.
+ * process.c (rb_check_argv): use rb_str_new_frozen instead of
+ rb_str_new4.
-Fri Jul 19 20:58:20 2013 Koichi Sasada <ko1@atdot.net>
+Sun Jun 3 20:10:52 2012 Tanaka Akira <akr@fsij.org>
- * array.c: reduce shade operations.
+ * process.c (rb_proc_exec_e): extended version of rb_proc_exec() to
+ call execle().
+ (rb_proc_exec): use rb_proc_exec_e().
+ (rb_exec_err): use rb_proc_exec_e().
- * array.c (rb_ary_modify): use RARRAY_RAWPTR().
+Sun Jun 3 19:47:18 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * 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().
+ * thread.c (vm_living_thread_num): suppress a warning.
-Fri Jul 19 19:55:28 2013 Koichi Sasada <ko1@atdot.net>
+Sun Jun 3 17:23:52 2012 Tanaka Akira <akr@fsij.org>
- * array.c (ary_mem_clear): added. This operation doesn't need WB
- because this operation creates a reference to Qnil.
+ * use execve() to preserve environment variables when exec method is
+ failed. [ruby-core:44093] [ruby-trunk - Bug #6249]
- * 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().
+ * include/ruby/intern.h (rb_exec_arg): add envp_str and envp_buf field
+ to store envp of execve().
- * array.c (ary_make_shared): use RARRAY_RAWPTR() instead of RARRAY_PTR().
+ * process.c (proc_exec_v): takes envp_str as an argument and use it
+ for execve().
+ (rb_proc_exec_ne): extended version of rb_proc_exec_n().
+ (rb_proc_exec_n): use rb_proc_exec_ne().
+ (rb_proc_exec): follow proc_exec_v() change.
+ (fill_envp_buf_i): new function.
+ (rb_exec_arg_fixup): set up envp_str and envp_buf.
+ (save_env_i): removed.
+ (save_env): removed.
+ (rb_run_exec_options_err): don't modify environment variables.
+ (rb_exec_err): use rb_proc_exec_ne().
-Fri Jul 19 19:18:51 2013 Koichi Sasada <ko1@atdot.net>
+Sun Jun 3 16:33:58 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * array.c: fix commit miss.
- RGENGC_UNPROTECT_LOGGING should be 0.
+ * marshal.c: revert r35879 "now marshal_{load|dump} are external."
-Fri Jul 19 19:15:30 2013 Koichi Sasada <ko1@atdot.net>
+ * complex.c (nucomp_marshal__{dump,load}): should use rb_marshal_{dump,load}.
- * array.c (rb_ary_resurrect): use RARRAY_RAWPTR() because there is no
- writing.
+ * rational.c (nurat_marshal__{dump,load}): ditto.
- * array.c (rb_ary_new_from_values): use ary_memcpy().
+Sun Jun 3 14:13:58 2012 Tadayoshi Funaba <tadf@dotrb.org>
-Fri Jul 19 19:07:31 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/date/date_core.c: checks whether the object is frozen or not.
- * array.c (ary_memcpy): add a function to copy VALUEs into ary
- with write barrier. If ary is promoted, use write barrier correctly.
+Sun Jun 3 14:00:51 2012 Tadayoshi Funaba <tadf@dotrb.org>
- * 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().
+ * complex.c: wrote Complex#_dump and Complex::load. But now
+ disabled (due to compatibility) [experimental].
-Fri Jul 19 15:32:57 2013 Koichi Sasada <ko1@atdot.net>
+ * rational.c: wrote Rational#_dump and Rational::load. ditto.
- * array.c (rb_ary_store): use RARRAY_PTR_USE() instead of RARRAY_PTR().
- Clearing memory space doesn't need WBs.
+Sun Jun 3 10:23:32 2012 Tadayoshi Funaba <tadf@dotrb.org>
-Fri Jul 19 15:19:37 2013 Koichi Sasada <ko1@atdot.net>
+ * complex.c (nucomp_marshal_load): [ruby-core:45394]
+ * rational.c (nurat_marshal_load): ditto.
- * array.c (ary_ensure_room_for_push): use RARRAY_RAWPTR() instead of
- RARRAY_PTR. In this code, there are no "write" operation.
+Sun Jun 3 03:15:46 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * array.c (rb_ary_equal): ditto.
+ * regparse.c (onig_number_of_names): suppress a warning.
- * array.c (recursive_equal): ditto.
+Sun Jun 3 01:36:52 2012 Koichi Sasada <ko1@atdot.net>
-Fri Jul 19 15:09:22 2013 Koichi Sasada <ko1@atdot.net>
+ * vm_backtrace.c: change names.
+ (1) Class name: RubyVM::FrameInfo -> RubyVM::Backtrace::Location.
+ (2) Method name: RubyVM::FrameInfo.caller ->
+ Kernel.caller_locations.
+ (3) Instance methods of
+ RubyVM::FrameInfo (RubyVM::Backtrace::Location)
+ (3-1) name -> label
+ (3-2) basename -> base_label (basename is confusing with
+ File.basename)
+ (3-3) line_no -> lineno (We have already similar name
+ File#lineno, commented by kou [ruby-dev:45686]).
+ (3-4) filename -> path.
+ (3-5) filepath -> absolute_path.
+ (3-5) iseq -> removed (we will make other APIs to access iseq
+ and other information of frame for debugging).
- * 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).
+ * test/ruby/test_backtrace.rb: apply above changes.
+ And apply comment from kou [ruby-dev:45686].
-Fri Jul 19 14:56:00 2013 Koichi Sasada <ko1@atdot.net>
+Sun Jun 3 00:49:11 2012 Koichi Sasada <ko1@atdot.net>
- * array.c (ary_unprotect_logging): use (void *) for first parameter
- because VALUE is not defined before including ruby/ruby.h.
+ * common.mk: fix to build vm_backtrace.c only itself (vm_backtrace.c
+ is no longer included from vm.c). I hope this separation reduce
+ compile time of vm.c.
-Fri Jul 19 14:19:48 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+ * internal.h: ditto.
- * ext/pathname/pathname.c (path_inspect): use PRIsVALUE to preserve
- the result encoding.
+ * vm.c, vm_core.h, vm_dump.c, vm_eval.c: ditto.
-Fri Jul 19 12:35:41 2013 Tanaka Akira <akr@fsij.org>
+ * vm_eval.c: some functions (callee, etc) moved to vm_backtrace.c.
- * test/socket/test_tcp.rb (test_initialize_failure): Use EADDRNOTAVAIL
- to test an error message generated by bind() failure.
+Sun Jun 3 00:20:53 2012 Koichi Sasada <ko1@atdot.net>
-Fri Jul 19 11:27:38 2013 Zachary Scott <e@zzak.io>
+ * vm_backtrace.c: added. Separate backtrace related functions to
+ this file.
- * lib/racc/parser.rb: [DOC] Capitalize "Ruby" in documentation
- Patch by Dave Worth https://github.com/ruby/ruby/pull/341
+ * vm.c, common.mk: ditto.
-Fri Jul 19 11:26:28 2013 Zachary Scott <e@zzak.io>
+Sat Jun 2 18:09:02 2012 Akinori MUSHA <knu@iDaemons.org>
- * ext/psych/lib/psych*: [DOC] Capitalize "Ruby" in documentation
- Patch by Dave Worth https://github.com/ruby/ruby/pull/341
+ * lib/ipaddr.rb: Inhibit zero-filled octets in an IPv4 address in
+ all platforms. [ruby-dev:45671]
-Fri Jul 19 11:25:12 2013 Zachary Scott <e@zzak.io>
+ * lib/ipaddr.rb: Allow the x:x:x:x:x:x:d.d.d.d form not limited to
+ IPv4 mapped/compatible addresses. This change also makes it
+ possible for the parser to understand IPv4 mapped and compatible
+ IPv6 addresses in non-compressed form.
- * lib/rdoc/*: [DOC] Capitalize "Ruby" in documentation
- Patch by Dave Worth https://github.com/ruby/ruby/pull/341
+ * lib/ipaddr.rb: Stop exposing IPSocket.valid*? methods which were
+ only usable on non-IPv6-ready platforms.
-Fri Jul 19 11:23:55 2013 Zachary Scott <e@zzak.io>
+Sat Jun 2 16:59:00 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * lib/rubygems*: [DOC] Capitalize "Ruby" in documentation
- Patch by Dave Worth https://github.com/ruby/ruby/pull/341
+ * string.c (rb_enc_cr_str_buf_cat): don't reset coderange as unknown.
+ the condition 'ptr_a8 && str_cr != ENC_CODERANGE_7BIT' means not
+ unknown, str is also ASCII-8BIT because str_encindex == ptr_encindex,
+ and nont (str_cr == ENC_CODERANGE_UNKNOWN) and
+ str_cr != ENC_CODERANGE_7BIT means str_cr is valid because ASCII-8BIT
+ can't be broken. [ruby-dev:45688] [Bug #6509]
-Fri Jul 19 11:16:54 2013 Akinori MUSHA <knu@iDaemons.org>
+Sat Jun 2 07:04:48 2012 Eric Hodel <drbrain@segment7.net>
- * lib/set.rb (Set#to_set): Define Set#to_set so that aSet.to_set
- returns self. [Fixes GH-359]
+ * doc/re.rdoc (Performance): Replaced incorrect example of reducing
+ backtracking through anchoring with reduced backtracking through a
+ range. [ruby-trunk - Bug #6525]
-Fri Jul 19 11:10:23 2013 Zachary Scott <e@zzak.io>
+Sat Jun 2 06:34:15 2012 Eric Hodel <drbrain@segment7.net>
- * lib/rake/*: [DOC] Capitalize "Ruby" in documentation
- Patch by Dave Worth https://github.com/ruby/ruby/pull/341
+ * doc/re.rdoc (Performance): Removed useless sample output from final
+ performance example and switched from #match to #=~ for consistency.
+ [ruby-trunk - Bug #6524]
-Fri Jul 19 01:04:14 2013 Tanaka Akira <akr@fsij.org>
+Fri Jun 1 09:30:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * 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]
+ * object.c (class_or_module_required): extract check for class or
+ module.
-Fri Jul 19 00:54:27 2013 Benoit Daloze <eregontp@gmail.com>
+Fri Jun 1 08:50:47 2012 Eric Hodel <drbrain@segment7.net>
- * test/ruby/test_array.rb (test_count): add a test case for #count
- with an argument. See Bug #8654.
+ * array.c: Updated Array documentation formatting. Patch by Zachary
+ Scott. [ruby-trunk - Feature #6517]
-Thu Jul 18 23:45:06 2013 Masaki Matsushita <glass.saga@gmail.com>
+Fri Jun 1 06:57:10 2012 Eric Hodel <drbrain@segment7.net>
- * array.c (rb_ary_eql): compare RARRAY_PTR() for performance
- improvement in case of that self and other are shared.
+ * ext/dl/lib/dl/struct.rb (DL::CStructEntity#set_ctypes): Refactored
+ #set_ctypes using newer ruby features to simplify its implementation.
+ * test/dl/test_c_struct_entry.rb (class DL): Test to verify
+ refactoring.
-Thu Jul 18 22:46:42 2013 Zachary Scott <e@zzak.io>
+Fri Jun 1 06:40:25 2012 Eric Hodel <drbrain@segment7.net>
- * 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
+ * object.c (Init_Object): Restored Kernel documentation based on
+ Pickaxe book documentation. Patch by Zachary Scott.
+ [ruby-trunk - Feature #6521]
-Thu Jul 18 21:30:50 2013 Tanaka Akira <akr@fsij.org>
+Fri Jun 1 06:29:42 2012 Eric Hodel <drbrain@segment7.net>
- * bignum.c (bary_sq_fast): Specialize the last iteration of the
- outer loop.
- (bigfixize): A condition simplified.
+ * object.c (rb_equal): Let Object be a link in #=== documentation.
+ Patch by Zachary Scott. [ruby-trunk - Feature #6518]
-Thu Jul 18 21:15:41 2013 Masaki Matsushita <glass.saga@gmail.com>
+Thu May 31 09:27:06 2012 Eric Hodel <drbrain@segment7.net>
- * array.c (rb_ary_equal): compare RARRAY_PTR() for performance
- improvement in case of that self and other are shared.
+ * ext/dl/lib/dl/struct.rb (DL::CStructEntity::size): Refactored ::size
+ to remove unused variables and simplify using newer ruby features.
+ * test/dl/test_c_struct_entry.rb: Test to validate refactoring
-Thu Jul 18 20:44:51 2013 Masaki Matsushita <glass.saga@gmail.com>
+Thu May 31 08:40:34 2012 Eric Hodel <drbrain@segment7.net>
- * array.c (rb_ary_fill): use memfill().
+ * ext/dl/lib/dl/struct.rb (DL::CUnionEntity#set_ctypes): Refactored
+ #set_types to reuse DL::CUnionEntity::size
+ * test/dl/test_c_union_entity.rb: Added test
-Thu Jul 18 20:35:14 2013 Benoit Daloze <eregontp@gmail.com>
+Thu May 31 08:20:14 2012 Eric Hodel <drbrain@segment7.net>
- * array.c (rb_ary_count): check length to avoid SEGV
- while iterating. Remove other pointer loop when arg is given.
+ * ext/dl/lib/dl/struct.rb (DL::CUnionEntity::size): Fixed ::size to
+ return the size of the union.
+ * test/dl/test_c_union_entity.rb: Test for DL::CUnionEntity::size
- * test/ruby/test_array.rb (test_count): add test for bug.
- [ruby-core:56072] [Bug #8654]
+Thu May 31 07:45:43 2012 Eric Hodel <drbrain@segment7.net>
-Thu Jul 18 18:14:36 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * ext/dl: Added documentation. Patch by Vincent Batts.
+ [ruby-trunk - Bug #6496]
- * array.c (rb_ary_count): iterate items appropriately.
- [Bug #8654]
+Wed May 30 16:30:00 2012 Kenta Murata <mrkn@cookpad.com>
-Thu Jul 18 17:35:41 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * ext/bigdecimal/lib/bigdecimal/jacobian.rb,
+ ext/bigdecimal/lib/bigdecimal/newton.rb:
+ fix documentation comments.
+ Patch by alperakgun from github.com/shyouhei/ruby/pull/8
- * hash.c (rb_hash_flatten): performance improvement by not using
- rb_hash_to_a() to avoid array creation with rb_assoc_new().
+Wed May 30 16:20:00 2012 Kenta Murata <mrkn@cookpad.com>
-Thu Jul 18 16:16:17 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/bigdecimal/lib/bigdecimal/jacobian.rb (Jacobian#dfdxi):
+ fix jacobian to get stuck in an infinite loop when a solution is not
+ found due to forget to increment nRetry counter.
+ Patch by alperakgun from github.com/shyouhei/ruby/pull/8
- * array.c: add logging feature for RGenGC's write barrier unprotect
- event.
+Wed May 30 10:58:31 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Jul 18 15:45:47 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * time.c (utc_offset_arg): utc offset can be precision in seconds.
+ e.g. old Europe/Lisbon (c.f. [ruby-dev:40066])
- * 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]
+Wed May 30 06:20:29 2012 Eric Hodel <drbrain@segment7.net>
-Thu Jul 18 15:42:01 2013 Koichi Sasada <ko1@atdot.net>
+ * error.c (exc_set_backtrace): Updated documentation to indicate
+ set_backtrace allows a string as well as an array of strings.
+ [ruby-trunk - Bug #6501]
- * include/ruby/ruby.h: fix spell miss.
+Tue May 29 17:28:20 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Jul 18 15:11:11 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * strftime.c (rb_strftime_with_timespec): support GNU extension triple
+ colons modifier. [EXPERIMENTAL]
- * include/ruby/ruby.h (ruby_safe_level_4): get rid of special
- character. [ruby-dev:47512] [misc #8646]
+ * strftime.c (rb_strftime_with_timespec): check conversion with locale
+ modifier.
-Thu Jul 18 14:51:39 2013 Koichi Sasada <ko1@atdot.net>
+ * strftime.c (rb_strftime_with_timespec): colons are valid only for
+ 'z' and must come just before it.
- * array.c (ary_alloc): slim setup process.
+Mon May 28 16:56:55 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Jul 18 14:37:57 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/test/unit.rb (Test::Unit::Runner#_prepare_run): StatusLineOutput
+ needs job_status to be :replace.
- * string.c (str_alloc): no need to clear RString (already cleared).
+Mon May 28 13:35:33 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Jul 18 12:57:47 2013 Tanaka Akira <akr@fsij.org>
+ * common.mk (do-install-*): fix dependencies. based on the patch by
+ nagachika at [ruby-dev:45683]. [Bug #6506]
- * 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.
+Mon May 28 12:03:04 2012 Narihiro Nakamura <authornari@gmail.com>
-Thu Jul 18 06:30:02 2013 Koichi Sasada <ko1@atdot.net>
+ * gc.c (obj_free): doesn't free a method table if it doesn't
+ exist. [ruby-dev:44436]
+ * test/ruby/test_gc.rb (class TestGc): added the test case for
+ this issue.
- * 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().
+Sun May 27 23:37:48 2012 Koichi Sasada <ko1@atdot.net>
- * gc.c: rename a heap management function with prefix "heap_".
- * get_freeobj() -> heap_get_freeobj().
+ * benchmark/bm_vm1_lvar_init.rb: added.
+ This benchmark measures a initialize time of non-used variable.
- * gc.c: rename markable_object_p() to is_markable_object().
+ * benchmark/bm_vm1_lvar_set.rb: added.
+ This benchmark measures a local variables initialization time.
-Wed Jul 17 22:57:40 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * benchmark/bm_vm2_bigarray.rb: added.
+ This benchmark mesures a big array literal creation time.
- * hash.c (delete_if_i): use ST_DELETE.
+ * benchmark/bm_vm2_bighash.rb: added.
+ This benchmark mesures a big hash literal creation time.
-Wed Jul 17 22:34:47 2013 Tanaka Akira <akr@fsij.org>
+ * benchmark/bm*: change notation "i=0" to "i = 0".
- * 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.
+Sun May 27 13:33:26 2012 Koichi Sasada <ko1@atdot.net>
-Wed Jul 17 22:13:26 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * benchmark/driver.rb: fix to continue benchmarks when
+ an error is occurred.
- * hash.c (rb_hash_replace): performance improvement by using
- st_copy().
+Sun May 27 11:27:50 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Jul 17 17:19:54 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/test/unit.rb (Test::Unit::Runner#_prepare_run): fix operator
+ precedence, so that platform and TERM should be counted.
- * 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().
+Sun May 27 10:02:33 2012 Tadayoshi Funaba <tadf@dotrb.org>
- * gc.c (initial_expand_heap): inlined in rb_gc_set_params().
+ * ext/date/date_strftime.c: allows %Ok and %Ol.
-Wed Jul 17 17:12:23 2013 Matthew M. Boedicker <matthewm@boedicker.org>
+Sun May 27 09:29:20 2012 Tadayoshi Funaba <tadf@dotrb.org>
- * hash.c (env_fetch): Add key name to message on ENV.fetch KeyError,
- as well as Hash#fetch. [ruby-core:56062] [Feature #8649]
+ * ext/date/date_core.c: modified doc.
-Wed Jul 17 15:59:33 2013 Koichi Sasada <ko1@atdot.net>
+Sat May 26 19:04:34 2012 Tadayoshi Funaba <tadf@dotrb.org>
- * gc.c: catch up last changes for debugging/checking mode.
+ * ext/date/date_core.c: added description.
-Wed Jul 17 15:50:10 2013 Koichi Sasada <ko1@atdot.net>
+Sat May 26 18:14:57 2012 Tadayoshi Funaba <tadf@dotrb.org>
- * gc.c (rb_objspace_free): free slot itself.
+ * ext/date/date_strftime.c: reduced the code.
- * gc.c (objspace_each_objects): fix condition.
- Use slot->body instead of slot.
+Sat May 26 18:08:59 2012 Tadayoshi Funaba <tadf@dotrb.org>
- * gc.c (count_objects): use "slot" variable.
+ * time.c: modified doc.
+ * ext/date/date_core.c: ditto.
-Wed Jul 17 15:21:10 2013 Koichi Sasada <ko1@atdot.net>
+Sat May 26 17:05:45 2012 Koichi Sasada <ko1@atdot.net>
- * gc.c (unlink_heap_slot): fix memory leak.
- free slot itself at free_heap_slot().
+ * vm.c (backtrace_*): change type of lev and n from size_t to int.
+ Also set type of rb_backtrace_t#backtrace_size to int.
+ A patch from nobu.
- 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.
+ * vm_eval.c: ditto.
- * gc.c (unlink_heap_slot): remove not working code.
+Sat May 26 16:26:30 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Jul 17 14:31:13 2013 Koichi Sasada <ko1@atdot.net>
+ * file.c (realpath_rec): UNC prefix does not end with path separator,
+ so new separator is needed after it.
- * gc.c: re-design the heap structure.
+Sat May 26 15:29:22 2012 Koichi Sasada <ko1@atdot.net>
- (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.
+ * test/ruby/test_backtrace.rb (test_caller_lev):
+ decrease recursion size.
- See https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/GC_design
- for more details (figure).
+Sat May 26 13:50:48 2012 Koichi Sasada <ko1@atdot.net>
- * gc.c: Avoid "heaps" terminology. It is ambiguous.
+ * NEWS: add Kernel#caller's second argument.
-Wed Jul 17 13:29:16 2013 Koichi Sasada <ko1@atdot.net>
+Sat May 26 13:40:29 2012 Koichi Sasada <ko1@atdot.net>
- * 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.
+ * vm.c (RubyVM::FrameInfo): add a class to access each frame
+ information. You don't need to parse strings from caller().
+ FrameInfo has the following methods:
+ FrameInfo#name: method name, class name, etc with decorations.
+ FrameInfo#basename: name without decorations.
+ FrameInfo#line_no: line number.
+ FrameInfo#filename: file name.
+ FrameInfo#filepath: full filepath.
+ FrameInfo#iseq: iseq if it is iseq frame (defined by ruby script)
+ FrameInfo#to_s: return caller() method style string.
+ RubyVM::FrameInfo.caller(n, lev) returns array of FrameInfo objects.
+ The name "RubyVM::FrameInfo.caller" is long and ambiguous (it is
+ confusing with Kernel::caller() method), we need to change the name
+ before Ruby 2.0 release. Good names or comments are welcome.
- * gc.c: catch up above change.
+ * test/ruby/test_backtrace.rb: add a test for above change.
-Wed Jul 17 12:30:05 2013 Tanaka Akira <akr@fsij.org>
+Sat May 26 12:18:09 2012 Koichi Sasada <ko1@atdot.net>
- * include/ruby/st.h (st_strcasecmp): Macro defined for compatibility.
- (st_strncasecmp): Ditto.
+ * vm.c (frame_info_to_str): add `break'.
-Wed Jul 17 11:57:45 2013 Takeyuki FUJIOKA <xibbar@ruby-lang.org>
+ * vm.c (backtrace_object): remove lev and n parameter.
+ backtrace_object always returns all of backtrace information.
- * lib/cgi/util.rb (CGI::Util#escape, unescape): Avoid use of regexp
- special global variable. [Feature #8648] Thanks to fotos.
+ * vm.c (rb_backtrace_to_str_ary): fix to use backtrace_object().
+ This change improve performance of caller(lev, n).
-Wed Jul 17 11:57:10 2013 Takeyuki FUJIOKA <xibbar@ruby-lang.org>
+ * benchmark/bm_vm3_backtrace.rb: added to check above improvement.
+ FYI: measurement on my laptop, 1.9.3p229 needs 5.125 sec,
+ and current trunk only needs 0.299sec.
- * lib/erb.rb (ERB::Util#url_encode): Avoid use of regexp special global
- variable. [Feature #8648] Thanks to fotos.
+Sat May 26 11:05:09 2012 Koichi Sasada <ko1@atdot.net>
-Wed Jul 17 08:12:41 2013 Tanaka Akira <akr@fsij.org>
+ * vm.c (rb_frame_info_t): keep previous ISEQ frame info for CFUNC
+ frame info. And fix to cache a calculated line_no of ISEQ frame
+ info.
- * st.c (st_locale_insensitive_strcasecmp): Renamed from st_strcasecmp.
- (st_locale_insensitive_strncasecmp): Renamed from st_strncasecmp.
+Sat May 26 09:54:53 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * include/ruby/st.h: Follow above changes.
+ * ext/openssl/ossl_ssl.c: Allow disabling client-side renegotiation.
+ * test/openssl/test_ssl.rb: Simple tests for this.
- * include/ruby/ruby.h: Ditto.
+ Client-side renegotiation is still considered problematic, even
+ when used in the context of secure renegotiation (RI, RFC 5746).
+ The changes allow users to either completely disable client
+ renegotiation on the server, or to specify a maximum number of
+ handshakes allowed in total. The number of total handshakes is
+ counted in a callback set as SSL_set_info_callback. If the
+ maximum number of handshakes is exceeded an error will be raised
+ We do not support renegotiation in the OpenSSL extension, therefore
+ this feature can only be tested externally.
+ The feature is opt-in, the default setting will be to allow
+ unlimited client renegotiation, as was the case before.
-Wed Jul 17 00:14:59 2013 Tanaka Akira <akr@fsij.org>
+Fri May 25 23:38:58 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * bignum.c (bigmul1_toom3): Use bigdivrem_single instead of bigdivrem.
- (big_three): Removed.
- (Init_Bignum): Don't initialize big_three.
+ * test/openssl/test_ssl.rb: Clarify the intention of errors to be
+ expected. Two errors are possible when connection is refused due
+ to a protocol version that was explicitly disallowed,
+ OpenSSL::SSL::SSLError or Errno::ECONNRESET, depending on the
+ OpenSSL version in use.
-Tue Jul 16 21:46:03 2013 Masaki Matsushita <glass.saga@gmail.com>
+Fri May 25 22:19:40 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * configure.in: revert r42008. strcasecmp() uses the current locale.
+ * ext/openssl/ossl_ssl.c: Revert r35583
+ * test/openssl/test_ssl.rb: Handle ECONNRESET in code instead to avoid
+ the test failing in Ruby CI [1]
- * include/ruby/ruby.h: ditto.
+ [1] http://u64.rubyci.org/~chkbuild/ruby-trunk/log/20120507T190102Z.log.html.gz#test-all
- * st.c (st_strcasecmp): ditto.
+Fri May 25 19:51:36 2012 Koichi Sasada <ko1@atdot.net>
-Tue Jul 16 21:07:04 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * vm_eval.c (rb_f_caller): caller() method accepts second optional
+ argument `n' which specify how many frames should return.
+ For example, `caller(0, 1)' returns only one frame information
+ which calls caller() method. If there are less than n frame
+ information, then all frame information are returned. If n is 0,
+ then always return [].
+ This fix is part of [ruby-dev:42345] [Ruby 1.9-Feature#3917].
+ However, performance and features are not enough.
+ RDoc is also not available.
- * configure.in: check strcasecmp().
+ * test/ruby/test_backtrace.rb: add a test for above.
- * include/ruby/ruby.h: use strcasecmp() as st_strcasecmp() if it
- exists.
+Fri May 25 17:05:07 2012 Koichi Sasada <ko1@atdot.net>
- * st.c (st_strcasecmp): define the function only if strcasecmp()
- doesn't exist.
+ * vm.c (oldbt_init, vm_backtrace_str_ary): arg->data should
+ be initialized before calling `backtrace_each()'.
-Tue Jul 16 20:21:28 2013 Tanaka Akira <akr@fsij.org>
+Fri May 25 16:11:27 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * bignum.c (bigsq): Renamed from bigsqr.
+ * trunk/ext/-test-/printf/printf.c: change function names because of
+ conflict with msvcrt. fixed build error of mswin.
-Tue Jul 16 19:42:08 2013 Tanaka Akira <akr@fsij.org>
+Fri May 25 10:52:52 2012 Koichi Sasada <ko1@atdot.net>
- * bignum.c (USHORT): Unused macro removed.
+ * vm.c: refactoring backtrace related functions.
+ (1) unify similar functions (rb_backtrace_each() and
+ backtrace_object()). backtrace_each() is a unified function.
+ variation:
+ a) backtrace_object(): create backtrace object.
+ b) vm_backtrace_str_ary(): create bt as an array of string.
+ c) vm_backtrace_print(): print backtrace to specified file.
+ d) rb_backtrace_print_as_bugreport(): print backtrace on
+ bugreport style.
+ (2) remove rb_backtrace_each(). Use backtrace_each() instead.
+ (3) change the type of lev parameter to size_t.
+ a) lev == 0 means current frame (exception, etc use it).
+ b) lev == 1 means upper frame (caller(0) use it).
-Tue Jul 16 19:18:51 2013 Koichi Sasada <ko1@atdot.net>
+ * vm_core.h, vm_dump.c, vm_eval.c: ditto.
- * gc.c: slim a path of newobj_of().
+ * vm.c (backtrace_object(), vm_backtrace_str_ary()): fix to return a
+ correct size of caller(lev) array.
+ Let n be a "caller(0).size" then ln as caller(lev).size should be
+ (n - lev). However, the previous implementation returns a wrong
+ size array (ln > n - lev). [ruby-dev:45673]
- * gc.c (objspace): add a new field objspace::freelist, which contains
- available RVALUEs.
+ * test/ruby/test_backtrace.rb: add tests for backtrace.
- * 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.
+Fri May 25 08:51:39 2012 Eric Hodel <drbrain@segment7.net>
- * gc.c (before_gc_sweep): clear objspace::freelist.
+ * enum.c (enum_count): Enumerable#count no longer uses #size when
+ counting elements. Patch by Nobuhiro IMAI. [ruby-trunk - Bug #6473]
- * gc.c (slot_sweep): clear slot::freelist.
+Fri May 25 01:15:39 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c (heaps_prepare_freeslot): renamed to heaps_prepare_freeslot.
+ * sprintf.c (ruby__sfvextra): [EXPERIMENTAL] use inspect instead of
+ to_s if plus flag is given.
- * gc.c (unlink_free_heap_slot): remove unused function.
+ * vsnprintf.c (BSD_vfprintf): pass sign flag.
- * gc.c (rb_free_const_table): remove unused function.
+Fri May 25 00:37:22 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jul 16 19:05:12 2013 Tanaka Akira <akr@fsij.org>
+ * test/rubygems/test_gem_indexer.rb (setup, teardown): save @tempdir
+ to remove it properly. [Bug #5348]
- * bignum.c (big_shift3): Big shift width is not a problem for right
- shift.
+Thu May 24 23:36:51 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jul 16 18:50:08 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vsnprintf.c (BSD_vfprintf): [EXPERIMENTAL] object representation in
+ rb_enc_vsprintf(). [Feature #5896]
- * array.c (rb_ary_count): [DOC] fix typo. Array#count uses ==, not
- ===. a question at asakusa.rb ML.
+Thu May 24 15:33:01 2012 Koichi Sasada <ko1@atdot.net>
-Tue Jul 16 18:35:48 2013 Tanaka Akira <akr@fsij.org>
+ * vm_method.c (rb_method_defined_by): removed.
+ nobu pointed out that rb_method_basic_definition_p() is enough
+ for last commit.
- * bignum.c (bary_mul_karatsuba): Avoid duplicate calculation when
- squaring.
- (bary_mul_toom3_branch): Ditto.
+ * error.c, eval_error.c: change for above.
-Tue Jul 16 17:43:22 2013 Koichi Sasada <ko1@atdot.net>
+Thu May 24 14:30:13 2012 Koichi Sasada <ko1@atdot.net>
- * gc.c (link_free_heap_slot): removed.
+ * vm.c: add RubyVM::Backtrace object (btobj).
+ Backtrace information contains an array consists of location
+ information for each frames by string.
+ RubyVM::Backtrace object is lightweight backtrace information,
+ which contains complete information to generate traditional style
+ backtrace (an array of strings) with faster generation.
+ If someone accesses to backtrace information via
+ Exception#backtrace, then convert a RubyVM::Backtrace object to
+ traditional style backtrace.
+ This change causes incompatibility on marshal dumped binary
+ of Exception. If you have any trouble on it, please tell us
+ before Ruby 2.0 release.
+ Note that RubyVM::Backtrace object should not expose Ruby level.
- * gc.c (slot_sweep): use `heaps_add_freeslot' instead of
- `link_free_heap_slot'.
+ * error.c, eval.c, vm_eval.c: ditto.
- * gc.c (assign_heap_slot): use local variable `slot' instead of
- `heaps'.
+ * internal.h: ditto.
-Tue Jul 16 17:21:39 2013 Koichi Sasada <ko1@atdot.net>
+ * eval_error.c: fix to skip "set_backtrace" method invocation in
+ creating an exception object if it call a normal set_backtrace
+ method (defined by core).
- * gc.c (assign_heap_slot): refactoring variable names.
+ * test/ruby/test_settracefunc.rb: fix for above change.
- * gc.c (slot_add_freeobj): added.
+ * vm_method.c (rb_method_defined_by): added. This function
+ checks that the given object responds with the given method
+ by the given cfunc.
- * gc.c (heaps_add_freeslot): added.
+ * benchmark/bm_vm2_raise1.rb, benchmark/bm_vm2_raise2.rb:
+ add to measure exception creation speed. raise1 create
+ exception objects from shallow stack frame. raise2 create
+ exception objects from deep stack frame.
- * gc.c (finalize_list, rb_gc_force_recycle, slot_sweep): use
- `slot_add_freeobj' instead of modifying linked list directly.
+Thu May 24 12:07:46 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jul 16 16:30:58 2013 Koichi Sasada <ko1@atdot.net>
+ * io.c (io_strip_bom): check EOF. [Bug #6487][ruby-core:45203]
- * gc.c (lazy_sweep): refactoring.
+Wed May 23 22:06:14 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Tue Jul 16 13:32:06 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/net/http/header.rb (Net::HTTPHeader#range): fix broken parser of
+ HTTP Range request. Old one can't parse invalid specs and multiple
+ specs correctly.
- * 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.
+Wed May 23 10:18:54 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Tue Jul 16 11:12:03 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * win32/win32.c (finish_overlapped_socket, overlapped_socket_io):
+ replace ECONNABORTED to EPIPE in send, sendto and sendmsg to improve
+ BSD socket compatibility. this change removes a failure on the test
+ of net/ftp.
- * proc.c (rb_block_arity): raise ArgumentError if no block given.
+Wed May 23 05:35:58 2012 Eric Hodel <drbrain@segment7.net>
-Tue Jul 16 08:15:22 2013 Zachary Scott <e@zzak.io>
+ * lib/net/http.rb: Broke up Net::HTTP into individual files.
+ [ruby-trunk - Feature #6435]
+ * lib/net/http/backward.rb: ditto.
+ * lib/net/http/response.rb: ditto.
+ * lib/net/http/exceptions.rb: ditto.
+ * lib/net/http/responses.rb: ditto.
+ * lib/net/http/generic_request.rb: ditto.
+ * lib/net/http/header.rb: ditto.
+ * lib/net/http/request.rb: ditto.
+ * lib/net/http/proxy_delta.rb: ditto.
+ * lib/net/http/requests.rb: ditto.
- * ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] document top-level
- classes from BigDecimal utils native extensions
+Wed May 23 05:15:11 2012 Eric Hodel <drbrain@segment7.net>
-Tue Jul 16 03:23:03 2013 Zachary Scott <e@zzak.io>
+ * class.c (rb_mod_init_copy): Clear the cached inspect string of a
+ dup'd anonymous module or class. [ruby-trunk - Bug #6454]
+ * test/ruby/test_module.rb (class TestModule): ditto
- * numeric.c: [DOC] improve rdoc formatting for parameters and links
+Tue May 22 16:49:15 2012 Koichi Sasada <ko1@atdot.net>
-Mon Jul 15 14:40:00 2013 Tanaka Akira <akr@fsij.org>
+ * vm_core.h: add a data type rb_location_t to store iseq location
+ information.
+ rb_location_t#filename, filepath, name and line_no was moved from
+ rb_iseq_t. rb_location_t#basename is a new field which is
+ similar to `name' field without any decoration.
+ `name' field contains some decoration such as `block in foo'.
+ `basename' only contains `foo'.
+ rb_iseq_t contains memory object of rb_location_t.
- * include/ruby/intern.h (rb_big2str0): Deprecated.
+ * iseq.c: setup rb_location_t for each rb_iseq_t memory objects.
- * bignum.c (rb_big2str1): Renamed from rb_big2str0.
- (rb_big2str0): Deprecated wrapper for rb_big2str1.
- (rb_big2str): Invoke rb_big2str1 instead of rb_big2str0.
+ * compile.c, proc.c, vm.c, vm_dump.c, vm_eval.c, vm_insnhelper.c,
+ vm_method.c: support about it.
-Mon Jul 15 14:13:02 2013 Masaki Matsushita <glass.saga@gmail.com>
+Tue May 22 00:45:05 2012 Yusuke Endoh <mame@tsg.ne.jp>
- * 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.
+ * struct.c (rb_struct_members): Refactoring. As Struct#members had
+ returned an array of String, the old code was needed to convert
+ Symbols to Strings. But it is almost unnecessary because the
+ method now returns an array of Symbols. A patch by Masaki
+ Matsushita <glass.saga at gmail dot com> [Feature #6218]
+ [ruby-dev:45451]
-Mon Jul 15 13:46:26 2013 Tanaka Akira <akr@fsij.org>
+Mon May 21 19:20:25 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * bignum.c: Add static assertions.
+ * lib/net/ftp.rb (Net::FTP#retrbinary): close only if conn is not nil
+ because transfercmd may fail and return nil.
-Mon Jul 15 13:36:02 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * lib/net/ftp.rb (Net::FTP#retrlines): ditto.
- * hash.c (rb_hash_each_pair): performance improvement by using
- rb_block_arity().
+Mon May 21 15:10:28 2012 Akinori MUSHA <knu@iDaemons.org>
-Mon Jul 15 13:15:37 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * ext/syslog/syslog.c: Classify constants and macros into several
+ sub-modules. (Syslog::Priority, Syslog::Level, Syslog::Option
+ and Syslog::Macros)
- * proc.c (rb_block_arity): create internal API rb_block_arity().
- it returns arity of given block.
+ * ext/syslog/syslog.c (mSyslog_inspect): Use rb_sprintf().
-Mon Jul 15 13:07:27 2013 Yuki Yugui Sonoda <yugui@yugui.jp>
+ * ext/syslog/syslog.c (mSyslog_inspect): Make sure self is a
+ module before calling rb_class2name().
- * lib/prime.rb (Prime::EratosthenesGenerator,
- Prime::EratosthenesSieve): New implementation by
- robertjlooby <robertjlooby AT gmail.com>.
+Mon May 21 12:44:11 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
- * test/test_prime.rb: updated with new method name
+ * .travis.yml (install): It seems tcl/tk is skipped in Travis
+ CI. Trying to fix the situation.
-Mon Jul 15 11:32:46 2013 Zachary Scott <e@zzak.io>
+Mon May 21 12:11:25 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * numeric.c (rb_cNumeric): [DOC] Added comment for Numeric to fix doc
+ * enc/depend (ENCOBJS): add dependencies.
-Mon Jul 15 11:24:48 2013 Tanaka Akira <akr@fsij.org>
+ * enc/make_encmake.rb (target_encodings): extract dependencies.
- * bignum.c (maxpow_in_bdigit_dbl): Useless #if removed.
+Mon May 21 11:26:17 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Mon Jul 15 11:10:46 2013 Zachary Scott <e@zzak.io>
+ * lib/net/ftp.rb (Net::FTP#transfercmd): rescue shutdown.
- * 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
+Sun May 20 23:00:11 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Jul 15 10:56:01 2013 Zachary Scott <e@zzak.io>
+ * ext/extmk.rb (extmake): reopen $stdout to NULL, since setting
+ $stdout cannot affect child processes.
- * thread.c (mutex_sleep): [DOC] Awake thread will reacquire lock
- By Tim Abdulla [Fixes GH-342] https://github.com/ruby/ruby/pull/342
+Sun May 20 21:36:39 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Mon Jul 15 10:45:09 2013 Tanaka Akira <akr@fsij.org>
+ * enc/shift_jis.c (code_to_mbclen): return
+ ONIGERR_INVALID_CODE_POINT_VALUE if the code is invalid.
- * 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.
+ * string.c (tr_next): increment character until the code
+ is a valid character. [ruby-dev:45652] [Bug #6450]
- * configure.in: Check __builtin_clz, __builtin_clzl and
- __builtin_clzll.
+Sun May 20 12:25:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Jul 15 09:39:07 2013 Tanaka Akira <akr@fsij.org>
+ * Makefile.in (LIBRUBY_SO): link EXTSOLIBS too.
- * bignum.c (power_cache_get_power): Use bitsize instead of ceil_log2.
- (ones): Removed.
- (next_pow2): Removed.
- (floor_log2): Removed.
- (ceil_log2): Removed.
+ * ext/extmk.rb (mf.macro): use EXTSOLIBS instead of SOLIBS to get rid
+ of discard libraries needed by default. [Bug #6462]
- * configure.in (__builtin_popcountl): Don't check.
+Sat May 19 19:04:38 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Jul 15 02:47:09 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/extmk.rb (command_output): ENCOBJS is needed for all linked
+ ruby, if --disable-shared and --with-static-linked-ext.
- * localeinit.c (rb_locale_charmap, Init_enc_set_filesystem_encoding):
- move from encoding.c.
+ * ext/extmk.rb (command_output): dmyext is needed as DLDOBJS if no
+ static linked extensions.
- * miniinit.c (rb_locale_charmap, Init_enc_set_filesystem_encoding):
- define miniruby specific functions only.
+ * Makefile.in, common.mk (PROGRAM): no extension libraries.
-Mon Jul 15 02:32:58 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * common.mk (build-ext): pass macros for libruby.so.
- * encoding.c (rb_enc_init): no longer needs NO_PRESERVED_ENCODING.
+ * ext/extmk.rb (command_output): link extension libraries and encoding
+ libraries into libruby.so, not ruby executable.
- * encoding.c (enc_inspect): defer loading autoloaded encoding.
+ * ext/extmk.rb (command_output): fold long macro lines.
- * encoding.c (enc_check_encoding): use is_data_encoding() to check
- type consistently.
+ * Makefile.in (LIBEXT): add macro.
- * encoding.c (must_encoding): return rb_encoding* instead of encoding
- index.
+ * configure.in (ENCOBJS, EXTOBJS): use LIBEXT, not hardcoded suffix.
- * encoding.c (enc_check_encoding): use is_data_encoding() to check
- type consistently.
+ * Makefile.in (LIBRUBY_A): fix typo. re-applying r35242.
- * encoding.c (must_encoding): return rb_encoding* instead of encoding
- index.
+Sat May 19 04:46:53 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Mon Jul 15 02:21:39 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/openssl/extconf.rb: Use Logging::message instead of message.
+ * ext/zlib/extconf.rb: ditto.
- * 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]
+Fri May 18 18:13:44 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * encoding.c (enc_inspect): use PRIsVALUE to preserve the result
- encoding.
+ * lib/mkmf.rb (MakeMakefile#configuration): keep space at end of
+ OUTFLAG and COUTFLAG. [ruby-dev:45650]
-Sun Jul 14 23:21:47 2013 Tanaka Akira <akr@fsij.org>
+Fri May 18 17:39:42 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * configure.in: Check __builtin_popcountl, __builtin_bswap32 and
- __builtin_bswap64.
+ * thread_pthread.c (rb_thread_create_timer_thread): Added error
+ check when failing fcntl(). [Bug #6147] [ruby-dev:45364]
- * 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.
+Fri May 18 17:41:00 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (ones): Use the configure result for the condition to use
- __builtin_popcountl.
- (bary_unpack_internal): Use appropriate types for swap argument.
+ * ext/extmk.rb (extmake): link archives only, skip script only
+ extension libraries.
-Sun Jul 14 22:21:11 2013 Tanaka Akira <akr@fsij.org>
+Fri May 18 17:25:33 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * 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.
+ * cont.c: bump up fiber machine stack size when running on 64bit
+ arch. [Bug #6344] [ruby-dev:45554]
-Sun Jul 14 00:36:03 2013 Tanaka Akira <akr@fsij.org>
+Fri May 18 15:20:56 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * bignum.c (DIGSPERLONG): Unused macro removed.
- (DIGSPERLL): Ditto.
+ * lib/uri/generic.rb (URI::Generic.build): duplicate args before adding
+ new items. (don't change arguments)
-Sun Jul 14 00:32:51 2013 Tanaka Akira <akr@fsij.org>
+ * lib/uri/generic.rb (URI::Generic.build): use URI::Generic::COMPONENT
+ if this method is called from URI::Generic.
- * bignum.c (rb_big_aref): Less scan when the number is negative.
+ * lib/uri/generic.rb (URI::Generic.build2): escape only if the item is
+ a String.
-Sun Jul 14 00:17:42 2013 Tanaka Akira <akr@fsij.org>
+ * lib/uri/generic.rb (URI::Generic.build2): use DEFAULT_PARSER because
+ it doesn't have parser method. [Bug #6420]
- * bignum.c (big_shift): Avoid signed integer overflow.
+Fri May 18 15:54:07 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sun Jul 14 00:14:15 2013 Tanaka Akira <akr@fsij.org>
+ * ext/zlib/extconf.rb: Use an exception instead of bare puts.
- * bignum.c (bary_mul_precheck): Use bary_small_lshift or
- bary_mul_normal if xl is 1.
+Fri May 18 15:53:05 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sat Jul 13 22:58:16 2013 Tanaka Akira <akr@fsij.org>
+ * ext/psych/extconf.rb: Use an exception instead of bare abort.
- * 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.
+Fri May 18 15:51:32 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sat Jul 13 15:51:38 2013 Tanaka Akira <akr@fsij.org>
+ * ext/fiddle/extconf.rb: Use an exception instead of bare abort.
- * bignum.c (bary_small_lshift): Use size_t instead of long.
- (bary_small_rshift): Ditto.
+Fri May 18 15:49:35 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sat Jul 13 15:33:33 2013 Tanaka Akira <akr@fsij.org>
+ * ext/readline/extconf.rb: Use an exception instead of bare exit.
- * bignum.c (bary_small_lshift): Functions moved to remove
- declaration.
- (bary_small_rshift): Ditto.
+Fri May 18 15:38:11 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sat Jul 13 12:27:34 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/ripper/extconf.rb: Use an exception instead of bare
+ Logging.message.
- * encoding.c (rb_enc_associate_index): fill new terminator length, not
- old one.
+Fri May 18 15:23:06 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sat Jul 13 12:24:24 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/openssl/extconf.rb: Clarify a message when hit Apple
+ OpenSSL issue.
- * 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.
+Fri May 18 15:14:32 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sat Jul 13 09:26:09 2013 Tanaka Akira <akr@fsij.org>
+ * ext/extmk.rb: Show a message when extconf.rb raised an exception.
+ * ext/openssl/extconf.rb: Use exception raising instead of message
+ and/or abort. We want to display error message to console _and_
+ logging into mkmf.log.
- * bignum.c (biglsh_bang): Removed.
- (bigrsh_bang): Ditto.
- (bigmul1_toom3): Use bary_small_lshift and bary_small_rshift.
+Fri May 18 06:14:07 2012 Eric Hodel <drbrain@segment7.net>
-Sat Jul 13 01:04:43 2013 Zachary Scott <e@zzak.io>
+ * ext/syslog/lib/syslog/logger.rb: Added Syslog::Logger which was
+ ported from the SyslogLogger gem. [ruby-trunk - Feature #5096]
+ * NEWS: ditto.
+ * test/syslog/test_syslog_logger.rb: ditto.
- * lib/rubygems/psych_additions.rb: Ignore Psych docs here
+Fri May 18 01:28:21 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-Fri Jul 12 18:10:46 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * ext/psych/parser.c (transcode_string): fix encoding index names.
+ Thanks markizko for reporting.
- * ext/fiddle/win32/lib/win32/registry.rb
- (Win32::Registry::API#make_wstr): same as r41922.
+Thu May 17 23:03:58 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Jul 12 16:28:37 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * configure.in: fix function name to be checked, to initialize
+ rb_thread_cond_t properly.
- * encoding.c (rb_enc_associate_index): refill the terminator if it
- becomes longer than before. [ruby-dev:47500] [Bug #8624]
+ * thread_pthread.c (native_cond_initialize, native_cond_destroy):
+ fix macro name.
- * string.c (str_null_char, str_fill_term): get rid of out of bound
- access.
+Thu May 17 12:53:07 2012 Yuki Yugui Sonoda <yugui@google.com>
- * string.c (rb_str_fill_terminator): add a parameter for the length of
- new terminator.
+ * thread.c, thread_pthread.c: Moved pthread-specific preprocessor
+ hacks to thread_pthread.c
-Fri Jul 12 11:26:25 2013 Masaki Matsushita <glass.saga@gmail.com>
+Thu May 17 12:18:47 2012 Yuki Yugui Sonoda <yugui@google.com>
- * hash.c (rb_hash_reject_bang): do not call rb_hash_foreach() if RHash
- has ntbl and it is empty.
+ * io.c: Fix a mistake on merging the patch in the previous commit.
-Fri Jul 12 11:17:41 2013 Masaki Matsushita <glass.saga@gmail.com>
+Thu May 17 11:33:07 2012 Yuki Yugui Sonoda <yugui@google.com>
- * hash.c (recursive_hash): use RHASH_SIZE() to check hash size.
+ Imports Ruby's port to NativeClient (a.k.a NaCl).
+ Patch by Google Inc. [ruby-core:45073].
-Fri Jul 12 00:20:00 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * configure.in (RUBY_NACL): New M4 func to configure variables for
+ NaCl.
+ (RUBY_NACL_CHECK_PEPPER_TYPES): New M4 func to check the old names
+ of Pepper interface types.
+ (BTESTRUBY): New variable to specify which ruby should be run on
+ "make btest". NaCl can run the built binary by sel_ldr, but it need
+ rbconfig.rb. So this variable is distinguished from $MINIRUBY.
- * hash.c (rb_hash_size): use RHASH_SIZE().
+ * thread_pthread.c: Disabled some features on NaCl.
-Fri Jul 12 00:08:24 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * io.c: ditto.
- * hash.c (rb_hash_values): set array capa to RHASH_SIZE().
+ * process.c: ditto.
-Thu Jul 11 23:54:45 2013 Masaki Matsushita <glass.saga@gmail.com>
+ * signal.c: ditto.
- * hash.c (rb_hash_keys): set array capa to RHASH_SIZE().
+ * file.c: ditto.
-Thu Jul 11 21:30:17 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * missing/flock.c: ditto.
- * win32/win32.c (rb_w32_pow): undef pow to get rid of infinite
- recursive call. re-fix [Bug #8495]. [ruby-core:55923] [Bug #8621]
+ * nacl/pepper_main.c: An example implementation of Pepper application
+ that embeds Ruby.
-Thu Jul 11 20:18:13 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * nacl/example.html: An example of web page that uses the Pepper
+ application.
- * ext/dl/win32/lib/win32/registry.rb (Win32::Registry::API#make_wstr):
- remove workaround to append WCHAR terminator.
+ * nacl/nacl-config.rb: Detects variants of NaCl SDK.
- * transcode.c (str_encode_associate): fill terminator after conversion.
+ * nacl/GNUmakefile.in: Makefile template for NaCl specific build
+ process.
- * string.c (rb_enc_str_new, rb_str_set_len, rb_str_resize): fill
- minimum length of the encoding as the terminator.
+ * nacl/package.rb: script for packaging a NaCl-Ruby embedding
+ application.
- * string.c (str_buf_cat, rb_str_buf_append, rb_str_splice_0): ditto.
+ * nacl/reate_nmf.rb: Wrapper script of create_nmf.py
- * string.c (str_make_independent_expand, rb_str_modify_expand): make
- the capacity enough for multi-byte terminator.
+ * dln.c (dln_load): Added a hack to call on NaCl.
- * string.c (rb_string_value_cstr): fill minimum length of the encoding
- as the terminator.
+ * util.c (ruby_getcwd): Path to the current directory is not available
+ on NaCl.
- * string.c (rb_string_value_cstr): check null char in char, not in
- byte.
+Thu May 17 10:54:58 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Jul 11 14:48:35 2013 Zachary Scott <e@zzak.io>
+ * ext/tk/extconf.rb: add -l options to $libs not $LDFLAGS,
+ to be passed to EXTLIBS in exts.mk.
- * 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
+ * enc/encinit.c.erb: use %-lines to adjust indent in the generated file.
-Thu Jul 11 14:22:37 2013 Zachary Scott <e@zzak.io>
+ * lib/mkmf.rb (MakeMakefile#have_framework): combine -framework option
+ and its argument with an equal sign not to be separated in merge_libs.
- * 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
+ * ext/tk/extconf.rb: ditto.
-Thu Jul 11 13:48:03 2013 Zachary Scott <e@zzak.io>
+ * ext/extmk.rb: EXTLDFLAGS also needs to be passed.
- * sprintf.c: Fix typo patch by @hynkle [Fixes GH-357]
- https://github.com/ruby/ruby/pull/357
+Wed May 16 15:44:22 2012 Yuki Yugui Sonoda <yugui@google.com>
-Thu Jul 11 13:00:34 2013 Zachary Scott <e@zzak.io>
+ * configure.in: Fix an unbalanced quote.
- * lib/securerandom.rb: Refactor conditions by Rafal Chmiel
- [Fixes GH-326] https://github.com/ruby/ruby/pull/326
+Wed May 16 15:43:10 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Thu Jul 11 12:04:47 2013 Tanaka Akira <akr@fsij.org>
+ * ext/extmk.rb (exts.mk): use double quotes instead of single quotes
+ for commandline because it's not recognized as quotes on Windows.
- * 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.
+Wed May 16 15:15:55 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Jul 11 10:46:38 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * configure.in (LD): enclose with single quotes but not double quotes
+ not to expand command substitution.
- * tool/probes_to_wiki.rb: fix usage comment. use Enumerable#grep
- which yields each elements to reduce unnecessary array.
+Wed May 16 14:19:51 2012 Yuki Yugui Sonoda <yugui@google.com>
-Thu Jul 11 10:09:18 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ Supports static linking of extensions and encodings again.
+ Fixes --with-static-linked-ext.
- * process.c (rb_daemon): daemon(3) is implemented with fork(2).
- Therefore it needs rb_thread_atfork(). (and revert r41903)
+ Patch by Google Inc. [ruby-core:45073].
-Thu Jul 11 03:22:10 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+ * Makefile.in (ENCOBJS, EXTOBJS): New variables to specify static
+ linked libraries. Also reintroduces extinit.o, introduces encinit.o
+ introduces encinit.o
- * tool/probes_to_wiki.rb: adding a script to convert probes.d to wiki
- format for easy wiki updates.
+ * common.mk: Builds static libraries rather than shared objects if
+ specified.
-Thu Jul 11 00:54:07 2013 Zachary Scott <zachary@zacharyscott.net>
+ * configure.in (LD): new substitution.
- * man/ri.1: Incorrect use of .Dd macro [Bug #8620] by Tristan Hill
+ * enc/depend: Supports static linked libraries
+ (libencs, libenc, libtrans): New target.
-Thu Jul 11 00:48:29 2013 Zachary Scott <zachary@zacharyscott.net>
+ * enc/encinit.c.erb: new template to generate the initialization of
+ statically linked encodings.
- * lib/delegate.rb: Add example for __setobj__ and __getobj__
- [Bug #8615] Patch by Caleb Thompson
+ * enc/make_encmake.rb (--module): new flag to specify whether static
+ or dynamic.
-Wed Jul 10 23:29:22 2013 Zachary Scott <zachary@zacharyscott.net>
+ * transcode_data.h (TRANS_INIT): New macro to get rid of the name
+ collision of encoding initializers and transcoder initializers.
- * lib/logger.rb: Use :call-seq: for method signature rdoc
+ * ext/extmk.rb: Fixes the behavior on $extstatic is true.
-Wed Jul 10 23:23:18 2013 Zachary Scott <zachary@zacharyscott.net>
+ * lib/mkmf.rb (clean-static): new target to clean up static linked
+ libraries.
- * lib/logger.rb (#add): Remove incorrect rdoc for return value
- [Bug #8567] Reported by Tim Pease.
+ * ruby.c (process_options): New initializes statically linked
+ encodings here.
-Wed Jul 10 23:12:00 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed May 16 14:30:43 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * string.c (rb_str_subpos): make public function.
+ * io.c: fixed a merge mistake of r33878, reported by nobu via IRC.
-Wed Jul 10 22:44:19 2013 Tanaka Akira <akr@fsij.org>
+Wed May 16 06:59:41 2012 Tadayoshi Funaba <tadf@dotrb.org>
- * bignum.c: Add a static assertion for RBIGNUM_EMBED_LEN_MAX.
+ * ext/date/date_strftime.c: should also be aware of flags on
+ complex specifier.
-Wed Jul 10 22:31:25 2013 Masaki Matsushita <glass.saga@gmail.com>
+Wed May 16 05:11:29 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * string.c (rb_str_index): cache single byte flag and some
- cosmetic changes.
+ * ext/psych/lib/psych/visitors/to_ruby.rb: fix a bug with string
+ subclass dumping and loading.
-Wed Jul 10 22:03:27 2013 Tanaka Akira <akr@fsij.org>
+ * test/psych/test_array.rb: pertinent tests
- * bignum.c (bary_2comp): Don't use bary_plus_one.
- (bary_add_one): Replaced by the implementation of bary_plus_one.
+ * test/psych/test_string.rb: ditto
-Wed Jul 10 20:48:22 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed May 16 01:31:21 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * bignum.c (sizeof_bdigit_dbl): check sizeof(BDIGIT_DBL).
+ * ext/psych/lib/psych/visitors/to_ruby.rb: convert omap tagged maps to
+ Psych::Omap objects rather than hashes. [Bug #6425]
- * internal.h (STATIC_ASSERT): move from enum.c.
+ * test/psych/test_omap.rb: pertinent test.
-Wed Jul 10 20:08:21 2013 Tanaka Akira <akr@fsij.org>
+Wed May 16 01:15:45 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * bignum.c (SIZEOF_BDIGIT_DBL): Add a ifdef guard for test.
+ * ext/psych/lib/psych/visitors/yaml_tree.rb: keep a reference to
+ custom coders so that GC does not impact dumped yaml reference ids.
-Wed Jul 10 14:18:59 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue May 15 23:59:48 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * process.c (fork_daemon): kill the other threads all and abandon the
- kept mutexes.
+ * lib/test/unit.rb (Test::Unit::Options#setup_options): add --color option.
-Wed Jul 10 11:35:36 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * lib/test/unit.rb (Test::Unit::Runner#_prepare_run): defer color code
+ initialization to regard --color option.
- * 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.
+Mon May 14 16:28:36 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Jul 10 10:20:07 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * parse.y (f_arglist): should reset lexical states after empty
+ argument list with no parenthesis as well as parenthesized list,
+ so that reserved name method definition work. [ruby-dev:45626]
+ [Bug #6403]
- * tool/rbinstall.rb: always require rubygems to stabilize rubygems
- related status like whether Gem::Specification is defined or not.
+Mon May 14 00:14:24 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
- * tool/rbinstall.rb (Gem::Specification.unresolved_deps): define stub.
+ * enumerator.c (lazy_take_func, lazy_take): multiple calls of
+ force/to_a method to Enumerator::Lazy#take should return same
+ results. [ruby-dev:45634] [Bug #6428]
-Wed Jul 10 08:21:15 2013 Eric Hodel <drbrain@segment7.net>
+ * test/ruby/test_lazy_enumerator.rb (test_take_recycle): add test for
+ above.
- * lib/rubygems: Import RubyGems 2.1
- * test/rubygems: Ditto.
+Sun May 13 23:38:31 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
-Wed Jul 10 07:34:34 2013 Eric Hodel <drbrain@segment7.net>
+ * test/ruby/test_io.rb (test_flush_in_finalizer1): don't use IO.for_fd
+ to close IO objects. it create IO object with already closed fd, and
+ cause occasional Errno::EBADF in following tests. [ruby-core:45020]
+ [Bug #6228]
- * 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 May 13 23:32:16 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
- * lib/rubygems/psych_tree.rb (module Gem): Add backward compatibility
- for r41148
+ * test/ruby/test_io.rb (TestIO): revert r35631. it broke the intent of
+ test_flush_in_finalizer1. [ruby-core:43951] [Bug #6228]
- * test/rubygems/test_gem_package.rb: Add backward compatibility for
- double-slash elimination.
+Sun May 13 22:46:36 2012 Tanaka Akira <akr@fsij.org>
-Wed Jul 10 06:22:27 2013 Tadayoshi Funaba <tadf@dotrb.org>
+ * ext/etc/etc.c (passwd_ensure): move endpwent() call from
+ passwd_iterate to close /etc/passwd on exception.
+ (group_ensure): move endgrent() call from group_iterate to close
+ /etc/group on exception.
- * ext/date/date_parse.c (date_zone_to_diff): [ruby-core:55831].
+Sun May 13 18:10:43 2012 Tadayoshi Funaba <tadf@dotrb.org>
-Wed Jul 10 00:41:42 2013 Tanaka Akira <akr@fsij.org>
+ * ext/date/date_strftime.c: removed unused code and changed the style.
- * bignum.c (bary_mul): x*1 is x.
+Sun May 13 17:37:56 2012 Tadayoshi Funaba <tadf@dotrb.org>
-Tue Jul 9 22:24:39 2013 Tanaka Akira <akr@fsij.org>
+ * ext/date/date_strftime.c: refactored.
- * bignum.c (bary_mul1): No need to invoke MEMZERO at last.
- (bary_mul_single): Invoke MEMZERO here.
+Sun May 13 06:40:12 2012 Luis Lavena <luislavena@gmail.com>
-Tue Jul 9 21:40:01 2013 Kouhei Sutou <kou@cozmixng.org>
+ * test/ruby/test_io.rb (class TestIO): Disable GC during IO tests to
+ avoid file descriptors being GC'ed. Suggestion by Tomoyuki Chikanaga
+ [ruby-core:43951][Bug #6228]
- * test/rexml/test_text.rb: Add missing tests for Text#<<.
- Reported by nagachika. Thanks!!!
+Sat May 12 07:00:16 2012 Eric Hodel <drbrain@segment7.net>
-Tue Jul 9 18:02:38 2013 Akinori MUSHA <knu@iDaemons.org>
+ * ext/sdbm/init.c: Added documentation. Patch by Justin Collins,
+ cleanup by Zachary Scott. [ruby-trunk - #6410]
- * 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.
+Sat May 12 06:02:03 2012 Eric Hodel <drbrain@segment7.net>
-Tue Jul 9 17:58:26 2013 Akinori MUSHA <knu@iDaemons.org>
+ * lib/fileutils.rb (cp_r): Fixed cp_r example. Patch by TJ Koblentz
+ from pull request #114. [ruby-trunk - Bug #6411]
- * test/fileutils/test_fileutils.rb
- (TestFileUtils#assert_output_lines): New utility assertion
- method for testing verbose output.
+Sat May 12 05:23:06 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Tue Jul 9 17:43:57 2013 Koichi Sasada <ko1@atdot.net>
+ * thread.c (rb_threadptr_execute_interrupts_common):
+ test_signal_requiring of test/ruby/test_signal.rb fail if the sub
+ process is killed on waiting IO in lex_io_gets in rb_load_file in
+ rb_load_internal in require.
+ This is because
+ (1) the process receive the killing signal in
+ rb_thread_io_blocking_region in rb_read_internal in lex_io_gets.
+ (2) set th->errinfo as INT2FIX(TAG_FATAL) at
+ rb_threadptr_execute_interrupts_common.
+ (3) escape rb_load_file in rb_load_internal and jump to EXEC_TAG()
+ without set loaded as TRUE.
+ (4) call first rb_exc_raise(GET_THREAD()->errinfo); because loaded
+ is FALSE as above. this errinfo should be an exception object
+ but this is INT2FIX(TAG_FATAL).
+ Don't call first rb_exc_raise if GET_THREAD()->errinfo is Fixnum.
- * test/test_tracer.rb: catch up recent rubygems changes.
+Fri May 11 14:23:11 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jul 9 16:58:30 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * parse.y (primary): begin/end block should be isolated from outside.
+ [ruby-dev:45631][Bug #6419]
- * 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).
+Fri May 11 14:09:47 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jul 9 15:57:20 2013 Akinori MUSHA <knu@iDaemons.org>
+ * ext/bigdecimal/bigdecimal.c (PUSH): to prevent VALUE from GC,
+ must not cast it to unsigned long, which may be shorter than
+ VALUE, and the result can be mere garbage.
- * object.c: Fix rdoc for Kernel#<=>. [Fixes GH-352]
+Fri May 11 09:51:07 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jul 9 15:53:51 2013 Akinori MUSHA <knu@iDaemons.org>
+ * lib/test/unit.rb (Test::Unit::Runner#failed): no unnecessary
+ newlines if no reports to be displayed.
- * lib/fileutils.rb (FileUtils#mode_to_s): Define mode_to_s() also
- as singleton method, or FileUtils.chmod fails in verbose mode.
+Thu May 10 10:55:35 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jul 9 15:16:02 2013 Akinori MUSHA <knu@iDaemons.org>
+ * test/minitest/test_minitest_mock.rb: Correct requiring path to
+ metametameta.rb.
- * test/fileutils/fileasserts.rb
- (Test::Unit::FileAssertions#assert_not_symlink): Add a missing
- optional argument "message".
+ * test/minitest/test_minitest_unit.rb: Correct requiring path to
+ metametameta.rb.
-Tue Jul 9 15:03:24 2013 Akinori MUSHA <knu@iDaemons.org>
+Thu May 10 10:18:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/fileutils.rb (FileUtils#chown, FileUtils#chown_R): If user
- and group are both nil, print ":".
+ * parse.y (lex_state_name): returns name for lex_state_e, for debug
+ use.
-Tue Jul 9 12:47:08 2013 Masaki Matsushita <glass.saga@gmail.com>
+Wed May 9 16:36:01 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * io.c (appendline): use READ_CHAR_PENDING_XXX macros and
- RSTRING_END().
+ * lib/mkmf.rb (MakeMakefile#pkg_config): check if libs resulted from
+ pkg-config works actually.
- * io.c (rb_io_getline_1): rewrite nested if statement into one
- statement.
+Wed May 9 16:01:38 2012 Shugo Maeda <shugo@ruby-lang.org>
-Tue Jul 9 11:04:35 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * lib/net/imap.rb (decode_utf7, encode_utf7): refactored by
+ Nobuyoshi Nakada, to use String#encode.
- * ext/{dl,fiddle}/win32/lib/win32/registry.rb (Win32::Registry#check):
- should report the position of the error.
+Wed May 9 13:26:25 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/{dl,fiddle}/win32/lib/win32/registry.rb
- (Win32::Registry#QueryValue): workaround for test-all crash.
+ * test/rubygems/test_gem_remote_fetcher.rb: skip OpenSSL dependent
+ tests if not available.
-Tue Jul 9 10:27:56 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+Wed May 9 08:09:38 2012 Ryan Davis <ryand-ruby@zenspider.com>
- * ext/{dl,fiddle}/win32/lib/win32/registry.rb
- (Win32::Registry.expand_environ): use suitable encoding for the
- string.
+ * lib/minitest/*: Imported minitest 3.0.0 (r7435)
+ * test/minitest/*: ditto
+ * test/rubygems/*: Imported fixes for buggy use of assert_match
+ and deprecated assert_block
+ UNBUNCH YOUR PANTIES. THE TESTS DO NOT RUN CLEAN ON OSX.
- * 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.
+Wed May 9 06:28:59 2012 Eric Hodel <drbrain@segment7.net>
-Tue Jul 9 10:02:45 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * re.c (rb_reg_equal): Removed incorrect example for Regexp#== with
+ "n" option. [ruby-talk - Bug #6415]
- * ext/{dl,fiddle}/win32/lib/win32/registry.rb
- (Win32::Registry::Error#initialize): use suitable encoding for the
- string.
+Wed May 9 06:23:33 2012 Tadayoshi Funaba <tadf@dotrb.org>
-Tue Jul 9 09:46:53 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * ext/date/date_core.c: reverted.
- * ext/dl/win32/lib/win32/registry.rb (Win32::Registry.expand_environ):
- use suitable encoding for the string. fixed a test-all error of
- r41838.
+Wed May 9 04:31:26 2012 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
- * ext/fiddle/win32/lib/win32/registry.rb: same changes of r41838 and
- this revision of dl's win32/registry.rb.
+ * lib/rinda/ring.rb (lookup_ring_any): fix Rinda::RingFinger.primary
+ hungs forever. [ruby-talk:395364]
-Tue Jul 9 07:39:45 2013 Eric Hodel <drbrain@segment7.net>
+Tue May 8 21:09:00 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
- * lib/rubygems: Update to RubyGems 2.0.4. See
- https://github.com/rubygems/rubygems/blob/2.0/History.txt for changes
+ * include/ruby/win32.h (FD_SET): change function to macro.
+ To avoid buffer overflow when smaller FD_SETSIZE is used in ext
+ libraries.
-Tue Jul 9 01:47:16 2013 Tanaka Akira <akr@fsij.org>
+ * win32/win32.c (rb_w32_fdset): this function is not used anymore.
+ But we leave this for compatibility.
- * bignum.c (biglsh_bang): Don't shift a BDIGIT with BITSPERDIG bits.
- (bigrsh_bang): Ditto.
+ * win32/win32.c (rb_w32_select_with_thread): fix SEGV when smaller
+ FD_SETSIZE is used in ext libraries. Dereference of fd_set pointer
+ causes SEGV.
-Tue Jul 9 01:17:57 2013 Tanaka Akira <akr@fsij.org>
+ * test/-ext-/win32/test_fd_setsize.rb(TestFdSetSize): add tests for
+ above.
+ * ext/-test-/win32/fd_setsize/depend: ditto.
+ * ext/-test-/win32/fd_setsize/extconf.rb: ditto.
+ * ext/-test-/win32/fd_setsize/fd_setsize.c: ditto.
- * bignum.c (bigrsh_bang): Fix bignum digits overrun.
+ [ruby-core:44588] [Bug #6352]
-Tue Jul 9 00:46:22 2013 Tanaka Akira <akr@fsij.org>
+Tue May 8 20:44:46 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
- * bignum.c (biglsh_bang): Fix bignum digits under-run.
+ * io.c (io_unread): fix IO#pos with mode 'r' bug on Windows.
+ If the end of reading buffer is CR, io_unread() needs to unread one
+ more byte.
+ [ruby-core:44874] [Bug #6401]
-Mon Jul 8 23:36:45 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/ruby/test_io_m17n.rb (TestIO_M17N#test_pos_with_buffer_end_cr):
+ add a test for above.
- * ext/dl/win32/lib/win32/registry.rb (Error, API): use WCHAR
- interfaces. c.f. [Bug #8508]
+Tue May 8 13:38:17 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-Mon Jul 8 23:13:11 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/date/date_core.c: improving introduction in Date/DateTime
+ documentation. patched by Daniel Kaufman via Github.
+ https://github.com/ruby/ruby/pull/110
- * 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]
+Tue May 8 13:36:02 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * numeric.c (finite): add declaration for strict ANSI.
- [ruby-core:55312] [Bug #8495]
+ * configure.in (POSTLINK): default to : command to get rid of flag
+ only command, since BSD make does not work with it.
- * 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]
+Tue May 8 13:35:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * win32/win32.c (gettimeofday): use __cdecl instead of _cdecl.
+ * lib/test/unit.rb (MiniTest#run_test): remove exact trace and get rid
+ of IndexError, which could caused by modified $@ sometimes.
-Mon Jul 8 22:41:12 2013 Tanaka Akira <akr@fsij.org>
+Tue May 8 11:21:27 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * bignum.c (bary_mul): Arguments for work memory added.
- (bary_mul_balance): Ditto.
- (bary_mul_karatsuba): Ditto.
+ * test/minitest/metametameta.rb (MetaMetaMetaTestCase#assert_report):
+ support drive letter on Windows. yes, the original code is metameta.
-Mon Jul 8 22:03:30 2013 Tanaka Akira <akr@fsij.org>
+Tue May 8 08:54:48 2012 Eric Hodel <drbrain@segment7.net>
- * bignum.c (rb_big_sq_fast): New function for testing.
- (rb_big_mul_toom3): Ditto.
+ * lib/abbrev.rb: Fixed typo in abbrev pattern documentation. Based on
+ patch by Mark Rushakoff. [ruby-trunk - #6346]
- * internal.h (rb_big_sq_fast): Declared.
- (rb_big_mul_toom3): Ditto.
+Tue May 8 07:44:18 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Mon Jul 8 21:59:34 2013 Tanaka Akira <akr@fsij.org>
+ * ext/openssl/ossl_ssl.c (ossl_start_ssl): remove useless rb_sys_fail
+ before ossl_raise. this cause a test failure on Linux.
+ http://u64.rubyci.org/~chkbuild/ruby-trunk/log/20120507T190102Z.log.html.gz
- * bignum.c (bary_mul_balance): Initialize a local variable to suppress
- a warning.
+Tue May 8 05:35:18 2012 Eric Hodel <drbrain@segment7.net>
-Mon Jul 8 20:55:22 2013 Tanaka Akira <akr@fsij.org>
+ * object.c (Init_Object): Added reference to variable.c where
+ public_constant and private_constant documentation lives. [#6381]
- * bignum.c (bary_mul_balance): Reduce work memory.
+Tue May 8 04:47:44 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Jul 8 08:26:15 2013 Martin Bosslet <Martin.Bosslet@gmail.com>
+ * lib/test/unit.rb (Test::Unit::Runner#output): prefer local output to
+ get rid of unexpected side effect in test/minitest/metametameta.rb.
- * test/openssl/test_pkey_ec.rb: Skip tests for "Oakley" curves as
- they are not suitable for ECDSA.
- [ruby-core:54881] [Bug #8384]
+ * lib/test/unit.rb (MiniTest#run_test): show the running test in $0.
-Mon Jul 8 08:03:01 2013 Tanaka Akira <akr@fsij.org>
+ * lib/test/unit.rb (Test::Unit::StatusLineOutput): new class to output
+ in status line.
- * bignum.c (bary_mul): Add a RB_GC_GUARD.
+ * test/testunit/test_hideskip.rb (TestHideSkip#test_hideskip):
+ MiniTest#puke now reports Skipped messages only if verbose mode.
-Sun Jul 7 23:56:32 2013 Tanaka Akira <akr@fsij.org>
+ * test/testunit/test_sorting.rb (TestTestUnitSorting#test_sorting):
+ ditto.
- * bignum.c (bary_mul_karatsuba): Unreachable code removed. Remove
- several branches.
+ * lib/test/unit.rb (Test::Unit::Runner#puke): modify only result and
+ drop useless reports, not override entirely.
-Sun Jul 7 22:59:06 2013 Tanaka Akira <akr@fsij.org>
+ * bootstraptest/runner.rb (exec_test, show_progress): show rotators
+ and pass/fail counts.
- * internal.h (rb_big_mul_normal): Declared.
- (rb_big_mul_balance): Ditto.
- (rb_big_mul_karatsuba): Ditto.
+ * sample/test.rb (PROGRESS): refine output.
- * bignum.c (rb_big_mul_normal): New function for tests.
- (rb_big_mul_balance): Ditto.
- (rb_big_mul_karatsuba): Ditto.
+Tue May 8 02:34:26 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Sun Jul 7 19:21:30 2013 Tanaka Akira <akr@fsij.org>
+ * lib/minitest/unit.rb (assert_match): refix of r35563.
+ r35563 breaks the intention of the original change.
+ https://github.com/seattlerb/minitest/commit/68858105b2eb11c85105ffac5f32b662c59397f3
+ * lib/minitest/unit.rb (refute_match): ditto.
- * bignum.c: Reorder functions to decrease forward reference.
+Mon May 7 21:19:17 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Sun Jul 7 14:41:57 2013 Tanaka Akira <akr@fsij.org>
+ * ext/json: Merge JSON 1.7.1.
+ https://github.com/flori/json/commit/e5b9a9465c1159fae533bca320d950b772bcb4ac
- * 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.
+Mon May 7 22:54:22 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-Sun Jul 7 11:54:33 2013 Kouhei Sutou <kou@cozmixng.org>
+ * ext/openssl/ossl_ssl.c: add support for option flags
+ OpenSSL::SSL::OP_NO_TLSv1_1
+ OpenSSL::SSL::OP_NO_TLSv1_2
+ to allow blocking specific TLS versions. Thanks to Justin Guyett for
+ pointing this out to me.
+ * test/openssl/test_ssl.rb: add tests to assert correct behavior when
+ blocking certain versions of TLS/SSL both on server and client side.
+ Also refactored tests to reduce boilerplate code a little.
+ * test/openssl/utils.rb: rescue Errno::ECONNRESET for tests where
+ client rejects the connection because a forbidden protocol version
+ was used.
- * NEWS: Add REXML::Text#<< related updates.
+Mon May 7 20:14:15 2012 Tanaka Akira <akr@fsij.org>
-Sun Jul 7 11:49:19 2013 Kouhei Sutou <kou@cozmixng.org>
+ * lib/securerandom.rb (random_bytes): call to_int method for the
+ argument at first.
- * lib/rexml/text.rb (REXML::Text#<<): Support appending in not
- "raw" mode. [Bug #8602] [ruby-dev:47482]
- Reported by Ippei Obayashi. Thanks!!!
+Mon May 7 17:54:12 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Sun Jul 7 11:43:13 2013 Kouhei Sutou <kou@cozmixng.org>
+ * lib/minitest/unit.rb (assert_match): replace matcher only if both
+ matcher and obj are String. fix r35541. [Bug #6405]
+ DON'T COMMIT IF YOU CAN'T RUN TEST.
+ FIX AS SOON AS POSSIBLE YOU BREAK TESTS.
+ patched by ayumin.
+ https://github.com/seattlerb/minitest/pull/124
- * lib/rexml/text.rb (REXML::Text#<<): Support method chain use by "<<"
- like other objects.
+ * lib/minitest/unit.rb (refute_match): ditto.
-Sun Jul 7 11:34:18 2013 Kouhei Sutou <kou@cozmixng.org>
+Mon May 7 13:41:00 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/rexml/text.rb (REXML::Text#clear_cache): Extract common
- cache clear code.
+ * Makefile.in (PROGRAM), configure.in (POSTLINK): sign built program
+ using RUBY_CODESIGN identity.
-Sun Jul 7 11:01:03 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon May 7 13:03:55 2012 Shugo Maeda <shugo@ruby-lang.org>
- * 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].
+ * lib/net/imap.rb (body_type_attachment): parse body type
+ "ATTACHMENT". [ruby-core:44849] [Bug #6397]
-Sun Jul 7 10:07:22 2013 Tanaka Akira <akr@fsij.org>
+Mon May 7 10:49:36 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * 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.
+ * ext/bigdecimal/bigdecimal.c (Init_bigdecimal): define IDs before
+ they are used. [ruby-core:44900] [Bug #6406]
-Sat Jul 6 07:37:43 2013 Martin Bosslet <Martin.Bosslet@gmail.com>
+Mon May 7 10:27:56 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * 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]
+ * ext/digest/rmd160/rmd160.c (RMD160_Update): fix for huge data.
- Thanks to Vit Ondruch for providing the patch!
+Mon May 7 10:23:04 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Jul 6 07:12:39 2013 Martin Bosslet <Martin.Bosslet@gmail.com>
+ * test/fileutils/fileasserts.rb: use assert_equal, assert_match, and so on.
- * test/openssl/test_x509crl.rb: Remove unused variable.
- [ruby-core:53501] [Bug #8114]
+ * test/ruby/enc/test_utf16.rb, test/ruby/enc/test_utf32.rb,
+ test/ruby/test_io_m17n.rb (assert_str_equal): ditto.
- Thanks, Vipul Amler, for pointing this out!
+ * test/rubygems/test_gem_remote_fetcher.rb
+ (assert_data_from_{server,proxy}): ditto.
-Sat Jul 6 06:37:10 2013 Martin Bosslet <Martin.Bosslet@gmail.com>
+ * test/test_pstore.rb (test_thread_safe): ditto.
- * 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]
+Mon May 7 10:16:30 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- Thanks, Dirkjan Bussink, for the patch!
+ * test/rubygems/test_gem_installer.rb (TestGemInstaller#test_dir): fix
+ argument order. expected value must come first.
-Sat Jul 6 06:06:16 2013 Martin Bosslet <Martin.Bosslet@gmail.com>
+Mon May 7 09:14:11 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * 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:
+ * ext/openssl/ossl_ssl.c: support TLSv1.1 & TLSv1.2. Add
+ SSLContext#version to inspect the version that was negotiated for
+ a given connection.
+ * ext/openssl/extconf.rb: detect TLS 1.1 & 1.2 support.
+ * test/openssl/test_ssl.rb: add tests for TLS 1.1 & 1.2 given they
+ are supported by the native OpenSSL being used.
- [id, criticality, octet_string] if critical,
- [id, octet_string] if not.
+Sun May 6 21:34:29 2012 NARUSE, Yui <naruse@ruby-lang.org>
- Making sure to pick the last element of X509 extension and use it as
- SAN value.
- [ruby-core:55685] [Bug #8575]
+ * io.c (io_encoding_set): suppress warnings. [ruby-dev:45627]
+ this tmp1 is not required after r35538.
- Thank you @nahi for providing the patch!
+ * addr2line.c: suppress warnings.
-Sat Jul 6 04:49:38 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+Sun May 6 18:39:39 2012 Koichi Sasada <ko1@atdot.net>
- * 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.
+ * compile.c (iseq_compile_each): remove unused variable `size'.
-Fri Jul 5 20:46:39 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+Sun May 6 14:50:03 2012 Tanaka Akira <akr@fsij.org>
- * 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.
+ * lib/securerandom.rb: show actual read length in an error message.
-Fri Jul 5 19:05:40 2013 Akinori MUSHA <knu@iDaemons.org>
+Sat May 5 06:43:10 2012 Ryan Davis <ryand-ruby@zenspider.com>
- * 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".
+ * lib/minitest/*: Imported minitest 2.12.1 (r7323)
+ * test/minitest/*: ditto
-Fri Jul 5 16:21:56 2013 Akinori MUSHA <knu@iDaemons.org>
+Sat May 5 01:47:33 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * 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
+ * test/zlib/test_zlib.rb (test_inflate): add a test for Zlib.inflate.
+ patched by headius (Charles Nutter). [ruby-core:44859] [Bug #6398]
- * 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.
+ * test/zlib/test_zlib.rb (test_deflate): add a test for Zlib.deflate.
-Fri Jul 5 12:14:40 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+Sat May 5 00:53:55 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * test/ruby/test_rubyoptions.rb (TestRubyOptions#test_notfound): after
- r41710, the path of command uses backslash as the separator on
- Windows.
+ * io.c (parse_mode_enc): remove warnings 'Ignoring internal encoding'.
+ [ruby-core:44455] [Bug #6324]
-Fri Jul 5 11:29:47 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * io.c (io_encoding_set): ditto.
- * 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.
+Fri May 4 07:19:02 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Fri Jul 5 11:08:00 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * lib/rdoc/parser.rb (RDoc.binary?): fix wrong regexp.
+ [ruby-core:44798] [Bug #6393]
- * 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.
+Fri May 4 01:33:20 2012 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.
+ * lib/rdoc/parser.rb (RDoc.alias_extension): a real file is irrelevant
+ to aliasing. [ruby-core:44796][Bug #6392]
-Fri Jul 5 05:39:53 2013 Tanaka Akira <akr@fsij.org>
+ * lib/rdoc/parser.rb (RDoc.zip?): non-existent file will not be a zip
+ file.
- * bignum.c (BARY_MUL1): Renamed from BARY_MUL.
- (bary_mul1): Renamed from bary_mul.
- (bary_mul): Renamed from bary_mul2.
+ * lib/rdoc/parser.rb (RDoc.can_parse_by_name): accept aliased
+ extension file names.
-Fri Jul 5 04:58:05 2013 Tanaka Akira <akr@fsij.org>
+ * lib/rdoc/parser.rb (RDoc.binary?): binary read data may have
+ incomplete multibyte sequence. [ruby-core:44798][Bug #6393]
- * bignum.c (bary_mul_balance): Extracted from bigmul1_balance and
- use bary_mul2 and bary_add to decrease allocations.
+Wed May 2 23:55:51 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Jul 5 02:14:00 2013 Akinori MUSHA <knu@iDaemons.org>
+ * lib/test/unit.rb (Test::Unit::RequireFiles#non_options): expand
+ real path to get rid of loading same files via symlinks.
- * 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.
+Wed May 2 23:26:04 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * 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.
+ * cont.c (rb_fiber_m_transfer): improve sample code in Fiber#transfer
+ documentation. emphasize the difference between transfer and resume.
-Fri Jul 5 00:25:39 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed May 2 23:21:20 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/mkmf.rb (have_framework): allow header file to check.
- [ruby-core:55745] [Bug #8593]
+ * parse.y (parser_yylex): allow spaces between lambda arrow and
+ parenthesis. [ruby-dev:45605][Feature #6390]
-Thu Jul 4 22:31:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+Wed May 2 19:06:30 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * 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
+ * cont.c (rb_fiber_m_transfer): Improved Fiber documentation.
+ patched by Anuj Dutta. [ruby-core:44540][Bug #6343]
-Thu Jul 4 20:39:20 2013 Tanaka Akira <akr@fsij.org>
+Wed May 2 13:06:37 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * tool/make-snapshot: Exit with EXIT_FAILURE when it fails.
+ * README, README.ja: reformatted using rdoc markup. based on the
+ patches by zzak (Zachary Scott) in [Feature #6388].
-Thu Jul 4 20:20:23 2013 Tanaka Akira <akr@fsij.org>
+ * README, README.ja: updated the author's mail address.
- * 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.
+Wed May 2 09:46:09 2012 Kouji Takao <kouji@takao7.net>
-Thu Jul 4 18:25:25 2013 Tanaka Akira <akr@fsij.org>
+ * ext/readline/readline.c (Readline.special_prefixes=)
+ (Readline.special_prefixes): new function. An original patch was
+ created by nagachika. [Feature #5784]
- * bignum.c (rb_cstr_to_inum): Avoid temporary buffer allocation except
- very big base non-power-of-2 numbers.
+Tue May 1 22:18:45 2012 Kouji Takao <kouji@takao7.net>
-Thu Jul 4 15:51:56 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * ext/readline/readline.c (Readline.pre_input_hook)
+ (Readline.insert_text, Readline.redisplay): new function. An
+ original patch was created by nagachika. [Feature #5785]
- * string.c (rb_str_succ): use ONIGENC_MBCLEN_CHARFOUND_P correctly.
+Tue May 1 15:46:48 2012 Koichi Sasada <ko1@atdot.net>
- * string.c (rb_str_dump): ditto.
+ * common.mk: "$(Q)-..." doesn't work on nmake.
-Thu Jul 4 10:04:11 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Tue May 1 15:32:10 2012 Koichi Sasada <ko1@atdot.net>
- * regcomp.c (): Merge Onigmo 5.13.5 23b523076d6f1161.
+ * common.mk: replace '@' prefix to '$(Q)' to control build
+ process outputs.
- * [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.
+Tue May 1 14:17:59 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Jul 4 00:36:03 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/openssl/deprecation.rb (OpenSSL.check_func): check if header is
+ available for macro compatibility.
- * internal.h (SIGNED_INTEGER_MAX): suppress warning C4146 on VC6.
- seems a logical ORed expression becomes unsigned.
+Tue May 1 10:53:54 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Thu Jul 4 00:13:01 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/ruby/test_settracefunc.rb: ignore traces from another threads
+ because Kernel.set_trace_func affects other threads.
- * ruby_atomic.h (rb_w32_atomic_cas): call InterlockedCompareExchange
- directly.
+Tue May 1 06:04:14 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ruby_atomic.h (ATOMIC_CAS): fix missing function call.
+ * ext/digest/sha2/sha2.c (REVERSE32): explicitly cast since unsigned
+ long may be larger than sha2_word32.
-Wed Jul 3 23:47:35 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/digest/sha2/sha2.c (SHA{256,512,384}_{Final,End}): should clear
+ whole content, not pointer size.
- * ruby_atomic.h (ATOMIC_CAS): suppress C4022 and C4047 warnings in
- VC6. only InterlockedCompareExchange is declared using PVOID.
+ * ext/digest/*/extconf.rb: use pkg_config to use same library with
+ openssl. [ruby-core:44755][Bug #6379]
-Wed Jul 3 22:29:20 2013 Tanaka Akira <akr@fsij.org>
+ * ext/openssl/deprecation.rb: extract check for broken Apple OpenSSL.
- * internal.h (ruby_digit36_to_number_table): Declared.
+Tue May 1 05:02:30 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * util.c (ruby_digit36_to_number_table): Moved from scan_digits.
+ * configure.in (optflags): disable unsafe optimizations.
+ [ruby-core:44679][Bug #6370]
- * bignum.c (conv_digit): Use ruby_digit36_to_number_table.
+Mon Apr 30 23:36:49 2012 Tanaka Akira <akr@fsij.org>
- * pack.c (hex2num): Ditto.
+ * lib/fileutils.rb (copy_metadata): use File.lchown and File.lchmod to
+ update meta data of symlinks.
-Wed Jul 3 18:12:56 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Apr 30 23:05:53 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * lib/mkmf.rb (install_dirs): revert DESTDIR prefix by r39841, since
- it is fixed by r41648. [ruby-core:55760] [Bug #8115]
+ * test/ruby/test_continuation.rb (tracing_with_set_trace_func): don't
+ call Continuation from other threads. [ruby-dev:45596] [Bug #6382]
-Wed Jul 3 14:15:25 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Apr 30 20:10:04 2012 Tanaka Akira <akr@fsij.org>
- * 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]
+ * ext/zlib/extconf.rb: detect z_crc_t type which will be defined
+ since zlib-1.2.7.
-Wed Jul 3 12:06:42 2013 Tanaka Akira <akr@fsij.org>
+ * ext/zlib/zlib.c (rb_zlib_crc_table): use z_crc_t if available.
- * bignum.c (maxpow_in_bdigit): Renamed from calc_hbase and return
- maxpow.
+Mon Apr 30 09:02:15 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-Tue Jul 2 23:47:50 2013 Tanaka Akira <akr@fsij.org>
+ * ext/openssl/lib/openssl/ssl.rb: add hostname to "hostname does not
+ match server cert." error. patched by Wes Morgan via Github.
+ https://github.com/ruby/ruby/pull/122
- * bignum.c (roomof): Cast to long.
- (rb_ull2big): Fix bignew arguments.
+Mon Apr 30 04:43:53 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-Tue Jul 2 21:17:37 2013 Tanaka Akira <akr@fsij.org>
+ * ext/psych/lib/psych/json/yaml_events.rb: implicit styles should not
+ be changeable for JSON events.
- * bignum.c (rb_cstr_to_inum): Merge two temporary buffers.
+Sun Apr 29 06:12:02 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jul 2 20:25:04 2013 Tanaka Akira <akr@fsij.org>
+ * parse.y (assoc, parser_yylex): add syntax to splat keyword hash.
+ [ruby-core:44591][Feature #6353]
- * bignum.c (rb_cstr_to_inum): Use BDIGIT_DBL to collect adjacent digits.
- (BDIGIT_DBL_MAX): New macro.
- (maxpow_in_bdigit_dbl): New function.
+ * compile.c (compile_array_): generate keyword splat insns.
-Tue Jul 2 17:23:33 2013 Shugo Maeda <shugo@ruby-lang.org>
+ * vm.c (m_core_hash_merge_kwd): merge keyword hash into intermediate
+ hash. leftward argument is prior currently.
- * doc/syntax/refinements.rdoc: add description of Module#using and
- refinement inheritance by module inclusion.
+Fri Apr 27 12:34:23 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Tue Jul 2 17:22:44 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/dl/cfunc.c (rb_dlcfunc_call): should convert a Bignum value to
+ unsigned long long on Win64.
+ [ruby-core:44636][Bug #6364] reported by raylinn@gmail.com (ray linn)
- * internal.h: add EUC-JP and Windows-31J.
+Fri Apr 27 10:58:17 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * re.c (rb_char_to_option_kcode): use built-in encoding indexes in
- internal.h.
+ * test/readline/test_readline.rb (setup): avoid affected by user's
+ inputrc file. [ruby-dev:45584][Bug #6357]
- * internal.h: add UTF8-MAC.
+Fri Apr 27 01:45:05 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * dir.c (rb_utf8mac_encoding): use built-in encoding indexes in
- internal.h.
+ * thread.c (rb_threadptr_execute_interrupts_common):
+ handle timer_interrupt only on the first loop for the case to avoid
+ the infinite loop like following case:
+ * there is 2 Ruby threads (3 pthreads)
+ (1) main thread is waiting at gvl_yield:112 (native_cond_wait)
+ (2) sub thread works
+ (3) sub thread waits at gvl_yield:133 (native_mutex_unlock)
+ (4) main thread works
+ (5) main thread goes to gvl_acquire_common
+ (6) main thread call rb_wakeup_timer_thread
+ (7) timer thread set timer interrupt to the main thread
+ (8) main thread works
+ (9) main thread waits at gvl_acquire_common:64 (native_cond_wait)
+ (10) sub tread works
+ (11) set sub thread as the current thread
+ (12) run Ruby thread
+ (13) ...100ms
+ (14) sub thread goes to rb_threadptr_execute_interrupts_common
+ (15) sub thread call rb_thread_schedule_limits
+ (16) sub thread call gvl_release_common
+ (17) sub threads waits at gvl_yield:121 (native_cond_wait)
+ (18) main threads works
+ (19) main thread back to gvl_yield
+ (20) set main thread as the current thread
+ (21) main thread call gvl_yield
+ (22) main thread waits at gvl_yield:112 (native_cond_wait)
+ As described above, the main thread can't escape from
+ rb_threadptr_execute_interrupts_common.
+ See extended memo: http://bugs.ruby-lang.org/projects/ruby-trunk/wiki/R35480_ExtendedMemo
- * internal.h: add UTF-{16,32} dummy encodings.
+Fri Apr 27 07:15:07 2012 Tanaka Akira <akr@fsij.org>
- * string.c (rb_str_inspect, str_scrub0): use built-in encoding indexes
- in internal.h.
+ * ext/socket/socket.c (sock_s_pack_sockaddr_un): support the longest
+ path in sockaddr_un, really.
+ reported by nagachika.
+ http://d.hatena.ne.jp/nagachika/20120426/ruby_trunk_changes_35474_35476
- * internal.h: add UTF-{16,32}{BE,LE}.
+Thu Apr 26 12:28:06 2012 Tanaka Akira <akr@fsij.org>
- * io.c (io_strip_bom): use built-in encoding indexes in internal.h.
+ * ext/socket/raddrinfo.c (init_unix_addrinfo): support the longest
+ path in sockaddr_un.
+ (inspect_sockaddr): ditto.
+ (addrinfo_mdump): ditto.
+ (addrinfo_mload): ditto.
+ (rsock_unixpath_str): new function.
+ (rsock_unixpath): removed.
+ (rsock_unixaddr): use rsock_unixpath_str.
- * internal.h (rb_{ascii8bit,utf8,usascii}_encindex): use built-in
- encoding indexes for optimization.
+ * ext/socket/socket.c (sock_s_pack_sockaddr_un): support the longest
+ path in sockaddr_un.
+ (sock_s_unpack_sockaddr_un): ditto.
+ (sock_s_gethostbyaddr): unused variable removed.
- * encoding.c (enc_inspect, rb_locale_encindex),
- (enc_set_filesystem_encoding, rb_filesystem_encindex): use built-in
- encoding indexes directly.
+ * ext/socket/unixsocket.c (rsock_init_unixsock): support the longest
+ path in sockaddr_un.
- * encoding.c (rb_enc_set_index, rb_enc_associate_index): validate
- argument encoding index.
+ * ext/socket/rubysocket.h (rsock_unixpath_str): declared.
+ (rsock_unixpath): removed.
- * include/ruby/encoding.h (ENCODING_SET): use rb_enc_set_index()
- instead of setting inlined bits directly.
+ * test/socket/test_unix.rb: comment out test_nul because abstract unix
+ sockets may contain NULs.
- * encoding.c (rb_enc_init): register preserved indexes.
+Thu Apr 26 01:32:33 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * internal.h (ruby_preserved_encindex): move from encoding.c.
+ * test/optparse/test_summary.rb (test_summary_containing_space): add
+ test for r35467. OptionParser#to_a shouldn't split banner by spaces.
-Tue Jul 2 11:14:36 2013 Shota Fukumori <sorah@cookpad.com>
+Wed Apr 25 23:02:46 2012 Tanaka Akira <akr@fsij.org>
- * lib/mkmf.rb (try_config): Fix to not replace $LDFLAGS with $libs
- (1.9.3 behavior) [ruby-core:55752] [Bug #8595]
+ * ext/socket/raddrinfo.c (init_unix_addrinfo): refine error message
+ format.
+ (addrinfo_mload): show more information on "too long AF_UNIX path"
+ error.
+ (addrinfo_unix_path): ditto for "too short AF_UNIX address" and
+ "too long AF_UNIX address" error.
-Tue Jul 2 00:39:59 2013 Tanaka Akira <akr@fsij.org>
+Wed Apr 25 05:46:12 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/socket/ipsocket.c (init_inetsock_internal): Don't try mismatched
- address family if already failed.
+ * lib/optparse.rb (OptionParser#to_a): split for each lines.
+ [ruby-dev:45568][Bug #6348]
-Mon Jul 1 23:07:38 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Tue Apr 24 21:57:53 2012 Tanaka Akira <akr@fsij.org>
- * template/encdb.h.tmpl: define encoding index macros to use the index
- statically from C source.
+ * ext/socket/raddrinfo.c (init_unix_addrinfo): show actual path length
+ when it is too long for Unix socket.
-Mon Jul 1 22:57:19 2013 Tanaka Akira <akr@fsij.org>
+ * ext/socket/unixsocket.c (rsock_init_unixsock): ditto.
- * bignum.c (bary_mul2): New function.
- (rb_cstr_to_inum): Use a better algorithm to compose the result
- if input length is very long.
+ * ext/socket/socket.c (sock_s_pack_sockaddr_un): ditto.
-Mon Jul 1 20:22:00 2013 Kenta Murata <mrkn@cookpad.com>
+Tue Apr 24 21:43:58 2012 Yusuke Endoh <mame@tsg.ne.jp>
- * ext/bigdecimal/bigdecimal.h (RB_UNUSED_VAR, UNREACHABLE):
- import macros from ruby.h for 1.9.3.
- [Bug #8588] [ruby-core:55730]
+ * lib/net/smtp.rb (check_continue): raise an error with an explanatory
+ message. [ruby-core:35854] [Feature #4598]
- * ext/bigdecimal/bigdecimal.gemspec: Bump version to 1.2.1.
+Tue Apr 24 21:11:31 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Mon Jul 1 20:03:39 2013 Tanaka Akira <akr@fsij.org>
+ * lib/optparse.rb (OptionParser#to_a): should split by end-of-line,
+ and MUST TEST IT, MUST RUN THE TEST, MUST VERIFY BEFORE BACKPORT.
+ [ruby-dev:45568][Bug #6348]
- * 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.
+Tue Apr 24 19:59:31 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Mon Jul 1 15:05:00 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * enc/euc_jp.c: added EUC-JP-2004 and its alias EUC-JISX0213.
+ [ruby-dev:45571] [Feature #6349]
+ Requested by Kyouhei Yanagita <yanagi@shakenbu.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]
+ * enc/trans/japanese_euc.trans: ditto.
- * ext/stringio/stringio.c (strio_write): keep coderange of
- ptr->string.
+ * enc/trans/JIS/JISX0213-[12]%UCS@{BMP,SIP}.src: JIS X 0213:2004 ->
+ Unicode mapping table from NetBSD.
- * 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.
+ * enc/trans/JIS/UCS@{BMP,SIP}%JISX0213-[12].src: Unicode -> JIS X
+ 0213:2004 mapping table from NetBSD.
-Mon Jul 1 12:56:41 2013 Shugo Maeda <shugo@ruby-lang.org>
+ * tool/transcode-tblgen.rb: added SIP support.
- * 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]
+ * test/ruby/test_transcode.rb: tests of above changes.
- * test/ruby/test_refinement.rb: related test.
+Tue Apr 24 18:12:13 2012 Koichi Sasada <ko1@atdot.net>
+
+ * compile.c: fix to output warning when the same literals
+ are available as a condition of same case clause.
+ And remove information ('#n') because we can find duplicated
+ condition with explicit line numbers.
+ [ruby-core:38343] [Ruby 1.9 - Bug #5068]
+
+ * test/ruby/test_syntax.rb: add a test for above.
+
+Tue Apr 24 17:03:51 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * win32/win32.c (waitpid): need to check the return value of
+ FindChildSlotByHandle() before passing poll_child_status().
+ this fixed a SEGV in test-all. reported by ko1 via IRC.
+
+Tue Apr 24 16:04:39 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * parse.y (parser_yylex): EXPR_BEG by keywords is a start point of
+ commands. [ruby-dev:45563][Bug #6347]
+
+ * parse.y (superclass): ditto for superclass.
+
+ * parse.y (parser_parse_string, parser_here_document): ditto for
+ string interpolation.
+
+ * parse.y (parser_yylex): ditto for singleton class.
+
+Tue Apr 24 15:51:41 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/optparse.rb (OptionParser#to_a): should split by end-of-line
+ [ruby-dev:45568][Bug #6348]
+
+ * lib/optparse.rb (OptionParser#to_a): String#to_a is no longer
+ defined. [ruby-dev:45568][Bug #6348]
+
+Tue Apr 24 12:46:50 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+
+ * hash.c, object.c, struct.c, lib/ostruct.rb: add to_h methods.
+ [Feature #6276]
+
+Tue Apr 24 10:54:34 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * test/drb/drbtest.rb ({DRbCore,DRbAry}#teardown): cannot pass SIGTERM
+ to another process on Windows, so use SIGINT instead.
+
+Tue Apr 24 00:25:39 2012 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * thread.c (rb_check_deadlock): refine an error message of deadlock
+ detection. [ruby-core:44336] [Bug #6288]
+
+Tue Apr 24 00:14:42 2012 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * parse.y (primary): remove wrong "fixpos" that caused incorrect
+ source_location of blocks. [ruby-core:42232] [Bug #5930]
+
+ * test/ruby/test_proc.rb: add a test for above.
+
+Mon Apr 23 22:56:08 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/iconv: deprecated. [Feature #6322]
+
+Mon Apr 23 22:07:00 2012 Tanaka Akira <akr@fsij.org>
+
+ * test/socket/test_unix.rb (bound_unix_socket): make temporary
+ filename shorter for less possibility of Unix socket path over
+ 107 bytes when TMPDIR has long path.
+
+Mon Apr 23 20:35:49 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * win32/win32.c (szInternalCmds, internal_match, internal_cmd_match):
+ get rid of a segmentation fault with GCC 4.7.0.
+ reported by raylinn@gmail.com (ray linn) at [ruby-core:44505]
+ [Bug #6333], and patched by mame.
+
+ * test/ruby/test_system.rb (TestSystem#test_system): test for it.
+
+Mon Apr 23 20:11:02 2012 Tanaka Akira <akr@fsij.org>
+
+ * lib/drb/ssl.rb: generate 1024 bits RSA key instead of 512 bits.
+ OpenSSL 1.0.1 rejects 512 bits RSA key for TLS1.2 with SHA512.
+ http://rt.openssl.org/Ticket/Display.html?id=2769&user=guest&pass=guest
+ reported by Bohuslav Kabrda.
+ [ruby-core:43844] [ruby-trunk - Bug #6221]
+
+Mon Apr 23 19:54:33 2012 Tanaka Akira <akr@fsij.org>
+
+ * test/drb/drbtest.rb: rescue Errno::ESRCH for Process.kill.
+ reported by NARUSE, Yui. [ruby-dev:45551]
+
+Mon Apr 23 14:16:45 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * .gdbinit (rb_ps_vm): follow st_table's packing change.
+
+Mon Apr 23 10:43:30 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in: disable rubygems not to load rbconfig.rb before
+ fake.rb. [ruby-core:44492][Bug #6329]
+
+Sun Apr 22 20:26:06 2012 Tanaka Akira <akr@fsij.org>
+
+ * lib/drb/extservm.rb (DRb::ExtServManager): don't use /bin/sh to
+ invoke service subprocess. mark detach threads for clean up.
+
+ * test/drb/drbtest.rb: clean up the service subprocess in teardown.
+
+ * test/drb/test_drb.rb: set @service_name for teardown.
+
+ * test/drb/test_drbunix.rb: ditto.
+
+ * test/drb/test_drbssl.rb: ditto.
+
+ [ruby-dev:45547]
+
+Sun Apr 22 07:51:29 2012 Tanaka Akira <akr@fsij.org>
+
+ * lib/drb/ssl.rb: close accepted TCP socket if SSL accept is failed.
+ [ruby-dev:45541]
+
+Sat Apr 21 14:36:49 2012 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
+
+ * test/rinda/test_rinda.rb: fix sticks on some tests problem
+ [Bug #6272]
+
+Fri Apr 20 12:24:04 2012 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/ssl_certs/AddTrustExternalCARoot.pem: Removed to avoid
+ conflict with ca-bundle.pem
+ * lib/rubygems/ssl_certs/VerisignClass3PublicPrimaryCertificationAuthority-G2.pem:
+ ditto.
+ * lib/rubygems/ssl_certs/Entrust_net-Secure-Server-Certification-Authority.pem:
+ ditto.
+
+Fri Apr 20 08:07:06 2012 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems: Update to RubyGems 1.8.23 which contains security
+ fixes:
+
+ RubyGems now disallows redirection from HTTPS to HTTP.
+
+ RubyGems now verifies SSL connections.
+
+ See https://github.com/rubygems/rubygems/blob/1.8/History.txt for
+ changes since 1.8.22.
+ * test/rubygems: ditto.
+
+Thu Apr 19 16:33:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * strftime.c (rb_strftime_with_timespec): fix carry-up bug and
+ overwrite '+' with '-' if negative offset less than a hour.
+ [ruby-core:44447][Bug #6323]
+
+Thu Apr 19 09:39:57 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/-test-/win32/dln/extconf.rb: need import library for ordinal
+ entry even on mingw. [ruby-core:44441][Bug #6320]
+
+Thu Apr 19 09:35:15 2012 Eric Hodel <drbrain@segment7.net>
+
+ * random.c (random_init): Clarify that the default seed is
+ Random.new_seed, not zero. Based on patch by Roger Pack.
+ [ruby-trunk - Bug #6313]
+ * random.c (rb_f_srand): ditto.
+
+Thu Apr 19 08:59:02 2012 Eric Hodel <drbrain@segment7.net>
+
+ * ext/curses/curses.c (window_nodelay): Fixed call-seq of nodelay to
+ include the '='.
+
+ Improved description window.nodelay=.
+
+Thu Apr 19 08:47:54 2012 Eric Hodel <drbrain@segment7.net>
+
+ * io.c (io_readpartial): Document the output buffer parameter is
+ overwritten with the read contents even when non-empty.
+ Patch by yu nobuoka. [ruby-trunk - Bug #6285]
+ * io.c (io_read_nonblock): ditto.
+ * io.c (io_read): ditto.
+ * io.c (rb_io_sysread): ditto.
+ * io.c (argf_read): ditto.
+ * io.c (argf_readpartial): ditto.
+ * ext/stringio/stringio.c (strio_read): ditto.
+ * test/ruby/test_argf.rb (class TestArgf): Add test for existing
+ behavior of read outbuf.
+ * test/ruby/test_io.rb (class TestIO): ditto.
+ * test/stringio/test_stringio.rb (class TestStringIO): ditto.
+
+Wed Apr 18 22:58:55 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in (DOT, DOXYGEN): use AC_CHECK_PROGS instead of
+ AC_CHECK_PROG which needs the third argument. [ruby-core:44433]
+ [Bug #6316]
+
+ * configure.in (PKG_CONFIG): fix condition to skip older version
+ of pkg-config. continue in backticks does not affect outside.
+
+Wed Apr 18 13:59:40 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * win32/file.c (INVALID_FILE_ATTRIBUTES): define for old SDK.
+
+Wed Apr 18 10:22:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * strftime.c (rb_strftime_with_timespec): add an interim digit for
+ the timezone offset which is less than an hour.
+
+Wed Apr 18 09:58:29 2012 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/version.rb: Fixed init_with warning by calling into
+ yaml_initialize (for syck) from psych's init_with
+
+Wed Apr 18 09:03:43 2012 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems: Update to RubyGems 1.8.22 plus r33517 and r35337 which
+ were ported to the rubygems git repository.
+
+ See https://github.com/rubygems/rubygems/blob/1.8/History.txt for
+ changes since 1.8.11.
+
+ * test/rubygems: ditto.
+
+Tue Apr 17 22:18:48 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * strftime.c (rb_strftime_with_timespec): fix padding of time zone
+ offset. [ruby-dev:43287][Bug #4458]
+
+Tue Apr 17 13:11:14 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * dln.c (rb_w32_check_imported): skip ordinal entries. based on a
+ patch by phasis68 (Heesob Park) at [ruby-core:44381].
+ [ruby-core:44371][Bug #6303]
+
+Mon Apr 16 18:22:14 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * spec/default.mspec: expand relative path for ruby_exe which uses
+ them with Dir.chdir; it breaks relative paths, for example
+ core/kernel/exec_spec.rb.
+
+Mon Apr 16 16:22:40 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * win32/win32.c (gmtime_r, localtime_r): POSIX compliant reentrant
+ versions.
+
+ * configure.in (RUBY_MSVCRT_VERSION): define on mingw too.
+
+ * win32/Makefile.sub (config.h): prefix RT_VER with RUBY and make
+ more descriptive to get rid of potential conflict.
+
+Mon Apr 16 15:19:39 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in (NO_RUBY_VENDOR_LIB): fix missing comma.
+
+Mon Apr 16 12:17:12 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+
+ * lib/matrix.rb (hermitian?): Bug fix, patch by George Koehler
+ [Bug #6290] [rubyspec:4b9573d7613]
+
+Mon Apr 16 09:42:50 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * lib/rubygems/remote_fetcher.rb (Gem::RemoteFetcher#download): should
+ use File.identical? to check the identity of the files.
+ this fixed an error of a test on Windows.
+
+Sat Apr 14 12:55:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in (UNREACHABLE): gcc 4.4 eliminates unreachable code
+ if -O3 is given.
+
+ * win32/win32.c (child_result): dropped colon.
+
+Sat Apr 14 10:45:18 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/webrick/server.rb (WEBrick::GenericServer#start):
+ partially revert r35315.
+
+ * test/webrick/test_server.rb (test_start_exception):
+ received signal is delivered to the main thread, so it is needed to
+ emulate it. patched by Eric Hodel. [ruby-core:44348] [Feature #6236]
+
+Sat Apr 14 09:35:45 2012 Eric Hodel <drbrain@segment7.net>
+
+ * variable.c (trace_ev): Removed "not reached" comment as this line is
+ reached.
+ * variable.c (rb_obj_remove_instance_variable): Replaced "not reached"
+ comment with the UNREACHABLE macro.
+ * variable.c (rb_mod_const_missing): ditto.
+ * variable.c (rb_mod_remove_cvar): ditto.
+ * enum.c (first_i): ditto.
+ * string.c (rb_str_aref): ditto.
+ * string.c (str_byte_aref): ditto.
+ * string.c (rb_to_id): ditto.
+ * io.c (rb_io_fmode_modestr): ditto.
+ * io.c (rb_io_oflags_modestr): ditto.
+ * pack.c (num2i32): ditto.
+ * vm_eval.c (rb_method_missing): ditto.
+ * vm_eval.c (rb_f_throw): ditto.
+ * dir.c (dir_read): ditto.
+ * win32/win32.c (child_result): ditto.
+ * struct.c (rb_struct_getmember): ditto.
+ * struct.c (rb_struct_set): ditto.
+ * struct.c (rb_struct_aref_id): ditto.
+ * eval.c (rb_f_raise): ditto.
+ * process.c (rb_f_exit_bang): ditto.
+ * process.c (rb_f_exit): ditto.
+ * process.c (rb_f_abort): ditto.
+ * ext/-test-/iter/break.c (iter_break_value): ditto.
+ * ext/pty/pty.c (pty_check): ditto.
+ * ext/openssl/ossl_pkey.c (ossl_pkey_new): ditto.
+ * ext/readline/readline.c (rb_remove_history): ditto.
+ * ext/stringio/stringio.c (strio_unimpl): ditto.
+ * numeric.c (num_sadded): ditto.
+ * numeric.c (num_init_copy): ditto.
+ * numeric.c (rb_num2ll): ditto.
+ * numeric.c (rb_num2ull): ditto.
+ * vm_insnhelper.c (call_cfunc): ditto.
+ * ruby.c (opt_W_getter): ditto.
+ * bignum.c (rb_big_coerce): ditto.
+ * file.c (rb_f_test): ditto.
+
+Sat Apr 14 08:38:20 2012 Eric Hodel <drbrain@segment7.net>
+
+ * encoding.c (rb_enc_codepoint_len): Use UNREACHABLE to avoid "control
+ reaches end of non-void function" warnings. [ruby-trunk - Bug #6066]
+ * re.c (name_to_backref_number): ditto.
+ * object.c (rb_Float): ditto.
+ * io.c (io_readpartial): ditto.
+ * io.c (io_read_nonblock): ditto.
+ * pack.c (rb_uv_to_utf8): ditto.
+ * proc.c (rb_method_entry_arity): ditto.
+ * vm_method.c (rb_f_notimplement): ditto.
+ * struct.c (rb_struct_aset_id): ditto.
+ * class.c (rb_scan_args): ditto.
+ * process.c (rlimit_resource_type): ditto.
+ * process.c (rlimit_resource_value): ditto.
+ * process.c (p_uid_switch): ditto.
+ * process.c (p_gid_switch): ditto.
+ * ext/digest/digest.c (rb_digest_instance_update): ditto.
+ * ext/digest/digest.c (rb_digest_instance_finish): ditto.
+ * ext/digest/digest.c (rb_digest_instance_reset): ditto.
+ * ext/digest/digest.c (rb_digest_instance_block_length): ditto.
+ * ext/bigdecimal/bigdecimal.c (BigDecimalCmp): ditto.
+ * ext/dl/handle.c (rb_dlhandle_close): ditto.
+ * ext/tk/tcltklib.c (pending_exception_check0): ditto.
+ * ext/tk/tcltklib.c (pending_exception_check1): ditto.
+ * ext/tk/tcltklib.c (ip_cancel_eval_core): ditto.
+ * ext/tk/tcltklib.c (lib_get_reltype_name): ditto.
+ * ext/tk/tcltklib.c (create_dummy_encoding_for_tk_core): ditto.
+ * ext/tk/tkutil/tkutil.c (tk_hash_kv): ditto.
+ * ext/openssl/ossl_ssl.c (ossl_ssl_session_reused): ditto.
+ * ext/openssl/ossl_pkey_ec.c (ossl_ec_key_dsa_verify_asn1): ditto.
+ * ext/openssl/ossl_pkey_ec.c (ossl_ec_point_is_at_infinit): ditto.
+ * ext/openssl/ossl_pkey_ec.c (ossl_ec_point_is_on_curve): ditto.
+ * ext/fiddle/conversions.c (generic_to_value): ditto.
+ * ext/socket/raddrinfo.c (rsock_io_socket_addrinfo): ditto.
+ * ext/socket/socket.c (sock_s_getnameinfo): ditto.
+ * ext/ripper/eventids2.c (ripper_token2eventid): ditto.
+ * cont.c (return_fiber): ditto.
+ * dmydln.c (dln_load): ditto.
+ * vm_insnhelper.c (vm_search_normal_superclass): ditto.
+ * bignum.c (big_fdiv): ditto.
+ * marshal.c (r_symlink): ditto.
+ * marshal.c (r_symbol): ditto.
+
+Fri Apr 13 17:12:09 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * hash.c (inspect_i): keep string's coderange.
+
+Fri Apr 13 15:26:51 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * hash.c (rb_hash_aset, rb_hash_update, rb_hash_update_by): use
+ st_update() to reduce evaluation of hash values.
+
+Fri Apr 13 15:17:36 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/webrick/server.rb (WEBrick::GenericServer#stop): fix r35303;
+ this method is to deny new connections, not shutdown yet.
+
+ * lib/webrick/server.rb (WEBrick::GenericServer#start):
+ re-raise exception only when the exception is Interrupt (^C).
+
+Thu Apr 12 19:51:45 2012 Tadayoshi Funaba <tadf@dotrb.org>
+
+ * ext/date/date_core.c: added some notes.
+
+Wed Apr 11 17:16:49 2012 Koichi Sasada <ko1@atdot.net>
+
+ * compile.c (compile_array, compile_array_):
+ Divide big array (or hash) literals into several blocks and
+ concatenate them. There was a problem that a big array (hash)
+ literal causes SystemStackError exception (stack overflow)
+ because VM push all contents of the literal onto VM stack to
+ make an array (or hash). To solve this issue, we make several
+ arrays (hashes) and concatenate them to make a big array (hash)
+ object. [ruby-dev:37701] [Bug #982]
+
+ * compile.c (iseq_compile_each, setup_args): use modified
+ compile_array.
+
+ * vm.c (m_core_hash_from_ary, m_core_hash_merge_ary,
+ m_core_hash_merge_ptr): added for above change.
+
+ * id.c (Init_id), parse.y: add core method ids.
+
+ * bootstraptest/test_literal.rb: add simple tests.
+
+ * bootstraptest/test_eval.rb: remove rescue clause to catch
+ SystemStackError exception.
+
+ * test/ruby/test_literal.rb: add tests to check no stack overflow.
+
+Thu Apr 12 07:10:37 2012 Eric Hodel <drbrain@segment7.net>
+
+ * lib/uri/generic.rb (module URI): URI now downcases the scheme to
+ follow RFC 2396 section 3.1. [ruby-trunk - Feature #4551]
+ * test/uri/test_generic.rb (class URI): Test for above
+
+Thu Apr 12 06:15:44 2012 Eric Hodel <drbrain@segment7.net>
+
+ * lib/net/protocol.rb (module Net): Added ReadTimeout to match
+ OpenTimeout. ReadTimeout is now raised by rbuf_fill instead of
+ Timeout::Error to help users distinguish what type of timeout
+ occurred. [ruby-trunk - Feature #6088]
+ * lib/net/pop.rb (module Net): Updated documentation for ReadTimeout
+ and OpenTimeout.
+ * lib/net/http.rb (module Net): ditto
+ * lib/net/smtp.rb (module Net): ditto
+ * lib/net/telnet.rb (module Net): Net::ReadTimeout is now raised in
+ waitfor to match Net::Protocol.
+ * test/net/http/test_http.rb: Updated Timeout::Error expectation to
+ Net::ReadTimeout.
+ * test/net/ftp/test_ftp.rb: ditto
+
+Thu Apr 12 05:27:01 2012 Eric Hodel <drbrain@segment7.net>
+
+ * lib/webrick/server.rb (module WEBrick::GenericServer): A server
+ will now continue only when a StandardError subclass is raised. For
+ other exception types the error will be logged at the fatal level and
+ the server will safely stop. Based on a patch by Alex Young.
+ [ruby-trunk - Feature #6236]
+ * test/webrick/test_server.rb: Test for new exception handling
+ behavior. Join the server thread instead of busy-waiting for it to
+ shut down to remove race conditions.
+
+Thu Apr 12 03:50:44 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/test/unit.rb (Test::Unit:Runner::Worker#_run_suites):
+ call GC.start before running the test suites.
+
+Wed Apr 11 22:31:19 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * parse.y (rb_check_id_cstr): new function to check if ID is
+ registered with NUL-terminated C string.
+
+ * sprintf.c (rb_str_format): avoid inadvertent symbol creation.
+
+Wed Apr 11 20:28:36 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+
+ * io.c (rb_io_eof): use eof() instead of io_fillbuf(). It's because
+ io_unread() doesn't work properly when reading CRLF with read(length)
+ and mode 'r'.
+ [ruby-core:44189][Bug #6271]
+
+ * test/ruby/test_io_m17n.rb (TestIO_M17N#test_read_crlf_and_eof):
+ test for above.
+
+Wed Apr 11 07:38:33 2012 Eric Hodel <drbrain@segment7.net>
+
+ * ext/digest/sha2/lib/sha2.rb (Digest#block_length): Fixed method name
+ in documentation examples. Patch by naleski via
+ https://github.com/ruby/ruby/pull/115
+
+Wed Apr 11 07:33:13 2012 Eric Hodel <drbrain@segment7.net>
+
+ * pack.c (pack_pack): Warn when an invalid character is found in the
+ format string when $VERBOSE is true. [ruby-trunk - Feature #5219]
+ * pack.c (pack_unpack): ditto
+ * test/ruby/test_pack.rb (class TestPack): Test for warnings on
+ invalid format characters.
+
+Wed Apr 11 06:11:10 2012 Eric Hodel <drbrain@segment7.net>
+
+ * string.c (rb_str_tr): Documented use of \ to escape characters.
+ [ruby-trunk - Bug #6161]
+ * string.c (rb_str_count): ditto
+
+Wed Apr 11 05:14:51 2012 Eric Hodel <drbrain@segment7.net>
+
+ * lib/abbrev.rb: Clarified that Abbrev.abbrev returns a Hash instead
+ of an Array. Patch by Andrei Bocan. [ruby-trunk - Bug #6107]
+
+Wed Apr 11 03:02:24 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-Mon Jul 1 12:02:39 2013 Tanaka Akira <akr@fsij.org>
+ * ext/ripper/lib/ripper/sexp.rb: fix spelling. patched by
+ Jonathan Hinkle via https://github.com/ruby/ruby/pull/116
- * bignum.c (rb_cstr_to_inum): Skip leading zeros.
+Tue Apr 10 19:07:04 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Jul 1 00:59:23 2013 Tanaka Akira <akr@fsij.org>
+ * error.c (rb_enc_raise): new function to raise an exception with
+ the message in the given encoding. patched by now (Nikolai
+ Weibull) at [ruby-core:41160]. [Feature #5650]
- * 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.
+Tue Apr 10 18:19:32 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Sun Jun 30 22:40:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * lib/net/http.rb (Net::HTTP#send_request_with_body_stream):
+ use IO.copy_stream for requests using body_stream.
+ patched by Eric Wong. [ruby-core:40898] [Feature #5605]
- * lib/prime.rb: Corrected a few comments. Patch by @Nullset14.
- Fixes GH-346.
+Tue Apr 10 16:53:21 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Jun 30 21:53:38 2013 Tanaka Akira <akr@fsij.org>
+ * thread_pthread.c: add prototype declarations for older Mac OS X.
+ [ruby-core:43376][Bug #6170]
- * bignum.c (rb_cstr_to_inum): Use rb_integer_unpack if base is a power
- of 2.
+Tue Apr 10 15:35:21 2012 Koichi Sasada <ko1@atdot.net>
-Sun Jun 30 10:59:23 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * compile.c (iseq_set_sequence): show a hint if there are duplicated
+ "when" clauses. [ruby-core:41502] [ruby-trunk - Feature #5716]
- * 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]
+Tue Apr 10 09:57:00 2012 Eric Hodel <drbrain@segment7.net>
- * io.c (spawnv, spawn): use UTF-8 spawn family. [Bug #1771]
+ * string.c (rb_str_split_m): Documented behavior of split on the empty
+ string. [ruby-trunk - Feature #3575]
- * process.c (proc_exec_sh, proc_spawn_cmd, proc_spawn_sh): ditto.
+Tue Apr 10 09:48:31 2012 Eric Hodel <drbrain@segment7.net>
- * win32/win32.c (translate_char, join_argv, has_redirection): make
- codepage aware.
+ * ext/zlib/zlib.c (rb_deflate_s_deflate): Fixed ruby example replacing
+ NO_FLUSH with FINISH. [ruby-trunk - Bug #6273]
- * win32/win32.c (rb_w32_udln_find_exe_r, rb_w32_udln_find_file_r):
- codepage independent versions.
+Mon Apr 9 23:10:26 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * win32/win32.c (w32_spawn): extract codepage aware code from
- rb_w32_spawn().
+ * win32/win32.c (isUNCRoot, winnt_stat): support long UNC.
+ [ruby-core:30623][Feature #3399]
- * win32/win32.c (rb_w32_uspawn): add UTF-8 version function.
+Mon Apr 9 15:16:01 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * win32/win32.c (w32_aspawn_flags): extract codepage aware code from
+ * parse.y (string_content, parser_yylex): count brace nesting to
+ dispatch embexpr_end. [ruby-core:43775][Bug #6211]
+
+Mon Apr 9 13:06:58 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+
+ * hash.c (rb_hash_set_default_proc): Accept nil, patch by Run Paint
+ [Feature #4234]
+
+ * test/ruby/test_hash.rb: test for above.
+
+Mon Apr 9 08:01:15 2012 Tadayoshi Funaba <tadf@dotrb.org>
+
+ * ext/date/date_strftime.c: gets the value with range() consistently.
+ * ext/date/date_strftime.c (range): now just replaces the given item.
+
+Mon Apr 9 06:58:01 2012 Tadayoshi Funaba <tadf@dotrb.org>
+
+ * complex.c (nucomp_expt): [ruby-core:44170].
+
+Mon Apr 9 02:52:03 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * complex.c (nucomp_expt): the result of f_complex_new2 may be a fixnum
+ with mathn. [ruby-core:44170] [Bug #6267]
+
+Sun Apr 8 22:46:01 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * ext/json/generator/generator.c (generate_json_bignum):
+ add RB_GC_GUARD.
+ http://fb.rubyci.org/~chkbuild/ruby-trunk/log/20120407T210301Z.diff.html.gz
+
+Sun Apr 8 07:26:40 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler): get keys
+ and fetch values from it to prevent @timeout_info's error
+ "can't add a new key into hash during iteration".
+
+Sun Apr 8 06:51:57 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * io.c (io_unread): cast as long the value for extra_max.
+ [ruby-core:44137] [Bug #6257]
+
+Sun Apr 8 06:46:48 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/webrick/httpresponse.rb (WEBrick::HTTPResponse#send_body_io):
+ use readpartial to get data even if the response is streaming data and
+ each data is smaller than @buffer_size.
+ patched by yu nobuoka. [ruby-dev:45471] [Bug #6230]
+
+Sat Apr 7 22:35:36 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+
+ * include/ruby/win32.h (rb_w32_aspawn_flags): add the declaration of
+ new function.
+
+ * process.c (enum): add EXEC_OPTION_PGROUP and move the position
+ above for the usage in proc_spawn_n().
+
+ * process.c (proc_spawn_n): add an argument to pass new option
+ `new_pgroup`. The option specifies CREATE_NEW_PROCESS_GROUP flag to
+ CreateProcessW(). This flag is necessary for the usage of
+ Process.kill on the subprocess on Windows.
+
+ * process.c (rb_exec_arg_addopt): ditto.
+
+ * process.c (rb_spawn_process): ditto.
+
+ * process.c (documentation for rb_f_spawn): add documentation for new
+ option `new_pgroup` of spawn.
+
+ * test/ruby/test_process.rb (TestProcess#test_execopts_new_pgroup):
+ add tests for option `new_pgroup`.
+
+ * test/ruby/test_thread.rb
+ (TestThreadGroup#test_thread_timer_and_interrupt):
+ add option `new_pgroup: true` to spawn on Windows. It's needed for
+ Process.kill on a subprocess.
+
+ * win32/win32.c (CreateChild): add an argument to pass
+ dwCreationFlags of CreateProcessW().
+
+ * win32/win32.c (rb_w32_spawn): ditto.
+
+ * win32/win32.c (rb_w32_aspawn_flags): add new function to pass
+ dwCreationFlags.
+
+ * win32/win32.c (rb_w32_aspawn): refactor to move the content to
rb_w32_aspawn_flags().
+ [ruby-core:43245][Bug #6131]
- * win32/win32.c (rb_w32_uaspawn_flags, rb_w32_uaspawn_flags): add
- UTF-8 version functions.
+Sat Apr 7 22:32:00 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
- * win32/win32.c (w32_getenv): extract codepage aware code from
- rb_w32_ugetenv() and rb_w32_getenv().
+ * test/ruby/test_thread.rb
+ (TestThreadGroup#test_thread_timer_and_interrupt): skip on Windows.
+ Process.kill cannot kill a subprocess if CREATE_NEW_PROCESS_GROUP
+ flag is not specified in a call to CreateProcessW().
- * win32/win32.c (w32_stati64): extract codepage aware code from
- rb_w32_ustati64() and rb_w32_stati64().
+ * win32/win32.c (CreateChild): revert the usage of
+ CREATE_NEW_PROCESS_GROUP flag for compatibility.
+ [ruby-core:43245][Bug #6131]
- * dln.h (DLN_FIND_EXTRA_ARG, DLN_FIND_EXTRA_ARG_DECL): allow extra
- arguments to dln_find_{exe,file}_r().
+Sat Apr 7 10:28:40 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * dln_find.c (dln_find_exe_r, dln_find_file_r): add extract arguments.
+ * ext/psych/lib/psych.rb: bumping up psych version to match release.
+ * ext/psych/psych.gemspec: ditto
- * process.c (EXPORT_STR, EXPORT_DUP): convert to default process
- encoding if defined.
+Sat Apr 7 02:07:00 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * process.c (check_exec_env_i): convert environment variables too.
+ * ext/psych/parser.c: fall back to any encoding if the external
+ encoding is wrong. [ruby-core:44163]
+ * test/psych/test_encoding.rb: fix test
- * process.c (rb_exec_fillarg): convert program path and arguments too.
+Fri Apr 6 16:24:24 2012 Martin Duerst <duerst@it.aoyama.ac.jp>
-Sun Jun 30 01:57:08 2013 Tanaka Akira <akr@fsij.org>
+ * struct.c (documentation for rb_struct_members_m):
+ fix 'array of strings' to 'array of symbols'
+ [ruby-core:44152][Bug #6264]
- * bignum.c (big_rshift): Use abs2twocomp and twocomp2abs_bang.
+Fri Apr 6 14:27:04 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-Sun Jun 30 00:14:20 2013 Tanaka Akira <akr@fsij.org>
+ * Makefile.in ($(LIBRUBY_A)): fix typo.
- * bignum.c (RBIGNUM_SET_NEGATIVE_SIGN): New macro.
- (RBIGNUM_SET_POSITIVE_SIGN): Ditto.
- (rb_big_neg): Inline get2comp to avoid double negation.
+Thu Apr 5 13:26:15 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Jun 29 23:26:41 2013 Tanaka Akira <akr@fsij.org>
+ * missing/alloca.c (xmalloc, xfree): use ruby version, not
+ depending on RUBY_LIB_PREFIX. [ruby-dev:45492][Bug #6255]
- * 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.
+Wed Apr 4 13:06:39 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Sat Jun 29 22:31:59 2013 Tanaka Akira <akr@fsij.org>
+ * lib/ftp/ftp.rb (Net::FTP#close): restore original read_timeout.
- * bignum.c (bary_2comp): Simplified.
+Wed Apr 4 10:33:31 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Sat Jun 29 09:33:53 2013 Tanaka Akira <akr@fsij.org>
+ * lib/ftp/ftp.rb (Net::FTP#close): ignore exceptions from shutdown and
+ read on closing.
- * bignum.c (bigor_int): Return -1 if y == -1.
+Wed Apr 4 01:48:35 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Sat Jun 29 09:07:16 2013 Tanaka Akira <akr@fsij.org>
+ * lib/ftp/ftp.rb (Net::FTP#close): close socket more gracefully.
- * 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.
+ * lib/ftp/ftp.rb (Net::BufferedSocket#shutdown): added.
-Sat Jun 29 08:19:58 2013 Tanaka Akira <akr@fsij.org>
+ * test/net/ftp/test_ftp.rb (FTPTest#create_ftp_server): wait socket
+ with shutdown and read.
- * 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.
+Tue Apr 3 19:00:52 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Fri Jun 29 01:08:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * test/net/ftp/test_ftp.rb (FTPTest#create_ftp_server): should wait
+ a little before closing socket because if the client call
+ Net::FTP#getmultiline the socket is suddenly closed by the server in
+ the getline loop.
- * 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
+Tue Apr 3 18:33:38 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/ruby/test_integer_comb.rb (class TestIntegerComb): add test case
+ * process.c (setreuid, setregid): suppress warnings.
+ [ruby-core:43374][Bug #6169]
-Fri Jun 28 12:26:53 2013 Tanaka Akira <akr@fsij.org>
+Tue Apr 3 10:18:27 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (rb_big_and): Allocate new bignum with same size to shorter
- argument if it's high bits are zero.
+ * enumerator.c (inspect_enumerator): suppress uninitialized
+ instance variable warnings. [ruby-dev:45449][Bug #6214]
+ patched by no6v (Nobuhiro IMAI).
-Fri Jun 28 12:14:04 2013 Tanaka Akira <akr@fsij.org>
+Mon Apr 2 13:25:08 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/socket/ipsocket.c (init_inetsock_internal): Don't use local
- addresses which address family is different to remote address.
+ * lib/optparse/ac.rb: autoconf-like options.
-Fri Jun 28 08:06:22 2013 Tanaka Akira <akr@fsij.org>
+Mon Apr 2 10:34:00 2012 eregon <eregontp@gmail.com>
- * bignum.c (bigand_int): Add arguments, xn and hibitsx.
- Use twocomp2abs_bang.
+ * string.c (rb_str_start_with, rb_str_end_with): raise an error if
+ an argument is not convertible to a String.
+ [ruby-core:40623][Bug #5536]
-Thu Jun 27 23:58:13 2013 Tanaka Akira <akr@fsij.org>
+Mon Apr 2 03:35:25 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * bignum.c (abs2twocomp_bang): Removed.
- (abs2twocomp): Take n_ret argument to return actual length.
- (rb_big_and): Follow above change.
+ * lib/webrick/server.rb (WEBrick::GenericServer): close socket only if
+ the socket is not closed yet.
-Thu Jun 27 22:52:19 2013 Tanaka Akira <akr@fsij.org>
+Sun Apr 1 23:03:18 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * 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.
+ * lib/net/ftp.rb (Net::BufferedSocket): should delegate send() to @io
+ for Net::FTP#abort and Net::FTP#status.
-Thu Jun 27 20:03:13 2013 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
+Sun Apr 1 00:41:56 2012 Shugo Maeda <shugo@ruby-lang.org>
- * ext/openssl/lib/openssl/ssl.rb (verify_certificate_identity): fix
- hostname verification. Patched by nahi.
+ * lib/net/ftp.rb: fixed the domain name in examples.
- * test/openssl/test_ssl.rb (test_verify_certificate_identity): test for
- above.
+Sat Mar 31 21:39:45 2012 NARUSE, Yui <naruse@ruby-lang.org>
+ * lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler): dup to prevent
+ @timeout_info's "can't add a new key into hash during iteration".
-Thu Jun 27 00:23:57 2013 Tanaka Akira <akr@fsij.org>
+Sat Mar 31 14:22:59 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (rb_big_pow): Retry if y is a Bignum and it is
- representable as a Fixnum.
- Use rb_absint_numwords.
+ * hash.c (hash_default_value): extract from rb_hash_aref(), to be
+ shared with rb_hash_shift(), so that overriding Hash#default
+ will be respected.
-Wed Jun 26 23:53:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+Sat Mar 31 14:16:02 2012 Sokolov Yura (funny-falcon) <funny.falcon@gmail.com>
- * ext/bigdecimal/bigdecimal.c (BigDecimal_save_rounding_mode): fix typo.
- Fixes GH-343. Patch by @jgarber.
+ * hash.c: do not allocate st_table when it is not necessary.
-Wed Jun 26 23:22:21 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Mar 31 13:42:39 2012 Shugo Maeda <shugo@ruby-lang.org>
- * enumerator.c (rb_enumeratorize_with_size): use strict definition
- rb_enumerator_size_func.
+ * lib/net/ftp.rb (read_timeout=, open_timeout=): supported timeout.
-Wed Jun 26 23:11:14 2013 Kouhei Sutou <kou@cozmixng.org>
+Sat Mar 31 13:20:40 2012 Sokolov Yura (funny-falcon) <funny.falcon@gmail.com>
- * 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.
+ * hash.c: remove unnecessary checks for Qundef in hash iterations.
+ since hash use st_foreach_check for iterations, such checks are
+ needless.
-Wed Jun 26 22:44:00 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Mar 31 12:05:01 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * include/ruby/intern.h (rb_enumeratorize_with_size): cast for
- backward compatibility.
+ * ext/openssl/ossl_x509cert.c: Fix doc typo.
- * include/ruby/intern.h (rb_enumerator_size_func): define strict
- function declaration for rb_enumeratorize_with_size().
+Sat Mar 31 10:13:24 2012 Sokolov Yura (funny-falcon) <funny.falcon@gmail.com>
-Wed Jun 26 21:01:22 2013 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+ * st.c (st_foreach_check, st_foreach): remove ancient check. This
+ check are from initial ordered hash commit when first entry were
+ created with entry->fore = entry->back = entry.
- * test/ruby/test_io.rb (TestIO#test_write_32bit_boundary): skip if
- writing a file is slow.
- [ruby-core:55541] [Bug #8519]
+ * st.c (st_delete): use real_entries in st_delete for packed tables
-Wed Jun 26 16:42:11 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Mar 31 07:53:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * 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.
+ * st.c (st_foreach_check): remove the entry by replacing with never
+ when ST_DELETE.
-Wed Jun 26 12:48:22 2013 Tanaka Akira <akr@fsij.org>
+ * hash.c (st_foreach_safe): since table is not for VALUE, Qundef is
+ not special value, so use 0 instead. therefore this function can be
+ applied to only st_table which 0 is invalid as keys, e.g., IDs.
- * bignum.c (bigxor_int): Fix a buffer over read.
+ * hash.c: Qundef cannot be passed from st_foreach_check().
-Wed Jun 26 12:13:12 2013 Tanaka Akira <akr@fsij.org>
+ * hash.c, marshal.c, object.c, variable.c: fix callback argument types
+ of iterators.
- * 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).
+Thu Mar 29 23:50:15 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Jun 26 12:08:51 2013 Tanaka Akira <akr@fsij.org>
+ * st.c (st_update): pass pointer to key to the callback function.
- * test/socket/test_udp.rb: Close sockets explicitly.
- Don't use fixed port number.
+Thu Mar 29 16:36:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Jun 26 07:27:17 2013 Tanaka Akira <akr@fsij.org>
+ * st.c (st_update): add existing parameter to the callback function.
- * bignum.c (bigand_int): Fix a buffer over read.
+Thu Mar 29 16:35:32 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Jun 26 06:48:07 2013 Tanaka Akira <akr@fsij.org>
+ * lib/test/unit.rb (terminal_width, del_status_line, put_status):
+ extract as methods.
- * bignum.c (bigadd_int): Fix a buffer over read.
+Thu Mar 29 10:20:18 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-Wed Jun 26 01:18:13 2013 Masaya Tarui <tarui@ruby-lang.org>
+ * ext/openssl/ossl_pkcs7.c: fix crash when parsing garbage data.
+ * test/openssl/test_pkcs7.rb: assert correct behavior for it.
+ Thanks to Matt Venables for reporting the issue.
+ [ruby-core:43250][Bug #6134]
- * 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.
+Thu Mar 29 10:16:05 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Wed Jun 26 01:17:29 2013 Tanaka Akira <akr@fsij.org>
+ * thread_win32.c (TIME_QUANTUM_USEC): 10ms(= old setting) [experimental]
+ cf. [Bug #6098]
- * bignum.c (bigsub_int): Fix a buffer over read.
+Thu Mar 29 10:12:12 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Tue Jun 25 22:45:43 2013 Tanaka Akira <akr@fsij.org>
+ * thread.c (rb_threadptr_execute_interrupts_common): use defined
+ TIME_QUANTUM_USEC instead of a magic number. there is no meanings
+ to use different values for checking interval of interruption and
+ thread switching limits.
+ cf. [Bug #6098]
- * bignum.c (rb_absint_singlebit_p): Use POW2_P.
- (bary_pack): Ditto.
- (rb_big2str0): Ditto.
- (POW2_P): Moved to top.
+Thu Mar 29 09:26:17 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-Tue Jun 25 22:28:07 2013 Akinori MUSHA <knu@iDaemons.org>
+ * test/openssl/test_x509cert.rb: exclude test that fails when issuing
+ a certificate with RSA signature and DSS1 digest for earlier
+ OpenSSL versions when used in conjunction with OpenSSL 1.0.1.
+ Thanks, Vit Ondruch, for reporting the issue.
+ [ruby-core:42949][Bug #6089]
- * 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]
+Thu Mar 29 08:25:35 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-Tue Jun 25 21:43:13 2013 Tanaka Akira <akr@fsij.org>
+ * NEWS: add note about unified behavior of encoding nil values in
+ instances of OpenSSL::ASN1::ASN1Data.
- * bignum.c (big2dbl): Use (BDIGIT)1 instead of 1UL.
- (bary_mul_normal): Remove a useless cast.
+Thu Mar 29 07:45:36 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-Tue Jun 25 21:26:00 2013 Kenta Murata <mrkn@mrkn.jp>
+ * ext/openssl/ossl_asn1.c: raise TypeError when trying to encode nil
+ values for Primitive instances.
+ * test/openssl/test_asn1.rb: Assert consistent behavior when
+ encoding nil values: Primitives raise TypeError, Constructives
+ raise NoMethodError.
+ Fixes [ruby-core:43009][Bug #6102]
- * 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
+Wed Mar 28 16:39:59 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jun 25 20:36:31 2013 Tanaka Akira <akr@fsij.org>
+ * process.c (obj2uid, obj2gid): allow strings as input user/group id.
+ [ruby-core:40923][Feature #5610]
- * bignum.c (big2ulong): "check" argument removed.
- (rb_big2ulong): Follow above change.
- (rb_big2long): Ditto.
- (rb_big_rshift): Ditto.
- (rb_big_aref): Ditto.
+Wed Mar 28 15:06:18 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jun 25 20:08:29 2013 Tanaka Akira <akr@fsij.org>
+ * marshal.c (r_symreal): default to ASCII-8BIT for non-ascii symbols,
+ otherwise it should be converted to US-ASCII in rb_intern_str() if
+ possible. [ruby-core:43762][Bug #6209]
- * bignum.c (rb_big2ulong_pack): Use rb_integer_pack.
- (rb_big_aref): Call big2ulong with TRUE for "check" argument.
- It should be non-effective.
+Wed Mar 28 08:44:24 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-Tue Jun 25 19:07:33 2013 Tanaka Akira <akr@fsij.org>
+ * ext/psych/lib/psych.rb: updating version to match gem
+ * ext/psych/psych.gemspec: ditto
+ * ext/psych/lib/psych/visitors/to_ruby.rb: fixing deprecation warning
- * 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
+Tue Mar 27 23:44:11 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Tue Jun 25 19:03:00 2013 Tanaka Akira <akr@fsij.org>
+ * io.c (io_unread): fixed memory leak. report by nagachika via IRC.
- * bignum.c (big2ulong): Add a cast.
- (big2ull): Add a specialized code for SIZEOF_LONG_LONG <=
- SIZEOF_BDIGITS.
+Tue Mar 27 22:44:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jun 25 12:42:57 2013 Tanaka Akira <akr@fsij.org>
+ * configure.in (verconf.h): separate load path specific stuff from
+ config.h.
- * bignum.c (integer_unpack_single_bdigit): Use "1 + ~u" instead of
- "-u" to suppress warning (C4146) by Visual Studio.
- Reported by ko1 via IRC.
+Tue Mar 27 22:43:40 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jun 25 12:28:57 2013 Tanaka Akira <akr@fsij.org>
+ * win32/Makefile.sub: fix config.h path to include.
- * bignum.c (big2ulong): Add code specialized for SIZEOF_LONG <=
- SIZEOF_BDIGITS.
- This prevents shift width warning from "num <<= BITSPERDIG".
+Tue Mar 27 17:08:08 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-Tue Jun 25 12:23:30 2013 Koichi Sasada <ko1@atdot.net>
+ * win32/win32.c (check_if_dir): fix memory leak.
- * gc.c: fix oldgen/remembered_shady counting algorithm.
+Tue Mar 27 13:13:51 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c (rgengc_check_shady): increment
- `objspace->rgengc.remembered_shady_object_count' here.
+ * string.c (str_new_empty): should copy also the encoding as an
+ empty substring. [ruby-dev:45441][Bug #6206]
- * gc.c (rgengc_remember): return FALSE if obj is already remembered.
+Mon Mar 26 23:43:04 2012 Shugo Maeda <shugo@ruby-lang.org>
- * gc.c (rgengc_rememberset_mark): make it void.
+ * lib/net/ftp.rb (parse227, parse228, parse229): don't use $~.
- * gc.c (gc_mark_children): fix to double counting oldgen_object_count
- at minor GC.
+Mon Mar 26 23:34:40 2012 Shugo Maeda <shugo@ruby-lang.org>
-Tue Jun 25 12:07:18 2013 Tanaka Akira <akr@fsij.org>
+ * lib/net/ftp.rb (parse227, parse228, parse229): don't use local
+ variables defined by named capture for other Ruby implementations
+ such as Rubinius.
- * 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.
+Mon Mar 26 23:19:03 2012 Shugo Maeda <shugo@ruby-lang.org>
- * marshal.c (shortlen): Use SIZEOF_BDIGITS instead of sizeof(BDIGIT).
+ * lib/net/ftp.rb (parse_pasv_port): refactored.
- * ext/openssl/ossl_bn.c (ossl_bn_initialize): Use SIZEOF_BDIGITS
- instead of sizeof(BDIGIT).
+Mon Mar 26 19:49:49 2012 Shugo Maeda <shugo@ruby-lang.org>
-Tue Jun 25 11:40:08 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/net/ftp/test_ftp.rb: add the test, which was forgotten in the
+ previous commit.
- * bignum.c (big2ulong): suppress shorten-64-to-32 warning. BDIGIT can
- be bigger than long now.
+Mon Mar 26 19:37:27 2012 Shugo Maeda <shugo@ruby-lang.org>
- * bignum.c (LSHIFTX): remove redundant never-true expression.
+ * lib/net/ftp.rb (parse227, parse228, parse229): refactored.
-Tue Jun 25 00:55:54 2013 Masaya Tarui <tarui@ruby-lang.org>
+Mon Mar 26 11:46:23 2012 Shugo Maeda <shugo@ruby-lang.org>
- * 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.
+ * enumerator.c (inspect_enumerator): show method arguments of
+ lazy enumerators correctly.
-Mon Jun 24 23:30:31 2013 Tanaka Akira <akr@fsij.org>
+Mon Mar 26 13:51:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (integer_unpack_single_bdigit): Refine code to filling
- higher bits and use BIGLO.
+ * win32/win32.c (check_if_dir, check_if_wdir): fix for Visual C++
+ not to use S_ISDIR(). [Feature #2408][ruby-core:26925]
-Mon Jun 24 22:26:31 2013 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+ * ruby.c (load_file_internal): ditto.
- * test/rinda/test_rinda.rb (RingIPv6#prepare_ipv6):
- ifindex() function may not be implemented on Windows. We use another
- check for the case.
+Mon Mar 26 11:46:01 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Jun 24 22:11:37 2013 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+ * ruby.c (load_file_internal): bail out if the script is a directory.
+ [Feature #2408][ruby-core:26925]
- * test/gdbm/test_gdbm.rb (TestGDBM#test_s_open_nolock):
- skip a failing test on Windows because flock() implementation is
- different from Unix.
+ * win32/win32.c (rb_w32_open, rb_w32_wopen): check if the file is a
+ directory when access denied, to set errno to EISDIR.
-Mon Jun 24 22:06:14 2013 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+Sun Mar 25 18:13:14 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * 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]
+ * string.c (tr_setup_table): fix multiple non latin argument for
+ non latin (over 256 characters) tr-like methods.
+ [ruby-core:43371] [Bug #6167]
-Mon Jun 24 22:04:02 2013 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+Sun Mar 25 00:46:06 2012 Shugo Maeda <shugo@ruby-lang.org>
- * 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.
+ * enumerator (lazy_initialize): set the instance variable "receiver"
+ to include the receiver to the return value of inspect on a lazy
+ enumerator directly created by Enumerator::Lazy.new.
-Mon Jun 24 22:04:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * enumerator (RETURN_LAZY): don't set the instance variable "receiver".
- * 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
+Sat Mar 24 23:59:00 2012 Shugo Maeda <shugo@ruby-lang.org>
-Mon Jun 24 20:31:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * enumerator (enumerator_inspect): include the original receiver and
+ method name of Enumerator::Lazy in the result of inspect.
+ [ruby-core:43345] [Bug #6159]
- * 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
+ * enumerator (InitVM_Enumerator): don't use rb_define_alias for
+ some methods such as collect in order to make rb_frame_this_func()
+ return the correct method names.
-Mon Jun 24 07:57:18 2013 Masaya Tarui <tarui@ruby-lang.org>
+Sat Mar 24 22:22:18 2012 Sambasiva Rao Suda <sambasivarao@gmail.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.
+ * time.c (time_init_1): Time.new will accept seconds as string or
+ int. [ruby-core:43569][Bug #6193]
-Mon Jun 24 02:53:09 2013 Zachary Scott <zachary@zacharyscott.net>
+Fri Mar 23 15:12:12 2012 Martin Duerst <duerst@it.aoyama.ac.jp>
- * array.c: Return value in Array overview example found by @PragTob
- [Fixes GH-336] https://github.com/ruby/ruby/pull/336
+ * transcode.c (documentation for str_encode): Explain
+ that transcoding to the same encoding is a no-op
+ (i.e. no exceptions, no replacements,...).
+ [ruby-core:43557][Bug #6190]
-Mon Jun 24 02:45:51 2013 Zachary Scott <zachary@zacharyscott.net>
+Fri Mar 23 13:19:20 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * array.c (rb_ary_zip): typo by @PragTob [Fixes GH-337]
- https://github.com/ruby/ruby/pull/337
+ * bignum.c (rb_str_to_inum): must be ASCII compatible encoding as
+ well as String#hex and String#oct. [ruby-core:43566][Bug #6192]
-Mon Jun 24 02:42:01 2013 Zachary Scott <zachary@zacharyscott.net>
+ * string.c (rb_must_asciicompat): check if ASCII compatible.
- * win32/README.win32: grammar typo by @blankenshipz [Fixes GH-334]
- https://github.com/ruby/ruby/pull/334
+Thu Mar 22 23:14:36 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Jun 24 00:59:35 2013 Tanaka Akira <akr@fsij.org>
+ * transcode.c (str_encode_bang, encoded_dup): if nothing was
+ transcoded, just set encoding but leave coderange unchanged as
+ force_encoding. [ruby-core:43557][Bug #6190]
- * 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.
+Thu Mar 22 22:30:44 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-Sun Jun 23 23:05:58 2013 Tanaka Akira <akr@fsij.org>
+ * io.c (static int io_fflush): add the definition.
+ Use it in set_binary_mode_with_seek_cur().
- * 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.
+ * io.c (set_binary_mode_with_seek_cur): refactoring to split the
+ content into io_unread(). Fix the possibility of buffer overflow.
- * include/ruby/ruby.h (RBIGNUM_EMBED_LEN_MAX): Define it only if it is
- not defined yet.
+ * io.c (io_unread): add new implementation for Windows. Previous one
+ caused invalid cursor position using IO#pos with OS text mode. New
+ one fixes the bug.
-Sun Jun 23 17:29:51 2013 Tanaka Akira <akr@fsij.org>
+ * test/ruby/test_io_m17n.rb
+ (TestIO_M17N#test_pos_dont_move_cursor_position): add a test for
+ above bug.
+ [ruby-core:43497] [Bug #6179]
- * bignum.c (integer_unpack_single_bdigit): Use a cast.
+Thu Mar 22 19:55:08 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Jun 23 15:38:07 2013 Koichi Sasada <ko1@atdot.net>
+ * win32/win32.c (rb_w32_fstat, rb_w32_fstati64): convert FILETIME
+ to time_t directly, not to be affected by TZ unnecessarily.
- * bootstraptest/test_thread.rb: rescue resource limitation errors.
+ * win32/win32.c (unixtime_to_filetime): convert time_t to FILETIME
+ simply.
-Sun Jun 23 08:19:27 2013 Tanaka Akira <akr@fsij.org>
+Thu Mar 22 13:43:31 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (integer_unpack_single_bdigit): Extracted from
- bary_unpack_internal.
+ * ext/openssl/ossl_pkey_rsa.c (rsa_generate): fix argument type.
+ [Bug #6094]
-Sun Jun 23 07:41:52 2013 Tanaka Akira <akr@fsij.org>
+Thu Mar 22 11:14:10 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * bignum.c (bary_unpack_internal): Suppress warnings (C4146) on Visual Studio.
- Reported by ko1 via IRC.
+ * test/ruby/test_io.rb (TestIO#test_pos_with_getc): updated.
+ see [ruby-core:43550]
-Sun Jun 23 06:49:28 2013 Koichi Sasada <ko1@atdot.net>
+Wed Mar 21 17:57:57 2012 NARUSE, Yui <naruse@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(),
+ * regcomp.c: Merge Onigmo 3d855b30d574536d3ae600260208c6624ae4791c.
+ [Bug#6143] [Bug#6144] [Bug#6145]
- * class.c, eval.c, hash.c: use OBJ_WB_UNPROTECT().
+Wed Mar 21 17:01:55 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Sun Jun 23 05:41:32 2013 Koichi Sasada <ko1@atdot.net>
+ * test/ruby/test_io.rb (TestIO#test_pos_with_getc): added.
+ see [Bug #6179][ruby-core:43518]
- * 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.
+Mon Mar 19 17:18:51 2012 Shugo Maeda <shugo@ruby-lang.org>
- * vm_method.c (rb_method_entry_make): add write barriers.
+ * enumerator.c (lazy_flat_map_func): convert the block value to
+ Array if it doesn't respond to each. [ruby-core:43334]
+ [Bug #6155]
-Sun Jun 23 01:27:54 2013 Tanaka Akira <akr@fsij.org>
+Mon Mar 19 16:34:14 2012 Shugo Maeda <shugo@ruby-lang.org>
- * bignum.c (bytes_zero_p): Removed.
- (bary_pack): Don't call bytes_zero_p.
+ * enum.c (zip_i): variadic argument needs explicit cast on the
+ platforms where VALUE is longer than int.
-Sun Jun 23 00:51:29 2013 Tanaka Akira <akr@fsij.org>
+Mon Mar 19 15:36:41 2012 Shugo Maeda <shugo@ruby-lang.org>
- * bignum.c (bytes_zero_p): Extracted from bary_pack.
- (bary_pack): Use bytes_zero_p.
+ * enumerator.c (enumerable_lazy): add an example of take and first
+ to the documentation. [ruby-core:43344] [Bug #6158]
+ add the description of the behavior when a block is given to zip
+ or cycle.
-Sun Jun 23 00:16:57 2013 Tanaka Akira <akr@fsij.org>
+Mon Mar 19 15:20:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (MSB): New macro.
- (bary_unpack_internal): Use MSB.
- (bary_divmod): Ditto.
- (bigdivrem): Ditto.
+ * compile.c (iseq_specialized_instruction): DRY and replace chain
+ of if-else with switch for special instructions. based on a
+ patch by Vasfed. https://github.com/ruby/ruby/pull/105
-Sat Jun 22 23:45:22 2013 Tanaka Akira <akr@fsij.org>
+Mon Mar 19 15:05:54 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
- * bignum.c (bary_swap): New function.
- (bary_pack): Use bary_swap.
- (bary_unpack_internal): Ditto.
+ * test/test_pty.rb: same as r29280, skip tests when PTY allocation
+ failed (that's not our fault).
-Sat Jun 22 23:18:39 2013 Tanaka Akira <akr@fsij.org>
+Sun Mar 18 23:21:17 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * 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.
+ * gc.c (aligned_free): fix condition for free. memalign() and
+ posix_memalign() are not defined together normally.
-Sat Jun 22 21:46:18 2013 Tanaka Akira <akr@fsij.org>
+Sun Mar 18 18:31:45 2012 Yuki Sonoda (Yugui) <yugui@yugui.jp>
- * bignum.c (rb_integer_unpack): Don't allocate a Bignum if possible.
+ * gc.c (aligned_malloc, aligned_free): added fallback implementations
+ for platforms like OSX Leopard.
-Sat Jun 22 21:03:58 2013 Tanaka Akira <akr@fsij.org>
+Sun Mar 18 17:17:48 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * pack.c (pack_unpack): Remove specialized unpackers for integers.
+ * bignum.c (rb_big_pow): estimate result bit size more precisely.
+ [ruby-core:30735][Feature #3429]
-Sat Jun 22 20:36:50 2013 Tanaka Akira <akr@fsij.org>
+Sun Mar 18 17:17:36 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * 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.
+ * gc.c (free_method_entry_i): method entry may be in
+ unlinked_method_entry_list. [ruby-core:43383][Bug #6171]
-Sat Jun 22 18:53:10 2013 Tanaka Akira <akr@fsij.org>
+Sun Mar 18 15:27:31 2012 Tanaka Akira <akr@fsij.org>
- * 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.
+ * compile.c: typo fix by Run Paint Run Run.
+ [ruby-core:28368] [Bug #2824]
- * internal.h (INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION): Defined.
+Sun Mar 18 10:01:02 2012 Kazuki Tsujimoto <kazuki@callcc.net>
-Sat Jun 22 15:41:25 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/profiler.rb: support calling singleton methods of
+ an instance of BasicObject.
- * gc.c (rgengc_check_shady): add new WB miss checking
- on RGENGC_CHECK_MODE >= 2.
+Sat Mar 17 06:56:58 2012 Eric Hodel <drbrain@segment7.net>
- (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.
+ * object.c: Fix indentation of Class#inherited example.
- This idea of this checker is by Masaya Tarui <tarui@ruby-lang.org>.
+Sat Mar 17 01:46:05 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-Sat Jun 22 15:25:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * string.c (trnext): fix bug with string ending with '\\'.
+ [ruby-dev:45374][Bug #6160]
- * ext/etc/etc.c (setup_passwd): revert r41560, unnecessary
+ * test/ruby/test_string.rb (TestString#test_delete): test for
+ above.
-Sat Jun 22 14:39:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+Fri Mar 16 20:06:24 2012 Nobuyoshi Nakada <nobu@ruby-lang.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
+ * string.c (trnext): should advance char-wise.
+ [ruby-core:43335][Bug #6156]
-Sat Jun 22 14:35:40 2013 Tanaka Akira <akr@fsij.org>
+Fri Mar 16 17:42:05 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/dl/cfunc.c (rb_dlcfunc_call): Use rb_big_pack instead of
- rb_big2ulong_pack and rb_big2ull.
+ * parse.y (block_append_gen): fix unreachable warning line number.
+ should warn at the code, not jump.
- * include/ruby/intern.h (rb_big2ulong_pack): Deprecated.
+Fri Mar 16 17:33:08 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Jun 22 14:31:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * enum.c (enum_take): allocate buffer array before iteration, as well
+ as enum_first did.
- * 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
+ * enum.c (enum_first): remove duplication.
-Sat Jun 22 13:47:13 2013 Tanaka Akira <akr@fsij.org>
+Fri Mar 16 14:43:18 2012 Yuki Sonoda (Yugui) <yugui@yugui.jp>
- * bignum.c (bary_pack): MEMZERO can be used even if nails is not zero.
+ * load.c (ruby_init_ext): don't free the given pointer itself.
+ It is not guaranteed even that the pointer is on heap.
-Sat Jun 22 13:43:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+Fri Mar 16 14:37:57 2012 Shugo Maeda <shugo@ruby-lang.org>
- * ext/etc/etc.c (etc_getpwnam): use PRIsVALUE in format string instead
- of %s and RSTRING_PTR
+ * vm_eval.c (rb_mod_module_eval): fix the documentation of
+ class_eval to mention class variable lookup. [ruby-core:40649]
+ [Bug #5544]
- * ext/etc/etc.c (etc_getgrnam): ditto
+Fri Mar 16 14:27:11 2012 Shugo Maeda <shugo@ruby-lang.org>
-Sat Jun 22 13:07:15 2013 Tanaka Akira <akr@fsij.org>
+ * vm_eval.c (rb_mod_module_eval): fix the documentation of
+ class_eval to mention constant lookup. [ruby-core:41718]
+ [Bug #5777]
- * bignum.c (CLEAR_LOWBITS): Rewritten without RSHIFTX.
- (RSHIFTX): Removed.
+Fri Mar 16 14:10:45 2012 Shugo Maeda <shugo@ruby-lang.org>
-Sat Jun 22 10:38:03 2013 Tanaka Akira <akr@fsij.org>
+ * lib/net/imap.rb (initialize): raise Net::IMAP::Error when the
+ connection is closed without a greeting response.
+ [ruby-core:40938] [Bug #5616]
- * pack.c (num2i32): Removed.
- (pack_pack): Don't use num2i32.
+Fri Mar 16 13:50:12 2012 Shugo Maeda <shugo@ruby-lang.org>
-Sat Jun 22 09:55:13 2013 Tanaka Akira <akr@fsij.org>
+ * lib/net/imap.rb (rfc822_text): ignore [] after RFC822.
+ [ruby-core:40945] [Bug #5620]
- * 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.
+Fri Mar 16 12:00:42 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Jun 22 09:11:33 2013 Ryan Davis <ryand-ruby@zenspider.com>
+ * vm_insnhelper.c (argument_error): use line number at the beginning
+ of lambda, not the first code of its body.
+ [ruby-core:43314][Bug #6151]
- * lib/minitest/*: Imported minitest 4.7.5 (r8724)
- * test/minitest/*: ditto
+ * iseq.c (rb_iseq_first_lineno): constified.
-Sat Jun 22 07:20:30 2013 Koichi Sasada <ko1@atdot.net>
+Fri Mar 16 11:20:07 2012 Shugo Maeda <shugo@ruby-lang.org>
- * 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))
+ * enumerator.c (lazy_take): don't enumerate an extra value.
+ [ruby-dev:45370] [Bug #6152]
- * gc.c (gc_marks): record `oldgen_object_count' into current profile`
- record directly.
+Fri Mar 16 06:30:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c (rgengc_rememberset_mark): same for remembered_normal_objects
- and remembered_shady_objects.
+ * enumerator.c (lazy_zip_func): variadic argument needs explicit cast
+ on the platforms where VALUE is longer than int.
-Sat Jun 22 06:46:04 2013 Koichi Sasada <ko1@atdot.net>
+ * enumerator.c (lazy_init_iterator): no need to check overflow twice.
- * 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.
+Fri Mar 16 05:47:09 2012 Eric Hodel <drbrain@segment7.net>
- * gc.c: use above fields.
+ * enumerator.c (lazy_init_iterator): Fix type error (int vs long).
-Sat Jun 22 06:05:36 2013 Koichi Sasada <ko1@atdot.net>
+Thu Mar 15 23:13:36 2012 Shugo Maeda <shugo@ruby-lang.org>
- * gc.c (rb_gc_giveup_promoted_writebarrier): remove `rest_sweep()'
- because all of remembered objects are called for gc_mark_children().
+ * enum.c (rb_enum_values_pack): rename from enum_values_pack, and
+ remove static.
-Sat Jun 22 05:08:03 2013 Koichi Sasada <ko1@atdot.net>
+ * enumerator.c (lazy_init_iterator, lazy_init_yielder,
+ lazy_select_func, lazy_reject_func, lazy_grep_func): handle
+ multiple values correctly.
- * gc.c (rgengc_rememberset_mark): call gc_mark_children() for
- remembered objects directly instead of pushing on the mark stack.
+ * enumerator.c (lazy_grep): change the behavior when a block is
+ given, to be consistent with Enumerable#grep.
-Sat Jun 22 04:48:53 2013 Koichi Sasada <ko1@atdot.net>
+Thu Mar 15 19:12:31 2012 Shugo Maeda <shugo@ruby-lang.org>
- * include/ruby/ruby.h (OBJ_WRITE): cast to (VALUE *) for second
- parameter `slot'. You don't need to write a cast (VALUE *) any more.
+ * enumerator.c (lazy_zip): rescue StopIteration returned by
+ Enumerator#next.
- * 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().
+Thu Mar 15 18:19:53 2012 Shugo Maeda <shugo@ruby-lang.org>
-Sat Jun 22 04:37:08 2013 Koichi Sasada <ko1@atdot.net>
+ * enumerator.c (lazy_zip, lazy_cycle): Enumerator::Lazy#{zip,cycle}
+ should be eager when a block is given, to be consistent with
+ Enumerable#{zip,cycle}.
- * gc.c (slot_sweep_body): rename to slot_sweep().
- No need to separate major/minor GC.
+Thu Mar 15 17:45:27 2012 Shugo Maeda <shugo@ruby-lang.org>
- * gc.c (gc_setup_mark_bits): remove gc_clear_mark_bits() and unify to
- this function.
+ * enumerator.c (InitVM_Enumerator): renamed Enumerable::Lazy to
+ Enumerator::Lazy.
-Sat Jun 22 04:20:21 2013 Koichi Sasada <ko1@atdot.net>
+Thu Mar 15 16:37:38 2012 Shugo Maeda <shugo@ruby-lang.org>
- * gc.c (check_bitmap_consistency): add to check flag and bitmap consistency.
- Use this function in several places.
+ * enumerator.c (enumerable_lazy): added cycle to the documentation.
-Sat Jun 22 02:18:07 2013 Tanaka Akira <akr@fsij.org>
+Thu Mar 15 15:37:42 2012 Nobuyoshi Nakada <nobu@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.
+ * parse.y (parser_yylex): fix warning line number.
- * internal.h (swap16): Moved from pack.c
- (swap32): Ditto.
- (swap64): Ditto.
+Thu Mar 15 15:19:38 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Jun 21 21:29:49 2013 Masaya Tarui <tarui@ruby-lang.org>
+ * enumerator.c (lazy_cycle): check argument number overflow before
+ creating temporary array.
- * 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.
+Thu Mar 15 15:04:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Jun 21 21:11:53 2013 Koichi Sasada <ko1@atdot.net>
+ * util.c (ruby_strtod): no need to check same digit for hexdigit
+ twice. [ruby-dev:45363][Bug #6146]
- * gc.c (allocate_sorted_heaps): remove unused variable `add'.
+ * parse.y (sym_check_asciionly): check ascii compatibility before
+ scanning for code range.
-Fri Jun 21 20:50:32 2013 Koichi Sasada <ko1@atdot.net>
+ * parse.y (intern_str): set to us-ascii if ascii only.
+ [ruby-dev:45363][Bug #6146]
- * include/ruby/ruby.h: constify RArray::as::ary and RArray::heap::ptr.
- Use RARRAY_ASET() or RARRAY_PTR_USE() to modify Array objects.
+ * file.c (ruby_enc_find_basename): allow NULL as alllen.
+ [ruby-dev:45363][Bug #6146]
- * array.c, gc.c: catch up above changes.
+Thu Mar 15 14:49:31 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Jun 21 20:32:13 2013 Koichi Sasada <ko1@atdot.net>
+ * string.c (rb_str_conv_enc_opts): default to original encoding.
- * vm_eval.c (eval_string_with_cref): fix WB miss.
+Thu Mar 15 13:47:17 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Fri Jun 21 20:15:49 2013 Koichi Sasada <ko1@atdot.net>
+ * hash.c (env_str_new, rb_f_getenv, env_fetch): use rb_str_conv_enc()
+ instead of rb_str_encode() to simplify the code.
- * 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 *).
+Thu Mar 15 12:44:50 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * struct.c, re.c, gc.c, marshal.c: rewrite with above APIs.
+ * win32/win32.c, include/ruby/win32.h (rb_w32_ugetenv): new API to
+ accept and to return UTF-8 strings.
-Fri Jun 21 19:38:37 2013 Tanaka Akira <akr@fsij.org>
+ * win32/win32.c (rb_w32_getenv): follow above change.
- * bignum.c (BDIGMAX): Use BIGRAD.
- (BIGLO): Use BDIGMAX.
- (bigdivrem1): Ditto.
- (bigor_int): Ditto.
- (rb_big_or): Ditto.
+ * win32/win32.c (rb_w32_get_environ): returns UTF-8 environment area.
-Fri Jun 21 19:18:48 2013 Tanaka Akira <akr@fsij.org>
+ * hash.c (env_str_new, rb_f_getenv, env_fetch): follow above changes.
+ [Bug #5570] [ruby-core:40737]
- * pack.c (pack_pack): Move the implementation for 'c' directive after
- pack_integer label.
+Thu Mar 15 10:57:27 2012 Shugo Maeda <shugo@ruby-lang.org>
-Fri Jun 21 19:11:56 2013 Koichi Sasada <ko1@atdot.net>
+ * enumerator.c (lazy_cycle): add Enumerable::Lazy#cycle.
- * include/ruby/ruby.h, re.c: support write barrier for T_REGEXP.
+Thu Mar 15 10:31:40 2012 Nobuyoshi Nakada <nobu@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.
+ * test/ruby/test_arity.rb (TestArity#err_mess): use assert_raise.
-Fri Jun 21 18:56:58 2013 Tanaka Akira <akr@fsij.org>
+Thu Mar 15 07:03:52 2012 Eric Hodel <drbrain@segment7.net>
- * bignum.c (bigsub_int): Use bdigit_roomof.
- (bigadd_int): Ditto.
- (bigand_int): Ditto.
- (bigor_int): Ditto.
- (bigxor_int): Ditto.
+ * vm_eval.c (check_funcall): Raise ArgumentError if respond_to?
+ requires more than three arguments. [Bug #6000]
-Fri Jun 21 17:56:25 2013 Koichi Sasada <ko1@atdot.net>
+ * test/ruby/test_object.rb (class TestObject): Test for respond_to?
+ requiring more than three arguments.
- * benchmark/gc/gcbench.rb: fix summary of benchmark result notation.
+Thu Mar 15 06:08:06 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-Fri Jun 21 16:38:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * include/ruby/intern.h: Add rb_check_arity, rb_error_arity [#6085]
- * 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
+ * array.c: Use rb_check_arity / rb_error_arity
-Fri Jun 21 15:26:45 2013 Koichi Sasada <ko1@atdot.net>
+ * class.c: ditto
- * gc.c (gc_sweep): profile sweep time correctly when LAZY_SWEEP is
- disabled.
+ * enumerator.c: ditto
- * gc.c (gc_marks_test): store oldgen count and shady count
- before test marking and restore them after marking.
+ * eval.c: ditto
-Fri Jun 21 15:07:42 2013 Koichi Sasada <ko1@atdot.net>
+ * file.c: ditto
- * gc.c: enable lazy sweep (commit miss).
+ * hash.c: ditto
-Fri Jun 21 14:31:29 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * numeric.c: ditto
- * hash.c (ruby_setenv): refine error message so include the variable
- name.
+ * proc.c: ditto
-Fri Jun 21 14:15:08 2013 Koichi Sasada <ko1@atdot.net>
+ * process.c: ditto
- * gc.c: fix to use total_allocated_object_num and heaps_used
- at the GC time for profiler.
+ * random.c: ditto
-Fri Jun 21 12:35:35 2013 Koichi Sasada <ko1@atdot.net>
+ * re.c: ditto
- * gc.c: RGENGC_CHECK_MODE should be 0.
+ * signal.c: ditto
-Fri Jun 21 11:18:25 2013 Koichi Sasada <ko1@atdot.net>
+ * string.c: ditto
- * gc.c (gc_marks_body): fix to get `th' in this function.
+ * struct.c: ditto
-Fri Jun 21 10:21:44 2013 Koichi Sasada <ko1@atdot.net>
+ * transcode.c: ditto
- * gc.c (heaps_header/heaps_slot): embed bitmaps into heaps_slot.
- no need to maintain allocation/free bitmaps.
+ * vm_eval.c: ditto
-Fri Jun 21 09:22:16 2013 Koichi Sasada <ko1@atdot.net>
+ * vm_insnhelper.c: ditto & implementation of rb_error_arity
- * gc.c (slot_sweep_body): add counters at a time.
+ * test/ruby/test_arity.rb: tests for above
- * gc.c (gc_profile_dump_on): fix line break position.
+Thu Mar 15 06:08:05 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-Fri Jun 21 08:14:00 2013 Masaya Tarui <tarui@ruby-lang.org>
+ * vm_insnhelper.c: improve number of arguments error in case of
+ optional parameters (issue #6085)
- * gc.c: refactoring bitmaps. introduce bits_t type and some Consts.
+ * include/ruby/intern.h: define UNLIMITED_ARGUMENTS
-Fri Jun 21 08:04:32 2013 Koichi Sasada <ko1@atdot.net>
+ * test/ruby/test_arity.rb: test for above
- * gc.c: fix to support USE_RGENGC == 0 (disable RGenGC).
- If USE_RGENGC==0, it caused compilation error.
+Thu Mar 15 00:58:04 2012 Shugo Maeda <shugo@ruby-lang.org>
-Fri Jun 21 08:08:11 2013 Masaya Tarui <tarui@ruby-lang.org>
+ * enumerator.c (enumerable_lazy): fix the documentation of
+ Enumerable#lazy.
- * gc.c (lazy_sweep): Use is_lazy_sweeping()
- * gc.c (rest_sweep): Ditto.
- * gc.c (gc_prepare_free_objects): Ditto.
+Wed Mar 14 22:01:06 2012 Shugo Maeda <shugo@ruby-lang.org>
-Fri Jun 21 07:34:47 2013 Koichi Sasada <ko1@atdot.net>
+ * enumerator.c (lazy_init_iterator): break when Qundef is returned
+ to make obj.drop(3).take(2) work properly.
- * gc.c (gc_profile_record::oldgen_objects): added.
+ * enumerator.c (lazy_take_while): add Enumerable::Lazy#take_while.
- * 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
+ * enumerator.c (lazy_drop): add Enumerable::Lazy#drop.
-Fri Jun 21 06:43:59 2013 Tanaka Akira <akr@fsij.org>
+ * enumerator.c (lazy_drop_while): add Enumerable::Lazy#drop_while.
- * bignum.c (rb_ull2big): Refactored.
- (rb_uint2big): Useless code removed.
+ * enumerator.c (InitVM_Enumerator): add Enumerable::Lazy#force as an
+ alias of to_a.
-Fri Jun 21 05:37:39 2013 Koichi Sasada <ko1@atdot.net>
+Wed Mar 14 19:28:40 2012 Shugo Maeda <shugo@ruby-lang.org>
- * gc.c (gc_prof_sweep_timer_stop): accumulate sweep time only when
- record->gc_time > 0.
+ * enumerator.c (lazy_take): add Enumerable::Lazy#take.
-Fri Jun 21 00:37:31 2013 Tanaka Akira <akr@fsij.org>
+Wed Mar 14 18:40:36 2012 Shugo Maeda <shugo@ruby-lang.org>
- * ext/bigdecimal: Workaround fix for bigdecimal test failures caused
- by [ruby-dev:47413] [Feature #8509]
+ * enumerator.c: use long for array indices.
- * 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.
+Wed Mar 14 18:25:18 2012 Shugo Maeda <shugo@ruby-lang.org>
- * ext/bigdecimal/bigdecimal.c (RBIGNUM_ZERO_P): Use rb_bigzero_p.
- (bigzero_p): Removed.
- (is_even): Use rb_big_pack.
+ * enumerator.c: moved the comment of StopIteration.
-Thu Jun 20 22:52:42 2013 Tanaka Akira <akr@fsij.org>
+Wed Mar 14 17:55:29 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * bignum.c (bigmul1_toom3): Don't call bignorm twice.
+ * numeric.c (flodivmod): must go through the same pass if HAVE_FMOD or
+ not. this is a bugfix of r35013.
-Thu Jun 20 22:49:27 2013 Tanaka Akira <akr@fsij.org>
+Wed Mar 14 16:41:55 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * bignum.c (bignorm): Don't call bigtrunc if the result is a fixnum.
+ * test/test_tmpdir.rb (TestTmpdir#test_world_writable): skip on Windows.
-Thu Jun 20 22:29:42 2013 Tanaka Akira <akr@fsij.org>
+Wed Mar 14 15:09:23 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
- * bignum.c (rb_uint2big): Refactored.
+ * numeric.c: fix flodivmod for cornercases [Bug #6044]
+ add ruby_float_mod
-Thu Jun 20 22:24:41 2013 Tanaka Akira <akr@fsij.org>
+ * insns.def (opt_mod): use ruby_float_mod
- * bignum.c (dump_bignum): Use SIZEOF_BDIGITS.
+ * internal.h: declare ruby_float_mod
-Thu Jun 20 22:22:46 2013 Tanaka Akira <akr@fsij.org>
+ * test/ruby/test_float.rb: tests for above
- * 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.
+ * test/ruby/envutil.rb: create helper assert_is_minus_zero
-Thu Jun 20 22:02:46 2013 Tanaka Akira <akr@fsij.org>
+Wed Mar 14 10:44:35 2012 Nobuyoshi Nakada <nobu@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.
+ * enumerator.c (lazy_grep_func): should use === instead of =~, as
+ well as Enumerable#grep
-Thu Jun 20 21:17:19 2013 Koichi Sasada <ko1@atdot.net>
+Wed Mar 14 08:15:54 2012 Shugo Maeda <shugo@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.
+ * enumerator.c (lazy_flat_map_func): use each for non-Array objects.
- * gc.c (gc_profile_record_get): enable to access above information
- and REMOVING_OBJECTS, EMPTY_OBJECTS.
+Wed Mar 14 08:06:35 2012 Shugo Maeda <shugo@ruby-lang.org>
-Thu Jun 20 18:29:26 2013 Koichi Sasada <ko1@atdot.net>
+ * enumerator.c (lazy_zip): add Enumerable::Lazy#zip.
- * benchmark/gc/gcbench.rb: Do not use GC::Profiler::disable because
- GC::Profiler::disable prohibit to access profiling data. It should
- be spec bug.
+ * enumerator.c (lazy_lazy): just returns self.
- Skip GC::Profiler::report if RUBY_VERSION < '2.0.0'
+Wed Mar 14 07:48:36 2012 Tadayoshi Funaba <tadf@dotrb.org>
-Thu Jun 20 17:59:08 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/date/date_core.c (datetime_s_now): [ruby-core:43256].
- * benchmark/gc/gcbench.rb: stop GC::Profiler before output results.
- Generating GC::Profiler result under profiling causes infinite loop.
+Tue Mar 13 22:00:14 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Jun 20 17:24:24 2013 Koichi Sasada <ko1@atdot.net>
+ * compile.c (iseq_set_arguments): keyword rest arg without keyword args.
- * benchmark/gc/gcbench.rb: don't use __dir__ to make compatible
- with ruby 1.9.3.
+ * node.c (dump_node): dump kw_rest_arg too.
-Thu Jun 20 16:57:19 2013 Koichi Sasada <ko1@atdot.net>
+ * parse.y (block_param, f_arg): more kwrest patterns.
+ [ruby-core:42455][Bug #5989]
- * benchmark/bm_app_aobench.rb: use attr_accessor/reader instead of
- defining methods.
+ * parse.y (new_args_gen): no extra kw_rest_arg if no keyword rest arg.
-Thu Jun 20 16:46:46 2013 Koichi Sasada <ko1@atdot.net>
+Tue Mar 13 15:17:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * benchmark/bm_app_aobench.rb: added.
+ * parse.y (block_param, f_args): add rules for the case arguments
+ begin with kwrest. [ruby-core:42455][Bug #5989]
- * benchmark/gc/aobench.rb: added.
+Tue Mar 13 12:37:53 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Thu Jun 20 16:28:33 2013 Koichi Sasada <ko1@atdot.net>
+ * io.c (io_encoding_set): always warn if external encoding and internal
+ encoding are identical. [ruby-core:40727] [Bug #5568]
- * benchmark/bm_so_binary_trees.rb: disable `puts' method
- and change iteration parameter to increase execution time.
+Tue Mar 13 12:37:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * benchmark/gc/binarytree.rb: added.
+ * gc.c: add ObjectSpace::WeakMap. [ruby-dev:44565][Bug #5350]
-Thu Jun 20 16:06:37 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/weakref.rb: use WeakMap instead of _id2ref.
- * benchmark/gc/pentomino.rb: added.
- Simply load pentomino puzzle in the benchmark/ directory.
+Tue Mar 13 10:59:48 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Jun 20 15:32:56 2013 Koichi Sasada <ko1@atdot.net>
+ * tool/rbinstall.rb (prepare): skip if basedir is not defined.
+ [ruby-core:39135][Bug #5238]
- * benchmark/gc/redblack.rb: import red black tree benchmark from
- https://github.com/jruby/rubybench/blob/master/time/bench_red_black.rb
+ * tool/rbinstall.rb (CONFIG.[]): check for mandatory
+ configurations.
- * benchmark/gc/ring.rb: add a benchmark. This benchmark create many
- old objects.
+Tue Mar 13 00:09:18 2012 Shugo Maeda <shugo@ruby-lang.org>
-Thu Jun 20 15:14:00 2013 Koichi Sasada <ko1@atdot.net>
+ * enumerator.c (enumerable_lazy): added documentation.
- * benchmark/gc: create a directory to store GC related benchmark.
+Mon Mar 12 20:19:25 2012 Tanaka Akira <akr@fsij.org>
- * benchmark/gc/gcbench.rb: moved from tool/gcbench.rb.
+ * lib/tmpdir.rb (Dir::tmpdir): test the current directory suitable for
+ temporary directory.
- * benchmark/gc/hash(1|2).rb: ditto.
+Mon Mar 12 20:08:16 2012 Tanaka Akira <akr@fsij.org>
- * benchmark/gc/rdoc.rb: ditto.
+ * lib/fileutils.rb (fu_have_symlink?): specify TypeError for rescue
+ clause.
- * benchmark/gc/null.rb: added.
+Mon Mar 12 19:23:13 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * common.mk: fix rule.
+ * encoding.c (rb_find_encoding): new function find encoding from
+ arbitrary object as a pointer to rb_encoding, and return NULL if
+ not found.
-Thu Jun 20 14:09:54 2013 Koichi Sasada <ko1@atdot.net>
+ * io.c (io_encoding_set): just warn unsupported encodings, but not
+ exception. [ruby-core:40726] [Bug #5567]
- * tool/hashbench1.rb: fix parameter too. Increase temporary objects.
+Mon Mar 12 19:03:32 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Jun 20 14:01:35 2013 Koichi Sasada <ko1@atdot.net>
+ * vm_method.c (Init_eval_method): respond_to? and
+ respond_to_missing? are public.
- * tool/hashbench1.rb: fix parameters.
+Mon Mar 12 14:56:52 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Jun 20 14:00:34 2013 Koichi Sasada <ko1@atdot.net>
+ * node.h (NEW_YIELD), parse.y (new_yield_gen): array-values flags
+ has been already obsolete. patch by Thomas Enebo.
+ [ruby-core:41929][Bug #5847]
- * common.mk: remove dependency from ruby.
+Mon Mar 12 12:44:33 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Jun 20 13:14:06 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_method.c (Init_eval_method): copy basic methods to Exception.
+ [ruby-core:40287][Bug #5473]
- * error.c (rb_check_backtrace): evaluate RARRAY_AREF only once.
- the first argument of RB_TYPE_P is expanded twice for non-immediate
- types.
+Mon Mar 12 10:13:36 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Jun 20 08:09:29 2013 Koichi Sasada <ko1@atdot.net>
+ * eval_jump.c (rb_exec_end_proc): remember the latest exit status.
+ [ruby-core:43173][Bug #5218]
- * tool/gcbench.rb: Summary in one line.
+Mon Mar 12 07:33:12 2012 Tanaka Akira <akr@fsij.org>
- * common.mk: separate gcbench-hash to gcbench-hash1 and gcbench-hash2.
+ * lib/tmpdir.rb: update document for changing
+ FileUtils.remove_entry_secure to FileUtils.remove_entry.
-Thu Jun 20 08:07:23 2013 Tanaka Akira <akr@fsij.org>
+ * NEWS: add incompatibility note for lib/tmpdir.rb.
- * bignum.c (BIGSIZE): New macro.
- (bigfixize): Use BIGSIZE.
- (big2ulong): Ditto.
- (check_shiftdown): Ditto.
- (rb_big_aref): Ditto.
+Mon Mar 12 07:19:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Jun 20 07:46:48 2013 Masaya Tarui <tarui@ruby-lang.org>
+ * lib/tmpdir.rb (Dir.tmpdir): should not use world-writable but
+ non-sticky directory.
- * gc.c (rb_gc_writebarrier): give up rescan A and register B directly
- if A has huge number of children.
+ * lib/tmpdir.rb (Dir.mktmpdir): check the parent directory.
-Thu Jun 20 07:30:35 2013 Koichi Sasada <ko1@atdot.net>
+Mon Mar 12 07:04:11 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * common.mk: add new rules `gcbench-rdoc', `gcbench-hash'.
+ * random.c (Init_Random): removed rb_Random_DEFAULT and register as
+ mark-object instead of global variable.
- * tool/gcbench.rb: separate GC bench framework and process.
+Mon Mar 12 07:03:32 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * 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.
+ * random.c (random_s_rand): ensure default PRNG is re-initialized
+ after fork. patched by Eric Wong. [ruby-core:41209][Bug #5661]
- * tool/rdocbench.rb: separated.
+Sun Mar 11 23:57:29 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Thu Jun 20 06:25:39 2013 Koichi Sasada <ko1@atdot.net>
+ * pack.c (pack_unpack): when unpack('M') occurs an illegal byte
+ sequence, output the "=" character and the following character in
+ the decoded data without any transformation.
+ [ruby-dev:44875] [Bug #5635]
- * tool/rdocbench.rb: add summary.
+Sun Mar 11 22:32:43 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Thu Jun 20 06:18:01 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/json: Merge 164a75c8bd2007d32c4d7665d53140d8fc126dcd.
+ [ruby-core:41917] [Bug #5846]
- * gc.c (gc_profile_total_time): check objspace->profile.next_index > 0.
+Sun Mar 11 17:10:04 2012 Shota Fukumori <sorah@tubusu.net>
-Thu Jun 20 05:47:41 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/test/unit.rb: Put error message into STDERR if failed to launch
+ worker (job) process. [ruby-dev:44802] [Bug #5577]
- * gc.c (gc_prof_sweep_timer_start): fix merge miss.
+ * lib/test/unit/parallel.rb: If failed to increment_io, exit with code
+ 2. [ruby-dev:44802] [Bug #5577]
- * gc.c (GC_PROFILE_MORE_DETAIL): set it 0.
+Sun Mar 11 15:46:45 2012 Shota Fukumori <sorah@tubusu.net>
-Thu Jun 20 05:38:56 2013 Koichi Sasada <ko1@atdot.net>
+ * io.c: fix rdoc of `IO.binwrite` to show same as `IO.write` except
+ it opens file with mode "wb:ASCII-8BIT". [Bug #5782] [ruby-core:42592]
- * gc.c: Accumulate sweep time to GC time.
- Now [GC time] is [mark time] + [sweep time] + [misc].
- ([GC time] >= [mark time] + [sweep time])
+Sat Mar 10 23:52:28 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c (gc_prof_sweep_slot_timer_start/stop): rename to
- gc_prof_sweep_timer_start/stop and locate at lazy_sweep().
+ * st.c: pack tables also generic keys. patched by Sokolov Yura at
+ https://github.com/ruby/ruby/pull/84
- * gc.c (elapsed_time_from): add a utility function.
+ * st.c: add st_foreach_check for fixing iteration over packed table
+ and st_delete_safe. patched by Sokolov Yura at
+ https://github.com/ruby/ruby/pull/84
-Thu Jun 20 05:08:53 2013 Koichi Sasada <ko1@atdot.net>
+ * st.c: fix packed num_entries on delete_safe. patched by Sokolov
+ Yura at https://github.com/ruby/ruby/pull/84
- * gc.c (gc_marks): fix wrong option. FALSE means major/full GC.
- It should be TRUE (minor marking).
+Fri Mar 9 14:29:32 2012 Shugo Maeda <shugo@ruby-lang.org>
-Thu Jun 20 02:44:45 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * enumerator.c (lazy_flat_map): add Enumerable::Lazy#flat_map.
- * 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.
+Fri Mar 9 06:29:22 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-Thu Jun 20 01:34:15 2013 Tanaka Akira <akr@fsij.org>
+ * ext/psych/lib/psych.rb (load, parse): stop parsing or loading after
+ the first document has been parsed.
- * 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.
+ * test/psych/test_stream.rb: pertinent tests.
-Thu Jun 20 01:07:39 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Mar 9 06:17:05 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * gc.c (MARKED_IN_BITMAP, FL_TEST2): return boolean value since always
- used as boolean value.
+ * ext/psych/lib/psych.rb (parse_stream, load_stream): if a block is
+ given, documents will be yielded to the block as they are parsed.
+ [ruby-core:42404] [Bug #5978]
- * gc.c (MARK_IN_BITMAP, CLEAR_IN_BITMAP): evaluate bits once.
+ * ext/psych/lib/psych/handlers/document_stream.rb: add a handler that
+ yields documents as they are parsed
-Thu Jun 20 00:05:07 2013 Koichi Sasada <ko1@atdot.net>
+ * test/psych/test_stream.rb: corresponding tests.
- * gc.c (RVALUE_PROMOTED): fix type.
+Fri Mar 9 00:35:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Jun 19 23:39:01 2013 Koichi Sasada <ko1@atdot.net>
+ * enumerator.c (lazy_initialize, enumerable_lazy): no additional
+ arguments.
- * 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)
+Fri Mar 9 00:30:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Jun 19 23:51:48 2013 Tanaka Akira <akr@fsij.org>
+ * enumerator.c: add Enumerable#lazy. based on the patch by
+ Innokenty Mikhailov at <https://github.com/ruby/ruby/pull/101>
+ [ruby-core:37164] [Feature #4890]
- * bignum.c (bigfixize): Use rb_absint_size.
- (check_shiftdown): Ditto.
- (big2ulong): Use bdigit_roomof.
+Fri Mar 9 00:25:59 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Jun 19 23:32:23 2013 Koichi Sasada <ko1@atdot.net>
+ * enumerator.c (enumerator_each, generator_each): pass arguments to
+ the block with yielder.
- * gc.c (RVALUE_PROMOTED): check consistency between oldgen flag and
- oldgen bitmap if RGENGC_CHECK_MODE > 0.
+Fri Mar 9 00:25:02 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Jun 19 23:29:29 2013 Koichi Sasada <ko1@atdot.net>
+ * array.c (rb_ary_cat): new function to concat objects into array.
- * gc.c (rb_gc_force_recycle): clear oldgen bitmap, too.
+Thu Mar 8 16:44:02 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Jun 19 21:02:13 2013 Tanaka Akira <akr@fsij.org>
+ * .gdbinit (rb_numtable_entry): update for recent refactoring of
+ st_table.
- * 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 Mar 7 22:41:50 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-Wed Jun 19 20:51:21 2013 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+ * lib/xmlrpc/client.rb (module XMLRPC): fix typo.
- * gc.c (gc_stress_get): GC.stress can be Fixnum.
+ * test/xmlrpc/test_client.rb (test_async_call): add test for
+ XMLRPC::Client#call_async to check above fix.
-Wed Jun 19 19:31:30 2013 Tanaka Akira <akr@fsij.org>
+Wed Mar 7 16:30:24 2012 Nobuyoshi Nakada <nobu@ruby-lang.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.
+ * error.c (rb_load_fail): should honor encoding.
-Wed Jun 19 15:14:30 2013 Koichi Sasada <ko1@atdot.net>
+ * load.c (load_failed): ditto.
- * 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.
+Wed Mar 7 12:26:25 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * iseq.c: making non-shady iseq objects.
+ * error.c (rb_load_fail): use path as a string, not char*.
- * class.c, compile.c, proc.c, vm.c: add WB for iseq objects.
+ * internal.h: (rb_load_fail): moved from ruby/intern.h.
- * vm_core.h, iseq.h: constify fields to detect WB insertion.
+ * ruby.c (load_file_internal): fname cannot be NULL.
-Wed Jun 19 15:11:13 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Mar 7 08:32:43 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * gc.c (gc_mark_children): show more info for broken object.
+ * error.c (rb_loaderror_with_path): Adding the missing file as an
+ instance variable to the LoadError exception.
+ [ruby-core:39079]
-Wed Jun 19 14:04:41 2013 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+ * load.c: call rb_loaderror_with_path so that the missing path is
+ added to the exception.
- * test/ruby/envutil.rb (EnvUtil#rubybin): remove unnecessary
- unless expression.
+ * ruby.c: call rb_loaderror rather than raising our own LoadError
+ exception.
-Wed Jun 19 07:47:48 2013 Koichi Sasada <ko1@atdot.net>
+ * include/ruby/intern.h: add declaration for rb_loaderror_with_path.
- * gc.c (garbage_collect_body): use FIX2INT for ruby_gc_stress.
+ * test/ruby/test_require.rb: add supporting test for LoadError#path
+ method.
-Wed Jun 19 07:44:31 2013 Koichi Sasada <ko1@atdot.net>
+Wed Mar 7 08:28:00 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * gc.c (rb_objspace::gc_stress): int -> VALUE to store Fixnum object.
+ * lib/xmlrpc/parser.rb: support i8 types. Thanks Stas Kelvich!
+ [ruby-core:29246] [Feature #3090]
-Wed Jun 19 07:25:35 2013 Koichi Sasada <ko1@atdot.net>
+ * test/xmlrpc/test_client.rb: supporting test
- * gc.c (make_deferred): clear flags to T_ZOMBIE.
+Wed Mar 7 07:43:29 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * gc.c (slot_sweep_body): fix indent.
+ * lib/xmlrpc/client.rb: assume servers that do not send a Content-Type
+ header are sending 'text/xml'. Thanks Nathan Leavitt!
+ [ruby-core:41204] [Bug #5660]
-Wed Jun 19 07:18:47 2013 Tanaka Akira <akr@fsij.org>
+ * test/xmlrpc/test_client.rb: supporting test
- * bignum.c (rb_big_aref): Apply BIGLO to ~xds[i] for environment which
- BDIGIT is 16bit.
+Wed Mar 7 07:39:28 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-Wed Jun 19 07:09:26 2013 Koichi Sasada <ko1@atdot.net>
+ * test/xmlrpc/test_client.rb: adding a test for performing an XMLRPC
+ call.
+ * test/xmlrpc/data/blog.xml: supporting XML document for the response.
- * gc.c (rgengc_remember): fix output level.
+Tue Mar 6 16:24:01 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c (rgengc_rememberset_mark): fix to output clear count.
- (shady_object_count + clear_count = count of remembered objects)
+ * parse.y (parser_tokadd_string): escape simple regexp meta
+ character terminators.
-Wed Jun 19 07:06:21 2013 Koichi Sasada <ko1@atdot.net>
+Tue Mar 6 10:11:43 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c (rgengc_remember): check T_NONE and T_ZOMBIE
- if RGENGC_CHECK_MODE > 0.
+ * ext/io/console/console.c (set_rawmode): clear ECHOE and ECHOK
+ bits too.
-Wed Jun 19 07:02:19 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/io/console/console.c (echo_p): ignore ECHOE and ECHOK bits.
+ [ruby-dev:45309] [Bug #6116]
- * gc.c (RGENGC_CHECK_MODE): add new check mode `3'.
- In this mode, show all references if there is
- a miss-corrected object.
+ * ext/io/console/console.c (console_raw): fix rdoc.
-Wed Jun 19 06:31:08 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/io/console/console.c (console_set_echo): mentioned about
+ platform dependency.
- * 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.
+Tue Mar 6 07:18:10 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- You can debug RGenGC (WB) using `GC.stress = 1'.
- Using this option, do minor marking at all possible places.
+ * lib/xmlrpc/client.rb: switch net/http post2 calls to modern
+ `request_post` methods.
- GC::STRESS_MINOR_MARK = 1 and GC::STRESS_LAZY_SWEEP = 2
- seem good to add.
+Tue Mar 6 02:31:20 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-Wed Jun 19 06:29:31 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/psych/lib/psych/core_ext.rb: only extend Kernel if IRB is loaded
+ in order to stop method pollution.
- * vm.c (kwmerge_i): add WB.
+Tue Mar 6 01:34:19 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Jun 19 06:26:49 2013 Koichi Sasada <ko1@atdot.net>
+ * parse.y (block_call): rules for block_call after block_call.
+ based on a patch by pasberth https://github.com/ruby/ruby/pull/102
+ [ruby-dev:45308][Bug #6115]
- * 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()'
+Tue Mar 6 01:24:13 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Jun 19 04:33:22 2013 Koichi Sasada <ko1@atdot.net>
+ * parse.y (block_command, block_call): simplified rules.
- * variable.c (rb_const_set): fix WB miss.
+Mon Mar 5 18:28:35 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
- WBs had located before creating reference between a klass
- and constant value. It causes GC bug.
+ * test/ruby/test_regexp.rb (TestRegexp#test_source): fix typo.
+ * test/ruby/test_regexp.rb (TestRegexp#test_equal): ditto.
- # pseudo code:
- WB(klass, value); # WB and remember klass
- st_insert(klass->const_table, const_id, value);
+Mon Mar 5 17:11:44 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- `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
+ * ext/syck/lib/syck/rubytypes.rb (Exception.yaml_new): fix bug
+ that causes YAML serialization problem for Exception.
+ Exception#initialize doesn't use visible instance variable for
+ the exception message, so call the method with the message.
+ patched by Jingwen Owen Ou <jingweno AT gmail.com>.
+ http://github.com/ruby/ruby/pull/41
- Lesson: The place of a WB is important.
+Mon Mar 5 16:50:22 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Tue Jun 18 22:01:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * test/ruby/test_sleep.rb (TestSleep#test_sleep_5sec): syntax error.
- * vm_insnhelper.c (vm_call_method): ensure methods of type
- VM_METHOD_TYPE_ATTR_SET are called with 1 argument
+ * test/ruby/test_sleep.rb (TestSleep#test_sleep_5sec): call uname
+ only on linux because it's a workaround for linux only.
- * test/ruby/test_module.rb
- (TestModule#test_attr_writer_with_no_arguments): add test
- [ruby-core:55543] [Bug #8540]
+Mon Mar 5 12:44:12 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jun 18 22:36:23 2013 Masaya Tarui <tarui@ruby-lang.org>
+ * st.c (unpack_entries): chain entries directly. based on a patch
+ by Sokolov Yura <funny.falcon AT gmail.com>.
- * gc.c (gc_profile_record_flag): fix typo.
+ * st.c (unpack_entries): use union instead of casted pointer.
+ patched by Sokolov Yura <funny.falcon AT gmail.com>.
-Tue Jun 18 22:08:53 2013 Zachary Scott <zachary@zacharyscott.net>
+ * st.c: use PACKED_ENT and FIND_ENTRY. patched by Sokolov
+ Yura <funny.falcon AT gmail.com>.
- * ext/objspace/object_tracing.c: Return for ::allocation_generation
+ * st.c (unpack_entries): reallocate bins if packed array size
+ is not same as initial bins size. based on a patch by
+ Sokolov Yura <funny.falcon AT gmail.com>.
-Tue Jun 18 22:04:35 2013 Zachary Scott <zachary@zacharyscott.net>
+Mon Mar 5 11:51:48 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * ext/objspace/object_tracing.c: Document object_tracing methods.
+ * ext/bigdecimal/lib/bigdecimal/math.rb: remove description about
+ BigMath#log. patched by Sho Hashimoto [ruby-dev:45307] [Bug #6112]
-Tue Jun 18 21:58:17 2013 Zachary Scott <zachary@zacharyscott.net>
+ * string.c (str_byteslice): fix typo.
- * gc.c: Rename rb_mObSpace -> rb_mObjSpace
+Sun Mar 4 23:21:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jun 18 20:55:05 2013 Zachary Scott <zachary@zacharyscott.net>
+ * parse.y (parser_tokadd_string): regexp engine doesn't need
+ terminators to be escaped. [ruby-core:40364][Bug #5484]
- * ext/objspace/objspace.c: Document ObjectSpace::InternalObjectWrapper.
+Sat Mar 3 22:51:46 2012 Tanaka Akira <akr@fsij.org>
-Tue Jun 18 20:39:04 2013 Zachary Scott <zachary@zacharyscott.net>
+ * process.c (rb_run_exec_options_err): chdir at last to interpret
+ relative pathnames from the current directory of the parent process.
- * ext/objspace/object_tracing.c: Teach rdoc object_tracing.c [Bug #8537]
+Sat Mar 3 12:20:44 2012 Tadayoshi Funaba <tadf@dotrb.org>
-Tue Jun 18 20:29:47 2013 Zachary Scott <zachary@zacharyscott.net>
+ * ext/date/date_strftime.c: reassigned some variables.
- * ext/.document: add object_tracing.c to document file
+Sat Mar 3 12:12:16 2012 Tadayoshi Funaba <tadf@dotrb.org>
-Tue Jun 18 20:20:27 2013 Zachary Scott <zachary@zacharyscott.net>
+ * ext/date/date_{parse,strptime}.c: [ruby-dev:45303].
- * ext/objspace/objspace.c: rdoc on require to overview from r41355
+Sat Mar 3 10:09:21 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-Tue Jun 18 18:39:58 2013 Tanaka Akira <akr@fsij.org>
+ * lib/xmlrpc/client.rb (initialize): net/http defaults to 1_2 in 1.8+,
+ so we can safely remove the call to enable it.
- * configure.in: Check __int128.
+Sat Mar 3 08:42:25 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * 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.
+ * lib/xmlrpc/client.rb (new2): use URI for uri parsing.
+ * test/xmlrpc/test_client.rb: test that query params are passed to the
+ client constructor.
- * include/ruby/ruby.h (PRI_64_PREFIX): Defined.
+Sat Mar 3 08:20:10 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * bignum.c (rb_big_pow): Don't use BITSPERDIG for the condition which
- rb_big_pow returns Float or Bignum.
+ * lib/xmlrpc/client.rb (new2): raises an ArgumentError on bad
+ arguments.
+ * test/xmlrpc/test_client.rb: tests for bad uris
- [ruby-dev:47413] [Feature #8509]
+Sat Mar 3 08:08:11 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-Tue Jun 18 16:43:44 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/xmlrpc/client.rb (new2): fix custom port specification when an
+ SSL uri is used.
+ * test/xmlrpc/test_client.rb: tests for XMLRPC::Client.new2
- * 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.
+Sat Mar 3 08:03:29 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jun 18 12:53:25 2013 Tanaka Akira <akr@fsij.org>
+ * ext/syck/rubyext.c (mktime_do): use ISDIGIT().
+ [ruby-core:43060] [Bug #6108]
- * bignum.c (nlz): Cast the result explicitly.
- (big2dbl): Don't assign BDIGIT values to int variable.
+ * ext/syck/token.c (sycklex_yaml_utf8): cast as unsigned char.
+ [ruby-core:43060] [Bug #6108]
-Tue Jun 18 12:25:16 2013 Tanaka Akira <akr@fsij.org>
+Sat Mar 3 06:57:14 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (rb_big_xor): Non-effective code removed.
+ * configure.in (ruby_pc): make configurable. [Bug #6051]
-Tue Jun 18 11:26:05 2013 Koichi Sasada <ko1@atdot.net>
+Fri Mar 2 17:49:03 2012 Hiroshi Nakamura <nahi@ruby-lang.org>
- * gc.c (gc_stat): add `generated_normal_object_count_types' for
- RGENGC_PROFILE >= 2.
+ * .travis.yml (branches): Enable TravisCI for ruby_1_9_3.
-Tue Jun 18 11:02:18 2013 Koichi Sasada <ko1@atdot.net>
+Fri Mar 2 17:13:33 2012 Hiroshi Nakamura <nahi@ruby-lang.org>
- * gc.c (gc_mark_maybe): check to skip T_NONE.
+ * test/ruby/test_array.rb (test_combination2): Make the test case for
+ [ruby-core:29240] more descriptive.
+ cf. http://bugs.jruby.org/6518
- * gc.c (markable_object_p): do not need to check (flags == 0) here.
+Fri Mar 2 16:37:11 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jun 18 10:17:37 2013 Koichi Sasada <ko1@atdot.net>
+ * file.c (file_expand_path): use wcscasecmp().
- * variable.c (rb_autoload): fix WB miss.
+Fri Mar 2 16:36:31 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jun 18 04:20:18 2013 Koichi Sasada <ko1@atdot.net>
+ * thread_pthread.c (native_cond_timeout): cast explicitly to suppress
+ a warning.
- * gc.c (gc_mark_children): don't need to care about T_ZOMBIE here.
+Fri Mar 2 16:35:56 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Jun 17 22:16:02 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+ * io.c (pipe_open): cmd is no longer used if fork is available.
- * test/ruby/test_proc.rb (TestProc#test_block_given_method_to_proc):
- run test for r41359.
+Thu Mar 1 16:13:18 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Jun 17 21:42:18 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+ * internal.h (rb_file_const, rb_file_load_ok): moved functions for
+ internal use only.
- * include/ruby/ruby.h, vm_eval.c (rb_funcall_with_block):
- new function to invoke a method with a block passed
- as an argument.
+Thu Mar 1 15:40:05 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * string.c (sym_call): use the above function to avoid
- a block sharing. [ruby-dev:47438] [Bug #8531]
+ * win32/makedirs.bat: new command to make intermediate
+ directories, and not to report any errors if the directory
+ already exists.
- * vm_insnhelper.c (vm_yield_with_cfunc): don't set block
- in the frame.
+ * win32/Makefile.sub (MAKEDIRS): enable command extensions.
- * test/ruby/test_symbol.rb (TestSymbol#test_block_given_to_proc):
- run related tests.
+Thu Mar 1 01:25:43 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Mon Jun 17 21:33:27 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+ * regparse.c (is_onechar_cclass): optimize character class
+ Merge Onigmo 27278c12e6674043cc8affca6507e20e119a86ee.
- * 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.
+ * regparse.c (is_onechar_cclass): [bug] unexpected match occurs when a
+ char class contains no char
- * proc.c (bmcall): use the above function to avoid a block sharing.
- [ruby-core:54626] [Bug #8341]
+ * enc/unicode.c (init_case_fold_table): define the sizes of case
+ folding tables in casefold.h
- * test/ruby/test_proc.rb (TestProc#test_block_persist_between_calls):
- run related tests.
+Wed Feb 29 16:11:34 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Mon Jun 17 20:53:21 2013 Tanaka Akira <akr@fsij.org>
+ * win32/Makefile.sub (MAKEDIRS): use mkdir of cmd.exe instead of ruby.
+ [Bug #6103] [ruby-core:43012]
- * loadpath.c (RUBY_REVISION): Defined to suppress revision.h
- inclusion actually. r41352 removes the dependency.
+ * win32/README.win32: added a notice about command extension of cmd.exe.
-Mon Jun 17 18:15:57 2013 Benoit Daloze <eregontp@gmail.com>
+Wed Feb 29 15:39:39 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * ext/objspace/objspace.c: let rdoc know about objspace methods.
- Specify 'objspace' should be required. See #8537.
+ * test/ruby/test_io.rb (TestIO#test_readpartial_locktmp): skip on
+ windows because of the platform restriction.
-Mon Jun 17 17:44:31 2013 Benoit Daloze <eregontp@gmail.com>
+Wed Feb 29 15:38:50 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * gc.c (ObjectSpace): is a module not a class.
+ * test/ruby/memory_status.rb (Memory): syntax error.
- * ext/objspace/objspace.c: try to include overview in rdoc,
- see #8537.
+Wed Feb 29 13:06:42 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Jun 17 17:38:24 2013 Benoit Daloze <eregontp@gmail.com>
+ * test/ruby/memory_status.rb: use /proc/self/status if it is in
+ the expected format.
- * gc.c: fix example of ObjectSpace.define_finalizer in overview
+Wed Feb 29 06:14:51 2012 Tadayoshi Funaba <tadf@dotrb.org>
-Mon Jun 17 16:59:53 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/date/date_core.c: reverted r34825.
- * 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]
+Tue Feb 28 23:20:01 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-Mon Jun 17 14:27:54 2013 Zachary Scott <zachary@zacharyscott.net>
+ * Makefile.in (PLATFORM_DIR): add a variable for `win32` directory.
+ * Makefile.in (clean-platform): add new target.
+ It cleans `win32` directory.
- * vm_backtrace.c: Update rdoc for Backtrace#label with @_ko1
+ * common.mk (clean): add a dependency for `win32` directory.
+ * common.mk (distclean): ditto.
+ * common.mk (distclean-platform): add new target.
+ It cleans `win32` directory.
+ * common.mk ($(PLATFORM_D)): add new target to make `win32` directory.
+ * common.mk (win32/win32.$(OBJEXT)): move win32.o into `win32`
+ directory.
+ * common.mk (win32/file.$(OBJEXT)): add new target for win32/file.c.
-Mon Jun 17 13:04:01 2013 Akinori MUSHA <knu@iDaemons.org>
+ * configure.in: move win32.o into `win32` directory and add
+ win32/file.o to MISSING.
- * tool/ifchange (until): Fix the condition, although harmless in
- this case.
+ * file.c (file_load_ok, rb_file_load_ok): replace static
+ file_load_ok() with public rb_file_load_ok().
+ It's to link Windows implementation in win32/file.c.
+ * file.c (rb_find_file_ext_safe): ditto.
+ * file.c (rb_find_file_safe): ditto.
-Mon Jun 17 11:50:29 2013 Koichi Sasada <ko1@atdot.net>
+ * win32/file.c (rb_file_load_ok): new file. Add Windows specific
+ optimized implementation of rb_file_load_ok(). We created a
+ separated file to avoid too many #ifdef macro which is unreadable.
- * gc.c (gc_mark_maybe): added. check `is_pointer_to_heap()' and
- type is not T_ZOMBIE.
+ * win32/Makefile.sub (PLATFORM_DIR): add a variable for `win32`
+ directory.
+ * win32/Makefile.sub (MISSING): move win32.obj into `win32`
+ directory and add win32/file.obj to MISSING.
+ * win32/Makefile.sub (MAKEDIRS): replace MINIRUBY with BASERUBY.
+ It's because miniruby doesn't exist when making `win32` directory.
+ * win32/Makefile.sub (clean-platform): add new target to clean `win32`
+ directory.
+ * win32/Makefile.sub ({$(srcdir)}.c{}.obj): make it not match
+ win32/file.c to build properly.
+ * win32/Makefile.sub (win32/win32.$(OBJEXT)): move win32.obj into
+ `win32` directory.
- * gc.c: use `gc_mark_maybe()'. T_ZOMBIE objects should not be pushed
- to the mark stack.
+ Patch created with Luis Lavena.
+ [ruby-core:42480] [Feature #5999]
-Mon Jun 17 07:56:24 2013 Tanaka Akira <akr@fsij.org>
+Tue Feb 28 20:27:25 2012 Tadayoshi Funaba <tadf@dotrb.org>
- * bignum.c (bary_small_lshift): Renamed from bdigs_small_lshift.
- (bary_small_rshift): Renamed from bdigs_small_rshift.
+ * ext/date/date_core.c: [ruby-core:42998]
-Mon Jun 17 07:38:48 2013 Tanaka Akira <akr@fsij.org>
+Tue Feb 28 18:47:44 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (absint_numwords_bytes): Removed.
- (rb_absint_numwords): Don't call absint_numwords_bytes.
+ * io.c (io_binwrite, rb_io_syswrite): use shared frozen source
+ strings.
-Sun Jun 16 23:14:58 2013 Tanaka Akira <akr@fsij.org>
+ * io.c (io_fread, io_getpartial, rb_io_sysread): set buffer size
+ after check if readable, which can cause thread switch.
+ [ruby-dev:45297][Bug #6099]
- * 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.
+Tue Feb 28 17:16:01 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Jun 16 21:41:39 2013 Tanaka Akira <akr@fsij.org>
+ * lib/time.rb (Time#xmlschema): use strftime specifiers instead of
+ fractional exponential calculation which yields undesirable
+ result. [ruby-core:42997][Bug #6100]
- * 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.
+Tue Feb 28 14:15:29 2012 Eric Hodel <drbrain@segment7.net>
- * internal.h (rb_integer_unpack_2comp): Removed.
+ * lib/net/protocol.rb: Add OpenTimeout subclass of Timeout::Error
+ * lib/net/pop.rb: Modernize Timeout usage. Patch by Eric Wong.
+ Use Net::OpenTimeout instead of Timeout::Error. [Bug #5765]
+ * lib/net/http.rb: ditto
+ * lib/net/smtp.rb: ditto
+ * lib/net/telnet.rb: ditto
- * pack.c: Follow the above change.
+Tue Feb 28 13:51:12 2012 Eric Hodel <drbrain@segment7.net>
-Sun Jun 16 18:41:42 2013 Tanaka Akira <akr@fsij.org>
+ * lib/net/http.rb: Retry HTTP requests for additional network errors.
+ Introduce OpenTimeout subclass of Timeout::Error. [Bug #6001]
+ * test/net/http/test_http.rb: Reduce timeout to 0.01s for faster test
+ * test/net/http/test_https.rb: ditto
- * internal.h (INTEGER_PACK_2COMP): Defined.
- (rb_integer_pack_2comp): Removed.
+Tue Feb 28 11:44:49 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * 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.
+ * configure.in (debugflags): check if -ggdb is accepted.
+ [ruby-core:42875][Bug #6080]
- * pack.c (pack_pack): Ditto.
+Tue Feb 28 10:28:51 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * sprintf.c (rb_str_format): Ditto.
+ * ext/psych/lib/psych.rb: default open YAML files with utf8 external
+ encoding. [ruby-core:42967]
+ * test/psych/test_tainted.rb: ditto
-Sun Jun 16 17:48:14 2013 Tanaka Akira <akr@fsij.org>
+Mon Feb 27 23:46:09 2012 Yukihiro Matsumoto <matz@ruby-lang.org>
- * bignum.c (absint_numwords_generic): rb_funcall invocations removed.
+ * parse.y (opt_bv_decl): allow newline at the end. [ruby-dev:45292]
-Sun Jun 16 16:04:38 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Mon Feb 27 20:43:05 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * tool/config_files.rb: use URI.read to allow it runs with Ruby 1.8.5.
+ * io.c (rb_io_set_pos): add rdoc about textmode.
-Sun Jun 16 14:32:25 2013 Tanaka Akira <akr@fsij.org>
+ * test/ruby/test_io.rb (TestIO#test_setpos): use binmode.
- * bignum.c (bary_pack) Extracted from rb_integer_pack_internal.
- (absint_numwords_generic): Use bary_pack.
+Mon Feb 27 17:00:15 2012 Akinori MUSHA <knu@iDaemons.org>
-Sun Jun 16 11:01:57 2013 Kouhei Sutou <kou@cozmixng.org>
+ * string.c (rb_str_crypt): Update rdoc and state that this
+ function is system dependent. Reviewed by nobu, thanks to
+ @takai.
- * NEWS (XMLRPC::Client#http): Add.
- [ruby-core:55197] [Feature #8461]
+Mon Feb 27 17:03:20 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Jun 16 10:38:45 2013 Tanaka Akira <akr@fsij.org>
+ * ext/bigdecimal/bigdecimal.c (GetVpValueWithPrec): since methods
+ can be overridden, so should not make an assumption on the type
+ of results. [ruby-core:42969][Bug #6093]
- * 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.
+Mon Feb 27 10:54:20 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Jun 16 08:55:22 2013 Tanaka Akira <akr@fsij.org>
+ * lib/mkmf.rb (try_cppflags, try_cflags, try_ldflags): replace the
+ target flags if the given flag is accepted.
- * bignum.c (bigdivrem): Use a BDIGIT variable to store the return
- value of bigdivrem_single.
+Mon Feb 27 10:53:44 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Jun 16 08:43:59 2013 Tanaka Akira <akr@fsij.org>
+ * test/rubygems/test_gem_specification.rb (test_self_from_yaml_syck_default_key_bug):
+ ignore the test for too old versions.
- * 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.
+Mon Feb 27 10:53:12 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Jun 16 05:51:51 2013 Masaya Tarui <tarui@ruby-lang.org>
+ * lib/test/unit.rb (Test::Unit::Runner#puke): skips with no
+ messages should be trivial.
- * 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.
+Mon Feb 27 10:50:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Jun 16 05:15:36 2013 Masaya Tarui <tarui@ruby-lang.org>
+ * io.c, process.c, time.c, ext: use rb_sys_fail_str instead of
+ rb_sys_fail.
- * gc.c: Add some columns to more detail profile.
- new columns: Allocated size, Prepare Time, Removing Objects, Empty Objects
+Mon Feb 27 10:48:49 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Jun 16 02:04:40 2013 Masaya Tarui <tarui@ruby-lang.org>
+ * ext/openssl/extconf.rb: suppress useless deprecation warnings
+ from OpenSSL added by Apple.
- * 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.
+Sun Feb 26 23:29:49 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Sat Jun 15 23:50:24 2013 Tanaka Akira <akr@fsij.org>
+ * regparse.c (add_code_range_to_buf0): wrong condition of duplicated
+ warnings.
- * bignum.c (bary_sub): New function.
- (absint_numwords_generic): Use bary_sub.
- (bigsub_core): Skip unnecessary copy.
+Sun Feb 26 11:26:44 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Jun 15 22:05:30 2013 Tanaka Akira <akr@fsij.org>
+ * compile.c (iseq_compile_each): call on special object instead of
+ self. since stabby lambda is a syntax, so it should not be
+ affected by the context. [ruby-core:42349][Bug #5966]
- * 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.
+ * insns.def (send): no special deal for FCALL. self should be put
+ on TOS instead.
-Sat Jun 15 20:13:46 2013 Tanaka Akira <akr@fsij.org>
+Sun Feb 26 05:35:43 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * 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.
+ * error.c (report_bug): use buf and snprintf to avoid consuming stack.
+ [ruby-dev:45272] [Bug #6058]
-Sat Jun 15 19:35:04 2013 Tanaka Akira <akr@fsij.org>
+Sat Feb 25 17:41:19 2012 Tanaka Akira <akr@fsij.org>
- * bignum.c (absint_numwords_bytes): Make it static.
- (absint_numwords_small): Ditto.
- (absint_numwords_generic): Ditto.
+ * ext/dbm/extconf.rb (headers): try ambiguous headers at last.
-Sat Jun 15 17:14:32 2013 Tanaka Akira <akr@fsij.org>
+Sat Feb 25 17:07:15 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * bignum.c (bigmul1_normal): Shrink the result Bignum length.
+ * lib/fileutils.rb: use chomp(?/) instead of sub to optimize and avoid
+ to regexping invalid string.
-Sat Jun 15 10:19:42 2013 Zachary Scott <zachary@zacharyscott.net>
+Sat Feb 25 16:18:24 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * ext/bigdecimal/bigdecimal.c: Update overview formatting of headers
+ * complex.c (nucomp_marshal_load): raise error on invalid data.
+ reported by John Firebaugh [ruby-core:42860] [Bug #6076]
-Sat Jun 15 10:19:06 2013 Zachary Scott <zachary@zacharyscott.net>
+Sat Feb 25 14:46:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/bigdecimal/bigdecimal.gemspec: Update authors
+ * ext/dl/dl.c (Init_dl): support intrinsic types, size_t, ptrdiff_t
+ and intptr_t. [ruby-core:42460][Feature #5992]
-Sat Jun 15 10:02:26 2013 Tanaka Akira <akr@fsij.org>
+ * ext/fiddle/fiddle.c (Init_fiddle): ditto.
- * bignum.c (bdigs_small_rshift): Extracted from big_rshift.
- (bigdivrem): Use bdigs_small_rshift.
+ * ext/dl/lib/dl/cparser.rb (DL::CParser#parse_ctype): ditto.
-Sat Jun 15 08:37:28 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Feb 25 11:08:28 2012 Tanaka Akira <akr@fsij.org>
- * 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]
+ * ext/curses/curses.c (Init_curses): use rb_define_const once for
+ Curses::VERSION.
-Sat Jun 15 02:40:18 2013 Tanaka Akira <akr@fsij.org>
+ * ext/dbm/dbm.c (Init_dbm): ditto for DBM::VERSION.
- * bignum.c (bdigs_small_lshift): Extracted from big_lshift.
- (bigdivrem): Use bdigs_small_lshift.
+Sat Feb 25 10:34:22 2012 Tanaka Akira <akr@fsij.org>
-Fri Jun 14 20:47:41 2013 Tanaka Akira <akr@fsij.org>
+ * ext/curses/curses.c (Init_curses): make Curses::VERSION
+ understandable without context.
- * bignum.c (bigdivrem): Reduce number of digits before bignew() for div.
+ * ext/dbm/dbm.c (Init_dbm): ditto for DBM::VERSION.
-Fri Jun 14 20:12:37 2013 Tanaka Akira <akr@fsij.org>
+Sat Feb 25 07:53:58 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (bigdivrem): Use bignew when ny == 1.
+ * parse.y (parser_tokadd_string): insert a backslash only if
+ quoted by single quotes. [ruby-dev:45281] [Bug #6069]
-Fri Jun 14 18:52:51 2013 Koichi Sasada <ko1@atdot.net>
+Sat Feb 25 07:53:49 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * 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?)
+ * dir.c (dir_inspect), io.c (rb_io_inspect): keep encoding of path.
+ [Bug #6072]
- * test/ruby/test_settracefunc.rb: add a test.
+Sat Feb 25 07:53:40 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Jun 14 18:18:07 2013 Koichi Sasada <ko1@atdot.net>
+ * dir.c (dir_initialize): keep path in original encoding.
- * class.c, include/ruby/ruby.h: add write barriers for T_CLASS,
- T_MODULE, T_ICLASS.
+ * error.c (syserr_initialize): prefer the encoding of message over
+ locale. [ruby-dev:45279][Bug #6071]
- * constant.h: constify rb_const_entry_t::value and file to detect
- assignment.
+Sat Feb 25 06:55:29 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * variable.c, internal.h (rb_st_insert_id_and_value, rb_st_copy):
- added. update table with write barrier.
+ * file.c (utime_internal): fix a variable missed to replace.
+ [ruby-core:42864] [Bug #6077]
- * method.h: constify some variables to detect assignment.
+Fri Feb 24 18:21:55 2012 Hiroshi Nakamura <nahi@ruby-lang.org>
- * object.c (init_copy): add WBs.
+ * test/zlib/test_zlib.rb (TestZlibGzipReader#test_encoding): Add
+ encoding testcases for GzipReader#read. read() emits
+ Encoding.default_external in contrast to read(size) emits BINARY.
+ See also: http://bugs.jruby.org/6208
- * variable.c: ditto.
+Fri Feb 24 17:56:39 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
- * vm_method.c (rb_add_method): ditto.
+ * test/ruby/test_literal.rb (TestRubyLiteral#test_special_const):
+ test for https://bugs.php.net/bug.php?id=61095
-Fri Jun 14 14:33:47 2013 Shugo Maeda <shugo@ruby-lang.org>
+Fri Feb 24 16:48:29 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * NEWS: add a note for Module#using.
+ * dir.c, file.c, io.c (rb_sys_fail_path): use rb_sys_fail_str.
-Fri Jun 14 13:40:27 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * error.c: new functions to deal exceptions with string instances.
- * .travis.yml (before_script): update config files.
+ * dir.c, file.c, io.c: use rb_sys_fail_path.
- * common.mk ($(srcdir)/tool/config.{guess,sub}): use get-config_files.
+Fri Feb 24 15:49:07 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * tool/config_files.rb: split get-config_files.
+ * configure.in (__builtin_unreachable): check for clang.
+ [ruby-core:42849]
- * common.mk (update-config_files): rule to download config files.
+ * include/ruby/ruby.h (UNREACHABLE): fallback definition.
- * tool/config.guess, tool/config.sub: remove and download from the
- upstream.
+Fri Feb 24 13:54:33 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * tool/config_files.rb: download config files from GNU.
+ * ext/psych/parser.c: prevent a memory leak by protecting calls to
+ handler callbacks.
+ * test/psych/test_parser.rb: test to demonstrate leak.
-Fri Jun 14 12:21:20 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Feb 24 12:07:34 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * include/ruby/ruby.h (RUBY_SAFE_LEVEL_CHECK): suppress warnings
- "left-hand operand of comma expression has no effect", on gcc 4.4.
+ * lib/net/http.rb: Fix documentation. Patched from Florian Mhun
+ via http://github.com/ruby/ruby/pull/96
-Fri Jun 14 09:48:48 2013 Shugo Maeda <shugo@ruby-lang.org>
+Fri Feb 24 11:48:07 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * NEWS: add notes for $SAFE.
+ * string.c (rb_str_prepend): Fix documentation for String#prepend.
+ Patched from Franck Verrot via http://github.com/ruby/ruby/pull/98
+ and Andrew Horsman via http://github.com/ruby/ruby/pull/55
- * doc/security.rdoc: remove the description of $SAFE=4.
+Fri Feb 24 10:08:33 2012 Eric Hodel <drbrain@segment7.net>
-Fri Jun 14 00:14:29 2013 Tanaka Akira <akr@fsij.org>
+ * lib/net/http.rb (Net::HTTP#transport_request): Fix infinite loop
+ upon EOFError or Errno::ECONNRESET where count is reset to 0.
+ * test/net/http/test_http.rb (class TestNetHTTPKeepAlive): Test for
+ above.
- * bignum.c (bigdivrem): Zero test condition simplified.
+Fri Feb 24 09:05:40 2012 Eric Hodel <drbrain@segment7.net>
-Thu Jun 13 23:43:11 2013 Zachary Scott <zachary@zacharyscott.net>
+ * complex.c (Init_Complex): Document Complex::I. Patch by Sylvain
+ Daubert. [Feature #5623]
- * ext/bigdecimal/*: improve documentation, nodoc samples with @mrkn
+Fri Feb 24 08:52:09 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Jun 13 23:02:14 2013 Kouhei Sutou <kou@cozmixng.org>
+ * parse.y (parser_tokadd_string, parser_yylex): insert a backslash
+ if the next character is non-ascii. [ruby-dev:45278] [Bug #6069]
- * lib/xmlrpc/client.rb (XMLRPC::Client#http): Add reader for raw
- Net::HTTP. [ruby-core:55197] [Feature #8461]
- Reported by Herwin Weststrate. Thanks!!!
+Fri Feb 24 08:13:20 2012 Eric Hodel <drbrain@segment7.net>
-Thu Jun 13 22:44:52 2013 Kouhei Sutou <kou@cozmixng.org>
+ * lib/profiler.rb: Add Profiler documentation by Gonzalo Rodriguez.
+ [Bug #5816]
- * 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.
+Fri Feb 24 08:08:38 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-Thu Jun 13 22:35:50 2013 Kouhei Sutou <kou@cozmixng.org>
+ * ext/psych/parser.c: set parser encoding based on the YAML input
+ rather than user configuration.
+ * test/psych/test_encoding.rb: corresponding tests.
+ * test/psych/test_parser.rb: ditto
+ * test/psych/test_tainted.rb: ditto
- * lib/xmlrpc/client.rb (XMLRPC::Client#parse_set_cookies): Use
- guard style.
+Fri Feb 24 08:02:52 2012 Eric Hodel <drbrain@segment7.net>
-Thu Jun 13 22:12:32 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * hash.c (Init_Hash): Add section on how objects are used as Hash keys
+ and how to use custom classes as Hash keys.
- * lib/fileutils.rb (FileUtils#rmdir): fix traversal loop, not trying
- remove same directory only.
+Fri Feb 24 07:36:11 2012 Eric Hodel <drbrain@segment7.net>
-Thu Jun 13 21:30:14 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * object.c (rb_obj_eql): Improve equality documentation by adding an
+ example of equal? vs == and recommending eql? be aliased to == when
+ overridden.
- * configure.in (opt-dir), tool/ifchange: get rid of "alternate value"
- expansion for legacy sh. [ruby-dev:47420] [Bug #8524]
+Fri Feb 24 07:21:15 2012 Eric Hodel <drbrain@segment7.net>
-Thu Jun 13 21:24:09 2013 Tanaka Akira <akr@fsij.org>
+ * object.c (rb_obj_hash): Added note that the hash value is not
+ deterministic on Marc-Andre's suggestion. Expanded description of
+ the purpose of the hash method. [Bug #6068]
- * bignum.c (bigdivrem): Refactored to use ALLOCV_N for temporary
- buffers.
+Thu Feb 23 23:01:21 2012 Tanaka Akira <akr@fsij.org>
-Thu Jun 13 18:54:11 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * ext/dbm/extconf.rb: unused macro removed.
- * 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.
+Thu Feb 23 22:26:53 2012 Tanaka Akira <akr@fsij.org>
-Thu Jun 13 18:53:14 2013 Tanaka Akira <akr@fsij.org>
+ * test/test_curses.rb: new file.
- * test/ruby/test_thread.rb (test_thread_local_security): Don't create
- an unused thread.
+Thu Feb 23 19:57:56 2012 Tanaka Akira <akr@fsij.org>
-Thu Jun 13 18:34:20 2013 Tanaka Akira <akr@fsij.org>
+ * ext/curses/rain.rb: trap SIGHUP, SIGINT, SIGQUIT and SIGTERM only.
- * bignum.c (bigdivrem): Use nlz.
+Thu Feb 23 19:56:48 2012 Tanaka Akira <akr@fsij.org>
-Thu Jun 13 14:51:06 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * signal.c (sig_trap): show signal name on error.
- * include/ruby/ruby.h (RUBY_SAFE_LEVEL_CHECK): check constant safe
- level at compile time.
+Thu Feb 23 12:21:48 2012 Tanaka Akira <akr@fsij.org>
-Thu Jun 13 14:39:08 2013 Shugo Maeda <shugo@ruby-lang.org>
+ * ext/dbm/extconf.rb: use DBM_SUFFIX only to detect header of
+ Berkeley DB.
- * 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.
+Thu Feb 23 10:00:18 2012 Eric Hodel <drbrain@segment7.net>
-Thu Jun 13 10:47:16 2013 Shugo Maeda <shugo@ruby-lang.org>
+ * io.c (rb_io_f_sync): Fix double-negative typo. [ruby-trunk - #5837]
- * bootstraptest/test_autoload.rb, bootstraptest/test_method.rb:
- remove tests for $SAFE=4.
+Thu Feb 23 09:57:21 2012 Eric Hodel <drbrain@segment7.net>
- * lib/pp.rb: use taint instead of untrust to avoid warnings when
- $VERBOSE is set to true.
+ * load.c (rb_f_require): Add note to require for scope of items in the
+ loaded file. [ruby-trunk - #5910]
-Thu Jun 13 06:12:18 2013 Tanaka Akira <akr@fsij.org>
+Thu Feb 23 03:58:08 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
- * 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]
+ * lib/ostruct.rb (delete_field): Bug fix so previous value is
+ returned. Patch by Nick Recobra [Bug #6063]
-Thu Jun 13 05:32:13 2013 Eric Hodel <drbrain@segment7.net>
+Thu Feb 23 02:33:00 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/socket/extconf.rb: Enable RFC 3542 IPV6 socket options for OS X
- 10.7+. [ruby-trunk - Bug #8517]
+ * io.c (rb_io_extract_modeenc): fail only if conflicting
+ text/binary modes given explicitly. [ruby-dev:45268][Bug #6055]
-Thu Jun 13 00:17:18 2013 Tanaka Akira <akr@fsij.org>
+Wed Feb 22 23:27:08 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * 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.
+ * test/iconv/test_option.rb: enabled. [ruby-core:42802][Bug #6061]
- * internal.h (rb_integer_unpack_2comp): Declared.
+Wed Feb 22 21:45:56 2012 Tanaka Akira <akr@fsij.org>
- * pack.c (pack_unpack): Use rb_integer_unpack_2comp and
- rb_integer_unpack.
+ * ext/curses/curses.c: use defined() to suppress a warning.
-Wed Jun 12 23:27:03 2013 Shugo Maeda <shugo@ruby-lang.org>
+Wed Feb 22 21:44:29 2012 Tanaka Akira <akr@fsij.org>
- * 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]
+ * ext/curses/extconf.rb: refactored.
- * test/ruby/test_refinement.rb: related test.
+Wed Feb 22 20:42:28 2012 Tanaka Akira <akr@fsij.org>
-Wed Jun 12 22:58:48 2013 Shugo Maeda <shugo@ruby-lang.org>
-
- * 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]
-
- * 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.
-
- * include/ruby/ruby.h (OBJ_UNTRUSTED, OBJ_UNTRUST): OBJ_UNTRUSTED()
- and OBJ_UNTRUST() are aliases of OBJ_TAINTED() and OBJ_TAINT(),
- respectively.
-
- * 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.
-
- * 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.
-
-Wed Jun 12 22:18:23 2013 Tanaka Akira <akr@fsij.org>
-
- * 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.
+ * ext/curses/extconf.rb: try to distinguish curses_version is a
+ function or variable.
+
+ * ext/curses/curses.c (Init_curses): refine Curses::VERSION.
+
+Wed Feb 22 19:47:03 2012 Tanaka Akira <akr@fsij.org>
-Wed Jun 12 20:18:03 2013 Kouhei Sutou <kou@cozmixng.org>
+ * ext/curses/extconf.rb: show the chosen header and library.
- * lib/xmlrpc/client.rb (XMLRPC::Client#parse_set_cookies): Extract.
+Wed Feb 22 19:22:31 2012 Tadayoshi Funaba <tadf@dotrb.org>
-Wed Jun 12 18:19:41 2013 Tanaka Akira <akr@fsij.org>
+ * reverted 34739 for test/date.
- * 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.
+Wed Feb 22 19:08:55 2012 Tanaka Akira <akr@fsij.org>
-Wed Jun 12 16:41:38 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/curses/extconf.rb: refactored.
- * array.c (rb_ary_sort_bang): remove duplicated assertions.
- ARY_HEAP_PTR() implies ary not to be embedded. [ruby-dev:47419]
- [Bug #8518]
+Wed Feb 22 18:44:41 2012 Shota Fukumori <sorah@tubusu.net>
-Wed Jun 12 12:44:45 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/test/unit.rb (setup_options): add option "--retry" as opposite
+ for "--no-retry"
- * io.c (io_getc): fix 7bit coderange condition, check if ascii read
- data instead of read length. [ruby-core:55444] [Bug #8516]
+Wed Feb 22 18:34:02 2012 Shota Fukumori <sorah@tubusu.net>
-Wed Jun 12 12:35:13 2013 Tanaka Akira <akr@fsij.org>
+ * lib/test/unit.rb (setup_options): add option "--show-skip" to
+ cancel "--hide-skip" (-q)
- * pack.c (pack_pack): Use rb_integer_pack_2comp.
+Wed Feb 22 17:36:22 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Jun 12 12:07:04 2013 Tanaka Akira <akr@fsij.org>
+ * io.c (rb_io_s_foreach): argument check before making Enumerator.
+ [ruby-dev:31525]
- * sprintf.c (rb_str_format): Fix a dynamic format string.
+Wed Feb 22 17:07:35 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Jun 12 12:04:09 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * io.c (rb_io_s_foreach): return enumerator including keyword
+ arguments. [ruby-dev:45267][Bug #6054]
- * array.c (rb_ary_uniq_bang): must not be modified once frozen even in
- a callback method.
+Wed Feb 22 12:15:16 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Wed Jun 12 12:03:43 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * configure.in: allow llvm-gcc because it work fine with r34278.
- * array.c (rb_ary_sort_bang): must not be modified once frozen even in
- a callback method.
+Wed Feb 22 10:57:08 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Wed Jun 12 12:00:15 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * regparse.c (fetch_token): don't use // comment.
- * array.c (FL_SET_EMBED): shared object is frozen even when get
- unshared.
+Wed Feb 22 10:32:11 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * array.c (rb_ary_modify): ARY_SET_CAPA needs unshared array.
+ * test/mkmf/test_framework.rb: try CoreFoundation framework, than
+ Cocoa which is dependent on QuickTime SDK which has separated
+ since Xcode 4.3.
-Wed Jun 12 07:32:01 2013 Tanaka Akira <akr@fsij.org>
+Wed Feb 22 10:18:05 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * random.c (rand_int): Use rb_big_uminus.
+ * common.mk (test-all, test-ruby): more dependencies.
-Wed Jun 12 07:12:54 2013 Eric Hodel <drbrain@segment7.net>
+Wed Feb 22 06:48:55 2012 Eric Hodel <drbrain@segment7.net>
- * 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.
+ * file.c (rb_f_test): Fix formatting of Kernel#test rdoc.
-Wed Jun 12 06:35:01 2013 Tanaka Akira <akr@fsij.org>
+Wed Feb 22 06:12:15 2012 Tanaka Akira <akr@fsij.org>
- * internal.h (INTEGER_PACK_NEGATIVE): Defined.
- (rb_integer_unpack): sign argument removed.
+ * ext/dbm/extconf.rb: check DBM_SUFFIX for Mac OS X.
+ Its ndbm.h doesn't include db.h.
- * 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.
+Wed Feb 22 06:02:42 2012 Tanaka Akira <akr@fsij.org>
- * pack.c (pack_unpack): Follow the above change.
+ * ext/dbm/dbm.c (fdbm_initialize): disable Berkeley DB error messages.
- * random.c (int_pair_to_real_inclusive): Ditto.
- (make_seed_value): Ditto.
- (mt_state): Ditto.
- (limited_big_rand): Ditto.
+ * ext/dbm/extconf.rb: check DBC type for above.
- * marshal.c (r_object0): Ditto.
+ [ruby-dev:45269]
-Wed Jun 12 00:07:46 2013 Kouhei Sutou <kou@cozmixng.org>
+Tue Feb 21 20:23:47 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/xmlrpc/test_client.rb (XMLRPC::ClientTest#test_cookie_simple):
- Add a test for the extracted method.
+ * hash.c (rb_any_hash): treat Qundef like as other special constants.
-Tue Jun 11 23:56:24 2013 Kouhei Sutou <kou@cozmixng.org>
+ * hash.c (hash_foreach_iter): fix signature.
- * test/xmlrpc/test_client.rb (XMLRPC::ClientTest::Fake::HTTP#started):
- Add a missing empty line.
+Tue Feb 21 19:39:34 2012 Tanaka Akira <akr@fsij.org>
-Tue Jun 11 23:37:19 2013 Tanaka Akira <akr@fsij.org>
+ * ext/curses/curses.c (Init_curses): use curses_version() for
+ Curses::VERSION.
- * 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.
+Tue Feb 21 18:21:25 2012 Narihiro Nakamura <authornari@gmail.com>
- * hash.c (rb_hash): Ditto.
+ * gc.c : remove gc_clear_mark_on_sweep_slots() and use
+ rest_sweep() instead of it, because some dead objects might be
+ marked in next the mark phase by false pointers.
+ [ruby-core:42672]
- * time.c (v2w_bignum): Ditto.
+Tue Feb 21 16:08:17 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jun 11 23:01:57 2013 Tanaka Akira <akr@fsij.org>
+ * proc.c (rb_hash_proc): get wrapped pointer properly. [Bug #6048]
- * bignum.c (validate_integer_pack_format): Refine error messages.
+Tue Feb 21 14:41:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jun 11 22:25:04 2013 Tanaka Akira <akr@fsij.org>
+ * template/ruby.pc.in: added rubylibprefix, {rubylib,vendor,site}dir
+ and {ruby,vendor,site}archdir. [ruby-core:42766][Feature #6052]
- * 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.
+Tue Feb 21 09:13:25 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-Tue Jun 11 20:52:43 2013 Tanaka Akira <akr@fsij.org>
+ * proc.c (method_hash, proc_hash): Fix {Unbound}Method#hash
+ [Bug #6048]. Isolate hash computation for proc
- * 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.
+ * internal.h: Declaration for above
- * internal.h (rb_integer_pack_2comp): Declared.
+ * vm_method.c (rb_method_definition_hash): Computation for
+ hash part of a method definition
- * 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.
+ * method.h: Declaration for above
-Tue Jun 11 16:15:03 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/ruby/test_method.rb: Test for above
- * array.c (ary_shrink_capa): shrink the capacity so it fits just with
- the length.
+Tue Feb 21 02:56:15 2012 Yukihiro Matsumoto <matz@ruby-lang.org>
- * array.c (ary_make_shared): release never used elements from frozen
- array to be shared. [ruby-dev:47416] [Bug #8510]
+ * enumerator.c (enumerator_rewind): update the documentation.
+ fixed: #6053
-Tue Jun 11 12:49:01 2013 Zachary Scott <zachary@zacharyscott.net>
+Mon Feb 20 23:38:35 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * doc/re.rdoc: Rename to doc/regexp.rdoc
- * re.c: Update rdoc include for rename of file
+ * enc/depend: ignore mktable.c because it's not encoding library.
+ [ruby-core:42760] [Bug #6049]
-Tue Jun 11 07:13:13 2013 Masaya Tarui <tarui@ruby-lang.org>
+Mon Feb 20 21:40:53 2012 Tanaka Akira <akr@fsij.org>
- * eval_error.c (error_print): keep that errat is non-shady object.
- and guard errat from GC.
+ * ext/curses/extconf.rb: fold too long lines.
-Tue Jun 11 05:04:25 2013 Benoit Daloze <eregontp@gmail.com>
+Mon Feb 20 21:16:48 2012 Hiroshi Shirosaki <h.shirosaki@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.
+ * lib/fileutils.rb: revert a line modified accidentally at r34669.
+ This fixes mingw test errors in TestDir_M17N.
+ [ruby-core:42728] [Feature #4970]
-Mon Jun 10 23:51:51 2013 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+Mon Feb 20 21:09:27 2012 Tanaka Akira <akr@fsij.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
+ * ext/curses/curses.c (Init_curses): define Curses::VERSION.
-Mon Jun 10 21:51:03 2013 Kouhei Sutou <kou@cozmixng.org>
+Mon Feb 20 21:08:00 2012 Tanaka Akira <akr@fsij.org>
- * ext/socket/raddrinfo.c (nogvl_getaddrinfo): Fix indent.
+ * ext/curses/extconf.rb: restore $libs and $defs for each
+ header/library choice.
-Mon Jun 10 21:49:43 2013 Kouhei Sutou <kou@cozmixng.org>
+Mon Feb 20 19:57:26 2012 Tanaka Akira <akr@fsij.org>
- * ext/socket/raddrinfo.c (nogvl_getaddrinfo): Add missing return
- value assignment.
+ * ext/dbm/extconf.rb: weaken header/library consistency check if db is
+ "ndbm". It seems several (possibly historical) distributions
+ provide libndbm. However the content of libndbm vary: Berkeley DB,
+ GDBM or even 4.3BSD NDBM. (Mandriva, Tru64 UNIX, OpenSuSE,
+ SCO OpenServer, ...)
+ "ndbm" is not searched automatically now (dblib doesn't contain it)
+ but configure --with-dbm-type=ndbm choose libndbm and ndbm.h.
-Mon Jun 10 20:58:11 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Mon Feb 20 19:15:57 2012 Tanaka Akira <akr@fsij.org>
- * ext/socket/raddrinfo.c (nogvl_getaddrinfo): work around for Ubuntu
- 13.04's getaddrinfo issue with mdns4. [ruby-list:49420]
+ * ext/dbm/extconf.rb: refine variable names.
-Mon Jun 10 19:34:39 2013 Tanaka Akira <akr@fsij.org>
+Mon Feb 20 15:50:33 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (rb_integer_pack): Returns sign instead of words.
- (absint_numwords_generic): Follow the above change.
- (big2str_base_powerof2): Follow the above change.
+ * configure.in: check if -fstack-protector is really available.
- * internal.h: Ditto.
+Sun Feb 19 23:43:38 2012 Tanaka Akira <akr@fsij.org>
- * hash.c (rb_hash): Ditto.
+ * ext/dbm/extconf.rb: show header and library found.
- * pack.c (pack_pack): Ditto.
+Sun Feb 19 23:01:01 2012 Tanaka Akira <akr@fsij.org>
- * random.c (int_pair_to_real_inclusive): Ditto.
- (rand_init): Ditto.
- (random_load): Ditto.
- (limited_big_rand): Ditto.
+ * ext/dbm/dbm.c (Init_dbm): refine DBM::VERSION definition.
- * time.c (v2w_bignum): Ditto.
+ * ext/dbm/extconf.rb: provide RUBYDBM_GDBM_HEADER macro.
-Mon Jun 10 17:20:01 2013 Koichi Sasada <ko1@atdot.net>
+Sun Feb 19 17:07:27 2012 Tanaka Akira <akr@fsij.org>
- * gc.c (rgengc_remember): permit promoted object.
- (rb_gc_writebarrier -> remember)
+ * test/dbm/test_dbm.rb (test_dbmfile_suffix): check pag and dir is
+ empty for 4.3BSD ndbm.
-Mon Jun 10 17:14:01 2013 Koichi Sasada <ko1@atdot.net>
+Sun Feb 19 03:00:30 2012 Tanaka Akira <akr@fsij.org>
- * gc.c (RVALUE_PROMOTE): fix parameter name (`x' to `obj')
- and make it inline function (like RVALUE_PROMOTE).
+ * test/dbm/test_dbm.rb (test_dbmfile_suffix): check magic numbers.
-Mon Jun 10 16:22:50 2013 Koichi Sasada <ko1@atdot.net>
+Sun Feb 19 01:05:41 2012 Tanaka Akira <akr@fsij.org>
- * array.c (rb_ary_new_from_values): add assertion
- (ary should be young object).
+ * ext/dbm/extconf.rb: detect GDBM's ndbm.h by testing dbm_clearerr is
+ an empty macro.
-Mon Jun 10 16:05:59 2013 Koichi Sasada <ko1@atdot.net>
+Sun Feb 19 00:25:55 2012 Tanaka Akira <akr@fsij.org>
- * gc.c (wmap_mark): check allocation of `w->obj2wmap'.
- (no-allocation `w->obj2wmap' will be NULL pointer reference)
+ * ext/dbm/extconf.rb: don't choose 'dbm' if _GDB_H_ is defined which
+ is available since GDBM 1.9 because 'gdbm_compat' is appropriate
+ choice since GDBM 1.8.1.
-Mon Jun 10 15:36:00 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Feb 18 23:27:00 2012 Kenta Murata <mrkn@mrkn.jp>
- * eval_error.c (error_print): use checking functions instead of
- catching exceptions.
+ * random.c: remove a duplicated comment.
- * eval_error.c (error_print): restore errinfo for the case new
- exception raised while printing the message. [ruby-core:55365]
- [Bug #8501]
+Sat Feb 18 18:43:13 2012 Tanaka Akira <akr@fsij.org>
- * eval_error.c (error_print): reduce calling setjmp.
+ * ext/dbm/extconf.rb (dblib): prefer recent GDBM over older GDBM.
+ (have_declared_libvar): new function to check a declared variable
+ exists in a library.
+ (have_undeclared_libvar): renamed from renamed from have_libvar.
+ (headers.db_check2): check that GDBM version variable if GDBM header
+ is chosen.
-Mon Jun 10 12:10:06 2013 Tanaka Akira <akr@fsij.org>
+ * ext/dbm/dbm.c (Init_dbm): use HAVE_DECLARED_LIBVAR_GDBM_VERSION and
+ HAVE_UNDECLARED_LIBVAR_GDBM_VERSION macro.
- * 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.
+Sat Feb 18 13:53:01 2012 Tanaka Akira <akr@fsij.org>
-Mon Jun 10 05:38:23 2013 Tanaka Akira <akr@fsij.org>
+ * test/dbm/test_dbm.rb (test_dbmfile_suffix): DBM::VERSION should
+ be Berkeley DB if foo.db is created by DBM.open.
- * bignum.c (absint_numwords_small): New function.
- (absint_numwords_generic): Use absint_numwords_small if possible.
+Sat Feb 18 13:40:37 2012 Tanaka Akira <akr@fsij.org>
-Mon Jun 10 01:07:57 2013 Tanaka Akira <akr@fsij.org>
+ * test/dbm/test_dbm.rb (test_dbmfile_suffix): test dbm file suffix.
- * bignum.c (absint_numwords_bytes): New function.
- (absint_numwords_generic): Extracted from rb_absint_numwords.
- (rb_absint_numwords): Use absint_numwords_bytes if possible.
+Sat Feb 18 12:50:59 2012 Tanaka Akira <akr@fsij.org>
-Sun Jun 9 21:33:15 2013 Tanaka Akira <akr@fsij.org>
+ * ext/dbm/dbm.c (DBM::VERSION): define it by detecting _GDBM_H_ or
+ _DBM_IOERR.
- * bignum.c (rb_absint_numwords): Return (size_t)-1 when overflow.
- Refine variable names.
- (rb_absint_size): Refine variable names.
+Sat Feb 18 07:52:45 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * internal.h (rb_absint_size): Refine an argument name.
- (rb_absint_numwords): Ditto.
+ * tool/enc-unicode.rb: don't use 1.9 feature on tools.
-Sun Jun 9 16:51:41 2013 Tanaka Akira <akr@fsij.org>
+Sat Feb 18 02:48:39 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * bignum.c (rb_absint_numwords): Renamed from rb_absint_size_in_word.
+ * lib/fileutils.rb: refactored FileUtil methods to use the
+ `define_command` API. Patch from 7rans <transfire@gmail.com>
+ * test/fileutils/test_dryrun.rb: corresponding test refactoring
+ * test/fileutils/test_nowrite.rb: ditto
+ * test/fileutils/test_verbose.rb: ditto
- * internal.h (rb_absint_numwords): Follow the above change.
+Fri Feb 17 21:39:36 2012 Tanaka Akira <akr@fsij.org>
- * pack.c (pack_pack): Ditto.
+ * ext/dbm/extconf.rb: remove dbm.
- * random.c (rand_init): Ditto.
- (limited_big_rand): Ditto.
+Fri Feb 17 21:18:39 2012 Tanaka Akira <akr@fsij.org>
-Sun Jun 9 14:41:05 2013 Tanaka Akira <akr@fsij.org>
+ * ext/dbm/extconf.rb: refine header/library mismatch detection.
+ check only for ndbm.h except libc. check _GDBM_H_ for gdbm.
+ check _DBM_IOERR for the original ndbm.
- * bignum.c (rb_integer_pack): numwords_allocated argument removed.
+Fri Feb 17 20:30:44 2012 Tanaka Akira <akr@fsij.org>
- * internal.h (rb_integer_pack): Follow the above change.
+ * ext/dbm/extconf.rb: don't check libdbm. It is not a ndbm
+ implementation. (libdbm in Version 7 Unix is database library
+ for single database per process.)
- * hash.c (rb_hash): Ditto.
+Fri Feb 17 15:38:53 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * time.c (v2w_bignum): Ditto.
+ * Merge Onigmo-5.13.1. [ruby-dev:45057] [Feature #5820]
+ https://github.com/k-takata/Onigmo
+ cp reg{comp,enc,error,exec,parse,syntax}.c reg{enc,int,parse}.h
+ cp oniguruma.h
+ cp tool/enc-unicode.rb
+ cp -r enc/
- * pack.c (pack_pack): Ditto.
+Fri Feb 17 15:20:30 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * random.c (int_pair_to_real_inclusive): Ditto.
- (rand_init): Ditto.
- (random_load): Ditto.
- (limited_big_rand): Ditto.
+ * enum.c (enum_each_slice): arrays to be yielded can be newly
+ created in the block.
-Sun Jun 9 09:34:44 2013 Tanaka Akira <akr@fsij.org>
+ * enum.c: move work variables to objects not to let called blocks
+ access stack area out of scope. [Bug #5801]
- * bignum.c (big2str_base_powerof2): New function.
- (rb_big2str0): Use big2str_base_powerof2 if base is 2, 4, 8, 16 or 32.
+Fri Feb 17 12:35:55 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Sun Jun 9 00:59:04 2013 Tanaka Akira <akr@fsij.org>
+ * tool/merger.rb: remove borders from the commit message which is used
+ when the commit doesn't change ChangeLog.
- * hash.c (rb_hash): Use rb_integer_pack to obtain least significant
- long integer.
+Fri Feb 17 11:50:11 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Jun 8 23:56:00 2013 Tanaka Akira <akr@fsij.org>
+ * common.mk (btest, btest-ruby, test-sample test-knownbugs)
+ (test-all, test-ruby): depend on prog.
- * numeric.c (rb_num_to_uint): Use rb_absint_size instead of
- RBIGNUM_LEN.
+Fri Feb 17 09:56:22 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Jun 8 22:53:45 2013 Tanaka Akira <akr@fsij.org>
+ * lib/mkmf.rb (create_header): log the content of header.
- * marshal.c (r_object0): Use rb_integer_unpack.
+Fri Feb 17 09:44:55 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Sat Jun 8 22:18:57 2013 Tanaka Akira <akr@fsij.org>
+ * tool/transcode-tblgen.rb (import_ucm): don't use \h because the
+ script should work with ruby 1.8.
- * time.c (v2w): Use rb_absint_size instead of RBIGNUM_LEN.
+ * tool/enc-unicode.rb: ditto.
-Sat Jun 8 21:47:33 2013 Tanaka Akira <akr@fsij.org>
+Fri Feb 17 07:33:29 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * time.c (v2w_bignum): Simplified using rb_integer_pack.
- (rb_big_abs_find_maxbit): Removed.
+ * enum.c (id_lshift): use constant ID.
-Sat Jun 8 21:03:40 2013 Tanaka Akira <akr@fsij.org>
+Fri Feb 17 07:30:53 2012 Tanaka Akira <akr@fsij.org>
- * bignum.c (rb_absint_singlebit_p): New function.
+ * ext/dbm/extconf.rb: refactored to split too long conditions.
- * internal.h (rb_absint_singlebit_p): Declared.
+Fri Feb 17 00:23:25 2012 Tanaka Akira <akr@fsij.org>
- * time.c (v2w_bignum): Use rb_absint_singlebit_p instead of
- rb_big_abs_find_minbit.
- (rb_big_abs_find_minbit): Removed.
+ * test/dbm/test_dbm.rb: fix skip condition for libgdbm 1.8.0 or prior.
+ reported by Bohuslav Kabrda.
+ [ruby-core:42685] [ruby-trunk - Bug #6036]
-Sat Jun 8 20:24:23 2013 Tanaka Akira <akr@fsij.org>
+Fri Feb 17 00:04:21 2012 Tanaka Akira <akr@fsij.org>
- * time.c (rb_big_abs_find_maxbit): Use rb_absint_size.
- (bdigit_find_maxbit): Removed.
+ * ext/dbm/extconf.rb: check _DB_H_ macro unavailable except
+ Berkeley DB library.
-Sat Jun 8 19:47:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+Thu Feb 16 05:41:35 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * class.c (include_modules_at): invalidate method cache if included
- module contains constants
+ * insns.def (splatarray): make new array if flag is set.
- * test/ruby/test_module.rb: add test
+ * compile.c (iseq_compile_each): make new array with
+ splat. [ruby-core:21901][Feature #1125]
-Sat Jun 8 19:31:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+Thu Feb 16 00:14:04 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
- * random.c (limited_big_rand): declare rnd, lim and mask as uint32_t
- to avoid 64 bit to 32 bit shorten warnings.
+ * lib/abbrev.rb (Array#abbrev): add missing '"' in documentation.
-Sat Jun 8 19:23:53 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Wed Feb 15 22:20:19 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * 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.
+ * cont.c (rb_fiber_reset_root_local_storage): add a new function to
+ restore rb_thread_t::local_storage.
-Sat Jun 8 19:06:26 2013 Tanaka Akira <akr@fsij.org>
+ * cont.c (rb_obj_is_fiber): add a new function to tell finalizer to
+ prevent fibers from destroy.
- * random.c: Unused RBignum internal accessing macros removed.
+ * gc.c (rb_objspace_call_finalizer): don't sweep fibers at finalizing
+ objspace.
-Sat Jun 8 19:04:15 2013 Tanaka Akira <akr@fsij.org>
+ * internal.h (rb_fiber_reset_root_local_storage, rb_obj_is_fiber):
+ add prototypes.
- * random.c (limited_big_rand): The argument, limit, is changed to
- VALUE. Use rb_integer_pack and rb_integer_unpack.
+ * vm.c (ruby_vm_destruct): reset main thread's local_storage before
+ free main thread. rb_thread_t::local_storage is replaced by fiber's
+ local storage when forked from fiber, and it should be already freed
+ when the fiber was destroyed. [ruby-core:41456] [Bug #5700]
-Sat Jun 8 17:15:18 2013 Tanaka Akira <akr@fsij.org>
+ * test/ruby/test_fiber.rb (test_fork_from_fiber): add test for fork
+ from fiber.
- * random.c (make_seed_value): Fix the length given for
- rb_integer_unpack.
+Wed Feb 15 19:57:02 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Jun 8 16:38:02 2013 Tanaka Akira <akr@fsij.org>
+ * ext/fiddle/closure.c (callback): deal with unsigned integers.
+ [ruby-core:42458][Bug #5991][Bug #6022]
- * bignum.c (rb_integer_unpack): Don't use rb_funcall if possible.
+ * ext/fiddle/conversions.c (value_to_generic, generic_to_value):
+ ditto.
- * random.c: Use uint32_t for elements of seed.
- (make_seed_value): Use rb_integer_unpack.
+ * ext/fiddle/closure.c (callback): same as r34506.
-Sat Jun 8 15:58:18 2013 Tanaka Akira <akr@fsij.org>
+Wed Feb 15 17:41:31 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * 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.
+ * io.c (io_strsetbuf): call rb_str_modify to make str independent
+ before calling rb_str_set_len for r34580.
-Sat Jun 8 15:30:03 2013 Tanaka Akira <akr@fsij.org>
+Wed Feb 15 12:30:10 2012 Eric Hodel <drbrain@segment7.net>
- * random.c (rand_init): Use rb_integer_pack.
- (roomof): Removed.
+ * ext/zlib/zlib.c (Init_zlib): Added Zlib::TEXT and note that
+ Zlib::ASCII is deprecated in zlib 1.2.3 and newer.
-Sat Jun 8 14:58:32 2013 Tanaka Akira <akr@fsij.org>
+Wed Feb 15 12:24:40 2012 Eric Hodel <drbrain@segment7.net>
- * internal.h (INTEGER_PACK_FORCE_BIGNUM): New flag constant.
+ * ext/zlib/zlib.c: Move constant descriptions to constants. Remove
+ extra comment block at the top of Init_zlib().
- * bignum.c (rb_integer_unpack): Support INTEGER_PACK_FORCE_BIGNUM.
+Wed Feb 15 12:30:46 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
- * random.c (int_pair_to_real_inclusive): Use
- INTEGER_PACK_FORCE_BIGNUM to use rb_big_mul instead of rb_funcall.
+ * lib/ostruct.rb: Create getters and setters after dup.
+ [Bug #6028] [rubyspecs:0380bcc]
-Sat Jun 8 14:17:01 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Feb 15 10:59:52 2012 Narihiro Nakamura <authornari@gmail.com>
- * configure.in: check for NET_LUID. header macro varies across
- compiler versions.
+ * gc.c (HEAP_BITMAP_LIMIT): HEAP_BITMAP_LIMIT is computed on the
+ basis of HEAP_SIZE because it must covers a whole heap block.
+ [ruby-trunk - Bug #6006]
- * win32/win32.c: use configured macro.
+Wed Feb 15 09:27:45 2012 Eric Hodel <drbrain@segment7.net>
-Sat Jun 8 11:59:55 2013 Tanaka Akira <akr@fsij.org>
+ * ext/zlib/zlib.c (Init_zlib): Added Zlib::FIXED and Zlib::RLE
+ strategies.
+ * NEWS: Add note about the new Zlib constants.
- * random.c (int_pair_to_real_inclusive): Use rb_funcall instead of
- rb_big_mul because rb_integer_unpack can return a Fixnum.
+Wed Feb 15 09:11:36 2012 Eric Hodel <drbrain@segment7.net>
-Sat Jun 8 11:17:39 2013 Tanaka Akira <akr@fsij.org>
+ * ext/zlib/zlib.c: Improve documentation. [ruby-trunk - Bug #5948]
- * random.c (int_pair_to_real_inclusive): Use rb_integer_pack.
+Wed Feb 15 07:28:54 2012 Eric Hodel <drbrain@segment7.net>
-Sat Jun 8 09:49:42 2013 Tanaka Akira <akr@fsij.org>
+ * encoding.c (Init_Encoding): Add IO example of internal and external
+ encoding. Fixed a typo in the force_encoding example. [#5949]
- * random.c (int_pair_to_real_inclusive): Use rb_integer_unpack.
+Wed Feb 15 06:58:21 2012 Eric Hodel <drbrain@segment7.net>
-Sat Jun 8 08:12:22 2013 Tanaka Akira <akr@fsij.org>
+ * encoding.c (Init_Encoding): Add Encoding documentation.
+ [ruby-trunk - Bug #5949]
+ * encoding.c (rb_set_default_external): Fix typo in documentation.
- * random.c (random_load): Use rb_integer_pack.
+Tue Feb 14 20:22:11 2012 Narihiro Nakamura <authornari@gmail.com>
-Sat Jun 8 06:15:46 2013 Tanaka Akira <akr@fsij.org>
+ * gc.c (CEILDIV): rename to a appropriate name.
- * random.c (numberof): Removed.
+Tue Feb 14 18:07:20 2012 Narihiro Nakamura <authornari@gmail.com>
-Sat Jun 8 06:00:47 2013 Tanaka Akira <akr@fsij.org>
+ * gc.c (assign_heap_slot): SEGV happens cause on 64-bit platform
+ sometime there should be `objs-=2` instead of `objs--`.
+ [Bug #6006]
+ patched by Sokolov Yura. https://github.com/ruby/ruby/pull/92
- * random.c: include internal.h.
- (mt_state): Use rb_integer_unpack.
+Tue Feb 14 16:00:30 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Jun 8 00:55:51 2013 Tanaka Akira <akr@fsij.org>
+ * io.c (io_setstrbuf): cut down the buffer if longer.
- * 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.
+Tue Feb 14 15:06:37 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Jun 8 00:37:32 2013 Tanaka Akira <akr@fsij.org>
+ * lib/test/unit/assertions.rb (build_message): skip escaped
+ question marks.
- * 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.
+Tue Feb 14 12:10:04 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Jun 7 23:58:06 2013 Tanaka Akira <akr@fsij.org>
+ * variable.c (autoload_const_set, autoload_require): fix
+ signatures.
- * 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.
+Tue Feb 14 05:23:40 2012 Eric Hodel <drbrain@segment7.net>
- * pack.c: Ditto.
+ * process.c (proc_wait): Change typo "SystemError" to
+ "SystemCallError". [ruby-trunk - Bug #5962]
+ * process.c (proc_wait2): ditto
- * 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.
+Tue Feb 14 05:18:24 2012 Eric Hodel <drbrain@segment7.net>
-Fri Jun 7 22:10:50 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * enumerator.c: Document use of Enumerator.new for creating a lazy
+ enumeration for filtering/chaining. [ruby-trunk - Feature #707]
- * lib/rubygems/specification.rb (Gem::Specification#to_yaml):
- use Gem::NoAliasYAMLTree.create instead of Gem::NoAliasYAMLTree.new
- to suppress deprecated warnings.
+Mon Feb 13 23:01:50 2012 Akinori MUSHA <knu@iDaemons.org>
-Fri Jun 7 21:39:39 2013 Tanaka Akira <akr@fsij.org>
+ * vm_method.c (rb_method_boundp):
+ obj.respond_to?(:a_protected_method) should return false because
+ calling a protected method may cause NoMethodError if called
+ from outside the class inheritance tree. Kernel#respond_to? is
+ mostly used to test if it is safe to call a method, so the false
+ positive should be avoided. [ruby-dev:40461] [ruby-dev:41739]
+ [ruby-dev:41837]
- * bignum.c (rb_integer_pack): Renamed from rb_int_export.
- (rb_integer_unpack): Renamed from rb_int_import.
+Mon Feb 13 21:52:06 2012 Narihiro Nakamura <authornari@gmail.com>
- * internal.h, pack.c: Follow the above change.
+ * gc.c (HEAP_OBJ_LIMIT, HEAP_BITMAP_LIMIT): HEAP_OBJ_LIMIT used
+ `sizeof(struct heaps_slot)` while heap is currently allocated
+ with `struct heaps_header`.
+ HEAP_BITMAP_LIMIT were calculated from
+ `HEAP_OBJ_LIMIT/sizeof(uintptr_t)` - one Byte for each object,
+ not one Bit. [Bug #6006]
+ patched by Sokolov Yura. https://github.com/ruby/ruby/pull/92
-Fri Jun 7 21:05:26 2013 Tanaka Akira <akr@fsij.org>
+Mon Feb 13 18:30:32 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (integer_format_loop_setup): Extracted from rb_int_export
- and rb_int_import.
+ * io.c (io_setstrbuf): defer resizing buffer string until data is
+ read actually.
-Fri Jun 7 19:48:38 2013 Tanaka Akira <akr@fsij.org>
+Mon Feb 13 10:24:39 2012 Loren Segal <lsegal@soen.ca>
- * bignum.c (validate_integer_format): Extracted from rb_int_export and
- rb_int_import.
+ * io.c (Init_IO): use directive hack to make ARGF documentable
+ in other tools. [ruby-core:42515][Bug #6007]
-Fri Jun 7 19:23:15 2013 Tanaka Akira <akr@fsij.org>
+Sun Feb 12 20:43:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (rb_absint_size): Use numberof.
- (rb_int_export): Ditto.
+ * include/ruby/ruby.h (rb_event_hook_func_t): add argument names.
-Fri Jun 7 18:58:56 2013 Tanaka Akira <akr@fsij.org>
+Sun Feb 12 16:30:23 2012 Akinori MUSHA <knu@iDaemons.org>
- * internal.h (numberof): Gathered from various files.
+ * tool/merger.rb (#default_merge_branch): Add support for
+ Subversion 1.7 which adopted a whole new working directory
+ structure.
- * 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.
+Sun Feb 12 15:14:41 2012 Kazuki Tsujimoto <kazuki@callcc.net>
-Fri Jun 7 18:24:39 2013 Tanaka Akira <akr@fsij.org>
+ * benchmark/driver.rb: suppress unused/shadowing variable warnings.
- * bignum.c (rb_absint_size): Declare a variable, i, just before used
- to suppress a warning.
- (rb_int_export): Ditto.
+Sun Feb 12 03:14:40 2012 Eric Hodel <drbrain@segment7.net>
-Fri Jun 7 17:41:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * vm_eval.c (check_funcall): Call respond_to? with matching arity for
+ legacy single-argument implementations. [ruby-trunk - Bug #6000]
- * 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
+Sat Feb 11 12:04:05 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Jun 7 17:31:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * compile.c (defined_expr): guard the whole expression.
+ [ruby-dev:45021][Bug#5786]
- * internal.h (RCLASS_SUPER): use descriptive variable name
- * internal.h (RCLASS_SET_SUPER): ditto
+Sat Feb 11 08:34:42 2012 Eric Hodel <drbrain@segment7.net>
-Fri Jun 7 13:25:27 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * ext/zlib/zlib.c (rb_inflate_add_dictionary): Added
+ Zlib::Inflate#add_dictionary to allow users to pre-specify
+ for using during #inflate. [ruby-trunk - Feature #5937]
- * ext/json/fbuffer/fbuffer.h (fbuffer_append_str): change the place of
- RB_GC_GUARD. it should be after the object is used.
+Sat Feb 11 08:23:02 2012 Eric Hodel <drbrain@segment7.net>
-Fri Jun 7 13:22:43 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * ext/zlib/zlib.c (do_inflate): Inflate more data if buffered data
+ exists. Allows Zlib::Inflate#set_dictionary to work.
+ [ruby-trunk - Bug #5929]
- * gc.c (before_gc_sweep): noinline can also avoid the segv instead of
- -O0 of r41084. this way is expected less slow.
+Sat Feb 11 06:00:48 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Fri Jun 7 11:45:42 2013 Kenta Murata <mrkn@cookpad.com>
+ * dir.c (fnmatch): The * needs to be escaped to avoid formatting in
+ fnmatch comment.
+ patched by @dalton. https://github.com/ruby/ruby/pull/91
- * 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]
+Fri Feb 10 03:41:31 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * numeric.c (num_quo): ditto.
+ * ext/psych/parser.c: removed external encoding setter, allow parser
+ to be reused.
+ * ext/psych/lib/psych/parser.rb: added external encoding setter.
+ * test/psych/test_parser.rb: test parser reuse
- * test/test_mathn.rb: add a test for the change at r41109.
+Fri Feb 10 01:30:41 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Jun 7 11:41:42 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/dl/dl.h (ALIGN_OF): use offsetof().
- * configure.in: revert r41106. size_t may not be unsigned
+ * ext/dl/dl.h (DLALIGN): round up at once and get rid of overflow.
- * bignum.c (rb_absint_size_in_word, rb_int_export, rb_int_import): use
- NUM2SIZET() and SIZET2NUM() already defined in ruby/ruby.h.
+Fri Feb 10 00:47:07 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Jun 7 11:28:37 2013 Masaya Tarui <tarui@ruby-lang.org>
+ * test/ruby/envutil.rb (assert_no_memory_leak): new assertion to
+ check memory leak by invoking child ruby process and watch its
+ memory size.
- * 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.
+Thu Feb 9 23:41:44 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-Fri Jun 7 11:25:56 2013 Masaya Tarui <tarui@ruby-lang.org>
+ * test/pathname/test_pathname.rb (test_binread): add assertion to
+ check encoding.
- * gc.c: introduce oldgen bitmap for preparing performance tuning.
+Thu Feb 9 16:48:19 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Jun 7 11:20:57 2013 Masaya Tarui <tarui@ruby-lang.org>
+ * ext/dl/dl.c (Init_dl): fix mangled document.
- * gc.c (MARKED_IN_BITMAP, MARK_IN_BITMAP, CLEAR_IN_BITMAP): bring
- bitmap macros in one place, and introduce BITMAP_BIT.
+Thu Feb 9 16:10:34 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Fri Jun 7 11:18:35 2013 Masaya Tarui <tarui@ruby-lang.org>
+ * test/ruby/memory_status.rb (Memory::Win32): 64bit support.
- * array.c (ary_new): change order of allocation in order
- to remove FL_OLDGEN operation.
+Thu Feb 9 16:08:55 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Fri Jun 7 11:16:28 2013 Masaya Tarui <tarui@ruby-lang.org>
+ * ext/dl/lib/value.rb (DL::ValueUtil.{unsigned_value,signed_value}):
+ currently pack/unpack does not accept "q!" and "Q!".
- * tool/rdocbench.rb: add gc total time information.
+Thu Feb 9 16:01:29 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Fri Jun 7 10:12:01 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/fiddle/conversions.c (value_to_generic): src is not guaranteed as
+ a Bignum if the type is LONG_LONG. it may be a Fixnum if the value
+ is small.
- * gc.c: remove "Sunny" terminology.
- "Sunny" doesn't mean antonym of "Shady" (questionable, doubtful, etc).
- Instead of "Sunny", use "non-shady" or "normal".
+Thu Feb 9 11:32:36 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Fri Jun 7 09:29:33 2013 Kenta Murata <mrkn@cookpad.com>
+ * ext/dl/lib/types.rb: Win64 support.
- * bignum.c (rb_int_import): explicitly casting BDIGIT_DBL to BDIGIT
- to prevent warning.
+Thu Feb 9 04:12:29 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Fri Jun 7 07:29:33 2013 Tanaka Akira <akr@fsij.org>
+ * test/pathname/test_pathname.rb: not read but binread.
+ patched by Benoit Daloze, [ruby-core:42440] [Bug #5984]
- * internal.h (rb_int_export): countp argument is split into
- wordcount_allocated and wordcount.
+Wed Feb 8 22:29:59 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (rb_int_export): Follow the above change.
+ * string.c (rb_str_modify_expand): fix memory leak.
- * pack.c (pack_pack): Ditto.
+Wed Feb 8 14:06:59 2012 Hiroshi Nakamura <nahi@ruby-lang.org>
-Fri Jun 7 07:17:00 2013 Kenta Murata <mrkn@mrkn.jp>
+ * ext/openssl/ossl_ssl.c: Add SSL constants and allow to unset SSL
+ option to prevent BEAST attack. See [Bug #5353].
- * NEWS: describe a compatibility issue of Numeric#quo
- introduced at r41109.
+ In OpenSSL, OP_DONT_INSERT_EMPTY_FRAGMENTS is used to prevent
+ TLS-CBC-IV vulnerability described at
+ http://www.openssl.org/~bodo/tls-cbc.txt
+ It's known issue of TLSv1/SSLv3 but it attracts lots of attention
+ these days as BEAST attack. (CVE-2011-3389)
-Fri Jun 7 07:15:00 2013 Kenta Murata <mrkn@mrkn.jp>
+ Until now ossl sets OP_ALL at SSLContext allocation and call
+ SSL_CTX_set_options at connection. SSL_CTX_set_options updates the
+ value by using |= so bits set by OP_ALL cannot be unset afterwards.
- * NEWS: fix style.
+ This commit changes to call SSL_CTX_set_options only 1 time for each
+ SSLContext. It sets the specified value if SSLContext#options= are
+ called and sets OP_ALL if not.
-Fri Jun 7 06:48:17 2013 Benoit Daloze <eregontp@gmail.com>
+ To help users to unset bits in OP_ALL, this commit also adds several
+ constant to SSL such as
+ OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS. These constants were
+ not exposed in Ruby because there's no way to unset bits in OP_ALL
+ before.
- * numeric.c: remove unused ID id_to_r introduced in r41109.
+ Following is an example to enable 0/n split for BEAST prevention.
-Fri Jun 7 06:15:31 2013 Tanaka Akira <akr@fsij.org>
+ ctx.options = OP_ALL & ~OP_DONT_INSERT_EMPTY_FRAGMENTS
- * bignum.c (rb_int_import): New function.
- (int_import_push_bits): Ditto.
+ * test/openssl/test_ssl.rb: Test above option exists.
- * internal.h (rb_int_import): Declared.
+Wed Feb 8 13:12:02 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * pack.c (pack_unpack): Use rb_int_import for BER compressed integer.
+ * ext/openssl/ossl_x509name.c: Use the numerical representation of
+ unrecognized OIDs instead of the sn "UNDEF".
-Thu Jun 6 22:24:00 2013 Kenta Murata <mrkn@mrkn.jp>
+ * test/openssl/test_x509name.rb: Add tests for the fixed behavior.
- * numeric.c (num_quo): Use to_r method to convert the receiver to
- rational. [ruby-core:41575] [Bug #5736]
+ Patch provided by Paul Kehrer, thank you!
+ [ruby-core:41769] [Feature #5787]
- * test/ruby/test_numeric.rb: add a test for the above change.
+Wed Feb 8 09:49:58 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Thu Jun 6 20:40:17 2013 Tanaka Akira <akr@fsij.org>
+ * tool/merger.rb: don't abort, update first.
- * 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.
+Wed Feb 8 09:47:33 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * internal.h (rb_absint_size): Declared.
- (rb_absint_size_in_word): Ditto.
- (rb_int_export): Ditto.
+ * ext/openssl/ossl_asn1.c: Call INT2NUM only once for GeneralString.
+ Thanks to Mantas Mikulenas for noticing and providing a patch!
+ [ruby-core:42358] [Bug #5972]
- * 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.
+Wed Feb 8 09:19:00 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * pack.c (pack_pack): Use rb_int_export for BER compressed integer.
+ * ext/openssl/ossl_cipher.c: Add warning about key as IV.
-Thu Jun 6 19:31:33 2013 Tadayoshi Funaba <tadf@dotrb.org>
+Tue Feb 7 20:08:12 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * ext/date/date_core.c: fixed coding error [ruby-core:55337].
- reported by Riley Lynch.
+ * error.c (exc_inspect): Fix typo. patch from Trent Ogren
+ via https://github.com/ruby/ruby/pull/90
-Thu Jun 6 14:16:37 2013 Narihiro Nakamura <authornari@gmail.com>
+Tue Feb 7 19:37:35 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/objspace/object_tracing.c: rename allocation_info to
- lookup_allocation_info. At times I confused "struct
- allocation_info" with "function allocation_info".
+ * st.c: refactor packed entries using structs.
-Thu Jun 6 13:57:06 2013 Narihiro Nakamura <authornari@gmail.com>
+Tue Feb 7 14:52:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/objspace/object_tracing.c: allocation_info function isn't
- called by any other file.
+ * st.c (st_update): table can be unpacked in the callback.
-Thu Jun 6 09:41:00 2013 Kenta Murata <mrkn@cookpad.com>
+ * st.c (st_foreach): should not yield same pair when checking
+ after unpacking.
- * numeric.c (num_quo): should return a Float for a Float argument.
- [ruby-dev:44710] [Bug #5515]
+Mon Feb 6 21:55:13 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * test/ruby/test_fixnum.rb: Add an assertion for the above change.
+ * tool/merger.rb: abort if the working directory is dirty.
- * test/ruby/test_bignum.rb: ditto.
+ * tool/merger.rb: update the working directory after commit.
-Thu Jun 6 00:59:44 2013 Masaya Tarui <tarui@ruby-lang.org>
+Mon Feb 6 00:16:27 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * 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.
+ * encoding.c (rb_enc_compatible): return ASCII-8BIT even if 2nd string
+ is ascii only string. [ruby-core:42354] [Bug #5968]
- change sunny old check point in order to save mark stack and
- remove unnatural rest_sweep & demote.
+Fri Feb 3 07:16:47 2012 Eric Hodel <drbrain@segment7.net>
-Thu Jun 6 00:52:42 2013 Masaya Tarui <tarui@ruby-lang.org>
+ * lib/webrick.rb: Moved proxy rewriting to WEBrick::HTTPProxy.
+ * lib/webrick/httpproxy.rb: Add examples of creating a proxy server
+ and response rewriting using HTTPProxy.
- * gc.c (rgengc_rememberset_mark): change scan algorithm for performance:
- from object's pointer base to bitmap one.
+Fri Feb 3 06:53:22 2012 Eric Hodel <drbrain@segment7.net>
-Thu Jun 6 00:30:04 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * ext/openssl/ossl_x509store.c: Add class documentation for
+ OpenSSL::X509::Store
- * 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
+Thu Feb 2 22:28:13 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-Thu Jun 6 00:05:08 2013 Akinori MUSHA <knu@iDaemons.org>
+ * test/net/http/test_https_proxy.rb
+ (HTTPSProxyTest#test_https_proxy_authentication):
+ add workaround to avoid to hang up without openssl.
+ see [ruby-dev:45021][Bug #5786]
- * 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]
+ * test/resolv/test_dns.rb (TestResolvDNS#test_query_ipv4_address):
+ ditto.
-Wed Jun 5 22:40:42 2013 Shugo Maeda <shugo@ruby-lang.org>
+Thu Feb 2 21:48:18 2012 Kouhei Sutou <kou@cozmixng.org>
- * lib/net/imap.rb (capability_response): should ignore trailing
- spaces. Thanks, Peter Kovacs. [ruby-core:55024] [Bug #8415]
+ * lib/rexml/parsers/baseparser.rb: use meaningful names.
- * test/net/imap/test_imap_response_parser.rb: related test.
+Thu Feb 2 21:38:52 2012 Kouhei Sutou <kou@cozmixng.org>
-Wed Jun 5 21:17:08 2013 Tanaka Akira <akr@fsij.org>
+ * lib/rexml/parsers/baseparser.rb, test/rexml/test_namespace.rb:
+ fix the default xml namespace URI validation.
+ [ruby-dev:45169] [Bug #5956]
+ Reported by Miho Hiramatsu. Thanks!!!
- * bignum.c (big_fdiv): Use nlz() instead of bdigbitsize().
- (bdigbitsize): Removed.
+Thu Feb 2 17:51:02 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Wed Jun 5 20:32:00 2013 Kenta Murata <mrkn@cookpad.com>
+ * io.c (argf_next_argv): reset ARGF.next_p on ARGV.replace.
+ r34409 breaks replacing ARGV.
+ [ruby-dev:45160] [Bug #5952]
- * include/ruby/ruby.h: fix alignment in comment.
+Thu Feb 2 16:21:01 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Wed Jun 5 20:05:29 2013 Tanaka Akira <akr@fsij.org>
+ * test/net/http/test_http.rb (TestNetHTTPKeepAlive#*): remove debug
+ output.
- * 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.
+Thu Feb 2 01:24:34 2012 Yusuke Endoh <mame@tsg.ne.jp>
-Wed Jun 5 15:26:10 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * parse.y (debug_lines, coverage): set file path encoding for coverage
+ result. [ruby-dev:44950]
- * 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
+Wed Feb 1 14:38:31 2012 Akinori MUSHA <knu@iDaemons.org>
-Wed Jun 5 09:46:46 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * lib/tempfile.rb (Tempfile#unlink, Tempfile::Remover#call): Just
+ call File.unlink and ignore ENOENT because existence check
+ before unlinking does not help in terms of race condition.
- * test/fileutils/test_fileutils.rb (TestFileUtils#test_mkdir): add
- EACCES for Windows.
+ * lib/tempfile.rb (Tempfile#unlink, Tempfile::Remover#call): My
+ comment about thread safeness is obsolete.
-Wed Jun 5 08:13:37 2013 Tanaka Akira <akr@fsij.org>
+Wed Feb 1 09:50:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (rb_big_pow): Don't need to multiply SIZEOF_BDIGITS.
- Use nlz instead of bitlength_bdigit.
- (bitlength_bdigit): Removed.
+ * doc/re.rdoc (Repetition): fix typo. reported by Ori Avtalion
+ and patched by Zachary Scott. [Bug #5947]
-Wed Jun 5 07:14:18 2013 Tadayoshi Funaba <tadf@dotrb.org>
+Wed Feb 1 06:38:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/date/date_core.c (d_lite_cmp, d_lite_equal): simplified.
+ * io.c (argf_close): skip stdin, which should be readable again.
+ [ruby-dev:45160] [Bug #5952]
-Wed Jun 5 07:07:01 2013 Tadayoshi Funaba <tadf@dotrb.org>
+ * io.c (argf_readlines): reinitialize after all read to be
+ readable again.
- * ext/date/date_core.c: fixed a bug [ruby-core:55295]. reported
- by Riley Lynch.
+Tue Jan 31 21:27:43 2012 Narihiro Nakamura <authornari@gmail.com>
-Wed Jun 5 06:44:08 2013 Eric Hodel <drbrain@segment7.net>
+ * configure.in (HEAP_ALIGN_LOG): HEAP_ALIGN_LOG should be page
+ size in OpenBSD. [ruby-core:42158][Bug #5901]
- * lib/rubygems: Update to RubyGems 2.0.3
+ * gc.c : avoid to redefine.
- * test/rubygems: Tests for the above.
+Tue Jan 31 14:27:22 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * NEWS: Added RubyGems 2.0.3 note.
+ * test/ruby/envutil.rb (EnvUtil.invoke_ruby): yield also child pid
+ in block form.
-Wed Jun 5 06:35:15 2013 Eric Hodel <drbrain@segment7.net>
+Mon Jan 30 19:08:19 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * doc/marshal.rdoc: Add description of Marshal format.
+ * vm_eval.c (vm_call0): should pass block to enumerators. patched
+ by Kazuki Tsujimoto. [ruby-dev:44961][Bug #5731]
-Wed Jun 5 01:16:09 2013 Benoit Daloze <eregontp@gmail.com>
+ * vm_eval.c (method_missing), vm_insnhelper.c (vm_call_method):
+ ditto. patched by satoshi shiba.
- * array.c (Array#+): fix documentation example.
- Patch by Logan Serman. [Fixes GH-324]
+Mon Jan 30 12:31:05 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Wed Jun 5 00:21:54 2013 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
+ * file.c (append_fspath): need to set the encoding to result always.
- * lib/irb/lc/ja/help-message: update help messages.
- following r41028. [ruby-dev:46707] [Feature #7510]
+Mon Jan 30 10:38:37 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Wed Jun 5 00:09:32 2013 Tanaka Akira <akr@fsij.org>
+ * test/irb/test_completion.rb: skip if cannot load irb/completion
+ (maybe readline does not exist).
- * marshal.c (r_object0): Generalize a round up expression.
- Use BDIGIT instead of int.
+Sun Jan 29 22:47:19 2012 Yutaka Kanemoto <kanemoto@ruby-lang.org>
-Tue Jun 4 23:44:02 2013 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
+ * tool/config.{guess,sub}: updated to automake-1.11.2.
- * object.c (rb_Hash): fix docs. patched by Stefan Sch"ussler.
- [ruby-core:55299] [Bug #8487]
+Sun Jan 29 12:17:56 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jun 4 23:16:49 2013 Benoit Daloze <eregontp@gmail.com>
+ * ext/readline/readline.c (readline_attempted_completion_function):
+ respect encodings. [Bug #5941]
- * lib/irb/completion.rb: Use %w literal construction for long lists.
- Patch by Dave Goodchild. [Fixes GH-299]
+Sat Jan 28 09:33:33 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-Tue Jun 4 23:08:42 2013 Benoit Daloze <eregontp@gmail.com>
+ * win32/win32.c (rb_w32_read): fix an issue that $stdin.read doesn't
+ terminate by CTRL-C on Windows.
+ [ruby-dev:45149] [Bug #5812]
- * ext/objspace/objspace.c: improve wording and remove duplicated comment.
- Based on a patch by Dave Goodchild. [Fixes GH-299]
+Sat Jan 28 08:18:11 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-Tue Jun 4 18:41:47 2013 Tanaka Akira <akr@fsij.org>
+ * test/ruby/test_thread.rb
+ (TestThreadGroup#test_thread_timer_and_interrupt): skip exit status
+ assertion because we cannot get signal status on Windows.
- * bignum.c (bitlength_bdigit): Fix an off-by-one error.
+ * win32/win32.c (CreateChild): create process group to receive the
+ signal by GenerateConsoleCtrlEvent().
-Tue Jun 4 15:30:00 2013 Kenta Murata <mrkn@cookpad.com>
+ * win32/win32.c (kill): use CTRL_BREAK_EVENT instead of CTRL_C_EVENT
+ if a process group is specified. CTRL_C_EVENT signal cannot be
+ generated for process groups for the specification.
+ [ruby-dev:45149] [Bug #5812]
- * 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
+Sat Jan 28 07:46:03 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
- * test/bigdecimal/test_bigdecimal_util.rb: fix for the above change.
+ * thread_win32.c (rb_w32_wait_events_blocking): use
+ ruby_thread_from_native() instead of GET_THREAD() because
+ GET_THREAD() doesn't always return the current thread and
+ WaitForMultipleObjects() at rb_w32_read() doesn't return by
+ Thread#kill. This fixes TestQueue#test_thr_kill failure on
+ Windows.
-Tue Jun 4 00:44:27 2013 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+ * thread_win32.c (rb_w32_wait_events): use ruby_thread_from_native()
+ instead of GET_THREAD() for consistency with the above change.
- * test/fileutils/test_fileutils.rb (TestFileUtils#test_mkdir): add
- EEXIST for Linux. (suggested by nurse)
+ * thread_win32.c (rb_w32_sleep): ditto.
-Mon Jun 3 23:58:19 2013 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+ * thread_win32.c (rb_w32_Sleep): ditto.
+ [ruby-dev:45149] [Bug #5812]
- * lib/fileutils.rb (FileUtils.rmdir): use remove_tailing_slash.
- * test/fileutils/test_fileutils.rb: test for above.
+Sat Jan 28 07:28:48 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-Mon Jun 3 23:47:55 2013 Tanaka Akira <akr@fsij.org>
+ * test/zlib/test_zlib.rb (TestZlibGzipReader#test_reader_wrap): set
+ binmode explicitly for fixing test error on Windows. This is consistent
+ with r34243.
+ [ruby-dev:45149] [Bug #5812]
- * bignum.c (bitlength_bdigit): New function.
- (rb_big_pow): Use bitlength_bdigit instead of ffs.
+Sat Jan 28 05:53:34 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Jun 3 23:11:19 2013 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
+ * lib/irb/completion.rb (IRB::InputCompletor::CompletionProc):
+ ignore non-string name modules. [ruby-core:42244][Bug #5938]
- * 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]
+Fri Jan 27 16:31:45 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Jun 3 19:02:20 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * gc.c (HEAP_ALIGN, HEAP_ALIGN_MASK): DRY, let compiler calculate
+ from HEAP_ALIGN_LOG.
- * dir.c (is_hfs): use the file descriptor instead of a path.
+Thu Jan 26 11:03:37 2012 Eric Hodel <drbrain@segment7.net>
-Mon Jun 3 07:15:17 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * lib/matrix.rb: Clean up extra whitespace in output documentation.
- * 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.
+Thu Jan 26 03:24:02 2012 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.
+ * ext/io/console/console.c (io_getch): default delegating method
+ for StringIO. https://github.com/nobu/io-console/issues/4
-Mon Jun 3 03:40:29 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * ext/stringio/stringio.c: moved some methods to hidden modules.
- * vm_insnhelper.c (vm_yield_setup_block_args): partially revert r41019.
- The code is not useless.
+Wed Jan 25 13:27:42 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Jun 3 01:25:25 2013 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
+ * file.c (rb_file_s_basename): ignore non-ascii extension in
+ different encoding, which cannot match.
- * test/socket/test_sockopt.rb: change test name. follow r41037.
+ * file.c (rmext): no extension to strip if empty string.
-Mon Jun 3 01:08:43 2013 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
+ * file.c (rb_enc_path_next, rb_enc_path_skip_prefix)
+ (rb_enc_path_last_separator, rb_enc_path_end)
+ (ruby_enc_find_basename, ruby_enc_find_extname): encoding-aware
+ path handling functions.
- * test/rinda/test_rinda.rb: rename functions introduced in r41009.
+ * file.c (rb_home_dir, file_expand_path, rb_realpath_internal)
+ (rb_file_s_basename, rb_file_dirname, rb_file_s_extname)
+ (rb_file_join): should respect the encodings of arguments than
+ file system encoding. [ruby-dev:45145] [Bug #5919]
-Sun Jun 2 23:33:42 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+ * dir.c (check_dirname, ruby_glob0): ditto.
- * 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.
+ * ext/pathname/pathname.c (path_sub_ext): ditto.
-Sun Jun 2 22:44:42 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Tue Jan 24 14:20:42 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * 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)
+ * vm.c (rb_iter_break_value): new function to break a block with
+ the value. [ruby-dev:45132] [Feature #5895]
-Sun Jun 2 16:15:29 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Jan 24 12:58:41 2012 Yukihiro Matsumoto <matz@ruby-lang.org>
- * dln_find.c (dln_find_exe, dln_find_file): remove deprecated
- non-reentrant functions.
+ * object.c (rb_Hash): add Kernel#Hash conversion method like
+ Array() or Float(). a patch from Run Paint Run Run. Fix #3131
-Sun Jun 2 15:04:35 2013 Zachary Scott <zachary@zacharyscott.net>
+Tue Jan 24 11:38:05 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * lib/cgi/util.rb, lib/erb.rb: Use String#b [Feature #8394] by znz
+ * lib/uri/common.rb (URI.encode_www_form_component): initialize on
+ requiring to support JRuby, which runs parallel multithreads.
+ [ruby-core:42222] [Bug #5925]
-Sun Jun 2 14:10:21 2013 Zachary Scott <zachary@zacharyscott.net>
+ * lib/uri/common.rb (URI.decode_www_form_component): initialize on
- * lib/irb/lc/help-message: Apply english updates for irb --help #7510
+Mon Jan 23 20:33:11 2012 Jason Kay <geniture@me.com>
-Sun Jun 2 12:03:58 2013 Zachary Scott <zachary@zacharyscott.net>
+ * lib/net/http.rb (Net::HTTP#connect): Writing entire packet at
+ once to avoid incomplete transmission. Current code using
+ writeline was causing sub-optimal conversing with a proxy due to
+ the connect tunnel request headers being split over multiple
+ packets. The modification I made allows the connect request to
+ be written as one packet, avoiding problems and optimizing the
+ conversation.
- * range.c: Fix rdoc on Range#bsearch [Bug #8242] [ruby-core:54143]
+ https://github.com/ruby/ruby/pull/72
+ [Feature #5460]
-Sun Jun 2 02:08:37 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Mon Jan 23 17:06:17 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * enc/euc_jp.c: fix typo: the name of EUC-JIS-2004.
+ * lib/uri/mailto.rb (URI::MailTo.build): follow Array#to_s change of
+ Ruby 1.9; use Array#join. [Bug #5840]
-Sat Jun 1 23:17:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+Mon Jan 23 16:42:28 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * vm_eval.c (rb_mod_module_eval): mention in docs that arguments passed
- to the method are passed to the block
+ * io.c (extract_binmode): raise an exception if binmode/textmode
+ is specified with both vmode and opthash.
+ [ruby-core:42199] [Bug #5918]
-Sat Jun 1 17:58:13 2013 Akinori MUSHA <knu@iDaemons.org>
+Mon Jan 23 16:35:27 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * lib/set.rb (Set#freeze, taint, untaint): Save a "self" by
- utilizing super returning self, and add tests while at it.
+ * io.c (rb_io_extract_modeenc): set ASCII-8BIT if binmode is specified
+ with opthash. [ruby-core:42197] [Bug #5917]
-Sat Jun 1 17:24:47 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Jan 23 10:08:00 2012 Kenta Murata <mrkn@cookpad.com>
- * compile.c (iseq_set_arguments): not a simple single argument if any
- keyword arguments exist. [ruby-core:55203] [Bug #8463]
+ * test/cgi/test_cgi_util.rb (test_cgi_escape_preserve_encoding):
+ add a test for CGI::escape to preserve encoding.
- * 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]
+ * test/cgi/test_cgi_util.rb (test_cgi_unescape_preserve_encoding):
+ add a test for CGI::unescape to preserve encoding.
-Sat Jun 1 11:16:22 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Jan 23 00:45:34 2012 Akinori MUSHA <knu@iDaemons.org>
- * error.c (rb_exc_new_cstr): rename from rb_exc_new2.
+ * misc/rdoc-mode.el (rdoc-imenu-create-index): Add imenu support
+ to rdoc-mode.
- * error.c (rb_exc_new_str): rename from rb_exc_new3.
+ * misc/rdoc-mode.el (rdoc-mode): Fix regexp patterns containing
+ "\s " where CR/LF is not supposed to match.
-Sat Jun 1 10:13:17 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sun Jan 22 15:41:26 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * string.c (rb_str_new[2-5], rb_{tainted,usascii}_str_new2),
- (rb_str_buf_new2): remove old interfaces.
+ * parse.y (rb_intern3): split to registration check and new
+ registration.
-Sat Jun 1 08:00:46 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * parse.y (rb_intern_str): make interned string shared with the
+ given string.
- * ext/zlib/zlib.c (gzfile_read, gzfile_read_all, gzfile_getc),
- (gzreader_gets): check EOF. [ruby-core:55220] [Bug #8467]
+ * parse.y (rb_intern3, rb_intern_str): check the coderange first.
-Sat Jun 1 07:32:15 2013 Tanaka Akira <akr@fsij.org>
+Sat Jan 21 22:21:07 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c: Use BDIGIT type for hbase.
+ * include/ruby/ruby.h (FIXNUM_P): simple flag should be int.
-Sat Jun 1 02:37:35 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Sat Jan 21 21:51:19 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * ext/socket/option.c (sockopt_s_byte): constructor of the sockopt
- whose value's is byte.
+ * encoding.c (rb_enc_compatible): fix segv on symbols.
+ [ruby-core:42204] [Bug #5921]
- * ext/socket/option.c (sockopt_byte): getter for above.
+Sat Jan 21 11:43:45 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/socket/option.c (inspect_byte): inspect for above.
+ * dir.c (dir_chdir, check_dirname): get rid of optimization-out.
- * ext/socket/option.c (sockopt_s_ip_multicast_loop): constructor of
- the sockopt whose optname is IP_MULTICAST_LOOP.
+Fri Jan 20 20:47:37 2012 Kenta Murata <mrkn@cookpad.com>
- * ext/socket/option.c (sockopt_ip_multicast_loop): getter for above.
+ * lib/cgi/util.rb (CGI.escape): support a string with invalid byte
+ sequence. [Bug #5913]
- * ext/socket/option.c (sockopt_s_ip_multicast_ttl): constructor of
- the sockopt whose optname is IP_MULTICAST_TTL.
+ * test/cgi/test_cgi_util.rb
+ (test_cgi_escape_with_invalid_byte_sequence): test for the above
+ change.
- * ext/socket/option.c (sockopt_ip_multicast_ttl): getter for above.
+Fri Jan 20 17:37:37 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * ext/socket/option.c (sockopt_inspect): use above.
+ * vm.c (vm_exec): remove workaround for LLVM because r34278 fixes it.
-Sat Jun 01 01:50:00 2013 Kenta Murata <mrkn@mrkn.jp>
+ * vm_insnhelper.c (vm_call_cfunc): ditto.
- * ext/bigdecimal/bigdecimal.c (BigDecimal_power): use rb_dbl2big
- to convert a double value to a Bignum.
+Fri Jan 20 14:31:43 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Sat Jun 1 00:19:50 2013 Tanaka Akira <akr@fsij.org>
+ * lib/net/http.rb (Net::HTTP#transport_request): retry a idempotent
+ request automatically. [ruby-dev:45030] [Bug #5790]
+ [ruby-core:41821] [Bug #5813]
- * bignum.c (calc_hbase): Make hbase the maximum power of base
- representable in BDIGIT.
+ * lib/net/http.rb (Net::HTTP#keep_alive_timeout=): added to specify
+ the second to reconnect the TCP connection on Keep-Alive.
+ The default value is 2 second because current servers uses 2 sec.
+ http://ftp-admin.blogspot.com/2009/09/keepalivetimeout2.html
-Fri May 31 23:56:13 2013 Tanaka Akira <akr@fsij.org>
+ * lib/net/http.rb (Net::HTTP#begin_transport): reconnect TCP
+ connection on keep-alive timeout.
- * bignum.c (calc_hbase): Extracted from rb_big2str0.
+Thu Jan 19 07:53:09 2012 Tadayoshi Funaba <tadf@dotrb.org>
-Fri May 31 23:22:24 2013 Tanaka Akira <akr@fsij.org>
+ * ext/date/date_strptime.c: moved detector of leftover.
- * 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.
+Thu Jan 19 07:10:47 2012 Tadayoshi Funaba <tadf@dotrb.org>
-Fri May 31 17:57:21 2013 Zachary Scott <zachary@zacharyscott.net>
+ * ext/date/date_parse.c: [ruby-core:42173].
- * process.c: Improve Process::exec documentation
+Wed Jan 18 18:11:02 2012 Akinori MUSHA <knu@iDaemons.org>
-Fri May 31 17:26:42 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * misc/rdoc-mode.el (rdoc-mode): Add provide so that requiring
+ this library succeeds.
- * vm_eval.c (rb_funcallv): add better names of rb_funcall2.
+Wed Jan 18 18:06:45 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * vm_eval.c (rb_funcallv_public): ditto for rb_funcall3.
+ * ext/curses/curses.c (cWindow, cMouseEvent): made typed data.
-Fri May 31 17:04:45 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Jan 18 12:49:15 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * array.c (rb_ary_new_capa): add better names of rb_ary_new2.
+ * ext/psych/lib/psych/visitors/to_ruby.rb: Added support for loading
+ subclasses of String with ivars
+ * ext/psych/lib/psych/visitors/yaml_tree.rb: Added support for dumping
+ subclasses of String with ivars
+ * test/psych/test_string.rb: corresponding tests
- * array.c (rb_ary_new_from_args): ditto for rb_ary_new3.
+Wed Jan 18 10:39:47 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * array.c (rb_ary_new_from_values): ditto for rb_ary_new4.
+ * ext/psych/lib/psych/visitors/to_ruby.rb: Added ability to load array
+ subclasses with ivars.
+ * ext/psych/lib/psych/visitors/yaml_tree.rb: Added ability to dump
+ array subclasses with ivars.
+ * test/psych/test_array.rb: corresponding tests
-Fri May 31 16:35:44 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Jan 17 17:18:41 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * configure.in (HAVE_ATTRIBUTE_FUNCTION_ALIAS): define to tell if
- alias attribute is available.
+ * configure.in (SPT_TYPE): enable as SPT_REUSEARGV on Darwin.
-Fri May 31 16:03:23 2013 Zachary Scott <zachary@zacharyscott.net>
+ * missing/setproctitle.c (ruby_init_setproctitle): changed prefix.
- * object.c, proc.c: s/call_seq/call-seq in rdoc. [Fixes GH-322]
+Tue Jan 17 12:32:46 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri May 31 15:56:36 2013 Zachary Scott <zachary@zacharyscott.net>
+ * gc.c (aligned_malloc, aligned_free): covered missing defined
+ operators and fixes for cygwin.
- * ext/openssl/ossl_ssl.c: Add missing paren in rdoc [Fixes GH-321]
+Tue Jan 17 10:54:46 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri May 31 11:58:24 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * st.c (do_hash): it's the time to remove cast to unsigned int.
- * vm_method.c (set_visibility): extract from rb_mod_public(),
- rb_mod_protected() and rb_mod_private().
+Tue Jan 17 07:30:12 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Thu May 30 19:47:42 2013 Yusuke Endoh <mame@tsg.ne.jp>
+ * st.c (unpack_entries): Fix r34310: on unpacking, the position of
+ a hash must be do_hash-ed value.
- * 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]
+ * st.c (add_packed_direct): ditto.
- * test/ruby/test_keyword.rb: update a test for above.
+Mon Jan 16 16:41:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu May 30 17:55:04 2013 Zachary Scott <zachary@zacharyscott.net>
+ * lib/optparse.rb (Regexp): fix incorrect options when casting to
+ a Regexp, and suppress encoding option warnings.
+ https://github.com/ruby/ruby/pull/82
- * process.c: RDoc on Process.spawn
+Mon Jan 16 11:22:38 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu May 30 00:08:14 2013 Koichi Sasada <ko1@atdot.net>
+ * win32/win32.c (rb_chsize): no need to get the current file size.
- * 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).
+Mon Jan 16 00:41:33 2012 Sokolov Yura <funny.falcon@gmail.com>
-Wed May 29 10:33:27 2013 Koichi Sasada <ko1@atdot.net>
+ * st.c: st use function instead of macro. In my current
+ environment (Ubuntu 11.04 32bit gcc-4.5.2) it gives 4%
+ performance improvement.
- * 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().
+ https://github.com/ruby/ruby/pull/77
-Tue May 28 12:31:21 2013 Koichi Sasada <ko1@atdot.net>
+Sun Jan 15 14:09:48 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * 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'.
+ * object.c (rb_inspect): raise the result is not compatible with
+ the default external encoding. [ruby-core:42095] [Bug #5848]
+ If the default external encoding is ASCII compatible, the encoding of
+ inspected result must be compatible with it.
+ If the default external encoding is ASCII incompatible,
+ the result must be ASCII only.
- * 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>
+Sun Jan 15 13:21:50 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * test/objspace/test_objspace.rb: add a test.
+ * ext/json/parser/parser.rl (json_string_unescape): workaround fix
+ for over optimization of GCC 4.7. [ruby-core:42085] [Bug #5888]
+ http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51862
-Tue May 28 11:30:02 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Jan 14 22:24:09 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/extmk.rb (extmake): leave makefiles untouched if the content is
- not changed, to get rid of unnecessary re-linking.
+ * ext/dl/callback/mkcallback.rb (gencallback): suppress unused
+ variables.
-Tue May 28 03:11:02 2013 Koichi Sasada <ko1@atdot.net>
+Sat Jan 14 21:56:43 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * 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)
+ * iseq.c (iseq_data_to_ary): check line info table boundary. line
+ number 0 means no line number info is needed. [ruby-dev:45130]
+ [Bug #5894]
- Note that hooks are not kicked immediately. Procs are kicked
- at postponed_job.
+Sat Jan 14 18:24:13 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- This feature is a sample of new internal event and
- rb_postponed_job API.
+ * error.c (exc_equal): clear rb_thread_t::errinfo when ignore
+ an exception under rb_protect(). [ruby-core:41979] [Bug #5865]
-Tue May 28 02:56:15 2013 Koichi Sasada <ko1@atdot.net>
+Sat Jan 14 12:02:55 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c (gc_stat): remove wrong rest_sweep().
+ * sprintf.c (rb_enc_vsprintf): relaxed the restriction. since the
+ implementation deeply depends on plain char, so wchar_t based
+ encodings are not supported.
-Tue May 28 02:44:23 2013 Koichi Sasada <ko1@atdot.net>
+Sat Jan 14 12:00:20 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c (garbage_collect_body): fix GC_ENABLE_LAZY_SWEEP condition.
+ * error.c (exc_equal): ignore exceptions during implicit
+ conversion. [ruby-core:41979] [Bug #5865]
- * gc.c (GC_NOTIFY): move debug print location and use stderr instead
- of stdout.
+Sat Jan 14 05:58:54 2012 Eric Hodel <drbrain@segment7.net>
-Tue May 28 02:07:21 2013 Koichi Sasada <ko1@atdot.net>
+ * io.c (rb_io_s_read): Fix formatting of open_args comment. Reported
+ by Adam Prescott.
- * vm_trace.c (rb_postponed_job_register_one): fix iteration bug.
+Fri Jan 13 18:41:19 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/-test-/postponed_job/postponed_job.c,
- test/-ext-/postponed_job/test_postponed_job.rb: add a test.
+ * sprintf.c (rb_enc_vsprintf): can be used for ASCII compatible
+ encodings only.
-Tue May 28 00:34:23 2013 Koichi Sasada <ko1@atdot.net>
+Fri Jan 13 18:29:06 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * 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) ...]
+ * thread.c (rb_mutex_unlock_th): simplified.
- * ext/-test-/tracepoint/tracepoint.c,
- test/-ext-/tracepoint/test_tracepoint.rb: modify a test.
+ * thread.c (rb_barrier_waiting): fix potential overflows.
-Tue May 28 00:18:57 2013 Koichi Sasada <ko1@atdot.net>
+Fri Jan 13 17:23:38 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * vm_trace.c (rb_postponed_job_flush): remove a wrong comment.
+ * load.c (load_unlock): update loading table at once.
-Mon May 27 22:09:33 2013 Tanaka Akira <akr@fsij.org>
+Fri Jan 13 16:44:45 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * include/ruby/ruby.h (RHASH_SIZE): Add a cast to suppress a
- warning, comparison between signed and unsigned integer
- expressions [-Wsign-compare], on ILP32.
+ * error.c (exc_equal): try implicit conversion for delegator.
+ [ruby-core:41979] [Bug #5865]
-Mon May 27 19:25:47 2013 Koichi Sasada <ko1@atdot.net>
+Fri Jan 13 03:46:53 2012 Akinori MUSHA <knu@iDaemons.org>
- * include/ruby/ruby.h: rename RUBY_INTERNAL_EVENT_FREE to
- RUBY_INTERNAL_EVENT_FREEOBJ.
+ * lib/shellwords.rb (Shellwords#shellescape): shellescape() now
+ stringifies the given object using to_s.
- * ext/-test-/tracepoint/tracepoint.c,
- ext/objspace/object_tracing.c,
- gc.c, vm_trace.c: catch up this change.
+ * lib/shellwords.rb (Shellwords#shelljoin): shelljoin() accepts
+ non-string objects in the given array, each of which is
+ stringified using to_s.
-Mon May 27 18:57:28 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/shellwords.rb: Fix rdoc markups.
- * 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.
+Fri Jan 13 03:38:36 2012 Akinori MUSHA <knu@iDaemons.org>
- * test/objspace/test_objspace.rb: add a test.
+ * lib/shellwords.rb (Shellwords#shellsplit): Fix a bug where
+ consecutive backslashes in double quotes are all removed except
+ the one at the tail.
- * ext/objspace/object_tracing.c: ditto.
+Fri Jan 13 03:28:00 2012 Luis Lavena <luislavena@gmail.com>
- * gc.c (rb_gc_count): add. This function returns GC count.
+ * ext/socket/extconf.rb (if ipv6): only define _WIN32_WINNT if was not
+ previously defined. This solve warnings with multiple defines in
+ command line with GCC 4.6.1
- * internal.h: add decl. of rb_gc_count(). Same as `GC.count'.
+Thu Jan 12 18:44:31 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon May 27 17:33:28 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/mkmf.rb: fix r33904 and revert r33905. initialize global
+ variables with init_mkmf before initializing constants.
+ [ruby-dev:45124] [Bug #5879]
- * tool/rbinstall.rb (install_recursive): add maxdepth option.
+Thu Jan 12 13:51:00 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * tool/rbinstall.rb (bin-comm): limit depth of bindir and reject empty
- files. [ruby-core:55101] [Bug #8432]
+ * cont.c (cont_restore_0): prevent optimizing out `sp'. sp is used for
+ reserving a memory space with ALLOCA_N for restoring machine stack
+ stored in cont->machine_stack, but clang optimized out it (and
+ maybe #5851 is also caused by this).
+ This affected TestContinuation#test_check_localvars.
-Mon May 27 16:16:18 2013 Koichi Sasada <ko1@atdot.net>
+ * cont.c (cont_restore_1): revert workaround introduced in r32201.
- * vm_trace.c (rb_postponed_job_flush, rb_postponed_job_register): use
- ruby_xmalloc/xfree. It is safe during GC.
+Thu Jan 12 02:14:43 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-Mon May 27 09:24:03 2013 Koichi Sasada <ko1@atdot.net>
+ * object.c: Added examples for Object#is_a? and
+ Object#instance_of? patched from Manoj Kumar.
+ [Bug #5880] [ruby-core:42057]
- * test/-ext-/postponed_job/test_postponed_job.rb: fix typo and class name.
+Thu Jan 12 00:57:48 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-Mon May 27 09:05:17 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/mkmf.rb: verbose-mode can use by RM, RMDIRS, etc.
+ (e.g. make V=1 realclean)
- * 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'.
+Wed Jan 11 23:40:21 2012 Naohisa Goto <ngoto@gen-info.osaka-u.ac.jp>
- 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.
+ * string.c (rb_str_concat): set array element after definition
+ to fix compile error with Fujitsu C Compiler 5.6 on Solaris 10
+ on Sparc. [Bug #5878] [ruby-dev:45123]
- This change is mostly written by Aman Gupta (tmm1).
- https://bugs.ruby-lang.org/issues/8107#note-12
- [Feature #8107]
+Wed Jan 11 22:52:51 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * 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.
+ * gc.c (ruby_mimmalloc): don't set allocated size to header.
+ ruby_mimmalloc() doesn't increment allocated_size/allocations and
+ decrement them in ruby_xfree() cause inconsistency.
- * ext/-test-/tracepoint/extconf.rb,
- ext/-test-/tracepoint/tracepoint.c,
- test/-ext-/tracepoint/test_tracepoint.rb: add a test.
+ * gc.c (ruby_xfree): don't decrement allocated_size/allocations if
+ allocated size record is 0.
-Mon May 27 08:38:21 2013 Koichi Sasada <ko1@atdot.net>
+Wed Jan 11 22:36:43 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * ext/-test-/postponed_job/postponed_job.c: fix `init' function name.
+ * test/readline/test_readline.rb (test_completion_proc_empty_result):
+ ensure clearance of Readline's line_buffer after the test.
-Mon May 27 06:22:41 2013 Koichi Sasada <ko1@atdot.net>
+Tue Jan 10 21:57:38 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
- * 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.
+ * ext/dbm/dbm.c (Init_dbm): fix a build error on mswin32.
+ use `extern __declspec(dllimport)` for dll link with VC.
+ [ruby-core:41996] [Bug #5869]
- 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).
+Tue Jan 10 15:31:55 2012 NARUSE, Yui <naruse@ruby-lang.org>
- This change is mostly written by Aman Gupta (tmm1).
- https://bugs.ruby-lang.org/issues/8107#note-15
- [Feature #8107]
+ * vm.c (vm_exec): refix r34162; suppress warning and add description.
- * gc.c: use postponed job API for finalizer.
+Tue Jan 10 15:13:58 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * common.mk: add dependency from vm_trace.c to debug.h.
+ * ext/readline/readline.c (readline_attempted_completion_function):
+ use rb_memerror().
- * ext/-test-/postponed_job/extconf.rb, postponed_job.c,
- test/-ext-/postponed_job/test_postponed_job.rb: add a test.
+Tue Jan 10 12:49:42 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * thread.c: implement postponed API.
+ * gc.c: in fact, i686-linux doesn't need to define _XOPEN_SOURCE 600.
- * vm_core.h: ditto.
+Tue Jan 10 12:44:11 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Mon May 27 02:26:02 2013 Koichi Sasada <ko1@atdot.net>
+ * gc.c (ruby_mimmalloc): defined for objects need not rb_objspace,
+ but should return pointer suitable for ruby_xfree;
+ main vm and main thread.
+ patched by Sokolov Yura. https://github.com/ruby/ruby/pull/79
- * gc.c (gc_stat): collect promote_operation_count and
- types (RGENGC_PROFILE >= 2).
+ * internal.h: ditto.
-Mon May 27 01:40:58 2013 Koichi Sasada <ko1@atdot.net>
+ * vm.c (Init_BareVM): use ruby_mimmalloc.
- * 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.
+ * ext/dl/cfunc.c: #include <ruby/util.h>.
-Mon May 27 01:15:22 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/syslog/syslog.c: use xfree because it is allocated by
+ ruby_strdup.
- * hash.c (rb_hash_tbl_raw), internal.h: added.
- Returns st_table without shading hash.
+Tue Jan 10 12:13:56 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
- * array.c: use rb_hash_tbl_raw() for read-only purpose.
+ * ext/readline/readline.c (readline_attempted_completion_function):
+ fix compile error.
- * compile.c (iseq_compile_each): ditto.
+Tue Jan 10 10:41:11 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c (count_objects): ditto.
+ * ext/readline/readline.c (readline_attempted_completion_function):
+ empty completion result does not mean memory error.
- * insns.def: ditto.
+Tue Jan 10 02:19:22 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * process.c: ditto.
+ * test/ruby/test_io.rb (test_autoclose_true_closed_by_finalizer,
+ test_autoclose_true_closed_by_finalizer): skip if IO objects are
+ not recycled yet. [ruby-dev:45098] [Bug #5850]
- * thread.c (clear_coverage): ditto.
+Tue Jan 10 00:41:28 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * vm_insnhelper.c: ditto.
+ * lib/tempfile.rb (Tempfile#_close): clear @tempfile and @data[1] even
+ when exception is raised at @tempfile.close. [ruby-dev:45113]
-Mon May 27 00:31:09 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * lib/tempfile.rb (Tempfile#unlink): fix a typo.
- * tool/make-snapshot: use ENV["AUTOCONF"] instead of directly using
- literal "autoconf".
+Tue Jan 10 00:32:17 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-Sun May 26 21:31:46 2013 Koichi Sasada <ko1@atdot.net>
+ * gc.c (run_finalizer): clear rb_thread_t::errinfo when ignore
+ an exception under rb_protect(). [ruby-dev:45113]
- * 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().
+Mon Jan 9 23:37:43 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * include/ruby/intern.h: declare rb_hash_set_ifnone(hash, ifnone).
+ * ext/readline/readline.c (readline_attempted_completion_function):
+ fix typos.
- * marshal.c (r_object0): use RHASH_SET_IFNONE().
+Mon Jan 9 20:55:34 2012 Narihiro Nakamura <authornari@gmail.com>
- * ext/openssl/ossl_x509name.c (Init_ossl_x509name): ditto.
+ * gc.c : don't embed struct heaps_slot to a heap block because it
+ can causes copy-on-write of memory page on heap block when its
+ free_next is rewritten.
-Sat May 25 23:22:38 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+Mon Jan 9 20:26:33 2012 Tanaka Akira <akr@fsij.org>
- * 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.
+ * ext/pathname/pathname.c (path_entries): add document suggested by
+ the thread [ruby-core:41959] [Bug #5859].
-Sat May 25 21:29:34 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Mon Jan 9 20:14:13 2012 Tanaka Akira <akr@fsij.org>
- * 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
+ * ext/socket/lib/socket.rb (family_addrinfo): don't require protocol
+ equality. For example, protocol 0 and IPPROTO_TCP is not problem
+ for TCP.
-Sat May 25 18:46:23 2013 Yusuke Endoh <mame@tsg.ne.jp>
+Mon Jan 9 20:08:52 2012 Tanaka Akira <akr@fsij.org>
- * 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.
+ * ext/socket/lib/socket.rb (family_addrinfo): return the given
+ addrinfo object.
+ Patch by Ippei Obayashi. [ruby-dev:45095] [Bug #5845]
-Sat May 25 18:08:06 2013 Yusuke Endoh <mame@tsg.ne.jp>
+Mon Jan 9 19:40:20 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * 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.
+ * test/zlib/test_zlib.rb (TestZlibGzipWriter#test_writer_wrap): set
+ binmode explicitly.
-Sat May 25 17:06:25 2013 Koichi Sasada <ko1@atdot.net>
+Mon Jan 9 14:42:41 2012 Narihiro Nakamura <authornari@gmail.com>
- * gc.c (after_gc_sweep): reduce full GC timing.
+ * gc.c: free_slots is changed Singly linked list. clear
+ free_slots before sweep.
-Sat May 25 11:28:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Jan 9 07:46:17 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * variable.c (set_const_visibility): return without clearing method
- cache if no arguments.
+ * gc.c: i686-linux needs to define _XOPEN_SOURCE 600 for posix_memalign.
- * vm_method.c (set_method_visibility): ditto.
+Mon Jan 9 04:24:59 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Sat May 25 11:27:32 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * gc.c (rb_objspace_free): global_List is allocated with xmalloc.
+ patched by Sokolov Yura. https://github.com/ruby/ruby/pull/78
- * vm_method.c (set_method_visibility): quote unprintable method name.
+ * dln_find.c: remove useless replacement of free.
-Sat May 25 11:24:24 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/readline/readline.c (readline_attempted_completion_function):
+ strings for readline must allocated with malloc.
- * eval.c (rb_frame_callee): returns the called name of the current
- frame, not the previous frame.
+ * process.c (run_exec_dup2): use free; see also r20950.
- * 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.
+ * re.c (onig_new_with_source): use malloc for oniguruma.
- * variable.c (set_const_visibility): use the called name.
+ * vm.c (ruby_vm_destruct): use free for VMs.
-Sat May 25 08:58:23 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm.c (thread_free): use free for threads.
- * string.c (rb_str_quote_unprintable): check if argument is a string.
+Mon Jan 9 04:24:59 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Fri May 24 19:32:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * dln_find.c: remove useless replacement of free.
- * variable.c (set_const_visibility): use rb_frame_this_func() instead
- of rb_frame_callee() for getting the name of the called method
+ * ext/readline/readline.c (filename_completion_proc_call):
+ matches should use xfree.
- * test/ruby/test_module.rb: add test for private_constant with no args
+ * ext/readline/readline.c (username_completion_proc_call): ditto.
-Fri May 24 18:53:10 2013 Koichi Sasada <ko1@atdot.net>
+Mon Jan 9 01:12:35 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * 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!)
+ * numeric.c (rb_enc_uint_char): raise RangeError when added codepoint
+ is invalid. [Feature #5855] [Bug #5863] [Bug #5864]
-Fri May 24 17:07:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+ * string.c (rb_str_concat): ditto.
- * intern.h: remove dangling rb_class_init_copy declaration
- [ruby-core:55120] [Bug #8434]
+ * string.c (rb_str_concat): set encoding as ASCII-8BIT when the string
+ is US-ASCII and the argument is an integer greater than 127.
-Fri May 24 16:31:23 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * regenc.c (onigenc_mb2_code_to_mbclen): rearrange error code.
- * ext/strscan/strscan.c (strscan_aref): raise error if given
- name reference is not found.
+ * enc/euc_jp.c (code_to_mbclen): ditto.
-Fri May 24 15:48:18 2013 Koichi Sasada <ko1@atdot.net>
+ * enc/shift_jis.c (code_to_mbclen): ditto.
- * 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.
+Sun Jan 8 20:31:45 2012 Narihiro Nakamura <narihiro@netlab.jp>
- * gc.c (after_gc_sweep): remove TODO comments.
+ * gc.c : consider header bytes which are used by malloc.
-Fri May 24 11:04:00 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sun Jan 8 11:54:43 2012 Narihiro Nakamura <authornari@gmail.com>
- * 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]
+ * gc.c (aligned_free): support MinGW. Patch by Hiroshi Shirosaki.
-Fri May 24 02:57:17 2013 Koichi Sasada <ko1@atdot.net>
+Sun Jan 8 11:43:05 2012 Narihiro Nakamura <authornari@gmail.com>
- * object.c (rb_obj_clone): should not propagate OLDGEN status.
- This propagation had caused WB miss for class.
+ * gc.c (slot_sweep): add a assertion instead of a debug print.
-Thu May 23 17:35:30 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sun Jan 8 01:18:19 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * load.c (loaded_feature_path): fix invalid read by index underflow.
- the beginning of name is also a boundary as well as just after '/'.
+ * test/-ext-/old_thread_select/test_old_thread_select.rb:
+ avoid platform bug. [Bug #5858] [ruby-dev:45108]
-Thu May 23 17:21:22 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sun Jan 8 00:46:34 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * gc.c (gc_profile_dump_on): revert r40898. ok to show the record
- accumulating while lazy_sweep().
+ * gc.c: get rid of implicit narrowing conversion.
-Wed May 22 16:50:18 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sun Jan 8 00:10:10 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * 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.
+ * configure.in: check posix_memalign(3) and memalign(3).
-Wed May 22 15:18:59 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * gc.c (aligned_malloc): use configure's result instead of
+ _POSIX_C_SOURCE and _XOPEN_SOURCE because they can't be used
+ to check availability at least on FreeBSD.
- * 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]
+Sat Jan 7 22:25:50 2012 Narihiro Nakamura <authornari@gmail.com>
- * win32/win32.c (setup_overlapped, finish_overlapped): extract from
- rb_w32_read() and rb_w32_write().
+ * gc.c: use Bitmap Marking algorithm to avoid copy-on-write of
+ memory pages. See [ruby-dev:45085] [Feature #5839]
+ [ruby-core:41916].
-Wed May 22 14:19:56 2013 Koichi Sasada <ko1@atdot.net>
+ * include/ruby/ruby.h : FL_MARK rename to FL_RESERVED1.
- * gc.c (gc_prepare_free_objects, rest_sweep, lazy_sweep): fix position
- of `during_gc' setting.
+ * node.h : ditto.
-Wed May 22 07:36:08 2013 Koichi Sasada <ko1@atdot.net>
+ * debug.c : ditto.
- * 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.
+ * object.c (rb_obj_clone): FL_MARK move to a bitmap.
- * gc.c (gc_prepare_free_objects): use `garbage_collect_body()'.
+ * class.c (rb_singleton_class_clone): ditto.
- * gc.c (slot_sweep, before_gc_sweep, after_gc_sweep): add logging code.
+Sat Jan 7 00:47:07 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-Tue May 21 22:47:06 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * configure.in: always define CANONICALIZATION_FOR_MATHN.
+ [ruby-dev:45100] [Bug #5852]
- * ext/strscan/strscan.c (strscan_aref): support named captures.
- patched by Konstantin Haase [ruby-core:54664] [Feature #8343]
+Fri Jan 6 23:11:20 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-Tue May 21 21:48:44 2013 Kouhei Sutou <kou@cozmixng.org>
+ * include/ruby/version.h: RUBY_API_VERSION 2.0.0
- * test/ruby/test_dir_m17n.rb (TestDir_M17N#test_entries_compose):
- Use #each instead of #map just for iteration.
+Fri Jan 6 12:24:11 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Tue May 21 19:57:22 2013 Akinori MUSHA <knu@iDaemons.org>
+ * object.c (rb_inspect): raises Encoding::CompatibilityError if the
+ result is incompatible with the default external encoding.
+ [ruby-core:41931] [Bug #5848]
- * ext/digest/lib/digest.rb (Digest::Class.file): Take optional
- arguments that are passed to the constructor of the digest
- class.
+Thu Jan 5 15:26:15 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Tue May 21 17:21:12 2013 Koichi Sasada <ko1@atdot.net>
+ * win32/win32.c (check_valid_dir): strict checking of root.
+ GetDriveType() succeeds with non root directory as the argument,
+ even if MSDN says that the API needs the root directory.
+ this patch fixes a failure of test/ruby/test_file_exhaustive.rb.
- * gc.c: remove gc_profile_record::is_marked. always true.
+Thu Jan 5 12:15:55 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Tue May 21 17:13:40 2013 Koichi Sasada <ko1@atdot.net>
+ * file.c (rb_file_join): separator is appended by array length - 1
+ times. patched by Benoit Daloze [ruby-core:41901] [Bug #5841]
- * gc.c: fix to collect additional information for GC::Profiler.
- * major/minor GC
- * trigger reason of GC
+Thu Jan 5 11:47:54 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * gc.c (gc_profile_dump_on): change reporting format with
- added information.
+ * lib/uri/common.rb (URI::Parser#initialize_regexp):
+ use \A \z instead of ^ $. [Bug #5843]
- * gc.c (gc_profile_record_get): return added information by
- :GC_FLAGS => array.
+Wed Jan 4 17:55:53 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-Tue May 21 16:45:31 2013 Koichi Sasada <ko1@atdot.net>
+ * array.c (rb_ary_sample): add example for Array#sample
+ based on patch from https://github.com/ruby/ruby/pull/74
- * 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 Jan 4 14:24:33 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue May 21 16:29:09 2013 Koichi Sasada <ko1@atdot.net>
+ * string.c (str_nth_len): count ascii-only run at the end. this
+ bug appears only when single-byte-optimization is disabled due
+ to unknown coderange. [ruby-core:41896] [Bug #5836]
- * 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 Jan 4 11:32:07 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * tool/rdocbench.rb: added for `rdoc-bench'.
+ * win32/win32.c (check_valid_dir): special case for a root directory.
+ Reported by Masateru OKAMOTO at [Bug #5819].
-Tue May 21 16:25:05 2013 Koichi Sasada <ko1@atdot.net>
+Wed Jan 4 00:19:54 2012 Kouhei Sutou <kou@cozmixng.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).
+ * lib/rexml/parsers/baseparser.rb: use private instead of _xxx
+ method name. This is Ruby code not Python code.
+ refs #5696
-Tue May 21 03:11:18 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Jan 3 23:57:37 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * dir.c (dir_each): compose HFS file names from
- UTF8-MAC. [ruby-core:48745] [Bug #7267]
+ * lib/rexml/parsers/baseparser.rb: rexml BaseParser uses
+ instance_eval unnecessarily on listener add.
+ patch from Charles Nutter. [Bug #5696] [ruby-core:41437]
-Tue May 21 03:08:52 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Jan 3 20:44:13 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * test/ruby/envutil.rb (assert_separately): require envutil in the
- child process too.
+ * README: add comment for Git user. patch from Arun Agrawal.
+ * README.ja: ditto.
-Tue May 21 03:07:26 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Jan 3 15:58:22 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * string.c (rb_str_conv_enc_opts): should infect.
+ * thread.c: changed documentation for "thread-local" variables.
+ patch from Julien Ammous.
-Mon May 20 22:24:45 2013 Akinori MUSHA <knu@iDaemons.org>
+Tue Jan 3 15:50:12 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * 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.
+ * process.c: Fix typo. patch from Aviv Ben-Yosef.
-Mon May 20 22:00:31 2013 Zachary Scott <zachary@zacharyscott.net>
+Tue Jan 3 13:43:37 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * lib/e2mmap.rb: Format of E2MM documentation
+ * tool/merger.rb: allow r0123 style revision number.
-Mon May 20 21:41:15 2013 Zachary Scott <zachary@zacharyscott.net>
+Tue Jan 3 11:17:55 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * ext/extmk.rb: nodoc this file
+ * tool/merger.rb (#version_up): version.h date should be Japanese
+ locale date.
-Mon May 20 20:43:32 2013 Zachary Scott <zachary@zacharyscott.net>
+Mon Jan 2 22:08:00 2012 Akinori MUSHA <knu@iDaemons.org>
- * lib/cmath.rb: Remove duplicate RDoc heading from overview
+ * tool/file2lastrev.rb (VCS::detect): Add support for Subversion
+ 1.7 which adopted a whole new working directory structure.
-Mon May 20 20:36:19 2013 Zachary Scott <zachary@zacharyscott.net>
+ * tool/file2lastrev.rb (VCS::detect): Simply use .each instead of
+ .sort.reverse_each which looks too arbitrary. If you want SVN
+ to be tried first, then you just have to register it first as it
+ is right now.
- * lib/securerandom.rb: Update position of overview for RDoc
+Mon Jan 2 20:53:36 2012 Tanaka Akira <akr@fsij.org>
-Mon May 20 19:33:55 2013 Benoit Daloze <eregontp@gmail.com>
+ * lib/securerandom.rb (random_bytes): use IO#read instead of
+ IO#readpartial to make the intent more clear.
- * math.c: improve and fix documentation of sin, tan and log
+Mon Jan 2 15:26:39 2012 Kazuki Tsujimoto <kazuki@callcc.net>
-Mon May 20 19:31:49 2013 Benoit Daloze <eregontp@gmail.com>
+ * test/ruby/test_object.rb (test_send_with_block): add a normal case.
- * lib/logger.rb (Logger::Application): show namespace in documentation
+Mon Jan 2 15:18:54 2012 Kazuki Tsujimoto <kazuki@callcc.net>
-Mon May 20 11:50:12 2013 Zachary Scott <zachary@zacharyscott.net>
+ * test/ruby/test_object.rb (test_send_with_block): moved from
+ bootstraptest/test_flow.rb.
- * lib/pp.rb: Revert part of r40834 and nodoc PP::ObjectMixin
- [ruby-core:55068]
+Mon Jan 2 15:10:11 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-Mon May 20 10:40:21 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/test/unit/parallel.rb: use pack("m0") instead of
+ pack("m").gsub("\n","").
+ * lib/test/unit.rb (Test::Unit::Runner::Worker#run): ditto.
- * lib/webrick/htmlutils.rb (WEBrick::HTMLUtils#escape): replace HTML
- meta chars even in non-ascii string. [Bug #8425] [ruby-core:55052]
+Mon Jan 2 15:05:09 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
- * lib/webrick/httputils.rb (WEBrick::HTTPUtils#{_escape,_unescape}):
- fix %-escape encodings. [Bug #8425] [ruby-core:55052]
+ * lib/test/unit.rb (Test::Unit::Runner::Worker#run): use
+ File.basename with suffix instead of gsub.
- * lib/webrick/httpservlet/filehandler.rb (set_dir_list): revert r20152
- partially and fix misuse of bytesize and regexp repetition operator.
+Mon Jan 2 14:55:28 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-Mon May 20 08:03:51 2013 Zachary Scott <zachary@zacharyscott.net>
+ * lib/test/unit.rb (Test::Unit::Runner#_run_parallel): find may
+ return nil and nil can not dup.
- * lib/profiler.rb: Document Profiler__ methods
+Sun Jan 1 12:23:10 2012 Akinori MUSHA <knu@iDaemons.org>
-Mon May 20 08:02:13 2013 Zachary Scott <zachary@zacharyscott.net>
+ * lib/shellwords.rb (Shellwords#shellescape): Drop the //n flag
+ that only causes warnings with no real effect. [Bug #5637]
- * lib/tempfile.rb: nodoc Tempfile#inspect
+Sat Dec 31 06:28:37 2011 NARUSE, Yui <naruse@ruby-lang.org>
-Mon May 20 07:48:24 2013 Zachary Scott <zachary@zacharyscott.net>
+ * thread.c (rb_barrier_waiting): save the number of waiting threads
+ in RBASIC()->flags. [ruby-dev:45002] [Bug #5768]
- * ext/stringio/stringio.c: Correct position of method rdoc
+ * thread.c (rb_barrier_wait): increment and decrement around
+ rb_mutex_lock, and use rb_barrier_waiting().
-Mon May 20 07:27:41 2013 Zachary Scott <zachary@zacharyscott.net>
+ * thread.c (rb_barrier_release): use rb_barrier_waiting().
- * math.c: RDoc formatting of Math core docs with domains and codomains
- Patch by @eLobato [Fixes GH-309]
+ * thread.c (rb_barrier_destroy): ditto.
-Mon May 20 05:58:12 2013 Zachary Scott <zachary@zacharyscott.net>
+Mon Dec 26 17:20:10 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * ext/bigdecimal/bigdecimal.c: Formatting for BigMath [Fixes GH-306]
- Based on a patch by @eLobato.
- * ext/bigdecimal/lib/bigdecimal/math.rb: ditto
+ * vm.c (vm_exec): add guard to prevent optimization for LLVM clang.
-Mon May 20 04:56:59 2013 Zachary Scott <zachary@zacharyscott.net>
+Fri Dec 30 17:01:12 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * lib/forwardable.rb: Forwardable examples in overview were broken
- Based on patch by @joem [Fixes GH-303] [Bug #8392]
+ * vm_eval.c (rb_f_send): fix obj.send() documentation issue.
+ [Bug #5125] [ruby-core:38633]
-Mon May 20 03:35:26 2013 Zachary Scott <zachary@zacharyscott.net>
+Thu Dec 29 22:36:16 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * lib/optparse.rb: nodoc OptionParser::Version and SPLAT_PROC
+ * lib/test/unit.rb (Test::Unit::Runner::Worker#_run_parallels): fix
+ premature exit when all workers' status are :ready or :prepare.
+ [ruby-dev:45061] [Bug #5822]
-Mon May 20 03:16:52 2013 Zachary Scott <zachary@zacharyscott.net>
+Thu Dec 29 01:51:13 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * lib/pp.rb: Document PP::ObjectMixin [Fixes GH-312]
+ * include/ruby/ruby.h: fix #error pragma. LLP64 platform is supported.
-Sun May 19 23:52:22 2013 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
+ * include/ruby/st.h: ditto.
- * test/webrick/test_htmlutils.rb: add test for WEBrick::HTMLUtils.
+Wed Dec 28 11:22:45 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun May 19 23:12:07 2013 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
+ * lib/fileutils.rb (FileUtils::Entry_#entries): use utility method
+ instead of typoed regexp. [ruby-core:41829] [Bug #5817]
- * encoding.c: document fix, change default script encoding.
- patched by @windwiny [Fixes GH-310]
+Wed Dec 28 02:08:04 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-Sun May 19 17:29:07 2013 Akinori MUSHA <knu@iDaemons.org>
+ * vm_insnhelper.c (unknown_keyword_error): add GC guard to prevent
+ intermediate object from GC.
- * lib/set.rb (Set#delete_if, Set#keep_if): Add comments.
+Tue Dec 27 22:34:54 2011 Shota Fukumori <sorah@tubusu.net>
-Sun May 19 11:37:36 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+ * lib/test/unit.rb (Worker#close): "closing IO if IO is closed"
+ should be "closing IO if IO isn't closed"
- * ext/fiddle/extconf.rb: ignore rc version of libffi to fix build failure.
+Tue Dec 27 22:04:27 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun May 19 10:38:50 2013 Akinori MUSHA <knu@iDaemons.org>
+ * st.c (st_update): new function to lookup the given key and
+ update the value. [ruby-dev:44998]
- * misc/ruby-electric.el (ruby-electric-delete-backward-char): Use
- delete-char instead of delete-backward-char, which is an
- interactive function.
+Tue Dec 27 21:17:33 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun May 19 03:59:29 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * node.h (rb_args_info): change pre_args_num and post_args_num as
+ int, to match with rb_iseq_t.
- * string.c (str_scrub0): added for refactoring.
+ * parse.y (new_args_gen): check overflow.
-Sun May 19 03:48:26 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Mon Dec 26 22:38:35 2011 Yusuke Endoh <mame@tsg.ne.jp>
- * lib/uri/common.rb (URI.decode_www_form): scrub string if decoded
- bytes are invalid for the encoding.
+ * vm_insnhelper.c (unknown_keyword_error): make it kind a error
+ message when unknown keyword is given. It require more work.
+ See [ruby-core:40518] and [ruby-core:40541] in detail.
-Sun May 19 02:46:32 2013 Akinori MUSHA <knu@iDaemons.org>
+Mon Dec 26 22:31:07 2011 Yusuke Endoh <mame@tsg.ne.jp>
- * 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.
+ * vm_core.h (struct rb_iseq_struct), compile.c (iseq_set_arguments),
+ iseq.c (rb_iseq_parameters), vm_insnhelper.c
+ (vm_callee_setup_arg_complex): support Method#parameters for keyword
+ arguments. The provisional spec is what Benoit Daloze proposed.
+ [ruby-core:40541]
-Sun May 19 02:33:09 2013 Akinori MUSHA <knu@iDaemons.org>
+ * test/ruby/test_keyword.rb: add a test for above.
- * 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.
+Mon Dec 26 22:15:27 2011 Yusuke Endoh <mame@tsg.ne.jp>
- * misc/ruby-electric.el (ruby-electric-delete-backward-char):
- Introduce electric DEL that deletes what the previous electric
- command has input.
+ * vm_core.h (struct rb_iseq_struct), compile.c (iseq_set_arguments,
+ iseq_compile_each), vm_insnhelper.c (vm_callee_setup_arg_complex):
+ implement keyword arguments. See [ruby-core:40290]
+ The feature is promised to be included in 2.0, but the detail spec
+ is still under discussion; this commit is a springboard for further
+ discussion. Please try it and give us feedback.
+ This commit includes fixes for some problems reported by Benoit
+ Daloze <eregontp AT gmail.com> [ruby-core:40518] and Marc-Andre
+ Lafortune <ruby-core-mailing-list AT marc-andre.ca>
+ [ruby-core:41772].
- * misc/ruby-electric.el (ruby-electric-matching-char): Make
- electric quotes work again at the end of buffer.
+ * iseq.c (iseq_free, prepare_iseq_build): bookkeeping.
-Sun May 19 01:39:50 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/ruby/test_keyword.rb: add tests for keyword arguments.
- * configure.in (setjmp-type): check if setjmpex() is really available.
- workaround for i686-w64-mingw32 which declares it but lacks its
- definition.
+ * test/ripper/dummyparser.rb (class DummyParser): temporal fix for
+ ripper test.
- * include/ruby/defines.h: include setjmpex.h only if also setjmpex()
- is available.
+Mon Dec 26 22:00:17 2011 Yusuke Endoh <mame@tsg.ne.jp>
-Sat May 18 23:57:46 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * node.h, node.c, parse.y: implement a parser part for keyword
+ arguments.
+ This is a preparation for keyword argument (see [ruby-core:40290]).
- * configure.in (setjmp-type): use setjmpex() on w64-mingw32 to get rid
- of -Wclobbered warnings.
+ * gc.c (gc_mark_children): bookkeeping.
- * include/ruby/defines.h: include setjmpex.h here becase setjmp.h is
- included from win32.h via intrin.h, winnt.h, and so on.
+Mon Dec 26 21:03:18 2011 Yusuke Endoh <mame@tsg.ne.jp>
-Sat May 18 20:28:12 2013 Tanaka Akira <akr@fsij.org>
+ * node.h, parse.y (new_args_gen), compile.c (iseq_set_arguments): use
+ struct rb_args_info instead of NODEs.
+ This is a preparation for keyword argument (see [ruby-core:40290]).
- * ext/socket/mkconstants.rb (INTEGER2NUM): Make less comparisons.
+ * node.c (dump_node), gc.c (gc_mark_children, obj_free): bookkeeping.
-Sat May 18 20:15:28 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Mon Dec 26 20:59:51 2011 Yusuke Endoh <mame@tsg.ne.jp>
- * string.c (str_scrub_bang): add String#scrub!. [Feature #8414]
+ * node.h, parse.y (lambda, f_larglist): remove NEW_LAMBDA hack.
+ This is a preparation for keyword argument (see [ruby-core:40290]).
-Sat May 18 16:59:52 2013 Tanaka Akira <akr@fsij.org>
+Mon Dec 26 22:01:19 2011 Hiroshi Shirosaki <h.shirosaki@gmail.com>
- * ext/socket/mkconstants.rb (INTEGER2NUM): Renamed from INTEGER2VALUE.
+ * io.c (rb_sys_fail_path): move the definition.
+ Move above for using it in set_binary_mode_with_seek_cur().
-Sat May 18 16:57:58 2013 Tanaka Akira <akr@fsij.org>
+ * io.c (set_binary_mode_with_seek_cur): fix improper seek cursor.
+ Seeking file cursor with setting binary mode has possibility to
+ cause infinite loop. Fixed the bug and refined error handling.
+ Introduced at r34043.
- * ext/socket/mkconstants.rb (INTEGER2VALUE): Suppress a warning:
- comparison between signed and unsigned integer expressions
+ And cleanups as below.
+ Remove unnecessary parentheses of `fptr`.
+ Use return value of setmode().
-Sat May 18 16:38:39 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/ruby/test_io_m17n.rb
+ (TestIO_M17N#test_seek_with_setting_binmode): add a test for above.
+ [ruby-core:41671] [Bug #5714]
- * compile.c (iseq_compile_each): forward anonymous and first keyword
- rest argument one. [ruby-core:55033] [Bug #8416].
+Mon Dec 26 17:01:14 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat May 18 15:49:14 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * common.mk (LIBRUBY_A): depends on main.o since r33774.
+ [ruby-core:41786] [Bug #5796]
- * vm_core.h (rb_vm_tag): move jmpbuf between tag and prev so ensure to
- be accessible.
+Mon Dec 26 13:07:08 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-Sat May 18 11:05:14 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/ruby/test_io.rb (TestIO#test_autoclose): Tempfile.new doesn't
+ accept the block argument.
- * enumerator.c (inspect_enumerator): use VALUE instead of mere char*
- by using rb_sprintf() and rb_id2str().
+Mon Dec 26 13:06:52 2011 Shota Fukumori <sorah@tubusu.net>
- * enumerator.c (append_method): extract from inspect_enumerator().
+ * lib/test/unit.rb: Avoid zombie processes on "--separate" option
+ added at r34121.
-Sat May 18 09:00:32 2013 Tanaka Akira <akr@fsij.org>
+Mon Dec 26 04:01:23 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * ext/socket/mkconstants.rb (INTEGER2VALUE): Use LONG2FIX if possible.
+ * ext/openssl/ossl_cipher.c: Update and complete documentation.
-Sat May 18 00:38:47 2013 Tanaka Akira <akr@fsij.org>
+Sun Dec 25 23:16:11 2011 Shota Fukumori <sorah@tubusu.net>
- * ext/socket/mkconstants.rb: Convert integer constants bigger than int
- correctly.
+ * test/testunit/test_parallel.rb (test_separate): Test for "--separate"
+ option (r34121)
-Fri May 17 22:02:15 2013 Tanaka Akira <akr@fsij.org>
+Sun Dec 25 22:39:49 2011 Shota Fukumori <sorah@tubusu.net>
- * ext/socket/ifaddr.c: Use unsigned LONG_LONG to represent flags
- because SunOS 5.11 (OpenIndiana) defines ifa_flags as uint64_t.
+ * lib/test/unit.rb (_run_parallel):
+ New option "--separate" for test/unit; when running tests with this
+ option, a job process will be restarted after one test file has done.
+ This means all test files will run with separated process.
-Fri May 17 21:47:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * lib/test/unit/parallel.rb: Fix for above. Now parallel.rb puts
+ "ready!" for first ready, "ready" for afters.
- * cont.c: Typo in constant MAX_MACHINE_STACK_CACHE from '..MAHINE..'
- patch by @schmurfy [Fixes GH-307]
+Sun Dec 25 00:02:15 2011 Luis Lavena <luislavena@gmail.com>
-Fri May 17 19:18:24 2013 Akinori MUSHA <knu@iDaemons.org>
+ * configure.in: change --with-ntver to --with-winnt-ver to be more
+ descriptive in the context. [ruby-core:41794]
- * 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 ?\".
+Sat Dec 24 23:25:15 2011 Luis Lavena <luislavena@gmail.com>
-Fri May 17 18:06:15 2013 Tanaka Akira <akr@fsij.org>
+ * configure.in: add --with-ntver option to match win32/configure.bat
+ functionality. Set 0x0501 as default. [ruby-core:35010]
+ [ruby-core:35035]
- * 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.
+Sat Dec 24 12:38:53 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri May 17 17:34:48 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * proc.c (proc_call): get rid of optimization-out by clang.
- * gc.c (rb_gc_guarded_ptr): unoptimize on other compilers than gcc and
- msvc.
+ * proc.c (rb_proc_call, rb_proc_call_with_block): ditto.
-Fri May 17 11:06:48 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Dec 24 10:56:32 2011 Nobuyoshi Nakada <nobu@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.
+ * ext/readline/readline.c (readline_readline): check if outstream
+ is closed to get rid of a bug of readline 6. [ruby-dev:45043]
+ [Bug #5803]
-Thu May 16 17:15:32 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Sat Dec 24 06:59:49 2011 Nobuyoshi Nakada <nobu@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
+ * test/readline/test_readline.rb (test_line_buffer__point): use
+ lambda not to exit entire method by "return". or "next" for
+ proc. [ruby-dev:45042] [Bug #5802]
-Thu May 16 16:19:50 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Dec 24 01:20:39 2011 Kazuki Tsujimoto <kazuki@callcc.net>
- * win32/Makefile.sub (verconf.in): no longer used.
+ * vm_eval.c (send_internal): PASS_PASSED_BLOCK_TH must be placed
+ just before calling rb_call0.
- * win32/Makefile.sub (config.status): fix typo.
+ * bootstraptest/test_flow.rb: add a test for above.
- * configure.in, template/verconf.h.in (RUBY_EXEC_PREFIX): fix for
- default prefix.
+Sat Dec 24 00:55:16 2011 Tanaka Akira <akr@fsij.org>
-Thu May 16 13:12:27 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/tempfile.rb (Tempfile#initialize): warn if a block is given.
- * template/verconf.h.in: generate verconf.h from the template and
- rbconfig.rb.
+Fri Dec 23 16:14:30 2011 TAKAO Kouji <kouji@takao7.net>
-Thu May 16 05:47:18 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+ * ext/readline/readline.c (readline_attempted_completion_function):
+ in Readline module with GNU Readline 6 case, Readline module
+ resets completion_append_character to " ", after it executes
+ completion. So, Readline module stores
+ completion_append_character, and Readline module always sets it
+ after Readline module executes completion. [ruby-dev:43456]
+ [Feature #4635]
- * ext/psych/lib/psych/visitors/yaml_tree.rb: fix syntax error.
- Thanks @spastorino! [ruby-core:55011]
+Fri Dec 23 15:59:05 2011 TAKAO Kouji <kouji@takao7.net>
-Thu May 16 03:05:45 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/readline/readline.c (Init_readline): libedit check
+ rl_getc_function only when rl_initialize() is called, and
+ using_history() call rl_initialize(). This assignment should be
+ placed before using_history(). [ruby-core:40641] [Bug #5539]
- * gc.c (rb_node_newnode): use newobj_of() instead of rb_newobj().
+Fri Dec 23 10:14:47 2011 Tanaka Akira <akr@fsij.org>
-Thu May 16 02:03:39 2013 Tanaka Akira <akr@fsij.org>
+ * test/thread/test_queue.rb (test_thr_kill): show the number of loop
+ run when the test failed.
- * ext/socket/depend: Add a dependency for ifaddr.o.
+Fri Dec 23 09:23:48 2011 Tanaka Akira <akr@fsij.org>
-Thu May 16 01:44:45 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/test_pty.rb (test_pty_check_default): call PTY.check until
+ "cat" command is finished.
- * common.mk (verconf.h): $< cannot be used in explicit rules with
- nmake.
+Fri Dec 23 06:03:00 2011 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
- * win32/Makefile.sub (CONFIG_H): create verconf.in instead of
- verconf.h.
+ * common.mk: add "check succeeded" message.
-Thu May 16 01:25:07 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+ * README, README.ja: follow above change.
- * ext/psych/lib/psych/visitors/yaml_tree.rb: only emit warnings when
- -w is enabled.
+Fri Dec 23 06:00:39 2011 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-Wed May 15 18:58:17 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/bigdecimal/bigdecimal.h: add satisfy cc-mode comment.
+ * util.c: ditto.
- * 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.
+Fri Dec 23 00:08:25 2011 Tanaka Akira <akr@fsij.org>
- * gc.c (rb_data_object_alloc, rb_data_typed_object_alloc):
- use newobj_of().
+ * test/test_pty.rb (test_pty_check_default): "cat" may not terminated
+ in the 0.1 second.
-Wed May 15 17:55:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Dec 22 23:37:25 2011 Tanaka Akira <akr@fsij.org>
- * configure.in (RUBY_PLATFORM): move to config.h as needed by
- version.c.
+ * test/ruby/test_thread.rb (test_condvar_timed_wait): don't test the
+ maximum sleep time. Ruby is not a real-time system.
-Wed May 15 17:04:11 2013 Koichi Sasada <ko1@atdot.net>
+Thu Dec 22 22:37:45 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * gc.c: add an additional RGENGC_PROFILE mode (2).
- Profiling result can be check by GC.stat.
+ * thread_pthread.c (ping_signal_thread_list): remove return value.
+ * thread_pthread.c (check_signal_thread_list): add a new function to
+ check if signal thread list is empty.
+ * thread_pthread.c (thread_timer): check signal thread list after
+ timer_thread_function(). main thread might be added into signal thread
+ list during timer_thread_function().
- * gc.c (type_name): separate from obj_type_name().
+Thu Dec 22 00:40:24 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-Wed May 15 16:58:24 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/bigdecimal/bigdecimal.c (VpMult, VpCtoV, VpSqrt): remove assigned
+ but unused variables.
- * configure.in: save configured load path values into verconf.in.
+Wed Dec 21 18:28:22 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * common.mk (verconf.h): create from verconf.in with shvar_to_cpp.rb.
+ * common.mk (newline.c, miniprelude.c): revert r33949 because the change
+ broke mswin build, and the changer said no reason about the change.
+ [ruby-dev:45016] [Bug #5783]
- * tool/shvar_to_cpp.rb: turn shell variables into C macros.
- [Bug #7959]
+Wed Dec 21 12:35:24 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * loadpath.c: split load path staffs from version.c.
+ * ext/bigdecimal/bigdecimal.c (BigDecimal_s_allocate): follow
+ Allocation Framework. [Bug #5775]
- * dmyloadpath.c: miniruby has no builtin load paths, so verconf.h is
- not needed.
+Wed Dec 21 02:25:36 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-Wed May 15 03:56:09 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+ * ext/psych/emitter.c: fixing clang warnings. Thanks Joey!
- * ext/psych/lib/psych/visitors/yaml_tree.rb: adding backwards
- compatible YAMLTree.new method
+Wed Dec 21 01:06:00 2011 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-Wed May 15 02:22:16 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+ * ext/bigdecimal/README: Update redmine.ruby-lang.org to bugs.ruby-lang.org
+ * ext/socket/ancdata.c: ditto
+ * test/-ext-/wait_for_single_fd/test_wait_for_single_fd.rb: ditto
+ * test/syck/test_yaml.rb: ditto
+ * doc/ChangeLog-1.9.3: ditto
- * 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
+Tue Dec 20 23:50:12 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
-Wed May 15 02:06:35 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+ * PStore content update perf optimization. Patch by Masaki Matsushita.
+ See #5248.
- * test/psych/helper.rb: envutil is not available outside Ruby, so
- port the functions from envutil to the test helper.
+ * lib/pstore.rb (save_data):
- * test/psych/test_deprecated.rb: ditto
+ * Delete inadequate Marshal check.
- * test/psych/test_encoding.rb: ditto
+ * Deferred file truncation: when writing the new content, truncate
+ the saved file to the data size after writing the data, instead of
+ truncating whole bytes before writing data.
-Wed May 15 00:42:54 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * Deferred MD5 calculation: when comparing MD5 hash to check the
+ content modification, calculate MD5 hash of new data iif the
+ content length is differ from the old one.
- * 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)
+ * Compare content size with String#bytesize instead of String#size.
-Tue May 14 23:43:05 2013 Tanaka Akira <akr@fsij.org>
+Tue Dec 20 21:00:30 2011 Tadayoshi Funaba <tadf@dotrb.org>
- * ext/socket/.document: Add ifaddr.c.
+ * ext/date/date_core.c: uses to_integer instead.
+ * test/date/test_switch_hitter.rb: added a test.
-Tue May 14 23:24:31 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Dec 20 15:04:18 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
- * ext/socket/extconf.rb: check for if_nametoindex() for
- i686-w64-mingw32, and check for declarations of if_indextoname() and
- if_nametoindex().
+ * Make sure to clear $! when ignoring an exception
- * ext/socket/ifaddr.c (ifaddr_ifindex): not-implement unless
- if_nametoindex() is available.
+ * ext/openssl/ossl.c (ossl_pem_passwd_cb0, ossl_verify_cb):
+ pem_passwd_cb and verify_cb ignores the exception raised in a
+ callback proc so it should clear $! for subsequent execution.
- * ext/socket/rubysocket.h: declare if_indextoname() and
- if_nametoindex() if available but not declared.
+ That's said, both subsequent processes for pem_passwd_cb and
+ verify_cb raises another exception before leaking $! to Ruby world.
+ We cannot test this fix in Ruby land.
-Tue May 14 19:58:17 2013 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
+ * test/openssl/test_pkey_rsa.rb
+ (test_read_private_key_pem_pw_exception): Test for pem_passwd_cb +
+ exception.
- * 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.
+Tue Dec 20 11:49:13 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/date/test_date_base.rb (test_jd): tests for
+ [ruby-dev:45008].
-Tue May 14 14:51:52 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Dec 20 10:20:48 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * 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.
+ * ext/date/date_core.c (wholenum): fix the type of the return value.
-Tue May 14 12:21:28 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+Tue Dec 20 05:03:24 2011 Eric Hodel <drbrain@segment7.net>
- * win32/win32.c (NET_LUID): mingw may have NET_LUID and not defined
- _IFDEF_.
+ * README.ja: Update redmine.ruby-lang.org to bugs.ruby-lang.org
+ * README: ditto
+ * common.mk: ditto
+ * man/erb.1: ditto
+ * man/irb.1: ditto
+ * man/ri.1: ditto
+ * man/ruby.1: ditto
+ * sparc.c: ditto
+ * tool/install-sh: ditto
-Tue May 14 03:33:17 2013 Koichi Sasada <ko1@atdot.net>
+Tue Dec 20 02:15:18 2011 Tadayoshi Funaba <tadf@dotrb.org>
- * string.c (rb_str_new_frozen): remove debug print.
+ * ext/date/date_core.c: [ruby-dev:45008].
-Tue May 14 03:22:51 2013 Koichi Sasada <ko1@atdot.net>
+Sun Dec 18 18:52:37 2011 Naohisa Goto <ngotogenome@gmail.com>
- * include/ruby/ruby.h: enable to generate write barrier protected
- arrays (T_ARRAY).
+ * vm.c (vm_define_method): improve guard of iseq from GC. Fix
+ failure or segmentation fault in test_singleton_method(TestGc)
+ on sparc Solaris10 compiled with Oracle Solaris Studio 12.2.
+ [Bug #5762] [ruby-dev:45000] [Bug #4178]
-Tue May 14 03:21:42 2013 Koichi Sasada <ko1@atdot.net>
+Sun Dec 18 14:34:31 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * include/ruby/ruby.h: enable to generate write barrier protected
- strings (T_STRING).
+ * ext/bigdecimal/bigdecimal.c (Init_bigdecimal): does not follow
+ allocation framework right now. [ruby-core:41710] [Bug #5773]
-Tue May 14 03:19:59 2013 Koichi Sasada <ko1@atdot.net>
+Sun Dec 18 12:42:48 2011 Aaron Patterson <aaron@tenderlovemaking.com>
- * include/ruby/ruby.h: enable to generate write barrier protected
- objects (T_OBJECT).
+ * ext/psych/lib/psych/visitors/to_ruby.rb: BigDecimals can be restored
+ from YAML.
+ * ext/psych/lib/psych/visitors/yaml_tree.rb: BigDecimals can be dumped
+ to YAML.
+ * test/psych/test_numeric.rb: tests for BigDecimal serialization
-Tue May 14 03:17:15 2013 Koichi Sasada <ko1@atdot.net>
+Sun Dec 18 12:03:13 2011 Aaron Patterson <aaron@tenderlovemaking.com>
- * include/ruby/ruby.h: enable to generate write barrier protected
- objects for numeric types (Float, Complex, Rational, Bignum).
+ * ext/psych/lib/psych/scalar_scanner.rb: Strings that look like dates
+ should be treated as strings and not dates.
-Tue May 14 03:10:59 2013 Koichi Sasada <ko1@atdot.net>
+ * test/psych/test_scalar_scanner.rb: corresponding tests.
- * include/ruby/ruby.h: enable RGENGC (USE_RGENGC)
- but no type creates write protected (sunny) objects
- (RGENGC_WB_PROTECTED_* == 0).
+Sun Dec 18 09:43:21 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-Tue May 14 02:47:30 2013 Koichi Sasada <ko1@atdot.net>
+ * test/thread/test_queue.rb (test_thr_kill): extend timeout.
+ this test takes a long time at slow machine.
- * gc.c: support RGENGC. [ruby-trunk - Feature #8339]
- See this ticket about RGENGC.
+Sun Dec 18 09:36:51 2011 CHIKANAGA Tomoyuki <nagachika00@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.
+ * test/ruby/envutil.rb (invoke_ruby): remove :timeout option before
+ pass it to Kernel#spawn.
- * include/ruby/ruby.h: disable RGENGC by default (USE_RGENGC == 0).
+Fri Dec 16 17:18:38 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * array.c: add write barriers for T_ARRAY and generate sunny objects.
+ * README, README.ja: 'make check' is preferable to 'make test'.
- * 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.
+Thu Dec 15 23:16:13 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * bignum.c, marshal.c, random.c: generate T_BIGNUM sunny objects.
+ * error.c (builtin_type_name): don't return pointer to the buffer of
+ temporary String object.
- * complex.c, include/ruby/ruby.h: add write barriers for T_COMPLEX
- and generate sunny objects.
+Thu Dec 15 17:56:58 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * rational.c (nurat_s_new_internal), include/ruby/ruby.h: add write
- barriers for T_RATIONAL and generate sunny objects.
+ * io.c (argf_type): make typed data.
- * internal.h: add write barriers for RBasic::klass.
+Thu Dec 15 17:40:28 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * numeric.c (rb_float_new_in_heap): generate sunny T_FLOAT objects.
+ * error.c (rb_check_type): fix typo.
- * object.c (rb_class_allocate_instance), range.c:
- generate sunny T_OBJECT objects.
+Thu Dec 15 14:48:35 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * string.c: add write barriers for T_STRING and generate sunny objects.
+ * ext/strscan/strscan.c: use typed data with
+ onig_region_memsize().
- * variable.c: add write barriers for ivars.
+Thu Dec 15 14:33:33 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * vm_insnhelper.c (vm_setivar): ditto.
+ * error.c (rb_check_typeddata): refine error message with
+ including expected struct name.
- * include/ruby/ruby.h, debug.c: use two flags
- FL_WB_PROTECTED and FL_OLDGEN.
+Thu Dec 15 13:15:51 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * node.h (NODE_FL_CREF_PUSHED_BY_EVAL, NODE_FL_CREF_OMOD_SHARED):
- move flag bits.
+ * regcomp.c (onig_region_memsize): implemented for memsize_of().
-Tue May 14 01:54:48 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/objspace/objspace.c (memsize_of): use it.
- * 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.
+Thu Dec 15 10:44:54 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c (after_gc_sweep): use objspace_live_num() instead of removed
- rb_objspace_t::marked_num.
+ * array.c (rb_ary_reject_bang, rb_ary_delete_if): update rdoc.
+ documentation from Thomas Leitner <t_leitner AT gmx.at> in
+ [ruby-core:41616]. [Bug #5752]
- * gc.c (gc_mark_ptr, gc_marks): remove rb_objspace_t::marked_num code.
+Thu Dec 15 10:10:43 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * 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.
+ * test/ruby/test_require.rb (test_race_exception): get rid of
+ not-guaranteed timing issue. [ruby-core:41655] [Bug #5754]
- * gc.c (lazy_sweep): call after_gc_sweep() if there are no sweep_able entry.
+Wed Dec 14 21:58:42 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * gc.c (rest_sweep, gc_prepare_free_objects): remove after_gc_sweep() call.
+ * test/ruby/test_io_m17n.rb
+ (TestIO_M17N#test_{read_with_binmode_and_get[cs]}): only for Windows.
-Tue May 14 01:50:41 2013 Koichi Sasada <ko1@atdot.net>
+Wed Dec 14 19:57:23 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * gc.c: disable GC_PROFILE_MORE_DETAIL (fix last commit).
+ * common.mk,Makefile.in,win32/Makefile.sub (ECHO1): move platform
+ specific hack from common.mk to Makefile.in (and win32/Makefile.sub).
+ [Bug #5711]
- * gc.c (gc_prof_set_malloc_info): fix "objspace->heap.live_num" to
- "objspace_live_num(objspace)". There is no such member variable.
+ * lib/mkmf.rb: we can generate Makefile as we like.
-Tue May 14 01:25:55 2013 Koichi Sasada <ko1@atdot.net>
+Wed Dec 14 19:22:33 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * gc.c: refactoring GC::Profiler.
+ * win32/win32.c, include/ruby/win32.h (rb_w32_fd_is_text): new function.
- * gc.c (gc_prof_sweep_timer_start/stop): removed because
- they doesn't support lazy sweep.
+ * win32/win32.c (init_stdhandle): set default mode of stdin as binmode.
- * gc.c (gc_prof_sweep_slot_timer_start/stop): added.
- redefine `sweeping time' to accumulated time of all of
- slot_sweep().
+ * io.c (set_binary_mode_with_seek_cur): new function to replace
+ SET_BINARY_MODE_WITH_SEEK_CUR macro. now returns previous mode of the
+ fd and take care of LF in rbuf.
- * 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.
+ * io.c (do_writeconv): set text mode when needed.
-Tue May 14 00:48:55 2013 Koichi Sasada <ko1@atdot.net>
+ * io.c (io_read): need to change the mode of the IO to binmode
+ temporally when the length for IO#read, because IO#read with length
+ must behave so.
- * 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].
+ * test/ruby/test_io_m17n.rb (TestIO_M17N#test_{read_with_length,
+ read_with_length_binmode,get[cs]_and_read_with_binmode,
+ read_with_binmode_and_get[cs],read_write_with_binmode}): tests for
+ above changes.
- TODO: API design. RRATIONAL_SET(rat,num,den) is enough?
- TODO: Setting constify variable with cast has same issue of r40691.
+ all patches are written by Hiroshi Shirosaki. [ruby-core:41496]
+ [Feature #5714]
- * complex.c, rational.c: use above macros.
+Wed Dec 14 15:28:31 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon May 13 21:49:17 2013 Tanaka Akira <akr@fsij.org>
+ * transcode.c (str_encode): about the extension of :fallback
+ option since 1.9.3.
- * ext/socket/extconf.rb: Check socketpair again.
- It is required on Unix.
+Wed Dec 14 12:19:59 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon May 13 21:20:32 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * load.c (load_unlock): release loading barrier and then remove it
+ from loading_table if it is not in-use. [Bug #5754]
- * win32/win32.c (getipaddrs): use alternative interface name if
- available, because if_nametoindex() requires them.
+ * thread.c (rb_barrier_release, rb_barrier_destroy): return
+ whether any other threads are waiting on it.
-Mon May 13 20:23:24 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+Wed Dec 14 11:23:45 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * win32/win32.c, include/ruby/win32.h (getipaddrs): [experimental]
- emulate getipaddrs(3) on Unix.
+ * thread_pthread.c (ubf_select): call rb_thread_wakeup_timer_thread()
+ only when it is not timer_thread. [Bug #5757] [ruby-dev:44985]
+ patched by Tomoyuki Chikanaga.
- * win32/Makefile.sub, configure.in (LIBS): need iphlpapi.lib for above
- function.
+Wed Dec 14 10:20:08 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * load.c (load_lock): delete the loading barrier if it has been
+ destroyed.
+
+ * thread.c (rb_barrier_wait): return nil for recursive lock
+ instead of false, to distinguish it from destroyed barrier.
+
+Wed Dec 14 01:24:55 2011 okkez <okkez000@gmail.com>
- * include/ruby/win32.h (socketpair): rb_w32_socketpair() doesn't
- substitute for any function, so use non-prefixed name.
+ * thread_pthread.c (rb_thread_create_timer_thread): fix memory
+ leak. [ruby-dev:44904] [Bug #5688]
- * ext/socket/extconf.rb (socketpair); follow above change.
+Wed Dec 14 00:01:15 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon May 13 20:11:06 2013 Koichi Sasada <ko1@atdot.net>
+ * parse.y (primary): point method name line. [ruby-core:40936]
+ [Bug #5614]
- * iseq.c (prepare_iseq_build): remove additional line break.
+Tue Dec 13 23:43:48 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-Mon May 13 19:29:54 2013 Koichi Sasada <ko1@atdot.net>
+ * error.c (name_err_mesg_to_str): clear rb_thread_t::errinfo when
+ ignore exception under rb_protect(). [ruby-core:41612] [Bug #5755]
- * 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].
+ * test/ruby/test_exception.rb (test_exception_in_name_error_to_str):
+ add a corresponding test.
- * 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);
+Tue Dec 13 16:13:29 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- TODO: API design. rb_obj_reveal() should be replaced with others.
+ * load.c (load_unlock): all threads requiring one file should
+ share same loading barrier, so it must be kept alive while those
+ are waiting on it. [ruby-core:41618] [Bug #5754]
- 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)".
+Tue Dec 13 07:30:14 2011 Aaron Patterson <aaron@tenderlovemaking.com>
- * 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.
+ * lib/webrick/httpresponse.rb (setup_header): 1xx responses
+ are allowed to have Keep-Alive connections.
- * 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.
+ * test/webrick/test_httpresponse.rb: corresponding test.
- * ext/coverage/coverage.c, ext/readline/readline.c,
- ext/socket/ancdata.c, ext/socket/init.c,
- * ext/zlib/zlib.c: ditto.
+Tue Dec 13 07:13:28 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-Mon May 13 18:44:14 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/webrick/httpresponse.rb (setup_header): 204 and 304 responses
+ are allowed to have a Keep-Alive connection. [ruby-core:41581]
- * *.c, parse.y, insns.def: use RARRAY_AREF/ASET macro
- instead of using RARRAY_PTR().
+ * test/webrick/test_httpresponse.rb: corresponding test.
-Mon May 13 16:53:53 2013 Koichi Sasada <ko1@atdot.net>
+Tue Dec 13 06:29:39 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * 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].
+ * parse.y (parser_magic_comment): should pass the proper value.
+ [ruby-dev:44984][Bug #5753]
-Mon May 13 15:31:10 2013 Koichi Sasada <ko1@atdot.net>
+Tue Dec 13 05:50:07 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * object.c (rb_obj_setup): added.
+ * vm_insnhelper.c (vm_yield_setup_block_args): splat single
+ argument if optional arguments are defined not only mandatory or
+ post arguments. [ruby-core:41557] [Bug #5730]
- * include/ruby/ruby.h (OBJSETUP): use rb_obj_setup() instead of
- a macro.
+Mon Dec 12 22:35:39 2011 Shugo Maeda <shugo@ruby-lang.org>
-Mon May 13 15:24:16 2013 Koichi Sasada <ko1@atdot.net>
+ * parse.y (stmt_or_begin): changed the error message for BEGIN not
+ at toplevel. [ruby-dev:44963] [Bug #5738]
- * gc.c (rb_data_object_alloc): check klass only if klass is not 0.
- klass==0 means internal object.
+Mon Dec 12 17:29:01 2011 NARUSE, Yui <naruse@ruby-lang.org>
-Mon May 13 14:57:28 2013 Koichi Sasada <ko1@atdot.net>
+ * README: Fixed SupportedPlatforms URL in the README.
+ patched by eMxyzptlk. https://github.com/ruby/ruby/pull/62
- * gc.c (rb_data_object_alloc, rb_data_typed_object_alloc):
- use NEWOBJ_OF() instead of NEWOBJ().
+Mon Dec 12 17:26:51 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon May 13 14:51:59 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * load.c (rb_feature_p): lazy assigned load_path searched in
+ loading_table were not expanded, but all features, pushed to
+ loading table, are expanded. a patch by Yura Sokolov
+ <funny.falcon AT gmail.com> in [ruby-core:41545]. [Bug #5727]
- * 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]
+Mon Dec 12 15:41:03 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * vm_method.c (rb_method_entry_at): return the method entry for id at
- klass, without ancestors.
+ * ext/stringio/stringio.c (strio_truncate): fix typo. patched by
+ Nick Howard <ndh AT baroquebobcat.com>.
+ https://github.com/ruby/ruby/pull/65
- * class.c (rb_singleton_class_get): get the singleton class if exists,
- or nil.
+Sun Dec 11 12:19:17 2011 Shugo Maeda <shugo@ruby-lang.org>
-Mon May 13 10:20:59 2013 Yuki Yugui Sonoda <yugui@google.com>
+ * lib/net/imap.rb: includes the sequence number of UID in a error
+ message. suggested by art lussos.
+ [ruby-core:41413] [Feature #5692]
- * ext/openssl/ossl_ssl.c: Disabled OpenSSL::SSL::SSLSocket if
- defined(OPENSSL_NO_SOCK).
+Sun Dec 11 11:42:10 2011 Kazuki Tsujimoto <kazuki@callcc.net>
- 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.
+ * ext/syslog/syslog.c: fix a typo. [ruby-core:41585] [Bug #5740]
-Mon May 13 10:30:04 2013 Zachary Scott <zachary@zacharyscott.net>
+Sun Dec 11 10:48:16 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * hash.c: Hash[] and {} are not equivalent by @eam [Fixes GH-301]
+ * error.c (exit_initialize): deal with true and false as well as
+ Kernel#exit. [ruby-dev:44951] [Bug #5728]
-Mon May 13 10:04:22 2013 Zachary Scott <zachary@zacharyscott.net>
+Sun Dec 11 10:37:47 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * random.c: Document Random::DEFAULT by @eLobato [Fixes GH-304]
+ * object.c (rb_check_to_int): new function to convert a VALUE to
+ an Integer if possible, but returns nil instead of raising an
+ exception otherwise.
-Sun May 12 21:12:42 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sun Dec 11 10:34:39 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * include/ruby/ruby.h (OFFT2NUM): RUBY_REPLACE_TYPE also defines macro
- to convert int type to VALUE if found.
+ * process.c (rb_exit_status_code): extract from rb_f_exit_bang and
+ rb_f_exit. assume 0 to be success in Kernel#exit! too.
-Wed May 8 13:46:52 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Fri Dec 9 19:24:31 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * include/ruby/intern.h (rb_iv_set, rb_iv_get): removed. Because
- ruby.h has a declaration for that.
+ * enc/trans/iso-8859-16-tbl.rb: add ISO-8859-16 converter.
-Wed May 8 13:49:06 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * enc/trans/single_byte.trans: ditto.
- * 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.
+Fri Dec 9 14:28:40 2011 NARUSE, Yui <naruse@ruby-lang.org>
-Sun May 12 17:52:23 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * file.c (file_path_convert): don't convert it when the path string is
+ ascii only. [ruby-core:41556] [Bug #5733]
+ tests are contributed by nobu.
- * configure.in: removes 'ac_cv_func_fseeko=yes' form MinGW
- specific definitions.
+Fri Dec 9 08:00:15 2011 Luis Lavena <luislavena@gmail.com>
-Sun May 12 17:25:46 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * include/ruby/win32.h: undef stat to silence mingw-w64 stat
+ redefinition warnings (GCC 4.6.3).
- * file.c (rb_file_s_truncate): use correct type. chsize takes
- a long.
+Thu Dec 8 23:38:24 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-Sun May 12 17:18:46 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * variable.c (set_const_visibility): clear inline-cache when constant's
+ visibility is modified. [ruby-dev:44929]
- * process.c: move '#define HAVE_SPAWNV 1' to win32/Makefile.sub.
- * win32/Makefile.sub: see above.
+ * test/ruby/test_module.rb (test_private_constants_clear_inlinecache):
+ add test for it.
-Sun May 12 17:13:32 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Thu Dec 8 23:26:11 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * configure.in: removes AC_CHECK_FUNCS(setitimer) because it's
- unused.
+ * ext/extmk.rb (extract_makefile): should sort after map, not before
+ it. in this case there is no difference, but we should write better
+ code. this bad smell was caught by nagachika.
-Sun May 12 17:08:16 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Thu Dec 8 22:31:13 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * configure.in: removes AC_CHECK_FUNCS(pause) because it's unused.
+ * ext/extmk.rb (extract_makefile): need to sort the array of current
+ srcs before comparing to the sorted old srcs.
+ fixed the problem that the configuring stage of exts were always
+ run, introduced at r33801.
-Sun May 12 17:05:18 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Thu Dec 8 13:26:24 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * signal.c (rb_f_kill): fixes typo. s/HAS_KILLPG/HAVE_KILLPG/.
+ * test/rexml/test_order.rb (OrderTester#test_more_ordering): use
+ Zlib::GzipReader.open instead of Zlib::GzipReader.new with File.new.
+ fixed a test error on Windows introduced at r33946.
-Sun May 12 17:03:27 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Thu Dec 8 13:11:26 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * configure.in: abort if gettimeofday doesn't exist.
+ * test/ruby/test_process.rb (TestProcess#test_sete[gu]id): silently
+ skip if not implemented such functions (such as, on Windows).
+ fixed test errors on Windows introduced at r33953.
-Sun May 12 16:31:27 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Thu Dec 8 12:57:50 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * 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.
+ * ext/socket/extconf.rb: forgotten to define HAVE_SOCKETPAIR for
+ windows.
+ fixed test errors on Windows introduced at r33947.
-Sun May 12 16:03:41 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Thu Dec 8 12:11:06 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * configure.in: removes AC_CHECK_FUNC(fseeko, fseeko64, ftello,
- ftello64). They are not used from anywhere.
+ * configure.in (RUBY_WERROR_FLAG): append all warning flags which
+ are enabled to compile, so that printf format modifiers properly
+ fail. [ruby-core:41351] [Bug #5679]
- * 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'.
+Thu Dec 8 07:20:15 2011 Eric Hodel <drbrain@segment7.net>
-Sun May 12 15:51:47 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * doc/re.rdoc: Document difference between match and =~, options with
+ Regexp.new and global variables. Patch by Sylvain Daubert.
+ [Ruby 1.9 - Bug #5709]
- * configure.in: remove AC_CHECK_FUNC(close). It is not used from
- anywhere.
+Thu Dec 8 06:53:10 2011 Eric Hodel <drbrain@segment7.net>
-Sun May 12 15:50:45 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * doc/re.rdoc: Fix example code to match documentation. Patch by
+ Jarno Lamberg. [Ruby 1.9 - Bug #5624]
- * configure.in: adds comments for setjmp check.
+Wed Dec 7 19:04:22 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun May 12 15:38:09 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * configure.in (rpath): fix typo in the help string. a patch from
+ Yuji Yamano <yyamano AT kt.rim.or.jp> in [ruby-list:48568].
- * configure.in: move clock_gettime() check into regular place.
+Wed Dec 7 18:55:56 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed May 8 13:45:53 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * vm.c (vm_set_top_stack, vm_set_eval_stack): check for stack
+ overflow with stack_max before push new frame. [ruby-core:41520]
+ [Bug #5720]
- * configure.in: add getenv() declaration check.
- * dln_find.c: add HAVE_DECL_GETENV test.
+ * vm.c (vm_set_main_stack): no stack overflow chances after
+ vm_set_eval_stack().
-Sun May 12 15:33:18 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Wed Dec 7 09:58:15 2011 Eric Hodel <drbrain@segment7.net>
- * configure.in: sorts AC_CHECK_FUNCS()s as alphabetical order.
+ * ext/bigdecimal/bigdecimal.c: Document +@, -@, hash, INFINITY, Nan.
+ Patch by Sylvain Daubert. [Ruby 1.9 - Feature #5622]
-Wed May 8 13:41:57 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Wed Dec 7 09:48:00 2011 Eric Hodel <drbrain@segment7.net>
- * bignum.c: remove redundant decl for big_lshift() big_rshift().
+ * io.c (Init_IO): Mention io/console methods. [Ruby 1.9 - Bug #5602]
+ * ext/io/console/console.c: Mention that io/console must be required
+ similar to lib/time.rb
-Sun May 12 16:06:43 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Wed Dec 7 08:04:31 2011 Aaron Patterson <aaron@tenderlovemaking.com>
- * ext/socket/rubysocket.h (rsock_inspect_sockaddr): as r40646
- check HAVE_TYPE_STRUCT_SOCKADDR_DL.
+ * ext/psych/lib/psych.rb (module Psych): parse and load methods take
+ an optional file name that is used when raising Psych::SyntaxError
+ exceptions
+ * ext/psych/lib/psych/syntax_error.rb (module Psych): allow nil file
+ names and handle nil file names in the exception message
+ * test/psych/test_exception.rb (module Psych): Tests for changes.
-Sat May 11 23:01:58 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Tue Dec 6 18:26:33 2011 Tanaka Akira <akr@fsij.org>
- * 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
+ * ext/dbm/dbm.c: use db_version() instead of DB_VERSION_STRING to
+ detect runtime Berkeley DB version.
+ use dpversion instead of _QDBM_VERSION to detect runtime QDBM
+ version.
+ [ruby-dev:44948]
-Sat May 11 22:07:42 2013 Tanaka Akira <akr@fsij.org>
+Tue Dec 6 12:30:41 2011 Tanaka Akira <akr@fsij.org>
- * test/rinda/test_rinda.rb: Socket.getifaddrs may returns an interface
- which #addr method returns nil for venet0 in OpenVZ.
+ * ext/dbm/extconf.rb: detect gdbm_version in libgdbm.
-Sat May 11 21:56:34 2013 Tanaka Akira <akr@fsij.org>
+ * ext/dbm/dbm.c: make DBM::VERSION more informative for gdbm, qdbm and
+ Berkeley DB 1.x. [ruby-dev:44944]
- * ext/socket/raddrinfo.c (rsock_inspect_sockaddr): Add casts to
- suppress warnings.
+Tue Dec 6 07:26:37 2011 Eric Hodel <drbrain@segment7.net>
-Sat May 11 17:28:51 2013 Tanaka Akira <akr@fsij.org>
+ * range.c: Improve documentation for Range. Patch by Chris Zetter.
+ [Ruby 1.9 - Bug #5656]
- * ext/socket: New method, Socket.getifaddrs, implemented.
- [ruby-core:54777] [Feature #8368]
+Mon Dec 5 19:08:04 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat May 11 00:47:22 2013 Tanaka Akira <akr@fsij.org>
+ * regparse.c (PFETCH_READY): separate gcc specific trick.
- * 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/
+Mon Dec 5 19:01:59 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri May 10 23:56:34 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * process.c (proc_seteuid_m): fix argument.
- * 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]
+ * test/ruby/test_process.rb (test_geteuid): fix typo.
-Fri May 10 20:22:40 2013 Tanaka Akira <akr@fsij.org>
+ * test/ruby/test_process.rb (test_getegid, test_set[eg]uid): add.
- * configure.in: Move library checks into "Checks for libraries." part.
+Mon Dec 5 18:56:55 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri May 10 19:32:01 2013 Tanaka Akira <akr@fsij.org>
+ * bignum.c (big_rshift), compile.c (validate_label,
+ iseq_build_from_ary_exception), cont.c (cont_capture), dir.c
+ (dir_open_dir), gc.c (objspace_each_objects), io.c (pipe_open)
+ (rb_io_advise), parse.y (parser_compile_string)
+ (rb_parser_compile_file), proc.c (binding_free), process.c
+ (rb_proc_exec_n, rb_seteuid_core, proc_setegid, rb_setegid_core)
+ (p_uid_exchange, p_gid_exchange), regparse.c (strdup_with_null),
+ signal.c (sig_dfl), vm.c (rb_iseq_eval, rb_iseq_eval_main),
+ vm_insnhelper.c (vm_expandarray): suppress
+ unused-but-set-variable warnings.
- * configure.in: Reformat arguments of AC_CHECK_HEADERS and
- AC_CHECK_FUNCS to track modifications easily.
+ * class.c (rb_obj_methods), compile.c (iseq_compile_each),
+ iseq.c(iseq_load, rb_iseq_parameters), pack.c (pack_pack),
+ regcomp.c (is_not_included, update_string_node_case_fold),
+ transcode.c (rb_econv_open0, make_replacement),
+ vm_eval.c (raise_method_missing): remove unused variable.
-Fri May 10 12:01:36 2013 Tanaka Akira <akr@fsij.org>
+ * signal.c (reserved_signal_p): static.
- * 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
+Mon Dec 5 14:27:23 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-Thu May 9 22:00:35 2013 Tanaka Akira <akr@fsij.org>
+ * include/ruby/{subst.h,win32.h}, ext/socket/rubysocket.h: revert
+ r33876. [ruby-core:41475] [Bug #5706]
- * ext/socket/ancdata.c (bsock_sendmsg_internal): controls_num should
- not be negative.
+ * ext/socket/extconf.rb: the alternative hack for [Bug #5675].
-Thu May 9 21:09:57 2013 Tanaka Akira <akr@fsij.org>
+Mon Dec 5 10:18:45 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * 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.
+ * ext/zlib/zlib.c (rb_gzreader_initialize): revert a part of r33937.
+ 1st, to change the mode of an IO is very sensitive problem, so
+ the maintainer of this library should judge it.
+ 2nd, usually Zlib::GzipReader.new is not called directly. #initialize
+ is called via .open, and in the method the I/O is opened in binary
+ mode, so there is no problem without changing the mode in #initialize.
-Thu May 9 20:43:41 2013 Tanaka Akira <akr@fsij.org>
+Sun Dec 4 22:53:12 2011 Tanaka Akira <akr@fsij.org>
- * 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.
+ * lib/tempfile.rb: don't use lock directory. [ruby-dev:39197]
-Thu May 9 12:06:07 2013 Tanaka Akira <akr@fsij.org>
+Sun Dec 4 22:34:43 2011 Tanaka Akira <akr@fsij.org>
- * ext/socket/rubysocket.h, ext/socket/unixsocket.c,
- ext/socket/ancdata.c: Use HAVE_STRUCT_MSGHDR_MSG_CONTROL instead
- of HAVE_ST_MSG_CONTROL.
+ * lib/tempfile.rb (Tempfile::MAX_TRY): remove unused constant.
-Thu May 9 11:30:02 2013 Zachary Scott <zachary@zacharyscott.net>
+Sun Dec 4 12:11:28 2011 Kazuki Tsujimoto <kazuki@callcc.net>
- * string.c: Add call-seq alias for String#=== [Bug #8381]
+ * lib/pp.rb: fix rdoc.
-Thu May 9 11:14:18 2013 Zachary Scott <zachary@zacharyscott.net>
+Sun Dec 4 12:03:16 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * doc/contributing.rdoc: Add guide for contributing to CRuby
+ * lib/delegate.rb (Delegator#methods): Kernel#methods receives
+ zero or one argument. [ruby-core:37118] [Bug #4882]
-Thu May 9 04:55:49 2013 Tanaka Akira <akr@fsij.org>
+Sun Dec 4 10:15:00 2011 Luis Lavena <luislavena@gmail.com>
- * configure.in: Check socket library again. shutdown() is used in
- io.c.
+ * ext/zlib/zlib.c (rb_gzreader_initialize): use binary mode by default
+ under Windows. Patch by Hiroshi Shirosaki. [ruby-core:40706]
+ [Feature #5562]
-Thu May 9 01:52:31 2013 Tanaka Akira <akr@fsij.org>
+ * include/ruby/encoding.h (void rb_econv_binmode): define NEWLINE
+ decorator.
- * configure.in: Don't check socketpair. socketpair is not used in
- ruby command itself.
+ * io.c (rb_cloexec_fcntl_dupfd): Introduce NEED_READCONV and
+ NEED_WRITECONV to replace universal newline decorator by CRLF only
+ when required to improve file reading and writing under Windows.
+ Patch by Hiroshi Shirosaki. [ruby-core:40706] [Feature #5562]
+ * io.c (do_writeconv): adjust binary mode if required.
+ * io.c (read_all, appendline, swallow, rb_io_getline_1): ditto.
+ * io.c (io_getc, rb_io_each_codepoint, rb_io_ungetc): ditto.
+ * io.c (rb_io_binmode, rb_io_ascii8bit_binmode): ditto.
+ * io.c (rb_io_extract_modeenc, rb_sysopen): ditto.
+ * io.c (pipe_open, prep_stdio, io_encoding_set): ditto.
+ * io.c (rb_io_s_pipe, copy_stream_body): ditto.
-Thu May 9 01:05:41 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/ruby/test_io_m17n.rb (EOT): add test for pipe and stdin in
+ binary mode.
- * class.c (rb_mod_included_modules): should not include non-modules.
- [ruby-core:53158] [Bug #8025]
+ * win32/win32.c (init_stdhandle): remove O_BINARY from stdhandle
+ initialization.
+ * win32/win32.c (rb_w32_write): use FTEXT mode accordingly.
-Wed May 8 22:46:59 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Dec 3 20:49:16 2011 Yusuke Endoh <mame@tsg.ne.jp>
- * class.c (rb_mod_included_modules): should not include the original
- module itself. [ruby-core:53158] [Bug #8025]
+ * variable.c (set_const_visibility): print a warning when no argument
+ is passwd to Module#private_constant. [ruby-list:48558]
-Wed May 8 17:43:55 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * vm_method.c (set_method_visibility): ditto for
+ Module#private_class_method.
- * io.c (rb_io_ext_int_to_encs): ignore internal encoding if external
- encoding is ASCII-8BIT. [Bug #8342]
+Sat Dec 3 20:43:14 2011 Yusuke Endoh <mame@tsg.ne.jp>
-Wed May 8 13:49:38 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * variable.c (set_const_visibility): Module#private_constant has
+ changed the visibility of only the first argument. Now it changes
+ all of them. [ruby-list:48558]
- * ext/json/generator/generator.c (isArrayOrObject): cast char to
- unsigned char. [Bug #8378]
+ * test/ruby/test_module.rb: add a test for above.
-Wed May 8 13:46:10 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Sat Dec 3 07:17:29 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/json/generator/depend: fix dependencies [Bug #8379]
+ * Makefile.in (CFLAGS): append ARCH_FLAG.
- * ext/json/parser/depend: ditto.
+ * configure.in (ARCH_FLAG): exclude from CFLAGS.
-Wed May 8 13:07:17 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * configure.in (UNIVERSAL_INTS): include short int. fix for
+ test/mkmf.
- * parse.y (parser_yylex): fail if $, @, @@ are not followed by a valid
- name character. [ruby-core:54846] [Bug #8375].
+Fri Dec 2 15:48:08 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/bigdecimal/bigdecimal.c (VpAllocReal): reduce extra frac.
+
+Fri Dec 2 15:41:24 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in: check whether -pie or -Wl,-pie is valid as
+ LDFLAGS. [ruby-core:41438] [Bug#5697]
+
+ * configure.in: use $linker_flag for LDFLAGS option which is not
+ limited to particular platforms.
+
+Thu Dec 1 23:21:58 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
+
+ * thread_pthread.c (thread_timer): call prctl(PR_SET_NAME) only if
+ PR_SET_NAME is available.
+
+Thu Dec 1 22:31:16 2011 Tanaka Akira <akr@fsij.org>
+
+ * io.c (linux_get_maxfd): change local variable name.
+
+Thu Dec 1 16:59:24 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/socket/extconf.rb: add arguments for macro calls.
+ [ruby-core:41370] [Bug#5681]
+
+Thu Dec 1 16:20:16 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/mkmf.rb (MakeMakefile#try_func): fix broken patch at r33834.
+
+Thu Dec 1 14:43:17 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/bigdecimal/bigdecimal.h (Real): suppress false warning from
+ clang. [ruby-core:41418] [Bug#5693]
+
+Thu Dec 1 10:31:55 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in (LDFLAGS): -fstack-protector is always needed to
+ link static library created with it. [ruby-core:41387]
+ [Bug#5686]
+
+Thu Dec 1 07:03:51 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * configure.in: add sys/prctl.h test.
+ * thread_pthread.c (thread_timer): call prctl(PR_SET_NAME) to change
+ thread name. It may help to debug.
+
+Wed Nov 30 23:35:45 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * variable.c (rb_path2class): don't raise NameError when the middle
+ constant of the path is not defined but defined on toplevel.
+ [ruby-core:41410] [Bug #5691]
+
+Wed Nov 30 20:02:02 2011 Martin Duerst <duerst@it.aoyama.ac.jp>
+
+ * transcode.c: Simplified rb_econv_binmode, avoided a warning on cygwin.
+
+Wed Nov 30 08:57:07 2011 Eric Hodel <drbrain@segment7.net>
+
+ * lib/mkmf.rb: Use MakeMakefile's rm_f to avoid conflict with Rake or
+ FileUtils.
+ * test/ruby/test_module.rb: Hide MakeMakefile's inclusion in Object
+
+Wed Nov 30 09:12:43 2011 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * lib/rdoc/encoding.rb (RDoc::Encoding.read_file): fixup newline chars
+ on Windows.
+ see https://github.com/rdoc/rdoc/issues/87
-Wed May 8 13:06:31 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/rdoc/test_rdoc_markup_pre_process.rb
+ (TestRDocMarkupPreProcess#test_include_file,
+ TestRDocMarkupPreProcess#test_include_file_encoding_incompatible):
+ follow above change.
- * include/ruby/ruby.h (ISGRAPH): add missing macro.
+Wed Nov 30 09:09:37 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-Wed May 8 06:42:56 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * ext/psych/parser.c (parse): parse method can take an option file
+ name for use in exception messages.
+ * test/psych/test_parser.rb: corresponding tests.
- * 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().
+Tue Nov 29 09:07:59 2011 Eric Hodel <drbrain@segment7.net>
-Tue May 7 22:12:34 2013 Tanaka Akira <akr@fsij.org>
+ * lib/mkmf.rb: Fix indentations of constants at end of module.
+ Document some constants.
- * ext/readline/readline.c (insert_ignore_escape): Add a cast to
- unsigned char * before dereference.
- This suppress a warning on Cygwin.
+Tue Nov 29 09:58:23 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue May 7 12:15:24 2013 Tanaka Akira <akr@fsij.org>
+ * io.c (rb_write_error2): suppress unused variable warning.
- * 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.
+Tue Nov 29 07:45:26 2011 Eric Hodel <drbrain@segment7.net>
-Tue May 7 12:12:42 2013 Tanaka Akira <akr@fsij.org>
+ * lib/mkmf.rb: Wrap comments to 78 columns and clean up formatting.
- * 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.
+Tue Nov 29 05:54:18 2011 Eric Hodel <drbrain@segment7.net>
-Tue May 7 12:10:52 2013 Tanaka Akira <akr@fsij.org>
+ * lib/mkmf.rb: Wrap mkmf.rb in module MakeMakefile to clean up Object
+ documentation. [Ruby 1.9 - Feature #5658]
+ * ext/extmk.rb: Use MakeMakefile::CONFIG instead of Object::CONFIG
+ * test/mkmf/base.rb: ditto
- * ext/socket/socket.c (socket_s_ip_address_list): Cast EXTRA_SPACE as
- int. This suppress a warning.
+Tue Nov 29 00:08:57 2011 Yuki Sonoda (Yugui) <yugui@yugui.jp>
-Tue May 7 12:09:29 2013 Tanaka Akira <akr@fsij.org>
+ * common.mk (INSTRUBY_ARGS): added --mantype to apply mdoc2man.rb
+ to man pages. Fixes #5598.
+ (do-install-nodoc, do-install-local, do-install-man,
+ dont-install-nodoc, dont-install-local, dont-install-man):
+ No longer needs --mantype.
- * 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.
+ Reported by Rainer Orth <ro AT cebitec.uni-bielefeld.de>,
+ patch by George Koehler <xkernigh AT netscape.net>.
-Tue May 7 12:07:35 2013 Tanaka Akira <akr@fsij.org>
+Mon Nov 28 22:26:31 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * pack.c (swap32): Don't redefine it if it is already defined.
- Bionic defines it.
- (swap64): Ditto.
+ * test/rake/test_rake_directory_task.rb
+ (TestRakeDirectoryTask#test_directory_win32): shouldn't create any
+ file/directory on root directory. create on @tempdir (= Dir.pwd).
+ see https://github.com/jimweirich/rake/issues/91
-Mon May 6 20:50:37 2013 Tanaka Akira <akr@fsij.org>
+Mon Nov 28 12:57:29 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * 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.
+ * io.c (rb_write_error2): fwrite() returns ssize_t.
-Sun May 5 18:56:52 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Nov 28 12:47:19 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * insns.def (defined): use vm_search_superclass() like as normal super
- call. based on a patch <https://gist.github.com/wanabe/5520026> by
- wanabe.
+ * parse.y (nodetype, nodeline): static. these functions are for
+ debugging, and not intend to be public.
- * vm_insnhelper.c (vm_search_superclass): return error but not raise
- exceptions.
+Mon Nov 28 12:37:54 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * vm_insnhelper.c (vm_search_super_method): check the result of
- vm_search_superclass and raise exceptions on error.
+ * gc.c (initial_params): static. it seems to be forgotten at r33501.
-Sun May 5 16:29:41 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Nov 28 12:32:24 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * insns.def (defined): get method entry from the method top level
- frame, not block frame. [ruby-core:54769] [Bug #8367]
+ * include/ruby/win32.h, win32/win32.c (GetCurrentThreadHandle): remove
+ unused old API.
-Sun May 5 13:28:54 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Nov 28 12:29:20 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * template/ruby.pc.in (Cflags): use rubyarchhdrdir for multiarch.
- [Bug #7874]
+ * win32/mkexports.rb (Exports#initialize): remove old symbol name.
-Sat May 4 07:20:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Mon Nov 28 12:15:28 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * doc/security.rdoc: Add note about reporting security vulns
+ * win32/mkexports.rb (Exports#read_substitution): need to read
+ from subst.h too. [Bug #5675]
-Sat May 4 04:13:27 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Mon Nov 28 11:46:35 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * include/ruby/defines.h (RUBY_ATTR_ALLOC_SIZE): New for
- attribute((alloc_size(params))).
+ * io.c (rb_io_flush): release GVL during fsync() on Windows.
- * include/ruby/defines.h (xmalloc, xmalloc2, xcalloc)
- (xrealloc, xrealloc2): Annotated by RUBY_ATTR_ALLOC_SIZE.
- * include/ruby/ruby.h (rb_alloc_tmp_buffer): ditto.
+Mon Nov 28 11:00:25 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-Fri May 3 19:32:13 2013 Takeyuki FUJIOKA <xibbar@ruby-lang.org>
+ * include/ruby/subst.h: typo of r33876.
- * lib/cgi/util.rb: All class methods modulized.
- We can use these methods like a function when "include CGI::Util".
- [Feature #8354]
+Mon Nov 28 10:36:00 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri May 3 14:09:45 2013 Tanaka Akira <akr@fsij.org>
+ * include/ruby/subst.h: moved Windows specific substitutions from
+ win32.h.
- * 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
+ * ext/socket/rubysocket.h: include ruby/subst.h. [Bug #5675]
-Fri May 3 13:35:26 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Nov 28 10:20:58 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * ext/socket/{getaddrinfo,getnameinfo}.c: define socklen_t if not
- defined, e.g., older VC.
+ * win32/{Makeilfe.sub,win32.c} (FILE_COUNT, FILE_READPTR): move the
+ definitions from config.h to win32.c. I dared to have left such
+ macros, for other future compiler support.
+ [ruby-core:41313] [Bug #5674]
-Fri May 3 13:29:11 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Nov 28 09:28:30 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * 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.
+ * win32/win32.c (rb_w32_uchmod): typo. [Bug#5671] [ruby-dev:44898]
-Fri May 3 13:22:12 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/ruby/test_file.rb (TestFile#test_chmod_m17n): test of above bug.
- * win32/win32.c (poll_child_status): fix build error on older mingw.
+Sun Nov 27 21:25:33 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Fri May 3 00:15:58 2013 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
+ * configure.in: added -fno-strict-overflow. it suppress annoying
+ -Wstrict-overflow warning.
- * common.mk: remove timestamps in distclean-ext realclean-ext.
+Sun Nov 27 20:58:02 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Thu May 2 23:23:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * io.c (rb_write_error2): get rid of warning on linux. fwrite
+ of glibc is tagged __attribute__ ((__warn_unused_result__))
+ if _FORTIFY_SOURCE != 0.
+ * vm_dump.c (rb_vm_bugreport): ditto.
- * object.c (rb_obj_is_kind_of): skip prepending modules.
- [ruby-core:54742] [Bug #8357]
+Sun Nov 27 19:09:02 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * object.c (rb_class_inherited_p): ditto.
- [ruby-core:54736] [Bug #8357]
+ * configure.in (stack_protector): disable on mingw. [Bug#5676]
-Thu May 2 22:11:47 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * Makefile.in (DLDFLAGS): also needs -fstack-protector.
+ [Bug#5676]
- * bin/irb: remove dead code from sample/irb.rb.
+Sun Nov 27 14:13:33 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Thu May 2 17:32:45 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * configure.in: add -fstack-protector into XLDFLAGS as well as
+ XCFLAGS if stack-protector is used.
- * marshal.c (copy_ivar_i): get rid of overwriting already copied
- instance variables. c.f. [Bug #8276]
+Sun Nov 27 13:09:25 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Thu May 2 16:55:43 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * configure.in: workaround to avoid MacOS X build error.
+ Maybe autoconf 2.61 is slightly buggy. [ruby-core:41316]
- * thread.c (id_locals): use cached ID.
+Sun Nov 27 04:57:11 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * vm.c (ruby_thread_init): ditto.
+ * configure.in (--no-undefined): r33840 breaks FreeBSD and DragonFly
+ with gcc 4.4 or later. Their environ is in /usr/libexec/ld-elf.so.1,
+ so it will be false negative.
- * defs/id.def: add more predefined IDs used in core.
+Sun Nov 27 04:55:45 2011 NARUSE, Yui <naruse@ruby-lang.org>
-Thu May 2 13:42:42 2013 Ryan Davis <ryand-ruby@zenspider.com>
+ * lib/net/http.rb (Net::HTTP::SSL_IVNAMES): rerefix 33701.
+ SSL_ATTRIBUTES stores names for set_params, they are symbol.
+ SSL_IVNAMES stores instance variable names.
- * lib/minitest/*: Imported minitest 4.7.4 (r8483)
+Sun Nov 27 00:16:07 2011 Tanaka Akira <akr@fsij.org>
+
+ * io.c (copy_stream_body): use 0666 for permission argument for open.
+ [ruby-core:40865]
+
+Sat Nov 26 23:01:38 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
+
+ * test/openssl/test_engine.rb: remove side effect of generic engine
+ load by explicitly loading software-based "openssl" engine for
+ all tests.
+
+Sat Nov 26 20:41:48 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/net/http.rb (Net::HTTP.get_response): enable use_ssl
+ if given URI object is https.
+ patched by Mark Ferlatte [ruby-core:40665] [Bug #5545]
+
+ * lib/net/http.rb (Net::HTTP.post_form): ditto.
+
+Sat Nov 26 20:01:18 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/net/http.rb (Net::HTTP::SSL_ATTRIBUTES): refix 33701.
+ store instance variable symbol names.
+
+Sat Nov 26 15:40:25 2011 URABE Shyouhei <shyouhei@ruby-lang.org>
+
+ * .travis.yml (script): should be ./configure
+
+Sat Nov 26 15:39:18 2011 URABE Shyouhei <shyouhei@ruby-lang.org>
+
+ * .travis.yml (before_script): wrong name, sorry.
+
+Sat Nov 26 15:31:34 2011 URABE Shyouhei <shyouhei@ruby-lang.org>
+
+ * .travis.yml (before-script): autoconf required.
+
+Sat Nov 26 15:24:05 2011 URABE Shyouhei <shyouhei@ruby-lang.org>
+
+ * .travis.yml: Travis enable.
+
+Sat Nov 26 10:47:50 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
+
+ * ext/openssl/extconf.rb: remove checks for available functions.
+ * ext/openssl/missing.h: ditto.
+ Thanks, Tim Mooney for reporting this!
+ [Bug #5432] [ruby-core:40088]
+
+Sat Nov 26 10:22:28 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
+
+ * ext/openssl/ossl_ssl.c: add comment on where to find implementation
+ of OpenSSL::SSL::SSLSocket#session.
+
+Sat Nov 26 05:00:25 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in (--no-undefined): RUBY_TRY_CFLAGS does nothing for
+ linker flags. use RUBY_TRY_LDFLAGS.
+
+Fri Nov 25 11:37:07 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * io.c (ioctl_narg_len, linux_iocparm_len): reinstantiate linux
+ specific narg length calculation.
+ * test/ruby/test_io.rb (test_ioctl_linux2): add new test for old and
+ unstructured ioctl.
+
+Fri Nov 25 10:39:14 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * Makefile.in (EXTLDFLAGS): export it.
+ * configure.in: add --no-undefined if --enable-shared is specified.
+ Gentoo enabled this option long time. Also, export EXTLDFALGS.
+
+Fri Nov 25 08:48:35 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * configure.in: turn on PIE if --enable-shared is not specified.
+
+Fri Nov 25 08:05:07 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * configure.in: add -fstack-protector. It help to protect us from
+ stack smashing attack.
+
+Fri Nov 25 08:03:28 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * configure.in: add -D_FORTIFY_SOURCE=2. It provide some compile
+ time and runtime check for security.
+
+Fri Nov 25 08:00:23 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * lib/mkmf.rb: get rid of warnings of mkmf.rb if -Wmissing-declarations
+ and/or -Wold-style-definition warnings if specified.
+ Patch by Nikolai Weibull. Thank you! [Bug #5459] [ruby-core:40200]
+
+Fri Nov 25 07:46:09 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * configure.in: add -Wall always.
+
+Thu Nov 24 20:02:40 2011 Tanaka Akira <akr@fsij.org>
+
+ * test/openssl/test_engine.rb: use IO#reopen to restore stderr.
+
+Thu Nov 24 19:59:56 2011 Tanaka Akira <akr@fsij.org>
+
+ * io.c (rb_io_reopen): re-initialize buffering mode for stdout and
+ stderr.
+
+Thu Nov 24 11:12:48 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * io.c (rb_io_fsync,rb_io_fdatasync): release GVL during fsync().
+ fsync() and fdatasync() may take a long time on slow disks and/or
+ if there is much dirty data.
+ Patch by Eric Wong. [Feature #5665] [ruby-core:41247]
+
+Thu Nov 24 10:05:02 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
+
+ * test/openssl/test_engine.rb: Suppress output from 'openssl'
+ engine's RC4 cipher.
+ [Bug #5633] [ruby-core:41026]
+
+Thu Nov 24 08:05:02 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
+
+ * ext/openssl/ossl_pkey_dsa.c: remove redundant colon from error
+ message.
+ * ext/openssl/ossl_ssl.c: ditto.
+ * ext/openssl/ossl_pkey_rsa: ditto.
+ patched by Eric Hodel [Bug #5604] [ruby-core:40896]
+
+Wed Nov 23 20:03:43 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * io.c (ioctl_narg_len): don't use _IOC_SIZE macro on Linux.
+ On Linux some constants for ioctl(2) doesn't include the size of
+ its return value and 16bit value; for example FIONREAD 0x541B.
+ Moreover the manual, ioctl_list(2), says "Note that the size
+ bits are very unreliable: in lots of cases they are wrong,
+ either because of buggy macros using sizeof(sizeof(struct)),
+ or because of legacy values."
+ So we shouldn't use it.
+
+Tue Nov 22 18:07:32 2011 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * win32/win32.c (_pioinfo): need to declare _pioinfo() before using
+ _osfhnd and other macros which uses _pioinfo() internally.
+
+Tue Nov 22 17:49:45 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * win32/win32.c (_pioinfo): make an inline function.
+
+Tue Nov 22 11:26:08 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+Tue Nov 22 11:33:58 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * win32/win32.c (dupfd): argument of _osfhnd and so on should not
+ have side effect.
+
+Tue Nov 22 11:26:08 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * bignum.c (rb_big_divide): refix of r33536. Don't change behavior of Bignum#/.
+ [ruby-core:40429] [Bug #5490]
+
+Tue Nov 22 10:46:57 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * numeric.c (ruby_float_step): improve floating point calculations.
+ [ruby-core:35753] [Bug #4576]
+
+ * numeric.c (ruby_float_step): correct the error of floating point
+ numbers on the excluding case.
+ patched by Masahiro Tanaka [ruby-core:39608]
+
+ * numeric.c (ruby_float_step): use the end value when the current
+ value is greater than or equal to the end value.
+ patched by Akira Tanaka [ruby-core:39612]
+
+Tue Nov 22 06:59:21 2011 Tanaka Akira <akr@fsij.org>
+
+ * test/ruby/test_io.rb (test_fcntl_dupfd): there is no known platform
+ which don't have F_DUPFD. [ruby-dev:44874]
+
+Tue Nov 22 04:46:22 2011 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * ext/psych/lib/psych.rb: remove autoload from psych
+ * ext/psych/lib/psych/json.rb: ditto
+
+Tue Nov 22 00:44:59 2011 Tanaka Akira <akr@fsij.org>
+
+ * test/ruby/test_io.rb (test_fcntl_dupfd): the argument of F_DUPFD is
+ minimum file descriptor.
+
+Tue Nov 22 00:25:17 2011 Tanaka Akira <akr@fsij.org>
+
+ * io.c (linux_get_maxfd): get rid of a warning.
+
+Mon Nov 21 23:39:14 2011 Tanaka Akira <akr@fsij.org>
+
+ * io.c (linux_get_maxfd): new function to find maximum fd on Linux.
+ (rb_close_before_exec): use linux_get_maxfd.
+
+Mon Nov 21 06:16:24 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * cont.c (fiber_switch): ignore fiber context switch
+ because destination fiber is same as current fiber.
+ With out this, it may segv on FreeBSD 9.
+ patched by Koichi Sasada.
+
+Sun Nov 20 23:22:42 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/extmk.rb (extract_makefile, extmake): regenerate makefiles
+ if globbed source file list is changed.
+
+ * lib/mkmf.rb (create_makefile): store ORIG_SRCS.
+
+Sun Nov 20 22:43:03 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * enc/unicode.c (PROPERTY_NAME_MAX_SIZE): +1.
+ reported by Ken Takata. [ruby-dev:44894][Bug #5652]
+
+Sun Nov 20 11:01:28 2011 Tanaka Akira <akr@fsij.org>
+
+ * lib/set.rb (SortedSet.setup): remove old_init after initialize
+ method is redefined. The remove before redefinition makes the
+ warning prevention fragile. [ruby-dev:44892]
+
+Sun Nov 20 04:01:45 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * Makefile.in (enc/unicode/name2ctype.h): remove duplicated
+ ifdefs.
+
+Sat Nov 19 19:31:47 2011 Tanaka Akira <akr@fsij.org>
+
+ * time.c (TIME_COPY_GMT): copy vtm.utc_offset and vtm.zone too.
+ patch by Tomoyuki Chikanaga.
+ [ruby-dev:44827] [Bug #5586]
+
+Sat Nov 19 16:36:57 2011 Tanaka Akira <akr@fsij.org>
+
+ * test/net/http/test_http.rb: remove temporally files in ensure clause.
+
+Sat Nov 19 08:18:41 2011 Tanaka Akira <akr@fsij.org>
+
+ * test/net/http/test_http.rb: remove temporally files.
+
+Fri Nov 18 17:18:16 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/io/console/console.c (console_raw, console_set_raw)
+ (console_getch): optional parameters. [EXPERIMENTAL]
+
+Fri Nov 18 16:12:11 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/io/console/console.c (console_cooked, console_set_cooked):
+ new methods to reset cooked mode. [EXPERIMENTAL]
+
+Fri Nov 18 13:20:26 2011 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * test/unit/assertions.rb (MINI_DIR): quick dirty hack to get rid of
+ warnings when using assert/assert_respond_to.
+
+Fri Nov 18 13:03:38 2011 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * io.c (rb_cloexec_open): set O_NOINHERIT instead of O_CLOEXEC if it is
+ available (for Windows).
+
+ * win32/win32.c (fcntl): on F_DUPFD, determine the inheritance of the
+ new handle by O_NOINHERIT flag of original fd.
+
+Fri Nov 18 08:00:41 2011 Ryan Davis <ryand-ruby@zenspider.com>
+
+ * lib/minitest/*: Imported minitest 2.8.1 (r6750)
* test/minitest/*: ditto
+ * configure.in: Improved gcc-llvm error message to help people migrate.
-Thu May 2 11:32:22 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+Thu Nov 17 20:43:34 2011 Tanaka Akira <akr@fsij.org>
- * 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.
+ * ext/dbm/extconf.rb: revert a part of the patch in [ruby-dev:41531].
+ don't use db.h with other headers. [ruby-dev:44884].
- * test/ruby/test_process.rb (TestProcess#test_no_curdir): maybe now
- we can test it.
+Thu Nov 17 20:23:03 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * test/ruby/test_thread.rb (TestThread#test_thread_timer_and_interrupt):
- ditto.
+ * benchmark/bm_io_select[23].rb: use Process::RLIMIT_NOFILE only when
+ it is defined. if it is not defined, assume 64 as the max of fds.
-Thu May 2 11:24:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Thu Nov 17 10:36:46 2011 Aaron Patterson <aaron@tenderlovemaking.com>
- * lib/yaml.rb: nodoc EngineManager, add History doc #8344
+ * ext/psych/lib/psych.rb (load_file): make sure opened yaml files are
+ also closed. [ruby-core:41088]
-Wed May 1 21:11:17 2013 Tanaka Akira <akr@fsij.org>
+Wed Nov 16 18:13:52 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * time.c (localtime_with_gmtoff_zone): musl libc may return NULL for
- tm_zone.
+ * Makefile.in (LIBRUBY_A): check if generated linked library is
+ valid for extconf.
-Wed May 1 18:59:36 2013 Benoit Daloze <eregontp@gmail.com>
+Wed Nov 16 13:51:40 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * enum.c (Enumerable#chunk): fix grammar of error message
- for symbols beginning with an underscore [Bug #8351]
+ * bignum.c (rb_big2ulong): need to calc in unsigned long, because
+ the range of VALUE is larger than it on LLP64 platform, such as Win64.
+ this change fixes the failures of test/-ext-/num2int.
-Wed May 1 16:47:47 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Nov 16 12:02:47 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * ext/curses/extconf.rb (curses_version): try once for each tests, a
- function or a variable. fallback to variable for old SVR4.
+ * test/webrick/test_cgi.rb (TestWEBrickCGI#start_cgi_server): there are
+ no guarantee of existence of RbConfig::CONFIG['LIBPATHENV'].
+ it only exists in Unix-like environments.
-Wed May 1 16:17:46 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/webrick/test_filehandler.rb
+ (WEBrick::TestFileHandler#test_script_disclosure): ditto.
- * ext/extmk.rb (extmake): extensions not to be installed should not
- make static libraries, but make dynamic libraries always.
+Wed Nov 16 11:34:20 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-Wed May 1 12:20:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * io.c (argf_next_argv): wrong timing of setting ecflags.
+ fixed the failure of TestArgf#test_textmode introduced at r33662.
- * lib/rake/version.rb: Fix RDoc warning with :include: [Bug #8347]
+Wed Nov 16 10:45:00 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-Wed May 1 11:40:25 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/-test-/num2int/num2int.c: remove an unnecessary and wrong decl
+ of rb_stdout. it's declared in ruby.h correctly.
- * defs/id.def (predefined): add "idProc".
+Wed Nov 16 10:26:41 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * eval.c (frame_func_id): use predefined IDs.
+ * bignum.c (rb_big2ull): add a cast to get rid of a VC++ warning.
- * proc.c (mnew, mproc, mlambda): use predefined IDs.
+Wed Nov 16 09:39:27 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * vm.c (rb_vm_control_frame_id_and_class): ditto.
+ * lib/minitest/unit.rb (assert_raises): experimental fix to run
+ correctly on chkbuild over 64bit linux. call exception_details only
+ when the detail is really needed to avoid create needless inspect
+ under ulimit-ed environment.
- * vm.c (Init_VM): ditto.
+Wed Nov 16 06:34:30 2011 Tanaka Akira <akr@fsij.org>
-Tue Apr 30 23:18:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * test/ruby/test_thread.rb (test_condvar_timed_wait): use
+ assert_operator.
- * lib/benchmark.rb: Update Benchmark results on newer CPU
+Tue Nov 15 21:56:25 2011 Tanaka Akira <akr@fsij.org>
-Tue Apr 30 12:31:40 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/ruby/test_sleep.rb (test_sleep_5sec): 0.1sec tolerance is too
+ small for busy environment.
- * proc.c (mproc, mlambda): use frozen core methods instead of plain
- global methods, so that methods cannot be overridden.
- [ruby-core:54687] [Bug #8345]
+Tue Nov 15 20:08:55 2011 Tanaka Akira <akr@fsij.org>
- * vm.c (Init_VM): define proc and lambda on the frozen core object.
+ * io.c, thread.c, ext/pty/pty.c, ext/fiddle/closure.c: use
+ __linux__ macro for consistency.
- * include/ruby/intern.h (rb_block_lambda): add declaration instead of
- deprecated rb_f_lambda.
+Tue Nov 15 14:45:15 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Mon Apr 29 17:02:30 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * include/ruby/ruby.h(NUM2LONG, NUM2INT, NUM2SHORT, NUM2LL,
+ INT2NUM, UINT2NUM, LONG2NUM, ULONG2NUM, NUM2CHR): wrap by
+ macros.
- * ext/nkf/nkf-utf8/nkf.h: Bionic libc doesn't have locale.
- [Feature #8338]
+Tue Nov 15 13:38:14 2011 Naohisa Goto <ngotogenome@gmail.com>
+ * include/ruby/defines.h (FLUSH_REGISTER_WINDOWS): move sparc asm code
+ to a separate file sparc.c for preventing inlining optimization.
+ Patched by Jurij Smakov. [Bug #5244] [ruby-core:40685]
+ * sparc.c (rb_sparc_flush_register_windows): ditto.
+ * configure.in: ditto.
-Mon Apr 29 06:58:30 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Nov 15 13:11:35 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * ext/openssl/ossl_bn.c (ossl_bn_initialize): no need of alloca for
- small fixed size array.
+ * include/ruby/ruby.h: get rid of gcc specific rb_long2int(),
+ NUM2LONG(), NUM2INT(), NUM2SHORT(), NUM2LL(), INT2NUM(),
+ UINT2NUM(), LONG2NUM(), ULONG2NUM() and NUM2CHR()
+ implementation. Because 1) They don't make any better code
+ at all. 2) Inline function have a better debugger supoort.
- * ext/openssl/ossl_bn.c (ossl_bn_initialize): check overflow first,
- and use alloca for small size input.
+Tue Nov 15 09:58:25 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Mon Apr 29 00:40:13 2013 Benoit Daloze <eregontp@gmail.com>
+ * test/ruby/test_io.rb (TestIO#test_fcntl_dupfd): fix OpenBSD test
+ failure. [ruby-dev:44872]
- * lib/yaml.rb: Clarify documentation about YAML being always Psych.
- Give a tip about using Syck. See #8344.
+Tue Nov 15 09:50:21 2011 NARUSE, Yui <naruse@ruby-lang.org>
-Sun Apr 28 23:34:01 2013 Benoit Daloze <eregontp@gmail.com>
+ * regcomp.c (print_indent_tree): fix double printing of ENCLOSE_OPTION
+ children bug. patched by Suraj Kurapati. [ruby-core:40964]
- * lib/yaml.rb: Use another trick to define the YAML module.
- https://twitter.com/n0kada/status/328342207511801856
+Tue Nov 15 01:53:48 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-Sun Apr 28 23:19:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * test/ruby/test_io.rb (test_fcntl_dupfd): fix test error on
+ SnowLeopard. Pointed out by CHIKANAGA Tomoyuki. [ruby-dev:44866]
- * lib/pp.rb: Update PP module overview by @geopet
+Mon Nov 14 22:06:02 2011 Tanaka Akira <akr@fsij.org>
-Sun Apr 28 22:04:37 2013 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+ * ext/openssl/ossl_pkey.c (ossl_pkey_new_from_file): set close-on-exec
+ flag.
- * 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]
+ * ext/openssl/ossl_x509cert.c (rb_fd_fix_cloexec): ditto.
-Sun Apr 28 12:38:04 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Nov 14 14:54:17 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * README.EXT: correct method name to be used. [Bug #7982]
+ * bignum.c (rb_big2ull): fix 32bit platform breakage. we must
+ not assume sizeof(VALUE) == sizeof(LONG_LONG).
+ * test/-ext-/num2int/test_num2int.rb (class TestNum2int):
+ fix false assumption on 32bit platform.
- * README.EXT.ja: add notes too.
+Mon Nov 14 14:52:54 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sun Apr 28 10:35:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * numeric.c (rb_fix2ushort): fix typo. use num rb_num2ushort()
+ instead of num2uint().
- * object.c: With feedback from Steve Klabnik, reverted a change to
- #untrusted? and #tainted?. Also adjusted grammar for $SAFE levels
+Sun Nov 13 10:31:03 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sun Apr 28 10:10:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * include/ruby/ruby.h: add #ifdef comment.
- * lib/yaml.rb: Disable setting YAML const twice [ruby-core:54642]
+Sun Nov 13 10:28:18 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sun Apr 28 09:50:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * include/ruby/ruby.h: add NUM2SHORT(), NUM2USHORT() macros.
+ * numeric.c: ditto.
- * object.c: Documentation for taint and trust [Bug #8162]
+ * test/-ext-/num2int/test_num2int.rb: add testcases for NUM2SHORT().
+ * ext/-test-/num2int/num2int.c: ditto.
-Sun Apr 28 09:40:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Sun Nov 13 10:23:48 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * README.EXT: Copy note from r40505 for rb_sprintf() [Bug #7982]
+ * bignum.c (rb_big2ull): fix off-by-twice bug of NUM2ULL.
+ * test/-ext-/num2int/test_num2int.rb (class TestNum2int):
+ fix a testcase too.
-Sun Apr 28 08:28:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Sun Nov 13 10:22:44 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * ext/curses/curses.c: Update Curses::Window example for nicer output
- Patch by Michal Suchanek [Bug #8121] [ruby-core:53520]
+ * test/-ext-/num2int/test_num2int.rb (class TestNum2int):
+ add FIXNUM tests.
-Sun Apr 28 08:10:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Sun Nov 13 09:57:29 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * README.EXT: Update note from r40504, by Jeremy Evans [Bug #7982]
+ * numeric.c (check_uint): fix off-by-one bug of NUM2UINT.
+ * bignum.c (rb_big2ulong): fix off-by-one bug of NUM2ULONG.
-Sun Apr 28 08:02:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * test/-ext-/num2int/test_num2int.rb: add a testcase for NUM2INT()
+ NUM2UINT(), NUM2LONG(), NUM2ULONG(), NUM2LL and NUM2ULL().
+ * ext/-test-/num2int/depend: ditto.
+ * ext/-test-/num2int/extconf.rb: ditto.
+ * ext/-test-/num2int/num2int.c: ditto.
- * README.EXT: Add note to warn use of %i in Exceptions [Bug #7982]
+Sun Nov 13 23:47:29 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Apr 28 02:41:05 2013 Tanaka Akira <akr@fsij.org>
+ * ext/dbm/extconf.rb: use convertible_int.
- * configure.in: Fix a typo. Should check endgrent() instead of
- endgrnam().
+Sun Nov 13 23:45:57 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Apr 28 00:35:45 2013 Tanaka Akira <akr@fsij.org>
+ * lib/mkmf.rb (checking_for): should not modify the result.
- * process.c (obj2gid): Don't call endgrent() if not exist.
- Bionic (Android's libc) don't have endgrent().
+ * lib/mkmf.rb (have_struct_member): accept compiler options.
- * configure.in: Check endgrnam function.
+ * lib/mkmf.rb (convertible_int): add restricted support of struct
+ member, and TYPEOF_ macro.
-Sat Apr 27 23:53:00 2013 Charlie Somerville <charlie@charliesomerville.com>
+Sun Nov 13 23:21:24 2011 Tanaka Akira <akr@fsij.org>
- * lib/yaml.rb: add security warning to YAML documentation
+ * ext/gdbm/gdbm.c (fgdbm_reorganize): set close-on-exec flag after
+ gdbm_reorganize(). gdbm_reorganize() opens a new database internally.
-Sat Apr 27 23:25:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Sun Nov 13 19:57:18 2011 Tanaka Akira <akr@fsij.org>
- * lib/yaml.rb: Documentation for YAML module [Bug #8213]
+ * ext/dbm/extconf.rb: rollback for each headers for each libraries.
-Sat Apr 27 20:19:21 2013 Tanaka Akira <akr@fsij.org>
+Sun Nov 13 16:24:48 2011 Tanaka Akira <akr@fsij.org>
- * thread_pthread.c (ruby_init_stack): Add STACK_GROW_DIR_DETECTION.
- This fixes a compilation failure while cross-compiling for Tensilica
- Xtensa Processor.
+ * ext/dbm/extconf.rb: treat libc as a choice for a library which
+ provide ndbm API.
-Sat Apr 27 19:32:44 2013 Benoit Daloze <eregontp@gmail.com>
+Sun Nov 13 15:40:43 2011 Tanaka Akira <akr@fsij.org>
- * thread.c: fix typos and documentation
+ * ext/dbm/extconf.rb: duplicate $libs and $defs when save them.
-Sat Apr 27 19:04:55 2013 Tanaka Akira <akr@fsij.org>
+Sun Nov 13 12:43:48 2011 Tanaka Akira <akr@fsij.org>
- * 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
+ * ext/dbm/extconf.rb: rollback $libs and $defs when db detection is
+ failed. It fixes -lgdbm -lqdbm when the system has qdbm and gdbm
+ without gdbm_compat.
-Sat Apr 27 17:22:50 2013 Tanaka Akira <akr@fsij.org>
+Sat Nov 12 21:14:51 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * ext/socket/extconf.rb: Redundant test removed.
+ * test/webrick/test_cgi.rb (class TestWEBrickCGI): respect
+ RbConfig::CONFIG["LIBPATHENV"]. [Bug #5135] [ruby-core:38653]
+ * test/webrick/test_filehandler.rb (class WEBrick): ditto.
-Sat Apr 27 16:00:10 2013 Tanaka Akira <akr@fsij.org>
+Sat Nov 12 20:57:29 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * ext/socket/extconf.rb (test_recvmsg_with_msg_peek_creates_fds):
- Extracted.
+ * test/ruby/test_io.rb (test_fcntl_dupfd): skip if Fcntl::DUPFD
+ is not defined. Pointed out by CHIKANAGA Tomoyuki. Thanks.
-Sat Apr 27 15:50:40 2013 Tanaka Akira <akr@fsij.org>
+Sat Nov 12 17:26:10 2011 Nobuyoshi Nakada <nobu@ruby-lang.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.
+ * io.c (do_ioctl, ioctl_narg_len, setup_narg, rb_ioctl): use
+ ioctl_req_t.
- * thread.c (TIMEVAL_SEC_MAX): Use SIGNED_INTEGER_MAX.
- (TIMEVAL_SEC_MIN): Use SIGNED_INTEGER_MIN.
+Sat Nov 12 17:01:49 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Apr 27 10:52:52 2013 Tanaka Akira <akr@fsij.org>
+ * ext/dbm/extconf.rb (headers.db_check): reduce duplicated code.
- * 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).
+Sat Nov 12 15:59:42 2011 Tanaka Akira <akr@fsij.org>
-Fri Apr 26 23:34:59 2013 Kouhei Sutou <kou@cozmixng.org>
+ * ext/dbm/extconf.rb: dbm_clearerr should be available in all ndbm
+ implementation. If it is not available, it is caused by
+ header/library mismatch such that Berkeley DB header & gdbm library.
- * 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.
+ * ext/dbm/dbm.c (fdbm_store): use dbm_clearerr() unconditionally.
+ gdbm 1.9 provides it as a real function instead of a empty macro.
-Fri Apr 26 22:53:55 2013 Kouhei Sutou <kou@cozmixng.org>
+Sat Nov 12 13:35:33 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * 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.
+ * bootstraptest/runner.rb: don't suppress SIGINT.
+ [Feature #5612] [ruby-dev:44856]
-Fri Apr 26 21:48:29 2013 Kouhei Sutou <kou@cozmixng.org>
+Sat Nov 12 11:20:36 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * lib/rss/atom.rb (RSS::Atom::Entry): Fix indent of document comment.
+ * io.c (fcntl_narg_len): introduce narg calculation for fcntl instead
+ of hard coded 256.
+ * io.c (setup_narg): ditto.
-Fri Apr 26 21:21:17 2013 Kouhei Sutou <kou@cozmixng.org>
+Sat Nov 12 11:19:35 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * lib/rss/maker.rb (RSS::Maker): Fix indent of document comment.
+ * test/ruby/test_io.rb (test_fcntl_dupfd): add another fcntl test.
-Fri Apr 26 18:41:04 2013 Tanaka Akira <akr@fsij.org>
+Sat Nov 12 11:18:17 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * ext/socket/extconf.rb: Use a block of enable_config() for
- --{enable,disable}-close-fds-by-recvmsg-with-peek configure option
+ * test/ruby/test_io.rb (test_fcntl_lock_freebsd): add a testcase
+ of fcntl lock for freebsd.
-Fri Apr 26 18:08:08 2013 Tanaka Akira <akr@fsij.org>
+Sat Nov 12 11:16:32 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * dir.c (dir_set_pos): Fix a compilation error when seekdir() is not
- exist.
+ * io.c (ioctl_narg_len): Linux doesn't have IOCPARM_LEN macro, but
+ has _IOC_SIZE. support it.
-Fri Apr 26 17:41:17 2013 Tanaka Akira <akr@fsij.org>
+Sat Nov 12 11:13:18 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * thread_pthread.c (ruby_init_stack): Add STACK_GROW_DIR_DETECTION.
- This fixes a compilation failure while cross-compiling for ARM.
+ * io.c (rb_ioctl): don't expose our sanity check value to ruby script.
+ It may change string value meaning if the value is string.
+ (e.g. MacOS X has F_GETPATH ioctl)
+ * io.c (rb_fcntl): ditto.
-Fri Apr 26 14:35:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Sat Nov 12 11:06:02 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * 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
+ * io.c (ioctl_req_t): Type of req argument of ioctl() depend on platform.
+ Moreover almost all linux ioctl can't be represented by 32bit integer
+ (i.e. MSB is 1). We need wrap ioctl argument type.
+ [Bug #5429] [ruby-dev:44589]
+ * io.c (struct ioctl_arg): ditto.
+ * io.c (rb_ioctl): ditto.
+ * test/ruby/test_io.rb (test_ioctl_linux): add a testcase for ioctl
-Fri Apr 26 12:41:22 2013 Tanaka Akira <akr@fsij.org>
+Sat Nov 12 11:00:42 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * ext/curses/extconf.rb: Test linkability of curses_version at first.
+ * io.c (struct io_cntl_arg): remove io_p member.
+ * io.c (nogvl_fcntl, do_fcntl, rb_fcntl): separated from ioctl functions.
+ * io.c (nogvl_io_cntl): remove fcntl depended logic.
+ * io.c (io_cntl): ditto.
+ * io.c (rb_io_ctl): ditto.
+ * io.c (rb_io_ioctl): ditto.
- * 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.
+Sat Nov 12 10:59:49 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Fri Apr 26 00:07:52 2013 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+ * io.c (setup_narg): fix off by one bug.
- * lib/rinda/ring.rb (Rinda::RingServer#initialize): accept array
- arguments of address to specify multicast interface.
+Sat Nov 12 10:56:43 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * lib/rinda/ring.rb (Rinda::RingServer#make_socket): add optional
- arguments for multicast interface.
+ * io.c (+setup_narg): factor out length calculation logic.
+ * io.c (rb_io_ctl): ditto.
- * test/rinda/test_rinda.rb
- (TestRingFinger#test_ring_server_ipv4_multicast,
- TestRingFinger#test_ring_server_ipv6_multicast): add tests for
- above change.
+Sat Nov 12 10:52:17 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * 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]
+ * io.c (+ioctl_narg_len) new helper function.
+ * io.c (rb_io_ctl): don't use ioctl specific length check
+ if caller is fcntl.
-Thu Apr 25 23:45:02 2013 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+Fri Nov 11 23:00:46 2011 Tanaka Akira <akr@fsij.org>
- * 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.
+ * ext/dbm/extconf.rb: db_prefix is not required now.
- * lib/rinda/ring.rb (Rinda::RingServer#make_socket): ditto.
+Fri Nov 11 21:13:30 2011 Tanaka Akira <akr@fsij.org>
-Thu Apr 25 23:39:42 2013 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+ * ext/gdbm/gdbm.c (fgdbm_initialize): use GDBM_CLOEXEC if available.
- * 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.
+Fri Nov 11 21:00:05 2011 Tanaka Akira <akr@fsij.org>
-Thu Apr 25 23:16:28 2013 Tanaka Akira <akr@fsij.org>
+ * ext/dbm/extconf.rb: fix dbm_pagfno and dbm_dirfno detection with
+ Berkeley DB. Macro definitions needs arguments to detect correctly.
+ SIZEOF_DSIZE needs -DDB_DBM_HSEARCH because db.h defines datum type
+ only if DB_DBM_HSEARCH is defined.
- * ext/curses/extconf.rb: Implement
- --with-curses-version={function,variable} configure option for
- cross-compiling.
+Fri Nov 11 18:41:57 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Apr 25 18:15:46 2013 Tanaka Akira <akr@fsij.org>
+ * process.c (proc_seteuid): separate an internal wrapper function
+ from the method implementation.
- * ext/socket/extconf.rb: Don't use WIDE getaddrinfo by default.
+Fri Nov 11 17:21:15 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Apr 25 17:56:39 2013 Tanaka Akira <akr@fsij.org>
+ * lib/mkmf.rb (have_library, find_library, have_func): allow
+ arguments of function to be checked.
- * ext/socket/extconf.rb: Remove obsolete options: ---with-ipv6-lib and
- --with-ipv6-libdir.
+Fri Nov 11 17:09:45 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Apr 25 17:43:49 2013 Tanaka Akira <akr@fsij.org>
+ * vm_dump.c (HAVE_BACKTRACE): fallback to 0.
- * 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.
+ * vm_dump.c (rb_vm_bugreport): show "Other runtime information"
+ header only when available.
-Thu Apr 25 16:11:06 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_dump.c (rb_vm_bugreport): get rid of modifying the content of
+ VM directly.
- * 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]
+ * vm_dump.c (rb_vm_bugreport): check if vm is non-null.
+ Pointed out by Ikegami Daisuke <ikegami.da@gmail.com>.
+ Thank you.
- * io.c (io_set_encoding_by_bom): reset extenal encoding if no BOM
- found. [ruby-core:54569]
+Fri Nov 11 12:36:37 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Thu Apr 25 14:35:01 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * io.c (pipe_open): Remove fflush(stdin). it's no effect.
+ Pointed out by Ikegami Daisuke <ikegami.da@gmail.com>.
+ Thank you.
- * ext/openssl/ossl_bn.c (ossl_bn_initialize): allow Fixnum and Bignum.
- [ruby-core:53986] [Feature #8217]
+Fri Nov 11 07:33:30 2011 Eric Hodel <drbrain@segment7.net>
-Thu Apr 25 14:26:32 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * lib/net/http.rb (Net::HTTP::SSL_ATTRIBUTES): Use symbol keys instead
+ of string keys to avoid duplicating parameters in
+ OpenSSL::SSL:SSLContext#set_params.
- * 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]
+Thu Nov 10 15:02:37 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * 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.
+ * lib/mkmf.rb (have_library, have_func, have_var, have_header):
+ add compiler option parameter.
-Wed Apr 25 14:26:00 2013 Charlie Somerville <charlie@charliesomerville.com>
+Thu Nov 10 07:45:16 2011 Eric Hodel <drbrain@segment7.net>
- * benchmark/bm_hash_shift.rb: add benchmark for Hash#shift
+ * ext/openssl/lib/openssl/ssl.rb (class OpenSSL::SSL::SSLContext):
+ Document #set_params.
- * hash.c (rb_hash_shift): use st_shift if hash is not being iterated to
- delete element without iterating the whole hash.
+Wed Nov 9 11:36:53 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * hash.c (shift_i): remove function
+ * thread_pthread.c (gvl_yield): don't prevent concurrent sched_yield().
+ [Bug #5130] [ruby-core:38647]
- * include/ruby/st.h (st_shift): add st_shift function
+Wed Nov 9 23:20:22 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * st.c (st_shift): ditto
+ * io.c (rb_update_max_fd): fstat(2) can fail with other than
+ EBADF. [ruby-dev:44837] [Bug #5593]. Cf.
+ http://pubs.opengroup.org/onlinepubs/9699919799/functions/fstat.html
- [Bug #8312] [ruby-core:54524] Patch by funny-falcon
+ * io.c (rb_sysopen): max fd is updated in rb_sysopen_internal()
+ already.
-Thu Apr 25 12:03:38 2013 Tanaka Akira <akr@fsij.org>
+Wed Nov 9 22:13:38 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * ext/socket/extconf.rb: Extract C programs as toplevel constants.
+ * test/ruby/test_file.rb (TestFile#test_utime_with_minus_time_segv):
+ fixed previous commit.
-Thu Apr 25 02:23:28 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Nov 9 19:53:45 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * configure.in (RUBY_RM_RECURSIVE): this hack is needed by only
- autoconf 2.69 or earlier on darwin.
+ * test/ruby/test_file.rb (TestFile#test_utime_with_minus_time_segv):
+ add test for r33685.
-Thu Apr 25 01:22:41 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Nov 9 19:00:44 2011 Koichi Sasada <ko1@atdot.net>
- * lib/tracer.rb (get_line): simply read by File.readlines.
+ * test/ruby/test_fiber.rb: add tests for r33684 (Fiber#resume).
- * lib/debug.rb (script_lines): get source lines from SCRIPT_LINES__ or
- read from the file.
+Wed Nov 9 16:40:49 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * lib/debug.rb (display_list): use script_lines instead of recursion.
- [Bug #8318]
+ * win32/win32.c (unixtime_to_filetime): should check the return value
+ of localtime(). reported by snowjail at gmail.com.
+ [ruby-dev:44838] [Bug #5596]
- * lib/debug.rb (line_at): use script_lines same as display_list.
+Thu Nov 9 13:17:25 2011 Koichi Sasada <ko1@atdot.net>
- * 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]
+ * cont.c (rb_fiber_m_transfer, rb_fiber_resume): prohibit using
+ "resume" after "transfer" method are used. You should not mix
+ "resume" fiber and "transfer" fiber.
+ [Bug #5526]
-Wed Apr 24 21:51:13 2013 Tanaka Akira <akr@fsij.org>
+ * NEWS: add information about this change.
- * configure.in: Check mblen().
- mblen() is optional in uClibc.
+Wed Nov 9 11:40:37 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval_intern.h (CharNext): Don't use mblen() is not available.
+ * template/Doxyfile.tmpl (INCLUDE_PATH): add srcdir and include.
+ [ruby-core:40843] [Bug #5597]
-Wed Apr 24 15:55:06 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Wed Nov 9 11:02:54 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * io.c (rb_fd_fix_cloexec): use rb_update_max_fd().
+ * thread.c (do_select): fix cast, tv_sec is time_t.
-Wed Apr 24 14:08:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Wed Nov 9 10:32:20 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * numeric.c: Fix wiki link on Float imprecision in overview, patched
- by Makoto Kishimoto [Bug #8304] [ruby-dev:47280]
+ * configure.in: should not use test -e for portability.
+ [ruby-core:40841] [Bug #5594]
-Wed Apr 24 14:03:59 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Nov 9 04:52:16 2011 Aaron Patterson <aaron@tenderlovemaking.com>
- * parse.y (parser_yylex): disallow $- without following identifier
- character. [ruby-talk:406969]
+ * ext/psych/lib/psych/tree_builder.rb: dump complex numbers,
+ rationals, etc with reference ids.
+ * ext/psych/lib/psych/visitors/yaml_tree.rb: ditto
+ * ext/psych/lib/psych/visitors/to_ruby.rb: loading complex numbers,
+ rationals, etc with reference ids.
+ * test/psych/test_object_references.rb: corresponding tests
- * parse.y (is_special_global_name): mere $- is not a valid global
- variable name.
+Tue Nov 8 23:34:37 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Apr 24 13:54:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * ext/dbm/dbm.c (fdbm_fetch, fdbm_key, fdbm_delete, fdbm_store)
+ (fdbm_has_key, fdbm_has_value): get rid of overflow.
- * string.c: Document String#setbyte return value by @gjmurakami-10gen
- [Fixes GH-294]
+ * ext/gdbm/gdbm.c (rb_gdbm_fetch2, rb_gdbm_nextkey)
+ (rb_gdbm_delete, fgdbm_store, fgdbm_has_key): ditto.
-Wed Apr 24 13:45:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * ext/dbm/dbm.c (fdbm_delete_if): hide intermediate objects.
- * class.c: Example of Object#methods by @windwiny [Fixes GH-293]
- * ruby.c: Document return values of Kernel #sub, #gsub, and #chop
+ * ext/gdbm/gdbm.c (fgdbm_delete_if): ditto.
-Wed Apr 24 12:54:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * ext/dbm/extconf.rb: check size of datum.dsize to get rid of
+ overflow.
- * ext/socket/lib/socket.rb: Doc typos by @vipulnsward [Fixes GH-292]
+Tue Nov 8 23:30:21 2011 NARUSE, Yui <naruse@ruby-lang.org>
+ * addr2line.c (PATH_MAX): define if not defined. [ruby-core:40840]
-Wed Apr 24 12:54:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Tue Nov 8 23:26:49 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/socket/lib/socket.rb: Doc typos by @vipulnsward [Fixes GH-292]
+ * ext/tk/tcltklib.c (rb_thread_critical): fix type.
-Wed Apr 24 12:27:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * ext/tk/tcltklib.c (eventloop_sleep, lib_eventloop_core): int is
+ enough for micro seconds. may need to check overflow in the
+ setter though.
- * array.c: Fix documentation for Array#index and #replace aliases
- Based on a patch by @phiggins [Fixes GH-282]
+ * ext/tk/tcltklib.c (RSTRING_LENINT): check overflow if necessary.
-Tue Apr 23 21:14:38 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * ext/tk/tcltklib.c (RbTk_ALLOC_N): wrapper for ckalloc() which
+ takes an int.
- * 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]
+ * ext/tk/tcltklib.c (ip_ruby_cmd_receiver_get, tcltklib_compile_info):
+ get rid overflow.
-Tue Apr 23 20:10:02 2013 Tanaka Akira <akr@fsij.org>
+ * ext/tk/tcltklib.c (tcltklib_compile_info): constified.
- * missing/isnan.c (isnan): Don't define if isnan() macro is defined.
- This fixes a compilation failure on uClibc based Gentoo system.
+Tue Nov 8 20:50:45 2011 Tanaka Akira <akr@fsij.org>
-Tue Apr 23 17:40:40 2013 Martin Duerst <duerst@it.aoyama.ac.jp>
+ * test/dbm/test_dbm.rb: split tests for read only database.
- * lib/rexml/document.rb, lib/rexml/element.rb,
- lib/rexml/formatters/pretty.rb: remove opinionated
- language in documentation. [Bug #8309],
- reported by Charles Beckmann
+ * test/gdbm/test_gdbm.rb: ditto.
-Tue Apr 23 14:04:44 2013 Shugo Maeda <shugo@ruby-lang.org>
+Tue Nov 8 18:59:07 2011 Tanaka Akira <akr@fsij.org>
- * lib/net/imap.rb (getacl_response): parse the mailbox of an ACL
- response correctly. [ruby-core:54365] [Bug #8281]
+ * ext/pty/pty.c (MasterDevice): define only when used.
+ (SlaveDevice): ditto.
+ (deviceNo): ditto.
-Tue Apr 23 11:58:46 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Nov 8 17:59:24 2011 Nobuyoshi Nakada <nobu@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]
+ * include/ruby/ruby.h (rb_long2int): define as a macro always, so
+ that cpp conditionals can tell if it is provided.
-Tue Apr 23 10:26:50 2013 Akinori MUSHA <knu@iDaemons.org>
+Tue Nov 8 17:30:50 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/ruby/test_module.rb
- (TestModule#test_const_get_invalid_name)
- (test_const_defined_invalid_name): Fix expected values.
+ * lib/mkmf.rb (cpp_command): remove multiple -arch flags since cpp
+ cannot work.
-Tue Apr 23 09:51:26 2013 Akinori MUSHA <knu@iDaemons.org>
+Tue Nov 8 14:50:55 2011 NAKAMURA Usaku <usa@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]
+ * io.c (io_fwrite): call rb_w32_write_console() only if FMODE_TTY is
+ set. this is the one of the reason of IO writing slowness of Windows
+ in 1.9.3 or later.
-Mon Apr 22 22:54:00 2013 Charlie Somerville <charlie@charliesomerville.com>
+Tue Nov 8 11:01:04 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * insns.def (opt_mod): Use % operator if both operands are positive for
- a significant performance improvement. Thanks to @samsaffron.
+ * ext/pty/pty.c (get_device_once): FreeBSD 8 supported O_CLOEXEC flag
+ for posix_openpt, but FreeBSD 9's posix_openpt doesn't support
+ O_CLOEXEC and fails if specified.
-Mon Apr 22 17:09:37 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Nov 8 02:36:45 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * marshal.c (r_object0): copy all instance variables not only generic
- ivars, before calling post proc. [ruby-core:51163] [Bug #7627]
+ * include/ruby/encoding.h (ECONV_NEWLINE_DECORATOR_READ_MASK,
+ ECONV_NEWLINE_DECORATOR_WRITE_MASK): new macro.
-Mon Apr 22 10:25:21 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * io.c (rb_io_extract_modeenc, pipe_open, prep_stdio, argf_next_argv):
+ set TEXTMODE_NEWLINE_DECORATOR_ON_WRITE for textmode on creating IO
+ if the flag is available.
- * 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.
+ * io.c (make_writeconv): drop decorators for reading.
-Sun Apr 21 23:19:00 2013 Charlie Somerville <charlie@charliesomerville.com>
+ * io.c (make_readconv): drop decorators for writing.
- * configure.in: Revert using sigsetjmp by default due to performance
- problems on some systems (eg. older Linux)
+ * io.c (do_writeconv): existing writeconv is not the condition to raise
+ ArgumentError. should check textmode or not.
-Sun Apr 21 21:35:00 2013 Charlie Somerville <charlie@charliesomerville.com>
+ * test/ruby/test_io_m17n.rb
+ (TestIO_M17N#test_{cr,lf,crlf}_decorator_on_stdout): test above
+ changes.
- * 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]
+Mon Nov 7 22:03:47 2011 Tanaka Akira <akr@fsij.org>
- * configure.in: Manually check for presence of sigsetjmp. It is not a
- function on some systems, so AC_CHECK_FUNCS cannot be used.
+ * ext/gdbm/gdbm.c (fgdbm_initialize): set close-on-exec flag.
-Sun Apr 21 08:00:55 2013 Tanaka Akira <akr@fsij.org>
+Mon Nov 7 20:31:52 2011 Aaron Patterson <aaron@tenderlovemaking.com>
- * 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.
+ * ext/psych/lib/psych/scalar_scanner.rb: make sure strings that look
+ like base 60 numbers are serialized as quoted strings.
+ * test/psych/test_string.rb: test for change.
-Sun Apr 21 00:15:36 2013 Tanaka Akira <akr@fsij.org>
+Mon Nov 7 20:26:37 2011 Aaron Patterson <aaron@tenderlovemaking.com>
- * lib/tempfile.rb (Tempfile.create): Close when the block exits.
+ * test/psych/test_yamlstore.rb: make test case inherit from MiniTest,
+ load psych/helper so that psych is loaded.
-Sat Apr 20 23:38:14 2013 Tanaka Akira <akr@fsij.org>
+Mon Nov 7 20:18:29 2011 Aaron Patterson <aaron@tenderlovemaking.com>
- * lib/webrick/httpauth/htpasswd.rb: Use Tempfile.create to avoid
- unintentional unlink() by the finalizer.
- lib/webrick/httpauth/htdigest.rb: Ditto.
+ * test/psych/test_yamldbm.rb: Test case should inherit from MiniTest,
+ load psych/helper so that psych and friends are loaded.
-Sat Apr 20 22:47:48 2013 Tanaka Akira <akr@fsij.org>
+Mon Nov 7 20:15:44 2011 Tanaka Akira <akr@fsij.org>
- * lib/tempfile.rb (Tempfile.create): New method.
- The method name is proposed by Shugo Maeda. [ruby-dev:47220]
- [ruby-core:41478] [Feature #5707]
+ * ext/dbm/extconf.rb: check dbm_pagfno() and dbm_dirfno().
-Sat Apr 20 14:22:10 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/dbm/dbm.c: use above to set close-on-exec flag.
- * marshal.c (w_object): dump no ivars to the original by marshal_dump.
- [ruby-core:54334] [Bug #8276]
+Mon Nov 7 20:05:16 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * marshal.c (r_object0): copy all ivars of marshal_dump data to the
- result object instead. [ruby-core:51163] [Bug #7627]
+ * io.c (io_fflush): remove fsync().
-Sat Apr 20 02:33:27 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * io.c (rb_io_flush, rb_io_rewind): fsync() here.
- * string.c (str_scrub): add ruby method String#scrub which verify and
- fix invalid byte sequence. [ruby-dev:45975] [Feature #6752]
+ these changes reduces fsync() calls to improve performance.
+ first reported at [ruby-list:48515] by ak7 at mail.goo.ne.jp .
+ [Bug #5585]
- * string.c (str_compat_and_valid): check given string is compatible
- and valid with given encoding.
+Mon Nov 7 19:43:10 2011 Tanaka Akira <akr@fsij.org>
- * 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.
+ * io.c (rb_close_before_exec): use F_MAXFD if available.
+ F_MAXFD is available on NetBSD since NetBSD 2.0.
-Fri Apr 19 21:55:40 2013 Kouhei Sutou <kou@cozmixng.org>
+Mon Nov 7 19:25:16 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * 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]
+ * test/ruby/test_io_m17n.rb
+ (TestIO_M17N#test_default_stdout_stderr_mode): new test for
+ r33627-33629. see [backport #5565]
-Fri Apr 19 17:54:57 2013 Shugo Maeda <shugo@ruby-lang.org>
+Mon Nov 7 01:14:22 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * lib/net/imap.rb (body_type_msg): should accept
- message/delivery-status with extra data.
- [ruby-core:53741] [Bug #8167]
+ * lib/debug.rb: add help for 'pp' and 'r[estart]'. patch
+ from Sho Hashimoto. [Bug #5093] [ruby-dev:44222]
- * test/net/imap/test_imap_response_parser.rb: related test.
+Sun Nov 6 14:49:58 2011 Tanaka Akira <akr@fsij.org>
-Fri Apr 19 13:03:14 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/socket/rubysocket.h (rsock_recvmsg): declared.
- * marshal.c (w_object): do not dump encoding which is dumped with
- marshal_dump data. [ruby-core:54334] [Bug #8276]
+ * ext/socket/ancdata.c (rsock_recvmsg): extracted from
+ nogvl_recvmsg_func.
+ (nogvl_recvmsg_func): use rsock_recvmsg.
-Fri Apr 19 11:36:53 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/socket/unixsocket.c (recvmsg_blocking): use rsock_recvmsg.
- * configure.in (stack_protector): control use of -fstack-protector.
+Sun Nov 6 03:22:36 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * configure.in (debugflags): let -fstack-protector precede and disable
- debugflags, because they can't work together on SmartOS. [Bug #8268]
+ * test/openssl/test_engine.rb: add test for engine cipher. RC4 is used
+ because AES is not supported by the "openssl" engine currently.
-Fri Apr 19 07:43:52 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Sun Nov 6 00:11:52 2011 Tanaka Akira <akr@fsij.org>
- * test/openssl/test_cipher.rb: Correct a typo
- by jgls <joerg@joergleis.com>
- https://github.com/ruby/ruby/pull/291 fix GH-291
+ * lib/test/unit.rb (Test::Unit::Options#non_options): options[:ruby]
+ should be an array. This fixes
+ "./ruby test/runner.rb test/testunit/test_parallel.rb"
+ [ruby-dev:44782]
-Thu Apr 18 16:58:51 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Nov 5 20:30:30 2011 Martin Duerst <duerst@it.aoyama.ac.jp>
- * 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]
+ * insns.def: Some fixes and tweaks to English explanations
-Thu Apr 18 16:20:51 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Nov 5 19:11:50 2011 Tanaka Akira <akr@fsij.org>
- * 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]
+ * io.c (rb_cloexec_fcntl_dupfd): don't clear try_dupfd_cloexec if
+ fcntl(F_DUPFD) failed as fcntl(F_DUPFD_CLOEXEC).
-Thu Apr 18 16:20:21 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Nov 5 18:05:12 2011 Tanaka Akira <akr@fsij.org>
- * pack.c (pack_unpack): increase buffer size to fix buffer overflow,
- and fix garbage just after unpacking without missing paddings.
- [Bug #8286]
+ * ext/socket/socket.c (rsock_socketpair0): refactored.
-Thu Apr 18 13:35:54 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Sat Nov 5 17:55:52 2011 Tanaka Akira <akr@fsij.org>
- * pack.c (pack_unpack): output characters even if the input doesn't
- have paddings. [Bug #8286]
+ * ext/socket/init.c (rsock_socket0): don't clear try_sock_cloexec if
+ SOCK_CLOEXEC is not a reason for EINVAL.
-Thu Apr 18 08:20:48 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Sat Nov 5 16:27:52 2011 Kazuki Tsujimoto <kazuki@callcc.net>
- * common.mk (clean-ext): remove timestamps.
+ * ext/pathname/lib/pathname.rb, ext/tk/lib/multi-tk.rb,
+ ext/tk/sample/demos-en/widget, lib/benchmark.rb, lib/irb/cmd/fork.rb,
+ lib/mkmf.rb, lib/net/ftp.rb, lib/net/smtp.rb, lib/open3.rb,
+ lib/pstore.rb, lib/rexml/element.rb, lib/rexml/light/node.rb,
+ lib/rinda/tuplespace.rb, lib/rss/maker/base.rb,
+ lib/rss/maker/entry.rb, lib/scanf.rb, lib/set.rb, lib/shell.rb,
+ lib/shell/command-processor.rb, lib/shell/process-controller.rb,
+ lib/shell/system-command.rb, lib/uri/common.rb: remove unused block
+ arguments to avoid creating Proc objects.
-Wed Apr 17 22:07:50 2013 Tanaka Akira <akr@fsij.org>
+Sat Nov 5 15:45:04 2011 Tanaka Akira <akr@fsij.org>
- * ext/socket/rubysocket.h (SOCKLEN_MAX): Expression simplified.
+ * ext/socket/init.c (rsock_socket0): extract single socket() call with
+ CLOEXEC handling from rsock_socket.
-Wed Apr 17 20:09:19 2013 Aman Gupta <ruby@tmm1.net>
+Sat Nov 5 13:49:40 2011 Kazuki Tsujimoto <kazuki@callcc.net>
- * compile.c (iseq_add_mark_object): Use new rb_iseq_add_mark_object().
+ * lib/pathname.rb (Pathname#find): return an enumerator if
+ no block is given.
- * insns.def (setinlinecache): Ditto.
+ * test/pathname/test_pathname.rb: add tests for above.
- * iseq.c (rb_iseq_add_mark_object): New function to allocate
- iseq->mark_ary on demand. [Bug #8142]
+ [ruby-dev:44797] [Feature #5572]
- * iseq.h (rb_iseq_add_mark_object): Ditto.
+Sat Nov 5 11:18:12 2011 Tanaka Akira <akr@fsij.org>
- * iseq.c (prepare_iseq_build): Avoid allocating mark_ary until needed.
+ * ext/socket/socket.c (rsock_socketpair0): don't clear
+ try_sock_cloexec if SOCK_CLOEXEC is not a reason for EINVAL.
- * iseq.c (rb_iseq_build_for_ruby2cext): Ditto.
+Fri Nov 4 14:08:19 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
-Wed Apr 17 20:00:18 2013 Tanaka Akira <akr@fsij.org>
+ * ext/openssl/ossl_pkey_rsa.c (rsa_generate): [SECURITY] Set RSA
+ exponent value correctly. Awful bug. This bug caused exponent of
+ generated key to be always '1'. By default, and regardless of e
+ given as a parameter.
- * ext/socket/rubysocket.h (SOCKLEN_MAX): Defined.
+ !!! Keys generated by this code (trunk after 2011-09-01) must be
+ re-generated !!! (ruby_1_9_3 is safe)
- * ext/socket/raddrinfo.c (ext/socket/raddrinfo.c): Reject too long
- Linux abstract socket name.
+ * test/openssl/test_pkey_rsa.rb: Add tests for default exponent and
+ specifying exponent by a parameter.
-Wed Apr 17 19:45:27 2013 Aman Gupta <tmm1@ruby-lang.org>
+Fri Nov 4 01:31:25 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * iseq.c (iseq_location_setup): re-use existing string when iseq has
- the same path and absolute_path. [Bug #8149]
+ * test/openssl/test_engine.rb: add first tests for builtin "openssl"
+ engine.
-Wed Apr 17 11:38:37 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Nov 4 08:41:26 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * lib/test/unit/assertions.rb (Test::Unit::Assertions#assert):
- UNASSIGNED is not a valid message.
+ * ext/openssl/extconf.rb:
+ * ext/openssl/ossl_engine.c: add some missing OpenSSL engines.
+ Thanks, Yui Naruse, for providing the patch!
+ [Bug #5548] [ruby-core:40670]
-Wed Apr 17 10:58:18 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Nov 4 04:54:10 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * thread.c (sleep_timeval): get rid of overflow on Windows where
- timeval.tv_sec is not time_t but mere long.
+ * win32/configure.bat: disable delayed expansion of enironment variable.
+ [Bug #5517] [ruby-core:40531]
-Tue Apr 16 23:07:12 2013 Tanaka Akira <akr@fsij.org>
+Fri Nov 4 03:45:22 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * ext/socket/unixsocket.c (unix_send_io): Suppress a warning by clang.
- (unix_recv_io): Ditto.
+ * io.c (make_writeconv): fixed typo of previous commit.
-Tue Apr 16 12:27:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Fri Nov 4 01:56:30 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * ext/sdbm/init.c: Fix comment indentation, by windwiny [Fixes GH-277]
+ * io.c (make_writeconv): unversal_newline converter is for reading.
+ so, if the io is text mode and has ECONV_UNIVERSAL_NEWLINE_DECORATOR
+ flag, use crlf_newline converter for writing.
+ this change fixes the problem about the luck of CR up Kernel.p and
+ Kernel.puts to stdout/stderr on Windows.
-Tue Apr 16 12:25:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Fri Nov 4 01:04:48 2011 NARUSE, Yui <naruse@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
+ * ext/readline/readline.c (Init_readline): like r18313, libedit's
+ replace_history_entry may use offset instead of which.
+ so introduce history_replace_offset_func and initialize it.
-Tue Apr 16 11:23:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * ext/readline/readline.c (hist_set): use history_replace_offset_func.
- * ext/openssl/*: Document synonymous methods, by windwiny [GH-277]
+Fri Nov 4 00:53:35 2011 NARUSE, Yui <naruse@ruby-lang.org>
-Mon Apr 15 22:21:42 2013 Tanaka Akira <akr@fsij.org>
+ * ext/readline/readline.c (Init_readline): fix wrong condition.
- * ext/fiddle/depend: New file.
+Thu Nov 3 23:53:04 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-Mon Apr 15 22:01:02 2013 Akinori MUSHA <knu@iDaemons.org>
+ * encoding.c (rb_locale_charmap): ignore calling nl_langinfo_codeset()
+ on Windows except cygwin. [experimental]
- * misc/ruby-electric.el (ruby-electric-insert): Check
- ruby-electric-is-last-command-char-expandable-punct-p here.
+Thu Nov 3 22:45:09 2011 Tanaka Akira <akr@fsij.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 "{ } }".
+ * ext/socket/socket.c (rsock_socketpair0): extracted from
+ rsock_socketpair to set close-on-exec flag for each socketpair()
+ call.
-Mon Apr 15 12:54:42 2013 Martin Bosslet <Martin.Bosslet@gmail.com>
+Thu Nov 3 22:12:41 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * ext/openssl/ossl_ssl.c: Correct shutdown behavior w.r.t GC.
+ * ext/socket/init.c (rsock_socket): set close-on-exec flag when
+ SOCK_CLOEXEC is not available.
- * test/openssl/test_ssl.rb: Add tests to verify correct behavior.
+Thu Nov 3 08:36:00 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
- [Bug #8240] Patch provided by Shugo Maeda. Thanks!
+ * test/openssl/test_engine.rb: call Engine::cleanup on exit.
+ Patch provided by Yui Naruse, thanks!
+ [Bug #5547] [ruby-core:40669]
-Mon Apr 15 10:23:39 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Wed Nov 2 21:36:00 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/coverage/depend: fix id.h place as r40283.
+ * complex.c (nucomp_rationalize): fix function. [ruby-core:40667]
+ [Bug #5546]
- * ext/coverage/extconf.rb: add topdir and topsrcdir to VPATH.
+Wed Nov 2 08:16:45 2011 Tanaka Akira <akr@fsij.org>
-Sun Apr 14 19:46:14 2013 Tanaka Akira <akr@fsij.org>
+ * lib/webrick/utils.rb: fix fcntl call.
- * ext/-test-/debug/depend: New file.
+ * lib/drb/unix.rb: ditto.
- * ext/-test-/exception/depend: Ditto.
+Wed Nov 2 00:43:59 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * ext/-test-/printf/depend: Ditto.
+ * test/psych/test_yamldbm.rb: avoid platform dependency.
+ patch by Naohisa Goto. [ruby-dev:44763] [Bug #5535]
+ * test/syck/test_yamldbm.rb: ditto.
- * ext/-test-/string/depend: Ditto.
+Wed Nov 2 00:14:15 2011 Shugo Maeda <shugo@ruby-lang.org>
- * ext/coverage/depend: Ditto.
+ * test/ruby/test_marshal.rb: renamed methods duplicated with those
+ of marshaltestlib.rb.
- * ext/io/console/depend: Ditto.
+Tue Nov 1 22:08:27 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/io/nonblock/depend: Ditto.
+ * configure.in: reject llvm-gcc.
- * ext/io/wait/depend: Ditto.
+Tue Nov 1 21:39:00 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * ext/openssl/depend: Ditto.
+ * io.c (rb_cloexec_pipe): remove workaround of r33587.
+ The bug of NetBSD is fixed on Mon Oct 31 21:31:29 UTC 2011.
+ http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=45545
- * ext/pathname/depend: Ditto.
+Tue Nov 1 19:49:08 2011 Tanaka Akira <akr@fsij.org>
- * ext/psych/depend: Ditto.
+ * io.c (rb_io_reopen): call rb_fd_fix_cloexec instead of
+ rb_maygvl_fd_fix_cloexec.
- * ext/zlib/depend: Ditto.
+Tue Nov 1 19:00:30 2011 Tanaka Akira <akr@fsij.org>
-Sun Apr 14 02:46:50 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * io.c (rb_io_reopen): call rb_maygvl_fd_fix_cloexec after freopen().
- * lib/mkmf.rb (MakeMakefile#create_makefile): remove {$(VPATH)} other
- than nmake.
+Tue Nov 1 17:17:26 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * ext/ripper/depend: use VPATH expecting removed by above.
+ * file.c (file_expand_path): reset coderange after expanding path.
-Sat Apr 13 23:06:20 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Nov 1 14:55:29 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * lib/mkmf.rb (timestamp_file): gather timestamp files in one
- directory from each extension directories.
+ * io.c (nogvl_io_cntl): rb_cloexec_fcntl_dupfd's 2nd argument is int.
-Sat Apr 13 21:09:02 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * process.c (move_fds_to_avoid_crash): ditto.
- * lib/mkmf.rb (MakeMakefile#create_makefile): output new macro
- disthdrdir to specify the path of id.h, parse.h and etc.
+Tue Nov 1 13:14:33 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * ext/ripper/depend: use above macro.
+ * vsnprintf.c (BSD_vfprintf): support 'll' prefix.
-Sat Apr 13 20:28:08 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * vsnprintf.c (__sfeof): rename to avoid the collision with NetBSD's
+ one.
- * Merge Onigmo 5.13.4 f22cf2e566712cace60d17f84d63119d7c5764ee.
- [bug] fix problem with optimization of \z (Issue #16) [Bug #8210]
+ * vsnprintf.c (__sferror): ditto.
-Sat Apr 13 18:56:15 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * vsnprintf.c (__sclearerr): ditto.
- * ext/ripper/depend: parse.h and id.h may be created on topdir.
+ * vsnprintf.c (__sfileno): ditto.
-Sat Apr 13 12:08:16 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+Tue Nov 1 12:36:16 2011 Tanaka Akira <akr@fsij.org>
- * lib/matrix.rb: Add Vector#cross_product, patch by Luis Ezcurdia
- [fix GH-276] [rubyspec:81eec89a124]
+ * internal.h (rb_maygvl_fd_fix_cloexec): change the visibility for
+ ext/socket.
-Sat Apr 13 10:20:37 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Nov 1 12:00:53 2011 Tanaka Akira <akr@fsij.org>
- * struct.c (rb_struct_define_without_accessor, rb_struct_define),
- (rb_struct_s_def): hide member names array.
+ * io.c (rb_maygvl_fd_fix_cloexec): renamed from fd_set_cloexec.
- * struct.c (anonymous_struct, new_struct, setup_struct): split
- make_struct() for each purpose.
+ * internal.h (rb_maygvl_fd_fix_cloexec): declared.
-Sat Apr 13 09:34:31 2013 Tanaka Akira <akr@fsij.org>
+ * ext/socket/init.c (cloexec_accept): use rb_maygvl_fd_fix_cloexec.
+ (rsock_s_accept_nonblock): use rb_update_max_fd.
+ (rsock_s_accept): use rb_update_max_fd.
- * 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.
+Tue Nov 1 08:24:40 2011 Tanaka Akira <akr@fsij.org>
- * ext/-test-/old_thread_select/depend: Update dependencies.
+ * ext/socket/init.c (cloexec_accept): new function to use accept4 if
+ available.
+ (rsock_s_accept_nonblock): use cloexec_accept.
+ (accept_blocking): ditto.
- * ext/-test-/wait_for_single_fd/depend: Ditto.
+ * ext/socket/extconf.rb: check accept4.
- * ext/bigdecimal/depend: Ditto.
+Tue Nov 1 07:31:55 2011 Tanaka Akira <akr@fsij.org>
- * ext/curses/depend: Ditto.
+ * ext/socket/ancdata.c (nogvl_recvmsg_func): use MSG_CMSG_CLOEXEC if
+ available.
- * ext/digest/bubblebabble/depend: Ditto.
+ * ext/socket/unixsocket.c (recvmsg_blocking): ditto.
- * ext/digest/depend: Ditto.
+Tue Nov 1 05:59:41 2011 Tanaka Akira <akr@fsij.org>
- * ext/digest/md5/depend: Ditto.
+ * ext/socket/socket.c (rsock_socketpair): use SOCK_CLOEXEC if
+ available.
- * ext/digest/rmd160/depend: Ditto.
+Tue Nov 1 02:56:17 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * ext/digest/sha1/depend: Ditto.
+ * ruby.c (load_file_internal): convert the encoding of load path if
+ needed by platform. calling open() was replaced by rb_cloexec_open()
+ at r33549, but the function expected UTF-8 pathname on Windows.
+ (open() expected "locale" pathname.)
+ reported by taco via IRC.
- * ext/digest/sha2/depend: Ditto.
+ * ruby.c (load_file): change the type of the 2nd parameter to pass its
+ encoding to load_file_internal().
- * ext/dl/callback/depend: Ditto.
+ * ruby.c (process_options, rb_load_file): follow above change.
+ NOTE: we should pass encoding information to rb_load_file().
- * ext/dl/depend: Ditto.
+Mon Oct 31 23:49:38 2011 Tanaka Akira <akr@fsij.org>
- * ext/etc/depend: Ditto.
+ * ext/socket/socket.c (rsock_socketpair): extracted from
+ rsock_sock_s_socketpair.
- * ext/nkf/depend: Ditto.
+Mon Oct 31 23:31:53 2011 Tanaka Akira <akr@fsij.org>
- * ext/objspace/depend: Ditto.
+ * ext/socket/init.c (rsock_socket): use SOCK_CLOEXEC if available.
- * ext/pty/depend: Ditto.
+Mon Oct 31 21:47:44 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * ext/readline/depend: Ditto.
+ * io.c (rb_cloexec_pipe): NetBSD 6.0 will support pipe2(2),
+ but its return value is -1 or larger than 0.
- * ext/ripper/depend: Ditto.
+Mon Oct 31 22:04:54 2011 Tanaka Akira <akr@fsij.org>
- * ext/sdbm/depend: Ditto.
+ * ext/dbm/dbm.c (fdbm_initialize): use O_CLOEXEC if available.
- * ext/socket/depend: Ditto.
+Mon Oct 31 21:47:48 2011 Tanaka Akira <akr@fsij.org>
- * ext/stringio/depend: Ditto.
+ * include/ruby/intern.h (rb_fd_fix_cloexec): renamed from
+ rb_fd_set_cloexec.
- * ext/strscan/depend: Ditto.
+ * io.c: follow the above renaming.
- * ext/syslog/depend: Ditto.
+ * ext/pty/pty.c: ditto.
- * ext/-test-/num2int/depend: Removed.
+ * ext/socket/init.c: ditto.
- * ext/dbm/depend: Ditto.
+ * ext/socket/socket.c: ditto.
- * ext/fcntl/depend: Ditto.
+ * ext/socket/ancdata.c: ditto.
- * ext/gdbm/depend: Ditto.
+ * ext/socket/unixsocket.c: ditto.
- * ext/racc/cparse/depend: Ditto.
+Mon Oct 31 21:02:43 2011 Tanaka Akira <akr@fsij.org>
-Sat Apr 13 00:15:54 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/resolv.rb (Resolv::DNS): retry IO.select for premature wakeup.
- * ext/etc/etc.c (Init_etc): move Passwd and Group under Etc namespace
- as primary names.
+Mon Oct 31 20:14:22 2011 Tanaka Akira <akr@fsij.org>
-Fri Apr 12 21:06:55 2013 Tanaka Akira <akr@fsij.org>
+ * io.c (fd_set_cloexec): clear CLOEXEC flag for standard file
+ descriptors.
+ (rb_cloexec_dup): use rb_cloexec_fcntl_dupfd.
+ (rb_cloexec_fcntl_dupfd): use F_DUPFD_CLOEXEC if available.
- * common.mk: pack.o depends on internal.h.
+Mon Oct 31 19:14:11 2011 Tanaka Akira <akr@fsij.org>
-Fri Apr 12 20:59:24 2013 Tanaka Akira <akr@fsij.org>
+ * test/resolv/test_dns.rb: don't check maximum slept time.
+ ruby doesn't guarantee the maximum time because it is not a
+ realtime application.
- * bignum.c (ones): Use __builtin_popcountl if available.
+Mon Oct 31 13:10:06 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * internal.h (GCC_VERSION_SINCE): Macro moved from pack.c.
+ * win32/win32.c (setfl): extract from fcntl().
- * pack.c: Include internal.h for GCC_VERSION_SINCE.
+ * win32/win32.c (dupfd): new function to support F_DUPFD. based on a
+ patch written by akr.
-Fri Apr 12 18:29:42 2013 Tanaka Akira <akr@fsij.org>
+ * win32/win32.c (fcntl): use above functions.
- * 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]
+ * include/ruby/win32.h (F_DUPFD): define. [experimental]
-Fri Apr 12 15:21:24 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * include/ruby/win32.h (F_SETFL): change the value to correspond with
+ other platforms.
- * vm_insnhelper.c (vm_callee_setup_keyword_arg): non-symbol key is not
- a keyword argument, keep it as a positional argument.
+Mon Oct 31 12:37:50 2011 Tanaka Akira <akr@fsij.org>
-Fri Apr 12 11:58:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * ext/pty/pty.c (get_device_once): use O_CLOEXEC for posix_openpt if
+ available.
- * 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
+Mon Oct 31 12:05:24 2011 Tanaka Akira <akr@fsij.org>
-Thu Apr 11 23:41:46 2013 Tanaka Akira <akr@fsij.org>
+ * io.c (rb_cloexec_dup2): check oldfd == newfd at first.
+ pointed by KOSAKI Motohiro. [ruby-dev:44713]
- * common.mk: Add dependencies for include/ruby.h
+Mon Oct 31 10:50:26 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * tool/update-deps: Use "make -p all miniruby ruby golf" to extract
- dependencies in makefiles.
+ * io.c (rb_cloexec_fcntl_dupfd): this function needs F_DUPFD.
-Thu Apr 11 23:21:17 2013 Tanaka Akira <akr@fsij.org>
+ * io.c (nogvl_io_cntl): use rb_cloexec_fcntl_dupfd() only if the
+ platform has F_DUPFD.
- * tool/update-deps: Use "make -p all golf" to extract dependencies in
- makefiles.
+Mon Oct 31 00:50:00 2011 Luis Lavena <luislavena@gmail.com>
-Thu Apr 11 21:02:19 2013 Tanaka Akira <akr@fsij.org>
+ * configure.in: check -fno-omit-frame-pointer acceptance and usage
+ under MinGW. [ruby-core:39957] [Bug #5407]
- * common.mk: Dependency updated.
+Mon Oct 31 00:16:11 2011 Tanaka Akira <akr@fsij.org>
- * tool/update-deps: Rewritten.
+ * include/ruby/intern.h (rb_cloexec_fcntl_dupfd): declared.
-Thu Apr 11 19:59:48 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * io.c (rb_cloexec_fcntl_dupfd): new function.
+ (nogvl_io_cntl): use rb_cloexec_fcntl_dupfd.
- * 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)
+ * process.c (move_fds_to_avoid_crash): use rb_cloexec_fcntl_dupfd.
-Thu Apr 11 16:10:01 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Sun Oct 30 22:46:46 2011 Tanaka Akira <akr@fsij.org>
- * ext/fiddle/closure.c (USE_FFI_CLOSURE_ALLOC): define 0 on
- Mac OS X and Linux [Bug #3371]
+ * configure.in: check pipe2.
-Thu Apr 11 13:19:22 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * io.c (rb_cloexec_pipe): use pipe2 if available.
- * 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]
+Sun Oct 30 22:32:44 2011 Tanaka Akira <akr@fsij.org>
-Thu Apr 11 11:11:38 2013 Akinori MUSHA <knu@iDaemons.org>
+ * ruby.c (fill_standard_fds): use fstat() instead of fcntl(F_GETFD)
+ for MinGW. reported by Luis Lavena. [ruby-core:40526] [Bug #5516]
- * dir.c: Fix a typo.
+Sun Oct 30 21:12:47 2011 Tanaka Akira <akr@fsij.org>
-Thu Apr 11 10:39:34 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * include/ruby/intern.h (rb_cloexec_pipe): declared.
- * ext/fiddle/closure.c (USE_FFI_CLOSURE_ALLOC): add missing case:
- RUBY_LIBFFI_MODVERSION is not defined (usually on Windows).
+ * io.c (rb_cloexec_pipe): new function.
+ (rb_pipe): use rb_cloexec_pipe.
-Thu Apr 11 09:27:04 2013 Konstantin Haase <me@rkh.im>
+ * thread_pthread.c (rb_thread_create_timer_thread): use
+ rb_cloexec_pipe.
- * dir.c (file_s_fnmatch): Document File::FNM_EXTGLOB flag.
+Sun Oct 30 20:06:07 2011 Tanaka Akira <akr@fsij.org>
-Thu Apr 11 09:17:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * io.c (rb_cloexec_dup): refine control flow.
+ (rb_cloexec_dup2): ditto.
- * README: Fix typo by Benjamin Winkler [Fixes GH-281]
+Sun Oct 30 18:45:50 2011 Tanaka Akira <akr@fsij.org>
-Thu Apr 11 06:15:51 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * ruby.c (fill_standard_fds): new function to open closed standard
+ file descriptors.
+ (ruby_sysinit): call fill_standard_fds.
- * regint.h: fix typo: _M_AMD86 -> _M_AMD64.
+Sun Oct 30 10:50:36 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * siphash.c: ditto.
+ * tool/rbinstall.rb (install_recursive, bin-comm): split mere
+ string not path name. [ruby-core:40462] [Bug #5492]
- * st.c: ditto.
+Sun Oct 30 10:47:20 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Apr 11 06:09:57 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * io.c (rb_cloexec_dup, rb_cloexec_dup2): CLOEXEC has been set if
+ dup3 succeeded.
- * ext/fiddle/extconf.rb: define RUBY_LIBFFI_MODVERSION macro.
+Sun Oct 30 09:58:48 2011 Tanaka Akira <akr@fsij.org>
- * ext/fiddle/closure.c (USE_FFI_CLOSURE_ALLOC): define 0 or 1
- with platform and libffi's version. [Bug #3371]
+ * io.c (rb_cloexec_dup): don't allocate standard file descriptors.
-Thu Apr 11 05:30:43 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Sun Oct 30 08:29:51 2011 Tanaka Akira <akr@fsij.org>
- * lib/mkmf.rb (pkg_config): Add optional argument "option".
- If it is given, it returns the result of
- `pkg-config --<option> <pkgname>`.
+ * io.c (rb_cloexec_dup2): don't set CLOEXEC for standard file
+ descriptors.
-Thu Apr 11 03:33:05 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Sun Oct 30 07:47:10 2011 Tanaka Akira <akr@fsij.org>
- * 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
+ * configure.in: check dup3.
-Wed Apr 10 17:39:13 2013 Tanaka Akira <akr@fsij.org>
+ * io.c (rb_cloexec_dup2): use dup3 if available.
- * ext/bigdecimal/bigdecimal.c (VpCtoV): Initialize a local variable
- even when overflow.
+Sat Oct 29 22:06:37 2011 Tanaka Akira <akr@fsij.org>
-Wed Apr 10 12:32:37 2013 Tanaka Akira <akr@fsij.org>
+ * include/ruby/intern.h (rb_cloexec_dup2): declared.
- * bignum.c (rb_ll2big): Don't overflow on signed integer negation.
+ * io.c (rb_cloexec_dup2): new function.
+ (io_reopen): use rb_cloexec_dup2.
- * 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.
+Sat Oct 20 21:08:18 2011 Tajima Akio <artonx@yahoo.co.jp>
-Wed Apr 10 06:32:12 2013 Tanaka Akira <akr@fsij.org>
+ * win32/Makefile.sub (CONFIG_H): have stdint.h if VC2010.
+ [Bug #5243]
- * internal.h (MUL_OVERFLOW_INT_P): New macro.
+Sat Oct 29 20:59:08 2011 Tanaka Akira <akr@fsij.org>
- * sprintf.c (GETNUM): Don't overflow on signed integer multiplication.
+ * io.c (rb_cloexec_dup): use F_DUPFD_CLOEXEC if available.
-Tue Apr 9 20:38:20 2013 Tanaka Akira <akr@fsij.org>
+Sat Oct 29 20:00:26 2011 Tanaka Akira <akr@fsij.org>
- * internal.h (MUL_OVERFLOW_SIGNED_INTEGER_P): New macro.
- (MUL_OVERFLOW_FIXNUM_P): Ditto.
- (MUL_OVERFLOW_LONG_P): Ditto.
+ * include/ruby/intern.h (rb_cloexec_dup): declared.
- * array.c (rb_ary_product): Don't overflow on signed integer
- multiplication.
+ * io.c (rb_cloexec_dup): new function.
+ (ruby_dup): use rb_cloexec_dup.
- * numeric.c (fix_mul): Ditto.
- (int_pow): Ditto.
+ * ext/pty/pty.c (pty_getpty): use rb_cloexec_dup.
- * rational.c (f_imul): Ditto.
+ * ext/openssl/ossl_bio.c (ossl_obj2bio): ditto.
- * insns.def (opt_mult): Ditto.
+Sat Oct 29 16:11:34 2011 Tanaka Akira <akr@fsij.org>
- * thread.c (sleep_timeval): Don't overflow on signed integer addition.
+ * ext/sdbm/_sdbm.c (sdbm_prep): use O_CLOEXEC if available.
- * bignum.c (rb_int2big): Don't overflow on signed integer negation.
- (rb_big2ulong): Ditto.
- (rb_big2long): Ditto.
- (rb_big2ull): Ditto.
- (rb_big2ll): Ditto.
+Sat Oct 29 14:26:56 2011 Tanaka Akira <akr@fsij.org>
-Tue Apr 9 19:45:44 2013 Tanaka Akira <akr@fsij.org>
+ * io.c (rb_cloexec_open): use O_CLOEXEC if available.
- * 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.
+Sat Oct 29 12:57:15 2011 Tanaka Akira <akr@fsij.org>
-Tue Apr 9 15:26:12 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * process.c (ruby_setsid): use rb_cloexec_open.
+ (rb_daemon): ditto.
- * compile.c (iseq_compile_each): append keyword hash to argument array
- to splat if needed. [ruby-core:54094] [Bug #8236]
+ * ruby.c (load_file_internal): ditto.
-Tue Apr 9 10:02:39 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * file.c (rb_file_s_truncate): ditto.
+ (file_load_ok): ditto.
- * lib/mkmf.rb (timestamp_file): gather timestamp files in one
- directory from each extension directories, with considering
- target_prefix.
+ * random.c (fill_random_seed): ditto.
-Tue Apr 9 04:57:59 JST 2013 Charles Oliver Nutter <headius@headius.com>
+ * ext/pty/pty.c (chfunc): ditto.
+ (get_device_once): ditto.
- * 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.
+ * ext/io/console/console.c (console_dev): ditto.
-Tue Apr 9 02:44:32 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Oct 29 10:40:19 2011 Tanaka Akira <akr@fsij.org>
- * ext/socket/extconf.rb: $defs needs -D or -U. nothing is added
- otherwize.
+ * include/ruby/intern.h (rb_cloexec_open): declared.
- * ext/socket/extconf.rb: check struct in_addr6, which is defined in
- VC6 instead of in6_addr.
+ * io.c (fd_set_cloexec): extracted from rb_fd_set_cloexec.
+ (rb_cloexec_open): new function.
+ (sysopen_func): use rb_cloexec_open.
+ (rb_sysopen_internal): use rb_update_max_fd instead of
+ rb_fd_set_cloexec.
- * ext/socket/option.c (optname_to_sym): fix macro name.
+Sat Oct 29 09:05:07 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/socket/constants.c (rsock_cmsg_type_arg): fix macro name.
+ * thread_pthread.h: no Structured Exception Handling like macros.
+ [ruby-core:40432] [Bug #5491]
-Mon Apr 8 23:57:21 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Oct 28 22:05:34 2011 Tanaka Akira <akr@fsij.org>
- * object.c (id_for_setter): extract common code from const, class
- variable, instance variable setters.
+ * ext/sdbm/_sdbm.c: RCS $Id$ removed.
-Mon Apr 8 23:55:53 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Oct 27 18:58:00 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * ext/depend (ENCOBJS, TRANSOBJS): use explicit path to ruby.h for
- nmake.
+ * parse.y (parser_nextc): set encoding for the buffer of ripper.
- * 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.
+Fri Oct 28 06:06:08 2011 Tanaka Akira <akr@fsij.org>
-Mon Apr 8 20:30:37 2013 Yuki Yugui Sonoda <yugui@google.com>
+ * ext/sdbm/_sdbm.c (sdbm_prep): set FD_CLOEXEC flags for file
+ descriptors.
+ (fd_set_cloexec): new function.
- * ext/depend (ENCOBJS, TRANSOBJS): Add missing dependencies.
+Fri Oct 28 03:01:27 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-Mon Apr 8 17:19:28 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_insnhelper.c (vm_call_cfunc): adding back useless hack. For some
+ reason, this fixes CFP errors on OS X 10.7.
- * ext/win32ole/win32ole.c (fole_missing): should check actual argument
- count before accessing.
+Fri Oct 28 00:09:31 2011 Tanaka Akira <akr@fsij.org>
-Mon Apr 8 16:03:55 2013 Yuki Yugui Sonoda <yugui@google.com>
+ * ext/sdbm/_sdbm.c (sdbm_prep): refactored for less nesting.
- 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.
+Thu Oct 27 18:28:18 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Apr 8 12:05:02 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * configure.in (RUBY_DEFINE_IF): revert r33534 partially to get
+ rid of AS_ECHO which is not available in autoconf 2.61.
+ [ruby-dev:44702]
- * 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.
+Thu Oct 27 16:10:46 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * object.c (rb_mod_const_set): ditto.
+ * bignum.c (rb_big_divide): raise ZeroDivisionError if divisor is
+ zero, as well as Fixnum. [ruby-core:40429] [Bug #5490]
- * object.c (rb_mod_cvar_set): ditto.
+Thu Oct 27 14:56:22 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Apr 7 13:56:16 2013 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+ * configure.in (RUBY_FUNC_ATTRIBUTE): unset temporary variable.
- * test/ruby/test_require.rb (TestRequire#test_require_nonascii_path):
- RUBY_PLATFORM should escape as Regexp,
- because RUBY_PLATFORM may contain '.'.
+ * configure.in (RUBY_STACK_GROW_DIRECTION): substitute CPU name as
+ shell variable name. based on the patch by The Written Word Inc. at
+ [ruby-core:40421]. [Bug #5488]
-Sun Apr 7 10:44:01 2013 Tanaka Akira <akr@fsij.org>
+Thu Oct 27 09:57:56 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * include/ruby/defines.h: Simplify the logic to include sys/select.h.
- This fixes a compilation error on Haiku (gcc2 and gcc4).
+ * include/ruby/ruby.h (SIZE_MAX): define SIZE_MAX if not defined.
+ patched by The Written Word Inc. [ruby-core:40422] [Bug #5489]
- * configure.in: Use shared linker as $(CC) for Haiku.
- This fixes a build error on Haiku (gcc2).
+Thu Oct 27 08:47:38 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-Sun Apr 7 10:41:30 2013 Tanaka Akira <akr@fsij.org>
+ * ext/psych/parser.c: remove unused variable.
- * lib/resolv.rb (MDNSOneShot#sender): Delete an unused variable.
+Thu Oct 27 08:38:41 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-Sun Apr 7 03:24:36 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * ext/openssl/extconf.rb: add -Wall flag by default when compiler is
+ GCC.
- * 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
+Wed Oct 26 15:24:25 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * addr2line.c (imax): inline is defined by configure.
+ * file.c (rb_file_join): honor input encodings than ASCII-8BIT.
+ [ruby-core:40338] [Bug #5483]
-Sun Apr 7 01:40:39 2013 Akinori MUSHA <knu@iDaemons.org>
+Tue Oct 25 21:52:31 2011 Tanaka Akira <akr@fsij.org>
- * misc/ruby-electric.el (ruby-electric-hash): New electric
- function that expands a hash sign inside a string or regexp to
- "#{}".
+ * include/ruby/defines.h: use "__sparc" instead of "sparc" and
+ "__sparc__".
- * misc/ruby-electric.el (ruby-electric-curlies): Do not insert
- spaces inside when the curly brace is a delimiter of %r, %w,
- etc.
+ * dln.c: ditto.
- * misc/ruby-electric.el (ruby-electric-curlies): Insert another
- space before a closing curly brace when
- ruby-electric-newline-before-closing-bracket is nil.
+ [ruby-dev:44694]
-Sun Apr 7 01:01:26 2013 Tanaka Akira <akr@fsij.org>
+Tue Oct 25 06:34:39 2011 Eric Hodel <drbrain@segment7.net>
- * strftime.c (rb_strftime_with_timespec): Test yday range.
- [ruby-core:44088] [Bug #6247] reported by Ruby Submit.
+ * re.c (match_aref): Use <code> around indexing examples to prevent
+ hyperlinks. [ruby-talk:389396]
-Sat Apr 6 23:46:54 2013 Naohisa Goto <ngotogenome@gmail.com>
+Mon Oct 24 23:55:31 2011 Tanaka Akira <akr@fsij.org>
- * configure.in (AC_CHECK_HEADERS): atomic.h for Solaris atomic_ops.
+ * complex.c: use "__sun" instead of "__sun__" to detect SunOS.
- * ruby_atomic.h: Skip using Solaris10 atomic_ops on Solaris 9 or
- earlier if atomic.h is not available. [ruby-dev:47229] [Bug #8228]
+ * math.c: ditto.
-Sat Apr 6 23:40:40 2013 Tanaka Akira <akr@fsij.org>
+ * hash.c: ditto.
- * lib/resolv.rb: Support LOC resources.
- [ruby-core:23361] [Feature #1436] by JB Smith.
+ * atomic.h: ditto.
-Sat Apr 6 23:38:09 2013 Naohisa Goto <ngotogenome@gmail.com>
+ * ext/io/wait/wait.c: ditto.
- * 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]
+ [ruby-dev:44693]
-Sat Apr 6 23:31:38 2013 Tanaka Akira <akr@fsij.org>
+Mon Oct 24 22:45:37 2011 Tanaka Akira <akr@fsij.org>
- * lib/resolv.rb: Add one-shot multicast DNS support.
- [ruby-core:53387] [Feature #8089] by Eric Hodel.
+ * io.c: use "__sun" instead of "sun" to detect SunOS.
-Sat Apr 6 22:12:01 2013 Tanaka Akira <akr@fsij.org>
+ * dln.c: ditto.
- * lib/resolv.rb (Resolv::DNS.fetch_resource): New method to obtain
- full result.
- [ruby-dev:43587] [Feature #4788] proposed by Makoto Kishimoto.
+ * cont.c: ditto.
-Sat Apr 6 20:17:51 2013 Tanaka Akira <akr@fsij.org>
+ * ext/sdbm/_sdbm.c: ditto.
- * 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.
+ [ruby-dev:44693]
- * ext/socket/rubysocket.h: Follow the above change.
+Mon Oct 24 22:38:08 2011 Tanaka Akira <akr@fsij.org>
-Sat Apr 6 19:24:59 2013 Tanaka Akira <akr@fsij.org>
+ * ext/pty/pty.c (get_device_once): delay rb_fd_set_cloexec() until
+ grantpt() on Solaris. grantpt() doesn't work with CLOEXEC on
+ Solaris 10.
+ reported by Naohisa GOTO. [ruby-dev:44688] [Bug #5475]
- * 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.
+Mon Oct 24 08:18:14 2011 Tanaka Akira <akr@fsij.org>
- * ext/socket/rubysocket.h (rsock_sys_fail_sockaddr): Follow the above
- change.
+ * io.c (copy_stream_fallback_body): check nil for EOF of read method.
+ patch by Eric Wong. [ruby-core:39134] [Bug #5237]
-Sat Apr 6 14:28:23 2013 Tanaka Akira <akr@fsij.org>
+Sun Oct 23 18:21:23 2011 Kazuki Tsujimoto <kazuki@callcc.net>
- * 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.
+ * ext/tk/MANUAL_tcltklib.eng: fix typo.
- * 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.
+Sun Oct 23 18:03:31 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * 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.
+ * numeric.c (rb_infinity, rb_nan): aggregated member initializers
+ need braces.
-Sat Apr 6 13:34:20 2013 Tanaka Akira <akr@fsij.org>
+Sun Oct 23 16:43:43 2011 Naohisa Goto <ngotogenome@gmail.com>
- * ext/socket/socket.c (rsock_sys_fail_sockaddr): Delete 2nd argument.
+ * ext/io/wait/wait.c: ioctl(2) is declared in unistd.h on Solaris.
- * ext/socket/rubysocket.h (rsock_sys_fail_sockaddr): Follow above
- change.
+Sun Oct 23 16:33:35 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-Sat Apr 6 13:13:39 2013 Tanaka Akira <akr@fsij.org>
+ * ext/tk/MANUAL_tcltklib.eng: fix typo. reported by Mimura-san.
+ [ruby-dev:44683] [Bug #5471]
- * ext/socket/socket.c (rsock_sys_fail_path): Use rb_str_inspect only
- for String to avoid SEGV.
+Sun Oct 23 08:01:29 2011 Tanaka Akira <akr@fsij.org>
-Sat Apr 6 12:40:16 2013 Tanaka Akira <akr@fsij.org>
+ * io.c (rb_fd_set_cloexec): set close-on-exec flag only if F_GETFD is
+ defined. reported by Luis Lavena. [ruby-core:40281] [Bug #5470]
- * ext/socket/rubysocket.h (rsock_sys_fail_host_port): Wrap by NORETURN.
- (rsock_sys_fail_path): Ditto.
- (rsock_sys_fail_sockaddr): Ditto.
+Sat Oct 22 19:48:50 2011 Tanaka Akira <akr@fsij.org>
-Sat Apr 6 11:49:35 2013 Tanaka Akira <akr@fsij.org>
+ * test/openssl/test_ssl.rb (test_multibyte_read_write): start server
+ for each length to avoid race condition.
- * ext/socket/socket.c (rsock_sys_fail_path): Use rb_str_inspect if the
- path contains a NUL.
+Sat Oct 22 18:49:24 2011 Tanaka Akira <akr@fsij.org>
-Sat Apr 6 11:39:19 2013 Tanaka Akira <akr@fsij.org>
+ * include/ruby/intern.h (rb_fd_set_cloexec): declared.
- * ext/socket: Improve socket exception message to show socket address.
- [ruby-core:45617] [Feature #6583] proposed Eric Hodel.
+ * io.c (rb_fd_set_cloexec): new function.
+ (ruby_dup): call rb_fd_set_cloexec to set close-on-exec flag.
+ (rb_sysopen_internal): ditto.
+ (rb_pipe): ditto.
+ (io_reopen): ditto.
+ (io_cntl): ditto.
- * ext/socket/rubysocket.h (rsock_sys_fail_host_port): Declared.
- (rsock_sys_fail_path): Ditto.
- (rsock_sys_fail_sockaddr): Ditto.
+ * process.c (rb_f_exec): change the default :close_others option to
+ true.
+ (rb_f_system): ditto.
+ (move_fds_to_avoid_crash): call rb_fd_set_cloexec to set
+ close-on-exec flag.
+ (ruby_setsid): ditto.
+ (rb_daemon): ditto.
- * ext/socket/udpsocket.c (udp_connect): Use rsock_sys_fail_host_port.
- (udp_bind): Ditto.
- (udp_send): Ditto.
+ * thread_pthread.c (rb_thread_create_timer_thread): call
+ rb_fd_set_cloexec to set close-on-exec flag.
- * ext/socket/init.c (rsock_init_sock): Specify a string for rb_sys_fail
- argument.
- (make_fd_nonblock): Ditto.
- (rsock_s_accept): Ditto.
+ * ruby.c (load_file_internal): ditto.
- * ext/socket/ipsocket.c (init_inetsock_internal): Use
- rsock_sys_fail_host_port.
+ * file.c (rb_file_s_truncate): ditto.
+ (file_load_ok): ditto.
- * 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.
+ * random.c (fill_random_seed): ditto.
- * 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.
+ * ext/pty/pty.c (chfunc): ditto.
+ (get_device_once): ditto.
- * 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/openssl/ossl_bio.c (ossl_obj2bio): ditto.
-Sat Apr 6 11:23:18 2013 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+ * ext/socket/init.c (rsock_socket): ditto.
+ (rsock_s_accept_nonblock): ditto.
+ (rsock_s_accept): ditto.
- * test/ruby/test_require.rb (TestRequire#test_require_nonascii_path):
- fix load path for encoding to run the test as stand-alone.
+ * ext/socket/socket.c (rsock_sock_s_socketpair): ditto.
-Sat Apr 6 09:54:20 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/socket/ancdata.c (discard_cmsg): ditto.
+ (make_io_for_unix_rights): ditto.
- * pack.c (NATINT_LEN): fix definition order, must be after
- NATINT_PACK.
+ * ext/socket/unixsocket.c (unix_recv_io): ditto.
-Sat Apr 6 03:11:07 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+ * ext/io/console/console.c (console_dev): ditto.
- * ext/psych/lib/psych/visitors/yaml_tree.rb: fix symbol keys in coder
- emission. Thanks @tjwallace
- * test/psych/test_coder.rb: test for change
+ [ruby-core:38140] [Feature #5041]
-Sat Apr 6 02:54:08 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+Sat Oct 22 17:46:27 2011 Tanaka Akira <akr@fsij.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
+ * lib/resolv.rb: fix a exception name in previous patch.
-Sat Apr 6 02:30:28 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Oct 22 17:43:33 2011 Tanaka Akira <akr@fsij.org>
- * parse.y (new_defined): remove all extra parentheses, and return
- "nil" for defined? with empty expression.
- [ruby-core:54024] [Bug #8224]
+ * lib/resolv.rb: make timeout configurable for DNS query.
+ patch by Eric Wong. [ruby-core:38533] [Feature #5100]
-Sat Apr 6 02:06:04 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+Sat Oct 22 02:07:48 2011 Naohisa Goto <ngotogenome@gmail.com>
- * ext/psych/lib/psych/visitors/to_ruby.rb: correctly register
- self-referential strings. Fixes tenderlove/psych #135
+ * numeric.c (rb_infinity, rb_nan): use union to prevent bus error
+ caused by misalignment. [Bug #5469] [ruby-dev:44657]
- * test/psych/test_string.rb: appropriate test.
+ * include/ruby/missing.h (INFINITY, NAN): ditto
-Sat Apr 6 01:21:56 2013 Tanaka Akira <akr@fsij.org>
+Fri Oct 21 22:02:17 2011 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.
+ * gc.c (initial_params): pack in a struct.
-Sat Apr 6 00:19:30 2013 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+ * gc.c (rb_gc_set_params): set parameters always.
+ [ruby-dev:44648] [Bug #5467]
- * 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]
+Fri Oct 21 12:10:20 2011 Naohisa Goto <ngotogenome@gmail.com>
- * test/ruby/test_require.rb (TestRequire#test_require_nonascii_path):
- a test for the above.
+ * atomic.h: change Solaris checking macro because atomic_ops can work
+ not only with Sun Studio but also with Fujitsu C Compiler.
-Fri Apr 5 20:41:49 2013 Tanaka Akira <akr@fsij.org>
+Fri Oct 21 02:11:00 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * include/ruby/defines.h (HAVE_TRUE_LONG_LONG): Defined to distinguish
- availability of long long and availability of 64bit integer type.
+ * ext/openssl/ossl_ns_spki.c: Complete documentation.
+ * test/openssl/test_ns_spki.rb: Integrate SPKI#to_text.
- * pack.c: Use HAVE_TRUE_LONG_LONG to distinguish q! and Q! support.
+Thu Oct 20 22:47:28 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-Fri Apr 5 20:19:42 2013 Tanaka Akira <akr@fsij.org>
+ * win32/win32.c (socklist_insert, socklist_lookup, socklist_delete):
+ new functions to wrap of st_insert(), st_lookup() and st_delete() to
+ socklist.
+ allocating socklist is deferred until it is really needed.
- * addr2line.c: Include ruby/missing.h to fix compile error on Debian.
+ * win32/win32.c (exit_handler): delete socklist only if it is
+ initialized.
-Fri Apr 5 19:39:52 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * win32/win32.c (rb_w32_sysinit, StartSockets): refactoring: move
+ initialization of select_mutex to StartSockets().
- * compile.c (iseq_compile_each): fix of defined? with empty
- expression. [ruby-core:53999] [Bug #8220]
+ * win32/win32.c (exit_handler): refactoring: delete select_mutex only
+ if winsock is used.
-Fri Apr 5 13:22:59 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Oct 20 22:38:53 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * ext/curses/curses.c (Init_curses): fix implementation function,
- crmode should be same as cbreak. [ruby-core:54013] [Bug #8222]
+ * ext/openssl/ossl_pkcs5.c: add note on timing attacks and general
+ documentation.
-Fri Apr 5 12:06:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Thu Oct 20 21:19:15 2011 Naohisa Goto <ngotogenome@gmail.com>
- * ext/curses/hello.rb: Typo in Curses example by Drew Blas
- [Fixes GH-273]
+ * vm_eval.c (check_funcall): set array elements one-by-one to fix
+ compile error with Fujitsu C Compiler 5.6 on Solaris 10 on Sparc.
+ [Bug #5464] [ruby-dev:44632]
-Thu Apr 4 23:45:13 2013 Tanaka Akira <akr@fsij.org>
+Thu Oct 20 13:09:35 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * 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.
+ * include/ruby/defines.h (flush_register_windows): use software
+ trap on Debian Sparc 32-bit userspace. [Bug #5244]
-Thu Apr 4 23:24:45 2013 Tanaka Akira <akr@fsij.org>
+Thu Oct 20 12:28:22 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * ext/socket/extconf.rb: Remove condition for bcc.
+ * test/openssl/test_pkcs5.rb: add RFC 6070 tests for PBKDF2 with
+ HMAC-SHA1
-Thu Apr 4 22:53:23 2013 Tanaka Akira <akr@fsij.org>
+Thu Oct 20 11:42:23 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * include/ruby/ruby.h (FIX2LONG): Parenthesize the macro body.
+ * util.c (mmprepare): fix for fragmental size.
-Thu Apr 4 22:32:32 2013 Tanaka Akira <akr@fsij.org>
+ * util.c (mmswap_, mmrot3_): portability improvement.
- * time.c (time_strftime): Describe %L and %N truncates digits under
- the specified length.
- [ruby-core:52130] [Bug #7829]
+Thu Oct 20 05:58:02 2011 Eric Hodel <drbrain@segment7.net>
-Thu Apr 4 22:08:46 2013 Tanaka Akira <akr@fsij.org>
+ * ext/openssl/ossl_ns_spki.c (Init_ossl_ns_spki): Stub documentation
+ for Netscape SPKI.
- * object.c (rb_mod_cvar_set): Reverted "avoid inadvertent
- symbol creation" to avoid SEGV by
- Class.new.class_variable_set(1, 2).
+Thu Oct 20 05:13:39 2011 Ryan Davis <ryand-ruby@zenspider.com>
-Thu Apr 4 20:07:19 2013 Tanaka Akira <akr@fsij.org>
+ * lib/minitest/*: Imported minitest 2.6.2 (r6712)
+ * test/minitest/*: ditto
- * ext/pathname/pathname.c (path_write): New method.
- (path_binwrite): Ditto.
- [ruby-core:49468] [Feature #7378]
+Thu Oct 20 06:55:32 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-Thu Apr 4 16:51:29 2013 Yuki Yugui Sonoda <yugui@google.com>
+ * lib/openssl/buffering.rb: Force multi-byte strings to be treated as
+ binary data.
+ * test/openssl/test_ssl.rb: Add test for it.
- * thread_pthread.c: Fixes wrong scopes of #if USE_SLEEPY_TIMER_THREAD
- .. #endif sections. This fixes a build error on NativeClient.
+ Thanks to Niklas Baumstark for reporting the issue!
-Wed Apr 3 17:25:31 2013 Yuki Yugui Sonoda <yugui@google.com>
+ [Ruby 1.9 - Bug #5233] [ruby-core:39120]
- * thread_pthread.c (ruby_init_stack): Avoid using uninitialized value.
- stackaddr and size are not set if get_stack() fails.
+Wed Oct 19 17:06:54 2011 Yukihiro Matsumoto <matz@ruby-lang.org>
-Thu Apr 4 16:55:08 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * version.h (RUBY_VERSION): finally declare start of 2.0 work!
- * struct.c (make_struct): avoid inadvertent symbol creation.
- (rb_struct_aref): ditto.
- (rb_struct_aset): ditto.
+Wed Oct 19 11:48:44 2011 Eric Hodel <drbrain@segment7.net>
-Thu Apr 4 16:54:40 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * error.c (Init_Exception): Document $! and $@. Provide
+ recommendations for creating exceptions for a library.
- * object.c (rb_mod_const_set): avoid inadvertent symbol creation.
- (rb_obj_ivar_set): ditto.
- (rb_mod_cvar_set): ditto.
+Wed Oct 19 11:25:46 2011 Eric Hodel <drbrain@segment7.net>
-Thu Apr 4 15:46:48 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * error.c (Init_Exception): Add hierarchy of Exception subclasses.
+ Based on patch by Sylvain Daubert. [Ruby 1.9 - Bug #5438]
- * enum.c (enum_inject): avoid inadvertent symbol creation.
+Wed Oct 19 11:04:47 2011 Eric Hodel <drbrain@segment7.net>
-Thu Apr 4 14:37:07 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * enum.c: Reformat block args to a single standard, { |args| ... }.
+ Patch by b t. [Ruby 1.9 - Bug #5393]
- * thread.c (rb_thread_aref): avoid inadvertent symbol creation.
- (rb_thread_variable_get): ditto.
- (rb_thread_key_p): ditto.
- (rb_thread_variable_p): ditto.
+Wed Oct 19 12:11:26 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-Thu Apr 4 11:33:57 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * ext/openssl/ossl_ssl.c: Remove set, but unused variables.
+ ext/openssl/ossl_pkey.c: ditto
- * ext/openssl/ossl_bn.c (ossl_bn_to_i): Use bn2hex to speed up.
- In general, binary to/from decimal needs extra cost.
+ * ext/openssl/ossl_pkey_dh.c: Make functions passed to
+ rb_thread_blocking_region return VALUE instead of void.
+ ext/openssl/ossl_pkey_dsa.c: ditto
+ ext/openssl/ossl_pkey_rsa.c: ditto
-Thu Apr 4 07:24:18 2013 Tanaka Akira <akr@fsij.org>
+Tue Oct 18 23:28:53 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/socket/extconf.rb: Specify arguments to test functions.
+ * hash.c (identhash): share with type_numhash.
-Thu Apr 4 03:25:09 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * st.c (st_hashtype_num): rename from type_numhash.
- * ext/openssl/ossl_bn.c (ossl_bn_initialize): fix can't create from bn.
+Tue Oct 18 23:07:30 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Apr 3 22:09:25 2013 Tanaka Akira <akr@fsij.org>
+ * vm_core.h (ruby_current_thread): probeprofiler has been removed
+ long ago.
- * ext/socket/extconf.rb: Test functions and libraries after headers.
+Tue Oct 18 23:05:49 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Apr 3 21:23:29 2013 Tanaka Akira <akr@fsij.org>
+ * ext/ripper/eventids2.c (ripper_init_eventids2): separate
+ initializations of IDs and objects.
- * io.c (rb_io_seek_m): Accept :CUR, :END, :SET as "whence" argument.
- (interpret_seek_whence): New function.
- [ruby-dev:45818] [Feature #6643]
+ * ext/ripper/tools/generate.rb (generate_eventids1): ditto.
-Wed Apr 3 20:52:49 2013 Tanaka Akira <akr@fsij.org>
+ * parse.y (Init_ripper, InitVM_ripper): fix inversed roles.
- * process.c: Describe the behavior which Ruby invokes a commandline
- directly without shell if the commandline is simple enough.
- [ruby-core:50459] [Bug #7489]
+Sun Oct 16 19:46:16 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Apr 3 20:27:37 2013 Tanaka Akira <akr@fsij.org>
+ * ext/bigdecimal/bigdecimal.gemspec (files): fixed typo, and
+ removed nonexistent file.
- * ext/extmk.rb (extmake): Invoke Logging::log_close in a ensure
- clause.
+ * ext/bigdecimal/bigdecimal.gemspec (homepage): added.
-Wed Apr 3 18:53:58 2013 Tanaka Akira <akr@fsij.org>
+ * ext/io/console/io-console.gemspec (homepage): ditto.
- * 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 Oct 14 12:13:57 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/mkmf.rb (Logging.log_opened?): New method.
+ * ext/pty/pty.c (pty_check): should return nil until the child
+ terminates or stops. [ruby-dev:44600] [Bug #2642]
- [ruby-dev:47215] [Bug #8209]
+Fri Oct 14 11:19:37 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Apr 3 17:11:15 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * include/ruby/intern.h (rb_ary_rotate): export.
- * 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]
+Fri Oct 14 05:58:05 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Apr 3 16:35:32 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * atomic.h (ATOMIC_INC, ATOMIC_DEC): return old values.
+ [ruby-dev:44596] [Bug #5439]
- * bignum.c (rb_big_eq): hide intermediate Bignums not just freeing
- memory. [ruby-core:53893] [Bug #8204]
+ * signal.c (ruby_atomic_exchange): no needs to define on the
+ platforms where atomic.h is available.
- * object.c (rb_obj_hide): hide an object by clearing klass.
+Thu Oct 13 19:29:40 2011 Naohisa Goto <ngotogenome@gmail.com>
- * bignum.c (rb_big_eq): test as Fixnum if possible and get rid of zero
- length Bignum. [ruby-core:53893] [Bug #8204]
+ * atomic.h (ATOMIC_*): use atomic_ops(3C) when SunStudio on Solaris.
+ [ruby-dev:44596] [Bug #5439]
-Tue Apr 2 23:56:03 2013 Tanaka Akira <akr@fsij.org>
+Thu Oct 13 18:13:04 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * 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]
+ * atomic.h(ATOMIC_SET): add cast to void to prevent misuse.
+ [ruby-dev:44596] [Bug #5439]
-Tue Apr 2 20:24:52 2013 Tanaka Akira <akr@fsij.org>
+Thu Oct 13 18:04:27 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * 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 (rb_gc_finalize_deferred, rb_objspace_call_finalizer):
+ should use ATOMIC_EXCHANGE() to check the previous value.
+ [ruby-dev:44596] [Bug #5439]
-Tue Apr 2 19:24:26 2013 Tanaka Akira <akr@fsij.org>
+Wed Oct 12 23:39:58 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
- * ext/-test-/num2int/num2int.c: Define utility methods
- as module methods of Num2int.
+ * test/openssl/test_ssl.rb: Move duplicated tests for SSL::Session to
+ test_ssl_session.rb
- * test/-ext-/num2int/test_num2int.rb: Follow the above change.
+Tue Oct 11 08:49:40 2011 Eric Hodel <drbrain@segment7.net>
-Tue Apr 2 18:49:01 2013 Tanaka Akira <akr@fsij.org>
+ * array.c (rb_ary_initialize): Improve explanation of Array.new
+ parameters. Patch by Alvaro Pereyra Rabanal. [Ruby 1.9 - Bug #5425]
+ * array.c (rb_ary_s_try_convert): Fix typo (try => tries)
+ * array.c (rb_ary_rindex): Add spacing for block.
+ * array.c (rb_ary_uniq_bang): Describe block
+ * array.c (rb_ary_uniq): ditto
- * lib/securerandom.rb: Don't use Array#to_s.
- [ruby-core:52058] [Bug #7811] fixed by zzak (Zachary Scott).
+Tue Oct 11 07:55:38 2011 Eric Hodel <drbrain@segment7.net>
-Tue Apr 2 17:38:20 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * array.c: Add a description to Array, minor cleanups. Patch by
+ Andrea Singh. [Ruby 1.9 - Bug #5412]
- * 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]
+Tue Oct 11 06:09:52 2011 Eric Hodel <drbrain@segment7.net>
-Tue Apr 2 16:00:06 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * lib/pp.rb: Move PP documentation to top of class PP. Patch by
+ Sylvain Daubert. [Ruby 1.9 - Bug #5430]
- * vm_dump.c (rb_print_backtrace): separate to ease showing C backtrace.
+Tue Oct 11 06:06:29 2011 Eric Hodel <drbrain@segment7.net>
- * internal.h (rb_print_backtrace): ditto.
+ * ext/coverage/coverage.c (Init_coverage): Change list format and
+ describe Coverage.result output. Patch by Sylvain Daubert.
+ [Ruby 1.9 - Bug #5428]
-Tue Apr 2 15:22:09 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Tue Oct 11 05:53:23 2011 Eric Hodel <drbrain@segment7.net>
- * test/ruby/envutil.rb (assert_separately): stop_auto_run of
- Test::Unit::Runner to prevent auto runner use ARGV.
+ * object.c (Init_Object): Add reference to BasicObject, brief
+ explanation of constant lookup. Based on patch by Alvaro Pereyra
+ Rabanal.
+ [Ruby 1.9 - Bug #5426]
- * test/ruby/envutil.rb (assert_separately): add $: to separate process.
+Sun Oct 9 11:06:52 2011 Kazuki Tsujimoto <kazuki@callcc.net>
- * test/ruby/envutil.rb (assert_separately): fail if stderr is not
- empty and ignore_stderr is false.
+ * test/psych/test_yamldbm.rb: don't run test if the system
+ don't support yaml/dbm.
-Tue Apr 2 06:46:59 2013 Tanaka Akira <akr@fsij.org>
+ * test/syck/test_yamldbm.rb: ditto.
- * ext/-test-/num2int/num2int.c: Rename utility methods
- to global functions to ease manual experiments.
+Sat Oct 8 08:54:56 2011 Eric Hodel <drbrain@segment7.net>
- * test/-ext-/num2int/test_num2int.rb: Follow the above change.
+ * enum.c (group_by): Improve group_by description. Patch by b t.
+ [#5411]
-Mon Apr 1 22:26:17 2013 Tanaka Akira <akr@fsij.org>
+Sat Oct 8 03:17:51 2011 Eric Hodel <drbrain@segment7.net>
- * 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.
+ * lib/shell.rb: Document some methods of Shell. Patch by Carol
+ Nichols. [Ruby 1.9 - Bug #5417]
-Mon Apr 1 22:08:02 2013 Benoit Daloze <eregontp@gmail.com>
+Fri Oct 7 17:54:28 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/zlib/zlib.c (Zlib::Inflate.new):
- Fix documentation syntax and naming errors.
- Based on patch by Robin Dupret. Fix GH-271.
+ * lib/test/unit/assertions.rb (assert_send, assert_not_send):
+ parenthesize non-empty arguments.
-Mon Apr 1 21:22:31 2013 Tanaka Akira <akr@fsij.org>
+Fri Oct 7 06:35:50 2011 Eric Hodel <drbrain@segment7.net>
- * test/-ext-/num2int/test_num2int.rb: Test small bignums.
+ * array.c: Use + for arguments described in documentation to allow
+ rdoc -C2 to work better. Remove <code> from method references to
+ allow cross-references in HTML documentation.
-Mon Apr 1 21:10:56 2013 Tanaka Akira <akr@fsij.org>
+Thu Oct 6 18:46:23 2011 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
- * 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.
+ * vm_eval.c (make_no_method_exception): fix typo.
-Mon Apr 1 20:57:57 2013 Tanaka Akira <akr@fsij.org>
+ * vm_insnhelper.c, vm_insnhelper.h: ditto.
- * ext/-test-/num2int/num2int.c: Return string for result, instead of
- printing.
+Thu Oct 6 16:29:30 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/-ext-/num2int/test_num2int.rb: updated to follow above change.
+ * vm_eval.c (make_no_method_execption): extract from
+ raise_method_missing().
-Mon Apr 1 20:08:07 2013 Tanaka Akira <akr@fsij.org>
+ * vm_eval.c (send_internal): remove inadvertent symbol creation
+ from public_send. based on a patch by Jeremy Evans <code AT
+ jeremyevans.net> in [ruby-core:38576]. [Feature #5112]
- * 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.
+ * vm_insnhelper.c (vm_call_method): remove inadvertent symbol
+ creation from send and __send__, too.
-Mon Apr 1 18:41:35 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Oct 6 14:59:11 2011 Eric Hodel <drbrain@segment7.net>
- * configure.in: skip autoconf 2.64 and 2.66, 2.67 seems short-lived
- but stick on it for Debian Squeeze.
+ * lib/time.rb: Clean up Time documentation. Patch by Jake Goulding.
+ [Ruby 1.9 - Bug #5416]
-Mon Apr 1 14:22:52 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Oct 6 10:00:54 2011 Eric Hodel <drbrain@segment7.net>
- * configure.in: check clang version by predefined macro values.
- [Bug #8192]
+ * enum.c (group_by): Improve documentation based on patch by b t.
-Mon Apr 1 12:05:15 2013 Tanaka Akira <akr@fsij.org>
+Thu Oct 6 09:56:30 2011 Eric Hodel <drbrain@segment7.net>
- * numeric.c (check_uint): Take the 1st argument as unsigned long,
- instead of VALUE. Refine the validity test conditions.
- (check_ushort): Ditto.
+ * enum.c: Clean up wording in Enumerable documentation. Patch by b t.
+ [Ruby 1.9 - Bug #5411]
-Mon Apr 1 07:15:03 2013 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
+Thu Oct 6 09:17:18 2011 Eric Hodel <drbrain@segment7.net>
- * configure.in: use quadrigraph to put '[' or ']'. [Bug #8192]
+ * time.c (Init_Time): Remove editorial comments from Time
+ documentation, fix link.
-Mon Apr 1 04:16:41 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Thu Oct 6 09:14:20 2011 Eric Hodel <drbrain@segment7.net>
- * configure.in: kick old clang. [ruby-dev:47204] [Bug #8192]
+ * time.c (Init_Time): Improve Time documentation. Patch by Shane
+ Emmons. [Ruby 1.9 - Bug #5404]
+ * lib/time.rb: Improve time.rb documentation including Time.strptime.
+ Patch by Shane Emmons. [Ruby 1.9 - Bug #5402]
-Mon Apr 1 01:12:46 2013 Tanaka Akira <akr@fsij.org>
+Thu Oct 6 08:54:05 2011 Eric Hodel <drbrain@segment7.net>
- * include/ruby/ruby.h (FIX2ULONG): Make it consistent with NUM2ULONG.
+ * random.c: Improve documentation of Random. Patch by Gregory
+ Parkhurst. [Ruby 1.9 - Bug #5410]
- * ext/-test-/num2int/num2int.c: Add utility methods for FIX2XXX tests.
+Thu Oct 6 01:44:51 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * test/-ext-/num2int/test_num2int.rb: Add tests for FIX2XXX.
+ * cont.c (cont_mark): mark original Thread object from saved_thread.
+ [ruby-dev:44571] [Bug #5386]
-Sun Mar 31 17:17:56 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Oct 5 16:33:04 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * proc.c (rb_mod_define_method): consider visibility in define_method.
- patch by mashiro <mail AT mashiro.org>. fix GH-268.
+ * vm_insnhelper.c (vm_call_cfunc): remove useless hack.
-Sun Mar 31 15:40:30 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Oct 5 05:56:39 2011 Eric Hodel <drbrain@segment7.net>
- * win32/configure.bat: try to fix option arguments split by commas and
- equals here. this batch file no longer run with old command.com.
+ * hash.c (Init_Hash): Improve Hash documentation. Patch by Alvaro
+ Pereyra Rabanal. [Ruby 1.9 - Bug #5405]
- * tool/mkconfig.rb: no hacks for cmd.exe.
+Wed Oct 5 05:47:59 2011 Eric Hodel <drbrain@segment7.net>
-Sun Mar 31 13:47:04 2013 Tanaka Akira <akr@fsij.org>
+ * random.c (Init_Random): Add a top-level comment for Random. Patch
+ by Brett Bim. [Ruby 1.9 - Bug #5403]
- * 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.
+Wed Oct 5 02:50:27 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-Sun Mar 31 06:27:17 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/psych/lib/psych/syntax_error.rb: Add file, line, offset, and
+ message attributes during parse failure.
+ * ext/psych/parser.c: Update parser to raise exception with correct
+ values.
+ * test/psych/test_exception.rb: corresponding tests.
- * 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]
+Wed Oct 5 01:52:16 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-Sat Mar 30 14:11:28 2013 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+ * ext/psych/parser.c (parse): Use context_mark for indicating error
+ line and column.
- * bcc32: removed. agreed at
- http://bugs.ruby-lang.org/projects/ruby/wiki/DevelopersMeeting20130223Japan
+Wed Oct 5 01:22:08 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-Sat Mar 30 03:58:00 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * ext/psych/lib/psych/scalar_scanner.rb: use normal begin / rescue
+ since postfix rescue cannot receive the exception class. Thanks
+ nagachika!
- * 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).
+Tue Oct 4 21:10:08 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Mar 30 03:49:21 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * class.c (class_alloc): allocate extra memory after containing
+ object setup to get rid of rare-but-potential memory leak.
- * 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).
+ * gc.c (gc_mark_children): skip marking extended members if ptr is
+ NULL.
-Fri Mar 29 22:09:46 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Oct 4 16:17:50 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * thread.c (rb_mutex_synchronize_m): yield no block params. patch by
- splattael (Peter Suschlik) in [ruby-core:53773] [Bug #8097].
- fix GH-266.
+ * lib/time.rb (Time.strptime): use Time.at if d[:seconds] is set.
+ Reported by Christopher Eberz. [ruby-core:39903] Bug #5399
-Fri Mar 29 16:51:39 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Oct 4 11:44:10 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * io.c (argf_next_argv): set init flag if succeeded to forward, after
- skipping.
+ * gc.c (rb_gc_set_params): ruby_verbose can be Qnil, so use RTEST.
- * io.c (argf_block_call_i, argf_block_call): no more forwarding if
- forwarded after skipping. [ruby-list:49185]
+Tue Oct 4 08:33:41 2011 Eric Hodel <drbrain@segment7.net>
- * io.c (argf_close): deal with init flag.
+ * ext/etc/etc.c: Document Etc, Etc.sysconfdir, Etc.systmpdir. Patch
+ by mathew murphy. [Ruby 1.9 - Bug #5396]
- * io.c (argf_block_call_i, argf_block_call): forward next file if
- skipped while iteration, to get rid of IOError. [ruby-list:49185]
+Tue Oct 4 08:21:51 2011 Eric Hodel <drbrain@segment7.net>
-Fri Mar 29 11:09:48 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/shellwords.rb: Update toplevel comment with an example. Patch
+ by Samnang Chhun. [Ruby 1.9 - Bug #5388]
- * lib/mkmf.rb (configuration): not include all CFLAGS in CXXFLAGS, to
- use different set than C for C++. [ruby-core:45273] [Bug #6504]
+Tue Oct 4 08:15:50 2011 Eric Hodel <drbrain@segment7.net>
-Fri Mar 29 10:24:10 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * proc.c (proc_call): Update documentation to match argument handling
+ of proc/Proc.new/lambda/->()
- * 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]
+Tue Oct 4 07:59:16 2011 Eric Hodel <drbrain@segment7.net>
-Fri Mar 29 06:39:42 2013 Tanaka Akira <akr@fsij.org>
+ * proc.c (proc_call): Fix documentation of Proc#call vs Proc#===.
+ [Ruby 1.9 - Bug #5349]
- * 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
+Tue Oct 4 07:43:18 2011 Eric Hodel <drbrain@segment7.net>
-Fri Mar 29 00:54:54 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * array.c (rb_ary_initialize): Make Array.new description match
+ call-seq. Patch by Henry Maddocks. [Ruby 1.9 - Bug #5344]
- * lib/mkmf.rb (MAIN_DOES_NOTHING): ensure symbols for tests to be
- preserved. [ruby-core:53745] [Bug #8169]
+Tue Oct 4 07:35:23 2011 Eric Hodel <drbrain@segment7.net>
-Thu Mar 28 23:11:25 2013 Tanaka Akira <akr@fsij.org>
+ * array.c (rb_ary_initialize): Add output for examples. Patch by
+ Jonathan Mukai. [Ruby 1.9 - Bug #5216]
- * 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.
+Tue Oct 4 07:30:50 2011 Eric Hodel <drbrain@segment7.net>
-Thu Mar 28 23:10:10 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * array.c (rb_ary_s_create): Add example results for Array::[]. Patch
+ by Jonathan Mukai. [Ruby 1.9 - Bug #5215]
- * include/ruby/io.h: rename SVR3,4 member names as POSIX compliant,
- to get rid of conflict on AIX. [ruby-core:53765] [Bug #8174]
+Tue Oct 4 07:15:17 2011 Eric Hodel <drbrain@segment7.net>
-Thu Mar 28 18:22:21 2013 Tanaka Akira <akr@fsij.org>
+ * lib/rubygems: Update to RubyGems 1.8.11. Move Deprecate into the
+ Gem namespace.
- * test/-ext-/num2int/test_num2int.rb: extract
- assert_num2i_success_internal and assert_num2i_error_internal and
- provide assertion messages as "NUM2XXX(NNN)".
+Tue Oct 4 06:43:47 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-Thu Mar 28 07:05:25 2013 Tanaka Akira <akr@fsij.org>
+ * ext/psych/lib/psych.rb: update psych version.
+ * ext/psych/psych.gemspec: generate new gemspec for new version.
- * include/ruby/intern.h: Delete redundant inclusions caused by
- AC_INCLUDES_DEFAULT in defines.h.
+Tue Oct 4 06:29:55 2011 Aaron Patterson <aaron@tenderlovemaking.com>
- * include/ruby/defines.h: Ditto.
+ * ext/psych/lib/psych.rb: calling `yaml` rather than `to_yaml`.
+ * ext/psych/lib/psych/nodes/node.rb: Rename `to_yaml` to just `yaml`
+ in order to avoid YAML::ENGINE switching from replacing this method.
+ * test/psych/helper.rb: fix tests for method name change.
+ * test/psych/test_document.rb: ditto
+ * test/psych/visitors/test_emitter.rb: ditto
- * include/ruby/ruby.h: Ditto.
+Tue Oct 4 06:20:19 2011 Aaron Patterson <aaron@tenderlovemaking.com>
- * include/ruby/st.h: Ditto.
+ * ext/psych/lib/psych/scalar_scanner.rb: Match values against the
+ floating point spec defined in YAML to avoid erroneous parses.
+ * test/psych/test_numeric.rb: corresponding test.
-Thu Mar 28 06:51:31 2013 Tanaka Akira <akr@fsij.org>
+Tue Oct 4 05:59:24 2011 Aaron Patterson <aaron@tenderlovemaking.com>
- * 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.
+ * ext/psych/lib/psych/visitors/to_ruby.rb: ToRuby visitor can be
+ constructed with a ScalarScanner.
+ * ext/psych/lib/psych/visitors/yaml_tree.rb: ScalarScanner can be
+ passed to the YAMLTree visitor.
-Wed Mar 27 22:09:14 2013 Tanaka Akira <akr@fsij.org>
+Tue Oct 4 05:47:23 2011 Aaron Patterson <aaron@tenderlovemaking.com>
- * 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.
+ * ext/psych/lib/psych/visitors/to_ruby.rb: Define Regexp::NOENCODING
+ for 1.9.2 backwards compatibility.
+ * ext/psych/lib/psych/visitors/yaml_tree.rb: Fix Date string
+ generation for 1.9.2 backwards compatibility.
- * 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.
+Mon Oct 3 23:56:39 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-Wed Mar 27 20:59:47 2013 Tanaka Akira <akr@fsij.org>
+ * gc.c (rb_gc_set_params): output GC parameter change messages only
+ if -w/-v options are specified. these messages are output to stderr,
+ not to stdout. [ruby-core:39795] [Bug #5380]
- * test/-ext-/num2int/test_num2int.rb (assert_num2i_success): New
- utility method.
- (assert_num2i_error): Ditto.
+ * test/ruby/test_gc.rb (test_gc_parameter): add test for it.
-Wed Mar 27 20:37:59 2013 Tanaka Akira <akr@fsij.org>
+Sun Oct 2 20:05:32 2011 Kazuki Tsujimoto <kazuki@callcc.net>
- * time.c (num_exact): Use to_r method only if to_int method is
- available.
- [ruby-core:53764] [Bug #8173] Reported by Hiro Asari.
+ * vm.c (rb_thread_mark), cont.c (cont_mark): revert r33369 and r33371
+ that may cause SEGV in certain environments.
-Wed Mar 27 12:07:40 2013 Tanaka Akira <akr@fsij.org>
+Sun Oct 2 12:14:06 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * test/-ext-/num2int/test_num2int.rb (test_num2ll): test LLONG_MIN,
- not LONG_MIN.
+ * test/psych/test_yamldbm.rb: add test case.
+ * test/syck/test_yamldbm.rb: ditto.
-Wed Mar 27 12:02:45 2013 Tanaka Akira <akr@fsij.org>
+Sun Oct 2 11:28:09 2011 Aaron Patterson <aaron@tenderlovemaking.com>
- * internal.h (TIMET_MAX_PLUS_ONE): definition simplified.
+ * lib/yaml/store.rb: make initialize method signature match the
+ superclass signature.
-Wed Mar 27 06:39:41 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sun Oct 2 10:44:01 2011 Kazuki Tsujimoto <kazuki@callcc.net>
- * lib/mkmf.rb (MAIN_DOES_NOTHING): force to refer symbols for tests
- to be preserved. [ruby-core:53745] [Bug #8169]
+ * io.c: fix documentation of ARGF.lineno=.
-Wed Mar 27 05:15:37 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Oct 1 20:03:19 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * configure.in (RUBY_REPLACE_TYPE): define SIGNEDNESS_OF_type same as
- check_signedness of mkmf.rb.
+ * lib/mkmf.rb (have_framework): try as Objective-C.
+ https://twitter.com/nagachika/status/120294447660539904
- * internal.h (TIMET_MAX, TIMET_MIN, TIMET_MAX_PLUS_ONE): use
- SIGNEDNESS_OF_TIME_T.
+Sun Oct 2 08:43:25 2011 Kazuki Tsujimoto <kazuki@callcc.net>
-Wed Mar 27 00:28:45 2013 Tanaka Akira <akr@fsij.org>
+ * vm.c (rb_thread_mark), cont.c (cont_mark): self pointer should not
+ be marked by itself. Patch by Koichi Sasada.
+ [ruby-dev:44567] [Bug #5386]
- * internal.h (TIMET_MAX_PLUS_ONE): Defined.
+Sun Oct 2 00:42:14 2011 Kazuki Tsujimoto <kazuki@callcc.net>
- * thread.c (double2timeval): Saturate out-of-range values.
+ * vm.c (rb_thread_mark): rb_thread_t needs self to be marked.
+ [ruby-dev:44566] [Bug #5386]
-Tue Mar 26 23:41:18 2013 Tanaka Akira <akr@fsij.org>
+Sat Oct 1 09:48:53 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * internal.h: Define TIMET_MAX and TIMET_MIN here.
+ * gc.c (add_heap_slots, init_heap): reset heaps_inc zero when
+ heap slots are expanded by environment variable RUBY_HEAP_MIN_SLOTS.
+ [ruby-core:39777] [Bug #5380]
- * time.c: Remove TIMET_MAX and TIMET_MIN definitions.
+ * test/ruby/test_gc.rb (test_gc_parameter): add test for it.
- * thread.c: Ditto.
+ * test/ruby/envutil.rb (assert_normal_exit): add :child_env option to
+ enable pass environment variables to child process.
- * thread_pthread.c: Remove TIMET_MAX definition.
+Thu Sep 29 13:17:51 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * thread_win32.c: Ditto.
+ * array.c (ary_join_1): should not copy the encoding of non-string
+ element after string element. [ruby-core:39776] [Bug #5379]
-Tue Mar 26 22:31:10 2013 Tanaka Akira <akr@fsij.org>
+Thu Sep 29 11:53:56 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/socket/socket.c (sockaddr_len): return the shortest length for
- unknown socket address.
+ * gc.c (slot_sweep, rb_gc_finalize_deferred)
+ (rb_objspace_call_finalizer, rb_gc): run finalizers
+ sequentially. [ruby-dev:44562]
-Tue Mar 26 22:14:46 2013 Tanaka Akira <akr@fsij.org>
+Thu Sep 29 20:37:38 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * thread.c (double2timeval): convert the infinity to TIME_MAX to avoid
- SEGV by Thread.new {}.join(Float::INFINITY) on
- Debian GNU/Linux (amd64).
+ * ext/gdbm/gdbm.c (rb_gdbm_fatal): adjust argument type.
-Mon Mar 25 07:09:20 2013 Eric Hodel <drbrain@segment7.net>
+Thu Sep 29 20:10:42 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * 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]
+ * gc.c (is_id_value, is_live_object): extract from id2ref().
-Mon Mar 25 06:59:01 2013 Eric Hodel <drbrain@segment7.net>
+ * gc.c (run_finalizer): use object instead of object id.
- * 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]
+Thu Sep 29 20:07:36 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Mar 24 10:38:24 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * use RB_TYPE_P which is optimized for constant types, instead of
+ comparison with TYPE.
- * addr2line.c (putce): suppress unused return value warning.
+Wed Sep 28 09:20:37 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Mar 25 02:01:03 2013 Narihiro Nakamura <authornari@gmail.com>
+ * configure.in (pthread_np.h): needs pthread.h to be included
+ previously on OpenBSD. a patch by George Koehler <xkernigh AT
+ netscape.net> at [ruby-core:39752]. [Bug #5376]
- * proc.c (bm_free): need to clean up the mark flag of a free and
- unlinked method entry. [Bug #8100] [ruby-core:53439]
+Wed Sep 28 04:41:35 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-Sun Mar 24 22:13:51 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * test/psych/test_yamlstore.rb: use tmpdir for tmpfile.
+ * test/syck/test_yamlstore.rb: ditto.
- * 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]
+Wed Sep 28 04:10:46 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-Sun Mar 24 18:29:46 2013 Akinori MUSHA <knu@iDaemons.org>
+ * ext/bigdecimal/README: update report to.
- * string.c (rb_str_rpartition): Fix String#rpartition(/re/)
- against a multibyte string. [Bug #8138] [ruby-dev:47183]
+Tue Sep 28 04:05:00 2011 Kenta Murata <mrkn@mrkn.jp>
-Sun Mar 24 13:42:24 2013 Narihiro Nakamura <authornari@gmail.com>
+ * ext/bigdecimal/bigdecimal_en.html: removed because this file isn't
+ maintained now.
- * gc.c (GC_ENABLE_LAZY_SWEEP): new macro to switch lazy sweeping
- for debugging. [Feature #8024] [ruby-dev:47135]
+ * ext/bigdecimal/bigdecimal_ja.html: ditto.
-Sun Mar 24 12:55:47 2013 Narihiro Nakamura <authornari@gmail.com>
+Tue Sep 27 09:55:40 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * 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.
+ * thread_pthread.c: make native_fd_select().
+ * thread.c (do_select): remove #ifdef _WIN32. Instead, use
+ native_fd_select() always.
-Sun Mar 24 11:03:31 2013 Tanaka Akira <akr@fsij.org>
+Tue Sep 27 09:44:59 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * test/ruby/test_require.rb: Remove temporally files in the tests.
+ * thread.c (do_select): remove cygwin specific hack. It's layer
+ violation and too large hack.
+ * thread.c (cmp_tv, subtract_tv): removed.
- * test/ruby/test_rubyoptions.rb: Ditto.
+Tue Sep 27 03:50:19 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * test/logger/test_logger.rb: Ditto.
+ * test/rexml/test_sax.rb: add require 'rexml/document'.
- * test/psych/test_psych.rb: Ditto.
+Tue Sep 27 03:32:27 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * test/readline/test_readline.rb: Ditto.
+ * test/psych/test_yamldbm.rb: fix #setup and #teardown.
+ [Bug #5370] [ruby-core:39730]
+ * test/syck/test_yamldbm.rb: ditto.
- * test/syslog/test_syslog_logger.rb: Ditto.
+Mon Sep 26 11:27:38 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * test/webrick/test_httpauth.rb: Ditto.
+ * lib/webrick/httputils.rb: Add MIME Type definition of .js and .svg.
+ patched by Hal Brodigan. [ruby-core:39704] [Bug #5365]
- * test/zlib/test_zlib.rb: Ditto.
+Mon Sep 26 09:20:44 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sun Mar 24 05:36:29 2013 Eric Hodel <drbrain@segment7.net>
+ * configure.in: remove DJGPP support. It's not longer supported
+ since ruby 1.9.0.
- * lib/rinda/ring.rb: Added documentation for multicast support.
+Mon Sep 26 09:07:46 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * NEWS: Point to above documentation.
+ * include/ruby/defines.h: remove NextStep, OpenStep, Rhapsody
+ support. Last activity of their OSes are 7 years ago.
+ * configure.in: ditto.
+ * dir.c: ditto.
+ * ext/tk/extconf.rb: ditto.
-Sun Mar 24 05:32:39 2013 Eric Hodel <drbrain@segment7.net>
+Mon Sep 26 09:02:49 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * test/rinda/test_rinda.rb: Restore tests commented out while fixing
- test slowdown bug before r39895.
+ * configure.in: remove a code for human68k. it's no longer
+ supported since r19677.
-Sun Mar 24 05:03:36 2013 Eric Hodel <drbrain@segment7.net>
+Sun Sep 25 23:43:32 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * 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.
+ * ext/openssl/ossl_asn1.c: fix int_ossl_asn1_decode0_cons when being
+ fed arbitrary string values.
+ Clearly distinguish between the cases "universal, infinite and
+ not a SEQUENCE or SET" and "universal SEQUENCE or SET, possibly
+ infinite". Raise error for universal tags that are not infinite.
+ * test/openssl/test_asn1.rb: add a test for this.
- * NEWS: Update with Rinda multicast support
+ Thanks to Hiroshi Yoshida for reporting this bug.
+ [Bug #5363] [ruby-dev:44542]
-Sun Mar 24 04:13:27 2013 Eric Hodel <drbrain@segment7.net>
+Sun Sep 25 20:57:18 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * test/rinda/test_rinda.rb: Fixed test failures in r39890 and r39891
- due to stopping DRb service.
+ * test/syck/test/yamldbm.rb: add test for Syck::DBM.
+ * test/psych/test_yamldbm.rb: add test for Psych::DBM.
+ * test/psych/test_yamlstore.rb: add test for Psych::PStore.
-Sun Mar 24 03:34:02 2013 Eric Hodel <drbrain@segment7.net>
+Sun Sep 25 20:54:10 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * 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.
+ * lib/yaml/dbm/dbm.rb: fix #update, add #key for using instead #index.
+ [Bug #5305][ruby-dev:44485]
-Sun Mar 24 02:14:53 2013 Tanaka Akira <akr@fsij.org>
+Sun Sep 25 16:54:33 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * test/mkmf/test_have_macro.rb: remove temporally files in the tests.
+ * encoding.c (require_enc): reject only loading from untrusted
+ load paths. [ruby-dev:44541] [Bug #5279]
-Sat Mar 23 23:50:04 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * transcode.c (load_transcoder_entry): ditto.
- * addr2line.c (kprintf): added from FreeBSD libstand's printf.
- this is consided as async signal safe function.
+Sun Sep 25 16:45:05 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * addr2line.c (rb_dump_backtrace_with_lines): use kfprintf.
- [Bug #8144] [ruby-core:53632]
+ * configure.in: ignore all warnings from an arbitrary
+ header in /usr/local/include.
-Sat Mar 23 23:28:00 2013 Kenta Murata <mrkn@mrkn.jp>
+Sun Sep 25 03:43:03 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * ext/bigdecimal/bigdecimal.c (BigDecimal_divide): Use Qnil and NIL_P
- instead of (VALUE)0 as a return value.
+ * enum.c (slice_before_i): use rb_attr_get to suppress wrong warning
+ for internal instance variable slicebefore_initial_state.
- * ext/bigdecimal/bigdecimal.c (BigDecimal_div): ditto.
+Fri Sep 23 14:20:14 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * ext/bigdecimal/bigdecimal.c (BigDecimal_divremain): ditto.
+ * ext/openssl/ossl_asn1.c: remove unused variable.
- * ext/bigdecimal/bigdecimal.c (BigDecimal_remainder): ditto.
+Fri Sep 23 13:46:59 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-Sat Mar 23 17:39:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/openssl/test_ssl_session.rb: execute test_session_exts_read
+ only for OpenSSL versions >= 0.9.8k. Thanks, Eric Wong, for
+ reporting this.
+ [Bug #4961] [ruby-core:37726]
- * 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]
+Fri Sep 23 11:59:08 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-Fri Mar 22 17:48:34 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/openssl/test_ssl_session.rb: ensure server calls callbacks in
+ test_ctx_server_session_cb. Thanks to Eric Wong for the patch.
+ [Bug #5336] [ruby-core:39619]
- * 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].
+Thu Sep 22 02:53:19 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Mar 22 17:38:42 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_insnhelper.c (vm_call_cfunc): suppress a warning. note that
+ `volatile type *var' doesn't make var itself volatile.
- * 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]
+Thu Sep 22 01:52:48 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-Fri Mar 22 10:29:00 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * thread_pthread.c (ubf_select): activate timer thread when interrupt
+ blocking thread.
+ A patch created by Koichi Sasada. [ruby-core:39634] [Bug #5343]
+ to cover race condition, timer thread periodically send SIGVTARLM to
+ threads in signal thread list. so you should activate timer thread
+ when interrupt a thread.
- * ext/bigdecimal/bigdecimal.c: Fix style.
+Wed Sep 21 16:55:26 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-Fri Mar 22 05:30:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/io/wait/test_io_wait.rb (TestIOWait#setup): of course, the
+ behavior of mingw is just same with mswin.
- * parse.y (ambiguous_operator): refine warning message, since this
- warning is shown after literal too.
+Tue Sep 20 18:08:51 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Mar 22 04:51:14 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_insnhelper.c (vm_get_cvar_base): reduce duplicated checks and
+ move a warning outside the loop.
- * vm_insnhelper.c (vm_callee_setup_keyword_arg): should check required
- keyword arguments even if rest hash is defined. [ruby-core:53608]
- [Bug #8139]
+Mon Sep 19 18:55:51 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-Fri Mar 22 01:00:17 2013 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+ * lib/fileutils.rb (module FileUtils): improve performance of
+ FileUtils.compare_stream. a patch by Masaki Matsushita.
+ [Feature #5337] [ruby-core:39622]
- * process.c (rb_execarg_addopt, run_exec_pgroup): use rb_pid_t
- instead of pid_t.
+Mon Sep 19 18:42:58 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * ext/pty/pty.c (raise_from_check, pty_check): ditto.
+ * test/-ext-/old_thread_select/test_old_thread_select.rb:
+ select() with timeout may return early in old Linux kernels
+ with 250 Hz tickrate and no dynticks, so skip everything older
+ than 2.6.32 (which has long term support).
+ And, Make the timing assertions consistently use assert_operator with
+ timing difference in error message
+ Patch by Eric Wong. [Bug #5335] [ruby-core:39618]
-Fri Mar 22 00:04:15 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Mon Sep 19 09:28:06 2011 Eric Hodel <drbrain@segment7.net>
- * addr2line.c (rb_dump_backtrace_with_lines): output line at once.
+ * test/openssl/test_ssl.rb (class OpenSSL): Test
+ OpenSSL::SSL::SSLSocket#session and #session=.
-Thu Mar 21 23:17:08 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Sep 19 07:54:17 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * thread.c (ruby_kill): get rid of deadlock on signal 0.
- [ruby-dev:47182] [Bug #8137]
+ * object.c (rb_obj_clone): singleton class should be attached
+ singleton object to. a patch by Satoshi Shiba <shiba AT rvm.jp>
+ at [ruby-dev:44460]. [Bug #5274]
-Thu Mar 21 22:39:46 2013 Naohisa Goto <ngotogenome@gmail.com>
+Sat Sep 17 23:34:10 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * 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]
+ * parse.y (parser_data_type): inherit the core type in ripper so
+ that checks in core would work. [ruby-core:39591] [Bug #5331]
-Thu Mar 21 16:48:06 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Sep 17 12:44:04 2011 Kazuki Tsujimoto <kazuki@callcc.net>
- * parse.y (simple_re_meta): escape all closing characters, not only
- round parenthesis. [ruby-core:53578] [Bug #8133]
+ * lib/find.rb (Find.find): add documentation that Find.find
+ without block returns an enumerator.
-Thu Mar 21 13:50:46 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Sep 15 11:39:43 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * vm_core.h (UNINITIALIZED_VAR): suppress warnings by clang 4.2.
- [ruby-core:51742] [Bug #7756]
+ * gc.c (mark_entry, mark_key, mark_keyvalue): adjust callback
+ argument types.
-Thu Mar 21 07:34:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Thu Sep 15 01:44:10 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * ext/date/date_core.c: Typo in Date::MONTHNAMES by Matt Gauger
- [GH fixes #261]
+ * ext/tk/*: Change encoding from EUC-JP to UTF-8
-Wed Mar 20 22:53:14 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Sep 14 11:43:37 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * lib/mkmf.rb (find_library): fix to format message.
- [ruby-core:53568] [Bug #8130]
+ * thread.c (rb_fd_rcopy): added an argument guard.
+ Patch by NAKAMURA Usaku. [Bug #5306] [ruby-core:39435]
-Wed Mar 20 22:52:52 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Sep 13 20:21:49 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/mkmf.rb (install_dirs, with_destdir): prefix with DESTDIR
- directories to install only unless bundled extension libraries.
- [ruby-core:53502] [Bug #8115]
+ * lib/pstore.rb, test/test_pstore.rb: suppress warnings with -v.
-Wed Mar 20 17:47:53 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * lib/pstore.rb (PStore): always open in binary mode even if
+ default encodings are set. [Bug #5311] [ruby-core:39503]
- * 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.
+Tue Sep 13 05:37:15 2011 Yukihiro Matsumoto <matz@ruby-lang.org>
-Wed Mar 20 16:40:48 2013 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+ * io.c (Init_IO): update BINARY comment. it should not change the
+ encoding of the result to ASCII-8BIT. [ruby-talk:387719]
- * test/ruby/test_signal.rb (test_hup_me): skip if HUP isn't supported.
- On Windows this test causes ArgumentError.
+Mon Sep 12 19:55:00 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Wed Mar 20 16:24:12 2013 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+ * thread.c (rb_thread_select): fix to ignore an argument
+ modification of rb_thread_fd_select().
+ based on a patch by Eric Wong. [Bug #5306] [ruby-core:39435]
+ * thread.c (rb_fd_rcopy): New. for reverse fd copy.
- * 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]
+ * test/-ext-/old_thread_select/test_old_thread_select.rb
+ (test_old_select_false_positive): test for bug5306.
-Wed Mar 20 15:22:07 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * ext/-test-/old_thread_select/old_thread_select.c (fdset2array):
+ New. convert fdsets to array.
+ * ext/-test-/old_thread_select/old_thread_select.c (old_thread_select):
+ return 'read', 'write', 'except' argument of rb_thread_select()
+ to ruby script.
- * test/win32ole/test_err_in_callback.rb (TestErrInCallBack#setup): use
- relative path to get rid of "too long commandline" error.
+Mon Sep 12 13:38:12 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Mar 20 04:27:42 2013 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
+ * README.EXT, README.EXT.ja (2.2.2), parse.y (rb_check_id): add
+ documents for rb_check_id().
- * test/rinda/test_rinda.rb: remove unused variables.
- patched by Vipul A M <vipulnsward@gmail.com>
+Mon Sep 12 12:53:39 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-Wed Mar 20 04:15:32 2013 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
+ * lib/rake/file_list.rb (Rake::FileList#egrep): there is no need to
+ open files in binary mode.
+ see more details in https://github.com/jimweirich/rake/issues/74
- * ext/bigdecimal/bigdecimal.c: fixed typo.
- patched by Vipul A M <vipulnsward@gmail.com>
+Mon Sep 12 12:42:36 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Mar 16 03:40:49 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * test/ruby/test_exception.rb (TestException#test_exit_success_p):
+ assert also the cases when exiting with true and false.
- * test/ruby/test_signal.rb (test_hup_me): added a few comments.
+ * lib/test/unit/assertions.rb (assert_send): make arguments in
+ the default message clearer.
-Sat Mar 16 03:39:38 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Sun Sep 11 05:23:14 2011 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
- * thread.c (ruby_kill): added a few comments.
+ * lib/matrix.rb: Deal with subclasses of Matrix [redmine #5307]
-Sat Mar 16 03:36:56 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Sat Sep 10 13:38:20 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * thread.c (ruby_kill): release GVL while waiting signal delivered.
+ * dir.c (dir_s_aref):
+ * dir.c (dir_entries): Two small documentation fixes.
+ A patch from Aaron Lerch. [Bug #5302] [ruby-core:39404]
-Tue Mar 19 19:50:48 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+Sat Sep 10 08:30:03 2011 Koichi Sasada <ko1@atdot.net>
- * ruby_kill (internal.h, thread.c): use rb_pid_t instead of pid_t.
- this fixes the build failure of mswin introduced at r39819.
+ * gc.c (GC_PROFILE_MORE_DETAIL, CALC_EXACT_MALLOC_SIZE):
+ define macros only if they are not defined.
+ fixes: [Ruby 1.9 - Feature #5291]
-Tue Mar 19 17:09:30 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Sep 10 08:25:47 2011 Yukihiro Matsumoto <matz@ruby-lang.org>
- * string.c (rb_str_conv_enc_opts): convert with one converter, instead
- of re-creating converters for each buffer expansion.
+ * parse.y (bv_decls): parse.y relies on $$ = $1 before action
+ routines. a patch from Michael Edgar. [Bug #5303]
+ [ruby-core:39429]
-Tue Mar 19 17:06:50 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Sep 10 01:37:55 2011 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
- * dir.c (glob_helper): compose HFS file names from UTF8-MAC.
- [ruby-core:48745] [Bug #7267]
+ * sample/drb/dhasenc.rb: coding cookie of Emacs is coding,
+ not encoding.
-Sat Mar 16 01:44:29 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * sample/mine.rb: ditto.
- * internal.h: added a declaration of ruby_kill().
- * thread.c (ruby_kill): helper function of kill().
+Fri Sep 9 21:56:40 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * 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]
+ * ext/bigdecimal/bigdecimal.c (BigDecimal_sqrt): Fix comment.
+ BigDecimal#sqrt requires argument. Reported by Makoto Kishimoto.
+ Thanks for your contribution. [Bug #5267] [ruby-dev:44452]
- * 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.
+Fri Sep 9 11:00:55 2011 Shota Fukumori <sorah@tubusu.net>
- * test/ruby/test_signal.rb (TestSignal#test_hup_me): test for
- the above.
+ * test/rubygems/test_gem_commands_help_command.rb: Add one
+ `require` because if run test-all with test/unit parallel
+ running, sometimes this test fails by some constants not found.
+ The error reason is some worker doesn't require the file needed by
+ this test. This issue is related to [ruby-core:36168].
-Sat Mar 16 00:42:39 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Fri Sep 9 10:22:03 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * io.c (linux_iocparm_len): enable only exist _IOC_SIZE().
- Because musl libc doesn't have it. [Bug #8051] [ruby-core:53229]
+ * thread.c (rb_thread_select): fix a typo to initialize efds
+ properly. [Bug #5299] [ruby-core:39380]
-Tue Mar 19 10:05:04 2013 Shota Fukumori <her@sorah.jp>
+Fri Sep 9 02:02:09 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * ext/objspace/objspace.c: Fix typo in doc. Patch by Sho Hashimoto.
- [Bug #8116] [ruby-dev:47177]
+ * template/yarvarch.ja:
+ Change encoding from Shift_JIS to UTF-8
-Tue Mar 19 02:13:00 2013 Kenta Murata <mrkn@mrkn.jp>
+Thu Sep 9 01:14:00 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * configure.in: set ac_cv_prog_cxx if CXX is supplied.
+ * sample/drb/README.rd.ja:
+ * sample/drb/dhasenc.rb:
+ * sample/mine.rb:
+ Change encoding from EUC-JP to UTF-8
-Tue Mar 19 01:18:00 2013 Kenta Murata <mrkn@mrkn.jp>
+Thu Sep 8 21:03:22 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * configure.in: Fix c++ compiler auto-selection not only for
- Darwin 11.x, but also the other versions of Darwin.
+ * ext/nkf/nkf-utf8/nkf.c: import nkf 2.1.2 (be9c280)
+ Bump version number/release date only.
-Tue Mar 19 00:26:22 2013 Narihiro Nakamura <authornari@gmail.com>
+Thu Sep 8 12:43:18 2011 Narihiro Nakamura <authornari@gmail.com>
- * gc.c: Improve accuracy of objspace_live_num() and
- allocated/freed counters. patched by tmm1(Aman Gupta).
- [Bug #8092] [ruby-core:53392]
+ * gc.c (Init_GC): defined GC::Profiler.raw_data. based on the
+ patch by Eric Hodel. [ruby-core:37857] [Bug #4991]
-Mon Mar 18 21:42:48 2013 Narihiro Nakamura <authornari@gmail.com>
+Thu Sep 8 09:02:53 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c: Avoid unnecessary heap growth. patched by tmm1(Aman Gupta).
- [Bug #8093] [ruby-core:53393]
+ * gc.c (id2ref): objects which are unmarked but not in sweep_slots
+ are not dead.
-Mon Mar 18 17:58:36 2013 Narihiro Nakamura <authornari@gmail.com>
+Thu Sep 8 07:44:25 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c: Fix unlimited memory growth with large values of
- RUBY_FREE_MIN. patched by tmm1(Aman Gupta).
- [Bug #8095] [ruby-core:53405]
+ * transcode.c (rb_declare_transcoder, load_transcoder_entry): no
+ longer need to limit the length of transcoder library name.
-Mon Mar 18 14:46:19 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+Thu Sep 8 07:36:36 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * test/win32ole/test_err_in_callback.rb
- (TestErrInCallBack#test_err_in_callback): shouldn't create a file in
- the top of build directory.
+ * ext/syck/lib/syck/types.rb: use toplevel Syck.
+ for the case someone define Syck::Syck (or YAML::Syck).
-Mon Mar 18 13:29:52 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Thu Sep 8 07:33:12 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * vm_dump.c (backtrace): on darwin use custom backtrace() to trace
- beyond _sigtramp. darwin's backtrace can't trace beyond signal
- trampoline with sigaltstack.
+ * gc.c (id2ref): unmarked object is already dead while lazy
+ sweeping, and to it cannot come back since other objects
+ referred from it might have been freed already.
- * configure.in: check execinfo.h on darwin.
+Wed Sep 8 03:48:00 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-Mon Mar 18 11:03:23 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * ext/readline/README.ja:
+ Change encoding from EUC-JP to UTF-8
- * vm_exec.h (END_INSN): revert r39517 because the segv seems fixed by
- r39806.
+Wed Sep 8 02:59:00 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-Mon Mar 18 10:41:06 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * test/rexml/test_encoding.rb:
+ Add require 'require 'rexml/document'
- * vm_exec.c: Correct predefined macro name. This typo is introduced by
- r36534 and should be backported to ruby_2_0_0.
+Wed Sep 8 02:53:00 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-Mon Mar 18 03:18:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * ext/nkf/nkf-utf8/nkf.c:
+ Change encoding from ISO-2022 to UTF-8
- * array.c: Typo in Array#delete by Timo Sand [GH fixes #258]
+Wed Sep 7 23:41:24 2011 Kouhei Sutou <kou@cozmixng.org>
-Mon Mar 18 01:14:56 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * lib/rexml/parsers/baseparser.rb, test/rexml/test_comment.rb:
+ allow a single hyphen in comment. [Bug #5278] [ruby-core:39289]
+ Reported by Thomas Fritzsche. Thanks!!!
- * io.c (io_fillbuf): show fd number on failure to debug.
- http://c5632.rubyci.org/~chkbuild/ruby-trunk/log/20130316T050302Z.diff.html.gz
+Wed Sep 7 17:27:18 2011 NARUSE, Yui <naruse@ruby-lang.org>
-Sun Mar 17 02:38:21 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * lib/yaml.rb: explicitly specify ::Object to avoid the collision with
+ Syck::Object.
- * ext/date/date_core.c: include sys/time.h for avoiding implicit
- declaration of gettimeofday().
+Tue Sep 6 21:06:49 2011 Shota Fukumori <sorah@tubusu.net>
-Sun Mar 17 00:55:31 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * lib/test/unit.rb (_run_suites): Now reports are written the
+ following order: Skip, Failure, Error. [Feature #5282]
- * include/ruby/missing.h: removed __linux__. it's unnecessary.
+ * test_sorting.rb: test for above.
-Fri Mar 15 14:57:16 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * test4test_sorting.rb: Ditto.
- * 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.
+ * lib/test/unit.rb (run): Put RUBY_DESCRIPTION before quitting.
+ [Feature #5282]
-Wed Mar 13 15:16:35 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Tue Sep 6 21:13:47 2011 Masaya Tarui <tarui@ruby-lang.org>
- * include/ruby/missing.h (__syscall): moved to...
- * io.c: here. because __syscall() is only used from io.c.
+ * win32/Makefile.sub (INSNS): change command line option -Ks to -Ku
+ for generate *.inc. because insns.def encoding has been changed SJIS
+ to UTF-8. if $BASERUBY is 1.9, -Ks cause an error. [Feature #5128]
+ (same as r33194)
- * 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].
+Tue Sep 6 15:55:24 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Mar 13 14:38:53 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * transcode.c (load_transcoder_entry): concatenate paths directly.
- * include/ruby/missing.h (struct timespec): include <sys/time.h>
+ * encoding.c (load_encoding): predefined encoding names are safe.
+ [ruby-dev:44469] [Bug #5279]
-Wed Mar 13 13:54:45 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * transcode.c (load_transcoder_entry): 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.
+Tue Sep 6 12:07:10 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * file.c: include sys/time.h explicitly.
- * random.c: ditto.
- * thread_pthread.c: ditto.
- * time.c: ditto.
- * ext/date/date_strftime.c: ditto.
+ * transcode.c: enabled econv newline option.
-Fri Mar 15 14:45:02 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Tue Sep 6 06:44:57 2011 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
- * configure.in (_FORTIFY_SOURCE): added a few comments.
+ * numeric.c (dbl2ival): Fix Float#divmod and #round for 32 bit
+ platform. part 1 of [bug #5276]
-Fri Mar 15 14:17:55 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Tue Sep 6 06:44:25 2011 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
- * thread_pthread.c (numberof): renamed from ARRAY_SIZE() because
- other all files use numberof().
+ * numeric.c (flo_round): Fix criteria for 32 bits platform
+ part 2 of [bug #5276]
-Say Mar 15 01:33:00 2013 Charles Oliver Nutter <headius@headius.com>
+Tue Sep 6 05:37:11 2011 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
- * 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/rinda/test_rinda.rb (test_core_03_notify): Fixed test failures
+ [ruby-dev:44430] [Ruby 1.9 - Bug #372]
-Fri Mar 15 23:06:18 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Sep 5 20:59:30 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * time.c (GetTimeval): check if already initialized instance.
+ * insns.def: change encoding pragma for emacs (shift_jis to utf-8).
- * time.c (GetNewTimeval): check if newly created instance.
+Mon Sep 5 19:32:15 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * time.c (time_init_0, time_init_1, time_init_copy, time_mload): must
- be newly created instance. [ruby-core:53436] [Bug #8099]
+ * Makefile.in (INSNS): change command line option -Ks to -Ku for
+ generate *.inc. because insns.def encoding has been changed SJIS to
+ UTF-8. if $BASERUBY is 1.9, -Ks cause an error. [Feature #5128]
-Fri Mar 15 14:51:33 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Sep 5 18:10:56 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * file.c (rb_sys_fail_path_with_func): share same function, and path
- may be nil.
+ * transcode.c (rb_econv_binmode): newline decorators are
+ exclusive.
-Fri Mar 15 08:24:51 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Mon Sep 5 15:03:37 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * io.c (rb_sys_fail_path): define & use rb_sys_fail_path0 like r39752
+ * test/rubygems/test_gem_security.rb
+ (test_class_build_self_signed_cert): reset opt[:trust_dir] to apply
+ temporary Gem.user_home.
-Fri Mar 15 04:08:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Mon Sep 5 10:04:35 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * proc.c: Typo in Proc.arity found by Jack Nagel [Bug #8094]
+ * README.ja, README.EXT.ja: resolve conflicts. [ruby-dev:44459]
-Thu Mar 14 16:59:09 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Sep 5 05:13:22 2011 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
- * configure.in (rb_cv_function_name_string): macro for function name
- string predefined identifier, __func__ in C99, or __FUNCTION__ in
- gcc.
+ * numeric.c (flo_round): Make Float#round round big values [bug
+ #5272]
- * file.c (rb_sys_fail_path): use RUBY_FUNCTION_NAME_STRING.
+Mon Sep 5 04:28:25 2011 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-Thu Mar 14 14:12:34 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * numeric.c (int_round): Integer#round always returns an Integer [Bug
+ #5271]
- * file.c (rb_sys_fail_path): use rb_sys_fail_path0 only on GCC.
- __func__ is C99 feature.
+Sun Sep 4 22:28:50 2011 Shugo Maeda <shugo@ruby-lang.org>
-Thu Mar 14 12:59:59 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * lib/net/imap.rb (default_port, default_imap_port,
+ default_tls_port, default_ssl_port, default_imaps_port):
+ added methods for consistency with Net::POP.
+ based on the patch by art lussos. [ruby-core:38997] [Bug #5198]
- * 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
+Sun Sep 4 21:19:19 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * file.c (rb_sys_fail_path): use rb_sys_fail_path0.
+ * Change encoding from EUC-JP to UTF-8. [Feature #5128]
-Thu Mar 14 12:53:15 2013 Luis Lavena <luislavena@gmail.com>
+Sun Sep 4 00:47:39 2011 Kazuki Tsujimoto <kazuki@callcc.net>
- * 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]
+ * test/ruby/test_fiber.rb (TestFiber#test_no_valid_cfp):
+ add a test. Unlike TestThread#test_no_valid_cfp,
+ this test succeeds even if win32ole is required (see r33153).
-Thu Mar 14 11:53:01 2013 Narihiro Nakamura <authornari@gmail.com>
+Sun Sep 4 00:11:49 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * NEWS: describe RUBY_HEAP_SLOTS_GROWTH_FACTOR.
+ * variable.c (rb_const_set): show the previous definition
+ location. [EXPERIMENTAL]
-Thu Mar 14 10:01:12 2013 Eric Hodel <drbrain@segment7.net>
+Sat Sep 3 23:56:24 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * doc/globals.rdoc: $? is thread-local
+ * configure.in (sizeof_struct_dirent_too_small): check if struct
+ dirent.d_name is too small.
-Wed Mar 13 23:25:59 2013 Narihiro Nakamura <authornari@gmail.com>
+ * configure.in (RUBY_MINGW32): take tool prefix from CC.
- * 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]
+Sat Sep 3 23:52:08 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Mar 13 19:43:46 2013 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+ * io.c (argf_next_argv): open in default text mode.
+ [ruby-core:39234] [Bug #5268]
- * doc/irb/irb.rd.ja: fix typo
+Sat Sep 3 18:40:57 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * ext/tk/MANUAL_tcltklib.eng: fix typos
+ * lib/thread.rb (SizedQueue#max=): raise ArgumentError if max is not
+ positive number. patch by Masaki Matsushita.
+ [ruby-dev:44449] [Bug #5259]
- * ext/tk/sample/tktextframe.rb (Tk#component_delegates): fix typo
+ * test/thread/test_queue.rb (test_sized_queue_initialize,
+ test_sized_queue_assign_max): add tests for it.
-Wed Mar 13 15:13:04 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Sep 2 21:11:16 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * class.c (rb_obj_singleton_methods): collect methods from the origin
- class. [ruby-core:53207] [Bug #8044]
+ * io.c (validate_enc_binmode, prep_stdio): default to text mode on
+ dosish platforms. [ruby-core:38822] [Bug #5164]
-Wed Mar 13 14:51:26 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * transcode.c (rb_econv_prepare_options): keep default ecflags
+ unchanged if no options.
- * 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]
+Fri Sep 2 14:36:47 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Mar 13 13:06:26 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_insnhelper.c (vm_search_const_defined_class): search
+ ancestors only when global scope. [ruby-core:39227] [Bug #5264]
- * configure.in (rm, shvar_to_cpp, unexpand_shvar): local is not
- available on old shells.
+Fri Sep 2 09:58:08 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * configure.in (shvar_to_cpp): escape quotes for old shells.
- [Bug #7959] [Bug #8071]
+ * parse.y (parser_tokadd_string, parser_yylex): ignore a backslash
+ which prefixes an non-ascii character, which has no escape
+ syntax. [ruby-core:39222] [Ruby 1.9 - Bug #5262]
-Wed Mar 13 11:11:07 2013 Shugo Maeda <shugo@ruby-lang.org>
+Fri Sep 2 04:05:25 2011 Aaron Patterson <aaron@tenderlovemaking.com>
- * object.c (Init_Object): remove Module#used, which has been
- introduced in Ruby 2.0 by mistake. [Bug #7916] [ruby-core:52719]
+ * ext/psych/lib/psych/visitors/yaml_tree.rb: emit strings tagged as
+ ascii-8bit as binary in YAML.
+ * test/psych/test_string.rb: corresponding test.
-Wed Mar 13 05:49:29 2013 Eric Hodel <drbrain@segment7.net>
+Fri Sep 2 01:07:14 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/irb.rb: Fix typo
+ * numeric.c (flo_round): substitute machine dependent magic number.
-Tue Mar 12 22:20:47 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Sep 1 17:31:22 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * compile.c (iseq_set_arguments, iseq_compile_each): support required
- keyword arguments. [ruby-core:51454] [Feature #7701]
+ * insns.def (defineclass), vm_insnhelper.c (vm_get_cvar_base): see
+ also inherited constants for classes without superclass and
+ modules. [ruby-core:37698] [Bug #3423]
- * iseq.c (rb_iseq_parameters): ditto.
+Thu Sep 1 16:18:44 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
- * parse.y (f_kw, f_block_kw): ditto. this syntax is still
- experimental, the notation may change.
+ * Release GVL while OpenSSL's public key generation.
- * vm_core.h (rb_iseq_struct): ditto.
+ t = Thread.new { print "."; sleep 0.1 }
+ key = OpenSSL::PKey::RSA.new(2048)
+ #=> Thread t works in parallel with public key generation if
+ OS/machine allows it.
- * vm_insnhelper.c (vm_callee_setup_keyword_arg): ditto.
+ This works with OpenSSL >= 0.9.8. From this version, it has new
+ public key generation function which allows us to interrupt the
+ execution while pkey generation iterations.
-Tue Mar 12 17:02:53 2013 TAKANO Mitsuhiro <tak@no32.tk>
+ * ext/openssl/extconf.rb: Check existence of OpenSSL's new public key
+ generation function. (DH_generate_parameters_ex,
+ DSA_generate_parameters_ex and RSA_generate_key_ex.
- * date_core.c: clearly specify operator precedence.
+ * ext/openssl/ossl_pkey.{h,c} (ossl_generate_cb_2,
+ ossl_generate_cb_stop): Added new callback function for OpenSSL pkey
+ generation which handles Thread interruption by Ruby.
+ ossl_generate_cb_stop is the unblock function(ubf) for Ruby which
+ sets a stop flag. New pkey generation callback ossl_generate_cb_2
+ checks the stop flag at each iterations of OpenSSL and interrupts
+ pkey generation when the flag is set.
-Tue Mar 12 17:00:45 2013 TAKANO Mitsuhiro <tak@no32.tk>
+ * ext/openssl/ossl_pkey_dsa.c (dsa_generate): Call
+ rb_thread_blocking_region with the above unblock function to release
+ GVL while pkey generation.
- * insns.def: fix condition.
+ * ext/openssl/ossl_pkey_rsa.c (rsa_generate): ditto.
-Tue Mar 12 16:48:19 2013 TAKANO Mitsuhiro <tak@no32.tk>
+ * ext/openssl/ossl_pkey_dh.c (dh_generate): ditto.
- * rational.c: fix dangling if, else-if and else.
+ * test/openssl/test_pkey_{dh,dsa,rsa}.rb: Test it.
-Tue Mar 12 06:27:59 2013 Eric Hodel <drbrain@segment7.net>
+Thu Sep 1 14:06:54 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * 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.
+ * test/ruby/test_thread.rb (TestThread#test_no_valid_cfp): skip when
+ win32ole is required. in such case, win32ole redefines
+ Thread#initialize, and the block argument becomes to be not the top
+ of the thread, then this testcase always fails.
- * lib/rubygems/ext/ext_conf_builder.rb: Use full path to siteconf.rb
- in case the extconf.rb changes directories (like memcached does).
+Thu Sep 1 10:20:50 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * 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.
+ * test/ruby/test_io_m17n.rb (TestIO_M17N#test_{default_mode_on_dosish,
+ default_mode_on_unix,text_mode,binary_mode}): sorry for wrong test
+ committed in r33144. I'd misunderstood the spec of ruby's universal
+ newline.
- * 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.
+Thu Sep 1 09:27:57 2011 NARUSE, Yui <naruse@ruby-lang.org>
-Tue Mar 12 02:25:19 2013 Eric Hodel <drbrain@segment7.net>
+ * variable.c (rb_autoloading_value): Fix the order of definitions.
+ It is used by autoload_defined_p.
- * 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.
+Wed Aug 31 17:28:23 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
-Mon Mar 11 22:44:57 2013 Tanaka Akira <akr@fsij.org>
+ * variable.c (rb_autoload): There was a chance to run GC (from
+ rb_str_new2()) before finishing autoload_data_i construction. It
+ caused SEGV at rb_gc_mark() at autoload_i_mark.
- * 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.
+ * variable.c (rb_autoload_load): Move RB_GC_GUARD() to proper
+ position based on suggestion by CHIKANAGA Tomoyuki at
+ http://d.hatena.ne.jp/nagachika/20110826/ruby_trunk_changes_33070_33078
-Mon Mar 11 19:22:54 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+ * variable.c (autoload_defined_p): Fix incompatible autoload behavior
+ that causes Rails crash. Class definition instruction defined in
+ 'defineclass' in insns.def always invokes rb_autoload_load for a
+ constant. It's invoked for every class definition regardless of
+ existence of autoload definition. rb_autoload_load checks if a
+ constant is defined as autoloaded, but new thread-safe autoload
+ returned different value if the constant is under autoloading.
- * test/mkmf/base.rb: class name conflict.
+Wed Aug 31 17:20:56 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
-Mon Mar 11 18:45:09 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * Re-apply r33078, thread-safe autoload which is reverted at r33093.
- * enumerator.c (enumerator_with_index): try to convert given offset to
- integer. fix bug introduced in r39594.
+Wed Aug 31 16:28:04 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-Mon Mar 11 17:27:57 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * test/ruby/test_io_m17n.rb (TestIO_M17N#test_{default_mode_on_dosish,
+ default_mode_on_unix,text_mode,binary_mode}): tests for [Bug #5164].
- * test/ruby/envutil.rb (EnvUtil.with_default_external): add for
- changing Encoding.default_external without warnings.
+Wed Aug 31 15:54:11 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * test/ruby/envutil.rb (EnvUtil.with_default_internal): ditto.
+ * ext/json: Merge json gem v1.5.4 (3dab4c5a6a97fac03dac).
- * test/ruby/test_io_m17n.rb: use above with_default_external.
+Wed Aug 31 13:09:41 2011 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-Mon Mar 11 16:57:00 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * numeric.c (flo_round): Avoid overflow by optimizing for trivial
+ cases [Bug #5227]
- * io.c (extract_binmode): raise error even if binmode and textmode
- don't conflict. [Bug #5918] [ruby-core:42199]
+Wed Aug 31 00:50:01 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-Mon Mar 11 12:25:12 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * win32/win32.c (rb_w32_select_with_thread): and my typo. we all must
+ be more careful.
- * Merge Onigmo d4bad41e16e3eccd97ccce6f1f96712e557c4518.
- fix lookbehind assertion fails with /m mode enabled. [Bug #8023]
- fix \Z matches where it shouldn't. [Bug #8001]
+Wed Aug 31 00:48:38 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-Mon Mar 11 11:53:35 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * thread.c (rb_thread_select): critical typo in r33117.
- * lib/mkmf.rb (MakeMakefile#dir_config, MakeMakefile#_libdir_basename):
- defer use of instance variable until needed. [Bug #8074]
+Wed Aug 31 00:30:49 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-Thu Mar 7 10:42:28 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * test/-ext-/old_thread_select/test_old_thread_select.rb
+ (TestOldThreadSelect#test_old_select_read_timeout): if the machine
+ is fast enough, the time used by code around IO.select may be smaller
+ than Time implement threshold.
- * 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.
+Wed Aug 31 00:04:38 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-Thu Mar 7 10:40:49 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * ext/-test-/old_thread_select/old_thread_select.c (old_thread_select):
+ typo.
- * tool/change_maker.rb (#diff2index): check Encoding::BINARY.
- BASERUBY may still be 1.8.x.
+ * test/-ext-/old_thread_select/test_old_thread_select.rb
+ (TestOldThreadSelect#test_old_select_signal_safe): use SIGINT instead
+ of SIGUSR1 because the former is general and the latter is platform
+ dependent.
-Thu Mar 7 08:47:42 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Tue Aug 30 23:59:36 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * NEWS (Mutex#owned?): no longer experimental.
+ * win32/win32.c, include/ruby/intern.h (rb_w32_fd_copy): implement
+ for rb_thread_select() in thread.c. the use of rb_fd_copy() is
+ introduced in r33117.
+ [Bug #5251] [ruby-core:39195]
-Sun Mar 10 23:38:15 2013 Luis Lavena <luislavena@gmail.com>
+ * thread.c (rb_thread_select): must call rb_fd_init() before using
+ rb_fdset_t. see the implementations of rb_fd_init()s if you want to
+ know the reason.
- * 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.
+Tue Aug 30 22:34:45 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-Sun Mar 10 23:27:05 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/dl/test_callback.rb (test_callback_with_string): prevents
+ temporary string from GC.
- * 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]
+Tue Aug 30 22:25:38 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-Sun Mar 10 17:00:22 2013 Tadayoshi Funaba <tadf@dotrb.org>
+ * vm_insnhelper.c (vm_call_cfunc): revert r33112. RB_GC_GUARD macro
+ protect a VALUE from GC. It's not for general anti-optimizing
+ purpose.
- * complex.c: edited rdoc.
- * rational.c: ditto.
+Tue Aug 30 11:06:19 2011 NARUSE, Yui <naruse@ruby-lang.org>
-Sun Mar 10 15:02:39 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * ext/json: Merge json gem 1.5.4+ (2149f4185c598fb97db1).
+ [Bug #5173] [ruby-core:38866]
- * process.c (setup_communication_pipe): remove unused function.
- it was unintentionally added r39683.
+Tue Aug 30 09:57:50 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Wed Mar 6 00:30:40 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * lib/thread.rb (Queue#pop): fix a race against Thread.wakeup.
+ Patch by Masaki Matsushita <glass.saga at gmail dot com>
+ [Bug #5195] [ruby-dev:44400]
- * tool/gen_ruby_tapset.rb: add tapset generator.
+Tue Aug 30 09:48:07 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Wed Mar 6 03:27:43 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * cont.c (fiber_entry): fix stack allocation failure on Debian
+ GNU/kFreeBSD.
+ Patch by Lucas Nussbaum <lucas at lucas-nussbaum dot net>.
+ [Bug #5241] [ruby-core:39147]
- * probes.d (symbol-create): change argument name `string' to
- `str'. `string' is a keyword for systemtap.
+Tue Aug 30 09:28:01 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Tue Mar 5 22:23:01 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * thread.c (rb_thread_select): rewrite by using
+ rb_thread_fd_select(). old one is EINTR unsafe.
+ Patch by Eric Wong. [Bug #5229] [ruby-core:39102]
- * probes.d: added argument name
+ * test/-ext-/old_thread_select/test_old_thread_select.rb:
+ a testcase for rb_thread_select().
+ * ext/-test-/old_thread_select/old_thread_select.c: ditto.
+ * ext/-test-/old_thread_select/depend: ditto.
+ * ext/-test-/old_thread_select/extconf.rb: ditto.
-Thu Mar 7 01:17:00 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Tue Aug 30 09:08:22 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * 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.
+ * configure.in: fix a build failure on GNU Hurd.
+ Patch by Samuel Thibault <sthibault at debian dot org>. Thank you!
+ [Bug #5250] [ruby-core:39185]
-Thu Mar 7 00:14:51 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Sun Aug 29 23:22:00 2011 Kenta Murata <mrkn@mrkn.jp>
- * io.c (rb_update_max_fd): use ATOMIC_CAS because this function
- is used from timer thread too.
+ * test/ruby/test_numeric.rb (test_num2long): modify a test against the
+ change by r33108.
-Wed Mar 6 23:30:21 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Sun Aug 29 09:58:00 2011 Kenta Murata <mrkn@mrkn.jp>
- * 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.
+ * numeric.c (bit_coerce): A Fixnum and a Bignum are only permitted for
+ bitwise arithmetic with a Fixnum. #1792
-Wed Mar 6 22:36:19 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * test/ruby/test_fixnum.rb: add tests for the above change.
- * 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.
+ * bignum.c (bit_coerce): A Fixnum and a Bignum are only permitted for
+ bitwise arithmetic with a Bignum. #1792
- * thread_pthread.c (timer_thread_sleep): adjust the above changes.
+ * test/ruby/test_bignum.rb: add tests for the above change.
- * thread_pthread.c (setup_communication_pipe_internal): factor
- out pipe initialize logic.
+Sun Aug 28 15:38:17 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-Wed Mar 6 22:56:14 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * ext/date/date_parse.c (date_zone_to_diff): keep a temporary string
+ stored in variable while the contents buffer is being used.
- * thread_pthread.c (ubf_select): add to small comments why we
- need to call rb_thread_wakeup_timer_thread().
+ * ext/date/date_parse.c (date_zone_to_diff): get rid of out of bounds
+ memory read. [ruby-dev:44409] [Bug #5213]
-Wed Mar 6 21:42:24 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Sun Aug 28 05:29:50 2011 Ryan Davis <ryand-ruby@zenspider.com>
- * 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.
+ * lib/minitest/*: Imported minitest 2.5.1 (r6596)
+ * test/minitest/*: ditto
-Sun Mar 3 02:42:29 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Sat Aug 27 20:46:05 2011 Kazuki Tsujimoto <kazuki@callcc.net>
- * thread_pthread.c (consume_communication_pipe): retry when
- read returned CCP_READ_BUFF_SIZE.
+ * vm.c (rb_vm_rewrite_dfp_in_errinfo): change return type
+ to suppress a warning.
-Wed Mar 6 21:31:35 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * vm_core.h: ditto.
- * 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.
+Sat Aug 27 19:04:06 2011 NARUSE, Yui <naruse@ruby-lang.org>
-Wed Mar 6 21:00:23 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * internal.h (rb_strftime_timespec): moved from time.c and define only
+ if ruby/encoding.h is included.
- * thread_pthread.c (USE_SLEEPY_TIMER_THREAD): use more accurate
- ifdef conditions.
+ * internal.h (rb_strftime): ditto.
-Sun Mar 3 02:30:36 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Sat Aug 27 18:53:51 2011 Kazuki Tsujimoto <kazuki@callcc.net>
- * 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.
+ * proc.c (proc_new): force to rewrite errinfo when calling Proc.new in ensure.
+ [Bug #5234] [ruby-core:39125]
+ This code will be removed after changing throw mechanism (see r33064).
-Sun Mar 10 09:12:51 2013 Tadayoshi Funaba <tadf@dotrb.org>
+ * vm.c (rb_vm_rewrite_dfp_in_errinfo): new function.
- * complex.c: described syntax of string form.
- * rational.c: ditto.
+ * vm.c (vm_make_env_each): changed accordingly.
-Sat Mar 9 11:58:39 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_core.h: ditto.
- * marshal.c (w_extended): check for prepended object.
- [ruby-core:53206] [Bug #8043]
+ * bootstraptest/test_flow.rb: add tests for above.
-Sat Mar 9 08:36:58 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Aug 27 18:44:06 2011 NARUSE, Yui <naruse@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].
+ * internal.h (rb_strftime_timespec): move to time.c because it depends
+ encoding.h.
-Sat Mar 9 00:25:57 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Aug 27 18:17:58 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * 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]
+ * strftime.c (rb_strftime_with_timespec): get enc argument to specify
+ the encoding of the format. On Windows (at least Japanese Windows),
+ Time#strftime("%Z") includes non ASCII in locale encoding (CP932).
+ So convert locale to default internal. [ruby-core:39092] [Bug #5226]
-Fri Mar 8 19:44:00 2013 Akinori MUSHA <knu@iDaemons.org>
+ * strftime.c (rb_strftime): ditto.
- * man/rake.1, man/ruby.1: Use the Pa macro to make URLs stand out.
+ * strftime.c (rb_strftime_timespec): ditto.
-Fri Mar 8 13:20:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * internal.h (rb_strftime_timespec): follow above.
- * ext/pathname/pathname.c (path_f_pathname): rdoc for Pathname()
+ * time.c (rb_strftime_alloc): ditto.
-Fri Mar 8 12:00:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * time.c (strftimev): ditto.
- * man/rake.1: Document ENVIRONMENT variables on RAKE(1) manpage
+ * time.c (time_strftime): ditto.
-Fri Mar 8 10:44:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * time.c (time_to_s): the resulted string of Time#to_s is always
+ ascii only, so this should be US-ASCII.
- * lib/webrick/httpproxy.rb: Fix typos in HTTPProxyServer [Bug #8013]
- Patch by Nobuhiro IMAI [ruby-core:53127]
+ * time.c (time_asctime): ditto.
-Fri Mar 8 03:16:15 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+Sat Aug 27 11:18:12 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
- * class.c (rb_mod_ancestors): Include singleton_class in ancestors
- list [Feature #8035]
+ * Revert r33078. It caused a Rails application NoMethodError.
- * test/ruby/test_module.rb (class): test for above
+ /home/nahi/git/emptyApp/ruby/1.9.1/gems/rack-mount-0.6.14/lib/rack/mount/utils.rb:157: warning: toplevel constant ScanError referenced by Regin::Parser::ScanError
+ /home/nahi/git/emptyApp/ruby/1.9.1/gems/rack-mount-0.6.14/lib/rack/mount/vendor/regin/regin/parser.rb:17:in `parse_regexp': undefined method `scan_str' for #<Regin::Parser:0x00000002344548> (NoMethodError)
- * test/ruby/marshaltestlib.rb (module): adapt test
+Sat Aug 27 08:44:58 2011 Eric Hodel <drbrain@segment7.net>
- * NEWS: list change
+ * lib/rdoc: Import RDoc 3.9.4. Typo and grammar fixes by Luke Gruber.
+ [Ruby 1.9 - Bug #5203]
-Thu Mar 7 14:21:37 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Aug 27 07:53:34 2011 Eric Hodel <drbrain@segment7.net>
- * compile.c (iseq_compile_each): pass keyword arguments to zsuper,
- with current values. [ruby-core:53114] [Bug #8008]
+ * lib/open-uri.rb: Fix indentation of OpenURI::OpenRead#open. Use ++
+ instead of `' for method arguments in open-uri.rb
-Thu Mar 7 12:53:47 2013 Eric Hodel <drbrain@segment7.net>
+Sat Aug 27 07:22:07 2011 Eric Hodel <drbrain@segment7.net>
- * lib/rubygems/commands/setup_command.rb: Install .pem files.
- * test/rubygems/test_gem_commands_setup_command.rb: Test for the
- above.
+ * ext/pathname/lib/pathname.rb: Fix typos and grammar mistakes. Patch
+ by Luke Gruber. [#5203]
+ * ext/pty/lib/expect.rb: ditto
+ * lib/mathn.rb: ditto
+ * lib/net/http.rb: ditto
+ * lib/open-uri.rb: ditto
+ * lib/ostruct.rb: ditto
+ * lib/tempfile.rb: ditto
+ * lib/thread.rb: ditto
+ * lib/weakref.rb: ditto
+ * sample/webrick/httpproxy.rb: ditto
- * 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.
+Sat Aug 27 04:03:18 2011 Koichi Sasada <ko1@atdot.net>
- * lib/rubygems.rb: Version 2.0.2
+ * iseq.c (iseq_data_to_ary): fix type of variable
+ (long -> unsigned long) to suppress a warning.
- * lib/rubygems/test_utilities.rb: Ensure scheme and uri class match.
+Sat Aug 27 04:02:11 2011 Koichi Sasada <ko1@atdot.net>
-Thu Mar 7 10:39:04 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_core.h: add a decl. of rb_autoloading_value().
- * tool/rbinstall.rb (gem): Gem.ensure_gem_subdirectories now has mode
- option since r39607. refix of r38870.
+Fri Aug 26 19:12:08 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
-Wed Mar 6 13:14:28 2013 Eric Hodel <drbrain@segment7.net>
+ * variable.c: Make autoload thread-safe. See #921.
- * test/rubygems/test_gem_spec_fetcher.rb: Removed unused variable.
+ What's the problem?
+ autoload is thread unsafe. When we define a constant to be
+ autoloaded, we expect the constant construction is invariant. But
+ current autoload implementation allows other threads to access the
+ constant while the first thread is loading a file.
-Wed Mar 6 08:10:15 2013 Eric Hodel <drbrain@segment7.net>
+ What's happening inside?
+ The current implementation uses Qundef as a marker of autoload in
+ Constant table. Once the first thread find Qundef as a value at
+ constant lookup, it starts loading a defined feature. Generally a
+ loaded file overrides the Qundef in Constant table by module/class
+ declaration at very beginning lines of the file, so other threads
+ can see the new Module/Class object before feature loading is
+ finished. It breaks invariant construction.
- * test/rubygems/test_require.rb: Fix tests when 'a.rb' exists.
- [ruby-trunk - Bug #7749]
+ How to solve?
+ To ensure invariant constant construction, we need to override
+ Qundef with defined Object after the feature loading. For keeping
+ Qundef in Constant table, I expanded autoload_data struct in
+ Module to have a slot for keeping the defined object while feature
+ loading. And changed Module's constant lookup/update logic a
+ little so that the slot is only visible from the thread which
+ invokes feature loading. (== the first thread which accessed the
+ autoload constant)
-Wed Mar 6 08:00:59 2013 Eric Hodel <drbrain@segment7.net>
+ Evaluation?
+ All test passes (bootstrap test, test-all and RubySpec) and added
+ 8 tests for threading behavior. Extra logics are executed only
+ when Qundef is found, so no perf drop should happen except
+ autoloading.
- * lib/rubygems.rb: Allow specification of directory permissions.
- [ruby-trunk - Bug #7713]
- * test/rubygems/test_gem.rb: Test for the above.
+ * variable.c (rb_autoload): Prepare new autoload_data struct.
-Wed Mar 6 07:40:21 2013 Eric Hodel <drbrain@segment7.net>
+ * variable.c (rb_autoload_load): Load feature and update Constant
+ table after feature loading is finished.
- * 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.
+ * variable.c (rb_const_get_0): When the fetched constant is under
+ autoloading, it returns the object only for the thread which starts
+ autoloading.
- * lib/rubygems/security.rb: Make OpenSSL optional for RubyGems.
- * lib/rubygems/commands/cert_command.rb: ditto.
+ * variable.c (rb_const_defined_0): Ditto.
- * lib/rubygems/config_file.rb: Display file with YAML error, not
- ~/.gemrc
+ * variable.c (rb_const_set): When the specified constant is under
+ autoloading, it sets the object only for the thread which starts
+ autoloading. Otherwise, simply overrides Qundef with constant
+ override warning.
- * 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.
+ * vm_insnhelper.c (vm_get_ev_const): Apply same change as
+ rb_const_get_0 in variable.c.
- * 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.
+ * test/ruby/test_autoload.rb: Added tests for threading behavior.
- * lib/rubygems.rb: Update win_platform? check for JRuby compatibility.
+Fri Aug 26 10:10:37 2011 Eric Hodel <drbrain@segment7.net>
- * test/rubygems/test_gem_installer.rb: Update for Ruby 1.9.2
- compatibility
+ * lib/rubygems: Update to RubyGems 1.8.10. Fixes security issue in
+ creating ruby-format gemspecs. Fixes Gem.dir not being at the front
+ of Gem.path to fix uninstall and cleanup commands. Fixes gem
+ uninstall stopping on the first missing gem.
-Wed Mar 6 01:19:28 2013 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+Fri Aug 26 08:21:10 2011 Aaron Patterson <aaron@tenderlovemaking.com>
- * enumerator.c (enumerator_with_index, lazy_take): use INT2FIX(0)
- instead of INT2NUM(0).
+ * time.c (strftimev): Make Time#to_s default to US-ASCII encoding but
+ respect Encoding.default_internal. [ruby-core:39092]
+ * test/ruby/test_time.rb (class TestTime): Corresponding test.
- * ext/bigdecimal/bigdecimal.c (BigMath_s_exp): ditto.
+Thu Aug 25 09:43:16 2011 Eric Hodel <drbrain@segment7.net>
- * ext/fiddle/function.c (function_call): ditto.
+ * ext/openssl/lib/openssl/bn.rb: Hide copyright info from RDoc.
+ * ext/openssl/lib/openssl/digest.rb: ditto
+ * ext/openssl/lib/openssl/x509.rb: ditto
+ * ext/openssl/lib/openssl/cipher.rb: ditto
- * ext/openssl/ossl_x509store.c (ossl_x509store_initialize): ditto.
+Thu Aug 25 09:25:48 2011 Eric Hodel <drbrain@segment7.net>
- * process.c (proc_getsid): ditto.
+ * ext/openssl/ossl_digest.c: Document OpenSSL::Digest::digest and add
+ an example to OpenSSL::Digest. Patch by Sylvain Daubert.
+ [Ruby 1.9 - Bug #5166]
+ * ext/openssl/lib/openssl/digest.rb (module OpenSSL): ditto
- * transcode.c (econv_finish): ditto.
+Thu Aug 25 08:19:43 2011 Koichi Sasada <ko1@atdot.net>
-Tue Mar 5 21:36:43 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm.c (vm_make_env_each): work around to solve Bug #2729.
+ fixes: Bug #2729
+ a patch from Kazuki Tsujimoto <kazuki@callcc.net>
+ This problem is caused by changing dfp (dynamic env pointer)
+ from saved dfp. Saved dfp is pointed env in VM stack. However,
+ the dfp can be moved because VM copies env from VM stack to
+ the heap. At this copying, dfp was also changed. To solve this
+ problem, I'll try to change throw mechanism (not save target dfp,
+ but save target cfp).
- * class.c (rb_prepend_module): check redefinition of built-in optimized
- methods. [ruby-dev:47124] [Bug #7983]
+ * bootstraptest/test_flow.rb: add a test for above.
- * vm.c (rb_vm_check_redefinition_by_prepend): ditto.
+Thu Aug 25 07:57:33 2011 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-Tue Mar 5 20:29:25 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * numeric.c (int_round): Fix Integer#round [ruby-core:39096]
- * proc.c (mnew): revert r39224. [ruby-core:53038] [Bug #7988]
+Thu Aug 25 07:00:00 2011 Koichi Sasada <ko1@atdot.net>
-Tue Mar 5 20:23:54 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm_insnhelper.h, vm_insnhelper.c, vm.c, vm_method.c, insns.def:
+ Manage a redefinition of special methods for each classes.
+ A patch from Joel Gouly <joel.gouly@gmail.com>. Thanks!
- * 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.
+Thu Aug 25 06:51:08 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-Tue Mar 5 12:30:55 2013 Eric Hodel <drbrain@segment7.net>
+ * ext/psych/lib/psych.rb: Fixing psych version number.
+ * ext/psych/psych.gemspec: updating the gemspec.
- * lib/rubygems.rb: Bump version to 2.0.1 for upcoming bugfix release
+Thu Aug 25 06:11:35 2011 Aaron Patterson <aaron@tenderlovemaking.com>
- * lib/rubygems/ext/ext_conf_builder.rb: Restore ruby 1.8 compatibility
- for [Bug #7698]
- * test/rubygems/test_gem_installer.rb: Ditto.
+ * ext/psych/lib/psych/nodes/node.rb: default `to_yaml` encoding to be
+ UTF-8.
+ * test/psych/test_encoding.rb: test yaml dump encoding.
- * lib/rubygems/package.rb: Restore ruby 1.8 compatibility.
+Thu Aug 25 01:24:33 2011 Naohisa Goto <ngotogenome@gmail.com>
- * test/rubygems/test_gem_dependency_installer.rb: Fix warnings
+ * test/fileutils/test_fileutils.rb (test_chmod_symbol_mode): Solaris
+ seems to behave the same as FreeBSD.
-Tue Mar 5 12:24:23 2013 Eric Hodel <drbrain@segment7.net>
+Thu Aug 25 01:11:36 2011 Naohisa Goto <ngotogenome@gmail.com>
- * enumerator.c (enumerator_with_index): Restore handling of a nil memo
- from r39594.
+ * test/ruby/test_rubyoptions.rb (test_script_from_stdin): slave pty
+ should be manipulated because master pty may not be a tty on some
+ environment (e.g. Solaris). [Bug:#5222] [ruby-dev:44420]
-Tue Mar 5 10:40:22 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Aug 24 15:13:56 2011 Koichi Sasada <ko1@atdot.net>
- * 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]
+ * iseq.h, iseq.c, compile.c: Change the line number data structure
+ to solve an issue reported at [ruby-dev:44413] [Ruby 1.9 - Bug #5217].
+ Before this fix, each instruction has an information including
+ line number (iseq::iseq_insn_info_table). Instead of this data
+ structure, recording only line number changing places
+ (iseq::iseq_line_info_table).
+ The order of entries in iseq_line_info_table is ascending order of
+ iseq_line_info_table_entry::position. You can get a line number
+ by an iseq and a program counter with this data structure.
+ This fix reduces memory consumption of iseq (bytecode).
+ On my measurement, a rails application consumes 21.8MB for
+ iseq with this fix on the 32bit CPU. Without this fix, it
+ consumes 24.7MB for iseq [ruby-dev:44415].
-Tue Mar 5 10:20:16 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * proc.c: ditto.
- * enumerator.c (enumerator_with_index_i): allow Bignum as offset, to
- get rid of conversion exception and integer overflow.
- [ruby-dev:47131] [Bug #8010]
+ * vm_insnhelper.c: ditto.
- * numeric.c (rb_int_succ, rb_int_pred): shortcut optimization for
- Bignum.
+ * vm_method.c: ditto.
-Tue Mar 5 10:02:48 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * vm.c (rb_vm_get_sourceline): change to use rb_iseq_line_no().
- * lib/rubygems/ext/ext_conf_builder.rb (Gem::Ext::ExtConfBuilder.build):
- clear DESTDIR so RUBYARCHDIR and RUBYLIBDIR are not be overridden.
- [Bug #7698]
+Wed Aug 24 09:49:10 2011 Koichi Sasada <ko1@atdot.net>
-Mon Mar 4 15:33:40 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * insns.def (defined): fix to checking class variable.
+ A patch by Magnus Holm <judofyr@gmail.com>. Thanks!
- * 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]
+ * test/ruby/test_variable.rb: add a test for above.
-Mon Mar 4 14:13:36 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Aug 24 08:53:06 2011 Eric Hodel <drbrain@segment7.net>
- * 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]
+ * lib/rdoc: Update to RDoc 3.9.3. Fixes RDoc with `ruby -Ku`. Allows
+ HTTPS image paths to be turned into <img> tags. Prevents special
+ markup inside <tt> from being processed.
-Mon Mar 4 10:23:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Wed Aug 24 07:57:43 2011 Eric Hodel <drbrain@segment7.net>
- * encoding.c: Typo in Encoding overview by Tom Wardrop [GH fixes #255]
+ * lib/rubygems: Update to RubyGems 1.8.9. Fixes uninstalling multiple
+ gems and gem cleanup.
-Sun Mar 3 12:35:08 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Aug 24 06:45:20 2011 Ryan Davis <ryand-ruby@zenspider.com>
- * lib/mkmf.rb (MakeMakefile#libpath_env): set runtime library path for
- the case rpath is disabled.
+ * lib/minitest/*: Imported minitest 2.5.0 (r6557)
+ * test/minitest/*: ditto
-Sun Mar 3 12:17:47 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Aug 24 00:38:22 2011 Yusuke Endoh <mame@tsg.ne.jp>
- * 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]
+ * thread.c (update_coverage): skip coverage count up if the current
+ line is out of the way. rb_sourceline() is unreliable when source
+ code is big. [ruby-dev:44413]
-Sun Mar 3 07:33:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * test/coverage/test_coverage.rb: add a test for above.
- * ext/socket/tcpserver.c: Grammar for TCPServer.new from r39554
+Tue Aug 23 15:23:56 2011 Eric Hodel <drbrain@segment7.net>
-Sun Mar 3 01:17:20 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * load.c (rb_f_require): Improve documentation of Kernel#require.
+ [Ruby 1.9 - Bug #5210]
- * 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]
+Tue Aug 23 11:27:26 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
- * lib/rubygems/ext/ext_conf_builder.rb (Gem::Ext::ExtConfBuilder.build):
- use RUBYOPT instead of -r option, and revert some tests. [Bug #7698]
+ * ext/zlib/zlib.c (gzfile_read_header): Ensure that each section of
+ gzip header is readable to avoid SEGV.
- * 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]
+ * test/zlib/test_zlib.rb (test_corrupted_header): Test it.
-Sun Mar 3 00:04:20 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Aug 22 23:43:33 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * enc/depend (CPPFLAGS), lib/mkmf.rb (MakeMakefile#create_makefile):
- define RUBY_EXPORT for static-linked-ext mswin. [Bug #7960]
+ * sprintf.c (rb_str_format): add RB_GC_GUARD to prevent temporary
+ strings from GC.
-Sat Mar 2 22:49:47 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sun Aug 21 17:49:53 2011 Kazuki Tsujimoto <kazuki@callcc.net>
- * win32/Makefile.sub (ENCOBJS, EXTOBJS, config.h): definitions for
- static-linked-ext. [Bug #7960]
+ * iseq.c (iseq_s_disasm): remove variable which is no longer used
+ since r33013.
-Sat Mar 2 17:34:19 2013 Tanaka Akira <akr@fsij.org>
+Sun Aug 21 14:20:58 2011 Naohisa Goto <ngotogenome@gmail.com>
- * 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).
+ * configure.in: use LD_LIBRARY_PATH_64 on 64-bit Solaris.
-Sat Mar 2 02:45:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Sat Aug 20 13:19:52 2011 Kazuki Tsujimoto <kazuki@callcc.net>
- * array.c: typo in comment patch by Nami-Doc [Github fixes #253]
+ * iseq.c (iseq_s_disasm): fix a bug that may cause SEGV.
-Sat Mar 2 01:33:17 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * test/ruby/test_method.rb (test_body): add a test for the above change.
- * Merge Onigmo 0fe387da2fee089254f6b04990541c731a26757f
- v5.13.3 [Bug#7972] [Bug#7974]
+Sat Aug 20 10:43:24 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Mar 1 11:09:06 2013 Eric Hodel <drbrain@segment7.net>
+ * ext/stringio/stringio.c (strio_read): return new string if nil
+ is explicitly given as a buffer ([Bug #5207]), otherwise set the
+ encoding. also removed dead code.
- * lib/fileutils.rb: Revert r34669 which altered the way
- metaprogramming in FileUtils occurred. [ruby-trunk - Bug #7958]
+Fri Aug 19 14:25:51 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * 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.
+ * process.c (proc_spawn_v, proc_spawn): should not wait the
+ spawned process.
-Fri Mar 1 09:18:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * process.c (proc_spawn_v): fix missing argument, and try with
+ /bin/sh only if failed with ENOEXEC.
- * lib/psych.rb: specify in rdoc what object is returned in parser
- By Adam Stankiewicz [Github tenderlove/psych#133]
+Fri Aug 19 14:12:57 2011 Shugo Maeda <shugo@ruby-lang.org>
-Fri Mar 1 07:21:41 2013 Eric Hodel <drbrain@segment7.net>
+ * lib/net/imap.rb (idle): raises a Net::IMAP::Error when the
+ connection is closed. based on the patch by Hugo Barauna.
+ [Bug #5190] [ruby-core:38930]
- * 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.
+Fri Aug 19 13:18:00 2011 Kenta Murata <mrkn@mrkn.jp>
- * 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.
+ * configure.in: defines _DARWIN_UNLIMITED_SELECT if the target_os
+ is darwin.
-Fri Mar 1 03:25:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Fri Aug 19 13:14:00 2011 Kenta Murata <mrkn@mrkn.jp>
- * ext/psych/lib/psych.rb: rdoc for Psych overview by Adam Stankiewicz
- [Github tenderlove/psych#134]
+ * thread.c: add a description for the behavior of select(2) on
+ Mac OS X 10.7 (Lion).
-Thu Feb 28 22:57:48 2013 Koichi Sasada <ko1@atdot.net>
+Fri Aug 19 11:28:58 2011 Shugo Maeda <shugo@ruby-lang.org>
- * 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.
+ * lib/net/imap.rb (msg_att): accepts extra space before ')'.
+ based on the patch by art lussos. [Bug #5163] [ruby-core:38820]
- * test/ruby/test_iseq.rb: add a test.
+Wed Aug 17 23:01:00 2011 Kenta Murata <mrkn@mrkn.jp>
-Thu Feb 28 22:23:27 2013 Tanaka Akira <akr@fsij.org>
+ * ext/bigdecimal/bigdecimal.c (cannot_be_coerced_into_BigDecimal):
+ remove duplication.
- * 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.
+Wed Aug 17 15:27:00 2011 Kenta Murata <mrkn@mrkn.jp>
-Thu Feb 28 21:33:01 2013 WATANABE Hirofumi <eban@ruby-lang.org>
+ * ext/bigdecimal/bigdecimal.c (cannot_be_coerced_into_BigDecimal):
+ add a new function for raising error when an object cannot coerce
+ into BigDecimal. [Bug #5172]
- * configure.in(AC_DISABLE_OPTION_CHECKING): avoid warning "WARNING:
- Unrecognized options: --with-PACKAGE".
+ * ext/bigdecimal/bigdecimal.c (BigDecimalValueWithPrec): use
+ cannot_be_coerced_into_BigDecimal function.
-Thu Feb 28 20:22:04 2013 Koichi Sasada <ko1@atdot.net>
+ * ext/bigdecimal/bigdecimal.c (BigMath_s_exp): ditto.
- * 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.
+ * ext/bigdecimal/bigdecimal.c (BigMath_s_log): ditto.
- * test/ruby/test_iseq.rb: add a test of lines after ISeq#to_a.
+ * test/bigdecimal/test_bigdecimal.rb: test for the above changes.
-Thu Feb 28 08:20:33 2013 Eric Hodel <drbrain@segment7.net>
+ * test/bigdecimal/testbase.rb (under_gc_stress): add a new utility
+ method to run tests under the condition of GC.stress = true.
- * lib/rubygems/available_set.rb: Undent for style
+Wed Aug 17 10:16:00 2011 Kenta Murata <mrkn@mrkn.jp>
- * 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.
+ * rational.c (nurat_coerce): Rational#coerce should converts itself
+ into Complex if the argument is a Complex with non-zero imaginary
+ part. [Bug #5020] [ruby-dev:44088]
- * lib/rubygems/dependency_installer.rb: Don't display "Done installing
- documentation" if documentation will not be installed.
- * lib/rubygems/rdoc.rb: ditto
+ * test/ruby/test_rational.rb (test_coerce): test for the above change.
- * lib/rubygems/dependency_list.rb: Use Array#concat for Ruby 1.x
- performance.
+Wed Aug 17 06:33:19 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * 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.
+ * ext/openssl/ossl_x509cert.c: Add class documentation for
+ OpenSSL::X509::Certificate.
- * lib/rubygems/package.rb: Use more explicit feature check to work
- around JRuby bug #552
+Wed Aug 17 04:54:25 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * lib/rubygems/ssl_certs/GeoTrust_Global_CA.pem: Added GeoTrust root
- certificate.
+ * ext/openssl/ossl_pkey.c: corrected docs, OpenSSL::PKey::DH does
+ *not* support #sign/verify.
- * test/rubygems/test_gem_source_list.rb: Use "example" instead of real
- hostname
+Tue Aug 16 18:56:54 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Feb 28 05:57:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * vm.c (ruby_threadptr_data_type): rename to hide.
+ [ruby-core:38972]
- * thread.c: rdoc formatting for Thread, ThreadGroup, and ThreadError
+Tue Aug 16 18:52:08 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Feb 28 02:42:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * win32/mkexports.rb (Exports::Mswin#each_export): exclude Init_
+ and _threadptr_ functions, as well as mingw.
- * vm.c: Typo in overview for example of Thread#status returning false
- Reported by Lee Jarvis
+Tue Aug 16 09:31:44 2011 Eric Hodel <drbrain@segment7.net>
-Wed Feb 27 22:54:27 2013 Tanaka Akira <akr@fsij.org>
+ * ext/dl: Add documentation. Patch by Vincent Batts.
+ [Ruby 1.9 - Bug #5192]
- * ext/socket/rubysocket.h (union_sockaddr): make it longer for SunOS
- and Darwin.
+Tue Aug 16 08:48:26 2011 Eric Hodel <drbrain@segment7.net>
-Wed Feb 27 21:14:34 2013 Kouhei Sutou <kou@cozmixng.org>
+ * ext/.document (fiddle): Remove duplicate entry
+ * ext/fiddle: Complete documentation of Fiddle. Patch by Vincent
+ Batts. [#5192]
- * 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.
+Tue Aug 16 08:00:15 2011 Eric Hodel <drbrain@segment7.net>
-Wed Feb 27 19:53:32 2013 Benoit Daloze <eregontp@gmail.com>
+ * ext/socket: Make Socket documentation appear. Add documentation for
+ Socket, TCPServer, SOCKSSocket. Patch by Sylvain Daubert.
+ [Ruby 1.9 - Feature #5182]
- * vm.c (Thread): fix typos in overview
+Mon Aug 15 09:58:55 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-Wed Feb 27 13:21:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * ext/openssl/ossl_ssl.c: Support disabling OpenSSL compression.
- * vm.c (Thread): Typo in overview, swap setting and getting
+ * test/openssl/test_ssl.rb: Add a test for it.
+ Thanks to Eric Wong for the patch.
+ [Ruby 1.9 - Feature #5183] [ruby-core:38911]
-Wed Feb 27 13:02:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Sun Aug 14 05:57:01 2011 Tanaka Akira <akr@fsij.org>
- * vm.c (Thread): Documentation overview of Thread class
+ * test/socket/test_socket.rb (test_connect_timeout): added a test
+ based on a patch by Eric Wong. [ruby-core:38910]
-Wed Feb 27 12:57:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Sat Aug 13 22:17:27 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * thread.c (rb_thread_wakeup): rdoc formatting
+ * tool/mkconfig.rb: do not make the entries related to sitedir and
+ verdordir if disabled by --without options. [ruby-core:38922]
+ [Bug #5187]
-Wed Feb 27 12:53:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Sat Aug 13 17:03:22 2011 Tadayoshi Funaba <tadf@dotrb.org>
- * thread.c (rb_thread_group): rdoc formatting
+ * ext/date/date_core.c: [ruby-core:38861]
-Wed Feb 27 12:33:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Sat Aug 13 09:39:07 2011 Tadayoshi Funaba <tadf@dotrb.org>
- * lib/ostruct.rb: Typo in OpenStruct overview [Github Fixes #251]
- Patch by Chun-wei Kuo
+ * test/date/test_*.rb: added tests.
-Wed Feb 27 12:13:32 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Sat Aug 13 09:36:19 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * 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]
+ * ext/date/date_parse.c (parse_ddd_cb): fix r32896. RB_GC_GUARD
+ insertion position was mistaken. [ruby-dev:44337] [Bug #5152]
-Wed Feb 27 10:23:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Sat Aug 13 09:26:24 2011 Aaron Patterson <aaron@tenderlovemaking.com>
- * thread.c (thread_raise_m): rdoc formatting
+ * ext/psych/lib/psych/core_ext.rb: Make Kernel#y private.
+ [ruby-core:38913]
-Tue Feb 26 23:32:44 2013 Kouhei Sutou <kou@cozmixng.org>
+ * test/psych/test_yaml.rb: corresponding test.
- * 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.
+Sat Aug 13 09:05:16 2011 Tadayoshi Funaba <tadf@dotrb.org>
-Tue Feb 26 23:26:13 2013 Kouhei Sutou <kou@cozmixng.org>
+ * ext/date/date_core.c (date_strftime_alloc): followed the change
+ of r32885.
- * 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]
+ * doc/NEWS-1.9.3: followed the above change.
-Tue Feb 26 15:12:11 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Aug 13 08:55:38 2011 Aaron Patterson <aaron@tenderlovemaking.com>
- * 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.
+ * ext/psych/lib/psych/scalar_scanner.rb: Only consider strings
+ with fewer than 2 dots to be numbers. [ruby-core:38915]
-Tue Feb 26 15:04:19 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Aug 13 08:47:20 2011 Tadayoshi Funaba <tadf@dotrb.org>
- * configure.in (unexpand_shvar): get rid of non-portable shell
- behavior on OpenBSD, so no extra quotes. [Bug #7959]
+ * ext/date/date_core.c: [ruby-core:38855].
-Tue Feb 26 10:24:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Aug 13 03:41:37 2011 Eric Hodel <drbrain@segment7.net>
- * parse.y (IS_LABEL_POSSIBLE): allow labels for keyword arguments just
- after method definition without a parenthesis. [ruby-core:52820]
- [Bug #7942]
+ * lib/uri/common.rb: Fix documentation of URI::Parser.new. Patch by
+ Steve Klabnik. [Ruby 1.9 - Bug #5177]
-Tue Feb 26 04:50:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Sat Aug 13 02:19:57 2011 Eric Hodel <drbrain@segment7.net>
- * error.c: clarify reason for sleep in SignalException example
+ * ext/digest/digest.c: Add documentation for the Digest module. Patch
+ by Sylvain Daubert. [Ruby 1.9 - Bug #5167]
-Tue Feb 26 03:47:00 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Sat Aug 13 01:56:11 2011 Eric Hodel <drbrain@segment7.net>
- * error.c: clarify a document of SignalException. Process.kill()
- doesn't have any guarantee when signal will be delivered.
- [Bug #7951] [ruby-core:52864]
+ * lib/rake: Update to Rake 0.9.2.2. Prevent pollution of toplevel
+ namespace by Commands. Remove unused variable and debugging
+ statement in tests.
-Mon Feb 25 23:51:04 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Aug 12 11:39:35 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * include/ruby/version.h: bump RUBY_API_VERSION same as RUBY_VERSION.
+ * configure.in: Describe "no" configure option for site_ruby
+ and vendor_ruby. Patch by Vit Ondruch. [Bug #5187][ruby-core:38921]
-Mon Feb 25 21:03:34 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Fri Aug 12 09:00:24 2011 Eric Hodel <drbrain@segment7.net>
- * string.c (str_byte_substr): don't set coderange if it's not known.
- [Bug #7954] [ruby-dev:47108]
+ * lib/rubygems: Import RubyGems 1.8.8. Fixes encoding of YAML gemspec
+ from gems. Github Issue #149
-Mon Feb 25 16:47:02 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Aug 12 08:17:46 2011 Tanaka Akira <akr@fsij.org>
- * common.mk (realclean-local): miniprelude.c is made by srcs, so it
- should not removed by distclean but by realclean. [Bug #6807]
+ * ext/socket/ipsocket.c (init_inetsock_internal): use SOMAXCONN for
+ listen backlog.
-Mon Feb 25 16:30:30 2013 Eric Hodel <drbrain@segment7.net>
+ * ext/socket/unixsocket.c (rsock_init_unixsock): ditto.
- * 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/socket/lib/socket.rb (Addrinfo#listen): ditto.
+ (Socket.tcp_server_sockets_port0): ditto.
- * test/rubygems/test_gem_commands_push_command.rb: Remove duplicated
- test.
+ * ext/socket/mkconstants.rb: define SOMAXCONN as 5 if not available.
-Mon Feb 25 15:47:18 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ [ruby-core:38493]
- * enc/depend (ARFLAGS): VisualC++ linker does not allow spaces between
- output option and the output file name. [Bug #7950]
+Fri Aug 12 03:24:35 2011 Eric Hodel <drbrain@segment7.net>
- * enc/depend (RANLIB): set default command to do nothing, or make the
- entire line a label on Windows.
+ * lib/rdoc: Import RDoc 3.9.2. Fixes TIDYLINK for HTML output.
-Mon Feb 25 14:41:07 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Aug 11 15:37:42 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
- * lib/mkmf.rb (MakeMakefile#init_mkmf): default libdirname to libdir.
+ * variable.c (autoload_delete): An autoload entry is still in a
+ RCLASS_IV_TBL, not in a RCLASS_CONST_TBL, so take back the table
+ changed in r29600. And an autoload entry keeps not a
+ rb_const_entry_t but a NODE so remove rb_const_entry_t thing added
+ in r29602.
- * tool/rbinstall.rb: ditto.
+Thu Aug 11 15:07:36 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Feb 25 13:12:39 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/mkmf.rb (link_command): use LIBRUBYARG in rbconfig for
+ unbundled extensions. [ruby-core:38802] [Bug #5147]
- * 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.
+ * lib/mkmf.rb (init_mkmf): revert r32902. [ruby-core:38903]
-Mon Feb 25 12:48:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Wed Aug 10 23:03:55 2011 Tanaka Akira <akr@fsij.org>
- * thread.c: Document Thread::new, clean up ::fork and mention calling
- super if subclassing Thread
+ * ext/socket/lib/socket.rb: fix argument check in the previous commit.
-Mon Feb 25 12:38:50 2013 Tanaka Akira <akr@fsij.org>
+Wed Aug 10 22:12:28 2011 Tanaka Akira <akr@fsij.org>
- * 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.
+ * ext/socket/lib/socket.rb (Socket.tcp): add :connect_timeout option.
+ (Addrinfo#connect_from): add :timeout option.
+ (Addrinfo#connect): ditto.
+ (Addrinfo#connect_to): ditto.
+ [ruby-core:38538]
-Mon Feb 25 11:03:38 2013 Akinori MUSHA <knu@iDaemons.org>
+Wed Aug 10 21:27:19 2011 Tanaka Akira <akr@fsij.org>
- * configure.in (unexpand_shvar): Use the numeric comparison
- operator instead of '==' which is a ksh extension. [Bug #7941]
+ * lib/net/pop.rb: fix typo in document.
-Mon Feb 25 02:37:56 2013 Tanaka Akira <akr@fsij.org>
+ * lib/net/http.rb: ditto.
- * ext/socket: define and use union_sockaddr instead of struct
- sockaddr_storage for less casts.
+ * lib/net/imap.rb: ditto.
- * ext/socket/rubysocket.h (union_sockaddr): defined.
+Wed Aug 10 19:30:00 2011 Kenta Murata <mrkn@mrkn.jp>
- * ext/socket/socket.c (sock_accept): use union_sockaddr.
- (sock_accept_nonblock): ditto.
- (sock_sysaccept): ditto.
- (sock_s_getnameinfo): ditto.
+ * complex.c (nucomp_rationalize): calls rationalize of real part if
+ imaginary part is exactly zero. The patch is made by Marc-Andre
+ Lafortune. fixes [Bug #5178] [ruby-core:38885]
- * ext/socket/basicsocket.c (bsock_getsockname): ditto.
- (bsock_getpeername): ditto.
- (bsock_local_address): ditto.
- (bsock_remote_address): ditto.
+ * test/ruby/test_complex.rb (test_rationalize): add a test for the
+ above change.
- * ext/socket/ancdata.c (bsock_recvmsg_internal): ditto.
+ * complex.c (nucomp_to_r): fix RDoc comment. The patch is made by
+ Marc-Andre Lafortune.
- * ext/socket/init.c (recvfrom_arg): ditto.
- (recvfrom_blocking): ditto.
- (rsock_s_recvfrom): ditto.
- (rsock_s_recvfrom_nonblock): ditto.
- (rsock_getfamily): ditto.
+Wed Aug 10 14:11:07 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * 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.
+ * lib/mkmf.rb (init_mkmf): set $LIBRUBYARG regardless of shared
+ option. [ruby-core:38802] [Bug #5147]
- * ext/socket/tcpserver.c (tcp_accept): ditto.
- (tcp_accept_nonblock): ditto.
- (tcp_sysaccept): ditto.
+Wed Aug 10 02:53:27 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * ext/socket/ipsocket.c (ip_addr): ditto.
- (ip_peeraddr): ditto.
- (ip_s_getaddress): ditto.
+ * lib/net/http.rb: come back autoload. OpenSSL constant is used
+ some places, so it leads mistakes like HTTP.start.
-Sun Feb 24 21:15:05 2013 Tadayoshi Funaba <tadf@dotrb.org>
+Tue Aug 9 22:57:45 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * ext/date/date_core.c: [ruby-core:52303]
+ * ext/date/date_parse.c (date_zone_to_diff): add RB_GC_GUARD.
+ [ruby-dev:44337] [Bug #5152]
-Sun Feb 24 15:33:46 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/date/data_parse.c (parse_ddd_cb): ditto.
- * 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]
+Tue Aug 9 14:25:47 2011 Naohisa Goto <ngotogenome@gmail.com>
-Sun Feb 24 15:32:36 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * ext/fiddle/conversions.c (generic_to_value): ffi_arg and ffi_sarg
+ should be used to handle shorter return value. fix [Bug #3861]
+ [ruby-core:32504]
- * 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]
+ * ext/fiddle/closure.c (callback): ditto
-Sun Feb 24 15:14:43 2013 Eric Hodel <drbrain@segment7.net>
+ * ext/fiddle/conversions.h (fiddle_generic): ditto
- * 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.
+ * ext/fiddle/conversions.c (value_to_generic): char, short and int
+ are strictly distinguished on big-endian CPU, e.g. sparc64.
-Wed Feb 20 14:28:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Tue Aug 9 11:21:08 2011 Narihiro Nakamura <authornari@gmail.com>
- * thread.c: Document ThreadGroup::Default
+ * gc.c (gc_lazy_sweep): if sweep target slots are not found, we
+ try heap_increment() because it might be able to expand the
+ heap. [Bug #5127] [ruby-dev:44285]
-Wed Feb 20 14:23:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * gc.c (gc_clear_mark_on_sweep_slots): if a sweeping was
+ interrupted, we expand the heap if at all possible.
- * thread.c: Grammar for #backtrace_locations and ::handle_interrupt
+Tue Aug 9 12:20:33 2011 Naohisa Goto <ngotogenome@gmail.com>
-Sun Feb 24 13:35:57 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/fiddle/helper.rb (libc_so, libm_so): Solaris support added.
+ [ruby-core:38853] [Bug #5168]
- * 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]
+ * test/dl/test_base.rb (libc_so, libm_so): on Solaris, remove libc
+ and libm version numbers for detecting default libc and libm.
-Wed Feb 20 13:23:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Tue Aug 9 09:18:04 2011 Eric Hodel <drbrain@segment7.net>
- * object.c: Document methods receiving string and convert to symbol
- Patch by Stefan Rusterholz
- * vm_eval.c: ditto
- * vm_method.c: ditto
+ * ext/zlib/zlib.c (gzfile_wrap): Document encoding options.
-Wed Feb 20 07:20:56 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * ext/zlib/zlib.c (rb_gzwriter_s_open): ditto
- * signal.c (sigsegv): suppress unused result warning. Because
- write(2) is marked __warn_unused_result__ on Linux glibc.
+ * ext/zlib/zlib.c (rb_gzreader_s_open): ditto
-Sun Feb 24 07:50:53 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sun Aug 7 23:31:32 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * compile.c (iseq_set_arguments): no keyword check if any keyword rest
- argument exists, even unnamed. [ruby-core:52744] [Bug #7922]
+ * time.c (rb_strftime_alloc): raise ERANGE if width is too large.
+ Patch by Nobuyoshi Nakada. [Bug #4457] [ruby-dev:43285]
-Sat Feb 23 16:51:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * test/ruby/test_time.rb (class TestTime): add a test for the
+ above change.
- * thread.c: Documentation for Thread#backtrace_locations
+Sun Aug 7 22:51:45 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sat Feb 23 16:05:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * ext/openssl/ossl_asn1.c (decode_eoc): remove unused variables.
+ Patch by Eric Wong. [Feature #5157] [ruby-core:38798]
- * vm.c: Typo in ObjectSpace::WeakMap overview
+ * ext/openssl/ossl_asn1.c (ossl_asn1_decode): ditto.
-Sat Feb 23 16:00:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * ext/openssl/ossl_pkey.c (ossl_pkey_new_from_data): ditto.
- * thread.c: Improved rdoc for ::handle_interrupt, ::pending_interrupt?
- and #pending_interrupt?
+Sun Aug 7 22:37:08 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sat Feb 23 12:26:43 2013 Akinori MUSHA <knu@iDaemons.org>
+ * configure.in: add -Wunused-variable to default CFLAGS.
+ Patch by Eric Wong. [Feature #5157] [ruby-core:38798]
- * misc/ruby-electric.el (ruby-electric-curlies)
- (ruby-electric-matching-char, ruby-electric-bar): Avoid electric
- insertion when there is a prefix argument.
+Sun Aug 7 15:37:35 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * 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.
+ * ext/digest/sha2/sha2ossl.c: use original SHA384_Final on DragonFly.
-Sat Feb 23 12:35:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Sun Aug 7 14:08:16 2011 Kazuki Tsujimoto <kazuki@callcc.net>
- * 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
+ * ext/objspace/objspace.c: fix typos in a document.
-Sat Feb 23 10:50:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Sun Aug 7 07:14:57 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * array.c (rb_ary_diff, rb_ary_and, rb_ary_or): Document return order
- [RubySpec #7803]
+ * cont.c (HAVE_GETCONTEXT): see getcontext(3) because DragonFly BSD
+ x64 port doesn't have it.
-Sat Feb 23 10:17:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Sun Aug 7 00:42:55 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * object.c (rb_obj_comp): Documenting Object#<=> return values
- Patch by Stefan Rusterholz
+ * ext/tk/lib/tk/wm.rb (Tk::Wm.command): Add the missing receiver
+ before calling epath. patched by flori
+ https://github.com/flori/ruby/commit/aa9474d32e5f2c57f8b0e2e0c528a03f06a4d433
-Sat Feb 23 09:48:41 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Aug 6 07:06:34 2011 Eric Hodel <drbrain@segment7.net>
- * dir.c (file_s_fnmatch, fnmatch_brace): encoding-incompatible pattern
- and string do not match, instead of exception. [ruby-dev:47069]
- [Bug #7911]
+ * marshal.c (w_object): Fix exception message when _dump_data is not
+ defined on a T_DATA object.
-Sat Feb 23 08:57:46 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+Fri Aug 5 22:16:20 2011 Naohisa Goto <ngotogenome@gmail.com>
- * doc/NEWS-*: Update NEWS from their respective branches
+ * numeric.c (rb_infinity, rb_nan): use WORDS_BIGENDIAN to get endian.
+ fix [Bug #5160] [ruby-dev:44356]
-Sat Feb 23 08:14:43 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+Fri Aug 5 17:14:11 2011 Akinori MUSHA <knu@iDaemons.org>
- * NEWS: many additions for Ruby 2.0.0
+ * test/test_syslog.rb (TestSyslog#test_log): Do not be too
+ specific about the log line format. Fixes #5081.
- * object.c: Add doc for Module.prepended
+Fri Aug 5 15:57:10 2011 Naohisa Goto <ngotogenome@gmail.com>
-Sat Feb 23 07:52:53 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * complex.c (f_signbit): fix compile error in gcc4 on Solaris with
+ CFLAGS="-std=gnu99". [ruby-dev:44355] fix [Bug #5159]
- * template/ruby.pc.in: reorder library flags which may refer library
- names. [Bug #7913]
+ * math.c: ditto.
-Fri Feb 22 23:46:20 2013 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
+Fri Aug 5 15:55:33 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/rexml/document.rb (REXML::Document.entity_expansion_text_limit):
- fix a typo in comment in r39384.
+ * test/ruby/test_object.rb: tests that respond_to? returns false.
-Fri Feb 22 18:31:46 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+Fri Aug 5 13:32:43 2011 Shugo Maeda <shugo@ruby-lang.org>
- * lib/rexml/document.rb (REXML::Document.entity_expansion_text_limit):
- new attribute to read/write entity expansion text limit. the default
- limit is 10Kb.
+ * lib/xmlrpc/client.rb, lib/xmlrpc/server.rb: should use
+ String#bytesize instead of String#size.
- * lib/rexml/text.rb (REXML::Text.unnormalize): check above attribute.
+Fri Aug 5 12:18:20 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Feb 22 17:36:23 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * vm_eval.c (check_funcall): try respond_to? first if redefined.
+ [Bug #5158]
- * test/test_rbconfig.rb (TestRbConfig): fix r39372.
- It must see RbConfig::CONFIG instead of CONFIG.
+Fri Aug 5 09:48:22 2011 Eric Hodel <drbrain@segment7.net>
-Fri Feb 22 14:55:41 2013 Naohisa Goto <ngotogenome@gmail.com>
+ * lib/rubygems: Import RubyGems 1.8.7:
+ Added missing require for `gem uninstall --format-executable`.
- * signal.c (ruby_abort): fix typo in r39354 [Bug #5014]
+ The correct name of the executable being uninstalled is now displayed
+ with --format-executable.
-Fri Feb 22 12:46:41 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ Fixed `gem unpack uninstalled_gem` default version picker.
- * random.c (rb_random_ulong_limited): fix error message for negative
- value. [ruby-dev:47061] [Bug #7903]
+ RubyGems no longer claims a nonexistent gem can be uninstalled.
-Fri Feb 22 11:36:45 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ `gem which` no longer claims directories are requirable files.
- * test/test_rbconfig.rb (TestRbConfig): skip user defined values by
- configuration options. [Bug #7902]
+ `gem cleanup` continues cleaning up gems if one can't be uninstalled
+ due to permissions. Issue #82.
-Fri Feb 22 11:33:42 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ Gem repository directories are no longer created world-writable.
+ Patch by Sakuro OZAWA. [Ruby 1.9 - Bug #4930]
- * lib/mkmf.rb (MakeMakefile#init_mkmf): adjust default library path
- for multiarch. [Bug #7874]
+Fri Aug 5 07:00:31 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Feb 22 11:10:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * test/io/console/test_io_console.rb (test_noctty): daemon() on
+ Fedora Rawhide seems not to detach the controlling terminal,
+ when the argument noclose is non-zero. ref: [Bug #5135]
- * enum.c (Enumerable#chunk: Improved examples, grammar, and formatting
- Patch by Dan Bernier and Rich Bruchal of newhaven.rb
- [Github documenting-ruby/ruby#8]
+Thu Aug 4 23:48:00 2011 Kenta Murata <mrkn@mrkn.jp>
-Fri Feb 22 11:00:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * thread_pthread.c (native_cond_signal): retry to call pthread_cond_signal
+ and pthread_cond_broadcast if they return EAGAIN in
+ native_cond_signal and native_cond_broadcast, respectively.
+ It is for the pthread implementation of Mac OS X 10.7 (Lion).
+ fixes #5155. [ruby-dev:44342].
- * 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]
+ * thread_pthread.c (native_cond_broadcast): ditto.
-Fri Feb 22 07:04:41 2013 Eric Hodel <drbrain@segment7.net>
+ * thread_pthread.c (struct cached_thread_entry): stop using
+ pthread_cond_t and its functions directly.
- * 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.
+ * thread_pthread.c (register_cached_thread_and_wait): ditto.
-Fri Feb 22 06:30:57 2013 Eric Hodel <drbrain@segment7.net>
+ * thread_pthread.c (use_cached_thread): ditto.
- * doc/globals.rdoc: Document what setting $DEBUG does.
+Thu Aug 4 20:29:41 2011 Naohisa Goto <ngotogenome@gmail.com>
- * doc/globals.rdoc: Added pointer to $-d for full documentation.
+ * configure.in: when Solaris cc, use $(CC) to link shared libs.
-Fri Feb 22 06:27:07 2013 Eric Hodel <drbrain@segment7.net>
+Thu Aug 4 20:19:11 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * doc/globals.rdoc: Document what setting $VERBOSE does. [Bug #7899]
+ * error.c (report_bug): use a small message buffer instead of BUFSIZ.
+ It is needed for avoiding nested SIGSEGV on Linux.
+ Note: BUFSIZ is not proper buffer size. It's unrelated with maximum
+ filename length. :-/
+ [Bug #5139] [ruby-dev:44315]
- * doc/globals.rdoc: Added pointer to $-w and $-v for full
- documentation.
+Thu Aug 4 16:08:45 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Feb 22 02:33:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * tool/rbinstall.rb (gem): install all gemspecs under lib and ext.
- * lib/abbrev.rb: Add words parameter to Abbrev::abbrev
- Patch by Devin Weaver [Github documenting-ruby/ruby#7]
+ * tool/rbinstall.rb (Gem::Specification): may not be defined when
+ cross-compiling and BASERUBY is 1.8.
-Thu Feb 21 17:28:14 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Thu Aug 4 11:30:36 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * tool/merger.rb: add interaction when only ChangeLog is modified.
+ * include/ruby/missing.h: define __syscall on OpenBSD as r32702.
-Thu Feb 21 16:34:46 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Aug 4 03:02:54 2011 Aaron Patterson <aaron@tenderlovemaking.com>
- * signal.c (check_stack_overflow): extract duplicated code and get rid
- of declaration-after-statement. [Bug #5014]
+ * tool/rbinstall.rb: use rubygems to load gemspecs, copy actual
+ gemspecs on install rather than generate fake ones for all gems.
-Thu Feb 21 14:14:13 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Thu Aug 4 02:45:10 2011 Kenta Murata <mrkn@mrkn.jp>
- * signal.c (sigsegv): avoid to use async signal unsafe functions
- when nested sigsegv is happen.
- [Bug #5014] [ruby-dev:44082]
+ * configure.in: set CXX variable to the C++ compiler that matches the
+ C compiler specified by CC variable (e.g. use g++-4.2 for gcc-4.2).
-Thu Feb 21 13:47:59 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Thu Aug 4 02:21:10 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * file.c (rb_group_member): added an error check. SUS says,
- getgroups(small_value) may return EINVAL.
+ * lib/mkmf.rb (link_command): use static library only for bundled
+ extensions. [Bug #5147]
-Thu Feb 21 13:37:07 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Thu Aug 4 02:02:10 2011 Aaron Patterson <aaron@tenderlovemaking.com>
- * process.c (RB_MAX_GROUPS): moved to
- * internal.h (RB_MAX_GROUPS): here.
+ * ext/psych/psych.gemspec: installing psych as a gem.
- * file.c (rb_group_member): use RB_MAX_GROUPS instead of
- RUBY_GROUP_MAX. They are the same.
+Wed Aug 3 16:01:35 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-Thu Feb 21 13:15:40 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * util.c, include/ruby/util.h (ruby_add_suffix): remove the function.
+ [Bug #5153] [ruby-core:38736]
- * 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.
+ * io.c (argf_next_argv): remove the call of above function.
-Thu Feb 21 13:04:59 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * ext/-test-/add_suffix, test/-ext-/test_add_suffix.rb: remove the test
+ extension module because this is only for testing ruby_add_suffix().
- * file.c (eaccess): use access() when not using setuid nor setgid.
- This is minor optimization.
+ * LEGAL: remove the mention about a part of util.c, because now we
+ removed the part.
-Thu Feb 21 12:56:19 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * io.c (argf_next_argv): now the new filename is not guaranteed to
+ use, so should check the return value of rename(2).
- * file.c (rb_group_member): get rid of NGROUPS dependency.
- [Bug #7886] [ruby-core:52537]
+ * test/ruby/test_argf.rb (TestArgf#test_inplace_rename_impossible):
+ now we expect same result with other platforms on no_safe_rename
+ platforms (=Windows).
-Thu Feb 21 12:45:03 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Aug 3 09:18:08 2011 URABE Shyouhei <shyouhei@ruby-lang.org>
- * ruby.c (ruby_init_loadpath_safe): try two levels upper for stripping
- libdir name. [Bug #7874]
+ * test/xmlrpc/webrick_testing.rb (WEBrick_Testing#start_server):
+ Like r32795, bind address should be specified.
- * configure.in (libdir_basename): expand with multiarch in configure,
- not to defer the expansion till ruby.pc.in and mkmf.rb. [Bug #7874]
+Wed Aug 3 07:46:30 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * configure.in (libdir_basename): also -rpath and -install_name flags
- are affected when libruby directory changes. [Bug #7874]
+ * encoding.c (enc_find): mistakenly remained !. [Bug #5150]
-Wed Feb 20 19:27:02 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Aug 3 00:11:08 2011 Tanaka Akira <akr@fsij.org>
- * include/ruby/ruby.h (HAVE_RB_SCAN_ARGS_OPTIONAL_HASH): for
- rb_scan_args() optional hash feature. [Bug #7861]
+ * lib/prettyprint.rb: update document. [ruby-core:36776]
-Wed Feb 20 18:02:26 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Tue Aug 2 22:04:46 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * configure.in (target_os): do not strip -gnu suffix on Linux if
- --target is given explicitly. [Bug #7874]
+ * gc.c (init_heap): allocate sigaltstack after heaps are allocated.
+ [ruby-dev:44315] [Bug #5139]
- * configure.in (libdirname): adjust library path name which libruby
- files will be installed. [Bug #7874]
+ * vm.c (thread_free): use free because objspace is not ready.
- * tool/rbinstall.rb (libdir): ditto.
+ * vm.c (th_init): use malloc because objspace is not ready.
-Wed Feb 20 13:37:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Tue Aug 2 20:10:16 2011 Shota Fukumori <sorah@tubusu.net>
- * ext/pty/pty.c: Documentation for the PTY module
+ * test/testunit/test_parallel.rb: pass "--ruby" option to
+ test/testunit/tests_for_parallel/runner.rb. [Bug #5132] [ruby-dev:44303]
-Wed Feb 20 12:18:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Tue Aug 2 15:53:37 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * object.c: Document Data class [Bug #7890] [ruby-core:52549]
- Patch by Matthew Mongeau
+ * encoding.c (str_to_encoding): rename from to_encoding and
+ use str_to_encindex.
-Wed Feb 20 11:50:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * encoding.c (str_to_encindex): split from to_encoding.
- * lib/mutex_m.rb: Add rdoc for Mutex_m module
+ * encoding.c (rb_to_encoding): use str_to_encoding.
-Wed Feb 20 09:34:43 2013 Eric Hodel <drbrain@segment7.net>
+ * encoding.c (rb_obj_encoding): don't bypass rb_encoding*.
+ If it uses rb_encoding*, it bypass encindex. If it uses encindex,
+ it doesn't bypass.
- * 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.
+ * encoding.c (enc_find): add shortcut for encoding object, use
+ str_to_encindex, and avoid bypass rb_encoding*.
-Wed Feb 20 07:51:19 2013 Eric Hodel <drbrain@segment7.net>
+Tue Aug 2 12:03:16 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/rubygems/installer.rb: Use gsub instead of gsub! to avoid
- altering @bin_dir. Fixes tests on windows. [ruby-trunk - Bug #7885]
+ * hash.c (recursive_hash): hash value of emptied hash should be
+ equal to an empty hash. [ruby-core:38650]
-Tue Feb 19 20:50:00 2013 Kenta MURATA <mrkn@mrkn.jp>
+Tue Aug 2 11:42:15 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/bigdecimal/bigdecimal.gemspec: bump to 1.2.0.
- [ruby-core:51777] [Bug #7761]
+ * parse.y (rb_enc_symname2_p): :! is valid symbol. [Bug #5136]
-Tue Feb 19 13:07:25 2013 Akinori MUSHA <knu@iDaemons.org>
+Tue Aug 2 07:33:29 2011 URABE Shyouhei <shyouhei@ruby-lang.org>
- * ext/syslog/syslog.c (Init_syslog): Define inspect as a singleton
- method and remove it as an instance method. [Bug #6502]
+ * test/net/http/test_http.rb (TestNetHTTP_version_1_1_methods#test_timeout_during_HTTP_session):
+ If you connect to localhost, you should listen localhost.
-Tue Feb 19 12:30:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * test/net/http/test_https.rb (TestNetHTTPS#test_timeout_during_SSL_handshake):
+ ditto.
- * object.c: rdoc formatting for Kernel#Array()
- * array.c: Add rdoc for Array() method to Creating Arrays section
+Tue Aug 2 06:18:15 2011 Luis Lavena <luislavena@gmail.com>
-Tue Feb 19 10:35:52 2013 Eric Hodel <drbrain@segment7.net>
+ * lib/rubygems/installer.rb (class Gem): Correct path check on Windows
+ Possible fix for [Ruby 1.9 - Bug #5111]
+ * test/rubygems/test_gem_installer.rb (load Gem): ditto
- * ext/openssl/ossl.c (class OpenSSL): Use only inner parenthesis in
- create_extension examples.
+Mon Aug 1 20:12:03 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-Tue Feb 19 10:27:12 2013 Eric Hodel <drbrain@segment7.net>
+ * test/ruby/test_process.rb (TestProcess#windows?): new method.
- * ext/openssl/ossl.c (class OpenSSL): Fixed ExtensionFactory example.
- Patch by Richard Bradley. [ruby-trunk - Bug #7551]
+ * test/ruby/test_process.rb (TestProcess#*): use above method.
-Tue Feb 19 08:32:11 2013 Koichi Sasada <ko1@atdot.net>
+ * test/ruby/test_process.rb (TestProcess#test_execopts_redirect):
+ windows doesn't support FD_CLOEXEC.
- * vm_eval.c (vm_call0_body): check interrupts after method dispatch
- from C methods. [Bug #7878]
+Mon Aug 1 15:45:23 2011 Eric Hodel <drbrain@segment7.net>
-Tue Feb 19 08:14:40 2013 Eric Hodel <drbrain@segment7.net>
+ * test/rake/test_rake_functional.rb: Don't assume the binary name of
+ ruby is "ruby". [Ruby 1.9 - Bug #5114]
+ * test/rake/helper.rb: ditto
- * lib/rubygems/installer.rb: Fixed placement of executables with
- --user-install. [ruby-trunk - Bug #7779]
- * test/rubygems/test_gem_installer.rb: Test for above.
+Mon Aug 1 15:31:14 2011 URABE Shyouhei <shyouhei@ruby-lang.org>
-Tue Feb 19 06:04:06 2013 NARUSE, Yui <naruse@ruby-lang.org>
+ * test/io/console/test_io_console.rb (TestIO_Console#test_sync):
+ Skip when PTY allocation failed (that's not our fault).
- * 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).
+Mon Aug 1 15:04:12 2011 URABE Shyouhei <shyouhei@ruby-lang.org>
- * configure.in: remove r38342's hack and check libunwind.
+ * test/xmlrpc/test_webrick_server.rb (Test_Webrick#setup_http_server):
+ XMLRPC::Client.new3(), when called without host: argument, tries
+ to connect to a host where "localhost" resolves to. On the
+ other hand a WEBrick::HTTPServer.new(), when called without
+ BindAddress: argument, tries to listen all the address where
+ getaddrinfo(AF_UNSPEC) resolves to. This is a mismatch because
+ "localhost" might not resolve to one of those listening sockets.
+ We would better explicitly specify "localhost" here and if
+ failed, just skip the whole test.
-Tue Feb 19 04:26:29 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Mon Aug 1 14:24:56 2011 Eric Hodel <drbrain@segment7.net>
- * configure.in: check whether backtrace(3) works well or not.
+ * lib/rdoc.rb: Import RDoc 3.9.1. Fixes bugs in the RDoc::Markup
+ parser.
- * vm_dump.c: set HAVE_BACKTRACE 0 if BROKEN_BACKTRACE.
+Mon Aug 1 12:00:35 2011 NARUSE, Yui <naruse@ruby-lang.org>
-Mon Feb 18 16:30:18 2013 Akinori MUSHA <knu@iDaemons.org>
+ * insns.def (concatstrings): don't use initial ASCII-8BIT string.
+ [ruby-core:38635] [Bug #5126]
- * lib/ipaddr.rb (IPAddr#in6_addr): Fix a typo with the closing
- parenthesis.
+Sun Jul 31 22:57:16 2011 Yuki Sonoda (Yugui) <yugui@yugui.jp>
-Mon Feb 18 12:32:24 2013 Akinori MUSHA <knu@iDaemons.org>
+ * enc/Makefile.in (ECHO1): Same as the recent fix in common.mk.
+ ":" in a make variable replacement cause a syntax error with
+ /usr/ccs/bin/make on Solaris. Uses $(NULLCMD) instead.
- * 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]
+Sun Jul 31 21:16:02 2011 Yuki Sonoda (Yugui) <yugui@yugui.jp>
-Mon Feb 18 10:09:54 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * complex.c (f_signbit): gcc4 on Solaris DOES have signbit but does
+ not have it on header.
- * configure.in (unexpand_shvar): regularize a shell variable by
- unexpanding shell variables in it.
+ * math.c: ditto.
-Sun Feb 17 20:55:44 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sun Jul 31 21:09:04 2011 Yuki Sonoda (Yugui) <yugui@yugui.jp>
- * compar.c (rb_invcmp): compare by inversed comparison, with preventing
- from infinite recursion. [ruby-core:52305] [Bug #7870]
+ * common.mk (node_name.inc): Use $(Q) for consistency.
- * string.c (rb_str_cmp_m), time.c (time_cmp): get rid of infinite
- recursion.
+ * Makefile.in (INSNS): ditto.
-Sun Feb 17 17:23:22 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sun Jul 31 21:19:51 2011 Yuki Sonoda (Yugui) <yugui@yugui.jp>
- * 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]
+ * lib/mkmf.rb (configuration:ECHO1): Same as the recent fix in
+ common.mk.
+ ":" in a make variable replacement cause a syntax error with
+ /usr/ccs/bin/make on Solaris. Uses $(NULLCMD) instead.
-Sun Feb 17 01:19:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Sun Jul 31 20:39:12 2011 Yuki Sonoda (Yugui) <yugui@yugui.jp>
- * ext/psych/lib/psych/y.rb: Document Kernel#y by Adam Stankiewicz
- [Github tenderlove/psych#127]
+ * common.mk (ECHO1): nmake does not allow parenthesis in make variable
+ replacement.
-Sun Feb 17 00:52:14 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Sun Jul 31 23:06:57 2011 Kazuki Tsujimoto <kazuki@callcc.net>
- * 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.
+ * vm.c (check_env): print debug messages to stderr.
+ [Feature #4871] [ruby-dev:43743]
-Sat Feb 16 20:51:17 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+Sun Jul 31 22:50:23 2011 Kazuki Tsujimoto <kazuki@callcc.net>
- * vm.c (ENV_IN_HEAP_P): fix off-by-one error.
+ * vm.c (vm_make_env_each): don't save prev env value.
+ It is no longer used. [Feature #4871] [ruby-dev:43743]
-Sat Feb 16 20:47:16 2013 Akinori MUSHA <knu@iDaemons.org>
+ * vm.c (check_env): changed accordingly.
- * 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.
+Sun Jul 31 20:21:36 2011 "Yuki Sonoda (Yugui)" <yugui@yugui.jp>
-Sat Feb 16 20:43:20 2013 Tanaka Akira <akr@fsij.org>
+ * common.mk (ECHO1): ":" in a make variable replacement cause a syntax
+ error with /usr/ccs/bin/make on Solaris. Uses $(NULLCMD) instead.
- * ext/socket/ancdata.c (rsock_recvmsg): ignore truncated part of
- socket address returned from recvmsg().
+ * configure.in (NULLCMD): new check.
- * ext/socket/init.c (recvfrom_blocking): ignore truncated part of
- socket address returned from recvfrom().
- (rsock_s_recvfrom_nonblock): ditto.
+ * Makefile.in (NULLCMD): Reflects checking in configure.
-Sat Feb 16 20:05:26 2013 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
+ * win32/Makefile.sub (NULLCMD): new assignment.
- * test/ruby/test_thread.rb: fixed typo
- patched by Hiroki Matsue via https://github.com/ruby/ruby/pull/248
+Sun Jul 31 18:58:59 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Feb 16 16:08:35 2013 Koichi Sasada <ko1@atdot.net>
+ * io.c (rb_pipe): pipe on cygwin can succeed half but fail
+ half.
- * 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]
+Sun Jul 31 11:31:07 2011 Kazuki Tsujimoto <kazuki@callcc.net>
- 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.
+ * vm.c: check if cfp is valid. [Bug #5083] [ruby-dev:44208]
- * test/ruby/test_method.rb: add a test.
+Sun Jul 31 09:18:28 2011 Eric Hodel <drbrain@segment7.net>
-Sat Feb 16 15:45:56 2013 Koichi Sasada <ko1@atdot.net>
+ * lib/rdoc: Update to RDoc 3.9. Fixed `ri []`, stopdoc creating an
+ object reference, nodoc for class aliases, verbatim === lines.
- * 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]
+Sun Jul 31 01:29:08 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * test/ruby/test_settracefunc.rb: add a test.
+ * io.c (rb_io_each_byte): remove unused variable e.
-Sat Feb 16 13:40:13 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Jul 31 01:23:45 2011 Kenta Murata <mrkn@mrkn.jp>
- * configure.in (shvar_to_cpp): do not substitute exec_prefix itself
- with RUBY_EXEC_PREFIX, which cause recursive definition.
- [ruby-core:52296] [Bug #7860]
+ * test/bigdecimal/test_bigdecimal.rb (test_version): removed.
-Sat Feb 16 13:13:04 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Jul 30 23:19:09 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/io/console/io-console.gemspec: bump to 0.4.2. now explicitly
- requires ruby 1.9.3 or later. [Bug #7847]
+ * defs/default_gems: separate from tool/rbinstall.rb.
- * ext/io/console/console.c (console_dev): compatibility with ruby 1.8.
+Sat Jul 30 23:14:44 2011 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]
+ * io.c (rb_io_each_byte): rbuf can be refreshed during yield.
+ [Bug #5119]
-Sat Feb 16 12:45:50 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sat Jul 30 22:35:50 2011 Naohisa Goto <ngotogenome@gmail.com>
- * 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]
+ * strftime.c (NEEDS): avoid SEGV due to integer overflow in
+ sparc-solaris2.10 and i686-linux. fix [Bug #4456] [ruby-dev:43284]
-Sat Feb 16 12:15:20 2013 Aaron Patterson <aaron@tenderlovemaking.com>
+Sat Jul 30 17:26:26 2011 Masaki Suketa <masaki.suketa@nifty.ne.jp>
- * parse.y: add dtrace probe for symbol create.
+ * test/win32ole/test_win32ole_variant.rb: use skip method to skip the test.
- * probes.d: ditto
+ * test/win32ole/test_win32ole_variant_outarg.rb: ditto.
-Sat Feb 16 09:27:37 2013 Tanaka Akira <akr@fsij.org>
+Sat Jul 30 14:27:00 2011 Kenta Murata <mrkn@mrkn.jp>
- * 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 ?".
+ * ext/bigdecimal/bigdecimal.c (BigDecimal_version): version 1.1.0.
-Sat Feb 16 09:24:37 2013 Tanaka Akira <akr@fsij.org>
+ * ext/bigdecimal/bigdecimal.gemspec: turn into a default gem.
- * ext/socket/extconf.rb: reorder header tests to consider inclusion
- order in rubysocket.h.
+ * tool/rbinstall.rb: ditto.
-Sat Feb 16 08:42:58 2013 Tanaka Akira <akr@fsij.org>
+Sat Jul 30 11:21:55 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * configure.in, ext/socket/extconf.rb: test netinet/in_systm.h in
- ext/socket/extconf.rb instead of configure.in.
+ * vm_core.h (ALT_STACK_SIZE): use MINSIGSTKSZ*2 instead of SIGSTKSZ*2.
+ [ruby-core:38607]
- Originally, netinet/in_systm.h is included for NextStep, OpenStep,
- and Rhapsody. [ruby-core:1596]
+Sat Jul 30 10:39:14 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sat Feb 16 07:55:40 2013 Tanaka Akira <akr@fsij.org>
+ * vm.c (th_init): preallocate alternative stack.
+ NoMemoryError is better than rb_bug, of course.
+ Patch by Eric Wong. [ruby-core:38572][ruby-core:38594].
- * configure.in: don't test xti.h here.
+ * signal.c (rb_register_sigaltstack): ditto.
- * ext/socket/extconf.rb: test xti.h here.
+ * vm_core.h: moved ALT_STACK_SIZE definition from signal.c.
+ * vm.c (thread_free): use xfree() instead of free().
- Originally, xti.h is included for IRIX [ruby-core:14447].
+Sat Jul 30 07:20:49 2011 Tanaka Akira <akr@fsij.org>
-Sat Feb 16 07:16:49 2013 Tanaka Akira <akr@fsij.org>
+ * ext/socket/lib/socket.rb (udp_server_sockets): unused variable
+ removed.
+ patch by Jeremy Evans. [ruby-core:38600]
- * ext/socket/extconf.rb: test struct sockaddr_un and its member,
- sun_len.
+Fri Jul 29 23:56:32 2011 Tanaka Akira <akr@fsij.org>
- * ext/socket/sockport.h (INIT_SOCKADDR_UN): new macro defined.
+ * lib/securerandom.rb: call OpenSSL::Random.seed at the
+ SecureRandom.random_bytes call.
+ based on the patch by Masahiro Tomita. [ruby-dev:44270]
- * ext/socket/socket.c (sock_s_pack_sockaddr_un): use INIT_SOCKADDR_UN.
+Fri Jul 29 23:53:48 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/socket/unixsocket.c (rsock_init_unixsock): ditto.
+ * array.c (rb_ary_set_len): new function to set array length.
- * ext/socket/raddrinfo.c (init_unix_addrinfo): ditto.
- (addrinfo_mload): ditto.
+ * vm_eval.c (method_missing): set the length of argv array, to mark
+ arguments.
+
+ * vm_eval.c (rb_apply): get rid of too large alloca.
+
+Fri Jul 29 20:48:39 2011 Tanaka Akira <akr@fsij.org>
+
+ * ext/socket/mkconstants.rb: fix typos.
+
+Fri Jul 29 20:28:56 2011 Tanaka Akira <akr@fsij.org>
+
+ * ext/socket/mkconstants.rb: use whitespaces as a separator.
+
+Fri Jul 29 18:59:07 2011 Tanaka Akira <akr@fsij.org>
+
+ * ext/socket/mkconstants.rb: add documents for constants.
+ patch by Eric Hodel. [ruby-core:37853] [Bug #4989]
+
+Fri Jul 29 16:00:43 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * configure.in (enable_pthread): use -pthread on OpenBSD without
+ explicit option. patched by Jeremy Evans. [ruby-core:38572]
+
+Thu Jul 28 23:36:28 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
+
+ * ext/fiddle/closure.c (callback): use rb_ary_tmp_new() instead of
+ xmalloc() to allocate an array for arguments of callback procedure,
+ to prevent arguments from being swept by GC. [ruby-core:38546]
+ [Bug #4929]
+
+Thu Jul 28 22:36:06 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
+
+ * ext/openssl/ossl_cipher.c (ossl_cipher_initialize): Avoid possible
+ SEGV from AES encryption/decryption. Processing data by
+ Cipher#update without initializing key (meaningless usage of Cipher
+ object since we don't offer a way to export a key) could cause SEGV.
+
+ In OpenSSL, the EVP which has EVP_CIPH_RAND_KEY flag (such as DES3)
+ allows uninitialized key, but other EVPs (such as AES) does not
+ allow it. Calling EVP_CipherUpdate() without initializing key causes
+ SEGV so we set the data filled with "\0" as the key by default. See
+ #2768.
+
+ * test/openssl/test_cipher.rb: test it.
+
+Thu Jul 28 14:25:08 2011 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * lib/rubygems/user_interaction.rb (Gem::StreamUI#tty?): typo.
+
+Thu Jul 28 12:32:53 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/dl/callback/mkcallback.rb (gencallback): use PTR2NUM.
+
+ * ext/dl/cptr.c (rb_dlptr_aref, rb_dlptr_aset): check NULL pointer
+ dereference.
+
+ * ext/dl/cptr.c (rb_dlptr_s_to_ptr): use rb_check_funcall.
+
+ * ext/dl/cptr.c (rb_dlptr_s_to_ptr): fix wrapping condition.
+
+Thu Jul 28 04:53:31 2011 Eric Hodel <drbrain@segment7.net>
+
+ * lib/delegate.rb: Move file-level documentation to the appropriate
+ classes.
+
+Thu Jul 28 02:15:04 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/dl/cfunc.c (dlcfunc_mark), ext/dl/cptr.c (dlptr_mark):
+ workaround to mark wrapped object. this is not a true fix,
+ because [Bug #4929] is caused by the interface design of DL.
+
+Thu Jul 28 00:28:15 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * test/fileutils/test_fileutils.rb: add OpenBSD case.
+ patched by Jeremy Evans [ruby-core:38530] see #5097
+
+ * test/ruby/test_process.rb: ditto.
+
+Wed Jul 27 22:46:59 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
+
+ * test/rinda/test_rinda.rb (test_remote_array_and_hash):
+ add local variables to protect objects from GC. [ruby-dev:44253]
+ [Bug #5104]
+
+Wed Jul 27 17:55:54 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * include/ruby/missing.h: define __syscall if the platform has
+ __syscall in the library but doesn't define it in headers
+ for example Mac OS X.
+
+Wed Jul 27 15:39:14 2011 Eric Hodel <drbrain@segment7.net>
+
+ * object.c: Add usage documentation for BasicObject. Based on patch
+ by Thomas Sawyer. [Ruby 1.9 - Bug #5067]
+
+Wed Jul 27 12:24:17 2011 Eric Hodel <drbrain@segment7.net>
-Sat Feb 16 07:05:59 2013 Tanaka Akira <akr@fsij.org>
+ * lib/rubygems/uninstaller.rb: Add missing require and update
+ messaging to avoid confusion with uninstall --format-executable.
+ [Ruby 1.9 - Bug #4062]
- * ext/socket/sockport.h (INIT_SOCKADDR_IN): don't need family
- argument. it is always AF_INET.
+Wed Jul 27 09:34:24 2011 Eric Hodel <drbrain@segment7.net>
- * ext/socket/raddrinfo.c (make_inetaddr): follow INIT_SOCKADDR_IN
+ * lib/rubygems: Update to RubyGems 1.8.6.1.
+
+Wed Jul 27 09:27:59 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
+
+ * test/openssl/test_pkcs12.rb: Add test and intermediate certificates.
+ [ Ruby 1.9 - Feature #3793 ] [ruby-core:32088]
+
+Wed Jul 27 01:05:32 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * eval_error.c (rb_print_undef_str): new function to raise
+ NameError for undefined method.
+
+ * load.c (rb_mod_autoload_p), object.c (rb_mod_const_get),
+ variable.c (rb_f_untrace_var, set_const_visibility), vm_method.c
+ (rb_mod_{remove,undef,alias}_method, set_method_visibility):
+ remove inadvertent symbol creation. based on the first patch by
+ Jeremy Evans at [ruby-core:38447]. [Feature #5089]
+
+ * vm_method.c (obj_respond_to): fix the respond_to_missing? override
+ case. based on the patch by Jeremy Evans at [ruby-core:38417].
+ [Feature #5072]
+
+ * parse.y (rb_check_id): make the given name a symbol or a string.
+ based on the second patch by Jeremy Evans at [ruby-core:38447]
+
+Wed Jul 27 00:50:00 2011 Kenta Murata <mrkn@mrkn.jp>
+
+ * ext/bigdecimal/lib/bigdecimal/util.rb (Rational#to_d):
+ zero or negative precision is error. fixes #5098.
+ [ruby-dev:44210]
+
+ * test/bigdecimal/test_bigdecimal_util.rb: add test for the above
change.
- (addrinfo_ipv6_to_ipv4): ditto.
-Sat Feb 16 04:21:07 2013 NAKAMURA Usaku <usa@ruby-lang.org>
+Wed Jul 27 00:48:00 2011 Kenta Murata <mrkn@mrkn.jp>
- * ext/socket/extconf.rb: workaround for mswin/mingw build problem.
- sendmsg emulation in win32/win32.c is not enough.
+ * ext/bigdecimal/lib/bigdecimal/util.rb (Float#to_d): modified for
+ specifying precision. fixes #5098. [ruby-dev:44210]
-Sat Feb 16 00:19:20 2013 Tanaka Akira <akr@fsij.org>
+ * test/bigdecimal/test_bigdecimal_util.rb: add test for the above
+ change.
- * ext/socket/extconf.rb: use all all tested available headers for
- have_func.
+Wed Jul 27 00:45:00 2011 Kenta Murata <mrkn@mrkn.jp>
-Fri Feb 15 22:21:37 2013 Akinori MUSHA <knu@iDaemons.org>
+ * ext/bigdecimal/lib/bigdecimal/util.rb (Integer#to_d): added
+ for symmetry to BigDecimal() function with an Integer.
+ fixes #5098. [ruby-dev:44210]
- * 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]
+ * test/bigdecimal/test_bigdecimal_util.rb: add test for the above
+ change.
-Fri Feb 15 20:29:11 2013 Tanaka Akira <akr@fsij.org>
+Wed Jul 27 00:30:00 2011 Kenta Murata <mrkn@mrkn.jp>
- * ext/socket/sockport.h (SET_SIN_LEN): defined for strict-aliasing
- rule.
- (INIT_SOCKADDR_IN): ditto.
+ * ext/bigdecimal/lib/bigdecimal/util.rb (BigDecimal#to_d): added
+ for adapting other Numeric subclasses. [ruby-dev:44245]
- * ext/socket/raddrinfo.c (make_inetaddr): use INIT_SOCKADDR_IN.
- (addrinfo_ipv6_to_ipv4): ditto.
+ * test/bigdecimal/test_bigdecimal_util.rb: test for the above change.
-Fri Feb 15 18:24:48 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Jul 27 00:27:00 2011 Kenta Murata <mrkn@mrkn.jp>
- * lib/mkmf.rb (MakeMakefile#try_run): bail out explicitly if cross
- compiling, because it cannot work of course.
+ * bigdecimal/bigdecimal.c (VpDup) a new function for duplicating
+ a BigDecimal.
-Fri Feb 15 12:34:58 2013 Tanaka Akira <akr@fsij.org>
+ * bigdecimal/bigdecimal.c (BigDecimal_new): support generating a new
+ BigDecimal from another BigDecimal using BigDecimal global function
+ or constructor. [ruby-dev:44245]
- * ext/socket/extconf.rb: test struct sockaddr_storage directly.
+Tue Jul 26 23:33:24 2011 Igor Zubkov <igor.zubkov@gmail.com>
- * ext/socket/rubysocket.h: use HAVE_TYPE_STRUCT_SOCKADDR_STORAGE.
+ * array.c: Fix typo. https://github.com/ruby/ruby/pull/36
-Fri Feb 15 12:26:13 2013 Tanaka Akira <akr@fsij.org>
+Mon Jul 25 23:51:01 2011 Yusuke Endoh <mame@tsg.ne.jp>
- * ext/socket/getaddrinfo.c (GET_AI): don't cast 1st argument for
- INIT_SOCKADDR.
+ * proc.c: pre-allocate the unlinked_method_entry_list_entry struct to
+ avoid memory allocation during GC. based on a patch from Eric Wong.
+ [ruby-core:38498]
-Fri Feb 15 08:12:11 2013 Tanaka Akira <akr@fsij.org>
+Mon Jul 25 23:39:33 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * ext/socket/sockport.h (SET_SS_LEN): removed.
- (SET_SIN_LEN): removed.
- (INIT_SOCKADDR): new macro.
+ * test/rake/test_rake_directory_task.rb (TestRakeDirectoryTask#
+ test_directory_win32): fixed wrong test.
- * ext/socket/ancdata.c (extract_ipv6_pktinfo): use INIT_SOCKADDR.
+Mon Jul 25 22:36:11 2011 Yusuke Endoh <mame@tsg.ne.jp>
- * ext/socket/raddrinfo.c (make_inetaddr): use INIT_SOCKADDR.
- (addrinfo_ipv6_to_ipv4): ditto.
+ * proc.c (struct METHOD), gc.c (gc_marks), vm_method.c
+ (rb_gc_mark_unlinked_live_method_entries): fix SEGV bug.
+ rb_method_entry_t was free'd even when the method is still on the
+ stack if it is BMETHOD (i.e., Method#call). This is because
+ rb_method_entry_t is embedded in struct METHOD. This commit
+ separates them and marks the live method entries.
+ See [ruby-core:38449] in detail. fix [Bug #5047] [ruby-core:38171]
- * ext/socket/getaddrinfo.c (GET_AI): use INIT_SOCKADDR.
+Mon Jul 25 22:14:37 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
-Fri Feb 15 07:49:27 2013 Eric Hodel <drbrain@segment7.net>
+ * lib/xmlrpc/client.rb: Fix possible HTTP header formatting failure by
+ 'Basic' header. Long username caused the base64 String truncation in
+ HTTP header which is not allowed. See #5046.
- * lib/rdoc.rb: Update to release version of 4.0.0
+ * test/xmlrpc/test_webrick_server.rb: test it.
- * lib/rubygems.rb: Update to release version of 2.0.0
+Mon Jul 25 15:04:33 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
-Fri Feb 15 07:07:27 2013 Tanaka Akira <akr@fsij.org>
+ * ext/openssl/lib/openssl.rb: End of transition period introduced by
+ [ruby-dev:38018]. From the next version of 1.9.3, you should use
+ require "openssl"
+ instead of
+ require "openssl/ssl"
+ and
+ require "openssl/x509"
- * ext/socket/sockport.h (SA_LEN): removed because unused now.
- (SS_LEN): ditto.
- (SIN_LEN): ditto.
+Mon Jul 25 13:46:38 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
-Thu Feb 14 10:45:31 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+ * ext/openssl/lib/openssl/x509.rb: Cosmetic change: move definition
+ introduced in r30152 to x509-internal.rb.
- * test/ruby/test_process.rb (test_setsid): Added a workaround for
- MacOS X. Patch by nagachika. [Bug #7826] [ruby-core:52126]
+Mon Jul 25 13:09:42 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
-Fri Feb 15 00:15:31 2013 Tanaka Akira <akr@fsij.org>
+ * ext/openssl/ossl_ssl.c (ossl_ssl_shutdown): Avoid randomly generated
+ SSLError from SSLSocket just after invoking SSLSocket#close.
+ OpenSSL's SSL_shutdown could try to send alert packet and it might
+ set SSLerr(global error stack) as the result. It causes the next
+ SSL read/write operation to fail by unrelated reason.
- * ext/socket/sockport.h (VALIDATE_SOCKLEN): new macro to validate
- sa_len member of 4.4BSD socket address.
+ By design, we're ignoring any error at SSL_shutdown() so we clear
+ global error stack after SSL_shutdown is called. See #5039.
- * ext/socket/getnameinfo.c (getnameinfo): use VALIDATE_SOCKLEN,
- instead of SA_LEN.
+Sun Jul 24 20:29:53 2011 Tanaka Akira <akr@fsij.org>
- * ext/socket/socket.c (sock_s_getnameinfo): use VALIDATE_SOCKLEN
- instead of SS_LEN.
+ * ext/socket/extconf.rb: refine the recvmsg test.
-Thu Feb 14 22:25:54 2013 Tanaka Akira <akr@fsij.org>
+Sun Jul 24 20:02:31 2011 Tanaka Akira <akr@fsij.org>
- * 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.
+ * ext/socket/extconf.rb: fix the recvmsg test.
-Thu Feb 14 20:11:23 2013 Tanaka Akira <akr@fsij.org>
+Sun Jul 24 08:42:51 2011 Tanaka Akira <akr@fsij.org>
- * ext/socket: always operate length of socket address companion with
- socket address.
+ * ext/socket/extconf.rb: test recvmsg allocates file descriptors for
+ fd passing even with MSG_PEEK.
- * ext/socket/rubysocket.h (rsock_make_ipaddr): add an argument for
- socket address length.
- (rsock_ipaddr): ditto.
+ * ext/socket/ancdata.c: use the above test result.
- * ext/socket/ipsocket.c (ip_addr): pass length to rsock_ipaddr.
- (ip_peeraddr): ditto.
- (ip_s_getaddress): pass length to rsock_make_ipaddr.
+Sun Jul 24 01:04:50 2011 Eric Hodel <drbrain@segment7.net>
- * 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.
+ * lib/rubygems/specification.rb: Restore behavior of
+ Gem::Specification#loaded. [Ruby 1.9 - Bug #5032]
- * ext/socket/init.c (rsock_s_recvfrom): pass length to rsock_ipaddr.
- (rsock_s_recvfrom_nonblock): ditto.
+Sun Jul 24 00:05:00 2011 Jeremy Evans <merch-redmine@jeremyevans.net>
- * ext/socket/tcpsocket.c (tcp_sockaddr): pass length to
- rsock_make_ipaddr.
+ * error.c (rb_name_error_str): new function to raise NameError
+ with the name string but not ID.
- * 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.
+ * object.c, proc.c, variable.c: more removal of inadvertent symbol
+ creation. [Feature #5079]
-Thu Feb 14 14:31:43 2013 Eric Hodel <drbrain@segment7.net>
+Sat Jul 23 21:14:00 2011 Tadayoshi Funaba <tadf@dotrb.org>
- * lib/net/http.rb: Removed OpenSSL dependency from Net::HTTP.
+ * lib/cmath.rb (cbrt): should return a real number if possible.
- * test/net/http/test_http.rb: Remove Zlib dependency from tests.
- * test/net/http/test_http_request.rb: ditto.
+Sat Jul 23 20:12:52 2011 NARUSE, Yui <naruse@ruby-lang.org>
-Thu Feb 14 11:08:15 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/rake/test_rake_functional.rb (setup): Use __FILE__ for the base
+ directory. Current directory is not the top source directory when
+ the building process runs on other than there.
- * class.c (include_modules_at): detect cyclic prepend with original
- method table. [ruby-core:52205] [Bug #7841]
+ * test/rake/test_rake_rake_test_loader.rb: ditto.
-Thu Feb 14 10:30:41 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * test/rake/test_rake_task_argument_parsing.rb
+ (test_terminal_width_using_hardcoded_80): hardcoded 80 is used
+ when app.unix? is false.
- * vm_method.c: call method_removed hook on called class, not on
- prepending iclass. [ruby-core:52207] [Bug #7843]
+Sat Jul 23 20:11:50 2011 Tadayoshi Funaba <tadf@dotrb.org>
-Thu Feb 14 10:05:57 2013 Eric Hodel <drbrain@segment7.net>
+ * ext/date/date_core.c: an issue that is same as [ruby-dev:44071].
+ * ext/date/date_strftime.c: identical to [ruby-dev:44112].
- * 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.
+Sat Jul 23 19:12:53 2011 Masaki Suketa <masaki.suketa@nifty.ne.jp>
+
+ * test/win32ole/test_err_in_callback.rb (test_err_in_callback):
+ skip test if ADODB.connection is not available.
+
+Sat Jul 23 15:37:04 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * parse.y (rb_enc_symname_type): :$a!, @a! and so on are not
+ valid symbols, so they should be inspected with quotes.
+
+Sat Jul 23 17:06:25 2011 Tanaka Akira <akr@fsij.org>
+
+ * io.c (rb_update_max_fd): validate fd.
+
+ * ext/socket/rubysocket.h (rsock_discard_cmsg_resource): add
+ msg_peek_p argument for the declaration.
-Thu Feb 14 08:18:47 2013 Tanaka Akira <akr@fsij.org>
+ * ext/socket/ancdata.c (discard_cmsg): add msg_peek_p argument.
+ assume FreeBSD, NetBSD and MacOS X doesn't generate passed fd
+ when MSG_PEEK.
+ (rsock_discard_cmsg_resource): add msg_peek_p argument.
+ (bsock_recvmsg_internal): call rsock_discard_cmsg_resource with
+ msg_peek_p argument.
- * 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.
+ * ext/socket/unixsocket.c (unix_recv_io): call
+ rsock_discard_cmsg_resource with msg_peek_p argument.
-Wed Feb 13 20:59:48 2013 Tanaka Akira <akr@fsij.org>
+Sat Jul 23 14:38:28 2011 Eric Hodel <drbrain@segment7.net>
- * ext/socket/extconf.rb: don't define socklen_t here, just test.
+ * test/rake*: Remove dependencies on flexmock and session gems.
+ [Ruby 1.9 - Bug #4987]
- * ext/socket/rubysocket.h: define socklen_t if not available.
+Sat Jul 23 12:19:04 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Feb 13 18:37:50 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * parse.y (rb_check_id): take care of attrset ID created
+ implicitly by local ID. [Bug #5084]
- * proc.c (mnew): skip prepending modules and return the method bound
- on the given class. [ruby-core:52160] [Bug #7836]
+ * parse.y (rb_check_id): conversion condition was inverse.
+ [Bug #5084]
-Wed Feb 13 18:11:59 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Jul 22 21:46:54 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * proc.c (method_original_name): new methods Method#original_name and
- UnboundMethod#original_name. [ruby-core:52048] [Bug #7806]
- [EXPERIMENTAL]
+ * vm_insnhelper.c (vm_call_cfunc): added volatile for a workaround
+ of cfp consistency error problem on OS X 10.7 (Lion). It's
+ suspected llvm optimization bug.
+ [Bug #5074] [ruby-dev:44185]
- * proc.c (method_inspect): show the given name primarily, and
- original_id if aliased. [ruby-core:52048] [Bug #7806]
+Fri Jul 22 21:18:20 2011 NARUSE, Yui <naruse@ruby-lang.org>
-Wed Feb 13 17:56:39 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+ * lib/uri/generic.rb (WFKV_): unroll the loop of regexp.
- * configure.in (warnflags): disable -Werror by default unless
- development. [ruby-core:52131] [Bug #7830]
+ * lib/uri/generic.rb (URI.decode_www_form_component): ditto.
-Wed Feb 13 06:05:52 2013 Eric Hodel <drbrain@segment7.net>
+Fri Jul 22 21:06:39 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * 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.
+ * object.c (rb_mod_{const,cvar}_defined, rb_obj_ivar_defined):
+ avoid inadvertent symbol creation in reflection methods. based
+ on a patch by Jeremy Evans at [ruby-core:38367]. [Feature #5072]
-Wed Feb 13 05:49:21 2013 Tanaka Akira <akr@fsij.org>
+ * vm_method.c (rb_mod_method_defined)
+ (rb_mod_{public,private,protected}_method_defined)
+ (obj_respond_to): ditto.
- * ext/socket/extconf.rb: test functions just after struct members.
+ * parse.y (rb_check_id): new function returns already interned ID
+ or 0.
+
+Fri Jul 22 20:44:49 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * parse.y (rb_is_global_id, rb_is_attrset_id): add missing
+ predicates.
+
+Fri Jul 22 20:24:38 2011 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+
+ * test/ruby/test_object.rb (TestObject#test_respond_to_missing):
+ 2nd argument of respond_to_missing? is not optional.
+
+Fri Jul 22 19:05:47 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * parse.y (rb_enc_symname2_p): get rid of potential out-of-bound
+ access.
-Tue Feb 12 12:02:35 2013 NARUSE, Yui <naruse@ruby-lang.org>
+Fri Jul 22 13:55:59 2011 Eric Hodel <drbrain@segment7.net>
- * 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
+ * lib/net/http.rb: Net::HTTP#finish is used to manually close
+ connections. [Ruby 1.9 - Bug #5045]
-Mon Feb 11 23:08:48 2013 Tanaka Akira <akr@fsij.org>
+Fri Jul 22 13:51:29 2011 Eric Hodel <drbrain@segment7.net>
- * configure.in: enable rb_cv_page_size_log test for MirOS BSD.
+ * ext/readline/readline.c: Add examples for Readline.completion_proc=.
+ [Ruby 1.9 - Bug #5057]
-Mon Feb 11 20:06:38 2013 Tanaka Akira <akr@fsij.org>
+Fri Jul 22 13:03:12 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * configure.in: use -pthread on mirbsd*.
+ * ext/openssl/ossl_hmac.c: Revert checking return type of
+ HMAC_Init_ex as it is not compatible with OpenSSL < 1.0.0.
-Mon Feb 11 16:07:09 2013 Tanaka Akira <akr@fsij.org>
+Fri Jul 22 12:10:21 2011 Eric Hodel <drbrain@segment7.net>
- * configure.in: add SOLIBS and LIBRUBY_SO definition for mirbsd*.
+ * tool/rbinstall.rb (default gems): Install executables into the fake
+ gem dir for Gem.bin_path. [#4485]
-Mon Feb 11 13:17:20 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Jul 22 11:20:20 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * configure.in (rubysitearchprefix): sitearchdir and vendorarchdir
- should use sitearch, not arch. [ruby-dev:46964] [Bug #7823]
+ * ext/openssl/ossl_digest.c: Check return value of EVP_DigestInit_ex.
+ * ext/openssl/ossl_hmac.c: Check return value of HMAC_Init_ex.
+ Thanks, Jared Jennings, for the patch.
+ [ Ruby 1.9 - Bug #4944 ] [ruby-core:37670]
- * win32/Makefile.sub (config.status): site and vendor directories
- should use sitearch, not arch. [ruby-dev:46964] [Bug #7823]
+Fri Jul 22 09:09:43 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-Mon Feb 11 12:31:25 2013 Tanaka Akira <akr@fsij.org>
+ * ext/openssl/ossl_engine.c: Avoid double free of ENGINE reference.
+ * test/openssl/test_engine.rb: Add a test for it.
+ Thanks to Ippei Obayashi for providing the patch.
+ [ Ruby 1.9 - Bug #5062 ] [ruby-dev:44173]
- * configure.in: move OS specific header/function knowledge before
- automatic header tests.
+Fri Jul 22 06:37:13 2011 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+
+ * lib/csv.rb: Do not modify CSV.generate's argument [ruby-core:38356]
+
+Thu Jul 21 20:59:59 2011 Tanaka Akira <akr@fsij.org>
+
+ * ext/socket/ancdata.c (discard_cmsg): workaround for MacOS X Lion.
+
+Thu Jul 21 20:02:11 2011 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * thread.c (set_trace_func, thread_set_trace_func_m): reset tracing
+ state when set_trace_func hook is removed. This is workaround patch
+ to force to reset tracing state that is broken by continuation call.
+ a patch from James M. Lawrence. [Feature #4347] [ruby-core:34998]
+
+ * test/ruby/test_continuation.rb (class TestContinuation): add a test
+ for above. a patch from James M. Lawrence.
+
+Thu Jul 21 19:27:19 2011 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * node.c (dump_node): add today's knowledge. "init arguments (m)" and
+ "init arguments (p)" of compile.c indicates a Ruby code that
+ evaluates multiple assignments that is in method or block
+ parameters: def foo((m1,m2), (m3,m4), *r, (p1,p2), (p3,p4)); end
+ The former (init arguments (m)) evaluates the multiple assignments
+ before rest argument, that are (m1,m2) and (m3,m4). The letter
+ (init arguments (p)) does ones after rest argument, that are
+ (p1,p2) and (p3, p4).
+
+Thu Jul 21 18:11:07 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * enum.c (enum_inject): remove empty line to notify rdoc
+ Enumerable#reduce is alias. patched by milki@github.
+ https://github.com/ruby/ruby/pull/26
+
+Thu Jul 21 17:30:21 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * array.c (rb_ary_delete_at_m): use simple array literal in rdoc.
+ patched by samuel tonini. [ruby-core:38310] [Bug #5066]
+
+Thu Jul 21 17:14:21 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/webrick/httprequest.rb (WEBrick::HTTPRequest#each):
+ Allow HTTP/0.9 request which doesn't has any header or body.
+ patched by Felix Jodoin. [ruby-core:38040] [Bug #5022]
+
+Wed Jul 20 23:02:18 2011 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+
+ * io.c (rb_update_max_fd): remove parentheses. they are not in
+ macro.
+
+Wed Jul 20 22:22:23 2011 Tanaka Akira <akr@fsij.org>
+
+ * include/ruby/intern.h (rb_update_max_fd): declaration moved from
+ internal.h.
+
+ * file.c: ditto.
+
+ * io.c: call rb_update_max_fd for each new fds.
+
+ * process.c: ditto.
+
+ * random.c: ditto.
-Mon Feb 11 11:04:29 2013 Tanaka Akira <akr@fsij.org>
+ * ruby.c: ditto.
- * configure.in: move the test for -march=i486 just after
- RUBY_UNIVERSAL_ARCH/RUBY_DEFAULT_ARCH.
+ * ext/io/console/console.c: ditto.
-Sun Feb 10 23:42:26 2013 Tanaka Akira <akr@fsij.org>
+ * ext/openssl/ossl_bio.c: ditto.
- * ext/socket/extconf.rb: test structure members just after types test.
+ * ext/pty/pty.c: ditto.
-Sun Feb 10 20:58:17 2013 Tanaka Akira <akr@fsij.org>
+ * ext/socket/init.c: ditto.
- * ext/socket/extconf.rb: test types just after headers test.
+ * ext/socket/socket.c: ditto.
-Sun Feb 10 16:00:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * ext/socket/ancdata.c: ditto.
- * 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
+ * ext/socket/unixsocket.c: ditto.
-Sun Feb 10 15:26:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Wed Jul 20 15:16:22 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * lib/rake/doc/*: Sync Rake rdoc files from upstream
+ * ext/dl/handle.c (dlhandle_sym): clear previous error with dlerror()
+ before calling dlsym(). [ruby-dev:44091] [Bug #5021]
-Sun Feb 10 15:50:02 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Wed Jul 20 07:16:26 2011 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
- * vm_exec.h (DISPATCH_ARCH_DEPEND_WAY): use __asm__ __volatile__
- instead of asm volatile.
+ * NEWS: mention Kernel#warn. [ruby-core:38119] [Feature #5029]
-Sun Feb 10 15:50:02 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+Tue Jul 19 16:40:45 2011 TAKANO Mitsuhiro (takano32) <tak@no32.tk>
- * gc.h (SET_MACHINE_STACK_END): use __volatile__ instead of volatile.
+ * cont.c (cont_save_thread): fix missing semicolon.
-Sun Feb 10 14:25:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Tue Jul 19 16:25:15 2011 Tanaka Akira <akr@fsij.org>
- * doc/rake/, lib/rake/doc/: Move Rake rdoc files to lib/rake
+ * io.c (UPDATE_MAXFD): removed.
-Sun Feb 10 12:10:25 2013 Tanaka Akira <akr@fsij.org>
+Tue Jul 19 16:07:45 2011 Tanaka Akira <akr@fsij.org>
- * ext/socket/extconf.rb: test headers at first.
+ * io.c (rb_update_max_fd): new function.
-Sun Feb 10 12:00:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * internal.h (rb_update_max_fd): declare rb_update_max_fd.
- * doc/rake/*: Removed stale Rake static files
+ * thread_pthread.c (rb_thread_create_timer_thread): update max fd when
+ timer thread pipe is created.
-Sun Feb 10 09:10:00 2013 Zachary Scott <zachary@zacharyscott.net>
+Mon Jul 18 13:36:47 2011 Aaron Patterson <aaron@tenderlovemaking.com>
- * lib/pp.rb, lib/prettyprint.rb: Documentation for PP and PrettyPrint
- Based on a patch by Vincent Batts [ruby-core:51253] [Bug #7656]
+ * ext/psych/lib/psych.rb: define a new BadAlias error class.
-Sat Feb 9 21:11:21 2013 Tanaka Akira <akr@fsij.org>
+ * ext/psych/lib/psych/visitors/to_ruby.rb: raise an exception when
+ deserializing an alias that does not exist.
- * 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.
+ * test/psych/test_merge_keys.rb: corresponding test.
-Sat Feb 9 17:45:58 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Jul 18 00:00:46 2011 Shugo Maeda <shugo@ruby-lang.org>
- * configure.in, version.c: prevent duplicated load paths by empty
- version string, it does not work right now.
+ * ext/curses/curses.c: added the new class Curses::Pad, which
+ supports scrolling. patch by Eric Hodel. [Feature #4896]
+ [ruby-core:37206]
-Sat Feb 9 17:38:41 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sun Jul 17 16:26:40 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * configure.in: fix arch parameters in help message. [Bug #7804]
+ * error.c (rb_check_trusted): new function to check an object is
+ trusted.
-Sat Feb 9 13:13:00 2013 Zachary Scott <zachary@zacharyscott.net>
+ * struct.c (rb_struct_modify), time.c (time_modify): check by the
+ above function to show proper class names. [Bug #5036]
- * vm_trace.c: Note about TracePoint events set, and comment on
- Kernel#set_trace_func to prefer new TracePoint API
+Sun Jul 17 15:30:04 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Feb 9 10:07:47 2013 Kazuki Tsujimoto <kazuki@callcc.net>
+ * error.c (rb_warn_m): accept multiple args in like puts. rdoc
+ patch by Erik Price at [ruby-core:38119]. [Feature #5029]
+
+Sun Jul 17 07:56:31 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
+
+ * test/openssl/test_ssl_session.rb: add PEM SSL session without TLS
+ extensions. Use this as the default for the tests to ensure
+ compatibility with OpenSSL 0.9.7.
+ [ Ruby 1.9 - Bug #4961 ] [ruby-core:37726]
+
+Sat Jul 16 17:29:20 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in (RUBY_UNIVERSAL_ARCH): restore arch flag.
+ Bug #4977
+
+Sat Jul 16 06:27:51 2011 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+
+ * lib/uri/common.rb (module): Remove optional parser argument to
+ Kernel#URI
+ [ruby-core:38061]
+
+ * lib/uri/generic.rb (module): ditto
+
+Sat Jul 16 03:19:45 2011 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * win32/win32.c (is_socket, is_console): add prototypes to fix compile
+ problem with gcc introduced at r32549.
+ reported by Jon Forums. [Bug #5030] [ruby-core:38079]
+
+Sat Jul 16 00:55:38 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * time.c (time_dup): used rb_obj_class() instead of CLASS_OF().
+ The patch is made by Kazuki Tsujimoto. [Bug #5012] [ruby-dev:44071]
+
+ * test/ruby/test_time.rb (TestTime#test_getlocal_dont_share_eigenclass):
+ added a new test for eigenclass of time object.
+
+Fri Jul 15 19:11:00 2011 Kenta Murata <mrkn@mrkn.jp>
+
+ * bignum.c (bigsub_int): add RB_GC_GUARD. This patch is made by
+ Makoto Kishimoto. fixes #4223 [ruby-dev:42907]
+
+ * bignum.c (bigadd_int): ditto.
+
+Fri Jul 15 14:27:53 2011 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * win32/win32.c, include/ruby/win32.h (rb_w32_io_cancelable_p): renamed
+ from rb_w32_has_cancel_io(). now it takes a parameter as fd to check
+ the fd is console or not, because we cannot cancel console input even
+ if we have cancel_io function.
+
+ * io.c (WAIT_FD_IN_WIN32): call above function instead of the old one,
+ so now we can kill the thread which calls STDIN.gets.
+ the problem was reported by ko1 via IRC.
+
+Fri Jul 15 09:10:41 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
+
+ * ext/digest/sha2/sha2.c (SHA256_Update, SHA512_Update): avoid Bus
+ Error caused by unalignment access on Sparc-Solaris (and possibly on
+ other similar environment.) This patch just do memcpy always instead
+ of checking architecture. I see no perf drop on my 64bit env. For
+ more details, see #4320.
+
+ * test/digest/test_digest.rb: add test for unalignment access.
+
+Fri Jul 15 01:51:25 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * regint.h (PLATFORM_UNALIGNED_WORD_ACCESS): Power PC does not
+ allow unaligned word access.
+
+ * st.c (UNALIGNED_WORD_ACCESS): x86_64 allows unaligned word
+ access as well as i386.
+
+Thu Jul 14 12:19:34 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
+
+ * ext/openssl/ossl.c (ossl_verify_cb): trap the exception from
+ verify callback of SSLContext and X509Store and make the
+ verification fail normally. Raising exception directly from callback
+ causes orphan resources in OpenSSL stack. Patched by Ippei Obayashi.
+ See #4445.
+
+ * test/openssl/test_ssl.rb
+ (test_exception_in_verify_callback_is_ignored): test it.
+
+Tue Jul 12 23:41:49 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * NEWS: add a description of Signal.trap change.
+
+Tue Jul 12 20:02:35 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * signal.c (reserved_signal_p): reverted a part of r32523.
+ chikanaga noticed trap(:CHLD) has some realworld usecase.
+ * test/ruby/test_signal.rb (TestSignal#test_reserved_signal):
+ ditto.
+
+Tue Jul 12 17:12:45 2011 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * vm_method.c (rb_add_method): should not call method_added hook
+ for undef operation. [Bug #5015]
+
+Tue Jul 12 16:58:44 2011 Shota Fukumori <sorah@tubusu.net>
+
+ * lib/test/unit.rb(Test::Unit::Options#process_args): Fix bug.
+ Fix process_args didn't return `@option` after r30939.
+
+Tue Jul 12 14:07:46 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * signal.c (install_sighandler): fixed a race.
+
+Tue Jul 12 13:49:32 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * signal.c (sig_trap): don't permit to change a signal handler which
+ the interpreter reserved.
+ * signal.c (reserved_signal_p): ditto.
+ [Bug #2616] [ruby-core:27625]
+
+ * test/ruby/test_signal.rb (TestSignal#test_reserved_signal):
+ added a test for reserved signal.
+
+Tue Jul 12 11:58:28 2011 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * win32/setup.mak: support x86-amd64 cross compile environment.
+
+Mon Jul 11 23:22:28 2011 Yutaka Kanemoto <kanemoto@ruby-lang.org>
+
+ * time.c: can't compile time.c on AIX due to missing declaration for
+ ffs(). It is declared in strings.h on AIX.
+
+Mon Jul 11 15:54:24 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * process.c: removed signal() macro. It's no longer used.
+
+Mon Jul 11 15:02:24 2011 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * numeric.c (rb_num2ull): use FIX2LONG instead of FIX2ULONG. see
+ rb_num2ulong(). fixed the problem of ObjectSpace._id2ref of IL32LLP64
+ platforms, introduced at r32433.
+
+Mon Jul 11 05:38:05 2011 Yutaka Kanemoto <kanemoto@ruby-lang.org>
+
+ * thread_pthread.c (get_stack): need to adjust stack addr for
+ [Bug #1813] on AIX.
+
+Mon Jul 11 01:16:27 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * thread_pthread.c (rb_thread_create_timer_thread): removed
+ rb_disable_interrupt()/rb_enable_interrupt().
+ * vm_core.h: ditto.
+ * process.c (static void before_exec): ditto.
+ * process.c (static void after_exec): ditto.
+ [Bug #4765] [ruby-dev:43571]
- * BSDL: update copyright notice for 2013.
+ * eval_intern.h: removed rb_trap_restore_mask().
+ * vm_eval.c (rb_throw_obj): ditto.
+ * eval.c (setup_exception): ditto.
-Sat Feb 9 09:24:38 2013 Eric Hodel <drbrain@segment7.net>
+ * signal.c: removed trap_last_mask.
+ * signal.c (trap_restore_mask): removed.
+ * signal.c (init_sigchld): comment clarification why signal block
+ is needed. and removed trap_last_mask operation.
+ * signal.c (trap_ensure): removed trap_last_mask operation.
- * lib/rubygems/package/old.rb: Fix behavior only on ruby 1.8.
+ * signal.c (rb_disable_interrupt, rb_enable_interrupt): made
+ static and removed sigdelset(SIGVTALRM) and sigdelset(SIGSEGV).
- * lib/rubygems/package.rb: Include checksums.yaml.gz signatures for
- verification.
- * test/rubygems/test_gem_package.rb: Test for the above.
+ * process.c (rb_syswait): removed implicit signal handler change.
-Sat Feb 9 01:23:24 2013 Tanaka Akira <akr@fsij.org>
+Sun Jul 10 23:49:12 2011 Yuki Sonoda (Yugui) <yugui@yugui.jp>
- * test/fiddle/helper.rb: specify libc and libm locations for MirOS BSD.
+ * docs/NEWS-1.9.3: moved from NEWS.
- * test/dl/test_base.rb: ditto.
+ * docs/ChangeLog-1.9.3: merged ChangeLog for 1.9.3.
-Fri Feb 8 23:25:33 2013 Tanaka Akira <akr@fsij.org>
+ * NEWS: NEWS for 1.9.4 that describes changes since 1.9.3
- * configure.in: change CFLAGS temporally to test
- ARCH_FLAG="-march=i486".
+ * ChangeLog: new ChangeLog for 1.9.4.
-Fri Feb 8 21:19:41 2013 Tanaka Akira <akr@fsij.org>
+Sun Jul 10 23:30:52 2011 Yuki Sonoda (Yugui) <yugui@yugui.jp>
- * configure.in: don't define ARCH_FLAG="-march=i486" if it causes
- compilation problem.
+ * version.h (RUBY_VERSION): ruby_1_9_3 branch was forked.
-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/Makefile.in b/Makefile.in
index d3313bea2e..e68976257b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -40,7 +40,6 @@ datadir = @datadir@
arch = @arch@
sitearch = @sitearch@
sitedir = @sitedir@
-archlibdir = @archlibdir@
ruby_version = @ruby_version@
TESTUI = console
@@ -53,7 +52,6 @@ arch_hdrdir = $(EXTOUT)/include/$(arch)
VPATH = $(arch_hdrdir)/ruby:$(hdrdir)/ruby:$(srcdir):$(srcdir)/enc:$(srcdir)/missing
empty =
-CC_VERSION = @CC_VERSION@
OUTFLAG = @OUTFLAG@$(empty)
COUTFLAG = @COUTFLAG@$(empty)
ARCH_FLAG = @ARCH_FLAG@
@@ -62,7 +60,6 @@ cflags = @cflags@
optflags = @optflags@
debugflags = @debugflags@
warnflags = @warnflags@ @strict_warnflags@
-cppflags = @cppflags@
INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir) -I$(srcdir)
XCFLAGS = @XCFLAGS@
CPPFLAGS = @CPPFLAGS@ $(INCFLAGS)
@@ -96,11 +93,8 @@ PROGRAM=$(RUBY_INSTALL_NAME)$(EXEEXT)
RUBY = $(RUBY_INSTALL_NAME)
MINIRUBY = @MINIRUBY@\
$(MINIRUBYOPT)
-# RUNRUBY_COMMAND:: runruby.rb or baseruby. do not append options directly
-RUNRUBY_COMMAND = @RUNRUBY_COMMAND@
-# RUNRUBY:: run ruby with RUN_OPTS which is passed to ruby
-RUNRUBY = @RUNRUBY@ $(RUN_OPTS)
-# RUNRUBY_DEBUGGER:: debugging option for runruby.rb
+RUNRUBY_COMMAND = @RUNRUBY@ $(RUNRUBYOPT)
+RUNRUBY = $(RUNRUBY_COMMAND) -- $(RUN_OPTS)
RUNRUBY_DEBUGGER = --debugger='gdb -x run.gdb --quiet --args'
XRUBY = @XRUBY@
BTESTRUBY = @BTESTRUBY@\
@@ -113,7 +107,7 @@ XRUBY_LIBDIR = @XRUBY_LIBDIR@
XRUBY_RUBYLIBDIR = @XRUBY_RUBYLIBDIR@
XRUBY_RUBYHDRDIR = @XRUBY_RUBYHDRDIR@
-DEFAULT_PRELUDES = $(GEM_PRELUDE)
+DEFAULT_PRELUDES = $(@USE_RUBYGEMS@_GEM_PRELUDE)
#### End of system configuration section. ####
@@ -184,8 +178,6 @@ OS_DEST_FILE = $@
MESSAGE_BEGIN = @for line in
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
configure_args = @configure_args@
#### End of variables
@@ -202,12 +194,12 @@ all:
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) $(MAINLIBS) $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(DMYEXT) $(DTRACE_OBJ) $(LIBS) $(OUTFLAG)$@
$(PROGRAM):
@$(RM) $@
$(ECHO) linking $@
- $(Q) $(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ) $(EXTOBJS) $(LIBRUBYARG) $(MAINLIBS) $(LIBS) $(EXTLIBS) $(OUTFLAG)$@
+ $(Q) $(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINLIBS) $(MAINOBJ) $(EXTOBJS) $(LIBRUBYARG) $(LIBS) $(EXTLIBS) $(OUTFLAG)$@
$(Q) $(POSTLINK)
# We must `rm' the library each time this rule is invoked because "updating" a
@@ -219,7 +211,7 @@ $(LIBRUBY_A):
$(Q) $(AR) $(ARFLAGS) $@ $(LIBRUBY_A_OBJS) $(DMYEXT)
@-$(RANLIB) $@ 2> /dev/null || true
$(ECHO) verifying static-library $@
- @$(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ) $(LIBRUBY_A) $(MAINLIBS) $(EXTLIBS) $(LIBS) $(OUTFLAG)conftest$(EXEEXT)
+ @$(PURIFY) $(CC) $(XLDFLAGS) $(MAINOBJ) $(LIBRUBY_A) $(MAINLIBS) $(EXTLIBS) $(LIBS) $(OUTFLAG)conftest$(EXEEXT) $(LDFLAGS)
@$(RM) conftest$(EXEEXT) conftest.c
$(LIBRUBY_SO):
@@ -228,7 +220,7 @@ $(LIBRUBY_SO):
$(Q) $(LDSHARED) $(DLDFLAGS) $(OBJS) $(DLDOBJS) $(DTRACE_OBJ) $(SOLIBS) $(EXTSOLIBS) $(OUTFLAG)$@
-$(Q) $(OBJCOPY) -w -L '$(SYMBOL_PREFIX)Init_*' -L '$(SYMBOL_PREFIX)*_threadptr_*' $@
$(Q) $(POSTLINK)
- @-$(MINIRUBY) -e 'ARGV.each{|link| File.delete link rescue nil; \
+ @-$(MINIRUBY) -e 'ARGV.each{|link| File.delete link if File.exist? link; \
File.symlink "$(LIBRUBY_SO)", link}' \
$(LIBRUBY_ALIASES) || true
$(arch)-fake.rb: config.status $(srcdir)/template/fake.rb.in
@@ -259,16 +251,14 @@ install-cross: $(arch)-fake.rb $(RBCONFIG) rbconfig.rb $(arch_hdrdir)/ruby/confi
Makefile: $(srcdir)/Makefile.in $(srcdir)/enc/Makefile.in
$(MKFILES): config.status
- @[ -f $@ ] && mv $@ $@.old
- MAKE=$(MAKE) $(SHELL) ./config.status $@
- @cmp $@ $@.old > /dev/null 2>&1 && echo $@ unchanged && exit 0; \
- { \
+ MAKE=$(MAKE) $(SHELL) ./config.status
+ @{ \
echo "all:; -@rm -f conftest.mk"; \
echo "conftest.mk: .force; @echo AUTO_REMAKE"; \
echo ".force:"; \
} > conftest.mk || exit 1; \
$(MAKE) -f conftest.mk | grep '^AUTO_REMAKE$$' >/dev/null 2>&1 || \
- { echo "$@ updated, restart."; exit 1; }
+ { echo "Makefile updated, restart."; exit 1; }
uncommon.mk: $(srcdir)/common.mk
sed 's/{\$$([^(){}]*)[^{}]*}//g' $< > $@
@@ -435,11 +425,6 @@ 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
-
update-mspec:
@$(CHDIR) $(srcdir); \
if [ -d spec/mspec ]; then \
@@ -473,8 +458,3 @@ $(INSNS): $(srcdir)/insns.def vm_opts.h \
$(srcdir)/tool/instruction.rb $(srcdir)/tool/insns2vm.rb
$(ECHO) generating $@
$(Q) $(BASERUBY) -Ku $(srcdir)/tool/insns2vm.rb $(INSNS2VMOPT) $@
-
-loadpath: verconf.h
- @$(CPP) $(XCFLAGS) $(CPPFLAGS) $(srcdir)/loadpath.c | \
- sed -e '1,/^const char ruby_initial_load_paths/d;/;/,$$d' \
- -e '/^ /!d;s/ *"\\0"$$//;s/" *"//g'
diff --git a/NEWS b/NEWS
index 59251a40cf..2b81356fd0 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,6 @@
# -*- rdoc -*-
-= NEWS for Ruby 2.1.0
+= NEWS for Ruby 2.0.0
This document is a list of user visible feature changes made between
releases except for bug fixes.
@@ -9,365 +9,446 @@ 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.
-== Changes since the 2.0.0 release
+== Changes since the 1.9.3 release
-=== Language changes
-
-* Now the default values of keyword arguments can be omitted. Those
- "required keyword arguments" need giving explicitly at the call time.
-
-* 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.
-
-* def-expr now returns the symbol of its name instead of nil.
-
-=== Core classes updates (outstanding ones only)
-
-* 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)
-
-* 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
-
-* 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
-
-* Kernel
- * New methods:
- * Kernel#singleton_method
-
-* 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.
-
-* 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
-
-* String
- * 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.
-
-* pack/unpack (Array/String)
- * Q! and q! directives for long long type if platform has the type.
-
-* 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.
-
-=== Core classes compatibility issues (excluding feature bug fixes)
-
-* 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.
-
-* IO
- * incompatible changes:
- * open ignore internal encoding if external encoding is ASCII-8BIT.
-
-* 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.
-
-* 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.
-
-* Module#ancestors
- * The ancestors of a singleton class now include singleton classes,
- in particular itself.
-
-* Module#define_method and Object#define_singleton_method
- * Now they return the symbols of the defined methods, not the methods/procs
- themselves.
-
-* Numeric#quo
- * Raises TypeError instead of ArgumentError if the receiver doesn't have
- to_r method.
+=== C API updates
+* NUM2SHORT() and NUM2USHORT() added. They are similar to NUM2INT, but short.
+* rb_newobj_of() and NEWOBJ_OF() added. They create a new object of a given class.
+
+=== Library updates (outstanding ones only)
+
+* builtin classes
+
+ * Array
+ * added method:
+ * added Array#bsearch for binary search.
+ * incompatible changes:
+ * random parameter of Array#shuffle! and Array#sample now
+ will be called with one argument, maximum value.
+ * when given Range arguments, Array#values_at now returns nil for each
+ value that is out-of-range.
+
+ * Enumerable
+ * added method:
+ * added Enumerable#lazy method for lazy enumeration.
+
+ * Enumerator
+ * added method:
+ * added Enumerator#size for lazy size evaluation.
+ * extended method:
+ * Enumerator.new accept an argument for lazy size evaluation.
+
+ * ENV
+ * aliased method:
+ * ENV.to_h is a new alias for ENV.to_hash
+
+ * Fiber
+ * incompatible changes:
+ * Fiber#resume cannot resume a fiber which invokes "Fiber#transfer".
+
+ * File
+ * extended method:
+ * File.fnmatch? now expands braces in the pattern if
+ File::FNM_EXTGLOB option is given.
+
+ * GC
+ * improvements:
+ * introduced the bitmap marking which suppresses to copy a memory page
+ with Copy-on-Write.
+ * introduced the non-recursive marking which avoids unexpected stack overflow.
+
+ * GC::Profiler
+ * added method:
+ * added GC::Profiler.raw_data which returns raw profile data for GC.
+
+ * Hash
+ * added method:
+ * added Hash#to_h as explicit conversion method, like Array#to_a.
+ * extended method:
+ * Hash#default_proc= can be passed nil to clear the default proc.
+
+ * IO
+ * deprecated methods:
+ * IO#lines, #bytes, #chars and #codepoints are deprecated.
+
+ * Kernel
+ * added method:
+ * added Kernel#Hash conversion method like Array() or Float().
+ * added Kernel#__dir__ which returns a current dirname.
+ * added Kernel#caller_locations which returns an array of
+ frame information objects.
+ * extended method:
+ * Kernel#warn accepts multiple args in like puts.
+ * Kernel#caller accepts second optional argument `n' which specify
+ required caller size.
+ * Kernel#to_enum and enum_for accept a block for lazy size evaluation.
+ * incompatible changes:
+ * system() and exec() closes non-standard file descriptors
+ (The default of :close_others option is changed to true by default.)
+ * respond_to? against a protected method now returns false unless
+ the second argument is true.
+ * __callee__ has returned to the original behavior, and now
+ returns the called name but not the original name in an
+ aliased method.
+ * Kernel#inspect does not call #to_s anymore
+ (it used to call redefined #to_s).
+
+ * LoadError
+ * added method:
+ * added LoadError#path method to return the file name that could not be
+ loaded.
+
+ * Module
+ * added method:
+ * added Module#prepend which is similar to Module#include,
+ however a method in the prepended module overrides the
+ corresponding method in the prepending module.
+ * added Module#refine, which extends a class or module locally.
+ [experimental]
+ * extended method:
+ * Module#define_method accepts a UnboundMethod from a Module.
+ * Module#const_get accepts a qualified constant string, e.g.
+ Object.const_get("Foo::Bar::Baz")
+
+ * Mutex
+ * added method:
+ * added Mutex#owned? which returns the mutex is held by current
+ thread or not. [experimental]
+ * incompatible changes:
+ * Mutex#lock, Mutex#unlock, Mutex#try_lock, Mutex#synchronize
+ and Mutex#sleep are no longer allowed to be used from trap handler
+ and raise a ThreadError in such case.
+ * Mutex#sleep may spurious wakeup. Check after wakeup.
+
+ * NilClass
+ * added method:
+ * added nil.to_h which returns {}
+
+ * Process
+ * added method:
+ * added getsid for getting session id (unix only).
+
+ * Range
+ * added method:
+ * added Range#size for lazy size evaluation.
+ * added Range#bsearch for binary search.
+
+ * RubyVM (MRI specific)
+ * added Environment variables to specify stack usage:
+ * RUBY_THREAD_VM_STACK_SIZE: vm stack size used at thread creation.
+ default: 128KB (32bit CPU) or 256KB (64bit CPU).
+ * RUBY_THREAD_MACHINE_STACK_SIZE: machine stack size used at thread
+ creation. default: 512KB or 1024KB.
+ * RUBY_FIBER_VM_STACK_SIZE: vm stack size used at fiber creation.
+ default: 64KB or 128KB.
+ * RUBY_FIBER_MACHINE_STACK_SIZE: machine stack size used at fiber
+ creation. default: 256KB or 256KB.
+ These variables are checked only at launched time.
+ * added constant DEFAULT_PARAMS to get above default parameters.
+
+ * Signal
+ * added method:
+ * added Signal.signame which returns signal name
+
+ * incompatible changes:
+ * Signal.trap raises ArgumentError when :SEGV, :BUS, :ILL, :FPE, :VTALRM
+ are specified.
+
+ * String
+ * added method:
+ * added String#b returning a copied string whose encoding is ASCII-8BIT.
+ * change return value:
+ * String#lines now returns an array instead of an enumerator.
+ * String#chars now returns an array instead of an enumerator.
+ * String#codepoints now returns an array instead of an enumerator.
+ * String#bytes now returns an array instead of an enumerator.
+
+ * Struct
+ * added method:
+ * added Struct#to_h returning values with keys corresponding to the
+ instance variable names.
+
+ * Thread
+ * added method:
+ * added Thread#thread_variable_get for getting thread local variables
+ (these are different than Fiber local variables).
+ * added Thread#thread_variable_set for setting thread local variables.
+ * added Thread#thread_variables for getting a list of the thread local
+ variable keys.
+ * added Thread#thread_variable? for testing to see if a particular thread
+ variable has been set.
+ * added Thread#backtrace_locations which returns similar information of
+ Kernel#caller_locations.
+ * incompatible changes:
+ * Thread#join and Thread#value now raises a ThreadError if target thread
+ is the current or main thread.
+
+ * Time
+ * change return value:
+ * Time#to_s returned encoding defaults to US-ASCII but automatically
+ transcodes to Encoding.default_internal if it is set.
+
+ * TracePoint
+ * new class. This class is replacement of set_trace_func.
+ Easy to use and efficient implementation.
+
+ * toplevel
+ * added method:
+ * added main.define_method which defines a global function.
+ * added main.using, which imports refinements into the current file or
+ eval string. [experimental]
+
+* cgi
+ * Add HTML5 tag maker.
+ * CGI#header has been renamed to CGI#http_header and
+ aliased to CGI#header.
+ * When HTML5 tagmaker called, overwrite CGI#header,
+ CGI#header function is to create a <header> element.
+
+* iconv
+ * Iconv has been removed. Use String#encode instead.
+
+* io/wait
+ * new features:
+ * added IO#wait_writable method.
+ * added IO#wait_readable method as alias of IO#wait.
+
+* net/http
+ * new features:
+ * Proxies are now automatically detected from the http_proxy environment
+ variable. See Net::HTTP::new for details.
+ * gzip and deflate compression are now requested for all requests by
+ default. See Net::HTTP for details.
+ * SSL sessions are now reused across connections for a single instance.
+ This speeds up connection by using a previously negotiated session.
+ * Requests may be created from a URI which sets the request_uri and host
+ header of the request (but does not change the host connected to).
+ * Responses contain the URI requested which allows easier implementation of
+ redirect following.
+ * new methods:
+ * Net::HTTP#local_host
+ * Net::HTTP#local_host=
+ * Net::HTTP#local_port
+ * Net::HTTP#local_port=
+ * extended method:
+ * Net::HTTP#connect uses local_host and local_port if specified.
+
+* net/imap
+ * new methods:
+ * Net::IMAP.default_port
+ * Net::IMAP.default_imap_port
+ * Net::IMAP.default_tls_port
+ * Net::IMAP.default_ssl_port
+ * Net::IMAP.default_imaps_port
-* 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.
+* objspace
+ * new method:
+ * ObjectSpace.reachable_objects_from(obj)
+
+* openssl
+ * Consistently raise an error when trying to encode nil values. All instances
+ of OpenSSL::ASN1::Primitive now raise TypeError when calling to_der on an
+ instance whose value is nil. All instances of OpenSSL::ASN1::Constructive
+ raise NoMethodError in the same case. Constructing such values is still
+ permitted.
+ * TLS 1.1 & 1.2 support by setting OpenSSL::SSL::SSLContext#ssl_version to
+ :TLSv1_2, :TLSv1_2_server, :TLSv1_2_client or :TLSv1_1, :TLSv1_1_server
+ :TLSv1_1_client. The version being effectively used can be queried
+ with OpenSSL::SSL#ssl_version. Furthermore, it is also possible to
+ blacklist the new TLS versions with OpenSSL::SSL:OP_NO_TLSv1_1 and
+ OpenSSL::SSL::OP_NO_TLSv1_2.
+ * Added OpenSSL::SSL::SSLContext#renegotiation_cb. A user-defined callback
+ may be set which gets called whenever a new handshake is negotiated. This
+ also allows to programmatically decline (client) renegotiation attempts.
+ * Support for "0/n" splitting of records as BEAST mitigation via
+ OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS.
+ * The default options for OpenSSL::SSL::SSLContext have changed to
+ OpenSSL::SSL::OP_ALL & ~OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS
+ instead of OpenSSL::SSL::OP_ALL only. This enables the countermeasure for
+ the BEAST attack by default.
+ * OpenSSL requires passwords for decrypting PEM-encoded files to be at least
+ four characters long. This led to awkward situations where an export with
+ a password with fewer than four characters was possible, but accessing the
+ file afterwards failed. OpenSSL::PKey::RSA, OpenSSL::PKey::DSA and
+ OpenSSL::PKey::EC therefore now enforce the same check when exporting a
+ private key to PEM with a password - it has to be at least four characters
+ long.
+ * SSL/TLS support for the Next Protocol Negotiation extension. Supported
+ with OpenSSL 1.0.1 and higher.
+ * OpenSSL::OPENSSL_FIPS allows client applications to detect whether OpenSSL
+ is FIPS-enabled. OpenSSL.fips_mode= allows turning on and off FIPS mode
+ manually in order to adapt to situations where FIPS mode would be an
+ explicit requirement.
+ * Authenticated Encryption with Associated Data (AEAD) is supported via
+ Cipher#auth_data= and Cipher#auth_tag/Cipher#auth_tag=.
+ Currently (OpenSSL 1.0.1c), only GCM mode is supported.
+
+* ostruct
+ * new methods:
+ * OpenStruct#[], []=
+ * OpenStruct#each_pair
+ * OpenStruct#eql?
+ * OpenStruct#hash
+ * OpenStruct#to_h converts the struct to a hash.
+ * extended method:
+ * OpenStruct.new also accepts an OpenStruct / Struct.
+
+* pathname
+ * extended method:
+ * Pathname#find returns an enumerator if no block is given.
-String
- * If invalid: :replace is specified for String#encode, replace
- invalid byte sequence even if the destination encoding equals to
- the source encoding.
+* rake
+ * rake has been updated to version 0.9.5.
-=== Stdlib updates (outstanding ones only)
+ This version is backwards-compatible with previous rake versions and
+ contains many bug fixes.
-* CGI::Util
- * All class methods modulized.
+ See
+ http://rake.rubyforge.org/doc/release_notes/rake-0_9_5_rdoc.html for a list
+ of changes in rake 0.9.3, 0.9.4 and 0.9.5.
-* Digest
- * extended methods:
- * Digest::Class.file takes optional arguments for its constructor
+* rdoc
+ * rdoc has been updated to version 4.0
-* Matrix
- * Added Vector#cross_product.
+ This version is largely backwards-compatible with previous rdoc versions.
+ The most notable change is an update to the ri data format (ri data must
+ be regenerated for gems shared across rdoc versions). Further API changes
+ are internal and won't affect most users.
-* Net::SMTP
- * Added Net::SMTP#rset to implement the RSET command
+ See https://github.com/rdoc/rdoc/blob/master/History.rdoc for a list of
+ changes in rdoc 4.0.
-* 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).
-
-* Pathname
- * New methods:
- * Pathname#write
- * Pathname#binwrite
+* resolv
+ * new methods:
+ * Resolv::DNS#timeouts=
+ * Resolv::DNS::Config#timeouts=
-* 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.
+* rexml
+ * REXML::Document#write supports Hash arguments.
+ * REXML::Document#write supports new :encoding option. It changes
+ XML document encoding. Without :encoding option, encoding in
+ XML declaration is used for XML document encoding.
- For a complete list of changes since rake 0.9.6 see:
+* RubyGems
+ * Updated to 2.0.0.preview2
+
+ RubyGems 2.0.0 features the following improvements:
+
+ * Improved support for default gems shipping with ruby 2.0.0+
+ * A gem can have arbitrary metadata through Gem::Specification#metadata
+ * `gem search` now defaults to --remote and is anchored like gem list.
+ * Added --document to replace --rdoc and --ri. Use --no-document to
+ disable documentation, --document=rdoc to only generate rdoc.
+ * Only ri-format documentation is generated by default.
+ * `gem server` uses RDoc::Servlet from RDoc 4.0 to generate HTML
+ documentation.
+
+ For an expanded list of updates and bug fixes see:
+ https://github.com/rubygems/rubygems/blob/master/History.txt
+
+* shellwords
+ * Shellwords#shellescape() now stringifies the given object using to_s.
+ * Shellwords#shelljoin() accepts non-string objects in the given
+ array, each of which is stringified using to_s.
+
+* stringio
+ * deprecated methods:
+ * StringIO#lines, #bytes, #chars and #codepoints are deprecated.
+
+* syslog
+ * Added Syslog::Logger which provides a Logger API atop Syslog.
+ * Syslog::Priority, Syslog::Level, Syslog::Option and Syslog::Macros
+ are introduced for easy detection of available constants on a
+ running system.
+
+* tmpdir
+ * incompatible changes:
+ * Dir.mktmpdir uses FileUtils.remove_entry instead of
+ FileUtils.remove_entry_secure. This means that applications should not
+ change the permission of the created temporary directory to make
+ accessible from other users.
+
+* yaml
+ * Syck has been removed. YAML now completely depends on libyaml being
+ installed.
+
+* zlib
+ * Added streaming support for Zlib::Inflate and Zlib::Deflate. This allows
+ processing of a stream without the use of large amounts of memory.
+ * Added support for the new deflate strategies Zlib::RLE and Zlib::FIXED.
+ * Zlib streams are now processed without the GVL. This allows gzip, zlib and
+ deflate streams to be processed in parallel.
+ * deprecated methods:
+ * Zlib::GzipReader#lines and #bytes are deprecated.
- http://rake.rubyforge.org/doc/release_notes/rake-10_1_0_rdoc.html
+=== Language changes
- http://rake.rubyforge.org/doc/release_notes/rake-10_0_3_rdoc.html
+ * Added %i and %I for symbol list creation (similar to %w and %W).
-* RbConfig
- * New constants:
- * RbConfig::SIZEOF is added to provide the size of C types.
+ * Default source encoding is changed to UTF-8. (was US-ASCII)
-* RDoc
- * Updated to 4.1.0. Major enhancements include a modified default template
- * and accessibility enhancements.
+=== Compatibility issues (excluding feature bug fixes)
- For a list of minor enhancements and bug fixes see:
- https://github.com/rdoc/rdoc/blob/v4.1.0.preview.1/History.rdoc
+ * Array#values_at
-* Resolv
- * New methods:
- * Resolv::DNS.fetch_resource
- * One-shot multicast DNS support
- * Support LOC resources
+ See above.
-* 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 backword
- compatibility.
+ * String#lines
+ * String#chars
+ * String#codepoints
+ * String#bytes
-* REXML::Parsers::StreamParser
- * Supports "entity" event.
+ These methods no longer return an Enumerator, although passing a
+ block is still supported for backwards compatibility.
-* REXML::Text
- * REXML::Text#<< supports method chain like 'text << "XXX" << "YYY"'.
- * REXML::Text#<< supports not "raw" mode.
+ Code like str.lines.with_index(1) { |line, lineno| ... } no longer
+ works because str.lines returns an array. Replace lines with
+ each_line in such cases.
-* Rinda::RingServer, Rinda::RingFinger
- * Rinda now supports multicast sockets. See Rinda::RingServer and
- Rinda::RingFinger for details.
+ * IO#lines
+ * IO#chars
+ * IO#codepoints
+ * IO#bytes
+ * ARGF#lines
+ * ARGF#chars
+ * ARGF#codepoints
+ * ARGF#bytes
+ * StringIO#lines
+ * StringIO#chars
+ * StringIO#codepoints
+ * StringIO#bytes
+ * Zlib::GzipReader#lines
+ * Zlib::GzipReader#bytes
-* RubyGems
- * Updated to 2.2.0. Notable new features include:
-
- * 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
-
- For a complete list of enhancements and bug fixes see:
- https://github.com/rubygems/rubygems/tree/master/History.txt
-
-* Set
- * New methods:
- * Set#intersect?
- * Set#disjoint?
-
-* 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.
-
-=== Stdlib compatibility issues (excluding feature bug fixes)
-
-* Set
- * incompatible changes:
- * Set#to_set now returns self instead of generating a copy.
+ These methods are deprecated in favor of each_line, each_byte,
+ each_char and each_codepoint.
-* 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.
+ * Signal.trap
-* curses
- * Removed.
- curses is now available as a gem.
- See https://rubygems.org/gems/curses for details.
+ See above.
-=== Built-in global variables compatibility issues
+ * Merge Onigmo.
+ https://github.com/k-takata/Onigmo
-* $SAFE
- * $SAFE=4 is obsolete. If $SAFE is set to 4 or larger, an ArgumentError
- is raised.
+ * The :close_others option is true by default for system() and exec().
+ Also, the close-on-exec flag is set by default for all new file descriptors.
+ This means file descriptors doesn't inherit to spawned process unless
+ explicitly requested such as system(..., fd=>fd).
-=== C API updates
+ * Kernel#respond_to? against a protected method now returns false
+ unless the second argument is true.
-* rb_gc_set_params() is deprecated. This is only used in Ruby internal.
+ * Dir.mktmpdir in lib/tmpdir.rb
-* rb_gc_count() added. This returns the number of times GC occurred.
+ See above.
-* rb_gc_stat() added. This allows access to specific GC.stat() values from C
- without any allocation overhead.
+ * OpenStruct new methods can conflict with custom attributes named
+ "each_pair", "eql?", "hash" or "to_h".
-* rb_gc_latest_gc_info() added. This allows access to GC.latest_gc_info().
+ * Thread#join, Thread#value
-* 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.
+ See above.
-* rb_profile_frames() added. Provides low-cost access to the current ruby stack
- for callstack profiling.
+ * Mutex#lock, Mutex#unlock, Mutex#try_lock, Mutex#synchronize and Mutex#sleep
-* 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.
+ See above.
diff --git a/README b/README
index 3ffe3553a8..2de785d86e 100644
--- a/README
+++ b/README
@@ -23,11 +23,6 @@ Perl). It is simple, straight-forward, and extensible.
== 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/
@@ -37,7 +32,7 @@ following command:
$ svn co http://svn.ruby-lang.org/repos/ruby/trunk/ ruby
-Or if you are using git then use the following command:
+Or if you are using git then use following command:
$ git clone git://github.com/ruby/ruby.git
@@ -46,7 +41,7 @@ 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:
+Or if you are using git then use following command:
$ git ls-remote git://github.com/ruby/ruby.git
@@ -137,29 +132,21 @@ This is what you need to do to compile and 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.
+Feel free to send comments and bug reports to the author. Here is the
+author's latest mail address:
<mailto:matz@ruby-lang.org>
+-------------------------------------------------------
+created at: Thu Aug 3 11:57:36 JST 1995
--
Local variables:
mode: rdoc
diff --git a/README.EXT b/README.EXT
index b1a816c271..ba74e5c8d2 100644
--- a/README.EXT
+++ b/README.EXT
@@ -125,15 +125,12 @@ 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).
+instance, RARRAY(obj). See "ruby.h".
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)'.
+allocated region can be accessed by `RSTRING_PTR(str)'. For arrays,
+use `RARRAY_LEN(ary)' and `RARRAY_PTR(ary)' respectively.
Notice: Do not change the value of the structure directly, unless you
are responsible for the result. This ends up being the cause of
@@ -199,10 +196,6 @@ 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.
@@ -221,7 +214,6 @@ rb_str_vcatf(VALUE str, const char* format, va_list ap) ::
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.
@@ -254,18 +246,15 @@ 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.
@@ -279,16 +268,12 @@ types are given.
rb_ary_aref(argc, VALUE *argv, VALUE ary) ::
- Equivalent to Array#[].
+ Equivaelent 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]
@@ -771,7 +756,7 @@ various conditions.
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
+ find_executable(bin[, path]): find excutable file path
create_header(header): generate configured header
create_makefile(target[, target_prefix]): generate Makefile
@@ -864,7 +849,7 @@ lex.c :: automatically generated from keywords
eval_safe.c
insns.def : definition of VM instructions
iseq.c : implementation of VM::ISeq
- thread.c : thread management and context switching
+ thread.c : thread management and context swiching
thread_win32.c : thread implementation
thread_pthread.c : ditto
vm.c
@@ -893,7 +878,7 @@ lex.c :: automatically generated from keywords
== Utility Functions
-debug.c :: debug symbols for C debugger
+debug.c :: debug symbols for C debuggger
dln.c :: dynamic loading
st.c :: general purpose hash table
strftime.c :: formatting times
@@ -1068,10 +1053,6 @@ 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
@@ -1254,18 +1235,10 @@ rb_scan_args(int argc, VALUE *argv, const char *fmt, ...) ::
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.
+ Invokes a method, passing arguments by an array of values.
VALUE rb_eval_string(const char *str) ::
@@ -1335,12 +1308,12 @@ 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.
+ rb_ensure() is that of func1 when no exception occured.
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.
+ occured 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
@@ -1393,10 +1366,6 @@ void rb_bug(const char *fmt, ...) ::
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):
@@ -1488,109 +1457,6 @@ 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
diff --git a/README.EXT.ja b/README.EXT.ja
index b4b59008e0..7b008b952e 100644
--- a/README.EXT.ja
+++ b/README.EXT.ja
@@ -140,15 +140,13 @@ var 㯠lvalue ã§ã‚ã‚‹å¿…è¦ãŒã‚りã¾ã™ï¼Ž
ã‚ã‚‹ã®ã¯æ–‡å­—列ã¨é…列ãらã„ã ã¨æ€ã„ã¾ã™ï¼Ž
ruby.hã§ã¯æ§‹é€ ä½“ã¸ã‚­ãƒ£ã‚¹ãƒˆã™ã‚‹ãƒžã‚¯ãƒ­ã‚‚「RXXXXX()ã€(全部大文
-å­—ã«ã—ãŸã‚‚ã®)ã¨ã„ã†åå‰ã§æä¾›ã•れã¦ã„ã¾ã™(例: RSTRING()).ãŸ
-ã ã—ã€æ§‹é€ ä½“ã¸ã®ç›´æŽ¥ã®ã‚¢ã‚¯ã‚»ã‚¹ã¯ã§ãã‚‹ã ã‘é¿ã‘,対応ã™ã‚‹
-rb_xxxx() ã¨ã„ã£ãŸé–¢æ•°ã‚’使ã†ã‚ˆã†ã«ã—ã¦ä¸‹ã•ã„.例ãˆã°ï¼Œé…列ã®
-è¦ç´ ã¸ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹å ´åˆã¯ï¼Œrb_ary_entry(ary, offset),
-rb_ary_store(ary, offset, obj) を利用ã™ã‚‹ã‚ˆã†ã«ã—ã¦ä¸‹ã•ã„.
+å­—ã«ã—ãŸã‚‚ã®)ã¨ã„ã†åå‰ã§æä¾›ã•れã¦ã„ã¾ã™(例: RSTRING()).
構造体ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’å–り出ã™ãƒžã‚¯ãƒ­ãŒæä¾›ã•れã¦ã„ã¾ã™ï¼Žæ–‡å­—列
strã®é•·ã•ã‚’å¾—ã‚‹ãŸã‚ã«ã¯ã€ŒRSTRING_LEN(str)ã€ã¨ã—,文字列strã‚’
-char*ã¨ã—ã¦å¾—ã‚‹ãŸã‚ã«ã¯ã€ŒRSTRING_PTR(str)ã€ã¨ã—ã¾ã™ï¼Ž
+char*ã¨ã—ã¦å¾—ã‚‹ãŸã‚ã«ã¯ã€ŒRSTRING_PTR(str)ã€ã¨ã—ã¾ã™ï¼Žé…列ã®
+å ´åˆã«ã¯ï¼Œãれãžã‚Œã€ŒRARRAY_LEN(ary)ã€ï¼Œã€ŒRARRAY_PTR(ary)ã€ã¨
+ãªã‚Šã¾ã™ï¼Ž
Rubyã®æ§‹é€ ä½“を直接アクセスã™ã‚‹æ™‚ã«æ°—ã‚’ã¤ã‘ãªã‘れã°ãªã‚‰ãªã„ã“
ã¨ã¯ï¼Œé…åˆ—ã‚„æ–‡å­—åˆ—ã®æ§‹é€ ä½“ã®ä¸­èº«ã¯å‚ç…§ã™ã‚‹ã ã‘ã§ï¼Œç›´æŽ¥å¤‰æ›´ã—
@@ -195,7 +193,7 @@ INT2NUM()ã¯æ•´æ•°ãŒFIXNUMã®ç¯„囲ã«åŽã¾ã‚‰ãªã„å ´åˆï¼ŒBignumã«å¤‰æ›
RubyãŒç”¨æ„ã—ã¦ã„る関数を用ã„ã¦ãã ã•ã„.
ã“ã“ã§ã¯ã‚‚ã£ã¨ã‚‚使ã‚れるã§ã‚ã‚ã†æ–‡å­—列ã¨é…列ã®ç”Ÿæˆ/æ“作を行
-ã†é–¢æ•°ã‚’ã‚ã’ã¾ã™(全部ã§ã¯ãªã„ã§ã™).
+ã„関数をã‚ã’ã¾ã™(全部ã§ã¯ãªã„ã§ã™).
=== 文字列ã«å¯¾ã™ã‚‹é–¢æ•°
@@ -226,9 +224,6 @@ 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を追加ã™ã‚‹ï¼Ž
@@ -247,7 +242,6 @@ rb_str_vcatf(VALUE str, const char* format, va_list ap)
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ã®æ–‡å­—列を生æˆã™ã‚‹.
@@ -280,18 +274,15 @@ 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è¦ç´ ã®é…列を生æˆã™ã‚‹ï¼Ž
@@ -312,10 +303,6 @@ 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]
@@ -534,7 +521,6 @@ Cã‹ã‚‰æ–‡å­—列を経由ã›ãšã«Rubyã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’呼ã³å‡ºã™ãŸã‚ã«ã¯
ã—ã¾ã™ï¼Žãã®ä»–ã«å¼•æ•°ã®æŒ‡å®šã®ä»•æ–¹ãŒé•ã†ä»¥ä¸‹ã®é–¢æ•°ã‚‚ã‚りã¾ã™ï¼Ž
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ã®é…列を与ãˆã¾ã™ï¼Ž
@@ -642,9 +628,10 @@ Dataオブジェクトを生æˆã—ã¦æ§‹é€ ä½“ã‚’Rubyオブジェクトã«ã‚«ãƒ—
ã“ã®ãƒžã‚¯ãƒ­ã®æˆ»ã‚Šå€¤ã¯ç”Ÿæˆã•れãŸDataオブジェクトã§ã™ï¼Ž
-klassã¯ã“ã®Dataオブジェクトã®ã‚¯ãƒ©ã‚¹ã§ã™ï¼Žmarkã¯ã“ã®æ§‹é€ ä½“ãŒ
-Rubyã®ã‚ªãƒ–ジェクトã¸ã®å‚ç…§ãŒã‚る時ã«ä½¿ã†é–¢æ•°ã§ã™ï¼Žãã®ã‚ˆã†ãª
-å‚ç…§ã‚’å«ã¾ãªã„時ã«ã¯0を指定ã—ã¾ã™ï¼Ž
+klassã¯ã“ã®Dataオブジェクトã®ã‚¯ãƒ©ã‚¹ã§ã™ï¼Žptrã¯ã‚«ãƒ—セル化ã™ã‚‹
+Cã®æ§‹é€ ä½“ã¸ã®ãƒã‚¤ãƒ³ã‚¿ã§ã™ï¼Žmarkã¯ã“ã®æ§‹é€ ä½“ãŒRubyã®ã‚ªãƒ–ジェ
+クトã¸ã®å‚ç…§ãŒã‚る時ã«ä½¿ã†é–¢æ•°ã§ã™ï¼Žãã®ã‚ˆã†ãªå‚ç…§ã‚’å«ã¾ãªã„
+時ã«ã¯0を指定ã—ã¾ã™ï¼Ž
# ãã®ã‚ˆã†ãªå‚ç…§ã¯å‹§ã‚られã¾ã›ã‚“.
@@ -662,10 +649,7 @@ Cã®æ§‹é€ ä½“ã®å‰²å½“ã¨Dataオブジェクトã®ç”Ÿæˆã‚’åŒæ™‚ã«è¡Œã†ãƒžã‚¯
Data_Make_Struct(klass, type, mark, free, sval)
-ã“ã®ãƒžã‚¯ãƒ­ã®æˆ»ã‚Šå€¤ã¯ç”Ÿæˆã•れãŸDataオブジェクトã§ã™ï¼Žã“ã®ãƒžã‚¯
-ロã¯ä»¥ä¸‹ã®å¼ã®ã‚ˆã†ã«åƒãã¾ã™:
-
- (sval = ALLOC(type), Data_Wrap_Struct(klass, mark, free, sval))
+ã“ã®ãƒžã‚¯ãƒ­ã®æˆ»ã‚Šå€¤ã¯ç”Ÿæˆã•れãŸDataオブジェクトã§ã™ï¼Ž
klass, mark, freeã¯Data_Wrap_Structã¨åŒã˜åƒãã‚’ã—ã¾ã™ï¼Žtype
ã¯å‰²ã‚Šå½“ã¦ã‚‹C構造体ã®åž‹ã§ã™ï¼Žå‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸæ§‹é€ ä½“ã¯å¤‰æ•°sval
@@ -728,17 +712,17 @@ Rubyã¯æ‹¡å¼µãƒ©ã‚¤ãƒ–ラリをロードã™ã‚‹æ™‚ã«ã€ŒInit_ライブラリåã€
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");
}
@@ -752,8 +736,8 @@ dbm.cã§ã¯Data_Make_Structを以下ã®ã‚ˆã†ã«ä½¿ã£ã¦ã„ã¾ã™ï¼Ž
int di_size;
DBM *di_dbm;
};
-
-
+
+
obj = Data_Make_Struct(klass, struct dbmdata, 0, free_dbm, dbmp);
ã“ã“ã§ã¯dbmstruct構造体ã¸ã®ãƒã‚¤ãƒ³ã‚¿ã‚’Dataã«ã‚«ãƒ—セル化ã—ã¦ã„
@@ -1115,7 +1099,6 @@ Data_Get_Struct(data, type, sval) ::
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)
@@ -1267,18 +1250,10 @@ 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)
@@ -1330,7 +1305,7 @@ VALUE rb_block_call(VALUE obj, ID mid, int argc, VALUE * argv, VALUE (*func) (AN
func2をブロックã¨ã—ã¦è¨­å®šã—, func1をイテレータã¨ã—ã¦å‘¼ã¶ï¼Ž
func1ã«ã¯ arg1ãŒå¼•æ•°ã¨ã—ã¦æ¸¡ã•れ, func2ã«ã¯ç¬¬1引数ã«ã‚¤ãƒ†ãƒ¬ãƒ¼
ã‚¿ã‹ã‚‰ä¸Žãˆã‚‰ã‚ŒãŸå€¤, 第2引数ã«arg2ãŒæ¸¡ã•れる.
-
+
1.9ã§rb_iterateを使ã†å ´åˆã¯, func1ã®ä¸­ã§Rubyレベルã®ãƒ¡ã‚½ãƒƒãƒ‰
を呼ã³å‡ºã•ãªã‘れã°ãªã‚‰ãªã„.
1.9ã§obsoleteã¨ãªã£ãŸ. 代ã‚りã«rb_block_callãŒç”¨æ„ã•れãŸ.
@@ -1404,9 +1379,6 @@ void rb_bug(const char *fmt, ...) ::
状æ³ã®æ™‚呼ã¶ï¼Žã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リタã¯ã‚³ã‚¢ãƒ€ãƒ³ãƒ—ã—ç›´ã¡ã«çµ‚了ã™ã‚‹ï¼Ž
例外処ç†ã¯ä¸€åˆ‡è¡Œãªã‚れãªã„.
-注æ„: %iã¯Object#to_s('+'ãƒ•ãƒ©ã‚°ãŒæŒ‡å®šã•れã¦ã„ã‚‹ã¨ãã¯Object#inspect)ã‚’
-使ã£ãŸVALUEã®å‡ºåŠ›ã«ä½¿ç”¨ã•れã¦ã„ã‚‹ãŸã‚,整数ã«ã¯%dを使用ã™ã‚‹ã“ã¨ï¼Ž
-
== Rubyã®åˆæœŸåŒ–・実行
Rubyをアプリケーションã«åŸ‹ã‚込む場åˆã«ã¯ä»¥ä¸‹ã®ã‚¤ãƒ³ã‚¿ãƒ•ェース
@@ -1515,62 +1487,53 @@ have_macro(macro, headers) ::
have_library(lib, func) ::
関数funcを定義ã—ã¦ã„るライブラリlibã®å­˜åœ¨ã‚’ãƒã‚§ãƒƒã‚¯ã™ã‚‹ï¼Ž
- ãƒã‚§ãƒƒã‚¯ã«æˆåŠŸã™ã‚‹ã¨ï¼Œ-llibã‚’$libsã«è¿½åŠ ã—,trueã‚’è¿”ã™ï¼Ž
+ ライブラリãŒå­˜åœ¨ã™ã‚‹æ™‚,trueã‚’è¿”ã™ï¼Ž
find_library(lib, func, path...) ::
関数funcを定義ã—ã¦ã„るライブラリlibã®å­˜åœ¨ã‚’ -Lpath を追加
- ã—ãªãŒã‚‰ãƒã‚§ãƒƒã‚¯ã™ã‚‹ï¼Žãƒã‚§ãƒƒã‚¯ã«æˆåŠŸã™ã‚‹ã¨ï¼Œ-llibã‚’$libsã«
- 追加ã—,trueã‚’è¿”ã™ï¼Ž
+ ã—ãªãŒã‚‰ãƒã‚§ãƒƒã‚¯ã™ã‚‹ï¼Žãƒ©ã‚¤ãƒ–ラリãŒè¦‹ä»˜ã‹ã£ãŸæ™‚,trueã‚’è¿”ã™ï¼Ž
have_func(func, header) ::
ヘッダファイルheaderをインクルードã—ã¦é–¢æ•°funcã®å­˜åœ¨ã‚’ãƒã‚§
ックã™ã‚‹ï¼ŽfuncãŒæ¨™æº–ã§ã¯ãƒªãƒ³ã‚¯ã•れãªã„ライブラリ内ã®ã‚‚ã®ã§
ã‚る時ã«ã¯å…ˆã«have_libraryã§ãã®ãƒ©ã‚¤ãƒ–ラリをãƒã‚§ãƒƒã‚¯ã—ã¦ãŠ
- ã事.ãƒã‚§ãƒƒã‚¯ã«æˆåŠŸã™ã‚‹ã¨ï¼Œãƒ—リプロセッサマクロ
- `HAVE_{FUNC}` を定義ã—,trueã‚’è¿”ã™ï¼Ž
+ ã事.関数ãŒå­˜åœ¨ã™ã‚‹æ™‚trueã‚’è¿”ã™ï¼Ž
have_var(var, header) ::
ヘッダファイルheaderをインクルードã—ã¦å¤‰æ•°varã®å­˜åœ¨ã‚’ãƒã‚§ãƒƒ
クã™ã‚‹ï¼ŽvarãŒæ¨™æº–ã§ã¯ãƒªãƒ³ã‚¯ã•れãªã„ライブラリ内ã®ã‚‚ã®ã§ã‚
る時ã«ã¯å…ˆã«have_libraryã§ãã®ãƒ©ã‚¤ãƒ–ラリをãƒã‚§ãƒƒã‚¯ã—ã¦ãŠã
- 事.ãƒã‚§ãƒƒã‚¯ã«æˆåŠŸã™ã‚‹ã¨ï¼Œãƒ—リプロセッサマクロ
- `HAVE_{VAR}` を定義ã—,trueã‚’è¿”ã™ï¼Ž
+ 事.変数ãŒå­˜åœ¨ã™ã‚‹æ™‚trueã‚’è¿”ã™ï¼Ž
have_header(header) ::
- ヘッダファイルã®å­˜åœ¨ã‚’ãƒã‚§ãƒƒã‚¯ã™ã‚‹ï¼Žãƒã‚§ãƒƒã‚¯ã«æˆåŠŸã™ã‚‹ã¨ï¼Œ
- プリプロセッサマクロ `HAVE_{HEADER_H}` を定義ã—,trueã‚’è¿”ã™ï¼Ž
- (スラッシュやドットã¯ã‚¢ãƒ³ãƒ€ãƒ¼ã‚¹ã‚³ã‚¢ã«ç½®æ›ã•れる)
+ ヘッダファイルã®å­˜åœ¨ã‚’ãƒã‚§ãƒƒã‚¯ã™ã‚‹ï¼Žãƒ˜ãƒƒãƒ€ãƒ•ァイルãŒå­˜åœ¨ã™
+ る時trueã‚’è¿”ã™ï¼Ž
find_header(header, path...) ::
ヘッダファイルheaderã®å­˜åœ¨ã‚’ -Ipath を追加ã—ãªãŒã‚‰ãƒã‚§ãƒƒã‚¯
- ã™ã‚‹ï¼Žãƒã‚§ãƒƒã‚¯ã«æˆåŠŸã™ã‚‹ã¨ï¼Œãƒ—リプロセッサマクロ
- `HAVE_{HEADER_H}` を定義ã—,trueã‚’è¿”ã™ï¼Ž
- (スラッシュやドットã¯ã‚¢ãƒ³ãƒ€ãƒ¼ã‚¹ã‚³ã‚¢ã«ç½®æ›ã•れる)
+ ã™ã‚‹ï¼Žãƒ˜ãƒƒãƒ€ãƒ•ァイルãŒè¦‹ä»˜ã‹ã£ãŸæ™‚,trueã‚’è¿”ã™ï¼Ž
have_struct_member(type, member[, header[, opt]]) ::
- ヘッダファイルheaderをインクルードã—ã¦åž‹typeãŒå®šç¾©ã•れ,
- ãªãŠã‹ã¤ãƒ¡ãƒ³ãƒmemberãŒå­˜åœ¨ã™ã‚‹ã‹ã‚’ãƒã‚§ãƒƒã‚¯ã™ã‚‹ï¼Žãƒã‚§ãƒƒã‚¯ã«
- æˆåŠŸã™ã‚‹ã¨ï¼Œãƒ—リプロセッサマクロ `HAVE_{TYPE}_{MEMBER}` ã‚’
- 定義ã—,trueã‚’è¿”ã™ï¼Ž
+ ヘッダファイルheaderをインクルードã—ã¦åž‹typeã«ãƒ¡ãƒ³ãƒmember
+ ãŒå­˜åœ¨ã™ã‚‹ã‹ã‚’ãƒã‚§ãƒƒã‚¯ã™ã‚‹ï¼ŽtypeãŒå®šç¾©ã•れã¦ã„ã¦ï¼Œmemberã‚’
+ æŒã¤ã™ã‚‹æ™‚trueã‚’è¿”ã™ï¼Ž
have_type(type, header, opt) ::
ヘッダファイルheaderをインクルードã—ã¦åž‹typeãŒå­˜åœ¨ã™ã‚‹ã‹ã‚’
- ãƒã‚§ãƒƒã‚¯ã™ã‚‹ï¼Žãƒã‚§ãƒƒã‚¯ã«æˆåŠŸã™ã‚‹ã¨ï¼Œãƒ—リプロセッサマクロ
- `HAVE_TYPE_{TYPE}` を定義ã—,trueã‚’è¿”ã™ï¼Ž
+ ãƒã‚§ãƒƒã‚¯ã™ã‚‹ï¼ŽtypeãŒå®šç¾©ã•れã¦ã„る時trueã‚’è¿”ã™ï¼Ž
check_sizeof(type, header) ::
ヘッダファイルheaderをインクルードã—ã¦åž‹typeã®charå˜ä½ã‚µã‚¤
- ズを調ã¹ã‚‹ï¼Žãƒã‚§ãƒƒã‚¯ã«æˆåŠŸã™ã‚‹ã¨ï¼Œãƒ—リプロセッサマクロ
- `SIZEOF_{TYPE}` を定義ã—,ãã®ã‚µã‚¤ã‚ºã‚’è¿”ã™ï¼Žå®šç¾©ã•れã¦ã„ãª
- ã„ã¨ãã¯nilã‚’è¿”ã™ï¼Ž
+ ズを調ã¹ã‚‹ï¼ŽtypeãŒå®šç¾©ã•れã¦ã„る時ãã®ã‚µã‚¤ã‚ºã‚’è¿”ã™ï¼Žå®šç¾©ã•
+ れã¦ã„ãªã„ã¨ãã¯nilã‚’è¿”ã™ï¼Ž
create_makefile(target[, target_prefix]) ::
@@ -1611,37 +1574,11 @@ dir_config(target[, default_include, default_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 関数を利用ã™ã‚‹ã‚ˆã†ã«ã—ã¦ä¸‹ã•ã„。
+pkg_config(pkg) ::
-ãã®ã»ã‹ã€å¯¾å¿œã«ã¤ã„ã¦ã®è©³ç´°ã¯ README.ext ã®ã€ŒAppendix D. Generational
-GCã€ã‚’å‚ç…§ã—ã¦ä¸‹ã•ã„。
+ pkg-configコマンドã‹ã‚‰ãƒ‘ッケージpkgã®æƒ…報を得る.
+ pkg-configã®å®Ÿéš›ã®ã‚³ãƒžãƒ³ãƒ‰åã¯ï¼Œ--with-pkg-configコマンド
+ ãƒ©ã‚¤ãƒ³ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã§æŒ‡å®šå¯èƒ½ï¼Ž
/*
* Local variables:
diff --git a/README.ja b/README.ja
index 9ab2f3ca0e..03c007af7c 100644
--- a/README.ja
+++ b/README.ja
@@ -183,7 +183,7 @@ UNIXã§ã‚れ㰠+configure+ ãŒã»ã¨ã‚“ã©ã®å·®ç•°ã‚’å¸åŽã—ã¦ãれるã¯
== 著者
-コメント,ãƒã‚°ãƒ¬ãƒãƒ¼ãƒˆãã®ä»–㯠mailto:matz@ruby-lang.org ã¾ã§ï¼Ž
+コメント,ãƒã‚°ãƒ¬ãƒãƒ¼ãƒˆãã®ä»–㯠mailto:matz@ruby-lang.jp ã¾ã§ï¼Ž
-------------------------------------------------------
created at: Thu Aug 3 11:57:36 JST 1995
--
diff --git a/addr2line.c b/addr2line.c
index f936694724..04a48e751d 100644
--- a/addr2line.c
+++ b/addr2line.c
@@ -9,7 +9,6 @@
**********************************************************************/
#include "ruby/config.h"
-#include "ruby/missing.h"
#include "addr2line.h"
#include <stdio.h>
@@ -17,6 +16,11 @@
#ifdef USE_ELF
+#ifdef __OpenBSD__
+#include <elf_abi.h>
+#else
+#include <elf.h>
+#endif
#include <fcntl.h>
#include <limits.h>
#include <stdio.h>
@@ -28,12 +32,6 @@
#include <sys/stat.h>
#include <unistd.h>
-#ifdef __OpenBSD__
-#include <elf_abi.h>
-#else
-#include <elf.h>
-#endif
-
/* Make alloca work the best possible way. */
#ifdef __GNUC__
# ifndef atarist
@@ -92,8 +90,6 @@ void *alloca();
#define PATH_MAX 4096
#endif
-int kprintf(const char *fmt, ...);
-
typedef struct {
const char *dirname;
const char *filename;
@@ -157,7 +153,7 @@ get_nth_dirname(unsigned long dir, char *p)
while (*p) p++;
p++;
if (!*p) {
- kprintf("Unexpected directory number %lu in %s\n",
+ fprintf(stderr, "Unexpected directory number %lu in %s\n",
dir, binary_filename);
return "";
}
@@ -177,7 +173,7 @@ fill_filename(int file, char *include_directories, char *filenames,
filename = p;
if (!*p) {
/* Need to output binary file name? */
- kprintf("Unexpected file number %d in %s\n",
+ fprintf(stderr, "Unexpected file number %d in %s\n",
file, binary_filename);
return;
}
@@ -379,7 +375,7 @@ parse_debug_line_cu(int num_traces, void **traces,
p += sizeof(unsigned long);
break;
case DW_LNE_define_file:
- kprintf("Unsupported operation in %s\n",
+ fprintf(stderr, "Unsupported operation in %s\n",
binary_filename);
break;
case DW_LNE_set_discriminator:
@@ -387,7 +383,7 @@ parse_debug_line_cu(int num_traces, void **traces,
uleb128(&p);
break;
default:
- kprintf("Unknown extended opcode: %d in %s\n",
+ fprintf(stderr, "Unknown extended opcode: %d in %s\n",
op, binary_filename);
}
break;
@@ -415,7 +411,7 @@ parse_debug_line(int num_traces, void **traces,
parse_debug_line_cu(num_traces, traces, &debug_line, lines);
}
if (debug_line != debug_line_end) {
- kprintf("Unexpected size of .debug_line in %s\n",
+ fprintf(stderr, "Unexpected size of .debug_line in %s\n",
binary_filename);
}
}
@@ -477,13 +473,13 @@ fill_lines(int num_traces, void **traces, char **syms, int check_debuglink,
if (filesize < 0) {
int e = errno;
close(fd);
- kprintf("lseek: %s\n", strerror(e));
+ fprintf(stderr, "lseek: %s\n", strerror(e));
return;
}
#if SIZEOF_OFF_T > SIZEOF_SIZE_T
if (filesize > (off_t)SIZE_MAX) {
close(fd);
- kprintf("Too large file %s\n", binary_filename);
+ fprintf(stderr, "Too large file %s\n", binary_filename);
return;
}
#endif
@@ -493,7 +489,7 @@ fill_lines(int num_traces, void **traces, char **syms, int check_debuglink,
if (file == MAP_FAILED) {
int e = errno;
close(fd);
- kprintf("mmap: %s\n", strerror(e));
+ fprintf(stderr, "mmap: %s\n", strerror(e));
return;
}
@@ -618,22 +614,23 @@ rb_dump_backtrace_with_lines(int num_traces, void **trace, char **syms)
fill_lines(num_traces, trace, syms, 1, &lines[i], lines);
}
+ /* fprintf may not be async-signal safe */
for (i = 0; i < num_traces; i++) {
line_info_t *line = &lines[i];
if (line->line > 0) {
+ fprintf(stderr, "%s ", syms[i]);
if (line->filename) {
if (line->dirname && line->dirname[0]) {
- kprintf("%s %s/%s:%d\n", syms[i], line->dirname, line->filename, line->line);
- }
- else {
- kprintf("%s %s:%d\n", syms[i], line->filename, line->line);
+ fprintf(stderr, "%s/", line->dirname);
}
+ fprintf(stderr, "%s", line->filename);
} else {
- kprintf("%s ???:%d\n", syms[i], line->line);
+ fprintf(stderr, "???");
}
+ fprintf(stderr, ":%d\n", line->line);
} else {
- kprintf("%s\n", syms[i]);
+ fprintf(stderr, "%s\n", syms[i]);
}
}
@@ -647,436 +644,6 @@ rb_dump_backtrace_with_lines(int num_traces, void **trace, char **syms)
free(lines);
}
-/* From FreeBSD's lib/libstand/printf.c */
-/*-
- * Copyright (c) 1986, 1988, 1991, 1993
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * 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.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- *
- * @(#)subr_prf.c 8.3 (Berkeley) 1/21/94
- */
-
-#include <stdarg.h>
-#define MAXNBUF (sizeof(intmax_t) * CHAR_BIT + 1)
-extern int rb_toupper(int c);
-#define toupper(c) rb_toupper(c)
-#define hex2ascii(hex) (hex2ascii_data[hex])
-char const hex2ascii_data[] = "0123456789abcdefghijklmnopqrstuvwxyz";
-static inline int imax(int a, int b) { return (a > b ? a : b); }
-static int kvprintf(char const *fmt, void (*func)(int), void *arg, int radix, va_list ap);
-
-static void putce(int c)
-{
- char s[1];
- ssize_t ret;
-
- s[0] = (char)c;
- ret = write(2, s, 1);
- (void)ret;
-}
-
-int
-kprintf(const char *fmt, ...)
-{
- va_list ap;
- int retval;
-
- va_start(ap, fmt);
- retval = kvprintf(fmt, putce, NULL, 10, ap);
- va_end(ap);
- return retval;
-}
-
-/*
- * Put a NUL-terminated ASCII number (base <= 36) in a buffer in reverse
- * order; return an optional length and a pointer to the last character
- * written in the buffer (i.e., the first character of the string).
- * The buffer pointed to by `nbuf' must have length >= MAXNBUF.
- */
-static char *
-ksprintn(char *nbuf, uintmax_t num, int base, int *lenp, int upper)
-{
- char *p, c;
-
- p = nbuf;
- *p = '\0';
- do {
- c = hex2ascii(num % base);
- *++p = upper ? toupper(c) : c;
- } while (num /= base);
- if (lenp)
- *lenp = (int)(p - nbuf);
- return (p);
-}
-
-/*
- * Scaled down version of printf(3).
- *
- * Two additional formats:
- *
- * The format %b is supported to decode error registers.
- * Its usage is:
- *
- * printf("reg=%b\n", regval, "<base><arg>*");
- *
- * where <base> is the output base expressed as a control character, e.g.
- * \10 gives octal; \20 gives hex. Each arg is a sequence of characters,
- * the first of which gives the bit number to be inspected (origin 1), and
- * the next characters (up to a control character, i.e. a character <= 32),
- * give the name of the register. Thus:
- *
- * kvprintf("reg=%b\n", 3, "\10\2BITTWO\1BITONE\n");
- *
- * would produce output:
- *
- * reg=3<BITTWO,BITONE>
- *
- * XXX: %D -- Hexdump, takes pointer and separator string:
- * ("%6D", ptr, ":") -> XX:XX:XX:XX:XX:XX
- * ("%*D", len, ptr, " " -> XX XX XX XX ...
- */
-static int
-kvprintf(char const *fmt, void (*func)(int), void *arg, int radix, va_list ap)
-{
-#define PCHAR(c) {int cc=(c); if (func) (*func)(cc); else *d++ = cc; retval++; }
- char nbuf[MAXNBUF];
- char *d;
- const char *p, *percent, *q;
- unsigned char *up;
- int ch, n;
- uintmax_t num;
- int base, lflag, qflag, tmp, width, ladjust, sharpflag, neg, sign, dot;
- int cflag, hflag, jflag, tflag, zflag;
- int dwidth, upper;
- char padc;
- int stop = 0, retval = 0;
-
- num = 0;
- if (!func)
- d = (char *) arg;
- else
- d = NULL;
-
- if (fmt == NULL)
- fmt = "(fmt null)\n";
-
- if (radix < 2 || radix > 36)
- radix = 10;
-
- for (;;) {
- padc = ' ';
- width = 0;
- while ((ch = (unsigned char)*fmt++) != '%' || stop) {
- if (ch == '\0')
- return (retval);
- PCHAR(ch);
- }
- percent = fmt - 1;
- qflag = 0; lflag = 0; ladjust = 0; sharpflag = 0; neg = 0;
- sign = 0; dot = 0; dwidth = 0; upper = 0;
- cflag = 0; hflag = 0; jflag = 0; tflag = 0; zflag = 0;
-reswitch: switch (ch = (unsigned char)*fmt++) {
- case '.':
- dot = 1;
- goto reswitch;
- case '#':
- sharpflag = 1;
- goto reswitch;
- case '+':
- sign = 1;
- goto reswitch;
- case '-':
- ladjust = 1;
- goto reswitch;
- case '%':
- PCHAR(ch);
- break;
- case '*':
- if (!dot) {
- width = va_arg(ap, int);
- if (width < 0) {
- ladjust = !ladjust;
- width = -width;
- }
- } else {
- dwidth = va_arg(ap, int);
- }
- goto reswitch;
- case '0':
- if (!dot) {
- padc = '0';
- goto reswitch;
- }
- case '1': case '2': case '3': case '4':
- case '5': case '6': case '7': case '8': case '9':
- for (n = 0;; ++fmt) {
- n = n * 10 + ch - '0';
- ch = *fmt;
- if (ch < '0' || ch > '9')
- break;
- }
- if (dot)
- dwidth = n;
- else
- width = n;
- goto reswitch;
- case 'b':
- num = (unsigned int)va_arg(ap, int);
- p = va_arg(ap, char *);
- for (q = ksprintn(nbuf, num, *p++, NULL, 0); *q;)
- PCHAR(*q--);
-
- if (num == 0)
- break;
-
- for (tmp = 0; *p;) {
- n = *p++;
- if (num & (1 << (n - 1))) {
- PCHAR(tmp ? ',' : '<');
- for (; (n = *p) > ' '; ++p)
- PCHAR(n);
- tmp = 1;
- } else
- for (; *p > ' '; ++p)
- continue;
- }
- if (tmp)
- PCHAR('>');
- break;
- case 'c':
- PCHAR(va_arg(ap, int));
- break;
- case 'D':
- up = va_arg(ap, unsigned char *);
- p = va_arg(ap, char *);
- if (!width)
- width = 16;
- while(width--) {
- PCHAR(hex2ascii(*up >> 4));
- PCHAR(hex2ascii(*up & 0x0f));
- up++;
- if (width)
- for (q=p;*q;q++)
- PCHAR(*q);
- }
- break;
- case 'd':
- case 'i':
- base = 10;
- sign = 1;
- goto handle_sign;
- case 'h':
- if (hflag) {
- hflag = 0;
- cflag = 1;
- } else
- hflag = 1;
- goto reswitch;
- case 'j':
- jflag = 1;
- goto reswitch;
- case 'l':
- if (lflag) {
- lflag = 0;
- qflag = 1;
- } else
- lflag = 1;
- goto reswitch;
- case 'n':
- if (jflag)
- *(va_arg(ap, intmax_t *)) = retval;
- else if (qflag)
- *(va_arg(ap, int64_t *)) = retval;
- else if (lflag)
- *(va_arg(ap, long *)) = retval;
- else if (zflag)
- *(va_arg(ap, size_t *)) = retval;
- else if (hflag)
- *(va_arg(ap, short *)) = retval;
- else if (cflag)
- *(va_arg(ap, char *)) = retval;
- else
- *(va_arg(ap, int *)) = retval;
- break;
- case 'o':
- base = 8;
- goto handle_nosign;
- case 'p':
- base = 16;
- sharpflag = (width == 0);
- sign = 0;
- num = (uintptr_t)va_arg(ap, void *);
- goto number;
- case 'q':
- qflag = 1;
- goto reswitch;
- case 'r':
- base = radix;
- if (sign)
- goto handle_sign;
- goto handle_nosign;
- case 's':
- p = va_arg(ap, char *);
- if (p == NULL)
- p = "(null)";
- if (!dot)
- n = (int)strlen (p);
- else
- for (n = 0; n < dwidth && p[n]; n++)
- continue;
-
- width -= n;
-
- if (!ladjust && width > 0)
- while (width--)
- PCHAR(padc);
- while (n--)
- PCHAR(*p++);
- if (ladjust && width > 0)
- while (width--)
- PCHAR(padc);
- break;
- case 't':
- tflag = 1;
- goto reswitch;
- case 'u':
- base = 10;
- goto handle_nosign;
- case 'X':
- upper = 1;
- case 'x':
- base = 16;
- goto handle_nosign;
- case 'y':
- base = 16;
- sign = 1;
- goto handle_sign;
- case 'z':
- zflag = 1;
- goto reswitch;
-handle_nosign:
- sign = 0;
- if (jflag)
- num = va_arg(ap, uintmax_t);
- else if (qflag)
- num = va_arg(ap, uint64_t);
- else if (tflag)
- num = va_arg(ap, ptrdiff_t);
- else if (lflag)
- num = va_arg(ap, unsigned long);
- else if (zflag)
- num = va_arg(ap, size_t);
- else if (hflag)
- num = (unsigned short)va_arg(ap, int);
- else if (cflag)
- num = (unsigned char)va_arg(ap, int);
- else
- num = va_arg(ap, unsigned int);
- goto number;
-handle_sign:
- if (jflag)
- num = va_arg(ap, intmax_t);
- else if (qflag)
- num = va_arg(ap, int64_t);
- else if (tflag)
- num = va_arg(ap, ptrdiff_t);
- else if (lflag)
- num = va_arg(ap, long);
- else if (zflag)
- num = va_arg(ap, ssize_t);
- else if (hflag)
- num = (short)va_arg(ap, int);
- else if (cflag)
- num = (char)va_arg(ap, int);
- else
- num = va_arg(ap, int);
-number:
- if (sign && (intmax_t)num < 0) {
- neg = 1;
- num = -(intmax_t)num;
- }
- p = ksprintn(nbuf, num, base, &n, upper);
- tmp = 0;
- if (sharpflag && num != 0) {
- if (base == 8)
- tmp++;
- else if (base == 16)
- tmp += 2;
- }
- if (neg)
- tmp++;
-
- if (!ladjust && padc == '0')
- dwidth = width - tmp;
- width -= tmp + imax(dwidth, n);
- dwidth -= n;
- if (!ladjust)
- while (width-- > 0)
- PCHAR(' ');
- if (neg)
- PCHAR('-');
- if (sharpflag && num != 0) {
- if (base == 8) {
- PCHAR('0');
- } else if (base == 16) {
- PCHAR('0');
- PCHAR('x');
- }
- }
- while (dwidth-- > 0)
- PCHAR('0');
-
- while (*p)
- PCHAR(*p--);
-
- if (ladjust)
- while (width-- > 0)
- PCHAR(' ');
-
- break;
- default:
- while (percent < fmt)
- PCHAR(*percent++);
- /*
- * Since we ignore an formatting argument it is no
- * longer safe to obey the remaining formatting
- * arguments as the arguments will no longer match
- * the format specs.
- */
- stop = 1;
- break;
- }
- }
-#undef PCHAR
-}
#else /* defined(USE_ELF) */
#error not supported
#endif
diff --git a/array.c b/array.c
index 45713c55b0..6f14b99933 100644
--- a/array.c
+++ b/array.c
@@ -24,6 +24,8 @@
#endif
#include <assert.h>
+#define numberof(array) (int)(sizeof(array) / sizeof((array)[0]))
+
VALUE rb_cArray;
static ID id_cmp, id_div, id_power;
@@ -39,14 +41,6 @@ rb_mem_clear(register VALUE *mem, register long size)
}
}
-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)
{
@@ -55,46 +49,6 @@ memfill(register VALUE *mem, register long size, register VALUE 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)
@@ -109,11 +63,11 @@ ary_memcpy(VALUE ary, long beg, long argc, const VALUE *argv)
(assert(ARY_EMBED_P(a)), \
(long)((RBASIC(a)->flags >> RARRAY_EMBED_LEN_SHIFT) & \
(RARRAY_EMBED_LEN_MASK >> RARRAY_EMBED_LEN_SHIFT)))
-#define ARY_HEAP_SIZE(a) (assert(!ARY_EMBED_P(a)), assert(ARY_OWNS_HEAP_P(a)), RARRAY(a)->as.heap.aux.capa * sizeof(VALUE))
#define ARY_OWNS_HEAP_P(a) (!FL_TEST((a), ELTS_SHARED|RARRAY_EMBED_FLAG))
#define FL_SET_EMBED(a) do { \
assert(!ARY_SHARED_P(a)); \
+ assert(!OBJ_FROZEN(a)); \
FL_SET((a), RARRAY_EMBED_FLAG); \
} while (0)
#define FL_UNSET_EMBED(ary) FL_UNSET((ary), RARRAY_EMBED_FLAG|RARRAY_EMBED_LEN_MASK)
@@ -174,18 +128,15 @@ ary_memcpy(VALUE ary, long beg, long argc, const VALUE *argv)
#define ARY_SHARED(ary) (assert(ARY_SHARED_P(ary)), RARRAY(ary)->as.heap.aux.shared)
#define ARY_SET_SHARED(ary, value) do { \
- const VALUE _ary_ = (ary); \
- const VALUE _value_ = (value); \
- assert(!ARY_EMBED_P(_ary_)); \
- assert(ARY_SHARED_P(_ary_)); \
- assert(ARY_SHARED_ROOT_P(_value_)); \
- RB_OBJ_WRITE(_ary_, &RARRAY(_ary_)->as.heap.aux.shared, _value_); \
+ assert(!ARY_EMBED_P(ary)); \
+ assert(ARY_SHARED_P(ary)); \
+ assert(ARY_SHARED_ROOT_P(value)); \
+ RARRAY(ary)->as.heap.aux.shared = (value); \
} while (0)
#define RARRAY_SHARED_ROOT_FLAG FL_USER5
#define ARY_SHARED_ROOT_P(ary) (FL_TEST((ary), RARRAY_SHARED_ROOT_FLAG))
#define ARY_SHARED_NUM(ary) \
(assert(ARY_SHARED_ROOT_P(ary)), RARRAY(ary)->as.heap.aux.capa)
-#define ARY_SHARED_OCCUPIED(ary) (ARY_SHARED_NUM(ary) == 1)
#define ARY_SET_SHARED_NUM(ary, value) do { \
assert(ARY_SHARED_ROOT_P(ary)); \
RARRAY(ary)->as.heap.aux.capa = (value); \
@@ -211,35 +162,23 @@ ary_resize_capa(VALUE ary, long capacity)
ARY_SET_HEAP_LEN(ary, len);
}
else {
- SIZED_REALLOC_N(RARRAY(ary)->as.heap.ptr, VALUE, capacity, RARRAY(ary)->as.heap.aux.capa);
+ REALLOC_N(RARRAY(ary)->as.heap.ptr, VALUE, (capacity));
}
ARY_SET_CAPA(ary, (capacity));
}
else {
if (!ARY_EMBED_P(ary)) {
long len = RARRAY_LEN(ary);
- const VALUE *ptr = RARRAY_CONST_PTR(ary);
-
- if (len > capacity) len = capacity;
- MEMCPY((VALUE *)RARRAY(ary)->as.ary, ptr, VALUE, len);
+ VALUE *ptr = RARRAY_PTR(ary);
+ if (len > capacity) len = capacity;
+ MEMCPY(RARRAY(ary)->as.ary, ptr, VALUE, len);
FL_SET_EMBED(ary);
ARY_SET_LEN(ary, len);
- ruby_xfree((VALUE *)ptr);
+ xfree(ptr);
}
}
}
-static inline void
-ary_shrink_capa(VALUE ary)
-{
- long capacity = ARY_HEAP_LEN(ary);
- long old_capa = RARRAY(ary)->as.heap.aux.capa;
- assert(!ARY_SHARED_P(ary));
- assert(old_capa >= capacity);
- if (old_capa > capacity)
- REALLOC_N(RARRAY(ary)->as.heap.ptr, VALUE, capacity);
-}
-
static void
ary_double_capa(VALUE ary, long min)
{
@@ -308,6 +247,8 @@ static inline void
rb_ary_modify_check(VALUE ary)
{
rb_check_frozen(ary);
+ if (!OBJ_UNTRUSTED(ary) && rb_safe_level() >= 4)
+ rb_raise(rb_eSecurityError, "Insecure: can't modify array");
}
void
@@ -315,30 +256,28 @@ rb_ary_modify(VALUE ary)
{
rb_ary_modify_check(ary);
if (ARY_SHARED_P(ary)) {
- long shared_len, len = RARRAY_LEN(ary);
+ long len = RARRAY_LEN(ary);
VALUE shared = ARY_SHARED(ary);
if (len <= RARRAY_EMBED_LEN_MAX) {
- const VALUE *ptr = ARY_HEAP_PTR(ary);
+ VALUE *ptr = ARY_HEAP_PTR(ary);
FL_UNSET_SHARED(ary);
FL_SET_EMBED(ary);
- MEMCPY((VALUE *)ARY_EMBED_PTR(ary), ptr, VALUE, len);
+ MEMCPY(ARY_EMBED_PTR(ary), ptr, VALUE, len);
rb_ary_decrement_share(shared);
ARY_SET_EMBED_LEN(ary, len);
}
- else if (ARY_SHARED_OCCUPIED(shared) && len > ((shared_len = RARRAY_LEN(shared))>>1)) {
- long shift = RARRAY_CONST_PTR(ary) - RARRAY_CONST_PTR(shared);
+ else if (ARY_SHARED_NUM(shared) == 1 && len > (RARRAY_LEN(shared)>>1)) {
+ long shift = RARRAY_PTR(ary) - RARRAY_PTR(shared);
+ ARY_SET_PTR(ary, RARRAY_PTR(shared));
+ ARY_SET_CAPA(ary, RARRAY_LEN(shared));
+ MEMMOVE(RARRAY_PTR(ary), RARRAY_PTR(ary)+shift, VALUE, len);
FL_UNSET_SHARED(ary);
- ARY_SET_PTR(ary, RARRAY_CONST_PTR(shared));
- ARY_SET_CAPA(ary, shared_len);
- RARRAY_PTR_USE(ary, ptr, {
- MEMMOVE(ptr, ptr+shift, VALUE, len);
- });
FL_SET_EMBED(shared);
rb_ary_decrement_share(shared);
}
else {
VALUE *ptr = ALLOC_N(VALUE, len);
- MEMCPY(ptr, RARRAY_CONST_PTR(ary), VALUE, len);
+ MEMCPY(ptr, RARRAY_PTR(ary), VALUE, len);
rb_ary_unshare(ary);
ARY_SET_CAPA(ary, len);
ARY_SET_PTR(ary, ptr);
@@ -355,12 +294,12 @@ ary_ensure_room_for_push(VALUE ary, long add_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)) {
+ if (ARY_SHARED_NUM(shared) == 1) {
+ if (RARRAY_PTR(ary) - RARRAY_PTR(shared) + new_len <= RARRAY_LEN(shared)) {
rb_ary_modify_check(ary);
}
else {
- /* if array is shared, then it is likely it participate in push/shift pattern */
+ /* if array is shared, than it is likely it participate in push/shift pattern */
rb_ary_modify(ary);
capa = ARY_CAPA(ary);
if (new_len > capa - (capa >> 6)) {
@@ -431,11 +370,10 @@ rb_ary_shared_with_p(VALUE ary1, VALUE ary2)
static VALUE
ary_alloc(VALUE klass)
{
- NEWOBJ_OF(ary, struct RArray, klass, T_ARRAY | RARRAY_EMBED_FLAG | (RGENGC_WB_PROTECTED_ARRAY ? FL_WB_PROTECTED : 0));
- /* Created array is:
- * FL_SET_EMBED((VALUE)ary);
- * ARY_SET_EMBED_LEN((VALUE)ary, 0);
- */
+ NEWOBJ_OF(ary, struct RArray, klass, T_ARRAY);
+ FL_SET_EMBED((VALUE)ary);
+ ARY_SET_EMBED_LEN((VALUE)ary, 0);
+
return (VALUE)ary;
}
@@ -452,7 +390,7 @@ empty_ary_alloc(VALUE klass)
static VALUE
ary_new(VALUE klass, long capa)
{
- VALUE ary,*ptr;
+ VALUE ary;
if (capa < 0) {
rb_raise(rb_eArgError, "negative array size (or size too big)");
@@ -465,35 +403,34 @@ ary_new(VALUE klass, long capa)
RUBY_DTRACE_ARRAY_CREATE(capa, rb_sourcefile(), rb_sourceline());
}
+ 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_PTR(ary, ALLOC_N(VALUE, capa));
ARY_SET_CAPA(ary, capa);
ARY_SET_HEAP_LEN(ary, 0);
}
- else {
- ary = ary_alloc(klass);
- }
return ary;
}
VALUE
-rb_ary_new_capa(long capa)
+rb_ary_new2(long capa)
{
return ary_new(rb_cArray, capa);
}
+
VALUE
rb_ary_new(void)
{
return rb_ary_new2(RARRAY_EMBED_LEN_MAX);
}
+#include <stdarg.h>
+
VALUE
-rb_ary_new_from_args(long n, ...)
+rb_ary_new3(long n, ...)
{
va_list ar;
VALUE ary;
@@ -503,7 +440,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));
+ RARRAY_PTR(ary)[i] = va_arg(ar, VALUE);
}
va_end(ar);
@@ -512,13 +449,13 @@ rb_ary_new_from_args(long n, ...)
}
VALUE
-rb_ary_new_from_values(long n, const VALUE *elts)
+rb_ary_new4(long n, const VALUE *elts)
{
VALUE ary;
ary = rb_ary_new2(n);
if (n > 0 && elts) {
- ary_memcpy(ary, 0, n, elts);
+ MEMCPY(RARRAY_PTR(ary), elts, VALUE, n);
ARY_SET_LEN(ary, n);
}
@@ -535,7 +472,7 @@ void
rb_ary_free(VALUE ary)
{
if (ARY_OWNS_HEAP_P(ary)) {
- ruby_sized_xfree((void *)ARY_HEAP_PTR(ary), ARY_HEAP_SIZE(ary));
+ xfree(ARY_HEAP_PTR(ary));
}
}
@@ -569,19 +506,18 @@ ary_make_shared(VALUE ary)
return ary;
}
else if (OBJ_FROZEN(ary)) {
- ary_shrink_capa(ary);
+ ary_resize_capa(ary, ARY_HEAP_LEN(ary));
FL_SET_SHARED_ROOT(ary);
ARY_SET_SHARED_NUM(ary, 1);
return 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);
FL_UNSET_EMBED(shared);
- ARY_SET_LEN((VALUE)shared, capa);
- ARY_SET_PTR((VALUE)shared, RARRAY_CONST_PTR(ary));
- ary_mem_clear((VALUE)shared, len, capa - len);
+ ARY_SET_LEN((VALUE)shared, ARY_CAPA(ary));
+ ARY_SET_PTR((VALUE)shared, RARRAY_PTR(ary));
+ rb_mem_clear(RARRAY_PTR(shared) + RARRAY_LEN(ary), ARY_CAPA(ary) - RARRAY_LEN(ary));
FL_SET_SHARED_ROOT(shared);
ARY_SET_SHARED_NUM((VALUE)shared, 1);
FL_SET_SHARED(ary);
@@ -591,15 +527,14 @@ ary_make_shared(VALUE ary)
}
}
+
static VALUE
ary_make_substitution(VALUE ary)
{
- long len = RARRAY_LEN(ary);
-
- if (len <= RARRAY_EMBED_LEN_MAX) {
- VALUE subst = rb_ary_new2(len);
- ary_memcpy(subst, 0, len, RARRAY_CONST_PTR(ary));
- ARY_SET_EMBED_LEN(subst, len);
+ if (RARRAY_LEN(ary) <= RARRAY_EMBED_LEN_MAX) {
+ VALUE subst = rb_ary_new2(RARRAY_LEN(ary));
+ MEMCPY(ARY_EMBED_PTR(subst), RARRAY_PTR(ary), VALUE, RARRAY_LEN(ary));
+ ARY_SET_EMBED_LEN(subst, RARRAY_LEN(ary));
return subst;
}
else {
@@ -714,8 +649,8 @@ rb_ary_initialize(int argc, VALUE *argv, VALUE ary)
rb_ary_modify(ary);
if (argc == 0) {
- if (ARY_OWNS_HEAP_P(ary) && RARRAY_CONST_PTR(ary) != 0) {
- ruby_sized_xfree((void *)RARRAY_CONST_PTR(ary), ARY_HEAP_SIZE(ary));
+ if (ARY_OWNS_HEAP_P(ary) && RARRAY_PTR(ary)) {
+ xfree(RARRAY_PTR(ary));
}
rb_ary_unshare_safe(ary);
FL_SET_EMBED(ary);
@@ -755,7 +690,7 @@ rb_ary_initialize(int argc, VALUE *argv, VALUE ary)
}
}
else {
- ary_memfill(ary, 0, len, val);
+ memfill(RARRAY_PTR(ary), len, val);
ARY_SET_LEN(ary, len);
}
return ary;
@@ -774,7 +709,7 @@ rb_ary_s_create(int argc, VALUE *argv, VALUE klass)
{
VALUE ary = ary_new(klass, argc);
if (argc > 0 && argv) {
- ary_memcpy(ary, 0, argc, argv);
+ MEMCPY(RARRAY_PTR(ary), argv, VALUE, argc);
ARY_SET_LEN(ary, argc);
}
@@ -784,13 +719,11 @@ rb_ary_s_create(int argc, VALUE *argv, VALUE klass)
void
rb_ary_store(VALUE ary, long idx, VALUE val)
{
- long len = RARRAY_LEN(ary);
-
if (idx < 0) {
- idx += len;
+ idx += RARRAY_LEN(ary);
if (idx < 0) {
rb_raise(rb_eIndexError, "index %ld too small for array; minimum: %ld",
- idx - len, -len);
+ idx - RARRAY_LEN(ary), -RARRAY_LEN(ary));
}
}
else if (idx >= ARY_MAX_SIZE) {
@@ -801,14 +734,15 @@ rb_ary_store(VALUE ary, long idx, VALUE val)
if (idx >= ARY_CAPA(ary)) {
ary_double_capa(ary, idx);
}
- if (idx > len) {
- ary_mem_clear(ary, len, idx - len + 1);
+ if (idx > RARRAY_LEN(ary)) {
+ rb_mem_clear(RARRAY_PTR(ary) + RARRAY_LEN(ary),
+ idx-RARRAY_LEN(ary) + 1);
}
- if (idx >= len) {
+ if (idx >= RARRAY_LEN(ary)) {
ARY_SET_LEN(ary, idx + 1);
}
- RARRAY_ASET(ary, idx, val);
+ RARRAY_PTR(ary)[idx] = val;
}
static VALUE
@@ -820,7 +754,7 @@ ary_make_partial(VALUE ary, VALUE klass, long offset, long len)
if (len <= RARRAY_EMBED_LEN_MAX) {
VALUE result = ary_alloc(klass);
- ary_memcpy(result, 0, len, RARRAY_CONST_PTR(ary) + offset);
+ MEMCPY(ARY_EMBED_PTR(result), RARRAY_PTR(ary) + offset, VALUE, len);
ARY_SET_EMBED_LEN(result, len);
return result;
}
@@ -829,7 +763,7 @@ ary_make_partial(VALUE ary, VALUE klass, long offset, long len)
FL_UNSET_EMBED(result);
shared = ary_make_shared(ary);
- ARY_SET_PTR(result, RARRAY_CONST_PTR(ary));
+ ARY_SET_PTR(result, RARRAY_PTR(ary));
ARY_SET_LEN(result, RARRAY_LEN(ary));
rb_ary_set_shared(result, shared);
@@ -856,20 +790,18 @@ ary_take_first_or_last(int argc, VALUE *argv, VALUE ary, enum ary_take_pos_flags
{
VALUE nv;
long n;
- long len;
long offset = 0;
rb_scan_args(argc, argv, "1", &nv);
n = NUM2LONG(nv);
- len = RARRAY_LEN(ary);
- if (n > len) {
- n = len;
+ if (n > RARRAY_LEN(ary)) {
+ n = RARRAY_LEN(ary);
}
else if (n < 0) {
rb_raise(rb_eArgError, "negative array size");
}
if (last) {
- offset = len - n;
+ offset = RARRAY_LEN(ary) - n;
}
return ary_make_partial(ary, rb_cArray, offset, n);
}
@@ -893,7 +825,7 @@ rb_ary_push(VALUE ary, VALUE item)
long idx = RARRAY_LEN(ary);
ary_ensure_room_for_push(ary, 1);
- RARRAY_ASET(ary, idx, item);
+ RARRAY_PTR(ary)[idx] = item;
ARY_SET_LEN(ary, idx + 1);
return ary;
}
@@ -906,7 +838,7 @@ rb_ary_push_1(VALUE ary, VALUE item)
if (idx >= ARY_CAPA(ary)) {
ary_double_capa(ary, idx);
}
- RARRAY_ASET(ary, idx, item);
+ RARRAY_PTR(ary)[idx] = item;
ARY_SET_LEN(ary, idx + 1);
return ary;
}
@@ -917,7 +849,7 @@ rb_ary_cat(VALUE ary, const VALUE *ptr, long len)
long oldlen = RARRAY_LEN(ary);
ary_ensure_room_for_push(ary, len);
- ary_memcpy(ary, oldlen, len, ptr);
+ MEMCPY(RARRAY_PTR(ary) + oldlen, ptr, VALUE, len);
ARY_SET_LEN(ary, oldlen + len);
return ary;
}
@@ -949,17 +881,16 @@ rb_ary_pop(VALUE ary)
{
long n;
rb_ary_modify_check(ary);
- n = RARRAY_LEN(ary);
- if (n == 0) return Qnil;
+ if (RARRAY_LEN(ary) == 0) return Qnil;
if (ARY_OWNS_HEAP_P(ary) &&
- n * 3 < ARY_CAPA(ary) &&
+ RARRAY_LEN(ary) * 3 < ARY_CAPA(ary) &&
ARY_CAPA(ary) > ARY_DEFAULT_SIZE)
{
- ary_resize_capa(ary, n * 2);
+ ary_resize_capa(ary, RARRAY_LEN(ary) * 2);
}
- --n;
+ n = RARRAY_LEN(ary)-1;
ARY_SET_LEN(ary, n);
- return RARRAY_AREF(ary, n);
+ return RARRAY_PTR(ary)[n];
}
/*
@@ -999,26 +930,23 @@ VALUE
rb_ary_shift(VALUE ary)
{
VALUE top;
- long len = RARRAY_LEN(ary);
rb_ary_modify_check(ary);
- if (len == 0) return Qnil;
- top = RARRAY_AREF(ary, 0);
+ if (RARRAY_LEN(ary) == 0) return Qnil;
+ top = RARRAY_PTR(ary)[0];
if (!ARY_SHARED_P(ary)) {
- if (len < ARY_DEFAULT_SIZE) {
- RARRAY_PTR_USE(ary, ptr, {
- MEMMOVE(ptr, ptr+1, VALUE, len-1);
- }); /* WB: no new reference */
+ if (RARRAY_LEN(ary) < ARY_DEFAULT_SIZE) {
+ MEMMOVE(RARRAY_PTR(ary), RARRAY_PTR(ary)+1, VALUE, RARRAY_LEN(ary)-1);
ARY_INCREASE_LEN(ary, -1);
return top;
}
assert(!ARY_EMBED_P(ary)); /* ARY_EMBED_LEN_MAX < ARY_DEFAULT_SIZE */
- RARRAY_ASET(ary, 0, Qnil);
+ RARRAY_PTR(ary)[0] = Qnil;
ary_make_shared(ary);
}
- else if (ARY_SHARED_OCCUPIED(ARY_SHARED(ary))) {
- RARRAY_ASET(ary, 0, Qnil);
+ else if (ARY_SHARED_NUM(ARY_SHARED(ary)) == 1) {
+ RARRAY_PTR(ary)[0] = Qnil;
}
ARY_INCREASE_PTR(ary, 1); /* shift ptr */
ARY_INCREASE_LEN(ary, -1);
@@ -1063,15 +991,13 @@ rb_ary_shift_m(int argc, VALUE *argv, VALUE ary)
result = ary_take_first_or_last(argc, argv, ary, ARY_TAKE_FIRST);
n = RARRAY_LEN(result);
if (ARY_SHARED_P(ary)) {
- if (ARY_SHARED_OCCUPIED(ARY_SHARED(ary))) {
- ary_mem_clear(ary, 0, n);
+ if (ARY_SHARED_NUM(ARY_SHARED(ary)) == 1) {
+ rb_mem_clear(RARRAY_PTR(ary), 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 */
+ MEMMOVE(RARRAY_PTR(ary), RARRAY_PTR(ary)+n, VALUE, RARRAY_LEN(ary)-n);
}
ARY_INCREASE_LEN(ary, -n);
@@ -1084,14 +1010,14 @@ ary_ensure_room_for_unshift(VALUE ary, int argc)
long len = RARRAY_LEN(ary);
long new_len = len + argc;
long capa;
- const VALUE *head, *sharedp;
+ VALUE *head, *sharedp;
if (ARY_SHARED_P(ary)) {
VALUE shared = ARY_SHARED(ary);
capa = RARRAY_LEN(shared);
- if (ARY_SHARED_OCCUPIED(shared) && capa > new_len) {
- head = RARRAY_CONST_PTR(ary);
- sharedp = RARRAY_CONST_PTR(shared);
+ if (ARY_SHARED_NUM(shared) == 1 && capa > new_len) {
+ head = RARRAY_PTR(ary);
+ sharedp = RARRAY_PTR(shared);
goto makeroom_if_need;
}
}
@@ -1108,7 +1034,7 @@ ary_ensure_room_for_unshift(VALUE ary, int argc)
capa = ARY_CAPA(ary);
ary_make_shared(ary);
- head = sharedp = RARRAY_CONST_PTR(ary);
+ head = sharedp = RARRAY_PTR(ary);
goto makeroom;
makeroom_if_need:
if (head - sharedp < argc) {
@@ -1116,16 +1042,14 @@ ary_ensure_room_for_unshift(VALUE ary, int argc)
makeroom:
room = capa - new_len;
room -= room >> 4;
- MEMMOVE((VALUE *)sharedp + argc + room, head, VALUE, len);
+ MEMMOVE(sharedp + argc + room, head, VALUE, len);
head = sharedp + argc + room;
}
ARY_SET_PTR(ary, head - argc);
}
else {
/* sliding items */
- RARRAY_PTR_USE(ary, ptr, {
- MEMMOVE(ptr + argc, ptr, VALUE, len);
- });
+ MEMMOVE(RARRAY_PTR(ary) + argc, RARRAY_PTR(ary), VALUE, len);
}
}
@@ -1152,7 +1076,7 @@ rb_ary_unshift_m(int argc, VALUE *argv, VALUE ary)
}
ary_ensure_room_for_unshift(ary, argc);
- ary_memcpy(ary, 0, argc, argv);
+ MEMCPY(RARRAY_PTR(ary), argv, VALUE, argc);
ARY_SET_LEN(ary, len + argc);
return ary;
}
@@ -1167,12 +1091,11 @@ rb_ary_unshift(VALUE ary, VALUE item)
static inline VALUE
rb_ary_elt(VALUE ary, long offset)
{
- long len = RARRAY_LEN(ary);
- if (len == 0) return Qnil;
- if (offset < 0 || len <= offset) {
+ if (RARRAY_LEN(ary) == 0) return Qnil;
+ if (offset < 0 || RARRAY_LEN(ary) <= offset) {
return Qnil;
}
- return RARRAY_AREF(ary, offset);
+ return RARRAY_PTR(ary)[offset];
}
VALUE
@@ -1188,13 +1111,12 @@ VALUE
rb_ary_subseq(VALUE ary, long beg, long len)
{
VALUE klass;
- long alen = RARRAY_LEN(ary);
- if (beg > alen) return Qnil;
+ if (beg > RARRAY_LEN(ary)) return Qnil;
if (beg < 0 || len < 0) return Qnil;
- if (alen < len || alen < beg + len) {
- len = alen - beg;
+ if (RARRAY_LEN(ary) < len || RARRAY_LEN(ary) < beg + len) {
+ len = RARRAY_LEN(ary) - beg;
}
klass = rb_obj_class(ary);
if (len == 0) return ary_new(klass, 0);
@@ -1311,7 +1233,7 @@ rb_ary_first(int argc, VALUE *argv, VALUE ary)
{
if (argc == 0) {
if (RARRAY_LEN(ary) == 0) return Qnil;
- return RARRAY_AREF(ary, 0);
+ return RARRAY_PTR(ary)[0];
}
else {
return ary_take_first_or_last(argc, argv, ary, ARY_TAKE_FIRST);
@@ -1337,9 +1259,8 @@ VALUE
rb_ary_last(int argc, VALUE *argv, VALUE ary)
{
if (argc == 0) {
- long len = RARRAY_LEN(ary);
- if (len == 0) return Qnil;
- return RARRAY_AREF(ary, len-1);
+ if (RARRAY_LEN(ary) == 0) return Qnil;
+ return RARRAY_PTR(ary)[RARRAY_LEN(ary)-1];
}
else {
return ary_take_first_or_last(argc, argv, ary, ARY_TAKE_LAST);
@@ -1394,14 +1315,11 @@ rb_ary_fetch(int argc, VALUE *argv, VALUE ary)
}
return ifnone;
}
- return RARRAY_AREF(ary, idx);
+ return RARRAY_PTR(ary)[idx];
}
/*
* call-seq:
- * ary.find_index(obj) -> int or nil
- * ary.find_index { |item| block } -> int or nil
- * ary.find_index -> Enumerator
* ary.index(obj) -> int or nil
* ary.index { |item| block } -> int or nil
* ary.index -> Enumerator
@@ -1421,42 +1339,31 @@ rb_ary_fetch(int argc, VALUE *argv, VALUE ary)
* a.index("b") #=> 1
* a.index("z") #=> nil
* a.index { |x| x == "b" } #=> 1
+ *
+ * This is an alias of Array#find_index.
*/
static VALUE
rb_ary_index(int argc, VALUE *argv, VALUE ary)
{
- const VALUE *ptr;
VALUE val;
- long i, len;
+ long i;
if (argc == 0) {
RETURN_ENUMERATOR(ary, 0, 0);
for (i=0; i<RARRAY_LEN(ary); i++) {
- if (RTEST(rb_yield(RARRAY_AREF(ary, i)))) {
+ if (RTEST(rb_yield(RARRAY_PTR(ary)[i]))) {
return LONG2NUM(i);
}
}
return Qnil;
}
- rb_check_arity(argc, 0, 1);
- val = argv[0];
+ rb_scan_args(argc, argv, "1", &val);
if (rb_block_given_p())
rb_warn("given block not used");
- len = RARRAY_LEN(ary);
- ptr = RARRAY_CONST_PTR(ary);
- for (i=0; i<len; i++) {
- VALUE e = ptr[i];
- switch (rb_equal_opt(e, val)) {
- case Qundef:
- if (!rb_equal(e, val)) break;
- case Qtrue:
+ for (i=0; i<RARRAY_LEN(ary); i++) {
+ if (rb_equal(RARRAY_PTR(ary)[i], val))
return LONG2NUM(i);
- case Qfalse:
- continue;
- }
- len = RARRAY_LEN(ary);
- ptr = RARRAY_CONST_PTR(ary);
}
return Qnil;
}
@@ -1488,40 +1395,29 @@ rb_ary_index(int argc, VALUE *argv, VALUE ary)
static VALUE
rb_ary_rindex(int argc, VALUE *argv, VALUE ary)
{
- const VALUE *ptr;
VALUE val;
- long i = RARRAY_LEN(ary), len;
+ long i = RARRAY_LEN(ary);
if (argc == 0) {
RETURN_ENUMERATOR(ary, 0, 0);
while (i--) {
- if (RTEST(rb_yield(RARRAY_AREF(ary, i))))
+ if (RTEST(rb_yield(RARRAY_PTR(ary)[i])))
return LONG2NUM(i);
- if (i > (len = RARRAY_LEN(ary))) {
- i = len;
+ if (i > RARRAY_LEN(ary)) {
+ i = RARRAY_LEN(ary);
}
}
return Qnil;
}
- rb_check_arity(argc, 0, 1);
- val = argv[0];
+ rb_scan_args(argc, argv, "1", &val);
if (rb_block_given_p())
rb_warn("given block not used");
- ptr = RARRAY_CONST_PTR(ary);
while (i--) {
- VALUE e = ptr[i];
- switch (rb_equal_opt(e, val)) {
- case Qundef:
- if (!rb_equal(e, val)) break;
- case Qtrue:
+ if (rb_equal(RARRAY_PTR(ary)[i], val))
return LONG2NUM(i);
- case Qfalse:
- continue;
+ if (i > RARRAY_LEN(ary)) {
+ i = RARRAY_LEN(ary);
}
- if (i > (len = RARRAY_LEN(ary))) {
- i = len;
- }
- ptr = RARRAY_CONST_PTR(ary);
}
return Qnil;
}
@@ -1539,19 +1435,17 @@ static void
rb_ary_splice(VALUE ary, long beg, long len, VALUE rpl)
{
long rlen;
- long olen;
if (len < 0) rb_raise(rb_eIndexError, "negative length (%ld)", len);
- olen = RARRAY_LEN(ary);
if (beg < 0) {
- beg += olen;
+ beg += RARRAY_LEN(ary);
if (beg < 0) {
rb_raise(rb_eIndexError, "index %ld too small for array; minimum: %ld",
- beg - olen, -olen);
+ beg - RARRAY_LEN(ary), -RARRAY_LEN(ary));
}
}
- if (olen < len || olen < beg + len) {
- len = olen - beg;
+ if (RARRAY_LEN(ary) < len || RARRAY_LEN(ary) < beg + len) {
+ len = RARRAY_LEN(ary) - beg;
}
if (rpl == Qundef) {
@@ -1560,17 +1454,16 @@ rb_ary_splice(VALUE ary, long beg, long len, VALUE rpl)
else {
rpl = rb_ary_to_ary(rpl);
rlen = RARRAY_LEN(rpl);
- olen = RARRAY_LEN(ary); /* ary may be resized in rpl.to_ary too */
}
- if (beg >= olen) {
+ if (beg >= RARRAY_LEN(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 */
len = beg + rlen;
- ary_mem_clear(ary, olen, beg - olen);
+ rb_mem_clear(RARRAY_PTR(ary) + RARRAY_LEN(ary), beg - RARRAY_LEN(ary));
if (rlen > 0) {
- ary_memcpy(ary, beg, rlen, RARRAY_CONST_PTR(rpl));
+ MEMCPY(RARRAY_PTR(ary) + beg, RARRAY_PTR(rpl), VALUE, rlen);
}
ARY_SET_LEN(ary, len);
}
@@ -1578,19 +1471,18 @@ rb_ary_splice(VALUE ary, long beg, long len, VALUE rpl)
long alen;
rb_ary_modify(ary);
- alen = olen + rlen - len;
+ alen = RARRAY_LEN(ary) + rlen - len;
if (alen >= ARY_CAPA(ary)) {
ary_double_capa(ary, alen);
}
if (len != rlen) {
- RARRAY_PTR_USE(ary, ptr,
- MEMMOVE(ptr + beg + rlen, ptr + beg + len,
- VALUE, olen - (beg + len)));
+ MEMMOVE(RARRAY_PTR(ary) + beg + rlen, RARRAY_PTR(ary) + beg + len,
+ VALUE, RARRAY_LEN(ary) - (beg + len));
ARY_SET_LEN(ary, alen);
}
if (rlen > 0) {
- MEMMOVE(RARRAY_PTR(ary) + beg, RARRAY_CONST_PTR(rpl), VALUE, rlen);
+ MEMMOVE(RARRAY_PTR(ary) + beg, RARRAY_PTR(rpl), VALUE, rlen);
}
}
}
@@ -1633,8 +1525,8 @@ rb_ary_resize(VALUE ary, long len)
if (len >= ARY_CAPA(ary)) {
ary_double_capa(ary, len);
}
- ary_mem_clear(ary, olen, len - olen);
- ARY_SET_LEN(ary, len);
+ rb_mem_clear(RARRAY_PTR(ary) + olen, len - olen);
+ ARY_SET_LEN(ary, len);
}
else if (ARY_EMBED_P(ary)) {
ARY_SET_EMBED_LEN(ary, len);
@@ -1643,12 +1535,12 @@ rb_ary_resize(VALUE ary, long len)
VALUE tmp[RARRAY_EMBED_LEN_MAX];
MEMCPY(tmp, ARY_HEAP_PTR(ary), VALUE, len);
ary_discard(ary);
- MEMCPY((VALUE *)ARY_EMBED_PTR(ary), tmp, VALUE, len); /* WB: no new reference */
+ MEMCPY(ARY_EMBED_PTR(ary), tmp, VALUE, len);
ARY_SET_EMBED_LEN(ary, len);
}
else {
if (olen > len + ARY_DEFAULT_SIZE) {
- SIZED_REALLOC_N(RARRAY(ary)->as.heap.ptr, VALUE, len, RARRAY(ary)->as.heap.aux.capa);
+ REALLOC_N(RARRAY(ary)->as.heap.ptr, VALUE, len);
ARY_SET_CAPA(ary, len);
}
ARY_SET_HEAP_LEN(ary, len);
@@ -1757,12 +1649,6 @@ rb_ary_insert(int argc, VALUE *argv, VALUE ary)
static VALUE
rb_ary_length(VALUE ary);
-static VALUE
-ary_enum_length(VALUE ary, VALUE args, VALUE eobj)
-{
- return rb_ary_length(ary);
-}
-
/*
* call-seq:
* ary.each { |item| block } -> ary
@@ -1787,9 +1673,9 @@ rb_ary_each(VALUE array)
long i;
volatile VALUE ary = array;
- RETURN_SIZED_ENUMERATOR(ary, 0, 0, ary_enum_length);
+ RETURN_SIZED_ENUMERATOR(ary, 0, 0, rb_ary_length);
for (i=0; i<RARRAY_LEN(ary); i++) {
- rb_yield(RARRAY_AREF(ary, i));
+ rb_yield(RARRAY_PTR(ary)[i]);
}
return ary;
}
@@ -1816,7 +1702,7 @@ static VALUE
rb_ary_each_index(VALUE ary)
{
long i;
- RETURN_SIZED_ENUMERATOR(ary, 0, 0, ary_enum_length);
+ RETURN_SIZED_ENUMERATOR(ary, 0, 0, rb_ary_length);
for (i=0; i<RARRAY_LEN(ary); i++) {
rb_yield(LONG2NUM(i));
@@ -1844,14 +1730,12 @@ rb_ary_reverse_each(VALUE ary)
{
long len;
- RETURN_SIZED_ENUMERATOR(ary, 0, 0, ary_enum_length);
+ RETURN_SIZED_ENUMERATOR(ary, 0, 0, rb_ary_length);
len = RARRAY_LEN(ary);
while (len--) {
- long nlen;
- rb_yield(RARRAY_AREF(ary, len));
- nlen = RARRAY_LEN(ary);
- if (nlen < len) {
- len = nlen;
+ rb_yield(RARRAY_PTR(ary)[len]);
+ if (RARRAY_LEN(ary) < len) {
+ len = RARRAY_LEN(ary);
}
}
return ary;
@@ -1894,17 +1778,16 @@ rb_ary_empty_p(VALUE ary)
VALUE
rb_ary_dup(VALUE ary)
{
- long len = RARRAY_LEN(ary);
- VALUE dup = rb_ary_new2(len);
- ary_memcpy(dup, 0, len, RARRAY_CONST_PTR(ary));
- ARY_SET_LEN(dup, len);
+ VALUE dup = rb_ary_new2(RARRAY_LEN(ary));
+ MEMCPY(RARRAY_PTR(dup), RARRAY_PTR(ary), VALUE, RARRAY_LEN(ary));
+ ARY_SET_LEN(dup, RARRAY_LEN(ary));
return dup;
}
VALUE
rb_ary_resurrect(VALUE ary)
{
- return rb_ary_new4(RARRAY_LEN(ary), RARRAY_CONST_PTR(ary));
+ return rb_ary_new4(RARRAY_LEN(ary), RARRAY_PTR(ary));
}
extern VALUE rb_output_fs;
@@ -1935,13 +1818,14 @@ ary_join_0(VALUE ary, VALUE sep, long max, VALUE result)
long i;
VALUE val;
- if (max > 0) rb_enc_copy(result, RARRAY_AREF(ary, 0));
+ if (max > 0) rb_enc_copy(result, RARRAY_PTR(ary)[0]);
for (i=0; i<max; i++) {
- val = RARRAY_AREF(ary, i);
+ val = RARRAY_PTR(ary)[i];
if (i > 0 && !NIL_P(sep))
rb_str_buf_append(result, sep);
rb_str_buf_append(result, val);
if (OBJ_TAINTED(val)) OBJ_TAINT(result);
+ if (OBJ_UNTRUSTED(val)) OBJ_TAINT(result);
}
}
@@ -1954,13 +1838,14 @@ ary_join_1(VALUE obj, VALUE ary, VALUE sep, long i, VALUE result, int *first)
if (i > 0 && !NIL_P(sep))
rb_str_buf_append(result, sep);
- val = RARRAY_AREF(ary, i);
- if (RB_TYPE_P(val, T_STRING)) {
+ val = RARRAY_PTR(ary)[i];
+ switch (TYPE(val)) {
+ case T_STRING:
str_join:
rb_str_buf_append(result, val);
*first = FALSE;
- }
- else if (RB_TYPE_P(val, T_ARRAY)) {
+ break;
+ case T_ARRAY:
obj = val;
ary_join:
if (val == ary) {
@@ -1975,8 +1860,8 @@ ary_join_1(VALUE obj, VALUE ary, VALUE sep, long i, VALUE result, int *first)
args[3] = (VALUE)first;
rb_exec_recursive(recursive_join, obj, (VALUE)args);
}
- }
- else {
+ break;
+ default:
tmp = rb_check_string_type(val);
if (!NIL_P(tmp)) {
val = tmp;
@@ -2003,17 +1888,19 @@ rb_ary_join(VALUE ary, VALUE sep)
{
long len = 1, i;
int taint = FALSE;
+ int untrust = FALSE;
VALUE val, tmp, result;
if (RARRAY_LEN(ary) == 0) return rb_usascii_str_new(0, 0);
if (OBJ_TAINTED(ary)) taint = TRUE;
+ if (OBJ_UNTRUSTED(ary)) untrust = TRUE;
if (!NIL_P(sep)) {
StringValue(sep);
len += RSTRING_LEN(sep) * (RARRAY_LEN(ary) - 1);
}
for (i=0; i<RARRAY_LEN(ary); i++) {
- val = RARRAY_AREF(ary, i);
+ val = RARRAY_PTR(ary)[i];
tmp = rb_check_string_type(val);
if (NIL_P(tmp) || tmp != val) {
@@ -2021,6 +1908,7 @@ rb_ary_join(VALUE ary, VALUE sep)
result = rb_str_buf_new(len + (RARRAY_LEN(ary)-i)*10);
rb_enc_associate(result, rb_usascii_encoding());
if (taint) OBJ_TAINT(result);
+ if (untrust) OBJ_UNTRUST(result);
ary_join_0(ary, sep, i, result);
first = i == 0;
ary_join_1(ary, ary, sep, i, result, &first);
@@ -2032,6 +1920,7 @@ rb_ary_join(VALUE ary, VALUE sep)
result = rb_str_buf_new(len);
if (taint) OBJ_TAINT(result);
+ if (untrust) OBJ_UNTRUST(result);
ary_join_0(ary, sep, RARRAY_LEN(ary), result);
return result;
@@ -2065,20 +1954,23 @@ static VALUE
inspect_ary(VALUE ary, VALUE dummy, int recur)
{
int tainted = OBJ_TAINTED(ary);
+ int untrust = OBJ_UNTRUSTED(ary);
long i;
VALUE s, str;
if (recur) return rb_usascii_str_new_cstr("[...]");
str = rb_str_buf_new2("[");
for (i=0; i<RARRAY_LEN(ary); i++) {
- s = rb_inspect(RARRAY_AREF(ary, i));
+ s = rb_inspect(RARRAY_PTR(ary)[i]);
if (OBJ_TAINTED(s)) tainted = TRUE;
+ if (OBJ_UNTRUSTED(s)) untrust = TRUE;
if (i > 0) rb_str_buf_cat2(str, ", ");
else rb_enc_copy(str, s);
rb_str_buf_append(str, s);
}
rb_str_buf_cat2(str, "]");
if (tainted) OBJ_TAINT(str);
+ if (untrust) OBJ_UNTRUST(str);
return str;
}
@@ -2127,37 +2019,6 @@ rb_ary_to_a(VALUE ary)
/*
* call-seq:
- * ary.to_h -> hash
- *
- * Returns the result of interpreting <i>ary</i> as an array of
- * <tt>[key, value]</tt> pairs.
- *
- * [[:foo, :bar], [1, 2]].to_h
- * # => {:foo => :bar, 1 => 2}
- */
-
-static VALUE
-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));
- 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);
- }
- if (RARRAY_LEN(key_value_pair) != 2) {
- rb_raise(rb_eArgError, "wrong array length at %ld (expected 2, was %ld)",
- i, RARRAY_LEN(key_value_pair));
- }
- rb_hash_aset(hash, RARRAY_AREF(key_value_pair, 0), RARRAY_AREF(key_value_pair, 1));
- }
- return hash;
-}
-
-/*
- * call-seq:
* ary.to_ary -> ary
*
* Returns +self+.
@@ -2182,15 +2043,13 @@ ary_reverse(VALUE *p1, VALUE *p2)
VALUE
rb_ary_reverse(VALUE ary)
{
- VALUE *p2;
- long len = RARRAY_LEN(ary);
+ VALUE *p1, *p2;
rb_ary_modify(ary);
- if (len > 1) {
- RARRAY_PTR_USE(ary, p1, {
- p2 = p1 + len - 1; /* points last item */
- ary_reverse(p1, p2);
- }); /* WB: no new reference */
+ if (RARRAY_LEN(ary) > 1) {
+ p1 = RARRAY_PTR(ary);
+ p2 = p1 + RARRAY_LEN(ary) - 1; /* points last item */
+ ary_reverse(p1, p2);
}
return ary;
}
@@ -2229,8 +2088,8 @@ rb_ary_reverse_m(VALUE ary)
VALUE dup = rb_ary_new2(len);
if (len > 0) {
- const VALUE *p1 = RARRAY_CONST_PTR(ary);
- VALUE *p2 = (VALUE *)RARRAY_CONST_PTR(dup) + len - 1;
+ VALUE *p1 = RARRAY_PTR(ary);
+ VALUE *p2 = RARRAY_PTR(dup) + len - 1;
do *p2-- = *p1++; while (--len > 0);
}
ARY_SET_LEN(dup, RARRAY_LEN(ary));
@@ -2315,8 +2174,7 @@ rb_ary_rotate_bang(int argc, VALUE *argv, VALUE ary)
static VALUE
rb_ary_rotate_m(int argc, VALUE *argv, VALUE ary)
{
- VALUE rotated;
- const VALUE *ptr;
+ VALUE rotated, *ptr, *ptr2;
long len, cnt = 1;
switch (argc) {
@@ -2329,10 +2187,11 @@ rb_ary_rotate_m(int argc, VALUE *argv, VALUE ary)
rotated = rb_ary_new2(len);
if (len > 0) {
cnt = rotate_count(cnt, len);
- ptr = RARRAY_CONST_PTR(ary);
+ ptr = RARRAY_PTR(ary);
+ ptr2 = RARRAY_PTR(rotated);
len -= cnt;
- ary_memcpy(rotated, 0, len, ptr + cnt);
- ary_memcpy(rotated, len, cnt, ptr);
+ MEMCPY(ptr2, ptr + cnt, VALUE, len);
+ MEMCPY(ptr2 + len, ptr, VALUE, cnt);
}
ARY_SET_LEN(rotated, RARRAY_LEN(ary));
return rotated;
@@ -2400,7 +2259,7 @@ sort_2(const void *ap, const void *bp, void *dummy)
return rb_str_cmp(a, b);
}
- retval = rb_funcallv(a, id_cmp, 1, &b);
+ retval = rb_funcall(a, id_cmp, 1, b);
n = rb_cmpint(retval, a, b);
sort_reentered(data->ary);
@@ -2438,25 +2297,26 @@ rb_ary_sort_bang(VALUE ary)
struct ary_sort_data data;
long len = RARRAY_LEN(ary);
- RBASIC_CLEAR_CLASS(tmp);
+ RBASIC(tmp)->klass = 0;
data.ary = tmp;
data.opt_methods = 0;
data.opt_inited = 0;
- RARRAY_PTR_USE(tmp, ptr, {
- ruby_qsort(ptr, len, sizeof(VALUE),
- rb_block_given_p()?sort_1:sort_2, &data);
- }); /* WB: no new reference */
- rb_ary_modify(ary);
+ ruby_qsort(RARRAY_PTR(tmp), len, sizeof(VALUE),
+ rb_block_given_p()?sort_1:sort_2, &data);
+
if (ARY_EMBED_P(tmp)) {
+ assert(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);
- ary_memcpy(ary, 0, ARY_EMBED_LEN(tmp), ARY_EMBED_PTR(tmp));
+ MEMCPY(RARRAY_PTR(ary), ARY_EMBED_PTR(tmp), VALUE, ARY_EMBED_LEN(tmp));
ARY_SET_LEN(ary, ARY_EMBED_LEN(tmp));
}
else {
- if (!ARY_EMBED_P(ary) && ARY_HEAP_PTR(ary) == ARY_HEAP_PTR(tmp)) {
+ assert(!ARY_EMBED_P(tmp));
+ if (ARY_HEAP_PTR(ary) == ARY_HEAP_PTR(tmp)) {
+ assert(!ARY_EMBED_P(ary));
FL_UNSET_SHARED(ary);
ARY_SET_CAPA(ary, RARRAY_LEN(tmp));
}
@@ -2470,9 +2330,9 @@ rb_ary_sort_bang(VALUE ary)
rb_ary_unshare(ary);
}
else {
- ruby_sized_xfree((void *)ARY_HEAP_PTR(ary), ARY_HEAP_SIZE(ary));
+ xfree(ARY_HEAP_PTR(ary));
}
- ARY_SET_PTR(ary, RARRAY_CONST_PTR(tmp));
+ ARY_SET_PTR(ary, RARRAY_PTR(tmp));
ARY_SET_HEAP_LEN(ary, len);
ARY_SET_CAPA(ary, RARRAY_LEN(tmp));
}
@@ -2483,7 +2343,7 @@ rb_ary_sort_bang(VALUE ary)
FL_SET(tmp, FL_FREEZE);
}
/* tmp will be GC'ed. */
- RBASIC_SET_CLASS_RAW(tmp, rb_cArray); /* rb_cArray must be marked */
+ RBASIC(tmp)->klass = rb_cArray;
}
return ary;
}
@@ -2578,7 +2438,6 @@ rb_ary_bsearch(VALUE ary)
int smaller = 0, satisfied = 0;
VALUE v, val;
- RETURN_ENUMERATOR(ary, 0, 0);
while (low < high) {
mid = low + ((high - low) / 2);
val = rb_ary_entry(ary, mid);
@@ -2595,17 +2454,14 @@ rb_ary_bsearch(VALUE ary)
smaller = 0;
}
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))) {
+ switch (rb_cmpint(rb_funcall(v, id_cmp, 1, INT2FIX(0)), v, INT2FIX(0))) {
case 0: return val;
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));
+ smaller = RTEST(v);
}
if (smaller) {
high = mid;
@@ -2621,7 +2477,7 @@ rb_ary_bsearch(VALUE ary)
static VALUE
-sort_by_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, dummy))
+sort_by_i(VALUE i)
{
return rb_yield(i);
}
@@ -2643,7 +2499,7 @@ rb_ary_sort_by_bang(VALUE ary)
{
VALUE sorted;
- RETURN_SIZED_ENUMERATOR(ary, 0, 0, ary_enum_length);
+ RETURN_SIZED_ENUMERATOR(ary, 0, 0, rb_ary_length);
rb_ary_modify(ary);
sorted = rb_block_call(ary, rb_intern("sort_by"), 0, 0, sort_by_i, 0);
rb_ary_replace(ary, sorted);
@@ -2667,9 +2523,8 @@ 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.map { |x| x + "!" } #=> ["a!", "b!", "c!", "d!"]
+ * a #=> ["a", "b", "c", "d"]
*/
static VALUE
@@ -2678,10 +2533,10 @@ rb_ary_collect(VALUE ary)
long i;
VALUE collect;
- RETURN_SIZED_ENUMERATOR(ary, 0, 0, ary_enum_length);
+ RETURN_SIZED_ENUMERATOR(ary, 0, 0, rb_ary_length);
collect = rb_ary_new2(RARRAY_LEN(ary));
for (i = 0; i < RARRAY_LEN(ary); i++) {
- rb_ary_push(collect, rb_yield(RARRAY_AREF(ary, i)));
+ rb_ary_push(collect, rb_yield(RARRAY_PTR(ary)[i]));
}
return collect;
}
@@ -2704,8 +2559,6 @@ rb_ary_collect(VALUE ary)
* a = [ "a", "b", "c", "d" ]
* a.map! {|x| x + "!" }
* a #=> [ "a!", "b!", "c!", "d!" ]
- * a.collect!.with_index {|x, i| x[0...i] }
- * a #=> ["", "b", "c!", "d!"]
*/
static VALUE
@@ -2713,10 +2566,10 @@ rb_ary_collect_bang(VALUE ary)
{
long i;
- RETURN_SIZED_ENUMERATOR(ary, 0, 0, ary_enum_length);
+ RETURN_SIZED_ENUMERATOR(ary, 0, 0, rb_ary_length);
rb_ary_modify(ary);
for (i = 0; i < RARRAY_LEN(ary); i++) {
- rb_ary_store(ary, i, rb_yield(RARRAY_AREF(ary, i)));
+ rb_ary_store(ary, i, rb_yield(RARRAY_PTR(ary)[i]));
}
return ary;
}
@@ -2796,10 +2649,10 @@ rb_ary_select(VALUE ary)
VALUE result;
long i;
- RETURN_SIZED_ENUMERATOR(ary, 0, 0, ary_enum_length);
+ RETURN_SIZED_ENUMERATOR(ary, 0, 0, rb_ary_length);
result = rb_ary_new2(RARRAY_LEN(ary));
for (i = 0; i < RARRAY_LEN(ary); i++) {
- if (RTEST(rb_yield(RARRAY_AREF(ary, i)))) {
+ if (RTEST(rb_yield(RARRAY_PTR(ary)[i]))) {
rb_ary_push(result, rb_ary_elt(ary, i));
}
}
@@ -2827,10 +2680,10 @@ rb_ary_select_bang(VALUE ary)
{
long i1, i2;
- RETURN_SIZED_ENUMERATOR(ary, 0, 0, ary_enum_length);
+ RETURN_SIZED_ENUMERATOR(ary, 0, 0, rb_ary_length);
rb_ary_modify(ary);
for (i1 = i2 = 0; i1 < RARRAY_LEN(ary); i1++) {
- VALUE v = RARRAY_AREF(ary, i1);
+ VALUE v = RARRAY_PTR(ary)[i1];
if (!RTEST(rb_yield(v))) continue;
if (i1 != i2) {
rb_ary_store(ary, i2, v);
@@ -2838,8 +2691,8 @@ rb_ary_select_bang(VALUE ary)
i2++;
}
- if (i1 == i2) return Qnil;
- if (i2 < i1)
+ if (RARRAY_LEN(ary) == i2) return Qnil;
+ if (i2 < RARRAY_LEN(ary))
ARY_SET_LEN(ary, i2);
return ary;
}
@@ -2863,7 +2716,7 @@ rb_ary_select_bang(VALUE ary)
static VALUE
rb_ary_keep_if(VALUE ary)
{
- RETURN_SIZED_ENUMERATOR(ary, 0, 0, ary_enum_length);
+ RETURN_SIZED_ENUMERATOR(ary, 0, 0, rb_ary_length);
rb_ary_select_bang(ary);
return ary;
}
@@ -2908,7 +2761,7 @@ rb_ary_delete(VALUE ary, VALUE item)
long i1, i2;
for (i1 = i2 = 0; i1 < RARRAY_LEN(ary); i1++) {
- VALUE e = RARRAY_AREF(ary, i1);
+ VALUE e = RARRAY_PTR(ary)[i1];
if (rb_equal(e, item)) {
v = e;
@@ -2937,7 +2790,7 @@ rb_ary_delete_same(VALUE ary, VALUE item)
long i1, i2;
for (i1 = i2 = 0; i1 < RARRAY_LEN(ary); i1++) {
- VALUE e = RARRAY_AREF(ary, i1);
+ VALUE e = RARRAY_PTR(ary)[i1];
if (e == item) {
continue;
@@ -2967,10 +2820,9 @@ rb_ary_delete_at(VALUE ary, long pos)
}
rb_ary_modify(ary);
- del = RARRAY_AREF(ary, pos);
- RARRAY_PTR_USE(ary, ptr, {
- MEMMOVE(ptr+pos, ptr+pos+1, VALUE, len-pos-1);
- });
+ del = RARRAY_PTR(ary)[pos];
+ MEMMOVE(RARRAY_PTR(ary)+pos, RARRAY_PTR(ary)+pos+1, VALUE,
+ RARRAY_LEN(ary)-pos-1);
ARY_INCREASE_LEN(ary, -1);
return del;
@@ -3040,8 +2892,8 @@ rb_ary_slice_bang(int argc, VALUE *argv, VALUE ary)
len = orig_len - pos;
}
if (len == 0) return rb_ary_new2(0);
- arg2 = rb_ary_new4(len, RARRAY_CONST_PTR(ary)+pos);
- RBASIC_SET_CLASS(arg2, rb_obj_class(ary));
+ arg2 = rb_ary_new4(len, RARRAY_PTR(ary)+pos);
+ RBASIC(arg2)->klass = rb_obj_class(ary);
rb_ary_splice(ary, pos, len, Qundef);
return arg2;
}
@@ -3075,7 +2927,7 @@ ary_reject(VALUE orig, VALUE result)
long i;
for (i = 0; i < RARRAY_LEN(orig); i++) {
- VALUE v = RARRAY_AREF(orig, i);
+ VALUE v = RARRAY_PTR(orig)[i];
if (!RTEST(rb_yield(v))) {
rb_ary_push_1(result, v);
}
@@ -3091,7 +2943,7 @@ ary_reject_bang(VALUE ary)
rb_ary_modify_check(ary);
for (i = 0; i < RARRAY_LEN(ary); ) {
- VALUE v = RARRAY_AREF(ary, i);
+ VALUE v = RARRAY_PTR(ary)[i];
if (RTEST(rb_yield(v))) {
rb_ary_delete_at(ary, i);
result = ary;
@@ -3122,7 +2974,7 @@ ary_reject_bang(VALUE ary)
static VALUE
rb_ary_reject_bang(VALUE ary)
{
- RETURN_SIZED_ENUMERATOR(ary, 0, 0, ary_enum_length);
+ RETURN_SIZED_ENUMERATOR(ary, 0, 0, rb_ary_length);
return ary_reject_bang(ary);
}
@@ -3144,7 +2996,7 @@ rb_ary_reject(VALUE ary)
{
VALUE rejected_ary;
- RETURN_SIZED_ENUMERATOR(ary, 0, 0, ary_enum_length);
+ RETURN_SIZED_ENUMERATOR(ary, 0, 0, rb_ary_length);
rejected_ary = rb_ary_new();
ary_reject(ary, rejected_ary);
return rejected_ary;
@@ -3164,22 +3016,21 @@ rb_ary_reject(VALUE ary)
*
* If no block is given, an Enumerator is returned instead.
*
- * scores = [ 97, 42, 75 ]
- * scores.delete_if {|score| score < 80 } #=> [97]
+ * a = [ "a", "b", "c" ]
+ * a.delete_if {|x| x >= "b" } #=> ["a"]
*/
static VALUE
rb_ary_delete_if(VALUE ary)
{
- RETURN_SIZED_ENUMERATOR(ary, 0, 0, ary_enum_length);
+ RETURN_SIZED_ENUMERATOR(ary, 0, 0, rb_ary_length);
ary_reject_bang(ary);
return ary;
}
static VALUE
-take_i(RB_BLOCK_CALL_FUNC_ARGLIST(val, cbarg))
+take_i(VALUE val, VALUE *args, int argc, VALUE *argv)
{
- VALUE *args = (VALUE *)cbarg;
if (args[1]-- == 0) rb_iter_break();
if (argc > 1) val = rb_ary_new4(argc, argv);
rb_ary_push(args[0], val);
@@ -3196,8 +3047,7 @@ take_items(VALUE obj, long n)
result = rb_ary_new2(n);
args[0] = result; args[1] = (VALUE)n;
if (rb_check_block_call(obj, idEach, 0, 0, take_i, (VALUE)args) == Qundef)
- rb_raise(rb_eTypeError, "wrong argument type %"PRIsVALUE" (must respond to :each)",
- rb_obj_class(obj));
+ Check_Type(obj, T_ARRAY);
return result;
}
@@ -3211,7 +3061,7 @@ take_items(VALUE obj, long n)
* corresponding elements from each argument.
*
* This generates a sequence of <code>ary.size</code> _n_-element arrays,
- * where _n_ is one more than the count of arguments.
+ * where _n_ is one more that the count of arguments.
*
* If the size of any argument is less than the size of the initial array,
* +nil+ values are supplied.
@@ -3230,53 +3080,31 @@ static VALUE
rb_ary_zip(int argc, VALUE *argv, VALUE ary)
{
int i, j;
- long len = RARRAY_LEN(ary);
+ long len;
VALUE result = Qnil;
+ len = RARRAY_LEN(ary);
for (i=0; i<argc; i++) {
argv[i] = take_items(argv[i], len);
}
+ if (!rb_block_given_p()) {
+ result = rb_ary_new2(len);
+ }
- if (rb_block_given_p()) {
- int arity = rb_block_arity();
-
- if (arity > 1 && argc+1 < 0x100) {
- VALUE *tmp = ALLOCA_N(VALUE, argc+1);
+ for (i=0; i<RARRAY_LEN(ary); i++) {
+ VALUE tmp = rb_ary_new2(argc+1);
- for (i=0; i<RARRAY_LEN(ary); i++) {
- tmp[0] = RARRAY_AREF(ary, i);
- for (j=0; j<argc; j++) {
- tmp[j+1] = rb_ary_elt(argv[j], i);
- }
- rb_yield_values2(argc+1, tmp);
- }
+ rb_ary_push(tmp, rb_ary_elt(ary, i));
+ for (j=0; j<argc; j++) {
+ rb_ary_push(tmp, rb_ary_elt(argv[j], i));
}
- else {
- for (i=0; i<RARRAY_LEN(ary); i++) {
- VALUE tmp = rb_ary_new2(argc+1);
-
- rb_ary_push(tmp, RARRAY_AREF(ary, i));
- for (j=0; j<argc; j++) {
- rb_ary_push(tmp, rb_ary_elt(argv[j], i));
- }
- rb_yield(tmp);
- }
+ if (NIL_P(result)) {
+ rb_yield(tmp);
}
- }
- else {
- result = rb_ary_new_capa(len);
-
- for (i=0; i<len; i++) {
- VALUE tmp = rb_ary_new_capa(argc+1);
-
- rb_ary_push(tmp, RARRAY_AREF(ary, i));
- for (j=0; j<argc; j++) {
- rb_ary_push(tmp, rb_ary_elt(argv[j], i));
- }
+ else {
rb_ary_push(result, tmp);
}
}
-
return result;
}
@@ -3324,7 +3152,6 @@ rb_ary_transpose(VALUE ary)
/*
* call-seq:
* ary.replace(other_ary) -> ary
- * ary.initialize_copy(other_ary) -> ary
*
* Replaces the contents of +self+ with the contents of +other_ary+,
* truncating or expanding if necessary.
@@ -3342,17 +3169,19 @@ rb_ary_replace(VALUE copy, VALUE orig)
if (copy == orig) return copy;
if (RARRAY_LEN(orig) <= RARRAY_EMBED_LEN_MAX) {
+ VALUE *ptr;
VALUE shared = 0;
if (ARY_OWNS_HEAP_P(copy)) {
- RARRAY_PTR_USE(copy, ptr, ruby_sized_xfree(ptr, ARY_HEAP_SIZE(copy)));
- }
+ xfree(RARRAY_PTR(copy));
+ }
else if (ARY_SHARED_P(copy)) {
shared = ARY_SHARED(copy);
FL_UNSET_SHARED(copy);
}
FL_SET_EMBED(copy);
- ary_memcpy(copy, 0, RARRAY_LEN(orig), RARRAY_CONST_PTR(orig));
+ ptr = RARRAY_PTR(orig);
+ MEMCPY(RARRAY_PTR(copy), ptr, VALUE, RARRAY_LEN(orig));
if (shared) {
rb_ary_decrement_share(shared);
}
@@ -3361,13 +3190,13 @@ rb_ary_replace(VALUE copy, VALUE orig)
else {
VALUE shared = ary_make_shared(orig);
if (ARY_OWNS_HEAP_P(copy)) {
- RARRAY_PTR_USE(copy, ptr, ruby_sized_xfree(ptr, ARY_HEAP_SIZE(copy)));
+ xfree(RARRAY_PTR(copy));
}
else {
rb_ary_unshare_safe(copy);
}
FL_UNSET_EMBED(copy);
- ARY_SET_PTR(copy, RARRAY_CONST_PTR(orig));
+ ARY_SET_PTR(copy, RARRAY_PTR(orig));
ARY_SET_LEN(copy, RARRAY_LEN(orig));
rb_ary_set_shared(copy, shared);
}
@@ -3436,6 +3265,7 @@ rb_ary_fill(int argc, VALUE *argv, VALUE ary)
{
VALUE item, arg1, arg2;
long beg = 0, end = 0, len = 0;
+ VALUE *p, *pend;
int block_p = FALSE;
if (rb_block_given_p()) {
@@ -3477,7 +3307,7 @@ rb_ary_fill(int argc, VALUE *argv, VALUE ary)
if (end >= ARY_CAPA(ary)) {
ary_resize_capa(ary, end);
}
- ary_mem_clear(ary, RARRAY_LEN(ary), end - RARRAY_LEN(ary));
+ rb_mem_clear(RARRAY_PTR(ary) + RARRAY_LEN(ary), end - RARRAY_LEN(ary));
ARY_SET_LEN(ary, end);
}
@@ -3488,11 +3318,15 @@ 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);
+ RARRAY_PTR(ary)[i] = v;
}
}
else {
- ary_memfill(ary, beg, len, item);
+ p = RARRAY_PTR(ary) + beg;
+ pend = p + len;
+ while (p < pend) {
+ *p++ = item;
+ }
}
return ary;
}
@@ -3506,9 +3340,8 @@ rb_ary_fill(int argc, VALUE *argv, VALUE ary)
*
* [ 1, 2, 3 ] + [ 4, 5 ] #=> [ 1, 2, 3, 4, 5 ]
* a = [ "a", "b", "c" ]
- * c = a + [ "d", "e", "f" ]
- * c #=> [ "a", "b", "c", "d", "e", "f" ]
- * a #=> [ "a", "b", "c" ]
+ * a + [ "d", "e", "f" ]
+ * a #=> [ "a", "b", "c", "d", "e", "f" ]
*
* See also Array#concat.
*/
@@ -3517,16 +3350,13 @@ VALUE
rb_ary_plus(VALUE x, VALUE y)
{
VALUE z;
- long len, xlen, ylen;
+ long len;
y = to_ary(y);
- xlen = RARRAY_LEN(x);
- ylen = RARRAY_LEN(y);
- len = xlen + ylen;
+ len = RARRAY_LEN(x) + RARRAY_LEN(y);
z = rb_ary_new2(len);
-
- ary_memcpy(z, 0, xlen, RARRAY_CONST_PTR(x));
- ary_memcpy(z, xlen, ylen, RARRAY_CONST_PTR(y));
+ MEMCPY(RARRAY_PTR(z), RARRAY_PTR(x), VALUE, RARRAY_LEN(x));
+ MEMCPY(RARRAY_PTR(z) + RARRAY_LEN(x), RARRAY_PTR(y), VALUE, RARRAY_LEN(y));
ARY_SET_LEN(z, len);
return z;
}
@@ -3577,8 +3407,7 @@ rb_ary_concat(VALUE x, VALUE y)
static VALUE
rb_ary_times(VALUE ary, VALUE times)
{
- VALUE ary2, tmp;
- const VALUE *ptr;
+ VALUE ary2, tmp, *ptr, *ptr2;
long t, len;
tmp = rb_check_string_type(times);
@@ -3602,16 +3431,17 @@ rb_ary_times(VALUE ary, VALUE times)
ary2 = ary_new(rb_obj_class(ary), len);
ARY_SET_LEN(ary2, len);
- ptr = RARRAY_CONST_PTR(ary);
+ ptr = RARRAY_PTR(ary);
+ ptr2 = RARRAY_PTR(ary2);
t = RARRAY_LEN(ary);
if (0 < t) {
- ary_memcpy(ary2, 0, t, ptr);
- while (t <= len/2) {
- ary_memcpy(ary2, t, t, RARRAY_CONST_PTR(ary2));
+ MEMCPY(ptr2, ptr, VALUE, t);
+ while (t <= len/2) {
+ MEMCPY(ptr2+t, ptr2, VALUE, t);
t *= 2;
}
if (t < len) {
- ary_memcpy(ary2, t, len-t, RARRAY_CONST_PTR(ary2));
+ MEMCPY(ptr2+t, ptr2, VALUE, len-t);
}
}
out:
@@ -3647,9 +3477,9 @@ rb_ary_assoc(VALUE ary, VALUE key)
VALUE v;
for (i = 0; i < RARRAY_LEN(ary); ++i) {
- v = rb_check_array_type(RARRAY_AREF(ary, i));
+ v = rb_check_array_type(RARRAY_PTR(ary)[i]);
if (!NIL_P(v) && RARRAY_LEN(v) > 0 &&
- rb_equal(RARRAY_AREF(v, 0), key))
+ rb_equal(RARRAY_PTR(v)[0], key))
return v;
}
return Qnil;
@@ -3680,10 +3510,10 @@ rb_ary_rassoc(VALUE ary, VALUE value)
VALUE v;
for (i = 0; i < RARRAY_LEN(ary); ++i) {
- v = RARRAY_AREF(ary, i);
+ v = RARRAY_PTR(ary)[i];
if (RB_TYPE_P(v, T_ARRAY) &&
RARRAY_LEN(v) > 1 &&
- rb_equal(RARRAY_AREF(v, 1), value))
+ rb_equal(RARRAY_PTR(v)[1], value))
return v;
}
return Qnil;
@@ -3693,12 +3523,12 @@ static VALUE
recursive_equal(VALUE ary1, VALUE ary2, int recur)
{
long i, len1;
- const VALUE *p1, *p2;
+ VALUE *p1, *p2;
if (recur) return Qtrue; /* Subtle! */
- p1 = RARRAY_CONST_PTR(ary1);
- p2 = RARRAY_CONST_PTR(ary2);
+ p1 = RARRAY_PTR(ary1);
+ p2 = RARRAY_PTR(ary2);
len1 = RARRAY_LEN(ary1);
for (i = 0; i < len1; i++) {
@@ -3709,8 +3539,8 @@ recursive_equal(VALUE ary1, VALUE ary2, int recur)
return Qfalse;
if (len1 < i)
return Qtrue;
- p1 = RARRAY_CONST_PTR(ary1) + i;
- p2 = RARRAY_CONST_PTR(ary2) + i;
+ p1 = RARRAY_PTR(ary1) + i;
+ p2 = RARRAY_PTR(ary2) + i;
}
else {
return Qfalse;
@@ -3747,7 +3577,6 @@ rb_ary_equal(VALUE ary1, VALUE ary2)
return rb_equal(ary2, ary1);
}
if (RARRAY_LEN(ary1) != RARRAY_LEN(ary2)) return Qfalse;
- if (RARRAY_CONST_PTR(ary1) == RARRAY_CONST_PTR(ary2)) return Qtrue;
return rb_exec_recursive_paired(recursive_equal, ary1, ary2, ary2);
}
@@ -3769,7 +3598,7 @@ recursive_eql(VALUE ary1, VALUE ary2, int recur)
* ary.eql?(other) -> true or false
*
* Returns +true+ if +self+ and +other+ are the same object,
- * or are both arrays with the same content (according to Object#eql?).
+ * or are both arrays with the same content.
*/
static VALUE
@@ -3778,10 +3607,30 @@ rb_ary_eql(VALUE ary1, VALUE ary2)
if (ary1 == ary2) return Qtrue;
if (!RB_TYPE_P(ary2, T_ARRAY)) return Qfalse;
if (RARRAY_LEN(ary1) != RARRAY_LEN(ary2)) return Qfalse;
- if (RARRAY_CONST_PTR(ary1) == RARRAY_CONST_PTR(ary2)) return Qtrue;
return rb_exec_recursive_paired(recursive_eql, ary1, ary2, ary2);
}
+static VALUE
+recursive_hash(VALUE ary, VALUE dummy, int recur)
+{
+ long i;
+ st_index_t h;
+ VALUE n;
+
+ h = rb_hash_start(RARRAY_LEN(ary));
+ if (recur) {
+ h = rb_hash_uint(h, NUM2LONG(rb_hash(rb_cArray)));
+ }
+ else {
+ for (i=0; i<RARRAY_LEN(ary); i++) {
+ n = rb_hash(RARRAY_PTR(ary)[i]);
+ h = rb_hash_uint(h, NUM2LONG(n));
+ }
+ }
+ h = rb_hash_end(h);
+ return LONG2FIX(h);
+}
+
/*
* call-seq:
* ary.hash -> fixnum
@@ -3795,18 +3644,7 @@ rb_ary_eql(VALUE ary1, VALUE ary2)
static VALUE
rb_ary_hash(VALUE ary)
{
- long i;
- st_index_t h;
- VALUE n;
-
- h = rb_hash_start(RARRAY_LEN(ary));
- h = rb_hash_uint(h, (st_index_t)rb_ary_hash);
- for (i=0; i<RARRAY_LEN(ary); i++) {
- n = rb_hash(RARRAY_AREF(ary, i));
- h = rb_hash_uint(h, NUM2LONG(n));
- }
- h = rb_hash_end(h);
- return LONG2FIX(h);
+ return rb_exec_recursive_outer(recursive_hash, ary, 0);
}
/*
@@ -3814,7 +3652,7 @@ rb_ary_hash(VALUE ary)
* ary.include?(object) -> true or false
*
* Returns +true+ if the given +object+ is present in +self+ (that is, if any
- * element <code>==</code> +object+), otherwise returns +false+.
+ * object <code>==</code> +object+), otherwise returns +false+.
*
* a = [ "a", "b", "c" ]
* a.include?("b") #=> true
@@ -3827,7 +3665,7 @@ rb_ary_includes(VALUE ary, VALUE item)
long i;
for (i=0; i<RARRAY_LEN(ary); i++) {
- if (rb_equal(RARRAY_AREF(ary, i), item)) {
+ if (rb_equal(RARRAY_PTR(ary)[i], item)) {
return Qtrue;
}
}
@@ -3846,8 +3684,7 @@ recursive_cmp(VALUE ary1, VALUE ary2, int recur)
len = RARRAY_LEN(ary2);
}
for (i=0; i<len; i++) {
- VALUE e1 = rb_ary_elt(ary1, i), e2 = rb_ary_elt(ary2, i);
- VALUE v = rb_funcallv(e1, id_cmp, 1, &e2);
+ VALUE v = rb_funcall(rb_ary_elt(ary1, i), id_cmp, 1, rb_ary_elt(ary2, i));
if (v != INT2FIX(0)) {
return v;
}
@@ -3862,8 +3699,6 @@ 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
@@ -3903,8 +3738,7 @@ ary_add_hash(VALUE hash, VALUE ary)
long i;
for (i=0; i<RARRAY_LEN(ary); i++) {
- VALUE elt = RARRAY_AREF(ary, i);
- rb_hash_aset(hash, elt, elt);
+ rb_hash_aset(hash, RARRAY_PTR(ary)[i], Qtrue);
}
return hash;
}
@@ -3914,7 +3748,7 @@ ary_tmp_hash_new(void)
{
VALUE hash = rb_hash_new();
- RBASIC_CLEAR_CLASS(hash);
+ RBASIC(hash)->klass = 0;
return hash;
}
@@ -3963,10 +3797,9 @@ ary_recycle_hash(VALUE hash)
* Array Difference
*
* Returns a new array that is a copy of the original array, removing any
- * items that also appear in +other_ary+. The order is preserved from the
- * original array.
+ * items that also appear in +other_ary+.
*
- * It compares elements using their #hash and #eql? methods for efficiency.
+ * It compares elements using their hash (returned by the Object#hash method).
*
* [ 1, 1, 2, 2, 3, 3, 4, 5 ] - [ 1, 2, 4 ] #=> [ 3, 3, 5 ]
*
@@ -3984,7 +3817,7 @@ rb_ary_diff(VALUE ary1, VALUE ary2)
ary3 = rb_ary_new();
for (i=0; i<RARRAY_LEN(ary1); i++) {
- if (st_lookup(rb_hash_tbl_raw(hash), RARRAY_AREF(ary1, i), 0)) continue;
+ if (st_lookup(RHASH_TBL(hash), RARRAY_PTR(ary1)[i], 0)) continue;
rb_ary_push(ary3, rb_ary_elt(ary1, i));
}
ary_recycle_hash(hash);
@@ -3996,10 +3829,7 @@ rb_ary_diff(VALUE ary1, VALUE ary2)
* ary & other_ary -> new_ary
*
* Set Intersection --- Returns a new array containing elements common to the
- * two arrays, excluding any duplicates. The order is preserved from the
- * original array.
- *
- * It compares elements using their #hash and #eql? methods for efficiency.
+ * two arrays, excluding any duplicates.
*
* [ 1, 1, 3, 5 ] & [ 1, 2, 3 ] #=> [ 1, 3 ]
* [ 'a', 'b', 'b', 'z' ] & [ 'a', 'b', 'c' ] #=> [ 'a', 'b' ]
@@ -4012,20 +3842,20 @@ static VALUE
rb_ary_and(VALUE ary1, VALUE ary2)
{
VALUE hash, ary3, v;
- st_table *table;
st_data_t vv;
long i;
ary2 = to_ary(ary2);
- ary3 = rb_ary_new();
- if (RARRAY_LEN(ary2) == 0) return ary3;
+ ary3 = rb_ary_new2(RARRAY_LEN(ary1) < RARRAY_LEN(ary2) ?
+ RARRAY_LEN(ary1) : RARRAY_LEN(ary2));
hash = ary_make_hash(ary2);
- table = rb_hash_tbl_raw(hash);
+
+ if (RHASH_EMPTY_P(hash))
+ return ary3;
for (i=0; i<RARRAY_LEN(ary1); i++) {
- v = RARRAY_AREF(ary1, i);
- vv = (st_data_t)v;
- if (st_delete(table, &vv, 0)) {
+ vv = (st_data_t)(v = rb_ary_elt(ary1, i));
+ if (st_delete(RHASH_TBL(hash), &vv, 0)) {
rb_ary_push(ary3, v);
}
}
@@ -4034,22 +3864,12 @@ rb_ary_and(VALUE ary1, VALUE ary2)
return ary3;
}
-static int
-ary_hash_orset(st_data_t *key, st_data_t *value, st_data_t arg, int existing)
-{
- if (existing) return ST_STOP;
- *key = *value = (VALUE)arg;
- return ST_CONTINUE;
-}
-
/*
* call-seq:
* ary | other_ary -> new_ary
*
* Set Union --- Returns a new array by joining +ary+ with +other_ary+,
- * excluding any duplicates and preserving the order from the original array.
- *
- * It compares elements using their #hash and #eql? methods for efficiency.
+ * excluding any duplicates.
*
* [ "a", "b", "c" ] | [ "c", "d", "a" ] #=> [ "a", "b", "c", "d" ]
*
@@ -4059,19 +3879,26 @@ ary_hash_orset(st_data_t *key, st_data_t *value, st_data_t arg, int existing)
static VALUE
rb_ary_or(VALUE ary1, VALUE ary2)
{
- VALUE hash, ary3;
+ VALUE hash, ary3, v;
+ st_data_t vv;
long i;
ary2 = to_ary(ary2);
- hash = ary_make_hash(ary1);
+ ary3 = rb_ary_new2(RARRAY_LEN(ary1)+RARRAY_LEN(ary2));
+ hash = ary_add_hash(ary_make_hash(ary1), ary2);
+ for (i=0; i<RARRAY_LEN(ary1); i++) {
+ vv = (st_data_t)(v = rb_ary_elt(ary1, i));
+ if (st_delete(RHASH_TBL(hash), &vv, 0)) {
+ rb_ary_push(ary3, v);
+ }
+ }
for (i=0; i<RARRAY_LEN(ary2); i++) {
- VALUE elt = RARRAY_AREF(ary2, i);
- if (!st_update(RHASH_TBL_RAW(hash), (st_data_t)elt, ary_hash_orset, (st_data_t)elt)) {
- RB_OBJ_WRITTEN(hash, Qundef, elt);
+ vv = (st_data_t)(v = rb_ary_elt(ary2, i));
+ if (st_delete(RHASH_TBL(hash), &vv, 0)) {
+ rb_ary_push(ary3, v);
}
}
- ary3 = rb_hash_values(hash);
ary_recycle_hash(hash);
return ary3;
}
@@ -4093,8 +3920,6 @@ push_value(st_data_t key, st_data_t val, st_data_t ary)
* If a block is given, it will use the return value of the block for
* comparison.
*
- * It compares values using their #hash and #eql? methods for efficiency.
- *
* Returns +nil+ if no changes are made (that is, no duplicates are found).
*
* a = [ "a", "a", "b", "b", "c" ]
@@ -4111,29 +3936,38 @@ push_value(st_data_t key, st_data_t val, st_data_t ary)
static VALUE
rb_ary_uniq_bang(VALUE ary)
{
- VALUE hash;
- long hash_size;
+ VALUE hash, v;
+ long i, j;
rb_ary_modify_check(ary);
if (RARRAY_LEN(ary) <= 1)
return Qnil;
- if (rb_block_given_p())
+ if (rb_block_given_p()) {
hash = ary_make_hash_by(ary);
- else
- hash = ary_make_hash(ary);
-
- hash_size = RHASH_SIZE(hash);
- if (RARRAY_LEN(ary) == hash_size) {
- return Qnil;
+ if (RARRAY_LEN(ary) == (i = RHASH_SIZE(hash))) {
+ return Qnil;
+ }
+ ARY_SET_LEN(ary, 0);
+ if (ARY_SHARED_P(ary) && !ARY_EMBED_P(ary)) {
+ rb_ary_unshare(ary);
+ FL_SET_EMBED(ary);
+ }
+ ary_resize_capa(ary, i);
+ st_foreach(RHASH_TBL(hash), push_value, ary);
}
- rb_ary_modify_check(ary);
- ARY_SET_LEN(ary, 0);
- if (ARY_SHARED_P(ary) && !ARY_EMBED_P(ary)) {
- rb_ary_unshare(ary);
- FL_SET_EMBED(ary);
+ else {
+ hash = ary_make_hash(ary);
+ if (RARRAY_LEN(ary) == (long)RHASH_SIZE(hash)) {
+ return Qnil;
+ }
+ for (i=j=0; i<RARRAY_LEN(ary); i++) {
+ st_data_t vv = (st_data_t)(v = rb_ary_elt(ary, i));
+ if (st_delete(RHASH_TBL(hash), &vv, 0)) {
+ rb_ary_store(ary, j++, v);
+ }
+ }
+ ARY_SET_LEN(ary, j);
}
- ary_resize_capa(ary, hash_size);
- st_foreach(rb_hash_tbl_raw(hash), push_value, ary);
ary_recycle_hash(hash);
return ary;
@@ -4148,7 +3982,8 @@ rb_ary_uniq_bang(VALUE ary)
*
* If a block is given, it will use the return value of the block for comparison.
*
- * It compares values using their #hash and #eql? methods for efficiency.
+ * It compares elements using their hash (provided by the Object#hash method)
+ * then compares hashes with Object#eql?.
*
* a = [ "a", "a", "b", "b", "c" ]
* a.uniq # => ["a", "b", "c"]
@@ -4161,19 +3996,26 @@ rb_ary_uniq_bang(VALUE ary)
static VALUE
rb_ary_uniq(VALUE ary)
{
- VALUE hash, uniq;
+ VALUE hash, uniq, v;
+ long i;
if (RARRAY_LEN(ary) <= 1)
return rb_ary_dup(ary);
if (rb_block_given_p()) {
hash = ary_make_hash_by(ary);
- uniq = rb_hash_values(hash);
+ uniq = ary_new(rb_obj_class(ary), RHASH_SIZE(hash));
+ st_foreach(RHASH_TBL(hash), push_value, uniq);
}
else {
hash = ary_make_hash(ary);
- uniq = rb_hash_values(hash);
+ uniq = ary_new(rb_obj_class(ary), RHASH_SIZE(hash));
+ for (i=0; i<RARRAY_LEN(ary); i++) {
+ st_data_t vv = (st_data_t)(v = rb_ary_elt(ary, i));
+ if (st_delete(RHASH_TBL(hash), &vv, 0)) {
+ rb_ary_push(uniq, v);
+ }
+ }
}
- RBASIC_SET_CLASS(uniq, rb_obj_class(ary));
ary_recycle_hash(hash);
return uniq;
@@ -4198,18 +4040,21 @@ rb_ary_compact_bang(VALUE ary)
long n;
rb_ary_modify(ary);
- p = t = (VALUE *)RARRAY_CONST_PTR(ary); /* WB: no new reference */
+ p = t = RARRAY_PTR(ary);
end = p + RARRAY_LEN(ary);
while (t < end) {
if (NIL_P(*t)) t++;
else *p++ = *t++;
}
- n = p - RARRAY_CONST_PTR(ary);
+ n = p - RARRAY_PTR(ary);
if (RARRAY_LEN(ary) == n) {
return Qnil;
}
- ary_resize_smaller(ary, n);
+ ARY_SET_LEN(ary, n);
+ if (n * 2 < ARY_CAPA(ary) && ARY_DEFAULT_SIZE * 2 < ARY_CAPA(ary)) {
+ ary_resize_capa(ary, n * 2);
+ }
return ary;
}
@@ -4241,7 +4086,7 @@ rb_ary_compact(VALUE ary)
* Returns the number of elements.
*
* If an argument is given, counts the number of elements which equal +obj+
- * using <code>==</code>.
+ * using <code>===</code>.
*
* If a block is given, counts the number of elements for which the block
* returns a true value.
@@ -4256,28 +4101,27 @@ rb_ary_compact(VALUE ary)
static VALUE
rb_ary_count(int argc, VALUE *argv, VALUE ary)
{
- long i, n = 0;
+ long n = 0;
if (argc == 0) {
- VALUE v;
+ VALUE *p, *pend;
if (!rb_block_given_p())
return LONG2NUM(RARRAY_LEN(ary));
- for (i = 0; i < RARRAY_LEN(ary); i++) {
- v = RARRAY_AREF(ary, i);
- if (RTEST(rb_yield(v))) n++;
+ for (p = RARRAY_PTR(ary), pend = p + RARRAY_LEN(ary); p < pend; p++) {
+ if (RTEST(rb_yield(*p))) n++;
}
}
else {
- VALUE obj;
+ VALUE obj, *p, *pend;
rb_scan_args(argc, argv, "1", &obj);
if (rb_block_given_p()) {
rb_warn("given block not used");
}
- for (i = 0; i < RARRAY_LEN(ary); i++) {
- if (rb_equal(RARRAY_AREF(ary, i), obj)) n++;
+ for (p = RARRAY_PTR(ary), pend = p + RARRAY_LEN(ary); p < pend; p++) {
+ if (rb_equal(*p, obj)) n++;
}
}
@@ -4300,7 +4144,7 @@ flatten(VALUE ary, int level, int *modified)
while (1) {
while (i < RARRAY_LEN(ary)) {
- elt = RARRAY_AREF(ary, i++);
+ elt = RARRAY_PTR(ary)[i++];
tmp = rb_check_array_type(elt);
if (RBASIC(result)->klass) {
rb_raise(rb_eRuntimeError, "flatten reentered");
@@ -4334,14 +4178,14 @@ flatten(VALUE ary, int level, int *modified)
st_free_table(memo);
- RBASIC_SET_CLASS(result, rb_class_of(ary));
+ RBASIC(result)->klass = rb_class_of(ary);
return result;
}
/*
* call-seq:
- * ary.flatten! -> ary or nil
- * ary.flatten!(level) -> ary or nil
+ * ary.flatten! -> Array or nil
+ * ary.flatten!(level) -> Array or nil
*
* Flattens +self+ in place.
*
@@ -4421,7 +4265,7 @@ rb_ary_flatten(int argc, VALUE *argv, VALUE ary)
#define OPTHASH_GIVEN_P(opts) \
(argc > 0 && !NIL_P((opts) = rb_check_hash_type(argv[argc-1])) && (--argc, 1))
-static ID id_random;
+static VALUE sym_random;
#define RAND_UPTO(max) (long)rb_random_ulong_limited((randgen), (max)-1)
@@ -4438,34 +4282,28 @@ static ID id_random;
static VALUE
rb_ary_shuffle_bang(int argc, VALUE *argv, VALUE ary)
{
- VALUE opts, randgen = rb_cRandom;
- long i, len;
+ VALUE *ptr, opts, *snap_ptr, randgen = rb_cRandom;
+ long i, snap_len;
if (OPTHASH_GIVEN_P(opts)) {
- VALUE rnd;
- ID keyword_ids[1];
-
- keyword_ids[0] = id_random;
- rb_get_kwargs(opts, keyword_ids, 0, 1, &rnd);
- if (rnd != Qundef) {
- randgen = rnd;
- }
+ randgen = rb_hash_lookup2(opts, sym_random, randgen);
}
rb_check_arity(argc, 0, 0);
rb_ary_modify(ary);
- i = len = RARRAY_LEN(ary);
- RARRAY_PTR_USE(ary, ptr, {
- while (i) {
- long j = RAND_UPTO(i);
- VALUE tmp;
- if (len != RARRAY_LEN(ary) || ptr != RARRAY_CONST_PTR(ary)) {
- rb_raise(rb_eRuntimeError, "modified during shuffle");
- }
- tmp = ptr[--i];
- ptr[i] = ptr[j];
- ptr[j] = tmp;
+ i = RARRAY_LEN(ary);
+ ptr = RARRAY_PTR(ary);
+ snap_len = i;
+ snap_ptr = ptr;
+ while (i) {
+ long j = RAND_UPTO(i);
+ VALUE tmp;
+ if (snap_len != RARRAY_LEN(ary) || snap_ptr != RARRAY_PTR(ary)) {
+ rb_raise(rb_eRuntimeError, "modified during shuffle");
}
- }); /* WB: no new reference */
+ tmp = ptr[--i];
+ ptr[i] = ptr[j];
+ ptr[j] = tmp;
+ }
return ary;
}
@@ -4521,29 +4359,27 @@ rb_ary_shuffle(int argc, VALUE *argv, VALUE ary)
static VALUE
rb_ary_sample(int argc, VALUE *argv, VALUE ary)
{
- VALUE nv, result;
+ VALUE nv, result, *ptr;
VALUE opts, randgen = rb_cRandom;
long n, len, i, j, k, idx[10];
long rnds[numberof(idx)];
if (OPTHASH_GIVEN_P(opts)) {
- VALUE rnd;
- ID keyword_ids[1];
-
- keyword_ids[0] = id_random;
- rb_get_kwargs(opts, keyword_ids, 0, 1, &rnd);
- if (rnd != Qundef) {
- randgen = rnd;
- }
+ randgen = rb_hash_lookup2(opts, sym_random, randgen);
}
+ ptr = RARRAY_PTR(ary);
len = RARRAY_LEN(ary);
if (argc == 0) {
- if (len < 2)
+ if (len == 0) return Qnil;
+ if (len == 1) {
i = 0;
- else
+ }
+ else {
i = RAND_UPTO(len);
-
- return rb_ary_elt(ary, i);
+ if ((len = RARRAY_LEN(ary)) <= i) return Qnil;
+ ptr = RARRAY_PTR(ary);
+ }
+ return ptr[i];
}
rb_scan_args(argc, argv, "1", &nv);
n = NUM2LONG(nv);
@@ -4556,23 +4392,28 @@ rb_ary_sample(int argc, VALUE *argv, VALUE ary)
}
k = len;
len = RARRAY_LEN(ary);
- if (len < k && n <= numberof(idx)) {
- for (i = 0; i < n; ++i) {
- if (rnds[i] >= len) return rb_ary_new_capa(0);
+ ptr = RARRAY_PTR(ary);
+ if (len < k) {
+ if (n <= numberof(idx)) {
+ for (i = 0; i < n; ++i) {
+ if (rnds[i] >= len) {
+ return rb_ary_new2(0);
+ }
+ }
}
}
if (n > len) n = len;
switch (n) {
case 0:
- return rb_ary_new_capa(0);
+ return rb_ary_new2(0);
case 1:
i = rnds[0];
- return rb_ary_new_from_values(1, &RARRAY_AREF(ary, i));
+ return rb_ary_new4(1, &ptr[i]);
case 2:
i = rnds[0];
j = rnds[1];
if (j >= i) j++;
- return rb_ary_new_from_args(2, RARRAY_AREF(ary, i), RARRAY_AREF(ary, j));
+ return rb_ary_new3(2, ptr[i], ptr[j]);
case 3:
i = rnds[0];
j = rnds[1];
@@ -4582,9 +4423,10 @@ rb_ary_sample(int argc, VALUE *argv, VALUE ary)
if (j >= i) l = i, g = ++j;
if (k >= l && (++k >= g)) ++k;
}
- return rb_ary_new_from_args(3, RARRAY_AREF(ary, i), RARRAY_AREF(ary, j), RARRAY_AREF(ary, k));
+ return rb_ary_new3(3, ptr[i], ptr[j], ptr[k]);
}
if (n <= numberof(idx)) {
+ VALUE *ptr_result;
long sorted[numberof(idx)];
sorted[0] = idx[0] = rnds[0];
for (i=1; i<n; i++) {
@@ -4596,26 +4438,25 @@ rb_ary_sample(int argc, VALUE *argv, VALUE ary)
memmove(&sorted[j+1], &sorted[j], sizeof(sorted[0])*(i-j));
sorted[j] = idx[i] = k;
}
- result = rb_ary_new_capa(n);
- RARRAY_PTR_USE(result, ptr_result, {
- for (i=0; i<n; i++) {
- ptr_result[i] = RARRAY_AREF(ary, idx[i]);
- }
- });
+ result = rb_ary_new2(n);
+ ptr_result = RARRAY_PTR(result);
+ for (i=0; i<n; i++) {
+ ptr_result[i] = ptr[idx[i]];
+ }
}
else {
- result = rb_ary_dup(ary);
- RBASIC_CLEAR_CLASS(result);
+ VALUE *ptr_result;
+ result = rb_ary_new4(len, ptr);
+ RBASIC(result)->klass = 0;
+ ptr_result = RARRAY_PTR(result);
RB_GC_GUARD(ary);
- RARRAY_PTR_USE(result, ptr_result, {
- for (i=0; i<n; i++) {
- j = RAND_UPTO(len-i) + i;
- nv = ptr_result[j];
- ptr_result[j] = ptr_result[i];
- ptr_result[i] = nv;
- }
- });
- RBASIC_SET_CLASS_RAW(result, rb_cArray);
+ for (i=0; i<n; i++) {
+ j = RAND_UPTO(len-i) + i;
+ nv = ptr_result[j];
+ ptr_result[j] = ptr_result[i];
+ ptr_result[i] = nv;
+ }
+ RBASIC(result)->klass = rb_cArray;
}
ARY_SET_LEN(result, n);
@@ -4623,19 +4464,18 @@ rb_ary_sample(int argc, VALUE *argv, VALUE ary)
}
static VALUE
-rb_ary_cycle_size(VALUE self, VALUE args, VALUE eobj)
+rb_ary_cycle_size(VALUE self, VALUE args)
{
long mul;
VALUE n = Qnil;
if (args && (RARRAY_LEN(args) > 0)) {
- n = RARRAY_AREF(args, 0);
+ n = RARRAY_PTR(args)[0];
}
if (RARRAY_LEN(self) == 0) return INT2FIX(0);
if (n == Qnil) return DBL2NUM(INFINITY);
mul = NUM2LONG(n);
if (mul <= 0) return INT2FIX(0);
- n = LONG2FIX(mul);
- return rb_funcallv(rb_ary_length(self), '*', 1, &n);
+ return rb_funcall(rb_ary_length(self), '*', 1, LONG2FIX(mul));
}
/*
@@ -4677,16 +4517,16 @@ rb_ary_cycle(int argc, VALUE *argv, VALUE ary)
while (RARRAY_LEN(ary) > 0 && (n < 0 || 0 < n--)) {
for (i=0; i<RARRAY_LEN(ary); i++) {
- rb_yield(RARRAY_AREF(ary, i));
+ rb_yield(RARRAY_PTR(ary)[i]);
}
}
return Qnil;
}
#define tmpbuf(n, size) rb_str_tmp_new((n)*(size))
-#define tmpbuf_discard(s) (rb_str_resize((s), 0L), RBASIC_SET_CLASS_RAW(s, rb_cString))
+#define tmpbuf_discard(s) (rb_str_resize((s), 0L), RBASIC(s)->klass = rb_cString)
#define tmpary(n) rb_ary_tmp_new(n)
-#define tmpary_discard(a) (ary_discard(a), RBASIC_SET_CLASS_RAW(a, rb_cArray))
+#define tmpary_discard(a) (ary_discard(a), RBASIC(a)->klass = rb_cArray)
/*
* Recursively compute permutations of +r+ elements of the set
@@ -4743,8 +4583,7 @@ descending_factorial(long from, long how_many)
{
VALUE cnt = LONG2FIX(how_many >= 0);
while (how_many-- > 0) {
- VALUE v = LONG2FIX(from--);
- cnt = rb_funcallv(cnt, '*', 1, &v);
+ cnt = rb_funcall(cnt, '*', 1, LONG2FIX(from--));
}
return cnt;
}
@@ -4752,23 +4591,20 @@ descending_factorial(long from, long how_many)
static VALUE
binomial_coefficient(long comb, long size)
{
- VALUE r, v;
if (comb > size-comb) {
comb = size-comb;
}
if (comb < 0) {
return LONG2FIX(0);
}
- r = descending_factorial(size, comb);
- v = descending_factorial(comb, comb);
- return rb_funcallv(r, id_div, 1, &v);
+ return rb_funcall(descending_factorial(size, comb), id_div, 1, descending_factorial(comb, comb));
}
static VALUE
-rb_ary_permutation_size(VALUE ary, VALUE args, VALUE eobj)
+rb_ary_permutation_size(VALUE ary, VALUE args)
{
long n = RARRAY_LEN(ary);
- long k = (args && (RARRAY_LEN(args) > 0)) ? NUM2LONG(RARRAY_AREF(args, 0)) : n;
+ long k = (args && (RARRAY_LEN(args) > 0)) ? NUM2LONG(RARRAY_PTR(args)[0]) : n;
return descending_factorial(n, k);
}
@@ -4820,7 +4656,7 @@ rb_ary_permutation(int argc, VALUE *argv, VALUE ary)
}
else if (r == 1) { /* this is a special, easy case */
for (i = 0; i < RARRAY_LEN(ary); i++) {
- rb_yield(rb_ary_new3(1, RARRAY_AREF(ary, i)));
+ rb_yield(rb_ary_new3(1, RARRAY_PTR(ary)[i]));
}
}
else { /* this is the general case */
@@ -4829,23 +4665,23 @@ rb_ary_permutation(int argc, VALUE *argv, VALUE ary)
volatile VALUE t1 = tmpbuf(n,sizeof(char));
char *used = (char*)RSTRING_PTR(t1);
VALUE ary0 = ary_make_shared_copy(ary); /* private defensive copy of ary */
- RBASIC_CLEAR_CLASS(ary0);
+ RBASIC(ary0)->klass = 0;
MEMZERO(used, char, n); /* initialize array */
permute0(n, r, p, 0, used, ary0); /* compute and yield permutations */
tmpbuf_discard(t0);
tmpbuf_discard(t1);
- RBASIC_SET_CLASS_RAW(ary0, rb_cArray);
+ RBASIC(ary0)->klass = rb_cArray;
}
return ary;
}
static VALUE
-rb_ary_combination_size(VALUE ary, VALUE args, VALUE eobj)
+rb_ary_combination_size(VALUE ary, VALUE args)
{
long n = RARRAY_LEN(ary);
- long k = NUM2LONG(RARRAY_AREF(args, 0));
+ long k = NUM2LONG(RARRAY_PTR(args)[0]);
return binomial_coefficient(k, n);
}
@@ -4891,7 +4727,7 @@ rb_ary_combination(VALUE ary, VALUE num)
}
else if (n == 1) {
for (i = 0; i < len; i++) {
- rb_yield(rb_ary_new3(1, RARRAY_AREF(ary, i)));
+ rb_yield(rb_ary_new3(1, RARRAY_PTR(ary)[i]));
}
}
else {
@@ -4904,9 +4740,9 @@ rb_ary_combination(VALUE ary, VALUE num)
MEMZERO(stack, long, n);
stack[0] = -1;
for (;;) {
- chosen[lev] = RARRAY_AREF(ary, stack[lev+1]);
+ chosen[lev] = RARRAY_PTR(ary)[stack[lev+1]];
for (lev++; lev < n; lev++) {
- chosen[lev] = RARRAY_AREF(ary, stack[lev+1] = stack[lev]+1);
+ chosen[lev] = RARRAY_PTR(ary)[stack[lev+1] = stack[lev]+1];
}
rb_yield(rb_ary_new4(n, chosen));
if (RBASIC(t0)->klass) {
@@ -4965,18 +4801,16 @@ rpermute0(long n, long r, long *p, long index, VALUE values)
}
static VALUE
-rb_ary_repeated_permutation_size(VALUE ary, VALUE args, VALUE eobj)
+rb_ary_repeated_permutation_size(VALUE ary, VALUE args)
{
long n = RARRAY_LEN(ary);
- long k = NUM2LONG(RARRAY_AREF(args, 0));
- VALUE v;
+ long k = NUM2LONG(RARRAY_PTR(args)[0]);
if (k < 0) {
return LONG2FIX(0);
}
- v = LONG2NUM(k);
- return rb_funcallv(LONG2NUM(n), id_power, 1, &v);
+ return rb_funcall(LONG2NUM(n), id_power, 1, LONG2NUM(k));
}
/*
@@ -5019,18 +4853,18 @@ rb_ary_repeated_permutation(VALUE ary, VALUE num)
}
else if (r == 1) { /* this is a special, easy case */
for (i = 0; i < RARRAY_LEN(ary); i++) {
- rb_yield(rb_ary_new3(1, RARRAY_AREF(ary, i)));
+ rb_yield(rb_ary_new3(1, RARRAY_PTR(ary)[i]));
}
}
else { /* this is the general case */
volatile VALUE t0 = tmpbuf(r, sizeof(long));
long *p = (long*)RSTRING_PTR(t0);
VALUE ary0 = ary_make_shared_copy(ary); /* private defensive copy of ary */
- RBASIC_CLEAR_CLASS(ary0);
+ RBASIC(ary0)->klass = 0;
rpermute0(n, r, p, 0, ary0); /* compute and yield repeated permutations */
tmpbuf_discard(t0);
- RBASIC_SET_CLASS_RAW(ary0, rb_cArray);
+ RBASIC(ary0)->klass = rb_cArray;
}
return ary;
}
@@ -5060,10 +4894,10 @@ rcombinate0(long n, long r, long *p, long index, long rest, VALUE values)
}
static VALUE
-rb_ary_repeated_combination_size(VALUE ary, VALUE args, VALUE eobj)
+rb_ary_repeated_combination_size(VALUE ary, VALUE args)
{
long n = RARRAY_LEN(ary);
- long k = NUM2LONG(RARRAY_AREF(args, 0));
+ long k = NUM2LONG(RARRAY_PTR(args)[0]);
if (k == 0) {
return LONG2FIX(1);
}
@@ -5113,7 +4947,7 @@ rb_ary_repeated_combination(VALUE ary, VALUE num)
}
else if (n == 1) {
for (i = 0; i < len; i++) {
- rb_yield(rb_ary_new3(1, RARRAY_AREF(ary, i)));
+ rb_yield(rb_ary_new3(1, RARRAY_PTR(ary)[i]));
}
}
else if (len == 0) {
@@ -5123,11 +4957,11 @@ rb_ary_repeated_combination(VALUE ary, VALUE num)
volatile VALUE t0 = tmpbuf(n, sizeof(long));
long *p = (long*)RSTRING_PTR(t0);
VALUE ary0 = ary_make_shared_copy(ary); /* private defensive copy of ary */
- RBASIC_CLEAR_CLASS(ary0);
+ RBASIC(ary0)->klass = 0;
rcombinate0(len, n, p, 0, n, ary0); /* compute and yield repeated combinations */
tmpbuf_discard(t0);
- RBASIC_SET_CLASS_RAW(ary0, rb_cArray);
+ RBASIC(ary0)->klass = rb_cArray;
}
return ary;
}
@@ -5165,8 +4999,8 @@ rb_ary_product(int argc, VALUE *argv, VALUE ary)
long i,j;
long resultlen = 1;
- RBASIC_CLEAR_CLASS(t0);
- RBASIC_CLEAR_CLASS(t1);
+ RBASIC(t0)->klass = 0;
+ RBASIC(t1)->klass = 0;
/* initialize the arrays of arrays */
ARY_SET_LEN(t0, n);
@@ -5188,14 +5022,15 @@ rb_ary_product(int argc, VALUE *argv, VALUE ary)
else {
/* Compute the length of the result array; return [] if any is empty */
for (i = 0; i < n; i++) {
- long k = RARRAY_LEN(arrays[i]);
+ long k = RARRAY_LEN(arrays[i]), l = resultlen;
if (k == 0) {
result = rb_ary_new2(0);
goto done;
}
- if (MUL_OVERFLOW_LONG_P(resultlen, k))
- rb_raise(rb_eRangeError, "too big to product");
resultlen *= k;
+ if (resultlen < k || resultlen < l || resultlen / k != l) {
+ rb_raise(rb_eRangeError, "too big to product");
+ }
}
result = rb_ary_new2(resultlen);
}
@@ -5291,7 +5126,7 @@ rb_ary_take_while(VALUE ary)
RETURN_ENUMERATOR(ary, 0, 0);
for (i = 0; i < RARRAY_LEN(ary); i++) {
- if (!RTEST(rb_yield(RARRAY_AREF(ary, i)))) break;
+ if (!RTEST(rb_yield(RARRAY_PTR(ary)[i]))) break;
}
return rb_ary_take(ary, LONG2FIX(i));
}
@@ -5351,7 +5186,7 @@ rb_ary_drop_while(VALUE ary)
RETURN_ENUMERATOR(ary, 0, 0);
for (i = 0; i < RARRAY_LEN(ary); i++) {
- if (!RTEST(rb_yield(RARRAY_AREF(ary, i)))) break;
+ if (!RTEST(rb_yield(RARRAY_PTR(ary)[i]))) break;
}
return rb_ary_drop(ary, LONG2FIX(i));
}
@@ -5378,7 +5213,7 @@ rb_ary_drop_while(VALUE ary)
*
* ary = Array.new #=> []
* Array.new(3) #=> [nil, nil, nil]
- * Array.new(3, true) #=> [true, true, true]
+ * Array.new(3, true) #=> [0, 0, 0]
*
* Note that the second argument populates the array with references to the
* same object. Therefore, it is only recommended in cases when you need to
@@ -5396,11 +5231,6 @@ rb_ary_drop_while(VALUE ary)
* empty_table = Array.new(3) { Array.new(3) }
* #=> [[nil, nil, nil], [nil, nil, nil], [nil, nil, nil]]
*
- * An array can also be created by using the Array() method, provided by
- * Kernel, which tries to call #to_ary, then #to_a on its argument.
- *
- * Array({:a => "a", :b => "b"}) #=> [[:a, "a"], [:b, "b"]]
- *
* == Example Usage
*
* In addition to the methods it mixes in through the Enumerable module, the
@@ -5413,8 +5243,7 @@ rb_ary_drop_while(VALUE ary)
*
* Elements in an array can be retrieved using the Array#[] method. It can
* take a single integer argument (a numeric index), a pair of arguments
- * (start and length) or a range. Negative indices start counting from the end,
- * with -1 being the last element.
+ * (start and length) or a range.
*
* arr = [1, 2, 3, 4, 5, 6]
* arr[2] #=> 3
@@ -5422,7 +5251,6 @@ rb_ary_drop_while(VALUE ary)
* arr[-3] #=> 4
* arr[2, 3] #=> [3, 4, 5]
* arr[1..4] #=> [2, 3, 4, 5]
- * arr[1..-3] #=> [2, 3, 4]
*
* Another way to access a particular array element is by using the #at method
*
@@ -5511,8 +5339,7 @@ rb_ary_drop_while(VALUE ary)
* To delete a particular element anywhere in an array, use #delete:
*
* arr = [1, 2, 2, 3]
- * arr.delete(2) #=> 2
- * arr #=> [1,3]
+ * arr.delete(2) #=> [1, 3]
*
* A useful method if you need to remove +nil+ values from an array is
* #compact:
@@ -5547,10 +5374,10 @@ rb_ary_drop_while(VALUE ary)
* Another sometimes useful iterator is #reverse_each which will iterate over
* the elements in the array in reverse order.
*
- * words = %w[first second third fourth fifth sixth]
+ * words = %w[rats live on no evil star]
* str = ""
- * words.reverse_each { |word| str += "#{word} " }
- * p str #=> "sixth fifth fourth third second first "
+ * words.reverse_each { |word| str += "#{word.reverse} " }
+ * str #=> "rats live on no evil star "
*
* The #map method can be used to create a new array based on the original
* array, but with the values modified by the supplied block:
@@ -5572,7 +5399,7 @@ rb_ary_drop_while(VALUE ary)
*
* arr = [1, 2, 3, 4, 5, 6]
* arr.select { |a| a > 3 } #=> [4, 5, 6]
- * arr.reject { |a| a < 3 } #=> [3, 4, 5, 6]
+ * arr.reject { |a| a < 3 } #=> [4, 5, 6]
* arr.drop_while { |a| a < 4 } #=> [4, 5, 6]
* arr #=> [1, 2, 3, 4, 5, 6]
*
@@ -5611,7 +5438,6 @@ Init_Array(void)
rb_define_method(rb_cArray, "inspect", rb_ary_inspect, 0);
rb_define_alias(rb_cArray, "to_s", "inspect");
rb_define_method(rb_cArray, "to_a", rb_ary_to_a, 0);
- rb_define_method(rb_cArray, "to_h", rb_ary_to_h, 0);
rb_define_method(rb_cArray, "to_ary", rb_ary_to_ary_m, 0);
rb_define_method(rb_cArray, "frozen?", rb_ary_frozen_p, 0);
@@ -5707,7 +5533,7 @@ Init_Array(void)
rb_define_method(rb_cArray, "bsearch", rb_ary_bsearch, 0);
id_cmp = rb_intern("<=>");
- id_random = rb_intern("random");
+ sym_random = ID2SYM(rb_intern("random"));
id_div = rb_intern("div");
id_power = rb_intern("**");
}
diff --git a/bcc32/Makefile.sub b/bcc32/Makefile.sub
new file mode 100644
index 0000000000..1cd26a8643
--- /dev/null
+++ b/bcc32/Makefile.sub
@@ -0,0 +1,617 @@
+# -*- makefile -*-
+
+SHELL = $(COMSPEC)
+MKFILES = Makefile
+
+!ifndef MFLAGS
+MFLAGS=-
+!endif
+
+#### Start of system configuration section. ####
+!ifndef OS
+OS = bccwin32
+!endif
+!if !defined(RT)
+!error RT not defined. Retry from configure pass.
+!endif
+
+arch = $(ARCH)-$(OS)
+
+## variables may be overridden by $(compile_dir)/Makefile
+!ifndef srcdir
+srcdir = ..
+!endif
+!ifndef RUBY_INSTALL_NAME
+RUBY_INSTALL_NAME = ruby
+!endif
+!ifndef RUBYW_INSTALL_NAME
+RUBYW_INSTALL_NAME = $(RUBY_INSTALL_NAME:ruby=rubyw)
+!elif "$(RUBYW_INSTALL_NAME)" == "$(RUBY_INSTALL_NAME)"
+RUBYW_INSTALL_NAME = $(RUBY_INSTALL_NAME:ruby=rubyw)
+!endif
+!if "$(RUBYW_INSTALL_NAME)" == "$(RUBY_INSTALL_NAME)"
+RUBYW_INSTALL_NAME = $(RUBY_INSTALL_NAME)w
+!endif
+!ifndef RUBY_SO_NAME
+RUBY_SO_NAME = $(RT)-$(RUBY_INSTALL_NAME)$(MAJOR)$(MINOR)$(TEENY)
+!endif
+!ifndef icondirs
+!ifdef ICONDIRS
+icondirs=$(ICONDIRS)
+!endif
+!endif
+!ifdef icondirs
+icondirs=$(icondirs:\=/)
+iconinc=-I$(icondirs: = -I)
+!endif
+###############
+
+.SUFFIXES: .y
+
+!ifndef CC
+CC = bcc32
+!endif
+!ifndef CPP
+CPP = cpp32
+!endif
+!ifndef RC
+RC = brcc32
+!endif
+!ifndef YACC
+YACC = bison
+!endif
+!ifndef AR
+AR = tlib
+!endif
+!ifndef BASERUBY
+BASERUBY = ruby
+!endif
+
+PURIFY =
+AUTOCONF = autoconf
+IFCHANGE = $(srcdir:/=\)\win32\ifchange.bat
+RM = $(srcdir:/=\)\win32\rm.bat
+CP = copy > nul
+MV = move > nul
+
+!if !defined(PROCESSOR_ARCHITECTURE)
+PROCESSOR_ARCHITECTURE = x86
+!endif
+MACHINE = $(PROCESSOR_ARCHITECTURE)
+!if "$(PROCESSOR_ARCHITECTURE)" == "x86"
+!ifndef PROCESSOR_LEVEL
+PROCESSOR_LEVEL = 5
+!endif
+!if 6 < $(PROCESSOR_LEVEL)
+PROCESSOR_LEVEL = 6
+!endif
+PROCESSOR_FLAG = -$(PROCESSOR_LEVEL)
+CPU = i$(PROCESSOR_LEVEL)86
+ARCH = i386
+!else
+CPU = $(PROCESSOR_ARCHITECTURE)
+ARCH = $(PROCESSOR_ARCHITECTURE)
+!endif
+!ifndef DEBUGFLAGS
+DEBUGFLAGS =
+!endif
+!ifndef OPTFLAGS
+OPTFLAGS = -O
+!endif
+
+!ifndef prefix
+prefix = /usr
+!endif
+!ifndef exec_prefix
+exec_prefix = $(prefix)
+!endif
+!ifndef libdir
+libdir = $(exec_prefix)/lib
+!endif
+!if !defined(datadir)
+datadir = $(prefix)/share
+!endif
+!ifndef EXTOUT
+EXTOUT = .ext
+!endif
+!ifndef TESTUI
+TESTUI = console
+!endif
+!ifndef TESTS
+TESTS =
+!endif
+!ifndef RDOCTARGET
+RDOCTARGET = install-doc
+!endif
+
+OUTFLAG = -o
+COUTFLAG = -o
+!ifndef CFLAGS
+CFLAGS = -q -tWR -tWC $(DEBUGFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG) -w- -wsus -wcpt -wdup -wext -wrng -wrpt -wzdi
+!endif
+!ifndef DEFS
+DEFS =
+!endif
+!ifndef CPPFLAGS
+CPPFLAGS =
+!endif
+CPPFLAGS = $(DEFS) $(CPPFLAGS)
+!ifndef CXXFLAGS
+CXXFLAGS = $(CFLAGS)
+!endif
+!ifndef LDFLAGS
+LDFLAGS = -S:$(STACK)
+!endif
+!ifndef RFLAGS
+RFLAGS = $(iconinc)
+!endif
+!ifndef EXTLIBS
+EXTLIBS =
+!endif
+!ifndef MEMLIB
+MEMLIB =
+!endif
+LIBS = $(MEMLIB) cw32i.lib import32.lib ws2_32.lib $(EXTLIBS)
+MISSING = acosh.obj cbrt.obj crypt.obj erf.obj lgamma_r.obj strlcat.obj strlcpy.obj tgamma.obj win32.obj
+
+!ifndef STACK
+STACK = 0x2000000
+!endif
+
+XCFLAGS = -DRUBY_EXPORT -I. -I$(arch_hdrdir) -I$(hdrdir) -I$(srcdir) -I$(srcdir)/missing
+
+ARFLAGS = /a /p32
+LD = ilink32 -q -Gn
+LDSHARED = $(LD)
+XLDFLAGS = -Tpe c0x32.obj
+WLDFLAGS = -aa -Tpe c0w32.obj
+DLDFLAGS = -Tpd c0d32.obj
+LIBRUBY_LDSHARED = $(LDSHARED)
+LIBRUBY_DLDFLAGS = -Gi $(DLDFLAGS) $(EXTLDFLAGS)
+LDOBJECTS = $(MAINOBJ)
+
+SOLIBS =
+
+EXEEXT = .exe
+PROGRAM=$(RUBY_INSTALL_NAME)$(EXEEXT)
+WPROGRAM=$(RUBYW_INSTALL_NAME)$(EXEEXT)
+RUBYDEF = $(RUBY_SO_NAME).def
+MINIRUBY = .\miniruby$(EXEEXT) -I$(srcdir)/lib $(MINIRUBYOPT)
+RUNRUBY = .\$(PROGRAM) -i"$(EXTOUT)/$(arch)" "$(srcdir)/runruby.rb" --extout="$(EXTOUT)" --
+
+ORGLIBPATH = $(LIB)
+
+#### End of system configuration section. ####
+
+LIBRUBY_A = $(RUBY_SO_NAME)-static.lib
+LIBRUBY_SO = $(RUBY_SO_NAME).dll
+LIBRUBY = $(RUBY_SO_NAME).lib
+LIBRUBYARG = $(LIBRUBY)
+THREAD_MODEL = win32
+
+PREP = miniruby$(EXEEXT)
+
+OBJEXT = obj
+ASMEXT = asm
+
+INSTALLED_LIST= .installed.list
+
+MKMAIN_CMD = mkmain.bat
+
+SRC_FILE = $(<:\=/)
+
+WINMAINOBJ = winmain.$(OBJEXT)
+ARCHMINIOBJS = dmydln.$(OBJEXT)
+
+arch_hdrdir = $(EXTOUT)/include/$(arch)
+hdrdir = $(srcdir)/include
+VPATH = $(arch_hdrdir)/ruby;$(hdrdir)/ruby;$(srcdir);$(srcdir)/enc;$(srcdir)/missing;$(srcdir)/win32
+
+.path.c = .;$(srcdir);$(srcdir)/enc;$(srcdir)/win32;$(srcdir)/missing
+.path.ci = $(srcdir)
+.path.inc = .;$(srcdir)
+.path.def = .;$(srcdir)
+.path.h = .;$(arch_hdrdir)/ruby;$(hdrdir)/ruby;$(srcdir);$(srcdir)/win32;$(srcdir)/missing
+.path.y = $(srcdir)
+.path. = $(srcdir)
+
+.c.obj:
+ $(CC) $(CFLAGS) $(XCFLAGS) -I. $(CPPFLAGS) $(COUTFLAG)$@ -c $(<:/=\)
+
+.c.asm:
+ $(CC) $(CFLAGS) $(XCFLAGS) -I. $(CPPFLAGS) $(COUTFLAG)$@ -S $(<:\=/)
+
+.rc.res:
+ $(RC) $(RFLAGS) -I. -I$(<D). $(iconinc) -I$(srcdir)/win32 $(RFLAGS) -fo$@ $(<:/=\)
+
+all: $(srcdir)/bcc32/Makefile.sub $(srcdir)/common.mk
+
+ruby: $(PROGRAM)
+rubyw: $(WPROGRAM)
+
+!include $(srcdir)/common.mk
+
+$(MKFILES): $(srcdir)/bcc32/Makefile.sub $(srcdir)/bcc32/configure.bat $(srcdir)/bcc32/setup.mak
+ $(COMSPEC) /C $(srcdir:/=\)\bcc32\configure.bat $(configure_args)
+ @echo $(MKFILES) should be updated, re-run $(MAKE).
+ @$(MAKE) > nul -q -f &&|
+PHONY: nul
+ @exit
+|
+
+PHONY: nul
+
+RUBY_CONFIG_H = $(arch_hdrdir)/ruby/config.h
+CONFIG_H = ./.config.h.time
+
+config: config.status
+
+config.status: $(CONFIG_H)
+
+guard = INCLUDE_RUBY_CONFIG_H
+
+$(CONFIG_H): $(MKFILES) $(srcdir)/bcc32/Makefile.sub
+ @if not exist $(arch_hdrdir:/=\) md $(arch_hdrdir:/=\)
+ @if not exist $(arch_hdrdir:/=\)\ruby md $(arch_hdrdir:/=\)\ruby
+ @$(IFCHANGE) $(RUBY_CONFIG_H:/=\) &&|
+\#ifndef $(guard)
+\#define $(guard) 1
+\#define NO_BIG_INLINE 1
+\#define HAVE_SYS_TYPES_H 1
+\#define HAVE_SYS_STAT_H 1
+\#define HAVE_STDLIB_H 1
+\#define HAVE_STRING_H 1
+\#define HAVE_MEMORY_H 1
+\#define HAVE_LONG_LONG 1
+\#define HAVE_OFF_T 1
+\#define SIZEOF_INT 4
+\#define SIZEOF_SHORT 2
+\#define SIZEOF_LONG 4
+\#define SIZEOF_LONG_LONG 0
+\#define SIZEOF___INT64 8
+\#define SIZEOF_OFF_T 8
+\#define SIZEOF_VOIDP 4
+\#define SIZEOF_FLOAT 4
+\#define SIZEOF_DOUBLE 8
+\#define SIZEOF_TIME_T 4
+\#define SIZEOF_RLIM_T 0
+\#define SIZEOF_SIZE_T 4
+\#define SIZEOF_PTRDIFF_T 4
+\#define HAVE_PROTOTYPES 1
+\#define TOKEN_PASTE(x,y) x\#\#y
+\#define HAVE_STDARG_PROTOTYPES 1
+\#define NORETURN(x) x
+\#define RUBY_EXTERN extern __declspec(dllimport)
+\#define HAVE_DECL_SYS_NERR 1
+\#define HAVE_LIMITS_H 1
+\#define HAVE_FCNTL_H 1
+\#define HAVE_UTIME_H 1
+\#define HAVE_FLOAT_H 1
+\#define rb_uid_t uid_t
+\#define rb_gid_t gid_t
+\#define rb_pid_t int
+\#define HAVE_STRUCT_STAT_ST_RDEV 1
+\#define HAVE_ST_RDEV 1
+!if $(BORLANDC) < 0x0580
+\#define int8_t signed char
+\#define uint8_t unsigned char
+\#define int16_t short
+\#define uint16_t unsigned short
+\#define int32_t int
+\#define uint32_t unsigned int
+\#define int64_t __int64
+\#define uint64_t unsigned __int64
+\#define ssize_t int
+!endif
+\#define HAVE_INT8_T 1
+\#define HAVE_UINT8_T 1
+\#define SIZEOF_INT8_T 1
+\#define HAVE_INT16_T 1
+\#define HAVE_UINT16_T 1
+\#define SIZEOF_INT32_T 2
+\#define HAVE_INT32_T 1
+\#define HAVE_UINT32_T 1
+\#define SIZEOF_INT32_T 4
+\#define HAVE_INT64_T 1
+\#define HAVE_UINT64_T 1
+\#define SIZEOF_INT64_T 8
+\#define HAVE_INTPTR_T 1
+\#define HAVE_UINTPTR_T 1
+\#define HAVE_SSIZE_T 1
+\#define GETGROUPS_T int
+\#define RETSIGTYPE void
+\#define HAVE_ALLOCA 1
+\#define HAVE_DUP2 1
+\#define HAVE_MEMMOVE 1
+\#define HAVE_MKDIR 1
+\#define HAVE_STRCASECMP 1
+\#define HAVE_STRNCASECMP 1
+\#define HAVE_STRERROR 1
+\#define HAVE_STRFTIME 1
+\#define HAVE_STRCHR 1
+\#define HAVE_STRSTR 1
+\#define HAVE_STRTOD 1
+\#define HAVE_STRTOL 1
+\#define HAVE_STRTOUL 1
+\#define HAVE_SNPRINTF 1
+\#define HAVE_VSNPRINTF 1
+\#define HAVE_ISNAN 1
+\#define HAVE_FINITE 1
+\#define HAVE_HYPOT 1
+\#define HAVE_FMOD 1
+\#define HAVE_WAITPID 1
+\#define HAVE_FSYNC 1
+\#define HAVE_GETCWD 1
+\#define HAVE_TRUNCATE 1
+\#define HAVE_FTRUNCATE 1
+\#define HAVE_FSEEKO 1
+\#define HAVE_FTELLO 1
+\#define HAVE_TIMES 1
+\#define HAVE_FCNTL 1
+\#define HAVE_LINK 1
+\#define HAVE_TELLDIR 1
+\#define HAVE_SEEKDIR 1
+\#define HAVE_COSH 1
+\#define HAVE_SINH 1
+\#define HAVE_TANH 1
+\#define RSHIFT(x,y) ((x)>>(int)y)
+\#define FILE_COUNT level
+\#define FILE_READPTR curp
+\#define RUBY_SETJMP(env) setjmp(env)
+\#define RUBY_LONGJMP(env,val) longjmp(env,val)
+\#define RUBY_JMP_BUF jmp_buf
+\#define inline __inline
+\#define NEED_IO_SEEK_BETWEEN_RW 1
+\#define STACK_GROW_DIRECTION -1
+\#define DEFAULT_KCODE KCODE_NONE
+\#define LOAD_RELATIVE 1
+\#define DLEXT ".so"
+\#define RUBY_LIB_PREFIX "/lib/ruby"
+\#define RUBY_PLATFORM "$(ARCH)-$(OS)"
+\#endif /* $(guard) */
+|
+ @exit > $(@:/=\)
+
+config.status: $(MKFILES) $(srcdir)/bcc32/Makefile.sub $(srcdir)/common.mk
+ @echo Creating $@
+ @type > $@ &&|
+# Generated automatically by Makefile.sub.
+s,@SHELL@,$$(COMSPEC),;t t
+s,@BUILD_FILE_SEPARATOR@,\,;t t
+s,@PATH_SEPARATOR@,;,;t t
+s,@CFLAGS@,$(CFLAGS),;t t
+s,@DEFS@,$(DEFS),;t t
+s,@CPPFLAGS@,$(CPPFLAGS),;t t
+s,@CXXFLAGS@,$(CXXFLAGS),;t t
+s,@FFLAGS@,$(FFLAGS),;t t
+s,@LDFLAGS@,,;t t
+s,@LIBS@,$(LIBS),;t t
+s,@exec_prefix@,$${prefix},;t t
+s,@prefix@,$(prefix),;t t
+s,@program_transform_name@,s,,,,;t t
+s,@bindir@,$${exec_prefix}/bin,;t t
+s,@sbindir@,$${exec_prefix}/sbin,;t t
+s,@libexecdir@,$${exec_prefix}/libexec,;t t
+s,@datadir@,$${prefix}/share,;t t
+s,@sysconfdir@,$${prefix}/etc,;t t
+s,@sharedstatedir@,/etc,;t t
+s,@localstatedir@,/var,;t t
+s,@libdir@,$${exec_prefix}/lib,;t t
+s,@includedir@,$${prefix}/include,;t t
+s,@oldincludedir@,/usr/include,;t t
+s,@infodir@,$${prefix}/info,;t t
+s,@mandir@,$${prefix}/man,;t t
+s,@ridir@,$${prefix}/share/ri,;t t
+s,@build@,$(CPU)-pc-$(OS),;t t
+s,@build_alias@,$(CPU)-$(OS),;t t
+s,@build_cpu@,$(CPU),;t t
+s,@build_vendor@,pc,;t t
+s,@build_os@,$(OS),;t t
+s,@host@,$(CPU)-pc-$(OS),;t t
+s,@host_alias@,$(CPU)-$(OS),;t t
+s,@host_cpu@,$(CPU),;t t
+s,@host_vendor@,pc,;t t
+s,@host_os@,$(OS),;t t
+s,@target@,$(ARCH)-pc-$(OS),;t t
+s,@target_alias@,$(ARCH)-$(OS),;t t
+s,@target_cpu@,$(ARCH),;t t
+s,@target_vendor@,pc,;t t
+s,@target_os@,$(OS),;t t
+s,@CC@,$(CC),;t t
+s,@CPP@,cpp32,;t t
+s,@CXX@,$$(CC),;t t
+s,@LD@,$(LD),;t t
+s,@YACC@,$(YACC),;t t
+s,@RANLIB@,,;t t
+s,@AR@,$(AR),;t t
+s,@ARFLAGS@,$(ARFLAGS) ,;t t
+s,@LN_S@,$(LN_S),;t t
+s,@SET_MAKE@,MFLAGS = -$$(MAKEFLAGS),;t t
+s,@RM@,$$(top_srcdir:/=\)\win32\rm.bat,;t t
+s,@CP@,copy > nul,;t t
+s,@LIBOBJS@, $(MISSING),;t t
+s,@ALLOCA@,$(ALLOCA),;t t
+s,@DEFAULT_KCODE@,$(DEFAULT_KCODE),;t t
+s,@EXEEXT@,.exe,;t t
+s,@OBJEXT@,obj,;t t
+s,@XCFLAGS@,$(XCFLAGS),;t t
+s,@XLDFLAGS@,$(XLDFLAGS),;t t
+s,@DLDFLAGS@,$(DLDFLAGS),;t t
+s,@ARCH_FLAG@,$(ARCH_FLAG),;t t
+s,@STATIC@,$(STATIC),;t t
+s,@CCDLFLAGS@,,;t t
+s,@LDSHARED@,$(LDSHARED),;t t
+s,@DLEXT@,so,;t t
+s,@LIBEXT@,lib,;t t
+s,@STRIP@,$(STRIP),;t t
+s,@EXTSTATIC@,$(EXTSTATIC),;t t
+s,@setup@,Setup,;t t
+s,@MINIRUBY@,$(MINIRUBY),;t t
+s,@PREP@,miniruby$(EXEEXT),;t t
+s,@RUNRUBY@,$(RUNRUBY),;t t
+s,@EXTOUT@,$(EXTOUT),;t t
+s,@ARCHFILE@,,;t t
+s,@RDOCTARGET@,,;t t
+s,@LIBRUBY_LDSHARED@,$$(LDSHARED),;t t
+s,@LIBRUBY_DLDFLAGS@,-Gi $$(DLDFLAGS),;t t
+s,@RUBY_INSTALL_NAME@,$(RUBY_INSTALL_NAME),;t t
+s,@rubyw_install_name@,$(RUBYW_INSTALL_NAME),;t t
+s,@RUBYW_INSTALL_NAME@,$(RUBYW_INSTALL_NAME),;t t
+s,@RUBY_SO_NAME@,$(RUBY_SO_NAME),;t t
+s,@LIBRUBY_A@,$$(RUBY_SO_NAME)-static.lib,;t t
+s,@LIBRUBY_SO@,$$(RUBY_SO_NAME).dll,;t t
+s,@LIBRUBY_ALIASES@,$(LIBRUBY_ALIASES),;t t
+s,@LIBRUBY@,$$(RUBY_SO_NAME).lib,;t t
+s,@LIBRUBYARG@,$$(LIBRUBYARG_SHARED),;t t
+s,@LIBRUBYARG_STATIC@,$$(LIBRUBY_A),;t t
+s,@LIBRUBYARG_SHARED@,$$(LIBRUBY),;t t
+s,@SOLIBS@,$(SOLIBS),;t t
+s,@DLDLIBS@,$(DLDLIBS),;t t
+s,@ENABLE_SHARED@,yes,;t t
+s,@OUTFLAG@,$(OUTFLAG),;t t
+s,@COUTFLAG@,$(COUTFLAG),;t t
+s,@CPPOUTFILE@,,;t t
+s,@LIBPATHFLAG@, -L"%s",;t t
+s,@RPATHFLAG@,,;t t
+s,@LIBARG@,%s.lib,;t t
+s,@LINK_SO@,$$(LDSHARED) $$(DLDFLAGS) $$(LIBPATH) $$(OBJS:/=\), $$(@:/=\), nul, $$(LIBS) $$(LOCAL_LIBS), $$(DEFFILE:/=\), $$(RESFILE:/=\),;t t
+s,@COMPILE_C@,$$(CC) $$(INCFLAGS) $$(CFLAGS) $$(CPPFLAGS) $(COUTFLAG)$$(@) -c $$(<:/=\),;t t
+s,@COMPILE_CXX@,$$(CXX) $$(INCFLAGS) $$(CXXFLAGS) $$(CPPFLAGS) -P $(COUTFLAG)$$(@) -c $$(<:/=\),;t t
+s,@COMPILE_RULES@,{$$(srcdir)}.%s{}.%s: {$$(topdir)}.%s{}.%s: {$$(hdrdir)}.%s{}.%s: .%s.%s:,;t t
+s,@RULE_SUBST@,{.;$$(VPATH)}%s,;t t
+s,@COMMON_LIBS@,m advapi32 avicap32 avifil32 cap comctl32 comdlg32 dlcapi gdi32 glu32 imagehlp imm32 inetmib1 kernel32 loadperf lsapi32 lz32 mapi32 mgmtapi mpr msacm32 msvfw32 nddeapi netapi32 ole32 oleaut32 oledlg olepro32 opengl32 pdh pkpd32 rasapi32 rasdlg rassapi rpcrt4 setupapi shell32 shfolder snmpapi sporder tapi32 url user32 vdmdbg version win32spl winmm wintrust wsock32,;t t
+s,@COMMON_MACROS@,WIN32_LEAN_AND_MEAN WIN32,;t t
+s,@COMMON_HEADERS@,winsock2.h windows.h,;t t
+s,@cleanlibs@,$$*.tds,;t t
+s,@cleanobjs@,$$*-$$(arch).def $$*.il? $$*.lib,;t t
+s,@TRY_LINK@,$$(CC) -oconftest $$(INCFLAGS) -I$$(hdrdir) $$(CPPFLAGS) $$(CFLAGS) $$(LIBPATH) $$(LDFLAGS) $$(src) $$(LOCAL_LIBS) $$(LIBS),;t t
+s,@EXPORT_PREFIX@,_,;t t
+s,@arch@,$(ARCH)-$(OS),;t t
+s,@sitearch@,$(ARCH)-$(OS),;t t
+s,@sitedir@,$${prefix}/lib/ruby/site_ruby,;t t
+s,@vendordir@,$${prefix}/lib/ruby/vendor_ruby,;t t
+s,@rubyhdrdir@,$$(includedir)/ruby-$$(MAJOR).$$(MINOR).$$(TEENY),;t t
+s,@sitehdrdir@,$$(rubyhdrdir)/site_ruby,;t t
+s,@vendorhdrdir@,$$(rubyhdrdir)/vendor_ruby,;t t
+s,@configure_args@,--enable-shared $(configure_args),;t t
+s,@configure_input@,$$configure_input,;t t
+s,@srcdir@,$(srcdir),;t t
+s,@top_srcdir@,$(srcdir),;t t
+|
+
+miniruby$(EXEEXT):
+ @echo $(LIBS)
+ $(LD) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ) $(MINIOBJS) $(COMMONOBJS:/=\) $(DMYEXT),$@,nul,$(LIBS)
+
+$(PROGRAM): $(MAINOBJ) $(LIBRUBY_SO) $(RUBY_INSTALL_NAME).res
+ $(LD) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ),$@,nul,$(LIBRUBYARG) $(LIBS),,$(RUBY_INSTALL_NAME).res
+
+$(WPROGRAM): $(MAINOBJ) $(WINMAINOBJ) $(LIBRUBY_SO) $(RUBYW_INSTALL_NAME).res
+ $(LD) $(LDFLAGS) $(WLDFLAGS) $(MAINOBJ) $(WINMAINOBJ),$@,nul,$(LIBRUBYARG) $(LIBS),,$(RUBYW_INSTALL_NAME).res
+
+$(LIBRUBY_A): $(OBJS) $(DMYEXT)
+ @-if exist $@ del $@
+ $(AR) $(ARFLAGS) "$@" $(OBJS) $(DMYEXT)
+
+# $(LIBRUBY): $(LIBRUBY_SO)
+# implib $@ $(LIBRUBY_SO)
+
+$(LIBRUBY_SO): $(LIBRUBY_A) $(DLDOBJS) $(RUBYDEF) $(RUBY_SO_NAME).res
+ @echo $(DLDOBJS)
+ @$(PRE_LIBRUBY_UPDATE)
+ $(LIBRUBY_LDSHARED) $(LIBRUBY_DLDFLAGS) $(DLDOBJS:/=\),$(LIBRUBY_SO),nul,$(LIBRUBY_A) $(LIBS),$(RUBYDEF),$(RUBY_SO_NAME).res
+
+$(LIBRUBY): $(LIBRUBY_SO)
+
+$(RUBYDEF): $(LIBRUBY_A) $(PREP)
+ $(MINIRUBY) $(srcdir)/bcc32/mkexports.rb -output=$@ -base=$(RUBY_SO_NAME) $(LIBRUBY_A)
+
+$(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc: rbconfig.rb $(srcdir)/revision.h $(srcdir)/win32/resource.rb
+ @$(MINIRUBY) $(srcdir)/win32/resource.rb \
+ -ruby_name=$(RUBY_INSTALL_NAME) \
+ -rubyw_name=$(RUBYW_INSTALL_NAME) \
+ -so_name=$(RUBY_SO_NAME) \
+ . $(icondirs) $(srcdir)/win32
+
+lex.c: {$(srcdir)}lex.c.blt
+ copy "$(?:/=\)" $@
+
+post-install-bin::
+ @$(NULLCMD)
+post-install-lib::
+ @$(NULLCMD)
+post-install-ext-comm::
+ @$(NULLCMD)
+post-install-ext-arch::
+ @$(NULLCMD)
+post-install-man::
+ @$(NULLCMD)
+post-install-doc::
+ @$(NULLCMD)
+
+clean-local::
+ @$(RM) $(WINMAINOBJ) ext\extinit.c ext\extinit.$(OBJEXT) *.tds *.il? $(RUBY_SO_NAME).lib
+ @$(RM) $(RUBY_INSTALL_NAME).res $(RUBYW_INSTALL_NAME).res $(RUBY_SO_NAME).res
+ @$(RM) *.map *.pdb *.ilk *.exp $(RUBYDEF) ext\ripper\y.output
+
+distclean-local::
+ @$(RM) ext\config.cache $(RBCONFIG:/=\)
+ @$(RM) $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc
+
+clean-ext distclean-ext realclean-ext::
+ @for /R ext %I in (.) do @if exist %I\Makefile ( \
+ echo $(@:-ext=)ing %~nI & \
+ cd %I & \
+ $(MAKE) $(MFLAGS) $(@:-ext=) & \
+ cd %CD% \
+ )
+
+ext/extinit.obj: ext/extinit.c $(SETUP)
+ $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c ext/extinit.c
+
+main.$(OBJEXT): win32.h
+ascii.$(OBJEXT): win32.h
+array.$(OBJEXT): win32.h
+bignum.$(OBJEXT): win32.h
+class.$(OBJEXT): win32.h
+compar.$(OBJEXT): win32.h
+dir.$(OBJEXT): dir.h win32.h
+dln.$(OBJEXT): win32.h
+enum.$(OBJEXT): win32.h
+error.$(OBJEXT): win32.h
+euc_jp.$(OBJEXT): win32.h
+eval.$(OBJEXT): win32.h
+file.$(OBJEXT): win32.h
+gc.$(OBJEXT): win32.h
+hash.$(OBJEXT): win32.h
+inits.$(OBJEXT): win32.h
+io.$(OBJEXT): win32.h
+marshal.$(OBJEXT): win32.h
+math.$(OBJEXT): win32.h
+numeric.$(OBJEXT): win32.h
+object.$(OBJEXT): win32.h
+pack.$(OBJEXT): win32.h
+parse.$(OBJEXT): win32.h
+process.$(OBJEXT): win32.h
+prec.$(OBJEXT): win32.h
+random.$(OBJEXT): win32.h
+range.$(OBJEXT): win32.h
+re.$(OBJEXT): win32.h
+regcomp.$(OBJEXT): win32.h
+regenc.$(OBJEXT): win32.h
+regerror.$(OBJEXT): win32.h
+regexec.$(OBJEXT): win32.h
+reggnu.$(OBJEXT): win32.h
+regparse.$(OBJEXT): win32.h
+ruby.$(OBJEXT): win32.h
+signal.$(OBJEXT): win32.h
+sjis.$(OBJEXT): win32.h
+sprintf.$(OBJEXT): win32.h
+st.$(OBJEXT): win32.h
+string.$(OBJEXT): win32.h
+struct.$(OBJEXT): win32.h
+time.$(OBJEXT): win32.h
+utf_8.$(OBJEXT): win32.h
+util.$(OBJEXT): win32.h
+variable.$(OBJEXT): win32.h
+version.$(OBJEXT): win32.h
diff --git a/bcc32/README.bcc32 b/bcc32/README.bcc32
new file mode 100644
index 0000000000..cd33eec0a1
--- /dev/null
+++ b/bcc32/README.bcc32
@@ -0,0 +1,130 @@
+=begin
+
+= How to build ruby using Borland C++
+
+== Requirement
+
+(1) Borland C++ 5.0 or later.
+
+(2) Please set environment variable (({PATH}))
+ to run required commands properly from the command line.
+
+ Note: building ruby requires following commands.
+ * make
+ * bcc32
+ * tlib
+ * ilink32
+
+(3) If you want to build from CVS source, following commands are required.
+ * bison ((<URL:http://gnuwin32.sourceforge.net/packages/bison.htm>))
+ * sed ((<URL:http://gnuwin32.sourceforge.net/packages/sed.htm>))
+
+(4) We strongly recommend to build ruby on C++Builder, to link following files.
+ * usebormm.lib
+ * memmgr.lib
+
+ RTL's internal memory manager cannot handle large memory block properly,
+ so we should use borlndmm.dll instead.
+ 10000.times { "" << "." * 529671; GC.start } # crash
+
+== How to compile and install
+
+(1) Execute bcc32\configure.bat on your build directory.
+ ex. c:\src\ruby> bcc32\configure.bat
+ You can specify the target platform as an argument.
+ For example, run `((%configure i686-bccwin32%))'
+ You can also specify the install directory.
+ For example, run `((%configure --prefix=<install_directory>%))'
+ Default of the install directory is /usr .
+ The default ((|<PLATFORM>|)) is `(({i386-bccwin32}))'.
+
+(2) Change ((|RUBY_INSTALL_NAME|)) and ((|RUBY_SO_NAME|)) in (({Makefile}))
+ if you want to change the name of the executable files.
+ And add ((|RUBYW_INSTALL_NAME|)) to change the name of the
+ executable without console window if also you want.
+
+(3) Run `((%make%))'
+
+(4) Run `((%make test%))'
+
+(5) Run `((%make install%))'
+
+(6) Requires dynamic RTL (cc3250.dll on C++Builder5) and borlndmm.dll (If built with
+ usebormm.lib) to use installed binary. These files are ordinary in bcc32's bin
+ directory.
+
+== Icons
+
+Any icon files(*.ico) in the build directory, directories specified with
+((|icondirs|)) make variable and (({win32})) directory under the ruby
+source directory will be included in DLL or executable files, according
+to their base names.
+ $(RUBY_INSTALL_NAME).ico or ruby.ico --> $(RUBY_INSTALL_NAME).exe
+ $(RUBYW_INSTALL_NAME).ico or rubyw.ico --> $(RUBYW_INSTALL_NAME).exe
+ the others --> $(RUBY_SO_NAME).dll
+
+Although no icons are distributed with the ruby source or in the official
+site, you can use anything you like. For example, followings are written
+in Japanese, but you can download at least.
+
+* ((<URL:http://member.nifty.ne.jp/ueivu/rubyico.html>)) or
+ ((<zipped icons|URL:http://member.nifty.ne.jp/ueivu/Ruby_ico.zip>))
+* ((<URL:http://homepage1.nifty.com/a_nakata/ruby/>)) or
+ ((<icon itself|URL:http://homepage1.nifty.com/a_nakata/ruby/RubyIcon.ico>))
+
+== Build examples
+
+* Build on the ruby source directory.
+
+ ex.)
+ ruby source directory: C:\ruby
+ build directory: C:\ruby
+ install directory: C:\usr\local
+
+ C:
+ cd \ruby
+ bcc32\configure --prefix=/usr/local
+ make
+ make test
+ make install
+
+* Build on the relative directory from the ruby source directory and CPU type
+ i386.
+
+ ex.)
+ ruby source directory: C:\ruby
+ build directory: C:\ruby\bccwin32
+ install directory: C:\usr\local
+ CPU i386
+
+ C:
+ cd \ruby
+ mkdir bccwin32
+ cd bccwin32
+ ..\bcc32\configure --prefix=/usr/local
+ make
+ make test
+ make install
+
+* Build on the different drive.
+
+ ex.)
+ ruby source directory: C:\src\ruby
+ build directory: D:\build\ruby
+ install directory: C:\usr\local
+
+ D:
+ cd D:\build\ruby
+ C:\src\ruby\bcc32\configure --prefix=C:/usr/local
+ make
+ make test
+ make install
+
+== Bugs
+
+You can ((*NOT*)) use a path name contains any white space characters as
+the ruby source directory, this restriction comes from the behavior of
+(({!INCLUDE})) directives of (({MAKE})).
+((- you may call it a bug. -))
+
+=end
diff --git a/bcc32/configure.bat b/bcc32/configure.bat
new file mode 100755
index 0000000000..8cdfc64b03
--- /dev/null
+++ b/bcc32/configure.bat
@@ -0,0 +1,163 @@
+@echo off
+::: Don't set environment variable in batch file other than autoexec.bat
+::: to avoid "Out of environment space" problem on Windows 95/98.
+::: set TMPMAKE=~tmp~.mak
+
+echo> ~tmp~.mak ####
+echo>> ~tmp~.mak conf = %0
+echo>> ~tmp~.mak $(conf:\=/): nul
+echo>> ~tmp~.mak @del ~setup~.mak
+echo>> ~tmp~.mak @-$(MAKE) -l$(MAKEFLAGS) -f $(@D)setup.mak \
+if exist pathlist.tmp del pathlist.tmp
+if exist confargs.mk del confargs.mk
+:loop
+if "%1" == "" goto :end
+if "%1" == "--prefix" goto :prefix
+if "%1" == "prefix" goto :prefix
+if "%1" == "--srcdir" goto :srcdir
+if "%1" == "srcdir" goto :srcdir
+if "%1" == "--target" goto :target
+if "%1" == "target" goto :target
+if "%1" == "--with-static-linked-ext" goto :extstatic
+if "%1" == "--program-suffix" goto :suffix
+if "%1" == "RUBY_SUFFIX" goto :suffix
+if "%1" == "--program-name" goto :installname
+if "%1" == "--install-name" goto :installname
+if "%1" == "RUBY_INSTALL_NAME" goto :installname
+if "%1" == "--so-name" goto :soname
+if "%1" == "RUBY_SO_NAME" goto :soname
+if "%1" == "--enable-install-doc" goto :enable-rdoc
+if "%1" == "--disable-install-doc" goto :disable-rdoc
+if "%1" == "--extout" goto :extout
+if "%1" == "EXTOUT" goto :extout
+if "%1" == "--with-baseruby" goto :baseruby
+if "%1" == "BASERUBY" goto :baseruby
+if "%1" == "--path" goto :path
+if "%1" == "-h" goto :help
+if "%1" == "--help" goto :help
+ echo>>confargs.tmp %1 \
+ shift
+goto :loop
+:srcdir
+ echo>> ~tmp~.mak -Dsrcdir=%2 \
+ echo>>confargs.tmp --srcdir=%2 \
+ shift
+ shift
+goto :loop
+:prefix
+ echo>> ~tmp~.mak -Dprefix=%2 \
+ echo>>confargs.tmp %1=%2 \
+ shift
+ shift
+goto :loop
+:suffix
+ echo>>confargs.mk !ifndef RUBY_SUFFIX
+ echo>>confargs.mk RUBY_SUFFIX = %2
+ echo>>confargs.mk !endif
+ echo>>confargs.tmp %1=%2 \
+ shift
+ shift
+goto :loop
+:installname
+ echo>>confargs.mk !ifndef RUBY_INSTALL_NAME
+ echo>>confargs.mk RUBY_INSTALL_NAME = %2
+ echo>>confargs.mk !endif
+ echo>>confargs.tmp %1=%2 \
+ shift
+ shift
+goto :loop
+:soname
+ echo>>confargs.mk !ifndef RUBY_SO_NAME
+ echo>>confargs.mk RUBY_SO_NAME = %2
+ echo>>confargs.mk !endif
+ echo>>confargs.tmp %1=%2 \
+ shift
+ shift
+goto :loop
+:target
+ echo>> ~tmp~.mak %2 \
+ echo>>confargs.tmp --target=%2 \
+ shift
+ shift
+goto :loop
+:extstatic
+ echo>>confargs.mk !ifndef EXTSTATIC
+ echo>>confargs.mk EXTSTATIC = static
+ echo>>confargs.mk !endif
+ echo>>confargs.tmp %1 \
+ shift
+goto :loop
+:enable-rdoc
+ echo>>confargs.mk !ifndef RDOCTARGET
+ echo>>confargs.mk RDOCTARGET = install-doc
+ echo>>confargs.mk !endif
+ echo>>confargs.tmp %1 \
+ shift
+goto :loop
+:disable-rdoc
+ echo>>confargs.mk !ifndef RDOCTARGET
+ echo>>confargs.mk RDOCTARGET = install-nodoc
+ echo>>confargs.mk !endif
+ echo>>confargs.tmp %1 \
+ shift
+goto :loop
+:extout
+ echo>>confargs.mk !ifndef EXTOUT
+ echo>>confargs.mk EXTOUT = %2
+ echo>>confargs.mk !endif
+ echo>>confargs.tmp %1=%2 \
+ shift
+ shift
+goto :loop
+:baseruby
+ echo>>confargs.mk !ifndef BASERUBY
+ echo>>confargs.mk BASERUBY = %2
+ echo>>confargs.mk !endif
+ echo>>confargs.tmp %1=%2 \
+ shift
+ shift
+goto :loop
+:path
+ echo>>pathlist.tmp %2;\
+ echo>>confargs.tmp %1=%2 \
+ shift
+ shift
+goto :loop
+:help
+ echo Configuration:
+ echo --help display this help
+ echo --srcdir=DIR find the sources in DIR [configure dir or `..']
+ echo Installation directories:
+ echo --prefix=PREFIX install files in PREFIX (ignored currently)
+ echo System types:
+ echo --target=TARGET configure for TARGET [i386-bccwin32]
+ echo Optional Package:
+ echo --with-baseruby=RUBY use RUBY as baseruby [ruby]
+ echo --with-static-linked-ext link external modules statically
+ echo --enable-install-doc install rdoc indexes during install
+ del *.tmp
+ del ~tmp~.mak
+goto :exit
+:end
+echo>> ~tmp~.mak -Dbcc32dir=$(@D)
+if not exist confargs.tmp goto :noconfargs
+ echo>>confargs.mk configure_args = \
+ type>>confargs.mk confargs.tmp
+ echo.>>confargs.mk
+ echo>>confargs.mk ####
+:noconfargs
+if not exist pathlist.tmp goto :nopathlist
+ echo>>confargs.mk pathlist = \
+ type>>confargs.mk pathlist.tmp
+ echo.>>confargs.mk
+ echo>>confargs.mk ####
+ echo>>confargs.mk PATH = $(pathlist:;=/bin;)$(PATH)
+ echo>>confargs.mk INCLUDE = $(pathlist:;=/include;)
+ echo>>confargs.mk LIB = $(pathlist:;=/lib;)
+:nopathlist
+if exist confargs.mk copy confargs.mk ~setup~.mak > nul
+type>>~setup~.mak ~tmp~.mak
+del *.tmp > nul
+del ~tmp~.mak > nul
+make -s -f ~setup~.mak
+:exit
diff --git a/bcc32/mkexports.rb b/bcc32/mkexports.rb
new file mode 100755
index 0000000000..888ab2e2a6
--- /dev/null
+++ b/bcc32/mkexports.rb
@@ -0,0 +1,26 @@
+#!./miniruby -s
+
+$:.unshift(File.expand_path("../..", __FILE__))
+require 'win32/mkexports'
+
+class Exports::Bcc < Exports
+ def forwarding(internal, export)
+ internal[/\A_?/]+export
+ end
+
+ def each_line(objs, &block)
+ objs.each do |obj|
+ opt = /\.(?:so|dll)\z/i =~ obj ? "-ee" : "-oiPUBDEF -oiPUBD32"
+ IO.foreach("|tdump -q #{opt} #{obj.tr('/', '\\')} < nul", &block)
+ end
+ end
+
+ def each_export(objs)
+ objdump(objs) do |l|
+ next unless /(?:PUBDEF|PUBD32|EXPORT)/ =~ l
+ yield $1 if /'(.*?)'/ =~ l
+ end
+ yield "_strcasecmp", "_stricmp"
+ yield "_strncasecmp", "_strnicmp"
+ end
+end
diff --git a/bcc32/setup.mak b/bcc32/setup.mak
new file mode 100644
index 0000000000..df2fd3c128
--- /dev/null
+++ b/bcc32/setup.mak
@@ -0,0 +1,179 @@
+# -*- makefile -*-
+
+!if "$(srcdir)" != ""
+bcc32dir = $(srcdir)/bcc32
+!elseif "$(bcc32dir)" == "bcc32/"
+srcdir = .
+!elseif "$(bcc32dir:/bcc32/=)/bcc32/" == "$(bcc32dir)"
+srcdir = $(bcc32dir:/bcc32/=)
+!else
+srcdir = $(bcc32dir)/..
+!endif
+!ifndef prefix
+prefix = /usr
+!endif
+OS = bccwin32
+RT = $(OS)
+BANG = !
+APPEND = echo.>>$(MAKEFILE)
+!ifdef MAKEFILE
+MAKE = $(MAKE) -f $(MAKEFILE)
+!else
+MAKEFILE = Makefile
+!endif
+
+all: Makefile
+Makefile: -prologue- -generic- -epilogue-
+i386-$(OS): -prologue- -i386- -epilogue-
+i486-$(OS): -prologue- -i486- -epilogue-
+i586-$(OS): -prologue- -i586- -epilogue-
+i686-$(OS): -prologue- -i686- -epilogue-
+alpha-$(OS): -prologue- -alpha- -epilogue-
+
+-prologue-: -basic-vars- -version- -system-vars-
+
+-basic-vars-: nul
+ @echo Creating $(MAKEFILE)
+ @type > $(MAKEFILE) &&|
+\#\#\# Makefile for ruby $(OS) \#\#\#
+$(BANG)ifndef srcdir
+srcdir = $(srcdir:\=/)
+$(BANG)endif
+$(BANG)ifndef prefix
+prefix = $(prefix:\=/)
+$(BANG)endif
+$(BANG)if !defined(BASERUBY)
+!if defined(BASERUBY)
+BASERUBY = $(BASERUBY)
+!endif
+|
+!if !defined(BASERUBY)
+ @for %I in (ruby.exe) do @echo BASERUBY = "%~$$PATH:I" >> $(MAKEFILE)
+!endif
+ @type >> $(MAKEFILE) &&|
+$(BANG)endif
+|
+!if exist(confargs.mk)
+ @type confargs.mk >> $(MAKEFILE)
+ @del confargs.mk
+!endif
+
+-system-vars-: -runtime- -bormm-
+
+-bormm-: nul
+ @-ilink32 -q -Gn -x usebormm.lib > nul
+ @-if exist usebormm.tds $(APPEND) MEMLIB = usebormm.lib
+ @if exist usebormm.* del usebormm.*
+
+-osname-: nul
+ @echo OS = >>$(MAKEFILE)
+
+-runtime-: nul
+ type > conftest.c &&|
+\#include <stdio.h>
+int main(){printf("");return 0;}
+|
+ bcc32 conftest.c cw32i.lib > nul
+ tdump conftest.exe < nul > conftest.i
+ grep "^Imports from CC" conftest.i > conftest.c
+ cpp32 -P- -DFile=\# -DImports=RTNAME -Dfrom== conftest.c > nul
+ $(MAKE) > nul -DBANG=$(BANG) -f &&|
+-runtime-: nul
+$(BANG)include conftest.i
+RT = $$(RTNAME:.DLL=)
+OS = $$(RT:CC32=)
+-runtime-:
+ del conftest.*
+$(BANG)if "$$(OS)" == "50"
+ echo OS = bccwin32 >> $(MAKEFILE)
+$(BANG)else
+ echo OS = bccwin32_$$(OS) >> $(MAKEFILE)
+$(BANG)endif
+|
+ @echo RT = $$(OS) >> $(MAKEFILE)
+
+-version-: nul
+ @cpp32 -I$(srcdir) -P- -o$(MAKEFILE) > nul &&|
+\#define RUBY_REVISION 0
+\#include "version.h"
+MAJOR = RUBY_API_VERSION_MAJOR
+MINOR = RUBY_API_VERSION_MINOR
+TEENY = RUBY_API_VERSION_TEENY
+
+BORLANDC = __BORLANDC__
+|
+ @$(MAKE) > nul -DBANG=$(BANG) -f &&,
+-version-: nul
+$(BANG)include $(MAKEFILE)
+$(BANG)include $(MAKEFILE).i
+-version-:
+ @del $(MAKEFILE).i
+ @type >> $(MAKEFILE) &&|
+MAJOR = $$(MAJOR)
+MINOR = $$(MINOR)
+TEENY = $$(TEENY)
+BORLANDC = $$(BORLANDC)
+|
+,
+
+-generic-: nul
+!if defined(PROCESSOR_ARCHITECTURE) || defined(PROCESSOR_LEVEL)
+ @type >> $(MAKEFILE) &&|
+!if defined(PROCESSOR_ARCHITECTURE)
+$(BANG)ifndef PROCESSOR_ARCHITECTURE
+PROCESSOR_ARCHITECTURE = $(PROCESSOR_ARCHITECTURE)
+$(BANG)endif
+!endif
+!if defined(PROCESSOR_LEVEL)
+$(BANG)ifndef PROCESSOR_LEVEL
+PROCESSOR_LEVEL = $(PROCESSOR_LEVEL)
+$(BANG)endif
+!endif
+|
+!endif
+
+-alpha-: nul
+ @$(APPEND) !ifndef PROCESSOR_ARCHITECTURE
+ @$(APPEND) PROCESSOR_ARCHITECTURE = alpha
+ @$(APPEND) !endif
+-ix86-: nul
+ @$(APPEND) !ifndef PROCESSOR_ARCHITECTURE
+ @$(APPEND) PROCESSOR_ARCHITECTURE = x86
+ @$(APPEND) !endif
+
+-i386-: -ix86-
+ @$(APPEND) !ifndef PROCESSOR_LEVEL
+ @$(APPEND) PROCESSOR_LEVEL = 3
+ @$(APPEND) !endif
+-i486-: -ix86-
+ @$(APPEND) !ifndef PROCESSOR_LEVEL
+ @$(APPEND) PROCESSOR_LEVEL = 4
+ @$(APPEND) !endif
+-i586-: -ix86-
+ @$(APPEND) !ifndef PROCESSOR_LEVEL
+ @$(APPEND) PROCESSOR_LEVEL = 5
+ @$(APPEND) !endif
+-i686-: -ix86-
+ @$(APPEND) !ifndef PROCESSOR_LEVEL
+ @$(APPEND) PROCESSOR_LEVEL = 6
+ @$(APPEND) !endif
+
+-epilogue-: -encs-
+
+-encs-: nul
+ @$(MAKE) -f $(srcdir)/win32/enc-setup.mak srcdir="$(srcdir)" MAKEFILE=$(MAKEFILE)
+
+-epilogue-: nul
+ @type >> $(MAKEFILE) &&|
+
+\# RUBY_INSTALL_NAME = ruby
+\# RUBY_SO_NAME = $$(RT)-$$(RUBY_INSTALL_NAME)$$(MAJOR)$$(MINOR)
+\# CFLAGS = -q $$(DEBUGFLAGS) $$(OPTFLAGS) $$(PROCESSOR_FLAG) -w- -wsus -wcpt -wdup -wext -wrng -wrpt -wzdi
+\# CPPFLAGS = -I. -I$$(srcdir) -I$$(srcdir)/missing -DLIBRUBY_SO=\"$$(LIBRUBY_SO)\"
+\# STACK = 0x2000000
+\# LDFLAGS = -S:$$(STACK)
+\# RFLAGS = $$(iconinc)
+\# EXTLIBS = cw32.lib import32.lib user32.lib kernel32.lib
+$(BANG)include $$(srcdir)/bcc32/Makefile.sub
+|
+ @echo type "`$(MAKE)'" to make ruby for $(OS).
diff --git a/benchmark/bm_app_aobench.rb b/benchmark/bm_app_aobench.rb
deleted file mode 100644
index 807349089f..0000000000
--- a/benchmark/bm_app_aobench.rb
+++ /dev/null
@@ -1,292 +0,0 @@
-# AO rebder 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
-# Ruby(yarv2llvm) version by Hideki Miura
-#
-
-IMAGE_WIDTH = 256
-IMAGE_HEIGHT = 256
-NSUBSAMPLES = 2
-NAO_SAMPLES = 8
-
-class Vec
- def initialize(x, y, z)
- @x = x
- @y = y
- @z = z
- end
-
- attr_accessor :x, :y, :z
-
- def vadd(b)
- Vec.new(@x + b.x, @y + b.y, @z + b.z)
- end
-
- def vsub(b)
- Vec.new(@x - b.x, @y - b.y, @z - b.z)
- end
-
- def vcross(b)
- Vec.new(@y * b.z - @z * b.y,
- @z * b.x - @x * b.z,
- @x * b.y - @y * b.x)
- end
-
- def vdot(b)
- @x * b.x + @y * b.y + @z * b.z
- end
-
- def vlength
- Math.sqrt(@x * @x + @y * @y + @z * @z)
- end
-
- def vnormalize
- len = vlength
- v = Vec.new(@x, @y, @z)
- if len > 1.0e-17 then
- v.x = v.x / len
- v.y = v.y / len
- v.z = v.z / len
- end
- v
- end
-end
-
-
-class Sphere
- def initialize(center, radius)
- @center = center
- @radius = radius
- end
-
- attr_reader :center, :radius
-
- def intersect(ray, isect)
- rs = ray.org.vsub(@center)
- b = rs.vdot(ray.dir)
- c = rs.vdot(rs) - (@radius * @radius)
- d = b * b - c
- if d > 0.0 then
- t = - b - Math.sqrt(d)
-
- if t > 0.0 and t < isect.t then
- isect.t = t
- isect.hit = true
- isect.pl = Vec.new(ray.org.x + ray.dir.x * t,
- ray.org.y + ray.dir.y * t,
- ray.org.z + ray.dir.z * t)
- n = isect.pl.vsub(@center)
- isect.n = n.vnormalize
- else
- 0.0
- end
- end
- nil
- end
-end
-
-class Plane
- def initialize(p, n)
- @p = p
- @n = n
- end
-
- def intersect(ray, isect)
- d = -@p.vdot(@n)
- v = ray.dir.vdot(@n)
- v0 = v
- if v < 0.0 then
- v0 = -v
- end
- if v0 < 1.0e-17 then
- return
- end
-
- t = -(ray.org.vdot(@n) + d) / v
-
- if t > 0.0 and t < isect.t then
- isect.hit = true
- isect.t = t
- isect.n = @n
- isect.pl = Vec.new(ray.org.x + t * ray.dir.x,
- ray.org.y + t * ray.dir.y,
- ray.org.z + t * ray.dir.z)
- end
- nil
- end
-end
-
-class Ray
- def initialize(org, dir)
- @org = org
- @dir = dir
- end
-
- attr_accessor :org, :dir
-end
-
-class Isect
- def initialize
- @t = 10000000.0
- @hit = false
- @pl = Vec.new(0.0, 0.0, 0.0)
- @n = Vec.new(0.0, 0.0, 0.0)
- end
-
- attr_accessor :t, :hit, :pl, :n
-end
-
-def clamp(f)
- i = f * 255.5
- if i > 255.0 then
- i = 255.0
- end
- if i < 0.0 then
- i = 0.0
- end
- i.to_i
-end
-
-def otherBasis(basis, n)
- basis[2] = Vec.new(n.x, n.y, n.z)
- basis[1] = Vec.new(0.0, 0.0, 0.0)
-
- if n.x < 0.6 and n.x > -0.6 then
- basis[1].x = 1.0
- elsif n.y < 0.6 and n.y > -0.6 then
- basis[1].y = 1.0
- elsif n.z < 0.6 and n.z > -0.6 then
- basis[1].z = 1.0
- else
- basis[1].x = 1.0
- end
-
- basis[0] = basis[1].vcross(basis[2])
- basis[0] = basis[0].vnormalize
-
- basis[1] = basis[2].vcross(basis[0])
- basis[1] = basis[1].vnormalize
-end
-
-class Scene
- def initialize
- @spheres = Array.new
- @spheres[0] = Sphere.new(Vec.new(-2.0, 0.0, -3.5), 0.5)
- @spheres[1] = Sphere.new(Vec.new(-0.5, 0.0, -3.0), 0.5)
- @spheres[2] = Sphere.new(Vec.new(1.0, 0.0, -2.2), 0.5)
- @plane = Plane.new(Vec.new(0.0, -0.5, 0.0), Vec.new(0.0, 1.0, 0.0))
- end
-
- def ambient_occlusion(isect)
- basis = Array.new
- otherBasis(basis, isect.n)
-
- ntheta = NAO_SAMPLES
- nphi = NAO_SAMPLES
- eps = 0.0001
- occlusion = 0.0
-
- p0 = Vec.new(isect.pl.x + eps * isect.n.x,
- isect.pl.y + eps * isect.n.y,
- isect.pl.z + eps * isect.n.z)
- nphi.times do |j|
- ntheta.times do |i|
- r = rand
- phi = 2.0 * 3.14159265 * rand
- x = Math.cos(phi) * Math.sqrt(1.0 - r)
- y = Math.sin(phi) * Math.sqrt(1.0 - r)
- z = Math.sqrt(r)
-
- rx = x * basis[0].x + y * basis[1].x + z * basis[2].x
- ry = x * basis[0].y + y * basis[1].y + z * basis[2].y
- rz = x * basis[0].z + y * basis[1].z + z * basis[2].z
-
- raydir = Vec.new(rx, ry, rz)
- ray = Ray.new(p0, raydir)
-
- occisect = Isect.new
- @spheres[0].intersect(ray, occisect)
- @spheres[1].intersect(ray, occisect)
- @spheres[2].intersect(ray, occisect)
- @plane.intersect(ray, occisect)
- if occisect.hit then
- occlusion = occlusion + 1.0
- else
- 0.0
- end
- end
- end
-
- occlusion = (ntheta.to_f * nphi.to_f - occlusion) / (ntheta.to_f * nphi.to_f)
-
- Vec.new(occlusion, occlusion, occlusion)
- end
-
- def render(w, h, nsubsamples)
- cnt = 0
- nsf = nsubsamples.to_f
- h.times do |y|
- w.times do |x|
- rad = Vec.new(0.0, 0.0, 0.0)
-
- # Subsmpling
- nsubsamples.times do |v|
- nsubsamples.times do |u|
-
- cnt = cnt + 1
- wf = w.to_f
- hf = h.to_f
- xf = x.to_f
- yf = y.to_f
- uf = u.to_f
- vf = v.to_f
-
- px = (xf + (uf / nsf) - (wf / 2.0)) / (wf / 2.0)
- py = -(yf + (vf / nsf) - (hf / 2.0)) / (hf / 2.0)
-
- eye = Vec.new(px, py, -1.0).vnormalize
-
- ray = Ray.new(Vec.new(0.0, 0.0, 0.0), eye)
-
- isect = Isect.new
- @spheres[0].intersect(ray, isect)
- @spheres[1].intersect(ray, isect)
- @spheres[2].intersect(ray, isect)
- @plane.intersect(ray, isect)
- if isect.hit then
- col = ambient_occlusion(isect)
- rad.x = rad.x + col.x
- rad.y = rad.y + col.y
- rad.z = rad.z + col.z
- end
- end
- end
-
- r = rad.x / (nsf * nsf)
- g = rad.y / (nsf * nsf)
- b = rad.z / (nsf * nsf)
- printf("%c", clamp(r))
- printf("%c", clamp(g))
- printf("%c", clamp(b))
- end
- nil
- end
-
- nil
- end
-end
-
-alias printf_orig printf
-def printf *args
-end
-
-# File.open("ao.ppm", "w") do |fp|
- printf("P6\n")
- printf("%d %d\n", IMAGE_WIDTH, IMAGE_HEIGHT)
- printf("255\n", IMAGE_WIDTH, IMAGE_HEIGHT)
- Scene.new.render(IMAGE_WIDTH, IMAGE_HEIGHT, NSUBSAMPLES)
-# end
-
-undef printf
-alias printf printf_orig
diff --git a/benchmark/bm_hash_flatten.rb b/benchmark/bm_hash_flatten.rb
deleted file mode 100644
index e944aae9f2..0000000000
--- a/benchmark/bm_hash_flatten.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-h = {}
-
-10000.times do |i|
- h[i] = nil
-end
-
-1000.times do
- h.flatten
-end
diff --git a/benchmark/bm_hash_keys.rb b/benchmark/bm_hash_keys.rb
deleted file mode 100644
index 6863cd01f9..0000000000
--- a/benchmark/bm_hash_keys.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-h = {}
-
-10000.times do |i|
- h[i] = nil
-end
-
-5000.times do
- h.keys
-end
diff --git a/benchmark/bm_hash_shift.rb b/benchmark/bm_hash_shift.rb
deleted file mode 100644
index a645671a5b..0000000000
--- a/benchmark/bm_hash_shift.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-h = {}
-
-10000.times do |i|
- h[i] = nil
-end
-
-50000.times do
- k, v = h.shift
- h[k] = v
-end
diff --git a/benchmark/bm_hash_values.rb b/benchmark/bm_hash_values.rb
deleted file mode 100644
index 069441302f..0000000000
--- a/benchmark/bm_hash_values.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-h = {}
-
-10000.times do |i|
- h[i] = nil
-end
-
-5000.times do
- h.values
-end
diff --git a/benchmark/bm_so_binary_trees.rb b/benchmark/bm_so_binary_trees.rb
index b1693e4109..6a26465578 100644
--- a/benchmark/bm_so_binary_trees.rb
+++ b/benchmark/bm_so_binary_trees.rb
@@ -4,9 +4,7 @@
# contributed by Jesse Millikan
# disable output
-alias puts_orig puts
-def puts str
- # disable puts
+def STDOUT.write_ *args
end
def item_check(tree)
@@ -27,7 +25,7 @@ def bottom_up_tree(item, depth)
end
end
-max_depth = 16 # ARGV[0].to_i
+max_depth = 12 # 16 # ARGV[0].to_i
min_depth = 4
max_depth = min_depth + 2 if min_depth + 2 > max_depth
@@ -57,6 +55,3 @@ min_depth.step(max_depth + 1, 2) do |depth|
end
puts "long lived tree of depth #{max_depth}\t check: #{item_check(long_lived_tree)}"
-
-undef puts
-alias puts puts_orig
diff --git a/benchmark/bm_vm1_gc_short_lived.rb b/benchmark/bm_vm1_gc_short_lived.rb
deleted file mode 100644
index e78bca5668..0000000000
--- a/benchmark/bm_vm1_gc_short_lived.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-i = 0
-while i<30_000_000 # while loop 1
- a = '' # short-lived String
- b = ''
- c = ''
- d = ''
- e = ''
- f = ''
- i+=1
-end
diff --git a/benchmark/bm_vm1_gc_short_with_complex_long.rb b/benchmark/bm_vm1_gc_short_with_complex_long.rb
deleted file mode 100644
index b66052dee0..0000000000
--- a/benchmark/bm_vm1_gc_short_with_complex_long.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-def nested_hash h, n
- if n == 0
- ''
- else
- 10.times{
- h[Object.new] = nested_hash(h, n-1)
- }
- end
-end
-
-long_lived = Hash.new
-nested_hash long_lived, 6
-
-GC.start
-GC.start
-
-i = 0
-while i<30_000_000 # while loop 1
- a = '' # short-lived String
- b = ''
- c = ''
- d = ''
- e = ''
- f = ''
- i+=1
-end
-
diff --git a/benchmark/bm_vm1_gc_short_with_long.rb b/benchmark/bm_vm1_gc_short_with_long.rb
deleted file mode 100644
index 298dbc845b..0000000000
--- a/benchmark/bm_vm1_gc_short_with_long.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-long_lived = Array.new(1_000_000){|i| "#{i}"}
-GC.start
-GC.start
-i = 0
-while i<30_000_000 # while loop 1
- a = '' # short-lived String
- b = ''
- c = ''
- d = ''
- e = ''
- f = ''
- i+=1
-end
diff --git a/benchmark/bm_vm1_gc_short_with_symbol.rb b/benchmark/bm_vm1_gc_short_with_symbol.rb
deleted file mode 100644
index 6b15c1b7bf..0000000000
--- a/benchmark/bm_vm1_gc_short_with_symbol.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# make many symbols
-50_000.times{|i| sym = "sym#{i}".to_sym}
-GC.start
-GC.start
-
-i = 0
-while i<30_000_000 # while loop 1
- a = '' # short-lived String
- b = ''
- c = ''
- d = ''
- e = ''
- f = ''
- i+=1
-end
diff --git a/benchmark/bm_vm1_gc_wb_ary.rb b/benchmark/bm_vm1_gc_wb_ary.rb
deleted file mode 100644
index ecfab51dbf..0000000000
--- a/benchmark/bm_vm1_gc_wb_ary.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-long_lived = []
-GC.start
-GC.start
-
-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
deleted file mode 100644
index 017eff4f94..0000000000
--- a/benchmark/bm_vm1_gc_wb_obj.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-class C
- attr_accessor :foo
-end
-long_lived = C.new
-GC.start
-GC.start
-
-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_vm_thread_queue.rb b/benchmark/bm_vm_thread_queue.rb
deleted file mode 100644
index 37381ae62b..0000000000
--- a/benchmark/bm_vm_thread_queue.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-require 'thread'
-
-n = 1_000_000
-q = Queue.new
-consumer = Thread.new{
- while q.pop
- # consuming
- end
-}
-
-producer = Thread.new{
- n.times{
- q.push true
- }
- q.push nil
-}
-
-consumer.join
diff --git a/benchmark/gc/aobench.rb b/benchmark/gc/aobench.rb
deleted file mode 100644
index 2eed7abc83..0000000000
--- a/benchmark/gc/aobench.rb
+++ /dev/null
@@ -1 +0,0 @@
-require_relative '../bm_app_aobench.rb'
diff --git a/benchmark/gc/binary_trees.rb b/benchmark/gc/binary_trees.rb
deleted file mode 100644
index af8ea722aa..0000000000
--- a/benchmark/gc/binary_trees.rb
+++ /dev/null
@@ -1 +0,0 @@
-require_relative '../bm_so_binary_trees.rb'
diff --git a/benchmark/gc/gcbench.rb b/benchmark/gc/gcbench.rb
deleted file mode 100644
index 09a404466a..0000000000
--- a/benchmark/gc/gcbench.rb
+++ /dev/null
@@ -1,56 +0,0 @@
-require 'benchmark'
-require 'pp'
-require 'optparse'
-
-$list = true
-$gcprof = true
-
-opt = OptionParser.new
-opt.on('-q'){$list = false}
-opt.on('-d'){$gcprof = false}
-opt.parse!(ARGV)
-
-script = File.join(File.dirname(__FILE__), ARGV.shift)
-script += '.rb' unless FileTest.exist?(script)
-raise "#{script} not found" unless FileTest.exist?(script)
-
-puts "Script: #{script}"
-
-if $gcprof
- GC::Profiler.enable
-end
-
-tms = Benchmark.measure{|x|
- load script
-}
-
-gc_time = 0
-
-if $gcprof
- gc_time = GC::Profiler.total_time
- GC::Profiler.report if $list and RUBY_VERSION >= '2.0.0' # before 1.9.3, report() may run infinite loop
- GC::Profiler.disable
-end
-
-pp GC.stat
-
-puts "#{RUBY_DESCRIPTION} #{GC::OPTS.inspect}" if defined?(GC::OPTS)
-
-desc = "#{RUBY_VERSION}#{RUBY_PATCHLEVEL >= 0 ? "p#{RUBY_PATCHLEVEL}" : "dev"}"
-name = File.basename(script, '.rb')
-
-puts
-puts script
-puts Benchmark::CAPTION
-puts tms
-puts "GC total time (sec): #{gc_time}"
-
-# show High-Water Mark on Linux
-if File.exist?('/proc/self/status') && /VmHWM:\s*(\d+.+)/ =~ File.read('/proc/self/status')
- puts
- puts "VmHWM: #{$1.chomp}"
-end
-
-puts
-puts "Summary of #{name} on #{desc}\t#{tms.real}\t#{gc_time}\t#{GC.count}"
-puts " (real time in sec, GC time in sec, GC count)"
diff --git a/benchmark/gc/hash1.rb b/benchmark/gc/hash1.rb
deleted file mode 100644
index cb030d458d..0000000000
--- a/benchmark/gc/hash1.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-value = 0.01
-h = {}
-n = 50_000
-
-1.upto(n){|i|
- h["%020d" % i] = "v-#{i}"
-}
-
-(n * 1_000).times{
- ''
-}
diff --git a/benchmark/gc/hash2.rb b/benchmark/gc/hash2.rb
deleted file mode 100644
index e8c943fb21..0000000000
--- a/benchmark/gc/hash2.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-value = 0.01
-h = {}
-n = 4*(10**6)
-
-1.upto(n){|i|
- h["%020d" % i] = value * i
-}
diff --git a/benchmark/gc/null.rb b/benchmark/gc/null.rb
deleted file mode 100644
index c05a79f561..0000000000
--- a/benchmark/gc/null.rb
+++ /dev/null
@@ -1 +0,0 @@
-# null
diff --git a/benchmark/gc/pentomino.rb b/benchmark/gc/pentomino.rb
deleted file mode 100644
index 94ba74be89..0000000000
--- a/benchmark/gc/pentomino.rb
+++ /dev/null
@@ -1 +0,0 @@
-require_relative '../bm_app_pentomino.rb'
diff --git a/benchmark/gc/rdoc.rb b/benchmark/gc/rdoc.rb
deleted file mode 100644
index 14c89f5611..0000000000
--- a/benchmark/gc/rdoc.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-require 'rdoc/rdoc'
-require 'tmpdir'
-
-srcdir = File.expand_path('../..', __dir__)
-
-Dir.mktmpdir('rdocbench-'){|d|
- dir = File.join(d, 'rdocbench')
- args = %W(--root #{srcdir} --page-dir #{srcdir}/doc --encoding=UTF-8 --no-force-update --all --ri --debug --quiet #{srcdir})
- args << '--op' << dir
-
- r = RDoc::RDoc.new
- r.document args
-}
diff --git a/benchmark/gc/redblack.rb b/benchmark/gc/redblack.rb
deleted file mode 100644
index c66290140a..0000000000
--- a/benchmark/gc/redblack.rb
+++ /dev/null
@@ -1,366 +0,0 @@
-# This benchmark is imported from https://github.com/jruby/rubybench/blob/master/time/bench_red_black.rb
-# License is License is Apache-2
-
-require 'benchmark'
-
-# Algorithm based on "Introduction to Algorithms" by Cormen and others
-class RedBlackTree
- class Node
- attr_accessor :color
- attr_accessor :key
- attr_accessor :left
- attr_accessor :right
- attr_accessor :parent
-
- RED = :red
- BLACK = :black
- COLORS = [RED, BLACK].freeze
-
- def initialize(key, color = RED)
- raise ArgumentError, "Bad value for color parameter" unless COLORS.include?(color)
- @color = color
- @key = key
- @left = @right = @parent = NilNode.instance
- end
-
- def black?
- return color == BLACK
- end
-
- def red?
- return color == RED
- end
- end
-
- class NilNode < Node
- class << self
- private :new
-
- # it's not thread safe
- def instance
- @instance ||= begin
- def instance
- return @instance
- end
-
- new
- end
- end
- end
-
- def initialize
- self.color = BLACK
- self.key = 0
- self.left = nil
- self.right = nil
- self.parent = nil
- end
-
- def nil?
- return true
- end
- end
-
- include Enumerable
-
- attr_accessor :root
- attr_accessor :size
-
- def initialize
- self.root = NilNode.instance
- self.size = 0
- end
-
- def add(key)
- insert(Node.new(key))
- end
-
- def insert(x)
- insert_helper(x)
-
- x.color = Node::RED
- while x != root && x.parent.color == Node::RED
- if x.parent == x.parent.parent.left
- y = x.parent.parent.right
- if !y.nil? && y.color == Node::RED
- x.parent.color = Node::BLACK
- y.color = Node::BLACK
- x.parent.parent.color = Node::RED
- x = x.parent.parent
- else
- if x == x.parent.right
- x = x.parent
- left_rotate(x)
- end
- x.parent.color = Node::BLACK
- x.parent.parent.color = Node::RED
- right_rotate(x.parent.parent)
- end
- else
- y = x.parent.parent.left
- if !y.nil? && y.color == Node::RED
- x.parent.color = Node::BLACK
- y.color = Node::BLACK
- x.parent.parent.color = Node::RED
- x = x.parent.parent
- else
- if x == x.parent.left
- x = x.parent
- right_rotate(x)
- end
- x.parent.color = Node::BLACK
- x.parent.parent.color = Node::RED
- left_rotate(x.parent.parent)
- end
- end
- end
- root.color = Node::BLACK
- end
-
- alias << insert
-
- def delete(z)
- y = (z.left.nil? || z.right.nil?) ? z : successor(z)
- x = y.left.nil? ? y.right : y.left
- x.parent = y.parent
-
- if y.parent.nil?
- self.root = x
- else
- if y == y.parent.left
- y.parent.left = x
- else
- y.parent.right = x
- end
- end
-
- z.key = y.key if y != z
-
- if y.color == Node::BLACK
- delete_fixup(x)
- end
-
- self.size -= 1
- return y
- end
-
- def minimum(x = root)
- while !x.left.nil?
- x = x.left
- end
- return x
- end
-
- def maximum(x = root)
- while !x.right.nil?
- x = x.right
- end
- return x
- end
-
- def successor(x)
- if !x.right.nil?
- return minimum(x.right)
- end
- y = x.parent
- while !y.nil? && x == y.right
- x = y
- y = y.parent
- end
- return y
- end
-
- def predecessor(x)
- if !x.left.nil?
- return maximum(x.left)
- end
- y = x.parent
- while !y.nil? && x == y.left
- x = y
- y = y.parent
- end
- return y
- end
-
- def inorder_walk(x = root)
- x = self.minimum
- while !x.nil?
- yield x.key
- x = successor(x)
- end
- end
-
- alias each inorder_walk
-
- def reverse_inorder_walk(x = root)
- x = self.maximum
- while !x.nil?
- yield x.key
- x = predecessor(x)
- end
- end
-
- alias reverse_each reverse_inorder_walk
-
- def search(key, x = root)
- while !x.nil? && x.key != key
- key < x.key ? x = x.left : x = x.right
- end
- return x
- end
-
- def empty?
- return self.root.nil?
- end
-
- def black_height(x = root)
- height = 0
- while !x.nil?
- x = x.left
- height +=1 if x.nil? || x.black?
- end
- return height
- end
-
-private
-
- def left_rotate(x)
- raise "x.right is nil!" if x.right.nil?
- y = x.right
- x.right = y.left
- y.left.parent = x if !y.left.nil?
- y.parent = x.parent
- if x.parent.nil?
- self.root = y
- else
- if x == x.parent.left
- x.parent.left = y
- else
- x.parent.right = y
- end
- end
- y.left = x
- x.parent = y
- end
-
- def right_rotate(x)
- raise "x.left is nil!" if x.left.nil?
- y = x.left
- x.left = y.right
- y.right.parent = x if !y.right.nil?
- y.parent = x.parent
- if x.parent.nil?
- self.root = y
- else
- if x == x.parent.left
- x.parent.left = y
- else
- x.parent.right = y
- end
- end
- y.right = x
- x.parent = y
- end
-
- def insert_helper(z)
- y = NilNode.instance
- x = root
- while !x.nil?
- y = x
- z.key < x.key ? x = x.left : x = x.right
- end
- z.parent = y
- if y.nil?
- self.root = z
- else
- z.key < y.key ? y.left = z : y.right = z
- end
- self.size += 1
- end
-
- def delete_fixup(x)
- while x != root && x.color == Node::BLACK
- if x == x.parent.left
- w = x.parent.right
- if w.color == Node::RED
- w.color = Node::BLACK
- x.parent.color = Node::RED
- left_rotate(x.parent)
- w = x.parent.right
- end
- if w.left.color == Node::BLACK && w.right.color == Node::BLACK
- w.color = Node::RED
- x = x.parent
- else
- if w.right.color == Node::BLACK
- w.left.color = Node::BLACK
- w.color = Node::RED
- right_rotate(w)
- w = x.parent.right
- end
- w.color = x.parent.color
- x.parent.color = Node::BLACK
- w.right.color = Node::BLACK
- left_rotate(x.parent)
- x = root
- end
- else
- w = x.parent.left
- if w.color == Node::RED
- w.color = Node::BLACK
- x.parent.color = Node::RED
- right_rotate(x.parent)
- w = x.parent.left
- end
- if w.right.color == Node::BLACK && w.left.color == Node::BLACK
- w.color = Node::RED
- x = x.parent
- else
- if w.left.color == Node::BLACK
- w.right.color = Node::BLACK
- w.color = Node::RED
- left_rotate(w)
- w = x.parent.left
- end
- w.color = x.parent.color
- x.parent.color = Node::BLACK
- w.left.color = Node::BLACK
- right_rotate(x.parent)
- x = root
- end
- end
- end
- x.color = Node::BLACK
- end
-end
-
-def rbt_bm
- n = 100_000
- a1 = []; n.times { a1 << rand(999_999) }
- a2 = []; n.times { a2 << rand(999_999) }
-
- start = Time.now
-
- tree = RedBlackTree.new
-
- n.times {|i| tree.add(i) }
- n.times { tree.delete(tree.root) }
-
- tree = RedBlackTree.new
- a1.each {|e| tree.add(e) }
- a2.each {|e| tree.search(e) }
- tree.inorder_walk {|key| key + 1 }
- tree.reverse_inorder_walk {|key| key + 1 }
- n.times { tree.minimum }
- n.times { tree.maximum }
-
- return Time.now - start
-end
-
-N = (ARGV[0] || 10).to_i
-
-N.times do
- # puts rbt_bm.to_f
- rbt_bm.to_f
- # puts "GC.count = #{GC.count}" if GC.respond_to?(:count)
-end
diff --git a/benchmark/gc/ring.rb b/benchmark/gc/ring.rb
deleted file mode 100644
index be2c7b7250..0000000000
--- a/benchmark/gc/ring.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# create many old objects
-
-max = 30_000_000
-
-class Ring
- attr_reader :next_ring
- def initialize n = nil
- @next_ring = n
- end
-
-
- def size
- s = 1
- ring = self
- while ring.next_ring
- s += 1
- ring = ring.next_ring
- end
- s
- end
-end
-
-ring = Ring.new
-
-max.times{
- ring = Ring.new(ring)
-}
-
-# p ring.size
diff --git a/bignum.c b/bignum.c
index 6c2cda3937..8601d80342 100644
--- a/bignum.c
+++ b/bignum.c
@@ -25,2851 +25,30 @@
#endif
#include <assert.h>
-#if defined(HAVE_LIBGMP) && defined(HAVE_GMP_H)
-#define USE_GMP
-#include <gmp.h>
-#endif
-
-#define RB_BIGNUM_TYPE_P(x) RB_TYPE_P((x), T_BIGNUM)
-
VALUE rb_cBignum;
-const char ruby_digitmap[] = "0123456789abcdefghijklmnopqrstuvwxyz";
-
-#ifndef SIZEOF_BDIGIT_DBL
-# if SIZEOF_INT*2 <= SIZEOF_LONG_LONG
-# define SIZEOF_BDIGIT_DBL SIZEOF_LONG_LONG
-# else
-# define SIZEOF_BDIGIT_DBL SIZEOF_LONG
-# endif
-#endif
-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(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));
-
-#if SIZEOF_BDIGITS < SIZEOF_LONG
-STATIC_ASSERT(sizeof_long_and_sizeof_bdigit, SIZEOF_LONG % SIZEOF_BDIGITS == 0);
-#else
-STATIC_ASSERT(sizeof_long_and_sizeof_bdigit, SIZEOF_BDIGITS % SIZEOF_LONG == 0);
-#endif
+static VALUE big_three = Qnil;
-#ifdef WORDS_BIGENDIAN
-# define HOST_BIGENDIAN_P 1
-#else
-# define HOST_BIGENDIAN_P 0
+#if defined __MINGW32__
+#define USHORT _USHORT
#endif
-#define ALIGNOF(type) ((int)offsetof(struct { char f1; type f2; }, f2))
-/* (!LSHIFTABLE(d, n) ? 0 : (n)) is same as n but suppress a warning, C4293, by Visual Studio. */
-#define LSHIFTABLE(d, n) ((n) < sizeof(d) * CHAR_BIT)
-#define LSHIFTX(d, n) (!LSHIFTABLE(d, n) ? 0 : ((d) << (!LSHIFTABLE(d, n) ? 0 : (n))))
-#define CLEAR_LOWBITS(d, numbits) ((d) & LSHIFTX(~((d)*0), (numbits)))
-#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 BIGRAD ((BDIGIT_DBL)1 << BITSPERDIG)
#define BIGRAD_HALF ((BDIGIT)(BIGRAD >> 1))
-#define BDIGIT_MSB(d) (((d) & BIGRAD_HALF) != 0)
-#define BIGUP(x) LSHIFTX(((x) + (BDIGIT_DBL)0), BITSPERDIG)
-#define BIGDN(x) RSHIFT((x),BITSPERDIG)
-#define BIGLO(x) ((BDIGIT)((x) & BDIGMAX))
-#define BDIGMAX ((BDIGIT)(BIGRAD-1))
-#define BDIGIT_DBL_MAX (~(BDIGIT_DBL)0)
-
-#if SIZEOF_BDIGITS == 2
-# define swap_bdigit(x) swap16(x)
-#elif SIZEOF_BDIGITS == 4
-# define swap_bdigit(x) swap32(x)
-#elif SIZEOF_BDIGITS == 8
-# define swap_bdigit(x) swap64(x)
+#define DIGSPERLONG (SIZEOF_LONG/SIZEOF_BDIGITS)
+#if HAVE_LONG_LONG
+# define DIGSPERLL (SIZEOF_LONG_LONG/SIZEOF_BDIGITS)
#endif
+#define BIGUP(x) ((BDIGIT_DBL)(x) << BITSPERDIG)
+#define BIGDN(x) RSHIFT((x),BITSPERDIG)
+#define BIGLO(x) ((BDIGIT)((x) & (BIGRAD-1)))
+#define BDIGMAX ((BDIGIT)-1)
#define BIGZEROP(x) (RBIGNUM_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) : \
- 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 BARY_ARGS(ary) ary, numberof(ary)
-
-#define BARY_ADD(z, x, y) bary_add(BARY_ARGS(z), BARY_ARGS(x), BARY_ARGS(y))
-#define BARY_SUB(z, x, y) bary_sub(BARY_ARGS(z), BARY_ARGS(x), BARY_ARGS(y))
-#define BARY_SHORT_MUL(z, x, y) bary_short_mul(BARY_ARGS(z), BARY_ARGS(x), BARY_ARGS(y))
-#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 bignew(len,sign) bignew_1(rb_cBignum,(len),(sign))
-
-#define BDIGITS_ZERO(ptr, n) do { \
- BDIGIT *bdigitz_zero_ptr = (ptr); \
- size_t bdigitz_zero_n = (n); \
- while (bdigitz_zero_n) { \
- *bdigitz_zero_ptr++ = 0; \
- bdigitz_zero_n--; \
- } \
-} while (0)
-
-#define BARY_TRUNC(ds, n) do { \
- while (0 < (n) && (ds)[(n)-1] == 0) \
- (n)--; \
- } while (0)
-
-#define KARATSUBA_BALANCED(xn, yn) ((yn)/2 < (xn))
-#define TOOM3_BALANCED(xn, yn) (((yn)+2)/3 * 2 < (xn))
-
-#define GMP_MUL_DIGITS 20
-#define KARATSUBA_MUL_DIGITS 70
-#define TOOM3_MUL_DIGITS 150
-
-#define GMP_DIV_DIGITS 20
-#define GMP_BIG2STR_DIGITS 20
-#define GMP_STR2BIG_DIGITS 20
-
-typedef void (mulfunc_t)(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn, BDIGIT *wds, size_t wn);
-
-static mulfunc_t bary_mul_toom3_start;
-static mulfunc_t bary_mul_karatsuba_start;
-static BDIGIT bigdivrem_single(BDIGIT *qds, const BDIGIT *xds, size_t xn, BDIGIT y);
-static void bary_divmod(BDIGIT *qds, size_t qn, BDIGIT *rds, size_t rn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn);
-
-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 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; }
-#endif
-
-#define U16(a) ((uint16_t)(a))
-#define U32(a) ((uint32_t)(a))
-#ifdef HAVE_UINT64_T
-#define U64(a,b) (((uint64_t)(a) << 32) | (b))
-#endif
-#ifdef HAVE_UINT128_T
-#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.
-
-def big(n, bits)
- ns = []
- ((bits+31)/32).times {
- ns << sprintf("0x%08x", n & 0xffff_ffff)
- n >>= 32
- }
- "U#{bits}(" + ns.reverse.join(",") + ")"
-end
-def values(ary, width, indent)
- lines = [""]
- ary.each {|e|
- lines << "" if !ary.last.empty? && width < (lines.last + e + ", ").length
- lines.last << e + ", "
- }
- lines.map {|line| " " * indent + line.chomp(" ") + "\n" }.join
-end
-[16,32,64,128].each {|bits|
- max = 2**bits-1
- exps = []
- nums = []
- 2.upto(36) {|base|
- exp = 0
- n = 1
- while n * base <= max
- exp += 1
- n *= base
- end
- exps << exp.to_s
- nums << big(n, bits)
- }
- puts "#ifdef HAVE_UINT#{bits}_T"
- puts "static const int maxpow#{bits}_exp[35] = {"
- print values(exps, 70, 4)
- puts "};"
- puts "static const uint#{bits}_t maxpow#{bits}_num[35] = {"
- print values(nums, 70, 4)
- puts "};"
- puts "#endif"
-}
-
- */
-
-#ifdef HAVE_UINT16_T
-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,
-};
-static const uint16_t maxpow16_num[35] = {
- U16(0x00008000), U16(0x0000e6a9), U16(0x00004000), U16(0x00003d09),
- U16(0x0000b640), U16(0x000041a7), U16(0x00008000), U16(0x0000e6a9),
- U16(0x00002710), U16(0x00003931), U16(0x00005100), U16(0x00006f91),
- U16(0x00009610), U16(0x0000c5c1), U16(0x00001000), U16(0x00001331),
- U16(0x000016c8), U16(0x00001acb), U16(0x00001f40), U16(0x0000242d),
- U16(0x00002998), U16(0x00002f87), U16(0x00003600), U16(0x00003d09),
- U16(0x000044a8), U16(0x00004ce3), U16(0x000055c0), U16(0x00005f45),
- U16(0x00006978), U16(0x0000745f), U16(0x00008000), U16(0x00008c61),
- U16(0x00009988), U16(0x0000a77b), U16(0x0000b640),
-};
-#endif
-#ifdef HAVE_UINT32_T
-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,
-};
-static const uint32_t maxpow32_num[35] = {
- U32(0x80000000), U32(0xcfd41b91), U32(0x40000000), U32(0x48c27395),
- U32(0x81bf1000), U32(0x75db9c97), U32(0x40000000), U32(0xcfd41b91),
- U32(0x3b9aca00), U32(0x8c8b6d2b), U32(0x19a10000), U32(0x309f1021),
- U32(0x57f6c100), U32(0x98c29b81), U32(0x10000000), U32(0x18754571),
- U32(0x247dbc80), U32(0x3547667b), U32(0x4c4b4000), U32(0x6b5a6e1d),
- U32(0x94ace180), U32(0xcaf18367), U32(0x0b640000), U32(0x0e8d4a51),
- U32(0x1269ae40), U32(0x17179149), U32(0x1cb91000), U32(0x23744899),
- U32(0x2b73a840), U32(0x34e63b41), U32(0x40000000), U32(0x4cfa3cc1),
- U32(0x5c13d840), U32(0x6d91b519), U32(0x81bf1000),
-};
-#endif
-#ifdef 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,
- 12,
-};
-static const uint64_t maxpow64_num[35] = {
- U64(0x80000000,0x00000000), U64(0xa8b8b452,0x291fe821),
- U64(0x40000000,0x00000000), U64(0x6765c793,0xfa10079d),
- U64(0x41c21cb8,0xe1000000), U64(0x36427987,0x50226111),
- U64(0x80000000,0x00000000), U64(0xa8b8b452,0x291fe821),
- U64(0x8ac72304,0x89e80000), U64(0x4d28cb56,0xc33fa539),
- U64(0x1eca170c,0x00000000), U64(0x780c7372,0x621bd74d),
- U64(0x1e39a505,0x7d810000), U64(0x5b27ac99,0x3df97701),
- U64(0x10000000,0x00000000), U64(0x27b95e99,0x7e21d9f1),
- U64(0x5da0e1e5,0x3c5c8000), U64(0xd2ae3299,0xc1c4aedb),
- U64(0x16bcc41e,0x90000000), U64(0x2d04b7fd,0xd9c0ef49),
- U64(0x5658597b,0xcaa24000), U64(0xa0e20737,0x37609371),
- U64(0x0c29e980,0x00000000), U64(0x14adf4b7,0x320334b9),
- U64(0x226ed364,0x78bfa000), U64(0x383d9170,0xb85ff80b),
- U64(0x5a3c23e3,0x9c000000), U64(0x8e651373,0x88122bcd),
- U64(0xdd41bb36,0xd259e000), U64(0x0aee5720,0xee830681),
- U64(0x10000000,0x00000000), U64(0x172588ad,0x4f5f0981),
- U64(0x211e44f7,0xd02c1000), U64(0x2ee56725,0xf06e5c71),
- U64(0x41c21cb8,0xe1000000),
-};
-#endif
-#ifdef 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,
- 24,
-};
-static const uint128_t maxpow128_num[35] = {
- U128(0x80000000,0x00000000,0x00000000,0x00000000),
- U128(0x6f32f1ef,0x8b18a2bc,0x3cea5978,0x9c79d441),
- U128(0x40000000,0x00000000,0x00000000,0x00000000),
- U128(0xd0cf4b50,0xcfe20765,0xfff4b4e3,0xf741cf6d),
- U128(0x6558e2a0,0x921fe069,0x42860000,0x00000000),
- U128(0x5080c7b7,0xd0e31ba7,0x5911a67d,0xdd3d35e7),
- U128(0x40000000,0x00000000,0x00000000,0x00000000),
- U128(0x6f32f1ef,0x8b18a2bc,0x3cea5978,0x9c79d441),
- U128(0x4b3b4ca8,0x5a86c47a,0x098a2240,0x00000000),
- U128(0xffd1390a,0x0adc2fb8,0xdabbb817,0x4d95c99b),
- U128(0x2c6fdb36,0x4c25e6c0,0x00000000,0x00000000),
- U128(0x384bacd6,0x42c343b4,0xe90c4272,0x13506d29),
- U128(0x31f5db32,0xa34aced6,0x0bf13a0e,0x00000000),
- U128(0x20753ada,0xfd1e839f,0x53686d01,0x3143ee01),
- U128(0x10000000,0x00000000,0x00000000,0x00000000),
- U128(0x68ca11d6,0xb4f6d1d1,0xfaa82667,0x8073c2f1),
- U128(0x223e493b,0xb3bb69ff,0xa4b87d6c,0x40000000),
- U128(0xad62418d,0x14ea8247,0x01c4b488,0x6cc66f59),
- U128(0x2863c1f5,0xcdae42f9,0x54000000,0x00000000),
- U128(0xa63fd833,0xb9386b07,0x36039e82,0xbe651b25),
- U128(0x1d1f7a9c,0xd087a14d,0x28cdf3d5,0x10000000),
- U128(0x651b5095,0xc2ea8fc1,0xb30e2c57,0x77aaf7e1),
- U128(0x0ddef20e,0xff760000,0x00000000,0x00000000),
- U128(0x29c30f10,0x29939b14,0x6664242d,0x97d9f649),
- U128(0x786a435a,0xe9558b0e,0x6aaf6d63,0xa8000000),
- U128(0x0c5afe6f,0xf302bcbf,0x94fd9829,0xd87f5079),
- U128(0x1fce575c,0xe1692706,0x07100000,0x00000000),
- U128(0x4f34497c,0x8597e144,0x36e91802,0x00528229),
- U128(0xbf3a8e1d,0x41ef2170,0x7802130d,0x84000000),
- U128(0x0e7819e1,0x7f1eb0fb,0x6ee4fb89,0x01d9531f),
- U128(0x20000000,0x00000000,0x00000000,0x00000000),
- U128(0x4510460d,0xd9e879c0,0x14a82375,0x2f22b321),
- U128(0x91abce3c,0x4b4117ad,0xe76d35db,0x22000000),
- U128(0x08973ea3,0x55d75bc2,0x2e42c391,0x727d69e1),
- U128(0x10e425c5,0x6daffabc,0x35c10000,0x00000000),
-};
-#endif
-
-static BDIGIT_DBL
-maxpow_in_bdigit_dbl(int base, int *exp_ret)
-{
- BDIGIT_DBL maxpow;
- int exponent;
-
- assert(2 <= base && base <= 36);
-
- {
-#if SIZEOF_BDIGIT_DBL == 2
- maxpow = maxpow16_num[base-2];
- exponent = maxpow16_exp[base-2];
-#elif SIZEOF_BDIGIT_DBL == 4
- maxpow = maxpow32_num[base-2];
- exponent = maxpow32_exp[base-2];
-#elif SIZEOF_BDIGIT_DBL == 8 && defined HAVE_UINT64_T
- maxpow = maxpow64_num[base-2];
- exponent = maxpow64_exp[base-2];
-#elif SIZEOF_BDIGIT_DBL == 16 && defined HAVE_UINT128_T
- maxpow = maxpow128_num[base-2];
- exponent = maxpow128_exp[base-2];
-#else
- maxpow = base;
- exponent = 1;
- while (maxpow <= BDIGIT_DBL_MAX / base) {
- maxpow *= base;
- exponent++;
- }
-#endif
- }
-
- *exp_ret = exponent;
- return maxpow;
-}
-
-static inline BDIGIT_DBL
-bary2bdigitdbl(const BDIGIT *ds, size_t n)
-{
- assert(n <= 2);
-
- if (n == 2)
- return ds[0] | BIGUP(ds[1]);
- if (n == 1)
- return ds[0];
- return 0;
-}
-
-static inline void
-bdigitdbl2bary(BDIGIT *ds, size_t n, BDIGIT_DBL num)
-{
- assert(n == 2);
-
- ds[0] = BIGLO(num);
- ds[1] = (BDIGIT)BIGDN(num);
-}
-
-static int
-bary_cmp(const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn)
-{
- BARY_TRUNC(xds, xn);
- BARY_TRUNC(yds, yn);
-
- if (xn < yn)
- return -1;
- if (xn > yn)
- return 1;
-
- while (xn-- && xds[xn] == yds[xn])
- ;
- if (xn == (size_t)-1)
- return 0;
- return xds[xn] < yds[xn] ? -1 : 1;
-}
-
-static BDIGIT
-bary_small_lshift(BDIGIT *zds, const BDIGIT *xds, size_t n, int shift)
-{
- size_t i;
- BDIGIT_DBL num = 0;
- assert(0 <= shift && shift < BITSPERDIG);
-
- for (i=0; i<n; i++) {
- num = num | (BDIGIT_DBL)*xds++ << shift;
- *zds++ = BIGLO(num);
- num = BIGDN(num);
- }
- return BIGLO(num);
-}
-
-static void
-bary_small_rshift(BDIGIT *zds, const BDIGIT *xds, size_t n, int shift, BDIGIT higher_bdigit)
-{
- BDIGIT_DBL num = 0;
- BDIGIT x;
-
- assert(0 <= shift && shift < BITSPERDIG);
-
- num = BIGUP(higher_bdigit);
- while (n--) {
- num = (num | xds[n]) >> shift;
- x = xds[n];
- zds[n] = BIGLO(num);
- num = BIGUP(x);
- }
-}
-
-static int
-bary_zero_p(BDIGIT *xds, size_t xn)
-{
- if (xn == 0)
- return 1;
- do {
- if (xds[--xn]) return 0;
- } while (xn);
- return 1;
-}
-
-static void
-bary_neg(BDIGIT *ds, size_t n)
-{
- while (n--)
- ds[n] = BIGLO(~ds[n]);
-}
-
-static int
-bary_2comp(BDIGIT *ds, size_t n)
-{
- size_t i;
- i = 0;
- for (i = 0; i < n; i++) {
- if (ds[i] != 0) {
- goto non_zero;
- }
- }
- return 1;
-
- non_zero:
- ds[i] = BIGLO(~ds[i] + 1);
- i++;
- for (; i < n; i++) {
- ds[i] = BIGLO(~ds[i]);
- }
- return 0;
-}
-
-static void
-bary_swap(BDIGIT *ds, size_t num_bdigits)
-{
- BDIGIT *p1 = ds;
- BDIGIT *p2 = ds + num_bdigits - 1;
- for (; p1 < p2; p1++, p2--) {
- BDIGIT tmp = *p1;
- *p1 = *p2;
- *p2 = tmp;
- }
-}
-
-#define INTEGER_PACK_WORDORDER_MASK \
- (INTEGER_PACK_MSWORD_FIRST | \
- INTEGER_PACK_LSWORD_FIRST)
-#define INTEGER_PACK_BYTEORDER_MASK \
- (INTEGER_PACK_MSBYTE_FIRST | \
- INTEGER_PACK_LSBYTE_FIRST | \
- INTEGER_PACK_NATIVE_BYTE_ORDER)
-
-static void
-validate_integer_pack_format(size_t numwords, size_t wordsize, size_t nails, int flags, int supported_flags)
-{
- int wordorder_bits = flags & INTEGER_PACK_WORDORDER_MASK;
- int byteorder_bits = flags & INTEGER_PACK_BYTEORDER_MASK;
-
- if (flags & ~supported_flags) {
- rb_raise(rb_eArgError, "unsupported flags specified");
- }
- if (wordorder_bits == 0) {
- if (1 < numwords)
- rb_raise(rb_eArgError, "word order not specified");
- }
- else if (wordorder_bits != INTEGER_PACK_MSWORD_FIRST &&
- wordorder_bits != INTEGER_PACK_LSWORD_FIRST)
- rb_raise(rb_eArgError, "unexpected word order");
- if (byteorder_bits == 0) {
- rb_raise(rb_eArgError, "byte order not specified");
- }
- else if (byteorder_bits != INTEGER_PACK_MSBYTE_FIRST &&
- byteorder_bits != INTEGER_PACK_LSBYTE_FIRST &&
- byteorder_bits != INTEGER_PACK_NATIVE_BYTE_ORDER)
- rb_raise(rb_eArgError, "unexpected byte order");
- if (wordsize == 0)
- rb_raise(rb_eArgError, "invalid wordsize: %"PRI_SIZE_PREFIX"u", wordsize);
- if (SSIZE_MAX < wordsize)
- rb_raise(rb_eArgError, "too big wordsize: %"PRI_SIZE_PREFIX"u", wordsize);
- if (wordsize <= nails / CHAR_BIT)
- rb_raise(rb_eArgError, "too big nails: %"PRI_SIZE_PREFIX"u", nails);
- if (SIZE_MAX / wordsize < numwords)
- rb_raise(rb_eArgError, "too big numwords * wordsize: %"PRI_SIZE_PREFIX"u * %"PRI_SIZE_PREFIX"u", numwords, wordsize);
-}
-
-static void
-integer_pack_loop_setup(
- size_t numwords, size_t wordsize, size_t nails, int flags,
- size_t *word_num_fullbytes_ret,
- int *word_num_partialbits_ret,
- size_t *word_start_ret,
- ssize_t *word_step_ret,
- size_t *word_last_ret,
- size_t *byte_start_ret,
- int *byte_step_ret)
-{
- int wordorder_bits = flags & INTEGER_PACK_WORDORDER_MASK;
- int byteorder_bits = flags & INTEGER_PACK_BYTEORDER_MASK;
- size_t word_num_fullbytes;
- int word_num_partialbits;
- size_t word_start;
- ssize_t word_step;
- size_t word_last;
- size_t byte_start;
- int byte_step;
-
- word_num_partialbits = CHAR_BIT - (int)(nails % CHAR_BIT);
- if (word_num_partialbits == CHAR_BIT)
- word_num_partialbits = 0;
- word_num_fullbytes = wordsize - (nails / CHAR_BIT);
- if (word_num_partialbits != 0) {
- word_num_fullbytes--;
- }
-
- if (wordorder_bits == INTEGER_PACK_MSWORD_FIRST) {
- word_start = wordsize*(numwords-1);
- word_step = -(ssize_t)wordsize;
- word_last = 0;
- }
- else {
- word_start = 0;
- word_step = wordsize;
- word_last = wordsize*(numwords-1);
- }
-
- if (byteorder_bits == INTEGER_PACK_NATIVE_BYTE_ORDER) {
-#ifdef WORDS_BIGENDIAN
- byteorder_bits = INTEGER_PACK_MSBYTE_FIRST;
-#else
- byteorder_bits = INTEGER_PACK_LSBYTE_FIRST;
-#endif
- }
- if (byteorder_bits == INTEGER_PACK_MSBYTE_FIRST) {
- byte_start = wordsize-1;
- byte_step = -1;
- }
- else {
- byte_start = 0;
- byte_step = 1;
- }
-
- *word_num_partialbits_ret = word_num_partialbits;
- *word_num_fullbytes_ret = word_num_fullbytes;
- *word_start_ret = word_start;
- *word_step_ret = word_step;
- *word_last_ret = word_last;
- *byte_start_ret = byte_start;
- *byte_step_ret = byte_step;
-}
-
-static inline void
-integer_pack_fill_dd(BDIGIT **dpp, BDIGIT **dep, BDIGIT_DBL *ddp, int *numbits_in_dd_p)
-{
- if (*dpp < *dep && BITSPERDIG <= (int)sizeof(*ddp) * CHAR_BIT - *numbits_in_dd_p) {
- *ddp |= (BDIGIT_DBL)(*(*dpp)++) << *numbits_in_dd_p;
- *numbits_in_dd_p += BITSPERDIG;
- }
- else if (*dpp == *dep) {
- /* higher bits are infinity zeros */
- *numbits_in_dd_p = (int)sizeof(*ddp) * CHAR_BIT;
- }
-}
-
-static inline BDIGIT_DBL
-integer_pack_take_lowbits(int n, BDIGIT_DBL *ddp, int *numbits_in_dd_p)
-{
- BDIGIT_DBL ret;
- ret = (*ddp) & (((BDIGIT_DBL)1 << n) - 1);
- *ddp >>= n;
- *numbits_in_dd_p -= n;
- return ret;
-}
-
-#if !defined(WORDS_BIGENDIAN)
-static int
-bytes_2comp(unsigned char *buf, size_t len)
-{
- size_t i;
- for (i = 0; i < len; i++)
- buf[i] = ~buf[i];
- for (i = 0; i < len; i++) {
- buf[i]++;
- if (buf[i] != 0)
- return 0;
- }
- return 1;
-}
-#endif
-
-static int
-bary_pack(int sign, BDIGIT *ds, size_t num_bdigits, void *words, size_t numwords, size_t wordsize, size_t nails, int flags)
-{
- BDIGIT *dp, *de;
- unsigned char *buf, *bufend;
-
- dp = ds;
- de = ds + num_bdigits;
-
- validate_integer_pack_format(numwords, wordsize, nails, flags,
- INTEGER_PACK_MSWORD_FIRST|
- INTEGER_PACK_LSWORD_FIRST|
- INTEGER_PACK_MSBYTE_FIRST|
- INTEGER_PACK_LSBYTE_FIRST|
- INTEGER_PACK_NATIVE_BYTE_ORDER|
- INTEGER_PACK_2COMP|
- INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION);
-
- while (dp < de && de[-1] == 0)
- de--;
- if (dp == de) {
- sign = 0;
- }
-
- if (!(flags & INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION)) {
- if (sign == 0) {
- MEMZERO(words, unsigned char, numwords * wordsize);
- return 0;
- }
- if (nails == 0 && numwords == 1) {
- int need_swap = wordsize != 1 &&
- (flags & INTEGER_PACK_BYTEORDER_MASK) != INTEGER_PACK_NATIVE_BYTE_ORDER &&
- ((flags & INTEGER_PACK_MSBYTE_FIRST) ? !HOST_BIGENDIAN_P : HOST_BIGENDIAN_P);
- if (0 < sign || !(flags & INTEGER_PACK_2COMP)) {
- BDIGIT d;
- if (wordsize == 1) {
- *((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 (wordsize == 2 && (uintptr_t)words % ALIGNOF(uint16_t) == 0) {
- uint16_t u = (uint16_t)(d = dp[0]);
- if (need_swap) u = swap16(u);
- *((uint16_t *)words) = u;
- return ((1 < de - dp || CLEAR_LOWBITS(d, 16) != 0) ? 2 : 1) * sign;
- }
-#endif
-#if defined(HAVE_UINT32_T) && 4 <= SIZEOF_BDIGITS
- if (wordsize == 4 && (uintptr_t)words % ALIGNOF(uint32_t) == 0) {
- uint32_t u = (uint32_t)(d = dp[0]);
- if (need_swap) u = swap32(u);
- *((uint32_t *)words) = u;
- return ((1 < de - dp || CLEAR_LOWBITS(d, 32) != 0) ? 2 : 1) * sign;
- }
-#endif
-#if defined(HAVE_UINT64_T) && 8 <= SIZEOF_BDIGITS
- if (wordsize == 8 && (uintptr_t)words % ALIGNOF(uint64_t) == 0) {
- uint64_t u = (uint64_t)(d = dp[0]);
- if (need_swap) u = swap64(u);
- *((uint64_t *)words) = u;
- return ((1 < de - dp || CLEAR_LOWBITS(d, 64) != 0) ? 2 : 1) * sign;
- }
-#endif
- }
- else { /* sign < 0 && (flags & INTEGER_PACK_2COMP) */
- BDIGIT_DBL_SIGNED d;
- if (wordsize == 1) {
- *((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 (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 :
- (1 < de - dp || FILL_LOWBITS(d, 16) != -1) ? -2 : -1;
- }
-#endif
-#if defined(HAVE_UINT32_T) && 4 <= SIZEOF_BDIGITS
- 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 :
- (1 < de - dp || FILL_LOWBITS(d, 32) != -1) ? -2 : -1;
- }
-#endif
-#if defined(HAVE_UINT64_T) && 8 <= SIZEOF_BDIGITS
- 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 :
- (1 < de - dp || FILL_LOWBITS(d, 64) != -1) ? -2 : -1;
- }
-#endif
- }
- }
-#if !defined(WORDS_BIGENDIAN)
- if (nails == 0 && SIZEOF_BDIGITS == 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 dst_size = numwords * wordsize;
- int overflow = 0;
- while (0 < src_size && ((unsigned char *)ds)[src_size-1] == 0)
- src_size--;
- if (src_size <= dst_size) {
- MEMCPY(words, dp, char, src_size);
- MEMZERO((char*)words + src_size, char, dst_size - src_size);
- }
- else {
- MEMCPY(words, dp, char, dst_size);
- overflow = 1;
- }
- if (sign < 0 && (flags & INTEGER_PACK_2COMP)) {
- int zero_p = bytes_2comp(words, dst_size);
- if (zero_p && overflow) {
- unsigned char *p = (unsigned char *)dp;
- if (dst_size == src_size-1 &&
- p[dst_size] == 1) {
- overflow = 0;
- }
- }
- }
- if (overflow)
- sign *= 2;
- 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;
- size_t src_num_bdigits = de - dp;
- size_t dst_num_bdigits = numwords * bdigits_per_word;
- int overflow = 0;
- 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;
- if (src_num_bdigits <= dst_num_bdigits) {
- MEMCPY(words, dp, BDIGIT, src_num_bdigits);
- BDIGITS_ZERO((BDIGIT*)words + src_num_bdigits, dst_num_bdigits - src_num_bdigits);
- }
- else {
- MEMCPY(words, dp, BDIGIT, dst_num_bdigits);
- overflow = 1;
- }
- if (sign < 0 && (flags & INTEGER_PACK_2COMP)) {
- int zero_p = bary_2comp(words, dst_num_bdigits);
- if (zero_p && overflow &&
- dst_num_bdigits == src_num_bdigits-1 &&
- dp[dst_num_bdigits] == 1)
- overflow = 0;
- }
- if (msbytefirst_p != HOST_BIGENDIAN_P) {
- size_t i;
- for (i = 0; i < dst_num_bdigits; i++) {
- BDIGIT d = ((BDIGIT*)words)[i];
- ((BDIGIT*)words)[i] = swap_bdigit(d);
- }
- }
- if (mswordfirst_p ? !msbytefirst_p : msbytefirst_p) {
- size_t i;
- BDIGIT *p = words;
- for (i = 0; i < numwords; i++) {
- bary_swap(p, bdigits_per_word);
- p += bdigits_per_word;
- }
- }
- if (mswordfirst_p) {
- bary_swap(words, dst_num_bdigits);
- }
- if (overflow)
- sign *= 2;
- return sign;
- }
- }
-
- buf = words;
- bufend = buf + numwords * wordsize;
-
- if (buf == bufend) {
- /* overflow if non-zero*/
- if (!(flags & INTEGER_PACK_2COMP) || 0 <= sign)
- sign *= 2;
- else {
- if (de - dp == 1 && dp[0] == 1)
- sign = -1; /* val == -1 == -2**(numwords*(wordsize*CHAR_BIT-nails)) */
- else
- sign = -2; /* val < -1 == -2**(numwords*(wordsize*CHAR_BIT-nails)) */
- }
- }
- else if (dp == de) {
- memset(buf, '\0', bufend - buf);
- }
- else if (dp < de && buf < bufend) {
- int word_num_partialbits;
- size_t word_num_fullbytes;
-
- ssize_t word_step;
- size_t byte_start;
- int byte_step;
-
- size_t word_start, word_last;
- unsigned char *wordp, *last_wordp;
- BDIGIT_DBL dd;
- int numbits_in_dd;
-
- integer_pack_loop_setup(numwords, wordsize, nails, flags,
- &word_num_fullbytes, &word_num_partialbits,
- &word_start, &word_step, &word_last, &byte_start, &byte_step);
-
- wordp = buf + word_start;
- last_wordp = buf + word_last;
-
- dd = 0;
- numbits_in_dd = 0;
-
-#define FILL_DD \
- integer_pack_fill_dd(&dp, &de, &dd, &numbits_in_dd)
-#define TAKE_LOWBITS(n) \
- integer_pack_take_lowbits(n, &dd, &numbits_in_dd)
-
- while (1) {
- size_t index_in_word = 0;
- unsigned char *bytep = wordp + byte_start;
- while (index_in_word < word_num_fullbytes) {
- FILL_DD;
- *bytep = TAKE_LOWBITS(CHAR_BIT);
- bytep += byte_step;
- index_in_word++;
- }
- if (word_num_partialbits) {
- FILL_DD;
- *bytep = TAKE_LOWBITS(word_num_partialbits);
- bytep += byte_step;
- index_in_word++;
- }
- while (index_in_word < wordsize) {
- *bytep = 0;
- bytep += byte_step;
- index_in_word++;
- }
-
- if (wordp == last_wordp)
- break;
-
- wordp += word_step;
- }
- FILL_DD;
- /* overflow tests */
- if (dp != de || 1 < dd) {
- /* 2**(numwords*(wordsize*CHAR_BIT-nails)+1) <= abs(val) */
- sign *= 2;
- }
- else if (dd == 1) {
- /* 2**(numwords*(wordsize*CHAR_BIT-nails)) <= abs(val) < 2**(numwords*(wordsize*CHAR_BIT-nails)+1) */
- if (!(flags & INTEGER_PACK_2COMP) || 0 <= sign)
- sign *= 2;
- else { /* overflow_2comp && sign == -1 */
- /* test lower bits are all zero. */
- dp = ds;
- while (dp < de && *dp == 0)
- dp++;
- if (de - dp == 1 && /* only one non-zero word. */
- POW2_P(*dp)) /* *dp contains only one bit set. */
- sign = -1; /* val == -2**(numwords*(wordsize*CHAR_BIT-nails)) */
- else
- sign = -2; /* val < -2**(numwords*(wordsize*CHAR_BIT-nails)) */
- }
- }
- }
-
- if ((flags & INTEGER_PACK_2COMP) && (sign < 0 && numwords != 0)) {
- unsigned char *buf;
-
- int word_num_partialbits;
- size_t word_num_fullbytes;
-
- ssize_t word_step;
- size_t byte_start;
- int byte_step;
-
- size_t word_start, word_last;
- unsigned char *wordp, *last_wordp;
-
- unsigned int partialbits_mask;
- int carry;
-
- integer_pack_loop_setup(numwords, wordsize, nails, flags,
- &word_num_fullbytes, &word_num_partialbits,
- &word_start, &word_step, &word_last, &byte_start, &byte_step);
-
- partialbits_mask = (1 << word_num_partialbits) - 1;
-
- buf = words;
- wordp = buf + word_start;
- last_wordp = buf + word_last;
-
- carry = 1;
- while (1) {
- size_t index_in_word = 0;
- unsigned char *bytep = wordp + byte_start;
- while (index_in_word < word_num_fullbytes) {
- carry += (unsigned char)~*bytep;
- *bytep = (unsigned char)carry;
- carry >>= CHAR_BIT;
- bytep += byte_step;
- index_in_word++;
- }
- if (word_num_partialbits) {
- carry += (*bytep & partialbits_mask) ^ partialbits_mask;
- *bytep = carry & partialbits_mask;
- carry >>= word_num_partialbits;
- bytep += byte_step;
- index_in_word++;
- }
-
- if (wordp == last_wordp)
- break;
-
- wordp += word_step;
- }
- }
-
- return sign;
-#undef FILL_DD
-#undef TAKE_LOWBITS
-}
-
-static size_t
-integer_unpack_num_bdigits_small(size_t numwords, size_t wordsize, size_t nails, int *nlp_bits_ret)
-{
- /* nlp_bits stands for number of leading padding bits */
- size_t num_bits = (wordsize * CHAR_BIT - nails) * numwords;
- size_t num_bdigits = (num_bits + BITSPERDIG - 1) / BITSPERDIG;
- *nlp_bits_ret = (int)(num_bdigits * BITSPERDIG - num_bits);
- return num_bdigits;
-}
-
-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 */
- /* num_bits = (wordsize * CHAR_BIT - nails) * numwords */
- /* num_bdigits = (num_bits + BITSPERDIG - 1) / BITSPERDIG */
-
- /* num_bits = CHAR_BIT * (wordsize * numwords) - nails * numwords = CHAR_BIT * num_bytes1 - nails * numwords */
- size_t num_bytes1 = wordsize * numwords;
-
- /* q1 * CHAR_BIT + r1 = numwords */
- size_t q1 = numwords / CHAR_BIT;
- size_t r1 = numwords % CHAR_BIT;
-
- /* num_bits = CHAR_BIT * num_bytes1 - nails * (q1 * CHAR_BIT + r1) = CHAR_BIT * num_bytes2 - nails * r1 */
- size_t num_bytes2 = num_bytes1 - nails * q1;
-
- /* q2 * CHAR_BIT + r2 = nails */
- size_t q2 = nails / CHAR_BIT;
- size_t r2 = nails % CHAR_BIT;
-
- /* num_bits = CHAR_BIT * num_bytes2 - (q2 * CHAR_BIT + r2) * r1 = CHAR_BIT * num_bytes3 - r1 * r2 */
- size_t num_bytes3 = num_bytes2 - q2 * r1;
-
- /* q3 * BITSPERDIG + r3 = num_bytes3 */
- size_t q3 = num_bytes3 / BITSPERDIG;
- size_t r3 = num_bytes3 % BITSPERDIG;
-
- /* num_bits = CHAR_BIT * (q3 * BITSPERDIG + r3) - r1 * r2 = BITSPERDIG * num_digits1 + CHAR_BIT * r3 - r1 * r2 */
- size_t num_digits1 = CHAR_BIT * q3;
-
- /*
- * if CHAR_BIT * r3 >= r1 * r2
- * CHAR_BIT * r3 - r1 * r2 = CHAR_BIT * BITSPERDIG - (CHAR_BIT * BITSPERDIG - (CHAR_BIT * r3 - r1 * r2))
- * q4 * BITSPERDIG + r4 = CHAR_BIT * BITSPERDIG - (CHAR_BIT * r3 - r1 * r2)
- * num_bits = BITSPERDIG * num_digits1 + CHAR_BIT * BITSPERDIG - (q4 * BITSPERDIG + r4) = BITSPERDIG * num_digits2 - r4
- * else
- * q4 * BITSPERDIG + r4 = -(CHAR_BIT * r3 - r1 * r2)
- * num_bits = BITSPERDIG * num_digits1 - (q4 * BITSPERDIG + r4) = BITSPERDIG * num_digits2 - r4
- * end
- */
-
- if (CHAR_BIT * r3 >= r1 * r2) {
- size_t tmp1 = CHAR_BIT * BITSPERDIG - (CHAR_BIT * r3 - r1 * r2);
- size_t q4 = tmp1 / BITSPERDIG;
- int r4 = (int)(tmp1 % BITSPERDIG);
- size_t num_digits2 = num_digits1 + CHAR_BIT - q4;
- *nlp_bits_ret = r4;
- return num_digits2;
- }
- else {
- size_t tmp1 = r1 * r2 - CHAR_BIT * r3;
- size_t q4 = tmp1 / BITSPERDIG;
- int r4 = (int)(tmp1 % BITSPERDIG);
- size_t num_digits2 = num_digits1 - q4;
- *nlp_bits_ret = r4;
- return num_digits2;
- }
-}
-
-static size_t
-integer_unpack_num_bdigits(size_t numwords, size_t wordsize, size_t nails, int *nlp_bits_ret)
-{
- size_t num_bdigits;
-
- if (numwords <= (SIZE_MAX - (BITSPERDIG-1)) / CHAR_BIT / wordsize) {
- num_bdigits = integer_unpack_num_bdigits_small(numwords, wordsize, nails, nlp_bits_ret);
-#ifdef DEBUG_INTEGER_PACK
- {
- int nlp_bits1;
- size_t num_bdigits1 = integer_unpack_num_bdigits_generic(numwords, wordsize, nails, &nlp_bits1);
- assert(num_bdigits == num_bdigits1);
- assert(*nlp_bits_ret == nlp_bits1);
- }
-#endif
- }
- else {
- num_bdigits = integer_unpack_num_bdigits_generic(numwords, wordsize, nails, nlp_bits_ret);
- }
- return num_bdigits;
-}
-
-static inline void
-integer_unpack_push_bits(int data, int numbits, BDIGIT_DBL *ddp, int *numbits_in_dd_p, BDIGIT **dpp)
-{
- (*ddp) |= ((BDIGIT_DBL)data) << (*numbits_in_dd_p);
- *numbits_in_dd_p += numbits;
- while (BITSPERDIG <= *numbits_in_dd_p) {
- *(*dpp)++ = BIGLO(*ddp);
- *ddp = BIGDN(*ddp);
- *numbits_in_dd_p -= BITSPERDIG;
- }
-}
-
-static int
-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) :
- ((u >> (size * CHAR_BIT - 1)) ? -1 : 1);
- if (sign < 0) {
- u |= LSHIFTX(BDIGMAX, size * CHAR_BIT);
- u = BIGLO(1 + ~u);
- }
- }
- else
- sign = (flags & INTEGER_PACK_NEGATIVE) ? -1 : 1;
- *dp = u;
- return sign;
-}
-
-static int
-bary_unpack_internal(BDIGIT *bdigits, size_t num_bdigits, const void *words, size_t numwords, size_t wordsize, size_t nails, int flags, int nlp_bits)
-{
- int sign;
- const unsigned char *buf = words;
- BDIGIT *dp;
- BDIGIT *de;
-
- dp = bdigits;
- de = dp + num_bdigits;
-
- if (!(flags & INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION)) {
- if (nails == 0 && numwords == 1) {
- int need_swap = wordsize != 1 &&
- (flags & INTEGER_PACK_BYTEORDER_MASK) != INTEGER_PACK_NATIVE_BYTE_ORDER &&
- ((flags & INTEGER_PACK_MSBYTE_FIRST) ? !HOST_BIGENDIAN_P : HOST_BIGENDIAN_P);
- 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 (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 (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 (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);
- }
-#endif
- }
-#if !defined(WORDS_BIGENDIAN)
- if (nails == 0 && SIZEOF_BDIGITS == 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;
- MEMCPY(dp, words, char, src_size);
- if (flags & INTEGER_PACK_2COMP) {
- if (flags & INTEGER_PACK_NEGATIVE) {
- int zero_p;
- memset((char*)dp + src_size, 0xff, dst_size - src_size);
- zero_p = bary_2comp(dp, num_bdigits);
- sign = zero_p ? -2 : -1;
- }
- else if (buf[src_size-1] >> (CHAR_BIT-1)) {
- memset((char*)dp + src_size, 0xff, dst_size - src_size);
- bary_2comp(dp, num_bdigits);
- sign = -1;
- }
- else {
- MEMZERO((char*)dp + src_size, char, dst_size - src_size);
- sign = 1;
- }
- }
- else {
- MEMZERO((char*)dp + src_size, char, dst_size - src_size);
- sign = (flags & INTEGER_PACK_NEGATIVE) ? -1 : 1;
- }
- return sign;
- }
-#endif
- if (nails == 0 && SIZEOF_BDIGITS == sizeof(BDIGIT) &&
- wordsize % SIZEOF_BDIGITS == 0) {
- size_t bdigits_per_word = wordsize / SIZEOF_BDIGITS;
- 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;
- MEMCPY(dp, words, BDIGIT, numwords*bdigits_per_word);
- if (mswordfirst_p) {
- bary_swap(dp, num_bdigits);
- }
- if (mswordfirst_p ? !msbytefirst_p : msbytefirst_p) {
- size_t i;
- BDIGIT *p = dp;
- for (i = 0; i < numwords; i++) {
- bary_swap(p, bdigits_per_word);
- p += bdigits_per_word;
- }
- }
- if (msbytefirst_p != HOST_BIGENDIAN_P) {
- BDIGIT *p;
- for (p = dp; p < de; p++) {
- BDIGIT d = *p;
- *p = swap_bdigit(d);
- }
- }
- if (flags & INTEGER_PACK_2COMP) {
- if (flags & INTEGER_PACK_NEGATIVE) {
- int zero_p = bary_2comp(dp, num_bdigits);
- sign = zero_p ? -2 : -1;
- }
- else if (BDIGIT_MSB(de[-1])) {
- bary_2comp(dp, num_bdigits);
- sign = -1;
- }
- else {
- sign = 1;
- }
- }
- else {
- sign = (flags & INTEGER_PACK_NEGATIVE) ? -1 : 1;
- }
- return sign;
- }
- }
-
- if (num_bdigits != 0) {
- int word_num_partialbits;
- size_t word_num_fullbytes;
-
- ssize_t word_step;
- size_t byte_start;
- int byte_step;
-
- size_t word_start, word_last;
- const unsigned char *wordp, *last_wordp;
- BDIGIT_DBL dd;
- int numbits_in_dd;
-
- integer_pack_loop_setup(numwords, wordsize, nails, flags,
- &word_num_fullbytes, &word_num_partialbits,
- &word_start, &word_step, &word_last, &byte_start, &byte_step);
-
- wordp = buf + word_start;
- last_wordp = buf + word_last;
-
- dd = 0;
- numbits_in_dd = 0;
-
-#define PUSH_BITS(data, numbits) \
- integer_unpack_push_bits(data, numbits, &dd, &numbits_in_dd, &dp)
-
- while (1) {
- size_t index_in_word = 0;
- const unsigned char *bytep = wordp + byte_start;
- while (index_in_word < word_num_fullbytes) {
- PUSH_BITS(*bytep, CHAR_BIT);
- bytep += byte_step;
- index_in_word++;
- }
- if (word_num_partialbits) {
- PUSH_BITS(*bytep & ((1 << word_num_partialbits) - 1), word_num_partialbits);
- bytep += byte_step;
- index_in_word++;
- }
-
- if (wordp == last_wordp)
- break;
-
- wordp += word_step;
- }
- if (dd)
- *dp++ = (BDIGIT)dd;
- assert(dp <= de);
- while (dp < de)
- *dp++ = 0;
-#undef PUSH_BITS
- }
-
- if (!(flags & INTEGER_PACK_2COMP)) {
- sign = (flags & INTEGER_PACK_NEGATIVE) ? -1 : 1;
- }
- else {
- if (nlp_bits) {
- if ((flags & INTEGER_PACK_NEGATIVE) ||
- (bdigits[num_bdigits-1] >> (BITSPERDIG - nlp_bits - 1))) {
- bdigits[num_bdigits-1] |= BIGLO(BDIGMAX << (BITSPERDIG - nlp_bits));
- sign = -1;
- }
- else {
- sign = 1;
- }
- }
- else {
- if (flags & INTEGER_PACK_NEGATIVE) {
- sign = bary_zero_p(bdigits, num_bdigits) ? -2 : -1;
- }
- else {
- if (num_bdigits != 0 && BDIGIT_MSB(bdigits[num_bdigits-1]))
- sign = -1;
- else
- sign = 1;
- }
- }
- if (sign == -1 && num_bdigits != 0) {
- bary_2comp(bdigits, num_bdigits);
- }
- }
-
- return sign;
-}
-
-static void
-bary_unpack(BDIGIT *bdigits, size_t num_bdigits, const void *words, size_t numwords, size_t wordsize, size_t nails, int flags)
-{
- size_t num_bdigits0;
- int nlp_bits;
- int sign;
-
- validate_integer_pack_format(numwords, wordsize, nails, flags,
- INTEGER_PACK_MSWORD_FIRST|
- INTEGER_PACK_LSWORD_FIRST|
- INTEGER_PACK_MSBYTE_FIRST|
- INTEGER_PACK_LSBYTE_FIRST|
- INTEGER_PACK_NATIVE_BYTE_ORDER|
- INTEGER_PACK_2COMP|
- INTEGER_PACK_FORCE_BIGNUM|
- INTEGER_PACK_NEGATIVE|
- INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION);
-
- num_bdigits0 = integer_unpack_num_bdigits(numwords, wordsize, nails, &nlp_bits);
-
- assert(num_bdigits0 <= num_bdigits);
-
- sign = bary_unpack_internal(bdigits, num_bdigits0, words, numwords, wordsize, nails, flags, nlp_bits);
-
- if (num_bdigits0 < num_bdigits) {
- BDIGITS_ZERO(bdigits + num_bdigits0, num_bdigits - num_bdigits0);
- if (sign == -2) {
- bdigits[num_bdigits0] = 1;
- }
- }
-}
-
-static int
-bary_subb(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn, int borrow)
-{
- BDIGIT_DBL_SIGNED num;
- size_t i;
- size_t sn;
-
- assert(xn <= zn);
- assert(yn <= zn);
-
- sn = xn < yn ? xn : yn;
-
- num = borrow ? -1 : 0;
- for (i = 0; i < sn; i++) {
- num += (BDIGIT_DBL_SIGNED)xds[i] - yds[i];
- zds[i] = BIGLO(num);
- num = BIGDN(num);
- }
- if (yn <= xn) {
- for (; i < xn; i++) {
- if (num == 0) goto num_is_zero;
- num += xds[i];
- zds[i] = BIGLO(num);
- num = BIGDN(num);
- }
- }
- else {
- for (; i < yn; i++) {
- num -= yds[i];
- zds[i] = BIGLO(num);
- num = BIGDN(num);
- }
- }
- if (num == 0) goto num_is_zero;
- for (; i < zn; i++) {
- zds[i] = BDIGMAX;
- }
- return 1;
-
- num_is_zero:
- if (xds == zds && xn == zn)
- return 0;
- for (; i < xn; i++) {
- zds[i] = xds[i];
- }
- for (; i < zn; i++) {
- zds[i] = 0;
- }
- return 0;
-}
-
-static int
-bary_sub(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn)
-{
- return bary_subb(zds, zn, xds, xn, yds, yn, 0);
-}
-
-static int
-bary_sub_one(BDIGIT *zds, size_t zn)
-{
- return bary_subb(zds, zn, zds, zn, NULL, 0, 1);
-}
-
-static int
-bary_addc(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn, int carry)
-{
- BDIGIT_DBL num;
- size_t i;
-
- assert(xn <= zn);
- assert(yn <= zn);
-
- if (xn > yn) {
- const BDIGIT *tds;
- tds = xds; xds = yds; yds = tds;
- i = xn; xn = yn; yn = i;
- }
-
- num = carry ? 1 : 0;
- for (i = 0; i < xn; i++) {
- num += (BDIGIT_DBL)xds[i] + yds[i];
- zds[i] = BIGLO(num);
- num = BIGDN(num);
- }
- for (; i < yn; i++) {
- if (num == 0) goto num_is_zero;
- num += yds[i];
- zds[i] = BIGLO(num);
- num = BIGDN(num);
- }
- for (; i < zn; i++) {
- if (num == 0) goto num_is_zero;
- zds[i] = BIGLO(num);
- num = BIGDN(num);
- }
- return num != 0;
-
- num_is_zero:
- if (yds == zds && yn == zn)
- return 0;
- for (; i < yn; i++) {
- zds[i] = yds[i];
- }
- for (; i < zn; i++) {
- zds[i] = 0;
- }
- return 0;
-}
-
-static int
-bary_add(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn)
-{
- return bary_addc(zds, zn, xds, xn, yds, yn, 0);
-}
-
-static int
-bary_add_one(BDIGIT *ds, size_t n)
-{
- size_t i;
- for (i = 0; i < n; i++) {
- ds[i] = BIGLO(ds[i]+1);
- if (ds[i] != 0)
- return 0;
- }
- return 1;
-}
-
-static void
-bary_mul_single(BDIGIT *zds, size_t zn, BDIGIT x, BDIGIT y)
-{
- BDIGIT_DBL n;
-
- assert(2 <= zn);
-
- n = (BDIGIT_DBL)x * y;
- bdigitdbl2bary(zds, 2, n);
- BDIGITS_ZERO(zds + 2, zn - 2);
-}
-
-static int
-bary_muladd_1xN(BDIGIT *zds, size_t zn, BDIGIT x, const BDIGIT *yds, size_t yn)
-{
- BDIGIT_DBL n;
- BDIGIT_DBL dd;
- size_t j;
-
- assert(zn > yn);
-
- if (x == 0)
- return 0;
- dd = x;
- n = 0;
- for (j = 0; j < yn; j++) {
- BDIGIT_DBL ee = n + dd * yds[j];
- if (ee) {
- n = zds[j] + ee;
- zds[j] = BIGLO(n);
- n = BIGDN(n);
- }
- else {
- n = 0;
- }
-
- }
- for (; j < zn; j++) {
- if (n == 0)
- break;
- n += zds[j];
- zds[j] = BIGLO(n);
- n = BIGDN(n);
- }
- return n != 0;
-}
-
-static BDIGIT_DBL_SIGNED
-bigdivrem_mulsub(BDIGIT *zds, size_t zn, BDIGIT x, const BDIGIT *yds, size_t yn)
-{
- size_t i;
- BDIGIT_DBL t2;
- BDIGIT_DBL_SIGNED num;
-
- assert(zn == yn + 1);
-
- num = 0;
- t2 = 0;
- i = 0;
-
- do {
- BDIGIT_DBL ee;
- t2 += (BDIGIT_DBL)yds[i] * x;
- ee = num - BIGLO(t2);
- num = (BDIGIT_DBL)zds[i] + ee;
- if (ee) zds[i] = BIGLO(num);
- num = BIGDN(num);
- t2 = BIGDN(t2);
- } while (++i < yn);
- num += zds[i] - t2; /* borrow from high digit; don't update */
- return num;
-}
-
-static int
-bary_mulsub_1xN(BDIGIT *zds, size_t zn, BDIGIT x, const BDIGIT *yds, size_t yn)
-{
- BDIGIT_DBL_SIGNED num;
-
- assert(zn == yn + 1);
-
- num = bigdivrem_mulsub(zds, zn, x, yds, yn);
- zds[yn] = BIGLO(num);
- if (BIGDN(num))
- return 1;
- return 0;
-}
-
-static void
-bary_mul_normal(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn)
-{
- size_t i;
-
- assert(xn + yn <= zn);
-
- BDIGITS_ZERO(zds, zn);
- for (i = 0; i < xn; i++) {
- bary_muladd_1xN(zds+i, zn-i, xds[i], yds, yn);
- }
-}
-
-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));
- bary_mul_normal(BDIGITS(z), zn, BDIGITS(x), xn, BDIGITS(y), yn);
- RB_GC_GUARD(x);
- RB_GC_GUARD(y);
- return z;
-}
-
-/* efficient squaring (2 times faster than normal multiplication)
- * ref: Handbook of Applied Cryptography, Algorithm 14.16
- * http://www.cacr.math.uwaterloo.ca/hac/about/chap14.pdf
- */
-static void
-bary_sq_fast(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn)
-{
- size_t i, j;
- BDIGIT_DBL c, v, w;
- BDIGIT vl;
- int vh;
-
- assert(xn * 2 <= zn);
-
- BDIGITS_ZERO(zds, zn);
-
- if (xn == 0)
- return;
-
- for (i = 0; i < xn-1; i++) {
- v = (BDIGIT_DBL)xds[i];
- if (!v)
- continue;
- c = (BDIGIT_DBL)zds[i + i] + v * v;
- zds[i + i] = BIGLO(c);
- c = BIGDN(c);
- v *= 2;
- vl = BIGLO(v);
- vh = (int)BIGDN(v);
- for (j = i + 1; j < xn; j++) {
- w = (BDIGIT_DBL)xds[j];
- c += (BDIGIT_DBL)zds[i + j] + vl * w;
- zds[i + j] = BIGLO(c);
- c = BIGDN(c);
- if (vh)
- c += w;
- }
- if (c) {
- c += (BDIGIT_DBL)zds[i + xn];
- zds[i + xn] = BIGLO(c);
- c = BIGDN(c);
- if (c)
- zds[i + xn + 1] += (BDIGIT)c;
- }
- }
-
- /* i == xn-1 */
- v = (BDIGIT_DBL)xds[i];
- if (!v)
- return;
- c = (BDIGIT_DBL)zds[i + i] + v * v;
- zds[i + i] = BIGLO(c);
- c = BIGDN(c);
- if (c) {
- zds[i + xn] += BIGLO(c);
- }
-}
-
-VALUE
-rb_big_sq_fast(VALUE x)
-{
- size_t xn = RBIGNUM_LEN(x), zn = 2 * xn;
- VALUE z = bignew(zn, 1);
- bary_sq_fast(BDIGITS(z), zn, BDIGITS(x), xn);
- RB_GC_GUARD(x);
- return z;
-}
-
-/* balancing multiplication by slicing larger argument */
-static void
-bary_mul_balance_with_mulfunc(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn, BDIGIT *wds, size_t wn, mulfunc_t *mulfunc)
-{
- VALUE work = 0;
- size_t yn0 = yn;
- size_t r, n;
-
- assert(xn + yn <= zn);
- assert(xn <= yn);
- assert(!KARATSUBA_BALANCED(xn, yn) || !TOOM3_BALANCED(xn, yn));
-
- BDIGITS_ZERO(zds, xn);
-
- n = 0;
- while (yn > 0) {
- BDIGIT *tds;
- size_t tn;
- r = xn > yn ? yn : xn;
- tn = xn + r;
- if (2 * (xn + r) <= zn - n) {
- tds = zds + n + xn + r;
- mulfunc(tds, tn, xds, xn, yds + n, r, wds, wn);
- BDIGITS_ZERO(zds + n + xn, r);
- bary_add(zds + n, tn,
- zds + n, tn,
- tds, tn);
- }
- else {
- if (wn < xn) {
- wn = xn;
- wds = ALLOCV_N(BDIGIT, work, wn);
- }
- tds = zds + n;
- MEMCPY(wds, zds + n, BDIGIT, xn);
- mulfunc(tds, tn, xds, xn, yds + n, r, wds-xn, wn-xn);
- bary_add(zds + n, tn,
- zds + n, tn,
- wds, xn);
- }
- yn -= r;
- n += r;
- }
- BDIGITS_ZERO(zds+xn+yn0, zn - (xn+yn0));
-
- if (work)
- ALLOCV_END(work);
-}
-
-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));
- 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);
- return z;
-}
-
-/* multiplication by karatsuba method */
-static void
-bary_mul_karatsuba(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn, BDIGIT *wds, size_t wn)
-{
- VALUE work = 0;
-
- size_t n;
- int sub_p, borrow, carry1, carry2, carry3;
-
- int odd_y = 0;
- int odd_xy = 0;
- int sq;
-
- const BDIGIT *xds0, *xds1, *yds0, *yds1;
- BDIGIT *zds0, *zds1, *zds2, *zds3;
-
- assert(xn + yn <= zn);
- assert(xn <= yn);
- assert(yn < 2 * xn);
-
- sq = xds == yds && xn == yn;
-
- if (yn & 1) {
- odd_y = 1;
- yn--;
- if (yn < xn) {
- odd_xy = 1;
- xn--;
- }
- }
-
- n = yn / 2;
-
- assert(n < xn);
-
- if (wn < n) {
- /* This function itself needs only n BDIGITs for work area.
- * However this function calls bary_mul_karatsuba and
- * bary_mul_balance recursively.
- * 2n BDIGITs are enough to avoid allocations in
- * the recursively called functions.
- */
- wn = 2*n;
- wds = ALLOCV_N(BDIGIT, work, wn);
- }
-
- /* Karatsuba algorithm:
- *
- * x = x0 + r*x1
- * y = y0 + r*y1
- * z = x*y
- * = (x0 + r*x1) * (y0 + r*y1)
- * = x0*y0 + r*(x1*y0 + x0*y1) + r*r*x1*y1
- * = x0*y0 + r*(x0*y0 + x1*y1 - (x1-x0)*(y1-y0)) + r*r*x1*y1
- * = x0*y0 + r*(x0*y0 + x1*y1 - (x0-x1)*(y0-y1)) + r*r*x1*y1
- */
-
- xds0 = xds;
- xds1 = xds + n;
- yds0 = yds;
- yds1 = yds + n;
- zds0 = zds;
- zds1 = zds + n;
- zds2 = zds + 2*n;
- zds3 = zds + 3*n;
-
- sub_p = 1;
-
- /* zds0:? zds1:? zds2:? zds3:? wds:? */
-
- if (bary_sub(zds0, n, xds, n, xds+n, xn-n)) {
- bary_2comp(zds0, n);
- sub_p = !sub_p;
- }
-
- /* zds0:|x1-x0| zds1:? zds2:? zds3:? wds:? */
-
- if (sq) {
- sub_p = 1;
- bary_mul_karatsuba_start(zds1, 2*n, zds0, n, zds0, n, wds, wn);
- }
- else {
- if (bary_sub(wds, n, yds, n, yds+n, n)) {
- bary_2comp(wds, n);
- sub_p = !sub_p;
- }
-
- /* zds0:|x1-x0| zds1:? zds2:? zds3:? wds:|y1-y0| */
-
- bary_mul_karatsuba_start(zds1, 2*n, zds0, n, wds, n, wds+n, wn-n);
- }
-
- /* zds0:|x1-x0| zds1,zds2:|x1-x0|*|y1-y0| zds3:? wds:|y1-y0| */
-
- borrow = 0;
- if (sub_p) {
- borrow = !bary_2comp(zds1, 2*n);
- }
- /* zds0:|x1-x0| zds1,zds2:-?|x1-x0|*|y1-y0| zds3:? wds:|y1-y0| */
-
- MEMCPY(wds, zds1, BDIGIT, n);
-
- /* zds0:|x1-x0| zds1,zds2:-?|x1-x0|*|y1-y0| zds3:? wds:lo(-?|x1-x0|*|y1-y0|) */
-
- bary_mul_karatsuba_start(zds0, 2*n, xds0, n, yds0, n, wds+n, wn-n);
-
- /* zds0,zds1:x0*y0 zds2:hi(-?|x1-x0|*|y1-y0|) zds3:? wds:lo(-?|x1-x0|*|y1-y0|) */
-
- carry1 = bary_add(wds, n, wds, n, zds0, n);
- carry1 = bary_addc(zds2, n, zds2, n, zds1, n, carry1);
-
- /* zds0,zds1:x0*y0 zds2:hi(x0*y0-?|x1-x0|*|y1-y0|) zds3:? wds:lo(x0*y0-?|x1-x0|*|y1-y0|) */
-
- carry2 = bary_add(zds1, n, zds1, n, wds, n);
-
- /* zds0:lo(x0*y0) zds1:hi(x0*y0)+lo(x0*y0-?|x1-x0|*|y1-y0|) zds2:hi(x0*y0-?|x1-x0|*|y1-y0|) zds3:? wds:lo(x0*y0-?|x1-x0|*|y1-y0|) */
-
- MEMCPY(wds, zds2, BDIGIT, n);
-
- /* zds0:lo(x0*y0) zds1:hi(x0*y0)+lo(x0*y0-?|x1-x0|*|y1-y0|) zds2:_ zds3:? wds:hi(x0*y0-?|x1-x0|*|y1-y0|) */
-
- bary_mul_karatsuba_start(zds2, zn-2*n, xds1, xn-n, yds1, n, wds+n, wn-n);
-
- /* zds0:lo(x0*y0) zds1:hi(x0*y0)+lo(x0*y0-?|x1-x0|*|y1-y0|) zds2,zds3:x1*y1 wds:hi(x0*y0-?|x1-x0|*|y1-y0|) */
-
- carry3 = bary_add(zds1, n, zds1, n, zds2, n);
-
- /* zds0:lo(x0*y0) zds1:hi(x0*y0)+lo(x0*y0-?|x1-x0|*|y1-y0|)+lo(x1*y1) zds2,zds3:x1*y1 wds:hi(x0*y0-?|x1-x0|*|y1-y0|) */
-
- carry3 = bary_addc(zds2, n, zds2, n, zds3, (4*n < zn ? n : zn-3*n), carry3);
-
- /* zds0:lo(x0*y0) zds1:hi(x0*y0)+lo(x0*y0-?|x1-x0|*|y1-y0|)+lo(x1*y1) zds2,zds3:x1*y1+hi(x1*y1) wds:hi(x0*y0-?|x1-x0|*|y1-y0|) */
-
- bary_add(zds2, zn-2*n, zds2, zn-2*n, wds, n);
-
- /* zds0:lo(x0*y0) zds1:hi(x0*y0)+lo(x0*y0-?|x1-x0|*|y1-y0|)+lo(x1*y1) zds2,zds3:x1*y1+hi(x1*y1)+hi(x0*y0-?|x1-x0|*|y1-y0|) wds:_ */
-
- if (carry2)
- bary_add_one(zds2, zn-2*n);
-
- if (carry1 + carry3 - borrow < 0)
- bary_sub_one(zds3, zn-3*n);
- else if (carry1 + carry3 - borrow > 0) {
- BDIGIT c = carry1 + carry3 - borrow;
- bary_add(zds3, zn-3*n, zds3, zn-3*n, &c, 1);
- }
-
- /*
- if (SIZEOF_BDIGITS * 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]; }
- assert(z == x * y);
- }
- */
-
- if (odd_xy) {
- bary_muladd_1xN(zds+yn, zn-yn, yds[yn], xds, xn);
- bary_muladd_1xN(zds+xn, zn-xn, xds[xn], yds, yn+1);
- }
- else if (odd_y) {
- bary_muladd_1xN(zds+yn, zn-yn, yds[yn], xds, xn);
- }
-
- if (work)
- ALLOCV_END(work);
-}
-
-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));
- 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);
- RB_GC_GUARD(x);
- RB_GC_GUARD(y);
- return z;
-}
-
-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)
-{
- size_t n;
- size_t wnc;
- VALUE work = 0;
-
- /* "p" stands for "positive". Actually it means "non-negative", though. */
- size_t x0n; const BDIGIT *x0ds;
- size_t x1n; const BDIGIT *x1ds;
- size_t x2n; const BDIGIT *x2ds;
- size_t y0n; const BDIGIT *y0ds;
- size_t y1n; const BDIGIT *y1ds;
- size_t y2n; const BDIGIT *y2ds;
-
- size_t u1n; BDIGIT *u1ds; int u1p;
- size_t u2n; BDIGIT *u2ds; int u2p;
- size_t u3n; BDIGIT *u3ds; int u3p;
-
- size_t v1n; BDIGIT *v1ds; int v1p;
- size_t v2n; BDIGIT *v2ds; int v2p;
- size_t v3n; BDIGIT *v3ds; int v3p;
-
- size_t t0n; BDIGIT *t0ds; int t0p;
- size_t t1n; BDIGIT *t1ds; int t1p;
- size_t t2n; BDIGIT *t2ds; int t2p;
- size_t t3n; BDIGIT *t3ds; int t3p;
- size_t t4n; BDIGIT *t4ds; int t4p;
-
- size_t z0n; BDIGIT *z0ds;
- size_t z1n; BDIGIT *z1ds; int z1p;
- size_t z2n; BDIGIT *z2ds; int z2p;
- size_t z3n; BDIGIT *z3ds; int z3p;
- size_t z4n; BDIGIT *z4ds;
-
- size_t zzn; BDIGIT *zzds;
-
- int sq = xds == yds && xn == yn;
-
- assert(xn <= yn); /* assume y >= x */
- assert(xn + yn <= zn);
-
- n = (yn + 2) / 3;
- assert(2*n < xn);
-
- wnc = 0;
-
- wnc += (u1n = n+1); /* BITSPERDIG*n+2 bits */
- wnc += (u2n = n+1); /* BITSPERDIG*n+1 bits */
- wnc += (u3n = n+1); /* BITSPERDIG*n+3 bits */
- wnc += (v1n = n+1); /* BITSPERDIG*n+2 bits */
- wnc += (v2n = n+1); /* BITSPERDIG*n+1 bits */
- wnc += (v3n = n+1); /* BITSPERDIG*n+3 bits */
-
- wnc += (t0n = 2*n); /* BITSPERDIG*2*n bits */
- wnc += (t1n = 2*n+2); /* BITSPERDIG*2*n+4 bits but bary_mul needs u1n+v1n */
- wnc += (t2n = 2*n+2); /* BITSPERDIG*2*n+2 bits but bary_mul needs u2n+v2n */
- wnc += (t3n = 2*n+2); /* BITSPERDIG*2*n+6 bits but bary_mul needs u3n+v3n */
- wnc += (t4n = 2*n); /* BITSPERDIG*2*n bits */
-
- wnc += (z1n = 2*n+1); /* BITSPERDIG*2*n+5 bits */
- wnc += (z2n = 2*n+1); /* BITSPERDIG*2*n+6 bits */
- wnc += (z3n = 2*n+1); /* BITSPERDIG*2*n+8 bits */
-
- if (wn < wnc) {
- wn = wnc * 3 / 2; /* Allocate working memory for whole recursion at once. */
- wds = ALLOCV_N(BDIGIT, work, wn);
- }
-
- u1ds = wds; wds += u1n;
- u2ds = wds; wds += u2n;
- u3ds = wds; wds += u3n;
-
- v1ds = wds; wds += v1n;
- v2ds = wds; wds += v2n;
- v3ds = wds; wds += v3n;
-
- t0ds = wds; wds += t0n;
- t1ds = wds; wds += t1n;
- t2ds = wds; wds += t2n;
- t3ds = wds; wds += t3n;
- t4ds = wds; wds += t4n;
-
- z1ds = wds; wds += z1n;
- z2ds = wds; wds += z2n;
- z3ds = wds; wds += z3n;
-
- wn -= wnc;
-
- zzds = u1ds;
- zzn = 6*n+1;
-
- x0n = n;
- x1n = n;
- x2n = xn - 2*n;
- x0ds = xds;
- x1ds = xds + n;
- x2ds = xds + 2*n;
-
- if (sq) {
- y0n = x0n;
- y1n = x1n;
- y2n = x2n;
- y0ds = x0ds;
- y1ds = x1ds;
- y2ds = x2ds;
- }
- else {
- y0n = n;
- y1n = n;
- y2n = yn - 2*n;
- y0ds = yds;
- y1ds = yds + n;
- y2ds = yds + 2*n;
- }
-
- /*
- * ref. http://en.wikipedia.org/wiki/Toom%E2%80%93Cook_multiplication
- *
- * x(b) = x0 * b^0 + x1 * b^1 + x2 * b^2
- * y(b) = y0 * b^0 + y1 * b^1 + y2 * b^2
- *
- * z(b) = x(b) * y(b)
- * z(b) = z0 * b^0 + z1 * b^1 + z2 * b^2 + z3 * b^3 + z4 * b^4
- * where:
- * z0 = x0 * y0
- * z1 = x0 * y1 + x1 * y0
- * z2 = x0 * y2 + x1 * y1 + x2 * y0
- * z3 = x1 * y2 + x2 * y1
- * z4 = x2 * y2
- *
- * Toom3 method (a.k.a. Toom-Cook method):
- * (Step1) calculating 5 points z(b0), z(b1), z(b2), z(b3), z(b4),
- * where:
- * b0 = 0, b1 = 1, b2 = -1, b3 = -2, b4 = inf,
- * z(0) = x(0) * y(0) = x0 * y0
- * z(1) = x(1) * y(1) = (x0 + x1 + x2) * (y0 + y1 + y2)
- * z(-1) = x(-1) * y(-1) = (x0 - x1 + x2) * (y0 - y1 + y2)
- * z(-2) = x(-2) * y(-2) = (x0 - 2 * (x1 - 2 * x2)) * (y0 - 2 * (y1 - 2 * y2))
- * z(inf) = x(inf) * y(inf) = x2 * y2
- *
- * (Step2) interpolating z0, z1, z2, z3 and z4.
- *
- * (Step3) Substituting base value into b of the polynomial z(b),
- */
-
- /*
- * [Step1] calculating 5 points z(b0), z(b1), z(b2), z(b3), z(b4)
- */
-
- /* u1 <- x0 + x2 */
- bary_add(u1ds, u1n, x0ds, x0n, x2ds, x2n);
- u1p = 1;
-
- /* x(-1) : u2 <- u1 - x1 = x0 - x1 + x2 */
- if (bary_sub(u2ds, u2n, u1ds, u1n, x1ds, x1n)) {
- bary_2comp(u2ds, u2n);
- u2p = 0;
- }
- else {
- u2p = 1;
- }
-
- /* x(1) : u1 <- u1 + x1 = x0 + x1 + x2 */
- bary_add(u1ds, u1n, u1ds, u1n, x1ds, x1n);
-
- /* x(-2) : u3 <- 2 * (u2 + x2) - x0 = x0 - 2 * (x1 - 2 * x2) */
- u3p = 1;
- if (u2p) {
- bary_add(u3ds, u3n, u2ds, u2n, x2ds, x2n);
- }
- else if (bary_sub(u3ds, u3n, x2ds, x2n, u2ds, u2n)) {
- bary_2comp(u3ds, u3n);
- u3p = 0;
- }
- bary_small_lshift(u3ds, u3ds, u3n, 1);
- if (!u3p) {
- bary_add(u3ds, u3n, u3ds, u3n, x0ds, x0n);
- }
- else if (bary_sub(u3ds, u3n, u3ds, u3n, x0ds, x0n)) {
- bary_2comp(u3ds, u3n);
- u3p = 0;
- }
-
- if (sq) {
- v1n = u1n; v1ds = u1ds; v1p = u1p;
- v2n = u2n; v2ds = u2ds; v2p = u2p;
- v3n = u3n; v3ds = u3ds; v3p = u3p;
- }
- else {
- /* v1 <- y0 + y2 */
- bary_add(v1ds, v1n, y0ds, y0n, y2ds, y2n);
- v1p = 1;
-
- /* y(-1) : v2 <- v1 - y1 = y0 - y1 + y2 */
- v2p = 1;
- if (bary_sub(v2ds, v2n, v1ds, v1n, y1ds, y1n)) {
- bary_2comp(v2ds, v2n);
- v2p = 0;
- }
-
- /* y(1) : v1 <- v1 + y1 = y0 + y1 + y2 */
- bary_add(v1ds, v1n, v1ds, v1n, y1ds, y1n);
-
- /* y(-2) : v3 <- 2 * (v2 + y2) - y0 = y0 - 2 * (y1 - 2 * y2) */
- v3p = 1;
- if (v2p) {
- bary_add(v3ds, v3n, v2ds, v2n, y2ds, y2n);
- }
- else if (bary_sub(v3ds, v3n, y2ds, y2n, v2ds, v2n)) {
- bary_2comp(v3ds, v3n);
- v3p = 0;
- }
- bary_small_lshift(v3ds, v3ds, v3n, 1);
- if (!v3p) {
- bary_add(v3ds, v3n, v3ds, v3n, y0ds, y0n);
- }
- else if (bary_sub(v3ds, v3n, v3ds, v3n, y0ds, y0n)) {
- bary_2comp(v3ds, v3n);
- v3p = 0;
- }
- }
-
- /* z(0) : t0 <- x0 * y0 */
- bary_mul_toom3_start(t0ds, t0n, x0ds, x0n, y0ds, y0n, wds, wn);
- t0p = 1;
-
- /* z(1) : t1 <- u1 * v1 */
- bary_mul_toom3_start(t1ds, t1n, u1ds, u1n, v1ds, v1n, wds, wn);
- t1p = u1p == v1p;
- assert(t1ds[t1n-1] == 0);
- t1n--;
-
- /* z(-1) : t2 <- u2 * v2 */
- bary_mul_toom3_start(t2ds, t2n, u2ds, u2n, v2ds, v2n, wds, wn);
- t2p = u2p == v2p;
- assert(t2ds[t2n-1] == 0);
- t2n--;
-
- /* z(-2) : t3 <- u3 * v3 */
- bary_mul_toom3_start(t3ds, t3n, u3ds, u3n, v3ds, v3n, wds, wn);
- t3p = u3p == v3p;
- assert(t3ds[t3n-1] == 0);
- t3n--;
-
- /* z(inf) : t4 <- x2 * y2 */
- bary_mul_toom3_start(t4ds, t4n, x2ds, x2n, y2ds, y2n, wds, wn);
- t4p = 1;
-
- /*
- * [Step2] interpolating z0, z1, z2, z3 and z4.
- */
-
- /* z0 <- z(0) == t0 */
- z0n = t0n; z0ds = t0ds;
-
- /* z4 <- z(inf) == t4 */
- z4n = t4n; z4ds = t4ds;
-
- /* z3 <- (z(-2) - z(1)) / 3 == (t3 - t1) / 3 */
- if (t3p == t1p) {
- z3p = t3p;
- if (bary_sub(z3ds, z3n, t3ds, t3n, t1ds, t1n)) {
- bary_2comp(z3ds, z3n);
- z3p = !z3p;
- }
- }
- else {
- z3p = t3p;
- bary_add(z3ds, z3n, t3ds, t3n, t1ds, t1n);
- }
- bigdivrem_single(z3ds, z3ds, z3n, 3);
-
- /* z1 <- (z(1) - z(-1)) / 2 == (t1 - t2) / 2 */
- if (t1p == t2p) {
- z1p = t1p;
- if (bary_sub(z1ds, z1n, t1ds, t1n, t2ds, t2n)) {
- bary_2comp(z1ds, z1n);
- z1p = !z1p;
- }
- }
- else {
- z1p = t1p;
- bary_add(z1ds, z1n, t1ds, t1n, t2ds, t2n);
- }
- bary_small_rshift(z1ds, z1ds, z1n, 1, 0);
-
- /* z2 <- z(-1) - z(0) == t2 - t0 */
- if (t2p == t0p) {
- z2p = t2p;
- if (bary_sub(z2ds, z2n, t2ds, t2n, t0ds, t0n)) {
- bary_2comp(z2ds, z2n);
- z2p = !z2p;
- }
- }
- else {
- z2p = t2p;
- bary_add(z2ds, z2n, t2ds, t2n, t0ds, t0n);
- }
-
- /* z3 <- (z2 - z3) / 2 + 2 * z(inf) == (z2 - z3) / 2 + 2 * t4 */
- if (z2p == z3p) {
- z3p = z2p;
- if (bary_sub(z3ds, z3n, z2ds, z2n, z3ds, z3n)) {
- bary_2comp(z3ds, z3n);
- z3p = !z3p;
- }
- }
- else {
- z3p = z2p;
- bary_add(z3ds, z3n, z2ds, z2n, z3ds, z3n);
- }
- bary_small_rshift(z3ds, z3ds, z3n, 1, 0);
- if (z3p == t4p) {
- bary_muladd_1xN(z3ds, z3n, 2, t4ds, t4n);
- }
- else {
- if (bary_mulsub_1xN(z3ds, z3n, 2, t4ds, t4n)) {
- bary_2comp(z3ds, z3n);
- z3p = !z3p;
- }
- }
-
- /* z2 <- z2 + z1 - z(inf) == z2 + z1 - t4 */
- if (z2p == z1p) {
- bary_add(z2ds, z2n, z2ds, z2n, z1ds, z1n);
- }
- else {
- if (bary_sub(z2ds, z2n, z2ds, z2n, z1ds, z1n)) {
- bary_2comp(z2ds, z2n);
- z2p = !z2p;
- }
- }
-
- if (z2p == t4p) {
- if (bary_sub(z2ds, z2n, z2ds, z2n, t4ds, t4n)) {
- bary_2comp(z2ds, z2n);
- z2p = !z2p;
- }
- }
- else {
- bary_add(z2ds, z2n, z2ds, z2n, t4ds, t4n);
- }
-
- /* z1 <- z1 - z3 */
- if (z1p == z3p) {
- if (bary_sub(z1ds, z1n, z1ds, z1n, z3ds, z3n)) {
- bary_2comp(z1ds, z1n);
- z1p = !z1p;
- }
- }
- else {
- bary_add(z1ds, z1n, z1ds, z1n, z3ds, z3n);
- }
-
- /*
- * [Step3] Substituting base value into b of the polynomial z(b),
- */
-
- MEMCPY(zzds, z0ds, BDIGIT, z0n);
- BDIGITS_ZERO(zzds + z0n, 4*n - z0n);
- MEMCPY(zzds + 4*n, z4ds, BDIGIT, z4n);
- BDIGITS_ZERO(zzds + 4*n + z4n, zzn - (4*n + z4n));
- if (z1p)
- bary_add(zzds + n, zzn - n, zzds + n, zzn - n, z1ds, z1n);
- else
- bary_sub(zzds + n, zzn - n, zzds + n, zzn - n, z1ds, z1n);
- if (z2p)
- bary_add(zzds + 2*n, zzn - 2*n, zzds + 2*n, zzn - 2*n, z2ds, z2n);
- else
- bary_sub(zzds + 2*n, zzn - 2*n, zzds + 2*n, zzn - 2*n, z2ds, z2n);
- if (z3p)
- bary_add(zzds + 3*n, zzn - 3*n, zzds + 3*n, zzn - 3*n, z3ds, z3n);
- else
- bary_sub(zzds + 3*n, zzn - 3*n, zzds + 3*n, zzn - 3*n, z3ds, z3n);
-
- BARY_TRUNC(zzds, zzn);
- MEMCPY(zds, zzds, BDIGIT, zzn);
- BDIGITS_ZERO(zds + zzn, zn - zzn);
-
- if (work)
- ALLOCV_END(work);
-}
-
-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));
- 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);
- RB_GC_GUARD(x);
- RB_GC_GUARD(y);
- return z;
-}
-
-#ifdef USE_GMP
-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;
- mpz_t x, y, z;
- size_t count;
-
- assert(xn + yn <= zn);
-
- mpz_init(x);
- mpz_init(y);
- mpz_init(z);
- mpz_import(x, xn, -1, sizeof(BDIGIT), 0, nails, xds);
- if (xds == yds && xn == yn) {
- mpz_mul(z, x, x);
- }
- else {
- mpz_import(y, yn, -1, sizeof(BDIGIT), 0, nails, yds);
- mpz_mul(z, x, y);
- }
- mpz_export(zds, &count, -1, sizeof(BDIGIT), 0, nails, z);
- BDIGITS_ZERO(zds+count, zn-count);
- mpz_clear(x);
- mpz_clear(y);
- mpz_clear(z);
-}
-
-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));
- bary_mul_gmp(BDIGITS(z), zn, BDIGITS(x), xn, BDIGITS(y), yn);
- RB_GC_GUARD(x);
- RB_GC_GUARD(y);
- return z;
-}
-#endif
-
-static void
-bary_short_mul(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn)
-{
- assert(xn + yn <= zn);
-
- if (xn == 1 && yn == 1) {
- bary_mul_single(zds, zn, xds[0], yds[0]);
- }
- else {
- bary_mul_normal(zds, zn, xds, xn, yds, yn);
- rb_thread_check_ints();
- }
-}
-
-/* determine whether a bignum is sparse or not by random sampling */
-static inline int
-bary_sparse_p(const BDIGIT *ds, size_t n)
-{
- long c = 0;
-
- if ( ds[rb_genrand_ulong_limited(n / 2) + n / 4]) c++;
- if (c <= 1 && ds[rb_genrand_ulong_limited(n / 2) + n / 4]) c++;
- if (c <= 1 && ds[rb_genrand_ulong_limited(n / 2) + n / 4]) c++;
-
- return (c <= 1) ? 1 : 0;
-}
-
-static int
-bary_mul_precheck(BDIGIT **zdsp, size_t *znp, const BDIGIT **xdsp, size_t *xnp, const BDIGIT **ydsp, size_t *ynp)
-{
- size_t nlsz; /* number of least significant zero BDIGITs */
-
- BDIGIT *zds = *zdsp;
- size_t zn = *znp;
- const BDIGIT *xds = *xdsp;
- size_t xn = *xnp;
- const BDIGIT *yds = *ydsp;
- size_t yn = *ynp;
-
- assert(xn + yn <= zn);
-
- nlsz = 0;
-
- while (0 < xn) {
- if (xds[xn-1] == 0) {
- xn--;
- }
- else {
- do {
- if (xds[0] != 0)
- break;
- xds++;
- xn--;
- nlsz++;
- } while (0 < xn);
- break;
- }
- }
-
- while (0 < yn) {
- if (yds[yn-1] == 0) {
- yn--;
- }
- else {
- do {
- if (xds[0] != 0)
- break;
- yds++;
- yn--;
- nlsz++;
- } while (0 < yn);
- break;
- }
- }
-
- if (nlsz) {
- BDIGITS_ZERO(zds, nlsz);
- zds += nlsz;
- zn -= nlsz;
- }
-
- /* make sure that y is longer than x */
- if (xn > yn) {
- const BDIGIT *tds;
- size_t tn;
- tds = xds; xds = yds; yds = tds;
- tn = xn; xn = yn; yn = tn;
- }
- assert(xn <= yn);
-
- if (xn <= 1) {
- if (xn == 0) {
- BDIGITS_ZERO(zds, zn);
- return 1;
- }
-
- if (xds[0] == 1) {
- MEMCPY(zds, yds, BDIGIT, yn);
- BDIGITS_ZERO(zds+yn, zn-yn);
- return 1;
- }
- if (POW2_P(xds[0])) {
- zds[yn] = bary_small_lshift(zds, yds, yn, bit_length(xds[0])-1);
- BDIGITS_ZERO(zds+yn+1, zn-yn-1);
- return 1;
- }
- if (yn == 1 && yds[0] == 1) {
- zds[0] = xds[0];
- BDIGITS_ZERO(zds+1, zn-1);
- return 1;
- }
- bary_mul_normal(zds, zn, xds, xn, yds, yn);
- return 1;
- }
-
- *zdsp = zds;
- *znp = zn;
- *xdsp = xds;
- *xnp = xn;
- *ydsp = yds;
- *ynp = yn;
-
- return 0;
-}
-
-static void
-bary_mul_karatsuba_branch(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn, BDIGIT *wds, size_t wn)
-{
- /* normal multiplication when x is small */
- if (xn < KARATSUBA_MUL_DIGITS) {
- normal:
- if (xds == yds && xn == yn)
- bary_sq_fast(zds, zn, xds, xn);
- else
- bary_short_mul(zds, zn, xds, xn, yds, yn);
- return;
- }
-
- /* normal multiplication when x or y is a sparse bignum */
- if (bary_sparse_p(xds, xn)) goto normal;
- if (bary_sparse_p(yds, yn)) {
- bary_short_mul(zds, zn, yds, yn, xds, xn);
- return;
- }
-
- /* balance multiplication by slicing y when x is much smaller than y */
- if (!KARATSUBA_BALANCED(xn, yn)) {
- bary_mul_balance_with_mulfunc(zds, zn, xds, xn, yds, yn, wds, wn, bary_mul_karatsuba_start);
- return;
- }
-
- /* multiplication by karatsuba method */
- bary_mul_karatsuba(zds, zn, xds, xn, yds, yn, wds, wn);
-}
-
-static void
-bary_mul_karatsuba_start(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn, BDIGIT *wds, size_t wn)
-{
- if (bary_mul_precheck(&zds, &zn, &xds, &xn, &yds, &yn))
- return;
-
- bary_mul_karatsuba_branch(zds, zn, xds, xn, yds, yn, wds, wn);
-}
-
-static void
-bary_mul_toom3_branch(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn, BDIGIT *wds, size_t wn)
-{
- if (xn < TOOM3_MUL_DIGITS) {
- bary_mul_karatsuba_branch(zds, zn, xds, xn, yds, yn, wds, wn);
- return;
- }
-
- if (!TOOM3_BALANCED(xn, yn)) {
- bary_mul_balance_with_mulfunc(zds, zn, xds, xn, yds, yn, wds, wn, bary_mul_toom3_start);
- return;
- }
-
- bary_mul_toom3(zds, zn, xds, xn, yds, yn, wds, wn);
-}
-
-static void
-bary_mul_toom3_start(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn, BDIGIT *wds, size_t wn)
-{
- if (bary_mul_precheck(&zds, &zn, &xds, &xn, &yds, &yn))
- return;
-
- bary_mul_toom3_branch(zds, zn, xds, xn, yds, yn, wds, wn);
-}
-
-static void
-bary_mul(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn)
-{
-#ifdef USE_GMP
- const size_t naive_threshold = GMP_MUL_DIGITS;
-#else
- const size_t naive_threshold = KARATSUBA_MUL_DIGITS;
-#endif
- if (xn <= yn) {
- if (xn < naive_threshold) {
- if (xds == yds && xn == yn)
- bary_sq_fast(zds, zn, xds, xn);
- else
- bary_short_mul(zds, zn, xds, xn, yds, yn);
- return;
- }
- }
- else {
- if (yn < naive_threshold) {
- bary_short_mul(zds, zn, yds, yn, xds, xn);
- return;
- }
- }
-
-#ifdef USE_GMP
- bary_mul_gmp(zds, zn, xds, xn, yds, yn);
-#else
- bary_mul_toom3_start(zds, zn, xds, xn, yds, yn, NULL, 0);
-#endif
-}
-
-struct big_div_struct {
- size_t yn, zn;
- BDIGIT *yds, *zds;
- volatile VALUE stop;
-};
-
-static void *
-bigdivrem1(void *ptr)
-{
- struct big_div_struct *bds = (struct big_div_struct*)ptr;
- size_t yn = bds->yn;
- size_t zn = bds->zn;
- BDIGIT *yds = bds->yds, *zds = bds->zds;
- BDIGIT_DBL_SIGNED num;
- BDIGIT q;
-
- do {
- if (bds->stop) {
- bds->zn = zn;
- return 0;
- }
- if (zds[zn-1] == yds[yn-1]) q = BDIGMAX;
- else q = (BDIGIT)((BIGUP(zds[zn-1]) + zds[zn-2])/yds[yn-1]);
- if (q) {
- num = bigdivrem_mulsub(zds+zn-(yn+1), yn+1,
- q,
- yds, yn);
- while (num) { /* "add back" required */
- q--;
- num = bary_add(zds+zn-(yn+1), yn,
- zds+zn-(yn+1), yn,
- yds, yn);
- num--;
- }
- }
- zn--;
- zds[zn] = q;
- } while (zn > yn);
- return 0;
-}
-
-static void
-rb_big_stop(void *ptr)
-{
- struct big_div_struct *bds = ptr;
- bds->stop = Qtrue;
-}
-
-static BDIGIT
-bigdivrem_single1(BDIGIT *qds, const BDIGIT *xds, size_t xn, BDIGIT x_higher_bdigit, BDIGIT y)
-{
- assert(0 < xn);
- assert(x_higher_bdigit < y);
- if (POW2_P(y)) {
- BDIGIT r;
- r = xds[0] & (y-1);
- bary_small_rshift(qds, xds, xn, bit_length(y)-1, x_higher_bdigit);
- return r;
- }
- else {
- size_t i;
- BDIGIT_DBL t2;
- t2 = x_higher_bdigit;
- i = xn;
- while (i--) {
- t2 = BIGUP(t2) + xds[i];
- qds[i] = (BDIGIT)(t2 / y);
- t2 %= y;
- }
- return (BDIGIT)t2;
- }
-}
-
-static BDIGIT
-bigdivrem_single(BDIGIT *qds, const BDIGIT *xds, size_t xn, BDIGIT y)
-{
- return bigdivrem_single1(qds, xds, xn, 0, y);
-}
-
-static void
-bigdivrem_restoring(BDIGIT *zds, size_t zn, BDIGIT *yds, size_t yn)
-{
- struct big_div_struct bds;
- size_t ynzero;
-
- assert(yn < zn);
- assert(BDIGIT_MSB(yds[yn-1]));
- assert(zds[zn-1] < yds[yn-1]);
-
- for (ynzero = 0; !yds[ynzero]; ynzero++);
-
- if (ynzero+1 == yn) {
- BDIGIT r;
- r = bigdivrem_single1(zds+yn, zds+ynzero, zn-yn, zds[zn-1], yds[ynzero]);
- zds[ynzero] = r;
- return;
- }
-
- bds.yn = yn - ynzero;
- bds.zds = zds + ynzero;
- bds.yds = yds + ynzero;
- bds.stop = Qfalse;
- bds.zn = zn - ynzero;
- if (bds.zn > 10000 || bds.yn > 10000) {
- retry:
- bds.stop = Qfalse;
- rb_thread_call_without_gvl(bigdivrem1, &bds, rb_big_stop, &bds);
-
- if (bds.stop == Qtrue) {
- /* execute trap handler, but exception was not raised. */
- goto retry;
- }
- }
- else {
- bigdivrem1(&bds);
- }
-}
-
-static void
-bary_divmod_normal(BDIGIT *qds, size_t qn, BDIGIT *rds, size_t rn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn)
-{
- int shift;
- BDIGIT *zds, *yyds;
- size_t zn;
- VALUE tmpyz = 0;
-
- assert(yn < xn || (xn == yn && yds[yn - 1] <= xds[xn - 1]));
- assert(qds ? (xn - yn + 1) <= qn : 1);
- assert(rds ? yn <= rn : 1);
-
- zn = xn + BIGDIVREM_EXTRA_WORDS;
-
- shift = nlz(yds[yn-1]);
- if (shift) {
- int alloc_y = !rds;
- int alloc_z = !qds || qn < zn;
- if (alloc_y && alloc_z) {
- yyds = ALLOCV_N(BDIGIT, tmpyz, yn+zn);
- zds = yyds + yn;
- }
- else {
- yyds = alloc_y ? ALLOCV_N(BDIGIT, tmpyz, yn) : rds;
- zds = alloc_z ? ALLOCV_N(BDIGIT, tmpyz, zn) : qds;
- }
- zds[xn] = bary_small_lshift(zds, xds, xn, shift);
- bary_small_lshift(yyds, yds, yn, shift);
- }
- else {
- if (qds && zn <= qn)
- zds = qds;
- else
- zds = ALLOCV_N(BDIGIT, tmpyz, zn);
- MEMCPY(zds, xds, BDIGIT, xn);
- zds[xn] = 0;
- /* bigdivrem_restoring will not modify y.
- * So use yds directly. */
- yyds = (BDIGIT *)yds;
- }
-
- bigdivrem_restoring(zds, zn, yyds, yn);
-
- if (rds) {
- if (shift)
- bary_small_rshift(rds, zds, yn, shift, 0);
- else
- MEMCPY(rds, zds, BDIGIT, yn);
- BDIGITS_ZERO(rds+yn, rn-yn);
- }
-
- if (qds) {
- size_t j = zn - yn;
- MEMMOVE(qds, zds+yn, BDIGIT, j);
- BDIGITS_ZERO(qds+j, qn-j);
- }
-
- if (tmpyz)
- ALLOCV_END(tmpyz);
-}
-
-VALUE
-rb_big_divrem_normal(VALUE x, VALUE y)
-{
- size_t xn = RBIGNUM_LEN(x), yn = RBIGNUM_LEN(y), qn, rn;
- BDIGIT *xds = BDIGITS(x), *yds = BDIGITS(y), *qds, *rds;
- VALUE q, r;
-
- BARY_TRUNC(yds, yn);
- if (yn == 0)
- rb_num_zerodiv();
- BARY_TRUNC(xds, xn);
-
- if (xn < yn || (xn == yn && xds[xn - 1] < yds[yn - 1]))
- return rb_assoc_new(LONG2FIX(0), x);
-
- qn = xn + BIGDIVREM_EXTRA_WORDS;
- q = bignew(qn, RBIGNUM_SIGN(x)==RBIGNUM_SIGN(y));
- qds = BDIGITS(q);
-
- rn = yn;
- r = bignew(rn, RBIGNUM_SIGN(x));
- rds = BDIGITS(r);
-
- bary_divmod_normal(qds, qn, rds, rn, xds, xn, yds, yn);
-
- bigtrunc(q);
- bigtrunc(r);
-
- RB_GC_GUARD(x);
- RB_GC_GUARD(y);
-
- return rb_assoc_new(q, r);
-}
-
-#ifdef USE_GMP
-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;
- mpz_t x, y, q, r;
- size_t count;
-
- assert(yn < xn || (xn == yn && yds[yn - 1] <= xds[xn - 1]));
- assert(qds ? (xn - yn + 1) <= qn : 1);
- assert(rds ? yn <= rn : 1);
- assert(qds || rds);
-
- mpz_init(x);
- mpz_init(y);
- if (qds) mpz_init(q);
- if (rds) mpz_init(r);
-
- mpz_import(x, xn, -1, sizeof(BDIGIT), 0, nails, xds);
- mpz_import(y, yn, -1, sizeof(BDIGIT), 0, nails, yds);
-
- if (!rds) {
- mpz_fdiv_q(q, x, y);
- }
- else if (!qds) {
- mpz_fdiv_r(r, x, y);
- }
- else {
- mpz_fdiv_qr(q, r, x, y);
- }
-
- mpz_clear(x);
- mpz_clear(y);
-
- if (qds) {
- mpz_export(qds, &count, -1, sizeof(BDIGIT), 0, nails, q);
- BDIGITS_ZERO(qds+count, qn-count);
- mpz_clear(q);
- }
-
- if (rds) {
- mpz_export(rds, &count, -1, sizeof(BDIGIT), 0, nails, r);
- BDIGITS_ZERO(rds+count, rn-count);
- mpz_clear(r);
- }
-}
-
-VALUE
-rb_big_divrem_gmp(VALUE x, VALUE y)
-{
- size_t xn = RBIGNUM_LEN(x), yn = RBIGNUM_LEN(y), qn, rn;
- BDIGIT *xds = BDIGITS(x), *yds = BDIGITS(y), *qds, *rds;
- VALUE q, r;
-
- BARY_TRUNC(yds, yn);
- if (yn == 0)
- rb_num_zerodiv();
- BARY_TRUNC(xds, xn);
-
- if (xn < yn || (xn == yn && xds[xn - 1] < yds[yn - 1]))
- return rb_assoc_new(LONG2FIX(0), x);
-
- qn = xn - yn + 1;
- q = bignew(qn, RBIGNUM_SIGN(x)==RBIGNUM_SIGN(y));
- qds = BDIGITS(q);
-
- rn = yn;
- r = bignew(rn, RBIGNUM_SIGN(x));
- rds = BDIGITS(r);
-
- bary_divmod_gmp(qds, qn, rds, rn, xds, xn, yds, yn);
-
- bigtrunc(q);
- bigtrunc(r);
-
- RB_GC_GUARD(x);
- RB_GC_GUARD(y);
-
- return rb_assoc_new(q, r);
-}
-#endif
-
-static void
-bary_divmod_branch(BDIGIT *qds, size_t qn, BDIGIT *rds, size_t rn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn)
-{
-#ifdef USE_GMP
- if (GMP_DIV_DIGITS < xn) {
- bary_divmod_gmp(qds, qn, rds, rn, xds, xn, yds, yn);
- return;
- }
-#endif
- bary_divmod_normal(qds, qn, rds, rn, xds, xn, yds, yn);
-}
-
-static void
-bary_divmod(BDIGIT *qds, size_t qn, BDIGIT *rds, size_t rn, const BDIGIT *xds, size_t xn, const BDIGIT *yds, size_t yn)
-{
- assert(xn <= qn);
- assert(yn <= rn);
-
- BARY_TRUNC(yds, yn);
- if (yn == 0)
- rb_num_zerodiv();
-
- BARY_TRUNC(xds, xn);
- if (xn == 0) {
- BDIGITS_ZERO(qds, qn);
- BDIGITS_ZERO(rds, rn);
- return;
- }
-
- if (xn < yn || (xn == yn && xds[xn - 1] < yds[yn - 1])) {
- MEMCPY(rds, xds, BDIGIT, xn);
- BDIGITS_ZERO(rds+xn, rn-xn);
- BDIGITS_ZERO(qds, qn);
- }
- else if (yn == 1) {
- MEMCPY(qds, xds, BDIGIT, xn);
- BDIGITS_ZERO(qds+xn, qn-xn);
- rds[0] = bigdivrem_single(qds, xds, xn, yds[0]);
- BDIGITS_ZERO(rds+1, rn-1);
- }
- else if (xn == 2 && yn == 2) {
- BDIGIT_DBL x = bary2bdigitdbl(xds, 2);
- BDIGIT_DBL y = bary2bdigitdbl(yds, 2);
- BDIGIT_DBL q = x / y;
- BDIGIT_DBL r = x % y;
- qds[0] = BIGLO(q);
- qds[1] = BIGLO(BIGDN(q));
- BDIGITS_ZERO(qds+2, qn-2);
- rds[0] = BIGLO(r);
- rds[1] = BIGLO(BIGDN(r));
- BDIGITS_ZERO(rds+2, rn-2);
- }
- else {
- bary_divmod_branch(qds, qn, rds, rn, xds, xn, yds, yn);
- }
-}
-
#define BIGNUM_DEBUG 0
#if BIGNUM_DEBUG
@@ -2880,7 +59,7 @@ 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("_%08"PRIxBDIGIT, BDIGITS(x)[i]);
}
printf(", len=%lu", RBIGNUM_LEN(x));
puts("");
@@ -2899,7 +78,13 @@ rb_big_dump(VALUE x)
static int
bigzero_p(VALUE x)
{
- return bary_zero_p(BDIGITS(x), RBIGNUM_LEN(x));
+ long i;
+ BDIGIT *ds = BDIGITS(x);
+
+ for (i = RBIGNUM_LEN(x) - 1; 0 <= i; i--) {
+ if (ds[i]) return 0;
+ }
+ return 1;
}
int
@@ -2920,7 +105,7 @@ rb_cmpint(VALUE val, VALUE a, VALUE b)
if (l < 0) return -1;
return 0;
}
- if (RB_BIGNUM_TYPE_P(val)) {
+ if (RB_TYPE_P(val, T_BIGNUM)) {
if (BIGZEROP(val)) return 0;
if (RBIGNUM_SIGN(val)) return 1;
return -1;
@@ -2955,7 +140,6 @@ rb_big_realloc(VALUE big, long len)
ds = RBIGNUM(big)->as.heap.digits;
RBASIC(big)->flags |= RBIGNUM_EMBED_FLAG;
RBIGNUM_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);
xfree(ds);
@@ -2982,12 +166,11 @@ rb_big_resize(VALUE big, long len)
static VALUE
bignew_1(VALUE klass, long len, int sign)
{
- NEWOBJ_OF(big, struct RBignum, klass, T_BIGNUM | (RGENGC_WB_PROTECTED_BIGNUM ? FL_WB_PROTECTED : 0));
+ NEWOBJ_OF(big, struct RBignum, klass, T_BIGNUM);
RBIGNUM_SET_SIGN(big, sign?1:0);
if (len <= RBIGNUM_EMBED_LEN_MAX) {
RBASIC(big)->flags |= RBIGNUM_EMBED_FLAG;
RBIGNUM_SET_LEN(big, len);
- (void)VALGRIND_MAKE_MEM_UNDEFINED((void*)RBIGNUM(big)->as.ary, sizeof(RBIGNUM(big)->as.ary));
}
else {
RBIGNUM(big)->as.heap.digits = ALLOC_N(BDIGIT, len);
@@ -2997,6 +180,8 @@ bignew_1(VALUE klass, long len, int sign)
return (VALUE)big;
}
+#define bignew(len,sign) bignew_1(rb_cBignum,(len),(sign))
+
VALUE
rb_big_new(long len, int sign)
{
@@ -3013,22 +198,26 @@ rb_big_clone(VALUE x)
return z;
}
-static void
-big_extend_carry(VALUE x)
-{
- rb_big_resize(x, RBIGNUM_LEN(x)+1);
- BDIGITS(x)[RBIGNUM_LEN(x)-1] = 1;
-}
-
/* modify a bignum by 2's complement */
static void
get2comp(VALUE x)
{
long i = RBIGNUM_LEN(x);
BDIGIT *ds = BDIGITS(x);
+ BDIGIT_DBL num;
- if (bary_2comp(ds, i)) {
- big_extend_carry(x);
+ if (!i) return;
+ while (i--) ds[i] = ~ds[i];
+ i = 0; num = 1;
+ do {
+ num += ds[i];
+ ds[i++] = BIGLO(num);
+ num = BIGDN(num);
+ } while (i < RBIGNUM_LEN(x));
+ if (num != 0) {
+ rb_big_resize(x, RBIGNUM_LEN(x)+1);
+ ds = BDIGITS(x);
+ ds[RBIGNUM_LEN(x)-1] = 1;
}
}
@@ -3038,36 +227,6 @@ rb_big_2comp(VALUE x) /* get 2's complement */
get2comp(x);
}
-static BDIGIT
-abs2twocomp(VALUE *xp, long *n_ret)
-{
- VALUE x = *xp;
- long n = RBIGNUM_LEN(x);
- BDIGIT *ds = BDIGITS(x);
- BDIGIT hibits = 0;
-
- BARY_TRUNC(ds, n);
-
- if (n != 0 && RBIGNUM_NEGATIVE_P(x)) {
- VALUE z = bignew_1(CLASS_OF(x), n, 0);
- MEMCPY(BDIGITS(z), ds, BDIGIT, n);
- bary_2comp(BDIGITS(z), n);
- hibits = BDIGMAX;
- *xp = z;
- }
- *n_ret = n;
- return hibits;
-}
-
-static void
-twocomp2abs_bang(VALUE x, int hibits)
-{
- RBIGNUM_SET_SIGN(x, !hibits);
- if (hibits) {
- get2comp(x);
- }
-}
-
static inline VALUE
bigtrunc(VALUE x)
{
@@ -3085,52 +244,36 @@ bigtrunc(VALUE x)
static inline VALUE
bigfixize(VALUE x)
{
- size_t n = RBIGNUM_LEN(x);
+ long len = RBIGNUM_LEN(x);
BDIGIT *ds = BDIGITS(x);
-#if SIZEOF_BDIGITS < SIZEOF_LONG
- unsigned long u;
-#else
- BDIGIT u;
-#endif
- BARY_TRUNC(ds, n);
-
- if (n == 0) return INT2FIX(0);
-
-#if SIZEOF_BDIGITS < SIZEOF_LONG
- if (sizeof(long)/SIZEOF_BDIGITS < n)
- goto return_big;
- else {
- int i = (int)n;
- u = 0;
- while (i--) {
- u = (unsigned long)(BIGUP(u) + ds[i]);
- }
- }
-#else /* SIZEOF_BDIGITS >= SIZEOF_LONG */
- if (1 < n)
- goto return_big;
- else
- u = ds[0];
+ if (len == 0) return INT2FIX(0);
+ if ((size_t)(len*SIZEOF_BDIGITS) <= sizeof(long)) {
+ long num = 0;
+#if 2*SIZEOF_BDIGITS > SIZEOF_LONG
+ num = (long)ds[0];
+#else
+ while (len--) {
+ num = (long)(BIGUP(num) + ds[len]);
+ }
#endif
-
- if (RBIGNUM_POSITIVE_P(x)) {
- if (POSFIXABLE(u)) return LONG2FIX((long)u);
- }
- else {
- if (u <= -FIXNUM_MIN) return LONG2FIX(-(long)u);
+ if (num >= 0) {
+ if (RBIGNUM_SIGN(x)) {
+ if (POSFIXABLE(num)) return LONG2FIX(num);
+ }
+ else {
+ if (NEGFIXABLE(-num)) return LONG2FIX(-num);
+ }
+ }
}
-
- return_big:
- rb_big_resize(x, n);
return x;
}
static VALUE
bignorm(VALUE x)
{
- if (RB_BIGNUM_TYPE_P(x)) {
- x = bigfixize(x);
+ if (RB_TYPE_P(x, T_BIGNUM)) {
+ x = bigfixize(bigtrunc(x));
}
return x;
}
@@ -3144,20 +287,19 @@ rb_big_norm(VALUE x)
VALUE
rb_uint2big(VALUE n)
{
- long i;
- VALUE big = bignew(bdigit_roomof(SIZEOF_VALUE), 1);
- BDIGIT *digits = BDIGITS(big);
+ BDIGIT_DBL num = n;
+ long i = 0;
+ BDIGIT *digits;
+ VALUE big;
-#if SIZEOF_BDIGITS >= SIZEOF_VALUE
- digits[0] = n;
-#else
- for (i = 0; i < bdigit_roomof(SIZEOF_VALUE); i++) {
- digits[i] = BIGLO(n);
- n = BIGDN(n);
+ big = bignew(DIGSPERLONG, 1);
+ digits = BDIGITS(big);
+ while (i < DIGSPERLONG) {
+ digits[i++] = BIGLO(num);
+ num = BIGDN(num);
}
-#endif
- i = bdigit_roomof(SIZEOF_VALUE);
+ i = DIGSPERLONG;
while (--i && !digits[i]) ;
RBIGNUM_SET_LEN(big, i+1);
return big;
@@ -3167,17 +309,13 @@ VALUE
rb_int2big(SIGNED_VALUE n)
{
long neg = 0;
- VALUE u;
VALUE big;
if (n < 0) {
- u = 1 + (VALUE)(-(n + 1)); /* u = -n avoiding overflow */
+ n = -n;
neg = 1;
}
- else {
- u = n;
- }
- big = rb_uint2big(u);
+ big = rb_uint2big(n);
if (neg) {
RBIGNUM_SET_SIGN(big, 0);
}
@@ -3198,788 +336,265 @@ rb_int2inum(SIGNED_VALUE n)
return rb_int2big(n);
}
-void
-rb_big_pack(VALUE val, unsigned long *buf, long num_longs)
-{
- rb_integer_pack(val, buf, num_longs, sizeof(long), 0,
- INTEGER_PACK_LSWORD_FIRST|INTEGER_PACK_NATIVE_BYTE_ORDER|
- INTEGER_PACK_2COMP);
-}
-
-VALUE
-rb_big_unpack(unsigned long *buf, long num_longs)
-{
- return rb_integer_unpack(buf, num_longs, sizeof(long), 0,
- INTEGER_PACK_LSWORD_FIRST|INTEGER_PACK_NATIVE_BYTE_ORDER|
- INTEGER_PACK_2COMP);
-}
+#if SIZEOF_LONG % SIZEOF_BDIGITS != 0
+# error unexpected SIZEOF_LONG : SIZEOF_BDIGITS ratio
+#endif
/*
- * Calculate the number of bytes to be required to represent
- * the absolute value of the integer given as _val_.
- *
- * [val] an integer.
- * [nlz_bits_ret] number of leading zero bits in the most significant byte is returned if not NULL.
- *
- * This function returns ((val_numbits * CHAR_BIT + CHAR_BIT - 1) / CHAR_BIT)
- * where val_numbits is the number of bits of abs(val).
- * This function should not overflow.
- *
- * If nlz_bits_ret is not NULL,
- * (return_value * CHAR_BIT - val_numbits) is stored in *nlz_bits_ret.
- * In this case, 0 <= *nlz_bits_ret < CHAR_BIT.
- *
+ * buf is an array of long integers.
+ * buf is ordered from least significant word to most significant word.
+ * buf[0] is the least significant word and
+ * buf[num_longs-1] is the most significant word.
+ * This means words in buf is little endian.
+ * However each word in buf is native endian.
+ * (buf[i]&1) is the least significant bit and
+ * (buf[i]&(1<<(SIZEOF_LONG*CHAR_BIT-1))) is the most significant bit
+ * for each 0 <= i < num_longs.
+ * So buf is little endian at whole on a little endian machine.
+ * But buf is mixed endian on a big endian machine.
+ *
+ * The buf represents negative integers as two's complement.
+ * So, the most significant bit of the most significant word,
+ * (buf[num_longs-1]>>(SIZEOF_LONG*CHAR_BIT-1)),
+ * is the sign bit: 1 means negative and 0 means zero or positive.
+ *
+ * If given size of buf (num_longs) is not enough to represent val,
+ * higier words (including a sign bit) are ignored.
*/
-size_t
-rb_absint_size(VALUE val, int *nlz_bits_ret)
+void
+rb_big_pack(VALUE val, unsigned long *buf, long num_longs)
{
- BDIGIT *dp;
- BDIGIT *de;
- BDIGIT fixbuf[bdigit_roomof(sizeof(long))];
-
- int num_leading_zeros;
-
val = rb_to_int(val);
-
+ if (num_longs == 0)
+ return;
if (FIXNUM_P(val)) {
- long v = FIX2LONG(val);
- if (v < 0) {
- v = -v;
- }
-#if SIZEOF_BDIGITS >= SIZEOF_LONG
- fixbuf[0] = v;
-#else
- {
- int i;
- for (i = 0; i < numberof(fixbuf); i++) {
- fixbuf[i] = BIGLO(v);
- v = BIGDN(v);
- }
- }
-#endif
- dp = fixbuf;
- de = fixbuf + numberof(fixbuf);
- }
- else {
- dp = BDIGITS(val);
- de = dp + RBIGNUM_LEN(val);
- }
- while (dp < de && de[-1] == 0)
- de--;
- if (dp == de) {
- if (nlz_bits_ret)
- *nlz_bits_ret = 0;
- return 0;
- }
- 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;
-}
-
-static size_t
-absint_numwords_small(size_t numbytes, int nlz_bits_in_msbyte, size_t word_numbits, size_t *nlz_bits_ret)
-{
- size_t val_numbits = numbytes * CHAR_BIT - nlz_bits_in_msbyte;
- size_t div = val_numbits / word_numbits;
- size_t mod = val_numbits % word_numbits;
- size_t numwords;
- size_t nlz_bits;
- numwords = mod == 0 ? div : div + 1;
- nlz_bits = mod == 0 ? 0 : word_numbits - mod;
- *nlz_bits_ret = nlz_bits;
- return numwords;
-}
-
-static size_t
-absint_numwords_generic(size_t numbytes, int nlz_bits_in_msbyte, size_t word_numbits, size_t *nlz_bits_ret)
-{
- 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 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)];
- BDIGIT one[1] = { 1 };
- size_t nlz_bits;
- size_t mod;
- int sign;
- size_t numwords;
-
- /*
- * val_numbits = numbytes * CHAR_BIT - nlz_bits_in_msbyte
- * div, mod = val_numbits.divmod(word_numbits)
- * numwords = mod == 0 ? div : div + 1
- * nlz_bits = mod == 0 ? 0 : word_numbits - mod
- */
-
- bary_unpack(BARY_ARGS(numbytes_bary), &numbytes, 1, sizeof(numbytes), 0,
- INTEGER_PACK_NATIVE_BYTE_ORDER);
- BARY_SHORT_MUL(val_numbits_bary, numbytes_bary, char_bit);
- if (nlz_bits_in_msbyte)
- BARY_SUB(val_numbits_bary, val_numbits_bary, nlz_bits_in_msbyte_bary);
- bary_unpack(BARY_ARGS(word_numbits_bary), &word_numbits, 1, sizeof(word_numbits), 0,
- INTEGER_PACK_NATIVE_BYTE_ORDER);
- BARY_DIVMOD(div_bary, mod_bary, val_numbits_bary, word_numbits_bary);
- if (BARY_ZERO_P(mod_bary)) {
- nlz_bits = 0;
+ long i;
+ long tmp = FIX2LONG(val);
+ buf[0] = (unsigned long)tmp;
+ tmp = tmp < 0 ? ~0L : 0;
+ for (i = 1; i < num_longs; i++)
+ buf[i] = (unsigned long)tmp;
+ return;
}
else {
- BARY_ADD(div_bary, div_bary, one);
- bary_pack(+1, BARY_ARGS(mod_bary), &mod, 1, sizeof(mod), 0,
- INTEGER_PACK_NATIVE_BYTE_ORDER);
- nlz_bits = word_numbits - mod;
- }
- sign = bary_pack(+1, BARY_ARGS(div_bary), &numwords, 1, sizeof(numwords), 0,
- INTEGER_PACK_NATIVE_BYTE_ORDER);
-
- if (sign == 2) {
-#if defined __GNUC__ && (__GNUC__ == 4 && __GNUC_MINOR__ == 4)
- *nlz_bits_ret = 0;
-#endif
- return (size_t)-1;
- }
- *nlz_bits_ret = nlz_bits;
- return numwords;
-}
-
-/*
- * Calculate the number of words to be required to represent
- * the absolute value of the integer given as _val_.
- *
- * [val] an integer.
- * [word_numbits] number of bits in a word.
- * [nlz_bits_ret] number of leading zero bits in the most significant word is returned if not NULL.
- *
- * This function returns ((val_numbits * CHAR_BIT + word_numbits - 1) / word_numbits)
- * where val_numbits is the number of bits of abs(val).
- *
- * This function can overflow.
- * When overflow occur, (size_t)-1 is returned.
- *
- * If nlz_bits_ret is not NULL and overflow is not occur,
- * (return_value * word_numbits - val_numbits) is stored in *nlz_bits_ret.
- * In this case, 0 <= *nlz_bits_ret < word_numbits.
- *
- */
-size_t
-rb_absint_numwords(VALUE val, size_t word_numbits, size_t *nlz_bits_ret)
-{
- size_t numbytes;
- int nlz_bits_in_msbyte;
- size_t numwords;
- size_t nlz_bits;
-
- if (word_numbits == 0)
- return (size_t)-1;
-
- numbytes = rb_absint_size(val, &nlz_bits_in_msbyte);
-
- if (numbytes <= SIZE_MAX / CHAR_BIT) {
- numwords = absint_numwords_small(numbytes, nlz_bits_in_msbyte, word_numbits, &nlz_bits);
-#ifdef DEBUG_INTEGER_PACK
- {
- size_t numwords0, nlz_bits0;
- numwords0 = absint_numwords_generic(numbytes, nlz_bits_in_msbyte, word_numbits, &nlz_bits0);
- assert(numwords0 == numwords);
- assert(nlz_bits0 == nlz_bits);
+ long len = RBIGNUM_LEN(val);
+ BDIGIT *ds = BDIGITS(val), *dend = ds + len;
+ long i, j;
+ for (i = 0; i < num_longs && ds < dend; i++) {
+ unsigned long l = 0;
+ for (j = 0; j < DIGSPERLONG && ds < dend; j++, ds++) {
+ l |= ((unsigned long)*ds << (j * BITSPERDIG));
+ }
+ buf[i] = l;
+ }
+ for (; i < num_longs; i++)
+ buf[i] = 0;
+ if (RBIGNUM_NEGATIVE_P(val)) {
+ for (i = 0; i < num_longs; i++) {
+ buf[i] = ~buf[i];
+ }
+ for (i = 0; i < num_longs; i++) {
+ buf[i]++;
+ if (buf[i] != 0)
+ return;
+ }
}
-#endif
- }
- else {
- numwords = absint_numwords_generic(numbytes, nlz_bits_in_msbyte, word_numbits, &nlz_bits);
}
- if (numwords == (size_t)-1)
- return numwords;
-
- if (nlz_bits_ret)
- *nlz_bits_ret = nlz_bits;
-
- return numwords;
}
-/* Test abs(val) consists only a bit or not.
- *
- * Returns 1 if abs(val) == 1 << n for some n >= 0.
- * Returns 0 otherwise.
- *
- * rb_absint_singlebit_p can be used to determine required buffer size
- * for rb_integer_pack used with INTEGER_PACK_2COMP (two's complement).
- *
- * Following example calculates number of bits required to
- * 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);
- * size = rb_absint_numwords(val, 1, NULL)
- * if (size == (size_t)-1) ...overflow...
- * if (neg && rb_absint_singlebit_p(val))
- * size--;
- *
- * Following example calculates number of bytes required to
- * 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 nlz_bits;
- * size = rb_absint_size(val, &nlz_bits);
- * if (nlz_bits == 0 && !(neg && rb_absint_singlebit_p(val)))
- * size++;
- */
-int
-rb_absint_singlebit_p(VALUE val)
+/* See rb_big_pack comment for endianness and sign of buf. */
+VALUE
+rb_big_unpack(unsigned long *buf, long num_longs)
{
- BDIGIT *dp;
- BDIGIT *de;
- BDIGIT fixbuf[bdigit_roomof(sizeof(long))];
- BDIGIT d;
-
- val = rb_to_int(val);
-
- if (FIXNUM_P(val)) {
- long v = FIX2LONG(val);
- if (v < 0) {
- v = -v;
- }
-#if SIZEOF_BDIGITS >= SIZEOF_LONG
- fixbuf[0] = v;
+ while (2 <= num_longs) {
+ if (buf[num_longs-1] == 0 && (long)buf[num_longs-2] >= 0)
+ num_longs--;
+ else if (buf[num_longs-1] == ~0UL && (long)buf[num_longs-2] < 0)
+ num_longs--;
+ else
+ break;
+ }
+ if (num_longs == 0)
+ return INT2FIX(0);
+ else if (num_longs == 1)
+ return LONG2NUM((long)buf[0]);
+ else {
+ VALUE big;
+ BDIGIT *ds;
+ long len = num_longs * DIGSPERLONG;
+ long i;
+ big = bignew(len, 1);
+ ds = BDIGITS(big);
+ for (i = 0; i < num_longs; i++) {
+ unsigned long d = buf[i];
+#if SIZEOF_LONG == SIZEOF_BDIGITS
+ *ds++ = d;
#else
- {
- int i;
- for (i = 0; i < numberof(fixbuf); i++) {
- fixbuf[i] = BIGLO(v);
- v = BIGDN(v);
+ int j;
+ for (j = 0; j < DIGSPERLONG; j++) {
+ *ds++ = BIGLO(d);
+ d = BIGDN(d);
}
- }
#endif
- dp = fixbuf;
- de = fixbuf + numberof(fixbuf);
+ }
+ if ((long)buf[num_longs-1] < 0) {
+ get2comp(big);
+ RBIGNUM_SET_SIGN(big, 0);
+ }
+ return bignorm(big);
}
- else {
- dp = BDIGITS(val);
- de = dp + RBIGNUM_LEN(val);
- }
- while (dp < de && de[-1] == 0)
- de--;
- while (dp < de && dp[0] == 0)
- dp++;
- if (dp == de) /* no bit set. */
- return 0;
- if (dp != de-1) /* two non-zero words. two bits set, at least. */
- return 0;
- d = *dp;
- return POW2_P(d);
}
+#define QUAD_SIZE 8
-/*
- * Export an integer into a buffer.
- *
- * This function fills the buffer specified by _words_ and _numwords_ as
- * val in the format specified by _wordsize_, _nails_ and _flags_.
- *
- * [val] Fixnum, Bignum or another integer like object which has to_int method.
- * [words] buffer to export abs(val).
- * [numwords] the size of given buffer as number of words.
- * [wordsize] the size of word as number of bytes.
- * [nails] number of padding bits in a word.
- * Most significant nails bits of each word are filled by zero.
- * [flags] bitwise or of constants which name starts "INTEGER_PACK_".
- *
- * flags:
- * [INTEGER_PACK_MSWORD_FIRST] Store the most significant word as the first word.
- * [INTEGER_PACK_LSWORD_FIRST] Store the least significant word as the first word.
- * [INTEGER_PACK_MSBYTE_FIRST] Store the most significant byte in a word as the first byte in the word.
- * [INTEGER_PACK_LSBYTE_FIRST] Store the least significant byte in a word as the first byte in the word.
- * [INTEGER_PACK_NATIVE_BYTE_ORDER] INTEGER_PACK_MSBYTE_FIRST or INTEGER_PACK_LSBYTE_FIRST corresponding to the host's endian.
- * [INTEGER_PACK_2COMP] Use 2's complement representation.
- * [INTEGER_PACK_LITTLE_ENDIAN] Same as INTEGER_PACK_LSWORD_FIRST|INTEGER_PACK_LSBYTE_FIRST
- * [INTEGER_PACK_BIG_ENDIAN] Same as INTEGER_PACK_MSWORD_FIRST|INTEGER_PACK_MSBYTE_FIRST
- * [INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION] Use generic implementation (for test and debug).
- *
- * This function fills the buffer specified by _words_
- * as abs(val) if INTEGER_PACK_2COMP is not specified in _flags_.
- * If INTEGER_PACK_2COMP is specified, 2's complement representation of val is
- * filled in the buffer.
- *
- * This function returns the signedness and overflow condition.
- * The overflow condition depends on INTEGER_PACK_2COMP.
- *
- * INTEGER_PACK_2COMP is not specified:
- * -2 : negative overflow. val <= -2**(numwords*(wordsize*CHAR_BIT-nails))
- * -1 : negative without overflow. -2**(numwords*(wordsize*CHAR_BIT-nails)) < val < 0
- * 0 : zero. val == 0
- * 1 : positive without overflow. 0 < val < 2**(numwords*(wordsize*CHAR_BIT-nails))
- * 2 : positive overflow. 2**(numwords*(wordsize*CHAR_BIT-nails)) <= val
- *
- * INTEGER_PACK_2COMP is specified:
- * -2 : negative overflow. val < -2**(numwords*(wordsize*CHAR_BIT-nails))
- * -1 : negative without overflow. -2**(numwords*(wordsize*CHAR_BIT-nails)) <= val < 0
- * 0 : zero. val == 0
- * 1 : positive without overflow. 0 < val < 2**(numwords*(wordsize*CHAR_BIT-nails))
- * 2 : positive overflow. 2**(numwords*(wordsize*CHAR_BIT-nails)) <= val
- *
- * The value, -2**(numwords*(wordsize*CHAR_BIT-nails)), is representable
- * in 2's complement representation but not representable in absolute value.
- * So -1 is returned for the value if INTEGER_PACK_2COMP is specified
- * but returns -2 if INTEGER_PACK_2COMP is not specified.
- *
- * The least significant words are filled in the buffer when overflow occur.
- */
+#if SIZEOF_LONG_LONG == QUAD_SIZE && SIZEOF_BDIGITS*2 == SIZEOF_LONG_LONG
-int
-rb_integer_pack(VALUE val, void *words, size_t numwords, size_t wordsize, size_t nails, int flags)
+void
+rb_quad_pack(char *buf, VALUE val)
{
- int sign;
- BDIGIT *ds;
- size_t num_bdigits;
- BDIGIT fixbuf[bdigit_roomof(sizeof(long))];
-
- RB_GC_GUARD(val) = rb_to_int(val);
+ LONG_LONG q;
+ val = rb_to_int(val);
if (FIXNUM_P(val)) {
- long v = FIX2LONG(val);
- if (v < 0) {
- sign = -1;
- v = -v;
- }
- else {
- sign = 1;
- }
-#if SIZEOF_BDIGITS >= SIZEOF_LONG
- fixbuf[0] = v;
-#else
- {
- int i;
- for (i = 0; i < numberof(fixbuf); i++) {
- fixbuf[i] = BIGLO(v);
- v = BIGDN(v);
- }
- }
-#endif
- ds = fixbuf;
- num_bdigits = numberof(fixbuf);
+ q = FIX2LONG(val);
}
else {
- sign = RBIGNUM_POSITIVE_P(val) ? 1 : -1;
- ds = BDIGITS(val);
- num_bdigits = RBIGNUM_LEN(val);
- }
+ long len = RBIGNUM_LEN(val);
+ BDIGIT *ds;
- return bary_pack(sign, ds, num_bdigits, words, numwords, wordsize, nails, flags);
+ if (len > SIZEOF_LONG_LONG/SIZEOF_BDIGITS) {
+ len = SIZEOF_LONG_LONG/SIZEOF_BDIGITS;
+ }
+ ds = BDIGITS(val);
+ q = 0;
+ while (len--) {
+ q = BIGUP(q);
+ q += ds[len];
+ }
+ if (!RBIGNUM_SIGN(val)) q = -q;
+ }
+ memcpy(buf, (char*)&q, SIZEOF_LONG_LONG);
}
-/*
- * Import an integer into a buffer.
- *
- * [words] buffer to import.
- * [numwords] the size of given buffer as number of words.
- * [wordsize] the size of word as number of bytes.
- * [nails] number of padding bits in a word.
- * Most significant nails bits of each word are ignored.
- * [flags] bitwise or of constants which name starts "INTEGER_PACK_".
- *
- * flags:
- * [INTEGER_PACK_MSWORD_FIRST] Interpret the first word as the most significant word.
- * [INTEGER_PACK_LSWORD_FIRST] Interpret the first word as the least significant word.
- * [INTEGER_PACK_MSBYTE_FIRST] Interpret the first byte in a word as the most significant byte in the word.
- * [INTEGER_PACK_LSBYTE_FIRST] Interpret the first byte in a word as the least significant byte in the word.
- * [INTEGER_PACK_NATIVE_BYTE_ORDER] INTEGER_PACK_MSBYTE_FIRST or INTEGER_PACK_LSBYTE_FIRST corresponding to the host's endian.
- * [INTEGER_PACK_2COMP] Use 2's complement representation.
- * [INTEGER_PACK_LITTLE_ENDIAN] Same as INTEGER_PACK_LSWORD_FIRST|INTEGER_PACK_LSBYTE_FIRST
- * [INTEGER_PACK_BIG_ENDIAN] Same as INTEGER_PACK_MSWORD_FIRST|INTEGER_PACK_MSBYTE_FIRST
- * [INTEGER_PACK_FORCE_BIGNUM] the result will be a Bignum
- * even if it is representable as a Fixnum.
- * [INTEGER_PACK_NEGATIVE] Returns non-positive value.
- * (Returns non-negative value if not specified.)
- * [INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION] Use generic implementation (for test and debug).
- *
- * This function returns the imported integer as Fixnum or Bignum.
- *
- * The range of the result value depends on INTEGER_PACK_2COMP and INTEGER_PACK_NEGATIVE.
- *
- * INTEGER_PACK_2COMP is not set:
- * 0 <= val < 2**(numwords*(wordsize*CHAR_BIT-nails)) if !INTEGER_PACK_NEGATIVE
- * -2**(numwords*(wordsize*CHAR_BIT-nails)) < val <= 0 if INTEGER_PACK_NEGATIVE
- *
- * INTEGER_PACK_2COMP is set:
- * -2**(numwords*(wordsize*CHAR_BIT-nails)-1) <= val <= 2**(numwords*(wordsize*CHAR_BIT-nails)-1)-1 if !INTEGER_PACK_NEGATIVE
- * -2**(numwords*(wordsize*CHAR_BIT-nails)) <= val <= -1 if INTEGER_PACK_NEGATIVE
- *
- * INTEGER_PACK_2COMP without INTEGER_PACK_NEGATIVE means sign extension.
- * INTEGER_PACK_2COMP with INTEGER_PACK_NEGATIVE mean assuming the higher bits are 1.
- *
- * Note that this function returns 0 when numwords is zero and
- * INTEGER_PACK_2COMP is set but INTEGER_PACK_NEGATIVE is not set.
- */
-
VALUE
-rb_integer_unpack(const void *words, size_t numwords, size_t wordsize, size_t nails, int flags)
+rb_quad_unpack(const char *buf, int sign)
{
- VALUE val;
- size_t num_bdigits;
- int sign;
- int nlp_bits;
- BDIGIT *ds;
- BDIGIT fixbuf[2] = { 0, 0 };
-
- validate_integer_pack_format(numwords, wordsize, nails, flags,
- INTEGER_PACK_MSWORD_FIRST|
- INTEGER_PACK_LSWORD_FIRST|
- INTEGER_PACK_MSBYTE_FIRST|
- INTEGER_PACK_LSBYTE_FIRST|
- INTEGER_PACK_NATIVE_BYTE_ORDER|
- INTEGER_PACK_2COMP|
- INTEGER_PACK_FORCE_BIGNUM|
- INTEGER_PACK_NEGATIVE|
- INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION);
-
- num_bdigits = integer_unpack_num_bdigits(numwords, wordsize, nails, &nlp_bits);
-
- if (LONG_MAX-1 < num_bdigits)
- rb_raise(rb_eArgError, "too big to unpack as an integer");
- if (num_bdigits <= numberof(fixbuf) && !(flags & INTEGER_PACK_FORCE_BIGNUM)) {
- val = Qfalse;
- ds = fixbuf;
+ unsigned LONG_LONG q;
+ long neg = 0;
+ long i;
+ BDIGIT *digits;
+ VALUE big;
+
+ memcpy(&q, buf, SIZEOF_LONG_LONG);
+ if (sign) {
+ if (FIXABLE((LONG_LONG)q)) return LONG2FIX((LONG_LONG)q);
+ if ((LONG_LONG)q < 0) {
+ q = -(LONG_LONG)q;
+ neg = 1;
+ }
}
else {
- val = bignew((long)num_bdigits, 0);
- ds = BDIGITS(val);
- }
- sign = bary_unpack_internal(ds, num_bdigits, words, numwords, wordsize, nails, flags, nlp_bits);
-
- if (sign == -2) {
- if (val) {
- big_extend_carry(val);
- }
- else if (num_bdigits == numberof(fixbuf)) {
- val = bignew((long)num_bdigits+1, 0);
- MEMCPY(BDIGITS(val), fixbuf, BDIGIT, num_bdigits);
- BDIGITS(val)[num_bdigits++] = 1;
- }
- else {
- ds[num_bdigits++] = 1;
- }
+ if (POSFIXABLE(q)) return LONG2FIX(q);
}
- if (!val) {
- BDIGIT_DBL u = fixbuf[0] + BIGUP(fixbuf[1]);
- if (u == 0)
- return LONG2FIX(0);
- if (0 < sign && POSFIXABLE(u))
- return LONG2FIX(u);
- if (sign < 0 && BDIGIT_MSB(fixbuf[1]) == 0 &&
- NEGFIXABLE(-(BDIGIT_DBL_SIGNED)u))
- return LONG2FIX(-(BDIGIT_DBL_SIGNED)u);
- val = bignew((long)num_bdigits, 0 <= sign);
- MEMCPY(BDIGITS(val), fixbuf, BDIGIT, num_bdigits);
+ i = 0;
+ big = bignew(DIGSPERLL, 1);
+ digits = BDIGITS(big);
+ while (i < DIGSPERLL) {
+ digits[i++] = BIGLO(q);
+ q = BIGDN(q);
}
- if ((flags & INTEGER_PACK_FORCE_BIGNUM) && sign != 0 &&
- bary_zero_p(BDIGITS(val), RBIGNUM_LEN(val)))
- sign = 0;
- RBIGNUM_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);
-}
+ i = DIGSPERLL;
+ while (i-- && !digits[i]) ;
+ RBIGNUM_SET_LEN(big, i+1);
-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));
+ if (neg) {
+ RBIGNUM_SET_SIGN(big, 0);
+ }
+ return bignorm(big);
}
-#define conv_digit(c) (ruby_digit36_to_number_table[(unsigned char)(c)])
+#else
-static void
-str2big_scan_digits(const char *s, const char *str, int base, int badcheck, size_t *num_digits_p, size_t *len_p)
+static int
+quad_buf_complement(char *buf, size_t len)
{
- char nondigit = 0;
- size_t num_digits = 0;
- const char *digits_start = str;
- const char *digits_end = str;
-
- int c;
-
- if (badcheck && *str == '_') goto bad;
-
- while ((c = *str++) != 0) {
- if (c == '_') {
- if (nondigit) {
- if (badcheck) goto bad;
- break;
- }
- nondigit = (char) c;
- continue;
- }
- else if ((c = conv_digit(c)) < 0) {
- break;
- }
- if (c >= base) break;
- nondigit = 0;
- num_digits++;
- digits_end = str;
- }
- if (badcheck) {
- str--;
- if (s+1 < str && str[-1] == '_') goto bad;
- while (*str && ISSPACE(*str)) str++;
- if (*str) {
- bad:
- rb_invalid_str(s, "Integer()");
- }
+ size_t i;
+ for (i = 0; i < len; i++)
+ buf[i] = ~buf[i];
+ for (i = 0; i < len; i++) {
+ buf[i]++;
+ if (buf[i] != 0)
+ return 0;
}
- *num_digits_p = num_digits;
- *len_p = digits_end - digits_start;
+ return 1;
}
-static VALUE
-str2big_poweroftwo(
- int sign,
- const char *digits_start,
- const char *digits_end,
- size_t num_digits,
- int bits_per_digit)
-{
- BDIGIT *dp;
- BDIGIT_DBL dd;
- int numbits;
-
- size_t num_bdigits;
- const char *p;
- int c;
- VALUE z;
+void
+rb_quad_pack(char *buf, VALUE val)
+{
+ long len;
- num_bdigits = (num_digits / BITSPERDIG) * bits_per_digit + roomof((num_digits % BITSPERDIG) * bits_per_digit, BITSPERDIG);
- z = bignew(num_bdigits, sign);
- dp = BDIGITS(z);
- dd = 0;
- numbits = 0;
- for (p = digits_end; digits_start < p; p--) {
- if ((c = conv_digit(p[-1])) < 0)
- continue;
- dd |= (BDIGIT_DBL)c << numbits;
- numbits += bits_per_digit;
- if (BITSPERDIG <= numbits) {
- *dp++ = BIGLO(dd);
- dd = BIGDN(dd);
- numbits -= BITSPERDIG;
- }
+ memset(buf, 0, QUAD_SIZE);
+ val = rb_to_int(val);
+ if (FIXNUM_P(val)) {
+ val = rb_int2big(FIX2LONG(val));
}
- if (numbits) {
- *dp++ = BIGLO(dd);
+ len = RBIGNUM_LEN(val) * SIZEOF_BDIGITS;
+ if (len > QUAD_SIZE) {
+ len = QUAD_SIZE;
}
- assert((size_t)(dp - BDIGITS(z)) == num_bdigits);
-
- return z;
-}
-
-static VALUE
-str2big_normal(
- int sign,
- const char *digits_start,
- const char *digits_end,
- size_t num_bdigits,
- int base)
-{
- size_t blen = 1;
- BDIGIT *zds;
- BDIGIT_DBL num;
-
- size_t i;
- const char *p;
- int c;
- VALUE z;
-
- z = bignew(num_bdigits, sign);
- zds = BDIGITS(z);
- BDIGITS_ZERO(zds, num_bdigits);
-
- for (p = digits_start; p < digits_end; p++) {
- if ((c = conv_digit(*p)) < 0)
- continue;
- num = c;
- i = 0;
- for (;;) {
- while (i<blen) {
- num += (BDIGIT_DBL)zds[i]*base;
- zds[i++] = BIGLO(num);
- num = BIGDN(num);
- }
- if (num) {
- blen++;
- continue;
- }
- break;
- }
- assert(blen <= num_bdigits);
+ memcpy(buf, (char*)BDIGITS(val), len);
+ if (RBIGNUM_NEGATIVE_P(val)) {
+ quad_buf_complement(buf, QUAD_SIZE);
}
-
- return z;
}
-static VALUE
-str2big_karatsuba(
- int sign,
- const char *digits_start,
- const char *digits_end,
- size_t num_digits,
- size_t num_bdigits,
- int digits_per_bdigits_dbl,
- int base)
-{
- VALUE powerv;
- size_t unit;
- VALUE tmpuv = 0;
- BDIGIT *uds, *vds, *tds;
- BDIGIT_DBL dd;
- BDIGIT_DBL current_base;
- int m;
- int power_level = 0;
+#define BNEG(b) (RSHIFT(((BDIGIT*)(b))[QUAD_SIZE/SIZEOF_BDIGITS-1],BITSPERDIG-1) != 0)
- size_t i;
- const char *p;
- int c;
- VALUE z;
-
- uds = ALLOCV_N(BDIGIT, tmpuv, 2*num_bdigits);
- vds = uds + num_bdigits;
+VALUE
+rb_quad_unpack(const char *buf, int sign)
+{
+ VALUE big = bignew(QUAD_SIZE/SIZEOF_BDIGITS, 1);
- powerv = power_cache_get_power(base, power_level, NULL);
+ memcpy((char*)BDIGITS(big), buf, QUAD_SIZE);
+ if (sign && BNEG(buf)) {
+ char *tmp = (char*)BDIGITS(big);
- i = 0;
- dd = 0;
- current_base = 1;
- m = digits_per_bdigits_dbl;
- if (num_digits < (size_t)m)
- m = (int)num_digits;
- for (p = digits_end; digits_start < p; p--) {
- if ((c = conv_digit(p[-1])) < 0)
- continue;
- dd = dd + c * current_base;
- current_base *= base;
- num_digits--;
- m--;
- if (m == 0) {
- uds[i++] = BIGLO(dd);
- uds[i++] = (BDIGIT)BIGDN(dd);
- dd = 0;
- m = digits_per_bdigits_dbl;
- if (num_digits < (size_t)m)
- m = (int)num_digits;
- current_base = 1;
- }
- }
- assert(i == num_bdigits);
- 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_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_add(vds+i, num_bdigits-i, vds+i, num_bdigits-i, uds+i, unit);
- }
- else {
- MEMCPY(vds+i, uds+i, BDIGIT, num_bdigits-i);
- }
- }
- power_level++;
- powerv = power_cache_get_power(base, power_level, NULL);
- tds = vds;
- vds = uds;
- uds = tds;
+ RBIGNUM_SET_SIGN(big, 0);
+ quad_buf_complement(tmp, QUAD_SIZE);
}
- BARY_TRUNC(uds, num_bdigits);
- z = bignew(num_bdigits, sign);
- MEMCPY(BDIGITS(z), uds, BDIGIT, num_bdigits);
- if (tmpuv)
- ALLOCV_END(tmpuv);
-
- return z;
+ return bignorm(big);
}
-#ifdef USE_GMP
-static VALUE
-str2big_gmp(
- int sign,
- const char *digits_start,
- const char *digits_end,
- size_t num_digits,
- size_t num_bdigits,
- int base)
-{
- const size_t nails = (sizeof(BDIGIT)-SIZEOF_BDIGITS)*CHAR_BIT;
- char *buf, *p;
- const char *q;
- VALUE tmps;
- mpz_t mz;
- VALUE z;
- BDIGIT *zds;
- size_t zn, count;
-
- buf = ALLOCV_N(char, tmps, num_digits+1);
- p = buf;
- for (q = digits_start; q < digits_end; q++) {
- if (conv_digit(*q) < 0)
- continue;
- *p++ = *q;
- }
- *p = '\0';
-
- mpz_init(mz);
- mpz_set_str(mz, buf, base);
- zn = num_bdigits;
- z = bignew(zn, sign);
- zds = BDIGITS(z);
- mpz_export(BDIGITS(z), &count, -1, sizeof(BDIGIT), 0, nails, mz);
- BDIGITS_ZERO(zds+count, zn-count);
- mpz_clear(mz);
-
- if (tmps)
- ALLOCV_END(tmps);
-
- return z;
-}
#endif
VALUE
rb_cstr_to_inum(const char *str, int base, int badcheck)
{
const char *s = str;
- char sign = 1;
+ char *end;
+ char sign = 1, nondigit = 0;
int c;
+ BDIGIT_DBL num;
+ long len, blen = 1;
+ long i;
VALUE z;
+ BDIGIT *zds;
- int bits_per_digit;
-
- const char *digits_start, *digits_end;
- size_t num_digits;
- size_t num_bdigits;
- size_t len;
+#undef ISDIGIT
+#define ISDIGIT(c) ('0' <= (c) && (c) <= '9')
+#define conv_digit(c) \
+ (!ISASCII(c) ? -1 : \
+ ISDIGIT(c) ? ((c) - '0') : \
+ ISLOWER(c) ? ((c) - 'a' + 10) : \
+ ISUPPER(c) ? ((c) - 'A' + 10) : \
+ -1)
if (!str) {
- if (badcheck) {
- bad:
- rb_invalid_str(s, "Integer()");
- }
+ if (badcheck) goto bad;
return INT2FIX(0);
}
while (ISSPACE(*str)) str++;
@@ -4000,19 +615,15 @@ rb_cstr_to_inum(const char *str, int base, int badcheck)
switch (str[1]) {
case 'x': case 'X':
base = 16;
- str += 2;
break;
case 'b': case 'B':
base = 2;
- str += 2;
break;
case 'o': case 'O':
base = 8;
- str += 2;
break;
case 'd': case 'D':
base = 10;
- str += 2;
break;
default:
base = 8;
@@ -4025,28 +636,47 @@ rb_cstr_to_inum(const char *str, int base, int badcheck)
base = 10;
}
}
- else if (base == 2) {
+ switch (base) {
+ case 2:
+ len = 1;
if (str[0] == '0' && (str[1] == 'b'||str[1] == 'B')) {
str += 2;
}
- }
- else if (base == 8) {
+ break;
+ case 3:
+ len = 2;
+ break;
+ case 8:
if (str[0] == '0' && (str[1] == 'o'||str[1] == 'O')) {
str += 2;
}
- }
- else if (base == 10) {
+ case 4: case 5: case 6: case 7:
+ len = 3;
+ break;
+ case 10:
if (str[0] == '0' && (str[1] == 'd'||str[1] == 'D')) {
str += 2;
}
- }
- else if (base == 16) {
+ case 9: case 11: case 12: case 13: case 14: case 15:
+ len = 4;
+ break;
+ case 16:
+ len = 4;
if (str[0] == '0' && (str[1] == 'x'||str[1] == 'X')) {
str += 2;
}
- }
- if (base < 2 || 36 < base) {
- rb_raise(rb_eArgError, "invalid radix %d", base);
+ break;
+ default:
+ if (base < 2 || 36 < base) {
+ rb_raise(rb_eArgError, "invalid radix %d", base);
+ }
+ if (base <= 32) {
+ len = 5;
+ }
+ else {
+ len = 6;
+ }
+ break;
}
if (*str == '0') { /* squeeze preceding 0s */
int us = 0;
@@ -4065,10 +695,9 @@ rb_cstr_to_inum(const char *str, int base, int badcheck)
if (badcheck) goto bad;
return INT2FIX(0);
}
+ len *= strlen(str)*sizeof(char);
- bits_per_digit = bit_length(base-1);
- if (bits_per_digit * strlen(str) <= sizeof(long) * CHAR_BIT) {
- char *end;
+ if ((size_t)len <= (sizeof(long)*CHAR_BIT)) {
unsigned long val = STRTOUL(str, &end, base);
if (str < end && *end == '_') goto bigparse;
@@ -4091,36 +720,50 @@ rb_cstr_to_inum(const char *str, int base, int badcheck)
return bignorm(big);
}
}
-
bigparse:
- digits_start = str;
- str2big_scan_digits(s, str, base, badcheck, &num_digits, &len);
- digits_end = digits_start + len;
+ len = (len/BITSPERDIG)+1;
+ if (badcheck && *str == '_') goto bad;
- if (POW2_P(base)) {
- z = str2big_poweroftwo(sign, digits_start, digits_end, num_digits,
- bits_per_digit);
+ z = bignew(len, sign);
+ zds = BDIGITS(z);
+ for (i=len;i--;) zds[i]=0;
+ while ((c = *str++) != 0) {
+ if (c == '_') {
+ if (nondigit) {
+ if (badcheck) goto bad;
+ break;
+ }
+ nondigit = (char) c;
+ continue;
+ }
+ else if ((c = conv_digit(c)) < 0) {
+ break;
+ }
+ if (c >= base) break;
+ nondigit = 0;
+ i = 0;
+ num = c;
+ for (;;) {
+ while (i<blen) {
+ num += (BDIGIT_DBL)zds[i]*base;
+ zds[i++] = BIGLO(num);
+ num = BIGDN(num);
+ }
+ if (num) {
+ blen++;
+ continue;
+ }
+ break;
+ }
}
- else {
- int digits_per_bdigits_dbl;
- maxpow_in_bdigit_dbl(base, &digits_per_bdigits_dbl);
- num_bdigits = roomof(num_digits, digits_per_bdigits_dbl)*2;
-
-#ifdef USE_GMP
- if (GMP_STR2BIG_DIGITS < num_bdigits) {
- z = str2big_gmp(sign, digits_start, digits_end, num_digits,
- num_bdigits, base);
- }
- else
-#endif
- if (num_bdigits < KARATSUBA_MUL_DIGITS) {
- z = str2big_normal(sign, digits_start, digits_end,
- num_bdigits, base);
- }
- else {
- z = str2big_karatsuba(sign, digits_start, digits_end, num_digits,
- num_bdigits, digits_per_bdigits_dbl, base);
- }
+ if (badcheck) {
+ str--;
+ if (s+1 < str && str[-1] == '_') goto bad;
+ while (*str && ISSPACE(*str)) str++;
+ if (*str) {
+ bad:
+ rb_invalid_str(s, "Integer()");
+ }
}
return bignorm(z);
@@ -4158,176 +801,24 @@ rb_str_to_inum(VALUE str, int base, int badcheck)
return ret;
}
-VALUE
-rb_str2big_poweroftwo(VALUE arg, int base, int badcheck)
-{
- int positive_p = 1;
- const char *s, *str;
- const char *digits_start, *digits_end;
- size_t num_digits;
- size_t len;
- VALUE z;
-
- if (base < 2 || 36 < base || !POW2_P(base)) {
- rb_raise(rb_eArgError, "invalid radix %d", base);
- }
-
- rb_must_asciicompat(arg);
- s = str = StringValueCStr(arg);
- if (*str == '-') {
- str++;
- positive_p = 0;
- }
-
- digits_start = str;
- str2big_scan_digits(s, str, base, badcheck, &num_digits, &len);
- digits_end = digits_start + len;
-
- z = str2big_poweroftwo(positive_p, digits_start, digits_end, num_digits,
- bit_length(base-1));
-
- RB_GC_GUARD(arg);
-
- return bignorm(z);
-}
-
-VALUE
-rb_str2big_normal(VALUE arg, int base, int badcheck)
-{
- int positive_p = 1;
- const char *s, *str;
- const char *digits_start, *digits_end;
- size_t num_digits;
- size_t len;
- VALUE z;
-
- int digits_per_bdigits_dbl;
- size_t num_bdigits;
-
- if (base < 2 || 36 < base) {
- rb_raise(rb_eArgError, "invalid radix %d", base);
- }
-
- rb_must_asciicompat(arg);
- s = str = StringValueCStr(arg);
- if (*str == '-') {
- str++;
- positive_p = 0;
- }
-
- digits_start = str;
- str2big_scan_digits(s, str, base, badcheck, &num_digits, &len);
- digits_end = digits_start + len;
-
- maxpow_in_bdigit_dbl(base, &digits_per_bdigits_dbl);
- num_bdigits = roomof(num_digits, digits_per_bdigits_dbl)*2;
-
- z = str2big_normal(positive_p, digits_start, digits_end,
- num_bdigits, base);
-
- RB_GC_GUARD(arg);
-
- return bignorm(z);
-}
-
-VALUE
-rb_str2big_karatsuba(VALUE arg, int base, int badcheck)
-{
- int positive_p = 1;
- const char *s, *str;
- const char *digits_start, *digits_end;
- size_t num_digits;
- size_t len;
- VALUE z;
-
- int digits_per_bdigits_dbl;
- size_t num_bdigits;
-
- if (base < 2 || 36 < base) {
- rb_raise(rb_eArgError, "invalid radix %d", base);
- }
-
- rb_must_asciicompat(arg);
- s = str = StringValueCStr(arg);
- if (*str == '-') {
- str++;
- positive_p = 0;
- }
-
- digits_start = str;
- str2big_scan_digits(s, str, base, badcheck, &num_digits, &len);
- digits_end = digits_start + len;
-
- maxpow_in_bdigit_dbl(base, &digits_per_bdigits_dbl);
- num_bdigits = roomof(num_digits, digits_per_bdigits_dbl)*2;
-
- z = str2big_karatsuba(positive_p, digits_start, digits_end, num_digits,
- num_bdigits, digits_per_bdigits_dbl, base);
-
- RB_GC_GUARD(arg);
-
- return bignorm(z);
-}
-
-#ifdef USE_GMP
-VALUE
-rb_str2big_gmp(VALUE arg, int base, int badcheck)
-{
- int positive_p = 1;
- const char *s, *str;
- const char *digits_start, *digits_end;
- size_t num_digits;
- size_t len;
- VALUE z;
-
- int digits_per_bdigits_dbl;
- size_t num_bdigits;
-
- if (base < 2 || 36 < base) {
- rb_raise(rb_eArgError, "invalid radix %d", base);
- }
-
- rb_must_asciicompat(arg);
- s = str = StringValueCStr(arg);
- if (*str == '-') {
- str++;
- positive_p = 0;
- }
-
- digits_start = str;
- str2big_scan_digits(s, str, base, badcheck, &num_digits, &len);
- digits_end = digits_start + len;
-
- maxpow_in_bdigit_dbl(base, &digits_per_bdigits_dbl);
- num_bdigits = roomof(num_digits, digits_per_bdigits_dbl)*2;
-
- z = str2big_gmp(positive_p, digits_start, digits_end, num_digits, num_bdigits, base);
-
- RB_GC_GUARD(arg);
-
- return bignorm(z);
-}
-#endif
-
#if HAVE_LONG_LONG
static VALUE
rb_ull2big(unsigned LONG_LONG n)
{
- long i;
- VALUE big = bignew(bdigit_roomof(SIZEOF_LONG_LONG), 1);
- BDIGIT *digits = BDIGITS(big);
+ BDIGIT_DBL num = n;
+ long i = 0;
+ BDIGIT *digits;
+ VALUE big;
-#if SIZEOF_BDIGITS >= SIZEOF_LONG_LONG
- digits[0] = n;
-#else
- for (i = 0; i < bdigit_roomof(SIZEOF_LONG_LONG); i++) {
- digits[i] = BIGLO(n);
- n = BIGDN(n);
+ big = bignew(DIGSPERLL, 1);
+ digits = BDIGITS(big);
+ while (i < DIGSPERLL) {
+ digits[i++] = BIGLO(num);
+ num = BIGDN(num);
}
-#endif
- i = bdigit_roomof(SIZEOF_LONG_LONG);
+ i = DIGSPERLL;
while (i-- && !digits[i]) ;
RBIGNUM_SET_LEN(big, i+1);
return big;
@@ -4337,17 +828,13 @@ static VALUE
rb_ll2big(LONG_LONG n)
{
long neg = 0;
- unsigned LONG_LONG u;
VALUE big;
if (n < 0) {
- u = 1 + (unsigned LONG_LONG)(-(n + 1)); /* u = -n avoiding overflow */
+ n = -n;
neg = 1;
}
- else {
- u = n;
- }
- big = rb_ull2big(u);
+ big = rb_ull2big(n);
if (neg) {
RBIGNUM_SET_SIGN(big, 0);
}
@@ -4382,168 +869,128 @@ rb_str2inum(VALUE str, int base)
return rb_str_to_inum(str, base, base==0);
}
-static VALUE
-big_shift3(VALUE x, int lshift_p, size_t shift_numdigits, int shift_numbits)
-{
- BDIGIT *xds, *zds;
- long s1;
- int s2;
- VALUE z;
- long xn;
+const char ruby_digitmap[] = "0123456789abcdefghijklmnopqrstuvwxyz";
- if (lshift_p) {
- if (LONG_MAX < shift_numdigits) {
- rb_raise(rb_eArgError, "too big number");
- }
- s1 = shift_numdigits;
- s2 = shift_numbits;
- xn = RBIGNUM_LEN(x);
- z = bignew(xn+s1+1, RBIGNUM_SIGN(x));
- zds = BDIGITS(z);
- BDIGITS_ZERO(zds, s1);
- xds = BDIGITS(x);
- zds[xn+s1] = bary_small_lshift(zds+s1, xds, xn, s2);
- }
- 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)))
- return INT2FIX(0);
- else
- return INT2FIX(-1);
- }
- s1 = shift_numdigits;
- s2 = shift_numbits;
- hibitsx = abs2twocomp(&x, &xn);
- xds = BDIGITS(x);
- if (xn <= s1) {
- return hibitsx ? INT2FIX(-1) : INT2FIX(0);
- }
- zn = xn - s1;
- z = bignew(zn, 0);
- zds = BDIGITS(z);
- bary_small_rshift(zds, xds+s1, zn, s2, hibitsx != 0 ? BDIGMAX : 0);
- twocomp2abs_bang(z, hibitsx != 0);
- }
- RB_GC_GUARD(x);
- return z;
-}
+static VALUE bigsqr(VALUE x);
+static void bigdivmod(VALUE x, VALUE y, volatile VALUE *divp, volatile VALUE *modp);
-static VALUE
-big_shift2(VALUE x, int lshift_p, VALUE y)
-{
- int sign;
- size_t lens[2];
- size_t shift_numdigits;
- int shift_numbits;
+#define POW2_P(x) (((x)&((x)-1))==0)
- assert(POW2_P(CHAR_BIT));
- assert(POW2_P(BITSPERDIG));
+static inline int
+ones(register unsigned long x)
+{
+#if SIZEOF_LONG == 8
+# define MASK_55 0x5555555555555555UL
+# define MASK_33 0x3333333333333333UL
+# define MASK_0f 0x0f0f0f0f0f0f0f0fUL
+#else
+# define MASK_55 0x55555555UL
+# define MASK_33 0x33333333UL
+# define MASK_0f 0x0f0f0f0fUL
+#endif
+ x -= (x >> 1) & MASK_55;
+ x = ((x >> 2) & MASK_33) + (x & MASK_33);
+ x = ((x >> 4) + x) & MASK_0f;
+ x += (x >> 8);
+ x += (x >> 16);
+#if SIZEOF_LONG == 8
+ x += (x >> 32);
+#endif
+ return (int)(x & 0x7f);
+#undef MASK_0f
+#undef MASK_33
+#undef MASK_55
+}
- if (BIGZEROP(x))
- return INT2FIX(0);
- sign = rb_integer_pack(y, lens, numberof(lens), sizeof(size_t), 0,
- INTEGER_PACK_LSWORD_FIRST|INTEGER_PACK_NATIVE_BYTE_ORDER);
- if (sign < 0) {
- lshift_p = !lshift_p;
- sign = -sign;
- }
- if (lshift_p) {
- if (1 < sign || CHAR_BIT <= lens[1])
- rb_raise(rb_eRangeError, "shift width too big");
- }
- else {
- if (1 < sign || CHAR_BIT <= lens[1])
- return RBIGNUM_POSITIVE_P(x) ? INT2FIX(0) : INT2FIX(-1);
- }
- shift_numbits = (int)(lens[0] & (BITSPERDIG-1));
- shift_numdigits = (lens[0] >> bit_length(BITSPERDIG-1)) |
- (lens[1] << (CHAR_BIT*SIZEOF_SIZE_T - bit_length(BITSPERDIG-1)));
- return big_shift3(x, lshift_p, shift_numdigits, shift_numbits);
+static inline unsigned long
+next_pow2(register unsigned long x)
+{
+ x |= x >> 1;
+ x |= x >> 2;
+ x |= x >> 4;
+ x |= x >> 8;
+ x |= x >> 16;
+#if SIZEOF_LONG == 8
+ x |= x >> 32;
+#endif
+ return x + 1;
}
-static VALUE
-big_lshift(VALUE x, unsigned long shift)
+static inline int
+floor_log2(register unsigned long x)
{
- long s1 = shift/BITSPERDIG;
- int s2 = (int)(shift%BITSPERDIG);
- return big_shift3(x, 1, s1, s2);
+ x |= x >> 1;
+ x |= x >> 2;
+ x |= x >> 4;
+ x |= x >> 8;
+ x |= x >> 16;
+#if SIZEOF_LONG == 8
+ x |= x >> 32;
+#endif
+ return (int)ones(x) - 1;
}
-static VALUE
-big_rshift(VALUE x, unsigned long shift)
+static inline int
+ceil_log2(register unsigned long x)
{
- long s1 = shift/BITSPERDIG;
- int s2 = (int)(shift%BITSPERDIG);
- return big_shift3(x, 0, s1, s2);
+ return floor_log2(x) + !POW2_P(x);
}
-#define MAX_BASE36_POWER_TABLE_ENTRIES (SIZEOF_SIZE_T * CHAR_BIT + 1)
+#define LOG2_KARATSUBA_DIGITS 7
+#define KARATSUBA_DIGITS (1L<<LOG2_KARATSUBA_DIGITS)
+#define MAX_BIG2STR_TABLE_ENTRIES 64
-static VALUE base36_power_cache[35][MAX_BASE36_POWER_TABLE_ENTRIES];
-static size_t base36_numdigits_cache[35][MAX_BASE36_POWER_TABLE_ENTRIES];
+static VALUE big2str_power_cache[35][MAX_BIG2STR_TABLE_ENTRIES];
static void
power_cache_init(void)
{
int i, j;
for (i = 0; i < 35; ++i) {
- for (j = 0; j < MAX_BASE36_POWER_TABLE_ENTRIES; ++j) {
- base36_power_cache[i][j] = Qnil;
+ for (j = 0; j < MAX_BIG2STR_TABLE_ENTRIES; ++j) {
+ big2str_power_cache[i][j] = Qnil;
}
}
}
static inline VALUE
-power_cache_get_power(int base, int power_level, size_t *numdigits_ret)
+power_cache_get_power0(int base, int i)
{
- /*
- * MAX_BASE36_POWER_TABLE_ENTRIES is big enough to that
- * base36_power_cache[base][MAX_BASE36_POWER_TABLE_ENTRIES-1] fills whole memory.
- * So MAX_BASE36_POWER_TABLE_ENTRIES <= power_level is not possible to calculate.
- *
- * number-of-bytes =
- * log256(base36_power_cache[base][MAX_BASE36_POWER_TABLE_ENTRIES-1]) =
- * log256(maxpow_in_bdigit_dbl(base)**(2**(MAX_BASE36_POWER_TABLE_ENTRIES-1))) =
- * log256(maxpow_in_bdigit_dbl(base)**(2**(SIZEOF_SIZE_T*CHAR_BIT))) =
- * (2**(SIZEOF_SIZE_T*CHAR_BIT))*log256(maxpow_in_bdigit_dbl(base)) =
- * (256**SIZEOF_SIZE_T)*log256(maxpow_in_bdigit_dbl(base)) >
- * (256**SIZEOF_SIZE_T)*(sizeof(BDIGIT_DBL)-1) >
- * 256**SIZEOF_SIZE_T
- */
- if (MAX_BASE36_POWER_TABLE_ENTRIES <= power_level)
- rb_bug("too big power number requested: maxpow_in_bdigit_dbl(%d)**(2**%d)", base, power_level);
-
- if (NIL_P(base36_power_cache[base - 2][power_level])) {
- VALUE power;
- size_t numdigits;
- if (power_level == 0) {
- int numdigits0;
- BDIGIT_DBL dd = maxpow_in_bdigit_dbl(base, &numdigits0);
- power = bignew(2, 1);
- bdigitdbl2bary(BDIGITS(power), 2, dd);
- numdigits = numdigits0;
- }
- else {
- power = bigtrunc(bigsq(power_cache_get_power(base, power_level - 1, &numdigits)));
- numdigits *= 2;
- }
- rb_obj_hide(power);
- base36_power_cache[base - 2][power_level] = power;
- base36_numdigits_cache[base - 2][power_level] = numdigits;
- rb_gc_register_mark_object(power);
+ if (NIL_P(big2str_power_cache[base - 2][i])) {
+ big2str_power_cache[base - 2][i] =
+ i == 0 ? rb_big_pow(rb_int2big(base), INT2FIX(KARATSUBA_DIGITS))
+ : bigsqr(power_cache_get_power0(base, i - 1));
+ rb_gc_register_mark_object(big2str_power_cache[base - 2][i]);
}
- if (numdigits_ret)
- *numdigits_ret = base36_numdigits_cache[base - 2][power_level];
- return base36_power_cache[base - 2][power_level];
+ return big2str_power_cache[base - 2][i];
}
-/*
- * deprecated. (used only from deprecated rb_big2str0)
- *
- * big2str_muraken_find_n1
+static VALUE
+power_cache_get_power(int base, long n1, long* m1)
+{
+ int i, m;
+ long j;
+ VALUE t;
+
+ if (n1 <= KARATSUBA_DIGITS)
+ rb_bug("n1 > KARATSUBA_DIGITS");
+
+ m = ceil_log2(n1);
+ if (m1) *m1 = 1 << m;
+ i = m - LOG2_KARATSUBA_DIGITS;
+ if (i >= MAX_BIG2STR_TABLE_ENTRIES)
+ i = MAX_BIG2STR_TABLE_ENTRIES - 1;
+ t = power_cache_get_power0(base, i);
+
+ j = KARATSUBA_DIGITS*(1 << i);
+ while (n1 > j) {
+ t = bigsqr(t);
+ j *= 2;
+ }
+ return t;
+}
+
+/* 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},
@@ -4595,426 +1042,119 @@ big2str_find_n1(VALUE x, int base)
return (long)ceil(((double)bits)/log_2[base - 2]);
}
-struct big2str_struct {
- int negative;
- int base;
- BDIGIT_DBL hbase2;
- int hbase2_numdigits;
- VALUE result;
- char *ptr;
-};
-
-static void
-big2str_alloc(struct big2str_struct *b2s, size_t len)
-{
- if (LONG_MAX-1 < len)
- rb_raise(rb_eArgError, "too big number");
- b2s->result = rb_usascii_str_new(0, (long)(len + 1)); /* plus one for sign */
- b2s->ptr = RSTRING_PTR(b2s->result);
- if (b2s->negative)
- *b2s->ptr++ = '-';
-}
-
-static void
-big2str_2bdigits(struct big2str_struct *b2s, BDIGIT *xds, size_t xn, size_t taillen)
+static long
+big2str_orig(VALUE x, int base, char* ptr, long len, long hbase, int trim)
{
- size_t j;
- BDIGIT_DBL num;
- char buf[SIZEOF_BDIGIT_DBL*CHAR_BIT], *p;
- int beginning = !b2s->ptr;
- size_t len = 0;
-
- assert(xn <= 2);
- num = bary2bdigitdbl(xds, xn);
-
- if (beginning) {
- if (num == 0)
- return;
- p = buf;
- j = sizeof(buf);
- do {
- p[--j] = ruby_digitmap[num % b2s->base];
- num /= b2s->base;
- } while (num);
- len = sizeof(buf) - j;
- big2str_alloc(b2s, len + taillen);
- MEMCPY(b2s->ptr, buf + j, char, len);
- }
- else {
- p = b2s->ptr;
- j = b2s->hbase2_numdigits;
- do {
- p[--j] = ruby_digitmap[num % b2s->base];
- num /= b2s->base;
- } while (j);
- len = b2s->hbase2_numdigits;
- }
- b2s->ptr += len;
-}
+ long i = RBIGNUM_LEN(x), j = len;
+ BDIGIT* ds = BDIGITS(x);
-static void
-big2str_karatsuba(struct big2str_struct *b2s, BDIGIT *xds, size_t xn, size_t wn,
- int power_level, size_t taillen)
-{
- VALUE b;
- size_t half_numdigits, lower_numdigits;
- int lower_power_level;
- size_t bn;
- const BDIGIT *bds;
- size_t len;
+ while (i && j > 0) {
+ long k = i;
+ BDIGIT_DBL num = 0;
- /*
- * Precondition:
- * abs(x) < maxpow**(2**power_level)
- * where
- * maxpow = maxpow_in_bdigit_dbl(base, &numdigits)
- *
- * This function generates sequence of zeros, and then stringized abs(x) into b2s->ptr.
- *
- * b2s->ptr can be NULL.
- * It is allocated when the first character is generated via big2str_alloc.
- *
- * The prefix zeros should be generated if and only if b2s->ptr is not NULL.
- * When the zeros are generated, the zeros and abs(x) consists
- * numdigits*(2**power_level) characters at total.
- *
- * Note:
- * power_cache_get_power(base, power_level, &len) may not be cached yet. It should not be called.
- * power_cache_get_power(base, power_level-1, &len) should be cached already if 0 <= power_level-1.
- */
-
- if (xn == 0 || bary_zero_p(xds, xn)) {
- if (b2s->ptr) {
- /* When x is zero, power_cache_get_power(base, power_level) should be cached already. */
- power_cache_get_power(b2s->base, power_level, &len);
- memset(b2s->ptr, '0', len);
- b2s->ptr += len;
+ while (k--) { /* x / hbase */
+ num = BIGUP(num) + ds[k];
+ ds[k] = (BDIGIT)(num / hbase);
+ num %= hbase;
+ }
+ if (trim && ds[i-1] == 0) i--;
+ k = SIZEOF_BDIGITS;
+ while (k--) {
+ ptr[--j] = ruby_digitmap[num % base];
+ num /= base;
+ if (j <= 0) break;
+ if (trim && i == 0 && num == 0) break;
}
- return;
- }
-
- if (power_level == 0) {
- big2str_2bdigits(b2s, xds, xn, taillen);
- return;
- }
-
- lower_power_level = power_level-1;
- b = power_cache_get_power(b2s->base, lower_power_level, &lower_numdigits);
- bn = RBIGNUM_LEN(b);
- bds = BDIGITS(b);
-
- half_numdigits = lower_numdigits;
-
- while (0 < lower_power_level &&
- (xn < bn ||
- (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);
- bds = BDIGITS(b);
- }
-
- if (lower_power_level == 0 &&
- (xn < bn ||
- (xn == bn && bary_cmp(xds, xn, bds, bn) < 0))) {
- if (b2s->ptr) {
- len = half_numdigits * 2 - lower_numdigits;
- memset(b2s->ptr, '0', len);
- b2s->ptr += len;
- }
- big2str_2bdigits(b2s, xds, xn, taillen);
- }
- else {
- BDIGIT *qds, *rds;
- size_t qn, rn;
- BDIGIT *tds;
- int shift;
-
- if (lower_power_level != power_level-1 && b2s->ptr) {
- len = (half_numdigits - lower_numdigits) * 2;
- memset(b2s->ptr, '0', len);
- b2s->ptr += len;
- }
-
- shift = nlz(bds[bn-1]);
-
- qn = xn + BIGDIVREM_EXTRA_WORDS;
-
- if (shift == 0) {
- /* bigdivrem_restoring will not modify y.
- * So use bds directly. */
- tds = (BDIGIT *)bds;
- xds[xn] = 0;
- }
- else {
- /* bigdivrem_restoring will modify y.
- * So use temporary buffer. */
- tds = xds + qn;
- assert(qn + bn <= xn + wn);
- bary_small_lshift(tds, bds, bn, shift);
- xds[xn] = bary_small_lshift(xds, xds, xn, shift);
- }
-
- bigdivrem_restoring(xds, qn, tds, bn);
-
- rds = xds;
- rn = bn;
-
- qds = xds + bn;
- qn = qn - bn;
-
- if (shift) {
- bary_small_rshift(rds, rds, rn, shift, 0);
- }
-
- BARY_TRUNC(qds, qn);
- assert(qn <= bn);
- big2str_karatsuba(b2s, qds, qn, xn+wn - (rn+qn), lower_power_level, lower_numdigits+taillen);
- BARY_TRUNC(rds, rn);
- big2str_karatsuba(b2s, rds, rn, xn+wn - rn, lower_power_level, taillen);
- }
-}
-
-static VALUE
-big2str_base_poweroftwo(VALUE x, int base)
-{
- int word_numbits = ffs(base) - 1;
- size_t numwords;
- VALUE result;
- char *ptr;
- numwords = rb_absint_numwords(x, word_numbits, NULL);
- if (RBIGNUM_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) ? '+' : '-';
- }
- else {
- if (LONG_MAX < numwords)
- rb_raise(rb_eArgError, "too big number");
- result = rb_usascii_str_new(0, numwords);
- ptr = RSTRING_PTR(result);
}
- rb_integer_pack(x, ptr, numwords, 1, CHAR_BIT-word_numbits,
- INTEGER_PACK_BIG_ENDIAN);
- while (0 < numwords) {
- *ptr = ruby_digitmap[*(unsigned char *)ptr];
- ptr++;
- numwords--;
+ if (trim) {
+ while (j < len && ptr[j] == '0') j++;
+ MEMMOVE(ptr, ptr + j, char, len - j);
+ len -= j;
}
- return result;
+ return len;
}
-VALUE
-rb_big2str_poweroftwo(VALUE x, int base)
-{
- return big2str_base_poweroftwo(x, base);
-}
-
-static VALUE
-big2str_generic(VALUE x, int base)
+static long
+big2str_karatsuba(VALUE x, int base, char* ptr,
+ long n1, long len, long hbase, int trim)
{
- BDIGIT *xds;
- size_t xn;
- struct big2str_struct b2s_data;
- int power_level;
- VALUE power;
+ long lh, ll, m1;
+ VALUE b, q, r;
- xds = BDIGITS(x);
- xn = RBIGNUM_LEN(x);
- BARY_TRUNC(xds, xn);
-
- if (xn == 0) {
- return rb_usascii_str_new2("0");
- }
-
- if (base < 2 || 36 < base)
- rb_raise(rb_eArgError, "invalid radix %d", base);
-
- if (xn >= LONG_MAX/BITSPERDIG) {
- rb_raise(rb_eRangeError, "bignum too big to convert into `string'");
- }
-
- 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) {
- 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) {
- /*
- * This increment guarantees x < power_cache_get_power(base, power_level)
- * without invoking it actually.
- * (power_cache_get_power(base, power_level) can be slow and not used
- * in big2str_karatsuba.)
- *
- * Although it is possible that x < power_cache_get_power(base, power_level-1),
- * it is no problem because big2str_karatsuba checks it and
- * doesn't affect the result when b2s_data.ptr is NULL.
- */
- power_level++;
- }
-
- b2s_data.negative = RBIGNUM_NEGATIVE_P(x);
- b2s_data.base = base;
- b2s_data.hbase2 = maxpow_in_bdigit_dbl(base, &b2s_data.hbase2_numdigits);
-
- b2s_data.result = Qnil;
- b2s_data.ptr = NULL;
-
- if (power_level == 0) {
- big2str_2bdigits(&b2s_data, xds, xn, 0);
- }
- else {
- VALUE tmpw = 0;
- BDIGIT *wds;
- size_t wn;
- wn = power_level * BIGDIVREM_EXTRA_WORDS + RBIGNUM_LEN(power);
- wds = ALLOCV_N(BDIGIT, tmpw, xn + wn);
- MEMCPY(wds, xds, BDIGIT, xn);
- big2str_karatsuba(&b2s_data, wds, xn, wn, power_level, 0);
- if (tmpw)
- ALLOCV_END(tmpw);
+ if (BIGZEROP(x)) {
+ if (trim) return 0;
+ else {
+ memset(ptr, '0', len);
+ return len;
+ }
}
- RB_GC_GUARD(x);
-
- *b2s_data.ptr = '\0';
- rb_str_resize(b2s_data.result, (long)(b2s_data.ptr - RSTRING_PTR(b2s_data.result)));
-
- RB_GC_GUARD(x);
- return b2s_data.result;
-}
-
-VALUE
-rb_big2str_generic(VALUE x, int base)
-{
- return big2str_generic(x, base);
-}
-#ifdef USE_GMP
-VALUE
-big2str_gmp(VALUE x, int base)
-{
- const size_t nails = (sizeof(BDIGIT)-SIZEOF_BDIGITS)*CHAR_BIT;
- mpz_t mx;
- size_t size;
- VALUE str;
- BDIGIT *xds = BDIGITS(x);
- size_t xn = RBIGNUM_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)) {
- mpz_neg(mx, mx);
- str = rb_usascii_str_new(0, size+1);
- }
- else {
- str = rb_usascii_str_new(0, size);
+ if (n1 <= KARATSUBA_DIGITS) {
+ return big2str_orig(x, base, ptr, len, hbase, trim);
}
- mpz_get_str(RSTRING_PTR(str), base, mx);
- mpz_clear(mx);
- if (RSTRING_PTR(str)[RSTRING_LEN(str)-1] == '\0') {
- rb_str_set_len(str, RSTRING_LEN(str)-1);
- }
+ b = power_cache_get_power(base, n1, &m1);
+ bigdivmod(x, b, &q, &r);
+ lh = big2str_karatsuba(q, base, ptr, (len - m1)/2,
+ len - m1, hbase, trim);
+ rb_big_resize(q, 0);
+ ll = big2str_karatsuba(r, base, ptr + lh, m1/2,
+ m1, hbase, !lh && trim);
+ rb_big_resize(r, 0);
- RB_GC_GUARD(x);
- return str;
+ return lh + ll;
}
VALUE
-rb_big2str_gmp(VALUE x, int base)
-{
- return big2str_gmp(x, base);
-}
-#endif
-
-static VALUE
-rb_big2str1(VALUE x, int base)
+rb_big2str0(VALUE x, int base, int trim)
{
- BDIGIT *xds;
- size_t xn;
+ int off;
+ VALUE ss, xx;
+ long n1, n2, len, hbase;
+ char* ptr;
if (FIXNUM_P(x)) {
return rb_fix2str(x, base);
}
-
- bigtrunc(x);
- xds = BDIGITS(x);
- xn = RBIGNUM_LEN(x);
- BARY_TRUNC(xds, xn);
-
- if (xn == 0) {
+ if (BIGZEROP(x)) {
return rb_usascii_str_new2("0");
}
if (base < 2 || 36 < base)
rb_raise(rb_eArgError, "invalid radix %d", base);
- if (xn >= LONG_MAX/BITSPERDIG) {
- rb_raise(rb_eRangeError, "bignum too big to convert into `string'");
- }
-
- if (POW2_P(base)) {
- /* base == 2 || base == 4 || base == 8 || base == 16 || base == 32 */
- return big2str_base_poweroftwo(x, base);
- }
+ n2 = big2str_find_n1(x, base);
+ n1 = (n2 + 1) / 2;
+ ss = rb_usascii_str_new(0, n2 + 1); /* plus one for sign */
+ ptr = RSTRING_PTR(ss);
+ ptr[0] = RBIGNUM_SIGN(x) ? '+' : '-';
-#ifdef USE_GMP
- if (GMP_BIG2STR_DIGITS < xn) {
- return big2str_gmp(x, base);
- }
+ hbase = base*base;
+#if SIZEOF_BDIGITS > 2
+ hbase *= hbase;
#endif
-
- 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] = '+';
+ off = !(trim && RBIGNUM_SIGN(x)); /* erase plus sign if trim */
+ xx = rb_big_clone(x);
+ RBIGNUM_SET_SIGN(xx, 1);
+ if (n1 <= KARATSUBA_DIGITS) {
+ len = off + big2str_orig(xx, base, ptr + off, n2, hbase, trim);
}
-
- 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);
+ else {
+ len = off + big2str_karatsuba(xx, base, ptr + off, n1,
+ n2, hbase, trim);
}
+ rb_big_resize(xx, 0);
- RSTRING_PTR(str)[RSTRING_LEN(str)] = '\0';
+ ptr[len] = '\0';
+ rb_str_resize(ss, len);
- return str;
+ return ss;
}
VALUE
rb_big2str(VALUE x, int base)
{
- return rb_big2str1(x, base);
+ return rb_big2str0(x, base, 1);
}
/*
@@ -5046,74 +1186,63 @@ rb_big_to_s(int argc, VALUE *argv, VALUE x)
return rb_big2str(x, base);
}
-static unsigned long
-big2ulong(VALUE x, const char *type)
+static VALUE
+big2ulong(VALUE x, const char *type, int check)
{
long len = RBIGNUM_LEN(x);
- unsigned long num;
+ BDIGIT_DBL num;
BDIGIT *ds;
- if (len == 0)
- return 0;
- if (BIGSIZE(x) > sizeof(long)) {
- rb_raise(rb_eRangeError, "bignum too big to convert into `%s'", type);
+ if (len > DIGSPERLONG) {
+ if (check)
+ rb_raise(rb_eRangeError, "bignum too big to convert into `%s'", type);
+ len = DIGSPERLONG;
}
ds = BDIGITS(x);
-#if SIZEOF_LONG <= SIZEOF_BDIGITS
- num = (unsigned long)ds[0];
-#else
num = 0;
while (len--) {
- num <<= BITSPERDIG;
- num += (unsigned long)ds[len]; /* overflow is already checked */
+ num = BIGUP(num);
+ num += ds[len];
}
-#endif
- return num;
+ return (VALUE)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);
+ VALUE num = big2ulong(x, "unsigned long", FALSE);
+ if (!RBIGNUM_SIGN(x)) {
+ return (VALUE)(-(SIGNED_VALUE)num);
+ }
return num;
}
VALUE
rb_big2ulong(VALUE x)
{
- unsigned long num = big2ulong(x, "unsigned long");
+ VALUE num = big2ulong(x, "unsigned long", TRUE);
- if (RBIGNUM_POSITIVE_P(x)) {
- return num;
- }
- else {
- if (num <= LONG_MAX)
- return -(long)num;
- if (num == 1+(unsigned long)(-(LONG_MIN+1)))
- return LONG_MIN;
+ if (!RBIGNUM_SIGN(x)) {
+ unsigned long v = (unsigned long)(-(long)num);
+
+ if (v <= LONG_MAX)
+ rb_raise(rb_eRangeError, "bignum out of range of unsigned long");
+ return (VALUE)v;
}
- rb_raise(rb_eRangeError, "bignum out of range of unsigned long");
+ return num;
}
SIGNED_VALUE
rb_big2long(VALUE x)
{
- unsigned long num = big2ulong(x, "long");
+ VALUE num = big2ulong(x, "long", TRUE);
- if (RBIGNUM_POSITIVE_P(x)) {
- if (num <= LONG_MAX)
- return num;
+ if ((long)num < 0 &&
+ (RBIGNUM_SIGN(x) || (long)num != LONG_MIN)) {
+ rb_raise(rb_eRangeError, "bignum too big to convert into `long'");
}
- else {
- if (num <= LONG_MAX)
- return -(long)num;
- if (num == 1+(unsigned long)(-(LONG_MIN+1)))
- return LONG_MIN;
- }
- rb_raise(rb_eRangeError, "bignum too big to convert into `long'");
+ if (!RBIGNUM_SIGN(x)) return -(SIGNED_VALUE)num;
+ return num;
}
#if HAVE_LONG_LONG
@@ -5122,22 +1251,17 @@ static unsigned LONG_LONG
big2ull(VALUE x, const char *type)
{
long len = RBIGNUM_LEN(x);
- unsigned LONG_LONG num;
- BDIGIT *ds = BDIGITS(x);
+ BDIGIT_DBL num;
+ BDIGIT *ds;
- if (len == 0)
- return 0;
- if (BIGSIZE(x) > SIZEOF_LONG_LONG)
+ if (len > SIZEOF_LONG_LONG/SIZEOF_BDIGITS)
rb_raise(rb_eRangeError, "bignum too big to convert into `%s'", type);
-#if SIZEOF_LONG_LONG <= SIZEOF_BDIGITS
- num = (unsigned LONG_LONG)ds[0];
-#else
+ ds = BDIGITS(x);
num = 0;
while (len--) {
num = BIGUP(num);
num += ds[len];
}
-#endif
return num;
}
@@ -5146,16 +1270,15 @@ rb_big2ull(VALUE x)
{
unsigned LONG_LONG num = big2ull(x, "unsigned long long");
- if (RBIGNUM_POSITIVE_P(x)) {
- return num;
- }
- else {
- if (num <= LLONG_MAX)
- return -(LONG_LONG)num;
- if (num == 1+(unsigned LONG_LONG)(-(LLONG_MIN+1)))
- return LLONG_MIN;
+ if (!RBIGNUM_SIGN(x)) {
+ LONG_LONG v = -(LONG_LONG)num;
+
+ /* FIXNUM_MIN-1 .. LLONG_MIN mapped into 0xbfffffffffffffff .. LONG_MAX+1 */
+ if ((unsigned LONG_LONG)v <= LLONG_MAX)
+ rb_raise(rb_eRangeError, "bignum out of range of unsigned long long");
+ return v;
}
- rb_raise(rb_eRangeError, "bignum out of range of unsigned long long");
+ return num;
}
LONG_LONG
@@ -5163,17 +1286,12 @@ rb_big2ll(VALUE x)
{
unsigned LONG_LONG num = big2ull(x, "long long");
- if (RBIGNUM_POSITIVE_P(x)) {
- if (num <= LLONG_MAX)
- return num;
- }
- else {
- if (num <= LLONG_MAX)
- return -(LONG_LONG)num;
- if (num == 1+(unsigned LONG_LONG)(-(LLONG_MIN+1)))
- return LLONG_MIN;
+ if ((LONG_LONG)num < 0 && (RBIGNUM_SIGN(x)
+ || (LONG_LONG)num != LLONG_MIN)) {
+ rb_raise(rb_eRangeError, "bignum too big to convert into `long long'");
}
- rb_raise(rb_eRangeError, "bignum too big to convert into `long long'");
+ if (!RBIGNUM_SIGN(x)) return -(LONG_LONG)num;
+ return num;
}
#endif /* HAVE_LONG_LONG */
@@ -5194,7 +1312,7 @@ dbl2big(double d)
rb_raise(rb_eFloatDomainError, "NaN");
}
- while (1.0 <= u) {
+ while (!POSFIXABLE(u) || 0 != (long)u) {
u /= (double)(BIGRAD);
i++;
}
@@ -5216,6 +1334,27 @@ rb_dbl2big(double d)
return bignorm(dbl2big(d));
}
+static int
+nlz(BDIGIT x)
+{
+ BDIGIT y;
+ int n = BITSPERDIG;
+#if BITSPERDIG > 64
+ y = x >> 64; if (y) {n -= 64; x = y;}
+#endif
+#if BITSPERDIG > 32
+ y = x >> 32; if (y) {n -= 32; x = y;}
+#endif
+#if BITSPERDIG > 16
+ y = x >> 16; if (y) {n -= 16; x = y;}
+#endif
+ y = x >> 8; if (y) {n -= 8; x = y;}
+ y = x >> 4; if (y) {n -= 4; x = y;}
+ y = x >> 2; if (y) {n -= 2; x = y;}
+ y = x >> 1; if (y) {return n - 2;}
+ return n - x;
+}
+
static double
big2dbl(VALUE x)
{
@@ -5237,17 +1376,16 @@ big2dbl(VALUE x)
d = ds[i] + BIGRAD*d;
}
dl = ds[i];
- if (bits && (dl & ((BDIGIT)1 << (bits %= BITSPERDIG)))) {
- int carry = (dl & ~(BDIGMAX << bits)) != 0;
+ if (bits && (dl & (1UL << (bits %= BITSPERDIG)))) {
+ int carry = dl & ~(~(BDIGIT)0 << bits);
if (!carry) {
while (i-- > 0) {
- carry = ds[i] != 0;
- if (carry) break;
+ if ((carry = ds[i]) != 0) break;
}
}
if (carry) {
- dl &= BDIGMAX << bits;
- dl = BIGLO(dl + ((BDIGIT)1 << bits));
+ dl &= (BDIGIT)~0 << bits;
+ dl += (BDIGIT)1 << bits;
if (!dl) d += 1;
}
}
@@ -5319,16 +1457,16 @@ rb_integer_float_cmp(VALUE x, VALUE y)
return INT2FIX(1);
return INT2FIX(0);
#else
- long xn, yn;
+ long xl, yl;
if (yi < FIXNUM_MIN)
return INT2FIX(1);
if (FIXNUM_MAX+1 <= yi)
return INT2FIX(-1);
- xn = FIX2LONG(x);
- yn = (long)yi;
- if (xn < yn)
+ xl = FIX2LONG(x);
+ yl = (long)yi;
+ if (xl < yl)
return INT2FIX(-1);
- if (xn > yn)
+ if (xl > yl)
return INT2FIX(1);
if (yf < 0.0)
return INT2FIX(1);
@@ -5364,12 +1502,12 @@ rb_integer_float_eq(VALUE x, VALUE y)
return Qfalse;
return Qtrue;
#else
- long xn, yn;
+ long xl, yl;
if (yi < LONG_MIN || LONG_MAX < yi)
return Qfalse;
- xn = FIX2LONG(x);
- yn = (long)yi;
- if (xn != yn)
+ xl = FIX2LONG(x);
+ yl = (long)yi;
+ if (xl != yl)
return Qfalse;
return Qtrue;
#endif
@@ -5382,39 +1520,48 @@ rb_integer_float_eq(VALUE x, VALUE y)
* call-seq:
* big <=> numeric -> -1, 0, +1 or nil
*
- * Comparison---Returns -1, 0, or +1 depending on whether +big+ is
- * less than, equal to, or greater than +numeric+. This is the
- * basis for the tests in Comparable.
- *
- * +nil+ is returned if the two values are incomparable.
+ * Comparison---Returns -1, 0, or +1 depending on whether <i>big</i> is
+ * less than, equal to, or greater than <i>numeric</i>. This is the
+ * basis for the tests in <code>Comparable</code>.
*
*/
VALUE
rb_big_cmp(VALUE x, VALUE y)
{
- int cmp;
+ long xlen = RBIGNUM_LEN(x);
+ BDIGIT *xds, *yds;
- if (FIXNUM_P(y)) {
+ switch (TYPE(y)) {
+ case T_FIXNUM:
y = rb_int2big(FIX2LONG(y));
- }
- else if (RB_BIGNUM_TYPE_P(y)) {
- }
- else if (RB_FLOAT_TYPE_P(y)) {
+ break;
+
+ case T_BIGNUM:
+ break;
+
+ case T_FLOAT:
return rb_integer_float_cmp(x, y);
- }
- else {
+
+ default:
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 (xlen < RBIGNUM_LEN(y))
+ return (RBIGNUM_SIGN(x)) ? INT2FIX(-1) : INT2FIX(1);
+ if (xlen > RBIGNUM_LEN(y))
+ return (RBIGNUM_SIGN(x)) ? INT2FIX(1) : INT2FIX(-1);
+
+ xds = BDIGITS(x);
+ yds = BDIGITS(y);
- cmp = bary_cmp(BDIGITS(x), RBIGNUM_LEN(x), BDIGITS(y), RBIGNUM_LEN(y));
- if (RBIGNUM_SIGN(x))
- return INT2FIX(cmp);
- else
- return INT2FIX(-cmp);
+ while (xlen-- && (xds[xlen]==yds[xlen]));
+ if (-1 == xlen) return INT2FIX(0);
+ return (xds[xlen] > yds[xlen]) ?
+ (RBIGNUM_SIGN(x) ? INT2FIX(1) : INT2FIX(-1)) :
+ (RBIGNUM_SIGN(x) ? INT2FIX(-1) : INT2FIX(1));
}
enum big_op_t {
@@ -5430,21 +1577,27 @@ big_op(VALUE x, VALUE y, enum big_op_t op)
VALUE rel;
int n;
- if (FIXNUM_P(y) || RB_BIGNUM_TYPE_P(y)) {
+ switch (TYPE(y)) {
+ case T_FIXNUM:
+ case T_BIGNUM:
rel = rb_big_cmp(x, y);
- }
- else if (RB_FLOAT_TYPE_P(y)) {
+ break;
+
+ case T_FLOAT:
rel = rb_integer_float_cmp(x, y);
- }
- else {
- ID id = 0;
- switch (op) {
- case big_op_gt: id = '>'; break;
- case big_op_ge: id = rb_intern(">="); break;
- case big_op_lt: id = '<'; break;
- case big_op_le: id = rb_intern("<="); break;
+ break;
+
+ default:
+ {
+ ID id = 0;
+ switch (op) {
+ case big_op_gt: id = '>'; break;
+ case big_op_ge: id = rb_intern(">="); break;
+ case big_op_lt: id = '<'; break;
+ case big_op_le: id = rb_intern("<="); break;
+ }
+ return rb_num_coerce_relop(x, y, id);
}
- return rb_num_coerce_relop(x, y, id);
}
if (NIL_P(rel)) return Qfalse;
@@ -5529,16 +1682,15 @@ big_le(VALUE x, VALUE y)
VALUE
rb_big_eq(VALUE x, VALUE y)
{
- if (FIXNUM_P(y)) {
- if (bignorm(x) == y) return Qtrue;
+ switch (TYPE(y)) {
+ case T_FIXNUM:
y = rb_int2big(FIX2LONG(y));
- }
- else if (RB_BIGNUM_TYPE_P(y)) {
- }
- else if (RB_FLOAT_TYPE_P(y)) {
+ break;
+ case T_BIGNUM:
+ break;
+ case T_FLOAT:
return rb_integer_float_eq(x, y);
- }
- else {
+ default:
return rb_equal(y, x);
}
if (RBIGNUM_SIGN(x) != RBIGNUM_SIGN(y)) return Qfalse;
@@ -5561,7 +1713,7 @@ rb_big_eq(VALUE x, VALUE y)
VALUE
rb_big_eql(VALUE x, VALUE y)
{
- if (!RB_BIGNUM_TYPE_P(y)) return Qfalse;
+ if (!RB_TYPE_P(y, T_BIGNUM)) 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;
@@ -5601,50 +1753,79 @@ static VALUE
rb_big_neg(VALUE x)
{
VALUE z = rb_big_clone(x);
- BDIGIT *ds = BDIGITS(z);
- long n = RBIGNUM_LEN(z);
-
- if (!n) return INT2FIX(-1);
+ BDIGIT *ds;
+ long i;
- if (RBIGNUM_POSITIVE_P(z)) {
- if (bary_add_one(ds, n)) {
- big_extend_carry(z);
- }
- RBIGNUM_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);
+ if (!RBIGNUM_SIGN(x)) get2comp(z);
+ ds = BDIGITS(z);
+ i = RBIGNUM_LEN(x);
+ if (!i) return INT2FIX(~(SIGNED_VALUE)0);
+ while (i--) {
+ ds[i] = ~ds[i];
}
+ RBIGNUM_SET_SIGN(z, !RBIGNUM_SIGN(z));
+ if (RBIGNUM_SIGN(x)) get2comp(z);
return bignorm(z);
}
-static VALUE
-bigsub(VALUE x, VALUE y)
+static void
+bigsub_core(BDIGIT *xds, long xn, BDIGIT *yds, long yn, BDIGIT *zds, long zn)
{
- VALUE z;
- BDIGIT *xds, *yds, *zds;
- long xn, yn, zn;
-
- xn = RBIGNUM_LEN(x);
- yn = RBIGNUM_LEN(y);
- zn = xn < yn ? yn : xn;
-
- z = bignew(zn, 1);
+ BDIGIT_DBL_SIGNED num;
+ long i;
- xds = BDIGITS(x);
- yds = BDIGITS(y);
- zds = BDIGITS(z);
+ for (i = 0, num = 0; i < yn; i++) {
+ num += (BDIGIT_DBL_SIGNED)xds[i] - yds[i];
+ zds[i] = BIGLO(num);
+ num = BIGDN(num);
+ }
+ while (num && i < xn) {
+ num += xds[i];
+ zds[i++] = BIGLO(num);
+ num = BIGDN(num);
+ }
+ while (i < xn) {
+ zds[i] = xds[i];
+ i++;
+ }
+ assert(i <= zn);
+ while (i < zn) {
+ zds[i++] = 0;
+ }
+}
- if (bary_sub(zds, zn, xds, xn, yds, yn)) {
- bary_2comp(zds, zn);
- RBIGNUM_SET_NEGATIVE_SIGN(z);
+static VALUE
+bigsub(VALUE x, VALUE y)
+{
+ VALUE z = 0;
+ long i = RBIGNUM_LEN(x);
+ BDIGIT *xds, *yds;
+
+ /* if x is smaller than y, swap */
+ if (RBIGNUM_LEN(x) < RBIGNUM_LEN(y)) {
+ z = x; x = y; y = z; /* swap x y */
+ }
+ else if (RBIGNUM_LEN(x) == RBIGNUM_LEN(y)) {
+ xds = BDIGITS(x);
+ yds = BDIGITS(y);
+ while (i > 0) {
+ i--;
+ if (xds[i] > yds[i]) {
+ break;
+ }
+ if (xds[i] < yds[i]) {
+ z = x; x = y; y = z; /* swap x y */
+ break;
+ }
+ }
}
+ z = bignew(RBIGNUM_LEN(x), z==0);
+ bigsub_core(BDIGITS(x), RBIGNUM_LEN(x),
+ BDIGITS(y), RBIGNUM_LEN(y),
+ BDIGITS(z), RBIGNUM_LEN(z));
+
return z;
}
@@ -5655,7 +1836,7 @@ bigsub_int(VALUE x, long y0)
{
VALUE z;
BDIGIT *xds, *zds;
- long xn, zn;
+ long xn;
BDIGIT_DBL_SIGNED num;
long i, y;
@@ -5663,19 +1844,10 @@ bigsub_int(VALUE x, long y0)
xds = BDIGITS(x);
xn = RBIGNUM_LEN(x);
- if (xn == 0)
- return LONG2NUM(-y0);
-
- zn = xn;
-#if SIZEOF_BDIGITS < SIZEOF_LONG
- if (zn < bdigit_roomof(SIZEOF_LONG))
- zn = bdigit_roomof(SIZEOF_LONG);
-#endif
- z = bignew(zn, RBIGNUM_SIGN(x));
+ z = bignew(xn, RBIGNUM_SIGN(x));
zds = BDIGITS(z);
-#if SIZEOF_BDIGITS >= SIZEOF_LONG
- assert(xn == zn);
+#if SIZEOF_BDIGITS == SIZEOF_LONG
num = (BDIGIT_DBL_SIGNED)xds[0] - y;
if (xn == 1 && num < 0) {
RBIGNUM_SET_SIGN(z, !RBIGNUM_SIGN(x));
@@ -5686,62 +1858,26 @@ bigsub_int(VALUE x, long y0)
zds[0] = BIGLO(num);
num = BIGDN(num);
i = 1;
- if (i < xn)
- goto y_is_zero_x;
- goto finish;
#else
num = 0;
- for (i=0; i < xn; i++) {
- if (y == 0) goto y_is_zero_x;
+ for (i=0; i<(int)(sizeof(y)/sizeof(BDIGIT)); i++) {
num += (BDIGIT_DBL_SIGNED)xds[i] - BIGLO(y);
zds[i] = BIGLO(num);
num = BIGDN(num);
y = BIGDN(y);
}
- for (; i < zn; i++) {
- if (y == 0) goto y_is_zero_z;
- num -= BIGLO(y);
- zds[i] = BIGLO(num);
- num = BIGDN(num);
- y = BIGDN(y);
- }
- goto finish;
#endif
-
- for (; i < xn; i++) {
- y_is_zero_x:
- if (num == 0) goto num_is_zero_x;
+ while (num && i < xn) {
num += xds[i];
- zds[i] = BIGLO(num);
+ zds[i++] = BIGLO(num);
num = BIGDN(num);
}
-#if SIZEOF_BDIGITS < SIZEOF_LONG
- for (; i < zn; i++) {
- y_is_zero_z:
- if (num == 0) goto num_is_zero_z;
- zds[i] = BIGLO(num);
- num = BIGDN(num);
- }
-#endif
- goto finish;
-
- for (; i < xn; i++) {
- num_is_zero_x:
+ while (i < xn) {
zds[i] = xds[i];
+ i++;
}
-#if SIZEOF_BDIGITS < SIZEOF_LONG
- for (; i < zn; i++) {
- num_is_zero_z:
- zds[i] = 0;
- }
-#endif
- goto finish;
-
- finish:
- assert(num == 0 || num == -1);
if (num < 0) {
- get2comp(z);
- RBIGNUM_SET_SIGN(z, !RBIGNUM_SIGN(x));
+ z = bigsub(x, rb_int2big(y0));
}
RB_GC_GUARD(x);
return bignorm(z);
@@ -5759,75 +1895,79 @@ bigadd_int(VALUE x, long y)
xds = BDIGITS(x);
xn = RBIGNUM_LEN(x);
- if (xn == 0)
- return LONG2NUM(y);
-
- zn = xn;
-#if SIZEOF_BDIGITS < SIZEOF_LONG
- if (zn < bdigit_roomof(SIZEOF_LONG))
- zn = bdigit_roomof(SIZEOF_LONG);
-#endif
- zn++;
-
+ if (xn < 2) {
+ zn = 3;
+ }
+ else {
+ zn = xn + 1;
+ }
z = bignew(zn, RBIGNUM_SIGN(x));
zds = BDIGITS(z);
-#if SIZEOF_BDIGITS >= SIZEOF_LONG
+#if SIZEOF_BDIGITS == SIZEOF_LONG
num = (BDIGIT_DBL)xds[0] + y;
zds[0] = BIGLO(num);
num = BIGDN(num);
i = 1;
- if (i < xn)
- goto y_is_zero_x;
- goto y_is_zero_z;
#else
num = 0;
- for (i=0; i < xn; i++) {
- if (y == 0) goto y_is_zero_x;
+ for (i=0; i<(int)(sizeof(y)/sizeof(BDIGIT)); i++) {
num += (BDIGIT_DBL)xds[i] + BIGLO(y);
zds[i] = BIGLO(num);
num = BIGDN(num);
y = BIGDN(y);
}
- for (; i < zn; i++) {
- if (y == 0) goto y_is_zero_z;
- num += BIGLO(y);
- zds[i] = BIGLO(num);
+#endif
+ while (num && i < xn) {
+ num += xds[i];
+ zds[i++] = BIGLO(num);
num = BIGDN(num);
- y = BIGDN(y);
}
- goto finish;
+ if (num) zds[i++] = (BDIGIT)num;
+ else while (i < xn) {
+ zds[i] = xds[i];
+ i++;
+ }
+ assert(i <= zn);
+ while (i < zn) {
+ zds[i++] = 0;
+ }
+ RB_GC_GUARD(x);
+ return bignorm(z);
+}
-#endif
+static void
+bigadd_core(BDIGIT *xds, long xn, BDIGIT *yds, long yn, BDIGIT *zds, long zn)
+{
+ BDIGIT_DBL num = 0;
+ long i;
- for (;i < xn; i++) {
- y_is_zero_x:
- if (num == 0) goto num_is_zero_x;
- num += (BDIGIT_DBL)xds[i];
- zds[i] = BIGLO(num);
+ if (xn > yn) {
+ BDIGIT *tds;
+ tds = xds; xds = yds; yds = tds;
+ i = xn; xn = yn; yn = i;
+ }
+
+ i = 0;
+ while (i < xn) {
+ num += (BDIGIT_DBL)xds[i] + yds[i];
+ zds[i++] = BIGLO(num);
num = BIGDN(num);
}
- for (; i < zn; i++) {
- y_is_zero_z:
- if (num == 0) goto num_is_zero_z;
- zds[i] = BIGLO(num);
+ while (num && i < yn) {
+ num += yds[i];
+ zds[i++] = BIGLO(num);
num = BIGDN(num);
}
- goto finish;
-
- for (;i < xn; i++) {
- num_is_zero_x:
- zds[i] = xds[i];
+ while (i < yn) {
+ zds[i] = yds[i];
+ i++;
}
- for (; i < zn; i++) {
- num_is_zero_z:
- zds[i] = 0;
+ if (num) zds[i++] = (BDIGIT)num;
+ assert(i <= zn);
+ while (i < zn) {
+ zds[i++] = 0;
}
- goto finish;
-
- finish:
- RB_GC_GUARD(x);
- return bignorm(z);
}
static VALUE
@@ -5850,9 +1990,9 @@ bigadd(VALUE x, VALUE y, int sign)
}
z = bignew(len, sign);
- bary_add(BDIGITS(z), RBIGNUM_LEN(z),
- BDIGITS(x), RBIGNUM_LEN(x),
- BDIGITS(y), RBIGNUM_LEN(y));
+ bigadd_core(BDIGITS(x), RBIGNUM_LEN(x),
+ BDIGITS(y), RBIGNUM_LEN(y),
+ BDIGITS(z), RBIGNUM_LEN(z));
return z;
}
@@ -5869,7 +2009,8 @@ rb_big_plus(VALUE x, VALUE y)
{
long n;
- if (FIXNUM_P(y)) {
+ switch (TYPE(y)) {
+ case T_FIXNUM:
n = FIX2LONG(y);
if ((n > 0) != RBIGNUM_SIGN(x)) {
if (n < 0) {
@@ -5881,14 +2022,14 @@ rb_big_plus(VALUE x, VALUE y)
n = -n;
}
return bigadd_int(x, n);
- }
- else if (RB_BIGNUM_TYPE_P(y)) {
+
+ case T_BIGNUM:
return bignorm(bigadd(x, y, 1));
- }
- else if (RB_FLOAT_TYPE_P(y)) {
+
+ case T_FLOAT:
return DBL2NUM(rb_big2dbl(x) + RFLOAT_VALUE(y));
- }
- else {
+
+ default:
return rb_num_coerce_bin(x, y, '+');
}
}
@@ -5905,7 +2046,8 @@ rb_big_minus(VALUE x, VALUE y)
{
long n;
- if (FIXNUM_P(y)) {
+ switch (TYPE(y)) {
+ case T_FIXNUM:
n = FIX2LONG(y);
if ((n > 0) != RBIGNUM_SIGN(x)) {
if (n < 0) {
@@ -5917,76 +2059,573 @@ rb_big_minus(VALUE x, VALUE y)
n = -n;
}
return bigsub_int(x, n);
- }
- else if (RB_BIGNUM_TYPE_P(y)) {
+
+ case T_BIGNUM:
return bignorm(bigadd(x, y, 0));
- }
- else if (RB_FLOAT_TYPE_P(y)) {
+
+ case T_FLOAT:
return DBL2NUM(rb_big2dbl(x) - RFLOAT_VALUE(y));
- }
- else {
+
+ default:
return rb_num_coerce_bin(x, y, '-');
}
}
-static VALUE
-bigsq(VALUE x)
+static long
+big_real_len(VALUE x)
{
- long xn, zn;
- VALUE z;
- BDIGIT *xds, *zds;
-
- xn = RBIGNUM_LEN(x);
- zn = 2 * xn;
+ long i = RBIGNUM_LEN(x);
+ BDIGIT *xds = BDIGITS(x);
+ while (--i && !xds[i]);
+ return i + 1;
+}
- z = bignew(zn, 1);
+static VALUE
+bigmul1_single(VALUE x, VALUE y)
+{
+ BDIGIT_DBL n;
+ VALUE z = bignew(2, RBIGNUM_SIGN(x)==RBIGNUM_SIGN(y));
+ BDIGIT *xds, *yds, *zds;
xds = BDIGITS(x);
+ yds = BDIGITS(y);
zds = BDIGITS(z);
-#ifdef USE_GMP
- if (xn < GMP_MUL_DIGITS)
- bary_sq_fast(zds, zn, xds, xn);
- else
- bary_mul(zds, zn, xds, xn, xds, xn);
-#else
- if (xn < KARATSUBA_MUL_DIGITS)
- bary_sq_fast(zds, zn, xds, xn);
- else
- bary_mul(zds, zn, xds, xn, xds, xn);
-#endif
+ n = (BDIGIT_DBL)xds[0] * yds[0];
+ zds[0] = BIGLO(n);
+ zds[1] = (BDIGIT)BIGDN(n);
- RB_GC_GUARD(x);
return z;
}
static VALUE
-bigmul0(VALUE x, VALUE y)
+bigmul1_normal(VALUE x, VALUE y)
{
- long xn, yn, zn;
- VALUE z;
+ long xl = RBIGNUM_LEN(x), yl = RBIGNUM_LEN(y), i, j = xl + yl + 1;
+ BDIGIT_DBL n = 0;
+ VALUE z = bignew(j, RBIGNUM_SIGN(x)==RBIGNUM_SIGN(y));
BDIGIT *xds, *yds, *zds;
- if (x == y)
- return bigsq(x);
+ xds = BDIGITS(x);
+ yds = BDIGITS(y);
+ zds = BDIGITS(z);
+ while (j--) zds[j] = 0;
+ for (i = 0; i < xl; i++) {
+ BDIGIT_DBL dd;
+ dd = xds[i];
+ if (dd == 0) continue;
+ n = 0;
+ for (j = 0; j < yl; j++) {
+ BDIGIT_DBL ee = n + (BDIGIT_DBL)dd * yds[j];
+ n = zds[i + j] + ee;
+ if (ee) zds[i + j] = BIGLO(n);
+ n = BIGDN(n);
+ }
+ if (n) {
+ zds[i + j] = (BDIGIT)n;
+ }
+ }
+ rb_thread_check_ints();
+ return z;
+}
+
+static VALUE bigmul0(VALUE x, VALUE y);
+
+/* balancing multiplication by slicing larger argument */
+static VALUE
+bigmul1_balance(VALUE x, VALUE y)
+{
+ VALUE z, t1, t2;
+ long i, xn, yn, r, n;
+ BDIGIT *yds, *zds, *t1ds;
xn = RBIGNUM_LEN(x);
yn = RBIGNUM_LEN(y);
- zn = xn + yn;
+ assert(2 * xn <= yn || 3 * xn <= 2*(yn+2));
- z = bignew(zn, RBIGNUM_SIGN(x)==RBIGNUM_SIGN(y));
+ z = bignew(xn + yn, RBIGNUM_SIGN(x)==RBIGNUM_SIGN(y));
+ t1 = bignew(xn, 1);
- xds = BDIGITS(x);
yds = BDIGITS(y);
zds = BDIGITS(z);
+ t1ds = BDIGITS(t1);
- bary_mul(zds, zn, xds, xn, yds, yn);
+ for (i = 0; i < xn + yn; i++) zds[i] = 0;
- RB_GC_GUARD(x);
- RB_GC_GUARD(y);
+ n = 0;
+ while (yn > 0) {
+ r = xn > yn ? yn : xn;
+ MEMCPY(t1ds, yds + n, BDIGIT, r);
+ RBIGNUM_SET_LEN(t1, r);
+ t2 = bigmul0(x, t1);
+ bigadd_core(zds + n, RBIGNUM_LEN(z) - n,
+ BDIGITS(t2), big_real_len(t2),
+ zds + n, RBIGNUM_LEN(z) - n);
+ yn -= r;
+ n += r;
+ }
+
+ return z;
+}
+
+/* split a bignum into high and low bignums */
+static void
+big_split(VALUE v, long n, volatile VALUE *ph, volatile VALUE *pl)
+{
+ long hn = 0, ln = RBIGNUM_LEN(v);
+ VALUE h, l;
+ BDIGIT *vds = BDIGITS(v);
+
+ if (ln > n) {
+ hn = ln - n;
+ ln = n;
+ }
+
+ if (!hn) {
+ h = rb_uint2big(0);
+ }
+ else {
+ while (--hn && !vds[hn + ln]);
+ h = bignew(hn += 2, 1);
+ MEMCPY(BDIGITS(h), vds + ln, BDIGIT, hn - 1);
+ BDIGITS(h)[hn - 1] = 0; /* margin for carry */
+ }
+
+ while (--ln && !vds[ln]);
+ l = bignew(ln += 2, 1);
+ MEMCPY(BDIGITS(l), vds, BDIGIT, ln - 1);
+ BDIGITS(l)[ln - 1] = 0; /* margin for carry */
+
+ *pl = l;
+ *ph = h;
+}
+
+/* multiplication by karatsuba method */
+static VALUE
+bigmul1_karatsuba(VALUE x, VALUE y)
+{
+ long i, n, xn, yn, t1n, t2n;
+ VALUE xh, xl, yh, yl, z, t1, t2, t3;
+ BDIGIT *zds;
+
+ xn = RBIGNUM_LEN(x);
+ yn = RBIGNUM_LEN(y);
+ n = yn / 2;
+ big_split(x, n, &xh, &xl);
+ if (x == y) {
+ yh = xh; yl = xl;
+ }
+ else big_split(y, n, &yh, &yl);
+
+ /* x = xh * b + xl
+ * y = yh * b + yl
+ *
+ * Karatsuba method:
+ * x * y = z2 * b^2 + z1 * b + z0
+ * where
+ * z2 = xh * yh
+ * z0 = xl * yl
+ * z1 = (xh + xl) * (yh + yl) - z2 - z0
+ *
+ * ref: http://en.wikipedia.org/wiki/Karatsuba_algorithm
+ */
+
+ /* allocate a result bignum */
+ z = bignew(xn + yn, RBIGNUM_SIGN(x)==RBIGNUM_SIGN(y));
+ zds = BDIGITS(z);
+
+ /* t1 <- xh * yh */
+ t1 = bigmul0(xh, yh);
+ t1n = big_real_len(t1);
+
+ /* copy t1 into high bytes of the result (z2) */
+ MEMCPY(zds + 2 * n, BDIGITS(t1), BDIGIT, t1n);
+ for (i = 2 * n + t1n; i < xn + yn; i++) zds[i] = 0;
+
+ if (!BIGZEROP(xl) && !BIGZEROP(yl)) {
+ /* t2 <- xl * yl */
+ t2 = bigmul0(xl, yl);
+ t2n = big_real_len(t2);
+
+ /* copy t2 into low bytes of the result (z0) */
+ MEMCPY(zds, BDIGITS(t2), BDIGIT, t2n);
+ for (i = t2n; i < 2 * n; i++) zds[i] = 0;
+ }
+ else {
+ t2 = Qundef;
+ t2n = 0;
+
+ /* copy 0 into low bytes of the result (z0) */
+ for (i = 0; i < 2 * n; i++) zds[i] = 0;
+ }
+
+ /* xh <- xh + xl */
+ if (RBIGNUM_LEN(xl) > RBIGNUM_LEN(xh)) {
+ t3 = xl; xl = xh; xh = t3;
+ }
+ /* xh has a margin for carry */
+ bigadd_core(BDIGITS(xh), RBIGNUM_LEN(xh),
+ BDIGITS(xl), RBIGNUM_LEN(xl),
+ BDIGITS(xh), RBIGNUM_LEN(xh));
+
+ /* yh <- yh + yl */
+ if (x != y) {
+ if (RBIGNUM_LEN(yl) > RBIGNUM_LEN(yh)) {
+ t3 = yl; yl = yh; yh = t3;
+ }
+ /* yh has a margin for carry */
+ bigadd_core(BDIGITS(yh), RBIGNUM_LEN(yh),
+ BDIGITS(yl), RBIGNUM_LEN(yl),
+ BDIGITS(yh), RBIGNUM_LEN(yh));
+ }
+ else yh = xh;
+
+ /* t3 <- xh * yh */
+ t3 = bigmul0(xh, yh);
+
+ i = xn + yn - n;
+ /* subtract t1 from t3 */
+ bigsub_core(BDIGITS(t3), big_real_len(t3), BDIGITS(t1), t1n, BDIGITS(t3), big_real_len(t3));
+
+ /* subtract t2 from t3; t3 is now the middle term of the product */
+ if (t2 != Qundef) bigsub_core(BDIGITS(t3), big_real_len(t3), BDIGITS(t2), t2n, BDIGITS(t3), big_real_len(t3));
+
+ /* add t3 to middle bytes of the result (z1) */
+ bigadd_core(zds + n, i, BDIGITS(t3), big_real_len(t3), zds + n, i);
+
+ return z;
+}
+
+static void
+biglsh_bang(BDIGIT *xds, long xn, unsigned long shift)
+{
+ long const s1 = shift/BITSPERDIG;
+ int const s2 = (int)(shift%BITSPERDIG);
+ int const s3 = BITSPERDIG-s2;
+ BDIGIT* zds;
+ BDIGIT num;
+ long i;
+ if (s1 >= xn) {
+ MEMZERO(xds, BDIGIT, xn);
+ return;
+ }
+ zds = xds + xn - 1;
+ xn -= s1 + 1;
+ num = xds[xn]<<s2;
+ do {
+ *zds-- = num | xds[--xn]>>s3;
+ num = xds[xn]<<s2;
+ }
+ while (xn > 0);
+ *zds = num;
+ for (i = s1; i > 0; --i)
+ *zds-- = 0;
+}
+
+static void
+bigrsh_bang(BDIGIT* xds, long xn, unsigned long shift)
+{
+ long s1 = shift/BITSPERDIG;
+ int s2 = (int)(shift%BITSPERDIG);
+ int s3 = BITSPERDIG - s2;
+ int i;
+ BDIGIT num;
+ BDIGIT* zds;
+ if (s1 >= xn) {
+ MEMZERO(xds, BDIGIT, xn);
+ return;
+ }
+
+ i = 0;
+ zds = xds + s1;
+ num = *zds++>>s2;
+ do {
+ xds[i++] = (BDIGIT)(*zds<<s3) | num;
+ num = *zds++>>s2;
+ }
+ while (i < xn - s1 - 1);
+ xds[i] = num;
+ MEMZERO(xds + xn - s1, BDIGIT, s1);
+}
+
+static void
+big_split3(VALUE v, long n, volatile VALUE* p0, volatile VALUE* p1, volatile VALUE* p2)
+{
+ VALUE v0, v12, v1, v2;
+
+ big_split(v, n, &v12, &v0);
+ big_split(v12, n, &v2, &v1);
+
+ *p0 = bigtrunc(v0);
+ *p1 = bigtrunc(v1);
+ *p2 = bigtrunc(v2);
+}
+
+static VALUE big_lshift(VALUE, unsigned long);
+static VALUE big_rshift(VALUE, unsigned long);
+static VALUE bigdivrem(VALUE, VALUE, volatile VALUE*, volatile VALUE*);
+
+static VALUE
+bigmul1_toom3(VALUE x, VALUE y)
+{
+ long n, xn, yn, zn;
+ VALUE x0, x1, x2, y0, y1, y2;
+ VALUE u0, u1, u2, u3, u4, v1, v2, v3;
+ VALUE z0, z1, z2, z3, z4, z, t;
+ BDIGIT* zds;
+
+ xn = RBIGNUM_LEN(x);
+ yn = RBIGNUM_LEN(y);
+ assert(xn <= yn); /* assume y >= x */
+
+ n = (yn + 2) / 3;
+ big_split3(x, n, &x0, &x1, &x2);
+ if (x == y) {
+ y0 = x0; y1 = x1; y2 = x2;
+ }
+ else big_split3(y, n, &y0, &y1, &y2);
+
+ /*
+ * ref. http://en.wikipedia.org/wiki/Toom%E2%80%93Cook_multiplication
+ *
+ * x(b) = x0 * b^0 + x1 * b^1 + x2 * b^2
+ * y(b) = y0 * b^0 + y1 * b^1 + y2 * b^2
+ *
+ * z(b) = x(b) * y(b)
+ * z(b) = z0 * b^0 + z1 * b^1 + z2 * b^2 + z3 * b^3 + z4 * b^4
+ * where:
+ * z0 = x0 * y0
+ * z1 = x0 * y1 + x1 * y0
+ * z2 = x0 * y2 + x1 * y1 + x2 * y0
+ * z3 = x1 * y2 + x2 * y1
+ * z4 = x2 * y2
+ *
+ * Toom3 method (a.k.a. Toom-Cook method):
+ * (Step1) calculating 5 points z(b0), z(b1), z(b2), z(b3), z(b4),
+ * where:
+ * b0 = 0, b1 = 1, b2 = -1, b3 = -2, b4 = inf,
+ * z(0) = x(0) * y(0) = x0 * y0
+ * z(1) = x(1) * y(1) = (x0 + x1 + x2) * (y0 + y1 + y2)
+ * z(-1) = x(-1) * y(-1) = (x0 - x1 + x2) * (y0 - y1 + y2)
+ * z(-2) = x(-2) * y(-2) = (x0 - 2 * (x1 - 2 * x2)) * (y0 - 2 * (y1 - 2 * y2))
+ * z(inf) = x(inf) * y(inf) = x2 * y2
+ *
+ * (Step2) interpolating z0, z1, z2, z3, z4, and z5.
+ *
+ * (Step3) Substituting base value into b of the polynomial z(b),
+ */
+
+ /*
+ * [Step1] calculating 5 points z(b0), z(b1), z(b2), z(b3), z(b4)
+ */
+
+ /* u1 <- x0 + x2 */
+ u1 = bigtrunc(bigadd(x0, x2, 1));
+
+ /* x(-1) : u2 <- u1 - x1 = x0 - x1 + x2 */
+ u2 = bigtrunc(bigsub(u1, x1));
+
+ /* x(1) : u1 <- u1 + x1 = x0 + x1 + x2 */
+ u1 = bigtrunc(bigadd(u1, x1, 1));
+
+ /* x(-2) : u3 <- 2 * (u2 + x2) - x0 = x0 - 2 * (x1 - 2 * x2) */
+ u3 = bigadd(u2, x2, 1);
+ if (BDIGITS(u3)[RBIGNUM_LEN(u3)-1] & BIGRAD_HALF) {
+ rb_big_resize(u3, RBIGNUM_LEN(u3) + 1);
+ BDIGITS(u3)[RBIGNUM_LEN(u3)-1] = 0;
+ }
+ biglsh_bang(BDIGITS(u3), RBIGNUM_LEN(u3), 1);
+ u3 = bigtrunc(bigadd(bigtrunc(u3), x0, 0));
+
+ if (x == y) {
+ v1 = u1; v2 = u2; v3 = u3;
+ }
+ else {
+ /* v1 <- y0 + y2 */
+ v1 = bigtrunc(bigadd(y0, y2, 1));
+
+ /* y(-1) : v2 <- v1 - y1 = y0 - y1 + y2 */
+ v2 = bigtrunc(bigsub(v1, y1));
+
+ /* y(1) : v1 <- v1 + y1 = y0 + y1 + y2 */
+ v1 = bigtrunc(bigadd(v1, y1, 1));
+
+ /* y(-2) : v3 <- 2 * (v2 + y2) - y0 = y0 - 2 * (y1 - 2 * y2) */
+ v3 = bigadd(v2, y2, 1);
+ if (BDIGITS(v3)[RBIGNUM_LEN(v3)-1] & BIGRAD_HALF) {
+ rb_big_resize(v3, RBIGNUM_LEN(v3) + 1);
+ BDIGITS(v3)[RBIGNUM_LEN(v3)-1] = 0;
+ }
+ biglsh_bang(BDIGITS(v3), RBIGNUM_LEN(v3), 1);
+ v3 = bigtrunc(bigadd(bigtrunc(v3), y0, 0));
+ }
+
+ /* z(0) : u0 <- x0 * y0 */
+ u0 = bigtrunc(bigmul0(x0, y0));
+
+ /* z(1) : u1 <- u1 * v1 */
+ u1 = bigtrunc(bigmul0(u1, v1));
+
+ /* z(-1) : u2 <- u2 * v2 */
+ u2 = bigtrunc(bigmul0(u2, v2));
+
+ /* z(-2) : u3 <- u3 * v3 */
+ u3 = bigtrunc(bigmul0(u3, v3));
+
+ /* z(inf) : u4 <- x2 * y2 */
+ u4 = bigtrunc(bigmul0(x2, y2));
+
+ /* for GC */
+ v1 = v2 = v3 = Qnil;
+
+ /*
+ * [Step2] interpolating z0, z1, z2, z3, z4, and z5.
+ */
+
+ /* z0 <- z(0) == u0 */
+ z0 = u0;
+
+ /* z4 <- z(inf) == u4 */
+ z4 = u4;
+
+ /* z3 <- (z(-2) - z(1)) / 3 == (u3 - u1) / 3 */
+ z3 = bigadd(u3, u1, 0);
+ bigdivrem(z3, big_three, &z3, NULL); /* TODO: optimize */
+ bigtrunc(z3);
+
+ /* z1 <- (z(1) - z(-1)) / 2 == (u1 - u2) / 2 */
+ z1 = bigtrunc(bigadd(u1, u2, 0));
+ bigrsh_bang(BDIGITS(z1), RBIGNUM_LEN(z1), 1);
+
+ /* z2 <- z(-1) - z(0) == u2 - u0 */
+ z2 = bigtrunc(bigadd(u2, u0, 0));
+
+ /* z3 <- (z2 - z3) / 2 + 2 * z(inf) == (z2 - z3) / 2 + 2 * u4 */
+ z3 = bigtrunc(bigadd(z2, z3, 0));
+ bigrsh_bang(BDIGITS(z3), RBIGNUM_LEN(z3), 1);
+ t = big_lshift(u4, 1); /* TODO: combining with next addition */
+ z3 = bigtrunc(bigadd(z3, t, 1));
+
+ /* z2 <- z2 + z1 - z(inf) == z2 + z1 - u4 */
+ z2 = bigtrunc(bigadd(z2, z1, 1));
+ z2 = bigtrunc(bigadd(z2, u4, 0));
+
+ /* z1 <- z1 - z3 */
+ z1 = bigtrunc(bigadd(z1, z3, 0));
+
+ /*
+ * [Step3] Substituting base value into b of the polynomial z(b),
+ */
+
+ zn = 6*n + 1;
+ z = bignew(zn, RBIGNUM_SIGN(x)==RBIGNUM_SIGN(y));
+ zds = BDIGITS(z);
+ MEMCPY(zds, BDIGITS(z0), BDIGIT, RBIGNUM_LEN(z0));
+ MEMZERO(zds + RBIGNUM_LEN(z0), BDIGIT, zn - RBIGNUM_LEN(z0));
+ bigadd_core(zds + n, zn - n, BDIGITS(z1), big_real_len(z1), zds + n, zn - n);
+ bigadd_core(zds + 2*n, zn - 2*n, BDIGITS(z2), big_real_len(z2), zds + 2*n, zn - 2*n);
+ bigadd_core(zds + 3*n, zn - 3*n, BDIGITS(z3), big_real_len(z3), zds + 3*n, zn - 3*n);
+ bigadd_core(zds + 4*n, zn - 4*n, BDIGITS(z4), big_real_len(z4), zds + 4*n, zn - 4*n);
+ z = bignorm(z);
+
+ return bignorm(z);
+}
+
+/* efficient squaring (2 times faster than normal multiplication)
+ * ref: Handbook of Applied Cryptography, Algorithm 14.16
+ * http://www.cacr.math.uwaterloo.ca/hac/about/chap14.pdf
+ */
+static VALUE
+bigsqr_fast(VALUE x)
+{
+ long len = RBIGNUM_LEN(x), i, j;
+ VALUE z = bignew(2 * len + 1, 1);
+ BDIGIT *xds = BDIGITS(x), *zds = BDIGITS(z);
+ BDIGIT_DBL c, v, w;
+
+ for (i = 2 * len + 1; i--; ) zds[i] = 0;
+ for (i = 0; i < len; i++) {
+ v = (BDIGIT_DBL)xds[i];
+ if (!v) continue;
+ c = (BDIGIT_DBL)zds[i + i] + v * v;
+ zds[i + i] = BIGLO(c);
+ c = BIGDN(c);
+ v *= 2;
+ for (j = i + 1; j < len; j++) {
+ w = (BDIGIT_DBL)xds[j];
+ c += (BDIGIT_DBL)zds[i + j] + BIGLO(v) * w;
+ zds[i + j] = BIGLO(c);
+ c = BIGDN(c);
+ if (BIGDN(v)) c += w;
+ }
+ if (c) {
+ c += (BDIGIT_DBL)zds[i + len];
+ zds[i + len] = BIGLO(c);
+ c = BIGDN(c);
+ }
+ if (c) zds[i + len + 1] += (BDIGIT)c;
+ }
return z;
}
+#define KARATSUBA_MUL_DIGITS 70
+#define TOOM3_MUL_DIGITS 150
+
+
+/* determine whether a bignum is sparse or not by random sampling */
+static inline VALUE
+big_sparse_p(VALUE x)
+{
+ long c = 0, n = RBIGNUM_LEN(x);
+
+ if ( BDIGITS(x)[rb_genrand_ulong_limited(n / 2) + n / 4]) c++;
+ if (c <= 1 && BDIGITS(x)[rb_genrand_ulong_limited(n / 2) + n / 4]) c++;
+ if (c <= 1 && BDIGITS(x)[rb_genrand_ulong_limited(n / 2) + n / 4]) c++;
+
+ return (c <= 1) ? Qtrue : Qfalse;
+}
+
+static VALUE
+bigmul0(VALUE x, VALUE y)
+{
+ long xn, yn;
+
+ xn = RBIGNUM_LEN(x);
+ yn = RBIGNUM_LEN(y);
+
+ /* make sure that y is longer than x */
+ if (xn > yn) {
+ VALUE t;
+ long tn;
+ t = x; x = y; y = t;
+ tn = xn; xn = yn; yn = tn;
+ }
+ assert(xn <= yn);
+
+ /* normal multiplication when x is small */
+ if (xn < KARATSUBA_MUL_DIGITS) {
+ normal:
+ if (x == y) return bigsqr_fast(x);
+ if (xn == 1 && yn == 1) return bigmul1_single(x, y);
+ return bigmul1_normal(x, y);
+ }
+
+ /* normal multiplication when x or y is a sparse bignum */
+ if (big_sparse_p(x)) goto normal;
+ if (big_sparse_p(y)) return bigmul1_normal(y, x);
+
+ /* balance multiplication by slicing y when x is much smaller than y */
+ if (2 * xn <= yn) return bigmul1_balance(x, y);
+
+ if (xn < TOOM3_MUL_DIGITS) {
+ /* multiplication by karatsuba method */
+ return bigmul1_karatsuba(x, y);
+ }
+ else if (3*xn <= 2*(yn + 2))
+ return bigmul1_balance(x, y);
+ return bigmul1_toom3(x, y);
+}
+
/*
* call-seq:
* big * other -> Numeric
@@ -5997,112 +2636,207 @@ bigmul0(VALUE x, VALUE y)
VALUE
rb_big_mul(VALUE x, VALUE y)
{
- if (FIXNUM_P(y)) {
+ switch (TYPE(y)) {
+ case T_FIXNUM:
y = rb_int2big(FIX2LONG(y));
- }
- else if (RB_BIGNUM_TYPE_P(y)) {
- }
- else if (RB_FLOAT_TYPE_P(y)) {
+ break;
+
+ case T_BIGNUM:
+ break;
+
+ case T_FLOAT:
return DBL2NUM(rb_big2dbl(x) * RFLOAT_VALUE(y));
- }
- else {
+
+ default:
return rb_num_coerce_bin(x, y, '*');
}
return bignorm(bigmul0(x, y));
}
-static VALUE
-bigdivrem(VALUE x, VALUE y, volatile VALUE *divp, volatile VALUE *modp)
+struct big_div_struct {
+ long nx, ny, j, nyzero;
+ BDIGIT *yds, *zds;
+ volatile VALUE stop;
+};
+
+static void *
+bigdivrem1(void *ptr)
{
- long xn = RBIGNUM_LEN(x), yn = RBIGNUM_LEN(y);
- VALUE z;
- BDIGIT *xds, *yds, *zds;
- BDIGIT dd;
+ struct big_div_struct *bds = (struct big_div_struct*)ptr;
+ long ny = bds->ny;
+ long i, j;
+ BDIGIT *yds = bds->yds, *zds = bds->zds;
+ BDIGIT_DBL t2;
+ BDIGIT_DBL_SIGNED num;
+ BDIGIT q;
- VALUE q = Qnil, r = Qnil;
- BDIGIT *qds, *rds;
- long qn, rn;
+ j = bds->j;
+ do {
+ if (bds->stop) {
+ bds->j = j;
+ return 0;
+ }
+ if (zds[j] == yds[ny-1]) q = (BDIGIT)BIGRAD-1;
+ else q = (BDIGIT)((BIGUP(zds[j]) + zds[j-1])/yds[ny-1]);
+ if (q) {
+ i = bds->nyzero; num = 0; t2 = 0;
+ do { /* multiply and subtract */
+ BDIGIT_DBL ee;
+ t2 += (BDIGIT_DBL)yds[i] * q;
+ ee = num - BIGLO(t2);
+ num = (BDIGIT_DBL)zds[j - ny + i] + ee;
+ if (ee) zds[j - ny + i] = BIGLO(num);
+ num = BIGDN(num);
+ t2 = BIGDN(t2);
+ } while (++i < ny);
+ num += zds[j - ny + i] - t2;/* borrow from high digit; don't update */
+ while (num) { /* "add back" required */
+ i = 0; num = 0; q--;
+ do {
+ BDIGIT_DBL ee = num + yds[i];
+ num = (BDIGIT_DBL)zds[j - ny + i] + ee;
+ if (ee) zds[j - ny + i] = BIGLO(num);
+ num = BIGDN(num);
+ } while (++i < ny);
+ num--;
+ }
+ }
+ zds[j] = q;
+ } while (--j >= ny);
+ return 0;
+}
- yds = BDIGITS(y);
- BARY_TRUNC(yds, yn);
- if (yn == 0)
- rb_num_zerodiv();
+static void
+rb_big_stop(void *ptr)
+{
+ struct big_div_struct *bds = ptr;
+ bds->stop = Qtrue;
+}
- xds = BDIGITS(x);
- BARY_TRUNC(xds, xn);
+static VALUE
+bigdivrem(VALUE x, VALUE y, volatile VALUE *divp, volatile VALUE *modp)
+{
+ struct big_div_struct bds;
+ long nx = RBIGNUM_LEN(x), ny = RBIGNUM_LEN(y);
+ long i, j;
+ VALUE z, yy, zz;
+ BDIGIT *xds, *yds, *zds, *tds;
+ BDIGIT_DBL t2;
+ BDIGIT dd, q;
- if (xn < yn || (xn == yn && xds[xn - 1] < yds[yn - 1])) {
+ if (BIGZEROP(y)) rb_num_zerodiv();
+ xds = BDIGITS(x);
+ yds = BDIGITS(y);
+ if (nx < ny || (nx == ny && xds[nx - 1] < yds[ny - 1])) {
if (divp) *divp = rb_int2big(0);
if (modp) *modp = x;
return Qnil;
}
- if (yn == 1) {
+ if (ny == 1) {
dd = yds[0];
- z = bignew(xn, RBIGNUM_SIGN(x)==RBIGNUM_SIGN(y));
+ z = rb_big_clone(x);
zds = BDIGITS(z);
- dd = bigdivrem_single(zds, xds, xn, dd);
+ t2 = 0; i = nx;
+ while (i--) {
+ t2 = BIGUP(t2) + zds[i];
+ zds[i] = (BDIGIT)(t2 / dd);
+ t2 %= dd;
+ }
+ RBIGNUM_SET_SIGN(z, RBIGNUM_SIGN(x)==RBIGNUM_SIGN(y));
if (modp) {
- *modp = rb_uint2big((VALUE)dd);
+ *modp = rb_uint2big((VALUE)t2);
RBIGNUM_SET_SIGN(*modp, RBIGNUM_SIGN(x));
}
if (divp) *divp = z;
return Qnil;
}
- if (xn == 2 && yn == 2) {
- BDIGIT_DBL x0 = bary2bdigitdbl(xds, 2);
- BDIGIT_DBL y0 = bary2bdigitdbl(yds, 2);
- 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));
- 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));
- zds = BDIGITS(z);
- zds[0] = BIGLO(r0);
- zds[1] = BIGLO(BIGDN(r0));
- *modp = z;
- }
- return Qnil;
- }
- if (divp) {
- qn = xn + BIGDIVREM_EXTRA_WORDS;
- q = bignew(qn, RBIGNUM_SIGN(x)==RBIGNUM_SIGN(y));
- qds = BDIGITS(q);
- }
- else {
- qn = 0;
- qds = NULL;
- }
+ z = bignew(nx==ny?nx+2:nx+1, RBIGNUM_SIGN(x)==RBIGNUM_SIGN(y));
+ zds = BDIGITS(z);
+ if (nx==ny) zds[nx+1] = 0;
+ while (!yds[ny-1]) ny--;
- if (modp) {
- rn = yn;
- r = bignew(rn, RBIGNUM_SIGN(x));
- rds = BDIGITS(r);
+ dd = 0;
+ q = yds[ny-1];
+ while ((q & (BDIGIT)(1UL<<(BITSPERDIG-1))) == 0) {
+ q <<= 1UL;
+ dd++;
+ }
+ if (dd) {
+ yy = rb_big_clone(y);
+ tds = BDIGITS(yy);
+ j = 0;
+ t2 = 0;
+ while (j<ny) {
+ t2 += (BDIGIT_DBL)yds[j]<<dd;
+ tds[j++] = BIGLO(t2);
+ t2 = BIGDN(t2);
+ }
+ yds = tds;
+ RB_GC_GUARD(y) = yy;
+ j = 0;
+ t2 = 0;
+ while (j<nx) {
+ t2 += (BDIGIT_DBL)xds[j]<<dd;
+ zds[j++] = BIGLO(t2);
+ t2 = BIGDN(t2);
+ }
+ zds[j] = (BDIGIT)t2;
}
else {
- rn = 0;
- rds = NULL;
+ zds[nx] = 0;
+ j = nx;
+ while (j--) zds[j] = xds[j];
}
- bary_divmod_branch(qds, qn, rds, rn, xds, xn, yds, yn);
+ bds.nx = nx;
+ bds.ny = ny;
+ bds.zds = zds;
+ bds.yds = yds;
+ bds.stop = Qfalse;
+ bds.j = nx==ny?nx+1:nx;
+ for (bds.nyzero = 0; !yds[bds.nyzero]; bds.nyzero++);
+ if (nx > 10000 || ny > 10000) {
+ retry:
+ bds.stop = Qfalse;
+ rb_thread_call_without_gvl(bigdivrem1, &bds, rb_big_stop, &bds);
- if (divp) {
- bigtrunc(q);
- *divp = q;
+ if (bds.stop == Qtrue) {
+ /* execute trap handler, but exception was not raised. */
+ goto retry;
+ }
}
- if (modp) {
- bigtrunc(r);
- *modp = r;
+ else {
+ bigdivrem1(&bds);
}
- return Qnil;
+ if (divp) { /* move quotient down in z */
+ *divp = zz = rb_big_clone(z);
+ zds = BDIGITS(zz);
+ j = (nx==ny ? nx+2 : nx+1) - ny;
+ for (i = 0;i < j;i++) zds[i] = zds[i+ny];
+ if (!zds[i-1]) i--;
+ RBIGNUM_SET_LEN(zz, i);
+ }
+ if (modp) { /* normalize remainder */
+ *modp = zz = rb_big_clone(z);
+ zds = BDIGITS(zz);
+ while (ny > 1 && !zds[ny-1]) --ny;
+ if (dd) {
+ t2 = 0; i = ny;
+ while (i--) {
+ t2 = (t2 | zds[i]) >> dd;
+ q = zds[i];
+ zds[i] = BIGLO(t2);
+ t2 = BIGUP(q);
+ }
+ }
+ if (!zds[ny-1]) ny--;
+ RBIGNUM_SET_LEN(zz, ny);
+ RBIGNUM_SET_SIGN(zz, RBIGNUM_SIGN(x));
+ }
+ return z;
}
static void
@@ -6126,22 +2860,27 @@ rb_big_divide(VALUE x, VALUE y, ID op)
{
VALUE z;
- if (FIXNUM_P(y)) {
+ switch (TYPE(y)) {
+ case T_FIXNUM:
y = rb_int2big(FIX2LONG(y));
- }
- else if (RB_BIGNUM_TYPE_P(y)) {
- }
- else if (RB_FLOAT_TYPE_P(y)) {
- if (op == '/') {
- return DBL2NUM(rb_big2dbl(x) / RFLOAT_VALUE(y));
- }
- else {
- double dy = RFLOAT_VALUE(y);
- if (dy == 0.0) rb_num_zerodiv();
- return rb_dbl2big(rb_big2dbl(x) / dy);
+ break;
+
+ case T_BIGNUM:
+ break;
+
+ case T_FLOAT:
+ {
+ if (op == '/') {
+ return DBL2NUM(rb_big2dbl(x) / RFLOAT_VALUE(y));
+ }
+ else {
+ double dy = RFLOAT_VALUE(y);
+ if (dy == 0.0) rb_num_zerodiv();
+ return rb_dbl2big(rb_big2dbl(x) / dy);
+ }
}
- }
- else {
+
+ default:
return rb_num_coerce_bin(x, y, op);
}
bigdivmod(x, y, &z, 0);
@@ -6191,10 +2930,15 @@ rb_big_modulo(VALUE x, VALUE y)
{
VALUE z;
- if (FIXNUM_P(y)) {
+ switch (TYPE(y)) {
+ case T_FIXNUM:
y = rb_int2big(FIX2LONG(y));
- }
- else if (!RB_BIGNUM_TYPE_P(y)) {
+ break;
+
+ case T_BIGNUM:
+ break;
+
+ default:
return rb_num_coerce_bin(x, y, '%');
}
bigdivmod(x, y, 0, &z);
@@ -6216,10 +2960,15 @@ rb_big_remainder(VALUE x, VALUE y)
{
VALUE z;
- if (FIXNUM_P(y)) {
+ switch (TYPE(y)) {
+ case T_FIXNUM:
y = rb_int2big(FIX2LONG(y));
- }
- else if (!RB_BIGNUM_TYPE_P(y)) {
+ break;
+
+ case T_BIGNUM:
+ break;
+
+ default:
return rb_num_coerce_bin(x, y, rb_intern("remainder"));
}
bigdivrem(x, y, 0, &z);
@@ -6239,10 +2988,15 @@ rb_big_divmod(VALUE x, VALUE y)
{
VALUE div, mod;
- if (FIXNUM_P(y)) {
+ switch (TYPE(y)) {
+ case T_FIXNUM:
y = rb_int2big(FIX2LONG(y));
- }
- else if (!RB_BIGNUM_TYPE_P(y)) {
+ break;
+
+ case T_BIGNUM:
+ break;
+
+ default:
return rb_num_coerce_bin(x, y, rb_intern("divmod"));
}
bigdivmod(x, y, &div, &mod);
@@ -6250,29 +3004,73 @@ rb_big_divmod(VALUE x, VALUE y)
return rb_assoc_new(bignorm(div), bignorm(mod));
}
+static int
+bdigbitsize(BDIGIT x)
+{
+ int size = 1;
+ int nb = BITSPERDIG / 2;
+ BDIGIT bits = (~0 << nb);
+
+ if (!x) return 0;
+ while (x > 1) {
+ if (x & bits) {
+ size += nb;
+ x >>= nb;
+ }
+ x &= ~bits;
+ nb /= 2;
+ bits >>= nb;
+ }
+
+ return size;
+}
+
+static VALUE big_lshift(VALUE, unsigned long);
+static VALUE big_rshift(VALUE, unsigned long);
+
static VALUE
big_shift(VALUE x, long n)
{
if (n < 0)
- return big_lshift(x, 1+(unsigned long)(-(n+1)));
+ return big_lshift(x, (unsigned long)-n);
else if (n > 0)
return big_rshift(x, (unsigned long)n);
return x;
}
static VALUE
-big_fdiv(VALUE x, VALUE y, long ey)
+big_fdiv(VALUE x, VALUE y)
{
#define DBL_BIGDIG ((DBL_MANT_DIG + BITSPERDIG) / BITSPERDIG)
VALUE z;
- long l, ex;
+ long l, ex, ey;
+ int i;
bigtrunc(x);
- l = RBIGNUM_LEN(x);
- ex = l * BITSPERDIG - nlz(BDIGITS(x)[l-1]);
+ l = RBIGNUM_LEN(x) - 1;
+ ex = l * BITSPERDIG;
+ ex += bdigbitsize(BDIGITS(x)[l]);
ex -= 2 * DBL_BIGDIG * BITSPERDIG;
if (ex) x = big_shift(x, ex);
+ switch (TYPE(y)) {
+ case T_FIXNUM:
+ y = rb_int2big(FIX2LONG(y));
+ case T_BIGNUM:
+ bigtrunc(y);
+ l = RBIGNUM_LEN(y) - 1;
+ ey = l * BITSPERDIG;
+ ey += bdigbitsize(BDIGITS(y)[l]);
+ ey -= DBL_BIGDIG * BITSPERDIG;
+ if (ey) y = big_shift(y, ey);
+ break;
+ case T_FLOAT:
+ y = dbl2big(ldexp(frexp(RFLOAT_VALUE(y), &i), DBL_MANT_DIG));
+ ey = i - DBL_MANT_DIG;
+ break;
+ default:
+ rb_bug("big_fdiv");
+ }
bigdivrem(x, y, &z, 0);
l = ex - ey;
#if SIZEOF_LONG > SIZEOF_INT
@@ -6285,26 +3083,6 @@ big_fdiv(VALUE x, VALUE y, long ey)
return DBL2NUM(ldexp(big2dbl(z), (int)l));
}
-static VALUE
-big_fdiv_int(VALUE x, VALUE y)
-{
- long l, ey;
- bigtrunc(y);
- l = RBIGNUM_LEN(y);
- ey = l * BITSPERDIG - nlz(BDIGITS(y)[l-1]);
- ey -= DBL_BIGDIG * BITSPERDIG;
- if (ey) y = big_shift(y, ey);
- return big_fdiv(x, y, ey);
-}
-
-static VALUE
-big_fdiv_float(VALUE x, VALUE y)
-{
- int i;
- y = dbl2big(ldexp(frexp(RFLOAT_VALUE(y), &i), DBL_MANT_DIG));
- return big_fdiv(x, y, i - DBL_MANT_DIG);
-}
-
/*
* call-seq:
* big.fdiv(numeric) -> float
@@ -6324,29 +3102,39 @@ rb_big_fdiv(VALUE x, VALUE y)
double dx, dy;
dx = big2dbl(x);
- if (FIXNUM_P(y)) {
+ switch (TYPE(y)) {
+ case T_FIXNUM:
dy = (double)FIX2LONG(y);
if (isinf(dx))
- return big_fdiv_int(x, rb_int2big(FIX2LONG(y)));
- }
- else if (RB_BIGNUM_TYPE_P(y)) {
+ return big_fdiv(x, y);
+ break;
+
+ case T_BIGNUM:
dy = rb_big2dbl(y);
if (isinf(dx) || isinf(dy))
- return big_fdiv_int(x, y);
- }
- else if (RB_FLOAT_TYPE_P(y)) {
+ return big_fdiv(x, y);
+ break;
+
+ case T_FLOAT:
dy = RFLOAT_VALUE(y);
if (isnan(dy))
return y;
if (isinf(dx))
- return big_fdiv_float(x, y);
- }
- else {
+ return big_fdiv(x, y);
+ break;
+
+ default:
return rb_num_coerce_bin(x, y, rb_intern("fdiv"));
}
return DBL2NUM(dx / dy);
}
+static VALUE
+bigsqr(VALUE x)
+{
+ return bigtrunc(bigmul0(x, x));
+}
+
/*
* call-seq:
* big ** exponent -> numeric
@@ -6366,21 +3154,20 @@ rb_big_pow(VALUE x, VALUE y)
double d;
SIGNED_VALUE yy;
- again:
if (y == INT2FIX(0)) return INT2FIX(1);
- if (RB_FLOAT_TYPE_P(y)) {
+ switch (TYPE(y)) {
+ case T_FLOAT:
d = RFLOAT_VALUE(y);
if ((!RBIGNUM_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)) {
- y = bignorm(y);
- if (FIXNUM_P(y))
- goto again;
+ break;
+
+ case T_BIGNUM:
rb_warn("in a**b, b may be too big");
d = rb_big2dbl(y);
- }
- else if (FIXNUM_P(y)) {
+ break;
+
+ case T_FIXNUM:
yy = FIX2LONG(y);
if (yy < 0)
@@ -6388,84 +3175,73 @@ rb_big_pow(VALUE x, VALUE y)
else {
VALUE z = 0;
SIGNED_VALUE mask;
- const size_t xbits = rb_absint_numwords(x, 1, NULL);
- const size_t BIGLEN_LIMIT = 32*1024*1024;
+ const long xlen = RBIGNUM_LEN(x) - 1;
+ const long xbits = ffs(RBIGNUM_DIGITS(x)[xlen]) + SIZEOF_BDIGITS*BITSPERDIG*xlen;
+ const long BIGLEN_LIMIT = BITSPERDIG*1024*1024;
- if (xbits == (size_t)-1 ||
- (xbits > BIGLEN_LIMIT) ||
- (xbits * yy > BIGLEN_LIMIT)) {
+ if ((xbits > BIGLEN_LIMIT) || (xbits * yy > BIGLEN_LIMIT)) {
rb_warn("in a**b, b may be too big");
d = (double)yy;
+ break;
}
- else {
- for (mask = FIXNUM_MAX + 1; mask; mask >>= 1) {
- if (z) z = bigsq(z);
- if (yy & mask) {
- z = z ? bigtrunc(bigmul0(z, x)) : x;
- }
+ for (mask = FIXNUM_MAX + 1; mask; mask >>= 1) {
+ if (z) z = bigsqr(z);
+ if (yy & mask) {
+ z = z ? bigtrunc(bigmul0(z, x)) : x;
}
- return bignorm(z);
}
+ return bignorm(z);
}
- }
- else {
+ /* NOTREACHED */
+ break;
+
+ default:
return rb_num_coerce_bin(x, y, rb_intern("**"));
}
return DBL2NUM(pow(rb_big2dbl(x), d));
}
static VALUE
-bigand_int(VALUE x, long xn, BDIGIT hibitsx, long y)
+bigand_int(VALUE x, long y)
{
VALUE z;
BDIGIT *xds, *zds;
- long zn;
+ long xn, zn;
long i;
- BDIGIT hibitsy;
+ char sign;
if (y == 0) return INT2FIX(0);
- if (xn == 0) return hibitsx ? LONG2NUM(y) : 0;
- hibitsy = 0 <= y ? 0 : BDIGMAX;
+ sign = (y > 0);
xds = BDIGITS(x);
-#if SIZEOF_BDIGITS >= SIZEOF_LONG
- if (!hibitsy) {
+ zn = xn = RBIGNUM_LEN(x);
+#if SIZEOF_BDIGITS == SIZEOF_LONG
+ if (sign) {
y &= xds[0];
return LONG2NUM(y);
}
#endif
- zn = xn;
-#if SIZEOF_BDIGITS < SIZEOF_LONG
- if (hibitsx && zn < bdigit_roomof(SIZEOF_LONG))
- zn = bdigit_roomof(SIZEOF_LONG);
-#endif
-
- z = bignew(zn, 0);
+ z = bignew(zn, RBIGNUM_SIGN(x) || sign);
zds = BDIGITS(z);
-#if SIZEOF_BDIGITS >= SIZEOF_LONG
+#if SIZEOF_BDIGITS == SIZEOF_LONG
i = 1;
- zds[0] = xds[0] & BIGLO(y);
+ zds[0] = xds[0] & y;
#else
- for (i=0; i < xn; i++) {
- if (y == 0 || y == -1) break;
- zds[i] = xds[i] & BIGLO(y);
- y = BIGDN(y);
- }
- for (; i < zn; i++) {
- if (y == 0 || y == -1) break;
- zds[i] = hibitsx & BIGLO(y);
- y = BIGDN(y);
+ {
+ BDIGIT_DBL num = y;
+
+ for (i=0; i<(int)(sizeof(y)/sizeof(BDIGIT)); i++) {
+ zds[i] = xds[i] & BIGLO(num);
+ num = BIGDN(num);
+ }
}
#endif
- for (;i < xn; i++) {
- zds[i] = xds[i] & hibitsy;
- }
- for (;i < zn; i++) {
- zds[i] = hibitsx & hibitsy;
+ while (i < xn) {
+ zds[i] = sign?0:xds[i];
+ i++;
}
- twocomp2abs_bang(z, hibitsx && hibitsy);
- RB_GC_GUARD(x);
+ if (!RBIGNUM_SIGN(z)) get2comp(z);
return bignorm(z);
}
@@ -6477,121 +3253,91 @@ bigand_int(VALUE x, long xn, BDIGIT hibitsx, long y)
*/
VALUE
-rb_big_and(VALUE x, VALUE y)
+rb_big_and(VALUE xx, VALUE yy)
{
- VALUE z;
+ volatile VALUE x, y, z;
BDIGIT *ds1, *ds2, *zds;
- long i, xn, yn, n1, n2;
- BDIGIT hibitsx, hibitsy;
- BDIGIT hibits1, hibits2;
- VALUE tmpv;
- BDIGIT tmph;
- long tmpn;
+ long i, l1, l2;
+ char sign;
- if (!FIXNUM_P(y) && !RB_BIGNUM_TYPE_P(y)) {
- return rb_num_coerce_bit(x, y, '&');
+ if (!FIXNUM_P(yy) && !RB_TYPE_P(yy, T_BIGNUM)) {
+ return rb_num_coerce_bit(xx, yy, '&');
}
- hibitsx = abs2twocomp(&x, &xn);
+ x = xx;
+ y = yy;
+
+ if (!RBIGNUM_SIGN(x)) {
+ x = rb_big_clone(x);
+ get2comp(x);
+ }
if (FIXNUM_P(y)) {
- return bigand_int(x, xn, hibitsx, FIX2LONG(y));
+ return bigand_int(x, FIX2LONG(y));
}
- hibitsy = abs2twocomp(&y, &yn);
- if (xn > yn) {
- tmpv = x; x = y; y = tmpv;
- tmpn = xn; xn = yn; yn = tmpn;
- tmph = hibitsx; hibitsx = hibitsy; hibitsy = tmph;
+ if (!RBIGNUM_SIGN(y)) {
+ y = rb_big_clone(y);
+ get2comp(y);
}
- n1 = xn;
- n2 = yn;
- ds1 = BDIGITS(x);
- ds2 = BDIGITS(y);
- hibits1 = hibitsx;
- hibits2 = hibitsy;
-
- if (!hibits1)
- n2 = n1;
-
- z = bignew(n2, 0);
+ if (RBIGNUM_LEN(x) > RBIGNUM_LEN(y)) {
+ l1 = RBIGNUM_LEN(y);
+ l2 = RBIGNUM_LEN(x);
+ ds1 = BDIGITS(y);
+ ds2 = BDIGITS(x);
+ sign = RBIGNUM_SIGN(y);
+ }
+ else {
+ l1 = RBIGNUM_LEN(x);
+ l2 = RBIGNUM_LEN(y);
+ ds1 = BDIGITS(x);
+ ds2 = BDIGITS(y);
+ sign = RBIGNUM_SIGN(x);
+ }
+ z = bignew(l2, RBIGNUM_SIGN(x) || RBIGNUM_SIGN(y));
zds = BDIGITS(z);
- for (i=0; i<n1; i++) {
+ for (i=0; i<l1; i++) {
zds[i] = ds1[i] & ds2[i];
}
- for (; i<n2; i++) {
- zds[i] = hibits1 & ds2[i];
+ for (; i<l2; i++) {
+ zds[i] = sign?0:ds2[i];
}
- twocomp2abs_bang(z, hibits1 && hibits2);
- RB_GC_GUARD(x);
- RB_GC_GUARD(y);
+ if (!RBIGNUM_SIGN(z)) get2comp(z);
return bignorm(z);
}
static VALUE
-bigor_int(VALUE x, long xn, BDIGIT hibitsx, long y)
+bigor_int(VALUE x, long y)
{
VALUE z;
BDIGIT *xds, *zds;
- long zn;
+ long xn, zn;
long i;
- BDIGIT hibitsy;
+ char sign;
- if (y == -1) return INT2FIX(-1);
- if (xn == 0) return hibitsx ? INT2FIX(-1) : LONG2FIX(y);
- hibitsy = 0 <= y ? 0 : BDIGMAX;
+ sign = (y >= 0);
xds = BDIGITS(x);
-
- zn = RBIGNUM_LEN(x);
-#if SIZEOF_BDIGITS < SIZEOF_LONG
- if (zn < bdigit_roomof(SIZEOF_LONG))
- zn = bdigit_roomof(SIZEOF_LONG);
-#endif
- z = bignew(zn, 0);
+ zn = xn = RBIGNUM_LEN(x);
+ z = bignew(zn, RBIGNUM_SIGN(x) && sign);
zds = BDIGITS(z);
-#if SIZEOF_BDIGITS >= SIZEOF_LONG
+#if SIZEOF_BDIGITS == SIZEOF_LONG
i = 1;
- zds[0] = xds[0] | BIGLO(y);
- if (i < zn)
- goto y_is_fixed_point;
- goto finish;
+ zds[0] = xds[0] | y;
#else
- for (i=0; i < xn; i++) {
- if (y == 0 || y == -1) goto y_is_fixed_point;
- zds[i] = xds[i] | BIGLO(y);
- y = BIGDN(y);
- }
- if (hibitsx)
- goto fill_hibits;
- for (; i < zn; i++) {
- if (y == 0 || y == -1) goto y_is_fixed_point;
- zds[i] = BIGLO(y);
- y = BIGDN(y);
- }
- goto finish;
-#endif
+ {
+ BDIGIT_DBL num = y;
- y_is_fixed_point:
- if (hibitsy)
- goto fill_hibits;
- for (; i < xn; i++) {
- zds[i] = xds[i];
- }
- if (hibitsx)
- goto fill_hibits;
- for (; i < zn; i++) {
- zds[i] = 0;
+ for (i=0; i<(int)(sizeof(y)/sizeof(BDIGIT)); i++) {
+ zds[i] = xds[i] | BIGLO(num);
+ num = BIGDN(num);
+ }
}
- goto finish;
-
- fill_hibits:
- for (; i < zn; i++) {
- zds[i] = BDIGMAX;
+#endif
+ while (i < xn) {
+ zds[i] = sign?xds[i]:(BDIGIT)(BIGRAD-1);
+ i++;
}
-
- finish:
- twocomp2abs_bang(z, hibitsx || hibitsy);
- RB_GC_GUARD(x);
+ if (!RBIGNUM_SIGN(z)) get2comp(z);
return bignorm(z);
}
@@ -6603,96 +3349,91 @@ bigor_int(VALUE x, long xn, BDIGIT hibitsx, long y)
*/
VALUE
-rb_big_or(VALUE x, VALUE y)
+rb_big_or(VALUE xx, VALUE yy)
{
- VALUE z;
+ volatile VALUE x, y, z;
BDIGIT *ds1, *ds2, *zds;
- long i, xn, yn, n1, n2;
- BDIGIT hibitsx, hibitsy;
- BDIGIT hibits1, hibits2;
- VALUE tmpv;
- BDIGIT tmph;
- long tmpn;
+ long i, l1, l2;
+ char sign;
- if (!FIXNUM_P(y) && !RB_BIGNUM_TYPE_P(y)) {
- return rb_num_coerce_bit(x, y, '|');
+ if (!FIXNUM_P(yy) && !RB_TYPE_P(yy, T_BIGNUM)) {
+ return rb_num_coerce_bit(xx, yy, '|');
}
- hibitsx = abs2twocomp(&x, &xn);
+ x = xx;
+ y = yy;
+
+ if (!RBIGNUM_SIGN(x)) {
+ x = rb_big_clone(x);
+ get2comp(x);
+ }
if (FIXNUM_P(y)) {
- return bigor_int(x, xn, hibitsx, FIX2LONG(y));
+ return bigor_int(x, FIX2LONG(y));
}
- hibitsy = abs2twocomp(&y, &yn);
- if (xn > yn) {
- tmpv = x; x = y; y = tmpv;
- tmpn = xn; xn = yn; yn = tmpn;
- tmph = hibitsx; hibitsx = hibitsy; hibitsy = tmph;
+ if (!RBIGNUM_SIGN(y)) {
+ y = rb_big_clone(y);
+ get2comp(y);
}
- n1 = xn;
- n2 = yn;
- ds1 = BDIGITS(x);
- ds2 = BDIGITS(y);
- hibits1 = hibitsx;
- hibits2 = hibitsy;
-
- if (hibits1)
- n2 = n1;
-
- z = bignew(n2, 0);
+ if (RBIGNUM_LEN(x) > RBIGNUM_LEN(y)) {
+ l1 = RBIGNUM_LEN(y);
+ l2 = RBIGNUM_LEN(x);
+ ds1 = BDIGITS(y);
+ ds2 = BDIGITS(x);
+ sign = RBIGNUM_SIGN(y);
+ }
+ else {
+ l1 = RBIGNUM_LEN(x);
+ l2 = RBIGNUM_LEN(y);
+ ds1 = BDIGITS(x);
+ ds2 = BDIGITS(y);
+ sign = RBIGNUM_SIGN(x);
+ }
+ z = bignew(l2, RBIGNUM_SIGN(x) && RBIGNUM_SIGN(y));
zds = BDIGITS(z);
- for (i=0; i<n1; i++) {
+ for (i=0; i<l1; i++) {
zds[i] = ds1[i] | ds2[i];
}
- for (; i<n2; i++) {
- zds[i] = hibits1 | ds2[i];
+ for (; i<l2; i++) {
+ zds[i] = sign?ds2[i]:(BDIGIT)(BIGRAD-1);
}
- twocomp2abs_bang(z, hibits1 || hibits2);
- RB_GC_GUARD(x);
- RB_GC_GUARD(y);
+ if (!RBIGNUM_SIGN(z)) get2comp(z);
return bignorm(z);
}
static VALUE
-bigxor_int(VALUE x, long xn, BDIGIT hibitsx, long y)
+bigxor_int(VALUE x, long y)
{
VALUE z;
BDIGIT *xds, *zds;
- long zn;
+ long xn, zn;
long i;
- BDIGIT hibitsy;
+ char sign;
- hibitsy = 0 <= y ? 0 : BDIGMAX;
+ sign = (y >= 0) ? 1 : 0;
xds = BDIGITS(x);
- zn = RBIGNUM_LEN(x);
-#if SIZEOF_BDIGITS < SIZEOF_LONG
- if (zn < bdigit_roomof(SIZEOF_LONG))
- zn = bdigit_roomof(SIZEOF_LONG);
-#endif
- z = bignew(zn, 0);
+ zn = xn = RBIGNUM_LEN(x);
+ z = bignew(zn, !(RBIGNUM_SIGN(x) ^ sign));
zds = BDIGITS(z);
-#if SIZEOF_BDIGITS >= SIZEOF_LONG
+#if SIZEOF_BDIGITS == SIZEOF_LONG
i = 1;
- zds[0] = xds[0] ^ BIGLO(y);
+ zds[0] = xds[0] ^ y;
#else
- for (i = 0; i < xn; i++) {
- zds[i] = xds[i] ^ BIGLO(y);
- y = BIGDN(y);
- }
- for (; i < zn; i++) {
- zds[i] = hibitsx ^ BIGLO(y);
- y = BIGDN(y);
+ {
+ BDIGIT_DBL num = y;
+
+ for (i=0; i<(int)(sizeof(y)/sizeof(BDIGIT)); i++) {
+ zds[i] = xds[i] ^ BIGLO(num);
+ num = BIGDN(num);
+ }
}
#endif
- for (; i < xn; i++) {
- zds[i] = xds[i] ^ hibitsy;
- }
- for (; i < zn; i++) {
- zds[i] = hibitsx ^ hibitsy;
+ while (i < xn) {
+ zds[i] = sign?xds[i]:~xds[i];
+ i++;
}
- twocomp2abs_bang(z, (hibitsx ^ hibitsy) != 0);
- RB_GC_GUARD(x);
+ if (!RBIGNUM_SIGN(z)) get2comp(z);
return bignorm(z);
}
/*
@@ -6703,53 +3444,72 @@ bigxor_int(VALUE x, long xn, BDIGIT hibitsx, long y)
*/
VALUE
-rb_big_xor(VALUE x, VALUE y)
+rb_big_xor(VALUE xx, VALUE yy)
{
+ volatile VALUE x, y;
VALUE z;
BDIGIT *ds1, *ds2, *zds;
- long i, xn, yn, n1, n2;
- BDIGIT hibitsx, hibitsy;
- BDIGIT hibits1, hibits2;
- VALUE tmpv;
- BDIGIT tmph;
- long tmpn;
+ long i, l1, l2;
+ char sign;
- if (!FIXNUM_P(y) && !RB_BIGNUM_TYPE_P(y)) {
- return rb_num_coerce_bit(x, y, '^');
+ if (!FIXNUM_P(yy) && !RB_TYPE_P(yy, T_BIGNUM)) {
+ return rb_num_coerce_bit(xx, yy, '^');
}
- hibitsx = abs2twocomp(&x, &xn);
+ x = xx;
+ y = yy;
+
+ if (!RBIGNUM_SIGN(x)) {
+ x = rb_big_clone(x);
+ get2comp(x);
+ }
if (FIXNUM_P(y)) {
- return bigxor_int(x, xn, hibitsx, FIX2LONG(y));
+ return bigxor_int(x, FIX2LONG(y));
}
- hibitsy = abs2twocomp(&y, &yn);
- if (xn > yn) {
- tmpv = x; x = y; y = tmpv;
- tmpn = xn; xn = yn; yn = tmpn;
- tmph = hibitsx; hibitsx = hibitsy; hibitsy = tmph;
- }
- n1 = xn;
- n2 = yn;
- ds1 = BDIGITS(x);
- ds2 = BDIGITS(y);
- hibits1 = hibitsx;
- hibits2 = hibitsy;
-
- z = bignew(n2, 0);
+ if (!RBIGNUM_SIGN(y)) {
+ y = rb_big_clone(y);
+ get2comp(y);
+ }
+ if (RBIGNUM_LEN(x) > RBIGNUM_LEN(y)) {
+ l1 = RBIGNUM_LEN(y);
+ l2 = RBIGNUM_LEN(x);
+ ds1 = BDIGITS(y);
+ ds2 = BDIGITS(x);
+ sign = RBIGNUM_SIGN(y);
+ }
+ else {
+ l1 = RBIGNUM_LEN(x);
+ l2 = RBIGNUM_LEN(y);
+ ds1 = BDIGITS(x);
+ ds2 = BDIGITS(y);
+ sign = RBIGNUM_SIGN(x);
+ }
+ RBIGNUM_SET_SIGN(x, RBIGNUM_SIGN(x)?1:0);
+ RBIGNUM_SET_SIGN(y, RBIGNUM_SIGN(y)?1:0);
+ z = bignew(l2, !(RBIGNUM_SIGN(x) ^ RBIGNUM_SIGN(y)));
zds = BDIGITS(z);
- for (i=0; i<n1; i++) {
+ for (i=0; i<l1; i++) {
zds[i] = ds1[i] ^ ds2[i];
}
- for (; i<n2; i++) {
- zds[i] = hibitsx ^ ds2[i];
+ for (; i<l2; i++) {
+ zds[i] = sign?ds2[i]:~ds2[i];
}
- twocomp2abs_bang(z, (hibits1 ^ hibits2) != 0);
- RB_GC_GUARD(x);
- RB_GC_GUARD(y);
+ if (!RBIGNUM_SIGN(z)) get2comp(z);
+
return bignorm(z);
}
+static VALUE
+check_shiftdown(VALUE y, VALUE x)
+{
+ if (!RBIGNUM_LEN(x)) return INT2FIX(0);
+ if (RBIGNUM_LEN(y) > SIZEOF_LONG / SIZEOF_BDIGITS) {
+ return RBIGNUM_SIGN(x) ? INT2FIX(0) : INT2FIX(-1);
+ }
+ return Qnil;
+}
+
/*
* call-seq:
* big << numeric -> integer
@@ -6760,33 +3520,59 @@ rb_big_xor(VALUE x, VALUE y)
VALUE
rb_big_lshift(VALUE x, VALUE y)
{
- int lshift_p;
- size_t shift_numdigits;
- int shift_numbits;
+ long shift;
+ int neg = 0;
for (;;) {
if (FIXNUM_P(y)) {
- long l = FIX2LONG(y);
- unsigned long shift;
- if (0 <= l) {
- lshift_p = 1;
- shift = l;
- }
- else {
- lshift_p = 0;
- shift = 1+(unsigned long)(-(l+1));
+ shift = FIX2LONG(y);
+ if (shift < 0) {
+ neg = 1;
+ shift = -shift;
}
- shift_numbits = (int)(shift & (BITSPERDIG-1));
- shift_numdigits = shift >> bit_length(BITSPERDIG-1);
- return bignorm(big_shift3(x, lshift_p, shift_numdigits, shift_numbits));
+ break;
}
- else if (RB_BIGNUM_TYPE_P(y)) {
- return bignorm(big_shift2(x, 1, y));
+ else if (RB_TYPE_P(y, T_BIGNUM)) {
+ if (!RBIGNUM_SIGN(y)) {
+ VALUE t = check_shiftdown(y, x);
+ if (!NIL_P(t)) return t;
+ neg = 1;
+ }
+ shift = big2ulong(y, "long", TRUE);
+ break;
}
y = rb_to_int(y);
}
+
+ x = neg ? big_rshift(x, shift) : big_lshift(x, shift);
+ return bignorm(x);
}
+static VALUE
+big_lshift(VALUE x, unsigned long shift)
+{
+ BDIGIT *xds, *zds;
+ long s1 = shift/BITSPERDIG;
+ int s2 = (int)(shift%BITSPERDIG);
+ VALUE z;
+ BDIGIT_DBL num = 0;
+ long len, i;
+
+ len = RBIGNUM_LEN(x);
+ z = bignew(len+s1+1, RBIGNUM_SIGN(x));
+ zds = BDIGITS(z);
+ for (i=0; i<s1; i++) {
+ *zds++ = 0;
+ }
+ xds = BDIGITS(x);
+ for (i=0; i<len; i++) {
+ num = num | (BDIGIT_DBL)*xds++<<s2;
+ *zds++ = BIGLO(num);
+ num = BIGDN(num);
+ }
+ *zds = BIGLO(num);
+ return z;
+}
/*
* call-seq:
@@ -6798,31 +3584,79 @@ rb_big_lshift(VALUE x, VALUE y)
VALUE
rb_big_rshift(VALUE x, VALUE y)
{
- int lshift_p;
- size_t shift_numdigits;
- int shift_numbits;
+ long shift;
+ int neg = 0;
for (;;) {
if (FIXNUM_P(y)) {
- long l = FIX2LONG(y);
- unsigned long shift;
- if (0 <= l) {
- lshift_p = 0;
- shift = l;
- }
- else {
- lshift_p = 1;
- shift = 1+(unsigned long)(-(l+1));
+ shift = FIX2LONG(y);
+ if (shift < 0) {
+ neg = 1;
+ shift = -shift;
}
- shift_numbits = (int)(shift & (BITSPERDIG-1));
- shift_numdigits = shift >> bit_length(BITSPERDIG-1);
- return bignorm(big_shift3(x, lshift_p, shift_numdigits, shift_numbits));
+ break;
}
- else if (RB_BIGNUM_TYPE_P(y)) {
- return bignorm(big_shift2(x, 0, y));
+ else if (RB_TYPE_P(y, T_BIGNUM)) {
+ if (RBIGNUM_SIGN(y)) {
+ VALUE t = check_shiftdown(y, x);
+ if (!NIL_P(t)) return t;
+ }
+ else {
+ neg = 1;
+ }
+ shift = big2ulong(y, "long", TRUE);
+ break;
}
y = rb_to_int(y);
}
+
+ x = neg ? big_lshift(x, shift) : big_rshift(x, shift);
+ return bignorm(x);
+}
+
+static VALUE
+big_rshift(VALUE x, unsigned long shift)
+{
+ BDIGIT *xds, *zds;
+ long s1 = shift/BITSPERDIG;
+ int s2 = (int)(shift%BITSPERDIG);
+ VALUE z;
+ BDIGIT_DBL num = 0;
+ long i, j;
+ volatile VALUE save_x;
+
+ if (s1 > RBIGNUM_LEN(x)) {
+ if (RBIGNUM_SIGN(x))
+ return INT2FIX(0);
+ else
+ return INT2FIX(-1);
+ }
+ if (!RBIGNUM_SIGN(x)) {
+ x = rb_big_clone(x);
+ get2comp(x);
+ }
+ save_x = x;
+ xds = BDIGITS(x);
+ i = RBIGNUM_LEN(x); j = i - s1;
+ if (j == 0) {
+ if (RBIGNUM_SIGN(x)) return INT2FIX(0);
+ else return INT2FIX(-1);
+ }
+ z = bignew(j, RBIGNUM_SIGN(x));
+ if (!RBIGNUM_SIGN(x)) {
+ num = ((BDIGIT_DBL)~0) << BITSPERDIG;
+ }
+ zds = BDIGITS(z);
+ while (i--, j--) {
+ num = (num | xds[i]) >> s2;
+ zds[j] = BIGLO(num);
+ num = BIGUP(xds[i]);
+ }
+ if (!RBIGNUM_SIGN(x)) {
+ get2comp(z);
+ }
+ RB_GC_GUARD(save_x);
+ return z;
}
/*
@@ -6848,40 +3682,42 @@ static VALUE
rb_big_aref(VALUE x, VALUE y)
{
BDIGIT *xds;
- unsigned long shift;
+ BDIGIT_DBL num;
+ VALUE shift;
long i, s1, s2;
- BDIGIT bit;
- if (RB_BIGNUM_TYPE_P(y)) {
+ if (RB_TYPE_P(y, T_BIGNUM)) {
if (!RBIGNUM_SIGN(y))
return INT2FIX(0);
bigtrunc(y);
- if (BIGSIZE(y) > sizeof(long)) {
+ if (RBIGNUM_LEN(y) > DIGSPERLONG) {
out_of_range:
return RBIGNUM_SIGN(x) ? INT2FIX(0) : INT2FIX(1);
}
- shift = big2ulong(y, "long");
+ shift = big2ulong(y, "long", FALSE);
}
else {
i = NUM2LONG(y);
if (i < 0) return INT2FIX(0);
- shift = i;
+ shift = (VALUE)i;
}
s1 = shift/BITSPERDIG;
s2 = shift%BITSPERDIG;
- bit = (BDIGIT)1 << s2;
if (s1 >= RBIGNUM_LEN(x)) goto out_of_range;
-
- xds = BDIGITS(x);
- if (RBIGNUM_POSITIVE_P(x))
- return (xds[s1] & bit) ? INT2FIX(1) : INT2FIX(0);
- if (xds[s1] & (bit-1))
- return (xds[s1] & bit) ? INT2FIX(0) : INT2FIX(1);
- for (i = 0; i < s1; i++)
- if (xds[i])
- return (xds[s1] & bit) ? INT2FIX(0) : INT2FIX(1);
- return (xds[s1] & bit) ? INT2FIX(1) : INT2FIX(0);
+ if (!RBIGNUM_SIGN(x)) {
+ xds = BDIGITS(x);
+ i = 0; num = 1;
+ while (num += ~xds[i], ++i <= s1) {
+ num = BIGDN(num);
+ }
+ }
+ else {
+ num = BDIGITS(x)[s1];
+ }
+ if (num & ((BDIGIT_DBL)1<<s2))
+ return INT2FIX(1);
+ return INT2FIX(0);
}
/*
@@ -6901,17 +3737,7 @@ rb_big_hash(VALUE x)
}
/*
- * call-seq:
- * big.coerce(numeric) -> array
- *
- * Returns an array with both a +numeric+ and a +big+ represented as Bignum
- * objects.
- *
- * This is achieved by converting +numeric+ to a Bignum.
- *
- * A TypeError is raised if the +numeric+ is not a Fixnum or Bignum type.
- *
- * (0x3FFFFFFFFFFFFFFF+1).coerce(42) #=> [42, 4611686018427387904]
+ * MISSING: documentation
*/
static VALUE
@@ -6920,7 +3746,7 @@ rb_big_coerce(VALUE x, VALUE y)
if (FIXNUM_P(y)) {
y = rb_int2big(FIX2LONG(y));
}
- else if (!RB_BIGNUM_TYPE_P(y)) {
+ else if (!RB_TYPE_P(y, T_BIGNUM)) {
rb_raise(rb_eTypeError, "can't coerce %s to Bignum",
rb_obj_classname(y));
}
@@ -6930,7 +3756,6 @@ rb_big_coerce(VALUE x, VALUE y)
/*
* call-seq:
* big.abs -> aBignum
- * big.magnitude -> aBignum
*
* Returns the absolute value of <i>big</i>.
*
@@ -6962,79 +3787,7 @@ rb_big_abs(VALUE x)
static VALUE
rb_big_size(VALUE big)
{
- return SIZET2NUM(BIGSIZE(big));
-}
-
-/*
- * call-seq:
- * int.bit_length -> integer
- *
- * Returns the number of bits of the value of <i>int</i>.
- *
- * "the number of bits" means that
- * the bit position of the highest bit which is different to the sign bit.
- * (The bit position of the bit 2**n is n+1.)
- * If there is no such bit (zero or minus one), zero is returned.
- *
- * I.e. This method returns ceil(log2(int < 0 ? -int : int+1)).
- *
- * (-2**10000-1).bit_length #=> 10001
- * (-2**10000).bit_length #=> 10000
- * (-2**10000+1).bit_length #=> 10000
- *
- * (-2**1000-1).bit_length #=> 1001
- * (-2**1000).bit_length #=> 1000
- * (-2**1000+1).bit_length #=> 1000
- *
- * (2**1000-1).bit_length #=> 1000
- * (2**1000).bit_length #=> 1001
- * (2**1000+1).bit_length #=> 1001
- *
- * (2**10000-1).bit_length #=> 10000
- * (2**10000).bit_length #=> 10001
- * (2**10000+1).bit_length #=> 10001
- *
- */
-
-static VALUE
-rb_big_bit_length(VALUE big)
-{
- int nlz_bits;
- size_t numbytes;
-
- static const BDIGIT char_bit[1] = { CHAR_BIT };
- BDIGIT numbytes_bary[bdigit_roomof(sizeof(size_t))];
- BDIGIT nlz_bary[1];
- BDIGIT result_bary[bdigit_roomof(sizeof(size_t)+1)];
-
- numbytes = rb_absint_size(big, &nlz_bits);
-
- if (numbytes == 0)
- return LONG2FIX(0);
-
- if (RBIGNUM_NEGATIVE_P(big) && rb_absint_singlebit_p(big)) {
- if (nlz_bits != CHAR_BIT-1) {
- nlz_bits++;
- }
- else {
- nlz_bits = 0;
- numbytes--;
- }
- }
-
- if (numbytes <= SIZE_MAX / CHAR_BIT) {
- return SIZET2NUM(numbytes * CHAR_BIT - nlz_bits);
- }
-
- nlz_bary[0] = nlz_bits;
-
- bary_unpack(BARY_ARGS(numbytes_bary), &numbytes, 1, sizeof(numbytes), 0,
- INTEGER_PACK_NATIVE_BYTE_ORDER);
- BARY_SHORT_MUL(result_bary, numbytes_bary, char_bit);
- BARY_SUB(result_bary, result_bary, nlz_bary);
-
- return rb_integer_unpack(result_bary, numberof(result_bary), sizeof(BDIGIT), 0,
- INTEGER_PACK_LSWORD_FIRST|INTEGER_PACK_NATIVE_BYTE_ORDER);
+ return LONG2FIX(RBIGNUM_LEN(big)*SIZEOF_BDIGITS);
}
/*
@@ -7047,7 +3800,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 (BDIGITS(num)[0] & 1) {
return Qtrue;
}
return Qfalse;
@@ -7063,7 +3816,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 (BDIGITS(num)[0] & 1) {
return Qfalse;
}
return Qtrue;
@@ -7128,13 +3881,11 @@ Init_Bignum(void)
rb_define_method(rb_cBignum, "abs", rb_big_abs, 0);
rb_define_method(rb_cBignum, "magnitude", rb_big_abs, 0);
rb_define_method(rb_cBignum, "size", rb_big_size, 0);
- rb_define_method(rb_cBignum, "bit_length", rb_big_bit_length, 0);
rb_define_method(rb_cBignum, "odd?", rb_big_odd_p, 0);
rb_define_method(rb_cBignum, "even?", rb_big_even_p, 0);
-#ifdef USE_GMP
- rb_define_const(rb_cBignum, "GMP_VERSION", rb_sprintf("GMP %s", gmp_version));
-#endif
-
power_cache_init();
+
+ big_three = rb_uint2big(3);
+ rb_gc_register_mark_object(big_three);
}
diff --git a/bin/erb b/bin/erb
index 6a7ea7d593..6b92ac2284 100755
--- a/bin/erb
+++ b/bin/erb
@@ -72,7 +72,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 =~ /^[0-4]$/
safe_level = arg.to_i
when '-T' # trim mode
arg = ARGV.req_arg
@@ -105,7 +105,7 @@ class ERB
-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..4)
-E ex[:in] set default external/internal encodings
-U set default encoding to UTF-8.
-T trim_mode specify trim_mode (0..2, -)
diff --git a/bin/irb b/bin/irb
index c64ee85fbd..6c8465c802 100755
--- a/bin/irb
+++ b/bin/irb
@@ -8,4 +8,13 @@
require "irb"
-IRB.start(__FILE__)
+if __FILE__ == $0
+ IRB.start(__FILE__)
+else
+ # check -e option
+ if /^-e$/ =~ $0
+ IRB.start(__FILE__)
+ else
+ IRB.setup(__FILE__)
+ end
+end
diff --git a/bin/rake b/bin/rake
index 4e0bbb7b7a..6aad2f0df3 100755
--- a/bin/rake
+++ b/bin/rake
@@ -28,6 +28,10 @@ begin
rescue LoadError
end
+module Rake
+ REDUCE_COMPAT = true if ARGV.include?("--reduce-compat")
+end
+
require 'rake'
Rake.application.run
diff --git a/bootstraptest/runner.rb b/bootstraptest/runner.rb
index 5fdfc42a63..08c335ae42 100755
--- a/bootstraptest/runner.rb
+++ b/bootstraptest/runner.rb
@@ -62,7 +62,6 @@ def main
@verbose = false
$stress = false
@color = nil
- @tty = nil
@quiet = false
dir = nil
quiet = false
@@ -88,10 +87,6 @@ def main
warn "unknown --color argument: #$3" if $3
@color = $1 ? nil : !$2
true
- when /\A--tty(=(?:yes|(no)|(.*)))?\z/
- warn "unknown --tty argument: #$3" if $3
- @tty = !$1 || !$2
- true
when /\A(-q|--q(uiet))\z/
quiet = true
@quiet = true
@@ -128,7 +123,7 @@ End
@progress = %w[- \\ | /]
@progress_bs = "\b" * @progress[0].size
- @tty = $stderr.tty? if @tty.nil?
+ @tty = $stderr.tty?
case @color
when nil
@color = @tty && /dumb/ !~ ENV["TERM"]
@@ -183,20 +178,20 @@ def exec_test(pathes)
$stderr.print "#{@progress_bs}#{@failed}FAIL #{@error-error}/#{@count-count}#{@reset}"
end
end
- $stderr.puts unless @quiet and @tty
+ $stderr.puts unless @quiet
end
if @error == 0
if @count == 0
$stderr.puts "No tests, no problem"
else
- $stderr.puts "#{@passed}PASS#{@reset} all #{@count} tests"
+ $stderr.puts "PASS all #{@count} tests"
end
exit true
else
@errbuf.each do |msg|
$stderr.puts msg
end
- $stderr.puts "#{@failed}FAIL#{@reset} #{@error}/#{@count} tests failed"
+ $stderr.puts "FAIL #{@error}/#{@count} tests failed"
exit false
end
end
@@ -321,7 +316,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)
@@ -407,7 +402,7 @@ def get_result_string(src, opt = '')
begin
`#{@ruby} -W0 #{opt} #{filename}`
ensure
- raise Interrupt if $? and $?.signaled? && $?.termsig == Signal.list["INT"]
+ raise Interrupt if $?.signaled? && $?.termsig == Signal.list["INT"]
raise CoreDumpError, "core dumped" if $? and $?.coredump?
end
else
diff --git a/bootstraptest/test_autoload.rb b/bootstraptest/test_autoload.rb
index a9f8e6dacd..e8df6684b6 100644
--- a/bootstraptest/test_autoload.rb
+++ b/bootstraptest/test_autoload.rb
@@ -43,6 +43,46 @@ assert_equal 'ok', %q{
ZZZ.ok
}
+assert_equal 'ok', %q{
+ open("zzz.rb", "w") {|f| f.puts "class ZZZ; def self.ok;:ok;end;end"}
+ autoload :ZZZ, "./zzz.rb"
+ proc{$SAFE=4; ZZZ.ok}.call
+}
+
+assert_equal 'ok', %q{
+ open("zzz.rb", "w") {|f| f.puts "class ZZZ; def self.ok;:ok;end;end"}
+ autoload :ZZZ, "./zzz.rb"
+ require "./zzz.rb"
+ proc{$SAFE=4; ZZZ.ok}.call
+}
+
+assert_equal 'ok', %q{
+ open("zzz.rb", "w") {|f| f.puts "class ZZZ; def hoge;:ok;end;end"}
+ autoload :ZZZ, File.join(Dir.pwd, 'zzz.rb')
+ module M; end
+ Thread.new{M.instance_eval('$SAFE=4; ZZZ.new.hoge')}.value
+}
+
+assert_equal 'ok', %q{
+ open("zzz.rb", "w") {|f| f.puts "class ZZZ; def hoge;:ok;end;end"}
+ autoload :ZZZ, File.join(Dir.pwd, 'zzz.rb')
+ module M; end
+ Thread.new{$SAFE=4; M.instance_eval('ZZZ.new.hoge')}.value
+}
+
+assert_equal 'ok', %q{
+ open("zzz.rb", "w") {|f| f.puts "class ZZZ; def hoge;:ok;end;end"}
+ autoload :ZZZ, File.join(Dir.pwd, 'zzz.rb')
+ Thread.new{$SAFE=4; eval('ZZZ.new.hoge')}.value
+}
+
+assert_equal 'ok', %q{
+ open("zzz.rb", "w") {|f| f.puts "class ZZZ; def hoge;:ok;end;end"}
+ autoload :ZZZ, File.join(Dir.pwd, 'zzz.rb')
+ module M; end
+ Thread.new{eval('$SAFE=4; ZZZ.new.hoge')}.value
+}
+
assert_equal 'okok', %q{
open("zzz.rb", "w") {|f| f.puts "class ZZZ; def self.ok;:ok;end;end"}
autoload :ZZZ, "./zzz.rb"
diff --git a/bootstraptest/test_class.rb b/bootstraptest/test_class.rb
index b7fe0a1acd..664dd2f166 100644
--- a/bootstraptest/test_class.rb
+++ b/bootstraptest/test_class.rb
@@ -11,16 +11,6 @@ assert_equal 'C', %q( class C; end
C.new.class.name )
assert_equal 'Class', %q( class C; end
C.new.class.class )
-assert_equal 'true', %q( Object.__send__(:remove_const, :TrueClass)
- GC.start
- true.inspect)
-assert_equal 'false', %q( Object.__send__(:remove_const, :FalseClass)
- GC.start
- false.inspect)
-assert_equal 'nil', %q( Object.__send__(:remove_const, :NilClass)
- GC.start
- nil.inspect)
-
# inherited class
assert_equal 'true', %q( class A; end
diff --git a/bootstraptest/test_literal.rb b/bootstraptest/test_literal.rb
index b95a2f2d0a..5a9497c642 100644
--- a/bootstraptest/test_literal.rb
+++ b/bootstraptest/test_literal.rb
@@ -224,8 +224,3 @@ assert_equal 'ok', %q{ # long hash literal (optimized)
eval "a = {#{(1..10_000).map{|n| "#{n} => #{n}"}.join(', ')}}"
:ok
}
-
-assert_equal 'ok', %q{
- [print(:ok), exit] # void literal with side-effect
- :dummy
-}
diff --git a/bootstraptest/test_literal_suffix.rb b/bootstraptest/test_literal_suffix.rb
deleted file mode 100644
index 4316c9e040..0000000000
--- a/bootstraptest/test_literal_suffix.rb
+++ /dev/null
@@ -1,54 +0,0 @@
-# numbers with suffix
-assert_equal '0/1', '0r'
-assert_equal 'Rational', '0r.class'
-assert_equal '1/1', '1r'
-assert_equal 'Rational', '1r.class'
-assert_equal '-1/1', '-1r'
-assert_equal 'Rational', '(-1r).class'
-assert_equal '1/1', '0x1r'
-assert_equal 'Rational', '0x1r.class'
-assert_equal '1/1', '0b1r'
-assert_equal 'Rational', '0b1r.class'
-assert_equal '1/1', '0d1r'
-assert_equal 'Rational', '0d1r.class'
-assert_equal '1/1', '0o1r'
-assert_equal 'Rational', '0o1r.class'
-assert_equal '1/1', '01r'
-assert_equal 'Rational', '01r.class'
-assert_equal '6/5', '1.2r'
-assert_equal 'Rational', '1.2r.class'
-assert_equal '-6/5', '-1.2r'
-assert_equal 'Rational', '(-1.2r).class'
-assert_equal '0+0i', '0i'
-assert_equal 'Complex', '0i.class'
-assert_equal '0+1i', '1i'
-assert_equal 'Complex', '1i.class'
-assert_equal '0+1i', '0x1i'
-assert_equal 'Complex', '0x1i.class'
-assert_equal '0+1i', '0b1i'
-assert_equal 'Complex', '0b1i.class'
-assert_equal '0+1i', '0d1i'
-assert_equal 'Complex', '0d1i.class'
-assert_equal '0+1i', '0o1i'
-assert_equal 'Complex', '0o1i.class'
-assert_equal '0+1i', '01i'
-assert_equal 'Complex', '01i.class'
-assert_equal '0+1.2i', '1.2i'
-assert_equal 'Complex', '1.2i.class'
-assert_equal '0+1/1i', '1ri'
-assert_equal 'Complex', '1ri.class'
-assert_equal '0+6/5i', '1.2ri'
-assert_equal 'Complex', '1.2ri.class'
-assert_equal '0+10.0i', '1e1i'
-assert_equal 'Complex', '1e1i.class'
-assert_equal '1', '1if true'
-assert_equal '1', '1rescue nil'
-assert_equal '10000000000000000001/10000000000000000000',
- '1.0000000000000000001r'
-
-assert_equal 'syntax error, unexpected tIDENTIFIER, expecting end-of-input',
- %q{begin eval('1ir', nil, '', 0); rescue SyntaxError => e; e.message[/\A:(?:\d+:)? (.*)/, 1] end}
-assert_equal 'syntax error, unexpected tIDENTIFIER, expecting end-of-input',
- %q{begin eval('1.2ir', nil, '', 0); rescue SyntaxError => e; e.message[/\A:(?:\d+:)? (.*)/, 1] end}
-assert_equal 'syntax error, unexpected tIDENTIFIER, expecting end-of-input',
- %q{begin eval('1e1r', nil, '', 0); rescue SyntaxError => e; e.message[/\A:(?:\d+:)? (.*)/, 1] end}
diff --git a/bootstraptest/test_method.rb b/bootstraptest/test_method.rb
index 4282bc6273..ed22608aea 100644
--- a/bootstraptest/test_method.rb
+++ b/bootstraptest/test_method.rb
@@ -886,6 +886,50 @@ class C0; def m *args; [:C0_m, args]; end; end
class C1 < C0; def m a, o=:o; super; end; end
; C1.new.m 1, 2}
+assert_equal %q{[:ok, :ok, :ok, :ok, :ok, :ok, :ng, :ng]}, %q{
+ $ans = []
+ class Foo
+ def m
+ end
+ end
+
+ c1 = c2 = nil
+
+ lambda{
+ $SAFE = 4
+ c1 = Class.new{
+ def m
+ end
+ }
+ c2 = Class.new(Foo){
+ alias mm m
+ }
+ }.call
+
+ def test
+ begin
+ yield
+ rescue SecurityError
+ $ans << :ok
+ else
+ $ans << :ng
+ end
+ end
+
+ o1 = c1.new
+ o2 = c2.new
+
+ test{o1.m}
+ test{o2.mm}
+ test{o1.send :m}
+ test{o2.send :mm}
+ test{o1.public_send :m}
+ test{o2.public_send :mm}
+ test{o1.method(:m).call}
+ test{o2.method(:mm).call}
+ $ans
+}
+
assert_equal 'ok', %q{
class C
def x=(n)
diff --git a/bootstraptest/test_thread.rb b/bootstraptest/test_thread.rb
index 7baa806a45..121def8b42 100644
--- a/bootstraptest/test_thread.rb
+++ b/bootstraptest/test_thread.rb
@@ -10,8 +10,7 @@ assert_equal %q{ok}, %q{
:ok
}.value
}
-assert_equal %q{ok}, %q{
-begin
+assert_equal %q{20100}, %q{
v = 0
(1..200).map{|i|
Thread.new{
@@ -20,10 +19,7 @@ begin
}.each{|t|
v += t.value
}
- v == 20100 ? :ok : v
-rescue ThreadError => e
- :ok if /can't create Thread/ =~ e.message
-end
+ v
}
assert_equal %q{5000}, %q{
5000.times{|e|
@@ -45,17 +41,13 @@ assert_equal %q{5000}, %q{
}
}
}
-assert_equal %q{ok}, %q{
-begin
- :ok if 5000 == 5000.times{
+assert_equal %q{5000}, %q{
+ 5000.times{
t = Thread.new{}
while t.alive?
Thread.pass
end
}
-rescue NoMemoryError
- :ok
-end
}
assert_equal %q{100}, %q{
100.times{
diff --git a/class.c b/class.c
index e161e25063..36e7b76caf 100644
--- a/class.c
+++ b/class.c
@@ -31,113 +31,8 @@
#include "internal.h"
#include <ctype.h>
-int rb_vm_add_root_module(ID id, VALUE module);
-
-
-#define id_attached id__attached__
-
-void
-rb_class_subclass_add(VALUE super, VALUE klass)
-{
- rb_subclass_entry_t *entry, *head;
-
- if (super && super != Qundef) {
- entry = malloc(sizeof(*entry));
- entry->klass = klass;
- entry->next = NULL;
-
- head = RCLASS_EXT(super)->subclasses;
- if (head) {
- entry->next = head;
- RCLASS_EXT(head->klass)->parent_subclasses = &entry->next;
- }
-
- RCLASS_EXT(super)->subclasses = entry;
- RCLASS_EXT(klass)->parent_subclasses = &RCLASS_EXT(super)->subclasses;
- }
-}
-
-static void
-rb_module_add_to_subclasses_list(VALUE module, VALUE iclass)
-{
- rb_subclass_entry_t *entry, *head;
-
- entry = malloc(sizeof(*entry));
- entry->klass = iclass;
- entry->next = NULL;
-
- head = RCLASS_EXT(module)->subclasses;
- if (head) {
- entry->next = head;
- RCLASS_EXT(head->klass)->module_subclasses = &entry->next;
- }
-
- RCLASS_EXT(module)->subclasses = entry;
- RCLASS_EXT(iclass)->module_subclasses = &RCLASS_EXT(module)->subclasses;
-}
-
-void
-rb_class_remove_from_super_subclasses(VALUE klass)
-{
- rb_subclass_entry_t *entry;
-
- if (RCLASS_EXT(klass)->parent_subclasses) {
- entry = *RCLASS_EXT(klass)->parent_subclasses;
-
- *RCLASS_EXT(klass)->parent_subclasses = entry->next;
- if (entry->next) {
- RCLASS_EXT(entry->next->klass)->parent_subclasses = RCLASS_EXT(klass)->parent_subclasses;
- }
- free(entry);
- }
-
- RCLASS_EXT(klass)->parent_subclasses = NULL;
-}
-
-void
-rb_class_remove_from_module_subclasses(VALUE klass)
-{
- rb_subclass_entry_t *entry;
-
- if (RCLASS_EXT(klass)->module_subclasses) {
- entry = *RCLASS_EXT(klass)->module_subclasses;
- *RCLASS_EXT(klass)->module_subclasses = entry->next;
-
- if (entry->next) {
- RCLASS_EXT(entry->next->klass)->module_subclasses = RCLASS_EXT(klass)->module_subclasses;
- }
-
- free(entry);
- }
-
- RCLASS_EXT(klass)->module_subclasses = NULL;
-}
-
-void
-rb_class_foreach_subclass(VALUE klass, void(*f)(VALUE))
-{
- rb_subclass_entry_t *cur = RCLASS_EXT(klass)->subclasses;
-
- /* do not be tempted to simplify this loop into a for loop, the order of
- operations is important here if `f` modifies the linked list */
- while (cur) {
- VALUE curklass = cur->klass;
- cur = cur->next;
- f(curklass);
- }
-}
-
-void
-rb_class_detach_subclasses(VALUE klass)
-{
- rb_class_foreach_subclass(klass, rb_class_remove_from_super_subclasses);
-}
-
-void
-rb_class_detach_module_subclasses(VALUE klass)
-{
- rb_class_foreach_subclass(klass, rb_class_remove_from_module_subclasses);
-}
+extern st_table *rb_class_tbl;
+static ID id_attached;
/**
* Allocates a struct RClass for a new class.
@@ -154,20 +49,14 @@ 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));
+ NEWOBJ_OF(obj, struct RClass, klass, flags);
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_M_TBL(obj) = 0;
+ RCLASS_SUPER(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;
- RCLASS_SERIAL(obj) = rb_next_class_serial();
-
RCLASS_REFINED_CLASS(obj) = Qnil;
RCLASS_EXT(obj)->allocator = 0;
return (VALUE)obj;
@@ -188,8 +77,8 @@ rb_class_boot(VALUE super)
{
VALUE klass = class_alloc(T_CLASS, rb_cClass);
- RCLASS_SET_SUPER(klass, super);
- RCLASS_M_TBL_INIT(klass);
+ RCLASS_SUPER(klass) = super;
+ RCLASS_M_TBL(klass) = st_init_numtable();
OBJ_INFECT(klass, super);
return (VALUE)klass;
@@ -232,23 +121,21 @@ rb_class_new(VALUE super)
return rb_class_boot(super);
}
-static void
-rewrite_cref_stack(NODE *node, VALUE old_klass, VALUE new_klass, NODE **new_cref_ptr)
+static NODE*
+rewrite_cref_stack(NODE *node, VALUE old_klass, VALUE new_klass)
{
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;
- }
+ if (!node) {
+ return NULL;
+ }
+ if (node->nd_clss == old_klass) {
+ new_node = NEW_CREF(new_klass);
+ new_node->nd_next = node->nd_next;
+ } else {
new_node = NEW_CREF(node->nd_clss);
- node = node->nd_next;
- *new_cref_ptr = new_node;
- new_cref_ptr = &new_node->nd_next;
+ new_node->nd_next = rewrite_cref_stack(node->nd_next, old_klass, new_klass);
}
- *new_cref_ptr = NULL;
+ return new_node;
}
static void
@@ -257,11 +144,9 @@ 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);
+ iseq->cref_stack = rewrite_cref_stack(me->def->body.iseq->cref_stack, me->klass, klass);
rb_add_method(klass, mid, VM_METHOD_TYPE_ISEQ, iseq, me->flag);
RB_GC_GUARD(newiseqval);
}
@@ -277,27 +162,19 @@ clone_method_i(st_data_t key, st_data_t value, st_data_t data)
return ST_CONTINUE;
}
-struct clone_const_arg {
- VALUE klass;
- st_table *tbl;
-};
-
static int
-clone_const(ID key, const rb_const_entry_t *ce, struct clone_const_arg *arg)
+clone_const(ID key, const rb_const_entry_t *ce, st_table *tbl)
{
rb_const_entry_t *nce = ALLOC(rb_const_entry_t);
- MEMCPY(nce, ce, rb_const_entry_t, 1);
- RB_OBJ_WRITTEN(arg->klass, Qundef, ce->value);
- RB_OBJ_WRITTEN(arg->klass, Qundef, ce->file);
-
- st_insert(arg->tbl, key, (st_data_t)nce);
+ *nce = *ce;
+ st_insert(tbl, key, (st_data_t)nce);
return ST_CONTINUE;
}
static int
clone_const_i(st_data_t key, st_data_t value, st_data_t data)
{
- return clone_const((ID)key, (const rb_const_entry_t *)value, (struct clone_const_arg *)data);
+ return clone_const((ID)key, (const rb_const_entry_t *)value, (st_table *)data);
}
static void
@@ -323,10 +200,10 @@ rb_mod_init_copy(VALUE clone, VALUE orig)
}
rb_obj_init_copy(clone, orig);
if (!FL_TEST(CLASS_OF(clone), FL_SINGLETON)) {
- RBASIC_SET_CLASS(clone, rb_singleton_class_clone(orig));
+ RBASIC(clone)->klass = rb_singleton_class_clone(orig);
rb_singleton_class_attached(RBASIC(clone)->klass, (VALUE)clone);
}
- RCLASS_SET_SUPER(clone, RCLASS_SUPER(orig));
+ RCLASS_SUPER(clone) = RCLASS_SUPER(orig);
RCLASS_EXT(clone)->allocator = RCLASS_EXT(orig)->allocator;
if (RCLASS_IV_TBL(orig)) {
st_data_t id;
@@ -334,7 +211,7 @@ rb_mod_init_copy(VALUE clone, VALUE orig)
if (RCLASS_IV_TBL(clone)) {
st_free_table(RCLASS_IV_TBL(clone));
}
- RCLASS_IV_TBL(clone) = rb_st_copy(clone, RCLASS_IV_TBL(orig));
+ RCLASS_IV_TBL(clone) = st_copy(RCLASS_IV_TBL(orig));
CONST_ID(id, "__tmp_classpath__");
st_delete(RCLASS_IV_TBL(clone), &id, 0);
CONST_ID(id, "__classpath__");
@@ -343,20 +220,17 @@ rb_mod_init_copy(VALUE clone, VALUE orig)
st_delete(RCLASS_IV_TBL(clone), &id, 0);
}
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);
+ st_foreach(RCLASS_CONST_TBL(orig), clone_const_i, (st_data_t)RCLASS_CONST_TBL(clone));
}
if (RCLASS_M_TBL(orig)) {
- if (RCLASS_M_TBL_WRAPPER(clone)) {
- rb_free_m_tbl_wrapper(RCLASS_M_TBL_WRAPPER(clone));
+ if (RCLASS_M_TBL(clone)) {
+ rb_free_m_table(RCLASS_M_TBL(clone));
}
- RCLASS_M_TBL_INIT(clone);
+ RCLASS_M_TBL(clone) = st_init_numtable();
st_foreach(RCLASS_M_TBL(orig), clone_method_i, (st_data_t)clone);
}
@@ -381,32 +255,28 @@ rb_singleton_class_clone_and_attach(VALUE obj, VALUE attach)
VALUE clone = class_alloc(RBASIC(klass)->flags, 0);
if (BUILTIN_TYPE(obj) == T_CLASS) {
- RBASIC_SET_CLASS(clone, clone);
+ RBASIC(clone)->klass = clone;
}
else {
- RBASIC_SET_CLASS(clone, rb_singleton_class_clone(klass));
+ RBASIC(clone)->klass = rb_singleton_class_clone(klass);
}
- RCLASS_SET_SUPER(clone, RCLASS_SUPER(klass));
+ RCLASS_SUPER(clone) = RCLASS_SUPER(klass);
RCLASS_EXT(clone)->allocator = RCLASS_EXT(klass)->allocator;
if (RCLASS_IV_TBL(klass)) {
- RCLASS_IV_TBL(clone) = rb_st_copy(clone, RCLASS_IV_TBL(klass));
+ RCLASS_IV_TBL(clone) = st_copy(RCLASS_IV_TBL(klass));
}
if (RCLASS_CONST_TBL(klass)) {
- struct clone_const_arg arg;
RCLASS_CONST_TBL(clone) = st_init_numtable();
- arg.klass = clone;
- arg.tbl = RCLASS_CONST_TBL(clone);
- st_foreach(RCLASS_CONST_TBL(klass), clone_const_i, (st_data_t)&arg);
+ st_foreach(RCLASS_CONST_TBL(klass), clone_const_i, (st_data_t)RCLASS_CONST_TBL(clone));
}
if (attach != Qundef) {
rb_singleton_class_attached(clone, attach);
}
- RCLASS_M_TBL_INIT(clone);
+ RCLASS_M_TBL(clone) = st_init_numtable();
st_foreach(RCLASS_M_TBL(klass), clone_method_i, (st_data_t)clone);
rb_singleton_class_attached(RBASIC(clone)->klass, clone);
FL_SET(clone, FL_SINGLETON);
-
return clone;
}
}
@@ -422,14 +292,13 @@ 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);
+ st_insert(RCLASS_IV_TBL(klass), id_attached, obj);
}
}
#define METACLASS_OF(k) RBASIC(k)->klass
-#define SET_METACLASS_OF(k, cls) RBASIC_SET_CLASS(k, cls)
/*!
* whether k is a meta^(n)-class of Class class
@@ -438,14 +307,6 @@ rb_singleton_class_attached(VALUE klass, VALUE obj)
*/
#define META_CLASS_OF_CLASS_CLASS_P(k) (METACLASS_OF(k) == (k))
-/*!
- * whether k has a metaclass
- * @retval 1 if \a k has a metaclass
- * @retval 0 otherwise
- */
-#define HAVE_METACLASS_P(k) \
- (FL_TEST(METACLASS_OF(k), FL_SINGLETON) && \
- rb_ivar_get(METACLASS_OF(k), id_attached) == (k))
/*!
* ensures \a klass belongs to its own eigenclass.
@@ -455,7 +316,7 @@ rb_singleton_class_attached(VALUE klass, VALUE obj)
* @note this macro creates a new eigenclass if necessary.
*/
#define ENSURE_EIGENCLASS(klass) \
- (HAVE_METACLASS_P(klass) ? METACLASS_OF(klass) : make_metaclass(klass))
+ (rb_ivar_get(METACLASS_OF(klass), id_attached) == (klass) ? METACLASS_OF(klass) : make_metaclass(klass))
/*!
@@ -477,18 +338,17 @@ make_metaclass(VALUE klass)
rb_singleton_class_attached(metaclass, klass);
if (META_CLASS_OF_CLASS_CLASS_P(klass)) {
- SET_METACLASS_OF(klass, metaclass);
- SET_METACLASS_OF(metaclass, metaclass);
+ METACLASS_OF(klass) = METACLASS_OF(metaclass) = metaclass;
}
else {
VALUE tmp = METACLASS_OF(klass); /* for a meta^(n)-class klass, tmp is meta^(n)-class of Class class */
- SET_METACLASS_OF(klass, metaclass);
- SET_METACLASS_OF(metaclass, ENSURE_EIGENCLASS(tmp));
+ METACLASS_OF(klass) = metaclass;
+ METACLASS_OF(metaclass) = ENSURE_EIGENCLASS(tmp);
}
super = RCLASS_SUPER(klass);
while (RB_TYPE_P(super, T_ICLASS)) super = RCLASS_SUPER(super);
- RCLASS_SET_SUPER(metaclass, super ? ENSURE_EIGENCLASS(super) : rb_cClass);
+ RCLASS_SUPER(metaclass) = super ? ENSURE_EIGENCLASS(super) : rb_cClass;
OBJ_INFECT(metaclass, RCLASS_SUPER(metaclass));
@@ -508,10 +368,10 @@ make_singleton_class(VALUE obj)
VALUE klass = rb_class_boot(orig_class);
FL_SET(klass, FL_SINGLETON);
- RBASIC_SET_CLASS(obj, klass);
+ RBASIC(obj)->klass = klass;
rb_singleton_class_attached(klass, obj);
- SET_METACLASS_OF(klass, METACLASS_OF(rb_class_real(orig_class)));
+ METACLASS_OF(klass) = METACLASS_OF(rb_class_real(orig_class));
return klass;
}
@@ -519,10 +379,12 @@ make_singleton_class(VALUE obj)
static VALUE
boot_defclass(const char *name, VALUE super)
{
+ extern st_table *rb_class_tbl;
VALUE obj = rb_class_boot(super);
ID id = rb_intern(name);
rb_name_class(obj, id);
+ st_add_direct(rb_class_tbl, id, obj);
rb_const_set((rb_cObject ? rb_cObject : obj), id, obj);
return obj;
}
@@ -530,16 +392,19 @@ boot_defclass(const char *name, VALUE super)
void
Init_class_hierarchy(void)
{
+ id_attached = rb_intern("__attached__");
+
rb_cBasicObject = boot_defclass("BasicObject", 0);
rb_cObject = boot_defclass("Object", rb_cBasicObject);
rb_cModule = boot_defclass("Module", rb_cObject);
rb_cClass = boot_defclass("Class", rb_cModule);
rb_const_set(rb_cObject, rb_intern("BasicObject"), rb_cBasicObject);
- RBASIC_SET_CLASS(rb_cClass, rb_cClass);
- RBASIC_SET_CLASS(rb_cModule, rb_cClass);
- RBASIC_SET_CLASS(rb_cObject, rb_cClass);
- RBASIC_SET_CLASS(rb_cBasicObject, rb_cClass);
+ RBASIC(rb_cClass)->klass
+ = RBASIC(rb_cModule)->klass
+ = RBASIC(rb_cObject)->klass
+ = RBASIC(rb_cBasicObject)->klass
+ = rb_cClass;
}
@@ -643,7 +508,7 @@ rb_define_class(const char *name, VALUE super)
rb_warn("no super class for `%s', Object assumed", name);
}
klass = rb_define_class_id(id, super);
- rb_vm_add_root_module(id, klass);
+ st_add_direct(rb_class_tbl, id, klass);
rb_name_class(klass, id);
rb_const_set(rb_cObject, id, klass);
rb_class_inherited(super, klass);
@@ -723,7 +588,9 @@ VALUE
rb_module_new(void)
{
VALUE mdl = class_alloc(T_MODULE, rb_cModule);
- RCLASS_M_TBL_INIT(mdl);
+
+ RCLASS_M_TBL(mdl) = st_init_numtable();
+
return (VALUE)mdl;
}
@@ -752,7 +619,7 @@ rb_define_module(const char *name)
rb_raise(rb_eTypeError, "%s is not a module", rb_obj_classname(module));
}
module = rb_define_module_id(id);
- rb_vm_add_root_module(id, module);
+ st_add_direct(rb_class_tbl, id, module);
rb_const_set(rb_cObject, id, module);
return module;
@@ -800,16 +667,13 @@ 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_SET_SUPER(klass, super);
+ RCLASS_M_TBL(klass) = RCLASS_M_TBL(RCLASS_ORIGIN(module));
+ RCLASS_SUPER(klass) = super;
if (RB_TYPE_P(module, T_ICLASS)) {
- RBASIC_SET_CLASS(klass, RBASIC(module)->klass);
+ RBASIC(klass)->klass = RBASIC(module)->klass;
}
else {
- RBASIC_SET_CLASS(klass, module);
+ RBASIC(klass)->klass = module;
}
OBJ_INFECT(klass, module);
OBJ_INFECT(klass, super);
@@ -817,7 +681,7 @@ 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(VALUE klass, VALUE c, VALUE module);
void
rb_include_module(VALUE klass, VALUE module)
@@ -825,6 +689,9 @@ rb_include_module(VALUE klass, VALUE module)
int changed = 0;
rb_frozen_class_p(klass);
+ if (!OBJ_UNTRUSTED(klass)) {
+ rb_secure(4);
+ }
if (!RB_TYPE_P(module, T_MODULE)) {
Check_Type(module, T_MODULE);
@@ -835,6 +702,7 @@ rb_include_module(VALUE klass, VALUE module)
changed = include_modules_at(klass, RCLASS_ORIGIN(klass), module);
if (changed < 0)
rb_raise(rb_eArgError, "cyclic include detected");
+ if (changed) rb_clear_cache();
}
static int
@@ -845,24 +713,23 @@ add_refined_method_entry_i(st_data_t key, st_data_t value, st_data_t data)
}
static int
-include_modules_at(const VALUE klass, VALUE c, VALUE module)
+include_modules_at(VALUE klass, VALUE c, VALUE module)
{
- VALUE p, iclass;
- int method_changed = 0, constant_changed = 0;
- const st_table *const klass_m_tbl = RCLASS_M_TBL(RCLASS_ORIGIN(klass));
+ VALUE p;
+ int changed = 0;
while (module) {
int superclass_seen = FALSE;
if (RCLASS_ORIGIN(module) != module)
goto skip;
- if (klass_m_tbl && klass_m_tbl == RCLASS_M_TBL(module))
+ if (RCLASS_M_TBL(klass) && RCLASS_M_TBL(klass) == RCLASS_M_TBL(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)) {
+ if (RCLASS_M_TBL(p) == RCLASS_M_TBL(module)) {
if (!superclass_seen) {
c = p; /* move insertion point */
}
@@ -874,15 +741,7 @@ include_modules_at(const VALUE klass, VALUE c, VALUE module)
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);
- }
-
+ c = RCLASS_SUPER(c) = rb_include_class_new(module, RCLASS_SUPER(c));
if (FL_TEST(klass, RMODULE_IS_REFINEMENT)) {
VALUE refined_class =
rb_refinement_module_get_refined_class(klass);
@@ -892,17 +751,12 @@ include_modules_at(const VALUE klass, VALUE c, VALUE module)
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;
+ changed = 1;
skip:
module = RCLASS_SUPER(module);
}
- if (method_changed) rb_clear_method_cache_by_class(klass);
- if (constant_changed) rb_clear_constant_cache();
-
- return method_changed;
+ return changed;
}
static int
@@ -935,11 +789,13 @@ move_refined_method(st_data_t key, st_data_t value, st_data_t data)
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);
+ if (!OBJ_UNTRUSTED(klass)) {
+ rb_secure(4);
+ }
Check_Type(module, T_MODULE);
@@ -948,21 +804,18 @@ rb_prepend_module(VALUE klass, VALUE module)
origin = RCLASS_ORIGIN(klass);
if (origin == klass) {
origin = class_alloc(T_ICLASS, klass);
- OBJ_WB_UNPROTECT(origin); /* TODO: conservertive shading. Need more survery. */
- RCLASS_SET_SUPER(origin, RCLASS_SUPER(klass));
- RCLASS_SET_SUPER(klass, origin);
+ RCLASS_SUPER(origin) = RCLASS_SUPER(klass);
+ RCLASS_SUPER(klass) = origin;
RCLASS_ORIGIN(klass) = origin;
- RCLASS_M_TBL_WRAPPER(origin) = RCLASS_M_TBL_WRAPPER(klass);
- RCLASS_M_TBL_INIT(klass);
+ RCLASS_M_TBL(origin) = RCLASS_M_TBL(klass);
+ RCLASS_M_TBL(klass) = st_init_numtable();
st_foreach(RCLASS_M_TBL(origin), move_refined_method,
(st_data_t) RCLASS_M_TBL(klass));
}
changed = include_modules_at(klass, klass, module);
if (changed < 0)
rb_raise(rb_eArgError, "cyclic prepend detected");
- if (changed) {
- rb_vm_check_redefinition_by_prepend(klass);
- }
+ if (changed) rb_clear_cache();
}
/*
@@ -987,13 +840,10 @@ rb_mod_included_modules(VALUE mod)
{
VALUE ary = rb_ary_new();
VALUE p;
- VALUE origin = RCLASS_ORIGIN(mod);
for (p = RCLASS_SUPER(mod); p; p = RCLASS_SUPER(p)) {
- if (p != origin && BUILTIN_TYPE(p) == T_ICLASS) {
- VALUE m = RBASIC(p)->klass;
- if (RB_TYPE_P(m, T_MODULE))
- rb_ary_push(ary, m);
+ if (BUILTIN_TYPE(p) == T_ICLASS) {
+ rb_ary_push(ary, RBASIC(p)->klass);
}
}
return ary;
@@ -1054,6 +904,8 @@ rb_mod_ancestors(VALUE mod)
VALUE p, ary = rb_ary_new();
for (p = mod; p; p = RCLASS_SUPER(p)) {
+ if (FL_TEST(p, FL_SINGLETON))
+ continue;
if (BUILTIN_TYPE(p) == T_ICLASS) {
rb_ary_push(ary, RBASIC(p)->klass);
}
@@ -1119,10 +971,6 @@ method_entry_i(st_data_t key, st_data_t value, st_data_t data)
st_table *list = (st_table *)data;
long type;
- if (me && me->def->type == VM_METHOD_TYPE_REFINED) {
- me = rb_resolve_refined_method(Qnil, me, NULL);
- if (!me) return ST_CONTINUE;
- }
if (!st_lookup(list, key, 0)) {
if (UNDEFINED_METHOD_ENTRY_P(me)) {
type = -1; /* none */
@@ -1258,14 +1106,13 @@ rb_class_public_instance_methods(int argc, VALUE *argv, VALUE mod)
/*
* call-seq:
- * obj.methods(regular=true) -> array
+ * obj.methods(all=true) -> array
*
* 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,
- * the array will not include methods in modules included in <i>obj</i>.
+ * If the <i>all</i> parameter is set to <code>false</code>, only those methods
+ * in the receiver will be listed.
*
* class Klass
* def klass_method()
@@ -1276,14 +1123,6 @@ rb_class_public_instance_methods(int argc, VALUE *argv, VALUE mod)
* # :==~, :!, :eql?
* # :hash, :<=>, :class, :singleton_class]
* k.methods.length #=> 57
- *
- * k.methods(false) #=> []
- * def k.singleton_method; end
- * k.methods(false) #=> [:singleton_method]
- *
- * module M123; def m123; end end
- * k.extend M123
- * k.methods(false) #=> [:singleton_method]
*/
VALUE
@@ -1386,8 +1225,8 @@ rb_obj_public_methods(int argc, VALUE *argv, VALUE obj)
VALUE
rb_obj_singleton_methods(int argc, VALUE *argv, VALUE obj)
{
- VALUE recur, ary, klass, origin;
- st_table *list, *mtbl;
+ VALUE recur, ary, klass;
+ st_table *list;
if (argc == 0) {
recur = Qtrue;
@@ -1396,17 +1235,16 @@ rb_obj_singleton_methods(int argc, VALUE *argv, VALUE obj)
rb_scan_args(argc, argv, "01", &recur);
}
klass = CLASS_OF(obj);
- origin = RCLASS_ORIGIN(klass);
list = st_init_numtable();
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 (RCLASS_M_TBL(klass))
+ st_foreach(RCLASS_M_TBL(klass), method_entry_i, (st_data_t)list);
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 (RCLASS_M_TBL(klass))
+ st_foreach(RCLASS_M_TBL(klass), method_entry_i, (st_data_t)list);
klass = RCLASS_SUPER(klass);
}
}
@@ -1559,7 +1397,7 @@ singleton_class_of(VALUE obj)
else {
enum ruby_value_type type = BUILTIN_TYPE(obj);
if (type == T_FLOAT || type == T_BIGNUM) {
- rb_raise(rb_eTypeError, "can't define singleton");
+ rb_raise(rb_eTypeError, "can't define singleton");
}
}
@@ -1577,31 +1415,17 @@ singleton_class_of(VALUE obj)
else {
FL_UNSET(klass, FL_TAINT);
}
+ if (OBJ_UNTRUSTED(obj)) {
+ OBJ_UNTRUST(klass);
+ }
+ else {
+ FL_UNSET(klass, FL_UNTRUSTED);
+ }
if (OBJ_FROZEN(obj)) OBJ_FREEZE(klass);
return klass;
}
-/*!
- * Returns the singleton class of \a obj, or nil if obj is not a
- * singleton object.
- *
- * \param obj an arbitrary object.
- * \return the singleton class or nil.
- */
-VALUE
-rb_singleton_class_get(VALUE obj)
-{
- VALUE klass;
-
- if (SPECIAL_CONST_P(obj)) {
- return rb_special_singleton_class(obj);
- }
- klass = RBASIC(obj)->klass;
- if (!FL_TEST(klass, FL_SINGLETON)) return Qnil;
- if (rb_ivar_get(klass, id_attached) != obj) return Qnil;
- return klass;
-}
/*!
* Returns the singleton class of \a obj. Creates it if necessary.
@@ -1785,11 +1609,8 @@ rb_scan_args(int argc, const VALUE *argv, const char *fmt, ...)
}
else {
hash = rb_check_hash_type(last);
- if (!NIL_P(hash)) {
- VALUE opts = rb_extract_keywords(&hash);
- if (!hash) argc--;
- hash = opts ? opts : Qnil;
- }
+ if (!NIL_P(hash))
+ argc--;
}
}
/* capture leading mandatory arguments */
@@ -1853,119 +1674,6 @@ 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)
-{
- const char *msg = "";
- if (RARRAY_LEN(keys) == 1) {
- keys = RARRAY_AREF(keys, 0);
- }
- else {
- keys = rb_ary_join(keys, rb_usascii_str_new2(", "));
- msg = "s";
- }
- rb_raise(rb_eArgError, "%s keyword%s: %"PRIsVALUE, error, msg, 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)
-{
- VALUE keys;
- int i;
- for (i = 0; i < keywords; i++) {
- rb_hash_delete(hash, ID2SYM(table[i]));
- }
- keys = rb_funcall(hash, rb_intern("keys"), 0, 0);
- if (!RB_TYPE_P(keys, T_ARRAY)) rb_raise(rb_eArgError, "unknown keyword");
- keyword_error("unknown", keys);
-}
-
-static int
-separate_symbol(st_data_t key, st_data_t value, st_data_t arg)
-{
- VALUE *kwdhash = (VALUE *)arg;
-
- if (!SYMBOL_P(key)) kwdhash++;
- if (!*kwdhash) *kwdhash = rb_hash_new();
- rb_hash_aset(*kwdhash, (VALUE)key, (VALUE)value);
- return ST_CONTINUE;
-}
-
-VALUE
-rb_extract_keywords(VALUE *orighash)
-{
- VALUE parthash[2] = {0, 0};
- VALUE hash = *orighash;
-
- if (RHASH_EMPTY_P(hash)) {
- *orighash = 0;
- return hash;
- }
- st_foreach(rb_hash_tbl_raw(hash), separate_symbol, (st_data_t)&parthash);
- *orighash = parthash[1];
- return parthash[0];
-}
-
-int
-rb_get_kwargs(VALUE keyword_hash, const ID *table, int required, int optional, VALUE *values)
-{
- int i = 0, j;
- int rest = 0;
- VALUE missing = Qnil;
- st_data_t key;
-
-#define extract_kwarg(keyword, val) \
- (key = (st_data_t)(keyword), values ? \
- st_delete(rb_hash_tbl_raw(keyword_hash), &key, (val)) : \
- st_lookup(rb_hash_tbl_raw(keyword_hash), key, (val)))
-
- if (optional < 0) {
- rest = 1;
- optional = -1-optional;
- }
- if (values) {
- for (j = 0; j < required + optional; j++) {
- values[j] = Qundef;
- }
- }
- if (required) {
- for (; i < required; i++) {
- VALUE keyword = ID2SYM(table[i]);
- if (keyword_hash) {
- st_data_t val;
- if (extract_kwarg(keyword, &val)) {
- if (values) values[i] = (VALUE)val;
- continue;
- }
- }
- if (NIL_P(missing)) missing = rb_ary_tmp_new(1);
- rb_ary_push(missing, keyword);
- }
- if (!NIL_P(missing)) {
- keyword_error("missing", missing);
- }
- }
- j = i;
- if (optional && keyword_hash) {
- for (i = 0; i < optional; i++) {
- st_data_t val;
- if (extract_kwarg(ID2SYM(table[required+i]), &val)) {
- if (values) values[required+i] = (VALUE)val;
- j++;
- }
- }
- }
- if (!rest && keyword_hash) {
- if (RHASH_SIZE(keyword_hash) > (unsigned int)j) {
- unknown_keyword_error(keyword_hash, table, required+optional);
- }
- }
- return j;
-#undef extract_kwarg
-}
-
/*!
* \}
*/
diff --git a/common.mk b/common.mk
index 0c8b7fc54a..2e90d074bd 100644
--- a/common.mk
+++ b/common.mk
@@ -14,7 +14,7 @@ RUBYLIB = $(PATH_SEPARATOR)
RUBYOPT = -
RUN_OPTS = --disable-gems
-SPEC_GIT_BASE = git://github.com/nurse
+SPEC_GIT_BASE = git://github.com/rubyspec
MSPEC_GIT_URL = $(SPEC_GIT_BASE)/mspec.git
RUBYSPEC_GIT_URL = $(SPEC_GIT_BASE)/rubyspec.git
@@ -33,7 +33,7 @@ MAINOBJ = $(NORMALMAINOBJ)
EXTOBJS =
DLDOBJS = $(DMYEXT)
EXTSOLIBS =
-MINIOBJS = $(ARCHMINIOBJS) miniinit.$(OBJEXT) miniprelude.$(OBJEXT)
+MINIOBJS = $(ARCHMINIOBJS) dmyencoding.$(OBJEXT) dmyversion.$(OBJEXT) miniprelude.$(OBJEXT)
ENC_MK = enc.mk
COMMONOBJS = array.$(OBJEXT) \
@@ -43,7 +43,6 @@ COMMONOBJS = array.$(OBJEXT) \
complex.$(OBJEXT) \
dir.$(OBJEXT) \
dln_find.$(OBJEXT) \
- encoding.$(OBJEXT) \
enum.$(OBJEXT) \
enumerator.$(OBJEXT) \
error.$(OBJEXT) \
@@ -85,7 +84,6 @@ COMMONOBJS = array.$(OBJEXT) \
transcode.$(OBJEXT) \
util.$(OBJEXT) \
variable.$(OBJEXT) \
- version.$(OBJEXT) \
compile.$(OBJEXT) \
debug.$(OBJEXT) \
iseq.$(OBJEXT) \
@@ -100,8 +98,8 @@ COMMONOBJS = array.$(OBJEXT) \
$(MISSING)
EXPORTOBJS = $(DLNOBJ) \
- localeinit.$(OBJEXT) \
- loadpath.$(OBJEXT) \
+ encoding.$(OBJEXT) \
+ version.$(OBJEXT) \
$(COMMONOBJS)
OBJS = $(EXPORTOBJS) prelude.$(OBJEXT)
@@ -111,6 +109,8 @@ GOLFOBJS = goruby.$(OBJEXT) golf_prelude.$(OBJEXT)
PRELUDE_SCRIPTS = $(srcdir)/prelude.rb $(srcdir)/enc/prelude.rb $(DEFAULT_PRELUDES)
GEM_PRELUDE = $(srcdir)/gem_prelude.rb
+YES_GEM_PRELUDE = $(GEM_PRELUDE)
+NO_GEM_PRELUDE =
PRELUDES = prelude.c miniprelude.c
GOLFPRELUDES = golf_prelude.c
@@ -120,7 +120,7 @@ SCRIPT_ARGS = --dest-dir="$(DESTDIR)" \
--make-flags="$(MAKEFLAGS)"
EXTMK_ARGS = $(SCRIPT_ARGS) --extension $(EXTS) --extstatic $(EXTSTATIC) \
--make-flags="V=$(V) MINIRUBY='$(MINIRUBY)'" --
-INSTRUBY = $(SUDO) $(RUNRUBY) -r./$(arch)-fake $(srcdir)/tool/rbinstall.rb
+INSTRUBY = $(SUDO) $(MINIRUBY) $(srcdir)/tool/rbinstall.rb
INSTRUBY_ARGS = $(SCRIPT_ARGS) \
--data-mode=$(INSTALL_DATA_MODE) \
--prog-mode=$(INSTALL_PROG_MODE) \
@@ -159,13 +159,12 @@ showflags:
" DLDFLAGS = $(DLDFLAGS)" \
" SOLIBS = $(SOLIBS)" \
$(MESSAGE_END)
- -@$(CC_VERSION)
.PHONY: showconfig
showconfig:
- @$(ECHO_BEGIN) \
- $(configure_args) \
- $(ECHO_END)
+ @$(MESSAGE_BEGIN) \
+ "$(configure_args)" \
+ $(MESSAGE_END)
exts: build-ext
@@ -184,6 +183,9 @@ $(MKMAIN_CMD): $(MKFILES) all-incs $(PREP) $(RBCONFIG) $(LIBRUBY)
prog: program wprogram
+loadpath: $(PREP) PHONY
+ $(MINIRUBY) -e 'p $$:'
+
$(PREP): $(MKFILES)
miniruby$(EXEEXT): config.status $(ALLOBJS) $(ARCHFILE) $(DTRACE_OBJ)
@@ -204,11 +206,10 @@ $(CAPIOUT)/.timestamp: Doxyfile $(PREP)
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)
-mini: PHONY miniruby$(EXEEXT)
$(PROGRAM) $(WPROGRAM): $(LIBRUBY) $(MAINOBJ) $(OBJS) $(EXTOBJS) $(SETUP) $(PREP)
@@ -223,8 +224,8 @@ $(STATIC_RUBY)$(EXEEXT): $(MAINOBJ) $(DLDOBJS) $(EXTOBJS) $(LIBRUBY_A)
$(Q)$(RM) $@
$(PURIFY) $(CC) $(MAINOBJ) $(DLDOBJS) $(EXTOBJS) $(LIBRUBY_A) $(MAINLIBS) $(EXTLIBS) $(LIBS) $(OUTFLAG)$@ $(LDFLAGS) $(XLDFLAGS)
-ruby.imp: $(COMMONOBJS)
- $(Q)$(NM) -Pgp $(COMMONOBJS) | \
+ruby.imp: $(EXPORTOBJS)
+ $(Q)$(NM) -Pgp $(EXPORTOBJS) | \
awk 'BEGIN{print "#!"}; $$2~/^[BDT]$$/&&$$1!~/^(Init_|.*_threadptr_|\.)/{print $$1}' | \
sort -u -o $@
@@ -261,7 +262,7 @@ 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
- $(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=arch
+ $(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=bin --install=ext-arch
post-install-arch:: post-install-bin post-install-ext-arch
install-comm: pre-install-comm do-install-comm post-install-comm
@@ -322,11 +323,6 @@ dont-install-all: $(PROGRAM)
post-no-install-all:: post-no-install-local post-no-install-ext post-no-install-doc
@$(NULLCMD)
-uninstall: $(INSTALLED_LIST)
- $(Q)$(SUDO) $(MINIRUBY) $(srcdir)/tool/rbuninstall.rb --destdir=$(DESTDIR) $(INSTALLED_LIST)
-
-reinstall: uninstall install
-
what-where-nodoc: no-install-nodoc
no-install-nodoc: pre-no-install-nodoc dont-install-nodoc post-no-install-nodoc
pre-no-install-nodoc:: pre-no-install-local pre-no-install-ext
@@ -409,13 +405,6 @@ do-install-doc: $(PROGRAM)
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)
- $(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=gem
-post-install-gem::
- @$(NULLCMD)
-
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)"
@@ -424,16 +413,6 @@ rdoc-coverage: PHONY main
@echo Generating RDoc coverage report
$(Q) $(XRUBY) "$(srcdir)/bin/rdoc" --root "$(srcdir)" --encoding=UTF-8 --all --quiet -C $(RDOCFLAGS) "$(srcdir)"
-RDOCBENCHOUT=/tmp/rdocbench
-
-GCBENCH_ITEM=null
-
-gcbench: PHONY
- $(Q) $(XRUBY) "$(srcdir)/benchmark/gc/gcbench.rb" $(GCBENCH_ITEM)
-
-gcbench-rdoc: PHONY
- $(Q) $(XRUBY) "$(srcdir)/benchmark/gc/gcbench.rb" rdoc
-
nodoc: PHONY
what-where-doc: no-install-doc
@@ -446,7 +425,7 @@ post-no-install-doc::
CLEAR_INSTALLED_LIST = clear-installed-list
-install-prereq: $(CLEAR_INSTALLED_LIST) yes-fake PHONY
+install-prereq: $(CLEAR_INSTALLED_LIST) PHONY
clear-installed-list: PHONY
@> $(INSTALLED_LIST) set MAKE="$(MAKE)"
@@ -468,7 +447,7 @@ clean-docs: clean-rdoc clean-capi
distclean: distclean-ext distclean-local distclean-enc distclean-golf distclean-extout distclean-platform
distclean-local:: clean-local
$(Q)$(RM) $(MKFILES) yasmdata.rb *.inc
- $(Q)$(RM) config.cache config.status config.status.lineno
+ $(Q)$(RM) config.cache config.status config.status.lineno $(PRELUDES)
$(Q)$(RM) *~ *.bak *.stackdump core *.core gmon.out $(PREP)
distclean-ext:: PHONY
distclean-golf: clean-golf
@@ -480,15 +459,14 @@ 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
-realclean-ext:: PHONY
+ $(Q)$(RM) parse.c parse.h lex.c newline.c revision.h
+realclean-ext::
realclean-golf: distclean-golf
realclean-capi: PHONY
realclean-extout: distclean-extout
clean-ext distclean-ext realclean-ext::
$(Q)$(RM) $(EXTS_MK)
- $(Q)$(RM) $(EXTOUT)/.timestamp/.*.time
clean-enc distclean-enc realclean-enc: PHONY
@@ -503,23 +481,23 @@ no-fake: PHONY
btest: $(TEST_RUNNABLE)-btest
no-btest: PHONY
yes-btest: fake miniruby$(EXEEXT) PHONY
- $(BOOTSTRAPRUBY) "$(srcdir)/bootstraptest/runner.rb" --ruby="$(BTESTRUBY) $(RUN_OPTS)" $(OPTS) $(TESTOPTS)
+ $(BOOTSTRAPRUBY) "$(srcdir)/bootstraptest/runner.rb" --ruby="$(BTESTRUBY)" $(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)$(RUNRUBY) "$(srcdir)/bootstraptest/runner.rb" --ruby="$(PROGRAM) -I$(srcdir)/lib" -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)$(RUNRUBY) $(srcdir)/tool/rubytest.rb $(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
+ -$(RUNRUBY) "$(srcdir)/bootstraptest/runner.rb" --ruby="$(PROGRAM)" $(OPTS) $(TESTOPTS) $(srcdir)/KNOWNBUGS.rb
test: test-sample btest-ruby test-knownbug
@@ -590,7 +568,7 @@ PHONY:
{$(srcdir)}.y.c:
$(ECHO) generating $@
- $(Q)$(BASERUBY) $(srcdir)/tool/id2token.rb --path-separator=.$(PATH_SEPARATOR)./ --vpath=$(VPATH) id.h $(SRC_FILE) > parse.tmp.y
+ $(Q)$(BASERUBY) $(srcdir)/tool/id2token.rb --path-separator=$(PATH_SEPARATOR) --vpath=$(VPATH) id.h $(SRC_FILE) > parse.tmp.y
$(Q)$(YACC) -d $(YFLAGS) -o y.tab.c parse.tmp.y
$(Q)$(RM) parse.tmp.y
$(Q)sed -f $(srcdir)/tool/ytab.sed -e "/^#/s!parse\.tmp\.[iy]!parse.y!" -e "/^#/s!y\.tab\.c!$@!" y.tab.c > $@.new
@@ -598,23 +576,6 @@ PHONY:
$(Q)sed -e "/^#line.*y\.tab\.h/d;/^#line.*parse.*\.y/d" y.tab.h > $(@:.c=.h)
$(Q)$(RM) y.tab.c y.tab.h
-$(PLATFORM_D):
- $(Q) $(MAKEDIRS) $(PLATFORM_DIR)
- @exit > $@
-
-###
-
-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
-
-###
-
acosh.$(OBJEXT): {$(VPATH)}acosh.c
alloca.$(OBJEXT): {$(VPATH)}alloca.c {$(VPATH)}config.h
crypt.$(OBJEXT): {$(VPATH)}crypt.c
@@ -625,7 +586,7 @@ 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 {$(VPATH)}util.h $(RUBY_H_INCLUDES)
strchr.$(OBJEXT): {$(VPATH)}strchr.c
strdup.$(OBJEXT): {$(VPATH)}strdup.c
strerror.$(OBJEXT): {$(VPATH)}strerror.c
@@ -640,18 +601,31 @@ dl_os2.$(OBJEXT): {$(VPATH)}dl_os2.c
ia64.$(OBJEXT): {$(VPATH)}ia64.s
$(CC) $(CFLAGS) -c $<
+$(PLATFORM_D):
+ $(Q) $(MAKEDIRS) $(PLATFORM_DIR)
+ @exit > $@
+
###
+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
+
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
+ $(ENCODING_H_INCLUDES) {$(VPATH)}internal.h $(PROBES_H_INCLUDES) {$(VPATH)}id.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
+ $(VM_CORE_H_INCLUDES) {$(VPATH)}internal.h {$(VPATH)}constant.h
compar.$(OBJEXT): {$(VPATH)}compar.c $(RUBY_H_INCLUDES)
complex.$(OBJEXT): {$(VPATH)}complex.c $(RUBY_H_INCLUDES) \
- {$(VPATH)}internal.h $(hdrdir)/ruby.h
+ {$(VPATH)}internal.h
dir.$(OBJEXT): {$(VPATH)}dir.c $(RUBY_H_INCLUDES) {$(VPATH)}util.h \
$(ENCODING_H_INCLUDES) \
{$(VPATH)}internal.h
@@ -659,23 +633,26 @@ 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
+dmyencoding.$(OBJEXT): {$(VPATH)}dmyencoding.c $(RUBY_H_INCLUDES) \
+ {$(VPATH)}regenc.h {$(VPATH)}util.h $(ENCODING_H_INCLUDES) \
+ {$(VPATH)}encoding.c {$(VPATH)}internal.h
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
+ {$(VPATH)}util.h {$(VPATH)}id.h
enumerator.$(OBJEXT): {$(VPATH)}enumerator.c $(RUBY_H_INCLUDES) \
- {$(VPATH)}internal.h {$(VPATH)}node.h
+ {$(VPATH)}internal.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
+ {$(VPATH)}internal.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
+ $(ENCODING_H_INCLUDES) {$(VPATH)}internal.h $(PROBES_H_INCLUDES)
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
+ {$(VPATH)}dln.h {$(VPATH)}internal.h $(PROBES_H_INCLUDES)
file.$(OBJEXT): {$(VPATH)}file.c $(RUBY_H_INCLUDES) {$(VPATH)}io.h \
$(ENCODING_H_INCLUDES) {$(VPATH)}util.h {$(VPATH)}dln.h \
{$(VPATH)}internal.h
@@ -683,45 +660,44 @@ 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
+ {$(VPATH)}thread.h $(PROBES_H_INCLUDES)
hash.$(OBJEXT): {$(VPATH)}hash.c $(RUBY_H_INCLUDES) {$(VPATH)}util.h \
- $(ENCODING_H_INCLUDES) {$(VPATH)}internal.h $(PROBES_H_INCLUDES) {$(VPATH)}vm_opts.h
+ $(ENCODING_H_INCLUDES) {$(VPATH)}internal.h $(PROBES_H_INCLUDES)
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
+ {$(VPATH)}internal.h {$(VPATH)}thread.h {$(VPATH)}id.h
+main.$(OBJEXT): {$(VPATH)}main.c $(RUBY_H_INCLUDES) {$(VPATH)}node.h {$(VPATH)}vm_debug.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
+ $(VM_CORE_H_INCLUDES)
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
+ {$(VPATH)}internal.h {$(VPATH)}constant.h $(ENCODING_H_INCLUDES) $(PROBES_H_INCLUDES)
pack.$(OBJEXT): {$(VPATH)}pack.c $(RUBY_H_INCLUDES) {$(VPATH)}encoding.h \
- {$(VPATH)}oniguruma.h {$(VPATH)}internal.h
+ {$(VPATH)}oniguruma.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
+ {$(VPATH)}parse.h {$(VPATH)}internal.h $(PROBES_H_INCLUDES)
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
+ {$(VPATH)}internal.h {$(VPATH)}iseq.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
+ {$(VPATH)}thread.h
random.$(OBJEXT): {$(VPATH)}random.c $(RUBY_H_INCLUDES) \
- {$(VPATH)}siphash.c {$(VPATH)}siphash.h {$(VPATH)}internal.h
+ {$(VPATH)}siphash.c {$(VPATH)}siphash.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
+rational.$(OBJEXT): {$(VPATH)}rational.c $(RUBY_H_INCLUDES) {$(VPATH)}internal.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
@@ -741,52 +717,47 @@ 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
+ {$(VPATH)}dln.h {$(VPATH)}internal.h
+safe.$(OBJEXT): {$(VPATH)}safe.c $(RUBY_H_INCLUDES) $(VM_CORE_H_INCLUDES)
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
+ $(VM_CORE_H_INCLUDES)
sprintf.$(OBJEXT): {$(VPATH)}sprintf.c $(RUBY_H_INCLUDES) {$(VPATH)}re.h \
- {$(VPATH)}regex.h {$(VPATH)}vsnprintf.c $(ENCODING_H_INCLUDES) {$(VPATH)}internal.h
+ {$(VPATH)}regex.h {$(VPATH)}vsnprintf.c $(ENCODING_H_INCLUDES)
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
+ {$(VPATH)}regex.h $(ENCODING_H_INCLUDES) {$(VPATH)}internal.h $(PROBES_H_INCLUDES)
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
+ {$(VPATH)}internal.h {$(VPATH)}io.h {$(VPATH)}thread.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
+ {$(VPATH)}internal.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)}node.h {$(VPATH)}util.h {$(VPATH)}encoding.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 \
+ {$(VPATH)}version.h $(srcdir)/version.h $(srcdir)/revision.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)
+dmyversion.$(OBJEXT): {$(VPATH)}dmyversion.c version.$(OBJEXT)
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
+ {$(VPATH)}internal.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
+ {$(VPATH)}insns_info.inc {$(VPATH)}node_name.inc {$(VPATH)}internal.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 \
@@ -794,30 +765,28 @@ vm.$(OBJEXT): {$(VPATH)}vm.c {$(VPATH)}gc.h {$(VPATH)}iseq.h \
{$(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
+ $(PROBES_H_INCLUDES) {$(VPATH)}probes_helper.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
+ {$(VPATH)}internal.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
+ {$(VPATH)}util.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
+ {$(VPATH)}internal.h {$(VPATH)}iseq.h {$(VPATH)}debug.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
+ {$(VPATH)}internal.h
miniprelude.$(OBJEXT): {$(VPATH)}miniprelude.c $(RUBY_H_INCLUDES) \
- $(VM_CORE_H_INCLUDES) {$(VPATH)}internal.h {$(VPATH)}vm_opts.h
+ $(VM_CORE_H_INCLUDES) {$(VPATH)}internal.h
prelude.$(OBJEXT): {$(VPATH)}prelude.c $(RUBY_H_INCLUDES) \
- $(VM_CORE_H_INCLUDES) {$(VPATH)}internal.h {$(VPATH)}vm_opts.h
+ $(VM_CORE_H_INCLUDES) {$(VPATH)}internal.h
golf_prelude.$(OBJEXT): {$(VPATH)}golf_prelude.c $(RUBY_H_INCLUDES) \
- $(VM_CORE_H_INCLUDES) {$(VPATH)}internal.h {$(VPATH)}vm_opts.h
+ $(VM_CORE_H_INCLUDES) {$(VPATH)}internal.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)
+ {$(VPATH)}vm_debug.h {$(VPATH)}node.h
ascii.$(OBJEXT): {$(VPATH)}ascii.c {$(VPATH)}regenc.h {$(VPATH)}config.h \
{$(VPATH)}oniguruma.h {$(VPATH)}missing.h $(RUBY_H_INCLUDES)
@@ -833,8 +802,7 @@ unicode.$(OBJEXT): {$(VPATH)}unicode.c {$(VPATH)}regint.h \
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/win32.$(OBJEXT): {$(VPATH)}win32/win32.c $(RUBY_H_INCLUDES) $(PLATFORM_D)
win32/file.$(OBJEXT): {$(VPATH)}win32/file.c $(RUBY_H_INCLUDES) $(PLATFORM_D)
$(NEWLINE_C): $(srcdir)/enc/trans/newline.trans $(srcdir)/tool/transcode-tblgen.rb
@@ -843,10 +811,6 @@ 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
-verconf.h: $(srcdir)/template/verconf.h.in $(srcdir)/tool/generic_erb.rb $(RBCONFIG)
- $(ECHO) creating $@
- $(Q) $(MINIRUBY) "$(srcdir)/tool/generic_erb.rb" $(srcdir)/template/verconf.h.in > $@
-
DTRACE_DEPENDENT_OBJS = array.$(OBJEXT) \
eval.$(OBJEXT) \
gc.$(OBJEXT) \
@@ -883,7 +847,7 @@ INSNS2VMOPT = --srcdir="$(srcdir)"
srcs: {$(VPATH)}parse.c {$(VPATH)}lex.c {$(VPATH)}newline.c {$(VPATH)}id.c srcs-ext srcs-enc
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
+ $(srcdir)/ext/dl/callback/callback.c
srcs-ext: $(EXT_SRCS)
@@ -900,12 +864,12 @@ insns: $(INSNS)
id.h: $(srcdir)/tool/generic_erb.rb $(srcdir)/template/id.h.tmpl $(srcdir)/defs/id.def
$(ECHO) generating $@
$(Q) $(BASERUBY) $(srcdir)/tool/generic_erb.rb --output=$@ \
- $(srcdir)/template/id.h.tmpl
+ $(srcdir)/template/$@.tmpl
id.c: $(srcdir)/tool/generic_erb.rb $(srcdir)/template/id.c.tmpl $(srcdir)/defs/id.def
$(ECHO) generating $@
$(Q) $(BASERUBY) $(srcdir)/tool/generic_erb.rb --output=$@ \
- $(srcdir)/template/id.c.tmpl
+ $(srcdir)/template/$@.tmpl
node_name.inc: {$(VPATH)}node.h
$(ECHO) generating $@
@@ -957,27 +921,21 @@ $(REVISION_H): $(srcdir)/version.h $(srcdir)/ChangeLog $(srcdir)/tool/file2lastr
-$(Q) $(BASERUBY) $(srcdir)/tool/file2lastrev.rb --revision.h "$(srcdir)" > revision.tmp
$(Q)$(IFCHANGE) "--timestamp=$@" "$(srcdir)/revision.h" revision.tmp
-$(srcdir)/ext/ripper/ripper.c: parse.y id.h
+$(srcdir)/ext/ripper/ripper.c: parse.y
$(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=$(Q) ECHO=$(ECHO) top_srcdir=../.. srcdir=. VPATH=../.. RUBY="$(BASERUBY)"
$(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)"
+ Q=$(Q) ECHO=$(ECHO) top_srcdir=../../.. srcdir=.
$(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=$(Q) ECHO=$(ECHO) top_srcdir=../../.. srcdir=. VPATH=../../.. RUBY="$(BASERUBY)"
-
##
run: fake miniruby$(EXEEXT) PHONY
@@ -989,12 +947,6 @@ runruby: $(PROGRAM) PHONY
parse: fake miniruby$(EXEEXT) PHONY
$(BTESTRUBY) $(srcdir)/tool/parse.rb $(TESTRUN_SCRIPT)
-bisect: PHONY
- $(srcdir)/tool/bisect.sh miniruby $(srcdir)
-
-bisect-ruby: PHONY
- $(srcdir)/tool/bisect.sh ruby $(srcdir)
-
COMPARE_RUBY = $(BASERUBY)
ITEM =
OPTS =
@@ -1015,8 +967,7 @@ tbench: $(PROGRAM) PHONY
--pattern='bmx_' --directory=$(srcdir)/benchmark $(OPTS)
run.gdb:
- echo set breakpoint pending on > run.gdb
- echo b ruby_debug_breakpoint >> run.gdb
+ echo b ruby_debug_breakpoint > run.gdb
echo '# handle SIGINT nostop' >> run.gdb
echo '# handle SIGPIPE nostop' >> run.gdb
echo '# b rb_longjmp' >> run.gdb
@@ -1041,12 +992,6 @@ dist:
up::
-$(Q)$(MAKE) $(MFLAGS) 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)
-
info: info-program info-libruby_a info-libruby_so info-arch
info-program:
@echo PROGRAM=$(PROGRAM)
@@ -1063,8 +1008,6 @@ change: PHONY
love: sudo-precheck up all test install test-all
@echo love is all you need
-yes-test-all: sudo-precheck
-
sudo-precheck:
@$(SUDO) echo > $(NULL)
@@ -1085,12 +1028,10 @@ help: PHONY
" gdb-ruby: runs test.rb by ruby under gdb" \
" check: equals make test test-all" \
" test: ruby core tests" \
- " test-all: all ruby tests [TESTS=<test files>]" \
+ " test-all: all ruby tests" \
" test-rubyspec: run RubySpec test suite" \
" update-rubyspec: update local copy of RubySpec" \
" 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" \
" install-nodoc: install without rdoc" \
" install-cross: install cross compiling staff" \
diff --git a/compar.c b/compar.c
index 2f4db291a4..65def78484 100644
--- a/compar.c
+++ b/compar.c
@@ -32,36 +32,9 @@ rb_cmperr(VALUE x, VALUE y)
}
static VALUE
-invcmp_recursive(VALUE x, VALUE y, int recursive)
-{
- if (recursive) return Qnil;
- return rb_check_funcall(y, cmp, 1, &x);
-}
-
-VALUE
-rb_invcmp(VALUE x, VALUE y)
-{
- VALUE invcmp = rb_exec_recursive(invcmp_recursive, x, y);
- if (invcmp == Qundef || NIL_P(invcmp)) {
- return Qnil;
- }
- else {
- int result = -rb_cmpint(invcmp, x, y);
- return INT2FIX(result);
- }
-}
-
-static VALUE
-cmp_eq_recursive(VALUE arg1, VALUE arg2, int recursive)
-{
- if (recursive) return Qfalse;
- 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]);
+ VALUE c = rb_funcall(a[0], cmp, 1, a[1]);
if (NIL_P(c)) return Qfalse;
if (rb_cmpint(c, a[0], a[1]) == 0) return Qtrue;
@@ -81,9 +54,6 @@ 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
diff --git a/compile.c b/compile.c
index 48479338c9..7dffe08141 100644
--- a/compile.c
+++ b/compile.c
@@ -19,6 +19,7 @@
#include "insns.inc"
#include "insns_info.inc"
+#define numberof(array) (int)(sizeof(array) / sizeof((array)[0]))
#define FIXNUM_INC(n, i) ((n)+(INT2FIX(i)&~FIXNUM_FLAG))
#define FIXNUM_OR(n, i) ((n)|INT2FIX(i))
@@ -171,10 +172,10 @@ r_value(VALUE value)
(((rb_iseq_t*)DATA_PTR(iseq))->location.absolute_path)
#define NEW_ISEQVAL(node, name, type, line_no) \
- new_child_iseq(iseq, (node), rb_fstring(name), 0, (type), (line_no))
+ new_child_iseq(iseq, (node), (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))
+ new_child_iseq(iseq, (node), (name), iseq->self, (type), (line_no))
/* add instructions */
#define ADD_SEQ(seq1, seq2) \
@@ -222,7 +223,7 @@ r_value(VALUE value)
do { \
if ((event) == RUBY_EVENT_LINE && iseq->coverage && \
(line) != iseq->compile_data->last_coverable_line) { \
- RARRAY_ASET(iseq->coverage, (line) - 1, INT2FIX(0)); \
+ RARRAY_PTR(iseq->coverage)[(line) - 1] = INT2FIX(0); \
iseq->compile_data->last_coverable_line = (line); \
ADD_INSN1((seq), (line), trace, INT2FIX(RUBY_EVENT_COVERAGE)); \
} \
@@ -278,7 +279,7 @@ r_value(VALUE value)
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); \
+ iseq->compile_data->err_info = GET_THREAD()->errinfo; \
GET_THREAD()->errinfo = tmp; \
ret = 0; \
break; \
@@ -298,7 +299,7 @@ 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)
+#define hide_obj(obj) do {OBJ_FREEZE(obj); RBASIC(obj)->klass = 0;} while (0)
#include "optinsn.inc"
#if OPT_INSTRUCTIONS_UNIFICATION
@@ -324,6 +325,7 @@ static void debug_list(ISEQ_ARG_DECLARE LINK_ANCHOR *anchor);
static void dump_disasm_list(LINK_ELEMENT *elem);
static int insn_data_length(INSN *iobj);
+static int insn_data_line_no(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, ...);
@@ -414,7 +416,7 @@ static int
iseq_add_mark_object(rb_iseq_t *iseq, VALUE v)
{
if (!SPECIAL_CONST_P(v)) {
- rb_iseq_add_mark_object(iseq, v);
+ rb_ary_push(iseq->mark_ary, v);
}
return COMPILE_OK;
}
@@ -481,8 +483,8 @@ rb_iseq_compile_node(VALUE self, NODE *node)
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);
+ ADD_LABEL(ret, end);
/* wide range catch handler must put at last */
ADD_CATCH_ENTRY(CATCH_TYPE_REDO, start, end, 0, start);
@@ -509,10 +511,6 @@ rb_iseq_compile_node(VALUE self, NODE *node)
}
}
}
- else if (nd_type(node) == NODE_IFUNC) {
- /* user callback */
- (*node->nd_cfnc)(iseq, ret, node->nd_tval);
- }
else {
switch (iseq->type) {
case ISEQ_TYPE_METHOD:
@@ -960,8 +958,7 @@ new_callinfo(rb_iseq_t *iseq, ID mid, int argc, VALUE block, unsigned long flag)
ci->flag |= VM_CALL_ARGS_SKIP_SETUP;
}
}
- ci->method_state = 0;
- ci->class_serial = 0;
+ ci->vmstat = 0;
ci->blockptr = 0;
ci->recv = Qundef;
ci->call = 0; /* TODO: should set default function? */
@@ -1173,7 +1170,7 @@ iseq_set_arguments(rb_iseq_t *iseq, LINK_ANCHOR *optargs, NODE *node_args)
iseq->arg_opts = i;
iseq->arg_opt_table = ALLOC_N(VALUE, i);
- MEMCPY(iseq->arg_opt_table, RARRAY_CONST_PTR(labels), VALUE, i);
+ MEMCPY(iseq->arg_opt_table, RARRAY_PTR(labels), VALUE, i);
for (j = 0; j < i; j++) {
iseq->arg_opt_table[j] &= ~1;
}
@@ -1186,39 +1183,28 @@ iseq_set_arguments(rb_iseq_t *iseq, LINK_ANCHOR *optargs, NODE *node_args)
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;
+ int i = 0, j;
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));
+ rb_ary_push(keywords, 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_vid & ID_SCOPE_MASK) == ID_JUNK;
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));
+ iseq->arg_keyword_table[j] = FIX2INT(RARRAY_PTR(keywords)[j]);
}
ADD_INSN(optargs, nd_line(args->kw_args), pop);
}
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);
+ iseq->arg_keyword_check = (args->kw_rest_arg->nd_vid & ID_SCOPE_MASK) == ID_JUNK;
ADD_INSN(optargs, nd_line(args->kw_rest_arg), pop);
}
else {
@@ -1279,8 +1265,7 @@ iseq_set_arguments(rb_iseq_t *iseq, LINK_ANCHOR *optargs, NODE *node_args)
}
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->arg_opts == 0 && iseq->arg_post_len == 0 && iseq->arg_rest == -1) {
if (iseq->argc == 1 && last_comma == 0) {
/* {|a|} */
iseq->arg_simple |= 0x02;
@@ -1436,8 +1421,8 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *anchor)
/* 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->ic_entries = ALLOC_N(struct iseq_inline_cache_entry, iseq->ic_size);
+ MEMZERO(iseq->ic_entries, struct iseq_inline_cache_entry, iseq->ic_size);
iseq->callinfo_entries = ALLOC_N(rb_call_info_t, iseq->callinfo_size);
/* MEMZERO(iseq->callinfo_entries, rb_call_info_t, iseq->callinfo_size); */
@@ -1535,9 +1520,9 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *anchor)
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);
+ IC ic = &iseq->ic_entries[ic_index];
+ if (UNLIKELY(ic_index >= iseq->ic_size)) {
+ rb_bug("iseq_set_sequence: ic_index overflow: index: %d, size: %d", ic_index, iseq->ic_size);
}
generated_iseq[pos + 1 + j] = (VALUE)ic;
break;
@@ -1669,18 +1654,18 @@ label_get_sp(LABEL *lobj)
static int
iseq_set_exception_table(rb_iseq_t *iseq)
{
- const VALUE *tptr, *ptr;
+ VALUE *tptr, *ptr;
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);
+ tptr = RARRAY_PTR(iseq->compile_data->catch_table_ary);
iseq->catch_table = tlen ? ALLOC_N(struct iseq_catch_table_entry, tlen) : 0;
iseq->catch_table_size = tlen;
for (i = 0; i < tlen; i++) {
- ptr = RARRAY_CONST_PTR(tptr[i]);
+ ptr = RARRAY_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));
@@ -1710,7 +1695,7 @@ iseq_set_exception_table(rb_iseq_t *iseq)
}
}
- RB_OBJ_WRITE(iseq->self, &iseq->compile_data->catch_table_ary, 0); /* free */
+ iseq->compile_data->catch_table_ary = 0; /* free */
return COMPILE_OK;
}
@@ -1888,9 +1873,8 @@ iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcal
* leave # unreachable
*/
INSN *piobj = (INSN *)get_prev_insn((INSN *)list);
- enum ruby_vminsn_type previ = piobj->insn_id;
- if (previ == BIN(send) || previ == BIN(opt_send_simple) || previ == BIN(invokesuper)) {
+ if (piobj->insn_id == BIN(send) || piobj->insn_id == BIN(opt_send_simple)) {
rb_call_info_t *ci = (rb_call_info_t *)piobj->operands[0];
if (ci->blockiseq == 0) {
ci->flag |= VM_CALL_TAILCALL;
@@ -1955,11 +1939,6 @@ iseq_specialized_instruction(rb_iseq_t *iseq, INSN *iobj)
case idAREF: SP_INSN(aref); return COMPILE_OK;
}
break;
- case 2:
- switch (ci->mid) {
- case idASET: SP_INSN(aset); return COMPILE_OK;
- }
- break;
}
}
if (ci->flag & VM_CALL_ARGS_SKIP_SETUP) {
@@ -2258,16 +2237,15 @@ compile_dstr_fragments(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE *node, int *cntp)
debugp_param("nd_lit", lit);
if (!NIL_P(lit)) {
+ hide_obj(lit);
cnt++;
- if (RB_TYPE_P(lit, T_STRING))
- lit = node->nd_lit = rb_fstring(node->nd_lit);
ADD_INSN1(ret, nd_line(node), putobject, lit);
}
while (list) {
node = list->nd_head;
if (nd_type(node) == NODE_STR) {
- node->nd_lit = rb_fstring(node->nd_lit);
+ hide_obj(node->nd_lit);
ADD_INSN1(ret, nd_line(node), putobject, node->nd_lit);
}
else {
@@ -2457,40 +2435,32 @@ compile_array_(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE* node_root,
else {
ADD_INSN(anchor, line, concatarray);
}
-
APPEND_LIST(ret, anchor);
break;
case COMPILE_ARRAY_TYPE_HASH:
- if (i > 0) {
- if (first) {
- ADD_INSN1(anchor, line, newhash, INT2FIX(i));
- APPEND_LIST(ret, anchor);
- }
- else {
- 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));
- }
+ if (first) {
+ first = 0;
+ ADD_INSN1(anchor, line, newhash, INT2FIX(i));
+ APPEND_LIST(ret, anchor);
+ }
+ else if (i > 0) {
+ 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));
}
if (kw) {
- VALUE nhash = (i > 0 || !first) ? INT2FIX(2) : INT2FIX(1);
ADD_INSN1(ret, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
- if (i > 0 || !first) ADD_INSN(ret, line, swap);
+ 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, ID2SYM(id_core_hash_merge_kwd), INT2FIX(2));
}
- first = 0;
break;
case COMPILE_ARRAY_TYPE_ARGS:
APPEND_LIST(ret, anchor);
break;
}
}
- else {
- /* poped */
- APPEND_LIST(ret, anchor);
- }
}
}
}
@@ -2520,7 +2490,7 @@ case_when_optimizable_literal(NODE * node)
break;
}
case NODE_STR:
- return node->nd_lit = rb_fstring(node->nd_lit);
+ return node->nd_lit;
}
return Qundef;
}
@@ -2547,8 +2517,8 @@ when_vals(rb_iseq_t *iseq, LINK_ANCHOR *cond_seq, NODE *vals, LABEL *l1, int onl
ADD_INSN(cond_seq, nd_line(val), dup); /* dup target */
if (nd_type(val) == NODE_STR) {
- val->nd_lit = rb_fstring(val->nd_lit);
debugp_param("nd_lit", val->nd_lit);
+ OBJ_FREEZE(val->nd_lit);
ADD_INSN1(cond_seq, nd_line(val), putobject, val->nd_lit);
}
else {
@@ -3013,10 +2983,10 @@ make_name_for_block(rb_iseq_t *iseq)
}
if (level == 1) {
- return rb_sprintf("block in %"PRIsVALUE, ip->location.label);
+ return rb_sprintf("block in %s", RSTRING_PTR(ip->location.label));
}
else {
- return rb_sprintf("block (%d levels) in %"PRIsVALUE, level, ip->location.label);
+ return rb_sprintf("block (%d levels) in %s", level, RSTRING_PTR(ip->location.label));
}
}
@@ -3168,17 +3138,6 @@ setup_args(rb_iseq_t *iseq, LINK_ANCHOR *args, NODE *argn, VALUE *flag)
return argc;
}
-static VALUE
-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);
- ADD_INSN1(ret, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
- ADD_CALL_WITH_BLOCK(ret, line, ID2SYM(id_core_set_postexe), argc, block);
- iseq_set_local_table(iseq, 0);
- return Qnil;
-}
/**
compile each node
@@ -3191,8 +3150,6 @@ static int
iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
{
enum node_type type;
- LINK_ELEMENT *saved_last_element = 0;
- int line;
if (node == 0) {
if (!poped) {
@@ -3202,14 +3159,13 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
return COMPILE_OK;
}
- iseq->compile_data->last_line = line = (int)nd_line(node);
+ iseq->compile_data->last_line = (int)nd_line(node);
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;
+ ADD_TRACE(ret, nd_line(node), RUBY_EVENT_LINE);
}
switch (type) {
@@ -3233,9 +3189,9 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
INIT_ANCHOR(cond_seq);
INIT_ANCHOR(then_seq);
INIT_ANCHOR(else_seq);
- then_label = NEW_LABEL(line);
- else_label = NEW_LABEL(line);
- end_label = NEW_LABEL(line);
+ then_label = NEW_LABEL(nd_line(node));
+ else_label = NEW_LABEL(nd_line(node));
+ end_label = NEW_LABEL(nd_line(node));
compile_branch_condition(iseq, cond_seq, node->nd_cond,
then_label, else_label);
@@ -3246,7 +3202,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
ADD_LABEL(ret, then_label);
ADD_SEQ(ret, then_seq);
- ADD_INSNL(ret, line, jump, end_label);
+ ADD_INSNL(ret, nd_line(node), jump, end_label);
ADD_LABEL(ret, else_label);
ADD_SEQ(ret, else_seq);
@@ -3269,7 +3225,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
INIT_ANCHOR(body_seq);
INIT_ANCHOR(cond_seq);
- rb_hash_tbl_raw(literals)->type = &cdhash_type;
+ RHASH_TBL(literals)->type = &cdhash_type;
if (node->nd_head == 0) {
COMPILE_(ret, "when", node->nd_body, poped);
@@ -3279,25 +3235,24 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
node = node->nd_body;
type = nd_type(node);
- 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)));
}
- endlabel = NEW_LABEL(line);
- elselabel = NEW_LABEL(line);
+ endlabel = NEW_LABEL(nd_line(node));
+ elselabel = NEW_LABEL(nd_line(node));
ADD_SEQ(ret, head); /* case VAL */
while (type == NODE_WHEN) {
LABEL *l1;
- l1 = NEW_LABEL(line);
+ l1 = NEW_LABEL(nd_line(node));
ADD_LABEL(body_seq, l1);
- ADD_INSN(body_seq, line, pop);
+ ADD_INSN(body_seq, nd_line(node), pop);
COMPILE_(body_seq, "when body", node->nd_body, poped);
- ADD_INSNL(body_seq, line, jump, endlabel);
+ ADD_INSNL(body_seq, nd_line(node), jump, endlabel);
vals = node->nd_head;
if (vals) {
@@ -3328,14 +3283,13 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
break;
}
type = nd_type(node);
- line = nd_line(node);
}
/* else */
if (node) {
ADD_LABEL(cond_seq, elselabel);
- ADD_INSN(cond_seq, line, pop);
+ ADD_INSN(cond_seq, nd_line(node), pop);
COMPILE_(cond_seq, "else", node, poped);
- ADD_INSNL(cond_seq, line, jump, endlabel);
+ ADD_INSNL(cond_seq, nd_line(node), jump, endlabel);
}
else {
debugs("== else (implicit)\n");
@@ -3367,13 +3321,13 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
DECL_ANCHOR(body_seq);
INIT_ANCHOR(body_seq);
- endlabel = NEW_LABEL(line);
+ endlabel = NEW_LABEL(nd_line(node));
while (node && nd_type(node) == NODE_WHEN) {
- LABEL *l1 = NEW_LABEL(line = nd_line(node));
+ LABEL *l1 = NEW_LABEL(nd_line(node));
ADD_LABEL(body_seq, l1);
COMPILE_(body_seq, "when", node->nd_body, poped);
- ADD_INSNL(body_seq, line, jump, endlabel);
+ ADD_INSNL(body_seq, nd_line(node), jump, endlabel);
vals = node->nd_head;
if (!vals) {
@@ -3421,28 +3375,28 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
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 *end_label = NEW_LABEL(line);
+ LABEL *next_label = iseq->compile_data->start_label = NEW_LABEL(nd_line(node)); /* next */
+ LABEL *redo_label = iseq->compile_data->redo_label = NEW_LABEL(nd_line(node)); /* redo */
+ LABEL *break_label = iseq->compile_data->end_label = NEW_LABEL(nd_line(node)); /* break */
+ LABEL *end_label = NEW_LABEL(nd_line(node));
- LABEL *next_catch_label = NEW_LABEL(line);
+ LABEL *next_catch_label = NEW_LABEL(nd_line(node));
LABEL *tmp_label = NULL;
iseq->compile_data->loopval_popped = 0;
push_ensure_entry(iseq, &enl, 0, 0);
if (type == NODE_OPT_N || node->nd_state == 1) {
- ADD_INSNL(ret, line, jump, next_label);
+ ADD_INSNL(ret, nd_line(node), jump, next_label);
}
else {
- tmp_label = NEW_LABEL(line);
- ADD_INSNL(ret, line, jump, tmp_label);
+ tmp_label = NEW_LABEL(nd_line(node));
+ ADD_INSNL(ret, nd_line(node), jump, tmp_label);
}
- ADD_INSN(ret, line, putnil);
+ ADD_INSN(ret, nd_line(node), putnil);
ADD_LABEL(ret, next_catch_label);
- ADD_INSN(ret, line, pop);
- ADD_INSNL(ret, line, jump, next_label);
+ ADD_INSN(ret, nd_line(node), pop);
+ ADD_INSNL(ret, nd_line(node), jump, next_label);
if (tmp_label) ADD_LABEL(ret, tmp_label);
ADD_LABEL(ret, redo_label);
@@ -3454,31 +3408,31 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
redo_label, end_label);
}
else if (type == NODE_UNTIL) {
- /* until */
+ /* untile */
compile_branch_condition(iseq, ret, node->nd_cond,
end_label, redo_label);
}
else {
- ADD_CALL_RECEIVER(ret, line);
- ADD_CALL(ret, line, ID2SYM(idGets), INT2FIX(0));
- ADD_INSNL(ret, line, branchif, redo_label);
+ ADD_CALL_RECEIVER(ret, nd_line(node));
+ ADD_CALL(ret, nd_line(node), ID2SYM(idGets), INT2FIX(0));
+ ADD_INSNL(ret, nd_line(node), branchif, redo_label);
/* opt_n */
}
ADD_LABEL(ret, end_label);
if (node->nd_state == Qundef) {
- /* ADD_INSN(ret, line, putundef); */
+ /* ADD_INSN(ret, nd_line(node), putundef); */
rb_bug("unsupported: putundef");
}
else {
- ADD_INSN(ret, line, putnil);
+ ADD_INSN(ret, nd_line(node), putnil);
}
ADD_LABEL(ret, break_label); /* break */
if (poped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
ADD_CATCH_ENTRY(CATCH_TYPE_BREAK, redo_label, break_label,
@@ -3498,8 +3452,8 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
case NODE_ITER:
case NODE_FOR:{
VALUE prevblock = iseq->compile_data->current_block;
- LABEL *retry_label = NEW_LABEL(line);
- LABEL *retry_end_l = NEW_LABEL(line);
+ LABEL *retry_label = NEW_LABEL(nd_line(node));
+ LABEL *retry_end_l = NEW_LABEL(nd_line(node));
ADD_LABEL(ret, retry_label);
if (nd_type(node) == NODE_FOR) {
@@ -3507,21 +3461,21 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
iseq->compile_data->current_block =
NEW_CHILD_ISEQVAL(node->nd_body, make_name_for_block(iseq),
- ISEQ_TYPE_BLOCK, line);
+ ISEQ_TYPE_BLOCK, nd_line(node));
- ADD_SEND_R(ret, line, ID2SYM(idEach), INT2FIX(0),
+ ADD_SEND_R(ret, nd_line(node), ID2SYM(idEach), INT2FIX(0),
iseq->compile_data->current_block, INT2FIX(0));
}
else {
iseq->compile_data->current_block =
NEW_CHILD_ISEQVAL(node->nd_body, make_name_for_block(iseq),
- ISEQ_TYPE_BLOCK, line);
+ ISEQ_TYPE_BLOCK, nd_line(node));
COMPILE(ret, "iter caller", node->nd_iter);
}
ADD_LABEL(ret, retry_end_l);
if (poped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
iseq->compile_data->current_block = prevblock;
@@ -3537,23 +3491,23 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
/* while/until */
LABEL *splabel = NEW_LABEL(0);
ADD_LABEL(ret, splabel);
- ADD_ADJUST(ret, line, iseq->compile_data->redo_label);
+ ADD_ADJUST(ret, nd_line(node), iseq->compile_data->redo_label);
COMPILE_(ret, "break val (while/until)", node->nd_stts, iseq->compile_data->loopval_popped);
add_ensure_iseq(ret, iseq, 0);
- ADD_INSNL(ret, line, jump, iseq->compile_data->end_label);
+ ADD_INSNL(ret, nd_line(node), jump, iseq->compile_data->end_label);
ADD_ADJUST_RESTORE(ret, splabel);
if (!poped) {
- ADD_INSN(ret, line, putnil);
+ ADD_INSN(ret, nd_line(node), putnil);
}
}
else if (iseq->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, nd_line(node), throw, INT2FIX(level | 0x02) /* TAG_BREAK */ );
if (poped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
}
else if (iseq->type == ISEQ_TYPE_EVAL) {
@@ -3600,25 +3554,25 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
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, nd_line(node), iseq->compile_data->redo_label);
+ ADD_INSNL(ret, nd_line(node), jump, iseq->compile_data->start_label);
ADD_ADJUST_RESTORE(ret, splabel);
if (!poped) {
- ADD_INSN(ret, line, putnil);
+ ADD_INSN(ret, nd_line(node), putnil);
}
}
else if (iseq->compile_data->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, nd_line(node), iseq->compile_data->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, nd_line(node), jump, iseq->compile_data->end_label);
ADD_ADJUST_RESTORE(ret, splabel);
if (!poped) {
- ADD_INSN(ret, line, putnil);
+ ADD_INSN(ret, nd_line(node), putnil);
}
}
else if (iseq->type == ISEQ_TYPE_EVAL) {
@@ -3650,10 +3604,10 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
}
if (ip != 0) {
COMPILE(ret, "next val", node->nd_stts);
- ADD_INSN1(ret, line, throw, INT2FIX(level | 0x03) /* TAG_NEXT */ );
+ ADD_INSN1(ret, nd_line(node), throw, INT2FIX(level | 0x03) /* TAG_NEXT */ );
if (poped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
}
else {
@@ -3667,12 +3621,12 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
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, nd_line(node), iseq->compile_data->redo_label);
add_ensure_iseq(ret, iseq, 0);
- ADD_INSNL(ret, line, jump, iseq->compile_data->redo_label);
+ ADD_INSNL(ret, nd_line(node), jump, iseq->compile_data->redo_label);
ADD_ADJUST_RESTORE(ret, splabel);
if (!poped) {
- ADD_INSN(ret, line, putnil);
+ ADD_INSN(ret, nd_line(node), putnil);
}
}
else if (iseq->type == ISEQ_TYPE_EVAL) {
@@ -3685,12 +3639,12 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
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, nd_line(node), iseq->compile_data->start_label);
+ ADD_INSNL(ret, nd_line(node), jump, iseq->compile_data->start_label);
ADD_ADJUST_RESTORE(ret, splabel);
if (!poped) {
- ADD_INSN(ret, line, putnil);
+ ADD_INSN(ret, nd_line(node), putnil);
}
}
else {
@@ -3717,11 +3671,11 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
ip = ip->parent_iseq;
}
if (ip != 0) {
- ADD_INSN(ret, line, putnil);
- ADD_INSN1(ret, line, throw, INT2FIX(level | 0x05) /* TAG_REDO */ );
+ ADD_INSN(ret, nd_line(node), putnil);
+ ADD_INSN1(ret, nd_line(node), throw, INT2FIX(level | 0x05) /* TAG_REDO */ );
if (poped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
}
else {
@@ -3732,11 +3686,11 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
}
case NODE_RETRY:{
if (iseq->type == ISEQ_TYPE_RESCUE) {
- ADD_INSN(ret, line, putnil);
- ADD_INSN1(ret, line, throw, INT2FIX(0x04) /* TAG_RETRY */ );
+ ADD_INSN(ret, nd_line(node), putnil);
+ ADD_INSN1(ret, nd_line(node), throw, INT2FIX(0x04) /* TAG_RETRY */ );
if (poped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
}
else {
@@ -3749,26 +3703,26 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
break;
}
case NODE_RESCUE:{
- LABEL *lstart = NEW_LABEL(line);
- LABEL *lend = NEW_LABEL(line);
- LABEL *lcont = NEW_LABEL(line);
+ LABEL *lstart = NEW_LABEL(nd_line(node));
+ LABEL *lend = NEW_LABEL(nd_line(node));
+ LABEL *lcont = NEW_LABEL(nd_line(node));
VALUE rescue = NEW_CHILD_ISEQVAL(
node->nd_resq,
rb_str_concat(rb_str_new2("rescue in "), iseq->location.label),
- ISEQ_TYPE_RESCUE, line);
+ ISEQ_TYPE_RESCUE, nd_line(node));
ADD_LABEL(ret, lstart);
COMPILE(ret, "rescue head", node->nd_head);
ADD_LABEL(ret, lend);
if (node->nd_else) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
COMPILE(ret, "rescue else", node->nd_else);
}
- ADD_INSN(ret, line, nop);
+ ADD_INSN(ret, nd_line(node), nop);
ADD_LABEL(ret, lcont);
if (poped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
/* register catch entry */
@@ -3782,28 +3736,28 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
LABEL *label_miss, *label_hit;
while (resq) {
- label_miss = NEW_LABEL(line);
- label_hit = NEW_LABEL(line);
+ label_miss = NEW_LABEL(nd_line(node));
+ label_hit = NEW_LABEL(nd_line(node));
narg = resq->nd_args;
if (narg) {
switch (nd_type(narg)) {
case NODE_ARRAY:
while (narg) {
- ADD_INSN2(ret, line, getlocal, INT2FIX(2), INT2FIX(0));
+ ADD_INSN2(ret, nd_line(node), getlocal, INT2FIX(2), INT2FIX(0));
COMPILE(ret, "rescue arg", narg->nd_head);
- ADD_INSN1(ret, line, checkmatch, INT2FIX(VM_CHECKMATCH_TYPE_RESCUE));
- ADD_INSNL(ret, line, branchif, label_hit);
+ ADD_INSN1(ret, nd_line(node), checkmatch, INT2FIX(VM_CHECKMATCH_TYPE_RESCUE));
+ ADD_INSNL(ret, nd_line(node), branchif, label_hit);
narg = narg->nd_next;
}
break;
case NODE_SPLAT:
case NODE_ARGSCAT:
case NODE_ARGSPUSH:
- ADD_INSN2(ret, line, getlocal, INT2FIX(2), INT2FIX(0));
+ ADD_INSN2(ret, nd_line(node), getlocal, INT2FIX(2), INT2FIX(0));
COMPILE(ret, "rescue/cond splat", narg);
- ADD_INSN1(ret, line, checkmatch, INT2FIX(VM_CHECKMATCH_TYPE_RESCUE | VM_CHECKMATCH_ARRAY));
- ADD_INSNL(ret, line, branchif, label_hit);
+ ADD_INSN1(ret, nd_line(node), checkmatch, INT2FIX(VM_CHECKMATCH_TYPE_RESCUE | VM_CHECKMATCH_ARRAY));
+ ADD_INSNL(ret, nd_line(node), branchif, label_hit);
break;
default:
rb_bug("NODE_RESBODY: unknown node (%s)",
@@ -3811,18 +3765,18 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
}
}
else {
- ADD_INSN2(ret, line, getlocal, INT2FIX(2), INT2FIX(0));
- ADD_INSN1(ret, line, putobject, rb_eStandardError);
- ADD_INSN1(ret, line, checkmatch, INT2FIX(VM_CHECKMATCH_TYPE_RESCUE));
- ADD_INSNL(ret, line, branchif, label_hit);
+ ADD_INSN2(ret, nd_line(node), getlocal, INT2FIX(2), INT2FIX(0));
+ ADD_INSN1(ret, nd_line(node), putobject, rb_eStandardError);
+ ADD_INSN1(ret, nd_line(node), checkmatch, INT2FIX(VM_CHECKMATCH_TYPE_RESCUE));
+ ADD_INSNL(ret, nd_line(node), branchif, label_hit);
}
- ADD_INSNL(ret, line, jump, label_miss);
+ ADD_INSNL(ret, nd_line(node), jump, label_miss);
ADD_LABEL(ret, label_hit);
COMPILE(ret, "resbody body", resq->nd_body);
if (iseq->compile_data->option->tailcall_optimization) {
- ADD_INSN(ret, line, nop);
+ ADD_INSN(ret, nd_line(node), nop);
}
- ADD_INSN(ret, line, leave);
+ ADD_INSN(ret, nd_line(node), leave);
ADD_LABEL(ret, label_miss);
resq = resq->nd_head;
}
@@ -3834,10 +3788,10 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
rb_str_concat(rb_str_new2
("ensure in "),
iseq->location.label),
- ISEQ_TYPE_ENSURE, line);
- LABEL *lstart = NEW_LABEL(line);
- LABEL *lend = NEW_LABEL(line);
- LABEL *lcont = NEW_LABEL(line);
+ ISEQ_TYPE_ENSURE, nd_line(node));
+ LABEL *lstart = NEW_LABEL(nd_line(node));
+ LABEL *lend = NEW_LABEL(nd_line(node));
+ LABEL *lcont = NEW_LABEL(nd_line(node));
struct ensure_range er;
struct iseq_compile_data_ensure_node_stack enl;
struct ensure_range *erange;
@@ -3854,7 +3808,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
COMPILE_(ret, "ensure head", node->nd_head, poped);
ADD_LABEL(ret, lend);
if (ensr->anchor.next == 0) {
- ADD_INSN(ret, line, nop);
+ ADD_INSN(ret, nd_line(node), nop);
}
else {
ADD_SEQ(ret, ensr);
@@ -3874,19 +3828,19 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
case NODE_AND:
case NODE_OR:{
- LABEL *end_label = NEW_LABEL(line);
+ LABEL *end_label = NEW_LABEL(nd_line(node));
COMPILE(ret, "nd_1st", node->nd_1st);
if (!poped) {
- ADD_INSN(ret, line, dup);
+ ADD_INSN(ret, nd_line(node), dup);
}
if (type == NODE_AND) {
- ADD_INSNL(ret, line, branchunless, end_label);
+ ADD_INSNL(ret, nd_line(node), branchunless, end_label);
}
else {
- ADD_INSNL(ret, line, branchif, end_label);
+ ADD_INSNL(ret, nd_line(node), branchif, end_label);
}
if (!poped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
COMPILE_(ret, "nd_2nd", node->nd_2nd, poped);
ADD_LABEL(ret, end_label);
@@ -3906,9 +3860,9 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
COMPILE(ret, "rvalue", node->nd_value);
if (!poped) {
- ADD_INSN(ret, line, dup);
+ ADD_INSN(ret, nd_line(node), dup);
}
- ADD_INSN2(ret, line, setlocal, INT2FIX(idx), INT2FIX(get_lvar_level(iseq)));
+ ADD_INSN2(ret, nd_line(node), setlocal, INT2FIX(idx), INT2FIX(get_lvar_level(iseq)));
break;
}
@@ -3919,7 +3873,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
debugp_param("dassn id", rb_str_new2(rb_id2name(node->nd_vid) ? rb_id2name(node->nd_vid) : "*"));
if (!poped) {
- ADD_INSN(ret, line, dup);
+ ADD_INSN(ret, nd_line(node), dup);
}
idx = get_dyna_var_idx(iseq, node->nd_vid, &lv, &ls);
@@ -3928,16 +3882,16 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
rb_bug("NODE_DASGN(_CURR): unknown id (%s)", rb_id2name(node->nd_vid));
}
- ADD_INSN2(ret, line, setlocal, INT2FIX(ls - idx), INT2FIX(lv));
+ ADD_INSN2(ret, nd_line(node), setlocal, INT2FIX(ls - idx), INT2FIX(lv));
break;
}
case NODE_GASGN:{
COMPILE(ret, "lvalue", node->nd_value);
if (!poped) {
- ADD_INSN(ret, line, dup);
+ ADD_INSN(ret, nd_line(node), dup);
}
- ADD_INSN1(ret, line, setglobal,
+ ADD_INSN1(ret, nd_line(node), setglobal,
((VALUE)node->nd_entry | 1));
break;
}
@@ -3945,36 +3899,36 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
case NODE_IASGN2:{
COMPILE(ret, "lvalue", node->nd_value);
if (!poped) {
- ADD_INSN(ret, line, dup);
+ ADD_INSN(ret, nd_line(node), dup);
}
- ADD_INSN2(ret, line, setinstancevariable,
- ID2SYM(node->nd_vid), INT2FIX(iseq->is_size++));
+ ADD_INSN2(ret, nd_line(node), setinstancevariable,
+ ID2SYM(node->nd_vid), INT2FIX(iseq->ic_size++));
break;
}
case NODE_CDECL:{
COMPILE(ret, "lvalue", node->nd_value);
if (!poped) {
- ADD_INSN(ret, line, dup);
+ ADD_INSN(ret, nd_line(node), dup);
}
if (node->nd_vid) {
- ADD_INSN1(ret, line, putspecialobject,
+ ADD_INSN1(ret, nd_line(node), putspecialobject,
INT2FIX(VM_SPECIAL_OBJECT_CONST_BASE));
- ADD_INSN1(ret, line, setconstant, ID2SYM(node->nd_vid));
+ ADD_INSN1(ret, nd_line(node), setconstant, ID2SYM(node->nd_vid));
}
else {
compile_cpath(ret, iseq, node->nd_else);
- ADD_INSN1(ret, line, setconstant, ID2SYM(node->nd_else->nd_mid));
+ ADD_INSN1(ret, nd_line(node), setconstant, ID2SYM(node->nd_else->nd_mid));
}
break;
}
case NODE_CVASGN:{
COMPILE(ret, "cvasgn val", node->nd_value);
if (!poped) {
- ADD_INSN(ret, line, dup);
+ ADD_INSN(ret, nd_line(node), dup);
}
- ADD_INSN1(ret, line, setclassvariable,
+ ADD_INSN1(ret, nd_line(node), setclassvariable,
ID2SYM(node->nd_vid));
break;
}
@@ -4009,7 +3963,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
*/
if (!poped) {
- ADD_INSN(ret, line, putnil);
+ ADD_INSN(ret, nd_line(node), putnil);
}
COMPILE(ret, "NODE_OP_ASGN1 recv", node->nd_recv);
switch (nd_type(node->nd_args->nd_head)) {
@@ -4023,8 +3977,8 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
argc = setup_args(iseq, args, node->nd_args->nd_head, &flag);
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_INSN1(ret, nd_line(node), dupn, FIXNUM_INC(argc, 1 + boff));
+ ADD_SEND_R(ret, nd_line(node), ID2SYM(idAREF), argc, Qfalse, LONG2FIX(flag));
if (id == 0 || id == 1) {
/* 0: or, 1: and
@@ -4036,92 +3990,92 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
nil
end
*/
- LABEL *label = NEW_LABEL(line);
- LABEL *lfin = NEW_LABEL(line);
+ LABEL *label = NEW_LABEL(nd_line(node));
+ LABEL *lfin = NEW_LABEL(nd_line(node));
- ADD_INSN(ret, line, dup);
+ ADD_INSN(ret, nd_line(node), dup);
if (id == 0) {
/* or */
- ADD_INSNL(ret, line, branchif, label);
+ ADD_INSNL(ret, nd_line(node), branchif, label);
}
else {
/* and */
- ADD_INSNL(ret, line, branchunless, label);
+ ADD_INSNL(ret, nd_line(node), branchunless, label);
}
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
COMPILE(ret, "NODE_OP_ASGN1 args->body: ", node->nd_args->nd_body);
if (!poped) {
- ADD_INSN1(ret, line, setn, FIXNUM_INC(argc, 2+boff));
+ ADD_INSN1(ret, nd_line(node), setn, FIXNUM_INC(argc, 2+boff));
}
if (flag & VM_CALL_ARGS_SPLAT) {
- ADD_INSN1(ret, line, newarray, INT2FIX(1));
+ ADD_INSN1(ret, nd_line(node), newarray, INT2FIX(1));
if (boff > 0) {
- ADD_INSN1(ret, line, dupn, INT2FIX(3));
- ADD_INSN(ret, line, swap);
- ADD_INSN(ret, line, pop);
+ ADD_INSN1(ret, nd_line(node), dupn, INT2FIX(3));
+ ADD_INSN(ret, nd_line(node), swap);
+ ADD_INSN(ret, nd_line(node), pop);
}
- ADD_INSN(ret, line, concatarray);
+ ADD_INSN(ret, nd_line(node), concatarray);
if (boff > 0) {
- ADD_INSN1(ret, line, setn, INT2FIX(3));
- ADD_INSN(ret, line, pop);
- ADD_INSN(ret, line, pop);
+ ADD_INSN1(ret, nd_line(node), setn, INT2FIX(3));
+ ADD_INSN(ret, nd_line(node), pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
- ADD_SEND_R(ret, line, ID2SYM(idASET),
+ ADD_SEND_R(ret, nd_line(node), ID2SYM(idASET),
argc, Qfalse, LONG2FIX(flag));
}
else {
if (boff > 0)
- ADD_INSN(ret, line, swap);
- ADD_SEND_R(ret, line, ID2SYM(idASET),
+ ADD_INSN(ret, nd_line(node), swap);
+ ADD_SEND_R(ret, nd_line(node), ID2SYM(idASET),
FIXNUM_INC(argc, 1), Qfalse, LONG2FIX(flag));
}
- ADD_INSN(ret, line, pop);
- ADD_INSNL(ret, line, jump, lfin);
+ ADD_INSN(ret, nd_line(node), pop);
+ ADD_INSNL(ret, nd_line(node), jump, lfin);
ADD_LABEL(ret, label);
if (!poped) {
- ADD_INSN1(ret, line, setn, FIXNUM_INC(argc, 2+boff));
+ ADD_INSN1(ret, nd_line(node), setn, FIXNUM_INC(argc, 2+boff));
}
- ADD_INSN1(ret, line, adjuststack, FIXNUM_INC(argc, 2+boff));
+ ADD_INSN1(ret, nd_line(node), adjuststack, FIXNUM_INC(argc, 2+boff));
ADD_LABEL(ret, lfin);
}
else {
COMPILE(ret, "NODE_OP_ASGN1 args->body: ", node->nd_args->nd_body);
- ADD_SEND(ret, line, ID2SYM(id), INT2FIX(1));
+ ADD_SEND(ret, nd_line(node), ID2SYM(id), INT2FIX(1));
if (!poped) {
- ADD_INSN1(ret, line, setn, FIXNUM_INC(argc, 2+boff));
+ ADD_INSN1(ret, nd_line(node), setn, FIXNUM_INC(argc, 2+boff));
}
if (flag & VM_CALL_ARGS_SPLAT) {
- ADD_INSN1(ret, line, newarray, INT2FIX(1));
+ ADD_INSN1(ret, nd_line(node), newarray, INT2FIX(1));
if (boff > 0) {
- ADD_INSN1(ret, line, dupn, INT2FIX(3));
- ADD_INSN(ret, line, swap);
- ADD_INSN(ret, line, pop);
+ ADD_INSN1(ret, nd_line(node), dupn, INT2FIX(3));
+ ADD_INSN(ret, nd_line(node), swap);
+ ADD_INSN(ret, nd_line(node), pop);
}
- ADD_INSN(ret, line, concatarray);
+ ADD_INSN(ret, nd_line(node), concatarray);
if (boff > 0) {
- ADD_INSN1(ret, line, setn, INT2FIX(3));
- ADD_INSN(ret, line, pop);
- ADD_INSN(ret, line, pop);
+ ADD_INSN1(ret, nd_line(node), setn, INT2FIX(3));
+ ADD_INSN(ret, nd_line(node), pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
- ADD_SEND_R(ret, line, ID2SYM(idASET),
+ ADD_SEND_R(ret, nd_line(node), ID2SYM(idASET),
argc, Qfalse, LONG2FIX(flag));
}
else {
if (boff > 0)
- ADD_INSN(ret, line, swap);
- ADD_SEND_R(ret, line, ID2SYM(idASET),
+ ADD_INSN(ret, nd_line(node), swap);
+ ADD_SEND_R(ret, nd_line(node), ID2SYM(idASET),
FIXNUM_INC(argc, 1), Qfalse, LONG2FIX(flag));
}
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
break;
}
case NODE_OP_ASGN2:{
ID atype = node->nd_next->nd_mid;
- LABEL *lfin = NEW_LABEL(line);
- LABEL *lcfin = NEW_LABEL(line);
+ LABEL *lfin = NEW_LABEL(nd_line(node));
+ LABEL *lcfin = NEW_LABEL(nd_line(node));
/*
class C; attr_accessor :c; end
r = C.new
@@ -4165,47 +4119,47 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
*/
COMPILE(ret, "NODE_OP_ASGN2#recv", node->nd_recv);
- ADD_INSN(ret, line, dup);
- ADD_SEND(ret, line, ID2SYM(node->nd_next->nd_vid),
+ ADD_INSN(ret, nd_line(node), dup);
+ ADD_SEND(ret, nd_line(node), ID2SYM(node->nd_next->nd_vid),
INT2FIX(0));
if (atype == 0 || atype == 1) { /* 0: OR or 1: AND */
- ADD_INSN(ret, line, dup);
+ ADD_INSN(ret, nd_line(node), dup);
if (atype == 0) {
- ADD_INSNL(ret, line, branchif, lcfin);
+ ADD_INSNL(ret, nd_line(node), branchif, lcfin);
}
else {
- ADD_INSNL(ret, line, branchunless, lcfin);
+ ADD_INSNL(ret, nd_line(node), branchunless, lcfin);
}
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
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),
+ ADD_INSN(ret, nd_line(node), swap);
+ ADD_INSN1(ret, nd_line(node), topn, INT2FIX(1));
+ ADD_SEND(ret, nd_line(node), ID2SYM(node->nd_next->nd_aid),
INT2FIX(1));
- ADD_INSNL(ret, line, jump, lfin);
+ ADD_INSNL(ret, nd_line(node), jump, lfin);
ADD_LABEL(ret, lcfin);
- ADD_INSN(ret, line, swap);
+ ADD_INSN(ret, nd_line(node), swap);
ADD_LABEL(ret, lfin);
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
if (poped) {
/* we can apply more optimize */
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
}
else {
COMPILE(ret, "NODE_OP_ASGN2 val", node->nd_value);
- ADD_SEND(ret, line, ID2SYM(node->nd_next->nd_mid),
+ ADD_SEND(ret, nd_line(node), ID2SYM(node->nd_next->nd_mid),
INT2FIX(1));
if (!poped) {
- ADD_INSN(ret, line, swap);
- ADD_INSN1(ret, line, topn, INT2FIX(1));
+ ADD_INSN(ret, nd_line(node), swap);
+ ADD_INSN1(ret, nd_line(node), topn, INT2FIX(1));
}
- ADD_SEND(ret, line, ID2SYM(node->nd_next->nd_aid),
+ ADD_SEND(ret, nd_line(node), ID2SYM(node->nd_next->nd_aid),
INT2FIX(1));
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
break;
}
@@ -4216,7 +4170,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
switch (nd_type(node->nd_head)) {
case NODE_COLON3:
- ADD_INSN1(ret, line, putobject, rb_cObject);
+ ADD_INSN1(ret, nd_line(node), putobject, rb_cObject);
break;
case NODE_COLON2:
COMPILE(ret, "NODE_OP_CDECL/colon2#nd_head", node->nd_head->nd_head);
@@ -4231,55 +4185,55 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
mid = node->nd_head->nd_mid;
/* cref */
if (node->nd_aid == 0) {
- lassign = NEW_LABEL(line);
- ADD_INSN(ret, line, dup); /* cref cref */
- ADD_INSN3(ret, line, defined, INT2FIX(DEFINED_CONST),
+ lassign = NEW_LABEL(nd_line(node));
+ ADD_INSN(ret, nd_line(node), dup); /* cref cref */
+ ADD_INSN3(ret, nd_line(node), defined, INT2FIX(DEFINED_CONST),
ID2SYM(mid), Qfalse); /* cref bool */
- ADD_INSNL(ret, line, branchunless, lassign); /* cref */
+ ADD_INSNL(ret, nd_line(node), branchunless, lassign); /* cref */
}
- ADD_INSN(ret, line, dup); /* cref cref */
- ADD_INSN1(ret, line, getconstant, ID2SYM(mid)); /* cref obj */
+ ADD_INSN(ret, nd_line(node), dup); /* cref cref */
+ ADD_INSN1(ret, nd_line(node), getconstant, ID2SYM(mid)); /* cref obj */
if (node->nd_aid == 0 || node->nd_aid == 1) {
- lfin = NEW_LABEL(line);
- if (!poped) ADD_INSN(ret, line, dup); /* cref [obj] obj */
+ lfin = NEW_LABEL(nd_line(node));
+ if (!poped) ADD_INSN(ret, nd_line(node), dup); /* cref [obj] obj */
if (node->nd_aid == 0)
- ADD_INSNL(ret, line, branchif, lfin);
+ ADD_INSNL(ret, nd_line(node), branchif, lfin);
else
- ADD_INSNL(ret, line, branchunless, lfin);
+ ADD_INSNL(ret, nd_line(node), branchunless, lfin);
/* cref [obj] */
- if (!poped) ADD_INSN(ret, line, pop); /* cref */
+ if (!poped) ADD_INSN(ret, nd_line(node), pop); /* cref */
if (lassign) ADD_LABEL(ret, lassign);
COMPILE(ret, "NODE_OP_CDECL#nd_value", node->nd_value);
/* cref value */
if (poped)
- ADD_INSN1(ret, line, topn, INT2FIX(1)); /* cref value cref */
+ ADD_INSN1(ret, nd_line(node), topn, INT2FIX(1)); /* cref value cref */
else {
- ADD_INSN1(ret, line, dupn, INT2FIX(2)); /* cref value cref value */
- ADD_INSN(ret, line, swap); /* cref value value cref */
+ ADD_INSN1(ret, nd_line(node), dupn, INT2FIX(2)); /* cref value cref value */
+ ADD_INSN(ret, nd_line(node), swap); /* cref value value cref */
}
- ADD_INSN1(ret, line, setconstant, ID2SYM(mid)); /* cref [value] */
+ ADD_INSN1(ret, nd_line(node), setconstant, ID2SYM(mid)); /* cref [value] */
ADD_LABEL(ret, lfin); /* cref [value] */
- if (!poped) ADD_INSN(ret, line, swap); /* [value] cref */
- ADD_INSN(ret, line, pop); /* [value] */
+ if (!poped) ADD_INSN(ret, nd_line(node), swap); /* [value] cref */
+ ADD_INSN(ret, nd_line(node), pop); /* [value] */
}
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, nd_line(node), ID2SYM(node->nd_aid), INT2FIX(1));
/* cref value */
- ADD_INSN(ret, line, swap); /* value cref */
+ ADD_INSN(ret, nd_line(node), swap); /* value cref */
if (!poped) {
- ADD_INSN1(ret, line, topn, INT2FIX(1)); /* value cref value */
- ADD_INSN(ret, line, swap); /* value value cref */
+ ADD_INSN1(ret, nd_line(node), topn, INT2FIX(1)); /* value cref value */
+ ADD_INSN(ret, nd_line(node), swap); /* value value cref */
}
- ADD_INSN1(ret, line, setconstant, ID2SYM(mid));
+ ADD_INSN1(ret, nd_line(node), setconstant, ID2SYM(mid));
}
break;
}
case NODE_OP_ASGN_AND:
case NODE_OP_ASGN_OR:{
- LABEL *lfin = NEW_LABEL(line);
+ LABEL *lfin = NEW_LABEL(nd_line(node));
LABEL *lassign;
if (nd_type(node) == NODE_OP_ASGN_OR) {
@@ -4289,47 +4243,36 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
defined_expr(iseq, ret, node->nd_head, lfinish, Qfalse);
lassign = lfinish[1];
if (!lassign) {
- lassign = NEW_LABEL(line);
+ lassign = NEW_LABEL(nd_line(node));
}
- ADD_INSNL(ret, line, branchunless, lassign);
+ ADD_INSNL(ret, nd_line(node), branchunless, lassign);
}
else {
- lassign = NEW_LABEL(line);
+ lassign = NEW_LABEL(nd_line(node));
}
COMPILE(ret, "NODE_OP_ASGN_AND/OR#nd_head", node->nd_head);
- ADD_INSN(ret, line, dup);
+ ADD_INSN(ret, nd_line(node), dup);
if (nd_type(node) == NODE_OP_ASGN_AND) {
- ADD_INSNL(ret, line, branchunless, lfin);
+ ADD_INSNL(ret, nd_line(node), branchunless, lfin);
}
else {
- ADD_INSNL(ret, line, branchif, lfin);
+ ADD_INSNL(ret, nd_line(node), branchif, lfin);
}
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
ADD_LABEL(ret, lassign);
COMPILE(ret, "NODE_OP_ASGN_AND/OR#nd_value", node->nd_value);
ADD_LABEL(ret, lfin);
if (poped) {
/* we can apply more optimize */
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
break;
}
case NODE_CALL:
- if (node->nd_recv && nd_type(node->nd_recv) == NODE_STR &&
- node->nd_mid == idFreeze && node->nd_args == NULL)
- {
- VALUE str = rb_fstring(node->nd_recv->nd_lit);
- iseq_add_mark_object(iseq, str);
- ADD_INSN1(ret, line, opt_str_freeze, str);
- if (poped) {
- ADD_INSN(ret, line, pop);
- }
- break;
- }
case NODE_FCALL:
case NODE_VCALL:{ /* VCALL: variable or call */
/*
@@ -4356,11 +4299,11 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
CONST_ID(id_answer, "the_answer_to_life_the_universe_and_everything");
if (mid == id_bitblt) {
- ADD_INSN(ret, line, bitblt);
+ ADD_INSN(ret, nd_line(node), bitblt);
break;
}
else if (mid == id_answer) {
- ADD_INSN(ret, line, answer);
+ ADD_INSN(ret, nd_line(node), answer);
break;
}
}
@@ -4388,8 +4331,8 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
label_name = SYM2ID(node->nd_args->nd_head->nd_lit);
if (!st_lookup(labels_table, (st_data_t)label_name, &data)) {
- label = NEW_LABEL(line);
- label->position = line;
+ label = NEW_LABEL(nd_line(node));
+ label->position = nd_line(node);
st_insert(labels_table, (st_data_t)label_name, (st_data_t)label);
}
else {
@@ -4402,7 +4345,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
if (mid == goto_id) {
- ADD_INSNL(ret, line, jump, label);
+ ADD_INSNL(ret, nd_line(node), jump, label);
}
else {
ADD_LABEL(ret, label);
@@ -4416,7 +4359,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
COMPILE(recv, "recv", node->nd_recv);
}
else if (type == NODE_FCALL || type == NODE_VCALL) {
- ADD_CALL_RECEIVER(recv, line);
+ ADD_CALL_RECEIVER(recv, nd_line(node));
}
/* args */
@@ -4441,26 +4384,25 @@ 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),
+ ADD_SEND_R(ret, nd_line(node), ID2SYM(mid),
argc, parent_block, LONG2FIX(flag));
if (poped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
break;
}
case NODE_SUPER:
case NODE_ZSUPER:{
DECL_ANCHOR(args);
- int argc;
+ VALUE argc;
VALUE flag = 0;
VALUE parent_block = iseq->compile_data->current_block;
INIT_ANCHOR(args);
iseq->compile_data->current_block = Qfalse;
if (nd_type(node) == NODE_SUPER) {
- VALUE vargc = setup_args(iseq, args, node->nd_args, &flag);
- argc = FIX2INT(vargc);
+ argc = setup_args(iseq, args, node->nd_args, &flag);
}
else {
/* NODE_ZSUPER */
@@ -4468,12 +4410,12 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
rb_iseq_t *liseq = iseq->local_iseq;
int lvar_level = get_lvar_level(iseq);
- argc = liseq->argc;
+ argc = INT2FIX(liseq->argc);
/* normal arguments */
for (i = 0; i < liseq->argc; i++) {
int idx = liseq->local_size - i;
- ADD_INSN2(args, line, getlocal, INT2FIX(idx), INT2FIX(lvar_level));
+ ADD_INSN2(args, nd_line(node), getlocal, INT2FIX(idx), INT2FIX(lvar_level));
}
if (!liseq->arg_simple) {
@@ -4482,17 +4424,17 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
int j;
for (j = 0; j < liseq->arg_opts - 1; j++) {
int idx = liseq->local_size - (i + j);
- ADD_INSN2(args, line, getlocal, INT2FIX(idx), INT2FIX(lvar_level));
+ ADD_INSN2(args, nd_line(node), getlocal, INT2FIX(idx), INT2FIX(lvar_level));
}
i += j;
- argc = i;
+ argc = INT2FIX(i);
}
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;
+ ADD_INSN2(args, nd_line(node), getlocal, INT2FIX(idx), INT2FIX(lvar_level));
+ argc = INT2FIX(liseq->arg_rest + 1);
flag |= VM_CALL_ARGS_SPLAT;
}
@@ -4505,53 +4447,32 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
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_INSN2(args, nd_line(node), getlocal, INT2FIX(idx), INT2FIX(lvar_level));
}
- ADD_INSN1(args, line, newarray, INT2FIX(j));
- ADD_INSN (args, line, concatarray);
- /* argc is settled at above */
+ ADD_INSN1(args, nd_line(node), newarray, INT2FIX(j));
+ ADD_INSN (args, nd_line(node), concatarray);
+ /* argc is setteled 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));
+ ADD_INSN2(args, nd_line(node), getlocal, INT2FIX(idx), INT2FIX(lvar_level));
}
- argc = post_len + post_start;
- }
- }
-
- 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));
- 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;
+ argc = INT2FIX(post_len + post_start);
}
}
}
}
/* dummy receiver */
- ADD_INSN1(ret, line, putobject, nd_type(node) == NODE_ZSUPER ? Qfalse : Qtrue);
+ ADD_INSN1(ret, nd_line(node), putobject, nd_type(node) == NODE_ZSUPER ? Qfalse : Qtrue);
ADD_SEQ(ret, args);
- ADD_INSN1(ret, line, invokesuper, new_callinfo(iseq, 0, argc, parent_block,
+ ADD_INSN1(ret, nd_line(node), invokesuper, new_callinfo(iseq, 0, FIX2INT(argc), parent_block,
flag | VM_CALL_SUPER | VM_CALL_FCALL));
if (poped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
break;
}
@@ -4561,7 +4482,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
}
case NODE_ZARRAY:{
if (!poped) {
- ADD_INSN1(ret, line, newarray, INT2FIX(0));
+ ADD_INSN1(ret, nd_line(node), newarray, INT2FIX(0));
}
break;
}
@@ -4571,9 +4492,9 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
COMPILE(ret, "values item", n->nd_head);
n = n->nd_next;
}
- ADD_INSN1(ret, line, newarray, INT2FIX(node->nd_alen));
+ ADD_INSN1(ret, nd_line(node), newarray, INT2FIX(node->nd_alen));
if (poped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
break;
}
@@ -4589,7 +4510,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
break;
case NODE_ZARRAY:
- ADD_INSN1(ret, line, newhash, INT2FIX(0));
+ ADD_INSN1(ret, nd_line(node), newhash, INT2FIX(0));
break;
default:
@@ -4597,7 +4518,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
}
if (poped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
break;
}
@@ -4614,25 +4535,25 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
if (is->type == ISEQ_TYPE_METHOD) {
splabel = NEW_LABEL(0);
ADD_LABEL(ret, splabel);
- ADD_ADJUST(ret, line, 0);
+ ADD_ADJUST(ret, nd_line(node), 0);
}
COMPILE(ret, "return nd_stts (return val)", node->nd_stts);
if (is->type == ISEQ_TYPE_METHOD) {
add_ensure_iseq(ret, iseq, 1);
- ADD_TRACE(ret, line, RUBY_EVENT_RETURN);
- ADD_INSN(ret, line, leave);
+ ADD_TRACE(ret, nd_line(node), RUBY_EVENT_RETURN);
+ ADD_INSN(ret, nd_line(node), leave);
ADD_ADJUST_RESTORE(ret, splabel);
if (!poped) {
- ADD_INSN(ret, line, putnil);
+ ADD_INSN(ret, nd_line(node), putnil);
}
}
else {
- ADD_INSN1(ret, line, throw, INT2FIX(0x01) /* TAG_RETURN */ );
+ ADD_INSN1(ret, nd_line(node), throw, INT2FIX(0x01) /* TAG_RETURN */ );
if (poped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
}
}
@@ -4657,10 +4578,10 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
}
ADD_SEQ(ret, args);
- ADD_INSN1(ret, line, invokeblock, new_callinfo(iseq, 0, FIX2INT(argc), 0, flag));
+ ADD_INSN1(ret, nd_line(node), invokeblock, new_callinfo(iseq, 0, FIX2INT(argc), 0, flag));
if (poped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
break;
}
@@ -4670,7 +4591,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
int idx = iseq->local_iseq->local_size - get_local_var_idx(iseq, id);
debugs("id: %s idx: %d\n", rb_id2name(id), idx);
- ADD_INSN2(ret, line, getlocal, INT2FIX(idx), INT2FIX(get_lvar_level(iseq)));
+ ADD_INSN2(ret, nd_line(node), getlocal, INT2FIX(idx), INT2FIX(get_lvar_level(iseq)));
}
break;
}
@@ -4682,23 +4603,23 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
if (idx < 0) {
rb_bug("unknown dvar (%s)", rb_id2name(node->nd_vid));
}
- ADD_INSN2(ret, line, getlocal, INT2FIX(ls - idx), INT2FIX(lv));
+ ADD_INSN2(ret, nd_line(node), getlocal, INT2FIX(ls - idx), INT2FIX(lv));
}
break;
}
case NODE_GVAR:{
- ADD_INSN1(ret, line, getglobal,
+ ADD_INSN1(ret, nd_line(node), getglobal,
((VALUE)node->nd_entry | 1));
if (poped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
break;
}
case NODE_IVAR:{
debugi("nd_vid", node->nd_vid);
if (!poped) {
- ADD_INSN2(ret, line, getinstancevariable,
- ID2SYM(node->nd_vid), INT2FIX(iseq->is_size++));
+ ADD_INSN2(ret, nd_line(node), getinstancevariable,
+ ID2SYM(node->nd_vid), INT2FIX(iseq->ic_size++));
}
break;
}
@@ -4706,41 +4627,41 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
debugi("nd_vid", node->nd_vid);
if (iseq->compile_data->option->inline_const_cache) {
- LABEL *lend = NEW_LABEL(line);
- int ic_index = iseq->is_size++;
+ LABEL *lend = NEW_LABEL(nd_line(node));
+ int ic_index = iseq->ic_size++;
- ADD_INSN2(ret, line, getinlinecache, lend, INT2FIX(ic_index));
- ADD_INSN1(ret, line, getconstant, ID2SYM(node->nd_vid));
- ADD_INSN1(ret, line, setinlinecache, INT2FIX(ic_index));
+ ADD_INSN2(ret, nd_line(node), getinlinecache, lend, INT2FIX(ic_index));
+ ADD_INSN1(ret, nd_line(node), getconstant, ID2SYM(node->nd_vid));
+ ADD_INSN1(ret, nd_line(node), setinlinecache, INT2FIX(ic_index));
ADD_LABEL(ret, lend);
}
else {
- ADD_INSN(ret, line, putnil);
- ADD_INSN1(ret, line, getconstant, ID2SYM(node->nd_vid));
+ ADD_INSN(ret, nd_line(node), putnil);
+ ADD_INSN1(ret, nd_line(node), getconstant, ID2SYM(node->nd_vid));
}
if (poped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
break;
}
case NODE_CVAR:{
if (!poped) {
- ADD_INSN1(ret, line, getclassvariable,
+ ADD_INSN1(ret, nd_line(node), getclassvariable,
ID2SYM(node->nd_vid));
}
break;
}
case NODE_NTH_REF:{
if (!poped) {
- ADD_INSN2(ret, line, getspecial, INT2FIX(1) /* '~' */,
+ ADD_INSN2(ret, nd_line(node), getspecial, INT2FIX(1) /* '~' */,
INT2FIX(node->nd_nth << 1));
}
break;
}
case NODE_BACK_REF:{
if (!poped) {
- ADD_INSN2(ret, line, getspecial, INT2FIX(1) /* '~' */,
+ ADD_INSN2(ret, nd_line(node), getspecial, INT2FIX(1) /* '~' */,
INT2FIX(0x01 | (node->nd_nth << 1)));
}
break;
@@ -4755,8 +4676,8 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
INIT_ANCHOR(val);
switch (nd_type(node)) {
case NODE_MATCH:
- ADD_INSN1(recv, line, putobject, node->nd_lit);
- ADD_INSN2(val, line, getspecial, INT2FIX(0),
+ ADD_INSN1(recv, nd_line(node), putobject, node->nd_lit);
+ ADD_INSN2(val, nd_line(node), getspecial, INT2FIX(0),
INT2FIX(0));
break;
case NODE_MATCH2:
@@ -4775,38 +4696,38 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
INSN_OF(recv->last) == BIN(putobject) &&
nd_type(node) == NODE_MATCH2) {
ADD_SEQ(ret, val);
- ADD_INSN1(ret, line, opt_regexpmatch1,
+ ADD_INSN1(ret, nd_line(node), opt_regexpmatch1,
OPERAND_AT(recv->last, 0));
}
else {
ADD_SEQ(ret, recv);
ADD_SEQ(ret, val);
- ADD_INSN1(ret, line, opt_regexpmatch2, new_callinfo(iseq, idEqTilde, 1, 0, 0));
+ ADD_INSN(ret, nd_line(node), opt_regexpmatch2);
}
}
else {
ADD_SEQ(ret, recv);
ADD_SEQ(ret, val);
- ADD_SEND(ret, line, ID2SYM(idEqTilde), INT2FIX(1));
+ ADD_SEND(ret, nd_line(node), ID2SYM(idEqTilde), INT2FIX(1));
}
if (poped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
break;
}
case NODE_LIT:{
debugp_param("lit", node->nd_lit);
if (!poped) {
- ADD_INSN1(ret, line, putobject, node->nd_lit);
+ ADD_INSN1(ret, nd_line(node), putobject, node->nd_lit);
}
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);
+ OBJ_FREEZE(node->nd_lit);
+ ADD_INSN1(ret, nd_line(node), putstring, node->nd_lit);
}
break;
}
@@ -4814,28 +4735,28 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
compile_dstr(iseq, ret, node);
if (poped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
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));
+ OBJ_FREEZE(node->nd_lit);
+ ADD_CALL_RECEIVER(ret, nd_line(node));
+ ADD_INSN1(ret, nd_line(node), putobject, node->nd_lit);
+ ADD_CALL(ret, nd_line(node), ID2SYM(idBackquote), INT2FIX(1));
if (poped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
break;
}
case NODE_DXSTR:{
- ADD_CALL_RECEIVER(ret, line);
+ ADD_CALL_RECEIVER(ret, nd_line(node));
compile_dstr(iseq, ret, node);
- ADD_CALL(ret, line, ID2SYM(idBackquote), INT2FIX(1));
+ ADD_CALL(ret, nd_line(node), ID2SYM(idBackquote), INT2FIX(1));
if (poped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
break;
}
@@ -4843,10 +4764,10 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
COMPILE(ret, "nd_body", node->nd_body);
if (poped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
else {
- ADD_INSN(ret, line, tostring);
+ ADD_INSN(ret, nd_line(node), tostring);
}
break;
}
@@ -4854,78 +4775,83 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
compile_dregx(iseq, ret, node);
if (poped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
break;
}
case NODE_DREGX_ONCE:{
- int ic_index = iseq->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);
+ /* TODO: once? */
+ LABEL *lend = NEW_LABEL(nd_line(node));
+ int ic_index = iseq->ic_size++;
- ADD_INSN2(ret, line, once, block_iseq, INT2FIX(ic_index));
+ ADD_INSN2(ret, nd_line(node), onceinlinecache, lend, INT2FIX(ic_index));
+ ADD_INSN(ret, nd_line(node), pop);
+
+ compile_dregx(iseq, ret, node);
+
+ ADD_INSN1(ret, nd_line(node), setinlinecache, INT2FIX(ic_index));
+ ADD_LABEL(ret, lend);
if (poped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
break;
}
case NODE_ARGSCAT:{
if (poped) {
COMPILE(ret, "argscat head", node->nd_head);
- ADD_INSN1(ret, line, splatarray, Qfalse);
- ADD_INSN(ret, line, pop);
+ ADD_INSN1(ret, nd_line(node), splatarray, Qfalse);
+ ADD_INSN(ret, nd_line(node), pop);
COMPILE(ret, "argscat body", node->nd_body);
- ADD_INSN1(ret, line, splatarray, Qfalse);
- ADD_INSN(ret, line, pop);
+ ADD_INSN1(ret, nd_line(node), splatarray, Qfalse);
+ ADD_INSN(ret, nd_line(node), pop);
}
else {
COMPILE(ret, "argscat head", node->nd_head);
COMPILE(ret, "argscat body", node->nd_body);
- ADD_INSN(ret, line, concatarray);
+ ADD_INSN(ret, nd_line(node), concatarray);
}
break;
}
case NODE_ARGSPUSH:{
if (poped) {
COMPILE(ret, "arsgpush head", node->nd_head);
- ADD_INSN1(ret, line, splatarray, Qfalse);
- ADD_INSN(ret, line, pop);
+ ADD_INSN1(ret, nd_line(node), splatarray, Qfalse);
+ ADD_INSN(ret, nd_line(node), pop);
COMPILE_(ret, "argspush body", node->nd_body, poped);
}
else {
COMPILE(ret, "arsgpush head", node->nd_head);
COMPILE_(ret, "argspush body", node->nd_body, poped);
- ADD_INSN1(ret, line, newarray, INT2FIX(1));
- ADD_INSN(ret, line, concatarray);
+ ADD_INSN1(ret, nd_line(node), newarray, INT2FIX(1));
+ ADD_INSN(ret, nd_line(node), concatarray);
}
break;
}
case NODE_SPLAT:{
COMPILE(ret, "splat", node->nd_head);
- ADD_INSN1(ret, line, splatarray, Qtrue);
+ ADD_INSN1(ret, nd_line(node), splatarray, Qtrue);
if (poped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
break;
}
case NODE_DEFN:{
VALUE iseqval = NEW_ISEQVAL(node->nd_defn,
- rb_id2str(node->nd_mid),
- ISEQ_TYPE_METHOD, line);
+ rb_str_dup(rb_id2str(node->nd_mid)),
+ ISEQ_TYPE_METHOD, nd_line(node));
debugp_param("defn/iseq", iseqval);
- 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, nd_line(node), putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
+ ADD_INSN1(ret, nd_line(node), putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_CBASE));
+ ADD_INSN1(ret, nd_line(node), putobject, ID2SYM(node->nd_mid));
+ ADD_INSN1(ret, nd_line(node), putiseq, iseqval);
+ ADD_SEND (ret, nd_line(node), ID2SYM(id_core_define_method), INT2FIX(3));
if (poped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
debugp_param("defn", iseqval);
@@ -4933,53 +4859,53 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
}
case NODE_DEFS:{
VALUE iseqval = NEW_ISEQVAL(node->nd_defn,
- rb_id2str(node->nd_mid),
- ISEQ_TYPE_METHOD, line);
+ rb_str_dup(rb_id2str(node->nd_mid)),
+ ISEQ_TYPE_METHOD, nd_line(node));
debugp_param("defs/iseq", iseqval);
- ADD_INSN1(ret, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
+ ADD_INSN1(ret, nd_line(node), 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, nd_line(node), putobject, ID2SYM(node->nd_mid));
+ ADD_INSN1(ret, nd_line(node), putiseq, iseqval);
+ ADD_SEND (ret, nd_line(node), ID2SYM(id_core_define_singleton_method), INT2FIX(3));
if (poped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
break;
}
case NODE_ALIAS:{
- ADD_INSN1(ret, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
- ADD_INSN1(ret, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_CBASE));
+ ADD_INSN1(ret, nd_line(node), putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
+ ADD_INSN1(ret, nd_line(node), 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, nd_line(node), ID2SYM(id_core_set_method_alias), INT2FIX(3));
if (poped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
break;
}
case NODE_VALIAS:{
- 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_INSN1(ret, nd_line(node), putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
+ ADD_INSN1(ret, nd_line(node), putobject, ID2SYM(node->u1.id));
+ ADD_INSN1(ret, nd_line(node), putobject, ID2SYM(node->u2.id));
+ ADD_SEND(ret, nd_line(node), ID2SYM(id_core_set_variable_alias), INT2FIX(2));
if (poped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
break;
}
case NODE_UNDEF:{
- ADD_INSN1(ret, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
- ADD_INSN1(ret, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_CBASE));
+ ADD_INSN1(ret, nd_line(node), putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
+ ADD_INSN1(ret, nd_line(node), 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, nd_line(node), ID2SYM(id_core_undef_method), INT2FIX(2));
if (poped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
break;
}
@@ -4988,17 +4914,17 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
NEW_CHILD_ISEQVAL(
node->nd_body,
rb_sprintf("<class:%s>", rb_id2name(node->nd_cpath->nd_mid)),
- ISEQ_TYPE_CLASS, line);
+ ISEQ_TYPE_CLASS, nd_line(node));
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,
+ ADD_INSN3(ret, nd_line(node), defineclass,
ID2SYM(node->nd_cpath->nd_mid), iseqval, INT2FIX(flags));
if (poped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
break;
}
@@ -5006,16 +4932,16 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
VALUE iseqval = NEW_CHILD_ISEQVAL(
node->nd_body,
rb_sprintf("<module:%s>", rb_id2name(node->nd_cpath->nd_mid)),
- ISEQ_TYPE_CLASS, line);
+ ISEQ_TYPE_CLASS, nd_line(node));
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,
+ ADD_INSN (ret, nd_line(node), putnil); /* dummy */
+ ADD_INSN3(ret, nd_line(node), defineclass,
ID2SYM(node->nd_cpath->nd_mid), iseqval, INT2FIX(flags));
if (poped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
break;
}
@@ -5023,25 +4949,25 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
ID singletonclass;
VALUE iseqval =
NEW_ISEQVAL(node->nd_body, rb_str_new2("singleton class"),
- ISEQ_TYPE_CLASS, line);
+ ISEQ_TYPE_CLASS, nd_line(node));
COMPILE(ret, "sclass#recv", node->nd_recv);
- ADD_INSN (ret, line, putnil);
+ ADD_INSN (ret, nd_line(node), putnil);
CONST_ID(singletonclass, "singletonclass");
- ADD_INSN3(ret, line, defineclass,
+ ADD_INSN3(ret, nd_line(node), defineclass,
ID2SYM(singletonclass), iseqval,
INT2FIX(VM_DEFINECLASS_TYPE_SINGLETON_CLASS));
if (poped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
break;
}
case NODE_COLON2:{
if (rb_is_const_id(node->nd_mid)) {
/* constant */
- LABEL *lend = NEW_LABEL(line);
- int ic_index = iseq->is_size++;
+ LABEL *lend = NEW_LABEL(nd_line(node));
+ int ic_index = iseq->ic_size++;
DECL_ANCHOR(pref);
DECL_ANCHOR(body);
@@ -5051,16 +4977,16 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
compile_colon2(iseq, node, pref, body);
if (LIST_SIZE_ZERO(pref)) {
if (iseq->compile_data->option->inline_const_cache) {
- ADD_INSN2(ret, line, getinlinecache, lend, INT2FIX(ic_index));
+ ADD_INSN2(ret, nd_line(node), getinlinecache, lend, INT2FIX(ic_index));
}
else {
- ADD_INSN(ret, line, putnil);
+ ADD_INSN(ret, nd_line(node), putnil);
}
ADD_SEQ(ret, body);
if (iseq->compile_data->option->inline_const_cache) {
- ADD_INSN1(ret, line, setinlinecache, INT2FIX(ic_index));
+ ADD_INSN1(ret, nd_line(node), setinlinecache, INT2FIX(ic_index));
ADD_LABEL(ret, lend);
}
}
@@ -5071,38 +4997,38 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
}
else {
/* function call */
- ADD_CALL_RECEIVER(ret, line);
+ ADD_CALL_RECEIVER(ret, nd_line(node));
COMPILE(ret, "colon2#nd_head", node->nd_head);
- ADD_CALL(ret, line, ID2SYM(node->nd_mid),
+ ADD_CALL(ret, nd_line(node), ID2SYM(node->nd_mid),
INT2FIX(1));
}
if (poped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
break;
}
case NODE_COLON3:{
- LABEL *lend = NEW_LABEL(line);
- int ic_index = iseq->is_size++;
+ LABEL *lend = NEW_LABEL(nd_line(node));
+ int ic_index = iseq->ic_size++;
- debugi("colon3#nd_mid", node->nd_mid);
+ debugi("colon3#nd_mid", node->nd_mid);
/* add cache insn */
if (iseq->compile_data->option->inline_const_cache) {
- ADD_INSN2(ret, line, getinlinecache, lend, INT2FIX(ic_index));
- ADD_INSN(ret, line, pop);
+ ADD_INSN2(ret, nd_line(node), getinlinecache, lend, INT2FIX(ic_index));
+ ADD_INSN(ret, nd_line(node), pop);
}
- ADD_INSN1(ret, line, putobject, rb_cObject);
- ADD_INSN1(ret, line, getconstant, ID2SYM(node->nd_mid));
+ ADD_INSN1(ret, nd_line(node), putobject, rb_cObject);
+ ADD_INSN1(ret, nd_line(node), getconstant, ID2SYM(node->nd_mid));
if (iseq->compile_data->option->inline_const_cache) {
- ADD_INSN1(ret, line, setinlinecache, INT2FIX(ic_index));
+ ADD_INSN1(ret, nd_line(node), setinlinecache, INT2FIX(ic_index));
ADD_LABEL(ret, lend);
}
if (poped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
break;
}
@@ -5112,83 +5038,84 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
COMPILE(ret, "min", (NODE *) node->nd_beg);
COMPILE(ret, "max", (NODE *) node->nd_end);
if (poped) {
- ADD_INSN(ret, line, pop);
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
else {
- ADD_INSN1(ret, line, newrange, flag);
+ ADD_INSN1(ret, nd_line(node), newrange, flag);
}
break;
}
case NODE_FLIP2:
case NODE_FLIP3:{
- LABEL *lend = NEW_LABEL(line);
- LABEL *lfin = NEW_LABEL(line);
- LABEL *ltrue = NEW_LABEL(line);
- rb_iseq_t *local_iseq = iseq->local_iseq;
+ LABEL *lend = NEW_LABEL(nd_line(node));
+ LABEL *lfin = NEW_LABEL(nd_line(node));
+ LABEL *ltrue = NEW_LABEL(nd_line(node));
+ struct iseq_compile_data *data = iseq->local_iseq->compile_data;
rb_num_t cnt;
VALUE key;
- cnt = local_iseq->flip_cnt++ + DEFAULT_SPECIAL_VAR_COUNT;
+ if (!data) data = iseq->compile_data;
+ cnt = data->flip_cnt++ + DEFAULT_SPECIAL_VAR_COUNT;
key = INT2FIX(cnt);
- ADD_INSN2(ret, line, getspecial, key, INT2FIX(0));
- ADD_INSNL(ret, line, branchif, lend);
+ ADD_INSN2(ret, nd_line(node), getspecial, key, INT2FIX(0));
+ ADD_INSNL(ret, nd_line(node), branchif, lend);
/* *flip == 0 */
COMPILE(ret, "flip2 beg", node->nd_beg);
- ADD_INSN(ret, line, dup);
- ADD_INSNL(ret, line, branchunless, lfin);
+ ADD_INSN(ret, nd_line(node), dup);
+ ADD_INSNL(ret, nd_line(node), branchunless, lfin);
if (nd_type(node) == NODE_FLIP3) {
- ADD_INSN(ret, line, dup);
- ADD_INSN1(ret, line, setspecial, key);
- ADD_INSNL(ret, line, jump, lfin);
+ ADD_INSN(ret, nd_line(node), dup);
+ ADD_INSN1(ret, nd_line(node), setspecial, key);
+ ADD_INSNL(ret, nd_line(node), jump, lfin);
}
else {
- ADD_INSN1(ret, line, setspecial, key);
+ ADD_INSN1(ret, nd_line(node), setspecial, key);
}
/* *flip == 1 */
ADD_LABEL(ret, lend);
COMPILE(ret, "flip2 end", node->nd_end);
- ADD_INSNL(ret, line, branchunless, ltrue);
- ADD_INSN1(ret, line, putobject, Qfalse);
- ADD_INSN1(ret, line, setspecial, key);
+ ADD_INSNL(ret, nd_line(node), branchunless, ltrue);
+ ADD_INSN1(ret, nd_line(node), putobject, Qfalse);
+ ADD_INSN1(ret, nd_line(node), setspecial, key);
ADD_LABEL(ret, ltrue);
- ADD_INSN1(ret, line, putobject, Qtrue);
+ ADD_INSN1(ret, nd_line(node), putobject, Qtrue);
ADD_LABEL(ret, lfin);
break;
}
case NODE_SELF:{
if (!poped) {
- ADD_INSN(ret, line, putself);
+ ADD_INSN(ret, nd_line(node), putself);
}
break;
}
case NODE_NIL:{
if (!poped) {
- ADD_INSN(ret, line, putnil);
+ ADD_INSN(ret, nd_line(node), putnil);
}
break;
}
case NODE_TRUE:{
if (!poped) {
- ADD_INSN1(ret, line, putobject, Qtrue);
+ ADD_INSN1(ret, nd_line(node), putobject, Qtrue);
}
break;
}
case NODE_FALSE:{
if (!poped) {
- ADD_INSN1(ret, line, putobject, Qfalse);
+ ADD_INSN1(ret, nd_line(node), putobject, Qfalse);
}
break;
}
case NODE_ERRINFO:{
if (!poped) {
if (iseq->type == ISEQ_TYPE_RESCUE) {
- ADD_INSN2(ret, line, getlocal, INT2FIX(2), INT2FIX(0));
+ ADD_INSN2(ret, nd_line(node), getlocal, INT2FIX(2), INT2FIX(0));
}
else {
rb_iseq_t *ip = iseq;
@@ -5201,29 +5128,24 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
level++;
}
if (ip) {
- ADD_INSN2(ret, line, getlocal, INT2FIX(2), INT2FIX(level));
+ ADD_INSN2(ret, nd_line(node), getlocal, INT2FIX(2), INT2FIX(level));
}
else {
- ADD_INSN(ret, line, putnil);
+ ADD_INSN(ret, nd_line(node), putnil);
}
}
}
break;
}
case NODE_DEFINED:{
- if (poped) break;
- if (!node->nd_head) {
- VALUE str = rb_iseq_defined_string(DEFINED_NIL);
- ADD_INSN1(ret, nd_line(node), putobject, str);
- }
- else {
+ if (!poped) {
LABEL *lfinish[2];
- lfinish[0] = NEW_LABEL(line);
+ lfinish[0] = NEW_LABEL(nd_line(node));
lfinish[1] = 0;
- ADD_INSN(ret, line, putnil);
+ ADD_INSN(ret, nd_line(node), putnil);
defined_expr(iseq, ret, node->nd_head, lfinish, Qtrue);
- ADD_INSN(ret, line, swap);
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), swap);
+ ADD_INSN(ret, nd_line(node), pop);
if (lfinish[1]) {
ADD_LABEL(ret, lfinish[1]);
}
@@ -5232,65 +5154,64 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
break;
}
case NODE_POSTEXE:{
- /* 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);
+ LABEL *lend = NEW_LABEL(nd_line(node));
+ VALUE block = NEW_CHILD_ISEQVAL(node->nd_body, make_name_for_block(iseq), ISEQ_TYPE_BLOCK, nd_line(node));
+ int ic_index = iseq->ic_size++;
+
+ ADD_INSN2(ret, nd_line(node), onceinlinecache, lend, INT2FIX(ic_index));
+ ADD_INSN(ret, nd_line(node), pop);
- ADD_INSN2(ret, line, once, once_iseq, INT2FIX(is_index));
+ ADD_INSN1(ret, nd_line(node), putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
+ ADD_INSN1(ret, nd_line(node), putiseq, block);
+ ADD_SEND (ret, nd_line(node), ID2SYM(id_core_set_postexe), INT2FIX(1));
+
+ ADD_INSN1(ret, nd_line(node), setinlinecache, INT2FIX(ic_index));
+ ADD_LABEL(ret, lend);
if (poped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
break;
}
case NODE_KW_ARG:{
- LABEL *default_label = NEW_LABEL(line);
- LABEL *end_label = 0;
+ LABEL *default_label = NEW_LABEL(nd_line(node));
+ LABEL *end_label = NEW_LABEL(nd_line(node));
int idx, lv, ls;
ID id = node->nd_body->nd_vid;
- 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));
+ ADD_INSN(ret, nd_line(node), dup);
+ ADD_INSN1(ret, nd_line(node), putobject, ID2SYM(id));
+ ADD_SEND(ret, nd_line(node), ID2SYM(rb_intern("key?")), INT2FIX(1));
+ ADD_INSNL(ret, nd_line(node), branchunless, default_label);
+ ADD_INSN(ret, nd_line(node), dup);
+ ADD_INSN1(ret, nd_line(node), putobject, ID2SYM(id));
+ ADD_SEND(ret, nd_line(node), 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)));
+ ADD_INSN2(ret, nd_line(node), 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));
+ ADD_INSN2(ret, nd_line(node), 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_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);
- }
+ 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, nd_line(node), ID2SYM(idIntern), INT2FIX(0));
}
else {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
break;
}
@@ -5306,7 +5227,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
if (node->nd_recv == (NODE *) 1) {
flag |= VM_CALL_FCALL;
- ADD_INSN(recv, line, putself);
+ ADD_INSN(recv, nd_line(node), putself);
}
else {
COMPILE(recv, "recv", node->nd_recv);
@@ -5316,36 +5237,36 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
debugp_param("nd_mid", ID2SYM(node->nd_mid));
if (!poped) {
- ADD_INSN(ret, line, putnil);
+ ADD_INSN(ret, nd_line(node), putnil);
ADD_SEQ(ret, recv);
ADD_SEQ(ret, args);
if (flag & VM_CALL_ARGS_BLOCKARG) {
- ADD_INSN1(ret, line, topn, INT2FIX(1));
+ ADD_INSN1(ret, nd_line(node), 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_INSN1(ret, nd_line(node), putobject, INT2FIX(-1));
+ ADD_SEND(ret, nd_line(node), ID2SYM(idAREF), INT2FIX(1));
}
- ADD_INSN1(ret, line, setn, FIXNUM_INC(argc, 3));
- ADD_INSN (ret, line, pop);
+ ADD_INSN1(ret, nd_line(node), setn, FIXNUM_INC(argc, 3));
+ ADD_INSN (ret, nd_line(node), pop);
}
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_INSN1(ret, line, setn, FIXNUM_INC(argc, 2));
- ADD_INSN (ret, line, pop);
+ ADD_INSN(ret, nd_line(node), dup);
+ ADD_INSN1(ret, nd_line(node), putobject, INT2FIX(-1));
+ ADD_SEND(ret, nd_line(node), ID2SYM(idAREF), INT2FIX(1));
+ ADD_INSN1(ret, nd_line(node), setn, FIXNUM_INC(argc, 2));
+ ADD_INSN (ret, nd_line(node), pop);
}
else {
- ADD_INSN1(ret, line, setn, FIXNUM_INC(argc, 1));
+ ADD_INSN1(ret, nd_line(node), setn, FIXNUM_INC(argc, 1));
}
}
else {
ADD_SEQ(ret, recv);
ADD_SEQ(ret, args);
}
- ADD_SEND_R(ret, line, ID2SYM(node->nd_mid), argc, 0, LONG2FIX(flag));
- ADD_INSN(ret, line, pop);
+ ADD_SEND_R(ret, nd_line(node), ID2SYM(node->nd_mid), argc, 0, LONG2FIX(flag));
+ ADD_INSN(ret, nd_line(node), pop);
break;
}
@@ -5356,13 +5277,13 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
}
case NODE_LAMBDA:{
/* compile same as lambda{...} */
- VALUE block = NEW_CHILD_ISEQVAL(node->nd_body, make_name_for_block(iseq), ISEQ_TYPE_BLOCK, line);
+ VALUE block = NEW_CHILD_ISEQVAL(node->nd_body, make_name_for_block(iseq), ISEQ_TYPE_BLOCK, nd_line(node));
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_INSN1(ret, nd_line(node), putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
+ ADD_CALL_WITH_BLOCK(ret, nd_line(node), ID2SYM(idLambda), argc, block);
if (poped) {
- ADD_INSN(ret, line, pop);
+ ADD_INSN(ret, nd_line(node), pop);
}
break;
}
@@ -5371,13 +5292,6 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
return COMPILE_NG;
}
- /* check & remove redundant trace(line) */
- if (saved_last_element && ret /* ret can be 0 when error */ &&
- ret->last == saved_last_element &&
- ((INSN *)saved_last_element)->insn_id == BIN(trace)) {
- POP_ELEMENT(ret);
- }
-
debug_node_end();
return COMPILE_OK;
}
@@ -5398,29 +5312,16 @@ calc_sp_depth(int depth, INSN *insn)
return insn_stack_increase(depth, insn->insn_id, insn->operands);
}
-static VALUE
-opobj_inspect(VALUE obj)
+static int
+insn_data_line_no(INSN *iobj)
{
- struct RBasic *r = (struct RBasic *) obj;
- if (!SPECIAL_CONST_P(r) && r->klass == 0) {
- switch (BUILTIN_TYPE(r)) {
- case T_STRING:
- obj = rb_str_new_cstr(RSTRING_PTR(obj));
- break;
- case T_ARRAY:
- obj = rb_ary_dup(obj);
- break;
- }
- }
- return rb_inspect(obj);
+ return insn_len(iobj->line_no);
}
-
-
static VALUE
insn_data_to_s_detail(INSN *iobj)
{
- VALUE str = rb_sprintf("%-20s ", insn_name(iobj->insn_id));
+ VALUE str = rb_sprintf("%-16s", insn_name(iobj->insn_id));
if (iobj->operands) {
const char *types = insn_op_types(iobj->insn_id);
@@ -5428,6 +5329,7 @@ insn_data_to_s_detail(INSN *iobj)
for (j = 0; types[j]; j++) {
char type = types[j];
+ printf("str: %"PRIxVALUE", type: %c\n", str, type);
switch (type) {
case TS_OFFSET: /* label(destination position) */
@@ -5444,7 +5346,7 @@ insn_data_to_s_detail(INSN *iobj)
if (0 && iseq) { /* TODO: invalidate now */
val = iseq->self;
}
- rb_str_concat(str, opobj_inspect(val));
+ rb_str_concat(str, rb_inspect(val));
}
break;
case TS_LINDEX:
@@ -5452,11 +5354,11 @@ insn_data_to_s_detail(INSN *iobj)
case TS_VALUE: /* VALUE */
{
VALUE v = OPERAND_AT(iobj, j);
- rb_str_concat(str, opobj_inspect(v));
+ rb_str_concat(str, rb_inspect(v));
break;
}
case TS_ID: /* ID */
- rb_str_concat(str, opobj_inspect(OPERAND_AT(iobj, j)));
+ rb_str_concat(str, rb_inspect(OPERAND_AT(iobj, j)));
break;
case TS_GENTRY:
{
@@ -5505,7 +5407,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(%4d)\n", pos, StringValueCStr(str), insn_data_line_no(iobj));
pos += insn_data_length(iobj);
break;
}
@@ -5523,7 +5425,7 @@ dump_disasm_list(struct iseq_link_element *link)
case ISEQ_ELEMENT_ADJUST:
{
ADJUST *adjust = (ADJUST *)link;
- printf("adjust: [label: %d]\n", adjust->label ? adjust->label->label_no : -1);
+ printf("adjust: [label: %d]\n", adjust->label->label_no);
break;
}
default:
@@ -5547,7 +5449,7 @@ rb_insns_name_array(void)
VALUE ary = rb_ary_new();
int i;
for (i = 0; i < numberof(insn_name_info); i++) {
- rb_ary_push(ary, rb_fstring(rb_str_new2(insn_name_info[i])));
+ rb_ary_push(ary, rb_obj_freeze(rb_str_new2(insn_name_info[i])));
}
return rb_obj_freeze(ary);
}
@@ -5606,17 +5508,16 @@ 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 VALUE *ptr;
+ VALUE v, type, *ptr, eiseqval;
LABEL *lstart, *lend, *lcont;
int sp;
- RB_GC_GUARD(v) = rb_convert_type(RARRAY_AREF(exception, i), T_ARRAY,
+ RB_GC_GUARD(v) = rb_convert_type(RARRAY_PTR(exception)[i], T_ARRAY,
"Array", "to_ary");
if (RARRAY_LEN(v) != 6) {
rb_raise(rb_eSyntaxError, "wrong exception entry");
}
- ptr = RARRAY_CONST_PTR(v);
+ ptr = RARRAY_PTR(v);
type = get_exception_sym2type(ptr[0]);
if (ptr[1] == Qnil) {
eiseqval = 0;
@@ -5673,7 +5574,7 @@ iseq_build_from_ary_body(rb_iseq_t *iseq, LINK_ANCHOR *anchor,
VALUE body, struct st_table *labels_table)
{
/* TODO: body should be frozen */
- const VALUE *ptr = RARRAY_CONST_PTR(body);
+ VALUE *ptr = RARRAY_PTR(body);
long i, len = RARRAY_LEN(body);
int j;
int line_no = 0;
@@ -5703,7 +5604,7 @@ iseq_build_from_ary_body(rb_iseq_t *iseq, LINK_ANCHOR *anchor,
st_data_t insn_id;
VALUE insn;
- insn = (argc < 0) ? Qnil : RARRAY_AREF(obj, 0);
+ insn = (argc < 0) ? Qnil : RARRAY_PTR(obj)[0];
if (st_lookup(insn_table, (st_data_t)insn, &insn_id) == 0) {
/* TODO: exception */
RB_GC_GUARD(insn) = rb_inspect(insn);
@@ -5751,8 +5652,8 @@ 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 (NUM2INT(op) >= iseq->ic_size) {
+ iseq->ic_size = NUM2INT(op) + 1;
}
break;
case TS_CALLINFO:
@@ -5834,7 +5735,7 @@ rb_iseq_build_from_ary(rb_iseq_t *iseq, VALUE locals, VALUE args,
iseq->local_size = iseq->local_table_size + 1;
for (i=0; i<RARRAY_LEN(locals); i++) {
- VALUE lv = RARRAY_AREF(locals, i);
+ VALUE lv = RARRAY_PTR(locals)[i];
tbl[i] = FIXNUM_P(lv) ? (ID)FIX2LONG(lv) : SYM2ID(CHECK_SYMBOL(lv));
}
diff --git a/complex.c b/complex.c
index 3e9d63117a..2efe6a4676 100644
--- a/complex.c
+++ b/complex.c
@@ -210,16 +210,17 @@ f_negative_p(VALUE x)
inline static VALUE
f_zero_p(VALUE x)
{
- if (RB_TYPE_P(x, T_FIXNUM)) {
+ switch (TYPE(x)) {
+ case T_FIXNUM:
return f_boolcast(FIX2LONG(x) == 0);
- }
- else if (RB_TYPE_P(x, T_BIGNUM)) {
+ case T_BIGNUM:
return Qfalse;
- }
- else if (RB_TYPE_P(x, T_RATIONAL)) {
- VALUE num = RRATIONAL(x)->num;
+ case T_RATIONAL:
+ {
+ VALUE num = RRATIONAL(x)->num;
- return f_boolcast(FIXNUM_P(num) && FIX2LONG(num) == 0);
+ return f_boolcast(FIXNUM_P(num) && FIX2LONG(num) == 0);
+ }
}
return rb_funcall(x, id_eqeq_p, 1, ZERO);
}
@@ -229,18 +230,19 @@ f_zero_p(VALUE x)
inline static VALUE
f_one_p(VALUE x)
{
- if (RB_TYPE_P(x, T_FIXNUM)) {
+ switch (TYPE(x)) {
+ case T_FIXNUM:
return f_boolcast(FIX2LONG(x) == 1);
- }
- else if (RB_TYPE_P(x, T_BIGNUM)) {
+ case T_BIGNUM:
return Qfalse;
- }
- else if (RB_TYPE_P(x, T_RATIONAL)) {
- VALUE num = RRATIONAL(x)->num;
- VALUE den = RRATIONAL(x)->den;
-
- return f_boolcast(FIXNUM_P(num) && FIX2LONG(num) == 1 &&
- FIXNUM_P(den) && FIX2LONG(den) == 1);
+ case T_RATIONAL:
+ {
+ VALUE num = RRATIONAL(x)->num;
+ VALUE den = RRATIONAL(x)->den;
+
+ return f_boolcast(FIXNUM_P(num) && FIX2LONG(num) == 1 &&
+ FIXNUM_P(den) && FIX2LONG(den) == 1);
+ }
}
return rb_funcall(x, id_eqeq_p, 1, ONE);
}
@@ -311,10 +313,10 @@ k_complex_p(VALUE x)
inline static VALUE
nucomp_s_new_internal(VALUE klass, VALUE real, VALUE imag)
{
- NEWOBJ_OF(obj, struct RComplex, klass, T_COMPLEX | (RGENGC_WB_PROTECTED_COMPLEX ? FL_WB_PROTECTED : 0));
+ NEWOBJ_OF(obj, struct RComplex, klass, T_COMPLEX);
- RCOMPLEX_SET_REAL(obj, real);
- RCOMPLEX_SET_IMAG(obj, imag);
+ obj->real = real;
+ obj->imag = imag;
return (VALUE)obj;
}
@@ -381,10 +383,13 @@ nucomp_canonicalization(int f)
inline static void
nucomp_real_check(VALUE num)
{
- if (!RB_TYPE_P(num, T_FIXNUM) &&
- !RB_TYPE_P(num, T_BIGNUM) &&
- !RB_TYPE_P(num, T_FLOAT) &&
- !RB_TYPE_P(num, T_RATIONAL)) {
+ switch (TYPE(num)) {
+ case T_FIXNUM:
+ case T_BIGNUM:
+ case T_FLOAT:
+ case T_RATIONAL:
+ break;
+ default:
if (!k_numeric_p(num) || !f_real_p(num))
rb_raise(rb_eTypeError, "not a real");
}
@@ -478,28 +483,6 @@ f_complex_new2(VALUE klass, VALUE x, VALUE y)
*
* Complex(1, 2) #=> (1+2i)
* Complex('1+2i') #=> (1+2i)
- *
- * Syntax of string form:
- *
- * string form = extra spaces , complex , extra spaces ;
- * complex = real part | [ sign ] , imaginary part
- * | real part , sign , imaginary part
- * | rational , "@" , rational ;
- * real part = rational ;
- * imaginary part = imaginary unit | unsigned rational , imaginary unit ;
- * rational = [ sign ] , unsigned rational ;
- * unsigned rational = numerator | numerator , "/" , denominator ;
- * numerator = integer part | fractional part | integer part , fractional part ;
- * denominator = digits ;
- * integer part = digits ;
- * fractional part = "." , digits , [ ( "e" | "E" ) , [ sign ] , digits ] ;
- * imaginary unit = "i" | "I" | "j" | "J" ;
- * sign = "-" | "+" ;
- * digits = digit , { digit | "_" , digit };
- * digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ;
- * extra spaces = ? \s* ? ;
- *
- * See String#to_c.
*/
static VALUE
nucomp_f_complex(int argc, VALUE *argv, VALUE klass)
@@ -1237,9 +1220,11 @@ f_signbit(VALUE x)
!defined(signbit)
extern int signbit(double);
#endif
- if (RB_TYPE_P(x, T_FLOAT)) {
+ switch (TYPE(x)) {
+ case T_FLOAT: {
double f = RFLOAT_VALUE(x);
return f_boolcast(!isnan(f) && signbit(f));
+ }
}
return f_negative_p(x);
}
@@ -1325,8 +1310,8 @@ nucomp_loader(VALUE self, VALUE a)
{
get_dat1(self);
- RCOMPLEX_SET_REAL(dat, rb_ivar_get(a, id_i_real));
- RCOMPLEX_SET_IMAG(dat, rb_ivar_get(a, id_i_imag));
+ dat->real = rb_ivar_get(a, id_i_real);
+ dat->imag = rb_ivar_get(a, id_i_imag);
return self;
}
@@ -1339,7 +1324,6 @@ nucomp_marshal_dump(VALUE self)
get_dat1(self);
a = rb_assoc_new(dat->real, dat->imag);
- rb_copy_generic_ivar(a, self);
return a;
}
@@ -1350,8 +1334,8 @@ nucomp_marshal_load(VALUE self, VALUE a)
Check_Type(a, T_ARRAY);
if (RARRAY_LEN(a) != 2)
rb_raise(rb_eArgError, "marshaled complex must have an array whose length is 2 but %ld", RARRAY_LEN(a));
- rb_ivar_set(self, id_i_real, RARRAY_AREF(a, 0));
- rb_ivar_set(self, id_i_imag, RARRAY_AREF(a, 1));
+ rb_ivar_set(self, id_i_real, RARRAY_PTR(a)[0]);
+ rb_ivar_set(self, id_i_imag, RARRAY_PTR(a)[1]);
return self;
}
@@ -1840,8 +1824,6 @@ string_to_c_strict(VALUE self)
* '-0.0-0.0i'.to_c #=> (-0.0-0.0i)
* '1/2+3/4i'.to_c #=> ((1/2)+(3/4)*i)
* 'ruby'.to_c #=> (0+0i)
- *
- * See Kernel.Complex.
*/
static VALUE
string_to_c(VALUE self)
@@ -1880,17 +1862,30 @@ nucomp_s_convert(int argc, VALUE *argv, VALUE klass)
backref = rb_backref_get();
rb_match_busy(backref);
- if (RB_TYPE_P(a1, T_STRING)) {
+ switch (TYPE(a1)) {
+ case T_FIXNUM:
+ case T_BIGNUM:
+ case T_FLOAT:
+ break;
+ case T_STRING:
a1 = string_to_c_strict(a1);
+ break;
}
- if (RB_TYPE_P(a2, T_STRING)) {
+ switch (TYPE(a2)) {
+ case T_FIXNUM:
+ case T_BIGNUM:
+ case T_FLOAT:
+ break;
+ case T_STRING:
a2 = string_to_c_strict(a2);
+ break;
}
rb_backref_set(backref);
- if (RB_TYPE_P(a1, T_COMPLEX)) {
+ switch (TYPE(a1)) {
+ case T_COMPLEX:
{
get_dat1(a1);
@@ -1899,7 +1894,8 @@ nucomp_s_convert(int argc, VALUE *argv, VALUE klass)
}
}
- if (RB_TYPE_P(a2, T_COMPLEX)) {
+ switch (TYPE(a2)) {
+ case T_COMPLEX:
{
get_dat1(a2);
@@ -1908,7 +1904,8 @@ nucomp_s_convert(int argc, VALUE *argv, VALUE klass)
}
}
- if (RB_TYPE_P(a1, T_COMPLEX)) {
+ switch (TYPE(a1)) {
+ case T_COMPLEX:
if (argc == 1 || (k_exact_zero_p(a2)))
return a1;
}
@@ -1996,7 +1993,6 @@ numeric_arg(VALUE self)
/*
* call-seq:
* num.rect -> array
- * num.rectangular -> array
*
* Returns an array; [num, 0].
*/
diff --git a/configure.in b/configure.in
index ea14b941ed..b87b325248 100644
--- a/configure.in
+++ b/configure.in
@@ -3,34 +3,12 @@ AC_INIT()
{
AC_CONFIG_AUX_DIR(tool)
-AC_PREREQ(2.67)
+AC_PREREQ(2.60)
AC_DEFUN([RUBY_PREREQ_AC],
[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]), [$1]), [-1],
AC_MSG_ERROR([Autoconf version ]$1[ or higher is required]$2))])
-AC_DISABLE_OPTION_CHECKING
-
-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
-# AC_EGREP_CPP with CFLAGS=-g on Darwin.
-#
-# TODO: remove this hack when AC_PREREQ() becomes 2.70 or later.
-AS_CASE([$build_os], [darwin*], [
-rm() {
- rm_recursive=''
- for arg do
- AS_CASE("$arg",
- [--*], [],
- [-*r*], [break],
- [conftest.*], [if test -d "$arg"; then rm_recursive=-r; break; fi],
- [])
- done
- command rm $rm_recursive "[$]@"
-}
-])])])
-
{ # environment section
AC_ARG_WITH(baseruby,
@@ -50,11 +28,6 @@ else
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_DEFUN([RUBY_MINGW32],
[AS_CASE(["$host_os"],
[cygwin*], [
@@ -199,11 +172,9 @@ RUBY_PROGRAM_VERSION=`sed -n 's/^#define RUBY_VERSION "\(.*\)"/\1/p' $srcdir/ver
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
AC_CANONICAL_BUILD
-RUBY_RM_RECURSIVE
AC_ARG_WITH(gcc,
AS_HELP_STRING([--without-gcc], [never use gcc]),
[
@@ -218,7 +189,7 @@ then
(it is also a good idea to do 'make clean' before compiling))
fi
AS_CASE(["$build_os"],
- [darwin1*.*], [
+ [darwin11.*], [
AS_CASE(["x$CC"],
[xgcc-4.2|x/usr/bin/gcc-4.2], [: ${CXX=g++-4.2}],
[xgcc|x/usr/bin/gcc], [: ${CXX=g++}],
@@ -226,7 +197,6 @@ AS_CASE(["$build_os"],
[xclang|x/usr/bin/clang], [: ${CXX=clang++}])
])
test -z "$CC" || ac_cv_prog_CC="$CC"
-test -z "$CXX" || ac_cv_prog_CXX="$CXX"
if test "$program_prefix" = NONE; then
program_prefix=
@@ -235,57 +205,30 @@ RUBY_BASE_NAME=`echo ruby | sed "$program_transform_name"`
RUBYW_BASE_NAME=`echo rubyw | sed "$program_transform_name"`
AC_SUBST(RUBY_BASE_NAME)
AC_SUBST(RUBYW_BASE_NAME)
-AC_SUBST(RUBY_VERSION_NAME, '${RUBY_BASE_NAME}-${ruby_version}')
AC_CANONICAL_TARGET
-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_transform=
-AS_CASE("${os_version_style}",
- [full|teeny], [],
- [minor+0], [os_version_style_transform=['s/\([0-9]\.[0-9][0-9]*\)\.[0-9][.0-9]*$/\1.0/']],
- [minor], [os_version_style_transform=['s/\([0-9]\.[0-9][0-9]*\)\.[0-9][.0-9]*$/\1/']],
- [major+0], [os_version_style_transform=['s/\([0-9]\)\.[0-9][.0-9]*$/\1.0/']],
- [major], [os_version_style_transform=['s/\([0-9]\)\.[0-9][.0-9]*$/\1/']],
- [none], [os_version_style_transform=['s/[0-9]\.[0-9][.0-9]*$//']],
- [AC_MSG_ERROR(unknown --with-os-version-style: $withval)])
-AS_IF([test -z "$target_alias" -a -n "$os_version_style_transform"],
- [
- target=`echo ${target} | sed "$os_version_style_transform"`
- target_os=`echo ${target_os} | sed "$os_version_style_transform"`
- ])
-
AC_DEFUN([RUBY_APPEND_OPTION],
- [# RUBY_APPEND_OPTION($1)
+ [# RUBY_APPEND_OPTION($1, $2)
AS_CASE([" [$]{$1-} "],
[*' $2 '*], [], [' '], [ $1="$2"], [ $1="[$]$1 $2"])])
AC_DEFUN([RUBY_APPEND_OPTIONS],
- [# RUBY_APPEND_OPTIONS($1)
- for rb_opt in $2; do
+ [{ for rb_opt in $2; do # RUBY_APPEND_OPTIONS($1, $2)
AS_CASE([" [$]{$1-} "],
[*" [$]{rb_opt} "*], [], [' '], [ $1="[$]{rb_opt}"], [ $1="[$]$1 [$]{rb_opt}"])
- done])
+ done; }])
AC_DEFUN([RUBY_PREPEND_OPTION],
- [# RUBY_PREPEND_OPTION($1)
+ [# RUBY_PREPEND_OPTION($1, $2)
AS_CASE([" [$]{$1-} "],
[*' $2 '*], [], [' '], [ $1="$2"], [ $1="$2 [$]$1"])])
AC_DEFUN([RUBY_PREPEND_OPTIONS],
- [# RUBY_PREPEND_OPTIONS($1)
- unset rb_opts; for rb_opt in $2; do
+ [{ unset rb_opts; for rb_opt in $2; do # RUBY_PREPEND_OPTIONS($1, $2)
AS_CASE([" [$]{rb_opts} [$]{$1-} "],
[*" [$]{rb_opt} "*], [], [' '], [ $1="[$]{rb_opt}"], [ rb_opts="[$]{rb_opts}[$]{rb_opt} "])
done
- $1="[$]{rb_opts}[$]$1"])
+ $1="[$]{rb_opts}[$]$1"; }])
AC_ARG_WITH(arch,
AS_HELP_STRING([--with-arch=ARCHS],
@@ -339,6 +282,7 @@ if test ${target_archs+set}; then
target=`echo $target | sed "s/^$target_cpu-/-/"`
target_alias=`echo $target_alias | sed "s/^$target_cpu-/-/"`
if test "${universal_binary-no}" = yes; then
+ RUBY_PREREQ_AC(2.63, [ to compile universal binary])
AC_SUBST(try_header,try_compile)
target_cpu=universal
real_cross_compiling=$cross_compiling
@@ -424,17 +368,6 @@ RUBY_NACL
AS_CASE(["$host_os:$build_os"],
[darwin*:darwin*], [
AC_CHECK_TOOLS(CC, [gcc-4.2 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)
- # Apple clang version 2.1 (tags/Apple/clang-163.7.1) (based on LLVM 3.0svn)
- if ! $CC -E -xc - <<SRC >/dev/null; then
- @%:@if defined __APPLE_CC__ && defined __clang_major__ && __clang_major__ < 3
- @%:@error premature clang
- @%:@endif
-SRC
- AC_MSG_ERROR([clang version 3.0 or later is required])
- fi
])
if test x"${build}" != x"${host}"; then
AC_CHECK_TOOL(CC, gcc)
@@ -452,9 +385,7 @@ AC_SUBST(LD)
if test "$GCC" = yes; then
linker_flag=-Wl,
: ${optflags=-O3}
- gcc_major=`echo =__GNUC__ | $CC -E -xc - | sed '/^=/!d;s///'`
- test -n "$gcc_major" || gcc_major=0
- # RUBY_APPEND_OPTIONS(XCFLAGS, ["-include ruby/config.h" "-include ruby/missing.h"])
+ RUBY_APPEND_OPTIONS(XCFLAGS, ["-include ruby/config.h" "-include ruby/missing.h"])
else
linker_flag=
fi
@@ -467,44 +398,11 @@ RUBY_CPPOUTFILE
AC_SUBST(OUTFLAG)
AC_SUBST(COUTFLAG)
-cc_version=
-for option in --version -v -V -qversion; do
- cc_version_message=`$CC $option 2>&1`
- cc_version_status=$?
- AS_CASE($cc_version_status, [0], [:], [continue])
- AS_CASE($cc_version_message, [*Warning*], [continue])
- cc_version='$(CC) '$option
-done
-AC_SUBST(CC_VERSION, $cc_version)
-
RUBY_UNIVERSAL_ARCH
if test "$target_cpu" != "$host_cpu" -a "$GCC" = yes -a "$cross_compiling" = no -a "$universal_binary" = no; then
RUBY_DEFAULT_ARCH("$target_cpu")
fi
-AS_CASE(["$target_cpu-$target_os"], [[i[3-6]86*]], [
- AC_CACHE_CHECK([for __sync_val_compare_and_swap], [rb_cv_gcc_compiler_cas], [
- AC_TRY_LINK([unsigned long atomic_var;],
- [
- __sync_val_compare_and_swap(&atomic_var, 0, 1);
- ],
- [rb_cv_gcc_compiler_cas=yes],
- [rb_cv_gcc_compiler_cas=no])])
- if test "$rb_cv_gcc_compiler_cas" = no; then
- unset rb_cv_gcc_compiler_cas
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -march=i486"
- AC_CACHE_CHECK([for __sync_val_compare_and_swap with -march=i486], [rb_cv_gcc_compiler_cas], [
- AC_TRY_LINK([unsigned long atomic_var;],
- [
- __sync_val_compare_and_swap(&atomic_var, 0, 1);
- ],
- [rb_cv_gcc_compiler_cas=yes
- ARCH_FLAG="-march=i486"],
- [rb_cv_gcc_compiler_cas=no])])
- CFLAGS="$save_CFLAGS"
- fi])
-
AC_CHECK_TOOL(RANLIB, ranlib, :)
AC_CHECK_TOOL(AR, ar)
if test -z "$AR"; then
@@ -585,25 +483,15 @@ AC_DEFUN([RUBY_DTRACE_AVAILABLE],
AC_DEFUN([RUBY_DTRACE_POSTPROCESS],
[AC_CACHE_CHECK(whether $DTRACE needs post processing, rb_cv_prog_dtrace_g,
[
- if {
- cat >conftest_provider.d <<_PROBES &&
- provider conftest {
- probe fire();
- };
-_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
- fi
- rm -f conftest.[co] conftest_provider.[dho]
+ echo "int main(void){ return 0; }" > conftest.c
+ echo "provider conftest{};" > conftest_provider.d
+ $CC $CFLAGS -c -o conftest.o conftest.c
+ if $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
+ fi
+ rm -f conftest.o conftest.c conftest_provider.d conftest_provider.o
])
])
@@ -674,25 +562,6 @@ else
unset ac_c_werror_flag
fi])
-RUBY_WERROR_FLAG([
- AC_MSG_CHECKING([whether CFLAGS is valid])
- AC_TRY_COMPILE([], [],
- [AC_MSG_RESULT(yes)],
- [
- AC_MSG_RESULT(no)
- AC_MSG_ERROR([something wrong with CFLAGS="$CFLAGS"])
- ]
- )
- AC_MSG_CHECKING([whether LDFLAGS is valid])
- AC_TRY_LINK([], [],
- [AC_MSG_RESULT(yes)],
- [
- AC_MSG_RESULT(no)
- AC_MSG_ERROR([something wrong with LDFLAGS="$LDFLAGS"])
- ]
- )
-])
-
AC_DEFUN(RUBY_TRY_CFLAGS, [
AC_MSG_CHECKING([whether ]$1[ is accepted as CFLAGS])
RUBY_WERROR_FLAG([
@@ -720,22 +589,9 @@ AC_DEFUN(RUBY_TRY_LDFLAGS, [
save_LDFLAGS=
])
-AS_CASE([$RUBY_PATCHLEVEL], [-*],
- [particular_werror_flags=yes], [particular_werror_flags=no])
-AC_ARG_ENABLE(werror,
- AS_HELP_STRING([--disable-werror],
- [don't make warnings into errors
- even if a compiler support -Werror feature
- [[disabled by default unless development version]]]),
- [particular_werror_flags=$enableval])
-
rb_cv_warnflags="$warnflags"
if test "$GCC:${warnflags+set}:no" = yes::no; then
- if test $gcc_major -ge 4; then
- extra_warning=-Werror=extra-tokens
- else
- extra_warning=
- fi
+ particular_werror_flags=yes
for wflag in -Wno-unused-parameter -Wno-parentheses -Wno-long-long \
-Wno-missing-field-initializers \
-Wunused-variable \
@@ -743,11 +599,11 @@ if test "$GCC:${warnflags+set}:no" = yes::no; then
-Werror=write-strings \
-Werror=declaration-after-statement \
-Werror=shorten-64-to-32 \
- -Werror=implicit-function-declaration \
- -Werror=division-by-zero \
- $extra_warning \
+ -Werror-implicit-function-declaration \
; do
- if test "$particular_werror_flags" != yes; then
+ if test "$particular_werror_flags" = yes; then
+ wflag=`echo x$wflag | sed 's/^x-Werror-/-Werror=/;s/^x//'`
+ else
wflag=`echo x$wflag | sed 's/^x-Werror=/-W/;s/^x//'`
fi
ok=no
@@ -771,24 +627,24 @@ if test "$GCC:${warnflags+set}:no" = yes::no; then
warnflags=
fi
if test "$GCC" = yes; then
+ test "${debugflags+set}" || {RUBY_TRY_CFLAGS(-ggdb3, [debugflags=-ggdb3])}
+ test "${debugflags+set}" || {RUBY_TRY_CFLAGS(-ggdb, [debugflags=-ggdb])}
+ test "${debugflags+set}" || {RUBY_TRY_CFLAGS(-g3, [debugflags=-g3])}
+
# -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], [
stack_protector=no
- ])
- if test -z "${stack_protector+set}"; then
+ ],
+ [
RUBY_TRY_CFLAGS(-fstack-protector, [stack_protector=yes], [stack_protector=no])
if test "x$stack_protector" = xyes; then
RUBY_TRY_LDFLAGS(-fstack-protector, [], [stack_protector=broken])
fi
- fi
+ ])
if test "x$stack_protector" = xyes; then
RUBY_APPEND_OPTION(XCFLAGS, -fstack-protector)
RUBY_APPEND_OPTION(XLDFLAGS, -fstack-protector)
@@ -820,10 +676,6 @@ if test "$GCC" = yes; then
# suppress annoying -Wstrict-overflow warnings
RUBY_TRY_CFLAGS(-fno-strict-overflow, [RUBY_APPEND_OPTION(XCFLAGS, -fno-strict-overflow)])
-
- test "${debugflags+set}" || {RUBY_TRY_CFLAGS(-ggdb3, [debugflags=-ggdb3])}
- test "${debugflags+set}" || {RUBY_TRY_CFLAGS(-ggdb, [debugflags=-ggdb])}
- test "${debugflags+set}" || {RUBY_TRY_CFLAGS(-g3, [debugflags=-g3])}
fi
test $ac_cv_prog_cc_g = yes && : ${debugflags=-g}
@@ -831,14 +683,18 @@ if test "$GCC" = ""; then
AS_CASE(["$target_os"],[aix*],[warnflags="$warnflags -qinfo=por" rb_cv_warnflags="$rb_cv_warnflags -qinfo=por"])
fi
if test "$GCC" = yes; then
- if test "$gcc_major" -ge 4; then
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
+ @%:@if !(defined __GNUC__ && __GNUC__ >= 4)
+ @%:@error not GCC 4 or later
+ >>>not GCC 4 or later<<<
+ @%:@endif])],
+ [visibility_option=yes], [visibility_option=no])
+ if test "$visibility_option" = yes; then
RUBY_TRY_CFLAGS(-fvisibility=hidden, [visibility_option=yes], [visibility_option=no])
fi
AC_SUBST(WERRORFLAG, "-Werror")
if test "$visibility_option" = yes; then
RUBY_APPEND_OPTION(XCFLAGS, -fvisibility=hidden)
- AC_DEFINE(RUBY_SYMBOL_EXPORT_BEGIN, [_Pragma("GCC visibility push(default)")])
- AC_DEFINE(RUBY_SYMBOL_EXPORT_END, [_Pragma("GCC visibility pop")])
else
RUBY_TRY_LDFLAGS([-Wl,-unexported_symbol,_Init_*], [visibility_option=ld], [visibility_option=no])
fi
@@ -858,281 +714,9 @@ if test "$GCC" = yes; then
done
fi
-AC_ARG_WITH(opt-dir,
- AS_HELP_STRING([--with-opt-dir=DIR-LIST],
- [add optional headers and libraries directories separated by $PATH_SEPARATOR]),
- [
- val=`echo "$PATH_SEPARATOR$withval" | sed "s|$PATH_SEPARATOR\([[^$PATH_SEPARATOR]*]\)| -I\1/include|g;s/^ //"`
- CPPFLAGS="$CPPFLAGS $val"
- val=`IFS="$PATH_SEPARATOR"
- for dir in $withval; 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' ' '`
- LDFLAGS_OPTDIR="$val"
- test x"${LDFLAGS}" = x || LDFLAGS="$LDFLAGS "
- LDFLAGS="$LDFLAGS$val"
- test x"${DLDFLAGS}" = x || DLDFLAGS="$DLDFLAGS "
- DLDFLAGS="$DLDFLAGS$val"
- ])
-
test -z "${ac_env_CFLAGS_set}" -a -n "${cflags+set}" && eval CFLAGS="\"$cflags $ARCH_FLAG\""
test -z "${ac_env_CXXFLAGS_set}" -a -n "${cxxflags+set}" && eval CXXFLAGS="\"$cxxflags $ARCH_FLAG\""
-}
-{ # header and library section
-
-AC_ARG_WITH(winnt-ver,
- AS_HELP_STRING([--with-winnt-ver=0xXXXX], [target Windows NT version (default to 0x0501)]),
- [with_winnt_ver="$withval"], [with_winnt_ver="0x0501"])
-AS_CASE(["$target_os"],
-[mingw*], [
- RUBY_APPEND_OPTION(CPPFLAGS, -D_WIN32_WINNT=$with_winnt_ver)
-])
-
-AS_CASE(["$target_os"],
-[freebsd*], [
- AC_CACHE_CHECK([whether pthread should be enabled by default],
- rb_cv_enable_pthread_default,
- [AC_TRY_CPP([
-#include <osreldate.h>
-#if __FreeBSD_version < 502102
-#error pthread should be disabled on this platform
-#endif
- ],
- rb_cv_enable_pthread_default=yes,
- rb_cv_enable_pthread_default=no)])
- enable_pthread=$rb_cv_enable_pthread_default
- ],
-[mingw*], [
- enable_pthread=no
- ],
-[
- enable_pthread=yes
- ])
-
-AC_ARG_ENABLE(pthread,
- AS_HELP_STRING([--enable-pthread], [obsolete, and ignored]))
-
-dnl Checks for libraries.
-AS_CASE(["$target_os"],[*bsd*|dragonfly*],[],[ac_cv_func_daemon=no])
-
-POSTLINK=:
-AC_SUBST(POSTLINK)
-AS_CASE(["$target_os"],
-[nextstep*], [ ],
-[openstep*], [ ],
-[rhapsody*], [ ],
-[darwin*], [ RUBY_PREPEND_OPTION(LIBS, -lobjc)
- RUBY_APPEND_OPTIONS(CPPFLAGS, -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT)
- AC_MSG_CHECKING(whether Mac OS X 10.5 or later)
- AC_TRY_CPP([#include <AvailabilityMacros.h>
- #if MAC_OS_X_VERSION_MAX_ALLOWED <= 1040
- #error pre OS X 10.4
- [!<===== pre OS X 10.4 =====>]
- #endif
- ],
- [macosx_10_5=yes], [macosx_10_5=no])
- AC_MSG_RESULT($macosx_10_5)
- if test $macosx_10_5 = yes; then
- ac_cv_header_ucontext_h=no
- else
- AC_DEFINE(BROKEN_SETREUID, 1)
- AC_DEFINE(BROKEN_SETREGID, 1)
- fi
- 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_CACHE_CHECK(for broken crypt with 8bit chars, rb_cv_broken_crypt,
- [AC_TRY_RUN([
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-
-int
-main()
-{
- int i;
- for (i = 0; i < 128*128; i++) {
- char salt[2], buf[256], *s;
- salt[0] = 0x80 | (i & 0x7f);
- salt[1] = 0x80 | (i >> 7);
- strcpy(buf, crypt("", salt));
- if (strcmp(buf, s = crypt("", salt))) {
-#if 0
- printf("%.2x%.2x: %s -> %s\n", (unsigned char)salt[0], (unsigned char)salt[1],
- buf+2, s+2);
-#endif
- return 1;
- }
- }
- return 0;
-}
-],
- rb_cv_broken_crypt=no,
- rb_cv_broken_crypt=yes,
- rb_cv_broken_crypt=yes)])
- if test "$rb_cv_broken_crypt" = yes; then
- AC_DEFINE(BROKEN_CRYPT, 1)
- fi
- AC_CHECK_PROGS(codesign, codesign)
- if test -n "$codesign"; then
- POSTLINK="test -z '\$(RUBY_CODESIGN)' || $codesign -s '\$(RUBY_CODESIGN)' -f \$@"
- LINK_SO="$LINK_SO
-\$(POSTLINK)"
- fi
- AC_CHECK_HEADERS(crt_externs.h, [], [], [
- #include <crt_externs.h>
- ])
- ],
-[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
- ],
-[cygwin*], [ ac_cv_header_langinfo_h=yes
- AC_CHECK_FUNCS(cygwin_conv_path)
- AC_LIBOBJ([langinfo])
- ],
-[mingw*], [ LIBS="-lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi $LIBS"
- ac_cv_header_a_out_h=no
- ac_cv_header_pwd_h=no
- ac_cv_header_utime_h=no
- ac_cv_header_sys_ioctl_h=no
- ac_cv_header_sys_param_h=no
- ac_cv_header_sys_resource_h=no
- ac_cv_header_sys_select_h=no
- ac_cv_header_sys_time_h=no
- ac_cv_header_sys_times_h=no
- ac_cv_header_sys_socket_h=no
- ac_cv_func_times=yes
- ac_cv_func_waitpid=yes
- ac_cv_func_fsync=yes
- ac_cv_func_seekdir=yes
- ac_cv_func_telldir=yes
- ac_cv_func_isinf=yes
- ac_cv_func_isnan=yes
- ac_cv_func_finite=yes
- ac_cv_func_link=yes
- ac_cv_lib_crypt_crypt=no
- ac_cv_func_getpgrp_void=no
- ac_cv_func_memcmp_working=yes
- ac_cv_lib_dl_dlopen=no
- rb_cv_binary_elf=no
- rb_cv_negative_time_t=no
- ac_cv_func_fcntl=yes
- ac_cv_func_flock=yes
- ac_cv_func_gmtime_r=yes
- rb_cv_large_fd_select=yes
- ac_cv_type_struct_timeval=yes
- ac_cv_func_clock_gettime=yes
- ac_cv_func_clock_getres=yes
- ac_cv_func_malloc_usable_size=no
- AC_CHECK_TYPE([NET_LUID], [], [],
- [@%:@include <windows.h>
- @%:@include <iphlpapi.h>])
- if test x"$ac_cv_type_NET_LUID" = xyes; then
- AC_DEFINE(HAVE_TYPE_NET_LUID, 1)
- fi
- 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)
- ac_cv_sizeof_rlim_t=8],
-[freebsd*], [ LIBS="-lm $LIBS"
- ac_cv_func_getpeername=no
- ac_cv_func_getsockname=no
- ac_cv_func_shutdown=no
- ac_cv_func_close=no
- ],
-[dragonfly*], [ LIBS="-lm $LIBS"
- # isinf() and isnan() are macros on DragonFly.
- ac_cv_func_isinf=yes
- ac_cv_func_isnan=yes
- ],
-[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"])
-
-AC_CHECK_LIB(crypt, crypt) # glibc (GNU/Linux, GNU/Hurd, GNU/kFreeBSD)
-AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/Solaris and SYSV
-AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX
-AC_CHECK_LIB(socket, shutdown) # SunOS/Solaris
-
-dnl Checks for header files.
-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_ARG_WITH([gmp],
- [AS_HELP_STRING([--without-gmp],
- [disable GNU GMP to accelerate Bignum operations])],
- [],
- [with_gmp=yes])
-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])])
-
dnl check for large file stuff
mv confdefs.h confdefs1.h
: > confdefs.h
@@ -1246,13 +830,11 @@ 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)
RUBY_CHECK_SIZEOF(double)
RUBY_CHECK_SIZEOF(time_t, [long "long long"], [], [@%:@include <time.h>])
-RUBY_CHECK_SIZEOF(clock_t, [], [], [@%:@include <time.h>])
AC_DEFUN([RUBY_CHECK_PRINTF_PREFIX], [
AC_CACHE_CHECK([for printf prefix for $1], [rb_cv_pri_prefix_]AS_TR_SH($1),[
@@ -1284,11 +866,6 @@ elif test "x$ac_cv_type___int64" = xyes; then
RUBY_CHECK_PRINTF_PREFIX(__int64, ll I64, LL)
fi
-dnl RUBY_CHECK_SIZEOF [typename] [if-signed] [if-unsigned] [included]
-AC_DEFUN([RUBY_CHECK_SIGNEDNESS], [dnl
- AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([AC_INCLUDES_DEFAULT([$4])], [($1)-1 > 0])],
- [$3], [$2])])
-
dnl RUBY_REPLACE_TYPE [typename] [default type] [macro type] [included]
AC_DEFUN([RUBY_REPLACE_TYPE], [dnl
AC_CHECK_TYPE([$1],
@@ -1301,7 +878,10 @@ AC_DEFUN([RUBY_REPLACE_TYPE], [dnl
[*" signed "*], [ ],
[*" unsigned "*], [
u=U],
- [RUBY_CHECK_SIGNEDNESS($n, [], [u=U], [$4])])
+ [
+ AC_COMPILE_IFELSE(
+ [AC_LANG_BOOL_COMPILE_TRY([AC_INCLUDES_DEFAULT([$4])], [($n)-1 > 0])],
+ [u=U])])
if test x"$t" = x; then
for t in "long long" long int short; do
test -n "$u" && t="unsigned $t"
@@ -1326,9 +906,7 @@ 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"
- 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)
AC_DEFINE_UNQUOTED([$3]2NUM[(v)], [${rb_cv_[$1]_convertible}2NUM(v)])
AC_DEFINE_UNQUOTED(NUM2[$3][(v)], [NUM2${rb_cv_[$1]_convertible}(v)])
AC_DEFINE_UNQUOTED(PRI_[$3]_PREFIX,
@@ -1340,17 +918,7 @@ RUBY_REPLACE_TYPE(gid_t, int, GIDT)
RUBY_REPLACE_TYPE(time_t, [], TIMET, [@%:@include <time.h>])
RUBY_REPLACE_TYPE(dev_t, [int long "long long"], DEVT)
RUBY_REPLACE_TYPE(mode_t, ["unsigned int" long], MODET, [@%:@include <sys/stat.h>])
-RUBY_REPLACE_TYPE(rlim_t, [int long "long long"], RLIM, [
-@%:@ifdef HAVE_SYS_TYPES_H
-@%:@include <sys/types.h>
-@%:@endif
-@%:@ifdef HAVE_SYS_TYPES_H
-@%:@include <sys/time.h>
-@%:@endif
-@%:@include <sys/resource.h>
-])
-RUBY_REPLACE_TYPE(off_t, [], OFFT)
-RUBY_REPLACE_TYPE(clockid_t, [], CLOCKID)
+RUBY_REPLACE_TYPE(rlim_t, [int long "long long"], RLIM, [@%:@include <sys/resource.h>])
AC_CACHE_CHECK(for prototypes, rb_cv_have_prototypes,
[AC_TRY_COMPILE([int foo(int x) { return 0; }], [return foo(10);],
@@ -1499,28 +1067,12 @@ if test "$GCC" = yes; then
[rb_cv_gcc_function_alias=$a; break])
done])
if test "$rb_cv_gcc_function_alias" != no; then
- AC_DEFINE(HAVE_ATTRIBUTE_FUNCTION_ALIAS)
AC_DEFINE_UNQUOTED([RUBY_ALIAS_FUNCTION_TYPE(type, prot, name, args)],
[type prot __attribute__(($rb_cv_gcc_function_alias(@%:@name)));])
AC_DEFINE_UNQUOTED([RUBY_ALIAS_FUNCTION_VOID(prot, name, args)],
[RUBY_ALIAS_FUNCTION_TYPE(void, prot, name, args)])
fi
-
- AC_CACHE_CHECK([for __atomic builtins], [rb_cv_gcc_atomic_builtins], [
- AC_TRY_LINK([unsigned char atomic_var;],
- [
- __atomic_exchange_n(&atomic_var, 0, __ATOMIC_SEQ_CST);
- __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);
- ],
- [rb_cv_gcc_atomic_builtins=yes],
- [rb_cv_gcc_atomic_builtins=no])])
- if test "$rb_cv_gcc_atomic_builtins" = yes; then
- AC_DEFINE(HAVE_GCC_ATOMIC_BUILTINS)
- fi
-
- AC_CACHE_CHECK([for __sync builtins], [rb_cv_gcc_sync_builtins], [
+ AC_CACHE_CHECK([for atomic builtins], [rb_cv_gcc_atomic_builtins], [
AC_TRY_LINK([unsigned char atomic_var;],
[
__sync_lock_test_and_set(&atomic_var, 0);
@@ -1528,10 +1080,10 @@ if test "$GCC" = yes; then
__sync_fetch_and_add(&atomic_var, 1);
__sync_fetch_and_sub(&atomic_var, 1);
],
- [rb_cv_gcc_sync_builtins=yes],
- [rb_cv_gcc_sync_builtins=no])])
- if test "$rb_cv_gcc_sync_builtins" = yes; then
- AC_DEFINE(HAVE_GCC_SYNC_BUILTINS)
+ [rb_cv_gcc_atomic_builtins=yes],
+ [rb_cv_gcc_atomic_builtins=no])])
+ if test "$rb_cv_gcc_atomic_builtins" = yes; then
+ AC_DEFINE(HAVE_GCC_ATOMIC_BUILTINS)
fi
AC_CACHE_CHECK(for __builtin_unreachable, rb_cv_func___builtin_unreachable,
@@ -1562,27 +1114,202 @@ fi
RUBY_APPEND_OPTION(XCFLAGS, -DRUBY_EXPORT)
-AC_CACHE_CHECK(for function name string predefined identifier,
- rb_cv_function_name_string,
- [rb_cv_function_name_string=no
- RUBY_WERROR_FLAG([
- for func in __func__ __FUNCTION__; do
- AC_TRY_LINK([@%:@include <stdio.h>],
- [puts($func);],
- [rb_cv_function_name_string=$func
- break])
- done
- ])]
-)
-if test "$rb_cv_function_name_string" != no; then
- AC_DEFINE_UNQUOTED(RUBY_FUNCTION_NAME_STRING, [$rb_cv_function_name_string])
-fi
+}
+{ # header and library section
dnl Check whether we need to define sys_nerr locally
AC_CHECK_DECLS([sys_nerr], [], [], [$ac_includes_default
@%:@include <errno.h>])
-AC_CHECK_DECLS([getenv])
+AC_ARG_WITH(winnt-ver,
+ AS_HELP_STRING([--with-winnt-ver=0xXXXX], [target Windows NT version (default to 0x0501)]),
+ [with_winnt_ver="$withval"], [with_winnt_ver="0x0501"])
+AS_CASE(["$target_os"],
+[mingw*], [
+ RUBY_APPEND_OPTION(CPPFLAGS, -D_WIN32_WINNT=$with_winnt_ver)
+])
+
+AS_CASE(["$target_os"],
+[freebsd*], [
+ AC_CACHE_CHECK([whether pthread should be enabled by default],
+ rb_cv_enable_pthread_default,
+ [AC_TRY_CPP([
+#include <osreldate.h>
+#if __FreeBSD_version < 502102
+#error pthread should be disabled on this platform
+#endif
+ ],
+ rb_cv_enable_pthread_default=yes,
+ rb_cv_enable_pthread_default=no)])
+ enable_pthread=$rb_cv_enable_pthread_default
+ ],
+[mingw*], [
+ enable_pthread=no
+ ],
+[
+ enable_pthread=yes
+ ])
+
+AC_ARG_ENABLE(pthread,
+ AS_HELP_STRING([--enable-pthread], [obsolete, and ignored]))
+
+dnl Checks for libraries.
+AS_CASE(["$target_os"],[*bsd*|dragonfly*],[],[ac_cv_func_daemon=no])
+
+POSTLINK=:
+AC_SUBST(POSTLINK)
+AS_CASE(["$target_os"],
+[nextstep*], [ ],
+[openstep*], [ ],
+[rhapsody*], [ ],
+[darwin*], [ RUBY_PREPEND_OPTION(LIBS, -lobjc)
+ RUBY_APPEND_OPTIONS(CPPFLAGS, -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT)
+ AC_MSG_CHECKING(whether Mac OS X 10.5 or later)
+ AC_TRY_CPP([#include <AvailabilityMacros.h>
+ #if MAC_OS_X_VERSION_MAX_ALLOWED <= 1040
+ #error pre OS X 10.4
+ [!<===== pre OS X 10.4 =====>]
+ #endif
+ ],
+ [macosx_10_5=yes], [macosx_10_5=no])
+ AC_MSG_RESULT($macosx_10_5)
+ if test $macosx_10_5 = yes; then
+ ac_cv_header_ucontext_h=no
+ else
+ AC_DEFINE(BROKEN_SETREUID, 1)
+ AC_DEFINE(BROKEN_SETREGID, 1)
+ fi
+ 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_CACHE_CHECK(for broken crypt with 8bit chars, rb_cv_broken_crypt,
+ [AC_TRY_RUN([
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+
+int
+main()
+{
+ int i;
+ for (i = 0; i < 128*128; i++) {
+ char salt[2], buf[256], *s;
+ salt[0] = 0x80 | (i & 0x7f);
+ salt[1] = 0x80 | (i >> 7);
+ strcpy(buf, crypt("", salt));
+ if (strcmp(buf, s = crypt("", salt))) {
+#if 0
+ printf("%.2x%.2x: %s -> %s\n", (unsigned char)salt[0], (unsigned char)salt[1],
+ buf+2, s+2);
+#endif
+ return 1;
+ }
+ }
+ return 0;
+}
+],
+ rb_cv_broken_crypt=no,
+ rb_cv_broken_crypt=yes,
+ rb_cv_broken_crypt=yes)])
+ if test "$rb_cv_broken_crypt" = yes; then
+ AC_DEFINE(BROKEN_CRYPT, 1)
+ fi
+ AC_CHECK_PROGS(codesign, codesign)
+ if test -n "$codesign"; then
+ POSTLINK="test -z '\$(RUBY_CODESIGN)' || $codesign -s '\$(RUBY_CODESIGN)' -f \$@"
+ LINK_SO="$LINK_SO
+$POSTLINK"
+ fi
+ AC_CHECK_HEADERS(crt_externs.h, [], [], [
+ #include <crt_externs.h>
+ ])
+ ],
+[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
+ ],
+[cygwin*], [ ac_cv_header_langinfo_h=yes
+ AC_CHECK_FUNCS(cygwin_conv_path)
+ AC_LIBOBJ([langinfo])
+ ],
+[mingw*], [ LIBS="-lshell32 -lws2_32 -limagehlp -lshlwapi $LIBS"
+ ac_cv_header_a_out_h=no
+ ac_cv_header_pwd_h=no
+ ac_cv_header_utime_h=no
+ ac_cv_header_sys_ioctl_h=no
+ ac_cv_header_sys_param_h=no
+ ac_cv_header_sys_resource_h=no
+ ac_cv_header_sys_select_h=no
+ ac_cv_header_sys_time_h=no
+ ac_cv_header_sys_times_h=no
+ ac_cv_header_sys_socket_h=no
+ ac_cv_func_times=yes
+ ac_cv_func_waitpid=yes
+ ac_cv_func_fsync=yes
+ ac_cv_func_seekdir=yes
+ ac_cv_func_telldir=yes
+ ac_cv_func_isinf=yes
+ ac_cv_func_isnan=yes
+ ac_cv_func_finite=yes
+ ac_cv_func_link=yes
+ ac_cv_func_fseeko=yes
+ ac_cv_lib_crypt_crypt=no
+ ac_cv_func_getpgrp_void=no
+ ac_cv_func_memcmp_working=yes
+ ac_cv_lib_dl_dlopen=no
+ rb_cv_binary_elf=no
+ rb_cv_negative_time_t=no
+ ac_cv_func_fcntl=yes
+ ac_cv_func_flock=yes
+ ac_cv_func_gmtime_r=yes
+ rb_cv_large_fd_select=yes
+ 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)
+ ac_cv_sizeof_rlim_t=8],
+[freebsd*], [ LIBS="-lm $LIBS"
+ ac_cv_func_getpeername=no
+ ac_cv_func_getsockname=no
+ ac_cv_func_shutdown=no
+ ac_cv_func_close=no
+ ],
+[dragonfly*], [ LIBS="-lm $LIBS"
+ # isinf() and isnan() are macros on DragonFly.
+ ac_cv_func_isinf=yes
+ ac_cv_func_isnan=yes
+ ],
+[bow], [ ac_cv_func_setitimer=no
+ ],
+[superux*], [ ac_cv_func_setitimer=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"])
+AC_CHECK_LIB(crypt, crypt)
+AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/Solaris and SYSV
+AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX
+AC_CHECK_LIB(socket, socketpair) # SunOS/Solaris
+AC_CHECK_LIB(rt, clock_gettime) # GNU/Linux
AS_CASE(["$target_cpu"],
[alpha*|sh4|sh4el|sh4eb], [AS_CASE(["$target_os"::"$GCC"],
@@ -1600,10 +1327,19 @@ else
ac_cv_header_sys_socket_h=${ac_cv_header_sys_socket_h=yes}
fi
+dnl Checks for header files.
+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 xti.h netinet/in_systm.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)
AC_TYPE_SIZE_T
-RUBY_CHECK_SIGNEDNESS(size_t, [AC_MSG_ERROR(size_t is signed)], [],
- [@%:@include <sys/types.h>])
RUBY_CHECK_SIZEOF(size_t, [int long void*], [], [@%:@include <sys/types.h>])
RUBY_CHECK_SIZEOF(ptrdiff_t, size_t, [], [@%:@include <stddef.h>])
RUBY_CHECK_PRINTF_PREFIX(size_t, z)
@@ -1625,31 +1361,6 @@ AC_CHECK_MEMBERS([struct stat.st_ctim])
AC_CHECK_MEMBERS([struct stat.st_ctimespec])
AC_CHECK_MEMBERS([struct stat.st_ctimensec])
-AC_CHECK_TYPES([struct timeval], [], [], [@%:@ifdef HAVE_TIME_H
-@%:@include <time.h>
-@%:@endif
-@%:@ifdef HAVE_SYS_TIME_H
-@%:@include <sys/time.h>
-@%:@endif])
-
-if test "${ac_cv_type_struct_timeval}" = yes; then
- RUBY_CHECK_SIZEOF([struct timeval.tv_sec], [time_t long "long long"], [],
- [@%:@ifdef HAVE_TIME_H
-@%:@include <time.h>
-@%:@endif
-@%:@ifdef HAVE_SYS_TIME_H
-@%:@include <sys/time.h>
-@%:@endif])
- AS_CASE(${ac_cv_sizeof_struct_timeval_tv_sec},
- [SIZEOF_INT], [t=int],
- [SIZEOF_LONG], [t=long],
- [SIZEOF_LONG_LONG], [t=LONG_LONG],
- [t=])
- if test "${t}" != ""; then
- AC_DEFINE_UNQUOTED(TYPEOF_TIMEVAL_TV_SEC, [$t])
- fi
-fi
-
AC_CHECK_TYPES([struct timespec], [], [], [@%:@ifdef HAVE_TIME_H
@%:@include <time.h>
@%:@endif
@@ -1690,7 +1401,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)
@@ -1731,12 +1441,8 @@ if test $rb_cv_stack_end_address != no; then
AC_DEFINE_UNQUOTED(STACK_END_ADDRESS, $rb_cv_stack_end_address)
fi
-# posix_memalign(memptr, alignment, size) implemented for OpenBSD 4.8 doesn't work if alignment > MALLOC_PAGESIZE.
-# [ruby-core:42158] https://bugs.ruby-lang.org/issues/5901
-# OpenBSD 5.2 fixed the problem. (src/lib/libc/stdlib/malloc.c:1.142)
-# MirOS #10semel has the problem but fixed in the repository. (src/lib/libc/stdlib/malloc.c:1.9)
AS_CASE(["$target_os"],
-[openbsd*|mirbsd*], [
+[openbsd*], [
AC_CACHE_CHECK(for heap align log on openbsd, rb_cv_page_size_log,
[rb_cv_page_size_log=no
for page_log in 12 13; do
@@ -1833,9 +1539,20 @@ AS_CASE(["$target_os"],
[aix* | k*bsd*-gnu | kopensolaris*-gnu | linux* | darwin*], [AC_DEFINE(SPT_TYPE,SPT_REUSEARGV)],
[hpux*], [AC_DEFINE(SPT_TYPE,SPT_PSTAT) ],
[])
-AC_CHECK_HEADERS(sys/pstat.h)
+AS_CASE(["$target_cpu-$target_os"], [[i[3-6]86*]], [
+ AC_CACHE_CHECK([for __sync_val_compare_and_swap], [rb_cv_gcc_compiler_cas], [
+ AC_TRY_LINK([unsigned long atomic_var;],
+ [
+ __sync_val_compare_and_swap(&atomic_var, 0, 1);
+ ],
+ [rb_cv_gcc_compiler_cas=yes],
+ [rb_cv_gcc_compiler_cas=no])])
+ if test "$rb_cv_gcc_compiler_cas" = no; then
+ ARCH_FLAG="-march=i486"
+ fi])
+
AC_CACHE_CHECK(for signbit, rb_cv_have_signbit,
[AC_TRY_LINK([
#include <math.h>
@@ -1847,135 +1564,20 @@ if test "$rb_cv_have_signbit" = yes; then
else
AC_LIBOBJ([signbit])
fi
-
-AC_CHECK_FUNCS(__syscall)
-AC_CHECK_FUNCS(_longjmp) # used for AC_ARG_WITH(setjmp-type)
-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(chroot)
-AC_CHECK_FUNCS(chsize)
-AC_CHECK_FUNCS(clock_gettime)
-AC_CHECK_FUNCS(cosh)
-AC_CHECK_FUNCS(daemon)
-AC_CHECK_FUNCS(dl_iterate_phdr)
-AC_CHECK_FUNCS(dlopen)
-AC_CHECK_FUNCS(dup)
-AC_CHECK_FUNCS(dup3)
-AC_CHECK_FUNCS(eaccess)
-AC_CHECK_FUNCS(endgrent)
-AC_CHECK_FUNCS(fchmod)
-AC_CHECK_FUNCS(fchown)
-AC_CHECK_FUNCS(fcntl)
-AC_CHECK_FUNCS(fdatasync)
-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(getcwd)
-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(getrlimit)
-AC_CHECK_FUNCS(getsid)
-AC_CHECK_FUNCS(gettimeofday) # for making ac_cv_func_gettimeofday
-AC_CHECK_FUNCS(gmtime_r)
-AC_CHECK_FUNCS(initgroups)
-AC_CHECK_FUNCS(ioctl)
-AC_CHECK_FUNCS(issetugid)
-AC_CHECK_FUNCS(killpg)
-AC_CHECK_FUNCS(lchmod)
-AC_CHECK_FUNCS(lchown)
-AC_CHECK_FUNCS(link)
-AC_CHECK_FUNCS(llabs)
-AC_CHECK_FUNCS(lockf)
-AC_CHECK_FUNCS(log2)
-AC_CHECK_FUNCS(lstat)
-AC_CHECK_FUNCS(malloc_usable_size)
-AC_CHECK_FUNCS(malloc_size)
-AC_CHECK_FUNCS(mblen)
-AC_CHECK_FUNCS(memalign)
-AC_CHECK_FUNCS(memrchr)
-AC_CHECK_FUNCS(mktime)
-AC_CHECK_FUNCS(pipe2)
-AC_CHECK_FUNCS(poll)
-AC_CHECK_FUNCS(posix_fadvise)
-AC_CHECK_FUNCS(posix_memalign)
-AC_CHECK_FUNCS(ppoll)
-AC_CHECK_FUNCS(pread)
-AC_CHECK_FUNCS(readlink)
-AC_CHECK_FUNCS(round)
-AC_CHECK_FUNCS(seekdir)
-AC_CHECK_FUNCS(select_large_fdset)
-AC_CHECK_FUNCS(sendfile)
-AC_CHECK_FUNCS(setegid)
-AC_CHECK_FUNCS(setenv)
-AC_CHECK_FUNCS(seteuid)
-AC_CHECK_FUNCS(setgid)
-AC_CHECK_FUNCS(setgroups)
-AC_CHECK_FUNCS(setpgid)
-AC_CHECK_FUNCS(setpgrp)
-AC_CHECK_FUNCS(setregid)
-AC_CHECK_FUNCS(setresgid)
-AC_CHECK_FUNCS(setresuid)
-AC_CHECK_FUNCS(setreuid)
-AC_CHECK_FUNCS(setrgid)
-AC_CHECK_FUNCS(setrlimit)
-AC_CHECK_FUNCS(setruid)
-AC_CHECK_FUNCS(setsid)
-AC_CHECK_FUNCS(setuid)
-AC_CHECK_FUNCS(shutdown)
-AC_CHECK_FUNCS(sigaction)
-AC_CHECK_FUNCS(sigaltstack)
-AC_CHECK_FUNCS(sigprocmask)
-AC_CHECK_FUNCS(sinh)
-AC_CHECK_FUNCS(spawnv)
-AC_CHECK_FUNCS(symlink)
-AC_CHECK_FUNCS(syscall)
-AC_CHECK_FUNCS(sysconf)
-AC_CHECK_FUNCS(tanh)
-AC_CHECK_FUNCS(telldir)
-AC_CHECK_FUNCS(timegm)
-AC_CHECK_FUNCS(times)
-AC_CHECK_FUNCS(truncate)
-AC_CHECK_FUNCS(truncate64) # used for Win32
-AC_CHECK_FUNCS(unsetenv)
-AC_CHECK_FUNCS(utimensat)
-AC_CHECK_FUNCS(utimes)
-AC_CHECK_FUNCS(wait4)
-AC_CHECK_FUNCS(waitpid)
-
-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;])],
- [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
- AC_DEFINE(AS_TR_CPP(HAVE_BUILTIN_$1))
-fi])
-RUBY_CHECK_BUILTIN_FUNC(__builtin_bswap16, [__builtin_bswap16(0)])
-RUBY_CHECK_BUILTIN_FUNC(__builtin_bswap32, [__builtin_bswap32(0)])
-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_types_compatible_p, [__builtin_types_compatible_p(int, int)])
-
-# 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.
- # http://sourceware.org/ml/libc-announce/2012/msg00001.html
- AC_CHECK_LIB(rt, clock_gettime)
- if test x"$ac_cv_lib_rt_clock_gettime" = xyes; then
- AC_DEFINE(HAVE_CLOCK_GETTIME, 1)
- fi
-fi
-AC_CHECK_FUNCS(clock_getres) # clock_getres should be tested after clock_gettime test including librt test.
+AC_CHECK_FUNCS(fmod killpg wait4 waitpid fork spawnv syscall __syscall chroot getcwd eaccess\
+ truncate ftruncate ftello chsize times utimes utimensat fcntl lockf lstat\
+ truncate64 ftruncate64 ftello64 fseeko fseeko64 \
+ link symlink readlink readdir_r fsync fdatasync fchown posix_fadvise\
+ setitimer setruid seteuid setreuid setresuid socketpair\
+ setrgid setegid setregid setresgid issetugid pause lchown lchmod\
+ getpgrp setpgrp getpgid setpgid initgroups getgroups setgroups\
+ getpriority getrlimit setrlimit sysconf close getpwnam_r getgrnam_r\
+ dlopen sigprocmask sigaction sigsetjmp _setjmp _longjmp\
+ getsid setsid telldir seekdir fchmod cosh sinh tanh log2 round llabs\
+ setuid setgid daemon select_large_fdset setenv unsetenv\
+ mktime timegm gmtime_r clock_gettime gettimeofday poll ppoll\
+ pread sendfile shutdown sigaltstack dl_iterate_phdr\
+ dup dup3 pipe2 posix_memalign memalign ioctl)
AC_CACHE_CHECK(for unsetenv returns a value, rb_cv_unsetenv_return_value,
[AC_TRY_COMPILE([
@@ -1987,14 +1589,6 @@ if test "$rb_cv_unsetenv_return_value" = no; then
AC_DEFINE(VOID_UNSETENV)
fi
-# used for AC_ARG_WITH(setjmp-type)
-AC_CACHE_CHECK(for sigsetjmp as a macro or function, ac_cv_func_sigsetjmp,
- [AC_TRY_COMPILE([
-#include <setjmp.h>
-], [sigjmp_buf env; sigsetjmp(env,1);],
- ac_cv_func_sigsetjmp=yes,
- ac_cv_func_sigsetjmp=no)])
-
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);}],
@@ -2003,52 +1597,41 @@ AC_CACHE_CHECK(for __builtin_setjmp, ac_cv_func___builtin_setjmp,
[ac_cv_func___builtin_setjmp=no])
])
-# we don't use _setjmp if _longjmp doesn't exist.
test x$ac_cv_func__longjmp = xno && ac_cv_func__setjmp=no
AC_MSG_CHECKING(for setjmp type)
-setjmp_suffix=
AC_ARG_WITH(setjmp-type,
AS_HELP_STRING([--with-setjmp-type], [select setjmp type]),
[
AS_CASE([$withval],
- [__builtin_setjmp], [setjmp=__builtin_setjmp],
+ [__builtin_setjmp], [ setjmp_prefix=__builtin_],
[_setjmp], [ setjmp_prefix=_],
[sigsetjmp], [ setjmp_prefix=sig],
[setjmp], [ setjmp_prefix=],
- [setjmpex], [ setjmp_prefix= setjmp_suffix=ex],
[''], [ unset setjmp_prefix],
[ AC_MSG_ERROR(invalid setjmp type: $withval)])], [unset setjmp_prefix])
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)
+ if test "${setjmp_prefix}" && eval test '$ac_cv_func_'${setjmp_prefix}setjmp = no; then
+ AC_MSG_ERROR(${setjmp_prefix}setjmp is not available)
fi
elif test "$ac_cv_func___builtin_setjmp" = yes; then
setjmp_prefix=__builtin_
- setjmp_suffix=
-elif test "$ac_cv_header_setjmpex_h:$ac_cv_func__setjmpex" = yes:yes; then
- setjmp_prefix=
- setjmp_suffix=ex
elif test "$ac_cv_func__setjmp" = yes; then
setjmp_prefix=_
- setjmp_suffix=
elif test "$ac_cv_func_sigsetjmp" = yes; then
AS_CASE([$target_os],[solaris*|cygwin*],[setjmp_prefix=],[setjmp_prefix=sig])
- setjmp_suffix=
else
setjmp_prefix=
- setjmp_suffix=
fi
if test x$setjmp_prefix = xsig; then
setjmp_sigmask=yes
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_MSG_RESULT(${setjmp_prefix}setjmp)
+AC_DEFINE_UNQUOTED([RUBY_SETJMP(env)], [${setjmp_prefix}setjmp(env${setjmp_sigmask+,0})])
AC_DEFINE_UNQUOTED([RUBY_LONGJMP(env,val)], [${setjmp_prefix}longjmp(env,val)])
AC_DEFINE_UNQUOTED(RUBY_JMP_BUF, ${setjmp_sigmask+${setjmp_prefix}}jmp_buf)
-# End of setjmp check.
AC_ARG_ENABLE(setreuid,
AS_HELP_STRING([--enable-setreuid], [use setreuid()/setregid() according to need even if obsolete]),
@@ -2194,7 +1777,7 @@ main()
],
rb_cv_localtime_overflow=yes,
rb_cv_localtime_overflow=no,
- rb_cv_localtime_overflow=no)])
+ rb_cv_localtime_overflow=yes)])
if test "$rb_cv_localtime_overflow" = no; then
AC_DEFINE(LOCALTIME_OVERFLOW_PROBLEM)
fi
@@ -2232,16 +1815,9 @@ main()
fi
if test "$ac_cv_func_getpgid" = no; then
- # AC_FUNC_GETPGRP fails when cross-compiling with old autoconf.
- # autoconf is changed between 2.52d and 2.52f?
- # http://lists.gnu.org/archive/html/bug-gnu-utils/2001-09/msg00181.html
- # "autoconf cleanup for AC_FUNC_GETPGRP and GETPGRP_VOID"
AC_FUNC_GETPGRP
fi
if test "$ac_cv_func_setpgid:$ac_cv_func_setpgrp" = no:yes; then
- # AC_FUNC_SETPGRP fails when cross-compiling. (until autoconf 2.69?)
- # https://lists.gnu.org/archive/html/bug-autoconf/2013-02/msg00002.html
- # "AC_FUNC_SETPGRP fails to work properly when cross-compiling"
AC_FUNC_SETPGRP
fi
@@ -2328,12 +1904,40 @@ if test "$rb_cv_frptr" != "not found"; then
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>])
+AC_CACHE_CHECK([whether struct dirent.d_name is too small], rb_cv_sizeof_struct_dirent_too_small,
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_BOOL_COMPILE_TRY([AC_INCLUDES_DEFAULT([
+@%:@if defined _WIN32
+@%:@ error <<<struct direct in win32/dir.h has variable length d_name>>>
+@%:@elif defined HAVE_DIRENT_H
+@%:@ include <dirent.h>
+@%:@elif defined HAVE_DIRECT_H
+@%:@ include <direct.h>
+@%:@else
+@%:@ define dirent direct
+@%:@ if HAVE_SYS_NDIR_H
+@%:@ include <sys/ndir.h>
+@%:@ endif
+@%:@ if HAVE_SYS_DIR_H
+@%:@ include <sys/dir.h>
+@%:@ endif
+@%:@ if HAVE_NDIR_H
+@%:@ include <ndir.h>
+@%:@ endif
+@%:@endif
+@%:@include <stddef.h>
+@%:@define numberof(array) [(int)(sizeof(array) / sizeof((array)[0]))]
+struct dirent d;
+])],
+ [offsetof(struct dirent, [d_name[numberof(d.d_name)]]) - offsetof(struct dirent, d_name) < 256])],
+ [rb_cv_sizeof_struct_dirent_too_small=yes],
+ [rb_cv_sizeof_struct_dirent_too_small=no])])
+if test "$rb_cv_sizeof_struct_dirent_too_small" = yes; then
+ AC_DEFINE(SIZEOF_STRUCT_DIRENT_TOO_SMALL, 1)
+fi
+
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),
@@ -2426,7 +2030,7 @@ if test x"$enable_pthread" = xyes; then
[root], [],
[c_r], [MAINLIBS="-pthread $MAINLIBS"],
[AS_CASE(["$target_os"],
- [openbsd*|mirbsd*], [LIBS="-pthread $LIBS"],
+ [openbsd*], [LIBS="-pthread $LIBS"],
[LIBS="-l$pthread_lib $LIBS"])])
else
AC_MSG_WARN("Don't know how to find pthread library on your system -- thread support disabled")
@@ -2661,22 +2265,19 @@ if test "$with_dln_a_out" != yes; then
test "$GCC" = yes && test "$rb_cv_prog_gnu_ld" = yes || LDSHARED='$(LD) -Bshareable'
fi
rb_cv_dlopen=yes],
- [openbsd*|mirbsd*], [ : ${LDSHARED='$(CC) -shared ${CCDLFLAGS}'}
+ [openbsd*], [ : ${LDSHARED='$(CC) -shared ${CCDLFLAGS}'}
if test "$rb_cv_binary_elf" = yes; then
LDFLAGS="$LDFLAGS -Wl,-E"
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" \
- ])
+ : ${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
+ 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"
@@ -2714,7 +2315,8 @@ if test "$with_dln_a_out" != yes; then
DLDFLAGS="$DLDFLAGS -lroot glue-noinit.a init_term_dyn.o start_dyn.o"
],
[i586*], [
- : ${LDSHARED='$(CC) -shared'}
+ : ${LDSHARED='$(LD) -shared'}
+ DLDFLAGS="$DLDFLAGS -L/boot/develop/lib/x86 -lroot"
])
: ${LIBPATHENV=LIBRARY_PATH}
rb_cv_dlopen=yes ],
@@ -2759,78 +2361,37 @@ AC_SUBST(RPATHFLAG)
AC_SUBST(LIBPATHENV, "${LIBPATHENV-LD_LIBRARY_PATH}")
AC_SUBST(TRY_LINK)
+AC_ARG_WITH(opt-dir,
+ AS_HELP_STRING([--with-opt-dir=DIR-LIST],
+ [add optional headers and libraries directories separated by $PATH_SEPARATOR]),
+ [
+ val=`echo "$PATH_SEPARATOR$withval" | sed "s|$PATH_SEPARATOR\([[^$PATH_SEPARATOR]*]\)| -I\1/include|g;s/^ //"`
+ CPPFLAGS="$CPPFLAGS $val"
+ set -x
+ val=`IFS="$PATH_SEPARATOR"
+ for dir in $withval; 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' ' '`
+ set +x
+ LDFLAGS="$LDFLAGS${LDFLAGS:+ }$val"
+ DLDFLAGS="$DLDFLAGS${DLDFLAGS:+ }$val"
+ ])
+
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])
- fi],
[*-freebsd*|x86_64-netbsd*], [
AC_CHECK_HEADERS([execinfo.h])
if test "x$ac_cv_header_execinfo_h" = xyes; then
AC_CHECK_LIB([execinfo], [backtrace])
- AC_CHECK_LIB([unwind], [unw_backtrace])
+ execinfo_frame_pointer=no
+ RUBY_TRY_CFLAGS(-fno-omit-frame-pointer, [execinfo_frame_pointer=yes])
+ if test "x$execinfo_frame_pointer" = xyes; then
+ optflags="${optflags+$optflags }-fno-omit-frame-pointer"
+ CFLAGS="$CFLAGS -fno-omit-frame-pointer"
+ fi
fi])
AC_CHECK_FUNCS(backtrace)
-if test "x$ac_cv_func_backtrace" = xyes; then
- AC_CACHE_CHECK(for broken backtrace, rb_cv_broken_backtrace,
- [AC_TRY_RUN([
-#include <unistd.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <string.h>
-#include <signal.h>
-#include <execinfo.h>
-
-#define TRACE_SIZE 256
-
-void sigsegv(int signum, siginfo_t *info, void *ctx){
- void *trace[TRACE_SIZE];
- int n = backtrace(trace, TRACE_SIZE);
- if (n > 0) {
- /*fprintf(stdout, "backtrace:%d\n",n);*/
- } else {
- abort();
- }
- _exit(0);
-}
-int
-main()
-{
- stack_t ss;
- ss.ss_sp = malloc(SIGSTKSZ);
- if (ss.ss_sp == NULL) {
- fprintf(stderr, "cannot allocate memory for sigaltstack\n");
- abort();
- }
- ss.ss_size = SIGSTKSZ;
- ss.ss_flags = 0;
- if (sigaltstack(&ss, NULL) == -1) {
- fprintf(stderr, "sigaltstack failed\n");
- abort();
- }
- struct sigaction sa;
- memset(&sa, 0, sizeof(struct sigaction));
- sigemptyset(&sa.sa_mask);
- sa.sa_sigaction = sigsegv;
- sa.sa_flags |= SA_SIGINFO;
- sa.sa_flags |= SA_ONSTACK;
- sigaction(SIGSEGV, &sa, NULL);
- int *a = NULL;
- a[0] = 1;
- return 0;
-}
-],
- rb_cv_broken_backtrace=no,
- rb_cv_broken_backtrace=yes,
- rb_cv_broken_backtrace=no)])
- if test "$rb_cv_broken_backtrace" = yes; then
- AC_DEFINE(BROKEN_BACKTRACE, 1)
- fi
-fi
-
AC_ARG_WITH(valgrind,
AS_HELP_STRING([--without-valgrind],[disable valgrind memcheck support]),
[], with_valgrind=yes)
@@ -2931,46 +2492,26 @@ fi
AC_SUBST(ENCOBJS)
AC_SUBST(EXTOBJS)
-if test -f "$srcdir/ext/Setup.$target_os"; then
- setup="Setup.$target_os"
-else
- setup=
- for file in "$srcdir"/ext/Setup.*; do
- AS_CASE(["$file"], [*~|*.bak|*.orig|*.rej|*.tmp], [continue])
- setup=`basename "$file"`
- AS_CASE(["$target_os"], [`expr "$setup" : 'Setup.\(.*\)'`*], [break])
- platform=`sed '/^option *platform */!d;s///;s/|/*|/g;q' "$file"`
- if test "x$platform" != x; then
- eval "AS_CASE([\"\$target_os\"], [$platform*], [break])"
- fi
- setup=
- done
- : ${setup:=Setup}
-fi
-AC_SUBST(setup)
+AS_CASE(["$target_os"],
+ dnl OS/2 environment w/ Autoconf 2.1x for EMX
+ [os2-emx], [
+ setup=Setup.emx
+ ],
+ [*djgpp*], [
+ setup=Setup.dj
+ ],
+ [nacl], [
+ setup=Setup.nacl
+ ],
+ [
+ setup=Setup
+ ])
-rubylibprefix='${libdir}/${RUBY_BASE_NAME}'
-AC_ARG_WITH(rubylibprefix,
- AS_HELP_STRING([--with-rubylibprefix=DIR], [prefix for ruby libraries [[LIBDIR/RUBY_BASE_NAME]]]),
- [if test "x$withval" = xno; then
- AC_MSG_ERROR([No ruby, No libprefix])
- fi
- rubylibprefix="$withval"])
-AC_SUBST(rubylibprefix)
+AC_SUBST(setup)
-if test x"${exec_prefix}" != xNONE; then
- RUBY_EXEC_PREFIX="$exec_prefix"
-elif test x"$prefix" != xNONE; then
- RUBY_EXEC_PREFIX="$prefix"
-else
- RUBY_EXEC_PREFIX=$ac_default_prefix
+if test "$prefix" = NONE; then
+ prefix=$ac_default_prefix
fi
-pat=`echo "${RUBY_EXEC_PREFIX}" | tr -c '\012' .`'\(.*\)'
-for var in bindir libdir rubylibprefix; do
- eval val='"$'$var'"'
- AS_CASE(["$val"], ["${RUBY_EXEC_PREFIX}"*], [val='${exec_prefix}'"`expr \"$val\" : \"$pat\"`"])
- eval $var='"$val"'
-done
BTESTRUBY='$(MINIRUBY)'
if test x"$cross_compiling" = xyes; then
@@ -2982,8 +2523,7 @@ if test x"$cross_compiling" = xyes; then
AC_SUBST(XRUBY_RUBYLIBDIR)
AC_SUBST(XRUBY_RUBYHDRDIR)
PREP='$(arch)-fake.rb'
- RUNRUBY_COMMAND='$(MINIRUBY) -I`cd $(srcdir)/lib; pwd`'
- RUNRUBY='$(RUNRUBY_COMMAND)'
+ RUNRUBY='$(MINIRUBY) -I`cd $(srcdir)/lib; pwd`'
XRUBY='$(MINIRUBY)'
TEST_RUNNABLE=no
CROSS_COMPILING=yes
@@ -3005,8 +2545,7 @@ else
MINIRUBY='./miniruby$(EXEEXT) -I$(srcdir)/lib -I.'
MINIRUBY="$MINIRUBY"' -I$(EXTOUT)/common'
PREP='miniruby$(EXEEXT)'
- RUNRUBY_COMMAND='$(MINIRUBY) $(srcdir)/tool/runruby.rb --extout=$(EXTOUT) $(RUNRUBYOPT)'
- RUNRUBY='$(RUNRUBY_COMMAND) --'
+ RUNRUBY='$(MINIRUBY) $(srcdir)/tool/runruby.rb --extout=$(EXTOUT)'
XRUBY='$(RUNRUBY)'
TEST_RUNNABLE=yes
CROSS_COMPILING=no
@@ -3016,7 +2555,6 @@ AC_SUBST(CROSS_COMPILING)
AC_SUBST(MINIRUBY)
AC_SUBST(BTESTRUBY)
AC_SUBST(PREP)
-AC_SUBST(RUNRUBY_COMMAND)
AC_SUBST(RUNRUBY)
AC_SUBST(XRUBY)
AC_SUBST(EXTOUT, [${EXTOUT=.ext}])
@@ -3036,18 +2574,6 @@ AS_CASE(["$target_os"],
DLDLIBS="$DLDLIBS -lc"
])
-AC_ARG_ENABLE(multiarch,
- AS_HELP_STRING([--enable-multiarch], [enable multiarch compatible directories]),
- [multiarch=], [unset multiarch])
-if test ${multiarch+set}; then
- AC_DEFINE(ENABLE_MULTIARCH)
-fi
-
-archlibdir='${libdir}/${arch}'
-sitearchlibdir='${libdir}/${sitearch}'
-archincludedir='${includedir}/${arch}'
-sitearchincludedir='${includedir}/${sitearch}'
-
AC_ARG_WITH(soname,
AS_HELP_STRING([--with-soname=SONAME], [base name of shared library]),
[RUBY_SO_NAME=$withval], [RUBY_SO_NAME='$(RUBY_BASE_NAME)'])
@@ -3061,7 +2587,7 @@ ENABLE_SHARED=no
AC_ARG_ENABLE(shared,
AS_HELP_STRING([--enable-shared], [build a shared library for Ruby]),
[enable_shared=$enableval])
-libprefix=${multiarch+'$(archlibdir)'}${multiarch-'$(libdir)'}
+libprefix='$(libdir)'
LIBRUBY_RELATIVE=${load_relative-no}
AS_CASE("$enable_shared", [yes], [
LIBRUBY='$(LIBRUBY_SO)'
@@ -3080,7 +2606,6 @@ AS_CASE("$enable_shared", [yes], [
AS_CASE(["$libdir"], ['${exec_prefix}/'*], [libdir_basename=`basename "$libdir"`])
fi
AC_DEFINE_UNQUOTED(LIBDIR_BASENAME, ["${libdir_basename}"])
- libdir_basename="${libdir_basename}"${multiarch+'/${arch}'}
AS_CASE(["$target_os"],
[freebsd*|dragonfly*], [],
@@ -3098,11 +2623,10 @@ AS_CASE("$enable_shared", [yes], [
LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so'
],
[linux* | gnu* | k*bsd*-gnu | atheos* | kopensolaris*-gnu], [
- LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR)'" $LDFLAGS_OPTDIR"
+ LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR)'
LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so'
if test "$load_relative" = yes; then
- libprefix="'\$\${ORIGIN}/../${libdir_basename}'"
- LIBRUBY_RPATHFLAGS="-Wl,-rpath,${libprefix}"
+ LIBRUBY_RPATHFLAGS="'-Wl,-rpath,\$\${ORIGIN}/../${libdir_basename}'"
LIBRUBY_RELATIVE=yes
fi
],
@@ -3117,14 +2641,14 @@ AS_CASE("$enable_shared", [yes], [
[netbsd*], [
SOLIBS='$(LIBS)'
LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR).$(TEENY)'
- LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR)'" $LDFLAGS_OPTDIR"
+ LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR)'
if test "$rb_cv_binary_elf" = yes; then # ELF platforms
LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR) lib$(RUBY_SO_NAME).so'
else # a.out platforms
LIBRUBY_ALIASES=""
fi
],
- [openbsd*|mirbsd*], [
+ [openbsd*], [
SOLIBS='$(LIBS)'
LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR).'`expr ${MINOR} \* 10 + ${TEENY}`
],
@@ -3145,14 +2669,14 @@ AS_CASE("$enable_shared", [yes], [
LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).sl.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).sl'
],
[aix*], [
- LIBRUBY_DLDFLAGS="${linker_flag}-bnoentry $XLDFLAGS $LDFLAGS_OPTDIR"
+ LIBRUBY_DLDFLAGS="${linker_flag}-bnoentry $XLDFLAGS"
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"
+ LIBRUBY_DLDFLAGS='-f ruby.exp -lnet -lbe -lroot glue-noinit.a init_term_dyn.o start_dyn.o'
])
],
[darwin*], [
@@ -3172,7 +2696,6 @@ AS_CASE("$enable_shared", [yes], [
LIBRUBY_DLDFLAGS="$LIBRUBY_DLDFLAGS "' $(XLDFLAGS)'
LIBRUBY_SO='lib$(RUBY_SO_NAME).dylib'
LIBRUBY_ALIASES='lib$(RUBY_BASE_NAME).$(MAJOR).$(MINOR).dylib lib$(RUBY_INSTALL_NAME).dylib'
- SOLIBS='$(LIBS)'
],
[interix*], [
LIBRUBYARG_SHARED='-L. -L${libdir} -l$(RUBY_SO_NAME)'
@@ -3217,8 +2740,7 @@ 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}"
+ LIBRUBY_RPATHFLAGS="$LIBRUBY_RPATHFLAGS${linker_flag}-R ${linker_flag}${libprefix} -L\$(libdir)"
LIBRUBYARG_SHARED="$LIBRUBY_RPATHFLAGS $LIBRUBYARG_SHARED"
LIBRUBYARG_STATIC="$LIBRUBY_RPATHFLAGS $LIBRUBYARG_STATIC"
fi
@@ -3346,8 +2868,6 @@ AS_CASE(["$target_os"],
],
[darwin*], [
RUBY_APPEND_OPTION(CFLAGS, -pipe)
- RUBY_APPEND_OPTION(XLDFLAGS, [-framework CoreFoundation])
- RUBY_APPEND_OPTION(LIBRUBYARG_STATIC, [-framework CoreFoundation])
],
[os2-emx], [
AC_LIBOBJ([os2])
@@ -3423,10 +2943,6 @@ AS_CASE(["$target_os"],
[nacl], [
FIRSTMAKEFILE=GNUmakefile:nacl/GNUmakefile.in
])
-
-AS_CASE(["$with_gmp: $SOLIBS "], [no:* | *' -lgmp '*|*' $(LIBS) '*], [],
- [SOLIBS="-lgmp $SOLIBS"])
-
MINIOBJS="$MINIDLNOBJ"
AS_CASE(["$THREAD_MODEL"],
@@ -3448,7 +2964,10 @@ AS_CASE(["$FIRSTMAKEFILE"], [*GNUmakefile:*], [gnumake=yes], [
rm -fr conftest.dir
AS_CASE(["$gnumake"],
[*yes*], [
- FIRSTMAKEFILE=GNUmakefile:template/GNUmakefile.in
+ echo '@%:@ -*- makefile -*-' > GNUmakefile
+ echo 'override MFLAGS := $(filter-out -j%,$(MFLAGS))' >> GNUmakefile
+ echo "include Makefile" >> GNUmakefile
+ echo "-include uncommon.mk" >> GNUmakefile
gnumake=yes],
[
gnumake=no])
@@ -3560,7 +3079,7 @@ if test "${ARCH_FLAG}"; then
LDFLAGS=`echo "$LDFLAGS" | sed "s| *$archflagpat"'||'`
fi
warnflags="$rb_cv_warnflags"
-AC_SUBST(cppflags)dnl
+AC_SUBST(cppflags, [])dnl
AC_SUBST(cflags, ["$orig_cflags "'${optflags} ${debugflags} ${warnflags}'])dnl
AC_SUBST(cxxflags, ["$orig_cxxflags "'${optflags} ${debugflags} ${warnflags}'])dnl
AC_SUBST(optflags)dnl
@@ -3597,9 +3116,7 @@ AC_SUBST(MINIOBJS)
AC_SUBST(THREAD_MODEL)
AC_SUBST(PLATFORM_DIR)
-firstmf=`echo $FIRSTMAKEFILE | sed 's/:.*//'`
-firsttmpl=`echo $FIRSTMAKEFILE | sed 's/.*://'`
-MAKEFILES="Makefile $firstmf"
+MAKEFILES="Makefile `echo $FIRSTMAKEFILE | sed 's/:.*//'`"
MAKEFILES="`echo $MAKEFILES`"
AC_SUBST(MAKEFILES)
@@ -3618,28 +3135,22 @@ AS_CASE(["$target_os"],
rubyw_install_name='$(RUBYW_INSTALL_NAME)'
])
-rubylibdir='${rubylibprefix}/${ruby_version}'
-rubyarchdir=${multiarch+'${rubyarchprefix}/${ruby_version}'}${multiarch-'${rubylibdir}/${arch}'}
-
-rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'}
-AC_ARG_WITH(rubyarchprefix,
- AS_HELP_STRING([--with-rubyarchprefix=DIR],
- [prefix for architecture dependent ruby libraries [[RUBYLIBPREFIX/ARCH]]]),
- [rubyarchprefix="$withval"])
-AC_SUBST(rubyarchprefix)
-
-rubysitearchprefix=${multiarch+'${sitearchlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${sitearch}'}
-AC_ARG_WITH(rubysitearchprefix,
- AS_HELP_STRING([--with-rubysitearchprefix=DIR],
- [prefix for architecture dependent site libraries [[RUBYLIBPREFIX/SITEARCH]]]),
- [rubysitearchprefix="$withval"])
-AC_SUBST(rubysitearchprefix)
+rubylibprefix='${libdir}/${RUBY_BASE_NAME}'
+AC_ARG_WITH(rubylibprefix,
+ AS_HELP_STRING([--with-rubylibprefix=DIR], [prefix for ruby libraries [[LIBDIR/RUBY_BASE_NAME]]]),
+ [if test "x$withval" = xno; then
+ AC_MSG_ERROR([No ruby, No libprefix])
+ fi
+ rubylibprefix="$withval"])
+RUBY_LIB_PREFIX=`eval echo \\"${rubylibprefix}\\"`
+AC_SUBST(rubylibprefix)
RI_BASE_NAME=`echo ${RUBY_BASE_NAME} | sed 's/ruby/ri/'`
ridir='${datarootdir}/${RI_BASE_NAME}'
AC_ARG_WITH(ridir,
AS_HELP_STRING([--with-ridir=DIR], [ri documentation [[DATAROOTDIR/ri]]]),
[ridir=$withval])
+RIDIR=`eval echo \\"${ridir}\\"`
AC_SUBST(ridir)
AC_SUBST(RI_BASE_NAME)
@@ -3664,63 +3175,91 @@ if test ${RUBY_LIB_VERSION_STYLE+set}; then
test -f verconf.h || > verconf.h
ruby_version="`$CPP -I. -I"${srcdir}" -I"${srcdir}/include" conftest.c | sed '/^ruby_version=/!d;s/ //g'`"
eval $ruby_version
-elif test -z "${ruby_version}"; then
- AC_MSG_ERROR([No ruby version, No place for bundled libraries])
else
RUBY_LIB_VERSION="\"${ruby_version}\""
fi
-AC_SUBST(RUBY_LIB_VERSION_STYLE)
-AC_SUBST(RUBY_LIB_VERSION)
AC_ARG_WITH(sitedir,
AS_HELP_STRING([--with-sitedir=DIR], [site libraries in DIR [[RUBY_LIB_PREFIX/site_ruby]], "no" to disable site directory]),
[sitedir=$withval],
[sitedir='${rubylibprefix}/site_ruby'])
-sitelibdir='${sitedir}/${ruby_version}'
-
-AC_ARG_WITH(sitearchdir,
- AS_HELP_STRING([--with-sitearchdir=DIR],
- [architecture dependent site libraries in DIR [[SITEDIR/SITEARCH]], "no" to disable site directory]),
- [sitearchdir=$withval],
- [sitearchdir=${multiarch+'${rubysitearchprefix}/site_ruby/${ruby_version}'}${multiarch-'${sitelibdir}/${sitearch}'}])
+dir="${sitedir}"
+until SITE_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${SITE_DIR}"; do
+ dir="${SITE_DIR}"
+done
AC_ARG_WITH(vendordir,
AS_HELP_STRING([--with-vendordir=DIR], [vendor libraries in DIR [[RUBY_LIB_PREFIX/vendor_ruby]], "no" to disable vendor directory]),
[vendordir=$withval],
[vendordir='${rubylibprefix}/vendor_ruby'])
-vendorlibdir='${vendordir}/${ruby_version}'
-
-AC_ARG_WITH(vendorarchdir,
- AS_HELP_STRING([--with-vendorarchdir=DIR],
- [architecture dependent vendor libraries in DIR [[VENDORDIR/SITEARCH]], "no" to disable vendor directory]),
- [vendorarchdir=$withval],
- [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby/${ruby_version}'}${multiarch-'${vendorlibdir}/${sitearch}'}])
+dir="${vendordir}"
+until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do
+ dir="${VENDOR_DIR}"
+done
if test "${LOAD_RELATIVE+set}"; then
AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
- RUBY_EXEC_PREFIX=''
+ RUBY_EXEC_PREFIX=""
+ RUBY_LIB_PREFIX="`eval echo "$RUBY_LIB_PREFIX" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
+ RUBY_SITE_LIB_PATH="`eval echo "$SITE_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
+ RUBY_VENDOR_LIB_PATH="`eval echo "$VENDOR_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`"
+else
+ RUBY_EXEC_PREFIX="`eval echo \\"$exec_prefix/\\" | sed 's|^NONE/|'"$prefix"'/|;s|/$||'`"
+ RUBY_LIB_PREFIX="`eval echo \\"$RUBY_LIB_PREFIX\\" | sed 's|^NONE/|'"$prefix"'/|'`"
+ RUBY_SITE_LIB_PATH="`eval echo \\"$SITE_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
+ RUBY_VENDOR_LIB_PATH="`eval echo \\"$VENDOR_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
fi
-AC_SUBST(RUBY_EXEC_PREFIX)
+pat=`echo "$RUBY_LIB_PREFIX/" | tr -c '\012' .`'\(.*\)'
+AS_CASE(["$RUBY_SITE_LIB_PATH"],
+ ["$RUBY_LIB_PREFIX/"*], [
+ RUBY_SITE_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_SITE_LIB_PATH\" : \"$pat\"`"'"'
+ ],
+ [
+ RUBY_SITE_LIB_PATH="\"${RUBY_SITE_LIB_PATH}\""
+ ])
+AS_CASE(["$RUBY_VENDOR_LIB_PATH"],
+ ["$RUBY_LIB_PREFIX/"*], [
+ RUBY_VENDOR_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_VENDOR_LIB_PATH\" : \"$pat\"`"'"'
+ ],
+ [
+ RUBY_VENDOR_LIB_PATH="\"${RUBY_VENDOR_LIB_PATH}\""
+ ])
+pat=`echo "$RUBY_EXEC_PREFIX/" | tr -c '\012' .`'\(.*\)'
+AS_CASE(["$RUBY_LIB_PREFIX"],
+ ["$RUBY_EXEC_PREFIX/"*], [
+ RUBY_LIB_PREFIX='RUBY_EXEC_PREFIX"/'"`expr \"$RUBY_LIB_PREFIX\" : \"$pat\"`"'"'
+ ],
+ [
+ RUBY_LIB_PREFIX="\"${RUBY_LIB_PREFIX}\""
+ ])
+
+if test ${RUBY_LIB_VERSION_STYLE+set}; then
+ AC_DEFINE_UNQUOTED(RUBY_LIB_VERSION_STYLE, $RUBY_LIB_VERSION_STYLE !<verconf>!)
+else
+ AC_DEFINE_UNQUOTED(RUBY_LIB_VERSION, [$RUBY_LIB_VERSION] !<verconf>!)
+fi
+AC_DEFINE_UNQUOTED(RUBY_EXEC_PREFIX, "${RUBY_EXEC_PREFIX}")
+AC_DEFINE_UNQUOTED(RUBY_LIB_PREFIX, ${RUBY_LIB_PREFIX} !<verconf>!)
+if test "x$SITE_DIR" = xno; then
+ AC_DEFINE(NO_RUBY_SITE_LIB, [] !<verconf>!)
+else
+ AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, ${RUBY_SITE_LIB_PATH} !<verconf>!)
+fi
+if test "x$VENDOR_DIR" = xno; then
+ AC_DEFINE(NO_RUBY_VENDOR_LIB, [] !<verconf>!)
+else
+ AC_DEFINE_UNQUOTED(RUBY_VENDOR_LIB, ${RUBY_VENDOR_LIB_PATH} !<verconf>!)
+fi
-AC_SUBST(libdirname, ${multiarch+arch}libdir)
-AC_SUBST(archlibdir)dnl
-AC_SUBST(sitearchlibdir)dnl
-AC_SUBST(archincludedir)dnl
-AC_SUBST(sitearchincludedir)dnl
AC_SUBST(arch)dnl
AC_SUBST(sitearch)dnl
AC_SUBST(ruby_version)dnl
-AC_SUBST(rubylibdir)dnl
-AC_SUBST(rubyarchdir)dnl
AC_SUBST(sitedir)dnl
-AC_SUBST(sitelibdir)dnl
-AC_SUBST(sitearchdir)dnl
AC_SUBST(vendordir)dnl
-AC_SUBST(vendorlibdir)dnl
-AC_SUBST(vendorarchdir)dnl
-AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl
+configure_args=$ac_configure_args
+AC_SUBST(configure_args)dnl
if test "${universal_binary-no}" = yes ; then
arch="universal-${target_os}"
@@ -3728,7 +3267,7 @@ if test "${universal_binary-no}" = yes ; then
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__)
+ AC_DEFINE_UNQUOTED(RUBY_PLATFORM_CPU, __ARCHITECTURE__ !<verconf>!)
else
for archs in ${universal_archnames}; do
cpu=`echo $archs | sed 's/.*=//'`
@@ -3740,64 +3279,44 @@ if test "${universal_binary-no}" = yes ; then
test "$ac_cv_type_long_long" = yes && ints="'long long' $ints"
AC_SUBST(UNIVERSAL_ARCHNAMES, "${universal_archnames}")
AC_SUBST(UNIVERSAL_INTS, "${ints}")
- AC_DEFINE_UNQUOTED(RUBY_PLATFORM_OS, "${target_os}")
- AC_DEFINE_UNQUOTED(RUBY_ARCH, "universal-"RUBY_PLATFORM_OS)
- AC_DEFINE_UNQUOTED(RUBY_PLATFORM, "universal."RUBY_PLATFORM_CPU"-"RUBY_PLATFORM_OS)
+ AC_DEFINE_UNQUOTED(RUBY_PLATFORM_OS, "${target_os}" !<verconf>!)
+ AC_DEFINE_UNQUOTED(RUBY_ARCH, "universal-"RUBY_PLATFORM_OS !<verconf>!)
+ AC_DEFINE_UNQUOTED(RUBY_PLATFORM, "universal."RUBY_PLATFORM_CPU"-"RUBY_PLATFORM_OS !<verconf>!)
else
arch="${target_cpu}-${target_os}"
- AC_DEFINE_UNQUOTED(RUBY_PLATFORM, "${arch}")
+ AC_DEFINE_UNQUOTED(RUBY_PLATFORM, "${arch}" !<verconf>!)
fi
unset sitearch
AS_CASE(["$target_os"],[mingw*],[sitearch="$target_cpu-$rb_cv_msvcrt"])
+test ${sitearch+set} && AC_DEFINE_UNQUOTED(RUBY_SITEARCH, "${sitearch}" !<verconf>!)
: ${sitearch='${arch}'}
AC_ARG_WITH(search-path,
AS_HELP_STRING([--with-search-path=DIR], [specify the additional search path]),
[search_path=$withval])
if test "$search_path" != ""; then
- AC_SUBST(RUBY_SEARCH_PATH, $search_path)
+ AC_DEFINE_UNQUOTED(RUBY_SEARCH_PATH,"$search_path" !<verconf>!)
fi
AC_ARG_WITH(rubyhdrdir,
AS_HELP_STRING([--with-rubyhdrdir=DIR], [core headers in DIR [[INCLUDEDIR/RUBY_BASE_NAME-RUBY_VERSION]]]),
[rubyhdrdir=$withval],
- [rubyhdrdir='${includedir}/${RUBY_VERSION_NAME}'])
-
-AC_ARG_WITH(rubyarchhdrdir,
- AS_HELP_STRING([--with-rubyarchhdrdir=DIR],
- [architecture dependent core headers in DIR [[$(rubyhdrdir)/$(arch)]]]),
- [rubyarchhdrdir=$withval],
- [rubyarchhdrdir=${multiarch+'${archincludedir}/${RUBY_VERSION_NAME}'}${multiarch-'${rubyhdrdir}/${arch}'}])
+ [rubyhdrdir='${includedir}/${RUBY_BASE_NAME}-${ruby_version}'])
AC_ARG_WITH(sitehdrdir,
AS_HELP_STRING([--with-sitehdrdir=DIR], [core site headers in DIR [[RUBYHDRDIR/site_ruby]]]),
[sitehdrdir=$withval],
[sitehdrdir='${rubyhdrdir}/site_ruby'])
-AC_ARG_WITH(sitearchhdrdir,
- AS_HELP_STRING([--with-sitearchhdrdir=DIR],
- [architecture dependent core site headers in DIR [[RUBYHDRDIR/site_ruby]]]),
- [sitearchhdrdir=$withval],
- [sitearchhdrdir=${multiarch+'${sitearchincludedir}/${RUBY_VERSION_NAME}/site_ruby'}${multiarch-'${sitehdrdir}/${sitearch}'}])
-
AC_ARG_WITH(vendorhdrdir,
AS_HELP_STRING([--with-vendorhdrdir=DIR], [core vendor headers in DIR [[RUBYHDRDIR/vendor_ruby]]]),
[vendorhdrdir=$withval],
[vendorhdrdir='${rubyhdrdir}/vendor_ruby'])
-AC_ARG_WITH(vendorarchhdrdir,
- AS_HELP_STRING([--with-vendorarchhdrdir=DIR],
- [architecture dependent core vendor headers in DIR [[RUBYHDRDIR/vendor_ruby]]]),
- [vendorarchhdrdir=$withval],
- [vendorarchhdrdir=${multiarch+'${sitearchincludedir}/${RUBY_VERSION_NAME}/vendor_ruby'}${multiarch-'${vendorhdrdir}/${sitearch}'}])
-
AC_SUBST(rubyhdrdir)dnl
AC_SUBST(sitehdrdir)dnl
AC_SUBST(vendorhdrdir)dnl
-AC_SUBST(rubyarchhdrdir)dnl
-AC_SUBST(sitearchhdrdir)dnl
-AC_SUBST(vendorarchhdrdir)dnl
AC_ARG_WITH(mantype,
AS_HELP_STRING([--with-mantype=TYPE], [specify man page type; TYPE is one of man and doc]),
@@ -3834,10 +3353,11 @@ guard=INCLUDE_RUBY_CONFIG_H
{
echo "#ifndef $guard"
echo "#define $guard 1"
- grep -v "^#define PACKAGE_" confdefs.h
+ grep -v "^#define PACKAGE_" confdefs.h | grep -v ' !<verconf>!$'
echo "#endif /* $guard */"
} | tr -d '\015' |
${srcdir}/tool/ifchange "${config_h}" -
+sed -n 's/ !<verconf>!$//p' confdefs.h | ${srcdir}/tool/ifchange verconf.h -
tr -d '\015' < largefile.h > confdefs.h
rm largefile.h
@@ -3866,9 +3386,7 @@ AC_MSG_RESULT($PACKAGE library version = $ruby_version)
AS_CASE([" $CPP "], [*" $CC "*], [CPP=`echo " $CPP " | sed "s| $CC |"' $(CC) |;s/^ *//;s/ *$//'`])
-if test x"$firstmf" != x; then
- AC_CONFIG_FILES($firstmf:$firsttmpl, [], [firstmf="$firstmf" firsttmpl="$firsttmpl"])
-fi
+AC_CONFIG_FILES($FIRSTMAKEFILE)
AC_CONFIG_FILES(Makefile, [
tmpmk=confmk$$.tmp
{
diff --git a/constant.h b/constant.h
index 3dc9b8d4ef..9354241961 100644
--- a/constant.h
+++ b/constant.h
@@ -18,8 +18,8 @@ typedef enum {
typedef struct rb_const_entry_struct {
rb_const_flag_t flag;
- const VALUE value; /* should be mark */
- const VALUE file; /* should be mark */
+ VALUE value; /* should be mark */
+ VALUE file;
int line;
} rb_const_entry_t;
diff --git a/cont.c b/cont.c
index fa9e91ee64..43a60fa149 100644
--- a/cont.c
+++ b/cont.c
@@ -15,6 +15,9 @@
#include "gc.h"
#include "eval_intern.h"
+#if ((defined(_WIN32) && _WIN32_WINNT >= 0x0400) || (defined(HAVE_GETCONTEXT) && defined(HAVE_SETCONTEXT))) && !defined(__NetBSD__) && !defined(__sun) && !defined(FIBER_USE_NATIVE)
+#define FIBER_USE_NATIVE 1
+
/* FIBER_USE_NATIVE enables Fiber performance improvement using system
* dependent method such as make/setcontext on POSIX system or
* CreateFiber() API on Windows.
@@ -26,45 +29,12 @@
* in Proc. of 51th Programming Symposium, pp.21--28 (2010) (in Japanese).
*/
-#if !defined(FIBER_USE_NATIVE)
-# if defined(HAVE_GETCONTEXT) && defined(HAVE_SETCONTEXT)
-# if 0
-# elif defined(__NetBSD__)
/* On our experience, NetBSD doesn't support using setcontext() and pthread
* simultaneously. This is because pthread_self(), TLS and other information
* are represented by stack pointer (higher bits of stack pointer).
* TODO: check such constraint on configure.
*/
-# define FIBER_USE_NATIVE 0
-# elif defined(__sun)
-/* On Solaris because resuming any Fiber caused SEGV, for some reason.
- */
-# define FIBER_USE_NATIVE 0
-# elif defined(__ia64)
-/* At least, Linux/ia64's getcontext(3) doesn't save register window.
- */
-# define FIBER_USE_NATIVE 0
-# elif defined(__GNU__)
-/* GNU/Hurd doesn't fully support getcontext, setcontext, makecontext
- * and swapcontext functions. Disabling their usage till support is
- * implemented. More info at
- * http://darnassus.sceen.net/~hurd-web/open_issues/glibc/#getcontext
- */
-# define FIBER_USE_NATIVE 0
-# else
-# define FIBER_USE_NATIVE 1
-# endif
-# elif defined(_WIN32)
-# if _WIN32_WINNT >= 0x0400
-/* only when _WIN32_WINNT >= 0x0400 on Windows because Fiber APIs are
- * supported only such building (and running) environments.
- * [ruby-dev:41192]
- */
-# define FIBER_USE_NATIVE 1
-# endif
-# endif
-#endif
-#if !defined(FIBER_USE_NATIVE)
+#elif !defined(FIBER_USE_NATIVE)
#define FIBER_USE_NATIVE 0
#endif
@@ -107,8 +77,6 @@ typedef struct rb_context_struct {
rb_thread_t saved_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;
enum fiber_status {
@@ -118,13 +86,13 @@ enum fiber_status {
};
#if FIBER_USE_NATIVE && !defined(_WIN32)
-#define MAX_MACHINE_STACK_CACHE 10
+#define MAX_MAHINE_STACK_CACHE 10
static int machine_stack_cache_index = 0;
typedef struct machine_stack_cache_struct {
void *ptr;
size_t size;
} machine_stack_cache_t;
-static machine_stack_cache_t machine_stack_cache[MAX_MACHINE_STACK_CACHE];
+static machine_stack_cache_t machine_stack_cache[MAX_MAHINE_STACK_CACHE];
static machine_stack_cache_t terminated_machine_stack;
#endif
@@ -225,7 +193,6 @@ cont_free(void *ptr)
#if FIBER_USE_NATIVE
if (cont->type == CONTINUATION_CONTEXT) {
/* cont */
- ruby_xfree(cont->ensure_array);
RUBY_FREE_UNLESS_NULL(cont->machine_stack);
}
else {
@@ -256,7 +223,6 @@ cont_free(void *ptr)
#endif
}
#else /* not FIBER_USE_NATIVE */
- ruby_xfree(cont->ensure_array);
RUBY_FREE_UNLESS_NULL(cont->machine_stack);
#endif
#ifdef __ia64
@@ -355,8 +321,7 @@ fiber_memsize(const void *ptr)
size_t size = 0;
if (ptr) {
size = sizeof(*fib);
- if (fib->cont.type != ROOT_FIBER_CONTEXT &&
- fib->cont.saved_thread.local_storage != NULL) {
+ if (fib->cont.type != ROOT_FIBER_CONTEXT) {
size += st_memsize(fib->cont.saved_thread.local_storage);
}
size += cont_memsize(&fib->cont);
@@ -422,7 +387,6 @@ cont_save_machine_stack(rb_thread_t *th, rb_context_t *cont)
static const rb_data_type_t cont_data_type = {
"continuation",
{cont_mark, cont_free, cont_memsize,},
- NULL, NULL, RUBY_TYPED_FREE_IMMEDIATELY
};
static void
@@ -489,22 +453,6 @@ cont_capture(volatile int *stat)
cont_save_machine_stack(th, cont);
- /* backup ensure_list to array for search in another context */
- {
- rb_ensure_list_t *p;
- int size = 0;
- rb_ensure_entry_t *entry;
- for (p=th->ensure_list; p; p=p->next)
- size++;
- entry = cont->ensure_array = ALLOC_N(rb_ensure_entry_t,size+1);
- for (p=th->ensure_list; p; p=p->next) {
- if (!p->entry.marker)
- p->entry.marker = rb_ary_tmp_new(0); /* dummy object */
- *entry++ = p->entry;
- }
- entry->marker = 0;
- }
-
if (ruby_setjmp(cont->jmpbuf)) {
volatile VALUE value;
@@ -564,10 +512,6 @@ cont_restore_thread(rb_context_t *cont)
th->protect_tag = sth->protect_tag;
th->errinfo = sth->errinfo;
th->first_proc = sth->first_proc;
- th->root_lep = sth->root_lep;
- th->root_svar = sth->root_svar;
- th->ensure_list = sth->ensure_list;
-
}
#if FIBER_USE_NATIVE
@@ -622,10 +566,9 @@ fiber_machine_stack_alloc(size_t size)
void *page;
STACK_GROW_DIR_DETECTION;
- errno = 0;
ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, FIBER_STACK_FLAGS, -1, 0);
if (ptr == MAP_FAILED) {
- rb_raise(rb_eFiberError, "can't alloc machine stack to fiber: %s", strerror(errno));
+ rb_raise(rb_eFiberError, "can't alloc machine stack to fiber");
}
/* guard page setup */
@@ -939,80 +882,6 @@ make_passing_arg(int argc, VALUE *argv)
}
}
-/* CAUTION!! : Currently, error in rollback_func is not supported */
-/* same as rb_protect if set rollback_func to NULL */
-void
-ruby_register_rollback_func_for_ensure(VALUE (*ensure_func)(ANYARGS), VALUE (*rollback_func)(ANYARGS))
-{
- st_table **table_p = &GET_VM()->ensure_rollback_table;
- if (UNLIKELY(*table_p == NULL)) {
- *table_p = st_init_numtable();
- }
- st_insert(*table_p, (st_data_t)ensure_func, (st_data_t)rollback_func);
-}
-
-static inline VALUE
-lookup_rollback_func(VALUE (*ensure_func)(ANYARGS))
-{
- st_table *table = GET_VM()->ensure_rollback_table;
- st_data_t val;
- if (table && st_lookup(table, (st_data_t)ensure_func, &val))
- return (VALUE) val;
- return Qundef;
-}
-
-
-static inline void
-rollback_ensure_stack(VALUE self,rb_ensure_list_t *current,rb_ensure_entry_t *target)
-{
- rb_ensure_list_t *p;
- rb_ensure_entry_t *entry;
- size_t i;
- size_t cur_size;
- size_t target_size;
- size_t base_point;
- VALUE (*func)(ANYARGS);
-
- cur_size = 0;
- for (p=current; p; p=p->next)
- cur_size++;
- target_size = 0;
- for (entry=target; entry->marker; entry++)
- target_size++;
-
- /* search common stack point */
- p = current;
- base_point = cur_size;
- while (base_point) {
- if (target_size >= base_point &&
- p->entry.marker == target[target_size - base_point].marker)
- break;
- base_point --;
- p = p->next;
- }
-
- /* rollback function check */
- for (i=0; i < target_size - base_point; i++) {
- if (!lookup_rollback_func(target[i].e_proc)) {
- rb_raise(rb_eRuntimeError, "continuation called from out of critical rb_ensure scope");
- }
- }
- /* pop ensure stack */
- while (cur_size > base_point) {
- /* escape from ensure block */
- (*current->entry.e_proc)(current->entry.data2);
- current = current->next;
- cur_size--;
- }
- /* push ensure stack */
- while (i--) {
- func = (VALUE (*)(ANYARGS)) lookup_rollback_func(target[i].e_proc);
- if ((VALUE)func != Qundef) {
- (*func)(target[i].data2);
- }
- }
-}
-
/*
* call-seq:
* cont.call(args, ...)
@@ -1050,7 +919,6 @@ rb_cont_call(int argc, VALUE *argv, VALUE contval)
rb_raise(rb_eRuntimeError, "continuation called across fiber");
}
}
- rollback_ensure_stack(contval, th->ensure_list, cont->ensure_array);
cont->argc = argc;
cont->value = make_passing_arg(argc, argv);
@@ -1131,7 +999,6 @@ 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
};
static VALUE
@@ -1279,9 +1146,10 @@ rb_fiber_start(void)
TH_PUSH_TAG(th);
if ((state = EXEC_TAG()) == 0) {
int argc;
- const VALUE *argv, args = cont->value;
+ VALUE *argv, args;
GetProcPtr(cont->saved_thread.first_proc, proc);
- argv = (argc = cont->argc) > 1 ? RARRAY_CONST_PTR(args) : &args;
+ args = cont->value;
+ argv = (argc = cont->argc) > 1 ? RARRAY_PTR(args) : &args;
cont->value = Qnil;
th->errinfo = Qnil;
th->root_lep = rb_vm_ep_local_ep(proc->block.ep);
@@ -1363,7 +1231,7 @@ fiber_store(rb_fiber_t *next_fib)
fiber_setcontext(next_fib, fib);
#ifndef _WIN32
if (terminated_machine_stack.ptr) {
- if (machine_stack_cache_index < MAX_MACHINE_STACK_CACHE) {
+ if (machine_stack_cache_index < MAX_MAHINE_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++;
@@ -1670,7 +1538,9 @@ Init_Cont(void)
rb_define_method(rb_cFiber, "resume", rb_fiber_m_resume, -1);
}
-RUBY_SYMBOL_EXPORT_BEGIN
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility push(default)
+#endif
void
ruby_Init_Continuation_body(void)
@@ -1691,4 +1561,6 @@ ruby_Init_Fiber_as_Coroutine(void)
rb_define_singleton_method(rb_cFiber, "current", rb_fiber_s_current, 0);
}
-RUBY_SYMBOL_EXPORT_END
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility pop
+#endif
diff --git a/debug.c b/debug.c
index 2f1e03cc3a..4909a45d17 100644
--- a/debug.c
+++ b/debug.c
@@ -24,7 +24,6 @@ const union {
enum ruby_tag_type tag_type;
enum node_type node_type;
enum ruby_method_ids method_ids;
- enum ruby_id_types id_types;
enum {
RUBY_ENCODING_INLINE_MAX = ENCODING_INLINE_MAX,
RUBY_ENCODING_SHIFT = ENCODING_SHIFT,
@@ -33,10 +32,11 @@ const union {
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_RESERVED1 = FL_RESERVED1,
+ RUBY_FL_RESERVED2 = FL_RESERVED2,
RUBY_FL_FINALIZE = FL_FINALIZE,
RUBY_FL_TAINT = FL_TAINT,
+ RUBY_FL_UNTRUSTED = FL_UNTRUSTED,
RUBY_FL_EXIVAR = FL_EXIVAR,
RUBY_FL_FREEZE = FL_FREEZE,
RUBY_FL_SINGLETON = FL_SINGLETON,
diff --git a/defs/gmake.mk b/defs/gmake.mk
deleted file mode 100644
index 0acb88ef57..0000000000
--- a/defs/gmake.mk
+++ /dev/null
@@ -1,29 +0,0 @@
-# -*- makefile-gmake -*-
-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)
-
-ifneq ($(filter check% 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))
-endif
-ifneq ($(filter check%,$(MAKECMDGOALS))$(if $(filter test-all,$(MAKECMDGOALS)),$(filter test-knownbug,$(MAKECMDGOALS))),)
-yes-test-all yes-test-ruby: yes-test-knownbug
-endif
-
-$(TEST_TARGETS): $(TEST_DEPENDS)
-
-ifneq ($(if $(filter install,$(MAKECMDGOALS)),$(filter uninstall,$(MAKECMDGOALS))),)
-install-targets := $(filter install uninstall,$(MAKECMDGOALS))
-$(word 1,$(install-targets)): $(word 0,$(install-targets))
-endif
-
-ifneq ($(filter reinstall,$(MAKECMDGOALS)),)
-install: uninstall
-endif
diff --git a/defs/id.def b/defs/id.def
index 53ed3775ad..ea0746e4d6 100644
--- a/defs/id.def
+++ b/defs/id.def
@@ -1,27 +1,15 @@
# -*- mode: ruby; coding: us-ascii -*-
firstline, predefined = __LINE__+1, %[\
- freeze
- inspect
intern
- object_id
- const_missing
method_missing MethodMissing
- method_added
- singleton_method_added
- method_removed
- singleton_method_removed
- method_undefined
- singleton_method_undefined
length
size
gets
succ
each
- proc
lambda
send
__send__
- __attached__
initialize
initialize_copy
initialize_clone
@@ -29,7 +17,6 @@ firstline, predefined = __LINE__+1, %[\
_ UScore
"/*NULL*/" NULL
empty?
- eql?
respond_to? Respond_to
respond_to_missing? Respond_to_missing
<IFUNC>
@@ -61,10 +48,7 @@ const_ids = []
class_ids = []
names = {}
predefined.split(/^/).each_with_index do |line, num|
- next if /^#/ =~ line
- line.sub!(/\s+#.*/, '')
- name, token = line.split
- next unless name
+ next if /^#/ =~ line or (name, token = line.split; !name)
token ||= name
if /#/ =~ token
token = "_#{token.gsub(/\W+/, '_')}"
diff --git a/dir.c b/dir.c
index 8492ce78d0..758a34eee6 100644
--- a/dir.c
+++ b/dir.c
@@ -63,6 +63,10 @@ char *strchr(char*,char);
#include "ruby/util.h"
+#if !defined HAVE_LSTAT && !defined lstat
+#define lstat stat
+#endif
+
/* define system APIs */
#ifdef _WIN32
#undef chdir
@@ -75,40 +79,7 @@ char *strchr(char*,char);
#define opendir(p) rb_w32_uopendir(p)
#endif
-#ifdef __APPLE__
-# define HAVE_HFS 1
-#else
-# define HAVE_HFS 0
-#endif
-#if HAVE_HFS
-#include <sys/param.h>
-#include <sys/mount.h>
-
-static inline int
-is_hfs(DIR *dirp)
-{
- struct statfs buf;
- if (fstatfs(dirfd(dirp), &buf) == 0) {
- return buf.f_type == 17; /* HFS on darwin */
- }
- return FALSE;
-}
-
-static inline int
-has_nonascii(const char *ptr, size_t len)
-{
- while (len > 0) {
- if (!ISASCII(*ptr)) return 1;
- ptr++;
- --len;
- }
- return 0;
-}
-
-# define IF_HAVE_HFS(something) something
-#else
-# define IF_HAVE_HFS(something) /* nothing */
-#endif
+#define rb_sys_fail_path(path) rb_sys_fail_str(path)
#define FNM_NOESCAPE 0x01
#define FNM_PATHNAME 0x02
@@ -166,7 +137,7 @@ bracket(
p = t2 + (r2 = rb_enc_mbclen(t2, pend, enc));
if (ok) continue;
if ((r <= (send-s) && memcmp(t1, s, r) == 0) ||
- (r2 <= (send-s) && memcmp(t2, s, r2) == 0)) {
+ (r2 <= (send-s) && memcmp(t2, s, r) == 0)) {
ok = 1;
continue;
}
@@ -381,7 +352,6 @@ dir_memsize(const void *ptr)
static const rb_data_type_t dir_data_type = {
"dir",
{dir_mark, dir_free, dir_memsize,},
- NULL, NULL, RUBY_TYPED_FREE_IMMEDIATELY
};
static VALUE dir_close(VALUE);
@@ -411,12 +381,8 @@ dir_s_alloc(VALUE klass)
/*
* call-seq:
* Dir.new( string ) -> aDir
- * Dir.new( string, encoding: enc ) -> aDir
*
* Returns a new directory object for the named directory.
- *
- * The optional <i>enc</i> argument specifies the encoding of the directory.
- * If not specified, the filesystem encoding is used.
*/
static VALUE
dir_initialize(int argc, VALUE *argv, VALUE dir)
@@ -424,20 +390,18 @@ dir_initialize(int argc, VALUE *argv, VALUE dir)
struct dir_data *dp;
rb_encoding *fsenc;
VALUE dirname, opt, orig;
- static ID keyword_ids[1];
+ static VALUE sym_enc;
- if (!keyword_ids[0]) {
- keyword_ids[0] = rb_intern("encoding");
+ if (!sym_enc) {
+ sym_enc = ID2SYM(rb_intern("encoding"));
}
-
fsenc = rb_filesystem_encoding();
rb_scan_args(argc, argv, "1:", &dirname, &opt);
if (!NIL_P(opt)) {
- VALUE enc;
- rb_get_kwargs(opt, keyword_ids, 0, 1, &enc);
- if (enc != Qundef && !NIL_P(enc)) {
+ VALUE enc = rb_hash_aref(opt, sym_enc);
+ if (!NIL_P(enc)) {
fsenc = rb_to_encoding(enc);
}
}
@@ -470,12 +434,7 @@ dir_initialize(int argc, VALUE *argv, VALUE dir)
/*
* call-seq:
* Dir.open( string ) -> aDir
- * Dir.open( string, encoding: enc ) -> aDir
* Dir.open( string ) {| aDir | block } -> anObject
- * Dir.open( string, encoding: enc ) {| aDir | block } -> anObject
- *
- * The optional <i>enc</i> argument specifies the encoding of the directory.
- * If not specified, the filesystem encoding is used.
*
* With no block, <code>open</code> is a synonym for
* <code>Dir::new</code>. If a block is present, it is passed
@@ -507,6 +466,8 @@ static struct dir_data *
dir_check(VALUE dir)
{
struct dir_data *dirp;
+ if (!OBJ_UNTRUSTED(dir) && rb_safe_level() >= 4)
+ rb_raise(rb_eSecurityError, "Insecure: operation on trusted Dir");
rb_check_frozen(dir);
dirp = rb_check_typeddata(dir, &dir_data_type);
if (!dirp->dir) dir_closed();
@@ -542,7 +503,6 @@ dir_inspect(VALUE dir)
/*
* call-seq:
* dir.path -> string or nil
- * dir.to_path -> string or nil
*
* Returns the path parameter passed to <em>dir</em>'s constructor.
*
@@ -559,10 +519,50 @@ dir_path(VALUE dir)
return rb_str_dup(dirp->path);
}
-#if defined _WIN32
-# define READDIR(dir, enc) rb_w32_readdir((dir), (enc))
+#if defined HAVE_READDIR_R
+# define READDIR(dir, enc, entry, dp) (readdir_r((dir), (entry), &(dp)) == 0 && (dp) != 0)
+#elif defined _WIN32
+# define READDIR(dir, enc, entry, dp) (((dp) = rb_w32_readdir((dir), (enc))) != 0)
+#else
+# define READDIR(dir, enc, entry, dp) (((dp) = readdir(dir)) != 0)
+#endif
+#if defined HAVE_READDIR_R
+# define IF_HAVE_READDIR_R(something) something
#else
-# define READDIR(dir, enc) readdir((dir))
+# define IF_HAVE_READDIR_R(something) /* nothing */
+#endif
+
+#if defined SIZEOF_STRUCT_DIRENT_TOO_SMALL
+# include <limits.h>
+# define NAME_MAX_FOR_STRUCT_DIRENT 255
+# if defined NAME_MAX
+# if NAME_MAX_FOR_STRUCT_DIRENT < NAME_MAX
+# undef NAME_MAX_FOR_STRUCT_DIRENT
+# define NAME_MAX_FOR_STRUCT_DIRENT NAME_MAX
+# endif
+# endif
+# if defined _POSIX_NAME_MAX
+# if NAME_MAX_FOR_STRUCT_DIRENT < _POSIX_NAME_MAX
+# undef NAME_MAX_FOR_STRUCT_DIRENT
+# define NAME_MAX_FOR_STRUCT_DIRENT _POSIX_NAME_MAX
+# endif
+# endif
+# if defined _XOPEN_NAME_MAX
+# if NAME_MAX_FOR_STRUCT_DIRENT < _XOPEN_NAME_MAX
+# undef NAME_MAX_FOR_STRUCT_DIRENT
+# define NAME_MAX_FOR_STRUCT_DIRENT _XOPEN_NAME_MAX
+# endif
+# endif
+# define DEFINE_STRUCT_DIRENT \
+ union { \
+ struct dirent dirent; \
+ char dummy[offsetof(struct dirent, d_name) + \
+ NAME_MAX_FOR_STRUCT_DIRENT + 1]; \
+ }
+# define STRUCT_DIRENT(entry) ((entry).dirent)
+#else
+# define DEFINE_STRUCT_DIRENT struct dirent
+# define STRUCT_DIRENT(entry) (entry)
#endif
/*
@@ -582,10 +582,11 @@ dir_read(VALUE dir)
{
struct dir_data *dirp;
struct dirent *dp;
+ IF_HAVE_READDIR_R(DEFINE_STRUCT_DIRENT entry);
GetDIR(dir, dirp);
errno = 0;
- if ((dp = READDIR(dirp->dir, dirp->enc)) != NULL) {
+ if (READDIR(dirp->dir, dirp->enc, &STRUCT_DIRENT(entry), dp)) {
return rb_external_str_new_with_enc(dp->d_name, NAMLEN(dp), dirp->enc);
}
else {
@@ -619,25 +620,13 @@ dir_each(VALUE dir)
{
struct dir_data *dirp;
struct dirent *dp;
- IF_HAVE_HFS(int hfs_p);
+ IF_HAVE_READDIR_R(DEFINE_STRUCT_DIRENT entry);
RETURN_ENUMERATOR(dir, 0, 0);
GetDIR(dir, dirp);
rewinddir(dirp->dir);
- IF_HAVE_HFS(hfs_p = is_hfs(dirp->dir));
- 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) &&
- !NIL_P(path = rb_str_normalize_ospath(name, namlen))) {
- path = rb_external_str_with_enc(path, dirp->enc);
- }
- else
-#endif
- path = rb_external_str_new_with_enc(name, namlen, dirp->enc);
- rb_yield(path);
+ while (READDIR(dirp->dir, dirp->enc, &STRUCT_DIRENT(entry), dp)) {
+ rb_yield(rb_external_str_new_with_enc(dp->d_name, NAMLEN(dp), dirp->enc));
if (dirp->dir == NULL) dir_closed();
}
return dir;
@@ -700,10 +689,9 @@ dir_seek(VALUE dir, VALUE pos)
#define dir_seek rb_f_notimplement
#endif
-#ifdef HAVE_SEEKDIR
/*
* call-seq:
- * dir.pos = integer -> integer
+ * dir.pos( integer ) -> integer
*
* Synonym for <code>Dir#seek</code>, but returns the position
* parameter.
@@ -721,9 +709,6 @@ dir_set_pos(VALUE dir, VALUE pos)
dir_seek(dir, pos);
return pos;
}
-#else
-#define dir_set_pos rb_f_notimplement
-#endif
/*
* call-seq:
@@ -741,6 +726,9 @@ dir_rewind(VALUE dir)
{
struct dir_data *dirp;
+ if (rb_safe_level() >= 4 && !OBJ_UNTRUSTED(dir)) {
+ rb_raise(rb_eSecurityError, "Insecure: can't close");
+ }
GetDIR(dir, dirp);
rewinddir(dirp->dir);
return dir;
@@ -888,6 +876,7 @@ rb_dir_getwd(void)
char *path;
VALUE cwd;
+ rb_secure(4);
path = my_getcwd();
cwd = rb_tainted_str_new2(path);
rb_enc_associate(cwd, rb_filesystem_encoding());
@@ -1032,25 +1021,18 @@ sys_warning_1(VALUE mesg)
*/
#define to_be_ignored(e) ((e) == ENOENT || (e) == ENOTDIR)
-#ifdef _WIN32
-#define STAT(p, s) rb_w32_ustati64((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)
{
- int ret = STAT(path, pst);
+ int ret = stat(path, pst);
if (ret < 0 && !to_be_ignored(errno))
sys_warning(path);
return ret;
}
-#if defined HAVE_LSTAT || defined lstat
static int
do_lstat(const char *path, struct stat *pst, int flags)
{
@@ -1060,9 +1042,6 @@ do_lstat(const char *path, struct stat *pst, int flags)
return ret;
}
-#else
-#define do_lstat do_stat
-#endif
static DIR *
do_opendir(const char *path, int flags, rb_encoding *enc)
@@ -1269,8 +1248,9 @@ glob_free_pattern(struct glob_pattern *list)
}
static char *
-join_path(const char *path, long len, int dirsep, const char *name, size_t namlen)
+join_path(const char *path, int dirsep, const char *name, size_t namlen)
{
+ long len = strlen(path);
char *buf = GLOB_ALLOC_N(char, len+namlen+(dirsep?1:0)+1);
if (!buf) return 0;
@@ -1333,7 +1313,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;
@@ -1359,7 +1338,6 @@ glob_helper(
}
}
- pathlen = strlen(path);
if (*path) {
if (match_all && exist == UNKNOWN) {
if (do_lstat(path, &st, flags) == 0) {
@@ -1386,7 +1364,7 @@ glob_helper(
if (status) return status;
}
if (match_dir && isdir == YES) {
- char *tmp = join_path(path, pathlen, dirsep, "", 0);
+ char *tmp = join_path(path, dirsep, "", 0);
if (!tmp) return -1;
status = glob_call_func(func, tmp, arg, enc);
GLOB_FREE(tmp);
@@ -1399,50 +1377,29 @@ glob_helper(
if (magical || recursive) {
struct dirent *dp;
DIR *dirp;
- IF_HAVE_HFS(int hfs_p);
+ IF_HAVE_READDIR_R(DEFINE_STRUCT_DIRENT entry);
dirp = do_opendir(*path ? path : ".", flags, enc);
if (dirp == NULL) return 0;
- IF_HAVE_HFS(hfs_p = is_hfs(dirp));
- while ((dp = READDIR(dirp, enc)) != NULL) {
+ while (READDIR(dirp, enc, &STRUCT_DIRENT(entry), dp)) {
char *buf;
enum answer new_isdir = UNKNOWN;
- const char *name;
- size_t namlen;
- int dotfile = 0;
- IF_HAVE_HFS(VALUE utf8str = Qnil);
if (recursive && dp->d_name[0] == '.') {
- ++dotfile;
- if (!dp->d_name[1]) {
- /* unless DOTMATCH, skip current directories not to recurse infinitely */
- if (!(flags & FNM_DOTMATCH)) continue;
- ++dotfile;
- }
- else if (dp->d_name[1] == '.' && !dp->d_name[2]) {
- /* always skip parent directories not to recurse infinitely */
- continue;
- }
- }
+ /* RECURSIVE never match dot files unless FNM_DOTMATCH is set */
+ if (!(flags & FNM_DOTMATCH)) continue;
- name = dp->d_name;
- namlen = NAMLEN(dp);
-# if HAVE_HFS
- if (hfs_p && has_nonascii(name, namlen)) {
- if (!NIL_P(utf8str = rb_str_normalize_ospath(name, namlen))) {
- RSTRING_GETMEM(utf8str, name, namlen);
- }
+ /* always skip current and parent directories not to recurse infinitely */
+ if (!dp->d_name[1]) continue;
+ if (dp->d_name[1] == '.' && !dp->d_name[2]) continue;
}
-# endif
- buf = join_path(path, pathlen, dirsep, name, namlen);
- IF_HAVE_HFS(if (!NIL_P(utf8str)) rb_str_resize(utf8str, 0));
+
+ buf = join_path(path, dirsep, dp->d_name, NAMLEN(dp));
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 */
+ if (recursive) {
#ifndef _WIN32
if (do_lstat(buf, &st, flags) == 0)
new_isdir = S_ISDIR(st.st_mode) ? YES : S_ISLNK(st.st_mode) ? UNKNOWN : NO;
@@ -1468,7 +1425,7 @@ glob_helper(
p = p->next; /* 0 times recursion */
}
if (p->type == PLAIN || p->type == MAGICAL) {
- if (fnmatch(p->str, enc, name, flags) == 0)
+ if (fnmatch(p->str, enc, dp->d_name, flags) == 0)
*new_end++ = p->next;
}
}
@@ -1518,7 +1475,7 @@ glob_helper(
}
}
- buf = join_path(path, pathlen, dirsep, name, len);
+ buf = join_path(path, dirsep, name, len);
GLOB_FREE(name);
if (!buf) {
GLOB_FREE(new_beg);
@@ -1766,7 +1723,7 @@ rb_push_glob(VALUE str, int flags) /* '\0' is delimiter */
}
static VALUE
-dir_globs(long argc, const VALUE *argv, int flags)
+dir_globs(long argc, VALUE *argv, int flags)
{
VALUE ary = rb_ary_new();
long i;
@@ -1803,56 +1760,49 @@ dir_s_aref(int argc, VALUE *argv, VALUE obj)
/*
* call-seq:
- * Dir.glob( pattern, [flags] ) -> matches
- * Dir.glob( pattern, [flags] ) { |filename| block } -> nil
- *
- * Expands +pattern+, which is an Array of patterns or a pattern String, and
- * returns the results as +matches+ or as arguments given to the block.
- *
- * Note that this pattern is not a regexp, it's closer to a shell glob. See
- * File::fnmatch for the meaning of the +flags+ parameter. Note that case
- * sensitivity depends on your system (so File::FNM_CASEFOLD is ignored), as
- * does the order in which the results are returned.
- *
- * <code>*</code>::
- * Matches any file. Can be restricted by other values in the glob.
- * Equivalent to <code>/ .* /x</code> in regexp.
- *
- * <code>*</code>:: Matches all files
- * <code>c*</code>:: Matches all files beginning with <code>c</code>
- * <code>*c</code>:: Matches all files ending with <code>c</code>
- * <code>\*c\*</code>:: Match all files that have <code>c</code> in them
- * (including at the beginning or end).
- *
- * Note, this will not match Unix-like hidden files (dotfiles). In order
- * to include those in the match results, you must use the
- * File::FNM_DOTMATCH flag or something like <code>"{*,.*}"</code>.
- *
- * <code>**</code>::
- * Matches directories recursively.
- *
- * <code>?</code>::
- * Matches any one character. Equivalent to <code>/.{1}/</code> in regexp.
- *
- * <code>[set]</code>::
- * Matches any one character in +set+. Behaves exactly like character sets
- * in Regexp, including set negation (<code>[^a-z]</code>).
- *
- * <code>{p,q}</code>::
- * Matches either literal <code>p</code> or literal <code>q</code>.
- * Equivalent to pattern alternation in regexp.
- *
- * Matching literals may be more than one character in length. More than
- * two literals may be specified.
- *
- * <code> \\ </code>::
- * Escapes the next metacharacter.
- *
- * Note that this means you cannot use backslash on windows as part of a
- * glob, i.e. <code>Dir["c:\\foo*"]</code> will not work, use
- * <code>Dir["c:/foo*"]</code> instead.
- *
- * Examples:
+ * Dir.glob( pattern, [flags] ) -> array
+ * Dir.glob( pattern, [flags] ) {| filename | block } -> nil
+ *
+ * Returns the filenames found by expanding <i>pattern</i> which is
+ * an +Array+ of the patterns or the pattern +String+, either as an
+ * <i>array</i> or as parameters to the block. Note that this pattern
+ * is not a regexp (it's closer to a shell glob). See
+ * <code>File::fnmatch</code> for the meaning of the <i>flags</i>
+ * parameter. Note that case sensitivity depends on your system (so
+ * <code>File::FNM_CASEFOLD</code> is ignored), as does the order
+ * in which the results are returned.
+ *
+ * <code>*</code>:: Matches any file. Can be restricted by
+ * other values in the glob. <code>*</code>
+ * will match all files; <code>c*</code> will
+ * match all files beginning with
+ * <code>c</code>; <code>*c</code> will match
+ * all files ending with <code>c</code>; and
+ * <code>\*c\*</code> will match all files that
+ * have <code>c</code> in them (including at
+ * the beginning or end). Equivalent to
+ * <code>/ .* /x</code> in regexp. Note, this
+ * will not match Unix-like hidden files (dotfiles).
+ * In order to include those in the match results,
+ * you must use something like <code>"{*,.*}"</code>.
+ * <code>**</code>:: Matches directories recursively.
+ * <code>?</code>:: Matches any one character. Equivalent to
+ * <code>/.{1}/</code> in regexp.
+ * <code>[set]</code>:: Matches any one character in +set+.
+ * Behaves exactly like character sets in
+ * Regexp, including set negation
+ * (<code>[^a-z]</code>).
+ * <code>{p,q}</code>:: Matches either literal <code>p</code> or
+ * literal <code>q</code>. Matching literals
+ * may be more than one character in length.
+ * More than two literals may be specified.
+ * Equivalent to pattern alternation in
+ * regexp.
+ * <code> \\ </code>:: Escapes the next metacharacter.
+ * Note that this means you cannot use backslash
+ * in windows as part of a glob,
+ * i.e. <code>Dir["c:\\foo*"]</code> will not work,
+ * use <code>Dir["c:/foo*"]</code> instead.
*
* Dir["config.?"] #=> ["config.h"]
* Dir.glob("config.?") #=> ["config.h"]
@@ -1893,7 +1843,7 @@ dir_s_glob(int argc, VALUE *argv, VALUE obj)
}
else {
volatile VALUE v = ary;
- ary = dir_globs(RARRAY_LEN(v), RARRAY_CONST_PTR(v), flags);
+ ary = dir_globs(RARRAY_LEN(v), RARRAY_PTR(v), flags);
}
if (rb_block_given_p()) {
@@ -1915,10 +1865,8 @@ dir_open_dir(int argc, VALUE *argv)
/*
* call-seq:
- * Dir.foreach( dirname ) {| filename | block } -> nil
- * Dir.foreach( dirname, encoding: enc ) {| filename | block } -> nil
- * Dir.foreach( dirname ) -> an_enumerator
- * Dir.foreach( dirname, encoding: enc ) -> an_enumerator
+ * Dir.foreach( dirname ) {| filename | block } -> nil
+ * Dir.foreach( dirname ) -> an_enumerator
*
* Calls the block once for each entry in the named directory, passing
* the filename of each entry as a parameter to the block.
@@ -1948,16 +1896,12 @@ dir_foreach(int argc, VALUE *argv, VALUE io)
/*
* call-seq:
- * Dir.entries( dirname ) -> array
- * Dir.entries( dirname, encoding: enc ) -> array
+ * Dir.entries( dirname ) -> array
*
* Returns an array containing all of the filenames in the given
* directory. Will raise a <code>SystemCallError</code> if the named
* directory doesn't exist.
*
- * The optional <i>enc</i> argument specifies the encoding of the directory.
- * If not specified, the filesystem encoding is used.
- *
* Dir.entries("testdir") #=> [".", "..", "config.h", "main.rb"]
*
*/
@@ -1975,24 +1919,7 @@ fnmatch_brace(const char *pattern, VALUE val, void *enc)
{
struct brace_args *arg = (struct brace_args *)val;
VALUE path = arg->value;
- rb_encoding *enc_pattern = enc;
- rb_encoding *enc_path = rb_enc_get(path);
- if (enc_pattern != enc_path) {
- if (!rb_enc_asciicompat(enc_pattern))
- return FNM_NOMATCH;
- if (!rb_enc_asciicompat(enc_path))
- return FNM_NOMATCH;
- if (!rb_enc_str_asciionly_p(path)) {
- int cr = ENC_CODERANGE_7BIT;
- long len = strlen(pattern);
- if (rb_str_coderange_scan_restartable(pattern, pattern + len,
- enc_pattern, &cr) != len)
- return FNM_NOMATCH;
- if (cr != ENC_CODERANGE_7BIT)
- return FNM_NOMATCH;
- }
- }
return (fnmatch(pattern, enc, RSTRING_PTR(path), arg->flags) == 0);
}
@@ -2001,50 +1928,38 @@ fnmatch_brace(const char *pattern, VALUE val, void *enc)
* File.fnmatch( pattern, path, [flags] ) -> (true or false)
* File.fnmatch?( pattern, path, [flags] ) -> (true or false)
*
- * Returns true if +path+ matches against +pattern+. The pattern is not a
- * regular expression; instead it follows rules similar to shell filename
- * globbing. It may contain the following metacharacters:
- *
- * <code>*</code>::
- * Matches any file. Can be restricted by other values in the glob.
- * Equivalent to <code>/ .* /x</code> in regexp.
- *
- * <code>*</code>:: Matches all files regular files
- * <code>c*</code>:: Matches all files beginning with <code>c</code>
- * <code>*c</code>:: Matches all files ending with <code>c</code>
- * <code>\*c*</code>:: Matches all files that have <code>c</code> in them
- * (including at the beginning or end).
- *
- * To match hidden files (that start with a <code>.</code> set the
- * File::FNM_DOTMATCH flag.
- *
- * <code>**</code>::
- * Matches directories recursively or files expansively.
- *
- * <code>?</code>::
- * Matches any one character. Equivalent to <code>/.{1}/</code> in regexp.
- *
- * <code>[set]</code>::
- * Matches any one character in +set+. Behaves exactly like character sets
- * in Regexp, including set negation (<code>[^a-z]</code>).
- *
- * <code> \ </code>::
- * Escapes the next metacharacter.
- *
- * <code>{a,b}</code>::
- * Matches pattern a and pattern b if File::FNM_EXTGLOB flag is enabled.
- * Behaves like a Regexp union (<code>(?:a|b)</code>).
- *
- * +flags+ is a bitwise OR of the <code>FNM_XXX</code> constants. The same
- * glob pattern and flags are used by Dir::glob.
- *
- * Examples:
+ * Returns true if <i>path</i> matches against <i>pattern</i> The
+ * pattern is not a regular expression; instead it follows rules
+ * similar to shell filename globbing. It may contain the following
+ * metacharacters:
+ *
+ * <code>*</code>:: Matches any file. Can be restricted by
+ * other values in the glob. <code>*</code>
+ * will match all files; <code>c*</code> will
+ * match all files beginning with
+ * <code>c</code>; <code>*c</code> will match
+ * all files ending with <code>c</code>; and
+ * <code>\*c*</code> will match all files that
+ * have <code>c</code> in them (including at
+ * the beginning or end). Equivalent to
+ * <code>/ .* /x</code> in regexp.
+ * <code>**</code>:: Matches directories recursively or files
+ * expansively.
+ * <code>?</code>:: Matches any one character. Equivalent to
+ * <code>/.{1}/</code> in regexp.
+ * <code>[set]</code>:: Matches any one character in +set+.
+ * Behaves exactly like character sets in
+ * Regexp, including set negation
+ * (<code>[^a-z]</code>).
+ * <code> \ </code>:: Escapes the next metacharacter.
+ *
+ * <i>flags</i> is a bitwise OR of the <code>FNM_xxx</code>
+ * parameters. The same glob pattern and flags are used by
+ * <code>Dir::glob</code>.
*
* File.fnmatch('cat', 'cat') #=> true # match entire string
* File.fnmatch('cat', 'category') #=> false # only match partial string
- *
- * File.fnmatch('c{at,ub}s', 'cats') #=> false # { } isn't supported by default
- * File.fnmatch('c{at,ub}s', 'cats', File::FNM_EXTGLOB) #=> true # { } is supported on FNM_EXTGLOB
+ * File.fnmatch('c{at,ub}s', 'cats') #=> false # { } isn't supported
*
* File.fnmatch('c?t', 'cat') #=> true # '?' match only 1 character
* File.fnmatch('c??t', 'cat') #=> false # ditto
@@ -2062,7 +1977,7 @@ fnmatch_brace(const char *pattern, VALUE val, void *enc)
*
* File.fnmatch('\?', '?') #=> true # escaped wildcard becomes ordinary
* File.fnmatch('\a', 'a') #=> true # escaped ordinary remains ordinary
- * File.fnmatch('\a', '\a', File::FNM_NOESCAPE) #=> true # FNM_NOESCAPE makes '\' ordinary
+ * File.fnmatch('\a', '\a', File::FNM_NOESCAPE) #=> true # FNM_NOESACPE makes '\' ordinary
* File.fnmatch('[\?]', '?') #=> true # can escape inside bracket expression
*
* File.fnmatch('*', '.profile') #=> false # wildcard doesn't match leading
@@ -2114,9 +2029,8 @@ file_s_fnmatch(int argc, VALUE *argv, VALUE obj)
return Qtrue;
}
else {
- rb_encoding *enc = rb_enc_compatible(pattern, path);
- if (!enc) return Qfalse;
- if (fnmatch(RSTRING_PTR(pattern), enc, RSTRING_PTR(path), flags) == 0)
+ if (fnmatch(RSTRING_PTR(pattern), rb_enc_get(pattern), RSTRING_PTR(path),
+ flags) == 0)
return Qtrue;
}
RB_GC_GUARD(pattern);
@@ -2138,18 +2052,12 @@ dir_s_home(int argc, VALUE *argv, VALUE obj)
VALUE user;
const char *u = 0;
- rb_check_arity(argc, 0, 1);
- user = (argc > 0) ? argv[0] : Qnil;
+ rb_scan_args(argc, argv, "01", &user);
if (!NIL_P(user)) {
SafeStringValue(user);
- rb_must_asciicompat(user);
u = StringValueCStr(user);
- if (*u) {
- return rb_home_dir_of(user, rb_str_new(0, 0));
- }
}
- return rb_default_home_dir(rb_str_new(0, 0));
-
+ return rb_home_dir(u, rb_str_new(0, 0));
}
#if 0
@@ -2168,13 +2076,6 @@ rb_file_directory_p()
}
#endif
-static VALUE
-rb_dir_exists_p(VALUE obj, VALUE fname)
-{
- rb_warning("Dir.exists? is a deprecated name, use Dir.exist? instead");
- return rb_file_directory_p(obj, fname);
-}
-
/*
* Objects of class <code>Dir</code> are directory streams representing
* directories in the underlying file system. They provide a variety of
@@ -2224,42 +2125,15 @@ Init_Dir(void)
rb_define_singleton_method(rb_cDir,"glob", dir_s_glob, -1);
rb_define_singleton_method(rb_cDir,"[]", dir_s_aref, -1);
rb_define_singleton_method(rb_cDir,"exist?", rb_file_directory_p, 1);
- rb_define_singleton_method(rb_cDir,"exists?", rb_dir_exists_p, 1);
+ rb_define_singleton_method(rb_cDir,"exists?", rb_file_directory_p, 1);
rb_define_singleton_method(rb_cFile,"fnmatch", file_s_fnmatch, -1);
rb_define_singleton_method(rb_cFile,"fnmatch?", file_s_fnmatch, -1);
- /* Document-const: File::Constants::FNM_NOESCAPE
- *
- * Disables escapes in File.fnmatch and Dir.glob patterns
- */
rb_file_const("FNM_NOESCAPE", INT2FIX(FNM_NOESCAPE));
-
- /* Document-const: File::Constants::FNM_PATHNAME
- *
- * Wildcards in File.fnmatch and Dir.glob patterns do not match directory
- * separators
- */
rb_file_const("FNM_PATHNAME", INT2FIX(FNM_PATHNAME));
-
- /* Document-const: File::Constants::FNM_DOTMATCH
- *
- * The '*' wildcard matches filenames starting with "." in File.fnmatch
- * and Dir.glob patterns
- */
rb_file_const("FNM_DOTMATCH", INT2FIX(FNM_DOTMATCH));
-
- /* Document-const: File::Constants::FNM_CASEFOLD
- *
- * Makes File.fnmatch patterns case insensitive (but not Dir.glob
- * patterns).
- */
rb_file_const("FNM_CASEFOLD", INT2FIX(FNM_CASEFOLD));
-
- /* Document-const: File::Constants::FNM_EXTGLOB
- *
- * Allows file globbing through "{a,b}" in File.fnmatch patterns.
- */
rb_file_const("FNM_EXTGLOB", INT2FIX(FNM_EXTGLOB));
rb_file_const("FNM_SYSCASE", INT2FIX(FNM_SYSCASE));
}
diff --git a/dln.h b/dln.h
index d98b2607e2..abbd6d85a3 100644
--- a/dln.h
+++ b/dln.h
@@ -28,17 +28,14 @@
# define _(args) ()
#endif
-RUBY_SYMBOL_EXPORT_BEGIN
-
-#ifndef DLN_FIND_EXTRA_ARG
-#define DLN_FIND_EXTRA_ARG
-#endif
-#ifndef DLN_FIND_EXTRA_ARG_DECL
-#define DLN_FIND_EXTRA_ARG_DECL
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility push(default)
#endif
-char *dln_find_exe_r(const char*,const char*,char*,size_t DLN_FIND_EXTRA_ARG_DECL);
-char *dln_find_file_r(const char*,const char*,char*,size_t DLN_FIND_EXTRA_ARG_DECL);
+DEPRECATED(char *dln_find_exe(const char*,const char*));
+DEPRECATED(char *dln_find_file(const char*,const char*));
+char *dln_find_exe_r(const char*,const char*,char*,size_t);
+char *dln_find_file_r(const char*,const char*,char*,size_t);
#ifdef USE_DLN_A_OUT
extern char *dln_argv0;
@@ -46,6 +43,8 @@ extern char *dln_argv0;
void *dln_load(const char*);
-RUBY_SYMBOL_EXPORT_END
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility pop
+#endif
#endif
diff --git a/dln_find.c b/dln_find.c
index f41ceb051d..d9166fac39 100644
--- a/dln_find.c
+++ b/dln_find.c
@@ -11,11 +11,19 @@
#ifdef RUBY_EXPORT
#include "ruby/ruby.h"
+#define dln_notimplement rb_notimplement
+#define dln_memerror rb_memerror
+#define dln_exit rb_exit
+#define dln_loaderror rb_loaderror
#define dln_warning rb_warning
#define dln_warning_arg
#else
+#define dln_notimplement --->>> dln not implemented <<<---
+#define dln_memerror abort
+#define dln_exit exit
#define dln_warning fprintf
#define dln_warning_arg stderr,
+static void dln_loaderror(const char *format, ...);
#endif
#include "dln.h"
@@ -59,16 +67,14 @@ char *dln_argv0;
# include <unistd.h>
#endif
-#if !defined(_WIN32) && !HAVE_DECL_GETENV
+#ifndef _WIN32
char *getenv();
#endif
-static char *dln_find_1(const char *fname, const char *path, char *buf, size_t size, int exe_flag
- DLN_FIND_EXTRA_ARG_DECL);
+static char *dln_find_1(const char *fname, const char *path, char *buf, size_t size, int exe_flag);
char *
-dln_find_exe_r(const char *fname, const char *path, char *buf, size_t size
- DLN_FIND_EXTRA_ARG_DECL)
+dln_find_exe_r(const char *fname, const char *path, char *buf, size_t size)
{
char *envpath = 0;
@@ -84,23 +90,35 @@ dln_find_exe_r(const char *fname, const char *path, char *buf, size_t size
path = "/usr/local/bin:/usr/ucb:/usr/bin:/bin:.";
#endif
}
- buf = dln_find_1(fname, path, buf, size, 1 DLN_FIND_EXTRA_ARG);
+ buf = dln_find_1(fname, path, buf, size, 1);
if (envpath) free(envpath);
return buf;
}
char *
-dln_find_file_r(const char *fname, const char *path, char *buf, size_t size
- DLN_FIND_EXTRA_ARG_DECL)
+dln_find_file_r(const char *fname, const char *path, char *buf, size_t size)
{
if (!path) path = ".";
- return dln_find_1(fname, path, buf, size, 0 DLN_FIND_EXTRA_ARG);
+ return dln_find_1(fname, path, buf, size, 0);
+}
+
+static char fbuf[MAXPATHLEN];
+
+char *
+dln_find_exe(const char *fname, const char *path)
+{
+ return dln_find_exe_r(fname, path, fbuf, sizeof(fbuf));
+}
+
+char *
+dln_find_file(const char *fname, const char *path)
+{
+ return dln_find_file_r(fname, path, fbuf, sizeof(fbuf));
}
static char *
dln_find_1(const char *fname, const char *path, char *fbuf, size_t size,
- int exe_flag /* non 0 if looking for executable. */
- DLN_FIND_EXTRA_ARG_DECL)
+ int exe_flag /* non 0 if looking for executable. */)
{
register const char *dp;
register const char *ep;
diff --git a/dmyencoding.c b/dmyencoding.c
new file mode 100644
index 0000000000..1bd1106e69
--- /dev/null
+++ b/dmyencoding.c
@@ -0,0 +1,2 @@
+#define NO_LOCALE_CHARMAP 1
+#include "encoding.c"
diff --git a/dmyversion.c b/dmyversion.c
new file mode 100644
index 0000000000..279c6ea95a
--- /dev/null
+++ b/dmyversion.c
@@ -0,0 +1,2 @@
+#define NO_INITIAL_LOAD_PATH 1
+#include "version.c"
diff --git a/doc/ChangeLog-1.8.0 b/doc/ChangeLog-1.8.0
index 07d7c6b165..e16c7f4f20 100644
--- a/doc/ChangeLog-1.8.0
+++ b/doc/ChangeLog-1.8.0
@@ -42,7 +42,7 @@ Sun Aug 3 23:56:50 2003 Nobuyoshi Nakada <nobu@ruby-lang.org>
Sun Aug 3 22:07:47 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
- * ext/tk/lib/tkentry.rb: support 'validatecommand' option of
+ * ext/tk/lib/tkentry.rb: support 'validatecommand' option of
TkEntry/TkSpinbox widget
* ext/tk/sample/{demos-en,demos-jp}/spin.rb: add
@@ -60,7 +60,7 @@ Sun Aug 3 18:03:44 2003 WATANABE Hirofumi <eban@ruby-lang.org>
Sun Aug 3 08:53:06 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
- * ext/tk/sample/{demos-en,demos-jp}/image3.rb: add
+ * ext/tk/sample/{demos-en,demos-jp}/image3.rb: add
* ext/tk/lib/tkcanvas.rb: bug fix on Tk object ID management
@@ -84,7 +84,7 @@ Sat Aug 2 23:51:52 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
Sat Aug 2 09:58:13 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
- * ext/tk/lib/tk.rb: bug fix --- TkGrid failed to treat
+ * ext/tk/lib/tk.rb: bug fix --- TkGrid failed to treat
RELATIVE PLACEMENT
* ext/tk/sample/demos-en/, demos-jp/: add or modify some
@@ -122,7 +122,7 @@ Sat Aug 2 14:02:39 2003 Nobuyoshi Nakada <nobu@ruby-lang.org>
Sat Aug 2 09:58:13 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
- * ext/tk/lib/tk.rb: bug fix --- forgot to entry a widget class
+ * ext/tk/lib/tk.rb: bug fix --- forgot to entry a widget class
name of 'labelframe' widget
* ext/tk/sample/{demos-en,demos-jp}/{labelframe.rb,paned1.rb,
@@ -238,7 +238,7 @@ Fri Aug 1 09:54:38 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
Fri Aug 1 04:58:55 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
- * ext/tk/lib/tk.rb: bug fix --- forget to eval given block to
+ * ext/tk/lib/tk.rb: bug fix --- forget to eval given block to
TkRoot.new method
* ext/tk/sample/tkoptdb-safeTk.rb: new sample script
@@ -255,13 +255,13 @@ Thu Jul 31 23:44:00 2003 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
Thu Jul 31 23:04:45 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
- * ext/tk/sample/resource.en, ext/tk/sample/resource.jp:
+ * ext/tk/sample/resource.en, ext/tk/sample/resource.jp:
wrong resource file format
- * ext/tk/lib/tk.rb: add Tk::Encoding.{encoding_convertfrom,
+ * ext/tk/lib/tk.rb: add Tk::Encoding.{encoding_convertfrom,
encoding_convertto}
- * ext/tk/lib/tk.rb: add TkOptionDB.read_with_encoding to read
+ * ext/tk/lib/tk.rb: add TkOptionDB.read_with_encoding to read
non-utf8 resource file
Thu Jul 31 23:02:47 2003 NAKAMURA Usaku <usa@ruby-lang.org>
@@ -274,15 +274,15 @@ Thu Jul 31 20:52:40 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tk/lib/tk.rb: (IMPORTANT BUG FIX) scan of event keywords
doesn't work on recent versions of Tck/Tk
- * ext/tk/lib/tk.rb: initialize error of instance variable on
+ * ext/tk/lib/tk.rb: initialize error of instance variable on
TkComposite
- * ext/tk/lib/multi-tk.rb: initialize error on encoding-system on
+ * ext/tk/lib/multi-tk.rb: initialize error on encoding-system on
MultiTkIp
* ext/tk/lib/tk.rb: trouble on destroying widgets
- * ext/tk/sample/demos-en/, demos-jp/: add JP and EN version of
+ * ext/tk/sample/demos-en/, demos-jp/: add JP and EN version of
Ruby/Tk widget demos
Thu Jul 31 15:25:12 2003 NAKAMURA Usaku <usa@ruby-lang.org>
@@ -311,13 +311,13 @@ Thu Jul 31 08:18:00 2003 Nathaniel Talbott <ntalbott@ruby-lang.org>
Thu Jul 31 07:59:18 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
- * ext/tk/lib/tk.rb: wrap the command-proc of TkScale --- pass
+ * ext/tk/lib/tk.rb: wrap the command-proc of TkScale --- pass
the numeric object to the proc
- * ext/tk/lib/tk.rb: better support for widgets created on
+ * ext/tk/lib/tk.rb: better support for widgets created on
Tk interpreter (without Ruby)
- * ext/tk/lib/multi-tk.rb: a little more stable on Multiple Tk
+ * ext/tk/lib/multi-tk.rb: a little more stable on Multiple Tk
interpreters running
Thu Jul 31 00:17:19 2003 Shugo Maeda <shugo@ruby-lang.org>
@@ -411,17 +411,17 @@ Wed Jul 30 07:23:14 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tk/lib/tkentry.rb: fix lack of methods for TkEntry
- * ext/tk/lib/multi-tk.rb, ext/tk/lib/tk.rb,
- ext/tk/lib/tkdialog.rb, ext/tk/lib/tkentry.rb,
+ * ext/tk/lib/multi-tk.rb, ext/tk/lib/tk.rb,
+ ext/tk/lib/tkdialog.rb, ext/tk/lib/tkentry.rb,
ext/tk/sample/safe-tk.rb, ext/tk/sample/tktimer2.rb: bug fix
- * ext/tk/lib/multi-tk.rb: MultiTkIp.new_* accept a block to
+ * ext/tk/lib/multi-tk.rb: MultiTkIp.new_* accept a block to
eval under the new interpreter
Wed Jul 30 04:36:30 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
- * ext/tcltklib/tcltklib.c,
- ext/tk/lib/tk.rb, ext/tk/lib/tkafter.rb: additional check of
+ * ext/tcltklib/tcltklib.c,
+ ext/tk/lib/tk.rb, ext/tk/lib/tkafter.rb: additional check of
Tk interpreters' status for a little more safety
Wed Jul 30 02:37:12 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
@@ -514,14 +514,14 @@ Mon Jul 28 22:57:52 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
Tue Jul 29 16:20:36 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
- * ext/tcltklib/tcltklib.c: bug fix and
+ * ext/tcltklib/tcltklib.c: bug fix and
change mainloop_abort_on_no_widget_cmd => mainloop_abort_on_exception
( to avoid thread timing trouble on accessing destroyed widgets )
- * ext/tk/lib/multi-tk.rb: change default mode of
+ * ext/tk/lib/multi-tk.rb: change default mode of
mainloop_abort_on_exception on multi-tk.rb
- * ext/tk/lib/multi-tk.rb: fix a bug of the procedure for
+ * ext/tk/lib/multi-tk.rb: fix a bug of the procedure for
'Delete' button on the safe-Tk frmae
Tue Jul 29 12:22:28 2003 why the lucky stiff <ruby-cvs@whytheluckystiff.net>
@@ -541,8 +541,8 @@ Tue Jul 29 12:15:37 2003 NAKAMURA Usaku <usa@ruby-lang.org>
Tue Jul 29 08:05:30 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
- * ext/tk/lib/tk.rb, ext/tk/lib/tkdialog.rb, ext/tk/lib/tktext.rb,
- ext/tk/sample/tkbiff.rb, ext/tk/sample/tkdialog.rb,
+ * ext/tk/lib/tk.rb, ext/tk/lib/tkdialog.rb, ext/tk/lib/tktext.rb,
+ ext/tk/sample/tkbiff.rb, ext/tk/sample/tkdialog.rb,
ext/tk/sample/tkform.rb: bug fix ( tested with Ruby/Tk widget demo )
Tue Jul 29 04:22:08 2003 why the lucky stiff <ruby-cvs@whytheluckystiff.net>
@@ -571,7 +571,7 @@ Tue Jul 29 01:24:32 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tk/lib/multi-tk.rb: bug fix and pack options are pssed
to the safeTk container
- * ext/tk/sample/safe-tk.rb: add example for pack options of
+ * ext/tk/sample/safe-tk.rb: add example for pack options of
safeTk container
Mon Jul 28 23:23:08 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
@@ -643,7 +643,7 @@ Sun Jul 27 19:35:06 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tcltklib/tcltklib.c: add some methods to support
multiple interpreters (low level)
- * ext/tk/lib/multi-tk.rb: new library to support multiple Tk
+ * ext/tk/lib/multi-tk.rb: new library to support multiple Tk
interpreters (high level)
* ext/tcltklib/demo/safeTk.rb: new sample of safeTk interpreter
@@ -732,12 +732,12 @@ Fri Jul 26 00:04:25 2003 NAKAMURA, Hiroshi <nakahiro@sarion.co.jp>
Fri Jul 25 16:43:03 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
- * ext/tcltklib/tcltklib.c: add TclTkIp#create_slave,
+ * ext/tcltklib/tcltklib.c: add TclTkIp#create_slave,
TclTkIp#_make_safe and TclTkIp#safe?
* ext/tcltklib/MANUAL.euc: modify descriptions
- * ext/tk/lib/tk.rb: bug fix [ruby-talk:76980] and modify to
+ * ext/tk/lib/tk.rb: bug fix [ruby-talk:76980] and modify to
support multi Tk IPs
* ext/tk/lib/tkafter.rb: modify to support multi Tk IPs
@@ -747,10 +747,10 @@ Fri Jul 25 15:47:39 2003 GOTOU Yuuzou <gotoyuzo@notwork.org>
* ext/openssl/extconf.rb: add check for BN_rand_range() and
BN_pseudo_rand_range().
- * ext/openssl/ossl_bn.c (ossl_bn_s_rand_range): should raise
+ * ext/openssl/ossl_bn.c (ossl_bn_s_rand_range): should raise
NotImplementedError if BN_rand_range() wan not defined.
- * ext/openssl/ossl_bn.c (ossl_bn_s_pseudo_rand_range): should raise
+ * ext/openssl/ossl_bn.c (ossl_bn_s_pseudo_rand_range): should raise
NotImplementedError if BN_pseudo_rand_range() wan not defined.
* ext/openssl/ossl_pkcs7.c (ossl_pkcs7_s_encrypt): avoid compiler
@@ -1110,7 +1110,7 @@ Thu Jul 17 13:42:53 2003 WATANABE Hirofumi <eban@ruby-lang.org>
Thu Jul 17 06:40:28 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
- * ext/tk/lib/tk.rb: recover and fix typo : Tk.chooseDirectory
+ * ext/tk/lib/tk.rb: recover and fix typo : Tk.chooseDirectory
(Tk8.4 feature)
Wed Jul 16 16:23:58 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
@@ -1139,7 +1139,7 @@ Tue Jul 15 14:38:21 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
Tue Jul 15 03:30:41 2003 why the lucky stiff <ruby-cvs@whytheluckystiff.net>
- * ext/syck/rubyext.c (syck_mark_emitter): forgot to rb_gc_mark the
+ * ext/syck/rubyext.c (syck_mark_emitter): forgot to rb_gc_mark the
outgoing IO object.
Sun Jul 13 14:55:36 2003 Koji Arai <jca02266@nifty.ne.jp>
@@ -1196,7 +1196,7 @@ Fri Jul 11 16:09:09 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
Fri Jul 11 07:17:47 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
- * ext/tk/lib/tk.rb: not create a Tcl/Tk interpreter if already
+ * ext/tk/lib/tk.rb: not create a Tcl/Tk interpreter if already
defined TkCore::INTERP
* ext/tk/lib/tk.rb: bugfix on TkWindow#configure
@@ -1306,7 +1306,7 @@ Thu Jul 3 14:22:46 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
Thu Jul 3 12:13:05 2003 WATANABE Hirofumi <eban@ruby-lang.org>
- * lib/mkmf.rb (VPATH): convert from Windows form to Unix form on
+ * lib/mkmf.rb (VPATH): convert from Windows form to Unix form on
MinGW. This fixes the build with GNU make 3.80-1 for Cygwin.
Wed Jul 2 23:27:34 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
@@ -1459,11 +1459,11 @@ Thu Jun 26 21:34:49 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
Wed Jun 25 14:40:33 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
- * ext/tk/lib/tk.rb: add and modify methods ---
- TkWidget.database_class, TkWidget.database_classname,
- TkWidget#database_class, TkWidget#database_classname
+ * ext/tk/lib/tk.rb: add and modify methods ---
+ TkWidget.database_class, TkWidget.database_classname,
+ TkWidget#database_class, TkWidget#database_classname
- * ext/tk/lib/tk.rb: instances of a subclass of TkToplevel or
+ * ext/tk/lib/tk.rb: instances of a subclass of TkToplevel or
TkFrame are created with ":class=>subclass" option as default.
* ext/tk/sample/tkoptdb.rb: add a new part
@@ -1478,7 +1478,7 @@ Wed Jun 25 05:49:10 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tk/lib/tk.rb: add widget destroy hook binding to TkBindTag::ALL
- * ext/tk/lib/tkcanvas.rb: Although requiring manual control of GC,
+ * ext/tk/lib/tkcanvas.rb: Although requiring manual control of GC,
memory eating problem of TkCanvas Items is fixed.
* ext/tk/lib/tktext.rb: add some methods and bug fix
@@ -1493,10 +1493,10 @@ Tue Jun 24 16:46:07 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tk/lib/tk.rb: bug fix on TkToplevel, TkFrame,
TkPanedwindow, TkOptionDB
- * ext/tk/lib/tk.rb: TkOptionDB --- make it more secure to use procs
+ * ext/tk/lib/tk.rb: TkOptionDB --- make it more secure to use procs
defined on resourceDB
- * ext/tk/sample/tkoptdb.rb, resource.ja, resource.en:
+ * ext/tk/sample/tkoptdb.rb, resource.ja, resource.en:
sample script how to use TkOptionDB.
Tue Jun 24 14:22:41 2003 why the lucky stiff <ruby-cvs@whytheluckystiff.net>
@@ -1610,14 +1610,14 @@ Sun Jun 22 23:42:20 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
Sun Jun 22 16:17:02 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
- * ext/tk/lib/tk.rb: TkRoot.new and TkToplevel.new accept Wm
+ * ext/tk/lib/tk.rb: TkRoot.new and TkToplevel.new accept Wm
commands as elements
* ext/tk/lib/tk.rb: TkMenu --- add some methods
* ext/tk/lib/tk.rb: TkOptionMenubutton --- bug fix
- * ext/tk/sample/tkmenubutton.rb: sample of TkMenubutton and
+ * ext/tk/sample/tkmenubutton.rb: sample of TkMenubutton and
TkOptionMenubutton
Sat Jun 21 23:15:08 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
@@ -1625,7 +1625,7 @@ Sat Jun 21 23:15:08 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
* eval.c (proc_invoke): should not propagate distination tag if
tag is already handled in this level. (ruby-bugs-ja PR#501)
- * object.c (str_to_id): check for empty string before intern.
+ * object.c (str_to_id): check for empty string before intern.
[ruby-talk:74006]
Sat Jun 21 13:56:09 2003 Takaaki Uematsu <uema2x@jcom.home.ne.jp>
@@ -1636,10 +1636,10 @@ Sat Jun 21 13:56:09 2003 Takaaki Uematsu <uema2x@jcom.home.ne.jp>
Sat Jun 21 12:55:17 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
- * ext/tk/lib/tk.rb: TkRoot.new and TkToplevel.new accept Wm commands
- as elements of a hash argument.
+ * ext/tk/lib/tk.rb: TkRoot.new and TkToplevel.new accept Wm commands
+ as elements of a hash argument.
- * ext/tk/sample/tktimer2.rb: add comments about the usage of a
+ * ext/tk/sample/tktimer2.rb: add comments about the usage of a
TkTimer object.
Sat Jun 21 08:47:22 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
@@ -1647,10 +1647,10 @@ Sat Jun 21 08:47:22 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tk/lib/tk*.rb: remove direct-accesses to TkComm::INTERP and
TkComm::INITIALIZE_TARGETS
- * ext/tk/lib/tk*.rb: use TkINTERP_SETUP_SCRIPTS constant for setting
+ * ext/tk/lib/tk*.rb: use TkINTERP_SETUP_SCRIPTS constant for setting
up the interpreter
- * ext/tcltklib/tcltklib.c: support to create a safe interpreter
+ * ext/tcltklib/tcltklib.c: support to create a safe interpreter
with safe-Tk
Fri Jun 20 23:28:27 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
@@ -1660,7 +1660,7 @@ Fri Jun 20 23:28:27 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
Fri Jun 20 15:04:28 2003 NAKAMURA Usaku <usa@ruby-lang.org>
- * defines.h (PATH_ENV): name of PATH environment. [new].
+ * defines.h (PATH_ENV): name of PATH environment. [new].
* defines.h (ENV_IGNORECASE): define for case insensitive platforms
to access environment variables.
@@ -1678,7 +1678,7 @@ Fri Jun 20 14:52:46 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
Fri Jun 20 03:09:21 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
- * parse.y (new_yield): distinguish "yield 1,2" and "yield [1,2]".
+ * parse.y (new_yield): distinguish "yield 1,2" and "yield [1,2]".
[ruby-dev:20360]
* eval.c (rb_eval): support new_yield() change.
@@ -1688,7 +1688,7 @@ Fri Jun 20 03:09:21 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
[ruby-list:36935]
* parse.y (no_blockarg): separate no block argument check and
- ret_args argument processing.
+ ret_args argument processing.
Fri Jun 20 00:45:19 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
@@ -1696,9 +1696,9 @@ Fri Jun 20 00:45:19 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
Thu Jun 19 22:51:41 2003 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
- * lib/drb.rb, lib/drb/drb.rb, lib/drb/eq.rb,
- lib/drb/extserv.rb, lib/drb/extservm.rb, lib/drb/gw.rb,
- lib/drb/invokemethod.rb, lib/drb/observer.rb,
+ * lib/drb.rb, lib/drb/drb.rb, lib/drb/eq.rb,
+ lib/drb/extserv.rb, lib/drb/extservm.rb, lib/drb/gw.rb,
+ lib/drb/invokemethod.rb, lib/drb/observer.rb,
lib/drb/timeridconv.rb, lib/drb/unix.rb: import drb-2.0.4b3
Thu Jun 19 16:14:43 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
@@ -1710,17 +1710,17 @@ Thu Jun 19 16:14:43 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tcltklib/tcltklib.c: add TclTkLib::EventFlag::NONE ( == 0 )
- * ext/tcltklib/tcltklib.c: add set_no_event_wait() and
+ * ext/tcltklib/tcltklib.c: add set_no_event_wait() and
get_no_event_wait()
* ext/tcltklib/MANUAL.euc: modify
* ext/tcltklib/README.euc: ditto
- * ext/tk/lib/tk.rb: change default value of TkCore.do_one_event
+ * ext/tk/lib/tk.rb: change default value of TkCore.do_one_event
argument
- * ext/tk/lib/tk.rb: add TkCore.set_no_event_wait(wait) and
+ * ext/tk/lib/tk.rb: add TkCore.set_no_event_wait(wait) and
TkCore.get_no_event_wait
* ext/tk/lib/tk.rb: add Tk.exit ( == destroy root widget )
@@ -1730,7 +1730,7 @@ Thu Jun 19 16:14:43 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tk/lib/tkafter.rb: set_callback returns self
- * ext/tk/lib/tkafter.rb: continue() raises an exception, if already
+ * ext/tk/lib/tkafter.rb: continue() raises an exception, if already
running or no procedure.
* ext/tk/lib/tkafter.rb: skip() raises an exception, if not running.
@@ -1768,15 +1768,15 @@ Wed Jun 18 19:46:21 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tk/lib/tk.rb: rename 'no_create' option to 'without_creating'
- * ext/tk/lib/tk.rb: add TkWindow#pack_in, TkWindow#grid_in,
+ * ext/tk/lib/tk.rb: add TkWindow#pack_in, TkWindow#grid_in,
TkWindow#place_in
* ext/tk/lib/tk.rb: add TkWindow#bind_class and TkWindow#database_class
- * ext/tk/lib/tk.rb: add TkBindTag.new_by_name and TkDatabaseClass
+ * ext/tk/lib/tk.rb: add TkBindTag.new_by_name and TkDatabaseClass
for binding to database class
- * ext/tk/lib/tk.rb: check varname whether already exsist or not.
+ * ext/tk/lib/tk.rb: check varname whether already exsist or not.
(TkVarAccess.new)
* ext/tk/lib/tk.rb: TkTextWin#bbox returns an array of four numbers
@@ -1788,21 +1788,21 @@ Wed Jun 18 19:46:21 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tk/lib/tk.rb: TkBindTag.new accepts a block
- * ext/tk/lib/tk.rb: If given taglist, TkWindow#bindtags(taglist)
+ * ext/tk/lib/tk.rb: If given taglist, TkWindow#bindtags(taglist)
returns taglist
* ext/tk/lib/tk.rb: add TkWindow#bindtags=(taglist)
- * ext/tk/lib/tk.rb: Tk.focue and Tk.focus_lastfor return nil
+ * ext/tk/lib/tk.rb: Tk.focue and Tk.focus_lastfor return nil
if there is no target widget.
- * ext/tk/lib/tk.rb: Tk::Wm.client returns the argument string
+ * ext/tk/lib/tk.rb: Tk::Wm.client returns the argument string
when setting name
- * ext/tk/lib/tk.rb: TkGrid.columnconfiginfo and rowconfiginfo
+ * ext/tk/lib/tk.rb: TkGrid.columnconfiginfo and rowconfiginfo
given a slot return a number.
- * ext/tk/lib/tk.rb: TkWindow.grid_columnconfiginfo and
+ * ext/tk/lib/tk.rb: TkWindow.grid_columnconfiginfo and
grid_rowconfiginfo --- ditto
* ext/tk/lib/tk.rb: rename and define alias :: TkOption ==> TkOptionDB
@@ -1813,10 +1813,10 @@ Wed Jun 18 19:46:21 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tk/lib/tk.rb: some TkComm methods change to module functions
- * ext/tk/lib/tk.rb: add support for -displayof option to some
+ * ext/tk/lib/tk.rb: add support for -displayof option to some
TkWinfo methods
- * ext/tk/lib/tk.rb: bind, bind_append and bind_remove ---
+ * ext/tk/lib/tk.rb: bind, bind_append and bind_remove ---
returns the target of event-binding
* ext/tk/lib/tk.rb: add Tk8.4 features
@@ -1837,7 +1837,7 @@ Wed Jun 18 19:46:21 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tk/lib/tkentry.rb: TkEntry#bbox returns an array of four numbers
- * ext/tk/lib/tkentry.rb: scan validatecommand arguments and
+ * ext/tk/lib/tkentry.rb: scan validatecommand arguments and
convert to proper type
* ext/tk/lib/tkbgerror.rb: support to define a error handler by user
@@ -1932,7 +1932,7 @@ Fri Jun 13 09:24:39 2003 Shugo Maeda <shugo@ruby-lang.org>
Thu Jun 12 22:13:13 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tk/lib/tk.rb : add 'no_create' option to widget
- initialize method.
+ initialize method.
* ext/tk/MANIFEST : forgot to commit when added tkmacpkg.rb
and tkwinpkg.rb
@@ -1947,7 +1947,7 @@ Thu Jun 12 21:14:11 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tk/lib/tkmacpkg.rb : Mac resource (not new but not
included until now)
- * ext/tk/lib/tkwinpkg.rb : Win DDE and registry (not new but not
+ * ext/tk/lib/tkwinpkg.rb : Win DDE and registry (not new but not
included until now)
Tue Jun 10 14:26:30 2003 why the lucky stiff <ruby-cvs@whytheluckystiff.net>
@@ -8346,7 +8346,7 @@ Tue Jun 4 07:03:33 2002 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tk/lib/tkfont.rb: Fix bugs on TkFont.init_widget_font for Tk8.x.
- * ext/tk/lib/tkafter.rb: Add self to 1st argument of interval-
+ * ext/tk/lib/tkafter.rb: Add self to 1st argument of interval-
and loop-proc
TkAfter#current_interval returns an interval (sleep) time value
TkAfter#current_args returns an array of arguments
@@ -8354,7 +8354,7 @@ Tue Jun 4 07:03:33 2002 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tk/lib/tk*.rb: Allow to use Symbols for parameters.
- * ext/tk/lib/tkcanvas.rb: (TkcItem) Add 'coords' parameter to the
+ * ext/tk/lib/tkcanvas.rb: (TkcItem) Add 'coords' parameter to the
canvas item constructor (for new notation of constructor).
* ext/tcltklib/tcltklib.c: New 'mainloop' and 'mainloop_watchdog'.
@@ -8363,7 +8363,7 @@ Tue Jun 4 07:03:33 2002 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
'use' parameter.
* ext/tk/lib/tk.rb: Add new parameter 'widgetname' to the widget
- constructor to support effective use of Resource Database.
+ constructor to support effective use of Resource Database.
* ext/tk/lib/tk.rb: TkOption::get always returns a tainted string.
@@ -13763,7 +13763,7 @@ Tue Apr 17 17:33:55 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
* eval.c (handle_rescue): use === to compare exception match.
- * error.c (syserr_eqq): comparison between SystemCallErrors should
+ * error.c (syserr_eqq): comparison between SytemCallErrors should
based on their error numbers.
Tue Apr 17 16:54:39 2001 K.Kosako <kosako@sofnec.co.jp>
diff --git a/doc/ChangeLog-1.9.3 b/doc/ChangeLog-1.9.3
index b8e3162511..692b996335 100644
--- a/doc/ChangeLog-1.9.3
+++ b/doc/ChangeLog-1.9.3
@@ -14297,7 +14297,7 @@ Thu Jun 10 09:10:08 2010 Yukihiro Matsumoto <matz@ruby-lang.org>
Wed Jun 9 22:51:50 2010 Tanaka Akira <akr@fsij.org>
- * time.c (find_time_t): always extrapolate from past.
+ * time.c (find_time_t): always outerpolate from past.
[ruby-core:30672] reported by Benoit Daloze.
Wed Jun 9 22:13:08 2010 Tanaka Akira <akr@fsij.org>
@@ -76917,7 +76917,7 @@ Tue May 31 15:52:45 2005 GOTOU Yuuzou <gotoyuzo@notwork.org>
break the loop if the socket reached to EOF. [ruby-talk:142285]
* lib/webrick/httpserver.rb (WEBrick::HTTPServer#run): send response
- without reading the whole request body if keep-alive is disabled.
+ without reading the whole request body if keep-alive is diabled.
[experimental]
Mon May 30 23:48:29 2005 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
@@ -76939,7 +76939,7 @@ Sat May 28 16:39:21 2005 GOTOU Yuuzou <gotoyuzo@notwork.org>
Sat May 28 05:15:44 2005 GOTOU Yuuzou <gotoyuzo@notwork.org>
* ext/openssl/ossl_x509store.c (ossl_x509stctx_set_time): should
- not set internal flag directory.
+ not set internal flag directry.
Sat May 28 02:00:11 2005 GOTOU Yuuzou <gotoyuzo@notwork.org>
diff --git a/doc/ChangeLog-2.0.0 b/doc/ChangeLog-2.0.0
deleted file mode 100644
index a1a79b8dca..0000000000
--- a/doc/ChangeLog-2.0.0
+++ /dev/null
@@ -1,24015 +0,0 @@
-Fri Feb 8 19:56:54 2013 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * array.c (rb_ary_dup): reverted r39004. see [Bug #7768], and
- release manager finally decided to revert it.
-
-Fri Feb 8 16:09:45 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * eval.c (rb_ensure): preserve errinfo across ensure proc before
- JUMP_TAG(). [ruby-core:52022] [Bug #7802]
-
-Fri Feb 8 16:08:28 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * test/ruby/envutil.rb (assert_separately): check also terminating
- signal not only if core dumped.
-
-Fri Feb 8 13:12:04 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc/generator/darkfish.rb: Set encoding on output template to
- user-specified encoding.
- * test/rdoc/test_rdoc_generator_darkfish.rb: Test for above.
-
- * lib/rdoc.rb: Bump version
-
-Fri Feb 8 11:53:33 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems/security/policy.rb: Raise proper exceptions when
- verifying unsigned gems (instead of crashing).
- * test/rubygems/test_gem_security_policy.rb: Tests for the above.
-
-Fri Feb 8 10:44:44 2013 Eric Hodel <drbrain@segment7.net>
-
- * test/rubygems/test_gem_dependency_installer.rb: Improve coverage of
- --install-dir feature of gem install.
-
-Fri Feb 8 10:11:09 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems/config_file.rb: Add missing require for
- user_interaction.rb
-
- * lib/rubygems/dependency_installer.rb: Minor refactor for clarity.
-
-Fri Feb 8 09:35:17 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/mkmf.rb (MakeMakefile#configuration): set all ruby names.
- hdrdir now needs RUBY_VERSION_NAME.
-
-Fri Feb 8 08:58:26 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems/package/old.rb: Fix loading old format gems on ruby
- 1.8. This commit is only so trunk and rubygems master have the same
- code.
-
-Fri Feb 8 08:53:27 2013 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/visitors/yaml_tree.rb: fixing string quotation
- when dumping Ruby strings. Thanks Ingy
-
- * test/psych/test_psych.rb: appropriate tests.
-
- * test/psych/test_yaml.rb: ditto
-
-Fri Feb 8 08:50:42 2013 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/visitors/yaml_tree.rb: change output reference
- ids to be sequential numbers.
-
-Fri Feb 8 07:47:56 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems/package/old.rb: Disallow installation of old-format
- gems when a security policy is active.
- * test/rubygems/test_gem_package_old.rb: Test for above.
-
-Fri Feb 8 07:34:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/net/http.rb (HTTP.post_form): Fix module scope in documentation
- Patch by David Albert [Bug #7794] [ruby-core:51955]
-
-Fri Feb 8 07:33:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * compar.c (cmp_equal): Document ignored exception and return false
- By Makoto Kishimoto [Bug #7790] [ruby-dev:46925] [ruby-dev:46910]
-
-Fri Feb 8 07:17:00 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems/dependency_installer.rb: Only install local gems if
- they end in '.gem'. Fixes github rubygems issue #407.
- * test/rubygems/test_gem_dependency_installer.rb: Test for the above.
-
-Fri Feb 8 00:02:48 2013 Tanaka Akira <akr@fsij.org>
-
- * process.c (obj2gid): use getgrnam_r() only if getgrnam_r() and
- _SC_GETGR_R_SIZE_MAX is available.
- MirOS BSD (MirBSD 10 GENERIC#1382 i386) have getgrnam_r() but
- no _SC_GETGR_R_SIZE_MAX.
- (obj2uid): use getpwnam_r() only if getpwnam_r() and
- _SC_GETPW_R_SIZE_MAX is available.
- This is consistency for obj2gid.
- MirOS BSD have neither getpwnam_r() nor _SC_GETPW_R_SIZE_MAX.
-
-Thu Feb 7 22:01:18 2013 Tanaka Akira <akr@fsij.org>
-
- * configure.in: define linker for shared library on MirOS BSD.
-
-Thu Feb 7 21:09:23 2013 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/rubygems/test_gem_config_file.rb
- (TestGemConfigFile#test_check_credentials_permissions): skip on
- Windows. see [Bug #7784] [ruby-core:51864] and r39070.
-
-Thu Feb 7 20:52:40 2013 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/Makefile.sub (config.status): added variables which were
- missing at r39130.
-
-Thu Feb 7 15:33:17 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/mkmf.rb (MakeMakefile#merge_libs): insert following reversal
- ordered elements just after the duplicated element, not overwriting
- successive elements. [ruby-core:50314] [Bug #7467]
-
-Thu Feb 7 14:56:15 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems/package.rb: Ensure digests are generated for signing.
- * test/rubygems/test_gem_package.rb: Test for the above.
-
- * lib/rubygems/security/policy.rb: Ensure digests are present when
- verifying a gem and match the number of signatures bidirectionally.
- * test/rubygems/test_gem_security_policy.rb: Test for the above.
-
- * lib/rubygems.rb: Documentation improvements (by zzak)
-
-Thu Feb 7 05:52:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * doc/pty/README: Remove static documentation file
- * ext/pty/pty.c: Add License to PTY module overview
-
-Thu Feb 7 02:31:10 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * vm_insnhelper.c: attr_writer should return its argument [Bug #7773]
-
- * test/ruby/test_basicinstructions.rb: Test for above
-
-Thu Feb 7 01:35:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * doc/security.rdoc: Link to japanese version of CVE page patch by
- nagachika
-
-Wed Feb 6 23:30:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * doc/pty/README.expect: Removed static documentation file
- * ext/pty/lib/expect.rb: Documentation for IO#expect
-
-Wed Feb 6 22:25:00 2013 Charlie Somerville <charlie@charliesomerville.com>
-
- * hash.c (env_reject_bang): hide keys array from ObjectSpace
- * hash.c (env_select_bang): ditto
-
-Wed Feb 6 17:33:01 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in (multiarch): add option to move architecture dependent
- directories. [Feature #6111]
-
- * template/ruby.pc.in: add arch dependent paths.
-
- * configure.in (rubyarchhdrdir, sitearchhdrdir, vendorarchhdrdir): add
- options to customize architecture dependent header directories.
-
- * configure.in (rubyarchprefix, sitearchdir, vendorarchdir): add
- options to customize architecture dependent library directories.
-
- * template/ruby.pc.in, tool/mkconfig.rb, tool/rbinstall.rb: use
- configured values.
-
- * tool/mkconfig.rb: expand rubyarchdir to extract prefix.
-
- * configure.in (RUBY_VERSION_NAME), template/ruby.pc.in: add
- substitution and define.
-
- * configure.in, version.c: parametric architecture name for paths.
-
- * configure.in (shvar_to_cpp): convert sh variable references
- by replacing with string literal forms in cpp.
-
-Wed Feb 6 17:05:26 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc: Import RDoc 4.0.0.rc.2
-
-Mon Feb 4 02:22:49 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * test/ruby/test_process.rb (test_setsid): ensure to call
- Process.wait(). Reported by George Koehler. Thanks.
-
-Mon Feb 4 02:18:00 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * test/ruby/test_process.rb (test_setsid): skip when platform is
- OpenBSD. Contributed from George Koehler.
- [Bug #7789] [ruby-core:51889]
-
-Wed Feb 6 13:35:20 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * proc.c (rb_method_entry_location, rb_{mod,obj}_method_location): new
- functions to obtain source location of method definition.
-
- * vm_method.c (rb_obj_respond_to): show the location of old style
- respond_to? method.
-
-Wed Feb 6 13:03:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * doc/security.rdoc: Add link to CVEs on ruby-lang.org/en/security
-
-Wed Feb 6 12:49:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * NEWS: Add note about removal of CSV::load and CSV::dump from r39077
-
-Wed Feb 6 05:57:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/racc/parser.rb: Hide copyright notice from Racc doc
-
-Wed Feb 6 05:50:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * doc/rubygems/*: Removed outdated documentation files
- * lib/rubygems/LICENSE.txt: Include license file
- * lib/rubygems.rb: Move Gem module documentation so rdoc can parse it
- and link to LICENSE.txt
- * lib/rubygems/*: Hide useless documentation from Gem module rdoc
-
-Wed Feb 6 03:45:19 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * doc/security.rdoc: Remove documentation for unsafe CSV.load which
- was deleted in r39077
-
-Wed Feb 6 03:27:19 2013 James Edward Gray II <james@graysoftinc.com>
-
- * lib/csv.rb: Remove the dangerous serialization feature.
-
-Wed Feb 6 00:56:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/irb.rb: Remove example from restrictions, it works [Github #246]
- Based on patch by Ryunosuke SATO
-
-Wed Feb 6 00:46:53 2013 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * vm.c (rb_vm_stack_to_heap): call rb_vm_get_binding_creatable_next_cfp
- instead of rb_vm_get_ruby_level_next_cfp to prevent a segfault by
- calling Kernel#callcc. See r39067 for more details.
- [ruby-dev:46908] [ruby-trunk - Bug #7774]
-
- * test/ruby/test_settracefunc.rb: add a test.
-
-Tue Feb 5 18:48:00 2013 Charlie Somerville <charlie@charliesomerville.com>
-
- * doc/security.rdoc: add regex, eval and drb sections
-
-Tue Feb 5 17:24:02 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc/servlet.rb: Fixed root search paths, filesystem paths
- instead of HTTP paths were returned.
- * test/rdoc/test_rdoc_servlet.rb: Test for above.
-
-Tue Feb 5 16:37:00 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems/config_file.rb: Ignore permissions check on windows.
- Windows writes 0600 file as 0644 permissions making the check
- useless.
-
-Tue Feb 5 16:25:25 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm_method.c (rb_obj_respond_to): drop optional include_all flag if
- respond_to? method is defined in old style. [Bug #7722]
-
-Tue Feb 05 15:04:34 2013 Koichi Sasada <ko1@atdot.net>
-
- * proc.c (rb_binding_new_with_cfp): permit to create binding object
- of IFUNC frame.
- When `rb_binding_new_with_cfp()' is called, VM finds out the first
- normal (has iseq) frame and create a binding object of this frame
- and create Env objects. `ep's of related frames are updated
- (`ep's point Env object managed spaces).
- However, `ep' of skipped IFUNC frame was not updated and
- old invalid `ep' was remained. It causes serious problems.
- To solve this issue, permit IFUNC to create binding.
- (Maybe there is no problem on it)
- [ruby-dev:46908] [ruby-trunk - Bug #7774]
-
- * test/ruby/test_settracefunc.rb: add a test.
-
- * vm.c (rb_vm_get_binding_creatable_next_cfp), vm_core.h: added.
-
- * vm_trace.c: fix to use `rb_vm_get_binding_creatable_next_cfp()'.
-
-Tue Feb 5 14:43:15 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * lib/matrix.rb: Fix error message, patch by pypypy [Bug #7777]
-
-Tue Feb 5 14:36:04 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * numeric.c (fix_pow): Handle special cases when base is 0, -1 or +1
- [Bug #5713] [Bug #5715]
-
- * rational.c (nurat_expt): ditto
-
-Tue Feb 5 13:27:53 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/io/console/console.c (rawmode_opt): use default values by `stty
- raw`.
-
-Tue Feb 5 12:50:47 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * range.c: Use div instead of / for bsearch
-
- * test/ruby/test_range.rb: Test showing bug when requiring mathn
-
-Tue Feb 5 12:48:38 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * enumerator.c: Use to_enum for Enumerable methods returning
- Enumerators.
- This makes Lazy#cycle no longer needed, so it was removed.
- Make Enumerator#chunk and slice_before return lazy Enumerators.
- [Bug #7715]
-
- * internal.h: Remove ref to rb_enum_cycle_size; no longer needed
-
- * enum.c: Make enum_cycle_size static.
-
- * test/ruby/test_lazy_enumerator.rb: Test for above
-
-Tue Feb 5 12:48:10 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * enumerator.c: Finalize and document Lazy.new. [Bug #7248]
- Add Lazy#to_enum and simplify Lazy#size.
-
- * test/ruby/test_lazy_enumerator.rb: tests for above
-
-Tue Feb 5 11:35:35 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems/commands/push_command.rb: Fixed credential download for
- `gem push --host`
- * lib/rubygems/gemcutter_utilities.rb: ditto.
- * test/rubygems/test_gem_commands_push_command.rb: Test for the above.
- * test/rubygems/test_gem_gemcutter_utilities.rb: ditto.
-
- * lib/rubygems/config_file.rb: Abort if the `gem push` credentials
- file has insecure permissions.
- * test/rubygems/test_gem_config_file.rb: Test for the above.
-
- * lib/rubygems/ext/builder.rb: Do not look for Gemfile, Isolate, etc.
- while building gem extensions.
-
- * lib/rubygems/package.rb: Unset spec and files list if a gem's
- signatures cannot be verified.
- * test/rubygems/test_gem_package.rb: Test for the above.
-
- * lib/rubygems/specification.rb: Reduce use of eval.
- * lib/rubygems/test_case.rb: ditto.
-
- * test/rubygems/test_gem_specification.rb: Test setting
- specification_version for legacy gems. Dup Gem.ruby before
- untainting in case it's frozen.
-
- * lib/rubygems.rb: Reduce use of eval. Only read files when looking
- for Gemfile, Isolate, etc.
- * test/rubygems/test_gem.rb: Test for the above.
-
-Tue Feb 5 10:15:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * doc/security.rdoc: Wrap security guide at 80 columns
-
-Tue Feb 5 10:15:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * doc/security.rdoc: Grammatical error on security guide
- Patch by Josh Bassett [Github fixes #245]
-
-Tue Feb 5 10:00:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/racc/parser.rb: Update #do_parse and #yyparse from upstream
- See [Github tenderlove/racc@7d954b5]
-
-Tue Feb 5 09:55:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/racc: Merge Racc documentation downstream, add grammar ref file
-
-Tue Feb 5 08:03:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/irb.rb, lib/irb/ext/save-history.rb: Add documentation on how to
- enabled irb history [ruby-core:51347] [Bug #7679]
-
-Tue Feb 5 07:35:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/irb.rb, lib/irb/context.rb: Add documentation on how to enable
- auto-indentation and autocompletion using irbrc and irb_context
- [ruby-core:51209] [Bug #7642] and [ruby-core:51348] [Bug #7680]
-
-Tue Feb 5 05:20:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * doc/standard_library.rdoc: Document list of libraries and extensions
- and their purpose or short description
- * lib/README: Remove lib/README in favor of doc/standard_library.rdoc
-
-Tue Feb 5 04:40:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * ext/json/lib/json.rb: Move module overview definition for rdoc
-
-Tue Feb 5 03:00:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/tracer.rb: Move class overview definition and reformat
-
-Mon Feb 4 15:10:10 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/io/console/console.c (rawmode_opt): initialize options for the
- case all options are not given.
-
-Mon Feb 4 12:44:13 2013 Koichi Sasada <ko1@atdot.net>
-
- * vm_dump.c (control_frame_dump): capitalize prefix of `ep'
- if `ep' points an env object.
-
-Mon Feb 4 04:20:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/English.rb: Add English module for RDoc to parse, then
- remove_const to avoid confusion. Include full list of aliases and
- their associated global variable.
-
-Mon Feb 4 02:40:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/yaml.rb (YAML::EngineManager): Documentation for #yamler and
- #yamler= for using the removed Syck gem as the YAML::ENGINE
-
-Sun Feb 3 16:54:27 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/io/console/io-console.gemspec: bump. [Bug #7762]
-
- * test/io/console/test_io_console.rb (test_stringio_getch): use more
- descriptive assertions.
-
- * ext/io/console/console.c (rawmode_opt): min is minimum characters,
- not tenths.
-
-Sun Feb 3 16:13:00 2013 Charlie Somerville <charlie@charliesomerville.com>
-
- * doc/security.rdoc: add first cut at a Ruby security document
-
-Sun Feb 3 10:25:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * random.c: Document range argument for Kernel#rand.
- [ruby-core:51794] [Bug #7770]
-
-Sun Feb 3 10:00:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * numeric.c: Document Float constants [ruby-core:51484] [Bug #7709]
-
-Sun Feb 3 09:38:44 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/profiler.rb (PROFILE_CALL_PROC, PROFILE_RETURN_PROC): add b_call
- and b_return to profile block calls.
-
- * lib/profiler.rb (PROFILE_CALL_PROC, PROFILE_RETURN_PROC): split
- PROFILE_PROC for call and return events.
-
-Sat Feb 2 14:32:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/minitest/mock.rb, lib/minitest/hell.rb: nodoc top-level module
-
-Sat Feb 2 14:05:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/debug.rb: Documentation for DEBUGGER__ class methods based on
- patch by Vincent Batts [ruby-core:51253]
-
-Sat Feb 2 13:37:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/net/smtp.rb: Fix rdoc title for Net::SMTP
-
-Sat Feb 2 13:32:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/net/pop.rb: Fix rdoc title for Net::POP3
-
-Sat Feb 2 13:00:11 2013 Yusuke Endoh <mame@tsg.ne.jp>
-
- * lib/gserver.rb (GServer#start): fix a timing issue. patch from
- Charles Nutter. [Bug #7081]
-
-Sat Feb 2 12:36:54 2013 Yusuke Endoh <mame@tsg.ne.jp>
-
- * lib/fileutils.rb (copy_entry, wrap_traverse): preserve attributes of
- directories on FileUtils.cp_r. The fix was proposed by Jan
- Wedekind. [Bug #7246]
-
- * test/fileutils/test_fileutils.rb: add a test for above.
-
-Sat Feb 2 12:30:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/uri/ftp.rb (URI::FTP.new2): nodoc method from r39013 [Bug #7301]
-
-Sat Feb 2 12:15:36 2013 Yusuke Endoh <mame@tsg.ne.jp>
-
- * lib/uri/ftp.rb (URI::FTP.new2): remove the rdoc because it is not
- well tested yet. [Bug #7301]
-
-Sat Feb 2 12:07:41 2013 Yusuke Endoh <mame@tsg.ne.jp>
-
- * ChangeLog: Forgot to add a reference to the ChangeLog of the
- previous commit.
-
-Sat Feb 2 12:05:18 2013 Yusuke Endoh <mame@tsg.ne.jp>
-
- * lib/fileutils.rb: chmod/chmod_R with a string mode (e.g., "+x")
- caused error in verbose mode. [Bug #7373]
-
- * test/fileutils/test_fileutils.rb: add a test for above.
-
-Sat Feb 2 11:44:42 2013 Yusuke Endoh <mame@tsg.ne.jp>
-
- * lib/English.rb: Remove some confusing words from rdoc. [Bug #7406]
-
-Sat Feb 2 10:17:12 2013 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * NEWS: add keyword arguments.
-
-Sat Feb 2 07:45:44 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * proc.c (proc_curry): Fix arity check [Bug #5747]
-
- * test/ruby/test_proc.rb: Test for above
-
-Sat Feb 2 07:44:15 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * proc.c: Add {*}_min_max_arity and refactor.
- [Bug #7765]
-
- * test/ruby/test_proc.rb: Fix wrong test
-
-Fri Feb 2 00:46:00 2013 Charlie Somerville <charlie@charliesomerville.com>
-
- * marshal.c: add security considerations to marshal overview, refer to
- overview from Marshal.load documentation [#7759]
-
-Fri Feb 1 23:04:00 2013 Charlie Somerville <charlie@charliesomerville.com>
-
- * array.c (rb_ary_dup): make returned array the same class as the original
- array [Bug #7768] [ruby-core:51792]
- * test/ruby/test_array.rb (class TestArray): add test
-
-Fri Feb 1 16:35:34 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * marshal.c (r_object0): prohibit setting instance variables of
- existing class/module.
-
-Fri Feb 1 14:34:29 2013 Shugo Maeda <shugo@ruby-lang.org>
-
- * ext/readline/extconf.rb, ext/readline/readline.c: check
- RL_PROMPT_START_IGNORE and RL_PROMPT_END_IGNORE directly in
- readline.c. Patch by Zachary Scott. [Bug #7397] [ruby-core:49561]
-
-Thu Jan 31 21:55:00 2013 Charlie Somerville <charlie@charliesomerville.com>
-
- * marshal.c (marshal_load): Add documentation warning against using
- Marshal.load on untrusted data [Bug #7759] [ruby-core:51765]
-
-Thu Jan 31 16:33:27 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (local_push_gen): no assigned but unused variable warnings
- in eval as well as -e. [Feature #7730] [ruby-core:51580]
-
-Wed Jan 30 12:30:08 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * test/ruby/test_signal.rb (test_trap_puts): Fix typo. "sync"
- should be "STDOUT.sync".
-
-Thu Jan 31 15:39:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * string.c (rb_str_aset_m): Documentation for String#[]= fix
- Raises an IndexError if Regexp match is out of range.
- Github fixes #243 Patch by Dmtiriy Budnik
-
-Thu Jan 31 13:54:44 2013 Shugo Maeda <shugo@ruby-lang.org>
-
- * ext/socket/raddrinfo.c (rsock_unix_sockaddr_len): return
- sizeof(sa_family_t) if path is empty. see "Autobind Feature" in
- unix(7) for details.
-
- * ext/socket/lib/socket.rb (unix_socket_abstract_name?): treat an
- empty path as an abstract name.
-
- * test/socket/test_unix.rb: related test.
-
-Wed Jan 30 20:58:50 2013 Tanaka Akira <akr@fsij.org>
-
- * ext/socket/basicsocket.c (bsock_getsockname): ignore truncated
- part of socket address.
- (bsock_getpeername): ditto.
- (bsock_local_address): ditto.
- (bsock_remote_address): ditto.
-
- * ext/socket/unixsocket.c (unix_path): ditto.
- (unix_addr): ditto.
- (unix_peeraddr): ditto.
-
- * ext/socket/init.c (cloexec_accept): ditto.
-
-Wed Jan 30 17:08:20 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * include/ruby/win32.h (fstat): revert r37337, which uses _fstati64()
- instead of fstati64() on mingw32. [Bug #7276]
-
-Wed Jan 30 15:26:37 2013 Shugo Maeda <shugo@ruby-lang.org>
-
- * ext/socket/unixsocket.c (rsock_init_unixsock): use rb_inspect()
- because rb_sys_fail_str() fails if its argument contains NUL.
-
- * test/socket/test_unix.rb: related test.
-
-Wed Jan 30 15:21:30 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm_dump.c (rb_vm_bugreport): show the most important message, Crash
- Report log information, first.
-
-Wed Jan 30 15:00:05 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * array.c (rb_ary_bsearch): Raise TypeError on bad return from block
-
- * range.c (range_bsearch): ditto
-
- * test/ruby/test_array.rb (class): Test for above
-
- * test/ruby/test_range.rb (class): ditto
-
-Wed Jan 30 14:46:28 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * range.c: Restrict bsearch to integers [#7728]
-
- * test/ruby/test_range.rb: Test for above
-
-Wed Jan 30 14:10:52 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * array.c (rb_ary_bsearch): Return enumerator if no block [#7725]
-
- * range.c (range_bsearch): ditto
-
- * test/ruby/test_array.rb: Test for above
-
- * test/ruby/test_range.rb: ditto
-
-Wed Jan 30 13:53:43 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * lib/matrix.rb: Take conjugate for inner product
- [rubyspec:5a01ad5719f2] [ruby-dev:46101]
-
-Wed Jan 30 13:22:05 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (local_push_gen): warn assigned but unused variables also in
- toplevel, except for -e option. [Feature #7730] [ruby-core:51580]
-
-Wed Jan 30 13:17:53 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * cont.c (cont_restore_thread): svar should be separate per fibers.
- [ruby-core:51331] [Bug #7678]
-
-Wed Jan 30 07:15:04 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * re.c (reg_operand): Simplify and reuse error handling [Bug #7539]
-
- * test/ruby/test_regexp.rb: Test for above
-
-Wed Jan 30 07:00:16 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * object.c: Improve error for failed implicit conversions [Bug #7539]
-
- * error.c: Adapt rdoc
-
- * test/ruby/test_object.rb: Test for above
-
-Tue Jan 29 21:40:12 2013 Tanaka Akira <akr@fsij.org>
-
- * lib/net/http/generic_request.rb (encode_multipart_form_data): remove
- tempfile explicitly.
-
-Tue Jan 29 19:27:18 2013 Benoit Daloze <eregontp@gmail.com>
-
- * array.c: Improve documentation about
- comparison by hash for concerned methods. [ruby-core:51266]
-
-Tue Jan 29 17:03:28 2013 Koichi Sasada <ko1@atdot.net>
-
- * vm_backtrace.c: fix issue of rb_debug_inspector_open().
- The order of making binding should be stack (frame) top to bottom.
- [Bug #7635]
- And also fix issue of collecting klass. Collecting klass is same
- as TracePoint#defined_class.
- (previous version, it returns T_ICLASS (internal objects).
-
- * test/-ext-/debug/test_debug.rb: add a test.
-
- * ext/-test-/debug/extconf.rb, init.c, inspector.c: ditto.
-
- * vm_backtrace.c: remove magic number and add enum CALLER_BINDING_*.
-
- * vm_backtrace.c, include/ruby/debug.h: add new C api (experimental)
- rb_debug_inspector_frame_self_get().
-
- * vm.c, vm_core.h, vm_trace.c: move decl. of
- rb_vm_control_frame_id_and_class() and constify first parameter.
-
-Tue Jan 29 16:50:58 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm_trace.c (rb_tracepoint_enable, rb_tracepoint_disable): check safe
- level as well as set_trace_func.
-
- * vm_trace.c (set_trace_func, thread_{add,set}_trace_func_m): check
- safe level as well as 1.8.
-
-Tue Jan 29 16:49:19 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * proc.c (rb_mod_method_arity): return original arity of the method if
- aliased because of visibility change, like as Method#arity.
-
-Tue Jan 29 12:05:18 2013 Tanaka Akira <akr@fsij.org>
-
- * test/ruby/test_marshal.rb: remove temporally files early.
-
- * test/ruby/test_process.rb: ditto.
-
- * test/psych/test_exception.rb: ditto.
-
-Tue Jan 29 09:26:20 2013 Shugo Maeda <shugo@ruby-lang.org>
-
- * ext/socket/socket.c (sock_s_pack_sockaddr_un): calculate the
- correct address length of an abstract socket.
-
- * test/socket/test_unix.rb: related test.
-
-Mon Jan 28 18:02:16 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm_backtrace.c (rb_debug_inspector_frame_{class,binding,iseq}_get):
- use long as index as well as RARRAY_LEN().
-
-Mon Jan 28 17:51:38 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * test/ruby/envutil.rb (assert_separately): imply no core dump.
-
-Mon Jan 28 12:32:31 2013 Tanaka Akira <akr@fsij.org>
-
- * ext/fcntl/fcntl.c: update document. use "file descriptor" instead
- of "file handle" because it is not used other Ruby documents and
- it is confusing with Windows file handle.
- correct F_DUPFD behavior.
-
-Sat Jan 26 22:39:12 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * marshal.c (w_object): dump instance variables of the result of
- marshal_dump not the original object. [ruby-core:51163] [Bug #7627]
-
- * complex.c (nucomp_marshal_dump): need to copy instance variables.
-
- * rational.c (nurat_marshal_dump): ditto.
-
-Sat Jan 26 13:35:56 2013 Eric Hodel <drbrain@segment7.net>
-
- * ext/fcntl/fcntl.c: Document Fcntl constants
-
-Sat Jan 26 12:54:40 2013 Eric Hodel <drbrain@segment7.net>
-
- * hash.c (rb_env_size): Restored documentation for ENV.size
-
- * lib/drb/drb.rb: Documented DRb::DRb#run.
-
- * lib/erb.rb (class ERB): Improved documentation of ERb.
-
- * transcode.c: Documented Encoding::Converter constants.
-
-Sat Jan 26 10:09:57 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/webrick/accesslog.rb: Improved WEBrick documentation.
- * lib/webrick/cgi.rb: ditto.
- * lib/webrick/config.rb: ditto.
- * lib/webrick/cookie.rb: ditto.
- * lib/webrick/httpauth/authenticator.rb: ditto.
- * lib/webrick/httpauth/basicauth.rb: ditto.
- * lib/webrick/httpauth/digestauth.rb: ditto.
- * lib/webrick/httpproxy.rb: ditto.
- * lib/webrick/httprequest.rb: ditto.
- * lib/webrick/httpresponse.rb: ditto.
- * lib/webrick/https.rb: ditto.
- * lib/webrick/httpserver.rb: ditto.
- * lib/webrick/httpservlet/cgihandler.rb: ditto.
- * lib/webrick/httpservlet/filehandler.rb: ditto.
- * lib/webrick/httpservlet/prochandler.rb: ditto.
- * lib/webrick/httputils.rb: ditto.
- * lib/webrick/httpversion.rb: ditto.
- * lib/webrick/log.rb: ditto.
- * lib/webrick/server.rb: ditto.
- * lib/webrick/ssl.rb: ditto.
- * lib/webrick/utils.rb: ditto.
- * lib/webrick/version.rb: ditto.
-
-Sat Jan 26 08:29:33 2013 Shugo Maeda <shugo@ruby-lang.org>
-
- * ext/socket/raddrinfo (rsock_unix_sockaddr_len): renamed from
- rsock_unixpath_len, because it returns not the length of the path,
- but the length of a socket address for the path.
-
-Sat Jan 26 01:12:23 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * test/ruby/test_io.rb (test_ioctl_linux): skip if a platform is
- not x86 because linux ioctl request number depend on cpu arch.
- At least, alpha, mips, sparc and ppc have a different number.
- [Bug #7718] [ruby-core:51544]
-
-Fri Jan 25 19:14:24 2013 Masaki Suketa <masaki.suketa@nifty.ne.jp>
-
- * ext/win32ole/win32ole.c: use TlsAlloc instead of __declspec(thread)
- to avoid SEGV if win32ole.so loaded with LoadLibrary in Windows
- XP or earlier.
-
-Fri Jan 25 16:47:31 2013 Shugo Maeda <shugo@ruby-lang.org>
-
- * ext/socket/raddrinfo.c (rsock_unixpath_len, init_unix_addrinfo),
- ext/socket/unixsocket.c (unixsock_connect_internal,
- rsock_init_unixsock): calculate the correct address length of
- an abstract socket. Without this fix, sizeof(struct sockaddr_un)
- is specified as the length of an abstract socket for bind(2) or
- connect(2), so the address of the socket is filled with extra NUL
- characters. See unix(7) for details.
-
- * ext/socket/lib/socket.rb (unix_server_socket): don't access the
- file system if the platform is Linux and path starts with NUL,
- which means that the socket is an abstract socket.
-
- * test/socket/test_unix.rb: related test.
-
-Fri Jan 25 13:02:27 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/drb/drb.rb: Updated documentation based on patch from Vincent
- Batts. [ruby-trunk - Bug #7714]
- * lib/drb/ssl.rb: ditto.
-
-Fri Jan 25 12:23:29 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/drb/drb.rb: Improved documentation by adding or hiding methods.
- * lib/drb/eq.rb: ditto.
- * lib/drb/extserv.rb: ditto.
- * lib/drb/gw.rb: ditto.
- * lib/drb/invokemethod.rb: ditto.
- * lib/drb/observer.rb: ditto.
- * lib/drb/ssl.rb: ditto.
- * lib/drb/timeridconv.rb: ditto.
- * lib/drb/unix.rb: ditto.
-
- * sample/drb/gw_cu.rb: Fixed bug in DRb gateway sample.
-
-Fri Jan 25 12:01:56 2013 Koichi Sasada <ko1@atdot.net>
-
- * vm_core.h: modify a comment about rb_iseq_t::local_size.
- A patch by davidbalbert (David Albert) [Bug #6750]
-
-Fri Jan 25 10:36:31 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/mkmf.rb: Documented MakeMakefile constants. Hide implementation
- details from RDoc
-
-Fri Jan 25 10:04:07 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems/compatibility.rb: Hide compatibility shims from RDoc
-
- * lib/rubygems/config_file.rb: Hide RbConfig use from RDoc
-
- * lib/rubygems/test_case.rb: Added note to use realpath when 1.8
- support is dropped.
-
-Fri Jan 25 09:14:43 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc/generator/darkfish.rb: Fixed debug message. RDoc bug #174
- by Thomas Leitner.
-
- * lib/rdoc/store.rb: Fixed deletion of ri attribute data when a class
- was loaded then saved. RDoc bug #171 by Thomas Leitner.
- * test/rdoc/test_rdoc_store.rb: Test for above.
-
-Thu Jan 24 19:55:25 2013 Shota Fukumori <her@sorah.jp>
-
- * NEWS (yaml): Write about bundled libyaml.
-
-Thu Jan 24 16:54:34 2013 Eric Hodel <drbrain@segment7.net>
-
- * doc/syntax/calling_methods.rdoc: Added a Method Lookup section.
- * doc/syntax/refinements.rdoc (Method Lookup): Clarified that
- refinement methods are looked up in classes, not instances.
-
-Thu Jan 24 16:49:17 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * enum.c (enum_zip): Fix error message
-
- * array.c (take_items): Same, for Array#zip
-
-Thu Jan 24 16:47:26 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * enumerator.c (lazy_zip): raise error for bad arguments
- [Bug #7706]
-
-Thu Jan 24 16:05:08 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * enumerator.c: Optimize Lazy#zip when passed only arrays
- [Bug #7706]
-
-Thu Jan 24 15:21:17 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * enumerator.c: Fix state handling for Lazy#zip,{drop_take}{_while}
- [bug #7696] [bug #7691]
-
-Thu Jan 24 11:43:47 2013 Narihiro Nakamura <authornari@gmail.com>
-
- * eval.c (f_current_dirname): Add documentation about "__dir__
- returns always an absolute path". [Bug #7729]
-
-Thu Jan 24 10:28:30 2013 Eric Hodel <drbrain@segment7.net>
-
- * NEWS (RDoc): Added mention of page support and markdown support.
-
-Thu Jan 24 09:40:13 2013 Eric Hodel <drbrain@segment7.net>
-
- * doc/syntax/refinements.rdoc: Added refinements document based on
- the specification from the wiki.
- * doc/syntax.rdoc: Added link to refinements document.
-
-Wed Jan 23 16:29:09 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * win32/win32.c (rb_w32_spawn, rb_w32_aspawn_flags): fix missing
- initialization. pointed out by phasis68 (Heesob Park) at
- [ruby-core:51579]. [Bug #7721]
-
-Wed Jan 23 16:18:04 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/mkmf.rb (MakeMakefile#try_constant): fix for large unsigned.
-
- * lib/mkmf.rb (MakeMakefile#try_constant): fix for larger constants.
-
- * test/mkmf/test_constant.rb: tests for try_constant.
- TODO: define check_constant and use it.
-
-Wed Jan 23 13:35:37 2013 Koichi Sasada <ko1@atdot.net>
-
- * thread_pthread.c (ruby_init_stack): ignore `STACK_END_ADDRESS'
- if Ruby interpreter is running on co-routine.
- [Feature #2294]
- https://bugs.ruby-lang.org/issues/2294#note-18
-
-Wed Jan 23 12:28:22 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * win32/win32.c (rb_w32_spawn, rb_w32_aspawn_flags): check the results
- of acp_to_wstr() which can return NULL. [ruby-core:51557] [Bug #7721]
-
-Wed Jan 23 10:40:49 2013 Eric Hodel <drbrain@segment7.net>
-
- * doc/syntax/assignment.rdoc (Implicit Array Assignment): Clarify
- that "left-hand side" means "of the assignment". Suggested by Jorge
- Dias.
- * doc/syntax/assignment.rdoc (Multiple Assignment): ditto.
-
-Wed Jan 23 10:34:47 2013 Eric Hodel <drbrain@segment7.net>
-
- * doc/syntax/assignment.rdoc (Local Variables and Methods): Fixed
- example showing caching of a method's results into a local variable.
- Added not about using an explicit receiver to call a method that
- matches a local variable. Suggested by markov_twain on twitter.
-
-Wed Jan 23 10:20:08 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/README: Fixed typo. Patch by Pradeep Sahoo.
- Fixes #240 on github
-
-Wed Jan 23 09:53:39 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc/servlet.rb: Fixed display of site and home documentation.
- Fixes rdoc issue #170 by Thomas Leitner.
- * test/rdoc/test_rdoc_servlet.rb: Test for above.
-
- * lib/rdoc/code_object.rb: Split #initialize_visibility from
- #initialize for reuse when loading a stored object.
- Fixes rdoc issue #171 by Thomas Leitner.
-
- * lib/rdoc/any_method.rb: Initialize visibility for #display? For
- rdoc issue #171
- * lib/rdoc/attr.rb: ditto.
- * lib/rdoc/class_module.rb: ditto.
- * lib/rdoc/top_level.rb: ditto.
- * test/rdoc/test_rdoc_any_method.rb: Test for above.
- * test/rdoc/test_rdoc_attr.rb: ditto.
- * test/rdoc/test_rdoc_class_module.rb: ditto.
- * test/rdoc/test_rdoc_constant.rb: ditto.
- * test/rdoc/test_rdoc_top_level.rb: ditto.
-
-Wed Jan 23 06:43:26 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems/test_case.rb: Use Dir.tmpdir for rubygems tests instead
- of ./tmp/test. Fixes [ruby-trunk - Bug #7717]
-
-Tue Jan 22 22:58:03 2013 Akinori MUSHA <knu@iDaemons.org>
-
- * misc/ruby-electric.el (ruby-electric-curlies): Fix the bug where
- an open curly inserted in a string is always replaced with a
- hash sign.
-
-Mon Jan 21 15:41:33 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * tool/mkconfig.rb: BASERUBY is transient at core build.
-
-Mon Jan 21 13:51:21 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/mkmf.rb ($extmk): traverse parent directories for the case
- srcdir is a symlink.
-
-Sun Jan 20 23:55:37 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * marshal.c (w_object, r_object0): separate respond_to checks and
- calling, and get back to the old behavior for 2.0. [Bug #7564]
-
-Sun Jan 20 22:24:28 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * tool/vpath.rb (VPath#def_options): hack for msys make, which
- converts a command line argument to non-msys command seems like a
- path list automagically. [Bug #7710] [ruby-core:51489]
-
-Sat Jan 19 11:35:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * struct.c (Struct.new): Document Struct.new with block
- Patch by Hiroyuki Iwatsuki [Bug #7674]
-
-Sat Jan 19 09:52:46 2013 Eric Hodel <drbrain@segment7.net>
-
- * doc/syntax/miscellaneous.rdoc: Added section on defined?
-
-Sat Jan 19 09:27:31 2013 Eric Hodel <drbrain@segment7.net>
-
- * doc/syntax/assignment.rdoc (Local Variables and Methods): Made it
- more clear that local variables are created by the parser, not
- execution. Thanks to John Hawthorn.
-
-Sat Jan 19 09:15:58 2013 Eric Hodel <drbrain@segment7.net>
-
- * doc/syntax/assignment.rdoc: Improved links
- * doc/syntax/methods.rdoc: ditto.
-
- * doc/syntax.rdoc: Added link to assignment document
-
-Sat Jan 19 08:47:33 2013 Eric Hodel <drbrain@segment7.net>
-
- * doc/syntax/assignment.rdoc: Added a syntax document on assignment.
-
-Fri Jan 18 14:11:01 2013 Eric Hodel <drbrain@segment7.net>
-
- * doc/syntax/methods.rdoc: Added Array Decomposition.
-
-Fri Jan 18 12:54:21 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * tool/rbinstall.rb (gem): Gem.ensure_gem_subdirectories makes
- subdirectories group-writable, so make them with $dir_mode.
-
-Fri Jan 18 11:24:33 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/win32ole/win32ole.c (ole_initialize): uninitialize OLE at thread
- ends. [Bug #2618] [ruby-core:27634]
-
- * ext/win32ole/win32ole.c (ole_initialize): initialize OLE for each
- threads. [Bug #2618] [ruby-core:27634]
-
-Thu Jan 17 22:10:35 2013 Kouhei Sutou <kou@cozmixng.org>
-
- * lib/rubygems/ext/builder.rb (Gem::Ext::Builder.make): Remove
- .time dependency from *.rb install target. It causes needless
- *.rb install. [Bug #7698] [ruby-core:51437]
- Reported by Tadashi Saito. Thanks!!!
- * test/rubygems/test_gem_installer.rb
- (TestGemInstaller#test_install_extension_and_script): Add a test
- for the above change.
-
-Thu Jan 17 21:08:20 2013 Kouhei Sutou <kou@cozmixng.org>
-
- * eval.c: Fix a typo in ruby_finalize() documentation.
-
-Thu Jan 17 20:28:18 2013 Benoit Daloze <eregontp@gmail.com>
-
- * object.c: Typo in Kernel#hash documentation.
- Patch by zed_0xff [Github Fixes #237]
-
-Thu Jan 17 10:48:56 2013 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/scalar_scanner.rb: use constants rather than
- calculating Inf and NaN.
-
-Thu Jan 17 10:21:05 2013 Eric Hodel <drbrain@segment7.net>
-
- * doc/syntax/miscellaneous.rdoc: Added Ending an Expression and
- indentation.
-
-Thu Jan 17 09:30:21 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems/installer.rb: Untaint string when checking output
- for $SAFE=1
-
- * lib/rubygems/specification.rb: Keep previously loaded specs as
- active. This prevents double loading when refreshing the gem list.
- * test/rubygems/test_gem.rb: Test for above
-
- * lib/rubygems.rb: Bump version to 2.0.0.rc.2
-
-Thu Jan 17 09:08:37 2013 Eric Hodel <drbrain@segment7.net>
-
- * doc/syntax/control_expressions.rdoc: Added ? : ternary if
-
-Thu Jan 17 08:36:04 2013 Eric Hodel <drbrain@segment7.net>
-
- * doc/syntax/miscellaneous.rdoc: Added documentation for alias, undef,
- BEGIN, END.
- * doc/syntax/modules_and_classes.rdoc (Constants): Fixed unwrapped
- paragraph with trailing whitespace.
- * doc/syntax/modules_and_classes.rdoc (Scope): Added section pointing
- to alias and undef documentation.
- * doc/syntax.rdoc: Added link to miscellaneous section.
-
-Thu Jan 17 07:50:26 2013 Eric Hodel <drbrain@segment7.net>
-
- * doc/syntax/control_expressions.rdoc (Flip-Flop): Added a section on
- the flip-flop.
-
-Thu Jan 17 06:59:51 2013 Eric Hodel <drbrain@segment7.net>
-
- * doc/syntax/control_expressions.rdoc (if Expressions): Fixed markup
- error. Fixes #235 on github by FlyingFoX.
-
-Thu Jan 17 06:53:58 2013 Eric Hodel <drbrain@segment7.net>
-
- * doc/syntax/literals.rdoc (Strings): Fixed typo. Fixes #236 on
- github by Doug Yun.
-
-Wed Jan 16 18:45:46 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/win32ole/lib/win32ole.rb: use TracePoint to hook all thread
- creation not only by Thread.new and to get rid of interference with
- svar scope. [Bug #7681] [ruby-core:51365]
-
-Wed Jan 16 09:35:53 2013 Eric Hodel <drbrain@segment7.net>
-
- * .document: Removed extra space
- * lib/irb/lc/.document: Hide help-message
- * lib/minitest/.document: Hide README.txt
- * lib/rake/lib/.document: Hide project.rake
- * lib/rdoc/generator/template/json_index/.document: Hide JavaScript
- files
- * lib/rubygems/ssl_certs/.document: Hide PEM files.
-
-Wed Jan 16 03:54:28 2013 Eric Hodel <drbrain@segment7.net>
-
- * doc/syntax/control_expressions.rdoc: Omit optional "then" for if and
- unless expressions. Improved description of "a if a = 0.zero?"
- NameError. Note that "do" for for loop is optional.
-
-Wed Jan 16 03:28:47 2013 Eric Hodel <drbrain@segment7.net>
-
- * doc/syntax/calling_methods.rdoc: Link to defining methods.
- * doc/syntax/methods.rdoc: Link to calling methods, fixed typo.
-
-Wed Jan 16 03:15:00 2013 Eric Hodel <drbrain@segment7.net>
-
- * doc/syntax/methods.rdoc: Fixed link
- * doc/syntax/modules_and_classes.rdoc: Fixed link
- * doc/syntax.rdoc: Updated with links to the recently added pages
-
-Wed Jan 16 03:05:50 2013 Eric Hodel <drbrain@segment7.net>
-
- * doc/syntax/control_expressions.rdoc (redo Statement): Added note
- about retry.
- * doc/syntax/exceptions.rdoc: Added retry statement
-
-Tue Jan 15 23:12:34 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * tool/vpath.rb (VPath#list): default separator to PATH_SEPARATOR from
- configure.in for make, not same name constant of File for use in ruby.
-
-Tue Jan 15 22:30:04 2013 Keiju Ishitsuka <keiju@ishitsuka.com>
-
- * lib/irb/ext/save-history.rb: identify rightly a status of a
- history file that already exists [Bug #7694]. Thanks Nobuhiro IMAI
- for this patch.
-
-Tue Jan 15 15:55:28 2013 Eric Hodel <drbrain@segment7.net>
-
- * doc/syntax/control_expressions.rdoc: Added description of control
- expressions in ruby.
-
-Tue Jan 15 13:33:00 2013 Eric Hodel <drbrain@segment7.net>
-
- * doc/syntax/methods.rdoc (Method Names): Added method names including
- operator methods.
- * doc/syntax/methods.rdoc (Return Values): Added note that assignment
- methods ignore return values.
- * doc/syntax/precedence.rdoc: Added document describing precedence.
-
-Tue Jan 15 11:49:31 2013 Eric Hodel <drbrain@segment7.net>
-
- * doc/syntax/methods.rdoc (Block Argument): Added section on block
- argument. Thanks to Andy Lindeman.
-
-Tue Jan 15 10:54:59 2013 Eric Hodel <drbrain@segment7.net>
-
- * doc/syntax/calling_methods.rdoc (Arguments): Added improved
- introduction to arguments including passing style and lazy
- evaluation. Thanks to Matt Aimonetti.
- * doc/syntax/calling_methods.rdoc (Positional Arguments): Added
- description for sending a message to a method with *arguments
- * doc/syntax/calling_methods.rdoc (Default Positional Arguments):
- Added description. Thanks to Andy Lindeman.
- * doc/syntax/calling_methods.rdoc (Block Local Arguments):
- Added description of block locals. Thanks to Justin Collins.
- * doc/syntax/calling_methods.rdoc (Hash to Keyword Arguments): Added
- section describing ** operator. Thanks to Justin Collins.
-
-Tue Jan 15 10:40:18 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * test_lazy_enumerator: Test that map & flat_map also require a block
-
-Tue Jan 15 09:22:47 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread_pthread.c (gvl_init): Reset gvl.wait_yield explicitly when
- fork()ing. Patch by Apollon Oikonomopoulos. Thanks!
- [Bug #7693][ruby-core:51424]
-
-Tue Jan 15 09:27:56 2013 Eric Hodel <drbrain@segment7.net>
-
- * doc/syntax/calling_methods.rdoc (Receiver): Added :: as pointed out
- by Tony Arcieri
- * doc/syntax/calling_methods.rdoc (Block Argument): Fixed { } block
- examples as pointed out by David Copeland.
-
-Tue Jan 15 09:10:29 2013 Eric Hodel <drbrain@segment7.net>
-
- * doc/syntax/methods.rdoc (Array/Hash Argument): Moved above Keyword
- Arguments
- * doc/syntax/methods.rdoc (Keyword Arguments): Described ** for
- gathering arbitrary keyword arguments.
-
-Tue Jan 15 08:56:37 2013 Eric Hodel <drbrain@segment7.net>
-
- * doc/syntax/calling_methods.rdoc: Added document describing method
- calls.
-
-Tue Jan 15 07:39:21 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc/top_level.rb: Fixed extension trimming for page names in
- RDoc HTML output. [ruby-trunk - Bug #7673]
- * test/rdoc/test_rdoc_top_level.rb: Test for above.
-
-Mon Jan 14 23:06:41 2013 Keiju Ishitsuka <keiju@ishitsuka.com>
-
- * lib/irb/ext/save-history.rb: outputs its history to
- owner-only-readable file and change the permission of a file that
- already exists [Bug #7694]. Thanks Nobuhiro IMAI for bug reports.
-
-Mon Jan 14 17:12:48 2013 Shugo Maeda <shugo@ruby-lang.org>
-
- * enumerator.c (lazy_flat_map_func): flat_map should call each only
- when the value of a block returns a forcable object.
- [ruby-core:51401] [Bug #7690]
-
- * enumerator.c (lazy_flat_map): add documentation.
-
- * test/ruby/test_lazy_enumerator.rb: related test.
-
-Mon Jan 14 16:42:28 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * enumerator.c: Require block for Lazy#{take|drop}_while [Bug #7692]
-
-Mon Jan 14 14:41:00 2013 Kenta Murata <mrkn@mrkn.jp>
-
- * ext/bigdecimal/bigdecimal.c (BigDecimal_to_s): use CRuby style.
-
-Mon Jan 14 14:39:00 2013 Kenta Murata <mrkn@mrkn.jp>
-
- * ext/bigdecimal/bigdecimal.c: use `RB_TYPE_P(x, t)` instead of
- `TYPE(x) == t`.
-
-Mon Jan 14 10:18:56 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * enumerator.c: Fix size for Enumerator::Lazy#flat_map
-
-Mon Jan 14 07:12:52 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * lib/matrix/lup_decomposition: Fix bugs with LUP Decomposition of
- rectangular matrices. [rubyspec:ba849801a85]
-
-Mon Jan 14 06:46:53 2013 NARUSE, Yui <naruse@ruby-lang.org>
-
- * regparse.c (add_ctype_to_cc): don't check dup warn on adding
- negative ctype to cclass. [Bug #7471] [ruby-core:50344]
-
-Mon Jan 14 06:06:03 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * lib/matrix/eigenvalue_decomposition: Backport bugfix of Jama 1.0.3
- [rubyspec:df87040be371]
-
-Sun Jan 13 16:45:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * ext/psych/yaml/scanner.c: Fix typos, patch by James Dabbs
- [Github tenderlove/psych#118]
-
-Sun Jan 13 15:00:00 2013 Kenta Murata <mrkn@mrkn.jp>
-
- * ext/bigdecimal/bigdecimal.c (BigDecimal_sub):
- need to specify precision for converting Rational and Float.
- [ruby-dev:46544] [Bug #7404]
-
- * ext/bigdecimal/bigdecimal.c (BigDecimal_mult): ditto.
-
- * ext/bigdecimal/bigdecimal.c (BigDecimal_divide): ditto.
-
- * ext/bigdecimal/bigdecimal.c (BigDecimal_DoDivmod): ditto.
-
- * ext/bigdecimal/bigdecimal.c (BigDecimal_divremain): ditto.
-
- * test/bigdecimal/test_bigdecimal.rb: add tests for the above fixes.
-
-Sun Jan 13 14:48:55 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * lib/matrix/eigenvalue_decomposition: Fix eigensystem with complex
- eigenvectors. Patch by pypypy567.
- [Bug #7208] [ruby-dev:46251] [rubyspec:242f8e55bd]
-
- * lib/matrix/lup_decomposition.rb: Fix error for rectangular matrices
- [bug#7620] [ruby-core:51118] [rubyspec:41f833ee2]
-
-Sun Jan 13 14:06:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/irb.rb, lib/prime.rb: Typos in overview
- Patch by Ershad K [Github Fixes #234]
-
-Sun Jan 13 13:40:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/open3.rb : Typo in Open3 overview. Patch by zed_0xff
- [Github Fixes #233]
-
-Sat Jan 12 17:42:00 2013 Kenta Murata <mrkn@cookpad.com>
-
- * numeric.c (do_coerce): fix for the exceptions which the coerce
- method raises. The optimization done by r38756 is preserved.
- [Bug #7645] [ruby-core:51213]
-
-Sat Jan 12 16:12:46 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * win32/setup.mak (-runtime-): see msvcrt from link header on mswin
- instead of running testing executable file, for cross compiling.
-
-Sat Jan 12 08:58:47 2013 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/visitors/to_ruby.rb: merge key values that
- contain something besides a hash should be left in tact.
-
- * test/psych/test_merge_keys.rb: test for change
-
-Sat Jan 12 07:52:47 2013 Masaki Suketa <masaki.suketa@nifty.ne.jp>
-
- * ext/win32ole/win32ole.c (ole_set_byref): support VT_UI8|VT_BYREF,
- VT_I8|VT_BYREF in cygwin and mingw.
-
- * ext/win32ole/win32ole.c (ole_variant2val): ditto.
-
- * test/win32ole/test_win32ole_variant.rb (test_s_new_with_i8_byref):
- ditto.
-
- * test/win32ole/test_win32ole_variant.rb (test_s_new_with_ui8_byref):
- ditto.
-
-Sat Jan 12 02:45:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * man/ruby.1 (options): include --*-encoding from r38784
-
-Fri Jan 11 23:34:48 2013 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-
- * ruby.c (usage): sort --*-encoding in help. (same order of -E)
-
-Fri Jan 11 16:56:29 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * tool/mkconfig.rb: use configured libdir value to fix
- --enable-load-relative on systems where libdir is not default value,
- overridden in config.site files. [ruby-core:47267] [Bug #6903]
-
-Fri Jan 11 11:59:32 2013 NARUSE, Yui <naruse@ruby-lang.org>
-
- * string.c (dispose_string): use rb_str_free for freeing string in
- parse.y. by Sokolov Yura <funny.falcon@gmail.com>
- https://github.com/ruby/ruby/pull/87 fix GH-87
-
-Fri Jan 11 09:56:22 2013 Shugo Maeda <shugo@ruby-lang.org>
-
- * insns.def (defineclass): private constants should not be accessed
- by scoped module definitions. The bug was introduced in r38495.
-
- * test/ruby/test_module.rb: related test.
-
-Fri Jan 11 02:11:59 2013 Shugo Maeda <shugo@ruby-lang.org>
-
- * lib/rbconfig/obsolete.rb (respond_to_missing?): use send because
- RbConfig.respond_to_missing? is now private.
-
-Thu Jan 10 22:00:58 2013 Koichi Sasada <ko1@atdot.net>
-
- * vm_core.h (VM_DEBUG_BP_CHECK): set 0 as default.
- This flag specifies checking BP consistency on each frame popping.
- Now, we don't have any trouble on it, so I remove it.
- If you feel any bugs about VM execution, then set it to 1.
-
-Thu Jan 10 21:03:05 2013 TAKANO `takano32' Mitsuhiro <tak@no32.tk>
-
- * cont.c: define FIBER_USE_NATIVE as 0 in ia64.
-
-Thu Jan 10 19:39:05 2013 TAKANO `takano32' Mitsuhiro <tak@no32.tk>
-
- * thread.c: fix RB_GC_SAVE_MACHINE_REGISTER_STACK define for ia64.
-
-Thu Jan 10 17:45:39 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * Makefile.in, win32/Makefile.sub ($(MKFILES)): continue if Makefile
- unchanged.
-
-Thu Jan 10 16:31:20 2013 Shugo Maeda <shugo@ruby-lang.org>
-
- * vm_insnhelper.c (vm_search_super_method): raise a TypeError
- instead of a NotImplementedError if self is not an instance of the
- current class. [ruby-dev:39772] [Bug #2402]
-
-Thu Jan 10 16:47:18 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/tk/extconf.rb (find_tcltk_header): use have_header instead of
- try_cpp, which is incredibly slow with VC.
-
-Thu Jan 10 15:55:28 2013 Shugo Maeda <shugo@ruby-lang.org>
-
- * numeric.c (do_coerce): remove an unused variable.
-
-Thu Jan 10 15:35:55 2013 Shugo Maeda <shugo@ruby-lang.org>
-
- * tool/gen_dummy_probes.rb: remove comments in probes.d to fix the
- compilation error introduced by r38755.
-
-Thu Jan 10 11:15:04 2013 Kenta Murata <mrkn@cookpad.com>
-
- * numeric.c (do_coerce): speed optimization by using rb_check_funcall
- instead of rb_rescue + rb_funcall.
- This fix is based on the patch by Benoit Daloze.
- [Bug #7645] [ruby-core:51213]
-
-Thu Jan 10 11:15:04 2013 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * probes.d: updating probes to be more symmetrical, adding
- documentation.
-
- * load.c: ditto
-
-Thu Jan 10 04:23:07 2013 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/scalar_scanner.rb: strip trailing dots from
- floats so that Float() will not raise an exception.
-
- * test/psych/test_numeric.rb: test to ensure "1." can be loaded
-
- * test/psych/test_string.rb: make sure "1." can round trip
-
-Thu Jan 10 03:38:40 2013 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/visitors/yaml_tree.rb: ascii only binary strings
- will be dumped as unicode. Thanks Paul Kunysch!
-
- * test/psych/test_string.rb: appropriate test
-
-Thu Jan 10 03:29:55 2013 Koichi Sasada <ko1@atdot.net>
-
- * compile.c (compile_array_): modify wrong optimization.
- A script "[print(1)]; print(2)" should output "12".
- However, the compiler had eliminated "[print(1)]" expression
- because it is void expression (unused array).
- Of course, side-effect should be remained.
- This issue is reported by Masaya Tarui.
-
- * bootstraptest/test_literal.rb: add a test.
-
-Wed Jan 9 22:07:42 2013 Masaki Matsushita <glass.saga@gmail.com>
-
- * load.c (load_lock): if thread shield is destroyed and there is no
- waiting thread, insert new thread shield into load_table.
- [Bug #7530] [ruby-core:50645]
-
-Wed Jan 9 21:43:32 2013 Masaki Matsushita <glass.saga@gmail.com>
-
- * load.c (load_lock): revert r38744. it should acquire new thread
- shield.
-
-Wed Jan 9 15:40:18 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm.c (th_init, ruby_thread_init): initialize root_svar with Qnil,
- since lep_svar_place() expects uninitialized svar to be nil, not 0.
-
-Wed Jan 9 13:20:23 2013 Masaki Matsushita <glass.saga@gmail.com>
-
- * test/ruby/test_require.rb: improve test for r38744.
- fix to use Tempfile instead of temporary file in current directory.
- the patch is from nobu (Nobuyoshi Nakada).
-
-Wed Jan 9 09:53:23 2013 Masaki Matsushita <glass.saga@gmail.com>
-
- * load.c (load_lock): fix not to delete thread shield twice.
- it may break the shield locked by another thread.
- [Bug #7530] [ruby-core:50645]
-
- * test/ruby/test_require.rb: a test for above.
-
-Wed Jan 9 02:13:22 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * include/ruby/ruby.h (RBasic): to be aligned on a VALUE size
- boundary. [Bug #7647]
-
-Tue Jan 8 14:41:41 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm_core.h (rb_iseq_t): move flip_cnt from struct iseq_compile_data,
- because it has same life span as enclosing iseq. [Bug #7671]
- [ruby-core:51296]
-
-Mon Jan 7 23:43:00 2013 Kenta Murata <mrkn@mrkn.jp>
-
- * ext/bigdecimal/bigdecimal.c (rmpd_power_by_big_decimal):
- add RB_GC_GUARD to prevent the intermediate object is GCed too early.
- This patch was made by Yusuke Endoh. [Bug #7044] [ruby-core:47632]
-
- * test/bigdecimal/test_bigdecimal.rb: add a reproduction test for
- the issue [Bug #7044]
-
-Mon Jan 7 21:40:36 2013 Shugo Maeda <shugo@ruby-lang.org>
-
- * vm_method.c (Init_eval_method): main.public and main.private
- should be private.
-
- * proc.c (Init_Proc): main.define_method should be private.
-
- * test/ruby/test_module.rb: related test.
-
-Mon Jan 7 20:48:47 2013 Shugo Maeda <shugo@ruby-lang.org>
-
- * eval.c (Init_eval): main.include should be private.
- [ruby-core:51293] [Bug #7670]
-
- * test/ruby/test_module.rb (test_top_include_is_private): a new test
- for the above change.
-
-Mon Jan 7 20:29:50 2013 Shugo Maeda <shugo@ruby-lang.org>
-
- * NEWS: remove description about `require "refinement"'.
-
-Mon Jan 7 20:15:49 2013 Shugo Maeda <shugo@ruby-lang.org>
-
- * eval.c (Init_eval): enable Refinements by default.
- [ruby-core:51286] [Bug #7667]
-
- * eval.c (rb_mod_refine, top_using): show a warning when
- Module#refine or main.using is called at the first time.
-
- * ext/refinement/*: removed the extension library "refinement".
-
- * test/ruby/test_refinement.rb: fix for the above changes.
-
-Mon Jan 7 17:34:22 2013 Koichi Sasada <ko1@atdot.net>
-
- * include/ruby/ruby.h (RUBY_EVENT_SPECIFIED_LINE): make it special.
- This flag is not contained by RUBY_EVENT_TRACEPOINT_ALL.
- This event is experimental one. It is possible to remove/rename
- flag name after 2.0.1.
-
- * vm_trace.c (get_event_id): return :line if SPECIFIED_LINE was
- occurred. `:specified_line' never been returned.
-
-Mon Jan 7 15:42:10 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (f_kwrest): allow bare kwrest_mark as valid syntax. its
- semantics is still undefined. [Bug #7662] [ruby-core:51269]
-
-Mon Jan 7 15:31:58 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (f_kwrest): reject duplicated kwrest argument name.
-
-Mon Jan 7 15:24:10 2013 Koichi Sasada <ko1@atdot.net>
-
- * vm_trace.c (rb_threadptr_exec_event_hooks_orig): pop tag before
- JUMP_TAG() if frame is `finish' frame.
- Without this patch, there is an inconsistency between control
- frame stack and tags stack.
- [Bug #7668]
-
- * test/ruby/test_settracefunc.rb: add a test for above.
-
-Mon Jan 7 15:21:48 2013 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * Makefile.in, common.mk (fake, yes-fake, no-make): these dependencies
- are not platform dependent.
-
- * win32/Makefile.sub ($(arch)-fake.rb): workaround.
-
-Mon Jan 7 12:09:24 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm_insnhelper.c (vm_callee_setup_arg_complex, vm_yield_setup_block_args):
- set keyrest hash after making rest array, so that the last element
- will not be overwritten. [ruby-core:51278] [Bug #7665]
-
-Mon Jan 7 09:37:24 2013 Koichi Sasada <ko1@atdot.net>
-
- * NEWS: add a NEWS entry about RubyVM.
-
-Sun Jan 6 19:06:57 2013 Yuki Yugui Sonoda <yugui@yugui.jp>
-
- * win32/Makefile.sub: Fix build with VC.
- Patch by Charlie Savage. Fixes [ruby-core:51261]
-
-Sun Jan 6 18:43:48 2013 Yuki Yugui Sonoda <yugui@yugui.jp>
-
- * bootstraptest/test_io.rb: add a test for [ruby-dev:46834].
-
- * io.c (rb_cloexec_fcntl_dupfd) Use an emulation with dup(2) when
- fcntl(2) and/or F_DUPFD is unavailable.
- Suggested by akr.
-
- * configure.in (HAVE_FCNTL): NativeClient does not provide fcntl(2).
-
-Sun Jan 6 11:11:26 2013 Eric Hodel <drbrain@segment7.net>
-
- * doc/syntax/modules_and_classes.rdoc: Fixed typo.
-
-Sun Jan 6 05:35:18 2013 Eric Hodel <drbrain@segment7.net>
-
- * doc/syntax/modules_and_classes.rdoc: Added singleton classes
- documentation.
-
-Sun Jan 6 02:22:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/webrick/httpservlet/abstract.rb (WEBrick::HTTPServlet): Typo in
- example. Patch by shlensky [Fixes #232 on github]
-
-Sat Jan 5 21:15:10 2013 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/net/http/generic_request.rb:
- Amazon ECA API and GTE/1.3 disallow requests whose host has port
- number if its port number equals to default port number of the
- scheme. [Bug #7650]
-
-Sat Jan 5 13:58:59 2013 Eric Hodel <drbrain@segment7.net>
-
- * doc/syntax/modules_and_classes.rdoc: Improved description of methods
- on a module or class as suggested by Tobias Buhlmann
-
-Sat Jan 5 13:38:07 2013 Masaki Matsushita <glass.saga@gmail.com>
-
- * string.c (rb_str_enumerate_lines): fix invalid byte sequence error
- when a separator is passed. The patch is from yoshidam (Yoshida
- Masato).
- [Bug #7646] [ruby-dev:46827]
-
- * test/ruby/test_string.rb: a test for above.
-
-Sat Jan 5 12:25:42 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * test/ruby/envutil.rb (Test::Unit::Assertions#assert_in_out_err):
- check stdout and stderr both.
-
-Sat Jan 5 10:21:54 2013 Eric Hodel <drbrain@segment7.net>
-
- * doc/syntax/modules_and_classes.rdoc: Added documentation of syntax
- for Modules and Classes.
- * doc/syntax/methods.rdoc: Moved some text to the Modules and
- Classes syntax document.
-
-Sat Jan 5 08:38:27 2013 Eric Hodel <drbrain@segment7.net>
-
- * doc/syntax/methods.rdoc: Added return values and scope sections,
- slightly modified from the original patch. Fixes #227 from github by
- Dave Brown.
-
-Sat Jan 5 08:21:41 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * io.c (rb_cloexec_fcntl_dupfd): improve #ifdef condition.
- * io.c (rb_maygvl_fd_fix_cloexec): ditto.
-
-Sat Jan 5 07:54:59 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems/commands/cleanup_command.rb: Clean all possible gems
- using multiple passes. Fixes RubyGems bug #422. Refactored for
- maintainability.
- * test/rubygems/test_gem_commands_cleanup_command.rb: Test for above.
-
-Sat Jan 5 05:04:39 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * gc.c (vm_xrealloc): add a few comment why we avoid realloc(ptr,0).
-
-Fri Jan 4 20:17:06 2013 Yuki Yugui Sonoda <yugui@yugui.jp>
-
- * Makefile.in (RBCONFIG): Moved from common.mk in order to use the
- variable in Makefile.in.
-
- * win32/Makefile.sub (RBCONFIG): Ditto.
-
-Fri Jan 4 19:45:50 2013 Yuki Yugui Sonoda <yugui@yugui.jp>
-
- * common.mk (run, parse): Use BTESTRUBY instead of MINIRUBY to handle
- cross-compiling cases, e.g. NativeClient.
-
-Fri Jan 4 17:58:16 2013 Yuki Yugui Sonoda <yugui@yugui.jp>
-
- * common.mk (yes-btest): btest depends on also $(arch)-fake.rb and
- rbconfig.rb on building for NativeClient.
-
- * Makefile.in (fake): Avoid generating $(arch)-fake.rb unless cross
- compiling.
-
- * configure.in (CROSS_COMPILING): New substitution.
-
-Fri Jan 4 16:26:45 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems/doctor.rb: Process directories in order in case the
- filesystem doesn't. [ruby-trunk - Bug #7618]
-
- Process specifications before other directories in case of bugs.
- * test/rubygems/test_gem_doctor.rb: Test for above.
-
- * lib/rubygems.rb: Updated version.
-
- * test/rubygems/test_require.rb: Fixed double require of
- benchmark.rb. RubyGems bug #420.
-
- * test/rubygems/test_gem_commands_check_command.rb: Fixed unused
- variable warnings.
- * test/rubygems/test_gem_commands_query_command.rb: ditto
- * test/rubygems/test_gem_installer.rb: ditto
-
-Fri Jan 4 15:05:25 2013 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc/cross_reference.rb: Fixed matching of C#=== or #===. RDoc
- bug #164
- * test/rdoc/test_rdoc_cross_reference.rb: Test for above.
-
- * lib/rdoc/parser/changelog.rb: Fixed parsing of dates. RDoc bug #165
- * test/rdoc/test_rdoc_parser_changelog.rb: Test for above.
-
- * lib/rdoc/parser.rb: Fixed parsing multibyte files with incomplete
- characters at byte 1024. [ruby-trunk - Bug #6393]
- Fixed handling of -E. [ruby-trunk - Bug #6392]
- * test/rdoc/test_rdoc_options.rb: Test for above.
- * test/rdoc/test_rdoc_parser.rb: ditto.
- * test/rdoc/test_rdoc_parser_c.rb: ditto.
- * test/rdoc/test_rdoc_parser_changelog.rb: ditto.
- * test/rdoc/test_rdoc_parser_markdown.rb: ditto.
- * test/rdoc/test_rdoc_parser_rd.rb: ditto.
- * test/rdoc/test_rdoc_rdoc.rb: ditto.
-
- * lib/rdoc/tom_doc.rb: Fixed parsing of [] in TomDoc arguments list.
- RDoc bug #167
- * test/rdoc/test_rdoc_tom_doc.rb: Test for above.
-
- * lib/rdoc.rb: Update version.
-
-Fri Jan 4 11:51:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/forwardable.rb: Fix rdoc parameters for ::def_single_delegator.
- Patch by Vladimir Andrijevik [Github Fixes #230]
-
-Fri Jan 4 00:35:11 2013 Yuki Yugui Sonoda <yugui@yugui.jp>
-
- Fix failures on btest for NativeClient.
- * bootstraptest/runner.rb (nacl?): New method to distinguish NaCl
- cross build.
-
- * bootstraptest/test_io.rb: Skip unsupported operations.
-
- * bootstraptest/test_literal.rb: ditto.
-
-Fri Jan 4 00:29:40 2013 Yuki Yugui Sonoda <yugui@yugui.jp>
-
- * io.c (rb_cloexec_fcntl_dupfd): Fix failures in
- bootstrap_test/test_io.rb. NativeClient does not support F_DUPFD
- but supports dup2(2).
-
-Thu Jan 3 17:46:50 2013 Kouhei Sutou <kou@cozmixng.org>
-
- * lib/rexml/element.rb (REXML::Elements#add): Remove too much
- "elements" in document. Sorry...
-
-Thu Jan 3 17:42:32 2013 Kouhei Sutou <kou@cozmixng.org>
-
- * lib/rexml/element.rb (REXML::Elements#each): Add missing
- "elements" in document. [ruby-talk:402713]
- Reported by Wesley Rishel. Thanks!!!
-
-Thu Jan 3 15:13:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * ext/psych/lib/psych.rb (Psych.load): Return value of
- Psych::SyntaxError.message should be same as example.
- Patch by Ippei Obayashi [ruby-core:51193] [Bug #7636]
-
-Thu Jan 3 14:58:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/forwardable.rb (SingleForwardable): Fix example in overview
- Patch by Vladimir Andrijevik [Github Fixes #231]
-
-Thu Jan 3 14:32:47 2013 Yuki Yugui Sonoda <yugui@yugui.jp>
-
- * configure.in (OBJCOPY): Fixes build error for NativeClient.
- Avoid disabling OBJCOPY for NativeClient.
-
- * thread_pthread.c (rb_reserved_fd_p): USE_SLEEPY_TIMER_THREAD is
- always defined. Fixes compilation error for NativeClient.
-
-Wed Jan 02 03:09:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * ext/zlib/zlib.c (Zlib::GzipReader): Fix typo by zed_0xff
- [Fixes Github #229]
-
-Wed Jan 02 02:29:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * hash.c (rb_hash_update): Revert documentation from r38672
- See: https://github.com/ruby/ruby/pull/228#issuecomment-11791013
-
-Wed Jan 02 02:16:00 2013 Zachary Scott <zachary@zacharyscott.net>
-
- * hash.c (rb_hash_update): Documentation for Hash#merge and shallow
- copies Patch by Yorick Peterse [Fixes Github #228]
-
-Mon Dec 31 15:10:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * vm_backtrace.c: Add documentation for Kernel#caller_locations,
- Kernel#caller, and Thread::Backtrace::Location
-
-Mon Dec 31 13:05:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * test/ruby/test_backtrace.rb: Add test for r37957 [Feature #7434]
-
-Sun Dec 30 23:33:36 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (simple_re_meta): escaped closing parenthesis has different
- meaning. [Bug #7610] [ruby-core:51088]
-
-Sun Dec 30 12:09:47 2012 Charlie Somerville <charlie@charliesomerville.com>
-
- * configure.in: use 4 argument form of AC_CHECK_HEADERS to force
- autoconf to use compiler's result
-
-Sun Dec 30 10:58:04 2012 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * test/ruby/test_keyword.rb: add a test for passing hash
- as a last argument. [ruby-dev:46712] [Bug #7529]
-
-Sun Dec 30 10:51:29 2012 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * vm_insnhelper.c: set keyword hash on Proc/block calls.
- [ruby-core:51172] [Bug #7630]
-
- * test/ruby/test_keyword.rb: add tests for above.
-
-Sat Dec 29 21:57:11 2012 Keiju Ishitsuka <keiju@ishitsuka.com>
-
- * lib/irb/completion.rb: treat rightly completion for symbol on irb
- [Bug #7632].
-
-Sat Dec 29 21:51:30 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * ext/curses/curses.c (window_cury, window_curx, window_maxy,
- window_maxx, window_begy, window_begx): use RB_UNUSED_VAR()
- to suppress unused-but-set-variable warnings.
-
-Sat Dec 29 16:45:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * iseq.c (RubyVM::InstructionSequence): rdoc formatting
-
-Sat Dec 29 15:28:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * iseq.c (RubyVM::InstructionSequence): Add rdoc for new iseq features
- added from r38085, this includes ::of, #path, #absolute_path,
- #label, #base_label, #first_lineno, and #inspect
-
-Sat Dec 29 14:06:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * iseq.c (rb_iseq_line_trace_all, rb_iseq_line_trace_specify): Add
- rdoc for experimental C level api of iseq, from r38076
-
-Sat Dec 29 11:37:36 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * object.c (rb_obj_clone): attach clone to its singleton class during
- cloning singleton class so that singleton_method_added will be called
- on it. based on the patch by shiba (satoshi shiba)[Bug #5283] in
- [ruby-dev:44477]. [Bug #5283]
-
-Sat Dec 29 10:10:39 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in (crt_externs.h): use standard macro AC_CHECK_HEADERS.
-
-Fri Dec 28 23:12:44 2012 Charlie Somerville <charlie@charliesomerville.com>
-
- * configure.in: check for the whether crt_externs.h is present when compiling
- for darwin (this header is missing in the iOS SDK)
- * eval_intern.h: check HAVE_CRT_EXTERNS_H before including crt_externs.h, if
- not defined, include missing/crt_externs.h instead
- * hash.c: ditto
- * missing/setproctitle.c: ditto
- * missing/crt_externs.h: declare _NSGetEnviron() function and define environ
- for iOS
-
-Fri Dec 28 21:40:36 2012 Keiju Ishitsuka <keiju@ishitsuka.com>
-
- * lib/irb/context.rb: IRB::Context#new: Check from JobManager
- inside IRB namespace [Bug #7628]. Thanks rafaelfranca for bug
- report and its patch.
-
-Fri Dec 28 17:06:17 2012 Akinori MUSHA <knu@iDaemons.org>
-
- * misc/ruby-electric.el (ruby-electric-curlies): Automatically
- indent closing curly brackets when
- ruby-electric-newline-before-closing-bracket is true.
-
-Fri Dec 28 11:50:42 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm_insnhelper.c (vm_yield_setup_block_args): pass single argument to
- single optional parameter unchanged without splatting. [Bug #7621]
- [ruby-dev:46801]
-
-Fri Dec 28 11:17:47 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * proc.c (method_eq): fix the documentation to refer to owner.
- [ruby-core:51105] [Bug #7613]
-
- * test/ruby/test_method.rb (test_alias_onwer): new test to confirm
- that `a == b' returns false if owners of a and b are different.
-
-Fri Dec 28 07:07:43 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * def/id.def: use split(/^/) instead of String#lines to support
- Ruby 1.8.5 as BASERUBY.
-
-Thu Dec 27 21:56:56 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * variable.c (rb_mod_remove_const): fix segv caused by r38558.
-
-Tue Dec 28 01:13:48 2012 James Edward Gray II <james@graysoftinc.com>
-
- * lib/csv.rb: Added more Hash methods to CSV::Row.
-
-Thu Dec 27 23:27:15 2012 Keiju Ishitsuka <keiju@ishitsuka.com>
-
- * lib/irb/ruby-lex.rb: make lex_state to EXPR_END when next token
- is an operator after SYMBEG [Bug #6378].
-
-Thu Dec 27 21:30:21 2012 Keiju Ishitsuka <keiju@ishitsuka.com>
-
- * lib/irb/ruby-lex.rb: allow to handle recursive heredocs on
- irb[Bug #5648].
-
-Thu Dec 27 20:45:29 2012 Masaki Matsushita <glass.saga@gmail.com>
-
- * ext/stringio/stringio.c (strio_getline): fix not to raise TypeError
- when limit is nil.
- [Bug #7232] [ruby-core:48531]
-
- * test/stringio/test_stringio.rb: a test for above.
-
-Thu Dec 27 21:08:23 2012 Charlie Somerville <charlie@charliesomerville.com>
-
- * vm_core.h (VM_DEFINECLASS_TYPE): explicit cast to enum type to avoid 64->32
- shorten warning
-
-Thu Dec 27 20:11:29 2012 Masaki Matsushita <glass.saga@gmail.com>
-
- * ext/stringio/stringio.c (strio_ungetc): raise IOError instead of RuntimeError
- if the string is frozen.
- [Bug #7231] [ruby-core:48530]
-
- * ext/stringio/stringio.c (strio_ungetbyte): ditto.
-
- * test/stringio/test_stringio.rb: a test for above.
-
-Wed Dec 26 23:55:18 2012 Keiju Ishitsuka <keiju@ishitsuka.com>
-
- * lib/irb/context.rb: fix IRB::Inspector#keys_with_inspector [Bug #7598]
-
-Wed Dec 26 23:26:15 2012 Keiju Ishitsuka <keiju@ishitsuka.com>
-
- * lib/irb/context.rb: IRB::Context#use_readline= has been obsolete
- [Bug #6339].
-
-Wed Dec 26 21:32:46 2012 Keiju Ishitsuka <keiju@ishitsuka.com>
-
- * lib/irb/context.rb: make a correct prompt from
- IRB.conf[:IRB_NAME] on irb [Bug #6338]. Patched by sho-h.
-
-Wed Dec 26 21:09:19 2012 Keiju Ishitsuka <keiju@ishitsuka.com>
-
- * lib/irb/ext/math-mode.rb: make not able to change math-mode
- after irb starting [Bug #6302]. Patched by sho-h.
-
-Wed Dec 26 12:52:36 2012 Keiju Ishitsuka <keiju@ishitsuka.com>
-
- * lib/irb/init.rb: change default debug level for
- irb[ruby-dev:46805], [Bug #6301].
-
-Wed Dec 26 11:54:11 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * configure.in: enable -fPIE when checking -pie for fixing
- OpenBSD build error. Patch by George Koehler. Thank you!
- [Bug #7606] [ruby-core:51082]
-
-Wed Dec 26 07:31:24 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * string.c (rb_enc_cr_str_copy_for_substr): empty string is always
- valid or 7bit.
-
- * string.c (rb_str_enumerate_lines, rb_str_chop): reduce duplicated
- code.
-
- * string.c (rb_str_enumerate_chars): prevent shared copy from GC.
-
-Wed Dec 26 01:31:16 2012 Keiju Ishitsuka <keiju@ishitsuka.com>
-
- * lib/irb/init.rb, lib/irb/context.rb: fix conf.debug_level=
- [Bug #6301] and fix irb command option: -- irb_debug_level for irb.
-
-Wed Dec 26 00:59:18 2012 Keiju Ishitsuka <keiju@ishitsuka.com>
-
- * lib/irb/ruby-lex.rb: improve RubyLex performance for large files
- [Bug #5202]. Patch by ryanmelt.
-
-Tue Dec 25 22:21:06 2012 Keiju Ishitsuka <keiju@ishitsuka.com>
-
- * lib/irb/output-method.rb: raise right exception when
- IRB::OutputMethod#print don't defined [Bug #6657].
-
-Tue Dec 25 22:06:33 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_trace.c (rb_threadptr_exec_event_hooks_and_pop_frame):
- pop a frame before JUMP_TAG() if exception occurred.
- This change fix bug of Ruby 1.9.
- [ruby-core:51128] [ruby-trunk - Bug #7624]
-
- * vm_core.h (EXEC_EVENT_HOOK_AND_POP_FRAME): add to use
- `rb_threadptr_exec_event_hooks_and_pop_frame()'.
-
- * vm.c (vm_exec): use EXEC_EVENT_HOOK_AND_POP_FRAME() while
- exception handling. While exception handling, if an exception
- is raised in hooks, need to pop current frame and raise this
- raised exception by hook.
-
- * test/ruby/test_settracefunc.rb: add a test.
-
-Tue Dec 25 21:08:53 2012 Keiju Ishitsuka <keiju@ishitsuka.com>
-
- * lib/irb/init.rb, lib/irb/lc/ja/error.rb, lib/irb/lc/error.rb:
- raise exception when illegal RC_NAME_GENERATOR defined [Bug #6455].
-
-Tue Dec 25 19:22:17 2012 Keiju Ishitsuka <keiju@ishitsuka.com>
-
- * lib/irb/workspace.rb: define method to private on top-level irb
- [Bug #5776]. Patch by davidbalbert.
-
-Tue Dec 25 19:09:51 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * bignum.c, include/ruby/intern.h (rb_big_eql): exported.
-
- * thread.c (recursive_check): object_id maybe a Bignum, not Fixnum on
- LLP64. see also r38493 and r38548.
- reported by Heesob Park at [ruby-core:51083] [Bug #7607], and patched
- by shirosaki at [ruby-core:51095]
-
-Tue Dec 25 18:53:35 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_core.h, eval_intern.h (CHECK_STACK_OVERFLOW): move
- CHECK_STACK_OVERFLOW() to vm_core.h and rename to
- CHECK_VM_STACK_OVERFLOW().
- This change is only move and rename.
-
- * tool/instruction.rb: catch up above changes.
-
- * vm.c, vm_insnhelper.c: ditto.
-
- * vm_insnhelper.c (vm_stackoverflow): add a function to unify
- raising vm stackoverflow exception.
-
-Tue Dec 25 16:16:54 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_core.h (RUBY_VM_THREAD_VM_STACK_SIZE): change default
- VM stack size (128 KB or 256 KB -> 512 KB or 1024 KB).
- This re-sizing corrects smaller value introduced at r38478.
- Newer value is same VM stack size of Ruby 1.9.
- [ruby-dev:46797] [ruby-trunk - Bug #7603]
-
-Tue Dec 25 13:38:12 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * error.c (compile_err_append, compile_warn_print, warn_print): use
- rb_write_error_str() instead of writing to rb_stderr directly.
-
- * io.c (rb_write_error_str): a stopgap measure not to unblock GVL.
- warning from require seems to still have race condition errors.
-
-Tue Dec 25 00:59:29 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * node.h (NODE_OP_CDECL), compile.c (iseq_compile_each),
- parse.y (stmt, arg): allow scoped constant op-assignment.
- [ruby-core:40154] [Bug #5449]
-
-Mon Dec 24 04:56:48 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/net/http/generic_request.rb (Net::HTTPGenericRequest):
- set content-length to zero on empty post requests
- by Gregory Ostermayr <gregory.ostermayr@gmail.com>
- https://github.com/ruby/ruby/pull/201 fix GH-201
-
-Sun Dec 23 19:09:16 2012 Koichi Sasada <ko1@atdot.net>
-
- * thread.c: rename methods:
- from Thread.async_interrupt_timing to Thread.handle_interrupt,
- from Thread.async_interrupted? to Thread.pending_interrupt?.
- Also rename option from `defer' to `never'.
- [ruby-core:51074] [ruby-trunk - Feature #6762]
-
- * vm_core.c, thread.c: rename functions and data structure
- `async_errinfo' to `pending_interrupt'.
-
- * thread.c: add global variables sym_immediate, sym_on_blocking and
- sym_never.
-
- * cont.c, process.c, vm.c, signal.c: ditto.
-
- * lib/sync.rb, lib/thread.rb: catch up this renaming.
-
- * test/ruby/test_thread.rb: ditto.
-
-Sun Dec 23 17:57:30 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/profiler.rb (Profiler__::PROFILE_PROC, print_profile): store
- profile data per threads for concurrent-execution.
- [ruby-core:22046] [Bug #1152]
-
- * lib/profiler.rb (Profiler__::Wrapper): support calling singleton
- methods of an instance of BasicObject.
-
- * lib/profiler.rb (Profiler__::PROFILE_PROC): use TracePoint.
-
-Sun Dec 23 16:13:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/erb.rb: typos for ERB::new link
-
-Sun Dec 23 16:06:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/erb.rb: Document ERB::new trim_mode '-' for lines ending in -%>
- [ruby-core:51084] [Bug #7608]
-
-Sun Dec 23 15:25:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/irb/ruby-lex.rb: Add handling for %i and %I quoting to irb
- Patch by flori [ruby-core:49550] [Bug #7392] [Github Issue #157]
-
-Sun Dec 23 15:05:48 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm_eval.c (rb_check_funcall_with_hook): rb_check_funcall with hook
- which is called before calling method_missing or target method.
-
- * marshal.c (w_object, r_object0): use rb_check_funcall_with_hook
- instead of respond_to? and call.
-
-Sun Dec 23 14:52:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * re.c (rb_reg_eqq): doc: #=== is not a synonym for #=~, added example
- [ruby-dev:46746] [Bug #7571]
-
-Sun Dec 23 14:35:13 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * thread.c (BLOCKING_REGION): if fail_if_interrupted is false ignore
- the result of blocking_region_begin(), since it always is true in
- that case. suppress "uninitialized" warnings.
-
-Sun Dec 23 09:34:07 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems/commands/check_command.rb: Added --doctor and --dry-run
- options to clean up after failed uninstallation.
- * test/rubygems/test_gem_commands_check_command.rb: Test for above.
-
- * lib/rubygems/commands/push_command.rb: Allow pushes from RubyGems
- 2.0.0.preview3
-
- * lib/rubygems/commands/update_command.rb: Use Gem.ruby_version
-
- * lib/rubygems/dependency.rb: Update style.
-
- * lib/rubygems/installer.rb: Ensure installed gem specifications will
- be useable. Refactor.
- * test/rubygems/test_gem_installer.rb: ditto.
-
- * lib/rubygems/validator.rb: Fixed bug with unreadable files.
-
- * lib/rubygems.rb: Fixed broken methods.
- * test/rubygems/test_gem.rb: Test for above.
-
- * test/rubygems/test_gem_commands_push_command.rb: Fixed overridden
- Gem.latest_rubygems_version
-
-Sun Dec 23 01:52:01 2012 Akinori MUSHA <knu@iDaemons.org>
-
- * io.c (rb_io_lines, rb_io_bytes, rb_io_chars, rb_io_codepoints):
- Deprecate IO#{lines,bytes,chars,codepoints} and those of ARGF.
- [Feature #6670]
-
- * ext/stringio/stringio.c (strio_lines, strio_bytes, strio_chars)
- (strio_codepoints): Deprecate
- StringIO#{lines,bytes,chars,codepoints}. [Feature #6670]
-
- * ext/zlib/zlib.c (rb_gzreader_lines, rb_gzreader_bytes):
- Deprecate Zlib::GzipReader#{lines,bytes}. [Feature #6670]
-
-Sat Dec 23 01:35:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/optparse.rb: Documentation for OptionParser to remove 'shadowed
- outer local variable' from example and make obvious ARGV with
- non-option arguments.
- Patch by Marcus Stollsteimer [ruby-core:47460] [Bug #6997]
-
-Sat Dec 23 00:08:00 2012 Kenta Murata <mrkn@mrkn.jp>
-
- * include/ruby/intern.h: add the prototype declaration of
- rb_num_coerce_bit.
-
- * numeric.c (rb_num_coerce_bit): the new coerce function for bitwise
- binary operation.
-
- * bignum.c (rb_big_and): use coerce to convert the argument, which isn't
- a Fixnum nor a Bignum, to the corresponding Integer object so that
- bitwise operations can support Integer-mimic objects.
- [Bug #1792] [ruby-core:39491]
-
- * bignum.c (rb_big_or): ditto.
-
- * bignum.c (rb_big_xor): ditto.
-
- * numeric.c (bit_coerce): ditto.
-
- * numeric.c (fix_and): ditto.
-
- * numeric.c (fix_or): ditto.
-
- * numeric.c (fix_xor): ditto.
-
- * test/ruby/test_integer.rb: add tests for the above changes.
-
- * test/ruby/test_bignum.rb: ditto.
-
-Sun Dec 23 00:04:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * internal.h (QUOTE, QUOTE_ID): quote unprintable chars in strings and
- IDs. [Bug #7574] [ruby-dev:46749]
-
- * string.c (rb_str_quote_unprintable): ditto.
-
-Sat Dec 22 23:59:18 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * error.c (rb_compile_error, rb_compile_warn, rb_compile_warning),
- (rb_warn, rb_warning): support PRIsVALUE.
-
-Sat Dec 22 22:04:58 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
-
- * cont.c (rb_fiber_start): unify conditions.
-
-Sat Dec 22 21:47:55 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * io.c (rb_io_wait_writable): use rb_thread_check_ints() instead
- of rb_thread_fd_writable().
- * io.c (rb_io_wait_readable): ditto.
-
-Sat Dec 22 20:31:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * object.c (rb_mod_const_get): symbol cannot be nested constant name.
-
-Sat Dec 22 19:26:35 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * object.c (rb_mod_const_get): check more strictly. [ruby-dev:46748]
- [Bug #7573]
-
-Wed Dec 19 02:34:48 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
-
- * cont.c (rb_fiber_start): in case of jump with TAG_FATAL,
- enqueue error into async_errinfo_queue, because you cannot call
- TH_TAG_JUMP() in this function. [ruby-dev:45218] [Bug #5993]
-
- * thread.c (rb_threadptr_execute_interrupts): now INT2FIX(TAG_FATAL)
- can be popped from async_errinfo_queue.
-
- * vm.c (rb_vm_make_jump_tag_but_local_jump): revert r38441.
- rb_vm_make_jump_tag_but_local_jump() shouldn't return exception
- in case of state == TAG_FATAL.
-
- * test/ruby/test_fiber.rb (test_exit_in_fiber): fix a test to illuminate
- Thread.exit should terminate current Thread.
-
-Sat Dec 22 13:15:08 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * gc.c (obj_id_to_ref): add a macro to treat Bignum object id.
- This follows the change r38493.
-
- * gc.c (id2ref): fix for working fine with Bignum object id on x64
- Windows.
- * gc.c (wmap_finalize): ditto.
-
-Sat Dec 22 11:30:21 2012 Masaki Matsushita <glass.saga@gmail.com>
-
- * struct.c (make_struct): remove junk ID check to allow members who
- have junk name like "foo\000".
- * test/ruby/test_struct.rb: Test for above.
- [Bug #7575] [ruby-dev:46750]
-
-Sat Dec 22 05:34:54 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/net/http.rb: Requests may be created with a URI which sets the
- Host header. Responses contain the requested URI for easier redirect
- following. [ruby-trunk - Feature #6482]
- * lib/net/http/generic_request.rb: ditto.
- * lib/net/http/response.rb: ditto.
- * NEWS (net/http): Updated for above.
- * test/net/http/test_http.rb: Tests for above.
- * test/net/http/test_http.rb: ditto.
- * test/net/http/test_httpresponse.rb: ditto.
-
-Sat Dec 22 02:35:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/irb/slex.rb(#match): Typo, should be D_DETAIL
- [ruby-core:51071] [Bug#7600]
-
-Sat Dec 22 02:29:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/irb/input-method.rb, lib/irb.rb: Typo in
- InputMethod#readable_atfer_eof? to #readable_after_eof?
- [ruby-core:51069] [Bug #7599]
-
-Sat Dec 22 02:19:38 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * vm_dump.c (rb_vm_bugreport): revert r38533.
- * addr2line.c (fill_lines): add ELF sanity check.
- [Bug #7597] [ruby-dev:46786]
-
-Sat Dec 22 02:05:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/irb/inspector.rb, lib/irb/context.rb: Move IRB::INSPECTORS and
- class methods to IRB::Inspector [ruby-core:51067][Bug #7598]
-
-Sat Dec 22 00:28:46 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * object.c (rb_obj_hash): shouldn't assume object_id can be long.
- based on a patch by Heesob Park at [ruby-core:51060].
- cf. [Backport #7454]
-
-Fri Dec 21 23:15:25 2012 Kouhei Sutou <kou@cozmixng.org>
-
- * ext/fiddle/lib/fiddle/struct.rb (Fiddle::CStructEntity#set_ctypes):
- CPtr -> Pointer.
- * test/fiddle/test_c_struct_entry.rb
- (Fiddle::TestCStructEntity#test_aref_pointer):
- Added the test for the above.
-
-Fri Dec 21 23:12:05 2012 Kouhei Sutou <kou@cozmixng.org>
-
- * ext/fiddle/lib/fiddle/struct.rb (Fiddle::CStructEntity#set_ctypes):
- CPtr -> Pointer.
- * test/fiddle/test_c_struct_entry.rb
- (Fiddle::TestCStructEntity#test_aref_pointer_array):
- Added the test for the above.
-
-Fri Dec 21 22:43:36 2012 Kouhei Sutou <kou@cozmixng.org>
-
- * ext/fiddle/lib/fiddle/import.rb (Fiddle::Importer#sizeof):
- CPtr -> Pointer.
- * test/fiddle/test_import.rb (Fiddle::TestImport#test_sizeof):
- Added the test for the above.
-
-Fri Dec 21 22:34:17 2012 Koichi Sasada <ko1@atdot.net>
-
- * test/ruby/test_iseq.rb: disable a test which checks features
- removed at r38532.
-
-Fri Dec 21 22:02:00 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/{dir.h,win32.c} (rb_w32_readdir): removed old rb_w32_readdir()
- and renamed from rb_w32_readdir_with_enc().
- [ruby-core:24864] [Feature #1927]
-
- * dir.c (READDIR): follow above change.
-
-Fri Dec 21 21:12:54 2012 Masaya Tarui <tarui@ruby-lang.org>
-
- * vm_dump.c (rb_vm_bugreport): commentout addr2line call temporarily
- in order to avoid segv. anyone can fix addr2line?
- [Bug #7597] [ruby-dev:46786]
-
-Fri Dec 21 20:38:28 2012 Koichi Sasada <ko1@atdot.net>
-
- * iseq.c (Init_ISeq): remove definition of the following methods:
- ISeq#line_trace_all and ISeq#line_trace_specify because they are
- half baked.
- C APIs are remained as experimental. These functions will be
- renamed, removed their parameters may be changed.
- You can use these methods by C exts. Please give us your comments.
-
-Fri Dec 21 20:21:04 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_trace.c (tracepoint_new): add code to support specified thread.
- But not tested and this feature is not supported officially.
-
-Fri Dec 21 19:37:15 2012 Koichi Sasada <ko1@atdot.net>
-
- * ruby.c (process_options): need to acquire env from TOPLEVEL_BINDING
- each time.
- `bind->env' may update after `eval()'.
- [Bug #7536]
-
-Fri Dec 21 18:46:50 2012 Koichi Sasada <ko1@atdot.net>
-
- * include/ruby/debug.h, vm_core.h: define rb_trace_arg_t at
- include/ruby/debug.h (move from vm_core.h).
-
-Fri Dec 21 17:48:15 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_core.h, vm_trace.c: fix multi-threading bug for tracing.
- Move `trace_arg' from rb_tp_t::trace_arg to rb_thread_t::trace_arg.
- `trace_arg' may changed by multiple threads.
- rb_thread_t::trace_arg can represent rb_thread_t::trace_running
- (null or non-null) and rb_thread_t::trace_running is removed.
- After that, `rb_tp_t' is not needed to check tracing or not
- (A running thread knows tracing or not). This is why I remove
- tp_attr_check_active() and make new function get_trace_arg().
-
- And this modification disable to work the following code:
- TracePoint.trace{|tp|
- Thread.new{p tp.event} # access `tp' from other threads.
- }
- I believe nobody mix threads at trace procedure.
- This is current limitation.
- [Bug #7590]
-
- * cont.c (fiber_switch, rb_cont_call): use rb_thread_t::trace_arg
- instead of rb_thread_t::trace_running.
-
- * test/ruby/test_settracefunc.rb: add a multi-threading test.
-
-Fri Dec 21 16:38:08 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * template/id.h.tmpl (ID2ATTRSET): compile time constant macro for
- ID_ATTRSET.
-
- * defs/id.def (KeywordError): check duplication.
-
- * defs/id.def: support for other scope IDs,
- ID_{INSTANCE,GLOBAL,CONST,CLASS}.
-
-Fri Dec 21 14:45:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/irb.rb, lib/irb/*: Documentation for IRB
-
-Fri Dec 21 11:31:02 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rake/*: Updated to rake 0.9.6
- * doc/rake/*: ditto
- * test/rake/*: ditto
-
-Fri Dec 21 08:56:34 2012 Masaya Tarui <tarui@ruby-lang.org>
-
- * vm_trace.c (rb_suppress_tracing): remove unused variable 'vm_tracing'
-
-Fri Dec 21 01:01:45 2012 Masaya Tarui <tarui@ruby-lang.org>
-
- * lib/irb/completion.rb (CompletionProc): support completion of
- instance variables. [ruby-dev:46710] [Bug #7520]
-
-Thu Dec 20 20:58:25 2012 Masaya Tarui <tarui@ruby-lang.org>
-
- * vm_trace.c (rb_suppress_tracing): bugfix for vm->trace_running
- counter. And if tracing is already true, vm_trace_running ops is
- skipped to control overflow.
-
-Thu Dec 20 18:29:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * include/ruby/ruby.h (RTEST, NIL_P): make bare expressions without
- outermost parentheses.
-
-Thu Dec 20 17:29:00 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * NEWS: fix the description for Refinements.
-
-Thu Dec 20 16:53:59 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * vm_core.h (rb_vm_defineclass_type_t),
- compile.c (iseq_compile_each), insns.def (defineclass): change the
- meaning of the third operand of defineclass as follows:
- lower 3bits: the type of the defineclass
- 0 = class, 1 = singleton class, 2 = module
- 4th bit: a flag represents whether the defineclass is scoped
- 0 = not scoped (e.g., class Foo)
- 1 = scoped (e.g., class Bar::Baz)
- 5th bit: a flag represents whether the superclass is specified
- 0 = not specified (e.g., class Foo)
- 1 = specified (e.g., class Bar < Foo)
- If the superclass is specified and is not a class, a TypeError
- should be raised. [ruby-dev:46747] [Bug #7572]
-
- * test/ruby/test_class.rb: related test.
-
-Thu Dec 20 16:52:37 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * NEWS: announce AEAD encryption support in the OpenSSL extension.
-
-Thu Dec 20 16:40:13 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * gc.c (nonspecial_obj_id): VALUE is not compatible with Fixnum on
- LLP64 platform, such as 64bit Windows.
- reported by Heesob Park at [ruby-core:50255] [Bug #7454], and the
- fix is suggested by akr.
-
-Thu Dec 20 16:39:04 2012 Martin Bosslet <Martin.Bosslet@gmail.com>
-
- * ext/openssl/ossl_cipher.c: fix errors for installations that do not
- feature Authenticated Encryption.
- * ext/openssl/extconf.rb: detect presence of EVP_CTRL_GCM_GET_TAG to
- determine whether Authenticated Encryption can be used.
- [Feature #6980] [ruby-core:47426]
-
-Thu Dec 20 15:55:46 2012 Martin Bosslet <Martin.Bosslet@gmail.com>
-
- * ext/openssl/ossl.c: do not use FIPS_mode_set if not available.
- * test/openssl/utils.rb: revise comment about setting FIPS mode to
- false.
- * test/openssl/test_fips.rb: remove tests that cause errors on
- ruby-ci.
- [Feature #6946] [ruby-core:47345]
-
-Thu Dec 20 15:22:59 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc/parser/ruby.rb: Ignore methods defined on constants to
- prevent modules with the names of constants from appearing in the
- documentation.
- * test/rdoc/test_rdoc_parser_ruby.rb: Test for the above.
-
-Thu Dec 20 15:00:33 2012 Martin Bosslet <Martin.Bosslet@gmail.com>
-
- * ext/openssl/ossl_cipher.c: add support for Authenticated Encryption
- with Associated Data (AEAD) for OpenSSL versions that support the
- GCM encryption mode. It's the only mode supported for now by OpenSSL
- itself. Add Cipher#authenticated? to detect whether a chosen mode
- does support Authenticated Encryption.
- * test/openssl/test_cipher.rb: add tests for Authenticated Encryption.
- [Feature #6980] [ruby-core:47426] Thank you, Stephen Touset for
- providing a patch!
-
-Thu Dec 20 12:56:53 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc/markup/to_html.rb (class RDoc): Added current heading and
- top links to headings.
- * lib/rdoc/generator/template/darkfish/rdoc.css: ditto
- * test/rdoc/test_rdoc_generator_markup.rb: Test for above
- * test/rdoc/test_rdoc_markup_to_html.rb: ditto
-
- * test/rdoc/test_rdoc_comment.rb: Removed trailing whitespace.
-
-Thu Dec 20 11:05:26 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * test/ruby/envutil.rb (assert_valid_syntax): move from
- test_syntax.rb.
-
- * test/ruby/envutil.rb (assert_normal_exit): validate syntax before
- running because this assertion passes even if the code fails by
- SyntaxError.
-
-Thu Dec 20 10:29:58 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * test/openssl/test_pkey_dh.rb: revert special treatment of
- FIPS-capable installations since FIPS mode is now disabled for the
- tests.
-
-Thu Dec 20 10:23:12 2012 Martin Bosslet <Martin.Bosslet@gmail.com>
-
- * ext/openssl/ossl.c: add OpenSSL.fips_mode= to allow enabling FIPS
- mode manually.
- * test/openssl/utils.rb: turn off FIPS mode for tests. This prevents
- OpenSSL installations with FIPS mode enabled by default from raising
- FIPS-related errors during the tests.
- * test/openssl/test_fips.rb: add tests for FIPS-capable OpenSSL
- installations.
- [Feature #6946] [ruby-core:47345]
-
-Thu Dec 20 06:59:52 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm.c: support variable VM/Machine stack sizes.
- Specified by the following environment variables:
- - RUBY_THREAD_VM_STACK_SIZE: vm stack size used at thread creation.
- default: 128KB (32bit CPU) or 256KB (64bit CPU).
- - RUBY_THREAD_MACHINE_STACK_SIZE: machine stack size used at thread
- creation. default: 512KB or 1024KB.
- - RUBY_FIBER_VM_STACK_SIZE: vm stack size used at fiber creation.
- default: 64KB or 128KB.
- - RUBY_FIBER_MACHINE_STACK_SIZE: machine stack size used at fiber
- creation. default: 256KB or 256KB.
- This values are specified at launched timing. You can not change
- these values at running time.
- Environ variables are only *hints* because:
- - They are aligned to 4KB.
- - They have minimum values (depend on OSs).
- - Machine stack settings are ignored by some OSs.
- Default values especially fiber stack sizes are increased.
- This change affect Fiber's behavior:
- (1) You can run more complex program on a Fiber.
- (2) You can not make many (thousands) Fibers because of
- lack of address space (on 32bit CPU).
- If (2) bothers you,
- (a) Use 64bit CPU with big memory, or
- (b) Specify RUBY_FIBER_(VM|MACHINE)_STACK_SIZE correctly.
- You need to choose correct stack size carefully. These values
- are completely rely on systems (OS/compiler and so on).
- [Feature #4614], [Bug #7212]
-
- * vm_core.h (rb_vm_t::default_params): add to record above settings.
-
- * vm.c (RubyVM::DEFAULT_PARAMS): add new constant to see
- above setting.
-
- * thread_pthread.c: support RUBY_THREAD_MACHINE_STACK_SIZE.
-
- * cont.c: support RUBY_FIBER_(VM|MACHINE)_STACK_SIZE.
-
- * test/ruby/test_fiber.rb: add tests for above.
-
- * test/ruby/test_thread.rb: ditto.
-
-Thu Dec 20 06:25:44 2012 Koichi Sasada <ko1@atdot.net>
-
- * test/ruby/test_fiber.rb: remove a strange single quote character.
- With this character, this script exits by SyntaxError.
-
-Thu Dec 20 01:03:00 2012 Zachary Scott <zachary@zacharyscott>
-
- * ext/.document: Add missing ext modules to .document
- Patch by Ryunosuke SATO [Fixes Github #224]
-
-Wed Dec 19 23:52:16 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * ruby.c (load_file_internal): use original C string as the filename
- for parser.
- reported by whiteleaf at [ruby-list:49085] [ruby-dev:46738]
- [Bug #7562]
-
-Wed Dec 19 23:36:12 2012 Naohisa Goto <ngotogenome@gmail.com>
-
- * marshal.c (marshal_dump, marshal_load): fix SEGV during make rdoc
- and test failure in TestMarshal#test_gc and test_context_switch
- on SPARC Solaris 10 compiled with Oracle Solaris Studio 12.3.
- [Bug #7591] [ruby-dev:46772]
-
-Wed Dec 19 19:34:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * object.c (rb_mod_const_get): nul byte is invalid as constant name.
-
-Wed Dec 19 17:54:18 2012 Masaya Tarui <tarui@ruby-lang.org>
-
- * vm_trace.c (rb_threadptr_exec_event_hooks): get rid of race
- condition. [Bug #7589] [ruby-dev:46763]
-
-Wed Dec 19 16:30:28 2012 Eric Hodel <drbrain@segment7.net>
-
- * doc/syntax/literals.rdoc: Added 0d decimal format. Thanks Nobu!
-
-Wed Dec 19 16:19:36 2012 Eric Hodel <drbrain@segment7.net>
-
- * doc/syntax/methods.rdoc: Fixed typo. Thanks to Josh Susser.
-
-Wed Dec 19 16:18:22 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems/commands/query_command.rb: Refactored to improve
- maintainability.
- * test/rubygems/test_gem_commands_query_command.rb: Note default gems
- in gem list details.
-
- * lib/rubygems/uninstaller.rb: Detect all gems for uninstallation.
- This allows duplicate installs of default gems to be removed.
- * lib/rubygems/specification.rb: Allow use of ::each_spec.
- * lib/rubygems/test_case.rb: Added install_default_gems.
- * test/rubygems/test_gem_commands_uninstall_command.rb: Moved test
- down to the uninstaller tests.
- * test/rubygems/test_gem_uninstaller.rb: Test for uninstallation of
- default gems and duplicate default gems.
-
-Wed Dec 19 15:23:50 2012 Eric Hodel <drbrain@segment7.net>
-
- * doc/syntax/methods.rdoc: Add () around keyword arguments example for
- consistency. Thanks to Josh Susser.
-
-Wed Dec 19 01:51:24 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
-
- * vm.c (rb_vm_jump_tag_but_local_jump): remove unnecessary 2nd
- argument.
-
- * load.c (rb_load_internal): ditto.
-
- * eval_intern.h (rb_vm_jump_tag_but_local_jump): ditto.
-
-Tue Dec 18 18:57:58 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * io.c (rb_io_wait_writable): don't use rb_thread_wait_fd()
- because it is for waiting until io readable.
-
- * io.c (rb_io_wait_writable): always use rb_thread_fd_writable()
- instead of bare rb_wait_for_single_fd(). we shouldn't ignore
- return value.
- * io.c (rb_io_wait_readable): ditto. always use rb_thread_wait_fd().
-
-Tue Dec 18 18:55:33 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread.c (rb_thread_wait_fd_rw): fix infinite loop bug.
- rb_wait_for_single_fd() never return positive number.
-
-Tue Dec 18 17:24:40 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc/encoding.rb: Do not remove #! line from document when
- setting encoding. This allows ruby executables to be parsed as ruby
- files.
- * test/rdoc/test_rdoc_encoding.rb: Test for above.
-
- * lib/rdoc/parser.rb: Set the parser file name of ruby executables
- correctly.
- * test/rdoc/test_rdoc_parser.rb: Test for above.
-
-Tue Dec 18 16:46:15 2012 Eric Hodel <drbrain@segment7.net>
-
- * doc/syntax/literals.rdoc: Used simplified heredoc example that
- doesn't include method definition. Added heredoc with backticks.
-
-Tue Dec 18 16:38:51 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc/store.rb: Work around RDoc stores from older versions of
- RDoc.
- * test/rdoc/test_rdoc_store.rb: Test for above.
-
-Tue Dec 18 16:31:20 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc/ruby_lex.rb: Return a TkHEREDOC instead of a TkSTRING when
- the heredoc identifier is followed by a line-end. This allows proper
- display of some HEREDOCs in source view.
- * lib/rdoc/ruby_token.rb: Added TkHEREDOC
- * test/rdoc/test_rdoc_ruby_lex.rb: Test for above.
-
-Tue Dec 18 09:45:14 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
-
- * vm.c (rb_vm_make_jump_tag_but_local_jump): take care of the case
- TAG_JUMP() with TAG_FATAL (ex. rb_fatal()). [ruby-core:50917]
- [Bug #7570]
-
- * test/ruby/test_fiber.rb (test_fatal_in_fiber): add a test for above.
-
- * ext/-test-/fatal/extconf.rb, ext/-test-/fatal/rb_fatal.c: ditto.
-
-Tue Dec 18 13:17:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * vm_trace.c (tracepoint_attr_defined_class): Clean up rdoc for
- TracePoint#defined_class
-
-Tue Dec 18 12:15:59 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems/specification.rb: Fixed ruby output of requirements
- with multiple version specifiers.
- * test/rubygems/test_gem_ext_cmake_builder.rb: Only look for specific
- lines in cmake output. Should fix [ruby-trunk - Bug #7579]
-
-Tue Dec 18 11:45:26 2012 Eric Hodel <drbrain@segment7.net>
-
- * doc/syntax/literals.rdoc: Added 0o octal integers.
-
-Tue Dec 18 12:28:52 2012 Martin Bosslet <Martin.Bosslet@gmail.com>
-
- * test/openssl/test_ssl.rb: Use :TLSv1_2_client explicitly in
- test_tls_v1_2 to prevent upstream bug.
- [Bug #7197] [ruby-dev:46240]
-
-Tue Dec 18 11:52:34 2012 Martin Bosslet <Martin.Bosslet@gmail.com>
-
- * ext/openssl/lib/ssl.rb: Enable insertion of empty fragments as a
- countermeasure for the BEAST attack by default. The default options
- of OpenSSL::SSL:SSLContext are now:
- OpenSSL::SSL::OP_ALL & ~OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS
- [Bug #5353] [ruby-core:39673]
-
- * test/openssl/test_ssl.rb: Adapt tests to new SSLContext default.
-
- * NEWS: Announce the new default.
-
-Tue Dec 18 06:36:12 2012 Koichi Sasada <ko1@atdot.net>
-
- * method.h: remove `VM_METHOD_TYPE_CFUNC_FRAMELESS' method type.
- This method type is for optimized CFUNC such as Fixnum#+ and so on.
- This feature is half-baked and no way to use them.
- [Background]
- Now, VM has opt_plus instructions to optimize `+' methods for
- some Classes (such as Fixnum, Float (flonum)). We call this
- type of instructions as `specialized instructions'.
- This simple technique improve simple program dramatically.
- However, we can make specialized instructions for only several
- types (classes) and selectors (method names) because a large
- instruction will be slow. In other words, this technique has no
- extensibility.
- To overcome this problem, VM_METHOD_TYPE_CFUNC_FRAMELESS was
- introduced (r37198). This type is a variant of CFUNC, but called
- their functions directly without building a method frame.
- Any CFUNC method can be defined as frameless methods if a method
- is not needed to make method frame. Frameless methods are faster
- as specialized instructions (a bit slower, but no need to care).
- No problem described at
- http://charlie.bz/blog/why-do-singleton-methods-make-ruby-slow
- because this technique doesn't see class, but see method body
- itself. Alias is also no problem.
- [Problem]
- However, we can't set frameless method type for polymorphic methods
- such as Array#[]. Necessity for method frame depends on which
- parameter type. For example, Fixnum#+ needs method frame if
- coerce is needed. Current VM_METHOD_TYPE_CFUNC_FRAMELESS is not
- flexible and need more tuning to introduce it.
- Expected behavior of frameless method type may be:
- result = optimized_cfunc(params); /* call optimized cfunc */
- if (result == Qundef) { result = normal_cfunc(); }
- This is why I say this feature is half-baked.
- We need to learn primitive method in Smalltalk more.
- (I heard this name at RubyConf Taiwan this month. Thanks!)
- [Conclusion]
- I remove this feature and consider again.
- This feature goes to next minor (2.1?).
- Nobody may use this feature and there is no compatibility issue.
-
- * proc.c (rb_method_entry_arity): ditto.
-
- * vm_eval.c, vm_insnhelper.c, vm_method.c: ditto.
-
-Tue Dec 18 04:58:22 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_trace.c (fill_id_and_klass): TracePoint#defined_class returns
- singleton class. `set_trace_func' passed attached class (which is
- attached/modified by singleton class) by 6th block parameter if it
- is singleton class. Previous behavior follows this spec.
- However, this method named `defined_class' should return singleton
- class directly because singleton methods are defined in singleton
- class. There are no compatible issue because TracePoint is introduced
- after 2.0.
- But compatibility with `set_trace_func' is broken. This means that
- you can not replace all `set_trace_func' code with TracePoint
- without consideration of this behavior.
- [Bug #7554]
-
- * test/ruby/test_settracefunc.rb: change a test to catch up
- an above change.
-
-Tue Dec 18 03:03:10 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/visitors/to_ruby.rb: speed up node mapping so
- common cases are evaluated first. Thanks Kevin Menard!
-
-Tue Dec 18 02:35:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/optparse.rb: Remove 'developer documentation' section from rdoc
- Patch by Marcus Stollsteimer [ruby-core:50526][Bug #7504]
-
-Tue Dec 18 02:35:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/matrix.rb (#lup): typo in example [ruby-core:50946][Bug #7582]
-
-Mon Dec 17 18:03:34 2012 Charlie Somerville <charlie@charliesomerville.com>
-
- * class.c (rewrite_cref_stack, clone_method): rewrite a method's cref
- stack when cloning into a new class to allow lexical const lookup to
- work as expected [ruby-core:47834] [Bug #7107]
- * test/ruby/test_class.rb (class TestClass): related test
-
-Mon Dec 17 13:56:55 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * io.c (io_flush_buffer_sync2): avoid to return 0. because
- rb_thread_call_without_gvl2 uses 0 internally.
- * io.c (io_flush_buffer_async2): adapt the above.
-
-Mon Dec 17 12:05:32 2012 Eric Hodel <drbrain@segment7.net>
-
- * doc/syntax/methods.rdoc: Added a description of singleton methods.
-
-Mon Dec 17 11:35:57 2012 Eric Hodel <drbrain@segment7.net>
-
- * doc/.document: Added doc/syntax
-
-Mon Dec 17 11:25:32 2012 Eric Hodel <drbrain@segment7.net>
-
- * doc/syntax.rdoc: Added syntax guide table of contents
- * doc/syntax/exceptions.rdoc: Syntax guide for exceptions
- * doc/syntax/literals.rdoc: Syntax guide for literals
- * doc/syntax/methods.rdoc: Syntax guide for methods
-
-Mon Dec 17 07:59:40 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems.rb: Updated VERSION
-
- * test/rubygems/test_gem_installer.rb: Fixed ambiguous first argument
- warning.
-
- * test/rubygems/test_gem_rdoc.rb: RDoc generation depends on installed
- version of RDoc.
-
-Sun Dec 16 02:04:41 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * signal.c (rb_sigaltstack_size): cast sysconf() return value
- explicitly. Fix compile error on Mac OS X.
-
-Sun Dec 16 00:39:43 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
-
- * cont.c (rb_fiber_start): don't enqueue Qnil to async_errinfo_queue.
- rb_vm_make_jump_tag_but_local_jump() could return Qnil (ex. when
- finished by Thread.exit). [ruby-dev:45218] [Bug #5993]
-
- * test/ruby/test_fiber.rb (test_exit_in_fiber): add test for it.
-
-Sat Dec 15 23:56:51 2012 Naohisa Goto <ngotogenome@gmail.com>
-
- * ext/fiddle/pointer.c (rb_fiddle_ptr2cptr): fix error message
- forgotten to be changed from DL to Fiddle.
-
-Sat Dec 15 23:14:32 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * signal.c (default_handler): remove rb_register_sigaltstack()
- call. sigaltstack was already registered when creating threads.
-
-Sat Dec 15 23:08:56 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * signal.c (rb_sigaltstack_size): new. calculate stack size for
- sigsegv handler. enlarge value when x86 or x86_64 on Linux.
- Linux has very small MINSIGSTKSZ size (2048 bytes) and
- our sigsegv routine need 5KiB at least. [Bug #7141]
- * internal.h: add declaration of rb_sigaltstack_size().
- * vm_core.h: remove ALT_STACK_SIZE definition.
-
- * signal.c (rb_register_sigaltstack): replace ALT_STACK_SIZE with
- rb_sigaltstack_size();
- * gc.c (Init_heap): ditto.
- * vm.c (th_init): ditto.
-
-Sat Dec 15 18:24:21 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * rational.c (f_round_common): should check overflow.
-
-Sat Dec 15 18:00:00 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * rational.c (float_rationalize): reduced.
-
-Sat Dec 15 14:18:44 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * io.c (finish_writeconv): uses rb_write_internal2 if
- fptr->write_lock have.
-
-Sat Dec 15 13:57:08 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread.c (rb_mutex_owned_p): remove static.
- * io.c (io_flush_buffer): don't hold mutex if already have.
- Now recursive lock may occur when following scenario.
- fptr_finalize -> finish_writeconv_sync -> finish_writeconv
- -> io_fflush.
-
-Sat Dec 15 13:38:30 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * io.c (io_flush_buffer): uses io_flush_buffer_async2 instead of
- io_flush_buffer_async.
- * io.c (io_flush_buffer_async2): new helper function for
- io_flush_buffer. It uses rb_thread_call_without_gvl2() instead
- of rb_thread_io_blocking_region.
- * io.c (io_flush_buffer_sync2): new helper function for
- io_flush_buffer_async2.
-
-Sat Dec 15 13:04:26 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * io.c (internal_write_func2): new helper function for rb_write_internal2().
- * io.c (rb_write_internal2): new function. it uses
- rb_thread_call_without_gvl2() instead of rb_thread_io_blocking_region().
- * io.c (rb_binwrite_string): uses rb_write_internal2 instead of
- rb_write_internal. [Bug #7134]
-
-Sat Dec 15 12:55:29 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * io.c (rb_io_wait_writable): add to call rb_thread_wait_fd()
- likes rb_io_wait_readable.
-
-Sat Dec 15 11:54:50 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * io.c (rb_io_wait_writable): don't call rb_thread_fd_writable()
- when EINTR. EINTR mean signal interrupt was happen. We don't
- need any wait.
-
-Sat Dec 15 11:53:36 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread.c (rb_thread_wait_fd_rw): remove silly rb_thread_alone()
- check.
-
-Sat Dec 15 10:22:38 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * thread.c (rb_thread_polling): revert but deprecate.
-
- * include/ruby/intern.h (rb_thread_polling): deprecate.
-
-Sat Dec 15 08:37:01 2012 Masaya Tarui <tarui@ruby-lang.org>
-
- * test/rubygems/test_gem_ext_cmake_builder.rb (test_self_build):
- get rid of false positive.
-
-Sat Dec 15 08:05:56 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * test/ruby/test_thread.rb (test_uninitialized, test_backtrace,
- test_thread_timer_and_interrupt, test_thread_join_in_trap,
- test_thread_join_current, test_thread_join_main_thread,
- test_main_thread_status_at_exit, test_thread_status_in_trap,
- test_thread_status_raise_after_kill, test_mutex_owned,
- test_mutex_owned2): move these tests from TestThreadGroup class
- to TestThread because they are not thread group tests.
-
- * test/ruby/test_thread.rb (test_thread_status_raise_after_kill):
- add t.join.
-
- * test/ruby/test_threadgroup.rb: new file. moved ThreadGroup test
- from test_thread.rb.
-
-Sat Dec 15 08:02:11 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * test/ruby/test_thread.rb (TestThread::Thread::new.): remove
- th.abort_on_exception change. Test template shouldn't change
- global flag. It prevent to test a normal case.
-
-Sat Dec 15 06:15:14 2012 Eric Hodel <drbrain@segment7.net>
-
- * configure.in (HAVE_GCC_ATOMIC_BUILTINS): Set -march=i486 to enable
- __sync_val_compare_and_swap. Patch by KOSAKI Motohiro.
- [ruby-trunk - Bug #7485]
-
-Sat Dec 15 03:42:34 2012 Naohisa Goto <ngotogenome@gmail.com>
-
- * ext/.document: add fiddle/pointer.c, fiddle/handle.c, and
- fiddle/win32/lib as documentation.
-
-Sat Dec 15 03:06:40 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * file.c (rb_file_flock): use rb_thread_wait_for() instead of
- rb_thread_polling(). When getting EAGAIN, we need to wait a
- while even if no multi threading.
- * thread.c (sleep_for_polling, rb_thread_polling) removed.
-
-Sat Dec 15 00:03:31 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * signal.c (rb_f_kill): remove rb_thread_polling() because this
- has no good effect and makes meaningless 100ms delay. 1)
- when sending signal to another process, waiting has just silly.
- 2) when sending signal to current process, 100ms is often not
- enough time to wait. It depend on kernel behavior. And,
- rb_thread_polling() doesn't make sense anyway. When rb_thread_alone()
- is true, it doesn't wait at all and Process.kill() users don't
- expect threading changes Process.kill() behavior. [Bug #7560]
-
-Fri Dec 14 17:10:57 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (parser_params): parser_tokline to track the line number at
- which token started. [ruby-dev:46737] [Bug #7559]
-
- * parse.y (fcall): operation with starting line number.
-
- * parse.y (command, primary, method_call): point method name line.
-
- * parse.y (gettable_gen): return token line for __LINE__.
-
-Fri Dec 14 16:56:59 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * vm_insnhelper.c (vm_call_super_method): remove volatile introduced
- in r38365.
-
- * vm_insnhelper.c (vm_call_method): use __forceinline to prevent
- VC++ to make vm_call_general and vm_call_super_method as the same
- method. Thanks, Heesob Park. [Bug #7556] [ruby-core:50867]
-
-Fri Dec 14 14:59:14 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * test/ruby/envutil.rb (Test::Unit::Assertions#assert_separately):
- take file and line by using caller_locations if not given.
-
- * test/ruby/envutil.rb (Test::Unit::Assertions#assert_separately):
- count assertions in separated tests.
-
-Fri Dec 14 14:16:42 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc/rubygems_hook.rb: Fixed generation of documentation.
- Disabled rdoc generation by default to match RubyGems defaults.
- Reduced diff with RubyGems::RDoc.
- * test/rdoc/test_rdoc_rubygems_hook.rb: Tests for the above.
- * test/rubygems/test_gem_rdoc.rb: ditto.
-
- * lib/rdoc/store.rb: Removed useless variable assignment
-
-Fri Dec 14 13:58:40 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems/commands/rdoc_command.rb: When overwriting
- documentation, remove existing documentation first.
-
- * lib/rubygems/server.rb: Fixed documentation links.
- * test/rubygems/test_gem_server.rb: Test for the above.
-
- * lib/rubygems/rdoc.rb: Reduced diff with RDoc::RubyGemsHook
- * test/rubygems/test_gem_rdoc.rb: ditto
-
-Fri Dec 14 04:08:05 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * test/ruby/envutil.rb (Test::Unit::Assertions#assert_separately):
- added to execute given test source on separate process,
- catch its resulted exception and raise it on main process.
-
-Fri Dec 14 07:43:44 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/visitors/yaml_tree.rb: quote strings that begin
- with non-word characters. Thanks Alex Tambellini!
- * test/psych/test_yaml.rb: appropriate test case
-
-Thu Dec 13 23:14:17 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * vm_insnhelper.c (vm_call_super_method): a workaround for the
- failure of TestRefinement#test_refine_recursion in Windows.
- See [ruby-core:50871] for details.
-
-Thu Dec 13 23:10:52 Charlie Somerville <charlie@charliesomerville.com>
-
- * object.c (Init_Object): use rb_mod_init_copy for Class#initialize_copy
- * class.c (rb_class_init_copy): rename to class_init_copy_check, performs type
- checks on arguments to prevent reinitialization of initialized class
- [ruby-core:50869] [Bug #7557]
- * class.c (rb_mod_init_copy): use class_init_copy_check if receiver is T_CLASS
- * test/ruby/test_class.rb (class TestClass): related test
-
-Thu Dec 13 16:53:10 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc/class_module.rb: Fixed duplicate comments for classes and
- modules from C.
- * test/rdoc/test_rdoc_class_module.rb: Test for the above.
-
- * lib/rdoc/parser/c.rb: Reload C variable names to allow proper
- updates of an ri store for C files.
- * lib/rdoc/rdoc.rb: ditto.
- * lib/rdoc/store.rb: ditto.
- * test/rdoc/test_rdoc_parser_c.rb: Test for the above.
- * test/rdoc/test_rdoc_store.rb: ditto.
-
-Thu Dec 13 14:20:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/irb*: merge doc from doc/irb/ird.rd and improve overall
- documentation of IRB
- * doc/irb/irb.rd: remove stale documentation
-
-Thu Dec 13 14:10:00 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * marshal.c (r_entry0): don't taint classes and modules because
- Marshal.load just returns the dumped classes and modules.
- [Bug #7325] [ruby-core:49198]
-
- * test/ruby/test_marshal.rb: related test.
-
-Thu Dec 13 14:10:13 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/ruby/test_require.rb (TestRequire#test_loaded_features_encoding):
- need to check compatibility, not equality of encodings.
-
-Thu Dec 13 14:02:15 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * file.c (rb_file_join): check encoding compatibility before joining
- strings.
-
-Thu Dec 13 13:06:27 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * proc.c (umethod_bind): allow another form of method transplanting
- from a module via UnboundMethod. [ruby-core:34267][Feature #4254]
-
-Thu Dec 13 12:07:25 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * include/ruby/ruby.h (RB_UNUSED_VAR): new macro to suppress
- warnings for unused variables.
-
- * ext/bigdecimal/bigdecimal.c (ENTER): use RB_UNUSED_VAR() to
- suppress annoying warnings by -Wunused-but-set-variable in gcc 4.6.
-
-Thu Dec 13 11:22:33 2012 Koichi Sasada <ko1@atdot.net>
-
- * method.h: remove "VM_METHOD_TYPE__MAX" from rb_method_type_t.
- rb_method_type_t is not a number and "_MAX" causes misunderstanding.
-
- * proc.c (rb_method_entry_arity): ditto.
-
- * vm_eval.c (vm_call0_body): ditto.
-
- * vm_insnhelper.c (vm_call_method): ditto.
-
-Wed Dec 12 21:40:45 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/tmpdir.rb (Dir::Tmpname#create): deal with a prefix name which
- starts with tilde as a plain name, not expanding as home directory.
- [ruby-core:50793] [Bug #7547]
-
-Wed Dec 12 19:48:59 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * ext/json: merge JSON 1.7.5.
- fix tests and other fixes.
-
-Wed Dec 12 18:30:29 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * class.c (rb_prepend_module): move refined methods from the origin
- of a class to the class, because refinements should have priority
- over prepended modules.
-
- * test/ruby/test_refinement.rb: related test.
-
-Wed Dec 12 18:27:09 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * time.c (zone_str): lookup or insert by using st_update() at once.
-
-Wed Dec 12 15:30:11 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * configure.in: add -fno-omit-frame-pointer if libexecinfo is used.
- At least on FreeBSD ruby will crash on getting C backtrace
- when it is compiled with other than -O0.
-
- * vm_dump.c: enable backtrace on FreeBSD even if with optimizations.
-
-Wed Dec 12 16:08:04 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * test/rdoc/test_rdoc_rdoc.rb (TestRDocRDoc#test_normalized_file_list_non_file_directory):
- use File::NULL for portability if possible.
-
-Wed Dec 12 16:07:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * method.h (rb_method_flag_t): name a magic number for NOEX_SAFE and
- NOEX_WITH as NOEX_SAFE_SHIFT_OFFSET.
-
- * method.h (rb_method_type_t, method_optimized_type): C89 forbids a
- comma after the last element in enum.
-
- * proc.c (rb_method_entry_arity), vm_eval.c (vm_call0_body),
- vm_insnhelper.c (vm_call_method): add VM_METHOD_TYPE__MAX case.
-
-Wed Dec 12 14:16:35 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc/class_module.rb: Added RDoc::ClassModule#documented? which
- checks comment_location. Hide RDoc::ClassModule#comment=.
- * test/rdoc/test_rdoc_class_module.rb: Test for above.
-
- * lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml:
- Fix display of the table of contents in the sidebar.
-
- * lib/rdoc/generator/template/darkfish/table_of_contents.rhtml:
- Use #comment_location when displaying classes or modules.
-
- * test/rdoc/test_rdoc_store.rb: Use comment_location.
-
-Wed Dec 12 13:40:52 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm_insnhelper.c (vm_getivar): no uninitialized instance variables
- warnings for non-object if attr method.
-
-Wed Dec 12 06:43:37 2012 Benoit Daloze <eregontp@gmail.com>
-
- * iseq.c (rb_iseq_parameters): fix limit for optional arguments.
-
- * test/ruby/test_keyword.rb: tests for above.
-
- * vm_core.h (struct rb_iseq_struct): update documentation
- with keyword arguments. [Bug #7540] [ruby-core:50735]
-
-Wed Dec 12 03:45:41 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm.c (vm_exec): pass exceptions while handling an exception.
-
- * vm_trace.c (rb_threadptr_exec_event_hooks): propagate exceptions.
- revert r38293 partially.
-
-Wed Dec 12 03:09:05 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * sample/test.rb (Progress#initialize): add --verbose option and show
- messages in one line unless --verbose is given.
-
-Wed Dec 12 01:47:02 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * eval.c (rb_using_refinement): make the method table of an iclass
- for a refinement that of the refinement, not that of the origin of
- the refinement, which is set by rb_include_class_new(). This
- change is needed to make module prepend into a refinement work
- properly.
-
- * test/ruby/test_refinement.rb: related test.
-
-Wed Dec 12 01:05:04 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * tool/make-snapshot: add --disable-rubygem to both MINIRUBY and RUBY.
- On making miniprelude.c, it seems use MINIRUBY. this fixes #7541
- but rubygems also needs to be fixed for older rubies.
-
-Wed Dec 12 00:32:11 2012 Naohisa Goto <ngotogenome@gmail.com>
-
- * test/dl/test_func.rb (test_name_with_block, test_bind, test_qsort1):
- call unbind to release the callback closure because maximum number
- of callbacks is limited to DL::MAX_CALLBACK (== 5) with pure DL
- without Fiddle.
-
-Wed Dec 12 00:13:34 2012 Naohisa Goto <ngotogenome@gmail.com>
-
- * ext/dl/lib/dl/func.rb (DL::Function#unbind, #bound?): suppress
- NoMethodError when Fiddle is available. [ruby-core:50756] [Bug #7543]
- * test/dl/test_func.rb (test_bound*, test_unbind*): tests for the above.
-
-Tue Dec 11 19:38:37 2012 Naohisa Goto <ngotogenome@gmail.com>
-
- * ext/fiddle/function.c (Fiddle::Function.new): new keyword argument
- :name to set the name attribute.
- * ext/fiddle/lib/fiddle/import.rb (import_function, bind_function):
- set function name by using the :name keyword argument.
- Re-fixes r38243. [ruby-core:50566]
- * test/fiddle/test_function.rb (test_name): test for the :name keyword
- argument and Fiddle::Function#name.
-
-Tue Dec 11 16:57:33 2012 Eric Hodel <drbrain@segment7.net>
-
- * common.mk: Added --pages-dir to rdoc creation. Now doc/ items show
- up at top-level.
- * .document: Moved doc/* entries to doc/.document
- * doc/.document: ditto
-
-Tue Dec 11 16:44:37 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc/options.rb: Added --page-dir option for moving pages in
- doc/ to the top-level.
- * lib/rdoc/rdoc.rb: ditto.
- * test/rdoc/test_rdoc_options.rb: Test for the above.
- * test/rdoc/test_rdoc_rdoc.rb: ditto.
-
-Tue Dec 11 15:24:05 2012 Eric Hodel <drbrain@segment7.net>
-
- * ext/pathname/lib/pathname.rb: Hide private methods from RDoc.
-
-Tue Dec 11 15:11:29 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * tool/make-snapshot (BASERUBY): add --disable-gem to avoid load gems.
- [Bug #7541] [ruby-core:50736]
-
-Tue Dec 11 12:00:19 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * ext/dl/win32/extconf.rb: Fix typo
- by Santiago Pastorino <santiago@wyeworks.com>
- https://github.com/ruby/ruby/pull/221 fix GH-221
-
-Tue Dec 11 01:53:37 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * lib/matrix: alias {row|column}_size to {row|column}_count and use
- the latter.
- [Bug #7369] [ruby-core:49409]
-
-Tue Dec 11 00:26:58 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * fix the behavior when a module is included into a refinement.
- This change is a little tricky, so it might be better to prohibit
- module inclusion to refinements.
-
- * include/ruby/ruby.h (RMODULE_INCLUDED_INTO_REFINEMENT): new flag
- to represent that a module (iclass) is included into a refinement.
-
- * class.c (include_modules_at): set RMODULE_INCLUDED_INTO_REFINEMENT
- if klass is a refinement.
-
- * eval.c (rb_mod_refine): set the superclass of a refinement to the
- refined class for super.
-
- * eval.c (rb_using_refinement): skip the above superclass (the
- refined class) when creating iclasses for refinements. Otherwise,
- `using Refinement1; using Refinement2' creates iclasses:
- <Refinement2> -> <RefinedClass> -> <Refinement1> -> RefinedClass,
- where <Module> is an iclass for Module, so RefinedClass is
- searched before Refinement1. The correct iclasses should be
- <Refinement2> -> <Refinement1> -> RefinedClass.
-
- * vm_insnhelper.c (vm_search_normal_superclass): if klass is an
- iclass for a refinement, use the refinement's superclass instead
- of the iclass's superclass. Otherwise, multiple refinements are
- searched by super. For example, if a refinement Refinement2
- includes a module M (i.e., Refinement2 -> <M> -> RefinedClass,
- and if refinements iclasses are <Refinement2> -> <M>' ->
- <Refinement1> -> RefinedClass, then super in <Refinement2> should
- use Refinement2's superclass <M> instead of <Refinement2>'s
- superclass <M>'.
-
- * vm_insnhelper.c (vm_search_super_method): do not raise a
- NotImplementError if current_defined_class is a module included
- into a refinement. Because of the change of
- vm_search_normal_superclass(), the receiver might not be an
- instance of the module('s iclass).
-
- * test/ruby/test_refinement.rb: related test.
-
-Mon Dec 10 18:35:25 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * vm_method.c (rb_method_entry_without_refinements): use
- rb_resolve_refined_method() to search superclasses if
- me->def->orig_me is 0. This change fixes make test-all
- TESTS="json ruby/test_refinement.rb".
-
- * test/ruby/test_refinement.rb: related test.
-
-Mon Dec 10 17:59:07 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * ext/fiddle/win32/*: library ports from DL to Fiddle.
-
- * ext/dl/win32/extconf.rb: check fiddle. often case dl compiled prior
- to fiddle, so this change is no meaning. in most cases, simply
- fiddle/win32 overwrite dl/win32.
-
-Mon Dec 10 15:23:35 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm_trace.c (rb_threadptr_exec_event_hooks): exceptions in event
- hooks should not propagate outside.
-
-Mon Dec 10 15:11:06 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * compile.c (iseq_compile_each): count flip-flop state in local iseq
- not in each iseqs, so that the keys can be other than hidden
- strings. [ruby-core:47253] [Bug #6899]
-
- * vm_insnhelper.c (lep_svar_get, lep_svar_set, vm_getspecial): store
- flip-flop states in an array instead of a hash.
-
- * iseq.c (set_relation): main iseq also can has local scope.
-
-Mon Dec 10 10:36:12 2012 Narihiro Nakamura <authornari@gmail.com>
-
- * lib/irb/magic-file.rb: set a encoding, which is detected from
- the file to read, to the internal encoding.
- [Bug #4281][ruby-dev:43036]
-
-Mon Dec 10 09:40:19 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems/ext/cmake_builder.rb: Added a builder for cmake.
- * lib/rubygems/ext.rb: ditto.
- * lib/rubygems/installer.rb: ditto.
- * test/rubygems/test_gem_ext_cmake_builder.rb: Test for above.
-
-Mon Dec 10 09:13:08 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems/package.rb: Omit directories when packaging gems like
- RubyGems 1.8.x
- * test/rubygems/test_gem_package.rb: Test for above.
-
-Sun Dec 9 17:36:59 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * vm_insnhelper.c (vm_call_opt_send): Kernel#send should not use
- refinements.
-
- * proc.c (mnew): Kernel#method, Kernel#public_method,
- Module#instance_method, and Module#public_instance_method should
- not use refinements.
-
- * vm_method.c (rb_method_boundp): Kernel#respond_to? should not use
- refinements.
-
- * test/ruby/test_refinement.rb: related test.
-
-Sun Dec 9 06:19:04 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc/markdown/entities.rb: Added documentation.
-
- * lib/rdoc/parser/ruby.rb: Updated style
-
- * lib/rdoc/ruby_lex.rb: Parse characters up to \u{FFFFF}
- * test/rdoc/test_rdoc_ruby_lex.rb: Test for above.
-
-Sat Dec 8 22:38:35 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * eval.c (rb_mod_refine): don't override Module#include. It's
- unnecessary now because refinements are activated only in refine
- blocks.
-
-Sat Dec 8 22:33:26 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * eval.c: remove Module#refinements.
-
- * test/ruby/test_refinement.rb: remove tests for Module#refinements.
-
-Sat Dec 8 13:17:55 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * eval.c (top_using): raise a RuntimeError if using is called in a
- module definition or a method definition.
-
- * test/ruby/test_refinement.rb: related test.
-
-Sat Dec 8 15:01:35 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems/commands/cleanup_command.rb: Skip default gems when
- cleaning up.
- * test/rubygems/test_gem_commands_cleanup_command.rb: Test for above.
-
- * lib/rubygems/commands/query_command.rb: Fixed listing remote gems.
-
- * lib/rubygems/dependency_installer.rb: Ignore non-files when looking
- for local gems.
- * test/rubygems/test_gem_dependency_installer.rb: Test for above.
-
- * lib/rubygems/uninstaller.rb: The user must confirm uninstalling gems
- that have dependencies.
- * test/rubygems/test_gem_uninstaller.rb: Test for above.
-
- * lib/rubygems.rb (module Gem): Updated version.
-
- * test/rubygems/*.pem: Updated to run in FIPS mode.
- * test/rubygems/test_gem_security.rb: ditto.
- * test/rubygems/test_gem_security_signer.rb: ditto.
-
-Sat Dec 8 12:34:01 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * vm_insnhelper.c (vm_search_normal_superclass): super in a
- refinement always uses the refined class as its superclass.
-
- * test/ruby/test_refinement.rb: related test.
-
-Sat Dec 8 11:59:59 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * eval.c (rb_mod_refine): raise an ArgumentError if a given
- block is of a Proc object.
-
- * vm_insnhelper.c (vm_call_method): store refined methods in inline
- cache to improve performance. It's safe now because blocks cannot
- be yielded with different refinements in the new specification.
-
- * test/ruby/test_refinement.rb: related test.
-
-Sat Dec 8 11:17:53 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * eval.c (rb_mod_refine), vm_eval.c (rb_yield_refine_block):
- Module#refine activates all refinements defined in that module
- only in a given block.
-
- * string.c (sym_to_proc, sym_call): don't use refinements.
-
- * test/ruby/test_refinement.rb: related test.
-
-Sat Dec 8 09:24:42 2012 Eric Hodel <drbrain@segment7.net>
-
- * ext/openssl/ossl_x509name.c: Completed documentation for
- OpenSSL::X509::Name.
-
-Sat Dec 8 07:57:12 2012 Koichi Sasada <ko1@atdot.net>
-
- * ext/objspace/objspace.c (iow_size): return size of internal object
- for ObjectSpace.memsize_of().
-
- * test/objspace/test_objspace.rb: add a test.
-
-Tue Dec 08 02:39:23 2012 James Edward Gray II <james@graysoftinc.com>
-
- * lib/csv.rb: A fix for row comparison by Stephen Wattam. [Bug #7528]
-
-Sat Dec 8 01:27:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/test/unit.rb (Test::Unit::Runner#_run_parallel): no need to
- check all reports.
-
-Sat Dec 8 00:10:34 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * vm_eval.c (yield_under, eval_under): do not activate refinements
- of the receiver in module_eval and instance_eval.
-
- * eval.c (ruby_Init_refinement): undef Class#refine.
-
- * eval.c (ruby_Init_refinement): remove Module#using.
-
- * eval.c (ruby_Init_refinement): main.using should be private.
-
- * eval.c (rb_mod_refine): the argument of Module#refine should not
- be a module.
-
- * insns.def (defineclass): do not activate refinements in a class or
- module.
-
-Fri Dec 7 23:42:11 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * ext/refinement/refinement.c: include ruby/ruby.h instead of the
- declaration of rb_warn().
-
-Fri Dec 7 16:07:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * doc/etc.rd: Removed stale documentation file
- * ext/etc/etc.c: Merged documentation from doc/etc.rd and updated
- rdoc, added documentation for Etc::Passwd and Etc::Group
-
-Fri Dec 7 16:00:57 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * lib/test/unit.rb (Test::Unit::Runner#_run_parallel): no need to
- retry skipped test. this fix makes 40% faster the whole test-all
- with -j5 on Windows.
-
-Fri Dec 7 14:22:29 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc/markup/to_joined_paragraph.rb: Completed documentation
- * lib/rdoc/parser/c.rb: ditto
- * lib/rdoc/parser/changelog.rb: ditto
- * lib/rdoc/servlet.rb: ditto
- * lib/rdoc/store.rb: ditto
-
- * lib/rdoc/store.rb: Improved HTML error page. Completed
- documentation
-
- * lib/rdoc/parser/ruby.rb: Fixed bug attaching a comment to A::B = 42
- * test/rdoc/test_rdoc_parser_ruby.rb: Test for above
-
- * test/rdoc/test_rdoc_comment.rb: Removed garbage
-
-Fri Dec 7 14:03:59 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/timeout.rb (Timeout#timeout): since async_interrupt_timing
- re-raises a deferred exception, replace the timeout exception with
- Timeout::Error after it. [Bug #7503]
-
-Fri Dec 7 13:07:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * doc/forwardable.rd: Remove stale documentation file
- * lib/forwardable.rb: Merge documentation from doc/forwardable.rd
-
-Fri Dec 7 09:47:35 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * time.c (time_mdump): dump timezone string to private instance variable
- on marshaling.
-
- * time.c (time_mload): load timezone string from private instance
- variable named 'zone'.
-
-Fri Dec 7 01:15:07 2012 Naohisa Goto <ngotogenome@gmail.com>
-
- * ext/fiddle/lib/fiddle/function.rb (Fiddle::Function#name): new
- attribute needed to switch Win32::Registry from DL to Fiddle.
-
- * ext/fiddle/lib/fiddle/import.rb (import_function, bind_function):
- set function name to the returned Fiddle::Function object.
-
-Fri Dec 7 00:11:44 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * test/ruby/test_refinement.rb: fix some tests to use neither
- Module#using nor Module#module_eval.
-
-Thu Dec 6 23:27:50 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * eval.c (ruby_Init_refinement): a new function to enable
- Refinements with a warning "Refinements are experimental...".
-
- * ext/refinement/refinement.c, ext/refinement/extconf.rb: a new
- extension library to enable Refinements.
-
-Thu Dec 6 18:23:05 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * revised r37993 to avoid SEGV/ILL in tests. In r37993, a method
- entry with VM_METHOD_TYPE_REFINED holds only the original method
- definition, so ci->me is set to a method entry allocated in the
- stack, and it causes SEGV/ILL. In this commit, a method entry
- with VM_METHOD_TYPE_REFINED holds the whole original method entry.
- Furthermore, rb_thread_mark() is changed to mark cfp->klass to
- avoid GC for iclasses created by copy_refinement_iclass().
-
- * vm_method.c (rb_method_entry_make): add a method entry with
- VM_METHOD_TYPE_REFINED to the class refined by the refinement if
- the target module is a refinement. When a method entry with
- VM_METHOD_TYPE_UNDEF is invoked by vm_call_method(), a method with
- the same name is searched in refinements. If such a method is
- found, the method is invoked. Otherwise, the original method in
- the refined class (rb_method_definition_t::body.orig_me) is
- invoked. This change is made to simplify the normal method lookup
- and to improve the performance of normal method calls.
-
- * vm_method.c (EXPR1, search_method, rb_method_entry),
- vm_eval.c (rb_call0, rb_search_method_entry): do not use
- refinements for method lookup.
-
- * vm_insnhelper.c (vm_call_method): search methods in refinements if
- ci->me is VM_METHOD_TYPE_REFINED. If the method is called by
- super (i.e., ci->call == vm_call_super_method), skip the same
- method entry as the current method to avoid infinite call of the
- same method.
-
- * class.c (include_modules_at): add a refined method entry for each
- method defined in a module included in a refinement.
-
- * class.c (rb_prepend_module): set an empty table to
- RCLASS_M_TBL(klass) to add refined method entries, because
- refinements should have priority over prepended modules.
-
- * proc.c (mnew): use rb_method_entry_with_refinements() to get
- a refined method.
-
- * vm.c (rb_thread_mark): mark cfp->klass for iclasses created by
- copy_refinement_iclass().
-
- * vm.c (Init_VM), cont.c (fiber_init): initialize th->cfp->klass.
-
- * test/ruby/test_refinement.rb (test_inline_method_cache): do not skip
- the test because it should pass successfully.
-
- * test/ruby/test_refinement.rb (test_redefine_refined_method): new
- test for the case a refined method is redefined.
-
-Thu Dec 6 17:29:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (parser_here_document): flush string content between new
- line and :string_embexpr. [ruby-core:48703] [Bug #7255]
-
-Thu Dec 6 16:35:21 2012 Eric Hodel <drbrain@segment7.net>
-
- * test/rake/helper.rb: Load envutil correctly. Removed useless rescue
- for signal propagation tests
- * lib/rake/file_utils.rb: Prefer the built ruby.
- * test/rake/test_rake_functional.rb: ditto
-
-Thu Dec 6 15:20:34 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc/context.rb: Don't warn for duplicate methods while loading.
- * test/rdoc/test_rdoc_context.rb: Test for above.
-
-Thu Dec 6 14:26:22 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems/command_manager.rb: Removed string concatenation
- syntax. [Bug #6265]
- * lib/rubygems/commands/install_command.rb: ditto
- * lib/rubygems/commands/uninstall_command.rb: ditto
- * lib/rubygems/indexer.rb: ditto
- * lib/rubygems/security/policy.rb: ditto
- * lib/rubygems/security.rb: ditto
- * lib/rubygems/uninstaller.rb: ditto
- * test/rubygems/test_gem_commands_cert_command.rb: ditto
- * test/rubygems/test_gem_package.rb: ditto
- * test/rubygems/test_gem_security.rb: ditto
- * test/rubygems/test_gem_security_policy.rb: ditto
-
-Thu Dec 6 14:10:08 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems/package.rb: Set rubygems_version before validation.
- Fixes issue with bundler.
- * test/rubygems/test_gem_package.rb: Test for above.
-
- * lib/rubygems/remote_fetcher.rb: Only update the cache when we have
- permission. [ruby-trunk - Bug #7509]
- * lib/rubygems/source.rb (class Gem): ditto
- * test/rubygems/test_gem_remote_fetcher.rb: Test for above.
- * lib/rubygems/test_utilities.rb: ditto
-
- * lib/rubygems/specification.rb: Derive base_dir properly for default
- gems. [ruby-trunk - Bug #7496]
- * test/rubygems/test_gem_specification.rb: Test for above.
-
- * lib/rubygems.rb: Untaint Dir.pwd when searching for gemdeps files
- for operation under $SAFE=1
-
-Thu Dec 06 12:07:11 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_trace.c: TracePoint#enable should not cause an error
- when it is already enabled. TracePoint#disable is too.
- [ruby-core:50561] [ruby-trunk - Bug #7513]
-
- * test/ruby/test_settracefunc.rb: add tests.
-
-Thu Dec 6 07:19:58 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc*: Improved display of ChangeLog files as HTML.
- * test/rdoc*: Test for above.
-
-Thu Dec 6 04:34:19 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread.c (rb_uninterruptible): helper function for providing
- temporary async_interrupt_timing(Object => :defer)
-
- * io.c (rb_f_p): use rb_uninterruptible.
- * io.c (rb_f_p_internal): helper function for rb_f_p().
- * io.c (struct rb_f_p_arg): new struct for rb_f_p_internal.
-
- * test/ruby/test_thread.rb (test_async_interrupt_and_p): test for
- the above.
-
-Thu Dec 6 04:27:10 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * io.c (io_binwrite): check interrupt before io issue.
- * test/ruby/test_thread.rb (test_async_interrupt_and_io):
- test for the above.
-
-Thu Dec 6 01:10:36 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm_eval.c (rb_method_call_status): use Qundef as no self instead of
- the current self.
-
- * vm_eval.c (send_internal): public_send does not consider how it is
- called, as mentioned in r14173. patched by charliesome (Charlie
- Somerville). [ruby-core:50489] [Bug #7499]
-
-Wed Dec 5 23:50:23 2012 Narihiro Nakamura <authornari@gmail.com>
-
- * gc.c (getrusage_time): uses clock_gettime() with
- CLOCK_PROCESS_CPUTIME_ID when available, which provides a 1ns
- precision on linux. [ruby-core:50495] [Bug #7500]
- patched by Aman Gupta.
-
-Wed Dec 5 22:46:02 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm.c (rb_vm_make_proc): save the proc made from the given block so
- that it will not get collected. [ruby-core:50545] [Bug #7507]
-
-Wed Dec 5 22:13:57 2012 Naohisa Goto <ngotogenome@gmail.com>
-
- * ext/dl/lib/dl/func.rb (DL::Function#bind): When Fiddle is used,
- @ptr should be updated. This fixes SEGV raised in DL::Function#call
- after calling DL::Function#bind. [Bug #7516] [ruby-dev:46708]
-
- * test/dl/test_func.rb (test_bind): test for the above
-
-Wed Dec 5 18:53:00 2012 Masaya Tarui <tarui@ruby-lang.org>
-
- * thread.c (rb_thread_s_async_interrupt_timing): have to check ints
- before jumping out.
- * test/ruby/test_thread.rb (test_async_interrupt_with_return): add test
- rescue has to catch a queued async exception at the time of return.
- * test/ruby/test_thread.rb (test_async_interrupt_with_break): add test
- rescue has to catch a queued async exception at the time of break.
-
-Wed Dec 5 16:54:28 2012 Koichi Sasada <ko1@atdot.net>
-
- * test/ruby/memory_status.rb: suppress warning.
- A patch from NAKAMURA Usaku.
-
-Wed Dec 5 16:06:54 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc/parser/changelog.rb: Parse more ChangeLog file variations.
- * test/rdoc/test_rdoc_parser_changelog.rb: Test for above.
-
-Wed Dec 5 12:17:11 2012 Naohisa Goto <ngotogenome@gmail.com>
-
- * ext/dl/lib/dl/func.rb (DL::Function#initialize, DL::Function#bind):
- ABI should be set by using CFunc#calltype even when Fiddle is used.
- When Fiddle is used and a block is given, name should not be ignored.
- [ruby-core:50562] [Bug #7514]
-
- * ext/dl/lib/dl/import.rb (DL::Importer#bind_function): should respect
- abi and name when Fiddle is used.
-
- * test/dl/test_func.rb (test_name_with_block): test for "name" method
- with giving a block.
-
-Wed Dec 5 11:55:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * doc/shell.rd, doc/shell.rd.ja: Removed stale doc files
- * lib/shell.rb, lib/shell/*: Merge and updates docs from doc/shell.rd*
-
-Wed Dec 5 11:42:38 2012 Koichi Sasada <ko1@atdot.net>
-
- * test/ruby/test_settracefunc.rb: disable trace.
-
-Wed Dec 5 11:37:37 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/mkmf.rb (MakeMakefile#macro_defined?): use clearly different
- strings from conflict markers.
-
-Wed Dec 5 04:25:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/README: Add rdoc modeline directive and formatting libs
-
-Wed Dec 5 04:04:02 2012 Masaya Tarui <tarui@ruby-lang.org>
-
- * test/ruby/test_thread.rb (test_async_interrupt_blocking): bugfix
- about deferred check
-
-Wed Dec 5 03:35:37 2012 Masaya Tarui <tarui@ruby-lang.org>
-
- * vm_core.h (RUBY_VM_CHECK_INTS_BLOCKING): check async queue everytime.
- * thread.c (sleep_forever): check RUBY_VM_CHECK_INTS_BLOCKING first.
- * thread.c (sleep_timeval): ditto.
- * test/ruby/test_thread.rb (test_async_interrupt_blocking): add a test
- exceptions are correctly deferred and raised on :on_blocking context.
-
-Wed Dec 5 02:36:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * common.mk, defs/id.def, template/id.c.tmpl: generate id.c as well as id.h.
-
-Wed Dec 5 00:56:21 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread.c (rb_mutex_owned_p): new method that return current
- thread have the target mutex or not. [Feature #7505] [ruby-dev:46697]
- * test/ruby/test_thread.rb (test_mutex_owned, test_mutex_owned2):
- test for the above.
- * NEWS: new for the above.
-
-Wed Dec 5 00:05:47 2012 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
-
- * lib/erb.rb (make_compiler, add_put_cmd, add_insert_cmd): extract
- methods.
-
-Tue Dec 4 18:21:04 2012 Naohisa Goto <ngotogenome@gmail.com>
-
- * test/ruby/memory_status.rb (Memory): use fiddle/types if available.
-
- * test/ruby/memory_status.rb (Memory::Win32): :stdcall is needed on
- x86 WIN32. This commit partly reverts r38054.
-
-Tue Dec 4 18:05:58 2012 Naohisa Goto <ngotogenome@gmail.com>
-
- * ext/fiddle/lib/fiddle/types.rb: copied from ext/dl/lib/dl/types.rb
- and modified for Fiddle, needed for migration from DL to Fiddle.
-
-Tue Dec 4 17:57:09 2012 Naohisa Goto <ngotogenome@gmail.com>
-
- * ext/fiddle/lib/fiddle/import.rb (import_function, bind_function):
- should respect call_type for migration from DL to Fiddle.
- [Bug #7484] [ruby-core:50405]
-
-Tue Dec 4 16:54:00 2012 Eric Hodel <drbrain@segment7.net>
-
- * .document: Added ChangeLog and doc/ChangeLog-* as documentation
-
-Tue Dec 4 16:47:46 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc/parser/changelog.rb: Added a ChangeLog parser to RDoc.
- * lib/rdoc/parser.rb: ditto
- * test/rdoc/test_rdoc_parser_changelog.rb: Test for above.
-
-Tue Dec 4 16:23:32 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * marshal.c (path2class, path2module): use PRIsVALUE.
-
- * marshal.c (w_object, marshal_dump, marshal_load): use
- rb_check_funcall if possible.
-
- * marshal.c (w_object, marshal_dump, r_object0, marshal_load): use
- RB_GC_GUARD() (directly or indirectly) instead of volatile.
-
- * variable.c (rb_path_to_class): prevent the argument from GC.
-
-Tue Dec 04 13:55:07 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_opts.h: enable optimization - operand unification.
- Operand unification technique enable to combine
- an instruction and specific operands and make new
- instruction.
-
- * defs/opt_operand.def: add several configuration
- of operand unification.
-
- * insns.def: use `int' instead to suppress warning.
-
-Mon Dec 3 17:58:53 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * parse.y: replace parser->enc with current_enc.
-
-Tue Dec 4 08:33:46 2012 Eric Hodel <drbrain@segment7.net>
-
- * README.EXT: Converted to RDoc format
- * README.EXT.ja: ditto
-
-Tue Dec 4 08:32:10 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc/ri/driver.rb: Fixed ri page display for files with
- extensions.
- * test/rdoc/test_rdoc_ri_driver.rb: Test for above
-
-Tue Dec 4 04:11:50 2012 Eric Hodel <drbrain@segment7.net>
-
- * .document: Add NEWS for `ri ruby:NEWS`
- * NEWS: Set format as rdoc
- * doc/NEWS-1.8.7: ditto
- * doc/NEWS-1.9.1: ditto
- * doc/NEWS-1.9.2: ditto
- * doc/NEWS-1.9.3: ditto
-
-Mon Dec 3 20:37:22 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_exec.c: check VM_COLLECT_USAGE_DETAILS.
-
-Mon Dec 3 20:28:02 2012 Koichi Sasada <ko1@atdot.net>
-
- * compile.c (iseq_specialized_instruction):
- change condition of using `opt_send_simple'.
- More method invocations can be simple.
-
-Mon Dec 3 20:03:38 2012 Koichi Sasada <ko1@atdot.net>
-
- * test/ruby/test_objectspace.rb: skip RuntimeError
- which says a message "can't modify frozen File".
- Is that correct behavior?
-
-Mon Dec 03 20:00:19 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_exec.c: vm_analysis_insn should be static.
-
-Mon Dec 3 19:10:12 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * random.c (Init_Random), rational.c (Init_Rational): make marshal
- methods private. [Feature #6539]
-
-Mon Dec 3 18:29:27 2012 Koichi Sasada <ko1@atdot.net>
-
- * iseq.h: iseq_catch_table_entry::catch_type should be
- Fixnum because they are pushed into Array in a compiler.
- [Bug #7502]
-
- * test/ruby/test_objectspace.rb: add a test of this issue.
-
-Mon Dec 3 18:25:16 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * template/id.h.tmpl (preserved_ids): "empty?" is not an attribute name.
-
-Mon Dec 3 16:23:09 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_backtrace.c (vm_backtrace_to_ary): check negative size (2nd arg).
-
-Mon Dec 3 15:50:33 2012 Akinori MUSHA <knu@iDaemons.org>
-
- * misc/ruby-additional.el (ruby-mode-set-encoding): Unbreak by
- fixing a typo, s/set/setq/.
-
-Mon Dec 3 14:14:19 2012 Koichi Sasada <ko1@atdot.net>
-
- * compile.c (iseq_compile_each): joke shouldn't use id.h defined ids.
-
- * id.c (Init_id): ditto.
-
- * common.mk: fix dependency.
-
-Mon Dec 3 12:43:35 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * misc/ruby-mode.el (ruby-block-end-re, ruby-delimiter)
- (ruby-mode-syntax-table, ruby-parse-partial, ruby-beginning-of-indent):
- merge from Emacs.
-
- * misc/ruby-mode.el (ruby-calculate-indent): fix indentation of
- argument lines in parentheses. [Bug #5140]
-
-Mon Dec 3 07:52:41 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc/parser.rb: Improved modeline support. Patch by nobu.
- * test/rdoc/test_rdoc_parser.rb: Test for above.
-
-Sun Dec 3 00:06:00 2012 Kenta Murata <mrkn@mrkn.jp>
-
- * ext/bigdecimal/bigdecimal.c (BigDecimal_new): stop checking string
- taintness. [Bug #5508] [ruby-core:40510]
-
-Sun Dec 2 19:26:47 2012 Masaya Tarui <tarui@ruby-lang.org>
-
- * thread.c (RB_GC_SAVE_MACHINE_CONTEXT, rb_gc_save_machine_context):
- extract rb_gc_save_machine_context to RB_GC_SAVE_MACHINE_CONTEXT.
- NOTE: machine_regs and machine_stack_end must be set in current scope.
-
-Sun Dec 2 18:46:24 2012 Koichi Sasada <ko1@atdot.net>
-
- * array.c, enum.c, insns.def, io.c, numeric.c, parse.y, process.c,
- range.c: use prepared IDs.
- A patch from charliesome (Charlie Somerville).
- [Bug #7495]
-
- * common.mk: add dependency to id.h.
-
- * common.mk: replace ID_H_INCLUDES with id.h.
-
-Sun Dec 2 16:48:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/weakref.rb (rdoc): Clean up usage, add example,
- note ArgumentError on WeakRef.new
-
-Sun Dec 2 16:45:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * gc.c (WeakMap): Add doc for internal reference, use lib/weakref.rb
-
-Sun Dec 2 07:24:23 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc/parser.rb: Parse files with a -*- rdoc -*- modeline
- * test/rdoc/test_rdoc_parser.rb: Test for above
-
-Sun Dec 2 06:02:00 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * gc.h (SET_MACHINE_STACK_END): add volatile for preventing
- harmful optimization. [ruby-dev:46665] [Bug #7468]
-
-Sun Dec 2 05:01:58 2012 Koichi Sasada <ko1@atdot.net>
-
- * iseq.c (rb_iseq_line_trace_each): iterate `line' event only.
-
- * test/ruby/test_iseq.rb: add a test for this change.
-
-Sun Dec 2 02:46:04 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_trace.c: add TracePoint#inspect.
-
- * test/ruby/test_settracefunc.rb: add a test for this change.
-
-Sat Dec 1 21:18:19 2012 Koichi Sasada <ko1@atdot.net>
-
- * test/ruby/test_backtrace.rb: add a test for
- Thread::Backtrace::Location#inspect.
- BTW, tests for `caller_locations' are not enough.
- Any volunteers are welcome.
-
-Sat Dec 1 21:06:58 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_backtrace.c (location_inspect_m): add
- Thread::Backtrace::Location#inspect.
- It same as loc_obj.to_s.inspect.
-
-Sat Dec 1 19:24:09 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * io.c (rb_io_puts): recurse for the argument itself, not converted
- array elements. [ruby-core:42444] [Bug #5986]
-
-Sat Dec 1 19:01:36 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * marshal.c (w_object, r_object0): call private marshal methods.
- [Feature #6539]
-
-Sat Dec 1 18:52:22 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems/commands/cleanup_command.rb: Fix cleanup command for
- multiple gems. [ruby-trunk - #7481] by Kouhei Sutou
- * test/rubygems/test_gem_commands_cleanup_command.rb: Test for above.
- * lib/rubygems.rb: Autoload Gem::Source to prevent test failures
-
-Sat Dec 1 18:17:00 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * complex.c (Init_Complex), time.c (Init_Time): make marshal methods
- private. [Feature #6539]
-
- * object.c (Init_Object): make remove_instance_variable public.
- [Feature #6539]
-
- * id.c (Init_id), template/id.h.tmpl: add initialize_{copy,clone,dup}
- and respond_to_missing?.
-
- * vm_method.c (rb_method_entry_make): make above methods private.
- [Feature #6539]
-
-Sat Dec 1 16:40:22 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * test/ruby/test_thread.rb: move ConditionVariable related test
- into test/thread/test_cv.rb.
- * test/thread/test_cv.rb: new file.
- * test/thread/test_cv.rb (test_condvar_empty_signal): new tests.
- * test/thread/test_cv.rb (test_condvar_empty_broadcast): ditto.
-
-Sat Dec 1 15:14:25 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * test/ruby/test_thread.rb (test_cv_wait_deadlock): enable
- cv deadlock test.
-
-Sat Dec 1 14:23:33 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * lib/thread.rb (ConditionVariable): use hash instead of array for
- @waiters.
- * test/thread/test_queue.rb (test_sized_queue_and_wakeup): remove
- a test because @waiters no longer have a chance to duplicated. Now it's
- a hash.
-
-Sat Dec 1 17:16:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * misc/ruby-electric.el (ruby-electric-curlies): use kill-region
- instead of interactive command delete-backward-char.
-
-Sat Dec 1 17:12:55 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * misc/inf-ruby.el (inferior-ruby-mode): fix the
- compilation-shell-minor-mode configuration. a patch by
- j2petkov (Jean-Christophe Petkovich) in [ruby-core:46518].
- [Bug #6742]
-
-Sat Dec 1 15:05:30 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * dir.c (glob_helper): use NAMLEN() to tell the length of d_name
- instead of strlen(), which can access beyond the boundary.
-
-Sat Dec 1 13:48:13 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems/specification.rb: Don't add default gems to $LOAD_PATH
- as they are already there.
-
-Sat Dec 1 12:22:17 2012 Kouhei Sutou <kou@cozmixng.org>
-
- * re-added r38053 that is reverted by r38061. Problems by r38053
- are resolved by r38096. r38096 removed GEM_SKIP configuration.
-
- The below is ChangeLog of r38053:
-
- * defs/default_gems: Add base directory column.
-
- * tool/rbinstall.rb:
- - Install .gemspecs of default gem to
- #{GEM_HOME}/specifications/default/.
- - Update files parameter of .gemspecs by relative path from
- library directory.
-
-Sat Dec 1 11:09:12 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * variable.c (rb_class_path_no_cache): add a function to get the class
- path without caching the computed path. Some classes are frozen, and
- will raise an exception without this.
-
- * probes.d (cmethod-entry, cmethod-return): separate cmethods from
- regular methods to match set trace func.
-
- * probes_helper.h: refactor macros. Fix probes to avoid calling
- #inspect when profiling.
-
- * insns.def: update for use with new macros.
-
- * vm_eval.c: ditto
-
- * vm_insnhelper.c: ditto
-
- * test/dtrace/test_singleton_function.rb: fix test for new output.
-
- * test/dtrace/test_cmethod.rb: test the cmethod probes.
-
-Sat Dec 1 09:44:16 2012 Eric Hodel <drbrain@segment7.net>
-
- * test/rdoc/test_rdoc_options.rb: Windows drive letters are
- case-insensitive.
-
-Sat Dec 1 09:42:13 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems.rb: Search for gem deps file up the directory tree.
- * test/rubygems/test_gem.rb: Test for above.
-
-Sat Dec 1 09:33:32 2012 Eric Hodel <drbrain@segment7.net>
-
- * test/runner.rb: Set GEM_HOME, GEM_PATH and GEM_SKIP to empty set.
- With default_gem support in RubyGems GEM_SKIP prevents loading of
- built-in gems.
-
-Sat Dec 1 07:16:17 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * compile.c (ADD_CATCH_ENTRY): add a cast to fix SEGV with x64 mingw
- on Windows 8. Without cast, 0 might be non zero value at higher bits
- in rb_ary_new3().
- [ruby-core:50258] [Bug #7456]
-
-Sat Dec 1 04:07:57 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * parse.y (parser.utf8): remove unused property.
-
- * parse.y (UTF8_ENC): remove unused macro.
-
- * parse.y (parser_tokadd_utf8): use rb_utf8_encoding() directly.
-
-Sat Dec 1 03:49:45 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * lib/sync.rb (Sync_m#sync_synchronize): add Thread.async_interrupt_timing
- for protecting from async interrupt.
- * lib/sync.rb (Sync_m#sync_lock): ditto.
-
-Sat Dec 1 03:38:04 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * lib/thread.rb (ConditionVariable#broadcast): s/RuntimeError/StandardError/
- * lib/thread.rb (ConditionVariable#signal): ditto.
-
-Sat Dec 1 03:29:52 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * lib/thread.rb (SizedQueue#pop): rewrite by using ConditionVariable.
- * lib/thread.rb (SizedQueue#push): ditto.
- * lib/thread.rb (SizedQueue#max): ditto.
- * lib/thread.rb (Queue#pop): ditto.
- * lib/thread.rb (Queue#push): ditto.
-
- * lib/thread.rb (SizedQueue#num_waiting): adopt the above changes.
- * lib/thread.rb (SizedQueue#initialize): ditto.
- * lib/thread.rb (Queue#num_waiting): ditto.
- * lib/thread.rb (Queue#initialize): ditto.
- * test/thread/test_queue.rb (test_sized_queue_and_wakeup): ditto.
-
-Sat Dec 1 03:45:47 2012 Koichi Sasada <ko1@atdot.net>
-
- * thread.c (Thread.async_interrupt_timing): fix RDoc.
- :never is not used any more.
-
-Sat Dec 1 02:56:19 2012 Koichi Sasada <ko1@atdot.net>
-
- * iseq.c: add RubyVM::InstructionSequence (ISeq) inspection methods.
- * ISeq#path returns path of this ISeq written.
- * ISeq#absolute_path returns absolute path.
- * ISeq#label returns label (method name and so on).
- * ISeq#base_label returns base label (see Thread::Backtrace::Location).
- * ISeq#first_lineno returns first line number of this ISeq.
- * ISeq.of(obj) returns ISeq object which obj (Proc or Method)
- is contains.
-
- * test/ruby/test_iseq.rb: add tests.
-
-Sat Dec 1 02:58:51 2012 Eric Hodel <drbrain@segment7.net>
-
- * include/ruby/ruby.h (rb_event_flag_t): Maintain integer precision
- for clang error (VALUE aka unsigned long vs unsigned int)
-
-Sat Dec 1 02:53:18 2012 Eric Hodel <drbrain@segment7.net>
-
- * test/rubygems/test_gem_dependency_installer.rb: Use Gem.read_binary
- instead of File.binread for ruby 1.8 compatibility in the rubygems
- source repository. Updates r38075
-
-Sat Dec 1 02:33:20 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread.c (rb_threadptr_interrupt_mask, async_interrupt_timing_func):
- merge into them into rb_thread_s_async_interrupt_timing.
- * thread.c (rb_thread_s_async_interrupt_timing): ditto.
-
-Sat Dec 1 02:11:47 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread.c (rb_threadptr_interrupt_mask): add argument check.
- * thread.c (async_interrupt_timing_arg_check_i): helper function
- for the above.
- * test/ruby/test_thread.rb (test_async_interrupt_timing_invalid_argument):
- test for the above.
-
-Sat Dec 1 01:19:34 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * lib/thread.rb (ConditionVariable#broadcast): protect from
- async interrupt by using Thread.async_interrupt_timing.
- * lib/thread.rb (ConditionVariable#signal): ditto.
- * lib/thread.rb (ConditionVariable#wait): ditto.
-
-Sat Dec 1 02:04:23 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-
- * test/ruby/envutil.rb (Test::Unit::Assertions#assert_in_out_err):
- raise if assert_in_out_err misused.
-
-Sat Dec 1 02:08:16 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/rdoc/test_rdoc_rubygems_hook.rb
- (TestRDocRubygemsHook#test_setup_unwritable): 1. check the existence
- of the file(directory) before touch it. 2. remove test
- file(directory) after the test. see [ruby-core:50388].
-
-Sat Dec 1 01:51:06 2012 Koichi Sasada <ko1@atdot.net>
-
- [EXPERIMENTAL]
- * iseq.c: add following two methods.
- * ISeq#line_trace_all returns all line traces (line numbers)
- * ISeq#line_trace_specify(pos, set) set `pos'th line event to
- specified_line event (if set is true).
- These features are introduced for debuggers (mainly to make
- breakpoint).
-
- * iseq.h: add decl. of C APIs.
-
- * test/ruby/test_iseq.rb: add tests.
-
- * vm_trace.c: add `specified_line' event.
-
- * include/ruby/ruby.h: ditto.
-
-Sat Dec 1 01:49:52 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/rubygems/test_gem_dependency_installer.rb: gems are of course
- binary files, so use a binary reading method when reading it.
- see [ruby-core:50388].
-
-Sat Dec 1 01:21:07 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * lib/rubygems/command.rb (Gem::Command#get_all_gem_names_and_versions):
- who assumes that the pathname of a gem never contains ':' ?
- yes, on Unixen pathnames can contain ':', and on Windows they almost
- certainly contain ':'. see [ruby-core:50388].
-
- * lib/rubygems/requirement.rb (Gem::Requirement::PATTERN_RAW): extract
- the regexp to match the version specifier from PATTERN to use in
- above method.
-
-Sat Dec 1 00:48:19 2012 Naohisa Goto <ngotogenome@gmail.com>
-
- * ext/fiddle/extconf.rb, ext/fiddle/function.c
- (Fiddle::Function::STDCALL): FFI_STDCALL is not a macro, but an
- enumeration. [ruby-core:50398] [Bug #7483]
-
-Sat Dec 1 00:08:55 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/rubygems/test_gem_installer.rb
- (TestGemInstaller#test_check_executable_overwrite_other_non_gem):
- on Windows, rubygems always generate a wrapper .bat file when
- installing a file into bin, so testing no-overwrite a wrapper file
- and a non-wrapper file is nonsense. see [ruby-core:50388].
-
-Fri Nov 30 23:39:58 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/rubygems/test_gem_installer.rb
- (TestGemInstaller#test_check_executable_overwrite_default_bin_dir):
- if the executable to be overwritten was generated by rubygems, the
- error message differs from the only copied one's.
- see [ruby-core:50388].
-
-Fri Nov 30 23:27:26 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/rubygems/test_gem_ext_ext_conf_builder.rb
- (TestGemExtExtConfBuilder::test_class_make): reading with binary mode
- of course introduce \r on Windows. see [ruby-core:50388].
-
-Fri Nov 30 23:11:37 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * lib/rubygems/specification.rb
- (Gem::Specification.validate_permissions): don't check executability
- of the source on Windows. they will be wrapped to .bat files when
- installing. see [ruby-core:50388].
-
-Fri Nov 30 22:44:14 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * vm_core.h (rb_vm_struct): add thread_destruct_lock field.
- * thread.c (Init_Thread): ditto.
- * thread.c (rb_vm_gvl_destroy): ditto.
-
- * thread.c (thread_start_func_2): make sure vm->running_thread
- don't point to dead thread.
- * thread.c (timer_thread_function): close a race against thread
- destruction. [Bug #4911][ruby-dev:43859]
-
- * vm_core.h (rb_thread_set_current): reset running time of
- current thread instead of previous thread. We no longer
- assume previous running thread still live.
-
-Fri Nov 30 21:57:43 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * revert r38053 because it causes too many test failures.
- if you've already installed r38053 or later, remove the installed
- lib/ruby/gems/2.0.0 directory and reinstall this revision or later.
-
-Fri Nov 30 21:07:56 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * lib/test/unit/parallel.rb (Test::Unit::Worker.run): wrap LoadError
- because it's Gem::LoadError sometimes. see [Bug #6882]
-
-Fri Nov 30 20:47:44 2012 Koichi Sasada <ko1@atdot.net>
-
- * thread.c: TracePoint#self returns invoking/exiting thread object
- at thread_begin/end event.
-
- * test/ruby/test_settracefunc.rb: fix test.
-
-Fri Nov 30 19:55:17 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/ruby/memory_status.rb (Memory::Win32): use fiddle instead of dl,
- but I doubt fiddle is not compatible with dl. (if you are interested,
- see the diff.) [ruby-core:50194] [Bug #7443]
-
-Fri Nov 30 19:37:44 2012 Kouhei Sutou <kou@cozmixng.org>
-
- * defs/default_gems: Add base directory column.
-
- * tool/rbinstall.rb:
- - Install .gemspecs of default gem to
- #{GEM_HOME}/specifications/default/.
- - Update files parameter of .gemspecs by relative path from
- library directory.
-
-Fri Nov 30 19:30:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * vm_trace.c:
- tracepoint_attr_return_value (TracePoint#return_value):
- include `:b_return` for method doc
- tracepoint_enable_m, tracepoint_disable_m (#enable/#disable):
- don't have block argument, document block scope
-
-Fri Nov 30 18:52:56 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_trace.c (tracepoint_disable_m, tracepoint_enable_m):
- fix block parameter.
- No argument should be given to a block which is passed
- to TracePoint#enable (and disable).
-
-Fri Nov 30 18:23:26 2012 Koichi Sasada <ko1@atdot.net>
-
- * thread.c: rename Thread.control_interrupt
- to Thread.async_interrupt_timing.
- The option name `:never' is also changed to `:defer'.
- [ruby-core:50375] [ruby-trunk - Feature #6762]
-
- * thread.c: remove Thread.check_interrupt.
- This method is difficult to understand by name.
-
- * thread.c: add Thread.async_interrupted?.
- This method check any deferred async interrupts.
-
- * test/ruby/test_thread.rb: change tests for above.
-
-Fri Nov 30 18:24:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * vm_trace.c: Documentation for TracePoint API
- [ruby-core:47243] [Feature #6895]
-
-Fri Nov 30 17:43:50 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * string.c (rb_str_cmp_m): try to compare with to_str result if
- possible before calling <=> method. [ruby-core:49279] [Bug #7342]
-
- * string.c (rb_str_cmp_m): use rb_check_funcall instead of respond_to
- and call.
-
- * string.c (rb_str_cmp_m): return fixed value, one of -1,0,+1 always.
-
-Fri Nov 30 16:19:14 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm_dump.c (rb_vm_bugreport): get rid of calling methods in sigsegv
- handler. based on a patch by charliesome (Charlie Somerville)
- [ruby-core:49573] [Bug #7402]
-
-Fri Nov 30 16:05:44 2012 Eric Hodel <drbrain@segment7.net>
-
- * NEWS: Added RubyGems 2.0.0
-
-Fri Nov 30 15:24:37 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (parser_yylex): fix false usage of local variable, it cannot
- appear in fname state [ruby-core:49659] [Bug #7408]
-
-Fri Nov 30 15:20:12 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems/package.rb: Load YAML for building gems.
- * test/rubygems/test_gem_commands_contents_command.rb: Sort expected
- output of default gem contents. Re-fixes r38004 and r38005.
-
-Fri Nov 30 15:15:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * vm_trace.c (set_trace_func): Formatting of params and events
-
-Fri Nov 30 14:45:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/net/http.rb: Net::HTTP::Patch to list of HTTP Request Classes
- Patch by Ryunosuke SATO [Fixes #217 on github]
-
-Fri Nov 30 14:05:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/cgi.rb: CGI example for HTML generation
- Patch by Marcus Stollsteimer [ruby-core:50303] [Bug #7465]
-
-Fri Nov 30 13:52:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * time.c: Documentation improvements, grammar and formatting
- Patch by Bernd Homuth [ruby-core:49203] [Bug #7326]
-
-Fri Nov 30 13:48:33 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc.rb: Set version to 4.0.0.preview2
- * lib/rubygems.rb: Set version to 2.0.0.preview2
-
-Fri Nov 30 13:11:53 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems/commands/setup_command.rb: Remove old files on install
- of RubyGems. (not by rbinstall.rb).
- * test/rubygems/test_gem_commands_setup_command.rb: Test for above.
-
-Fri Nov 30 12:47:59 2012 Akinori MUSHA <knu@iDaemons.org>
-
- * lib/abbrev.rb (Abbrev#abbrev): A fixed string prefix pattern
- should only match the beginning of each word, not the beginning
- of every line in it.
-
- * lib/abbrev.rb (Abbrev#abbrev): Stop using a regexp that causes a
- false warning. [Bug #7471]
-
-Fri Nov 30 12:30:55 2012 Akinori MUSHA <knu@iDaemons.org>
-
- * test/test_abbrev.rb: Add tests for lib/abbrev.rb.
-
-Fri Nov 30 12:27:51 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems/spec_fetcher.rb: Allow prerelease spec fetching to fail
- for bundler.
- * test/rubygems/test_gem_spec_fetcher.rb: Test for above.
-
-Fri Nov 30 12:20:53 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rake/backtrace.rb: Removed duplication in
- Rake::Backtrace::SUPPRESSED_PATHS
- * test/rake/test_rake_backtrace.rb: Skip tests when tmpdir is in the
- suppressed pattern.
-
-Fri Nov 30 11:07:45 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * revert r37993 to avoid SEGV in tests.
-
-Fri Nov 30 10:38:54 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc/ri/driver.rb: Relaxed matching for pages to be more
- user-friendly.
- * test/rdoc/test_rdoc_ri_driver.rb: Test for above.
-
-Fri Nov 30 09:50:16 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc/markdown.rb: Fixed warnings with -w
-
-Fri Nov 30 09:38:22 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * include/ruby/ruby.h (RB_GC_GUARD_PTR): add note.
-
- * vm_backtrace.c (backtrace_to_str_ary): use RB_GC_GUARD() instead of
- RB_GC_GUARD_PTR() which has no effect.
- (backtrace_to_location_ary): ditto.
- (vm_backtrace_to_ary): ditto.
-
-Fri Nov 30 09:22:52 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems/commands/contents_command.rb: Sort output from command.
- Replaces r38004, r38005
- * test/rubygems/test_gem_commands_contents_command.rb: ditto.
-
- * lib/rubygems/defaults.rb: Use Gem.path_separator for jruby support.
- * lib/rubygems/path_support.rb: ditto
-
-Fri Nov 30 08:34:03 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc/generator/darkfish.rb: Silenced warning
- * test/rdoc/test_rdoc_rdoc.rb: ditto
-
- * lib/rdoc/markup/parser.rb: Use byteslice when available for
- performance
- * test/rdoc/test_rdoc_markup_parser.rb: Test for above
- * lib/rdoc/test_case.rb: ditto
-
- * lib/rdoc/parser/ruby.rb: Fixed bug parsing yield({})
- * test/rdoc/test_rdoc_parser_ruby.rb (end):
-
- * lib/rdoc/rubygems_hook.rb: Skip default gems. Display generator
- name properly.
- * test/rdoc/test_rdoc_rubygems_hook.rb: Test for above
-
- * lib/rdoc/servlet.rb: Fixed typo.
-
-Fri Nov 30 08:09:56 2012 Narihiro Nakamura <authornari@gmail.com>
-
- * gc.c : remove a unused function.
-
-Fri Nov 30 07:46:42 2012 Narihiro Nakamura <authornari@gmail.com>
-
- * gc.c (rb_objspace_call_finalizer): finalize_deferred may free up
- a object which is reachable from a part after this function,
- e.g. ruby_vm_destruct(). [ruby-dev:46647] [Bug #7452]
-
- * test/ruby/test_gc.rb (test_finalizing_main_thread): add a test
- for above.
-
-Fri Nov 30 07:43:44 2012 Koichi Sasada <ko1@atdot.net>
-
- * thread.c (rb_thread_interrupted): avoid warning of
- implicit conversion.
-
- * thread.c (rb_threadptr_execute_interrupts): ditto.
-
-Fri Nov 30 07:34:28 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_backtrace.c: add GC guards.
-
-Fri Nov 30 07:21:33 2012 Koichi Sasada <ko1@atdot.net>
-
- [EXPERIMENTAL: NEED DISCUSS]
- * vm_trace.c: add events
- * :thread_begin - hook at thread beginning.
- * :thread_end - hook at thread ending.
- * :b_call - hook at block enter.
- * :b_return - hook at block leave.
- This change slow down block invocation.
- Please try and give us feedback until 2.0 code freeze.
-
- * include/ruby/ruby.h: ditto.
-
- * compile.c (rb_iseq_compile_node): ditto.
-
- * insns.def: ditto.
-
- * thread.c: ditto.
-
- * vm.c: ditto.
-
- * include/ruby/debug.h: add a comment.
-
- * test/ruby/test_settracefunc.rb: add a tests.
-
-Fri Nov 30 06:56:30 2012 Ryan Davis <ryand-ruby@zenspider.com>
-
- * test/minitest/*: Imported minitest 4.3.2 (r8027)
-
-Fri Nov 30 04:16:29 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rake/*: Updated to rake 0.9.5
- * test/rake/*: ditto.
- * NEWS: ditto.
-
-Fri Nov 30 02:53:47 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * vm.c: add a return hook when a method raises an exception.
-
- * probes_helper.h: look up klass and method if none are provided.
-
- * eval.c: update macro usage.
-
- * vm_eval.c: ditto.
-
- * vm_insnhelper.c: ditto.
-
- * test/dtrace/test_function_entry.rb: test for change.
-
-Fri Nov 30 02:27:12 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * compile.c (compile_array_): refix r37991 remove assertion:
- it is true only if type == COMPILE_ARRAY_TYPE_HASH.
- [ruby-dev:46658] [Bug #7466]
-
- * vm.c (m_core_hash_from_ary): add assertion instead of above.
-
- * vm.c (m_core_hash_merge_ary): ditto.
-
-Thu Nov 29 19:15:14 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * compile.c (compile_array_): hash elements must be paired even for
- literal elements. [ruby-dev:46658] [Bug #7466]
-
-Thu Nov 29 22:39:35 2012 Naohisa Goto <ngotogenome@gmail.com>
-
- * ext/openssl/ossl_ssl.c (ssl_npn_encode_protocol_i): fix byte order
- issue on big-endian architecture [ruby-core:50292] [Bug #7463]
-
-Thu Nov 29 22:23:31 2012 Hiroshi Nakamura <nahi@ruby-lang.org>
-
- * test/openssl/test_cipher.rb (test_ctr_if_exists): add CTR mode test
- if underlying OpenSSL supports it. See #4408
-
-Thu Nov 29 21:42:16 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * vm_method.c (rb_method_entry_make): add a method entry with
- VM_METHOD_TYPE_REFINED to the class refined by the refinement if
- the target module is a refinement. When a method entry with
- VM_METHOD_TYPE_UNDEF is invoked by vm_call_method(), a method with
- the same name is searched in refinements. If such a method is
- found, the method is invoked. Otherwise, the original method in
- the refined class (rb_method_definition_t::body.orig_def) is
- invoked. This change is made to simplify the normal method lookup
- and to improve the performance of normal method calls.
-
- * vm_method.c (EXPR1, search_method, rb_method_entry),
- vm_eval.c (rb_call0, rb_search_method_entry): do not use
- refinements for method lookup.
-
- * vm_insnhelper.c (vm_call_method): search methods in refinements if
- ci->me is VM_METHOD_TYPE_REFINED. If the method is called by
- super (i.e., ci->call == vm_call_super_method), skip the same
- method entry as the current method to avoid infinite call of the
- same method.
-
- * class.c (include_modules_at): add a refined method entry for each
- method defined in a module included in a refinement.
-
- * class.c (rb_prepend_module): set an empty table to
- RCLASS_M_TBL(klass) to add refined method entries, because
- refinements should have priority over prepended modules.
-
- * proc.c (mnew): use rb_method_entry_with_refinements() to get
- a refined method.
-
- * test/ruby/test_refinement.rb (test_inline_method_cache): do not skip
- the test because it should pass successfully.
-
- * test/ruby/test_refinement.rb (test_redefine_refined_method): new
- test for the case a refined method is redefined.
-
-Thu Nov 29 17:45:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * variable.c (rb_const_set): show namespace in warning messages.
- [Feature #7190]
-
-Thu Nov 29 17:31:53 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/rubygems.rb (Gem.load_yaml): return if Kernel#gem is not defined
- yet. This causes crash if test-all requires libraries in a certain
- order. A simple reproducible code is
- ruby --disable-gem -e'require"yaml";require"minitest/autorun"'
-
-Thu Nov 29 17:19:26 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/tracer.rb: Updated to match removal of custom_require from
- RubyGems.
- * test/test_tracer.rb: ditto. Improved failure message if the test
- fails
-
-Thu Nov 29 17:15:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * gc.c: Documentation for GC, GC::Profiler, ObjectSpace, and
- ObjectSpace::WeakMap [ruby-core:50245] [Bug #7449]
-
-Thu Nov 29 17:12:26 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * tool/generic_erb.rb, tool/id2token.rb: add --path-separator option
- for mingw where make and built ruby live in different world.
-
- * tool/vpath.rb: extract from tool/instruction.rb.
-
-Thu Nov 29 17:11:06 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * test/io/wait/test_io_wait.rb (TestIOWait#fill_pipe):
- Errno::EWOULDBLOCK may not be the same as Errno::EAGAIN. patch by
- phasis68 (Heesob Park) at [ruby-core:49894]. [Bug #7420]
-
-Thu Nov 29 17:03:38 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems/test_case.rb: Determine path to certificates to avoid
- build-dir problems.
- * test/rubygems/test_gem_security_signer.rb: Use predetermined paths
- to avoid build-dir problems.
-
-Thu Nov 29 16:18:14 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems/test_case.rb: Disable loading of keys and certificates
- outside rubygems or ruby tests as the files are not available (or
- necessary).
-
-Thu Nov 29 16:14:41 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_backtrace.c (rb_debug_inspector_open): use RARRAY_LENINT() for
- int variable.
-
-Thu Nov 29 15:59:55 2012 Koichi Sasada <ko1@atdot.net>
-
- * include/ruby/debug.h: add rb_debug_inspector_* APIs.
-
- * vm_backtrace.c: ditto.
-
- * common.mk: add dependency from vm_backtrace.o to
- include/ruby/debug.h.
-
- * proc.c (rb_binding_new_with_cfp): constify.
-
- * vm.c (rb_vm_get_ruby_level_next_cfp): constify.
-
- * vm_core.h, vm_trace.c: move decls.
-
-Thu Nov 29 15:56:14 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/rdoc/test_case.rb (RDoc::TestCase#verbose_capture_io):
- defined for asserts of warnings.
-
- * test/rdoc: use verbose_capture_io on asserts of warnings.
- they failed when tests was run with RUBYOPT=-W0.
-
-Thu Nov 29 15:53:38 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * ext/psych/extconf.rb: added --enable-bundled-libyaml option. this
- enforces using bundled libyaml.
-
-Thu Nov 29 15:51:54 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems*: Updated to RubyGems 2.0
- * test/rubygems*: ditto.
-
- * common.mk (prelude): Updated for RubyGems 2.0 source rearrangement.
-
- * tool/change_maker.rb: Allow invalid UTF-8 characters in source
- files.
-
-Thu Nov 29 15:38:14 2012 Koichi Sasada <ko1@atdot.net>
-
- * include/ruby/debug.h: provide rb_tracearg_*() APIs,
- instead of rb_tracepoint_attr_*().
- These APIs are for debuggers/profilers.
- They will be explained in another docs sometime.
-
- * vm_trace.c: ditto.
-
-Thu Nov 29 15:10:45 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * test/minitest/test_minitest_unit.rb: restore orig_verbose only
- if it is set. This broke rdoc's tests.
- http://u64.rubyci.org/~chkbuild/ruby-trunk/log/20121129T050102Z.diff.html.gz
-
-Thu Nov 29 14:56:30 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_trace.c (rb_tracepoint_attr_method_id):
- rename TracePoint#id to TracePoint#method_id.
-
- * include/ruby/debug.h: ditto.
-
- * test/ruby/test_settracefunc.rb: ditto,
-
-Thu Nov 29 14:49:10 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_trace.c (rb_tracepoint_attr_defined_class):
- rename TracePoint#klass to TracePoint#defined_class.
- [ruby-core:50187] Re: [ruby-trunk - Feature #6895]
-
- * include/ruby/debug.h: ditto.
-
- * test/ruby/test_settracefunc.rb: ditto.
-
-Thu Nov 29 14:27:57 2012 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (gc_stat): prepare Symbol objects at first time
- to make it fast.
-
-Thu Nov 29 14:02:15 2012 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (gc_stat): GC.stat supports new information
- * total_allocated_object: total allocated object number.
- * total_freed_object: total freed object number.
- Above two numbers are only accumulated and they will
- overflow (return to 0). Please use them as a hint.
-
-Thu Nov 29 12:13:54 2012 Ryan Davis <ryand-ruby@zenspider.com>
-
- * lib/minitest/*: Imported minitest 4.3.2 (r8026)
- * test/minitest/*: ditto
-
-Thu Nov 29 11:06:06 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread.c (thread_start_func_2): remove unused code. When
- th->safe_level == 4, th->errinfo never be thrown. So, to
- create new exception makes no sense.
-
-Thu Nov 29 10:29:53 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_backtrace.c: same as a last patch.
-
-Thu Nov 29 10:24:25 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_backtrace.c: use `long' for return values of `NUM2LONG()'.
-
-Thu Nov 29 09:52:08 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * thread.c (do_select): suppress warning (uninitialized value warning)
- with UNINITIALIZED_VAR().
-
-Thu Nov 29 09:36:09 2012 Koichi Sasada <ko1@atdot.net>
-
- * eval.c (ruby_cleanup): delay THREAD_KILLED timing.
- It should be located just before rb_thread_terminate_all().
-
-Thu Nov 29 09:10:17 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_backtrace.c (vm_backtrace_to_ary): support range argument
- like Array#[].
- [ruby-core:50092] [ruby-trunk - Feature #7434]
- Test and document is not available. Please help us.
-
-Thu Nov 29 06:46:33 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread.c (thread_start_func_2): small cleanups.
-
-Thu Nov 29 06:37:08 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread.c (thread_start_func_2): remove unused code.
- this function never be used for main thread.
-
-Thu Nov 29 06:27:55 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread.c (thread_start_func_2): remove unused code.
- errinfo = th->errinfo; and errinfo = rb_errinfo(); are
- the same.
-
-Thu Nov 29 05:26:32 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_backtrace.c (backtrace_to_str_ary2): rename to backtrace_to_str_ary.
-
- * vm_backtrace.c (rb_backtrace_to_str_ary): use `backtrace_to_str_ary()'.
-
- * vm_backtrace.c (backtrace_to_frame_ary): rename to
- backtrace_to_location_ary.
-
-Thu Nov 29 05:19:25 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * probes.d: Change function-entry probe to method-entry.
- * insns.def: ditto
- * probes_helper.h: ditto
- * test/dtrace/test_function_entry.rb: ditto
- * test/dtrace/test_singleton_function.rb: ditto
- * vm.c: ditto
- * vm_eval.c: ditto
- * vm_insnhelper.c: ditto
-
-Thu Nov 29 04:45:17 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_backtrace.c: rename Class name from
- ::RubyVM::Backtrace and ::RubyVM::Backtrace::Location
- to ::Thread::Backtrace and ::Thread::Backtrace::Location.
-
-Wed Nov 28 23:52:02 2012 Masaya Tarui <tarui@ruby-lang.org>
-
- * NEWS (Thread) remove incompatible changes about trap.
-
-Wed Nov 28 23:39:01 2012 Koichi Sasada <ko1@atdot.net>
-
- * thread.c (rb_mutex_sleep): fix to allow spurious wakeup.
- [ruby-dev:46654] [ruby-trunk - Bug #7455]
-
- * NEWS: write about spurious wakeup.
-
-Wed Nov 28 22:57:23 2012 Koichi Sasada <ko1@atdot.net>
-
- * thread_win32.c: catch up latest change of BLOCKING_REGION.
-
-Wed Nov 28 22:54:21 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_insnhelper.c (vm_call_method): fix undefined behavior.
- Should not access scope local variable from outer scope.
-
-Wed Nov 28 22:20:55 2012 Masaya Tarui <tarui@ruby-lang.org>
-
- * test/ruby/test_thread.rb (test_thread_status_in_trap): change test for
- thread status in trap. now can accept Thread#join and Thread#value in trap.
-
-Wed Nov 28 21:58:47 2012 Koichi Sasada <ko1@atdot.net>
-
- * include/ruby/thread.h (rb_thread_call_without_gvl2): change
- meaning of function.
- This function is called with same parameters of
- `rb_thread_call_without_gvl()'.
- However, if interrupts are detected, then return immediately.
-
- * thread.c: implement `rb_thread_call_without_gvl2()'.
-
-Wed Nov 28 21:31:21 2012 Masaya Tarui <tarui@ruby-lang.org>
-
- * thread.c (thread_join_sleep): check spurious wakeup by itself for
- corresponding status change in trap context.
- * vm_core.h (struct rb_thread_struct): add rb_thread_list_t and use as join_list for
- reentry by trap context.
- * thread.c (thread_start_func_2): ditto.
- * thread.c (remove_from_join_list): ditto.
- * thread.c (rb_thread_atfork): ditto.
- * thread.c (thread_join): ditto. & remove trap handler check.
- * thread.c (sleep_forever): add argument : spurious_check.
- * thread.c (sleep_timeval): ditto.
- * thread.c (rb_thread_sleep_forever): set spurious_check.
- * thread.c (rb_thread_sleep_deadly): ditto.
- * thread.c (sleep_for_polling): ditto.
- * thread.c (rb_thread_wait_for): ditto.
- * thread.c (sleep_wait_for_interrupt): bypass spurious_check.
-
-Wed Nov 28 21:23:18 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/psych/yaml/emitter.c (yaml_emitter_write_indicator): constify.
-
- * ext/psych/yaml/emitter.c (yaml_emitter_write_block_scalar_hints):
- ditto.
-
- * ext/psych/extconf.rb: mingw32 also needs macros for win32, not
- only mswin32.
-
- * ext/psych/extconf.rb: compile sources in the source directory
- without copying by using VPATH.
-
-Wed Nov 28 21:18:57 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/mkmf.rb (MakeMakefile#each_compile_rules): splat $(*VPATH*) for
- each VPATH elements.
-
-Wed Nov 28 16:40:14 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * vm_core.h (enum rb_thread_status): remove THREAD_TO_KILL
- * vm_core.h (struct rb_thread_struct): add to_kill field
- * thread.c (terminate_i): convert THREAD_TO_KILL to to_kill.
- * thread.c (rb_threadptr_to_kill): ditto.
- * thread.c (rb_thread_kill): ditto.
- * thread.c (rb_thread_wakeup_alive): ditto.
- * thread.c (thread_list_i): ditto.
- * thread.c (static const char): ditto.
- * thread.c (thread_status_name): ditto.
- * thread.c (rb_thread_status): ditto.
- * thread.c (rb_thread_inspect): ditto.
- * vm_backtrace.c (thread_backtrace_to_ary): ditto.
-
- * thread.c (rb_threadptr_execute_interrupts): fix thread status
- overwritten issue. [Bug #7450] [ruby-core:50249]
-
- * test/ruby/test_thread.rb (test_hread_status_raise_after_kill):
- test for the above.
- * test/ruby/test_thread.rb (test_thread_status_in_trap): test for
- thread status in trap.
- * test/ruby/test_thread.rb (test_status_and_stop_p): remove
- Thread.control_interrupt unsafe test. Thread#kill no longer
- changes thread status. Instead of, Thread#kill receiver changes
- their own status when receiving kill signal.
-
-Wed Nov 28 16:21:46 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread.c (struct rb_mutex_struct): add allow_trap field.
- * internal.h (rb_mutex_allow_trap): added.
- * thread.c (rb_mutex_lock, rb_mutex_unlock): check mutex->allow_trap.
- * thread.c (mutex_sleep): remove trap check because it uses
- rb_mutex_lock and rb_mutex_unlock internally.
- * thread.c (rb_mutex_allow_trap): new helper function for the above.
-
- * io.c (io_binwrite): mark fptr->write_lock as writable in trap.
-
- * test/ruby/test_signal.rb (test_trap_puts): test for the above.
-
-Wed Nov 28 16:59:12 2012 Koichi Sasada <ko1@atdot.net>
-
- * proc.c: remove Proc#== and Proc#eql?.
- Proc objects compared with their object ids.
- [Bug #4559]
-
- * test/ruby/test_proc.rb: remove related test.
-
-Wed Nov 28 16:41:04 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc/servlet.rb: Add support for serving documentation from a
- subdirectory.
- * lib/rdoc/generator/darkfish.rb: ditto
- * test/rdoc/test_rdoc_servlet.rb: Test for above
- * test/rdoc/test_rdoc_servlet.rb: ditto
-
-Wed Nov 28 15:37:17 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * configure.in: fix r37924: run only on i[3-6]86-linux.
-
-Wed Nov 28 15:31:11 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * io.c (FMODE_SYNCWRITE): removed unused macro.
-
-Wed Nov 28 15:19:25 2012 Naohisa Goto <ngotogenome@gmail.com>
-
- * configure.in: revert r37911, r37906 and r37904 which break build
- with non-gcc and/or non-IA32 compilers, e.g. Solaris Studio,
- Fujitsu C Compiler. [ruby-dev:46646] [Bug #7451]
-
-Wed Nov 28 14:50:55 2012 Koichi Sasada <ko1@atdot.net>
-
- * ext/psych/extconf.rb: copy sources into build directory,
- not into srcdir.
-
-Wed Nov 28 14:34:06 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread.c (rb_mutex_lock): moved trap context check from
- rb_mutex_trylock because try_lock have no change to make
- a deadlock.
- * thread.c (rb_mutex_trylock): ditto.
- * NEWS: news for the above.
-
-Wed Nov 28 13:39:54 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread.c (thread_s_new): uses main_thread->status instead of
- th->inhibit_thread_creation for preventing thread creation.
- * vm_core.h (rb_vm_struct): remove inhibit_thread_creation field.
- * thread.c (rb_thread_terminate_all): ditto.
-
-Wed Nov 28 13:27:29 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/extconf.rb: use embedded libyaml if no system libyaml is
- found. [ruby-core:49463]
- * ext/psych/lib/psych.rb: updating to psych 2.0.0
- * ext/psych/lib/psych/deprecated.rb: updated docs
- * ext/psych/psych.gemspec: updated to psych 2.0.0
- * ext/psych/psych.h: fixing header file include for rename
- * ext/psych/psych_emitter.c: renamed to avoid libyaml conflict.
- * ext/psych/psych_emitter.h: ditto
- * ext/psych/psych_parser.c: ditto
- * ext/psych/psych_parser.h: ditto
- * ext/psych/psych_to_ruby.c: ditto
- * ext/psych/psych_to_ruby.h: ditto
- * ext/psych/psych_yaml_tree.c: ditto
- * ext/psych/psych_yaml_tree.h: ditto
- * ext/psych/yaml/LICENSE: embedding libyaml 0.1.4
- * ext/psych/yaml/api.c: ditto
- * ext/psych/yaml/config.h: ditto
- * ext/psych/yaml/dumper.c: ditto
- * ext/psych/yaml/emitter.c: ditto
- * 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.h: ditto
- * ext/psych/yaml/yaml_private.h: ditto
-
-Wed Nov 28 12:54:59 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread.c (thread_join): A trap handler check was moved from
- thread_join_m because Thread#value should be raised an exception
- too.
- * thread.c (thread_join_m): remove trap handler check.
- * test/ruby/test_thread.rb (test_thread_join_in_trap): add test
- for thread#value.
- * NEWS: documentation fix for the above.
-
-Wed Nov 28 11:07:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * ext/fiddle/closure.c: Documentation for Fiddle
- * ext/fiddle/lib/fiddle/import.rb: ditto
- * ext/fiddle/lib/fiddle/value.rb: ditto
- * ext/fiddle/lib/fiddle/pack.rb: ditto
- * ext/fiddle/lib/fiddle/cparser.rb: ditto
- * ext/fiddle/lib/fiddle/struct.rb: ditto
- * ext/fiddle/lib/fiddle/function.rb: ditto
-
-Wed Nov 28 09:15:51 2012 Ryan Davis <ryand-ruby@zenspider.com>
-
- * ext/strscan/strscan.c: Added #charpos for multibyte string position.
- * test/strscan/test_stringscanner.rb: ditto
-
-Wed Nov 28 09:00:34 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/fiddle/fiddle.c: adding alignment constants for compatibility
- with DL.
- * ext/fiddle/fiddle.h: ditto
- * ext/fiddle/lib/fiddle/cparser.rb: importing the C parser for DL
- backwards compatibility.
- * ext/fiddle/lib/fiddle/import.rb: importing the import DSL for DL
- backwards compatibility.
- * ext/fiddle/lib/fiddle/pack.rb: importing structure pack for DL
- backwards compatibility.
- * ext/fiddle/lib/fiddle/value.rb: ditto
- * ext/fiddle/lib/fiddle/struct.rb: importing struct DSL for DL backwards
- compatibility.
- * test/dl/test_c_struct_entry.rb: importing tests
- * test/dl/test_c_union_entity.rb: ditto
- * test/dl/test_cparser.rb: ditto
- * test/dl/test_import.rb: ditto
- * test/fiddle/test_c_struct_entry.rb: ditto
- * test/fiddle/test_c_union_entity.rb: ditto
- * test/fiddle/test_cparser.rb: ditto
- * test/fiddle/test_import.rb: ditto
-
-Wed Nov 28 08:56:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * doc/globals.rdoc: Add documentation file for magic globals
- [ruby-core:29048] [Bug #3022]
-
-Wed Nov 28 08:55:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * .document: Add README's to be included with docs
-
-Wed Nov 28 08:26:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * ext/dl/lib/dl.rb: Deprecation notice for DL
-
-Wed Nov 28 08:25:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * ext/fiddle/closure.c: Documentation for Fiddle
- * ext/fiddle/pointer.c: ditto
- * ext/fiddle/function.c: ditto
- * ext/fiddle/lib/fiddle.rb: ditto
- * ext/fiddle/fiddle.c: ditto
- * ext/fiddle/handle.c: ditto
-
-Wed Nov 28 04:53:40 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/fiddle/handle.c: Make Fiddle independent of DL, copy DL::Handle
- to Fiddle::Handle.
- * ext/fiddle/pointer.c: Make Fiddle independent of DL, copy
- DL::Pointer to Fiddle::Pointer.
- * test/fiddle/test_func.rb: relevant tests
- * test/fiddle/test_handle.rb: ditto
- * test/fiddle/test_pointer.rb: ditto
- * ext/dl/lib/dl/struct.rb: use Fiddle::Pointer if available
- * ext/fiddle/extconf.rb: check for dlfcn.h
- * ext/fiddle/fiddle.c: add constants for sizeof() things
- * ext/fiddle/fiddle.h: include dlfcn.h
- * ext/fiddle/function.c: expose a C function for creating new
- Fiddle::Function objects.
- * ext/fiddle/lib/fiddle.rb: include constants for dl backwards compat
- * ext/fiddle/lib/fiddle/function.rb: read the pointer from the
- function for dl backwards compat.
- * test/dl/test_callback.rb: check the addresses of the pointers rather
- than their types.
- * test/fiddle/helper.rb: remove dependency on dl
- * test/fiddle/test_closure.rb: ditto
- * test/fiddle/test_fiddle.rb: ditto
-
-Wed Nov 28 03:03:28 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * configure.in (opt-dir): don't use non portable flag -E of sed.
-
-Wed Nov 28 02:55:35 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * configure.in (ARCH_FLAG): __sync_val_compare_and_swap_4 needs
- -march=$target_cpu on at least linux gcc 4.1.
- patched by KOSAKI Motohiro
-
-Tue Nov 27 22:03:09 2012 Akinori MUSHA <knu@iDaemons.org>
-
- * string.c (rb_str_enumerate_chars, rb_str_enumerate_codepoints)
- (rb_str_enumerate_lines): Dummy initialization of ary has been
- replaced with UNINITIALIZED_VAR().
-
-Tue Nov 27 21:29:00 2012 Kenta Murata <mrkn@mrkn.jp>
-
- * bignum.c (bigdivrem): optimize the way to retry calculation of
- bigdivrem so that the calculation is started from the point where
- the last interruption was occurred.
-
- * bignum.c (bigdivrem1): ditto.
-
- * test/ruby/test_bignum.rb: add a test case for rb_bigdivrem in the
- case that an interruption is occurred during bigdivrem1 is running.
-
-Tue Nov 27 19:56:43 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm.c (rb_vm_make_env_object): make Proc object if Env is possible
- to point block.
- [ruby-core:41038] [ruby-trunk - Bug #5634]
-
- * vm.c (rb_vm_make_proc): No need to make Proc object here.
-
- * bootstraptest/test_proc.rb: add tests.
-
-Tue Nov 27 18:51:06 2012 Naohisa Goto <ngotogenome@gmail.com>
-
- * ruby_atomic.h (ATOMIC_CAS): added for Solaris and other platforms.
- * ruby_atomic.h, signal.c (NEED_RUBY_ATOMIC_OPS): renamed from
- NEED_RUBY_ATOMIC_EXCHANGE.
- * signal.c (ruby_atomic_compare_and_swap): naive, non-atomic
- compare-and-swap implementation only used for platforms without
- valid support for atomic operations.
-
-Tue Nov 27 17:43:46 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc/*: Added --root option for building documentation outside
- the source directory.
- * test/rdoc/*: ditto
- * common.mk (rdoc): Added --root to rdoc rule
-
-Tue Nov 27 16:24:45 2012 Eric Hodel <drbrain@segment7.net>
-
- * test/rdoc/test_rdoc_ri_paths.rb: Fixed duplicate path bug which
- caused windows failures.
-
-Tue Nov 27 16:06:00 2012 Eric Hodel <drbrain@segment7.net>
-
- * test/rdoc/test_rdoc_generator_darkfish.rb: Updated tests for windows
- * test/rdoc/test_rdoc_options.rb: ditto
- * test/rdoc/test_rdoc_parser.rb: ditto
- * test/rdoc/test_rdoc_rdoc.rb: ditto
- * test/rdoc/test_rdoc_ri_driver.rb: ditto
- * test/rdoc/test_rdoc_servlet.rb: ditto
-
-Tue Nov 27 15:13:51 2012 Eric Hodel <drbrain@segment7.net>
-
- * common.mk (rdoc): Set --debug for rdoc generation in case of bugs
-
-Tue Nov 27 14:56:45 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc/rubygems_hook.rb: Updated for (upcoming) RubyGems 2
- import.
- * test/rdoc/test_rdoc_rubygems_hook.rb: ditto
-
-Tue Nov 27 13:59:29 2012 Narihiro Nakamura <authornari@gmail.com>
-
- * NEWS: add improvements of the garbage collector.
-
-Tue Nov 27 13:27:46 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc*: Updated to RDoc 4.0 (pre-release)
- * bin/rdoc: ditto
- * test/rdoc*: ditto
- * NEWS: Updated with RDoc 4.0 information
-
-Tue Nov 27 12:17:11 2012 Koichi Sasada <ko1@atdot.net>
-
- * thread.c (rb_thread_terminate_all): retry broadcast only when
- an exception is raised.
-
-Tue Nov 27 12:02:25 2012 Koichi Sasada <ko1@atdot.net>
-
- * thread.c (rb_thread_terminate_all): broadcast terminate event
- not only an interrupt exception but any exceptions.
-
-Tue Nov 27 10:55:09 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * eval.c (ruby_cleanup): set thread status to THREAD_KILLED
- for preventing thr.raise.
- * test/ruby/test_thread.rb (test_main_thread_status_at_exit):
- test for the above.
-
-Tue Nov 27 10:31:29 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread.c (rb_thread_terminate_all): suppress a warning.
-
-Tue Nov 27 09:29:11 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread.c (thread_join): raises ThreadError if target thread
- is a main thread.
- * test/ruby/test_thread.rb (test_thread_join_main_thread):
- test for the above.
- * NEWS: news for the above.
-
-Tue Nov 27 09:24:47 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread.c (thread_join): raises ThreadError if target thread
- is a current thread.
- * test/ruby/test_thread.rb (test_thread_join_current):
- test for the above.
- * NEWS: news for the above.
-
-Tue Nov 27 09:59:16 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/extmk.rb (extmake): close mkmf.log for each libraries so that
- failure messages are not mixed.
-
-Tue Nov 27 09:58:48 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/digest/*/extconf.rb, ext/openssl/extconf.rb: get git rid of
- post-1.8 feature require_relative for cross compilation.
- [ruby-core:50160] [Bug #7439]
-
-Tue Nov 27 09:17:59 2012 Koichi Sasada <ko1@atdot.net>
-
- * NEWS: add TracePoint.
-
-Tue Nov 27 08:16:03 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_trace.c: rename TracePoint#file and TracePoint#line
- to TracePoint#path and TracePoint#lineno respectively.
- They are consistent to RubyVM::Backtrace::Location.
-
- * include/ruby/debug.h: ditto.
-
- * vm_core.h: ditto.
-
- * test/ruby/test_settracefunc.rb: ditto.
-
-Tue Nov 27 08:04:26 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread.c (rb_thread_terminate_all): broadcast eTerminateSignal
- again when Ctrl-C was pressed. [Feature #1952] [ruby-dev:39107]
-
-Tue Nov 27 07:58:03 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_core.h: add members to rb_trace_arg_t:
- * `klass_solved' represents klass and id is checked.
- * `line' represents line calculated from cfp.
- * `file' represents line calculated from cfp.
-
- * vm_trace.c: fix to use above data structures.
- No need to calculate klass and id, line and file
- pairs for each trace points.
-
-Tue Nov 27 07:47:09 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread.c (rb_thread_terminate_all): add RUBY_VM_CHECK_INTS_BLOCKING().
- Otherwise the loop in this function behave as busy loop because
- native_sleep() return immediately when RUBY_VM_INTERRUPTED() is true.
-
-Tue Nov 27 04:12:49 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/extmk.rb (extmake): git rid of post-1.8 features for cross
- compilation. [ruby-core:50160] [Bug #7439]
-
-Tue Nov 27 00:13:41 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread.c (rb_mutex_trylock, rb_mutex_unlock, mutex_sleep):
- raises ThreadError if called from trap handler as Thread#join.
- * NEWS: news for the above.
-
-Mon Nov 26 23:55:33 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * NEWS: update for Thread#join incompatible change.
-
-Mon Nov 26 22:44:24 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread.c (rb_thread_terminate_all): use native_sleep() instead
- of rb_thread_schedule(). Otherwise, it consume 100% cpu meaninglessly.
- [Bug #5368] [ruby-dev:44546]
- * thread.c (thread_start_func_2): last sub-thread wakes up main thread.
-
-Mon Nov 26 21:16:04 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * vm_core.h (RUBY_VM_SET_TIMER_INTERRUPT, RUBY_VM_SET_INTERRUPT)
- (RUBY_VM_SET_FINALIZER_INTERRUPT, RUBY_VM_SET_TRAP_INTERRUPT)
- (RUBY_VM_INTERRUPTED): use enum symbol instead of immediate value.
- * thread.c (thread_join_m, rb_threadptr_execute_interrupts): ditto.
- * signal.c (signal_exec): ditto.
-
-Mon Nov 26 20:23:20 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread.c (thread_join_m): use th->interrupt_mask instead of
- th->in_trap.
-
- * vm_core.h (struct rb_thread_struct): remove in_trap member.
- * signal.c (signal_exec): ditto.
- * thread.c (thread_create_core): ditto.
- * thread.c (Init_Thread): ditto.
-
-Mon Nov 26 20:23:49 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/ruby/test_argf.rb (TestArgf#test_chars): since marshal data is
- binary, shouldn't pass via text mode. use base64 encoded data.
-
-Mon Nov 26 19:45:18 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * ruby_atomic.h (ATOMIC_CAS): new macro for compare-and-exchange.
-
- * vm_core.h (struct rb_thread_struct): add interrupt_mask member.
- * thread.c (thread_create_core, Init_Thread): initialize
- th->thread_mask.
-
- * vm_core.h (RUBY_VM_INTERRUPTED_ANY): new macro for avoiding
- bare th->interrupt_flag.
- * vm_core.h (RUBY_VM_INTERRUPTED, RUBY_VM_INTERRUPTED): check
- th->interrupt_mask.
- * thread.c (set_unblock_function, rb_thread_schedule): replace
- th->interrupt_flag with RUBY_VM_INTERRUPTED_ANY()
-
- * signal.c (signal_exec): set up thread->interrupt_mask for
- preventing recursive trap handler.
- * vm_core.h (RUBY_VM_CHECK_INTS, RUBY_VM_CHECK_INTS_BLOCKING): ditto.
-
- * thread.c (rb_threadptr_execute_interrupts):
- don't process interrupt if it is masked.
- [Bug #6009] [ruby-core:42524]
-
-Mon Nov 26 19:43:42 2012 Koichi Sasada <ko1@atdot.net>
-
- * iseq.c (make_compile_option_value): add trace_instruction option.
- a patch by davidbalbert (David Albert).
- [Bug #6786]
-
-Mon Nov 26 19:10:53 2012 Koichi Sasada <ko1@atdot.net>
-
- * bootstraptest/test_thread.rb: try to `join' each 100
- threads.
- This benchmark seems consuming long time on travis-ci
- several times (and make `failure').
-
-Mon Nov 26 18:22:56 2012 Koichi Sasada <ko1@atdot.net>
-
- * common.mk: specify label `built-ruby'.
-
- * benchmark/driver.rb: quote path.
-
-Mon Nov 26 18:26:28 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * signal.c (signal_exec): add volatile to make sure setjmp safe.
-
-Mon Nov 26 18:19:47 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * signal.c (signal_exec): suppress "warning: variable 'signum'
- might be clobbered by 'longjmp' or 'vfork'" warning.
-
-Mon Nov 26 18:15:47 2012 Koichi Sasada <ko1@atdot.net>
-
- * benchmark/driver.rb: accept multiple `-e'.
- You don't need to use `;' separation character.
- [ruby-core:50139] [ruby-trunk - Bug #7380]
-
-Mon Nov 26 17:10:04 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * string.c (rb_str_enumerate_chars, rb_str_enumerate_codepoints)
- (rb_str_enumerate_lines): suppress "may be used uninitialized in
- this function" warning.
-
-Mon Nov 26 17:00:12 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * vm_core.h (rb_thread_struct): added 'in_trap' member for marking
- running trap handler.
- * signal.c (signal_exec): turn on in_trap when running trap.
- * thread.c (Init_Thread, thread_create_core): initialize in_trap
- when creating new threads.
- * thread.c (thread_join_m): raise ThreadError when running trap
- handler.Bug [#6416][ruby-core:44956]
- * test/ruby/test_thread.rb (test_thread_join_in_trap): new test
- for the above.
-
-Mon Nov 26 16:36:13 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * io.c (argf_each_codepoint): add missing ARGF#codepoints [Bug #7438]
-
-Mon Nov 26 15:50:29 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * bignum.c (bigdivrem): restart calculation when bigdivrem1 was
- interrupted by signal. Otherwise, ruby script may see a garbage
- value.
-
-Mon Nov 26 15:33:02 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * bignum.c (big_div_struct): added volatile to 'stop' member.
- Otherwise, "if (bds->stop)" check in bigdivrem1 don't read
- memory and ignore interrupt.
- * bignum.c (bigdivrem, rb_big_stop): ditto.
-
-Mon Nov 26 12:11:09 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * win32/Makefile.sub (DLNOBJ): missing in r37821.
-
-Mon Nov 26 10:50:19 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * test/ruby/test_process.rb (test_setsid): added a few wait for
- preventing that Process.getsid(io.pid) makes Errno::ESRCH.
-
-Sun Nov 25 22:34:00 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * array.c (ary_resize_smaller): new function to resize array.
-
- * array.c (rb_ary_delete): refactoring to extract a function.
-
- * array.c (rb_ary_delete_same): refactoring.
- It renames function, reduces duplicated code and removes unused
- code.
-
- * gc.c (wmap_final_func): follow the above change.
-
- * internal.h (rb_ary_delete_same): ditto.
-
-Sun Nov 25 22:27:33 2012 Benoit Daloze <eregontp@gmail.com>
-
- * array.c: fixes for the updated documentation in r35858:
- Typos and #take/#drop accept to take/drop 0 elements.
-
-Sun Nov 25 19:43:29 2012 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * NEWS: add a news about iconv.
-
-Sun Nov 25 03:49:23 2012 Akinori MUSHA <knu@iDaemons.org>
-
- * lib/set.rb, test/test_set.rb: Move tests embedded in lib/set.rb
- to test/test_set.rb.
-
-Sun Nov 25 03:44:50 2012 Akinori MUSHA <knu@iDaemons.org>
-
- * string.c (rb_str_each_line, rb_str_lines): String#lines now
- returns an array instead of an enumerator. Passing a block is
- deprecated but still supported for backwards compatibility.
- Based on the patch by yhara. [Feature #6670]
-
- * string.c (rb_str_each_char, rb_str_chars): Ditto for
- String#chars.
-
- * string.c (rb_str_each_codepoint, rb_str_codepoints): Ditto for
- String#codepoints.
-
- * string.c (rb_str_each_byte, rb_str_bytes): Ditto for
- String#bytes.
-
- * NEWS: Add notes for the above changes.
-
-Sun Nov 25 02:07:37 2012 Akinori MUSHA <knu@iDaemons.org>
-
- * test/ruby/envutil.rb (Test::Unit::Assertions#assert_warning)
- (Test::Unit::Assertions#assert_warn), test/ruby/envutil.rb,
- test/ruby/test_enumerator.rb, test/ruby/test_io_m17n.rb,
- test/ruby/test_regexp.rb, test/ruby/test_syntax.rb:
- assert_warn() and assert_warning() are reversed.
-
-Sat Nov 24 21:08:50 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * gc.c (wmap_final_func): rename variables to clarify the meaning.
- In wmap2obj the key is WeakRef and the value is referenced object.
- In obj2wmap the key is referenced object and the value is an array
- of WeakRef.
-
- * gc.c (wmap_finalize): ditto.
- [ruby-core:49044] [Bug #7304]
-
-Sat Nov 24 21:01:55 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * array.c (rb_ary_delete_same_obj): new function for WeakRef.
- This deletes same objects as item argument in the array.
-
- * internal.h (rb_ary_delete_same_obj): add a declaration.
-
- * gc.c (wmap_final_func): remove WeakRef object reference from the
- array. rb_ary_delete() is not usable because it uses rb_equal() to
- compare object references.
-
- * gc.c (wmap_finalize): remove recycled object references from weak
- map hash properly. How to get object reference from object id was
- wrong. st_delete() doesn't work properly if key and value arguments
- are same. The key of obj2wmap is referenced object and the value of
- obj2wmap is WeakRef array.
-
- * gc.c (wmap_aset): obj2wmap should contain WeakRef array in the
- definition.
-
- * test/test_weakref.rb
- (TestWeakRef#test_not_reference_different_object,
- TestWeakRef#test_weakref_finalize): add tests for above.
- [ruby-core:49044] [Bug #7304]
-
-Sat Nov 24 19:44:41 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * ext/nkf/nkf-utf8/nkf.c (unicode_iconv_combine): returning flags are
- nkf_char.
-
-Sat Nov 24 19:29:18 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * test/ruby/test_rubyoptions.rb (test_usage, test_usage_long):
- reduced, renamed.
-
-Sat Nov 24 13:10:14 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_trace.c (rb_tracepoint_attr_raised_exception): should not check
- value before event checking.
-
- * vm_trace.c (rb_tracepoint_attr_return_value): ditto.
-
- * test/ruby/test_settracefunc.rb: add tests for TracePoint#return_value
- and TracePoint#raised_exception.
-
-Sat Nov 24 12:47:27 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * test/ruby/test_process.rb (TestProcess#test_setsid): "./ruby-trunk"
- doesn't work on all environments. EnvUtil.rubybin would be suitable.
-
-Sat Nov 24 12:28:04 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * array.c (rb_ary_aref): fix Segmentation fault at TestArray#test_aref
- on x64 mingw. Variable argument of rb_scan_args() should be a pointer
- (VALUE *), but 0 of variable argument seems not equal to null pointer
- on x64 mingw.
-
-Sat Nov 24 11:47:14 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * process.c (proc_getsid): adds new method for getting session id.
- Contributed from fumiyas (Fumiyasu SATOH). Thank you!
- [Feature #6757] [ruby-dev:45977]
- * configure.in: adds getsid check.
- * test/ruby/test_process.rb (TestProcess#test_setsid): new test
- for the above.
- * NEWS: news for the above.
-
-Sat Nov 24 10:59:14 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread.c (thread_create_core): don't use th->thread_id before
- initialized.
-
-Sat Nov 24 00:00:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ruby.c (proc_options, process_options, ruby_process_options): take
- care of the case argc is 0, and check if argv has NULL.
- [ruby-core:49889] [Bug #7423]
-
-Sat Nov 24 00:00:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in (--disable-dln): option to disable dynamic linking
- feature. [ruby-core:37676] [Feature #4946]
-
-Fri Nov 23 23:44:41 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/mkmf.rb (MakeMakefile#pkg_config): strip all white spaces for
- mingw64+MSYS pkg-config which erroneously emits extra newlines.
- [ruby-core:47998] [Bug #7163]
-
-Fri Nov 23 17:31:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ruby.c (usage): wrap description lines if options are too long.
-
-Fri Nov 23 11:13:46 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * test/ruby/test_rubyoptions.rb (TestRubyOptions#test_usage2): refine
- assertion.
-
- * test/ruby/test_rubyoptions.rb (TestRubyOptions#test_usage2): now
- --help option is for modern terminals.
-
-Fri Nov 23 10:45:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * ext/socket/ipsocket.c (IPSocket#peeraddr): Fix example
- [ruby-core:46429] [Bug #6732]
-
-Fri Nov 23 02:40:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/cgi/core.rb: Documentation for CGI#header alias
- Based on a patch by Marcus Stollsteimer
- [ruby-core:49585] [Bug #7405]
-
-Thu Nov 22 23:48:10 2012 Narihiro Nakamura <authornari@gmail.com>
-
- * gc.c (is_swept_object): extract from is_dead_object().
-
- * gc.c (rb_gcdebug_print_obj_condition): add the function for debug.
- This function shows some conditions of given object (e.g.,
- marked, in heap, swept).
-
- * gc.c (rb_gcdebug_sentinel): add the function for debug.
- This function allow check to inadvertently free up an object.
-
-Thu Nov 22 23:45:18 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * array.c (rb_ary_shared_with_p): fix cache validity check.
- If #pop or #shift has been called against $: or $", the array will
- be still shared with the snapshot. We check array length for cache
- validity.
- [ruby-core:49518] [Bug #7383]
-
- * test/ruby/test_require.rb
- (TestRequire#test_require_with_array_pop,
- TestRequire#test_require_with_array_shift): add tests for above.
-
-Thu Nov 22 21:48:48 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * common.mk, win32/Makefile.sub (probes.dmyh): now be made in current
- (=build) directory if build from the repository.
-
-Thu Nov 22 21:34:51 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * test/ruby/test_rubyoptions.rb: added a test.
-
-Thu Nov 22 20:32:07 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * complex.c (string_to_c_strict, string_to_c): check NUL.
- * rational.c (string_to_r_strict, string_to_r): ditto.
-
-Thu Nov 22 20:21:45 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * Makefile.in (.dmyh.h): removed $(VPATH). GNU make don't
- recognize suffix rule with VPATH.
-
-Thu Nov 22 18:11:27 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * common.mk, Makefile.in, win32/Makefile.sub (.dmyh.h): nmake merges
- explicit rules for same target, but not merges explicit rules and
- implicit rules -- always explicit rules win. So, need to add an
- explicit rule for probes.h. [Bug #7421] [ruby-core:49839]
-
-Thu Nov 22 18:01:28 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * Makefile.in (probes.o): add -C to ignore #include in probes.d.
-
- * probes.d: include vm_opts.h instead of vm_core.h.
-
- * vm_opts.h (VM_COLLECT_USAGE_DETAILS): move definition from vm_core.h.
-
-Thu Nov 22 17:45:17 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * ext/nkf/nkf-utf8: Merge b0a6577a521d1bba5e19853f95d5c4b9be1072b5.
- Support JIS X 0213 and some bugfixes.
-
-Thu Nov 22 17:39:37 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * tool/gen_dummy_probes.rb: don't change #include, #if and #endif
- lines. [Bug #7370]
-
-Thu Nov 22 16:58:26 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * Makefile.in: run preprocessor when making probe.h
- * probes.d: define probe insn and insn__operand only when
- VM_COLLECT_USAGE_DETAILS is 1. [Bug #7370]
-
-Thu Nov 22 16:20:49 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * vm.c: Don't define vm_collect_usage_operand() and
- static void vm_collect_usage_insn() when disabling
- VM_COLLECT_USAGE_DETAILS. (refix r37796)
-
-Thu Nov 22 15:26:02 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * vm_insnhelper.h: partly revert r37631 (DTrace support).
- "vm usage information is always collected, so uncomment the
- functions." causes performance impact. [Bug #7370]
- Off course this revert disables related probes.
-
-Thu Nov 22 14:14:36 2012 Akinori MUSHA <knu@iDaemons.org>
-
- * re.c (rb_memsearch_ss): Apply performance improvement to short
- byte array search for platforms without memmem(3).
- [Feature #6311] [ruby-dev:45530]
-
-Thu Nov 22 12:52:19 2012 Akinori MUSHA <knu@iDaemons.org>
-
- * test/ruby/test_string.rb (TestString#test_index): Add some
- corner cases to tests for String#index, which might fail if ruby
- directly used a buggy memmem(3) implementation.
-
-Thu Nov 22 08:06:42 2012 Narihiro Nakamura <authornari@gmail.com>
-
- * test/ruby/test_gc.rb (test_profiler_clear): fix wrong method
- calls [Bug #7419] [ruby-core:49828].
-
-Thu Nov 22 02:22:33 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * NEWS: edited (order etc).
-
-Wed Nov 21 22:52:59 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/io/wait/wait.c (io_wait_readable): add alias wait_readable.
-
- * ext/io/wait/wait.c (io_wait_writable): this is easier to use than
- IO.select for a single IO object and is immune to the
- limitations/inefficiency of select() on platforms where poll/ppoll
- is available. patched by Eric Wong. [Feature #4646]
-
-Wed Nov 21 22:27:52 2012 Narihiro Nakamura <authornari@gmail.com>
-
- * gc.c (garbage_collect): remove a duplicative probe.
-
-Wed Nov 21 22:08:48 2012 Narihiro Nakamura <authornari@gmail.com>
-
- * gc.c (gc_profile_clear): realloc profile records if its size is
- higher than the threshold, GC_PROFILE_RECORD_DEFAULT_SIZE * 2.
-
-Wed Nov 21 21:53:29 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * complex.c (nucomp_to_c): added.
-
-Wed Nov 21 21:35:38 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * include/ruby/util.h: removed extra semicolon in definition of
- macro.
- * compile.c: ditto.
- * cont.c: ditto.
- * math.c: ditto.
- * node.c: ditto.
- * parse.y: ditto.
-
-Wed Nov 21 18:46:37 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * rational.c (read_digits): due to a bit tighter rb_cstr_to_inum().
-
-Wed Nov 21 16:13:37 2012 Koichi Sasada <ko1@atdot.net>
-
- * benchmark/bm_so_nsieve_bits.rb: add an encoding pragma because
- this benchmark using strings (literals) as binary sequence.
- Now, they are UTF-8 strings. [ruby-dev:46578]
-
-Wed Nov 21 00:57:43 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * file.c (Init_File): null device definition uses rb_define_const
- instead of rb_file_const.
-
-Wed Nov 21 00:28:18 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * test/ruby/test_m17n_comb.rb (test_str_crypt): Use RbConfig to get
- libc's directory. Patched by Vit Ondruch [ruby-core:49763] [Bug #7312]
-
-Tue Nov 20 23:28:26 2012 Masaki Matsushita <glass.saga@gmail.com>
-
- * marshal.c: add marshal readahead. marshalized Array, Hash and Struct
- have size at least number of its elements, marshal readahead will
- read the certain readable length and buffer when it needs more bytes.
- marshal readahead prevents many calls to IO#getbyte and IO#read,
- then it enables performance improvement.
- [ruby-dev:45637] [Feature #6440]
-
-Tue Nov 20 22:35:02 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * Makefile.in (.d.h): replace char * to const char * because somehow
- current dtrace removes const of function declaration in probes.d.
-
-Tue Nov 20 21:41:04 2012 Koichi Sasada <ko1@atdot.net>
-
- * include/ruby/debug.h: introduced.
- Debugging/profiling features will be located.
-
- * vm_trace.c: expose C-level TracePoint APIs.
- Note that they are experimental.
-
- * vm_trace.c, include/ruby/debug.h: rename `rb_hook_flag_t'
- to `rb_event_hook_flag_t'.
- Macro names `RUBY_HOOK_FLAG_*' are also renamed to
- `RUBY_EVENT_HOOK_FLAG_*'.
-
- * debug.h, vm_debug.h: rename debug.h to vm_debug.h.
-
- * common.mk: ditto.
-
- * debug.c, main.c, vm_core.h: ditto.
-
-Tue Nov 20 21:12:37 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * configure.in (RUBY_DTRACE_AVAILABLE): only check dtrace availability.
-
- * configure.in (RUBY_DTRACE_POSTPROCESS): restore.
-
-Tue Nov 20 21:22:44 2012 Masaki Suketa <masaki.suketa@nifty.ne.jp>
-
- * test/win32ole/test_win32ole_type.rb (test_implemented_ole_types):
- IShellDispatch6 bundled in Windows 8. Thanks to phasis68 (Heesob
- Park). [ruby-core:49580][Bug #7403]
-
-Tue Nov 20 21:06:41 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * complex.c: some improvements.
- * rational.c: ditto.
-
-Tue Nov 20 21:01:16 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * common.mk (incs): BSD make cannot deal with non-prefixed dependency
- and prefixed target.
-
-Tue Nov 20 20:10:23 2012 Yusuke Endoh <mame@tsg.ne.jp>
-
- * array.c (rb_ary_bsearch): fix rdoc bug (O(n log n) -> O(log n)).
- Patch by Charlie Somerville. [ruby-core:49661] [Bug #7409]
-
- * range.c (range_bsearch): ditto.
-
-Tue Nov 20 19:02:44 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_trace.c: rename and add TracePoint APIs.
- (1) TracePoint.new(...){...} creates a new trace point
- but does not make it enable.
- (2) TracePoint.trace(...){...} creates a new trace point
- and enable it (same as old behavior).
- (3) TracePoint#enable make it enable (renamed from TracePoint#retrace).
- If block given, when enable only in block.
- (4) TracePoint#disable make it disable (renamed from TracePoint#untrace).
- If block given, when disable only in block.
- (5) TracePoint#enabled? returns this trace is enable or not.
- [Feature #6895]
-
- * test/ruby/test_settracefunc.rb: add tests.
-
-Tue Nov 20 18:35:05 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_trace.c: add two methods:
- (1) TracePoint#return_value which returns return
- value on the :return and :c_return event.
- (2) TracePoint#raised_exception which returns raised exception
- value on the :raise event.
- Each methods raise RuntimeError if it is called at unsupported
- event.
- Please review and give us feedback until next preview
- release (Dec/2012) of Ruby 2.0.0.
- [Feature #6895]
-
- * insns.def, vm.c, vm_eval.c, vm_insnhelper.c, eval.c, thread.c:
- ditto.
-
- * vm_trace.c, vm_core.h: move definition of rb_trace_arg_t from
- vm_trace.c to vm_core.h.
- Caller fills rb_trace_arg_t and pass the pointer of this variable.
-
- * test/ruby/test_settracefunc.rb: fix tests to test this change.
-
-Tue Nov 20 17:31:12 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * configure.in: fix dtrace didn't work on darwin.
-
- * configure.in (RUBY_DTRACE_AVAILABLE): unify RUBY_DTRACE_POSTPROCESS
- and RUBY_DTRACE_BSD_BROKEN.
-
-Tue Nov 20 15:20:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * file.c (File.extname): Documentation for extname on dotfiles and
- files ending with a dot. Also, added example for this.
- [ruby-core:47852] [Bug #7112]
-
-Tue Nov 20 14:19:20 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * test/ruby/test_signal.rb (TestSignal#test_signame): fix windows
- test failure. Process.kill on windows can't send a signal to
- another process.
-
-Tue Nov 20 13:58:11 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * io.c (Init_IO): moved all rb_file_const() into file.c.
- * file.c (Init_File): replace with rb_file_const() with
- rb_define_const() because RDoc don't care rb_file_const.
- [Bug #5530]
-
-Tue Nov 20 12:35:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * ruby.c (usage_msg): Fix typo [ruby-core:49205] [Bug #7327]
-
-Tue Nov 20 12:35:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * file.c (File::NULL): Document File::NULL constant
- [ruby-core:49384] [Bug #7365]
-
-Tue Nov 20 12:05:15 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/win32.c (rb_w32_read): Windows 8 fixed one of a bug of console
- API.
- based on the patch by Heesob Park at [ruby-core:49479] [Bug #7379]
-
-Tue Nov 20 11:14:33 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * configure.in (--enable-dtrace): always call RUBY_DTRACE_BSD_BROKEN
- for portability.
- As the note, FreeBSD 8 has DTrace as the optional
- feature (it is enabled by the build option), but doesn't have USDT.
- FreeBSD 9 has USDT but they are still optional. FreeBSD 10 will
- enable them by default.
- The variable $rb_cv_prog_dtrace_g is "yes" only on FreeBSD 9 with
- optional DTrace or FreeBSD 10. If it is "no", you cannot know
- whether it doesn't need -G or DTrace is disabled. (by checking
- error code, you can know)
-
-Mon Nov 19 22:55:48 2012 Naohisa Goto <ngotogenome@gmail.com>
-
- * configure.in (--enable-dtrace): change help message
-
-Tue Nov 20 11:05:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/tracer.rb (Tracer.trace_func): printf to stdout
- Patch by Michal Fojtik [ruby-core:45219] [Bug #6490]
-
-Mon Nov 19 21:24:18 2012 Naohisa Goto <ngotogenome@gmail.com>
-
- * vm_dump.c: not to include probes.h because the code does not depend
- on it.
- * common.mk (vm_dump.$(OBJEXT)): remove dependency on probes.h
-
-Tue Nov 20 10:14:22 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread.c (rb_thread_s_check_interrupt): removed redundant
- GET_THREAD().
-
-Tue Nov 20 10:12:46 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread.c (rb_threadptr_async_errinfo_active_p): added a small
- comment.
-
-Tue Nov 20 10:05:56 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread.c (rb_thread_blocking_region_end): replaced GET_THREAD()
- with ruby_thread_from_native(). We don't have GVL here.
-
-Tue Nov 20 09:56:15 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread.c (rb_threadptr_execute_interrupts) removed.
- * thread.c (rb_threadptr_execute_interrupts_common) renamed to
- rb_threadptr_execute_interrupts. I.e. unified
- rb_threadptr_execute_interrupts and rb_threadptr_execute_interrupts_common.
- * thread.c (rb_thread_schedule, rb_thread_execute_interrupts) s/_common//.
-
-Tue Nov 20 09:48:34 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * signal.c (rb_get_next_signal): removed pointless signal
- disabling. pthread_sigmask() only changes current thread
- mask.
-
-Tue Nov 20 09:36:55 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * signal.c (install_sighandler): added comments why we need
- rb_disable_interrupt().
-
-Tue Nov 20 09:31:33 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * signal.c (rb_disable_interrupt, rb_enable_interrupt): removed
- USE_TRAP_MASK.
- * signal.c (trap_arg, trap_ensure): removed.
- * signal.c (trap, sig_trap): removed pointless signal disabling.
- We don't need it because we no longer run trap handler on signal
- handler context.
-
-Tue Nov 20 09:20:49 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * prelude.rb: Moved Mutex#synchronize to
- * thread.c (rb_mutex_synchronize_m): here. [Bug #4266]
-
-Tue Nov 20 08:36:15 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * signal.c (sig_signame): implements Signal.signame method
- [Feature #5613]
- * test/ruby/test_signal.rb (test_signame): adds test for above
- * NEWS: add an item about above
-
-Mon Nov 19 16:30:59 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * struct.c (rb_struct_each_pair): yield associated pairs so that
- an unsplat argument can get both, for consistency with Hash,
- OpenStruct, and etc. [ruby-dev:46533] [Bug #7382]
-
-Mon Nov 19 16:17:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in (LIBS): libelf is need on only FreeBSD.
-
-Mon Nov 19 16:08:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * common.mk (RUBYLIB): purelib option in runruby.rb is deprecated
- since r28841, so set to an empty list to get rid of a bogus path in
- child processes, which caused an insecure operation exception in
- test/ruby/test_encoding.rb:test_unsafe.
-
-Mon Nov 19 15:40:50 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
-
- * .travis.yml (script): add OPTS=-v, requested by @_ko1.
-
-Mon Nov 19 15:09:07 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * configure.in: fix didn't enable_dtrace=yes on auto.
-
- * configure.in: see enable_dtrace for adding libelf on FreeBSD.
-
- * common.mk: VPATH is not needed.
-
-Mon Nov 19 14:55:51 2012 Koichi Sasada <ko1@atdot.net>
-
- * thread.c: add `Thread#backtrace_locations' method.
- This method is similar to `caller_locations' method for
- specific method.
- And fix to accept `level' and `n' parameters for `Thread#backtrace'
- and `Thread#backtrace_locations'.
- `caller' (and `caller_locations') do not return `caller' method
- frame.
- However, `Thread#backtrace' (and `Thread#backtrace_locations')
- return `Thread#backtrace' method frame itself
- if `Thread.current.backtrace' was called.
-
- * vm_backtrace.c: ditto.
-
- * internal.h: ditto.
-
- * test/ruby/test_backtrace.rb: add tests.
-
-Mon Nov 19 14:54:32 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * Makefile.in, common.mk (probes.h): moved to common.mk and changed to
- see $(srcdir).
-
- * common.mk (probes.dmyh): now created it on $(srcdir) always.
-
- * win32/Makefile.sub (.SUFFIXES): removed common suffix.
-
-Mon Nov 19 10:00:10 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * Makefile.in (.SUFFIX): bsdmake needs .SUFFIX is defined before use.
-
- * common.mk: fix path of probes.dmyh.
-
- * common.mk (vm_dump.o): depend probes.h.
-
- * configure.in: FreeBSD's USDT requires libelf.
-
-Mon Nov 19 01:11:59 2012 Naohisa Goto <ngotogenome@gmail.com>
-
- * vm_core.h, probes_helper.h (RUBY_DTRACE_FUNC_ENTRY_HOOK,
- RUBY_DTRACE_FUNC_RETURN_HOOK): move from vm_core.h to new file
- probes_helper.h for narrowing dependency to probes.h.
- * common.mk (VM_CORE_H_INCLUDES): remove dependency to probes.h.
- * common.mk (vm.$(OBJEXT)): add dependency to probes_helper.h.
- * vm.c, vm_insnhelper.c: include probes_helper.h.
-
-Sun Nov 18 16:33:00 2012 Naohisa Goto <ngotogenome@gmail.com>
-
- * configure.in, Makefile.in, common.mk: support DTrace on Solaris 10,
- based on r26235 by Yugui. On Solaris 10, low optimization level
- may also be needed, e.g. optflags="-xO1" or "-xO0" with Oracle
- SolarisStudio 12.3 cc.
-
- * configure.in (--enable-dtrace): new option to enable/disable
- DTrace support. By default, trying to enable if dtrace command
- is found on the system. It is disabled when cross compiling.
-
- * configure.in (RUBY_DTRACE_POSTPROCESS): new macro. checks whether
- the dtrace on the system needs postprocessing with "dtrace -G".
- The postprocessing is needed on Solaris 10 and other platforms.
-
- * configure.in (RUBY_DTRACE_BSD_BROKEN): new macro. checks whether
- the dtrace supports USDT.
-
- * configure.in (DTRACE): move after RUBY_DTRACE_POSTPROCESS.
-
- * configure.in (LD): On Solaris, /usr/ccs/bin/ld is preferred.
-
- * configure.in, Makefile.in, common.mk (DTRACE_OBJ): new macro for
- DTrace probe object generated by postprocessing with "dtrace -G".
-
- * Makefile.in, common.mk (probes.$(OBJEXT)): DTrace probe object
- generated by the postprocessing. New file probes.stamp is for
- rebuilding related objects that may be modified by "dtrace -G".
-
- * configure.in, Makefile.in, common.mk (DTRACE_GLOMMED_OBJ): new
- macro for DTrace static library hacks.
-
- * configure.in, Makefile.in (LIBRUBY_A_OBJS): ditto.
-
- * Makefile.in, common.mk (ruby-glommed.$(OBJEXT)): new target with
- rule for DTrace static library hacks.
-
- * common.mk (DTRACE_DEPENDENT_OBJS): objects depended on probes.h.
-
-Sun Nov 18 09:31:47 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * complex.c (read_comp): mathn compliant.
- * rational.c (read_num): ditto.
-
-Sun Nov 18 02:50:12 2012 Luis Lavena <luislavena@gmail.com>
-
- * win32/file.c (replace_to_long_name): correct logic around wildcard
- characters detection and ensure wide-chars are used as pattern.
- [ruby-core:49451] [Bug #7374]
-
-Sun Nov 18 02:02:46 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * complex.c (read_comp): modified handling of polar form.
-
-Sun Nov 18 00:50:44 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * complex.c (read_comp): fixed handling of polar form.
-
-Sun Nov 18 00:14:46 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * complex.c (string_to_c_strict, string_to_c): rewrote without regexp.
- * rational.c (string_to_r_strict, string_to_r): ditto.
-
-Sat Nov 17 23:53:05 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * complex.c (make_patterns): should not accept extra sign.
-
-Sat Nov 17 21:45:12 Luis Lavena <luislavena@gmail.com>
-
- * win32/file.c (replace_to_long_name): skip expansion for all wildcard
- characters.
- [ruby-core:49451] [Bug #7374]
-
- * test/ruby/test_file_exhaustive.rb: add more assertions to test.
-
-Sat Nov 17 12:14:50 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/visitors/yaml_tree.rb: use literal YAML style
- when emitting multi-line strings. Thanks @atambo
-
- * test/psych/test_yaml.rb: test for change.
-
-Sat Nov 17 12:03:41 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/scalar_scanner.rb: avoid raising exceptions when
- parsing Floats and Integers. Thanks riffraff [ruby-core:44426]
- * test/psych/test_numeric.rb: associated test
-
-Sat Nov 17 11:34:31 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * st.c (st_update): pass the key in st_table so that we can free
- memory of the key in st_table when deleting.
- [ruby-core:49220] [Bug #7330]
-
- * test/-ext-/st/test_update.rb
- (Bug::StTable#test_pass_objects_in_st_table): add a test.
-
-Sat Nov 17 11:26:36 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/core_ext.rb: move Kernel#y so that it can
- manually be required as 'psych/y'.
-
- * ext/psych/lib/psych/y.rb: ditto
-
-Sat Nov 17 08:13:48 2012 Benoit Daloze <eregontp@gmail.com>
-
- * lib/abbrev.rb: fix r37113. Correct examples, fix style
- and show explicit dependency (require 'abbrev').
-
-Sat Nov 17 07:35:15 2012 Luis Lavena <luislavena@gmail.com>
-
- * win32/file.c (replace_to_long_name): skip automatic path expansion
- when wildcard character is used. [ruby-core:49451] [Bug #7374]
-
- * test/ruby/test_file_exhaustive.rb: add a test for above.
-
-Sat Nov 17 00:50:23 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
-
- * marshal.c (w_object): add flonum to arg->data to keep reference index
- consistency. [ruby-core:49323] [Bug #7348]
-
- * test/ruby/test_marshal.rb: add a test for above.
-
-Sat Nov 17 00:40:25 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * common.mk (incs): dist files need probes.dmyh.
-
- * common.mk (probes.dmyh): depends on generator script.
-
- * Makefile.in, common.mk, configure.in, win32/Makefile.sub (probes.h):
- select generating with dtrace or copying dummy file by suffix rules.
-
-Fri Nov 16 19:24:10 2012 Koichi Sasada <ko1@atdot.net>
-
- * thread.c (rb_thread_call_without_gvl2): change the parameter of
- `func' from `int *skip_interrupt' to `VALUE *flags'.
- If (flags & RUBY_CALL_WO_GVL_FLAG_SKIP_CHECK_INTS) is not zero,
- then skip checking interrupt.
- [ruby-core:46547]
-
- * include/ruby/thread.h: ditto.
-
-Fri Nov 16 18:59:05 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * Makefile.in (no-dtrace-probes.h): dmyprobes.h is in srcdir.
-
- * common.mk (dmyprobes.h): ditto.
-
-Fri Nov 16 17:57:15 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * Makefile.in (probes.h): split build commands for dtrace-available
- and unavailable platforms.
-
- * Makefile.in (incs): probes.h is a platform dependent file, so it
- cannot be a part of prereq target. move it to all-incs.
-
- * configure.in (DTRACE): move after AC_PROG_CC since cross_compiling
- is set in it.
-
- * configure.in (DTRACE): ignore non-prefixed version if
- cross-compiling.
-
- * Makefile.in, win32/Makefile.sub (probes.h): fix copying dmyprobes.h
- path when outplace-build.
-
-Fri Nov 16 15:27:36 2012 Masaki Matsushita <glass.saga@gmail.com>
-
- * lib/net/pop.rb (POP3.certs): fix typo in comment.
- patch from no6v (Nobuhiro IMAI) <nov@yo.rim.or.jp>.
- [ruby-dev:46519] [Bug #7355]
-
-Fri Nov 16 12:36:47 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * test/rake/helper.rb (Rake::TestCase#setup): revert r37669.
- @orig_PWD should be the original pwd.
-
- * test/rake/test_*.rb: don't use @orig_PWD to load libraries.
- It should be specified with relative path from the file.
-
-Fri Nov 16 10:22:52 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * test/rake/helper.rb (Rake::TestCase#setup): @orig_PWD shouldn't be
- Dir.pwd when the build directory is different from source directory.
-
-Fri Nov 16 09:41:08 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/rake/version.rb: workaround fix to build. see #7366
- [ruby-dev:46522]
-
-Fri Nov 16 07:23:18 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rake*: Updated to rake 0.9.4
- http://rake.rubyforge.org/doc/release_notes/rake-0_9_4_rdoc.html for
- a list of changes in 0.9.4.
-
- * test/rake*: ditto
-
- * NEWS: ditto
-
-Fri Nov 16 06:58:52 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rake*: Updated to rake 0.9.3. See
- http://rake.rubyforge.org/doc/release_notes/rake-0_9_3_rdoc.html for
- a list of changes in 0.9.3.
-
- * test/rake*: ditto
-
- * bin/rake: ditto
-
- * NEWS: ditto
-
-Thu Nov 15 22:39:32 2012 Yusuke Endoh <mame@tsg.ne.jp>
-
- * range.c (range_bsearch): fix some bugs: a documentation bug, a wrong
- condition, missed break in switch/case, and workaround for GCC
- optimization. See [ruby-core:49364] in detail. A great patch from
- Heesob Park. [Bug #7352] [Feature #4766]
-
- * array.c (rb_ary_bsearch): fix similar bug (missed break).
-
- * test/ruby/test_range.rb: add two test cases for above.
-
-Thu Nov 15 22:41:57 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_exec.h (GENTRY): GENTRY should be pointer size.
- A patch by yoshidam (Yoshida Masato) [Bug #7332].
-
-Thu Nov 15 13:20:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * man/erb.1: Fix grammar and copyright dates
- * man/goruby.1: ditto
- * man/irb.1: ditto
- * man/rake.1: ditto
- * man/ri.1: ditto
- * man/ruby.1: ditto
- Patch by Arthur Gunn
- [Fixes Github #210]
-
-Thu Nov 15 11:35:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * man/ruby.1: Grammar edits for man page
- Based on a patch by Michael Endsley [Fixes Github #183]
-
-Thu Nov 15 00:47:20 2012 Yusuke Endoh <mame@tsg.ne.jp>
-
- * array.c (rb_ary_bsearch): add Array#bsearch for binary search.
- [ruby-core:36390] [Feature #4766]
-
- * test/ruby/test_array.rb: add a test for above.
-
- * range.c (range_bsearch): add Range#bsearch for binary search.
- [ruby-core:36390] [Feature #4766]
-
- * test/ruby/test_range.rb: add a test for above
-
- * NEWS: added the two new methods.
-
-Wed Nov 14 13:25:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/fileutils.rb (chmod): Add "X" to modes, convert format to table
- [ruby-core:48965] [Bug #7288]
-
-Wed Nov 14 11:51:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/csv.rb (init_comments): Document private method #init_comments.
- Based on a patch from Vincent Batts [ruby-core:49172] [Bug #7319]
-
-Wed Nov 14 00:54:00 2012 Kenta Murata <mrkn@mrkn.jp>
-
- * Makefile.in (probes.h): create from probes.d
-
-Tue Nov 13 18:44:01 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_insnhelper.c (vm_call_cfunc_with_frame): don't use ci after
- EXEC_EVENT_HOOK because ci can be overridden.
-
- * vm_eval.c: ditto.
-
- * method.h: change invoker's parameters types.
-
- * vm_method.c (call_cfunc_invoker_func): ditto.
-
-Tue Nov 13 18:01:54 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * eval.c (rb_mod_using): raise an ArgumentError if cyclic using is
- detected. based on the patch by Charlie Somerville.
- [ruby-core:49092] Bug #7308
-
- * test/ruby/test_refinement.rb: related test.
-
-Tue Nov 13 17:40:04 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * common.mk (vm_insnhelper.c): this target is useless and causes
- ruby always need rebuild.
-
-Tue Nov 13 17:35:49 2012 Koichi Sasada <ko1@atdot.net>
-
- * compile.c (insn_data_to_s_detail): remove debug lines.
-
-Tue Nov 13 17:28:47 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_insnhelper.c (vm_caller_setup_args): save and restore
- ci->argc and ci->blockptr before and after method invocations
- because these method dispatches can override call_info.
-
- * bootstraptest/test_method.rb: add tests for this fix.
-
-Tue Nov 13 16:38:02 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * common.mk (dmyprobes.h): always create for make dist.
-
- * Makefile.in (probes.h): create or copy dmyprobes.h
-
- * win32/Makefile.sub: only do copy dmyprobes.h.
-
-Tue Nov 13 15:37:21 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * Makefile.in (.SUFFIX): .SUFFIX is needed here for .d.h on bsd make.
-
-Tue Nov 13 15:34:35 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * common.mk Makefile.in win32/Makefile.sub (.d.h): it's not common.
-
-Tue Nov 13 12:27:11 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * configure.in: disable dtrace because it doesn't work on FreeBSD.
-
- * common.mk (clean-local): rm probes.h.
-
- * common.mk (parse.o): depend $(PROBES_H_INCLUDES).
-
- * common.mk (.d.h): moved from Makefile.in and use BASERUBY.
-
- * tool/gen_dummy_probes.rb: reimplemented with ruby because sed is not
- available on Windows Microsoft VC++ environment.
-
-Tue Nov 13 12:30:26 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/README.win32: added mention about build directory. currently
- we can not build ruby in win32 directory. this problem is reported
- by Masahiro Kitajima <katonbo@katontech.com>.
-
-Tue Nov 13 11:03:47 2012 Masaki Matsushita <glass.saga@gmail.com>
-
- * re.c (rb_memsearch_ss): performance improvement by using memmem(3) if
- possible. [ruby-dev:45530] [Feature #6311]
-
- * configure.in: check existence of memmem(3) and that it is not broken.
-
-Tue Nov 13 06:50:02 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * probes.d: add DTrace probe declarations. [ruby-core:27448]
-
- * array.c (empty_ary_alloc, ary_new): added array create DTrace probe.
-
- * compile.c (rb_insns_name): allowing DTrace probes to access
- instruction sequence name.
-
- * Makefile.in: translate probes.d file to appropriate header file.
-
- * common.mk: declare dependencies on the DTrace header.
-
- * configure.in: add a test for existence of DTrace.
-
- * eval.c (setup_exception): add a probe for when an exception is
- raised.
-
- * gc.c: Add DTrace probes for mark begin and end, and sweep begin and
- end.
-
- * hash.c (empty_hash_alloc): Add a probe for hash allocation.
-
- * insns.def: Add probes for function entry and return.
-
- * internal.h: function declaration for compile.c change.
-
- * load.c (rb_f_load): add probes for `load` entry and exit, require
- entry and exit, and wrapping search_required for load path search.
-
- * object.c (rb_obj_alloc): added a probe for general object creation.
-
- * parse.y (yycompile0): added a probe around parse and compile phase.
-
- * string.c (empty_str_alloc, str_new): DTrace probes for string
- allocation.
-
- * test/dtrace/*: tests for DTrace probes.
-
- * vm.c (vm_invoke_proc): add probes for function return on exception
- raise, hash create, and instruction sequence execution.
-
- * vm_core.h: add probe declarations for function entry and exit.
-
- * vm_dump.c: add probes header file.
-
- * vm_eval.c (vm_call0_cfunc, vm_call0_cfunc_with_frame): add probe on
- function entry and return.
-
- * vm_exec.c: expose instruction number to instruction name function.
-
- * vm_insnhelper.c: add function entry and exit probes for cfunc
- methods.
-
- * vm_insnhelper.h: vm usage information is always collected, so
- uncomment the functions.
-
-Mon Nov 12 19:14:50 2012 Akinori MUSHA <knu@iDaemons.org>
-
- * configure.in (isinf, isnan): isinf() and isnan() are macros on
- DragonFly which cannot be found by AC_REPLACE_FUNCS(). This
- workaround enforces the fact that they exist on DragonFly.
-
-Mon Nov 12 15:59:38 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * vm_core.h (rb_call_info_t::refinements), compile.c (new_callinfo),
- vm_insnhelper.c (vm_search_method): revert r37616 because it's too
- slow. [ruby-dev:46477]
-
- * test/ruby/test_refinement.rb (test_inline_method_cache): skip
- the test until the bug is fixed efficiently.
-
-Mon Nov 12 14:28:01 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/mkexports.rb (each_export): skip garbage generated by VS2012's
- nmake.
- reported and patched by Yoshida Masato at [Bug #7333] [ruby-dev:46484]
-
-Sun Nov 11 18:58:55 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * test/date/test_date_{parse,strptime}.rb: changed the format of
- some extra messages.
-
-Sun Nov 11 18:41:34 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * ext/date/date_parse.c (date__parse): revised the tight parser
- (about handling of apostrophes).
-
-Sun Nov 11 15:39:04 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * hash.c (rb_hash_s_create): just warn for wrong elements now.
- [ruby-dev:46440] [Bug #7300]
-
- * hash.c (rb_hash_s_create): refine error messages.
-
- * error.c (rb_builtin_class_name): share for above.
-
-Sun Nov 11 15:12:18 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * eval.c (top_using): remove Kernel#using, and add main.using instead.
-
- * test/ruby/test_refinement.rb: related test.
-
-Sun Nov 11 13:41:01 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * eval.c (rb_using_refinement, rb_mod_using, f_using): clear method
- cache only when using is called explicitly.
-
- * test/ruby/test_refinement.rb: related test.
-
-Sun Nov 11 12:56:34 2012 Masaki Matsushita <glass.saga@gmail.com>
-
- * lib/pstore.rb (PStore): fix not to replace ThreadError raised in
- #transaction block with PStore::Error.
- [ruby-core:39238] [Bug #5269]
-
-Sun Nov 11 11:36:19 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * vm_core.h (rb_call_info_t::refinements), compile.c (new_callinfo):
- add a new field for inline method cache.
-
- * vm_insnhelper.c (vm_search_method): check rb_call_info_t::refinements
- not to confuse inline method cache when module_eval is used with
- refinements.
-
- * test/ruby/test_refinement.rb: related test.
-
-Sun Nov 11 08:45:45 2012 Martin Duerst <duerst@it.aoyama.ac.jp>
-
- * ruby.c: removed a comma before "before"
-
-Sat Nov 10 23:02:31 2012 Narihiro Nakamura <authornari@gmail.com>
-
- * gc.c: move immutable fields from struct heaps_slot and struct
- sorted_heaps_slot into struct heaps_header.
- Based on a patch from Sokolov Yura [Feature #6199][ruby-core:43592]
-
-Sat Nov 10 19:28:16 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * complex.c: modified doc.
- * rational.c: ditto.
-
-Sat Nov 10 18:20:10 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * ext/date/date_parse.c: edited about era.
-
-Sat Nov 10 12:13:41 2012 Kouhei Sutou <kou@cozmixng.org>
-
- * tool/rbinstall.rb: Don't install *.gemspec under lib/.
- [ruby-core:48966] [Bug #7289]
- Reported by Vit Ondruch. Thanks!!!
-
-Sat Nov 10 00:49:26 2012 Naohisa Goto <ngotogenome@gmail.com>
-
- * ruby_atomic.h: renamed from atomic.h to avoid header file name
- conflict on Solaris 10. [ruby-dev:46414] [Bug #7287]
-
- * gc.c, signal.c, vm_core.h, common.mk: reflect the rename from
- atomic.h to ruby_atomic.h.
-
-Sat Nov 10 00:46:57 2012 Naohisa Goto <ngotogenome@gmail.com>
-
- * atomic.h: Revert r37491 which is a temporary workaround.
-
-Sat Nov 10 00:33:31 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * siphash.h: check configure macros before include newer headers.
-
-Fri Nov 9 23:33:05 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/erb.rb (ERB#run, ERB#result): eval under isolated bindings for
- safe concurrent use. [ruby-core:47638] [Bug #7046]
-
-Fri Nov 9 23:05:06 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * random.c (BYTE_ORDER): define using configured WORDS_BIGENDIAN.
-
- * siphash.c (sip_init_state): use union to suppress warnings by gcc
- 4.7.
-
-Fri Nov 9 19:40:03 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * array.c (rb_ary_splice): fix r37583 doesn't consider the case when
- beg > array length.
-
-Fri Nov 9 16:11:58 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * random.c (rb_memhash): use siphash.
-
-Fri Nov 9 16:08:46 2012 Sokolov Yura funny-falcon <funny.falcon@gmail.com>
-
- * array.c: speedup Array#unshift by using space in shared array.
- [Feature #6638]
- - when array owns its shared array (ARY_SHARED_NUM == 1), and there
- is enough space then try unshift values directly into shared
- array.
- - when resulting array is big (~>64 items) then make it shared with
- enough room for future #unshifts, and then insert into shared
- array.
-
- * array.c (rb_ary_splice): use shared array in rb_ary_slice.
- [Feature #6638]
- - use ary_ensure_room_for_push when rb_ary_slice used to add at the
- end of array, cause rb_ary_concat use rb_ary_slice.
-
- * array.c (ary_ensure_room_for_push): make array really suitable for
- queue. [Feature #6638]
- when array is shared (which happens after Array#shift), and
- ARY_SHARED_NUM == 1 (which is very often when array used as queue),
- then make rb_ary_push push directly into shared array.
-
- * array.c (rb_ary_modify): steal shared array's container when
- ARY_SHARED_NUM == 1. [Feature #6638]
- - Do not allocate new memory in rb_ary_modify when ARY_SHARED_NUM == 1
- and length almost same.
- - Store ARY_CAPA instead of RARRAY_LEN in ary_make_shared, to make
- it useful.
- - Fix rb_ary_sort_bang accordantly.
-
-Fri Nov 9 16:00:00 2012 Zachary Scott <zzak@zacharyscott.net>
-
- * ext/bigdecimal/bigdecimal.c: Documentation for BigDecimal
- Based on a patch from Vincent Batts [ruby-core:49047] [Bug #7305]
-
-Fri Nov 9 15:25:42 2012 Akinori MUSHA <knu@iDaemons.org>
-
- * lib/shellwords.rb (Shellwords#shellescape): Add back my original
- real world example with some enhancement.
-
- * lib/shellwords.rb (Shellwords#shelljoin): Undo part of the
- previous rdoc change. This new example using a string-only
- array was not in line with the description.
-
-Fri Nov 9 12:58:13 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * string.c (rb_str_crypt): crypt(3) may return NULL.
- Latest glibc (2.16?) crypt(3) actually returns NULL. [Bug #7312]
-
-Fri Nov 9 12:07:06 2012 Akinori MUSHA <knu@iDaemons.org>
-
- * include/ruby/ruby.h (alloca), eval_intern.h (alloca), gc.c
- (alloca): Make alloca() globally available by moving the
- ultimate ifdef's to ruby/ruby.h. Gcc hides its builtin alloca()
- when compiling with -ansi, and linking thus fails on platforms
- that lack their own alloca() implementation in libc, which
- include OpenBSD and some ports of NetBSD. We use alloca()
- everywhere including from within third party C extensions, so
- alloca() must be made globally available. [Bug #7307]
-
- * addr2line.c (alloca): Replace the alloca() part with the
- ultimate ifdef's. [Bug #7307]
-
-Fri Nov 9 09:30:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * io.c (IO#new):
- Fix indentation from r37444
- [ruby-core:48052] [Bug #7179]
-
-Fri Nov 9 07:36:00 2012 Kenta Murata <mrkn@mrkn.jp>
-
- * bignum.c (bigmul0): enable big_mul_toom3.
- [ruby-core:48552] [Bug #7242]
-
- * bignum.c (bigmul1_toom3): fix incorrect calculation.
- the patch is made by Heesob Park.
- [ruby-core:48552] [Bug #7242]
-
-Fri Nov 9 05:33:00 2012 Kenta Murata <mrkn@mrkn.jp>
-
- * bignum.c (bigmul0): disable big_mul_toom3 temporarily.
- [ruby-core:48552] [Bug #7242]
-
- * test/ruby/test_bignum.rb (test_mul_large_numbers):
- add a test for bigmul1_toom3 suggested in [Bug #7242].
-
-Thu Nov 8 21:57:59 2012 Masaki Matsushita <glass.saga@gmail.com>
-
- * re.c (rb_memsearch): performance improvement by using memchr().
- [ruby-dev:45397] [Feature #6173]
-
-Thu Nov 8 19:02:50 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/net/protocol.rb (Net::InternetMessageIO#each_crlf_line):
- treat \r as newline as mame pointed. [ruby-dev:46425] [Bug #7278]
-
-Thu Nov 8 11:32:11 2012 Akinori MUSHA <knu@iDaemons.org>
-
- * configure.in (--with-opt-dir): Avoid nesting of double quotes
- inside backquotes, since some traditional shells like PD KSH
- (which OpenBSD's /bin/sh bases on) fail to parse them.
-
-Thu Nov 8 09:34:00 2012 Kenta Murata <mrkn@cookpad.com>
-
- * numeric.c: Add a caution that the results of the comparing
- operations of two NaNs are undefined.
- [#1720] [ruby-dev:38725] [ruby-core:36966]
-
-Thu Nov 8 04:45:21 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * include/ruby/intern.h: Restore rb_enumeratorize as it was before
- r37497 and introduce rb_enumeratorize_with_size instead. [#7302]
-
- * enumerator.c: ditto.
-
-Wed Nov 7 15:22:37 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * numeric.c (ruby_float_step): fix r37514: it yielded with NaN
- if the unit is infinity.
-
-Wed Nov 7 15:46:12 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * lib/webrick.rb: fix typo. reported by Rohit Arondekar.
- https://github.com/ruby/ruby/pull/211
-
-Wed Nov 7 15:34:12 2012 Takeyuki FUJIOKA <xibbar@ruby-lang.org>
-
- * lib/cgi/core.rb: alias CGI#http_header to CGI#header.
-
-Wed Nov 7 12:49:39 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * eval.c (rb_mod_refine): set RMODULE_IS_REFINEMENT to a created
- refinement module, and don't override method_added.
-
- * vm_method.c (rb_method_entry_make): check redefinition of
- optimized methods when a method is added to a refinement module.
- [ruby-core:48970] [Bug #7290]
-
- * test/ruby/test_refinement.rb: related test.
-
-Wed Nov 7 11:48:14 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * misc/ruby-additional.el (ruby-mode-set-encoding): now encoding needs
- to be set always explicitly actually. [Feature #6679]
-
-Wed Nov 7 09:15:58 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * object.c (rb_mod_const_get): avoid inadvertent symbol creation.
-
-Wed Nov 7 07:52:50 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * enum.c (rb_enum_cycle_size): prefix with rb.
-
-Wed Nov 7 04:32:15 2012 Luis Lavena <luislavena@gmail.com>
-
- * test/ruby/test_file_exhaustive.rb: Remove FIXME skip on Windows
- specific test because the test in question was already fixed.
-
-Wed Nov 7 03:45:12 2012 Luis Lavena <luislavena@gmail.com>
-
- * ext/zlib/extconf.rb: Recognize zlibwapi as linking library.
- Patch by Daniel Berger.
-
- [ruby-core:44979] [Feature #6421]
-
-Wed Nov 7 02:06:40 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * enumerator.c: New method #size; constructor accepts size.
- Have #to_enum accept a block
- Warn when using deprecated form of constructor
- Support #size for enumerators created from enumerators
- Support for lazy.{map|flat_map|...}.size.
-
- * include/ruby/intern.h: RETURN_SIZED_ENUMERATOR for support of
- sized enumerators.
-
- * array.c: Support for various enumerator.size.
-
- * enum.c: ditto.
-
- * hash.c: ditto.
-
- * numeric.c: ditto.
-
- * range.c: ditto.
-
- * string.c: ditto.
-
- * struct.c: ditto.
-
- * vm_eval.c: ditto.
-
-Tue Nov 6 20:40:28 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * object.c (rb_mod_const_get): Fix constant missing exception class
- and message to maintain backwards compatibility. Constant search
- should start at Object when constant starts with '::'
-
- * test/ruby/test_module.rb: test for fixes
-
-Tue Nov 6 16:50:00 2012 Masaki Matsushita <glass.saga@gmail.com>
-
- * lib/tempfile.rb (Tempfile#inspect): fix confusing #inspect.
- previous Tempfile#inspect says it is a File, but actually
- it is not a File.
-
- t = Tempfile.new("foo") #=> #<File:/tmp/foo20121106-31970-1ffbum0>
- t.is_a? File #=> false
-
- now Tempfile#inspect returns like:
-
- t = Tempfile.new("foo")
- #=> #<Tempfile:/tmp/foo20121106-31970-1ffbum0>
-
- [ruby-core:47544] [Bug #7027]
-
-Tue Nov 6 16:22:30 2012 Naohisa Goto <ngotogenome@gmail.com>
-
- * atomic.h: add #include <sys/atomic.h> for the workaround of
- header file name conflict of atomic.h with /usr/include/atomic.h
- on Solaris 10. [ruby-dev:46414] [Bug #7287]
-
-Tue Nov 6 14:38:00 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/win32ole/test_win32ole.rb: now source encoding is UTF-8, so
- binary strings in old scripts are dangerous.
-
-Tue Nov 6 14:25:09 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/net/protocol.rb (Net::InternetMessageIO#each_crlf_line):
- don't use /n in universal regexp. [ruby-dev:46394] [Bug #7278]
-
-Tue Nov 6 09:42:26 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * string.c (rb_str_b): Add String#b, returning a copied string
- whose encoding is ASCII-8BIT. [ruby-dev:45992] [Feature #6767]
-
-Tue Nov 6 09:37:57 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * ruby.c (load_file_internal): set default source encoding as
- UTF-8 instead of US-ASCII. [ruby-core:46021] [Feature #6679]
-
- * parse.y (parser_initialize): set default parser encoding as
- UTF-8 instead of US-ASCII.
-
-Tue Nov 6 05:48:06 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * test/ruby/test_require.rb
- (TestRequire#test_require_to_path_redefined_in_load_path,
- TestRequire#test_require_to_str_redefined_in_load_path):
- Suppress method redefined warning when test-all with RUBYOPT=-w.
-
-Thu Nov 8 00:24:14 2012 Akinori MUSHA <knu@iDaemons.org>
-
- * ext/curses/view.rb: Do not fail if the file to view is shorter
- than the screen height.
-
-Mon Nov 5 11:40:00 2012 Mark Somerville <mark@scottishclmibs.com>
-
- * thread_pthread.c (rb_reserved_fd_p): fix typo in macro check
- that prevented the ifdef ever being true.
- [Bug #7281] [ruby-core:48940]
-
-Mon Nov 5 23:28:57 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * file.c (rb_get_path_check_to_string): extract from
- rb_get_path_check(). We change the spec not to call to_path of
- String object.
-
- * file.c (rb_get_path_check_convert): extract from rb_get_path_check().
-
- * file.c (rb_get_path_check): follow the above change.
-
- * file.c (rb_file_expand_path_fast): remove check_expand_path_args().
- Instead we call it in load.c.
-
- * file.c (rb_find_file_ext_safe): use rb_get_expanded_load_path() to
- reduce expand cost.
-
- * file.c (rb_find_file_safe): ditto.
-
- * internal.h (rb_get_expanded_load_path): add a declaration.
-
- * internal.h (rb_get_path_check_to_string, rb_get_path_check_convert):
- add declarations.
-
- * load.c (rb_construct_expanded_load_path): fix for compatibility.
- Same checks in rb_get_path_check() are added. We don't replace
- $LOAD_PATH and ensure that String object of $LOAD_PATH are frozen.
- We don't freeze non String object and expand it every time. We add
- arguments for expanding load path partially and checking if load path
- have relative paths or non String objects.
-
- * load.c (load_path_getcwd): get current working directory for checking
- if it's changed when getting load path.
-
- * load.c (rb_get_expanded_load_path): fix for rebuilding cache properly.
- We check if current working directory is changed and rebuild expanded
- load path cache. We expand paths which start with ~ (User HOME) and
- non String objects every time for compatibility. We make this
- accessible from other source files.
-
- * load.c (rb_feature_provided): call rb_get_path() since we changed
- rb_file_expand_path_fast() not to call it.
-
- * load.c (Init_load): initialize vm->load_path_check_cache.
-
- * vm.c (rb_vm_mark): mark vm->load_path_check_cache for GC.
-
- * vm_core.h (rb_vm_struct): add vm->load_path_check_cache to store data
- to check load path cache validity.
-
- * test/ruby/test_require.rb (TestRequire): add tests for require
- compatibility related to cached expanded load path.
- [ruby-core:47970] [Bug #7158]
-
-Mon Nov 5 23:26:05 2012 Greg Price <price@mit.edu>
-
- * load.c (rb_get_expanded_load_path): cache the expanded load
- path. This saves 4KB of allocation and some stats for every
- element of the load path (so nearly a MB in my Rails app)
- on every require.
-
- * load.c (rb_construct_expanded_load_path): ensure that $LOAD_PATH
- entries are frozen strings. The user must mutate $LOAD_PATH
- itself rather than its individual entries.
-
- * vm_core.h (rb_vm_struct): add fields.
-
- * vm.c (rb_vm_mark): mark new fields.
-
- * ruby.c (process_options): modify $LOAD_PATH directly rather than
- its elements.
- Patch by Greg Price.
- [ruby-core:47970] [Bug #7158]
-
-Mon Nov 5 23:24:42 2012 Greg Price <price@mit.edu>
-
- * load.c (rb_feature_p, rb_provide_feature): index $LOADED_FEATURES
- so that require isn't so slow.
-
- * load.c (rb_provide_feature, get_loaded_features_index): ensure
- that $LOADED_FEATURES entries are frozen strings. The user
- must mutate $LOADED_FEATURES itself rather than its individual
- entries.
-
- * load.c (reset_loaded_features_snapshot): add a new function to reset
- vm->loaded_features_snapshot.
-
- * load.c (get_loaded_features_index_raw): add a new function to get
- the loaded-features index.
-
- * load.c (features_index_add_single): add a new function to add to the
- loaded-features index a single feature.
-
- * load.c (features_index_add): add a new function to add to the
- loaded-features index all the required entries for `feature`.
-
- * vm_core.h (rb_vm_struct): add fields.
-
- * vm.c (rb_vm_mark): mark new fields.
-
- * include/ruby/intern.h (rb_hash_clear): declare function.
-
- * hash.c (rb_hash_clear): make function non-static.
- Patch by Greg Price.
- [ruby-core:47970] [Bug #7158]
-
-Mon Nov 5 23:23:51 2012 Greg Price <price@mit.edu>
-
- * array.c (rb_ary_shared_with_p): new function.
- Expose whether two arrays are shared (read-only, C only).
-
- * include/ruby/intern.h (rb_ary_shared_with_p): declare.
- Patch by Greg Price.
- [ruby-core:47970] [Bug #7158]
-
-Mon Nov 5 23:21:14 2012 Greg Price <price@mit.edu>
-
- * load.c (loaded_feature_path): clarify and briefly comment
- function. These clarifications have no effect on the behavior
- of the function.
-
- * load.c (rb_feature_p): explain the search loop. Especially
- useful because the logic is complicated as described in the
- second paragraph.
- Patch by Greg Price.
- [ruby-core:47970] [Bug #7158]
-
-Mon Nov 5 22:45:03 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * ext/dl/win32/lib/Win32API.rb (Win32API#call): use 64bit pointer for x64
- Windows. This would fix
- TestSecureRandom#test_s_random_bytes_without_openssl error.
- [ruby-core:47451] [Bug #6990]
-
-Mon Nov 5 22:09:26 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * cygwin/GNUmakefile.in (uncommon.mk): link *.res.o.
- EXTOBJES is defined in uncommon.mk. *.res.o setting should be below
- uncommon.mk.
- [ruby-core:48858] [Bug #7277]
-
-Mon Nov 5 11:35:11 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread_pthread.c (native_thread_init, native_thread_destroy):
- removed HAVE_PTHREAD_CONDATTR_INIT check because this silly
- #ifdef makes use-uninitialized-var issue and (2) native_cond_initialize()
- already have a right platform and caller don't need any additional care.
- [Bug #6825]
-
-Mon Nov 5 10:57:59 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/cgi/core.rb: check if Tempfile is defined before use it.
-
- * lib/cgi/core.rb: remove tempfiles only if tempfiles exist
-
-Mon Nov 5 12:17:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/uri/http.rb (URI::HTTP.build): Fix example
- Patch by Carina C. Zona
- [Fixes #209 Github]
-
-Mon Nov 5 09:55:05 2012 Takeyuki FUJIOKA <xibbar@ruby-lang.org>
-
- * lib/cgi/core.rb: remove tempfile more early.
-
-Sun Nov 4 20:29:46 2012 Takeyuki FUJIOKA <xibbar@ruby-lang.org>
-
- * lib/cgi.rb, lib/cgi/*/rb: rename CGI#header to CGI#http_header,
- add and update HTML5 tag generator. [Bug #7110]
- Patch provided by Marcus Stollsteimer, thank you !
-
-Sun Nov 4 11:47:39 2012 Masaki Matsushita <glass.saga@gmail.com>
-
- * lib/fileutils.rb (module FileUtils): repatch [ruby-core:39622]
- [Feature #5337]. improve performance of FileUtils.compare_stream.
- [ruby-core:47545] [Feature #7028]
-
-Sun Nov 4 11:27:54 2012 Masaki Matsushita <glass.saga@gmail.com>
-
- * array.c (recursive_equal): fix to return true when self and other
- are resized to same size and the current index become out of
- range.
-
- * test/ruby/test_array.rb: add a test for the above.
-
-Sun Nov 4 10:19:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * dir.c (file_s_fnmatch): match with expanding braces if FNM_EXTGLOB
- is set. [ruby-core:40037] [Feature #5422]
-
-Sat Nov 3 23:38:15 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * complex.c: modified doc.
- * rational.c: ditto.
-
-Sat Nov 3 22:38:55 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * ext/date/date_core.c: modified doc.
-
-Sat Nov 3 18:35:55 2012 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * vm.c (rb_vm_rewrite_ep_in_errinfo, vm_rewrite_ep_in_errinfo):
- merge code and remove `rb_vm_rewrite_ep_in_errinfo'.
-
-Sat Nov 3 18:15:24 2012 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * vm.c, proc.c: avoid unnecessary `rb_vm_rewrite_ep_in_errinfo'
- calls.
-
-Sat Nov 3 17:53:43 2012 Kouhei Sutou <kou@cozmixng.org>
-
- * bin/testrb: Use only Test::Unit::AutoRunner in test-unit gem
- compatible API to be available by both test/unit bundled in Ruby
- and test-unit gem.
- * lib/test/unit.rb (Test::Unit::AutoRunner): Move codes from testrb.
-
-Sat Nov 3 14:56:21 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * ext/date/date_parse.c (parse_eu): should capture apostrophe too.
-
-Sat Nov 3 14:46:15 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * ext/date/date_parse.c (date__parse): revised the tight parser.
-
-Sat Nov 3 14:43:42 2012 Kouhei Sutou <kou@cozmixng.org>
-
- * lib/rexml/xmldecl.rb (REXML::XMLDecl#content): Add missing \A
- and \z.
-
-Sat Nov 3 14:42:55 2012 Kouhei Sutou <kou@cozmixng.org>
-
- * lib/rexml/output.rb (REXML::Output#initialize): Use normalized
- encoding name.
-
-Sat Nov 3 14:41:17 2012 Kouhei Sutou <kou@cozmixng.org>
-
- * lib/rexml/output.rb (REXML::Output): Don't output BOM in middle
- of the output string.
- * test/rexml/test_document.rb: Add a test for the above change.
-
-Sat Nov 3 14:09:55 2012 Kouhei Sutou <kou@cozmixng.org>
-
- * NEWS: Add an item about REXML::Document#write.
-
-Sat Nov 3 13:46:49 2012 Kouhei Sutou <kou@cozmixng.org>
-
- * test/rexml/test_document.rb: Fix tests that expect encoding name
- isn't normalized.
-
-Sat Nov 3 13:26:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * dir.c (Dir#glob):
- Documentation for pattern section, backslash subsection
- Patch by Eric Bouchut
- [ruby-core:48528] [Bug #7230]
-
-Sat Nov 3 13:26:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * io.c (IO#new):
- Documentation for IO#open modes and formatting
- [ruby-core:48052] [Bug #7179]
-
-Sat Nov 3 13:01:02 2012 Kouhei Sutou <kou@cozmixng.org>
-
- * test/rexml/test_encoding.rb (EncodingTester#test_in_different_out):
- Fix a test that expects encoding in XML declaration is changed by
- Output's encoding. It is dropped feature.
-
-Sat Nov 3 12:49:45 2012 Kouhei Sutou <kou@cozmixng.org>
-
- * lib/rexml/document.rb (REXML::Document#write): Document encoding
- option. Now different encoding between XML file's encoding and
- XML declaration's encoding is support.
- [Feature #4872] (work in progress)
- * lib/rexml/xmldecl.rb (REXML::XMLDecl#write): Always use XMLDecl's
- encoding.
- * test/rexml/test_document.rb: Update tests for the above change.
-
-Sat Nov 3 12:18:35 2012 Masaki Matsushita <glass.saga@gmail.com>
-
- * array.c (recursive_equal): fix not to make invalid pointers when
- self and other are resized to same size in #== of their elements.
- [ruby-dev:46373] [Feature #6177]
-
-Sat Nov 3 12:06:15 2012 Kouhei Sutou <kou@cozmixng.org>
-
- * test/rexml/test_xml_declaration.rb (TestXmlDeclaration#test_*):
- Remove needless prefix from test names.
-
-Sat Nov 3 12:04:52 2012 Kouhei Sutou <kou@cozmixng.org>
-
- * test/rexml/test_xml_declaration_parent_child.rb: Rename to ...
- * test/rexml/test_xml_declaration.rb: ... this.
-
-Sat Nov 3 11:43:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * hash.c (rb_hash_delete): Correct grammar
- Patch by Glenn Oppegard
- [Fixes #208 Github]
-
-Sat Nov 3 11:28:28 2012 Narihiro Nakamura <authornari@gmail.com>
-
- * NEWS: add a news about GC::Profiler.raw_data.
-
-Sat Nov 3 11:01:32 2012 Narihiro Nakamura <authornari@gmail.com>
-
- * NEWS: add a news about rb_newobj_of() and NEWOBJ_OF().
-
-Sat Nov 3 10:17:41 2012 Narihiro Nakamura <authornari@gmail.com>
-
- * eval.c (f_current_dirname): add the new method for Kernel.
- This method almost same as File.dirname(__FILE__). One
- different behavior is it returns nil when __FILE__ returns nil.
- [Feature #3346]
-
- * NEWS: ditto
-
- * test/ruby/test_method.rb: related test.
-
-Sat Nov 3 09:03:34 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * test/ruby/test_refinement.rb (test_new_method_by_send,
- test_new_method_by_method_object): add tests for Kernel#send and
- Kernel#method with refinements.
-
- * test/ruby/test_refinement.rb (test_symbol_to_proc): add a test
- calling a proc created by Symbol#to_proc outside the scope where
- a refinement is closed over.
-
-Sat Nov 3 04:14:19 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm.c (rb_vm_rewrite_ep_in_errinfo): rewrite all catch points in
- errinfo, not only the topmost frame. based on the patch by
- ktsj (Kazuki Tsujimoto) in [ruby-dev:45656]. [Bug #6460]
-
-Fri Nov 2 20:11:17 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/mkmf.rb (MakeMakefile#timestamp_file): remove @ which looks like
- configure variables.
-
- * lib/mkmf.rb (MakeMakefile#timestamp_file): use .-. instead of !, a
- special character of NMAKE and BSD make. [Bug #7265]
-
-Fri Nov 2 17:55:39 2012 Shota Fukumori <sorah@tubusu.net>
-
- * lib/test/unit.rb (_run_parallel): Delete status line before showing
- results. Patch by Hiroshi Shirosaki. [Bug #6897] [ruby-core:47250]
-
- * lib/test/unit.rb (_run_parallel): Fix strange result when disabled retrying.
- Patch by Hiroshi Shirosaki. [Bug #6897] [ruby-core:47250]
-
-Fri Nov 2 17:52:12 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * object.c (rb_mod_to_s): Module#{to_s,inspect}, when invoked on
- a refinement, returns a string in the format #<refinement:C@M>,
- where C is a refined class and M is a module at which the refinement
- is defined.
-
- * eval.c (rb_mod_refine): store information on a refinement for the
- above change.
-
- * test/ruby/test_refinement.rb: related test.
-
-Fri Nov 2 16:57:52 2012 Shota Fukumori <sorah@tubusu.net>
-
- * vm_dump.c (rb_vm_bugreport): Because of many log directories,
- making directory lists readable.
-
-Fri Nov 2 16:44:00 2012 Kenta Murata <mrkn@mrkn.jp>
-
- * vm_dump.c (rb_vm_bugreport): add ~/Library/Logs/DiagnosticReports
- in the locations list of crash reports.
-
-Fri Nov 2 14:52:52 2012 Masaki Matsushita <glass.saga@gmail.com>
-
- * array.c (recursive_equal): performance improvement by avoiding
- overhead to call rb_ary_elt().
- [ruby-dev:45412] [Feature #6177]
-
-Fri Nov 2 14:47:53 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * string.c (sym_to_proc, sym_call): A Proc created by Symbol#to_proc
- should close over the current refinements.
- [ruby-dev:46345] [Bug #7261]
-
- * vm_eval.c (rb_call0, rb_search_method_entry,
- rb_funcall_passing_block_with_refinements): add a new argument
- `refinements' for the above changes.
-
- * test/ruby/test_refinement.rb: related test.
-
-Fri Nov 2 08:24:28 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * proc.c (top_define_method): new method, main.define_method.
- [ruby-core:45715] [Feature #6609]
-
- * eval.c (top_include): fix a warning message, main is not a class or
- module.
-
-Fri Nov 2 04:41:33 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/mkmf.rb (MakeMakefile#timestamp_file): use ! instead of %, a GNU
- make special character.
-
-Fri Nov 2 04:40:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * test/ruby/test_process.rb (test_execopts_preserve_env_on_exec_failure):
- use never existing file in the current temporary directory.
-
-Fri Nov 2 04:23:20 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * tool/merger.rb: add feature to tag preview/rc.
-
-Fri Nov 2 03:23:37 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/mkmf.rb: fix for if config["libdir"] is nil.
-
-Thu Nov 1 23:06:01 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * tool/make-snapshot: fix wrong regexp for releasing preview.
- patched by mame.
-
-Thu Nov 1 22:27:11 2012 Koichi Sasada <ko1@atdot.net>
-
- * NEWS: add a news about objspace,
- ObjectSpace.reachable_objects_from.
-
-Thu Nov 1 21:57:00 2012 Kenta Murata <mrkn@mrkn.jp>
-
- * ext/bigdecimal/bigdecimal.c (BigDecimal_new),
- test/bigdecimal/test_bigdecimal.rb:
- Fix exception message of BigDecimal constructor with a Float.
-
-Thu Nov 1 21:52:20 2012 Kenta Murata <mrkn@mrkn.jp>
-
- * ext/bigdecimal/bigdecimal.c (BigDecimal_add),
- test/bigdecimal/test_bigdecimal.rb:
- need to specify precision for converting Rational and Float.
- [ruby-core:48045] [Bug #7176]
-
-Thu Nov 1 21:42:20 2012 Yusuke Endoh <mame@tsg.ne.jp>
-
- * test/ruby/test_process.rb: Revert r37404. My ubuntu box has
- actually the directory named "/nonexistent"... Sorry.
-
-Thu Nov 1 21:28:28 2012 Yusuke Endoh <mame@tsg.ne.jp>
-
- * test/ruby/test_process.rb: Process.exec raised EACCES on Linux
- 3.5.0-17-generic. This is a temporal fix to rescue that exception.
- Needs kosaki's review.
-
-Thu Nov 1 21:19:56 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * iseq.c (set_relation): parent_iseq need to be set regardless iseq
- type. fix r37397.
-
-Thu Nov 1 19:47:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * thread_pthread.c (RUBY_STACK_MIN): may not a compile time constant.
- fix r37079. [ruby-dev:46322] [Bug #7247]
-
-Thu Nov 1 16:44:36 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * NEWS: add note for Module#refine, Module#refinements,
- Module#using, and Kernel#using.
-
-Thu Nov 1 14:41:47 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * eval.c (rb_using_module): using should be used indirectly.
- [ruby-dev:46326] [Feature #7251]
-
-Wed Oct 31 18:17:38 2012 Narihiro Nakamura <authornari@gmail.com>
-
- * gc.c (gc_profile_record): don't define unused variables when
- GC_PROFILE_MORE_DETAIL is 0.
-
-Wed Oct 31 18:10:53 2012 Narihiro Nakamura <authornari@gmail.com>
-
- * gc.c (gc_prof_mark_timer_stop): count is not initialized.
-
-Wed Oct 31 09:28:24 2012 Eric Hodel <drbrain@segment7.net>
-
- * thread.c (rb_thread_call_without_gvl2): Note that ubf() may or may
- not be called with the GVL. Hinted that rb_thread_call_with_gvl()
- can be used to access ruby functionality.
-
-Wed Oct 31 09:06:54 2012 Eric Hodel <drbrain@segment7.net>
-
- * thread.c (rb_thread_call_without_gvl2): Update documentation to
- natural English.
- * thread.c (rb_thread_call_with_gvl): ditto.
-
-Wed Oct 31 02:53:07 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/dl/lib/dl/struct.rb: fix strange require order. [ruby-dev:45702]
-
- * ext/dl/lib/dl/value.rb: ditto
-
- * test/dl/test_c_struct_entry.rb: remove strange require order from
- tests.
-
- * test/dl/test_c_union_entity.rb: ditto
-
-Tue Oct 30 23:59:32 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * eval.c (rb_mod_refine): fix the error message when no block is
- given. [ruby-dev:46319] [Bug #7244]
-
- * test/ruby/test_refinement.rb: related test.
-
-Tue Oct 30 19:27:48 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * process.c (redirect_dup2): set standard handles when new fd is stdio,
- because if there is no allocated console at the moment Windows does
- not automatically associate it for child process's standard handle.
- this is adhoc workaround.
- reported by Martin Thiede at [ruby-core:48542] [Bug #7239].
-
- * io.c (rb_cloexec_dup2): ditto.
-
-Tue Oct 30 03:08:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/rbconfig/obsolete.rb (Config): re-introduce warnings for a
- lame-duck. [ruby-core:46836] [Bug #6809]
-
-Tue Oct 30 02:20:10 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * thread.c: added Thread#thread_variable_(get|set),
- Thread#thread_variable?, and Thread#thread_variables for operating
- on variables that are local to threads. [ruby-core:47790]
-
- * vm.c: ditto
-
- * test/ruby/test_thread.rb: tests for thread variables.
-
-Mon Oct 29 18:22:58 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/stringio/stringio.c (strio_close): close separately per each
- instances, as well as IO.
-
-Mon Oct 29 10:22:00 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/handlers/recorder.rb: added a class for
- recording YAML parse and emit events.
-
- * ext/psych/lib/psych/handler.rb: adding a list of events so that
- handler classes can more easily be meta-programmed.
-
- * test/psych/handlers/test_recorder.rb: tests for the change.
-
-Mon Oct 29 05:48:52 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * lib/ostruct.rb: Add [] and []=, base on a patch by Thomas Sawyer.
- Also accept {Open}Struct as argument to new.
- Add #eql?, #hash & #each_pair
- Protect new_ostruct_member
-
-Mon Oct 29 03:20:58 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * lib/matrix.rb: Fix determinant_e [ruby-dev:46305] [Bug #7228]
-
-Sun Oct 28 23:52:25 2012 Kouhei Sutou <kou@cozmixng.org>
-
- * test/rexml/test_document.rb: Add tests for parsing XML encoded
- by UTF-8 with BOM.
-
-Sun Oct 28 23:47:09 2012 Kouhei Sutou <kou@cozmixng.org>
-
- * lib/rexml/source.rb: Move encoding detection code to base class.
- * lib/rexml/encoding.rb: Remove needless encoding detection code.
-
-Sun Oct 28 21:40:13 2012 Kouhei Sutou <kou@cozmixng.org>
-
- * lib/rexml/parsers/baseparser.rb: Fix a bug that UTF-8 is used
- for UTF-16XX encoded XML that doesn't have encoding="UTF-16" in
- XML declaration.
- * test/rexml/test_document.rb: Add tests for the above change.
-
-Sun Oct 28 21:37:34 2012 Kouhei Sutou <kou@cozmixng.org>
-
- * test/rexml/test_document.rb: Group tests that they parse
- UTF-16XX encoded XML that has encoding="UTF-16" in XML declaration.
-
-Sun Oct 28 21:25:11 2012 Kouhei Sutou <kou@cozmixng.org>
-
- * lib/rexml/source.rb (REXML::IOSource#initialize): Reduce
- @line_break initialize code. It should be done only in #encoding=.
- * lib/rexml/parsers/baseparser.rb: Don't set UTF-16 encoding to
- source by encoding="UTF-16" in XML declaration because UTF-16XX
- source encoding should be set in Source#initialize or
- IOSource#initialize. They should handle BOM. Parser should not
- consider about it.
-
-Sun Oct 28 21:18:37 2012 Kouhei Sutou <kou@cozmixng.org>
-
- * test/rexml/test_document.rb: Add tests for parsing XML encoded
- by UTF-16 with BOM.
-
-Sun Oct 28 19:12:11 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * ext/date/date_parse.c (iso8601_{ext,bas}_time): should not match
- empty string.
-
-Sun Oct 28 18:51:33 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * ext/date/date_parse.c (date__parse): revised the tight parser.
-
-Sun Oct 28 15:41:50 2012 Kouhei Sutou <kou@cozmixng.org>
-
- * lib/rexml/document.rb (REXML::Document#write): Add :encoding option
- to support custom XML encoding.
- [Feature #4872] (work in progress)
- * test/rexml/test_document.rb: Add tests for the above change.
-
-Sun Oct 28 15:00:19 2012 Kouhei Sutou <kou@cozmixng.org>
-
- * lib/rexml/document.rb (REXML::Document#write): Remove needless
- indent in document.
-
-Sun Oct 28 14:59:14 2012 Kouhei Sutou <kou@cozmixng.org>
-
- * lib/rexml/document.rb (REXML::Document#write): Accept options
- Hash as argument.
- * test/rexml/test_document.rb: Add tests for the above change.
-
-Sun Oct 28 14:09:44 2012 Kouhei Sutou <kou@cozmixng.org>
-
- * lib/rexml/document.rb (REXML::Document#write): Fix wrong usage
- in document.
-
-Sun Oct 28 14:03:48 2012 Kouhei Sutou <kou@cozmixng.org>
-
- * lib/rexml/document.rb (REXML::Document#write): Fix wrong method
- names in document.
-
-Sun Oct 28 10:12:15 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/visitors/yaml_tree.rb: `tree` should return the
- same thing on every call.
-
- * test/psych/visitors/test_yaml_tree.rb: related test.
-
-Sun Oct 28 10:05:03 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/visitors/yaml_tree.rb: YAML Tree object should
- be able to take an emitter object as it's output.
-
- * test/psych/visitors/test_yaml_tree.rb: related test.
-
-Sun Oct 28 08:23:16 2012 Koichi Sasada <ko1@atdot.net>
-
- * bignum.c (bignew_1): Bignum instances are frozen.
- Feature #3222
-
- * include/ruby/ruby.h: Fixnum instances are also frozen.
-
- * class.c (singleton_class_of): check Bignum before
- singleton checking.
-
- * test/ruby/test_bignum.rb: add a test.
-
- * test/ruby/test_fixnum.rb: ditto.
-
- * test/ruby/marshaltestlib.rb, test/ruby/test_eval.rb,
- test/ruby/test_object.rb: catch up above changes.
-
-Sun Oct 28 04:38:06 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm.c (vm_define_method): remove type and frozen checking.
- Checking is done in `rb_singleton_class()'.
-
-Sun Oct 28 00:49:06 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (assign_in_cond): warn for static content object assignments
- in conditional statements. [ruby-dev:43083] [Feature #4299]
-
-Sat Oct 27 23:33:41 2012 Benoit Daloze <eregontp@gmail.com>
-
- * gc.c (gc_profile_result, gc_profile_report): use internal structures
- to avoid allocations and progressively print the output for #report.
- [ruby-core:47163] [Bug #6865]
-
-Sat Oct 27 11:01:10 2012 Koichi Sasada <ko1@atdot.net>
-
- * numeric.c (rb_float_new_in_heap), include/ruby/ruby.h:
- make all Float objects frozen.
- [ruby-dev:46081] [ruby-trunk - Feature #6936]
- Most part of patch by NARUSE, Yui <naruse@ruby-lang.org>.
-
- * class.c (singleton_class_of): raise TypeError when
- trying to define a singleton method on Float objects.
-
- * vm.c (vm_define_method): ditto.
-
- * test/ruby/marshaltestlib.rb: catch up above changes.
-
- * test/ruby/test_class.rb: ditto.
-
- * test/test_pp.rb: ditto.
-
-Sat Oct 27 10:50:53 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * object.c (rb_mod_const_get): make sure the constant name is
- converted to a string before searching. [ruby-core:48405]
-
-Sat Oct 27 10:12:13 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
-
- * iseq.c (rb_iseq_compile_with_option): Instead of testing
- respond_to, just check if the argument is actually a file,
- because by calling user-defined gets something weired can
- happen. Patch by Glass_saga. [ruby-dev:40202] [Bug #2861]
-
- * parse.y (ripper_initialize): ditto.
-
-Sat Oct 27 10:07:57 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (enum lex_state_e): [EXPERIMENTAL] lex_state as bit field /
- IS_lex_state() macro. based on the patch by Dave B in
- [ruby-core:23503]. [Feature #1493]
-
-Sat Oct 27 10:05:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * include/ruby/win32.h (fstat): use _fstati64() instead of fstati64()
- on mingw32.
-
-Sat Oct 27 06:28:33 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * object.c (rb_mod_const_get): const_get accepts qualified constant
- strings. e.g. Object.const_get("Foo::Bar::Baz") [ruby-core:41404]
-
- * test/ruby/test_module.rb: tests for new behavior
-
-Fri Oct 26 13:24:20 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (literal_concat_gen): merge fixed strings across
- concatenated literals, after an interpolation.
-
-Thu Oct 25 17:48:54 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/win32.c (has_redirection): should use shell (cmd.exe) when
- the commandline contains '&'.
- reported by Roger Pack at [ruby-core:47912] [Bug #7143], and
- patched by Heesob Park at [ruby-core:47931].
-
-Thu Oct 25 15:00:08 2012 Koichi Sasada <ko1@atdot.net>
-
- * include/ruby/ruby.h, class.c: remove (revert)
- `rb_add_method_cfunc_frameless()' API.
- This API is not mature to become an official API.
- For example, we can not use this API with
- `rb_define_private_method()'.
-
- * method.h, vm_method.c (rb_add_method_cfunc_frameless): removed.
-
-Thu Oct 25 13:35:07 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * tool/mkconfig.rb: remove string literal concatenation.
-
-Wed Oct 24 18:49:16 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/objspace/objspace.c (type2sym, count_objects_size): use enum
- instead of size_t which may be larger than actual values.
-
-Wed Oct 24 17:41:24 2012 Koichi Sasada <ko1@atdot.net>
-
- * benchmark/driver.rb: add `-x' or `--exclude' option
- to specify exclude benchmark name pattern.
- You can specify "-x foo" if you want to exclude the benchmarks
- if the name of benchmark contains `foo'.
-
-Wed Oct 24 11:57:24 2012 Narihiro Nakamura <authornari@gmail.com>
-
- * gc.c (gc_prepare_free_objects): rename to match the behavior of
- this function.
-
-Wed Oct 24 11:55:19 2012 Koichi Sasada <ko1@atdot.net>
-
- * ext/objspace/objspace.c (reachable_object_from_i): change data
- structure of the result of reachable objects. Keys of table
- contains object_id of each reachable objects. Value of table
- is an object itself or an instance of InternalObjectWrapper.
- To avoid duplication, we use st_table and object_id keys.
-
- * ext/objspace/objspace.c (type2sym): bug fix.
- Should use `i' instead of `type'.
-
-Wed Oct 24 10:33:09 2012 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (garbage_collect, gc_marks): move the location of
- clear and restore rb_objspace_t::mark_func_data
- from garbage_collect() to gc_marks().
-
-Wed Oct 24 10:17:45 2012 Koichi Sasada <ko1@atdot.net>
-
- * ext/objspace/objspace.c (Init_objspace): add a new method
- `ObjectSpace::InternalObjectWrapper#internal_object_id' which returns
- an object id of a wrapped internal object.
-
-Wed Oct 24 08:55:04 2012 Koichi Sasada <ko1@atdot.net>
-
- * ext/objspace/objspace.c (ObjectSpace.reachable_objects_from):
- internal object support.
- If given object `obj' has references to internal objects
- (such as T_NODE objects), then this method returns instances of
- `ObjectSpace::InternalObjectWrapper' instead of that internal objects.
- This instance contains a reference to an internal object and you can
- check the type of internal object using
- `ObjectSpace::InternalObjectWrapper#type' method.
- Rdoc of `InternalObjectWrapper' is not prepared yet.
-
- * gc.c (rb_objspace_reachable_objects_from), gc.h: change
- an interface of 'rb_objspace_reachable_objects_from()'
-
- * gc.c, gc.h: add two APIs
- - rb_objspace_markable_object_p(obj): check markable or not.
- - rb_objspace_internal_object_p(obj): check internal or not.
-
-Wed Oct 24 05:52:36 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_insnhelper.c (vm_call_method): remove `default' and
- add a case for `VM_METHOD_TYPE_UNDEF'.
-
-Wed Oct 24 05:41:18 2012 Koichi Sasada <ko1@atdot.net>
-
- * eval_error.c (error_print), vm_eval.c (eval_string_with_cref),
- vm_trace.c (rb_suppress_tracing): use TH_PUSH_TAG() instead of
- PUSH_TAG().
-
-Wed Oct 24 05:17:52 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_eval.c (vm_call0_body): remove RUBY_VM_CHECK_INTS()
- after method invocation using rb_call0().
-
- * vm_eval.c (vm_call0_body): remove default section on top of
- switch statement and add cases for `VM_METHOD_TYPE_CFUNC_FRAMELESS'
- and `VM_METHOD_TYPE_UNDEF'.
-
- * vm_eval.c (vm_call0_body): remove useless brackets.
-
-Tue Oct 23 22:34:49 2012 Koichi Sasada <ko1@atdot.net>
-
- * thread.c (thread_raise_m): check interrupts after Thread#raise
- if a target thread is the current thread because the behavior
- of Thread.current.raise is expected to perform same as
- Kernel.raise (by rubyspec).
-
-Tue Oct 23 17:08:39 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ruby.c (usage, process_options): show more info in --help.
- [EXPERIMENTAL] [ruby-core:48072] [Bug #7184]
-
-Tue Oct 23 14:20:43 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * misc/ruby-electric.el using variable `last-command-event' instead of
- obsolete `last-command-char', so that work with Emacs trunk.
- a patch by Victor Deryagin <vderyagin AT gmail.com>.
-
-Tue Oct 23 14:06:47 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in (visibility_option): visibility attribute is not
- available before GCC 4, so do not use -fvisibility option in that
- case. [ruby-core:48147] [Bug #7205]
-
-Tue Oct 23 12:57:29 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_core.h, vm_insnhelper.c, vm_eval.c (OPT_CALL_CFUNC_WITHOUT_FRAME):
- add a new optimization and its macro `OPT_CALL_CFUNC_WITHOUT_FRAME'.
- This optimization makes all cfunc method calls `frameless', which
- is faster than ordinal cfunc method call.
- If `frame' is needed (for example, it calls another method with
- `rb_funcall()'), then build a frame. In other words, this
- optimization delays frame building.
- However, to delay the frame building, we need additional overheads:
- (1) Store the last call information.
- (2) Check the delayed frame building before the frame is needed.
- (3) Overhead to build a delayed frame.
- rb_thread_t::passed_ci is storage of delayed cfunc call information.
- (1) is lightweight because it is only 1 assignment to `passed_ci'.
- To achieve (2), we modify GET_THREAD() to check `passed_ci' every
- time. It causes 10% overhead on my environment.
- This optimization only works for cfunc methods which do not need
- their `frame'.
- After evaluation on my environment, this optimization does not
- effective every time. Because of this evaluation results, this
- optimization is disabled at default.
-
- * vm_insnhelper.c, vm.c: add VM_PROFILE* macros to measure behaviour
- of VM internals. I will extend this feature.
-
- * vm_method.c, method.h: change parameters of the `invoker' function.
- Receive `func' pointer as the first parameter.
-
-Tue Oct 23 06:21:05 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/parser.c: just get the constant defined in Ruby.
-
- * ext/psych/lib/psych/syntax_error.rb: Psych::SyntaxError now inherits
- from StandardError rather than SyntaxError. Thanks Eric Hodel!
-
- * test/psych/test_exception.rb: tests for change.
-
-Tue Oct 23 06:17:36 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/scalar_scanner.rb: Cache symbols while
- tokenizing. Thanks Kevin Menard!
-
-Tue Oct 23 06:15:40 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/scalar_scanner.rb: Updated the RegExp to catch
- Strings earlier in the tokenization process. Thanks Kevin Menard!
-
-Tue Oct 23 06:12:39 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/visitors/to_ruby.rb: Handle nil tags specially
- to avoid slow method_missing calls. Thanks Kevin Menard!
-
-Tue Oct 23 06:07:57 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/scalar_scanner.rb: Ignore bad timestamps. If
- something looks like a timestamp but has an invalid component, treat
- it as a string instead of throwing an ArgumentError.
- Thanks Rhett Sutphin!
-
- * test/psych/test_scalar_scanner.rb: appropriate tests.
-
-Tue Oct 23 06:04:07 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/scalar_scanner.rb: Fix scalar_scanner to
- understand strings starting with an underscore and containing only
- digits. Thanks Kelley Reynolds.
-
- * test/psych/test_scalar_scanner.rb: test for fix
-
-Tue Oct 23 06:00:41 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych.rb: Changed comment in psych.rb to update new
- home page for libyaml. Thanks to Carolyn Ann.
-
-Sun Oct 21 19:12:59 2012 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * vm_core.h (rb_vm_t::trace_running): add a new field
- `trace_running' to store vm global tracing status.
-
- * vm_trace.c: fix SEGV bug. event_hook was free'd
- even when the hook is still used in another thread.
- [ruby-dev:46141] [Bug #7032]
-
-Sun Oct 21 19:12:42 2012 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * vm_core.h (rb_vm_t::trace_flag): remove `trace_flag'
- which is no longer used.
-
-Sun Oct 21 18:34:27 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * ext/date/date_parse.c (date__parse): uses more tight parser if
- defined TIGHT_PARSER. now inactivated; because it introduces
- incompatibilities and it is a bit slow.
-
-Sat Oct 20 15:35:06 2012 Narihiro Nakamura <authornari@gmail.com>
-
- * include/ruby/ruby.h: add C APIs.
- VALUE rb_newobj_of(VALUE klass, VALUE flags)
- #define NEWOBJ_OF(obj,type,klass,flags)
- These allow to change a allocation strategy depending on klass
- or flags.
-
- * gc.c: ditto
-
- * array.c: use new C API.
- * bignum.c: ditto
- * class.c: ditto
- * complex.c: ditto
- * ext/socket/ancdata.c: ditto
- * ext/socket/option.c: ditto
- * hash.c: ditto
- * io.c: ditto
- * marshal.c: ditto
- * numeric.c: ditto
- * object.c: ditto
- * random.c: ditto
- * range.c: ditto
- * rational.c: ditto
- * re.c: ditto
- * string.c: ditto
- * struct.c: ditto
- [Feature #7177][Feature #7047]
-
-Sat Oct 20 12:50:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * ext/socket/socket.c: Documentation for Socket
- Based on a patch by David Albert
- [Bug #7105] [ruby-core:47828]
-
-Sat Oct 20 11:00:00 2012 Zachary Scott <zachary@zacharyscott.net>
-
- * lib/open-uri.rb: Documentation for OpenURI
-
-Sat Oct 20 06:18:34 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * hash.c (initialize_copy): unset the default proc if there isn't one
- for the target hash, call to_hash, check frozen status.
-
-Fri Oct 19 22:22:01 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm.c (rb_vm_jump_tag_but_local_jump): pass through thrown objects.
- [ruby-dev:46234] [Bug #7185]
-
- * vm_eval.c (rb_eval_cmd): if state is non-zero, val should be nil and
- rb_vm_jump_tag_but_local_jump() just jump tag.
-
-Fri Oct 19 22:11:55 2012 Benoit Daloze <eregontp@gmail.com>
-
- * pack.c (pack_unpack): set encoding of the
- 'H','h','B' and 'B' modifiers to US-ASCII.
-
- * test/ruby/test_pack.rb: tests for the above.
- [ruby-core:47653][Bug #7050]
-
- * test/test_securerandom.rb: tests for SecureRandom.hex
- from tenderlove. [ruby-core:46792][Bug #6799]
-
-Fri Oct 19 19:29:11 2012 Koichi Sasada <ko1@atdot.net>
-
- * method.h (rb_method_cfunc_t::invoker): add new field (func ptr)
- `invoker'. `invoker' function invoke cfunc body
- (rb_method_cfunc_t::func).
- `invoker' is set at method definition timing.
- With this change, the big `switch' (branch) in `call_cfunc()'
- is no longer needed.
- However, the performance benefit is only a bit.
-
- * vm_core.h (rb_call_info_t::aux::func): add a new field to store
- cfunc body function pointer.
-
- * vm_method.c (call_cfunc_invoker_func): add a new function which
- returns a suitable invoke function.
-
- * vm_method.c (setup_method_cfunc_struct): added.
-
- * vm_method.c (rb_add_method): fix to set `invoker'.
-
- * vm_eval.c (vm_call0_body): catch up above changes.
-
- * vm_insnhelper.c (call_cfunc): removed.
-
- * vm_insnhelper.c (vm_call_cfunc): fix to call cfunc body
- with `invoker' function.
-
-Fri Oct 19 16:55:58 2012 Koichi Sasada <ko1@atdot.net>
-
- * eval.c, vm_eval.c: use TH_PUSH_TAG() instead of PUSH_TAG().
-
-Fri Oct 19 11:13:55 2012 Koichi Sasada <ko1@atdot.net>
-
- * benchmark/driver.rb: remove unexpected `output'.
- (commit miss)
-
-Fri Oct 19 10:24:03 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_insnhelper.c (vm_search_method): remove needless local variable.
-
-Fri Oct 19 10:22:26 2012 Koichi Sasada <ko1@atdot.net>
-
- * benchmark/bmx_temp.rb: removed.
- This file should not be in repository.
-
-Fri Oct 19 10:20:10 2012 Koichi Sasada <ko1@atdot.net>
-
- * benchmark/driver.rb: add new option `--ruby-arg [ARG]'
- which is passed as a launch parameter for each ruby's execution.
- ($ ruby [ARG] [File])
-
-Thu Oct 18 18:42:35 2012 Koichi Sasada <ko1@atdot.net>
-
- * insns.def (opt_send_simple): move the location of
- `opt_send_simple' to the place near `send' definition.
- (to take care about icache locality).
-
-Thu Oct 18 18:29:25 2012 Koichi Sasada <ko1@atdot.net>
-
- * insns.def (send): remove unused condition.
- This condition will be true after r37258.
-
- * vm_insnhelper.c (vm_caller_setup_args): remove `UNLIKELY' on
- checking blockiseq (it seems `LIKELY').
-
-Thu Oct 18 17:31:58 2012 Koichi Sasada <ko1@atdot.net>
-
- * insns.def (opt_send_simple): introduce new instruction used
- when no need to care about block and splat.
-
- * compile.c: use the `opt_send_simple' instruction.
-
-Thu Oct 18 16:44:07 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm_method.c (rb_add_method_cfunc, rb_add_method_cfunc_frameless):
- check arity earlier at definition time.
-
-Thu Oct 18 15:11:31 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_insnhelper.c: add `inline' keyword to several functions.
- Compilers (gcc) are conservative than I expected.
-
-Thu Oct 18 15:01:15 2012 Koichi Sasada <ko1@atdot.net>
-
- * include/ruby/ruby.h: add a decl. of
- `rb_define_frameless_method()'.
-
-Thu Oct 18 14:31:17 2012 Koichi Sasada <ko1@atdot.net>
-
- * compile.c (new_callinfo): set a temporary index of callinfo
- (used in `iseq_set_sequence()') to rb_call_info_t::aux::index.
- rb_call_info_t::argc is initialized by same value of
- rb_call_info_t::orig_argc.
-
-Thu Oct 18 14:11:08 2012 Koichi Sasada <ko1@atdot.net>
-
- * class.c (rb_define_frameless_method): rename from
- rb_define_method_fast(). Defined method with this C API
- does not make a method frame. It is bit lightweight than
- ordinal C functions. Now only 0 or 1 argc are permitted.
-
- * method.h (VM_METHOD_TYPE_CFUNC_FRAMELESS): rename macro name
- from VM_METHOD_TYPE_CFUNC_FAST.
-
- * vm_insnhelper.c, vm_method.c: rename related functions.
-
- * proc.c (rb_method_entry_arity): catch up above changes.
-
-Thu Oct 18 10:30:34 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (assignable_gen): fail if yyerror occurred. fix a bug in
- r36973.
-
-Thu Oct 18 09:23:03 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * hash.c (initialize_copy): duping should rehash the hash.
-
- * test/ruby/test_hash.rb: added a test to ensure rehash.
-
-Wed Oct 17 21:16:47 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * common.mk (WPROGRAM): need same dependencies as PROGRAM.
-
- * cygwin/GNUmakefile.in (uncommon.mk): move include position
- below WPROGRAM definition to be defined in uncommon.mk.
-
- * ext/extmk.rb (all, static): fix make rubyw.exe failure with make -jN.
- If make of ruby.exe and rubyw.exe run in parallel, link dll and link
- exe run in parallel, which causes link failure on mingw. To fix this,
- we make ruby.exe and rubyw.exe in one make process.
- [ruby-core:48007] [Bug #7165]
-
-Wed Oct 17 16:25:34 2012 Koichi Sasada <ko1@atdot.net>
-
- * benchmark/bm_vm2_method_missing.rb: add a benchmark to measure
- performance of invoking `method_missing'.
-
-Wed Oct 17 16:23:17 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_insnhelper.c (vm_getivar): fix to use `aux.index' instead of
- `aux.opt_pc'.
-
-Wed Oct 17 16:03:54 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_insnhelper.c (vm_call_method_missing): make a refactoring
- about method_missing process. Use `vm_call_method()' to invoke
- `method_missing' method instead of `rb_funcall2()'.
- In `vm_call_method()', set fastpath to `vm_call_method_missing()'
- if it can be cached.
-
- * vm_core.h (rb_call_info_t): add new field
- `rb_call_info_t::aux::missing_reason' to pass the reason to
- `vm_call_method_missing()'.
-
-Wed Oct 17 15:33:12 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in (opt-dir): allow multiple directories separated by
- $PATH_SEPARATOR as well as dir_config in mkmf.rb. [ruby-core:47868]
- [Bug #7120]
-
-Wed Oct 17 15:08:13 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * lib/net/imap.rb: fix Net::IMAP::ResponseParser to accept
- message/delivery-status ([ruby-core:47920] [Bug #7146]),
- message/rfc822 attachments ([ruby-core:47921] [Bug #7147]), and
- (BODY ("MIXED")) ([ruby-core:47951] [Bug #7153]).
- patched by Tony Arkles.
-
- * test/net/imap/test_imap_response_parser.rb: related test.
-
-Wed Oct 17 11:04:48 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/ruby/test_hash.rb (TestHash#test_dup_equality): added a new test
- to show the problem of r37232.
-
-Wed Oct 17 10:48:40 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * vm_insnhelper.c (vm_search_method): fix a build error that occurs
- when OPT_INLINE_METHOD_CACHE is 0.
-
-Wed Oct 17 08:46:47 2012 Koichi Sasada <ko1@atdot.net>
-
- * benchmark/bm_vm2_dstr.rb: add a benchmark to measure
- performance of dynamic generated string ("foo#{bar}baz").
-
-Wed Oct 17 08:32:46 2012 Koichi Sasada <ko1@atdot.net>
-
- * compile.c (compile_dstr_fragments): use `putobject' instead of
- `putstring' for all of strings used by NODE_DSTR because
- ruby users can not grab this string.
- For example, the string object of "baz" in "foo#{bar}baz"
- is located by `putobject' (users can not touch "baz" object
- directly). This change reduces GC pressure.
- This improvement is suggested by Aaron Patterson.
-
-Wed Oct 17 08:02:57 2012 Koichi Sasada <ko1@atdot.net>
-
- * thread.c (rb_threadptr_interrupt_mask): fix to check interrupt
- after interrupt_mask changed.
-
-Wed Oct 17 06:42:47 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_insnhelper.c (vm_call_method): fix to return value immediately.
- Remove CHECK_INTS() after that method dispatch.
-
-Wed Oct 17 06:25:56 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * hash.c (initialize_copy): copy the underlying st_table on dup,
- rather than copying the hash key by key. [ruby-core:48009]
-
- * test/ruby/test_hash.rb: relevant tests for initialize_copy
-
-Wed Oct 17 06:17:44 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_insnhelper.c (vm_call_iseq_setup_2): separate tailcall and normal
- method frame setup functions.
- Add checking interrupts at the tailcall setup function.
-
-Wed Oct 17 05:35:37 2012 Koichi Sasada <ko1@atdot.net>
-
- * benchmark/bm_vm1_yield.rb: add a benchmark to measure `yield'
- (invoke empty block) performance.
-
- * benchmark/bm_vm2_method_with_block.rb: add a benchmark to measure
- method invocation with empty block.
-
-Wed Oct 17 05:05:07 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_insnhelper.c (vm_invoke_block): vm_caller_setup_args() can skip
- when splat flag is not set.
-
-Wed Oct 17 01:53:47 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_insnhelper.c (vm_getivar, vm_setivar): support index inline cache
- with rb_call_info_t to speedup `attr' getter and setter.
- Cached index is stored in rb_call_info_t::aux::index.
- `index' == 0 means not cached. `index' > 0 means cached and cached
- index is `index - 1'.
-
- * insns.def ((get|set)instancevariable): use new wrapper functions
- vm_(get|set)instancevariable() defined in vm_insnhelper.c.
-
- * vm_core.h (rb_call_info_t::aux): introduce new union data because
- opt_pc can share with index.
-
-Tue Oct 16 22:24:44 2012 Koichi Sasada <ko1@atdot.net>
-
- * benchmark/driver.rb (show_results): Show speedup ratio
- with first executables score at last of results
- if two or more executables are given.
-
-Tue Oct 16 21:59:01 2012 Koichi Sasada <ko1@atdot.net>
-
- * benchmark/driver.rb: some refactoring.
- (1) Remove `average differential'.
- In this benchmark driver, We should not care about `average'.
- We use fastest score because this score should not include
- any disturbances (affections of background process, etc).
- If you care about timing affect, I recommend `median'
- score with more than 5 examinations rather than simple
- `average' score (`average' score was affected by error scores).
- (2) Show log file name.
- (3) Change default directory from './' to driver's directory.
-
-Tue Oct 16 14:56:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * file.c (rb_file_join): need to check again after any conversion run.
- [ruby-core:48012] [Bug #7168]
-
-Tue Oct 16 12:52:14 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-
- * test/ruby/envutil.rb (Test::Unit::Assertions#assert_file):
- rename from file_assertion.
-
-Tue Oct 16 11:30:18 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * file.c (rb_file_join): hide the result under construction until
- return.
-
- * file.c (rb_file_join): check nul-byte only for strings, since
- FilePathStringValue() does it. [ruby-core:48012] [Bug #7168]
-
- * file.c (rb_file_join): path names must be ASCII-compatible.
- [ruby-core:48012] [Bug #7168]
-
- * file.c (check_path_encoding): new function to ensure path name
- encoding to be ASCII-compatible.
-
-Tue Oct 16 09:40:04 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/ruby/test_regexp.rb
- (TextRegexp#test_raw_hyphen_and_tk_char_type_after_range): use
- Regexp.new instead of literal to ignore a parser warning.
-
-Tue Oct 16 09:30:30 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/ruby/test_regexp.rb
- (TextRegexp#test_raw_hyphen_and_tk_char_type_after_range): ignoring
- warnings are already set in setup method.
-
-Tue Oct 16 06:44:06 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_insnhelper.c (VM_CALLEE_SETUP_ARG): fix wrong condition.
-
-Tue Oct 16 06:29:18 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_insnhelper.c (vm_call_method): disable CI_SET_FASTPATH() if
- this method call needs splat argument because cached functions
- (vm_call_attrset, vm_call_ivar, vm_call_cfunc_fast_(unary|binary))
- do not check an arity.
-
- * bootstraptest/test_method.rb: add a test to check an above issue.
-
-Tue Oct 16 06:15:44 2012 Koichi Sasada <ko1@atdot.net>
-
- * method.h: introduce new method type VM_METHOD_TYPE_CFUNC_FAST.
- This method is similar to VM_METHOD_TYPE_CFUNC methods, but
- called cfunc without building new frame (does not push new control
- frame). If error is occurred in cfunc, the backtrace only shows
- caller frame and upper.
- This kind of methods can be added by rb_define_method_fast().
- This feature is similar to specialized instructions (opt_plus, etc),
- but more flexible (but a bit slower).
-
- * class.c (rb_define_method_fast): added.
- Maybe it will be renamed soon.
-
- * vm_insnhelper.c (vm_call_method): support method type
- VM_METHOD_TYPE_CFUNC_FAST.
-
- * proc.c (rb_method_entry_arity): catch up new method type.
-
- * vm_method.c (rb_add_method_cfunc_fast): added.
-
-Tue Oct 16 02:32:29 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_insnhelper.h (CI_SET_FASTPATH): add new parameter `enabled'.
- If `enable' is 0 then CI_SET_FASTPATH() doesn't work.
- And add new configuration option OPT_CALL_FASTPATH. If this macro
- was defined by 0, then CI_SET_FASTPATH() doesn't work any more.
-
- * vm_insnhelper.c (vm_call_method): Pass `0' for `enabled' parameter
- of CI_SET_FASTPATH if this method is protected.
-
-Tue Oct 16 02:17:35 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_core.h (VM_CALL_*): rename VM_CALL_*_BIT
- to VM_CALL_* (remove `_BIT' suffix).
- Add comments on each macros.
- Remove unused macro VM_CALL_TAILRECURSION_BIT.
-
- * compile.c, iseq.c, insns.def, vm_insnhelper.c: ditto.
-
-Mon Oct 15 22:14:44 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * test/ruby/envutil.rb (Test::Unit::Assertions#file_assertion):
- rewrite file assertions.
-
-Mon Oct 15 09:41:17 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_insnhelper.c (VM_CALLEE_SETUP_ARG): skip CI_SET_FASTPATH() if
- it was called from vm_yield_setup_args().
-
-Mon Oct 15 05:20:13 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_insnhelper.h CI_SET_FASTPATH: introduce new macro
- `CI_SET_FASTPATH(ci, func)'. This macro set `ci->call' as `func'.
- `func' (ci->call) is called at the last of `send'
- (and `invokesuper') instruction.
- `CI_SET_FASTPATH' does not set `ci->call' when the method
- (stored in `ci->me') is `protected'.
-
- * vm_insnhelper.c (vm_call_method): use `CI_SET_FASTPATH'.
- After several checking (visibility, argc checking), the result of
- checking can be reused until re-definition of this method
- with inline method cache.
-
- Note that this optimization is now experimental.
- If you find any problem about it, please tell us.
-
-Mon Oct 15 04:51:55 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_insnhelper.c: refactoring.
- - move all `call' related functions to the last of file.
- - make functions for respective method types in vm_call_method().
- (all functions have same function parameters)
-
- * vm_core.h: add `opt_pc' field in `rb_call_info_t'
- as temporal variable.
-
- * vm_eval.c (vm_call0_body): catch up above changes.
-
-Mon Oct 15 03:51:46 2012 Koichi Sasada <ko1@atdot.net>
-
- * benchmark/bm_vm1_attr_ivar(_set).rb: added (for method dispatch speed).
-
- * benchmark/bm_vm1_float_simple.rb: added (for flonum/float).
-
-Mon Oct 15 02:51:16 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_eval.c (vm_call0_body): add new function.
- `vm_call0()' makes call_info struct and calls `vm_call0_body()'
- with this struct. In near future, `vm_call0()' will be removed
- because all of `vm_call0()' users setup call_info struct by itself.
-
-Mon Oct 15 01:38:06 2012 Koichi Sasada <ko1@atdot.net>
-
- * insns.def (send, invokesuper, invokeblock, opt_*), vm_core.h:
- use only a `ci' (rb_call_info_t) parameter instead of using
- parameters such as `op_id', 'op_argc', `blockiseq' and flag.
- These information are stored in rb_call_info_t at the compile
- time.
- This technique simplifies parameter passing at related
- function calls (~10% speedups for simple method invocation at
- my machine).
- `rb_call_info_t' also has new function pointer variable `call'.
- This `call' variable enables to customize method (block)
- invocation process for each place. However, it always call
- `vm_call_general()' at this changes.
- `rb_call_info_t' also has temporary variables for method
- (block) invocation.
-
- * vm_core.h, compile.c, insns.def: introduce VM_CALL_ARGS_SKIP_SETUP
- VM_CALL macro. This flag indicates that this call can skip
- caller_setup (block arg and splat arg).
-
- * compile.c: catch up above changes.
-
- * iseq.c: catch up above changes (especially for TS_CALLINFO).
-
- * tool/instruction.rb: catch up above changes.
-
- * vm_insnhelper.c, vm_insnhelper.h: ditto. Macros and functions
- parameters are changed.
-
- * vm_eval.c (vm_call0): ditto (it will be rewritten soon).
-
-Sun Oct 14 12:30:44 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ruby.c (rb_f_sub, rb_f_gsub): pass the given block.
- [ruby-core:47967] [Bug #7157]
-
-Sat Oct 13 23:15:39 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * regparse.c (parse_char_class): should match with a hyphen after a
- range in a character class.
-
- * test/ruby/test_regexp.rb (TestRegexp#test_char_class): fixed wrong
- test.
-
- * test/ruby/test_regexp.rb (TestRegexp#check): now can accept the
- error message.
-
- * test/ruby/test_regexp.rb
- (TextRegexp#test_raw_hyphen_and_tk_char_type_after_range): renamed
- because the previous name was wrong.
-
- * test/ruby/test_regexp.rb
- (TextRegexp#test_raw_hyphen_and_tk_char_type_after_range): added
- more test pattern.
-
-Sat Oct 13 03:01:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * file.c (realpath_rec): prevent link from GC while link_names refers
- the content.
-
-Sat Oct 13 01:37:48 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/ruby/test_regexp.rb
- (TestRegexp#test_raw_hyphen_and_type_char_after_range): added new
- test. ref [ruby-core:47115] [Backport #6853]
-
-Fri Oct 12 21:55:08 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * include/ruby/win32.h (rb_w32_pow): set floating point precision
- for mingw-w64 x86 pow(). This improves the precision of pow() on
- Windows XP for TestFloat#test_round_with_precision failure.
- [ruby-core:47911] [Bug #7142]
-
-Fri Oct 12 21:37:25 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * test/webrick/test_cgi.rb (TestWEBrickCGI#test_cgi): skip a test
- depending on locale on Windows. ENV[] doesn't work properly if
- console code page is not equal to file system encoding.
- [ruby-core:47910] [Bug #7140]
-
-Fri Oct 12 20:40:29 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (posix_sh_cmds): the command name of colon is ":".
-
-Fri Oct 12 18:18:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * file.c (rb_get_path_check): path name must not contain NUL bytes.
-
-Fri Oct 12 16:06:20 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * tool/merger.rb: now can merge revision(s) without --ticket again.
-
-Fri Oct 12 14:10:41 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/mkmf.rb (dir_config, init_mkmf): use configured libdir value as
- default library path. [ruby-core:43726] [Bug #6207]
-
-Fri Oct 12 05:25:00 2012 Zachary Scott <zzak@ruby-lang.org>
-
- * lib/timeout.rb (timeout):
- Remove paragraph on wrong implementation detail.
- [ruby-core:47739] [Bug #7088]
-
-Thu Oct 11 23:09:46 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * string.c (rb_str_sub{seq,pos,str}, rb_str_each_{line,codepoint}):
- prevent String copies from GC. [ruby-core:47881] [Bug #7135]
-
-Thu Oct 11 07:40:50 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * iseq.c (insn_operand_intern): cast op to rb_call_info_t* before
- compare with iseq->callinfo_entries whose type is rb_call_info_t*.
-
-Thu Oct 11 03:37:08 2012 Koichi Sasada <ko1@atdot.net>
-
- * bootstraptest/test_block.rb: add tests for block with super.
-
-Thu Oct 11 02:54:07 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_dump.c: fix debug prints to catch up recent changes
- such as VM data structures.
-
-Thu Oct 11 02:50:34 2012 Koichi Sasada <ko1@atdot.net>
-
- * iseq.c (insn_operand_intern): add support disasm TS_CALLINFO
- operands.
-
-Wed Oct 10 15:12:48 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/ruby/test_process.rb (TestProcess#test_execopts_gid): skip on
- windows because the platform does not have Process.group method.
- patched by Jon Forums in [ruby-core:47878] [Bug #7133].
-
-Tue Oct 9 23:18:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * test/ruby/envutil.rb (assert_file, assert_file_not): more
- descriptive assertions for File predicates.
-
-Tue Oct 9 18:01:37 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * array.c (rb_ary_sample): use rb_random_ulong_limited, since
- precision of long may be larger than double.
-
- * random.c (rb_random_ulong_limited): new function to return a random
- value from 0 upto limit as unsigned long, similarly to
- rb_genrand_ulong_limited but with arbitrary RNG object.
-
-Tue Oct 9 17:13:27 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * process.c (rb_execarg_addopt, rb_execarg_run_options): add :uid and
- :gid options. [ruby-core:47414] [Feature #6975]
-
-Tue Oct 9 14:36:11 2012 Koichi Sasada <ko1@atdot.net>
-
- * iseq.c (iseq_free): fix memory leak.
- rb_iseq_t::callinfo_entries should be freed.
-
-Tue Oct 9 14:28:18 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_core.h (rb_call_info_t): add new type `rb_call_info_t'.
- This data structure contains information including inline method
- cache. After that, `struct iseq_inline_cache_entry' does not
- need to contain inline cache for method invocation.
- Other information will be added to this data structure.
-
- * vm_core.h (rb_iseq_t): add `callinfo_entries' and `callinfo_size'
- members to `rb_iseq_t'.
-
- * insns.def, compile.c: Use CALL_INFO instead of IC.
-
- * tool/instruction.rb: support CALL_INFO as operand type.
-
- * vm_insnhelper.c, vm_insnhelper.h: ditto.
-
-Sun Oct 7 23:54:33 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
-
- * ext/zlib/zlib.c (zstream_run_func): don't call inflate() when
- z->stream.avail_in == 0. it return Z_BUF_ERROR.
- but deflate() could be called with z->stream->avail_in == 0 because
- it has hidden buffer in z->stream->state (opaque structure).
- fix for gem install error. [ruby-dev:46149] [Bug #7040]
-
-Mon Oct 8 23:55:41 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * eval.c (rb_mod_refinements): new method Module#refinements.
-
- * test/ruby/test_refinement.rb: add new tests for the above changes.
-
-Mon Oct 8 23:02:19 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * eval.c, gc.c, iseq.c, node.h, vm_insnhelper.c, vm_insnhelper.h,
- vm_method.c: rename omod and overlaid modules to refinements.
-
- * eval.c (hidden_identity_hash_new): renamed from identity_hash_new.
-
-Sun Oct 7 04:50:00 2012 Zachary Scott <zzak@ruby-lang.org>
-
- * lib/abbrev.rb: Documentation examples for Abbrev.
- [ruby-core:47442] [Bug #6985]
-
-Sun Oct 7 04:50:00 2012 Zachary Scott <zzak@ruby-lang.org>
-
- * thread.c (rb_thread_aref):
- Grammar in Thread documentation.
- Patch by Steve Klabnik [ruby-core:47799] [Bug #7099]
-
-Sun Oct 7 04:37:00 2012 Zachary Scott <zzak@ruby-lang.org>
-
- * string.c (rb_str_match):
- Clarify behavior for captured strings and local variable assignment
- Patch by Marcus Stollsteimer [ruby-core:47668] [Bug #7062]
-
-Sat Oct 6 18:31:36 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * vm_opts.h (OPT_GLOBAL_METHOD_CACHE): new build option to
- enable/disable global method caching. [ruby-dev:46203] [Bug #7111]
-
- * vm_method.c (rb_method_entry_get_with_omod): don't use global
- method cache if OPT_GLOBAL_METHOD_CACHE is 0.
-
-Sat Oct 6 16:32:04 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * vm_method.c (search_method): check omod only once for performance.
-
-Sat Oct 6 09:42:04 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * enc/encdb.c, enc/utf_16_32.h (ENC_DUMMY_UNICODE): endian-less wide
- UTF encodings are dummy but Unicode.
-
- * encoding.c (rb_encdb_set_unicode): set Unicode flag.
-
- * template/encdb.h.tmpl: allow ENC_DUMMY variants.
-
- * encoding.c (rb_enc_unicode_p): oniguruma provides Unicode flag.
-
-Fri Oct 5 17:18:42 JST 2012 TAKANO Mitsuhiro <tak@no32.tk>
-
- * template/Doxyfile.tmpl: remove SHOW_DIRECTORIES and
- HTML_ALIGN_MEMBERS lines. They have been obsolete in
- Doxygen version 1.8.2.
-
-Fri Oct 5 15:26:18 2012 Koichi Sasada <ko1@atdot.net>
-
- * ext/objspace/objspace.c: add ObjectSpace#reachable_objects_from.
- This method returns an array of objects referenced by given object.
- If given object is special objects such as true/false/nil/Fixnum etc
- then it returns nil. See rdoc for details.
- [ruby-core:39772]
-
- * test/objspace/test_objspace.rb: add a test for this method.
-
- * gc.c: add rb_objspace_reachable_objects_from().
- To make this function, add several member `mark_func_data'
- to rb_objspace_t. If mark_func_data is not null, then
- gc_mark() calls mark_func_data::mark_func.
-
- * gc.h: export rb_objspace_reachable_objects_from().
-
-Thu Oct 4 23:40:04 2012 Narihiro Nakamura <authornari@gmail.com>
-
- * gc.c (init_heap): call init_mark_stack before to allocate
- altstack. This change avoid the stack overflow at the signal
- handler on 32bit, but I don't understand reason... [Feature #7095]
-
-Thu Oct 4 22:39:27 2012 Koichi Sasada <ko1@atdot.net>
-
- * insns.def (getlocal, setlocal): remove old getlocal/setlocal
- instructions and rename getdaynmic/setdynamic instructions
- to getlocal/setlocal.
-
- * compile.c: ditto.
-
- * iseq.c: remove TS_DINDEX.
-
- * vm_exec.h (dindex_t): remove type definition of `dindex_t'.
-
- * tool/instruction.rb: ditto.
-
-Thu Oct 4 21:44:17 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm.c (vm_analysis_insn|operand|register): use st_insert
- instead of using rb_hash_aset() because rb_hash_aset()
- check $SAFE.
-
-Thu Oct 4 21:15:26 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm.c (VM_COLLECT_USAGE_DETAILS): make new VM usage analysis
- hooks (old macro name is COLLECT_USAGE_ANALYSIS).
- This feature is only for VM developers. (I'm not sure I can use
- `VM developers' (the plural form) in this sentence).
- If VM_COLLECT_USAGE_DETAILS is not 0, VM enables the following
- usage collection features:
- (1) instruction: collect instruction usages.
- (2) operand: collect operand usages.
- (3) register: collect register usages.
- The results are stored in
- RubyVM::USAGE_ANALYSIS_INSN for (1, 2),
- RubyVM::USAGE_ANALYSIS_INSN_BIGRAM for (1) and
- RubyVM::USAGE_ANALYSIS_REGS for (3).
- You can stop collecting usages with
- RubyVM::USAGE_ANALYSIS_INSN_STOP(),
- RubyVM::USAGE_ANALYSIS_OPERAND_STOP(),
- RubyVM::USAGE_ANALYSIS_REGISTER_STOP()
- for (1), (2), (3) respectively.
- You can also change the hook functions by setting
- C level global variables
- `ruby_vm_collect_usage_func_(insn|operand|register)'
- for (1), (2), (3) respectively.
- See codes for more details.
-
- * tool/instruction.rb: fix macro names.
-
- * iseq.c (insn_operand_intern): make it export (used in vm.c).
- fix to skip several processes if not needed (pointer is 0).
-
- * vm_dump.c: move codes for collection features to vm.c.
-
- * vm_exec.h: rename macro and function names.
-
- * vm_insnhelper.h: ditto.
-
-Thu Oct 4 18:59:14 2012 Koichi Sasada <ko1@atdot.net>
-
- * test/ruby/test_settracefunc.rb (test_tracepoint):
- remove unused test case.
- (this test case is redefined by newer tests)
-
-Thu Oct 4 17:24:51 2012 Narihiro Nakamura <authornari@gmail.com>
-
- * gc.c (rb_objspace_call_finalizer): call gc_mark_stacked_objects
- at suitable point.
-
-Thu Oct 4 16:31:29 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * gc.c (rb_objspace_call_finalizer): mark self-referencing finalizers
- before run finalizers, to fix SEGV from btest on 32bit.
-
- * gc.c (gc_mark_stacked_objects): extract from gc_marks().
-
-Thu Oct 4 11:43:28 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * thread_pthread.c (ruby_init_stack): round stack limit to page size
- boundary to calculate stack size more precisely. [ruby-dev:46174]
- [Bug #7084]
-
-Wed Oct 3 19:51:57 2012 Narihiro Nakamura <authornari@gmail.com>
-
- * gc.c: Use the non-recursive marking instead of recursion. The
- recursion marking of CRuby needs checking stack overflow and the
- fail-safe system, but these systems not good at partial points,
- for example, marking deep tree structures. [ruby-dev:46184]
- [Feature #7095]
-
- * configure.in (GC_MARK_STACKFRAME_WORD): removed. It's used by
- checking stack overflow of marking.
-
- * win32/Makefile.sub (GC_MARK_STACKFRAME_WORD): ditto.
-
-Wed Oct 3 15:33:02 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * thread_pthread.c (ruby_init_stack): use getrlimit() for the main
- thread on Mac OS X, since pthread_get_stack{addr,size}_np()
- return the default value always, but not the ulimit value.
- [ruby-dev:46174] [Bug #7084]
-
-Wed Oct 3 11:43:15 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * io.c (rb_io_reopen): improvement to accept optional arguments.
- a patch by Glass_saga (Masaki Matsushita) in [ruby-core:47806].
- [Feature #7103]
-
-Wed Oct 3 04:36:11 2012 Eric Hodel <drbrain@segment7.net>
-
- * ext/openssl/ossl_x509store.c (ossl_x509store_add_file): Added
- documentation
- * ext/openssl/ossl_x509store.c (ossl_x509store_set_default_paths):
- ditto
- * ext/openssl/ossl_x509store.c (ossl_x509store_add_cert): ditto
-
-Wed Oct 3 02:23:37 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * error.c (exc_to_s, name_err_to_s, name_err_mesg_to_str): do not
- taint messages.
-
-Tue Oct 2 16:47:06 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * eval.c (identity_hash_new): hide internal hashes for refinements.
-
- * eval.c (rb_mod_refine): no default value.
-
-Mon Oct 1 22:54:02 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * eval.c (identity_hash_new): new function to create a new identity
- hash.
-
- * eval.c (rb_overlay_module, rb_mod_using, rb_mod_refine): use
- identity_hash_new().
-
-Mon Oct 1 02:34:53 2012 Akinori MUSHA <knu@iDaemons.org>
-
- * configure.in (--with-opt-dir): Make this also work on DLDFLAGS
- so LIBRUBY_SO links fine with libexecinfo installed in a
- non-system directory.
-
-Sun Sep 30 23:32:00 2012 Kenta Murata <mrkn@mrkn.jp>
-
- * vm_dump.c (rb_vm_bugreport): add /Library/Logs/DiagnosticReports
- in the list of locations of crash reports.
-
-Sun Sep 30 21:18:03 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * string.c (rb_str_concat): use memcpy to copy a string which contains
- NUL characters. [ruby-core:47751] [Bug #7090]
-
-Sat Sep 29 19:41:53 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * test/ruby/envutil.rb (EnvUtil#invoke_ruby): kill child process
- before Timeout::Error is raised. rmdir of mktmpdir fails with
- EACCES if child process is alive on Windows.
-
- * test/thread/test_queue.rb (TestQueue): increase timeout.
- This test takes long time on Windows XP.
-
-Sat Sep 29 19:41:33 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * test/net/http/test_http.rb (TestNetHTTP#test_proxy_address):
- clear environment variables. If http_proxy environment variable was
- set, the test failed.
-
- * test/net/http/test_http.rb (TestNetHTTP#test_proxy_port): ditto.
-
-Sat Sep 29 19:41:11 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * test/drb/drbtest.rb (DRbCore#teardown):
- Use Process.kill :KILL on Windows because Process.kill :INT silently
- fails on Windows 7 and raises EINVAL on Windows XP for spawned
- process with new_pgroup: false.
-
- * test/drb/drbtest.rb (DRbAry#teardown): ditto.
-
-Sat Sep 29 19:40:32 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * test/ruby/test_unicode_escape.rb (TestUnicodeEscape#test_basic):
- set script encoding to work with LANG=C. It would work on both
- Windows and Unix. Refix of r37051.
-
-Sat Sep 29 11:21:06 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * vm_insnhelper.c (rb_vm_using_modules): use using_modules before
- klass to fix method lookup order, and use klass even if klass is
- not a module to make refinements in class_eval invoked on classes
- work.
-
- * eval.c (rb_using_module): accept a class as the second argument.
-
- * eval.c (rb_mod_using, f_using): raise a TypeError if the argument
- is not a module.
-
- * test/ruby/test_refinement.rb: add new tests for the above changes.
-
-Sat Sep 29 02:18:57 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * test/ruby/test_unicode_escape.rb (TestUnicodeEscape#test_basic):
- Use ruby only on Windows since the test fails on Unix with LANG=C.
- [ruby-core:47709] [Bug #7076]
-
-Fri Sep 28 22:19:31 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * test/ruby/test_unicode_escape.rb (TestUnicodeEscape#test_basic):
- echo command doesn't work properly against non-ascii character on
- Windows with chcp 437. Instead we use ruby.
- [ruby-core:47709] [Bug #7076]
-
-Fri Sep 28 17:54:31 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_insnhelper.c (vm_setup_method): refactoring.
- Remove src_argc and use iseq->arg_size directly.
-
-Fri Sep 28 17:26:27 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/rubygems/installer.rb (check_that_user_bin_dir_is_in_path):
- test_generate_bin_bindir_with_user_install_warning(TestGemInstaller)
- fails on Windows with msys bash. It makes comparing paths
- case-insensitive.
- pick from upstream to fix a failure of test-all [ruby-core:47711]
- https://github.com/rubygems/rubygems/commit/c474edb2f3704206f04da1c8c6cf9fb079d84abe
-
-Fri Sep 28 15:44:45 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * vm_method.c (search_method): copy refinement iclasses to search
- superclasses correctly.
-
- * test/ruby/test_refinement.rb: related test.
-
-Fri Sep 28 15:15:41 2012 Koichi Sasada <ko1@atdot.net>
-
- * insns.def (opt_checkenv): remove unused instruction `opt_checkenv'.
-
- * compile.c (iseq_compile_each): ditto.
-
- * node.h: remove unused node `NODE_OPTBLOCK'.
-
- * ext/objspace/objspace.c, gc.c (gc_mark_children): ditto.
-
-Fri Sep 28 13:14:34 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_core.h: now VM_DEBUG_BP_CHECK should be 1.
-
-Fri Sep 28 12:51:54 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_core.h: remove rb_control_frame_t::bp (bp: base pointer).
- `bp' can be calculate by `sp' (stack pointer) of previous frame.
- Now, `bp_check' field is remained for debug. You can eliminate
- this field by setting VM_DEBUG_BP_CHECK as 0.
-
- * vm_insnhelper.c (vm_base_ptr): add `vm_base_ptr(cfp).
- This function calculates base pointer from cfp.
-
- * vm_insnhelper.c (vm_setup_method): push `recv' value on top of
- value stack (before method parameters).
- This change is for keeping consistency with normal method dispatch.
-
- * insns.def: fix to use vm_base_ptr().
-
- * vm.c (vm_exec): ditto.
-
- * vm_dump.c: remove `bp' related dumps.
-
- * cont.c (fiber_init): fix to check VM_DEBUG_BP_CHECK.
-
-Fri Sep 28 10:40:51 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * io.c (rb_io_reopen): accept File::Constants as well as mode string.
- based on the patch by Glass_saga (Masaki Matsushita) in
- [ruby-core:47694]. [Feature #7067]
-
-Thu Sep 27 18:36:51 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * eval.c (rb_overlay_module, rb_mod_refine): accept a module as the
- argument of Module#refine.
-
- * vm_method.c (search_method): if klass is an iclass, lookup the
- original module of the iclass in omod in order to allow
- refinements of modules.
-
- * test/ruby/test_refinement.rb: add tests for the above changes.
-
-Thu Sep 27 18:12:20 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/syslog/lib/syslog/logger.rb: add a formatter to the
- Syslog::Logger object. [Bug #7065]
- * test/syslog/test_syslog_logger.rb: ditto.
-
-Wed Sep 26 16:39:57 2012 Koichi Sasada <ko1@atdot.net>
-
- * insns.def: add new instruction `opt_empty_p' for optimize `empty?'
- method. Apply a patch proposed at [ruby-dev:46120]
- [ruby-trunk - Feature #6972] by Glass_saga (Masaki Matsushita).
-
- * compile.c (iseq_specialized_instruction), vm.c, vm_insnhelper.h:
- ditto.
-
- * id.c, template/id.h.tmpl: ditto.
-
- * test/ruby/test_optimization.rb: test for this changes.
-
-Tue Sep 25 09:59:26 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * insns.def (invokesuper): klass in cfp is not valid in at_exit and
- END blocks. [ruby-core:47680] [Bug #7064]
-
-Tue Sep 25 08:11:11 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * iseq.c (rb_iseq_defined_string): the index of defined_strings must
- be the value of type - 1.
-
-Mon Sep 24 17:36:51 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * compile.c (defined_expr), insns.def (defined): share single frozen
- strings. [EXPERIMENTAL] [ruby-core:47558][Feature #7035]
-
- * iseq.c (rb_iseq_defined_string): make expression strings.
-
-Mon Sep 24 11:22:36 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * tool/merger.rb: add --ticket option to add ticket number.
-
-Sun Sep 23 21:51:59 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/mkmf.rb (String#unspace): unescape with backslashes. normal
- makes need to escape spaces with backslashes. nmake is not the
- case. [Bug #7036]
-
- * lib/mkmf.rb (create_makefile): use timestamp file dependencies for
- directories.
-
- * lib/mkmf.rb: unexpand macros.
-
- * lib/mkmf.rb (LIBPATHFLAG): no needs to escape library path here.
-
- * lib/mkmf.rb (MakeMakefile#configuration): make prefix paths
- internal to deal with in Makefile.
-
- * lib/mkmf.rb (MakeMakefile#mkintpath): not a global function now.
-
-Sun Sep 23 02:33:37 2012 Benoit Daloze <eregontp@gmail.com>
-
- * complex.c: Fix examples of r36993.
- Keep the simple definition, mathematics define the result.
- Based on patch by Robin Dupret. Fixes #188 on github.
-
-Sat Sep 22 07:15:00 2012 Zachary Scott <zzak@ruby-lang.org>
-
- * ext/ripper/lib/ripper.rb:
- Match sample output to Ripper.sexp from current trunk version.
- [Bug #6929]
-
-Thu Sep 20 23:05:11 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread_pthread.c (native_cond_initialize): destroy condattr
- after using it. Patch by Stanislav Sedov. Thank you.
- [Bug #7041] [ruby-core:47619]
-
-Thu Sep 20 22:53:02 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread_pthread.c (native_cond_initialize): clean up #ifdef condition.
-
-Thu Sep 20 16:42:44 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/drb/ssl.rb (DRb::DRbSSLSocket::SSLConfig::DEFAULT): add
- SSLTmpDhCallback for configuration option.
-
- * lib/drb/ssl.rb (setup_ssl_context): copy the value of tmp_dh_callback.
-
- * test/drb/ut_array_drbssl.rb: set tmp_dh_callback to suppress warning.
-
- * test/drb/ut_drb_drbssl.rb: ditto.
-
-Thu Sep 20 10:56:08 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/drb/ut_drb.rb: revert a part of r36987, and get rid of a warning
- with another method. if the substitution is removed, the ExtSrv
- object will be GC'ed and some tests will be blocked.
-
-Thu Sep 20 07:20:00 2012 Zachary Scott <zzak@ruby-lang.org>
-
- * complex.c: Examples for Complex Documentation.
- Patch by Robin Dupret.
- Fixes #184 on github.
-
-Thu Sep 20 07:15:00 2012 Zachary Scott <zzak@ruby-lang.org>
-
- * ext/ripper/lib/ripper.rb: Documentation for Ripper.
- +:void_stmt+ is meaningless
- [Bug #6929] [ruby-core:47507]
-
-Thu Sep 20 07:05:00 2012 Zachary Scott <zzak@ruby-lang.org>
-
- * lib/csv.rb (Object#CSV, Array#to_csv, String#parse_csv):
- Examples and documentation for CSV.
- [Bug #6880] [ruby-core:47218]
-
-Thu Sep 20 00:42:20 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * array.c (take_items), enum.c (enum_zip): raise TypeError at
- non-enumerable objects, not NoMethodError. [ruby-dev:46145]
- [Bug #7038]
-
- * vm_eval.c (rb_check_block_call): check_funcall variant with block
- function.
-
-Tue Sep 18 17:51:29 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * ext/openssl/ossl_ssl.c (ossl_sslctx_attrs): add npn_select_db to
- suppress warning: instance variable @npn_select_cb not initialized
-
-Sun Sep 16 17:47:00 2012 Eric Hodel <drbrain@segment7.net>
-
- * tool/change_maker.rb: Update svn detection for subversion 1.7's
- single .svn directory.
-
-Sun Sep 16 11:39:12 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * io.c (io_set_read_length): if the read length equals to the buffer
- string size then nothing to do. or ensure the string modifiable
- before setting the length only when the former is shorter. based on
- the patch in [ruby-core:47541] by Hiroshi Shirosaki.
- [ruby-core:46586] [Bug #6764]
-
-Sun Sep 16 08:57:52 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in (strict_warnflags): separate strict flags from
- warnflags only for core. [ruby-dev:46105]
-
-Sun Sep 16 08:16:05 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * .editorconfig: add. [ruby-core:47548] [Feature #7030]
-
-Sat Sep 15 01:56:40 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * ext/nkf/nkf-utf8/nkf.c: Merge upstream: 50a383c84.
- [ruby-dev:46128] [Bug #7005]
-
-Sat Sep 15 00:20:04 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * ext/nkf/nkf.c (rb_nkf_convert): suppress warning.
-
-Fri Sep 14 04:05:00 2012 Zachary Scott <zzak@ruby-lang.org>
-
- * array.c (rb_ary_diff, rb_ary_uniq):
- Enhance documentation for array uniqueness
- Based on a patch by Robin Dupret
- [Bug #6872] [ruby-core:47209]
-
-Fri Sep 14 03:30:00 2012 Zachary Scott <zzak@ruby-lang.org>
-
- * array.c (rb_ary_select):
- Update documentation for Array#select
- * enum.c (enum_find_all, enum_reject):
- Update documentation for Enumerable#find_all and Enumerable#reject
- Based on a patch by Jeff Saracco
- [Bug #6908] [ruby-core:47285] [Fixes #166 on github]
-
-Fri Sep 14 00:20:00 2012 Zachary Scott <zzak@ruby-lang.org>
-
- * signal.c (rb_f_kill):
- Update documentation for Process.kill to reflect kill(2)
- Patch by Richo Healey
-
-Thu Sep 13 21:40:49 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * lib/securerandom.rb (SecureRandom.random_bytes):
- Use 64bit value as pointer for Windows x64 to fix SystemCallError.
-
- * lib/securerandom.rb (SecureRandom.lastWin32ErrorMessage):
- Set proper encoding to avoid invalid byte sequence error.
- [ruby-core:47451] [Bug #6990]
-
-Thu Sep 13 11:20:00 2012 Zachary Scott <zzak@ruby-lang.org>
-
- * lib/optparse.rb: Remove unreachable email address from documentation
- [Bug #6996] [ruby-core:47459]
-
-Thu Sep 13 11:20:00 2012 Zachary Scott <zzak@ruby-lang.org>
-
- * lib/xmlrpc.rb: Documentation for XMLRPC
- * lib/xmlrpc/datetime.rb: ditto.
- * lib/xmlrpc/parser.rb: ditto.
- * lib/xmlrpc/client.rb: ditto.
- * lib/xmlrpc/utils.rb: ditto.
- * lib/xmlrpc/README.rdoc: ditto.
- * lib/xmlrpc/create.rb: ditto.
- * lib/xmlrpc/base64.rb: ditto.
- * lib/xmlrpc/config.rb: ditto.
- * lib/xmlrpc/httpserver.rb: ditto.
- * lib/xmlrpc/server.rb: ditto.
- * lib/xmlrpc/marshal.rb: ditto.
- * lib/xmlrpc/README.txt: ditto.
- [Bug #6909] [ruby-core:47286]
-
-Thu Sep 13 10:22:11 2012 Takashi Toyoshima <toyoshim@gmail.com>
-
- * configure.in: Don't use PIE on Haiku because loader support is not
- enough.
-
-Thu Sep 13 08:20:00 2012 Zachary Scott <zzak@ruby-lang.org>
-
- * lib/shellwords.rb: Documentation for Shellwords.
-
-Thu Sep 13 08:00:00 2012 Zachary Scott <zzak@ruby-lang.org>
-
- * ext/ripper/lib/ripper.rb: Documentation for Ripper.
- * ext/ripper/lib/ripper/lexer.rb: ditto.
- * ext/ripper/lib/ripper/sexp.rb: ditto.
- * ext/ripper/lib/ripper/filter.rb: ditto.
- * ext/ripper/lib/ripper/core.rb: ditto.
- [Bug #6929] [ruby-core:47309]
-
-Wed Sep 12 22:59:07 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm_insnhelper.c (vm_method_missing, vm_call_method): reuse arguments
- on the VM stack and get rid of ALLOCA.
-
-Wed Sep 12 22:45::00 2012 Zachary Scott <zzak@ruby-lang.org>
-
- * ext/pathname/lib/pathname.rb: Documentation for Pathname.
- * ext/pathname/pathname.c: ditto.
- [Bug #6947] [ruby-core:47354]
-
-Mon Sep 10 10:19:34 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * enc/depend: fixed wrong change in a part of r34802.
-
-Sun Sep 9 22:02:50 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * ext/socket/basicsocket.c (rsock_bsock_send):
- avoid unnecessary select() calls before doing I/O
- Patch by Eric Wong. [Feature #4538] [ruby-core:35586]
- * ext/socket/init.c (rsock_s_recvfrom): ditto.
- * ext/socket/init.c (rsock_s_accept): ditto.
- * ext/socket/udpsocket.c (udp_send): ditto.
- * io.c (io_fflush): ditto.
- * io.c (io_binwrite): ditto.
- * io.c (rb_io_syswrite): ditto.
-
-Mon Sep 10 01:38:51 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * io.c (nogvl_close, maygvl_close, nogvl_fclose, maygvl_fclose):
- suppress integer <-> pointer cast warnings.
- [Feature #4570] [ruby-core:35711]
-
-Mon Sep 10 01:36:00 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * io.c (rb_io_close): notify fd close before releasing gvl.
- * io.c (fptr_finalize): modify fptr->mode before releasing gvl.
- remove unnecessary rb_thread_fd_close().
- [Feature #4570] [ruby-core:35711]
-
-Mon Sep 10 00:16:34 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * process.c: exec() requires to be single threaded also on Haiku.
- by Takashi Toyoshima <toyoshim@gmail.com>
- https://github.com/ruby/ruby/pull/178
-
-Sun Sep 9 21:21:15 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * lib/thread.rb (Queue#pop): Fixed double registration issue when
- mutex.sleep is interrupted. [Bug #5258] [ruby-dev:44448]
- * lib/thread.rb (SizedQueue#push): ditto.
-
- * test/thread/test_queue.rb (test_sized_queue_and_wakeup,
- test_queue_pop_interrupt, test_sized_queue_pop_interrupt,
- test_sized_queue_push_interrupt): new tests.
-
-Sun Sep 9 20:20:31 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * lib/sync.rb (Sync_m#sync_lock): Fixed wakeup/raise unsafe code.
- Patched by Masaki Matsushita. [Bug #5355] [ruby-dev:44521]
-
- * test/thread/test_sync.rb (test_sync_lock_and_wakeup,
- test_sync_upgrade_and_wakeup, test_sync_lock_and_raise):
- new test.
-
-Sun Sep 9 18:39:46 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * include/ruby/intern.h (rb_thread_blocking_region): Added
- a comment of recommended alternative way.
-
-Sun Sep 9 18:37:05 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * lib/sync.rb (Sync_m): Removed RCS_ID.
-
-Sun Sep 9 18:21:03 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * test/ruby/test_io.rb (test_advise_pipe): new test to check
- io.advise() against anonymous io object don't make crash.
- made by Eric Wong. [Bug #6081] [ruby-core:42880]
-
-Sun Sep 9 16:47:12 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * io.c (nogvl_close, maygvl_close, nogvl_fclose, maygvl_fclose):
- new functions.
- * io.c (fptr_finalize): release GVL if possible.
- Patched by Eric Wong. [Feature #4570] [ruby-core:35711]
-
-Sun Sep 9 16:08:48 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * io.c (io_bufread): removed unnecessary rb_thread_wait_fd().
- Patch by Eric Wong. [Bug #6629] [ruby-core:45789]
- * io.c (rb_io_sysread): ditto.
- * io.c (copy_stream_fallback_body): ditto.
-
-Sun Sep 9 15:21:52 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread.c (rb_mutex_lock): stop multiple threads use
- pthread_cond_timedwait() concurrently. [Bug #6278] [ruby-core:44275]
-
-Sat Sep 8 18:52:22 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * internal.h (struct rb_classext_struct): move allocator function into
- rb_classext_t from ordinary method table. [ruby-dev:46121]
- [Feature #6993]
-
- * object.c (rb_obj_alloc): call allocator function directly.
-
- * vm_method.c (rb_define_alloc_func, rb_undef_alloc_func)
- (rb_get_alloc_func): use allocator function in rb_classext_t.
-
-Fri Sep 7 01:21:51 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/extmk.rb (extmake), lib/mkmf.rb (have_framework): fix splitting
- options with an argument, not using NUL as special character.
- [ruby-core:47447] [Bug #6987]
-
-Thu Sep 6 14:49:49 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * .gdbinit (rp): FLONUM support.
-
- * include/ruby/ruby.h (ruby_special_consts): define FLONUM constants
- always, so that they are available from gdb.
-
- * include/ruby/ruby.h (RB_FLOAT_TYPE_P): merge FLONUM and non-FLONUM
- versions. inline TYPE() comparison and FLONUM_P() should be
- optimized away on non-FLONUM.
-
-Thu Sep 6 08:20:55 2012 Ryan Davis <ryand-ruby@zenspider.com>
-
- * lib/minitest/*: Imported minitest 3.4.0 (r7762)
- * test/minitest/*: ditto
-
-Wed Sep 5 19:20:53 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * parse.y (rb_warn4S): renamed from rb_warn4(), because the case in
- r36911 takes a string.
-
- * parse.y (rb_warn4S): use ripper_warnS() for ripper.
-
- * parse.y (ripper_warnS): now it is used.
-
-Wed Sep 5 15:51:52 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
-
- * .travis.yml (notifications): [experimental] update notification
- template.
-
-Wed Sep 5 15:21:12 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * parse.y (rb_warn4): added as a rb_warn variant to warn with explicit
- source file name and line in parse.y.
-
- * parse.y (warn_unused_var): use rb_warn4 to suppress warning on ripper.
-
-Wed Sep 5 13:30:04 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * dir.c (glob_make_pattern): names under recursive need to be single
- basenames to match for each name. [ruby-core:47418] [Bug #6977]
-
-Tue Sep 4 20:55:17 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * test/ruby/envutil.rb (EnvUtil#invoke_ruby): show Timeout::Error
- instead of IOError if the timeout has expired.
-
- * test/test_pstore.rb
- (PStoreTest#test_pstore_files_are_accessed_as_binary_files):
- increase timeout because this test is slow on Windows.
- [ruby-core:47402] [Bug #6965]
-
-Tue Sep 4 11:28:57 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
-
- * vm_eval.c (ruby_eval_string_from_file_protect): initializer
- element is not computable at load time.
-
-Tue Sep 4 07:48:35 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * test/openssl/test_asn1_rb:
- test/openssl/test_ssl_session.rb:
- test/openssl/test_x509name.rb:
- test/openssl/test_buffering.rb:
- test/openssl/test_x509cert.rb:
- test/openssl/test_ssl.rb: Refactor code that leads to warnings on
- Ruby CI.
-
-Tue Sep 4 07:02:56 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * test/openssl/utils.rb: Use DSS1 as DSA signature digest for all
- OpenSSL versions < 1.0.0.
- [Feature #6946] [ruby-core:47405]
-
-Mon Sep 3 21:22:37 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * include/ruby/ruby.h (rb_float_value): suppress warnings.
- [ruby-core:47406][Bug #6971]
-
-Mon Sep 3 14:49:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/matrix.rb (Vector#magnitude): accumulate squares of absolute
- values to fix for complex vector. [ruby-dev:46100] [Bug #6966]
-
-Mon Sep 3 10:09:36 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * ext/openssl/extconf.rb: Detect OpenSSL_FIPS macro
- ext/openssl/ossl.c: Expose OpenSSL::OPENSSL_FIPS constant to
- indicate whether OpenSSL runs in FIPS mode.
- test/openssl/test_pkey_dh.rb: Generate 256 bit keys for
- non-FIPS installations to improve test performance (e.g. for
- rubyci).
- test/openssl/utils.rb: Replace DSS1 as certificate signature
- digest with SHA1 for FIPS installations when using DSA by
- introducing TestUtils::DSA_SIGNATURE_DIGEST.
- test/openssl/test_x509cert.rb:
- test/openssl/test_x509crl.rb:
- test/openssl/test_x509req.rb: Use DSA_SIGNATURE_DIGEST
- NEWS: Introduce OpenSSL::OPENSSL_FIPS
-
- These changes allow running the OpenSSL tests in FIPS mode
- while keeping a high performance for non-FIPS installations.
- Introduction of OpenSSL::OPENSSL_FIPS allows for applications
- to react to special requirements when using OpenSSL in FIPS mode.
- [Feature #6946] [ruby-core:47345]
-
-Sun Sep 2 21:46:28 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * test/openssl/utils.rb: Use a cached DH key instead of generating a
- new one each time.
-
-Sun Sep 2 05:41:28 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/webrick/ssl.rb (WEBrick::Config::SSL): add new key
- SSLTmpDhCallback to set SSLContext#tmp_dh_callback.
-
- * lib/webrick/ssl.rb (WEBrick::GenericServer#setup_ssl_context):
- follow above.
-
-Sat Sep 1 18:50:50 2012 Akinori MUSHA <knu@iDaemons.org>
-
- * lib/set.rb (#initialize_copy, #eql): Use instance_variable_get
- instead of instance_eval.
-
-Fri Aug 31 21:47:56 2012 Kouhei Sutou <kou@cozmixng.org>
-
- * lib/test/unit/test-unit.gemspec: Make test/unit default gem.
- [Feature #6875] [ruby-dev:46051]
-
-Fri Aug 31 18:35:02 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * ext/openssl/extconf.rb: Check existence of OPENSSL_NPN_NEGOTIATED.
- ext/ossl_ssl.c: Support Next Protocol Negotiation. Protocols to be
- advertised by the server can be set in the SSLContext by using
- SSLContext#npn_protocols=, protocol selection on the client is
- supported by providing a selection callback with
- SSLContext#npn_select_cb. The protocol that was finally negotiated
- is available through SSL#npn_protocol.
- test/openssl/test_ssl.rb: Add tests for Next Protocol Negotiation.
- NEWS: add news about NPN support.
- [Feature #6503] [ruby-core:45272]
-
-Fri Aug 31 17:38:43 2012 Akinori MUSHA <knu@iDaemons.org>
-
- * lib/set.rb (Set#{each,reject!,select!}, SortedSet#each): Pass
- the original block through instead of creating one that only
- yields the passed argument.
-
-Fri Aug 31 16:23:20 2012 Akinori MUSHA <knu@iDaemons.org>
-
- * lib/ipaddr.rb: Introduce several new error classes where only
- ArgumentError and StandardError were used. IPAddr::Error is
- their common ancestor class that inherits from ArgumentError for
- backward compatibility. Submitted by Jon Daniel. Fixes #173 on
- GitHub.
-
-Fri Aug 31 14:51:27 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/bigdecimal/test_bigdecimal.rb (TestBigDecimal#test_to_f): added
- for previous commit.
-
-Fri Aug 31 14:32:05 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * ext/bigdecimal/bigdecimal.c (BigDecimal_to_f): use self's sign to
- determine 0.0 and Inf's sign instead of internal double value's.
- Reported by phasis68 (Heesob Park) at [ruby-core:47381] [Bug #6955]
-
-Fri Aug 31 14:31:17 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * template/id.h.tmpl, tool/id2token.rb: make id.h independent from
- parse.h, and make parse.c dependent on it instead.
-
-Fri Aug 31 14:27:39 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/mkmf.rb (create_makefile): fix race conditions at install-ext.
- target files need to depend on destination directory timestamp
- files, not phony targets.
-
-Fri Aug 31 14:03:45 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm_trace.c (clean_hooks): do not access freed memory.
-
- * vm_trace.c (rb_threadptr_exec_event_hooks): fix uninitialized state
- when no events is executed.
-
-Thu Aug 30 18:21:51 2012 Tanaka Akira <akr@fsij.org>
-
- * io.c (rb_io_close): call rb_last_status_clear.
-
-Thu Aug 30 16:17:52 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/bigdecimal/bigdecimal.c (BigDecimal_to_f): check underflow since
- strtod() sets errno to ERANGE at underflow too. [ruby-core:47342]
- [Bug #6944]
-
-Thu Aug 30 12:44:43 2012 Akinori MUSHA <knu@iDaemons.org>
-
- * lib/set.rb (Set#{<,>,<=,>=}): Define comparison operators as
- shorthand for the {proper_}{subset?,superset?} methods (finally).
- Given a push by Alexander E. Fischer.
-
-Thu Aug 30 09:21:01 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/uri/ftp.rb (URI::FTP#initialize): raise InvalidURIError if "//"
- is not present [ruby-core:47344] [Bug #6945]
-
-Thu Aug 30 07:45:12 2012 Luis Lavena <luislavena@gmail.com>
-
- * test/ruby/test_file_exhaustive.rb: fix test introduced in r36811 for
- posix environments where HOME is not defined. [ruby-core:47322]
-
-Wed Aug 29 23:42:59 2012 Tanaka Akira <akr@fsij.org>
-
- * internal.h (rb_last_status_clear): declared.
-
- * process.c (rb_last_status_clear): exported.
- (rb_f_system): call rb_last_status_clear.
-
- * io.c (rb_f_backquote): call rb_last_status_clear.
-
-Wed Aug 29 22:01:15 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_f_system): check failures of waitpid.
- [ruby-talk:398687]
-
-Wed Aug 29 15:03:04 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in (LIBDIR_BASENAME): use configured libdir value to fix
- --enable-load-relative on systems where libdir is not default value,
- overridden in config.site files. [ruby-core:47267] [Bug #6903]
-
- * ruby.c (ruby_init_loadpath_safe): ditto.
-
-Wed Aug 29 14:34:41 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * addr2line.c: SIZE_MAX is defined in stdint.h, so r36755 breaks
- 32bit FreeBSD. [ruby-core:47360] [Bug #6948]
-
-Wed Aug 29 04:50:04 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * test/openssl/utils.rb
- test/openssl/test_pair.rb
- test/openssl/test_pkey_dh.rb: Use 1024 bit DH parameters to satisfy
- OpenSSL FIPS requirements. Patch by Vit Ondruch.
- [Bug #6938] [ruby-core:47326]
-
-Tue Aug 28 22:31:49 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
-
- * insns.def (checkmatch): suppress warnings. [ruby-core:47339]
- [Bug #6930]
-
-Tue Aug 28 20:03:54 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * configure.in: Fixing Haiku R1/alpha3 build with gcc-4.4.4.
- - omit ANSI standard flags to compile socket extension where
- anonymous union is required.
- - remove redundant -be flags.
- by Takashi Toyoshima <toyoshim@gmail.com>
- https://github.com/ruby/ruby/pull/168
-
-Tue Aug 28 11:32:37 2012 Yuki Yugui Sonoda <yugui@google.com>
-
- * nacl/GNUmakefile.in (.rbconfig.time): r36828 was incomplete.
- It did not run correctly on clean build.
-
-Tue Aug 28 09:25:20 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/Makefile.sub (Makefile): make to depend on common.mk, to
- stop and force to re-run make process when common.mk is changed.
-
-Mon Aug 27 20:19:49 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * test/etc/test_etc.rb (TestEtc#test_getgrgid): fix for non unique GID.
- No unixen systems guarantee that GID is unique. Etc.getgrgid would
- not return the first entry in the order of Etc.group for shared GID.
- [ruby-core:47312] [Bug #6935]
-
-Mon Aug 27 18:19:36 2012 Koichi Sasada <ko1@atdot.net>
-
- * include/ruby/ruby.h (rb_float_value): optimize it.
- This technique was pointed by shinichiro.hamaji
- <http://shinh.skr.jp/m/?date=20120825#p02>.
-
-Mon Aug 27 15:08:25 2012 Yuki Yugui Sonoda <yugui@google.com>
-
- * common.mk (vm_trace.o): Added a missing dependency.
-
-Sun Aug 26 09:29:32 2012 Yuki Sonoda (Yugui) <yugui@yugui.jp>
-
- * nacl/GNUmakefile.in (package): make package should install
- example.html for nacl build
-
- Patch by Takashi Toyoshima <toyoshim AT gmail.com>.
-
-Sun Aug 26 09:22:33 2012 Yuki Sonoda (Yugui) <yugui@yugui.jp>
-
- * nacl/GNUmakefile.in (CC, LD, NM, AR, AS, RANLIB, OBJDUMP, OBJCOPY)
- Rewrites these variables instead of PATH.
- NaCl port uses a toolchain which is specified by NACL_SDK_ROOT
- environment variable. Originally, NaCl build added the toolchain
- under the NACL_SDK_ROOT to the PATH. But updating PATH doesn't work
- on Mac.
- (RBCONFIG): Replaces configs with the variable updates above.
-
- * configure.in: Thus it is no longer necessary to check $PATH.
-
- Based on a patch by Takashi Toyoshima <toyoshim AT gmail.com>.
-
-Sun Aug 26 16:53:00 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * insns.def (checkmatch): suppress warnings. [ruby-core:47310]
- [Bug #6930]
-
- * vm_core.h (VM_FRAME_TYPE_FINISH_P): ditto.
-
-Fri Aug 24 15:42:28 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/mkmf.rb (create_makefile): use timestamp for destination
- directories to make them before making or copying files there.
- [ruby-dev:46067] [Bug #6904]
-
-Fri Aug 24 12:40:15 2012 Luis Lavena <luislavena@gmail.com>
-
- * configure.in (mingw): add shlwapi to the list of dependency
- libs for Windows.
- * win32/Makefile.sub (EXTSOLIBS): ditto.
-
- * internal.h: declare internal functions rb_w32_init_file,
- rb_file_expand_path_internal and rb_file_expand_path_fast.
-
- * file.c (Init_File): invoke Windows initialization rb_w32_init_file
-
- * win32/file.c (rb_file_load_path_internal): new function.
- Windows-specific implementation that replaces file_expand_path.
- [Bug #6836][ruby-core:46996]
-
- * win32/file.c (rb_w32_init_file): new function. Initialize codepage
- cache for faster conversion encodings lookup.
-
- * file.c (file_expand_path): rename to rb_file_expand_path_internal.
- Conditionally exclude from Windows.
-
- * file.c (rb_file_expand_path_fast): new function. delegates to
- rb_file_expand_path_internal without performing a hit to the
- filesystem.
-
- * file.c (file_expand_path_1): use rb_file_expand_path_internal without
- path expansion (used by require).
- * file.c (rb_find_file_ext_safe): ditto.
- * file.c (rb_find_file_safe): ditto.
-
- * load.c (rb_get_expanded_load_path): use rb_file_expand_path_fast.
- * load.c (rb_feature_provided): ditto.
-
- * file.c (rb_file_expand_path): use rb_file_expand_path_internal with
- path expansion.
- * file.c (rb_file_absolute_path): ditto.
-
- * test/ruby/test_file_exhaustive.rb: new tests to exercise
- rb_file_expand_path_internal implementation and compliance with
- existing behaviors.
-
-Fri Aug 24 07:35:24 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/net/http/backward.rb (class Net): Restored Net::HTTPSession to
- fix backwards-compatibility with ancient Net::HTTP. [Bug #6889]
-
-Thu Aug 23 20:58:55 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-
- * common.mk: support `make id.h` without `rm .id.h.time` after
- `rm id.h`.
-
-Thu Aug 23 20:48:45 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/ruby/test_fixnum.rb (TestFixnum#test_singleton_method): new test.
-
- * test/ruby/test_bignum.rb (TestBignum#test_singleton_method): ditto.
-
- * test/ruby/test_float.rb (TestFloat#test_singleton_method): ditto.
-
- * test/ruby/test_symbol.rb (TestSymbol#test_singleton_method): ditto.
-
-Thu Aug 23 20:34:32 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * class.c (singleton_class_of): flonum can't have singleton class.
-
- * vm.c (vm_define_method): flonum can't have singleton method.
-
-Thu Aug 23 19:18:33 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * common.mk (win32/*): macro RUBY_H_INCLUDES is not defined there,
- so need to move dependency rules under the definition of it.
-
-Thu Aug 23 19:16:20 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/Makefile.sub: refactoring. remove unused rules, and update
- some rules which are not used usually to fit current macros.
-
-Thu Aug 23 16:46:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * file.c (rb_find_file_ext_safe, rb_find_file_safe): default to
- US-ASCII for encdb and transdb.
-
- * load.c (search_required): keep encoding of feature name. set
- loading path to filesystem encoding. [Bug #6377][ruby-core:44750]
-
- * ruby.c (add_modules, require_libraries): assume default external
- encoding as well as ARGV.
-
-Thu Aug 23 16:20:04 2012 Koichi Sasada <ko1@atdot.net>
-
- * include/ruby/ruby.h: introduce flonum technique for
- 64bit CPU environment (sizeof(double) == sizeof(VALUE)).
- flonum technique enables to avoid double object creation
- if the double value d is in range about between
- 1.72723e-77 < |d| <= 1.15792e+77 or 0.0.
- flonum Float value is immediate and their lowest two bits
- are b10.
- If flonum is activated, then USE_FLONUM macro is 1.
- I'll write detailed in this technique on
- https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/Flonum_tech
-
- * benchmark/bmx_temp.rb: add an benchmark for simple
- Float calculation.
-
- * gc.c (id2ref, rb_obj_id): add flonum Float support.
-
- * include/ruby/intern.h: move decl of rb_float_new(double)
- to include/ruby/ruby.h.
-
- * insns.def, vm.c, vm_insnhelper.c: add flonum optimization
- and simplify source code.
-
- * vm_insnhelper.h (FLONUM_2_P): added.
-
- * marshal.c: support flonum output.
-
- * numeric.c (rb_float_new_in_heap): added.
-
- * parse.y: support flonum.
-
- * random.c: ditto.
-
-Thu Aug 23 16:12:40 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * lib/mkmf.rb (create_makefile): add dependency to header files when
- depend files don't exist. now we can remove simple (and often
- wrong) depend files in most cases.
-
-Thu Aug 23 16:02:20 2012 Koichi Sasada <ko1@atdot.net>
-
- * ext/date/depend: add dependency to $(ruby_headers).
-
-Thu Aug 23 12:51:39 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * insns.def (invokesuper): reverted r36640 partially to make super
- in a thread work correctly. [ruby-core:47284] [Bug #6907]
-
- * test/ruby/test_super.rb: related test.
-
-Thu Aug 23 12:30:20 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/configure.bat: support --with(out)?-ext(ensions) options.
-
-Thu Aug 23 11:52:04 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * configure.in: Fixing Haiku build.
- - -lbe is not required for linking
- - stack protector doesn't work for now because of the default gcc's
- bug
- by Takashi Toyoshima <toyoshim@gmail.com>
- https://github.com/ruby/ruby/pull/167
-
- * signal.c (ruby_signal): haiku doesn't have SIGBUS.
-
-Thu Aug 23 11:32:44 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/open-uri/test_open-uri.rb (TestOpenURI#test_read_timeout): this
- test expects that the server thread will be killed in sleep, but 0.01
- sec is too short to reach there.
-
-Thu Aug 23 10:49:28 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * configure.in: use the value of --with-opt-dir on building ruby
- itself. [ruby-dev:46064] [Bug #6900]
-
-Thu Aug 23 10:36:35 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * common.mk (ID_H_TARGET): revert a part of r36724 and r36751. they
- break mswin build from clean source.
-
-Thu Aug 23 02:37:35 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/syck: removed. Fixes [ruby-core:43360]
-
- * test/syck: removed.
-
- * lib/yaml.rb: only require psych, show a warning if people try to set
- the engine to syck.
-
-Thu Aug 23 01:46:53 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * insns.def: search up the cf stack for an object that is an instance
- of the recipient class. Fixes [ruby-core:47186]
-
- * test/ruby/test_super.rb: related test.
-
-Wed Aug 22 19:46:24 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * ext/date/date_core.c: [ruby-core:47266].
-
-Wed Aug 22 19:41:19 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * ext/date/date_core.c: [ruby-core:47226].
-
-Wed Aug 22 16:57:04 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/mkmf.rb (configuration): extract least ruby headers list as
- ruby_headers, so depend files can use default dependency
- explicitly.
-
-Wed Aug 22 15:27:50 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_insnhelper.c (vm_setup_method): fix last commit of
- vm_insnhelper.c (r36771). [ruby-dev:46065] [Bug #6901]
- Should not disable tail call opt on FINISH_FRAME.
- This flag should be propagated correctly.
-
-Wed Aug 22 14:05:23 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_trace.c: support TracePoint. [ruby-trunk - Feature #6895]
-
- * test/ruby/test_settracefunc.rb: add tests for above.
-
- * proc.c (rb_binding_new_with_cfp): add an internal function.
-
- * vm.c (rb_vm_control_frame_id_and_class): add an internal function.
-
- * vm_trace.c: add rb_add_event_hook2() and rb_thread_add_event_hook2().
- Give us the good name for them!
-
-Wed Aug 22 11:38:16 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
-
- * .travis.yml (before_script): Turned out that make -j is broken.
-
-Wed Aug 22 11:23:35 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * vm_insnhelper.c (vm_setup_method): should not enable tail call
- optimization for frames with VM_FRAME_FLAG_FINISH.
- [ruby-dev:46065] [Bug #6901]
-
-Wed Aug 22 11:20:47 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/rubygems/test_case.rb: run test with psych if exist.
-
-Thu Aug 16 12:09:51 2012 Yuki Yugui Sonoda <yugui@google.com>
-
- * nacl/pepper_main.c (init_loadpath): Pushes the correct load path on
- other architectures than x86_64. Fixes #6873.
-
-Wed Aug 15 19:37:33 2012 Yuki Yugui Sonoda <yugui@google.com>
-
- * configure.in (ac_cv_func_shutdown): shutdown(2) has a dummy
- implementation but has no declaration and does not work in
- NativeClient SDK pepper_20.
-
-Wed Aug 15 19:29:29 2012 Yuki Yugui Sonoda <yugui@google.com>
-
- * common.mk (vm_backtrace.o): Added missing dependencies.
-
- * ext/nkf/depend (nkf.o): ditto.
-
- * ext/ripper/depend (ripper.o) ditto.
-
-Wed Aug 22 07:27:00 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/cgi/util.rb (CGI.escapeHTML): use &#39;
- [ruby-core:47221] [Bug #6861]
-
-Tue Aug 21 21:59:22 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * lib/observer.rb: fix typo. https://github.com/ruby/ruby/pull/162 by
- unsymbol (Philip Cunningham).
-
-Tue Aug 21 20:30:06 2012 Benoit Daloze <eregontp@gmail.com>
-
- * test/fileutils/test_fileutils.rb (TestFileUtils#teardown):
- do not assume cwd is TMPROOT and never remove current directory.
- [ruby-core:47224][Bug #6884]
-
-Tue Aug 21 17:29:56 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * addr2line.c (fill_lines): need check and cast of the file size of
- target binary because there are some platforms which off_t > size_t.
-
-Tue Aug 21 17:07:58 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
-
- * .travis.yml (compiler): [experimental] clang support.
-
-Tue Aug 21 15:44:27 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * ext/dl/lib/dl/func.rb (DL::Function#bind): fixes an error in
- test/dl/test_import.rb (DL::TestImport#test_carried_function)
- introduced by r36718.
- the instance of the anonymous class which wraps the block should have
- same methods and instance variables of self.
-
-Tue Aug 21 14:29:22 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/Makefile.sub (scriptbin.mk): no need to include twice.
-
-Tue Aug 21 10:52:08 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/unit/test.rb (Test::Unit::ProxyError): new exception class to
- wrap exceptions raised in workers in parallel test mode.
-
- * test/unit/parallel.rb (Test::Unit::Worker#puke): use above wrapper
- exception.
- [Bug #6882] [ruby-dev:46054]
-
-Tue Aug 21 10:40:06 2012 Koichi Sasada <ko1@atdot.net>
-
- * test_continuation.rb (tracing_with_thread_set_trace_func):
- fix to use Thread#set_trace_func(nil), not set_trace_func(nil).
-
-Tue Aug 21 09:32:41 2012 Ryan Davis <ryand-ruby@zenspider.com>
-
- * lib/minitest/*: Imported minitest 3.3.0 (r7676)
- * test/minitest/*: ditto
-
-Tue Aug 21 09:05:32 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/testunit/tests_for_parallel/ptest_forth.rb: added a test case
- which causes an error.
-
- * test/testunit/test_parallel.rb: follow above change.
- see [Bug #6882]
-
-Tue Aug 21 05:43:00 2012 James Edward Gray II <james@graysoftinc.com>
-
- * lib/csv.rb: Fixes #161 on github
- * lib/csv.rb: You can now specify a pattern for :skip_lines.
- Matching lines will not be passed to the CSV parser.
- * lib/csv.rb: Patch by Christian Schwartz.
-
-Tue Aug 21 05:25:41 2012 Eric Hodel <drbrain@segment7.net>
-
- * re.c (rb_reg_initialize_m): Forgot to update output for or'd-options
- example.
-
-Tue Aug 21 05:18:03 2012 Eric Hodel <drbrain@segment7.net>
-
- * re.c (rb_reg_initialize_m): Update example to show that regexp
- options use | an not || to avoid confusion.
-
-Mon Aug 20 23:02:27 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y: more descriptive token names in syntax error messages.
-
-Mon Aug 20 20:36:30 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm_insnhelper.c (vm_call_method): follow iclasses as klass in cfp
- but not included modules. [ruby-core:47241] [Bug #6891]
-
- * vm_insnhelper.c (vm_call_bmethod): pass defined_class to follow
- proper ancestors. [ruby-core:47241] [Bug #6891]
-
-Mon Aug 20 11:40:27 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-
- * common.mk: fix failed to make with -j2.
- https://gist.github.com/3397935
-
-Mon Aug 20 10:51:01 2012 Shota Fukumori <sorah@tubusu.net>
-
- * lib/test/unit.rb, lib/test/unit/parallel.rb:
- generate error message (String) in parallel.rb instead of
- marshalling Exception. Fixes [Bug #6882] [ruby-dev:46054]
-
-Sun Aug 19 01:24:32 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * enum.c: fix docs. https://github.com/ruby/ruby/pull/129 by
- richardkmichael (Richard Michael).
-
-Sun Aug 19 00:47:26 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * lib/fileutils.rb: fix typo.
- https://github.com/ruby/ruby/pull/155 by simonc (Simon COURTOIS).
-
-Sat Aug 18 09:57:46 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * enc/depend: fix inplace-build condition. enc.mk is generated with
- setting $srcdir to enc, but pwd is still top build directory.
- [ruby-core:47236] [Bug #6888]
-
-Fri Aug 17 23:28:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * object.c (rb_any_to_s, rb_obj_inspect): preserve encodings of class
- name and instance variable names.
-
-Fri Aug 17 12:39:33 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * ext/dl/lib/dl/func.rb (DL::Function#bind): allow to return/break from
- the callback method. (Fiddle already allows it.)
- [Bug #6389] [ruby-dev:45604]
-
-Thu Aug 16 19:54:24 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_trace.c, vm_core.h: simplify tracing mechanism.
-
- (1) add rb_hook_list_t data structure which includes
- hooks, events (flag) and `need_clean' flag.
- If the last flag is true, then clean the hooks list.
- In other words, deleted hooks are contained by `hooks'.
- Cleanup process should run before traversing the list.
- (2) Change check mechanism
- See EXEC_EVENT_HOOK() in vm_core.h.
- (3) Add `raw' hooks APIs
- Normal hooks are guarded from exception by rb_protect().
- However, this protection is overhead for too simple
- functions which never cause exceptions. `raw' hooks
- are executed without protection and faster.
- Now, we only provide registration APIs. All `raw'
- hooks are kicked under protection (same as normal hooks).
-
- * include/ruby/ruby.h: remove internal data definition and
- macros.
-
- * internal.h (ruby_suppress_tracing), vm_trace.c: rename
- ruby_suppress_tracing() to rb_suppress_tracing()
- and remove unused function parameter.
-
- * parse.y: fix to use renamed rb_suppress_tracing().
-
- * thread.c (thread_create_core): no need to set RUBY_VM_VM.
-
- * vm.c (mark_event_hooks): move definition to vm_trace.c.
-
- * vm.c (ruby_vm_event_flags): add a global variable.
- This global variable represents all of Threads and VM's
- event masks (T1#events | T2#events | ... | VM#events).
- You can check the possibility kick trace func or not
- with ruby_vm_event_flags.
- ruby_vm_event_flags is maintained by vm_trace.c.
-
- * cont.c (fiber_switch, rb_cont_call): restore tracing status.
- [Feature #4347]
-
- * test/ruby/test_continuation.rb: ditto.
-
-Thu Aug 16 19:15:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * object.c (rb_class_initialize): forbid inheriting uninitialized
- class. another class tree not based on BasicObject cannot exist.
- [ruby-core:47148][Bug #6863]
-
-Thu Aug 16 11:52:06 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * test/-ext-/test_printf.rb (Test_SPrintf#test_{taint,untrust}): use
- plain object so that the results of to_s and inspect are infected.
- [ruby-dev:46053] [Bug #6881]
-
-Thu Aug 16 09:46:07 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * strftime.c: remove unnecessary macros to check traditional C.
- https://github.com/ruby/ruby/pull/46 by lateau (Daehyub Kim).
-
- * vsnprintf.c: remove K&R.
-
-Wed Aug 15 20:47:49 2012 Benoit Daloze <eregontp@gmail.com>
-
- * object.c (rb_obj_inspect): Kernel#inspect: do not call #to_s. A class
- can now benefit from the nice default #inspect even if it defines #to_s.
- Also, there is no more unexpected change in #inspect result.
-
- * NEWS: Add note about the change.
-
- * bignum.c, io.c, numeric.c, object.c, proc.c, vm.c (Init_*):
- Adapt internal structures (by aliasing #inspect to #to_s) so they
- don't rely on the removed behavior (#inspect calling overridden #to_s).
-
- * test/ruby/test_object.rb (test_inspect): add tests for Kernel#inspect.
-
- * lib/pp.rb (class PP): do not call #to_s anymore, as #inspect
- no more does (mame).
-
- * test/test_pp.rb (class PPInspectTest): remove related assertion (mame).
- [ruby-core:43238][Feature #6130]
-
- * test/drb/drbtest.rb (DRbCore#teardown, DRbAry#teardown):
- adapt DRb tests with the new change (shirosaki).
- [ruby-core:47182][Bug #6866]
-
-Wed Aug 15 18:05:37 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * lib/test/unit.rb (Test::Unit::Runner#failed): need to delete the
- status line if the status is skipped and -q is specified.
-
-Wed Aug 15 16:26:52 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * sprintf.c (ruby__sfvextra): the result should be infected by the
- given strings.
-
- * sprintf.c (ruby__sfvwrite): set buffer length and exclude
- uninitialized garbage to get correct coderange.
-
-Wed Aug 15 16:20:09 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * common.mk (ID_H_TARGET): make timestamp file of id.h so that the
- header will not be remade repetitively.
-
-Wed Aug 15 11:39:53 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_trace.c: separate trace_func related functions from
- thread.c.
-
- * thread.c: ditto.
-
- * common.mk: add vm_trace.o.
-
- * inits.c: call Init_vm_trace().
-
-Tue Aug 14 16:25:46 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * test/erb/test_erb.rb (test_html_escape): add assertions for the
- cases where the argument is not a String.
-
-Tue Aug 14 16:03:31 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/win32.c (check_valid_dir): reject "..." as directory name.
- [Bug #6851]
-
-Tue Aug 14 16:02:51 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/ruby/test_file_exhaustive.rb
- (TestFileExhaustive#test_stat_dotted_prefix): added.
-
-Tue Aug 14 15:39:09 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/ruby/test_file_exhaustive.rb
- (TestFileExhaustive#test_stat_drive_root): added.
-
-Tue Aug 14 10:38:17 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/erb.rb (ERB::Util.html_escape): fix r36687: call to_s before
- passing it to CGI.escapeHTML.
-
-Mon Aug 13 13:13:19 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * lib/erb.rb (ERB::Util.html_escape): use CGI.escapeHTML to escape
- single quotes. [ruby-core:47138] [Bug #6861]
-
-Sun Aug 12 11:57:20 2012 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * vm.c (invoke_block_from_c): fix unintentional block passing.
- [ruby-dev:45071] [Bug #5832]
-
-Fri Aug 10 08:41:28 2012 Eric Hodel <drbrain@segment7.net>
-
- * gc.c (gc_malloc_allocated_size): RDoc does not process macros, so
- mention this method is only available when ruby is built with
- CALC_EXACT_MALLOC_SIZE
- * gc.c (gc_malloc_allocations): ditto
-
-Thu Aug 9 23:46:51 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * tool/mkrunnable.rb: see build_os instead of target arch for
- cross-compiling.
-
- * configure.in (MINIRUBY): use real path for include path.
-
- * template/fake.rb.in (builddir): remove duplications
-
-Thu Aug 9 20:03:11 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * test/ruby/test_file_exhaustive.rb
- (TestFileExhaustive#test_stat_special_file): add a test.
- GetFileAttributesExW fails to get attributes of special files
- such as pagefile.sys.
-
- * win32/win32.c (check_valid_dir): for performance, check the path
- by FindFirstFileW only if the path contains "..."
-
- * win32/win32.c (winnt_stat): use GetFileAttributesExW instead of
- FindFirstFileW since GetFileAttributesExW is faster.
- Based on the patch by Dusan D. Majkic.
- [ruby-core:47083] [Feature #6845]
-
-Thu Aug 9 18:33:46 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ruby.c (proc_options): show version only once even if -v and
- --version are given together.
- http://twitter.com/d6rkaiz/status/233491797085671424
-
-Thu Aug 9 12:37:22 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * test/openssl/test_config.rb (OpenSSL#test_constants): skip this
- test if platform is Mac OS X or Windows. [Bug #6830]
-
-Wed Aug 8 22:51:30 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm_eval.c (eval_under): singletons other than special constants
- don't need cref-scope hack.
-
-Wed Aug 8 22:45:38 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * common.mk (.y.h): split from .y.c rule to manage dependency on
- parse.h. [ruby-core:46741] [Bug #6789]
-
- * common.mk (id.h): keep old file unless changed.
-
-Wed Aug 8 17:11:20 2012 Koichi Sasada <ko1@atdot.net>
-
- * compile.c (ADD_INSNL): make ADD_INSNL as alias of ADD_INSN1.
-
-Wed Aug 8 17:08:14 2012 Koichi Sasada <ko1@atdot.net>
-
- * bootstrap/test_exception.rb: fix a last committed test.
-
-Wed Aug 8 16:27:58 2012 Koichi Sasada <ko1@atdot.net>
-
- * compile.c, insns.def (checkmatch):
- remove checkincludearray instruction and
- add new instruction checkmatch.
- This change is to solve
- [Bug #4438] "rescue args type check omitted".
-
- * iseq.c: increment ISEQ_MAJOR_VERSION because removal of
- checkincludearray instruction.
-
- * vm_core.h: add several definitions for
- the checkmatch instruction.
-
- * vm_insnhelper.c (check_match): added.
-
- * bootstraptest/test_exception.rb: add a test.
-
- * test/ruby/test_exception.rb: ditto.
-
-Wed Aug 8 05:51:20 2012 Eric Hodel <drbrain@segment7.net>
-
- * proc.c (method_clone): Added documentation. Patch by Robin Dupret.
- Fixes #152 on github.
-
-Tue Aug 7 20:19:29 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * ext/readline/readline.c (Init_readline): rl_catch_signals=0 returns
- back. Without this, on FreeBSD9 and readline 6.2 irb can't catch ^C.
- [Bug #5423]
-
-Tue Aug 7 20:12:39 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_exec.c, insns.def (leave): solve problems on
- OPT_CALL_THREADED_CODE.
- Catch up finish frame structure on OPT_CALL_THREADED_CODE.
-
- * vm_core.h: add rb_thread_t#retval for temporary space on
- OPT_CALL_THREADED_CODE.
-
- * vm.c (th_init): clear rb_thread_t#retval as Qundef.
-
- * vm_dump.c (rb_vmdebug_debug_print_pre): fix debug print format.
-
-Tue Aug 7 11:58:27 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/ruby/test_require.rb (TestRequire#test_require_twice): added.
-
-Tue Aug 7 11:35:37 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * vm_method.c (rb_redefine_opt_method): use RCLASS_ORIGIN to avoid
- SEGV when a module-prepended class is refined.
-
-Tue Aug 7 10:46:37 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/ruby/test_file_exhaustive.rb
- (TestFileExhaustive#test_expand_path*): refactoring. split the method
- into some chunks of the same kind of tests.
-
-Tue Aug 7 00:31:09 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * class.c (rb_special_singleton_class_of): utility function.
-
- * vm_eval.c (eval_under): special deal for class variable scope with
- instance_eval.
-
- * vm_eval.c (rb_obj_instance_eval, rb_obj_instance_exec): allow method
- definition in instance_eval of special constants. [ruby-core:28324]
- [Bug #2788]
-
-Tue Aug 7 00:23:58 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * variable.c (CVAR_LOOKUP): split into helper functions.
-
-Mon Aug 6 19:15:11 2012 Masaki Suketa <masaki.suketa@nifty.ne.jp>
-
- * test/win32ole/test_win32ole_variant.rb: setting WIN32OLE.locale
- to pass some assertion. Thanks to Hiroshi Shirosaki.
- [ruby-core:46873][Bug #6814]
-
-Mon Aug 6 15:54:50 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * internal.h, class.c, eval.c, insns.def: find the appropriate
- receiver for super called in instance_eval. If such a receiver is
- not found, raise NoMethodError. [ruby-dev:39772] [Bug #2402]
-
-Mon Aug 6 14:54:38 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * include/ruby/ruby.h, eval.c, vm_insnhelper.c: fix typo.
-
-Mon Aug 6 13:13:58 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm_eval.c (vm_call_super): since cfp->klass is always class or
- iclass, no search from method entry.
-
- * insns.def (defined): now should use klass in the current control
- frame to search superclass, not me->klass. reported by naruse.
-
-Mon Aug 6 11:19:19 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/etc/test_etc.rb (TestEtc#test_getpwuid): `s' is never set to nil.
-
-Mon Aug 6 11:08:48 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/syslog/test_syslog_logger.rb: skip unless Syslog module is
- available.
-
-Mon Aug 6 00:40:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/bigdecimal/bigdecimal.c (BigMath_s_log): fix format specifier.
-
-Mon Aug 6 00:39:24 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * include/ruby/ruby.h (NUM2ULONG): optimize by inline as well as
- NUM2LONG, and cast to unsigned long explicitly for the platforms
- where SIZEOF_VALUE is larger than SIZEOF_LONG.
-
- * include/ruby/ruby.h (NUM2SSIZET): fix type to cast.
-
-Sun Aug 5 21:10:36 2012 Narihiro Nakamura <authornari@gmail.com>
-
- * gc.c : if ENABLE_VM_OBJSPACE is 1, rest_sweep is not defined.
- remove unused declarations. [ruby-core:47004] [Bug #6837]
-
-Sun Aug 5 19:31:57 2012 Narihiro Nakamura <authornari@gmail.com>
-
- * gc.c: just move functions and so on. I don't touch any internal
- implementation.
-
-Sun Aug 5 13:22:29 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * configure.in: use gcc-4.2 prior to clang, gcc, and cc if exist for
- the use of Snow Leopard's old clang. see also r36594, r36610, r36611.
-
-Sun Aug 5 06:55:10 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * ext/date/date_{core,strftime}.c: [ruby-core:46990].
-
-Sat Aug 4 22:56:20 2012 Narihiro Nakamura <authornari@gmail.com>
-
- * gc.c: use inline functions instead of macros, and close up
- related codes for the profiler.
-
-Sat Aug 4 20:37:56 2012 Narihiro Nakamura <authornari@gmail.com>
-
- * gc.c (gc_mark_children): use gc_mark_ptr instead of marking
- a object directly.
-
-Sat Aug 4 10:02:03 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * test/ruby/test_alias.rb (test_super_in_aliased_module_method):
- add a test case for [ruby-dev:46028], which fails in 1.8.
-
-Sat Aug 4 01:56:06 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm_insnhelper.c (vm_search_normal_superclass): no longer needs
- receiver, klass is always unique in the ancestors now.
-
-Sat Aug 4 01:27:40 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * insns.def (invokesuper): reverted r36612 so that super in an
- aliased method will not call the same method.
-
-Fri Aug 3 19:26:10 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * insns.def (invokesuper): don't skip the same class. instead, use
- rb_method_entry_get_with_omod() to avoid infinite loop when
- super is used with refinements. [ruby-core:30450] [Bug #3351]
-
-Fri Aug 3 19:21:19 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in: use clang prior to gcc only when self-compiling on
- darwin. search default compilers on other platforms. [Bug #6816]
-
-Fri Aug 3 17:25:49 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * configure.in: move RUBY_MINGW32 after AC_PROG_CC.
- RUBY_MINGW32 uses AC_TRY_CPP and it sets CC and CPP. [Bug #6816]
-
- * configure.in: don't use AC_PROG_CC in AS_CASE.
-
-Fri Aug 3 17:21:52 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * test/runner.rb: get rid of loading previously installed gems.
- [ruby-dev:46025]
-
-Fri Aug 3 16:40:01 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
-
- * .travis.yml (notifications): [experimental] IRC notifications.
-
-Thu Aug 2 20:32:29 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * eval.c (rb_mod_using): new method Module#using. [experimental]
-
- * eval.c (rb_mod_refine): new method Module#refine. [experimental]
-
- * eval.c (f_using): new method Kernel#using. [experimental]
-
-Thu Aug 2 20:08:02 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * class.c, insns.def, method.h, proc.c, vm.c, vm_core.h, vm_eval.c,
- vm_insnhelper.c, vm_insnhelper.h, vm_method.c: add klass to
- rb_control_frame_t to implement super correctly.
-
-Thu Aug 2 13:23:08 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * configure.in (AC_PROG_CC): AC_PROG_CC tries clang at first on
- darwin. [Bug #6816]
-
-Thu Aug 2 11:39:25 2012 Narihiro Nakamura <authornari@gmail.com>
-
- * gc.c: return true or false. Patch by Dirkjan Bussink. [Bug #6821]
-
- * test/ruby/test_gc.rb: add test-case for this bug.
-
-Thu Aug 2 10:51:12 2012 Martin Bosslet <Martin.Bosslet@gmail.com>
-
- * ext/openssl/lib/openssl/digest.rb
- test/openssl/test_digest.rb: Add Digest module function to OpenSSL
- module and test it. Patch provided by Eric Hodel.
- [ruby-core:46908][Feature #6819]
-
-Wed Aug 1 22:29:12 2012 Benoit Daloze <eregontp@gmail.com>
-
- * ext/digest/digest.c (hexencode_str_new): return an ASCII string
-
- * test/digest: tests for all kind of digests encodings
- [ruby-core:46792][Bug #6799]
-
-Wed Aug 1 05:50:53 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * test/ruby/test_rubyoptions.rb (TestRubyOptions#test_encoding):
- Fix test_encoding failure on Windows.
- With chcp 65001, 1252 and 437, test_encoding failed. Test result
- depends on locale because LANG environment variable doesn't affect
- locale on Windows.
- [ruby-core:46872] [Bug #6813]
-
-Wed Aug 1 00:33:19 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * class.c (include_class_new): fix duplication of prepended module.
- since m_tbl of prepended module is always zero, copy from its
- copy iclass of original.
-
-Tue Jul 31 18:22:34 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * variable.c (classname): tell if found name is permanent. search
- tmp_classpath only if class id is set. [ruby-core:42865][Bug #6078]
-
- * variable.c (rb_class_path): duplicate found temporary path.
-
- * variable.c (rb_set_class_path_string, rb_set_class_path): set class
- id to find classpath.
-
-Tue Jul 31 10:36:12 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych.rb: updated to released version.
-
- * ext/psych/psych.gemspec: ditto
-
-Tue Jul 31 06:18:06 2012 Eric Hodel <drbrain@segment7.net>
-
- * time.c (time_sec): Remove extra wording about leap seconds and refer
- directly to Wikipedia's leap second page for further information.
- [Bug #6749]
-
-Mon Jul 30 23:01:47 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/rubygems/platform.rb (Gem::Platform#initialize): Support pattern
- like x86_64-netbsd6.99.7.
-
-Mon Jul 30 21:00:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * variable.c (find_class_path): no retry when preferred is given.
-
- * variable.c (classname): if classid is set try it to find full
- qualified class path, and then try arbitrary class path. try
- tmp_classpath at last even if enclosing namespace is anonymous.
- fix r36574. [ruby-core:42865][Bug #6078]
-
- * variable.c (rb_set_class_path_string, rb_set_class_path): set
- tmp_classpath instead of classpath if the name is not permanent.
-
-Mon Jul 30 14:24:20 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * variable.c: store anonymous class path in tmp_classpath but not in
- classpath. [ruby-core:42865][Bug #6078]
-
-Mon Jul 30 13:11:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in (DLDFLAGS): on Darwin, deprecate -flat_namespace to get
- rid of huge imported symbols table.
-
- * configure.in (LIBRUBY_RELATIVE): libruby_so is not made when
- disable-shared, so no absolute path is used for it and executable
- file is runnable anywhere.
-
-Mon Jul 30 01:30:10 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
-
- * common.mk: add a dependency. [ruby-core:46741] [Bug #6789]
-
-Sun Jul 29 15:44:47 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
-
- * thread.c (thread_create_core): hide th->async_errinfo_mask_stack from
- ObjectSpace.each_object. refix of r36539.
-
-Sun Jul 29 23:57:27 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/socket/option.c (inet_ntop): use rb_w32_inet_ntop, instead of
- inet_ntop directly, which is unavailable on older version Windows.
-
- * win32/win32.c (rb_w32_inet_ntop): type should be const.
-
-Sun Jul 29 14:20:34 2012 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * thread.c (Init_Thread): does not need to set klass
- explicitly.
-
-Sun Jul 29 06:21:04 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * win32/win32.c: suppress warning redeclared on mingw64.
- *_s functions are declared if MINGW_HAS_SECURE_API is defined.
- Follow up r36556.
-
-Sun Jul 29 00:28:46 2012 Narihiro Nakamura <authornari@gmail.com>
-
- * gc.c: remove unused initialization.
-
-Sat Jul 28 16:26:09 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * win32/win32.c (gmtime_r): use _gmtime64_s() with x86_64-w64-mingw32.
-
- * win32/win32.c (localtime_r): use _localtime64_s() with
- x86_64-w64-mingw32. Since FileTimeToSystemTime() seems not work with
- large value under x64. Mingw-w64 doesn't have these declaration.
- [ruby-core:46780] [Bug #6794]
-
-Fri Jul 27 18:25:51 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * io.c (rb_io_check_io): make public.
-
- * process.c (check_exec_redirect): try conversion to IO on redirect
- parameters. [ruby-core:44181] [Bug #6269]
-
-Fri Jul 27 17:58:12 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in (RUBY_CPPOUTFILE): get rid of variable conflict so
- CPPFLAGS is not duplicated. [ruby-core:43097] [Bug #6119]
-
-Fri Jul 27 12:12:36 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/mkexports.rb: should not export DllMain().
- reported by luis at [ruby-core:46743] [Bug #6790], solved by
- Heesob Park, and confirmed by nobu.
-
-Thu Jul 26 14:51:29 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
-
- * test/net/http/test_https.rb (TestNetHTTPS#test_session_reuse):
- localhost is not (always) 127.0.0.1. Don't expect that.
-
-Thu Jul 26 07:18:38 2012 <kanemoto@ruby-lang.org>
-
- * ext/json/fbuffer/fbuffer.h: avoid compilation error on AIX by
- -ansi -std=iso9899:199409 (r36038). [ruby-core:46744] [Bug #6791].
-
-Thu Jul 26 00:42:23 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
-
- * thread.c (thread_create_core, Init_Thread): hide
- th->async_errinfo_queue and th->async_errinfo_mask_stack from
- ObjectSpace.each_object.
-
-Wed Jul 25 17:41:05 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * complex.c, rational.c: compatible marshal loader for compatibilities
- with 1.8. [ruby-core:45775] [Bug #6625]
-
-Wed Jul 25 17:17:05 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * atomic.h: prefer GCC atomic builtins than Windows APIs, if possible,
- since they are generic.
-
-Wed Jul 25 11:16:57 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/net/.document: Removed. All files in net/ should be included in
- RDoc.
-
-Wed Jul 25 10:00:23 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/testunit/test_redefinition.rb: broken class/method names.
-
-Wed Jul 25 09:26:32 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/cgi/html.rb: Use << instead of +=.
- `a += b` is syntax sugar of `a = a + b`; it creates a new string
- object. `a << b` is concatenation and doesn't create new object.
-
-Wed Jul 25 09:16:26 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/cgi/html.rb (element_init): suppress redefine warning.
- Don't define methods if they are already defined.
-
-Wed Jul 25 09:05:38 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/net/http.rb: Added SSL session reuse across connections for a
- single instance to speed up connection. [Feature #5341]
- * NEWS: ditto
- * test/net/http/test_https.rb: Tests for #5341
-
-Wed Jul 25 06:54:24 2012 Eric Hodel <drbrain@segment7.net>
-
- * doc/re.rdoc: Fix spelling
-
-Wed Jul 25 06:49:12 2012 Eric Hodel <drbrain@segment7.net>
-
- * re.c (rb_reg_s_last_match): Update $~ to reference Regexp
- documentation about "special global variables". [Bug #6723]
-
-Wed Jul 25 06:28:56 2012 Eric Hodel <drbrain@segment7.net>
-
- * iseq.c: Added documentation. Patch by David Albert. [Bug #6785]
-
-Wed Jul 25 03:05:06 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * parse.y: added symbols and qsymbols productions for %i and %I
- support. %i{ .. } returns a list of symbols without interpolation,
- %I{ .. } returns a list of symbols with interpolation. Thanks to
- Josh Susser for inspiration of this feature. [Feature #4985]
-
- * ext/ripper/eventids2.c: added ripper events for %i and %I.
-
- * test/ripper/test_parser_events.rb: ripper tests
-
- * test/ripper/test_scanner_events.rb: ditto
-
- * test/ruby/test_array.rb: test for %i and %I behavior
-
-Tue Jul 24 23:34:43 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * include/ruby/win32.h (rb_w32_pow): add new function.
- We use powl() instead of broken pow() for x64-mingw32. This workaround
- fixes test failures related to floating point numeric.
- [ruby-core:46686] [Bug #6784]
-
-Tue Jul 24 15:01:24 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/win32.c (rb_w32_socket, rb_w32_socketpair): remember the family
- in the high word of socklist value.
-
- * win32/win32.c (overlapped_socket_io, recvmsg, sendmsg, setfl): follow
- above changes.
-
- * win32/win32.c (rb_w32_getsockname): set remembered family to the
- argument when OS's function fails.
-
-Tue Jul 24 12:35:13 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/ruby/test_dir_m17n.rb: remove a garbage.
-
- * test/ruby/test_dir_m17n.rb: convert from ascii-8bit to other encoding
- with 8bit bytes always fails.
-
-Tue Jul 24 12:32:18 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/ruby/test_dir_m17n.rb: sorry, typo.
-
-Tue Jul 24 12:13:26 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/ruby/test_dir_m17n.rb: refactoring. RE should be in the left side
- of the =~ operator, and compare the result with nil is meaningless.
-
-Tue Jul 24 11:35:20 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/ruby/test_pack.rb (test_pack_unpack_M): was redefined
- accidentally.
-
-Tue Jul 24 09:31:18 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems: Updated to RubyGems 1.8.24, a bugfix release.
-
-Tue Jul 24 08:30:15 2012 Luis Lavena <luislavena@gmail.com>
-
- * test/ruby/test_dir_m17n.rb (create_and_check_raw_file_name): add new
- helper method to ease encoding testing. Patch by Oleg Sukhodolsky.
- [ruby-core:46589][Bug #6765]
-
- * test/ruby/test_dir_m17n.rb (test_filename_extutf8): use filesystem
- encoding when reading entries and comparing.
-
- * test/ruby/test_dir_m17n.rb (test_filename_utf8_raw_name): removed.
-
- * test/ruby/test_dir_m17n.rb (test_filename_utf8_raw_jp_name): split test.
-
-Tue Jul 24 08:09:30 2012 Luis Lavena <luislavena@gmail.com>
-
- * test/win32ole/test_win32ole_method.rb (is_ruby64?): Correct platform
- used to identify mingw-w64 (x64-mingw32). Patch by Hiroshi Shirosaki.
- [ruby-core:46651][Bug #6782]
-
-Tue Jul 24 07:22:58 2012 Eric Hodel <drbrain@segment7.net>
-
- * time.c (time_sec): Updated description of leap seconds for accuracy.
- Based on patch by Marcus Stollsteimer. [Bug #6749]
-
-Tue Jul 24 07:03:11 2012 Eric Hodel <drbrain@segment7.net>
-
- * string.c (rb_str_sub): Fixed wording of documentation to match the
- replacement operation. Minor cleanup of markup. [Bug #6719]
- * string.c (rb_str_sub_bang): Minor wording change for clarity, minor
- cleanup of markup.
-
-Mon Jul 23 23:58:40 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * enc/Makefile.in (TARGET_NAME, TARGET_ENTRY): needed for EXTDLDFLAGS
- on some platforms. [ruby-core:46600] [Bug #6768]
-
- * enc/depend: no longer needs tweaking DLDFLAGS for TARGET names.
-
-Mon Jul 23 22:48:19 2012 Tanaka Akira <akr@fsij.org>
-
- * lib/open-uri.rb: use respond_to? to test Tempfile.
- [ruby-dev:45995] [Bug #6781] reported by hsbt (Hiroshi SHIBATA).
-
-Mon Jul 23 14:43:34 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in (LIBPATHENV): LIBPATH is used on AIX, but not
- SHLIB_PATH which was carelessly copied from HP/UX. suggested by
- Perry Smith at [ruby-core:46397]. [Bug #6728]
-
-Mon Jul 23 01:55:08 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-
- * test/uri/test_generic.rb (URI#test_find_proxy): add tests with
- empty *_proxy env variables.
-
-Mon Jul 23 01:47:26 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-
- * test/uri/test_generic.rb (URI#with_env): unset proxy related env
- variables. [Bug #6774]
-
- * test/uri/test_generic.rb (URI#test_find_proxy): fix failures
- when proxy related env variables already set. [Bug #6774]
-
-Sun Jul 22 23:58:48 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * thread.c (rb_threadptr_execute_interrupts_common): increase
- running_time_us on THREAD_TO_KILL like on THREAD_RUNNABLE.
- This cause not to switch from a thread which is to be killed
- on FreeBSD and Mac OS X. see also the test.
- This issue maybe exist for long time but happens after r36430.
-
-Sat Jul 21 06:21:45 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/net/http.rb: fixes for r36476. [Feature #6546]
- http://u64.rubyci.org/~chkbuild/ruby-trunk/log/20120720T030101Z.diff.html.gz
-
- * lib/net/http.rb (Net::HTTP.newobj): return back for compatibility.
-
- * lib/net/http.rb (Net::HTTP.new): set default_port if proxy port is
- not given.
-
- * lib/net/http.rb (Net::HTTP#initialize): ditto.
-
- * lib/net/http.rb (Net::HTTP#proxy?): return true or false.
-
- * lib/net/http.rb (Net::HTTP#proxy_address): check proxy_uri is not nil.
-
- * lib/net/http.rb (Net::HTTP#proxy_port): ditto.
-
-Sat Jul 21 23:12:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * thread_pthread.c (ruby_init_stack): STACK_GROW_DIR_DETECTION is
- necessary on platforms with unknown stack direction. [Bug #6761]
-
-Sat Jul 21 15:13:42 2012 Shota Fukumori <sorah@tubusu.net>
-
- * lib/test/unit/testcase.rb (method_added): refactoring.
-
-Sat Jul 21 14:06:41 2012 Shota Fukumori <sorah@tubusu.net>
-
- * lib/test/unit/testcase.rb: warn when test_* method is redefined.
- Patch by mame (Yusuke Endoh). [Feature #2643] [ruby-core:27790]
-
- * test/testunit/test_redefinition.rb: Test for above.
-
- * test/testunit/test4test_redefinition.rb: Ditto.
-
-Sat Jul 21 08:41:14 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/logger.rb: Updated example in Logger comment to match other
- examples and fixed a bug. Patch by Marcus Stollsteimer.
- [Bug #6759]
-
-Fri Jul 20 17:20:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * random.c (rb_random_real): refine error message.
-
-Fri Jul 20 11:03:17 2012 Eric Hodel <drbrain@segment7.net>
-
- * NEWS: Updated net/http for automatic proxy detection (#6546) and
- automatic gzip and deflate compression (#6492, #6494).
-
-Fri Jul 20 10:55:38 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/net/http.rb: Net::HTTP now automatically detects and uses
- proxies from the environment. A proxy may also be specified as
- before.
-
- Net::HTTP::Proxy still creates anonymous classes, but these classes
- are only used to store configuration information. When an HTTP
- instance is created the configuration is now copied.
-
- Additionally, Net::HTTP::ProxyDelta is no longer used by Net::HTTP
-
- [Feature #6546]
- * lib/open-uri.rb: Moved URI::Generic#find_proxy to uri/generic.
- * lib/uri/generic.rb: Imported find_proxy from open-uri.
- * test/open-uri/test_open-uri.rb: Moved proxy-discovery tests to URI.
- * test/uri/test_generic.rb: Imported proxy-discovery tests from
- open-uri.
- * test/net/http/test_http.rb: Added tests for proxy behavior.
-
-Fri Jul 20 09:34:11 2012 Eric Hodel <drbrain@segment7.net>
-
- * test/socket/test_socket.rb: Ignore IPv6 unique local addresses on OS
- X (iCloud Back to my Mac addresses) for test_udp_socket since they do
- not act as loopback addresses. [Bug #6692]
-
-Fri Jul 20 09:32:14 2012 Eric Hodel <drbrain@segment7.net>
-
- * ext/socket/raddrinfo.c (addrinfo_ipv6_unique_local_p): Added
- Addrinfo#ipv6_unique_local? to detect RFC 4193 unique local
- addresses. Part of #6692
- * ext/socket/rubysocket.h: Add IN6_IS_ADDR_UNIQUE_LOCAL macro if
- missing.
- * test/socket/test_addrinfo.rb: Test for ipv6_unique_local?
-
-Fri Jul 20 07:40:32 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/net/http/response.rb: Automatically inflate gzip and
- deflate-encoded response bodies. [Feature #6942]
- * lib/net/http/generic_request.rb: Automatically accept gzip and
- deflate content-encoding for requests. [Feature #6494]
- * lib/net/http/request.rb: Updated documentation for #6494.
- * lib/net/http.rb: Updated documentation for #6492 and #6494, removed
- Content-Encoding handling now present in Net::HTTPResponse.
- * test/net/http/test_httpresponse.rb: Tests for #6492
- * test/net/http/test_http_request.rb: Tests for #6494
- * test/open-uri/test_open-uri.rb (test_content_encoding): Updated test
- for automatic content-encoding handling.
-
-Fri Jul 20 03:42:54 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * thread_pthread.c: use #ifdef, not #if.
-
-Thu Jul 19 15:08:40 2012 Koichi Sasada <ko1@atdot.net>
-
- * thread.c (rb_thread_s_control_interrupt,
- rb_thread_s_check_interrupt): added for
- Thread.control_interrupt and Thread.check_interrupt.
- See details on rdoc.
- I'll make an ticket for this feature.
-
- * test/ruby/test_thread.rb: add a test for Thread.control_interrupt.
-
- * thread.c (rb_threadptr_raise): make a new exception object
- even if argc is 0.
-
- * thread.c (rb_thread_kill): kill thread immediately if target thread
- is current thread.
-
- * vm_core.h (RUBY_VM_CHECK_INTS_BLOCKING): added.
- CHECK_INTS while/after blocking operation.
-
- * vm_core.h (RUBY_VM_CHECK_INTS): require rb_thread_t ptr.
-
- * cont.c (fiber_switch): use replaced RUBY_VM_CHECK_INTS().
-
- * eval.c (ruby_cleanup): ditto.
-
- * insns.def: ditto.
-
- * process.c (rb_waitpid): ditto.
-
- * vm_eval.c (vm_call0): ditto.
-
- * vm_insnhelper.c (vm_call_method): ditto.
-
-Thu Jul 19 22:46:48 2012 Tanaka Akira <akr@fsij.org>
-
- * test/ruby/test_io.rb: remove temporally files early.
-
-Thu Jul 19 15:38:35 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * variable.c (rb_mod_class_variables): return inherited variables
- except when the optional argument is set to false.
- [ruby-dev:44034] [Bug #4971]
-
- * variable.c (rb_mod_constants): fix typo in documentation.
-
-Thu Jul 19 14:30:43 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * internal.h: move mark function declarations that should be private.
-
-Thu Jul 19 14:18:22 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * ext/socket/init.c (rsock_init_sock): need to update max fd on all
- platforms.
-
-Thu Jul 19 14:15:48 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * thread.c (rb_gc_mark_threads): remove deprecated function.
-
-Thu Jul 19 13:28:03 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/net/http/test_http.rb (TestNetHTTPLocalBind#test_bind_to_local*):
- re-enable the tests because now it's OK on windows.
-
-Thu Jul 19 13:26:25 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * ext/socket/extconf.rb: now enable IPv6 by default on mswin.
-
-Thu Jul 19 09:33:46 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/emitter.c (initialize): allow a configuration object to be
- passed to the constructor so that mutation isn't required after
- instantiation.
-
- * ext/psych/lib/psych/handler.rb: add configuration object
-
- * ext/psych/lib/psych/visitors/emitter.rb: use configuration object if
- extra configuration is present.
-
-Thu Jul 19 08:20:25 2012 Tanaka Akira <akr@fsij.org>
-
- * test/ruby/test_file.rb: remove temporally files early.
-
-Thu Jul 19 07:37:41 2012 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
-
- * test/drb/drbtest.rb: fixed: can't delete unix domain sockets problem.
-
-Thu Jul 19 03:41:20 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * bignum.c: Added #include <strings.h> for ffs(). Patch by Perry
- Smith. Thank you. [Bug #6748]
-
-Thu Jul 19 01:56:02 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * include/ruby/intern.h (rb_num_zerodiv): Added NORETURN.
- Patched by Xi Wang. [Bug #6736]
-
-Wed Jul 18 23:57:38 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * pack.c (pack_pack): round down too long uuencode width. folding
- width in uuencode format cannot be longer than 63 bytes.
-
-Wed Jul 18 23:04:18 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * ext/dbm/dbm.c (fdbm_empty_p): fix wrong condition introduced in r36438.
-
- * ext/sdbm/init.c (fsdbm_empty_p): ditto.
-
-Wed Jul 18 23:08:57 2012 Tanaka Akira <akr@fsij.org>
-
- * test/ruby/test_beginendblock.rb: remove temporally files early.
-
-Wed Jul 18 22:43:02 2012 Tanaka Akira <akr@fsij.org>
-
- * test/ruby/test_autoload.rb: remove temporally files early.
-
-Wed Jul 18 21:59:46 2012 Tanaka Akira <akr@fsij.org>
-
- * test/ruby/test_argf.rb: use temporally directory.
-
-Wed Jul 18 19:41:19 2012 Tanaka Akira <akr@fsij.org>
-
- * test/openssl/test_config.rb: remove temporally files early.
-
-Wed Jul 18 17:45:26 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * error.c (rb_builtin_type_name): map by index.
-
-Wed Jul 18 16:17:40 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/mkmf.rb (have_framework): get rid of separating -framework
- option and its argument and dealing with the argument as a library
- or an object name. if $LDFLAGS were an array...
-
-Wed Jul 18 16:09:10 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * ext/curses/extconf.rb: support PDCurses. patched by Luis Lavena.
- [ruby-core:46485] [Feature #6735]
-
-Wed Jul 18 15:50:25 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * parse.y (primary): allow an empty grouped expression as the
- operand of the not operator (e.g., not ()).
- [ruby-core:45976] [Bug #6674]
-
- * parse.y (parser_yylex): show no warning for a grouped expression
- as the operand of the not operator (e.g., not (a)) or as an
- argument of a method call without parentheses (e.g., foo (a)).
- [ruby-core:39050] [Bug #5214]
-
-Wed Jul 18 15:33:21 2012 Koichi Sasada <ko1@atdot.net>
-
- * thread.c (rb_thread_call_without_gvl2): added.
- it can skip last CHECK_INTS. See document for more details.
- Document about it was updated a bit.
-
- * include/ruby/thread.h (decl. of rb_thread_call_without_gvl2): added.
-
- * thread.c (rb_thread_call_with_gvl): remove "EXPERIMENTAL!"
- warning from a document.
-
-Wed Jul 18 14:53:21 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in (EXTDLDFLAGS): split options for each extension
- libraries, and unused in ruby.pc. [Bug #6734]
-
- * lib/mkmf.rb (MakeMakefile#configuration): add EXTDLDFLAGS.
-
-Wed Jul 18 14:47:23 2012 Koichi Sasada <ko1@atdot.net>
-
- * thread.c: fix last commit miss.
-
-Wed Jul 18 14:16:51 2012 Koichi Sasada <ko1@atdot.net>
-
- * thread.c (rb_threadptr_async_errinfo_*): manage async errors queue.
- Async events such as an exception throwed by Thread#raise,
- Thread#kill and thread termination (after main thread termination)
- will be queued to th->async_errinfo_queue.
- - clear: clear the queue.
- - enque: enque err object into queue.
- - deque: deque err object from queue.
- - active_p: return 1 if the queue should be checked.
- rb_thread_t#thrown_errinfo was removed.
-
- * vm_core.h: add declarations of rb_threadptr_async_errinfo_*.
- remove rb_thread_t#thrown_errinfo field and
- add rb_thread_t#async_errinfo_queue (queue body: Array),
- rb_thread_t#async_errinfo_queue_checked (flag),
- rb_thread_t#async_errinfo_mask_stack(Array, not used yet).
-
- * vm.c (rb_thread_mark): fix a mark function.
-
- * cont.c (rb_fiber_start): enque an error.
-
- * process.c (after_fork): clear async errinfo queue.
-
-Wed Jul 18 14:25:55 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
-
- * pack.c: (ditto) bitwise operations are not char. Apply explicit
- casts on them.
-
-Wed Jul 18 12:59:50 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
-
- * encoding.c (load_encoding): explicit cast to suppress warning.
- Though the cast truncates some bits, from heuristic analysis I
- believe it is OK to do so here.
-
- * bignum.c (rb_cstr_to_inum): ditto.
-
-Wed Jul 18 12:55:54 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/benchmark.rb: Fix Benchmark.benchmark output with an empty
- caption. patched by Benoit Daloze. [ruby-core:45719] [Bug #6610]
-
-Wed Jul 18 10:00:54 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/debug.rb: Added toplevel documentation. Based on patch by Oscar
- Del Ben. [Bug #6743], fixes #146 on github.
-
-Wed Jul 18 09:33:59 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/win32ole/test_win32ole_event.rb (TestWIN32OLE_EVENT): use
- standard skip method to skip tests.
-
-Wed Jul 18 09:26:45 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/logger.rb: Updated typos and output to match modern Logger
- output. Patch by Marcus Stollsteimer. [Bug #6738]
-
-Wed Jul 18 07:59:29 2012 Takeyuki FUJIOKA <xibbar@ruby-lang.org>
-
- * lib/cgi/util.rb (CGI.escapeHTML,unescapeHTML): Add &apos; for HTML5
- escaping.
- [Feature #6620]
-
-Tue Jul 17 22:17:13 2012 Tanaka Akira <akr@fsij.org>
-
- * lib/open-uri.rb: call io.close! for Tempfile.
-
-Tue Jul 17 16:41:32 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * proc.c (rb_proc_arity): return normal value (not -n-1) if it is not
- a labmda, or it is a labmda and no arg_opts. [Bug #5694]
-
-Tue Jul 17 03:56:34 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/visitors/to_ruby.rb: strings with YAML anchors
- are properly referenced. Patched by Joe Rafaniello via Github:
- https://github.com/tenderlove/psych/pull/69
- * ext/psych/lib/psych/visitors/yaml_tree.rb: ditto
- * test/psych/test_alias_and_anchor.rb: test for change
-
-Mon Jul 16 23:20:24 2012 Tanaka Akira <akr@fsij.org>
-
- * bignum.c (rb_integer_float_cmp): use FIXNUM_MIN and FIXNUM_MAX,
- instead of LONG_MIN and LONG_MAX.
-
-Mon Jul 16 22:50:41 2012 Tanaka Akira <akr@fsij.org>
-
- * numeric.c (flo_to_s): use the exponential form if the integer part
- is longer than or equal DBL_DIG.
- [ruby-dev:45960] [ruby-trunk - Bug #6741]
-
-Mon Jul 16 22:01:00 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * ext/readline/readline.c: fixed docs. [Bug #6740][ruby-core:46501]
- patched by Nobuhiro IMAI.
-
-Mon Jul 16 19:24:01 2012 Tanaka Akira <akr@fsij.org>
-
- * bignum.c (rb_integer_float_eq): new function.
- (rb_big_eq): use rb_integer_float_eq.
-
- * internal.h (rb_integer_float_eq): declared.
-
- * numeric.c (flo_eq): use rb_integer_float_eq.
- (fix_equal): ditto.
-
-Mon Jul 16 19:02:31 2012 Tanaka Akira <akr@fsij.org>
-
- * bignum.c (rb_integer_float_cmp): rename a local variable.
-
-Mon Jul 16 18:40:26 2012 Tanaka Akira <akr@fsij.org>
-
- * bignum.c (rb_integer_float_cmp): renamed from rb_big_float_cmp.
-
- * internal.h: follow the above change.
-
- * numeric.c: ditto.
-
-Mon Jul 16 17:57:54 2012 Tanaka Akira <akr@fsij.org>
-
- * bignum.c (rb_big_float_cmp): compare an integer and float precisely.
- [ruby-core:31376] [Bug #3589] reported by Tomasz Wegrzanowski.
-
-Mon Jul 16 17:29:45 2012 Tanaka Akira <akr@fsij.org>
-
- * bignum.c (rb_big_float_cmp): support fixnum for argument x.
-
- * numeric.c (fix_equal): use rb_big_float_cmp.
- (fix_cmp): ditto.
- (fix_gt): ditto.
- (fix_ge): ditto.
- (fix_lt): ditto.
- (fix_le): ditto.
- (flo_eq): ditto.
- (flo_cmp): use rb_big_float_cmp for fixnum argument.
- (flo_gt): ditto.
- (flo_ge): ditto.
- (flo_lt): ditto.
- (flo_le): ditto.
-
-Mon Jul 16 17:05:53 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * test/fileutils/test_fileutils.rb: add test for FileUtils#uptodate?
-
-Mon Jul 16 16:56:12 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * lib/fileutils.rb (FileUtils.uptodate?): remove useless parameter.
- patched by Oscar Del Ben.[Bug #6708][ruby-core:46256]
-
-Mon Jul 16 15:37:56 2012 Tanaka Akira <akr@fsij.org>
-
- * bignum.c (rb_big_eq): use rb_big_float_cmp.
-
-Mon Jul 16 15:00:45 2012 Tanaka Akira <akr@fsij.org>
-
- * internal.h (rb_big_float_cmp): declared.
-
- * bignum.c (rb_big_float_cmp): extracted from rb_big_cmp and big_op.
- (rb_big_cmp): use rb_big_float_cmp.
- (big_op): ditto.
-
- * numeric.c (flo_cmp): use rb_big_float_cmp.
- (flo_gt): ditto.
- (flo_ge): ditto.
- (flo_lt): ditto.
- (flo_le): ditto.
-
-Mon Jul 16 14:14:21 2012 Tanaka Akira <akr@fsij.org>
-
- * bignum.c (enum big_op_t): new type.
- (big_op): use enum big_op_t.
- (big_gt): ditto.
- (big_ge): ditto.
- (big_lt): ditto.
- (big_le): ditto.
-
-Sat Jul 14 18:18:48 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * array.c (rb_get_values_at): fill with nil out of range.
- [ruby-core:43678] [Bug #6203]
-
-Sat Jul 14 17:17:55 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * cont.c (cont_restore_0): improve docs. [Bug #6706][ruby-core:46243]
- patched by Oscar Del Ben via https://github.com/ruby/ruby/pull/140
-
-Sat Jul 14 17:08:13 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * hash.c (rb_hash_s_create): raise an exception, when input elements
- are not one or two elements arrays. [ruby-core:39945] [Bug #5406]
-
-Sat Jul 14 16:16:48 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/test/unit.rb (Test::Unit::Runner#_run_parallel): use
- Array#uniq!.
-
- * lib/test/unit.rb (Test::Unit::Runner#deal): deal tasks to workers.
-
- * lib/test/unit.rb (Test::Unit::Runner#quit_workers): close and kill
- all workers.
-
- * lib/test/unit.rb (Test::Unit::Runner#delete_worker): delete dead
- worker from working set.
-
- * lib/test/unit.rb (Test::Unit::Runner#launch_worker): add new worker
- to working set.
-
- * lib/test/unit.rb (Test::Unit::Runner#launch_worker): extract.
-
- * lib/test/unit.rb (Test::Unit::Runner#start_watchdog): extract.
-
- * lib/test/unit.rb (Test::Unit::Runner#_run_parallel): move
- initializations with nothing to release outside begin/ensure.
-
-Sat Jul 14 16:04:24 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * array.c (rb_ary_join): should not infected by separator if it is not
- used. [ruby-core:42161][Bug #5902]
-
-Sat Jul 14 02:31:55 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * include/ruby/intern.h (rb_thread_blocking_region): fix declarations
- prototypes without arguments in C++ have different meanings than C.
-
-Thu Jul 12 12:32:26 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * test/runner.rb: skip default gems to get rid of loading old versions
- before installation.
-
-Thu Jul 12 11:44:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * string.c (rb_str_new_frozen): since the result object should have
- same tainted/untrusted bits with the original object, return new
- object if the shared object unmatch. [ruby-core:39745][Bug #5374]
-
-Thu Jul 12 10:46:39 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/net/http/test_http.rb (TestNetHTTPLocalBind#test_bind_to_local*):
- cannot cross between network interfaces on Windows, so skip this test
- until we find better test.
-
-Thu Jul 12 08:48:33 2012 Ryan Davis <ryand-ruby@zenspider.com>
-
- * lib/minitest/*: Imported minitest 3.2.0 (r7598)
- * test/minitest/*: ditto
-
-Thu Jul 12 05:11:41 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * insns.def (defined): use method entry and id in cfp for proper
- superclass, since klass in iseq is shared by dynamically defined
- methods from the same block. [ruby-core:45831][Bug #6644]
-
-Thu Jul 12 01:49:07 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/net/http.rb (Net::HTTP#connect): use local_host and local_port
- if specified. patched by Ricardo Amorim [Feature #6617]
-
-Wed Jul 11 17:36:39 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/extmk.rb: append ENCOBJS to DLDOBJS but not EXTSOLIBS which is
- not a target, to compile enc/encinit.c.
-
-Wed Jul 11 12:38:20 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * ext/openssl/ossl_pkey_ec.c (ossl_ec_point_mul): nonstatic initializer
- of an aggregate type is a C99ism.
-
- * ext/openssl/ossl_pkey_ec.c (ossl_ec_point_mul): get rid of VC++
- warnings.
-
-Mon Jul 9 16:11:30 2012 Yuki Yugui Sonoda <yugui@google.com>
-
- * vm_eval.c (rb_eval_string_from_file,
- rb_eval_string_from_file_protect): new functions to replace
- rb_compile_main_from_string() and ruby_eval_main().
-
- * nacl/pepper_ruby.c: Follows the change in vm_eval.c
-
-Mon Jul 9 14:05:42 2012 Yuki Yugui Sonoda <yugui@google.com>
-
- Reverts a half of r36079. As we discussed on ruby-dev@ and IRC,
- we do not need to disclose intermediate representation of program.
- The program embedding CRuby should use rb_eval_string family.
- * include/ruby/ruby.h (ruby_opaque_t): removed.
- (ruby_compile_main_from_file, ruby_compile_main_from_string,
- ruby_eval_main): removed.
-
- * eval.c (ruby_eval_main_internal): became ruby_exec_internal() again.
- (ruby_eval_main): removed.
-
- * ruby.c (PREPARE_PARSE_MAIN) reverted.
- (parse_and_compile_main, ruby_compile_main_from_file,
- ruby_compile_main_from_string): removed
-
-Wed Jul 11 10:16:38 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * include/ruby.h (HAVE_RUBY_THREAD_H): to show ruby/thread.h to be
- available. fixup of r36355.
-
-Wed Jul 11 03:26:47 2012 Eric Hodel <drbrain@segment7.net>
-
- * ext/zlib/zlib.c: Added streaming support to inflate processing.
- This allows zlib streams to be processed without huge memory growth.
- [Feature #6612]
- * NEWS: ditto
- * ext/zlib/zlib.c (zstream_expand_buffer): Uses rb_yield when a block
- is given for streaming support. Refactored to use
- zstream_expand_buffer_into to remove duplicate code.
- * ext/zlib/zlib.c (zstream_expand_buffer_protect): Added wrapper
- function to pass jump state back through GVL-free section to allow
- zstream clean-up before terminating the ruby call.
- * ext/zlib/zlib.c (zstream_expand_buffer_without_gvl): Acquire GVL to
- yield processed chunk of output stream.
- * ext/zlib/zlib.c (zstream_detach_buffer): When a block is given,
- returns Qnil mid-stream and yields the output buffer at the end of
- the stream.
- * test/zlib/test_zlib.rb: Updated tests
-
-Tue Jul 10 22:57:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * include/ruby/thread.h: new header file for thread stuff.
-
- * thread.c (rb_thread_call_without_gvl): export. [Feature#4328]
- returns void* instead of VALUE. [Feature #5543]
-
- * thread.c (rb_thread_blocking_region): deprecate. [ruby-core:46295]
-
-Tue Jul 10 10:48:59 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * include/ruby/win32.h (NT, NtInitialize): removed unused old macros.
-
-Tue Jul 10 10:43:37 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * configure.in: removed --enable/disable-win95 options. (see r36342)
-
-Tue Jul 10 00:44:41 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * include/ruby/ruby.h: Removed RUBY_GLOBAL_SETUP completely. It is
- no meaning definition since r24894.
- * main.c: ditto.
- * nacl/pepper_main.c: ditto.
-
-Mon Jul 9 23:59:36 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * dln.c: Simplify and make consistent an ifdef for Mac OS X.
- * ext/socket/rubysocket.h: ditto.
- * ext/tk/stubs.c: ditto.
- * io.c: ditto.
- * process.c: ditto.
- * signal.c: ditto.
- * vm_dump.c: ditto.
-
-Mon Jul 9 17:37:35 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/win32.c (win95_stat): removed unnecessary macro.
-
-Mon Jul 9 17:22:16 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/configure.bat, win32/setup.mak, win32/Makefile.sub: omitted
- Win9x support. removed --enable/disable-win95 options.
-
- * include/ruby/win32.h, file.c, win32/win32.c: ditto.
-
- * win32/README.win32: ditto.
-
-Mon Jul 9 13:28:34 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in (DLDFLAGS): use TARGET_ENTRY to specify an entry point
- instead of TARGET which may contain non-identifier characters.
-
- * lib/mkmf.rb (create_makefile): add TARGET_NAME which is the first
- part consists of only word characters. [ruby-core:46248][Bug #6709]
-
-Sun Jul 8 07:36:19 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (shadowing_lvar_gen, warn_unused_var): no warnings for
- variables starting with _. [ruby-core:46160][Feature #6693]
-
-Sat Jul 7 23:07:30 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
-
- * test/csv/test_features.rb: add require for Tempfile.
- * test/csv/test_serialization.rb: ditto.
-
-Fri Jul 6 06:49:50 2012 Eric Hodel <drbrain@segment7.net>
-
- * array.c (rb_ary_aref): Added a description of the behavior of
- index positioning. [Bug #6680]
- * array.c (rb_ary_aset): ditto. Reordered sentences for clarity.
- * string.c (rb_str_aref_m): Added a description of the behavior of
- index positioning
-
-Fri Jul 6 05:38:44 2012 Eric Hodel <drbrain@segment7.net>
-
- * string.c (rb_str_bytesize): Improve documentation. Patch by Oscar
- Del Ben from github issue #138.
- * string.c (rb_str_empty): ditto.
- * string.c (rb_str_times): ditto.
- * string.c (rb_str_dump): ditto.
- * string.c (rb_str_center): ditto.
-
-Fri Jul 6 04:05:59 2012 Eric Hodel <drbrain@segment7.net>
-
- * ext/zlib/zlib.c (zstream_expand_buffer_without_gvl): Use
- ruby_xrealloc() to avoid crash with CALC_EXACT_MALLOC_SIZE.
-
-Thu Jul 5 17:32:19 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * internal.h: move ThreadShield declarations from intern.h.
-
-Thu Jul 5 16:00:24 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * thread.c (ThreadShield): rename from Barrier.
-
-Thu Jul 5 15:14:50 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * bootstraptest/runner.rb (show_progress): refine error output. do not
- count non-empty error message, but just warn.
-
- * bootstraptest/runner.rb (error): show errors immediately if tty.
-
-Thu Jul 5 12:28:11 2012 Akinori MUSHA <knu@iDaemons.org>
-
- * test/net/http/test_httpresponses.rb: Add a test file for
- Net::HTTPResponses and put a test case for the previous bug.
-
-Thu Jul 5 06:33:52 2012 Mark Dodwell <mark@mkdynamic.co.uk>
-
- * lib/net/http/responses.rb: Fix 4xx classes to inherit correctly
- from Net::HTTPClientError. [Bug #6700]
-
-Wed Jul 4 21:55:35 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * ruby.c (proc_options): warn only if -K and -w option is specified.
- see also r36274 [Feature #5206]
-
-Wed Jul 4 21:41:44 2012 Naohisa Goto <ngotogenome@gmail.com>
-
- * gc.c, atomic.h (ATOMIC_SIZE_*): moved from gc.c to atomic.h
- [ruby-dev:45909]
-
-Wed Jul 4 19:13:15 2012 Masaki Suketa <masaki.suketa@nifty.ne.jp>
-
- * test/win32ole/test_win32ole.rb (test_s_codepage_changed):
- FileSystemObject only supports ANSI or UTF-16LE encoding.
- Patch by h.shirosaki (Hiroshi Shirosaki) [ruby-trunk - Bug #6650]
-
-Wed Jul 4 11:52:12 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * gc.c (ATOMIC_SIZE_*): 64bit Windows support.
-
-Wed Jul 4 11:11:28 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * eval.c (rb_frame_callee, rb_f_callee_name): fix to return the
- called id. this longstanding bug has been caused and blocked by
- the structure of old rb_control_frame_t and rb_iseq_t.
-
- * vm_insnhelper.c (vm_push_frame): set proper method entry.
-
-Wed Jul 4 08:29:31 2012 Eric Hodel <drbrain@segment7.net>
-
- * array.c (rb_ary_aref): Updated documentation to indicate the
- starting index is an index into the array or string. Updated
- examples to show behavior of indexes at the end of an array or
- string. Based on patch by Marcus Stollsteimer. [Bug #6680]
- * array.c (rb_ary_aset): ditto.
- * string.c (rb_str_aref): ditto. Also added descriptive argument
- names to call-seq section.
-
-Wed Jul 4 07:05:59 2012 Eric Hodel <drbrain@segment7.net>
-
- * test/zlib/test_zlib.rb (test_inflate_partial_input): Added test for
- inflating incomplete zlib streams.
-
-Tue Jul 3 23:14:16 2012 Naohisa Goto <ngotogenome@gmail.com>
-
- * gc.c (ATOMIC_SIZE_EXCHANGE): fix function name on Solaris [Bug #6689]
- [ruby-dev:45904]
-
-Tue Jul 3 16:07:49 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * gc.c (vm_malloc_fixup, vm_xrealloc, vm_xfree, after_gc_sweep): use
- atomic operations to update malloc_params.
-
-Tue Jul 3 14:50:16 2012 Eric Hodel <drbrain@segment7.net>
-
- * ext/zlib/zlib.c (zstream_run_func): Don't exit run loop for buffer
- error. [Feature #6615]
- * ext/zlib/zlib.c: Fix style to match existing functions.
-
-Tue Jul 3 12:05:51 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * ext/dl/cfunc.c (rb_dlcfunc_call): also needed the workaround for VC8
- for x64. [ruby-dev:45875] [Bug #6676]
- reported by aves_ramphastos (Seigo Ishigane)
-
-Tue Jul 3 11:56:46 2012 Eric Hodel <drbrain@segment7.net>
-
- * ext/zlib/zlib.c (zstream_detach_buffer): Refactored tainting of
- output string, moving it from the callee to zstream_detach_buffer.
- * ext/zlib/zlib.c (rb_zstream_finish): ditto
- * ext/zlib/zlib.c (rb_zstream_flush_next_out): ditto
- * ext/zlib/zlib.c (rb_deflate_deflate): ditto
- * ext/zlib/zlib.c (rb_deflate_flush): ditto
- * ext/zlib/zlib.c (rb_inflate_inflate): ditto
-
-Tue Jul 3 11:16:06 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * common.mk (runnable): make symbolic links to run in build directory.
-
-Tue Jul 3 10:46:06 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * ruby.c (proc_options): warn if -K option is specified. [Feature #5206]
-
-Tue Jul 3 06:12:13 2012 Eric Hodel <drbrain@segment7.net>
-
- * object.c (Init_Object): Added RDoc location pointers for
- Kernel#methods, Kernel#protected_methods, Kernel#private_methods and
- Kernel#public_methods. [Bug #6666]
-
-Tue Jul 3 06:02:54 2012 Eric Hodel <drbrain@segment7.net>
-
- * ext/zlib/zlib.c (zstream_run): Process zlib streams without GVL.
- [Feature #6615]
- * NEWS: ditto.
-
-Mon Jul 2 22:13:04 2012 Tanaka Akira <akr@fsij.org>
-
- * thread.c (rb_thread_aref): add explanation for why Thread#[] and
- Thread#[]= are fiber-local and not thread-local.
- reported by Julien A. [ruby-core:41606] [ruby-trunk - Bug #5750]
-
-Mon Jul 2 21:25:55 2012 Tanaka Akira <akr@fsij.org>
-
- * time.c (timew_out_of_timet_range): specialization for
- SIZEOF_TIME_T == SIZEOF_INT64_T.
-
-Mon Jul 2 17:06:32 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * class.c (rb_include_module): include modules after the origin.
-
- * class.c (include_modules_at): skip prepended modules.
-
- * class.c (rb_prepend_module): now basic.klass in ICLASS refers the
- old original class/module. [ruby-dev:45868][Bug #6662]
-
- * class.c (rb_mod_ancestors): ditto.
-
- * vm_method.c (search_method): search method entry from the origin
- iclass.
-
-Mon Jul 2 05:54:58 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * ext/date/date_core.c: [ruby-core:46058].
-
-Mon Jul 2 05:35:43 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * ext/date/date_core.c (d_lite_marshal_load): accepts old dump.
-
-Mon Jul 2 03:21:53 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * README.EXT.ja: fixed args of have_struct_member() ,
- create_makefile() same as r35977. however, mkmf.rb include
- no Japanese-docs, so Appendix C was not removed. [Bug #6597]
-
-Fri Jun 29 05:08:41 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/test/unit/parallel.rb: workaround fix for rubygems.
- RubyGems can't find rake if the source directory is not equal to
- the directory which is running the test. [Bug #6604]
-
-Thu Jun 28 20:33:15 2012 Luis Lavena <luislavena@gmail.com>
-
- * test/win32ole/test_win32ole.rb (test_s_codepage_changed):
- FileSystemObject only supports ANSI or UTF-16LE encoding.
- Patch by bosko (Bosko Ivanisevic) [ruby-trunk - Bug #6650]
-
-Thu Jun 28 09:27:09 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
-
- * class.c (class_instance_method_list): consider prepended Class/Module
- when recur != 0. [ruby-dev:45863] [Bug #6660]
-
- * test/ruby/test_module.rb (test_prepend_instance_methods_false): add
- a test for it.
-
-
-Thu Jun 28 06:12:42 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * class.c (rb_mod_ancestors): fix ancestors order.
- [ruby-core:45919][Bug #6658] [ruby-dev:45861][Bug #6659]
-
-Wed Jun 27 21:28:59 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-
- * lib/racc/parser.rb: NotImplementError is not exist.
-
- * lib/irb/output-method.rb (IRB::OutputMethod#print): ditto.
-
-Wed Jun 27 21:31:13 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * class.c (rb_prepend_module): ancestors of prepending module also
- should be included. [ruby-core:45914][Bug #6654]
-
-Wed Jun 27 21:01:32 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * class.c (class_instance_method_list): m_tbl in prepended
- class/module is NULL. [ruby-core:45915][Bug #6655]
-
-Wed Jun 27 16:48:48 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * class.c (rb_prepend_module): prepend module into another module.
-
- * eval.c (rb_mod_prepend): new method Module#prepend. [Feature #1102]
-
-Wed Jun 27 09:15:46 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * io.c (is_popen_fork): check if fork and raise NotImplementedError if
- unavailable.
-
- * io.c (rb_io_s_popen): allow environment variables hash and exec
- options as flat parameters, not in an array arguments.
- [Feature#6651] [EXPERIMENTAL]
-
- * process.c (rb_execarg_extract_options): extract exec options, but no
- exceptions on non-exec options and returns them as a Hash.
-
- * process.c (rb_execarg_setenv): set environment variables.
-
-Tue Jun 26 16:57:14 2012 Koichi Sasada <ko1@atdot.net>
-
- * thread_pthread.c (register_cached_thread_and_wait):
- return immediately if malloc() failed.
- [ruby-core:43960] [ruby-trunk - Bug #6235]
-
- * thread_pthread.c (USE_THREAD_CACHE): check already defined or not.
-
-Tue Jun 26 10:01:56 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * io.c (rb_io_s_popen): revert r36213 "popen: shell commands with
- envvar" because it disabled to let single command bypass shell.
-
-Mon Jun 25 17:49:28 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * class.c (rb_mix_module): revert Module#mix.
-
-Mon Jun 25 16:57:38 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * proc.c (rb_mod_define_method): allow method transplanting from a
- module to either class or module. [ruby-core:34267][Feature #4254]
-
-Mon Jun 25 11:34:45 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * internal.h: use rb_pid_t instead of pid_t because of there is no
- definition of pid_t here on Windows.
-
-Mon Jun 25 00:25:01 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * configure.in (for stack end address): remove human68k specific
- check. It is no longer supported.
-
-Sun Jun 24 23:02:17 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * io.c (pipe_open): merge win32 code using spawnv().
-
-Sun Jun 24 22:53:42 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * process.c (check_exec_fds): separate check_exec_fds_1() since
- nonstatic initializer of an aggregate type is not allowed by C89.
-
-Sun Jun 24 07:47:17 2012 Tanaka Akira <akr@fsij.org>
-
- * internal.h (rb_execarg): options field removed.
-
- * process.c: follow the rb_execarg change.
-
-Sat Jun 23 23:48:21 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (proc_spawn_cmd): unused variable removed to suppress a
- warning.
- (save_env): ditto.
-
- [ruby-core:45797] reported by Luis Lavena.
-
-Sat Jun 23 23:19:31 2012 Tanaka Akira <akr@fsij.org>
-
- * internal.h (rb_execarg): add new_pgroup_given and new_pgroup_flag
- fields.
-
- * process.c (EXEC_OPTION_NEW_PGROUP): removed.
- (proc_spawn_cmd): take a struct rb_execarg argument.
- use the new fields.
- (rb_execarg_addopt): use the new fields.
- (rb_spawn_process): follow the proc_spawn_cmd change.
-
- [ruby-core:45794] [ruby-trunk - Bug #6633] reported by Luis Lavena.
-
-Sat Jun 23 20:26:36 2012 Tanaka Akira <akr@fsij.org>
-
- * internal.h (rb_execarg): add fd_dup2, fd_close, fd_open,
- fd_dup2_child fields.
-
- * process.c (EXEC_OPTION_DUP2): removed.
- (EXEC_OPTION_CLOSE): removed.
- (EXEC_OPTION_OPEN): removed.
- (EXEC_OPTION_DUP2_CHILD): removed.
- (mark_exec_arg): mark the new fields.
- (check_exec_redirect1): change condition for default option.
- (check_exec_redirect): take a struct rb_execarg argument.
- use the new fields.
- (rb_execarg_addopt): follow the check_exec_redirect change.
- (check_exec_fds): use the new fields.
- (save_redirect_fd): ditto.
-
-Sat Jun 23 19:01:18 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_execarg_fixup): fix envopts condition.
-
-Sat Jun 23 18:44:13 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (check_exec_redirect1): extracted from
- check_exec_redirect.
-
-Sat Jun 23 17:22:02 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (save_env): don't use EXEC_OPTION_UNSETENV_OTHERS.
- (rb_execarg_run_options): ditto.
-
-Sat Jun 23 17:04:08 2012 Tanaka Akira <akr@fsij.org>
-
- * internal.h (rb_execarg): add env_modification field.
-
- * process.c (EXEC_OPTION_ENV): removed.
- (mark_exec_arg): mark env_modification field.
- (rb_exec_fillarg): update the new field, instead of options array.
- (rb_execarg_fixup): use the new field.
- (save_env): ditto.
- (rb_execarg_run_options): ditto.
-
-Sat Jun 23 16:27:01 2012 Tanaka Akira <akr@fsij.org>
-
- * internal.h (rb_execarg): add rlimit_limits field.
-
- * process.c (EXEC_OPTION_RLIMIT): removed.
- (mark_exec_arg): mark rlimit_limits field.
- (rb_execarg_addopt): update the new fields, instead of options array.
- (run_exec_rlimit): use the new field.
- (rb_execarg_run_options): clear sarg using MEMZERO. use the new
- field.
-
-Sat Jun 23 14:29:25 2012 Tanaka Akira <akr@fsij.org>
-
- * internal.h (rb_execarg): add chdir_given and chdir_dir fields.
-
- * process.c (EXEC_OPTION_CHDIR): removed.
- (mark_exec_arg): mark chdir_dir field.
- (rb_execarg_addopt): update the new fields, instead of options array.
- (rb_execarg_run_options): use the new fields.
-
-Sat Jun 23 13:20:47 2012 Tanaka Akira <akr@fsij.org>
-
- * internal.h (rb_execarg): add close_others_given, close_others_do and
- close_others_maxhint fields.
-
- * process.c (EXEC_OPTION_CLOSE_OTHERS): removed.
- (rb_execarg_addopt): update the new fields, instead of options array.
- (check_exec_fds): take eargp as an argument. update the
- close_others_maxhint field.
- (rb_execarg_fixup): follow the argument change of check_exec_fds.
- (rb_execarg_run_options): use the new fields.
-
-Sat Jun 23 10:41:59 2012 Tanaka Akira <akr@fsij.org>
-
- * internal.h (rb_execarg): add unsetenv_others_given and
- unsetenv_others_do fields.
-
- * process.c (EXEC_OPTION_UNSETENV_OTHERS): removed.
- (rb_execarg_addopt): update the new fields, instead of options array.
- (rb_execarg_fixup): use the new fields.
-
-Sat Jun 23 09:35:47 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c: use the variable name "soptions" for sargp->options.
-
-Sat Jun 23 09:17:49 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c: use the name "sargp" for struct rb_execarg variables
- consistently for saving process attributes.
-
- * io.c: ditto.
-
-Sat Jun 23 07:59:57 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c: use the name "eargp" for struct rb_execarg variables
- consistently except for saving process attributes.
-
- * io.c: ditto.
-
- * ext/pty/pty.c: ditto.
-
-Wed Jun 20 18:27:03 2012 Yuki Yugui Sonoda <yugui@google.com>
-
- * common.mk: Add missing dependencies.
-
-Fri Jun 22 20:27:39 2012 Tanaka Akira <akr@fsij.org>
-
- * internal.h (rb_execarg): add pgroup_given and pgroup_pgid fields.
-
- * process.c (EXEC_OPTION_PGROUP): removed.
- (rb_execarg_addopt): update the new fields, instead of options array.
- (run_exec_pgroup): take a struct rb_execarg argument. refer the new
- fields.
- (rb_execarg_run_options): follow run_exec_pgroup change.
-
-Fri Jun 22 18:48:51 2012 Kouhei Sutou <kou@cozmixng.org>
-
- * README.EXT, README.EXT.ja: use "sval" for the third argument
- name of Data_Wrap_Struct().
- Suggested by @satoh_fumiyasu. Thanks!!!
-
-Fri Jun 22 18:04:26 2012 Koichi Sasada <ko1@atdot.net>
-
- * iseq.c, vm_eval.c: set th->base_block properly.
- th->base_block is information for (a) parsing, (b) compiling
- and (c) setting up the frame to execute the program passed by
- `eval' method. For example, (1) parser need to know up-level
- variables to detect it is variable or method without paren.
- Befor (a), (b) and (c), VM set th->base_block by passed bindng
- (or previous frame information). After execute (a), (b) and (c),
- VM should clear th->base_block. However, if (a), (b) or (c)
- raises an exception, then th->base_block is not cleared.
- Problem is that the uncleared value th->balo_block is used for
- irrelevant iseq compilation. It causes SEGV or critical error.
- I tried to solve this problem: to clear them before exception,
- but finally I found out that it is difficult to do it (Ruby
- program can be run in many places).
- Because of this background, I set th->base_block before
- compiling iseq and restore it after compiling.
- Basically, th->base_block is dirty hack (similar to global
- variable) and this patch is also dirty.
-
- * bootstraptest/test_eval.rb: add a test for above.
-
- * internal.h: remove unused decl.
-
- * iseq.c (rb_iseq_compile_with_option): add base_block parameter.
- set th->base_block before compilation and restore it after
- compilation.
-
- * ruby.c (require_libraries): pass 0 as base_block instead of
- setting th->base_block
-
- * tool/compile_prelude.rb (prelude_eval): apply above changes.
-
- * vm.c, vm_eval.c: ditto.
-
- * vm_core.h: add comments.
-
-Fri Jun 22 18:19:38 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c: pass struct rb_execarg value instead of its options
- field for saving process attribute changing functions.
- (save_redirect_fd): take a struct rb_execarg argument.
- (run_exec_dup2): ditto.
- (run_exec_close): ditto.
- (run_exec_open): ditto.
- (run_exec_dup2_child): ditto.
- (run_exec_pgroup): ditto.
- (run_exec_rlimit): ditto.
- (save_env): ditto.
- (rb_execarg_run_options): follow the above functions change.
-
-Fri Jun 22 17:55:48 2012 Koichi Sasada <ko1@atdot.net>
-
- * test/ruby/test_backtrace.rb: decrease recursion depth
- to reduce consuming stack size.
-
-Fri Jun 22 13:36:50 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * random.c (random_init, random_load): cannot initialize frozen object
- again, nor with tainted/untrusted object. [Bug #6540]
-
-Fri Jun 22 13:32:33 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * error.c (rb_check_copyable): new function, to ensure the target is
- not frozen and the source is not tainted nor untrusted.
-
-Fri Jun 22 05:55:20 2012 Eric Hodel <drbrain@segment7.net>
-
- * eval.c (ruby_cleanup): Fixed typo. Patch by Trever Dawe.
- Fixes #131 (github). [ruby-trunk - Bug #6619]
-
-Thu Jun 21 21:16:58 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_execarg_addopt): take a VALUE argument instead of
- struct rb_execarg.
- (rb_exec_arg_addopt): follow the rb_execarg_addopt change.
- (check_exec_options_i): ditto.
-
- * io.c (pipe_open): follow the rb_execarg_addopt change.
-
- * internal.h (rb_execarg_addopt): follow the definition change.
-
-Thu Jun 21 20:34:19 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_exec_fillarg): take a VALUE argument instead of
- struct rb_execarg.
- (rb_check_exec_options): ditto.
- (check_exec_options_i): ditto.
-
-Thu Jun 21 19:48:05 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_exec_async_signal_safe): use rb_execarg_run_options
- instead of rb_run_exec_options_err.
- (rb_spawn_process): ditto.
-
-Thu Jun 21 19:02:43 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_exec_fillarg): take a VALUE argument instead of
- struct rb_execarg.
- (rb_execarg_init): follow the rb_exec_fillarg change.
-
-Thu Jun 21 18:36:43 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_execarg_init): take a VALUE argument instead of
- struct rb_execarg.
- (rb_execarg_new): follow the rb_execarg_init change.
- (rb_exec_arg_init): ditto.
-
- * internal.h (rb_execarg_init): follow the definition change.
-
-Thu Jun 21 17:20:44 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (new_args_tail_gen): fix GC problem of keyword rest
- argument. the wrapped struct should be bound to the wrapping node
- before assignment of child nodes, to get rid of the case the
- children are referred by only the struct pointer which is not a
- subject of GC. [ruby-core:45744]
-
-Thu Jun 21 07:06:52 2012 Koichi Sasada <ko1@atdot.net>
-
- * error.c (err_append): rename err_append() to compile_err_append()
- and move definition body. err_append() is used only by compiling.
-
-Thu Jun 21 06:21:54 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_execarg_fixup): take a VALUE argument instead of
- struct rb_execarg.
-
- * internal.h (rb_execarg_fixup): follow the definition change.
-
- * io.c (pipe_open): follow rb_execarg_fixup change.
-
- * ext/pty/pty.c (establishShell): ditto.
-
-Wed Jun 20 21:25:37 2012 Tanaka Akira <akr@fsij.org>
-
- * internal.h (struct rb_execarg): add umask_given and umask_mask
- fields.
-
- * process.c (STATIC_ASSERT): removed.
- (rb_execarg_addopt): follow the rb_execarg change.
- (rb_execarg_run_options): ditto.
-
-Wed Jun 20 20:38:23 2012 Tanaka Akira <akr@fsij.org>
-
- * internal.h (struct rb_execarg) moved and renamed from
- struct rb_exec_arg in intern.h.
-
- * include/ruby/intern.h (struct rb_exec_arg): refer Data object which
- contains struct rb_execarg.
-
- * process.c: use struct rb_execarg instead of struct rb_exec_arg
- except functions declared in intern.h.
- (rb_exec_arg_addopt): extract a pointer to struct rb_execarg from
- struct rb_exec_arg.
- (rb_exec_arg_init): ditto.
- (rb_exec_arg_fixup): ditto.
- (rb_run_exec_options_err): ditto.
- (rb_run_exec_options): ditto.
- (rb_exec_err): ditto.
- (rb_exec): ditto.
-
- * io.c: use struct rb_execarg instead of struct rb_exec_arg.
-
- * ext/pty/pty.c: ditto.
-
-Wed Jun 20 19:13:25 2012 Tanaka Akira <akr@fsij.org>
-
- * internal.h (rb_execarg_new): declared.
- (rb_execarg_get): ditto.
-
- * process.c (mark_exec_arg): new function.
- (free_exec_arg): ditto.
- (memsize_exec_arg): ditto.
- (exec_arg_data_type): defined.
- (rb_execarg_new): new function.
- (rb_execarg_get): ditto.
- (rb_f_exec): use rb_execarg_new.
- (rb_spawn_internal): ditto.
- (rb_f_spawn): ditto.
-
- * io.c (pipe_open_v): use rb_execarg_new.
- (pipe_open_s): ditto.
-
- * ext/pty/pty.c (establishShell): use rb_execarg_new.
-
-Wed Jun 20 16:36:14 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * missing/setproctitle.c (environ): use (*_NSGetEnviron()) instead of
- environ on Darwin for namespace cleanness, same as [ruby-core:00537].
- [ruby-core:45615] [Bug #6576]
-
-Wed Jun 20 11:33:04 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * process.c (rb_execarg_addopt): always make Fixnum, and ignore higher
- bits in too large umask value.
-
-Wed Jun 20 11:24:35 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/test/unit.rb (Test::Unit::Runner#_run_parallel): deal with
- sudden-death of workers.
-
-Mon Jun 18 20:34:20 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * time.c (init_leap_second_info): fix non-ANSI function declaration.
-
-Mon Jun 18 20:29:04 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * ruby.c (rb_f_sub): use ansi style declaration.
- * ruby.c (rb_f_gsub): ditto.
- * ruby.c (rb_f_chomp): ditto.
-
-Mon Jun 18 20:26:23 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * random.c (rb_random_int32): get rid of "warning: constant 0x100000000
- is so big it is long" warning.
-
-Mon Jun 18 20:07:23 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * dir.c (dir_initialize): get rid of "unused return: argc = rb_scan_args()"
- warning.
-
-Mon Jun 18 19:31:20 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * include/ruby/missing.h: include math.h before checking INFINITY
- and NAN. Otherwise, strange macro redefinition will occur.
-
-Mon Jun 18 19:12:37 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * array.c (ary_reverse): use ansi style declaration.
-
-Tue Jun 19 18:43:50 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * include/ruby/backward/rubysig.h: fix visibility. [Bug #6607]
-
-Tue Jun 19 17:51:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * process.c (rb_execarg_run_options): do not call any methods in the
- async-signal-safe function. mask has been checked with NUM2MODET()
- already and converted with LONG2NUM().
-
-Tue Jun 19 11:59:56 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * ext/readline/readline.c (Init_readline): don't set 0 to
- rl_catch_signals and rl_catch_sigwinch. [Bug #5423]
-
-Tue Jun 19 11:52:59 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * ext/readline/readline.c (readline_s_get_special_prefixes): suppress
- warning: uninitialized instance variable.
-
-Tue Jun 19 11:43:16 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * ext/readline/readline.c (readline_getc): fix editline compatibility
- broken by r36123. [Bug #6601]
-
-Mon Jun 18 17:10:08 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * string.c (rb_str_subpos): split from rb_str_substr. returns
- adjusted position for substring.
-
-Mon Jun 18 10:42:57 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/readline/readline.c (readline_getc): deal with ESC just followed
- by ASCII as meta prefix in incremental search mode. based on the
- patch from rctay (Tay Ray Chuan) at [ruby-core:45682]. [Bug #6601]
-
-Sun Jun 17 22:23:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * dir.c (rb_file_directory_p): move documentation for Dir.exist? from
- file.c so that the proper description will be shown instead of the
- documentation of File.directory?. [ruby-core:45685]
-
-Sun Jun 17 16:21:01 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * thread_win32.h (rb_thread_lock_t): make a union for USE_WIN32_MUTEX.
- this internal is used only in thread_win32.c, but has to be complete
- to define rb_thread_t.
-
- * thread_win32.c (native_mutex_lock, native_mutex_destroy): fix for
- USE_WIN32_MUTEX.
-
- * thread_win32.c (native_cond_timedwait_ms): rename reserved pattern
- name. user defined symbols should not start with __.
-
-Sat Jun 16 19:24:01 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * ext/date/date_core.c: define date_sg_t.
-
-Sat Jun 16 18:46:57 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * ext/date/date_tmx.h: offset in struct tmx_funcs is now int.
- * ext/date/date_strftime.c: ditto.
- * ext/date/date_core.c: ditto.
-
-Sat Jun 16 18:31:46 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * eval.c (ruby_setup): set running state in the normal case before
- popping a tag.
-
-Sat Jun 16 07:46:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/test/unit.rb (Test::Unit::Runner#_run_parallel): format workers
- results in the parent.
-
-Sat Jun 16 07:12:56 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * tool/runruby.rb (File.realpath): return real path of expanded path.
- [Bug #6598]
-
-Sat Jun 16 07:12:28 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * bootstraptest/runner.rb (main): ignore -j option for compatibility
- with test/unit.
-
-Sat Jun 16 07:11:52 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/test/unit.rb (Test::Unit::Runner#puke): modify only result and
- drop useless reports, not override entirely.
-
- * lib/test/unit/parallel.rb (Test::Unit::Worker#_run_suite): report
- unformatted results. formatting messages is not a workers task.
-
- * lib/test/unit/parallel.rb (Test::Unit::Worker#puke): store raw
- results.
-
-Sat Jun 16 01:27:14 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych.rb: bumping psych to 1.3.3
- * ext/psych/psych.gemspec: ditto
-
-Fri Jun 15 20:54:28 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-
- * vm_backtrace.c (backtrace_collect): rename from backtreace_collect.
-
-Fri Jun 15 19:22:13 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_core.h: remove VM_FRAME_MAGIC_FINISH (finish frame type).
- Before this commit:
- `finish frame' was place holder which indicates that VM loop
- needs to return function.
- If a C method calls a Ruby methods (a method written by Ruby),
- then VM loop will be (re-)invoked. When the Ruby method returns,
- then also VM loop should be escaped. `finish frame' has only
- one instruction `finish', which returns VM loop function.
- VM loop function executes `finish' instruction, then VM loop
- function returns itself.
- With such mechanism, `leave' instruction (which returns one
- frame from current scope) doesn't need to check that this `leave'
- should also return from VM loop function.
- Strictly, one branch can be removed from `leave' instruction.
- Consideration:
- However, pushing the `finish frame' needs costs because
- it needs several memory accesses. The number of pushing
- `finish frame' is greater than I had assumed. Of course,
- pushing `finish frame' consumes additional control frame.
- Moreover, recent processors has good branch prediction,
- with which we can ignore such trivial checking.
- After this commit:
- Finally, I decide to remove `finish frame' and `finish'
- instruction. Some parts of VM depend on `finish frame',
- so the new frame flag VM_FRAME_FLAG_FINISH is introduced.
- If this frame should escape from VM function loop, then
- the result of VM_FRAME_TYPE_FINISH_P(cfp) is true.
- `leave' instruction checks this flag every time.
- I measured performance on it. However on my environments,
- it improves some benchmarks and slows some benchmarks down.
- Maybe it is because of C compiler optimization parameters.
- I'll re-visit here if this cause problems.
-
- * insns.def (leave, finish): remove finish instruction.
-
- * vm.c, vm_eval.c, vm_exec.c, vm_backtrace.c, vm_dump.c:
- apply above changes.
-
-Fri Jun 15 19:11:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/test/unit.rb (Test::Unit::Runner#puke): always add skipped
- results to the report for parallel test. [Bug #6595]
-
-Fri Jun 15 09:01:35 2012 Yuki Yugui Sonoda <yugui@google.com>
-
- * nacl/pepper_main.c: Removed an unnecessary and erroneous inclusion.
-
-Thu Jun 14 22:59:56 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in (RUBY_CPPOUTFILE): check if output is really sent to
- specified file to tell if -o option works. [ruby-dev:45742]
- [Bug#6591]
-
- * configure.in (RUBY_CPPOUTFILE): check if output file is actually
- created. [ruby-dev:45742] [Bug#6591]
-
-Thu Jun 14 22:10:50 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (proc_exec_sh): don't strip leading spaces of the script.
-
-Thu Jun 14 15:54:02 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * file.c (rb_file_s_basename, rb_file_s_dirname): documentation fix.
- File.basename and File.dirname support File::ALT_SEPARATOR.
-
-Thu Jun 14 11:10:10 2012 Yuki Yugui Sonoda <yugui@google.com>
-
- * nacl/pepper_main.c: Applies the new embedding API to pepper_ruby.
-
-Thu Jun 14 10:44:41 2012 Yuki Yugui Sonoda <yugui@google.com>
-
- * include/ruby/ruby.h: Grouped APIs for embedding CRuby interpreter.
- (ruby_setup, ruby_compile_main_from_file,
- ruby_compile_main_from_string, ruby_eval_main,
- ruby_set_script_name): new APIs to embed CRuby.
- (ruby_opaque_t) Opaque pointer to an internal data, to NODE or iseq
- in particular.
-
- * eval.c (ruby_setup): Similar to ruby_init but returns an error code
- instead of exit(3) on error.
- (ruby_eval_main): Similar to ruby_exec_node but returns the
- evaluation result.
- (ruby_eval_main_internal): renamed from ruby_exec_internal.
-
- * ruby.c (toplevel_context): new helper function.
- (PREPARE_EVAL_MAIN): moved.
- (process_options): refactored with new functions.
- (parse_and_compile_main) new helper function.
- (ruby_compile_main_from_file, ruby_compile_main_from_string) new API
- (ruby_set_script_name): new API.
-
-
-Thu Jun 14 10:39:48 2012 Yuki Yugui Sonoda <yugui@google.com>
-
- * eval.c: Add doxygen comments.
-
- * ruby.c: ditto.
-
- * thread_pthread.c: ditto
-
- * version.c: ditto.
-
- * vm_core.h: ditto.
-
-Thu Jun 14 10:16:07 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * configure.in: revert r36071 and add NetBSD to blacklist of -ansi.
-
-Thu Jun 14 07:59:12 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * thread_pthread.c (get_stack): Linux is the only OS which includes
- the size of guard page into the stack size.
-
-Thu Jun 14 06:21:00 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/drb/drb.rb: Replace broken links to the English DRb book.
- Patch by Zachary Scott. [ruby-trunk - Bug #6544]
-
-Thu Jun 14 06:17:47 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/observer.rb: Update broken link to the Programming Ruby book.
- Patch by Zachary Scott. [ruby-trunk - Bug #6536]
- * lib/drb/drb.rb: ditto.
-
-Thu Jun 14 05:23:05 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * regparse.c (PFETCH_READY): suppress Wunused-but-set-variable.
-
- * regparse.c (is_onechar_cclass): restructured to clarify that c is
- used iff found == 1.
-
-Thu Jun 14 02:54:17 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * configure.in: use -fbuiltin with -ansi -std=iso9899:199409.
- This prevents errors introduced by disabling builtin functions,
- which is the sub-effect of -ansi/-std.
- Now NetBSD can use -ansi -std=iso9899:199409.
- Maybe mingw, cygwin and darwin can also.
-
-Thu Jun 14 02:53:30 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * Makefile.in: don't remove macros. now name2ctype uses macros.
-
- * tool/enc-unicode.rb: add comment why it uses Hash#index.
-
- * enc/unicode/{name2ctype.kwd,name2ctype.src,name2ctype.h.blt}:
- update to follow the current name2ctype.h.
- FYI current Unicode version is 6.1.
-
-Thu Jun 14 00:16:59 2012 Akinori MUSHA <knu@iDaemons.org>
-
- * lib/net/http/responses.rb, lib/webrick/httpstatus.rb: Add HTTP
- response codes added in RFCs 2817 and 4918. [ruby-core:45547]
- [Feature #6569]
-
- * lib/net/http/responses.rb: Rename Net::HTTPMultipleChoice to
- Net::HTTPMultipleChoices, leaving the former as alias to the
- latter for backward compatibility. [ruby-core:45547]
- [Feature #6569]
-
- * lib/net/http/responses.rb: Add comments about unused,
- still-in-draft and private extension response codes.
- [ruby-core:45547] [Feature #6569]
-
-Wed Jun 13 22:44:32 2012 Naohisa Goto <ngotogenome@gmail.com>
-
- * test/dl/test_func.rb (test_qsort1, test_qsort2): use TYPE_SIZE_T
- for size_t variables. [ruby-dev:45733] [Bug #6584]
-
-Wed Jun 13 22:18:01 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in: remove -ansi and -std options for lgamma_r() and
- finite().
-
-Wed Jun 13 21:46:34 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in: cygwin does not provide some declarations in strict
- ANSI mode.
-
-Wed Jun 13 20:19:59 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_fork_internal): move a variable declaration.
-
-Wed Jun 13 17:54:38 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
-
- * regparse.c (PFETCH_READY): this line was to suppress warning,
- but did emit warnings if -Wuninitialized was set. Assigning
- NULL instead if pfetch_prev should suffice the situation.
-
-Wed Jun 13 17:51:05 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in: cygwin needs C99 for some stuff, e.g.,
- pthread_attr_setstacksize, sched_yield.
-
-Wed Jun 13 17:50:43 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * Makefile.in (.c.i): add warnflags to make the result consistent with
- compilation.
-
-Wed Jun 13 15:12:07 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
-
- * configure.in: On Windows platforms, system provided headers are
- VC++ optimized. That is, C++ habits are often contaminated into
- various headers. Most frequent situation is the use of //
- comments. We bypass ANSI C mode for them. Otherwise extension
- libs cannot include those headers.
-
-Wed Jun 13 13:39:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * include/ruby/win32.h: get rid of C99 style one line comments.
-
-Wed Jun 13 13:39:04 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * encoding.c (enc_alias_internal): use strdup defined as macro.
-
-Wed Jun 13 10:20:27 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * process.c (rb_exec_fillarg): get rid of SIZE_T_MAX which may need
- more headers.
-
- * process.c (rb_exec_fillarg): fix array element size. "continue" and
- "readonly" exceeded the size.
-
- * process.c (rb_exec_fillarg): use shell if the first word is reserved
- or special built-in name.
- http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html
-
- * process.c (rb_exec_fillarg): treat '=' only in the first word. if
- the first word does not contain '=', it is the command name and
- environment assignments cannot be anymore.
-
-Tue Jun 12 23:45:36 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/mkmf.rb: add dummy clean-static target to prevent errors for the
- case real clean-static target doesn't exist.
-
-Tue Jun 12 22:49:42 2012 Naohisa Goto <ngotogenome@gmail.com>
-
- * process.c (rb_exec_arg_fixup): fix compile error
-
-Tue Jun 12 21:40:13 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_exec_fillarg): treat '=' character as a meta
- character to detect assignments preceding command name.
-
-Tue Jun 12 20:29:19 2012 Tanaka Akira <akr@fsij.org>
-
- * include/ruby/intern.h (rb_exec_arg_init): deprecated.
- (rb_exec_arg_addopt): ditto.
- (rb_exec_arg_fixup): ditto.
- (rb_run_exec_options): ditto.
- (rb_run_exec_options_err): ditto.
-
- * internal.h (rb_execarg_init): declared.
- (rb_execarg_addopt): ditto.
- (rb_execarg_fixup): ditto.
- (rb_execarg_run_options): ditto.
-
- * process.c: call rb_execarg_addopt, rb_execarg_fixup,
- rb_execarg_run_options, rb_execarg_init.
- (rb_execarg_addopt): renamed from rb_exec_arg_addopt.
- (rb_exec_arg_addopt): stub to call rb_execarg_addopt.
- (rb_execarg_init): renamed from rb_exec_arg_init.
- (rb_exec_arg_init): stub to call rb_execarg_init.
- (rb_execarg_fixup): renamed from rb_exec_arg_fixup.
- (rb_exec_arg_fixup): stub to call rb_execarg_fixup.
- (rb_execarg_run_options): renamed from rb_run_exec_options_err.
- (rb_run_exec_options_err): stub to call rb_execarg_run_options.
- (rb_run_exec_options): call rb_execarg_run_options.
-
- * io.c: call rb_execarg_addopt, rb_execarg_fixup,
- rb_execarg_run_options, rb_execarg_init.
-
- * ext/pty/pty.c (establishShell): call rb_execarg_init and
- rb_execarg_fixup.
-
-Tue Jun 12 18:39:59 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
-
- * configure.in: enable strict ANSI mode by default in case of GCC,
- requested by _ko1.
-
-Tue Jun 12 06:40:23 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_exec_fillarg): detect '#' as a meta character.
-
-Mon Jun 11 22:15:44 2012 Tanaka Akira <akr@fsij.org>
-
- * include/ruby/intern.h (rb_proc_exec_n): deprecated.
- (rb_exec): ditto.
- (rb_exec_err): ditto.
- (rb_fork): ditto.
- (rb_fork_err): ditto.
-
-Mon Jun 11 18:49:52 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * configure.in: on checking libexecinfo, don't specify /use/local.
- On FreeBSD people must specify --with-opt-dir or --with-execinfo-dir.
-
-Mon Jun 11 12:14:37 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_core.h: remove lfp (local frame pointer) and rename
- dfp (dynamic frame pointer) to ep (environment pointer).
- This change make VM `normal' (similar to other interpreters).
- Before this commit:
- Each frame has two env pointers lfp and dfp. lfp points
- local environment which is method/class/toplevel frame.
- lfp[0] is block pointer.
- dfp is block local frame. dfp[0] points previous (parent)
- environment pointer.
- lfp == dfp when frame is method/class/toplevel.
- You can get lfp from dfp by traversing previous environment
- pointers.
- After this commit:
- Each frame has only `ep' to point respective environment.
- If there is parent environment, then ep[0] points parent
- environment (as dfp). If there are no more environment,
- then ep[0] points block pointer (as lfp). We call such ep
- as `LEP' (local EP). We add some macros to get LEP and to
- detect LEP or not.
- In short, we replace dfp and lfp with ep and LEP.
- rb_block_t and rb_binding_t member `lfp' and `dfp' are removed
- and member `ep' is added.
- rename rb_thread_t's member `local_lfp' and `local_svar' to
- `root_lep' and `root_svar'.
- (VM_EP_PREV_EP(ep)): get previous environment pointer. This macro
- assume that ep is not LEP.
- (VM_EP_BLOCK_PTR(ep)): get block pointer. This macro assume
- that ep is LEP.
- (VM_EP_LEP_P(ep)): detect ep is LEP or not.
- (VM_ENVVAL_BLOCK_PTR(ptr)): make block pointer.
- (VM_ENVVAL_BLOCK_PTR_P(v)): detect v is block pointer.
- (VM_ENVVAL_PREV_EP_PTR(ptr)): make prev environment pointer.
- (VM_ENVVAL_PREV_EP_PTR_P(v)): detect v is prev env pointer.
-
- * vm.c: apply above changes.
- (VM_EP_LEP(ep)): get LEP.
- (VM_CF_LEP(cfp)): get LEP of cfp->ep.
- (VM_CF_PREV_EP(cfp)): utility function VM_EP_PREV_EP(cfp->ep).
- (VM_CF_BLOCK_PTR(cfp)): utility function VM_EP_BLOCK_PTR(cfp->ep).
-
- * vm.c, vm_eval.c, vm_insnhelper.c, vm_insnhelper.h, insns.def:
- apply above changes.
-
- * cont.c: ditto.
-
- * eval.c, eval_intern.h: ditto.
-
- * proc.c: ditto.
-
- * thread.c: ditto.
-
- * vm_dump.c: ditto.
-
- * vm_exec.h: fix function name (on vm debug mode).
-
-Mon Jun 11 11:52:18 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
-
- * compile.c (iseq_set_sequence): nonstatic initializer of an
- aggregate type is a C99ism.
-
- * compile.c (enum compile_array_type_t): comma at the end of enum
- list is a C99ism.
-
- * vm_backtrace.c (enum LOCATION_TYPE): ditto.
-
-Mon Jun 11 06:31:33 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_proc_exec_n): revert the function removed at r35889.
-
-Mon Jun 11 06:20:50 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * thread_pthread.c (rb_thread_create_timer_thread): assign return
- value to the variable err.
-
-Mon Jun 11 06:17:06 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * thread_pthread.c (native_cond_initialize): fix typo in r36022.
- this cause a failure on FreeBSD 8.2 amd64.
- http://fbsd.rubyci.org/~chkbuild/ruby-trunk/log/20120610T130201Z.diff.html.gz
-
-Mon Jun 11 05:21:57 2012 Koichi Sasada <ko1@atdot.net>
-
- * .gdbinit (SDR): add SDR function. It's only for VM debugging.
-
-Sun Jun 10 21:50:45 2012 Yuki Sonoda (Yugui) <yugui@yugui.jp>
-
- * nacl/nacl_config.rb: Fixed for 32bit hosts.
-
-Sun Jun 10 20:23:14 2012 Yuki Sonoda (Yugui) <yugui@yugui.jp>
-
- Fixes threading on NativeClient.
-
- * thread_pthread.c (timer_thread_sleep): Extracted out a function from
- thread_timer(). Added an alternative implementation for platforms
- that lacks select(2) or pipe(2).
- (rb_thread_create_timer_thread, native_cond_initialize,
- native_cond_destroy): Replaced wrong HAVE_XXX checks.
-
- * configure.in (pthread_attr_init): New check.
-
-Sun Jun 10 21:30:11 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_exec_without_timer_thread): renamed from rb_exec_err.
- (rb_exec_err): new stub function to call
- rb_exec_without_timer_thread.
- (rb_f_exec): call rb_exec_without_timer_thread.
- (rb_exec): call rb_exec_without_timer_thread.
-
-Sun Jun 10 21:13:10 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_fork): call rb_fork_internal instead of rb_fork_err.
-
-Sun Jun 10 20:55:59 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_fork_ruby): call rb_fork_internal directly.
-
-Sun Jun 10 20:19:40 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_fork_ruby): new function.
- (rb_f_fork): use rb_fork_ruby instead of rb_fork.
- (rb_daemon): ditto.
-
- * io.c (pipe_open): use rb_fork_ruby instead of rb_fork.
-
- * internal.h (rb_fork_ruby): declared.
-
-Sun Jun 10 18:58:16 2012 Akinori MUSHA <knu@iDaemons.org>
-
- * lib/net/http/response.rb: Remove a duplicated rdoc and leave a
- pointer.
-
- * lib/net/http/responses.rb: Add RFC numbers to base on.
-
-Sun Jun 10 18:31:42 2012 Yuki Sonoda (Yugui) <yugui@yugui.jp>
-
- * configure.in (RUBY_NACL): Warns if $PATH does not contain the path
- to NativeClient SDK. PATH variable redefinition in GNUmakefile does
- not work for GNU make 3.81.
-
-Sun Jun 10 17:54:36 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * gc.h (IS_STACK_DIR_UPPER): utility macro.
-
- * thread_pthread.c (get_stack): seems stack size does not include
- guard size on Mac OS X.
-
- * thread_pthread.c (ruby_init_stack): adjust stack size for offset of
- addr from the bottom.
-
-Sun Jun 10 15:49:47 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (retry_fork): call after_fork except in a child process.
- (rb_fork_internal): restrict after_fork call condition.
-
-Sun Jun 10 14:19:33 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * configure.in: NetBSD 6 adds libexecinfo but it only works on amd64.
- http://www.mail-archive.com/source-changes-full@netbsd.org/msg38729.html
-
-Sun Jun 10 12:43:23 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_f_exec): call rb_exec_async_signal_safe except on
- Mac OS X. cf. the comment in before_exec_non_async_signal_safe.
-
-Sun Jun 10 12:15:18 2012 Tanaka Akira <akr@fsij.org>
-
- * io.c (popen_exec): don't call rb_thread_atfork_before_exec. use
- rb_exec_async_signal_safe instead of rb_exec_err.
- (pipe_open): use rb_fork_async_signal_safe instead of rb_fork_err.
-
-Sun Jun 10 11:44:57 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_fork_internal): call after_fork only unless
- chfunc_is_async_signal_safe.
-
-Sun Jun 10 11:33:01 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * ext/openssl/ossl_pkey_ec.c
- test/openssl/test_pkey_ec.rb: Add support for EC_POINT_mul.
- Patch provided by Sambasiva Suda. Thanks!
- [ruby-core:44408][ruby-trunk - Feature #6310]
-
-Sun Jun 10 10:48:15 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * lib/openssl/ssl.rb: Use a simple random number to generate the
- session id. MD5, as was used before, causes problems when
- using a FIPS version of OpenSSL. Issue was found by Jared
- Jennings, thank you!
- [ruby-trunk - Bug #6137]
-
-Sun Jun 10 10:27:34 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * NEWS: Add note about the new private key export behavior.
-
-Sun Jun 10 10:24:51 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_exec_async_signal_safe): exported.
-
- * ext/pty/extconf.rb: modify $INCFLAGS to include internal.h
-
- * ext/pty/pty.c: include internal.h.
- (chfunc): don't call rb_thread_atfork_before_exec. use
- rb_exec_async_signal_safe instead of rb_f_exec.
- (establishShell): set up earg. use rb_fork_async_signal_safe
- instead of rb_fork_err.
-
- * internal.h (rb_exec_async_signal_safe): declared.
- (rb_fork_async_signal_safe): declared.
-
-Sun Jun 10 10:21:37 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * ext/openssl/ossl.c
- ext/openssl/ossl_pkey_rsa.c
- ext/openssl/ossl_pkey_dsa.c
- ext/openssl/ossl_pkey_ec.c: Forbid export passwords that are less
- than four characters long, as OpenSSL itself does not allow this.
- Issue found by Eric Hodel.
- * ext/openssl/ossl_pkey_ec.c: Add export as an alias of to_pem,
- following the PKey interface contract.
- * test/openssl/test_pkey_dsa.rb
- test/openssl/test_pkey_rsa.rb
- test/openssl/test_pkey_ec.rb: Add tests that assert correct
- behaviour when dealing with passwords that are less than four
- characters long.
- [ruby-core: 42281][ruby-trunk - Bug #5951]
-
-Sun Jun 10 10:14:26 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_f_exec): use rb_exec_arg_prepare.
-
-Sun Jun 10 06:43:51 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c: split after_exec into async-signal-safe part and rest.
- (after_exec_async_signal_safe): extracted from after_exec.
- (after_exec_non_async_signal_safe): ditto.
- (after_exec): call them.
- (rb_exec_async_signal_safe): call after_exec_async_signal_safe.
- (rb_exec_err): call after_exec_non_async_signal_safe instead of
- after_exec.
-
-Sun Jun 10 06:21:10 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * NEWS: document new features of Ruby OpenSSL.
-
-Sun Jun 10 03:09:41 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * ext/openssl/ossl.c: Fix error in example. Patch by David Albert.
-
- Add/extend existing documentation. Examples now also cover RSA
- signatures and PBKDF2.
- [ruby-core: 45154][ruby-trunk - Bug #6475]
-
-
-Sun Jun 10 01:41:45 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * ext/openssl/ossl_ssl.c: Introduce SSLContext#renegotiation_cb and
- remove SSLContext#disable_client_renegotiation and related
- functionality introduced in r35797. The new callback approach
- gives clients maximum flexibility to decide on their own what to
- do on renegotiation attempts.
- Add documentation for SSL module and SSLError.
- * test/openssl/test_ssl.rb: Add a test for
- SSLContext#renegotiation_cb.
-
-Sun Jun 10 01:37:18 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_fork_internal): initialize exc.
-
-Sun Jun 10 00:19:25 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c: don't use non async-signal-safe functions in a child
- process before exec, for invoking a command.
- (rb_exec_atfork): call rb_exec_async_signal_safe only.
- (retry_fork): take chfunc_is_async_signal_safe argument. call
- before_fork and after_fork only unless chfunc_is_async_signal_safe.
- (send_child_error): take chfunc_is_async_signal_safe argument.
- send an exception only unless chfunc_is_async_signal_safe.
- (recv_child_error): take chfunc_is_async_signal_safe argument.
- receive an exception only unless chfunc_is_async_signal_safe.
- (rb_fork_internal): renamed from rb_fork_err and take
- chfunc_is_async_signal_safe argument.
- use rb_protect only unless chfunc_is_async_signal_safe.
- (rb_fork_err): call rb_fork_internal with false as
- chfunc_is_async_signal_safe.
- (rb_fork_async_signal_safe): call rb_fork_internal with true as
- chfunc_is_async_signal_safe.
- (rb_spawn_process): call rb_fork_async_signal_safe instead of
- rb_fork_err.
-
-Sat Jun 9 23:57:03 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_fork_err): rewrite a complex "if" statement.
-
-Sat Jun 9 23:44:29 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (before_exec_async_signal_safe): extracted from
- before_exec.
- (before_exec_non_async_signal_safe): ditto.
- (before_exec): call before_exec_async_signal_safe and
- before_exec_non_async_signal_safe.
- (rb_exec_async_signal_safe): call before_exec_async_signal_safe.
- (rb_exec_err): call before_exec_non_async_signal_safe instead of
- before_exec.
-
-Sat Jun 9 23:36:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * iseq.c (iseq_load, insn_operand_intern, rb_iseq_disasm)
- (rb_iseq_parameters): use rb_id2str() instead of rb_id2name() to
- keep encoding.
-
- * string.c (rb_str_symname_p): new function that checks if the string
- is valid as a symbol name. split from sym_inspect().
-
-Sat Jun 9 22:27:05 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (retry_fork): rewrite a complex "for" statement by
- simple statements.
-
-Sat Jun 9 21:50:04 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (retry_fork): extracted from rb_fork_err.
- (send_child_error): ditto.
- (recv_child_error): ditto.
-
-Sat Jun 9 17:21:48 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * iseq.c (iseq_load): type is a symbol, and invalid as ID in common.
-
-Sat Jun 9 10:57:14 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_exec_async_signal_safe): extracted from rb_exec_err.
-
-Sat Jun 9 09:31:07 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c: simplified because close_others option is always
- enabled by default.
- (rb_f_exec): don't need to set the option.
- (rb_exec_arg_prepare): don't need to set the option. don't need
- default_close_others argument.
- (rb_spawn_internal): don't need to give default_close_others
- argument for rb_exec_arg_prepare. don't need default_close_others
- argument.
- (rb_spawn_err): don't need to give default_close_others
- argument for rb_spawn_internal.
- (rb_spawn): don't need to give default_close_others
- argument for rb_spawn_internal.
- (rb_f_system): don't need to give default_close_others argument for
- rb_spawn_internal.
- (rb_f_spawn): don't need to give default_close_others argument for
- rb_exec_arg_prepare.
-
-Sat Jun 9 09:00:58 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_proc_exec): call before_exec() here addition to
- rb_exec_err.
-
-Sat Jun 9 08:30:52 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * thread_pthread.c (ruby_init_stack): use stack info if possible.
-
-Sat Jun 9 08:21:32 2012 Eric Hodel <drbrain@segment7.net>
-
- * README.EXT (prepare extconf.rb): Added note to see MakeMakefile for
- documentation of extconf.rb functions. Patch by Zachary Scott.
- [ruby-trunk - Feature #6522]
- * README.EXT (Appendix C): Removed in favor of MakeMakefile.
- Patch by Zachary Scott.
- * lib/mkmf.rb: Merged documentation from README.EXT Appendix C. Patch
- by Zachary Scott.
-
-Sat Jun 9 08:16:47 2012 Eric Hodel <drbrain@segment7.net>
-
- * doc/re.rdoc: Completed wording in the description of the =~ operator.
- [ruby-trunk - Bug #6529]
-
-Sat Jun 9 08:09:38 2012 Eric Hodel <drbrain@segment7.net>
-
- * string.c (rb_str_start_with): Removed "p" from start_with? examples
- to match other String method examples. [ruby-trunk - Bug #6553]
- * string.c (rb_str_end_with): Updated end_with? to use code markup
- instead of italic.
-
-Sat Jun 9 07:56:03 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/benchmark.rb: Updated formatting of Benchmark documentation for
- consistency. [ruby-trunk - Bug #6533]
-
-Sat Jun 9 07:46:26 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/delegate.rb: Added documentation for Delegator#!. Patch by
- Zachary Scott. [ruby-trunk - Feature #6534]
-
-Sat Jun 9 07:39:50 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/net/http/responses.rb: Add RFC 6585 response codes. Patch by
- Sangil Jung. [ruby-trunk - Feature #6480]
- * lib/net/http/response.rb: ditto
- * lib/net/http.rb: ditto
- * lib/webrick/httpstatus.rb: ditto
-
-Sat Jun 9 01:24:28 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_exec_err): before_exec() call moved from proc_exec_cmd
- and proc_exec_sh.
- (rb_proc_exec): ditto.
-
-Sat Jun 9 01:11:07 2012 Tanaka Akira <akr@fsij.org>
-
- * include/ruby/intern.h (rb_exec_arg_init): declaration changed to
- return a value.
-
- * process.c (rb_exec_arg_init): return a value.
-
-Fri Jun 8 23:44:14 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c: don't check the availability of FD_CLOEXEC. It should
- be available if fork() is available.
-
- * io.c: ditto.
-
-Fri Jun 8 22:39:32 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_fork_err): revert r35955. The condition needs !chfunc
- to close ep[0] and ep[1]. The catched exception is re-raised
- immediately after that if status is not NULL.
-
-Fri Jun 8 19:43:33 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_exec_err): after_exec() call moved from proc_exec_cmd
- and proc_exec_sh.
- (rb_proc_exec): ditto.
-
-Fri Jun 8 19:00:59 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (ARGV_COUNT): unused macro removed.
- (ARGV_SIZE): ditto.
- (ALLOC_ARGV): ditto.
- (ALLOC_ARGV_WITH_STR): ditto.
-
-Fri Jun 8 16:19:33 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * test/runner.rb (src_testdir): expand real path so that
- TestGem#test_self_find_files does not fail by aliased load path when
- srcdir contains a symbolic link.
-
- * tool/runruby.rb (srcdir): ditto.
-
-Fri Jun 8 12:04:39 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * process.c (rb_fork_err): error state in the child process is prior
- to exceptions in proc_syswait().
-
- * process.c (rb_fork_err): determine status on errors.
-
- * ext/pty/pty.c (establishShell): reraise exception if something
- raised during sleep.
-
- * ext/pty/pty.c (establishShell): now needs status to protect from
- exceptions in rb_fork_err().
-
-Thu Jun 7 22:13:05 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_fork_err): Fix the condition to use rb_protect.
-
-Thu Jun 7 20:29:12 2012 Tanaka Akira <akr@fsij.org>
-
- * include/ruby/intern.h: rb_exec_arg and related stuff moved back from
- internal.h
-
-Thu Jun 7 15:53:03 2012 Koichi Sasada <ko1@atdot.net>
-
- * .gdbinit: add function `trace_machine_instructions' to trace
- in native machine assemble.
- See https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/MachineInstructionsTraceWithGDB
- for more details.
-
-Wed Jun 6 21:31:21 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (proc_exec_cmd) renamed from proc_exec_v.
- (proc_exec_sh): renamed from rb_proc_exec_e.
- (proc_spawn_cmd_internal): renamed from proc_spawn_v.
- (proc_spawn_cmd): renamed from proc_spawn_n.
- (proc_spawn_sh): renamed from proc_spawn.
-
-Wed Jun 6 21:18:47 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * process.c (try_with_sh): please take care of the macro defined by
- you.
-
-Wed Jun 6 20:45:08 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (proc_exec_v): don't call dln_find_exe_r here because it
- is not async-signal-safe and proc_exec_v is called in a child
- process.
- command_abspath field of rb_exec_arg.
- (rb_exec_fillarg): call dln_find_exe_r and set command_abspath.
- (rb_exec_err): Give the absolute path of the invoking command for
- proc_exec_v, instead of the command name.
-
- * internal.h: add command_abspath field for rb_exec_arg.
-
-Wed Jun 6 20:08:01 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (try_with_sh): take envp argument.
- (exec_with_sh): ditto. use it for execve.
- (proc_exec_v): provide envp for try_with_sh.
-
-Wed Jun 6 13:25:04 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/win32.c, include/ruby/win32.h (rb_w32_wrap_io_handle): new API.
- this API wraps an I/O handle (HANDLE or SOCKET) and returns fd.
- the second parameter should be combination of O_*, for example,
- O_RDWR | O_BINARY | O_NOINHERIT.
-
- * win32/win32.c, include/ruby/win32.h (rb_w32_unwrap_io_handle): new
- API. this API unwraps an I/O handle and close the fd (not closes
- the handle itself).
-
- [Feature #4906] [ruby-core:37227]
-
-Wed Jun 6 13:18:26 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/win32.c (rb_w32_close): of course, console handle is not socket.
-
-Wed Jun 6 12:37:43 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * process.c (rb_run_exec_options_err): allocate a temporary buffer for
- run_exec_dup2() for restoring fds on non-fork environments.
-
-Wed Jun 6 09:45:21 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/dl/test_c_{struct_entry,union_entity}.rb: sorry, typos.
-
-Wed Jun 6 05:27:54 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_exec_fillarg): check use_shell field before accessing
- a union field.
-
-Wed Jun 6 04:58:44 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_spawn_process): prog variable is not used for Unix.
-
-Wed Jun 6 00:20:37 2012 Tanaka Akira <akr@fsij.org>
-
- * internal.h (rb_exec_arg_init): change return type to void.
-
- * process.c (rb_exec_arg_init): don't return a value.
- (rb_exec_arg_prepare): ditto.
- (rb_spawn_process): don't take the prog argument. extract the
- information from earg.
- (rb_spawn_internal): follow rb_spawn_process change.
- (rb_f_spawn): ditto.
-
- * io.c (pipe_open): don't take the prog argument. extract the
- information from eargp.
- (pipe_open_v): follow pipe_open change.
- (pipe_open_s): ditto.
-
-Tue Jun 5 23:51:33 2012 Tanaka Akira <akr@fsij.org>
-
- * internal.h (rb_exec_arg): use union to represent command invocation
- with/without shell.
-
- * process.c: follow the rb_exec_arg change.
-
- * io.c (pipe_open): ditto.
-
-Tue Jun 5 22:28:46 2012 Tanaka Akira <akr@fsij.org>
-
- * internal.h: rb_exec_arg and related stuff moved from intern.h
-
- * include/ruby/intern.h (rb_proc_exec_n): removed.
-
-Tue Jun 5 21:57:22 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_exec_arg_fixup): allocate a temporary buffer for
- run_exec_dup2 here because it should be async-signal-safe.
- (run_exec_dup2): use the temporary buffer.
- (run_exec_dup2_tmpbuf_size): new function.
-
- * include/ruby/intern.h (rb_exec_arg): add dup2_tmpbuf field.
-
-Tue Jun 5 20:13:15 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * object.c (rb_obj_init_copy): should check if trusted too.
-
-Tue Jun 5 19:59:13 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (strtok): declaration removed because it is not used.
-
-Tue Jun 5 19:33:51 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (proc_spawn): don't detect simple command line here
- because rb_exec_fillarg already did.
-
-Tue Jun 5 19:21:10 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_exec_fillarg): bail out a loop eagerly.
-
-Tue Jun 5 19:15:14 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c: add comments about async-signal-safe.
-
- * io.c: ditto.
-
-Tue Jun 5 09:25:10 2012 Eric Hodel <drbrain@segment7.net>
-
- * io.c: Edited documentation for IO and File open and new and
- Kernel#open for consistency and clarity.
-
-Mon Jun 4 21:53:56 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * win32/win32.c (rb_w32_sysinit): let the system not display the
- critical-error-handler message box and the Windows Error Reporting
- dialog. [ruby-core:45389] [Bug #6535]
-
-Mon Jun 4 19:36:25 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_exec_fillarg): allocate one more element before
- beginning in argv_str for try_with_sh.
-
- * internal.h (ARGVSTR2ARGC): adjust for the above change.
- (ARGVSTR2ARGV): ditto.
-
-Mon Jun 4 19:17:06 2012 Tanaka Akira <akr@fsij.org>
-
- * internal.h (ARGVSTR2ARGC): defined.
- (ARGVSTR2ARGV): defined.
-
- * process.c (proc_exec_v): use ARGVSTR2ARGV.
- (rb_spawn_process): use ARGVSTR2ARGC and ARGVSTR2ARGV.
-
- * io.c (pipe_open): use ARGVSTR2ARGV.
-
-Mon Jun 4 16:13:00 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_insnhelper.h: remove magical code "lfp[0] & 0x02".
- Current VM doesn't use this bit.
-
- * vm_core.h (RUBY_VM_GET_BLOCK_PTR): added.
-
- * eval.c (rb_block_given_p): use RUBY_VM_GET_BLOCK_PTR().
-
- * vm_eval.c (rb_f_block_given_p): ditto.
-
-Mon Jun 4 15:39:33 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * win32/win32.c (constat_apply): apply VT100 functions.
- [ruby-core:44958] [Feature #6418]
-
- * win32/win32.c (constat_parse): parse some VT100 escape sequence.
-
-Mon Jun 4 14:06:12 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * process.c (rb_exec_err): should preserve errno.
-
-Mon Jun 4 13:10:11 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/dl/test_c_{struct_entry,union_entity}.rb: broken require.
-
-Mon Jun 4 12:01:21 2012 Koichi Sasada <ko1@atdot.net>
-
- * test/ruby/test_backtrace.rb: fix test.
- Windows path includes `:' character.
-
-Mon Jun 4 11:42:39 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_core.h (rb_location_t): fix type and field name.
- (1) rename rb_location_t to rb_iseq_location_t.
- (2) rename field names of rb_iseq_location_t to adjust
- RubyVM::Backtrace::Location methods.
- (2-1) filename -> path
- (2-2) filepath -> absolute_path
- (2-3) basename -> base_label
- (2-4) name -> label
- (3) rename filed name rb_iseq_location_t#line_no to
- rb_iseq_location_t#first_lineno to clear purpose of this field.
- (4) The field names rb_binding_t#(filename|line_no) are also renamed
- to rb_binding_t#(path|first_lineno).
-
- * compile.c: apply above changes.
-
- * iseq.c: ditto.
-
- * proc.c: ditto.
-
- * vm*.c: ditto.
-
-Mon Jun 4 11:40:28 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * marshal.c (r_object0): also load TYPE_USRMARSHAL, TYPE_DATA using
- compatible loader.
-
-Mon Jun 4 11:33:42 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * process.c (rb_run_exec_options_err): restore save_env() call for
- non-fork environments.
-
- * process.c (rb_exec_err): restore environments after the failure of
- exec to fix [ruby-core:44093] [Bug #6249] on non-fork environments
-
-Mon Jun 4 10:42:04 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * io.c (pipe_open): follow up changes in r35889.
-
- * process.c (proc_spawn_n): now uses char ** instead of VALUE *.
-
- * process.c (rb_spawn_process): prog is now VALUE of String, not char *.
-
-Mon Jun 4 06:12:43 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * marshal.c (r_object0): remove old warning for _alloc.
-
-Mon Jun 4 04:24:06 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * marshal.c: experimental test aborted.
- * complex.c: ditto.
- * rational.c: ditto.
- * include/ruby/intern.h: ditto.
-
-Mon Jun 4 00:45:18 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_spawn_process): fix for Windows. not tested.
-
-Mon Jun 4 00:11:51 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_proc_exec_e): don't use ISSPACE(). \f, \r and \v
- are not word separator in Bourne shell.
-
-Sun Jun 3 23:47:30 2012 Tanaka Akira <akr@fsij.org>
-
- * include/ruby/intern.h (rb_exec_arg): remove argc and argv fields.
- add use_shell, argv_str and argv_buf fields.
-
- * process.c (rb_proc_exec_e): don't split shell command line arguments
- here to avoid memory allocation in a child process.
- (rb_exec_fillarg): split shell command line arguments here.
- (proc_exec_v): takes argv_str argument instead of argv.
- (rb_proc_exec_ne): removed.
- (rb_proc_exec_n): removed.
- (rb_run_exec_options_err): don't initialize the removed fields.
- (rb_exec_err): don't initialize the removed fields.
- call proc_exec_v directly instead of rb_proc_exec_ne.
- (rb_spawn_process): use use_shell field.
-
-Sun Jun 3 21:53:00 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * GPL: update text of GPLv2. [ruby-core:44488] [Bug #6328]
- http://www.gnu.org/licenses/gpl-2.0.txt
-
-Sun Jun 3 21:22:52 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_exec_getargs): remove rb_exec_arg argument.
-
-Sun Jun 3 21:14:26 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * marshal.c: calls directly rb_{Complex,Rational}_marshal_load().
- But now disabled. [experimental]
- * complex.c: followed the above.
- * rational.c: ditto.
- * include/ruby/intern.h: ditto.
-
-Sun Jun 3 21:18:17 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_check_argv): use rb_str_new_frozen instead of
- rb_str_new4.
-
-Sun Jun 3 20:10:52 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_proc_exec_e): extended version of rb_proc_exec() to
- call execle().
- (rb_proc_exec): use rb_proc_exec_e().
- (rb_exec_err): use rb_proc_exec_e().
-
-Sun Jun 3 19:47:18 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * thread.c (vm_living_thread_num): suppress a warning.
-
-Sun Jun 3 17:23:52 2012 Tanaka Akira <akr@fsij.org>
-
- * use execve() to preserve environment variables when exec method is
- failed. [ruby-core:44093] [ruby-trunk - Bug #6249]
-
- * include/ruby/intern.h (rb_exec_arg): add envp_str and envp_buf field
- to store envp of execve().
-
- * process.c (proc_exec_v): takes envp_str as an argument and use it
- for execve().
- (rb_proc_exec_ne): extended version of rb_proc_exec_n().
- (rb_proc_exec_n): use rb_proc_exec_ne().
- (rb_proc_exec): follow proc_exec_v() change.
- (fill_envp_buf_i): new function.
- (rb_exec_arg_fixup): set up envp_str and envp_buf.
- (save_env_i): removed.
- (save_env): removed.
- (rb_run_exec_options_err): don't modify environment variables.
- (rb_exec_err): use rb_proc_exec_ne().
-
-Sun Jun 3 16:33:58 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * marshal.c: revert r35879 "now marshal_{load|dump} are external."
-
- * complex.c (nucomp_marshal__{dump,load}): should use rb_marshal_{dump,load}.
-
- * rational.c (nurat_marshal__{dump,load}): ditto.
-
-Sun Jun 3 14:13:58 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * ext/date/date_core.c: checks whether the object is frozen or not.
-
-Sun Jun 3 14:00:51 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * complex.c: wrote Complex#_dump and Complex::load. But now
- disabled (due to compatibility) [experimental].
-
- * rational.c: wrote Rational#_dump and Rational::load. ditto.
-
-Sun Jun 3 10:23:32 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * complex.c (nucomp_marshal_load): [ruby-core:45394]
- * rational.c (nurat_marshal_load): ditto.
-
-Sun Jun 3 03:15:46 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * regparse.c (onig_number_of_names): suppress a warning.
-
-Sun Jun 3 01:36:52 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_backtrace.c: change names.
- (1) Class name: RubyVM::FrameInfo -> RubyVM::Backtrace::Location.
- (2) Method name: RubyVM::FrameInfo.caller ->
- Kernel.caller_locations.
- (3) Instance methods of
- RubyVM::FrameInfo (RubyVM::Backtrace::Location)
- (3-1) name -> label
- (3-2) basename -> base_label (basename is confusing with
- File.basename)
- (3-3) line_no -> lineno (We have already similar name
- File#lineno, commented by kou [ruby-dev:45686]).
- (3-4) filename -> path.
- (3-5) filepath -> absolute_path.
- (3-5) iseq -> removed (we will make other APIs to access iseq
- and other information of frame for debugging).
-
- * test/ruby/test_backtrace.rb: apply above changes.
- And apply comment from kou [ruby-dev:45686].
-
-Sun Jun 3 00:49:11 2012 Koichi Sasada <ko1@atdot.net>
-
- * common.mk: fix to build vm_backtrace.c only itself (vm_backtrace.c
- is no longer included from vm.c). I hope this separation reduce
- compile time of vm.c.
-
- * internal.h: ditto.
-
- * vm.c, vm_core.h, vm_dump.c, vm_eval.c: ditto.
-
- * vm_eval.c: some functions (callee, etc) moved to vm_backtrace.c.
-
-Sun Jun 3 00:20:53 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_backtrace.c: added. Separate backtrace related functions to
- this file.
-
- * vm.c, common.mk: ditto.
-
-Sat Jun 2 18:09:02 2012 Akinori MUSHA <knu@iDaemons.org>
-
- * lib/ipaddr.rb: Inhibit zero-filled octets in an IPv4 address in
- all platforms. [ruby-dev:45671]
-
- * lib/ipaddr.rb: Allow the x:x:x:x:x:x:d.d.d.d form not limited to
- IPv4 mapped/compatible addresses. This change also makes it
- possible for the parser to understand IPv4 mapped and compatible
- IPv6 addresses in non-compressed form.
-
- * lib/ipaddr.rb: Stop exposing IPSocket.valid*? methods which were
- only usable on non-IPv6-ready platforms.
-
-Sat Jun 2 16:59:00 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * string.c (rb_enc_cr_str_buf_cat): don't reset coderange as unknown.
- the condition 'ptr_a8 && str_cr != ENC_CODERANGE_7BIT' means not
- unknown, str is also ASCII-8BIT because str_encindex == ptr_encindex,
- and nont (str_cr == ENC_CODERANGE_UNKNOWN) and
- str_cr != ENC_CODERANGE_7BIT means str_cr is valid because ASCII-8BIT
- can't be broken. [ruby-dev:45688] [Bug #6509]
-
-Sat Jun 2 07:04:48 2012 Eric Hodel <drbrain@segment7.net>
-
- * doc/re.rdoc (Performance): Replaced incorrect example of reducing
- backtracking through anchoring with reduced backtracking through a
- range. [ruby-trunk - Bug #6525]
-
-Sat Jun 2 06:34:15 2012 Eric Hodel <drbrain@segment7.net>
-
- * doc/re.rdoc (Performance): Removed useless sample output from final
- performance example and switched from #match to #=~ for consistency.
- [ruby-trunk - Bug #6524]
-
-Fri Jun 1 09:30:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * object.c (class_or_module_required): extract check for class or
- module.
-
-Fri Jun 1 08:50:47 2012 Eric Hodel <drbrain@segment7.net>
-
- * array.c: Updated Array documentation formatting. Patch by Zachary
- Scott. [ruby-trunk - Feature #6517]
-
-Fri Jun 1 06:57:10 2012 Eric Hodel <drbrain@segment7.net>
-
- * ext/dl/lib/dl/struct.rb (DL::CStructEntity#set_ctypes): Refactored
- #set_ctypes using newer ruby features to simplify its implementation.
- * test/dl/test_c_struct_entry.rb (class DL): Test to verify
- refactoring.
-
-Fri Jun 1 06:40:25 2012 Eric Hodel <drbrain@segment7.net>
-
- * object.c (Init_Object): Restored Kernel documentation based on
- Pickaxe book documentation. Patch by Zachary Scott.
- [ruby-trunk - Feature #6521]
-
-Fri Jun 1 06:29:42 2012 Eric Hodel <drbrain@segment7.net>
-
- * object.c (rb_equal): Let Object be a link in #=== documentation.
- Patch by Zachary Scott. [ruby-trunk - Feature #6518]
-
-Thu May 31 09:27:06 2012 Eric Hodel <drbrain@segment7.net>
-
- * ext/dl/lib/dl/struct.rb (DL::CStructEntity::size): Refactored ::size
- to remove unused variables and simplify using newer ruby features.
- * test/dl/test_c_struct_entry.rb: Test to validate refactoring
-
-Thu May 31 08:40:34 2012 Eric Hodel <drbrain@segment7.net>
-
- * ext/dl/lib/dl/struct.rb (DL::CUnionEntity#set_ctypes): Refactored
- #set_types to reuse DL::CUnionEntity::size
- * test/dl/test_c_union_entity.rb: Added test
-
-Thu May 31 08:20:14 2012 Eric Hodel <drbrain@segment7.net>
-
- * ext/dl/lib/dl/struct.rb (DL::CUnionEntity::size): Fixed ::size to
- return the size of the union.
- * test/dl/test_c_union_entity.rb: Test for DL::CUnionEntity::size
-
-Thu May 31 07:45:43 2012 Eric Hodel <drbrain@segment7.net>
-
- * ext/dl: Added documentation. Patch by Vincent Batts.
- [ruby-trunk - Bug #6496]
-
-Wed May 30 16:30:00 2012 Kenta Murata <mrkn@cookpad.com>
-
- * ext/bigdecimal/lib/bigdecimal/jacobian.rb,
- ext/bigdecimal/lib/bigdecimal/newton.rb:
- fix documentation comments.
- Patch by alperakgun from github.com/shyouhei/ruby/pull/8
-
-Wed May 30 16:20:00 2012 Kenta Murata <mrkn@cookpad.com>
-
- * ext/bigdecimal/lib/bigdecimal/jacobian.rb (Jacobian#dfdxi):
- fix jacobian to get stuck in an infinite loop when a solution is not
- found due to forget to increment nRetry counter.
- Patch by alperakgun from github.com/shyouhei/ruby/pull/8
-
-Wed May 30 10:58:31 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * time.c (utc_offset_arg): utc offset can be precision in seconds.
- e.g. old Europe/Lisbon (c.f. [ruby-dev:40066])
-
-Wed May 30 06:20:29 2012 Eric Hodel <drbrain@segment7.net>
-
- * error.c (exc_set_backtrace): Updated documentation to indicate
- set_backtrace allows a string as well as an array of strings.
- [ruby-trunk - Bug #6501]
-
-Tue May 29 17:28:20 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * strftime.c (rb_strftime_with_timespec): support GNU extension triple
- colons modifier. [EXPERIMENTAL]
-
- * strftime.c (rb_strftime_with_timespec): check conversion with locale
- modifier.
-
- * strftime.c (rb_strftime_with_timespec): colons are valid only for
- 'z' and must come just before it.
-
-Mon May 28 16:56:55 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/test/unit.rb (Test::Unit::Runner#_prepare_run): StatusLineOutput
- needs job_status to be :replace.
-
-Mon May 28 13:35:33 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * common.mk (do-install-*): fix dependencies. based on the patch by
- nagachika at [ruby-dev:45683]. [Bug #6506]
-
-Mon May 28 12:03:04 2012 Narihiro Nakamura <authornari@gmail.com>
-
- * gc.c (obj_free): doesn't free a method table if it doesn't
- exist. [ruby-dev:44436]
- * test/ruby/test_gc.rb (class TestGc): added the test case for
- this issue.
-
-Sun May 27 23:37:48 2012 Koichi Sasada <ko1@atdot.net>
-
- * benchmark/bm_vm1_lvar_init.rb: added.
- This benchmark measures a initialize time of non-used variable.
-
- * benchmark/bm_vm1_lvar_set.rb: added.
- This benchmark measures a local variables initialization time.
-
- * benchmark/bm_vm2_bigarray.rb: added.
- This benchmark mesures a big array literal creation time.
-
- * benchmark/bm_vm2_bighash.rb: added.
- This benchmark mesures a big hash literal creation time.
-
- * benchmark/bm*: change notation "i=0" to "i = 0".
-
-Sun May 27 13:33:26 2012 Koichi Sasada <ko1@atdot.net>
-
- * benchmark/driver.rb: fix to continue benchmarks when
- an error is occurred.
-
-Sun May 27 11:27:50 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/test/unit.rb (Test::Unit::Runner#_prepare_run): fix operator
- precedence, so that platform and TERM should be counted.
-
-Sun May 27 10:02:33 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * ext/date/date_strftime.c: allows %Ok and %Ol.
-
-Sun May 27 09:29:20 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * ext/date/date_core.c: modified doc.
-
-Sat May 26 19:04:34 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * ext/date/date_core.c: added description.
-
-Sat May 26 18:14:57 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * ext/date/date_strftime.c: reduced the code.
-
-Sat May 26 18:08:59 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * time.c: modified doc.
- * ext/date/date_core.c: ditto.
-
-Sat May 26 17:05:45 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm.c (backtrace_*): change type of lev and n from size_t to int.
- Also set type of rb_backtrace_t#backtrace_size to int.
- A patch from nobu.
-
- * vm_eval.c: ditto.
-
-Sat May 26 16:26:30 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * file.c (realpath_rec): UNC prefix does not end with path separator,
- so new separator is needed after it.
-
-Sat May 26 15:29:22 2012 Koichi Sasada <ko1@atdot.net>
-
- * test/ruby/test_backtrace.rb (test_caller_lev):
- decrease recursion size.
-
-Sat May 26 13:50:48 2012 Koichi Sasada <ko1@atdot.net>
-
- * NEWS: add Kernel#caller's second argument.
-
-Sat May 26 13:40:29 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm.c (RubyVM::FrameInfo): add a class to access each frame
- information. You don't need to parse strings from caller().
- FrameInfo has the following methods:
- FrameInfo#name: method name, class name, etc with decorations.
- FrameInfo#basename: name without decorations.
- FrameInfo#line_no: line number.
- FrameInfo#filename: file name.
- FrameInfo#filepath: full filepath.
- FrameInfo#iseq: iseq if it is iseq frame (defined by ruby script)
- FrameInfo#to_s: return caller() method style string.
- RubyVM::FrameInfo.caller(n, lev) returns array of FrameInfo objects.
- The name "RubyVM::FrameInfo.caller" is long and ambiguous (it is
- confusing with Kernel::caller() method), we need to change the name
- before Ruby 2.0 release. Good names or comments are welcome.
-
- * test/ruby/test_backtrace.rb: add a test for above change.
-
-Sat May 26 12:18:09 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm.c (frame_info_to_str): add `break'.
-
- * vm.c (backtrace_object): remove lev and n parameter.
- backtrace_object always returns all of backtrace information.
-
- * vm.c (rb_backtrace_to_str_ary): fix to use backtrace_object().
- This change improve performance of caller(lev, n).
-
- * benchmark/bm_vm3_backtrace.rb: added to check above improvement.
- FYI: measurement on my laptop, 1.9.3p229 needs 5.125 sec,
- and current trunk only needs 0.299sec.
-
-Sat May 26 11:05:09 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm.c (rb_frame_info_t): keep previous ISEQ frame info for CFUNC
- frame info. And fix to cache a calculated line_no of ISEQ frame
- info.
-
-Sat May 26 09:54:53 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * ext/openssl/ossl_ssl.c: Allow disabling client-side renegotiation.
- * test/openssl/test_ssl.rb: Simple tests for this.
-
- Client-side renegotiation is still considered problematic, even
- when used in the context of secure renegotiation (RI, RFC 5746).
- The changes allow users to either completely disable client
- renegotiation on the server, or to specify a maximum number of
- handshakes allowed in total. The number of total handshakes is
- counted in a callback set as SSL_set_info_callback. If the
- maximum number of handshakes is exceeded an error will be raised
- We do not support renegotiation in the OpenSSL extension, therefore
- this feature can only be tested externally.
- The feature is opt-in, the default setting will be to allow
- unlimited client renegotiation, as was the case before.
-
-Fri May 25 23:38:58 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * test/openssl/test_ssl.rb: Clarify the intention of errors to be
- expected. Two errors are possible when connection is refused due
- to a protocol version that was explicitly disallowed,
- OpenSSL::SSL::SSLError or Errno::ECONNRESET, depending on the
- OpenSSL version in use.
-
-Fri May 25 22:19:40 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * ext/openssl/ossl_ssl.c: Revert r35583
- * test/openssl/test_ssl.rb: Handle ECONNRESET in code instead to avoid
- the test failing in Ruby CI [1]
-
- [1] http://u64.rubyci.org/~chkbuild/ruby-trunk/log/20120507T190102Z.log.html.gz#test-all
-
-Fri May 25 19:51:36 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_eval.c (rb_f_caller): caller() method accepts second optional
- argument `n' which specify how many frames should return.
- For example, `caller(0, 1)' returns only one frame information
- which calls caller() method. If there are less than n frame
- information, then all frame information are returned. If n is 0,
- then always return [].
- This fix is part of [ruby-dev:42345] [Ruby 1.9-Feature#3917].
- However, performance and features are not enough.
- RDoc is also not available.
-
- * test/ruby/test_backtrace.rb: add a test for above.
-
-Fri May 25 17:05:07 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm.c (oldbt_init, vm_backtrace_str_ary): arg->data should
- be initialized before calling `backtrace_each()'.
-
-Fri May 25 16:11:27 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * trunk/ext/-test-/printf/printf.c: change function names because of
- conflict with msvcrt. fixed build error of mswin.
-
-Fri May 25 10:52:52 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm.c: refactoring backtrace related functions.
- (1) unify similar functions (rb_backtrace_each() and
- backtrace_object()). backtrace_each() is a unified function.
- variation:
- a) backtrace_object(): create backtrace object.
- b) vm_backtrace_str_ary(): create bt as an array of string.
- c) vm_backtrace_print(): print backtrace to specified file.
- d) rb_backtrace_print_as_bugreport(): print backtrace on
- bugreport style.
- (2) remove rb_backtrace_each(). Use backtrace_each() instead.
- (3) change the type of lev parameter to size_t.
- a) lev == 0 means current frame (exception, etc use it).
- b) lev == 1 means upper frame (caller(0) use it).
-
- * vm_core.h, vm_dump.c, vm_eval.c: ditto.
-
- * vm.c (backtrace_object(), vm_backtrace_str_ary()): fix to return a
- correct size of caller(lev) array.
- Let n be a "caller(0).size" then ln as caller(lev).size should be
- (n - lev). However, the previous implementation returns a wrong
- size array (ln > n - lev). [ruby-dev:45673]
-
- * test/ruby/test_backtrace.rb: add tests for backtrace.
-
-Fri May 25 08:51:39 2012 Eric Hodel <drbrain@segment7.net>
-
- * enum.c (enum_count): Enumerable#count no longer uses #size when
- counting elements. Patch by Nobuhiro IMAI. [ruby-trunk - Bug #6473]
-
-Fri May 25 01:15:39 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * sprintf.c (ruby__sfvextra): [EXPERIMENTAL] use inspect instead of
- to_s if plus flag is given.
-
- * vsnprintf.c (BSD_vfprintf): pass sign flag.
-
-Fri May 25 00:37:22 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * test/rubygems/test_gem_indexer.rb (setup, teardown): save @tempdir
- to remove it properly. [Bug #5348]
-
-Thu May 24 23:36:51 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vsnprintf.c (BSD_vfprintf): [EXPERIMENTAL] object representation in
- rb_enc_vsprintf(). [Feature #5896]
-
-Thu May 24 15:33:01 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_method.c (rb_method_defined_by): removed.
- nobu pointed out that rb_method_basic_definition_p() is enough
- for last commit.
-
- * error.c, eval_error.c: change for above.
-
-Thu May 24 14:30:13 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm.c: add RubyVM::Backtrace object (btobj).
- Backtrace information contains an array consists of location
- information for each frames by string.
- RubyVM::Backtrace object is lightweight backtrace information,
- which contains complete information to generate traditional style
- backtrace (an array of strings) with faster generation.
- If someone accesses to backtrace information via
- Exception#backtrace, then convert a RubyVM::Backtrace object to
- traditional style backtrace.
- This change causes incompatibility on marshal dumped binary
- of Exception. If you have any trouble on it, please tell us
- before Ruby 2.0 release.
- Note that RubyVM::Backtrace object should not expose Ruby level.
-
- * error.c, eval.c, vm_eval.c: ditto.
-
- * internal.h: ditto.
-
- * eval_error.c: fix to skip "set_backtrace" method invocation in
- creating an exception object if it call a normal set_backtrace
- method (defined by core).
-
- * test/ruby/test_settracefunc.rb: fix for above change.
-
- * vm_method.c (rb_method_defined_by): added. This function
- checks that the given object responds with the given method
- by the given cfunc.
-
- * benchmark/bm_vm2_raise1.rb, benchmark/bm_vm2_raise2.rb:
- add to measure exception creation speed. raise1 create
- exception objects from shallow stack frame. raise2 create
- exception objects from deep stack frame.
-
-Thu May 24 12:07:46 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * io.c (io_strip_bom): check EOF. [Bug #6487][ruby-core:45203]
-
-Wed May 23 22:06:14 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/net/http/header.rb (Net::HTTPHeader#range): fix broken parser of
- HTTP Range request. Old one can't parse invalid specs and multiple
- specs correctly.
-
-Wed May 23 10:18:54 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/win32.c (finish_overlapped_socket, overlapped_socket_io):
- replace ECONNABORTED to EPIPE in send, sendto and sendmsg to improve
- BSD socket compatibility. this change removes a failure on the test
- of net/ftp.
-
-Wed May 23 05:35:58 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/net/http.rb: Broke up Net::HTTP into individual files.
- [ruby-trunk - Feature #6435]
- * lib/net/http/backward.rb: ditto.
- * lib/net/http/response.rb: ditto.
- * lib/net/http/exceptions.rb: ditto.
- * lib/net/http/responses.rb: ditto.
- * lib/net/http/generic_request.rb: ditto.
- * lib/net/http/header.rb: ditto.
- * lib/net/http/request.rb: ditto.
- * lib/net/http/proxy_delta.rb: ditto.
- * lib/net/http/requests.rb: ditto.
-
-Wed May 23 05:15:11 2012 Eric Hodel <drbrain@segment7.net>
-
- * class.c (rb_mod_init_copy): Clear the cached inspect string of a
- dup'd anonymous module or class. [ruby-trunk - Bug #6454]
- * test/ruby/test_module.rb (class TestModule): ditto
-
-Tue May 22 16:49:15 2012 Koichi Sasada <ko1@atdot.net>
-
- * vm_core.h: add a data type rb_location_t to store iseq location
- information.
- rb_location_t#filename, filepath, name and line_no was moved from
- rb_iseq_t. rb_location_t#basename is a new field which is
- similar to `name' field without any decoration.
- `name' field contains some decoration such as `block in foo'.
- `basename' only contains `foo'.
- rb_iseq_t contains memory object of rb_location_t.
-
- * iseq.c: setup rb_location_t for each rb_iseq_t memory objects.
-
- * compile.c, proc.c, vm.c, vm_dump.c, vm_eval.c, vm_insnhelper.c,
- vm_method.c: support about it.
-
-Tue May 22 00:45:05 2012 Yusuke Endoh <mame@tsg.ne.jp>
-
- * struct.c (rb_struct_members): Refactoring. As Struct#members had
- returned an array of String, the old code was needed to convert
- Symbols to Strings. But it is almost unnecessary because the
- method now returns an array of Symbols. A patch by Masaki
- Matsushita <glass.saga at gmail dot com> [Feature #6218]
- [ruby-dev:45451]
-
-Mon May 21 19:20:25 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/net/ftp.rb (Net::FTP#retrbinary): close only if conn is not nil
- because transfercmd may fail and return nil.
-
- * lib/net/ftp.rb (Net::FTP#retrlines): ditto.
-
-Mon May 21 15:10:28 2012 Akinori MUSHA <knu@iDaemons.org>
-
- * ext/syslog/syslog.c: Classify constants and macros into several
- sub-modules. (Syslog::Priority, Syslog::Level, Syslog::Option
- and Syslog::Macros)
-
- * ext/syslog/syslog.c (mSyslog_inspect): Use rb_sprintf().
-
- * ext/syslog/syslog.c (mSyslog_inspect): Make sure self is a
- module before calling rb_class2name().
-
-Mon May 21 12:44:11 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
-
- * .travis.yml (install): It seems tcl/tk is skipped in Travis
- CI. Trying to fix the situation.
-
-Mon May 21 12:11:25 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * enc/depend (ENCOBJS): add dependencies.
-
- * enc/make_encmake.rb (target_encodings): extract dependencies.
-
-Mon May 21 11:26:17 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/net/ftp.rb (Net::FTP#transfercmd): rescue shutdown.
-
-Sun May 20 23:00:11 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/extmk.rb (extmake): reopen $stdout to NULL, since setting
- $stdout cannot affect child processes.
-
-Sun May 20 21:36:39 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * enc/shift_jis.c (code_to_mbclen): return
- ONIGERR_INVALID_CODE_POINT_VALUE if the code is invalid.
-
- * string.c (tr_next): increment character until the code
- is a valid character. [ruby-dev:45652] [Bug #6450]
-
-Sun May 20 12:25:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * Makefile.in (LIBRUBY_SO): link EXTSOLIBS too.
-
- * ext/extmk.rb (mf.macro): use EXTSOLIBS instead of SOLIBS to get rid
- of discard libraries needed by default. [Bug #6462]
-
-Sat May 19 19:04:38 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/extmk.rb (command_output): ENCOBJS is needed for all linked
- ruby, if --disable-shared and --with-static-linked-ext.
-
- * ext/extmk.rb (command_output): dmyext is needed as DLDOBJS if no
- static linked extensions.
-
- * Makefile.in, common.mk (PROGRAM): no extension libraries.
-
- * common.mk (build-ext): pass macros for libruby.so.
-
- * ext/extmk.rb (command_output): link extension libraries and encoding
- libraries into libruby.so, not ruby executable.
-
- * ext/extmk.rb (command_output): fold long macro lines.
-
- * Makefile.in (LIBEXT): add macro.
-
- * configure.in (ENCOBJS, EXTOBJS): use LIBEXT, not hardcoded suffix.
-
- * Makefile.in (LIBRUBY_A): fix typo. re-applying r35242.
-
-Sat May 19 04:46:53 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * ext/openssl/extconf.rb: Use Logging::message instead of message.
- * ext/zlib/extconf.rb: ditto.
-
-Fri May 18 18:13:44 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/mkmf.rb (MakeMakefile#configuration): keep space at end of
- OUTFLAG and COUTFLAG. [ruby-dev:45650]
-
-Fri May 18 17:39:42 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread_pthread.c (rb_thread_create_timer_thread): Added error
- check when failing fcntl(). [Bug #6147] [ruby-dev:45364]
-
-Fri May 18 17:41:00 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/extmk.rb (extmake): link archives only, skip script only
- extension libraries.
-
-Fri May 18 17:25:33 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * cont.c: bump up fiber machine stack size when running on 64bit
- arch. [Bug #6344] [ruby-dev:45554]
-
-Fri May 18 15:20:56 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/uri/generic.rb (URI::Generic.build): duplicate args before adding
- new items. (don't change arguments)
-
- * lib/uri/generic.rb (URI::Generic.build): use URI::Generic::COMPONENT
- if this method is called from URI::Generic.
-
- * lib/uri/generic.rb (URI::Generic.build2): escape only if the item is
- a String.
-
- * lib/uri/generic.rb (URI::Generic.build2): use DEFAULT_PARSER because
- it doesn't have parser method. [Bug #6420]
-
-Fri May 18 15:54:07 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * ext/zlib/extconf.rb: Use an exception instead of bare puts.
-
-Fri May 18 15:53:05 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * ext/psych/extconf.rb: Use an exception instead of bare abort.
-
-Fri May 18 15:51:32 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * ext/fiddle/extconf.rb: Use an exception instead of bare abort.
-
-Fri May 18 15:49:35 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * ext/readline/extconf.rb: Use an exception instead of bare exit.
-
-Fri May 18 15:38:11 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * ext/ripper/extconf.rb: Use an exception instead of bare
- Logging.message.
-
-Fri May 18 15:23:06 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * ext/openssl/extconf.rb: Clarify a message when hit Apple
- OpenSSL issue.
-
-Fri May 18 15:14:32 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * ext/extmk.rb: Show a message when extconf.rb raised an exception.
- * ext/openssl/extconf.rb: Use exception raising instead of message
- and/or abort. We want to display error message to console _and_
- logging into mkmf.log.
-
-Fri May 18 06:14:07 2012 Eric Hodel <drbrain@segment7.net>
-
- * ext/syslog/lib/syslog/logger.rb: Added Syslog::Logger which was
- ported from the SyslogLogger gem. [ruby-trunk - Feature #5096]
- * NEWS: ditto.
- * test/syslog/test_syslog_logger.rb: ditto.
-
-Fri May 18 01:28:21 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/parser.c (transcode_string): fix encoding index names.
- Thanks markizko for reporting.
-
-Thu May 17 23:03:58 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in: fix function name to be checked, to initialize
- rb_thread_cond_t properly.
-
- * thread_pthread.c (native_cond_initialize, native_cond_destroy):
- fix macro name.
-
-Thu May 17 12:53:07 2012 Yuki Yugui Sonoda <yugui@google.com>
-
- * thread.c, thread_pthread.c: Moved pthread-specific preprocessor
- hacks to thread_pthread.c
-
-Thu May 17 12:18:47 2012 Yuki Yugui Sonoda <yugui@google.com>
-
- * io.c: Fix a mistake on merging the patch in the previous commit.
-
-Thu May 17 11:33:07 2012 Yuki Yugui Sonoda <yugui@google.com>
-
- Imports Ruby's port to NativeClient (a.k.a NaCl).
- Patch by Google Inc. [ruby-core:45073].
-
- * configure.in (RUBY_NACL): New M4 func to configure variables for
- NaCl.
- (RUBY_NACL_CHECK_PEPPER_TYPES): New M4 func to check the old names
- of Pepper interface types.
- (BTESTRUBY): New variable to specify which ruby should be run on
- "make btest". NaCl can run the built binary by sel_ldr, but it need
- rbconfig.rb. So this variable is distinguished from $MINIRUBY.
-
- * thread_pthread.c: Disabled some features on NaCl.
-
- * io.c: ditto.
-
- * process.c: ditto.
-
- * signal.c: ditto.
-
- * file.c: ditto.
-
- * missing/flock.c: ditto.
-
- * nacl/pepper_main.c: An example implementation of Pepper application
- that embeds Ruby.
-
- * nacl/example.html: An example of web page that uses the Pepper
- application.
-
- * nacl/nacl-config.rb: Detects variants of NaCl SDK.
-
- * nacl/GNUmakefile.in: Makefile template for NaCl specific build
- process.
-
- * nacl/package.rb: script for packaging a NaCl-Ruby embedding
- application.
-
- * nacl/reate_nmf.rb: Wrapper script of create_nmf.py
-
- * dln.c (dln_load): Added a hack to call on NaCl.
-
- * util.c (ruby_getcwd): Path to the current directory is not available
- on NaCl.
-
-Thu May 17 10:54:58 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/tk/extconf.rb: add -l options to $libs not $LDFLAGS,
- to be passed to EXTLIBS in exts.mk.
-
- * enc/encinit.c.erb: use %-lines to adjust indent in the generated file.
-
- * lib/mkmf.rb (MakeMakefile#have_framework): combine -framework option
- and its argument with an equal sign not to be separated in merge_libs.
-
- * ext/tk/extconf.rb: ditto.
-
- * ext/extmk.rb: EXTLDFLAGS also needs to be passed.
-
-Wed May 16 15:44:22 2012 Yuki Yugui Sonoda <yugui@google.com>
-
- * configure.in: Fix an unbalanced quote.
-
-Wed May 16 15:43:10 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * ext/extmk.rb (exts.mk): use double quotes instead of single quotes
- for commandline because it's not recognized as quotes on Windows.
-
-Wed May 16 15:15:55 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in (LD): enclose with single quotes but not double quotes
- not to expand command substitution.
-
-Wed May 16 14:19:51 2012 Yuki Yugui Sonoda <yugui@google.com>
-
- Supports static linking of extensions and encodings again.
- Fixes --with-static-linked-ext.
-
- Patch by Google Inc. [ruby-core:45073].
-
- * Makefile.in (ENCOBJS, EXTOBJS): New variables to specify static
- linked libraries. Also reintroduces extinit.o, introduces encinit.o
- introduces encinit.o
-
- * common.mk: Builds static libraries rather than shared objects if
- specified.
-
- * configure.in (LD): new substitution.
-
- * enc/depend: Supports static linked libraries
- (libencs, libenc, libtrans): New target.
-
- * enc/encinit.c.erb: new template to generate the initialization of
- statically linked encodings.
-
- * enc/make_encmake.rb (--module): new flag to specify whether static
- or dynamic.
-
- * transcode_data.h (TRANS_INIT): New macro to get rid of the name
- collision of encoding initializers and transcoder initializers.
-
- * ext/extmk.rb: Fixes the behavior on $extstatic is true.
-
- * lib/mkmf.rb (clean-static): new target to clean up static linked
- libraries.
-
- * ruby.c (process_options): New initializes statically linked
- encodings here.
-
-Wed May 16 14:30:43 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * io.c: fixed a merge mistake of r33878, reported by nobu via IRC.
-
-Wed May 16 06:59:41 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * ext/date/date_strftime.c: should also be aware of flags on
- complex specifier.
-
-Wed May 16 05:11:29 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/visitors/to_ruby.rb: fix a bug with string
- subclass dumping and loading.
-
- * test/psych/test_array.rb: pertinent tests
-
- * test/psych/test_string.rb: ditto
-
-Wed May 16 01:31:21 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/visitors/to_ruby.rb: convert omap tagged maps to
- Psych::Omap objects rather than hashes. [Bug #6425]
-
- * test/psych/test_omap.rb: pertinent test.
-
-Wed May 16 01:15:45 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/visitors/yaml_tree.rb: keep a reference to
- custom coders so that GC does not impact dumped yaml reference ids.
-
-Tue May 15 23:59:48 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/test/unit.rb (Test::Unit::Options#setup_options): add --color option.
-
- * lib/test/unit.rb (Test::Unit::Runner#_prepare_run): defer color code
- initialization to regard --color option.
-
-Mon May 14 16:28:36 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (f_arglist): should reset lexical states after empty
- argument list with no parenthesis as well as parenthesized list,
- so that reserved name method definition work. [ruby-dev:45626]
- [Bug #6403]
-
-Mon May 14 00:14:24 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
-
- * enumerator.c (lazy_take_func, lazy_take): multiple calls of
- force/to_a method to Enumerator::Lazy#take should return same
- results. [ruby-dev:45634] [Bug #6428]
-
- * test/ruby/test_lazy_enumerator.rb (test_take_recycle): add test for
- above.
-
-Sun May 13 23:38:31 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
-
- * test/ruby/test_io.rb (test_flush_in_finalizer1): don't use IO.for_fd
- to close IO objects. it create IO object with already closed fd, and
- cause occasional Errno::EBADF in following tests. [ruby-core:45020]
- [Bug #6228]
-
-Sun May 13 23:32:16 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
-
- * test/ruby/test_io.rb (TestIO): revert r35631. it broke the intent of
- test_flush_in_finalizer1. [ruby-core:43951] [Bug #6228]
-
-Sun May 13 22:46:36 2012 Tanaka Akira <akr@fsij.org>
-
- * ext/etc/etc.c (passwd_ensure): move endpwent() call from
- passwd_iterate to close /etc/passwd on exception.
- (group_ensure): move endgrent() call from group_iterate to close
- /etc/group on exception.
-
-Sun May 13 18:10:43 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * ext/date/date_strftime.c: removed unused code and changed the style.
-
-Sun May 13 17:37:56 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * ext/date/date_strftime.c: refactored.
-
-Sun May 13 06:40:12 2012 Luis Lavena <luislavena@gmail.com>
-
- * test/ruby/test_io.rb (class TestIO): Disable GC during IO tests to
- avoid file descriptors being GC'ed. Suggestion by Tomoyuki Chikanaga
- [ruby-core:43951][Bug #6228]
-
-Sat May 12 07:00:16 2012 Eric Hodel <drbrain@segment7.net>
-
- * ext/sdbm/init.c: Added documentation. Patch by Justin Collins,
- cleanup by Zachary Scott. [ruby-trunk - #6410]
-
-Sat May 12 06:02:03 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/fileutils.rb (cp_r): Fixed cp_r example. Patch by TJ Koblentz
- from pull request #114. [ruby-trunk - Bug #6411]
-
-Sat May 12 05:23:06 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * thread.c (rb_threadptr_execute_interrupts_common):
- test_signal_requiring of test/ruby/test_signal.rb fail if the sub
- process is killed on waiting IO in lex_io_gets in rb_load_file in
- rb_load_internal in require.
- This is because
- (1) the process receive the killing signal in
- rb_thread_io_blocking_region in rb_read_internal in lex_io_gets.
- (2) set th->errinfo as INT2FIX(TAG_FATAL) at
- rb_threadptr_execute_interrupts_common.
- (3) escape rb_load_file in rb_load_internal and jump to EXEC_TAG()
- without set loaded as TRUE.
- (4) call first rb_exc_raise(GET_THREAD()->errinfo); because loaded
- is FALSE as above. this errinfo should be an exception object
- but this is INT2FIX(TAG_FATAL).
- Don't call first rb_exc_raise if GET_THREAD()->errinfo is Fixnum.
-
-Fri May 11 14:23:11 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (primary): begin/end block should be isolated from outside.
- [ruby-dev:45631][Bug #6419]
-
-Fri May 11 14:09:47 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/bigdecimal/bigdecimal.c (PUSH): to prevent VALUE from GC,
- must not cast it to unsigned long, which may be shorter than
- VALUE, and the result can be mere garbage.
-
-Fri May 11 09:51:07 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/test/unit.rb (Test::Unit::Runner#failed): no unnecessary
- newlines if no reports to be displayed.
-
-Thu May 10 10:55:35 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * test/minitest/test_minitest_mock.rb: Correct requiring path to
- metametameta.rb.
-
- * test/minitest/test_minitest_unit.rb: Correct requiring path to
- metametameta.rb.
-
-Thu May 10 10:18:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (lex_state_name): returns name for lex_state_e, for debug
- use.
-
-Wed May 9 16:36:01 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/mkmf.rb (MakeMakefile#pkg_config): check if libs resulted from
- pkg-config works actually.
-
-Wed May 9 16:01:38 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * lib/net/imap.rb (decode_utf7, encode_utf7): refactored by
- Nobuyoshi Nakada, to use String#encode.
-
-Wed May 9 13:26:25 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * test/rubygems/test_gem_remote_fetcher.rb: skip OpenSSL dependent
- tests if not available.
-
-Wed May 9 08:09:38 2012 Ryan Davis <ryand-ruby@zenspider.com>
-
- * lib/minitest/*: Imported minitest 3.0.0 (r7435)
- * test/minitest/*: ditto
- * test/rubygems/*: Imported fixes for buggy use of assert_match
- and deprecated assert_block
- UNBUNCH YOUR PANTIES. THE TESTS DO NOT RUN CLEAN ON OSX.
-
-Wed May 9 06:28:59 2012 Eric Hodel <drbrain@segment7.net>
-
- * re.c (rb_reg_equal): Removed incorrect example for Regexp#== with
- "n" option. [ruby-talk - Bug #6415]
-
-Wed May 9 06:23:33 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * ext/date/date_core.c: reverted.
-
-Wed May 9 04:31:26 2012 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
-
- * lib/rinda/ring.rb (lookup_ring_any): fix Rinda::RingFinger.primary
- hungs forever. [ruby-talk:395364]
-
-Tue May 8 21:09:00 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * include/ruby/win32.h (FD_SET): change function to macro.
- To avoid buffer overflow when smaller FD_SETSIZE is used in ext
- libraries.
-
- * win32/win32.c (rb_w32_fdset): this function is not used anymore.
- But we leave this for compatibility.
-
- * win32/win32.c (rb_w32_select_with_thread): fix SEGV when smaller
- FD_SETSIZE is used in ext libraries. Dereference of fd_set pointer
- causes SEGV.
-
- * test/-ext-/win32/test_fd_setsize.rb(TestFdSetSize): add tests for
- above.
- * ext/-test-/win32/fd_setsize/depend: ditto.
- * ext/-test-/win32/fd_setsize/extconf.rb: ditto.
- * ext/-test-/win32/fd_setsize/fd_setsize.c: ditto.
-
- [ruby-core:44588] [Bug #6352]
-
-Tue May 8 20:44:46 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * io.c (io_unread): fix IO#pos with mode 'r' bug on Windows.
- If the end of reading buffer is CR, io_unread() needs to unread one
- more byte.
- [ruby-core:44874] [Bug #6401]
-
- * test/ruby/test_io_m17n.rb (TestIO_M17N#test_pos_with_buffer_end_cr):
- add a test for above.
-
-Tue May 8 13:38:17 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * ext/date/date_core.c: improving introduction in Date/DateTime
- documentation. patched by Daniel Kaufman via Github.
- https://github.com/ruby/ruby/pull/110
-
-Tue May 8 13:36:02 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in (POSTLINK): default to : command to get rid of flag
- only command, since BSD make does not work with it.
-
-Tue May 8 13:35:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/test/unit.rb (MiniTest#run_test): remove exact trace and get rid
- of IndexError, which could caused by modified $@ sometimes.
-
-Tue May 8 11:21:27 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/minitest/metametameta.rb (MetaMetaMetaTestCase#assert_report):
- support drive letter on Windows. yes, the original code is metameta.
-
-Tue May 8 08:54:48 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/abbrev.rb: Fixed typo in abbrev pattern documentation. Based on
- patch by Mark Rushakoff. [ruby-trunk - #6346]
-
-Tue May 8 07:44:18 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * ext/openssl/ossl_ssl.c (ossl_start_ssl): remove useless rb_sys_fail
- before ossl_raise. this cause a test failure on Linux.
- http://u64.rubyci.org/~chkbuild/ruby-trunk/log/20120507T190102Z.log.html.gz
-
-Tue May 8 05:35:18 2012 Eric Hodel <drbrain@segment7.net>
-
- * object.c (Init_Object): Added reference to variable.c where
- public_constant and private_constant documentation lives. [#6381]
-
-Tue May 8 04:47:44 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/test/unit.rb (Test::Unit::Runner#output): prefer local output to
- get rid of unexpected side effect in test/minitest/metametameta.rb.
-
- * lib/test/unit.rb (MiniTest#run_test): show the running test in $0.
-
- * lib/test/unit.rb (Test::Unit::StatusLineOutput): new class to output
- in status line.
-
- * test/testunit/test_hideskip.rb (TestHideSkip#test_hideskip):
- MiniTest#puke now reports Skipped messages only if verbose mode.
-
- * test/testunit/test_sorting.rb (TestTestUnitSorting#test_sorting):
- ditto.
-
- * lib/test/unit.rb (Test::Unit::Runner#puke): modify only result and
- drop useless reports, not override entirely.
-
- * bootstraptest/runner.rb (exec_test, show_progress): show rotators
- and pass/fail counts.
-
- * sample/test.rb (PROGRESS): refine output.
-
-Tue May 8 02:34:26 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/minitest/unit.rb (assert_match): refix of r35563.
- r35563 breaks the intention of the original change.
- https://github.com/seattlerb/minitest/commit/68858105b2eb11c85105ffac5f32b662c59397f3
- * lib/minitest/unit.rb (refute_match): ditto.
-
-Mon May 7 21:19:17 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * ext/json: Merge JSON 1.7.1.
- https://github.com/flori/json/commit/e5b9a9465c1159fae533bca320d950b772bcb4ac
-
-Mon May 7 22:54:22 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * ext/openssl/ossl_ssl.c: add support for option flags
- OpenSSL::SSL::OP_NO_TLSv1_1
- OpenSSL::SSL::OP_NO_TLSv1_2
- to allow blocking specific TLS versions. Thanks to Justin Guyett for
- pointing this out to me.
- * test/openssl/test_ssl.rb: add tests to assert correct behavior when
- blocking certain versions of TLS/SSL both on server and client side.
- Also refactored tests to reduce boilerplate code a little.
- * test/openssl/utils.rb: rescue Errno::ECONNRESET for tests where
- client rejects the connection because a forbidden protocol version
- was used.
-
-Mon May 7 20:14:15 2012 Tanaka Akira <akr@fsij.org>
-
- * lib/securerandom.rb (random_bytes): call to_int method for the
- argument at first.
-
-Mon May 7 17:54:12 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/minitest/unit.rb (assert_match): replace matcher only if both
- matcher and obj are String. fix r35541. [Bug #6405]
- DON'T COMMIT IF YOU CAN'T RUN TEST.
- FIX AS SOON AS POSSIBLE YOU BREAK TESTS.
- patched by ayumin.
- https://github.com/seattlerb/minitest/pull/124
-
- * lib/minitest/unit.rb (refute_match): ditto.
-
-Mon May 7 13:41:00 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * Makefile.in (PROGRAM), configure.in (POSTLINK): sign built program
- using RUBY_CODESIGN identity.
-
-Mon May 7 13:03:55 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * lib/net/imap.rb (body_type_attachment): parse body type
- "ATTACHMENT". [ruby-core:44849] [Bug #6397]
-
-Mon May 7 10:49:36 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * ext/bigdecimal/bigdecimal.c (Init_bigdecimal): define IDs before
- they are used. [ruby-core:44900] [Bug #6406]
-
-Mon May 7 10:27:56 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/digest/rmd160/rmd160.c (RMD160_Update): fix for huge data.
-
-Mon May 7 10:23:04 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * test/fileutils/fileasserts.rb: use assert_equal, assert_match, and so on.
-
- * test/ruby/enc/test_utf16.rb, test/ruby/enc/test_utf32.rb,
- test/ruby/test_io_m17n.rb (assert_str_equal): ditto.
-
- * test/rubygems/test_gem_remote_fetcher.rb
- (assert_data_from_{server,proxy}): ditto.
-
- * test/test_pstore.rb (test_thread_safe): ditto.
-
-Mon May 7 10:16:30 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * test/rubygems/test_gem_installer.rb (TestGemInstaller#test_dir): fix
- argument order. expected value must come first.
-
-Mon May 7 09:14:11 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * ext/openssl/ossl_ssl.c: support TLSv1.1 & TLSv1.2. Add
- SSLContext#version to inspect the version that was negotiated for
- a given connection.
- * ext/openssl/extconf.rb: detect TLS 1.1 & 1.2 support.
- * test/openssl/test_ssl.rb: add tests for TLS 1.1 & 1.2 given they
- are supported by the native OpenSSL being used.
-
-Sun May 6 21:34:29 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * io.c (io_encoding_set): suppress warnings. [ruby-dev:45627]
- this tmp1 is not required after r35538.
-
- * addr2line.c: suppress warnings.
-
-Sun May 6 18:39:39 2012 Koichi Sasada <ko1@atdot.net>
-
- * compile.c (iseq_compile_each): remove unused variable `size'.
-
-Sun May 6 14:50:03 2012 Tanaka Akira <akr@fsij.org>
-
- * lib/securerandom.rb: show actual read length in an error message.
-
-Sat May 5 06:43:10 2012 Ryan Davis <ryand-ruby@zenspider.com>
-
- * lib/minitest/*: Imported minitest 2.12.1 (r7323)
- * test/minitest/*: ditto
-
-Sat May 5 01:47:33 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * test/zlib/test_zlib.rb (test_inflate): add a test for Zlib.inflate.
- patched by headius (Charles Nutter). [ruby-core:44859] [Bug #6398]
-
- * test/zlib/test_zlib.rb (test_deflate): add a test for Zlib.deflate.
-
-Sat May 5 00:53:55 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * io.c (parse_mode_enc): remove warnings 'Ignoring internal encoding'.
- [ruby-core:44455] [Bug #6324]
-
- * io.c (io_encoding_set): ditto.
-
-Fri May 4 07:19:02 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/rdoc/parser.rb (RDoc.binary?): fix wrong regexp.
- [ruby-core:44798] [Bug #6393]
-
-Fri May 4 01:33:20 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/rdoc/parser.rb (RDoc.alias_extension): a real file is irrelevant
- to aliasing. [ruby-core:44796][Bug #6392]
-
- * lib/rdoc/parser.rb (RDoc.zip?): non-existent file will not be a zip
- file.
-
- * lib/rdoc/parser.rb (RDoc.can_parse_by_name): accept aliased
- extension file names.
-
- * lib/rdoc/parser.rb (RDoc.binary?): binary read data may have
- incomplete multibyte sequence. [ruby-core:44798][Bug #6393]
-
-Wed May 2 23:55:51 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/test/unit.rb (Test::Unit::RequireFiles#non_options): expand
- real path to get rid of loading same files via symlinks.
-
-Wed May 2 23:26:04 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * cont.c (rb_fiber_m_transfer): improve sample code in Fiber#transfer
- documentation. emphasize the difference between transfer and resume.
-
-Wed May 2 23:21:20 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (parser_yylex): allow spaces between lambda arrow and
- parenthesis. [ruby-dev:45605][Feature #6390]
-
-Wed May 2 19:06:30 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * cont.c (rb_fiber_m_transfer): Improved Fiber documentation.
- patched by Anuj Dutta. [ruby-core:44540][Bug #6343]
-
-Wed May 2 13:06:37 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * README, README.ja: reformatted using rdoc markup. based on the
- patches by zzak (Zachary Scott) in [Feature #6388].
-
- * README, README.ja: updated the author's mail address.
-
-Wed May 2 09:46:09 2012 Kouji Takao <kouji@takao7.net>
-
- * ext/readline/readline.c (Readline.special_prefixes=)
- (Readline.special_prefixes): new function. An original patch was
- created by nagachika. [Feature #5784]
-
-Tue May 1 22:18:45 2012 Kouji Takao <kouji@takao7.net>
-
- * ext/readline/readline.c (Readline.pre_input_hook)
- (Readline.insert_text, Readline.redisplay): new function. An
- original patch was created by nagachika. [Feature #5785]
-
-Tue May 1 15:46:48 2012 Koichi Sasada <ko1@atdot.net>
-
- * common.mk: "$(Q)-..." doesn't work on nmake.
-
-Tue May 1 15:32:10 2012 Koichi Sasada <ko1@atdot.net>
-
- * common.mk: replace '@' prefix to '$(Q)' to control build
- process outputs.
-
-Tue May 1 14:17:59 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/openssl/deprecation.rb (OpenSSL.check_func): check if header is
- available for macro compatibility.
-
-Tue May 1 10:53:54 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/ruby/test_settracefunc.rb: ignore traces from another threads
- because Kernel.set_trace_func affects other threads.
-
-Tue May 1 06:04:14 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/digest/sha2/sha2.c (REVERSE32): explicitly cast since unsigned
- long may be larger than sha2_word32.
-
- * ext/digest/sha2/sha2.c (SHA{256,512,384}_{Final,End}): should clear
- whole content, not pointer size.
-
- * ext/digest/*/extconf.rb: use pkg_config to use same library with
- openssl. [ruby-core:44755][Bug #6379]
-
- * ext/openssl/deprecation.rb: extract check for broken Apple OpenSSL.
-
-Tue May 1 05:02:30 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in (optflags): disable unsafe optimizations.
- [ruby-core:44679][Bug #6370]
-
-Mon Apr 30 23:36:49 2012 Tanaka Akira <akr@fsij.org>
-
- * lib/fileutils.rb (copy_metadata): use File.lchown and File.lchmod to
- update meta data of symlinks.
-
-Mon Apr 30 23:05:53 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * test/ruby/test_continuation.rb (tracing_with_set_trace_func): don't
- call Continuation from other threads. [ruby-dev:45596] [Bug #6382]
-
-Mon Apr 30 20:10:04 2012 Tanaka Akira <akr@fsij.org>
-
- * ext/zlib/extconf.rb: detect z_crc_t type which will be defined
- since zlib-1.2.7.
-
- * ext/zlib/zlib.c (rb_zlib_crc_table): use z_crc_t if available.
-
-Mon Apr 30 09:02:15 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * ext/openssl/lib/openssl/ssl.rb: add hostname to "hostname does not
- match server cert." error. patched by Wes Morgan via Github.
- https://github.com/ruby/ruby/pull/122
-
-Mon Apr 30 04:43:53 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/json/yaml_events.rb: implicit styles should not
- be changeable for JSON events.
-
-Sun Apr 29 06:12:02 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (assoc, parser_yylex): add syntax to splat keyword hash.
- [ruby-core:44591][Feature #6353]
-
- * compile.c (compile_array_): generate keyword splat insns.
-
- * vm.c (m_core_hash_merge_kwd): merge keyword hash into intermediate
- hash. leftward argument is prior currently.
-
-Fri Apr 27 12:34:23 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * ext/dl/cfunc.c (rb_dlcfunc_call): should convert a Bignum value to
- unsigned long long on Win64.
- [ruby-core:44636][Bug #6364] reported by raylinn@gmail.com (ray linn)
-
-Fri Apr 27 10:58:17 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * test/readline/test_readline.rb (setup): avoid affected by user's
- inputrc file. [ruby-dev:45584][Bug #6357]
-
-Fri Apr 27 01:45:05 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * thread.c (rb_threadptr_execute_interrupts_common):
- handle timer_interrupt only on the first loop for the case to avoid
- the infinite loop like following case:
- * there is 2 Ruby threads (3 pthreads)
- (1) main thread is waiting at gvl_yield:112 (native_cond_wait)
- (2) sub thread works
- (3) sub thread waits at gvl_yield:133 (native_mutex_unlock)
- (4) main thread works
- (5) main thread goes to gvl_acquire_common
- (6) main thread call rb_wakeup_timer_thread
- (7) timer thread set timer interrupt to the main thread
- (8) main thread works
- (9) main thread waits at gvl_acquire_common:64 (native_cond_wait)
- (10) sub tread works
- (11) set sub thread as the current thread
- (12) run Ruby thread
- (13) ...100ms
- (14) sub thread goes to rb_threadptr_execute_interrupts_common
- (15) sub thread call rb_thread_schedule_limits
- (16) sub thread call gvl_release_common
- (17) sub threads waits at gvl_yield:121 (native_cond_wait)
- (18) main threads works
- (19) main thread back to gvl_yield
- (20) set main thread as the current thread
- (21) main thread call gvl_yield
- (22) main thread waits at gvl_yield:112 (native_cond_wait)
- As described above, the main thread can't escape from
- rb_threadptr_execute_interrupts_common.
- See extended memo: http://bugs.ruby-lang.org/projects/ruby-trunk/wiki/R35480_ExtendedMemo
-
-Fri Apr 27 07:15:07 2012 Tanaka Akira <akr@fsij.org>
-
- * ext/socket/socket.c (sock_s_pack_sockaddr_un): support the longest
- path in sockaddr_un, really.
- reported by nagachika.
- http://d.hatena.ne.jp/nagachika/20120426/ruby_trunk_changes_35474_35476
-
-Thu Apr 26 12:28:06 2012 Tanaka Akira <akr@fsij.org>
-
- * ext/socket/raddrinfo.c (init_unix_addrinfo): support the longest
- path in sockaddr_un.
- (inspect_sockaddr): ditto.
- (addrinfo_mdump): ditto.
- (addrinfo_mload): ditto.
- (rsock_unixpath_str): new function.
- (rsock_unixpath): removed.
- (rsock_unixaddr): use rsock_unixpath_str.
-
- * ext/socket/socket.c (sock_s_pack_sockaddr_un): support the longest
- path in sockaddr_un.
- (sock_s_unpack_sockaddr_un): ditto.
- (sock_s_gethostbyaddr): unused variable removed.
-
- * ext/socket/unixsocket.c (rsock_init_unixsock): support the longest
- path in sockaddr_un.
-
- * ext/socket/rubysocket.h (rsock_unixpath_str): declared.
- (rsock_unixpath): removed.
-
- * test/socket/test_unix.rb: comment out test_nul because abstract unix
- sockets may contain NULs.
-
-Thu Apr 26 01:32:33 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * test/optparse/test_summary.rb (test_summary_containing_space): add
- test for r35467. OptionParser#to_a shouldn't split banner by spaces.
-
-Wed Apr 25 23:02:46 2012 Tanaka Akira <akr@fsij.org>
-
- * ext/socket/raddrinfo.c (init_unix_addrinfo): refine error message
- format.
- (addrinfo_mload): show more information on "too long AF_UNIX path"
- error.
- (addrinfo_unix_path): ditto for "too short AF_UNIX address" and
- "too long AF_UNIX address" error.
-
-Wed Apr 25 05:46:12 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/optparse.rb (OptionParser#to_a): split for each lines.
- [ruby-dev:45568][Bug #6348]
-
-Tue Apr 24 21:57:53 2012 Tanaka Akira <akr@fsij.org>
-
- * ext/socket/raddrinfo.c (init_unix_addrinfo): show actual path length
- when it is too long for Unix socket.
-
- * ext/socket/unixsocket.c (rsock_init_unixsock): ditto.
-
- * ext/socket/socket.c (sock_s_pack_sockaddr_un): ditto.
-
-Tue Apr 24 21:43:58 2012 Yusuke Endoh <mame@tsg.ne.jp>
-
- * lib/net/smtp.rb (check_continue): raise an error with an explanatory
- message. [ruby-core:35854] [Feature #4598]
-
-Tue Apr 24 21:11:31 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/optparse.rb (OptionParser#to_a): should split by end-of-line,
- and MUST TEST IT, MUST RUN THE TEST, MUST VERIFY BEFORE BACKPORT.
- [ruby-dev:45568][Bug #6348]
-
-Tue Apr 24 19:59:31 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * enc/euc_jp.c: added EUC-JP-2004 and its alias EUC-JISX0213.
- [ruby-dev:45571] [Feature #6349]
- Requested by Kyouhei Yanagita <yanagi@shakenbu.org>.
-
- * enc/trans/japanese_euc.trans: ditto.
-
- * enc/trans/JIS/JISX0213-[12]%UCS@{BMP,SIP}.src: JIS X 0213:2004 ->
- Unicode mapping table from NetBSD.
-
- * enc/trans/JIS/UCS@{BMP,SIP}%JISX0213-[12].src: Unicode -> JIS X
- 0213:2004 mapping table from NetBSD.
-
- * tool/transcode-tblgen.rb: added SIP support.
-
- * test/ruby/test_transcode.rb: tests of above changes.
-
-Tue Apr 24 18:12:13 2012 Koichi Sasada <ko1@atdot.net>
-
- * compile.c: fix to output warning when the same literals
- are available as a condition of same case clause.
- And remove information ('#n') because we can find duplicated
- condition with explicit line numbers.
- [ruby-core:38343] [Ruby 1.9 - Bug #5068]
-
- * test/ruby/test_syntax.rb: add a test for above.
-
-Tue Apr 24 17:03:51 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/win32.c (waitpid): need to check the return value of
- FindChildSlotByHandle() before passing poll_child_status().
- this fixed a SEGV in test-all. reported by ko1 via IRC.
-
-Tue Apr 24 16:04:39 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (parser_yylex): EXPR_BEG by keywords is a start point of
- commands. [ruby-dev:45563][Bug #6347]
-
- * parse.y (superclass): ditto for superclass.
-
- * parse.y (parser_parse_string, parser_here_document): ditto for
- string interpolation.
-
- * parse.y (parser_yylex): ditto for singleton class.
-
-Tue Apr 24 15:51:41 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/optparse.rb (OptionParser#to_a): should split by end-of-line
- [ruby-dev:45568][Bug #6348]
-
- * lib/optparse.rb (OptionParser#to_a): String#to_a is no longer
- defined. [ruby-dev:45568][Bug #6348]
-
-Tue Apr 24 12:46:50 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * hash.c, object.c, struct.c, lib/ostruct.rb: add to_h methods.
- [Feature #6276]
-
-Tue Apr 24 10:54:34 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/drb/drbtest.rb ({DRbCore,DRbAry}#teardown): cannot pass SIGTERM
- to another process on Windows, so use SIGINT instead.
-
-Tue Apr 24 00:25:39 2012 Yusuke Endoh <mame@tsg.ne.jp>
-
- * thread.c (rb_check_deadlock): refine an error message of deadlock
- detection. [ruby-core:44336] [Bug #6288]
-
-Tue Apr 24 00:14:42 2012 Yusuke Endoh <mame@tsg.ne.jp>
-
- * parse.y (primary): remove wrong "fixpos" that caused incorrect
- source_location of blocks. [ruby-core:42232] [Bug #5930]
-
- * test/ruby/test_proc.rb: add a test for above.
-
-Mon Apr 23 22:56:08 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/iconv: deprecated. [Feature #6322]
-
-Mon Apr 23 22:07:00 2012 Tanaka Akira <akr@fsij.org>
-
- * test/socket/test_unix.rb (bound_unix_socket): make temporary
- filename shorter for less possibility of Unix socket path over
- 107 bytes when TMPDIR has long path.
-
-Mon Apr 23 20:35:49 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/win32.c (szInternalCmds, internal_match, internal_cmd_match):
- get rid of a segmentation fault with GCC 4.7.0.
- reported by raylinn@gmail.com (ray linn) at [ruby-core:44505]
- [Bug #6333], and patched by mame.
-
- * test/ruby/test_system.rb (TestSystem#test_system): test for it.
-
-Mon Apr 23 20:11:02 2012 Tanaka Akira <akr@fsij.org>
-
- * lib/drb/ssl.rb: generate 1024 bits RSA key instead of 512 bits.
- OpenSSL 1.0.1 rejects 512 bits RSA key for TLS1.2 with SHA512.
- http://rt.openssl.org/Ticket/Display.html?id=2769&user=guest&pass=guest
- reported by Bohuslav Kabrda.
- [ruby-core:43844] [ruby-trunk - Bug #6221]
-
-Mon Apr 23 19:54:33 2012 Tanaka Akira <akr@fsij.org>
-
- * test/drb/drbtest.rb: rescue Errno::ESRCH for Process.kill.
- reported by NARUSE, Yui. [ruby-dev:45551]
-
-Mon Apr 23 14:16:45 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * .gdbinit (rb_ps_vm): follow st_table's packing change.
-
-Mon Apr 23 10:43:30 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in: disable rubygems not to load rbconfig.rb before
- fake.rb. [ruby-core:44492][Bug #6329]
-
-Sun Apr 22 20:26:06 2012 Tanaka Akira <akr@fsij.org>
-
- * lib/drb/extservm.rb (DRb::ExtServManager): don't use /bin/sh to
- invoke service subprocess. mark detach threads for clean up.
-
- * test/drb/drbtest.rb: clean up the service subprocess in teardown.
-
- * test/drb/test_drb.rb: set @service_name for teardown.
-
- * test/drb/test_drbunix.rb: ditto.
-
- * test/drb/test_drbssl.rb: ditto.
-
- [ruby-dev:45547]
-
-Sun Apr 22 07:51:29 2012 Tanaka Akira <akr@fsij.org>
-
- * lib/drb/ssl.rb: close accepted TCP socket if SSL accept is failed.
- [ruby-dev:45541]
-
-Sat Apr 21 14:36:49 2012 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
-
- * test/rinda/test_rinda.rb: fix sticks on some tests problem
- [Bug #6272]
-
-Fri Apr 20 12:24:04 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems/ssl_certs/AddTrustExternalCARoot.pem: Removed to avoid
- conflict with ca-bundle.pem
- * lib/rubygems/ssl_certs/VerisignClass3PublicPrimaryCertificationAuthority-G2.pem:
- ditto.
- * lib/rubygems/ssl_certs/Entrust_net-Secure-Server-Certification-Authority.pem:
- ditto.
-
-Fri Apr 20 08:07:06 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems: Update to RubyGems 1.8.23 which contains security
- fixes:
-
- RubyGems now disallows redirection from HTTPS to HTTP.
-
- RubyGems now verifies SSL connections.
-
- See https://github.com/rubygems/rubygems/blob/1.8/History.txt for
- changes since 1.8.22.
- * test/rubygems: ditto.
-
-Thu Apr 19 16:33:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * strftime.c (rb_strftime_with_timespec): fix carry-up bug and
- overwrite '+' with '-' if negative offset less than a hour.
- [ruby-core:44447][Bug #6323]
-
-Thu Apr 19 09:39:57 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/-test-/win32/dln/extconf.rb: need import library for ordinal
- entry even on mingw. [ruby-core:44441][Bug #6320]
-
-Thu Apr 19 09:35:15 2012 Eric Hodel <drbrain@segment7.net>
-
- * random.c (random_init): Clarify that the default seed is
- Random.new_seed, not zero. Based on patch by Roger Pack.
- [ruby-trunk - Bug #6313]
- * random.c (rb_f_srand): ditto.
-
-Thu Apr 19 08:59:02 2012 Eric Hodel <drbrain@segment7.net>
-
- * ext/curses/curses.c (window_nodelay): Fixed call-seq of nodelay to
- include the '='.
-
- Improved description window.nodelay=.
-
-Thu Apr 19 08:47:54 2012 Eric Hodel <drbrain@segment7.net>
-
- * io.c (io_readpartial): Document the output buffer parameter is
- overwritten with the read contents even when non-empty.
- Patch by yu nobuoka. [ruby-trunk - Bug #6285]
- * io.c (io_read_nonblock): ditto.
- * io.c (io_read): ditto.
- * io.c (rb_io_sysread): ditto.
- * io.c (argf_read): ditto.
- * io.c (argf_readpartial): ditto.
- * ext/stringio/stringio.c (strio_read): ditto.
- * test/ruby/test_argf.rb (class TestArgf): Add test for existing
- behavior of read outbuf.
- * test/ruby/test_io.rb (class TestIO): ditto.
- * test/stringio/test_stringio.rb (class TestStringIO): ditto.
-
-Wed Apr 18 22:58:55 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in (DOT, DOXYGEN): use AC_CHECK_PROGS instead of
- AC_CHECK_PROG which needs the third argument. [ruby-core:44433]
- [Bug #6316]
-
- * configure.in (PKG_CONFIG): fix condition to skip older version
- of pkg-config. continue in backticks does not affect outside.
-
-Wed Apr 18 13:59:40 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/file.c (INVALID_FILE_ATTRIBUTES): define for old SDK.
-
-Wed Apr 18 10:22:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * strftime.c (rb_strftime_with_timespec): add an interim digit for
- the timezone offset which is less than an hour.
-
-Wed Apr 18 09:58:29 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems/version.rb: Fixed init_with warning by calling into
- yaml_initialize (for syck) from psych's init_with
-
-Wed Apr 18 09:03:43 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems: Update to RubyGems 1.8.22 plus r33517 and r35337 which
- were ported to the rubygems git repository.
-
- See https://github.com/rubygems/rubygems/blob/1.8/History.txt for
- changes since 1.8.11.
-
- * test/rubygems: ditto.
-
-Tue Apr 17 22:18:48 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * strftime.c (rb_strftime_with_timespec): fix padding of time zone
- offset. [ruby-dev:43287][Bug #4458]
-
-Tue Apr 17 13:11:14 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * dln.c (rb_w32_check_imported): skip ordinal entries. based on a
- patch by phasis68 (Heesob Park) at [ruby-core:44381].
- [ruby-core:44371][Bug #6303]
-
-Mon Apr 16 18:22:14 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * spec/default.mspec: expand relative path for ruby_exe which uses
- them with Dir.chdir; it breaks relative paths, for example
- core/kernel/exec_spec.rb.
-
-Mon Apr 16 16:22:40 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * win32/win32.c (gmtime_r, localtime_r): POSIX compliant reentrant
- versions.
-
- * configure.in (RUBY_MSVCRT_VERSION): define on mingw too.
-
- * win32/Makefile.sub (config.h): prefix RT_VER with RUBY and make
- more descriptive to get rid of potential conflict.
-
-Mon Apr 16 15:19:39 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in (NO_RUBY_VENDOR_LIB): fix missing comma.
-
-Mon Apr 16 12:17:12 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * lib/matrix.rb (hermitian?): Bug fix, patch by George Koehler
- [Bug #6290] [rubyspec:4b9573d7613]
-
-Mon Apr 16 09:42:50 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * lib/rubygems/remote_fetcher.rb (Gem::RemoteFetcher#download): should
- use File.identical? to check the identity of the files.
- this fixed an error of a test on Windows.
-
-Sat Apr 14 12:55:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in (UNREACHABLE): gcc 4.4 eliminates unreachable code
- if -O3 is given.
-
- * win32/win32.c (child_result): dropped colon.
-
-Sat Apr 14 10:45:18 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/webrick/server.rb (WEBrick::GenericServer#start):
- partially revert r35315.
-
- * test/webrick/test_server.rb (test_start_exception):
- received signal is delivered to the main thread, so it is needed to
- emulate it. patched by Eric Hodel. [ruby-core:44348] [Feature #6236]
-
-Sat Apr 14 09:35:45 2012 Eric Hodel <drbrain@segment7.net>
-
- * variable.c (trace_ev): Removed "not reached" comment as this line is
- reached.
- * variable.c (rb_obj_remove_instance_variable): Replaced "not reached"
- comment with the UNREACHABLE macro.
- * variable.c (rb_mod_const_missing): ditto.
- * variable.c (rb_mod_remove_cvar): ditto.
- * enum.c (first_i): ditto.
- * string.c (rb_str_aref): ditto.
- * string.c (str_byte_aref): ditto.
- * string.c (rb_to_id): ditto.
- * io.c (rb_io_fmode_modestr): ditto.
- * io.c (rb_io_oflags_modestr): ditto.
- * pack.c (num2i32): ditto.
- * vm_eval.c (rb_method_missing): ditto.
- * vm_eval.c (rb_f_throw): ditto.
- * dir.c (dir_read): ditto.
- * win32/win32.c (child_result): ditto.
- * struct.c (rb_struct_getmember): ditto.
- * struct.c (rb_struct_set): ditto.
- * struct.c (rb_struct_aref_id): ditto.
- * eval.c (rb_f_raise): ditto.
- * process.c (rb_f_exit_bang): ditto.
- * process.c (rb_f_exit): ditto.
- * process.c (rb_f_abort): ditto.
- * ext/-test-/iter/break.c (iter_break_value): ditto.
- * ext/pty/pty.c (pty_check): ditto.
- * ext/openssl/ossl_pkey.c (ossl_pkey_new): ditto.
- * ext/readline/readline.c (rb_remove_history): ditto.
- * ext/stringio/stringio.c (strio_unimpl): ditto.
- * numeric.c (num_sadded): ditto.
- * numeric.c (num_init_copy): ditto.
- * numeric.c (rb_num2ll): ditto.
- * numeric.c (rb_num2ull): ditto.
- * vm_insnhelper.c (call_cfunc): ditto.
- * ruby.c (opt_W_getter): ditto.
- * bignum.c (rb_big_coerce): ditto.
- * file.c (rb_f_test): ditto.
-
-Sat Apr 14 08:38:20 2012 Eric Hodel <drbrain@segment7.net>
-
- * encoding.c (rb_enc_codepoint_len): Use UNREACHABLE to avoid "control
- reaches end of non-void function" warnings. [ruby-trunk - Bug #6066]
- * re.c (name_to_backref_number): ditto.
- * object.c (rb_Float): ditto.
- * io.c (io_readpartial): ditto.
- * io.c (io_read_nonblock): ditto.
- * pack.c (rb_uv_to_utf8): ditto.
- * proc.c (rb_method_entry_arity): ditto.
- * vm_method.c (rb_f_notimplement): ditto.
- * struct.c (rb_struct_aset_id): ditto.
- * class.c (rb_scan_args): ditto.
- * process.c (rlimit_resource_type): ditto.
- * process.c (rlimit_resource_value): ditto.
- * process.c (p_uid_switch): ditto.
- * process.c (p_gid_switch): ditto.
- * ext/digest/digest.c (rb_digest_instance_update): ditto.
- * ext/digest/digest.c (rb_digest_instance_finish): ditto.
- * ext/digest/digest.c (rb_digest_instance_reset): ditto.
- * ext/digest/digest.c (rb_digest_instance_block_length): ditto.
- * ext/bigdecimal/bigdecimal.c (BigDecimalCmp): ditto.
- * ext/dl/handle.c (rb_dlhandle_close): ditto.
- * ext/tk/tcltklib.c (pending_exception_check0): ditto.
- * ext/tk/tcltklib.c (pending_exception_check1): ditto.
- * ext/tk/tcltklib.c (ip_cancel_eval_core): ditto.
- * ext/tk/tcltklib.c (lib_get_reltype_name): ditto.
- * ext/tk/tcltklib.c (create_dummy_encoding_for_tk_core): ditto.
- * ext/tk/tkutil/tkutil.c (tk_hash_kv): ditto.
- * ext/openssl/ossl_ssl.c (ossl_ssl_session_reused): ditto.
- * ext/openssl/ossl_pkey_ec.c (ossl_ec_key_dsa_verify_asn1): ditto.
- * ext/openssl/ossl_pkey_ec.c (ossl_ec_point_is_at_infinit): ditto.
- * ext/openssl/ossl_pkey_ec.c (ossl_ec_point_is_on_curve): ditto.
- * ext/fiddle/conversions.c (generic_to_value): ditto.
- * ext/socket/raddrinfo.c (rsock_io_socket_addrinfo): ditto.
- * ext/socket/socket.c (sock_s_getnameinfo): ditto.
- * ext/ripper/eventids2.c (ripper_token2eventid): ditto.
- * cont.c (return_fiber): ditto.
- * dmydln.c (dln_load): ditto.
- * vm_insnhelper.c (vm_search_normal_superclass): ditto.
- * bignum.c (big_fdiv): ditto.
- * marshal.c (r_symlink): ditto.
- * marshal.c (r_symbol): ditto.
-
-Fri Apr 13 17:12:09 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * hash.c (inspect_i): keep string's coderange.
-
-Fri Apr 13 15:26:51 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * hash.c (rb_hash_aset, rb_hash_update, rb_hash_update_by): use
- st_update() to reduce evaluation of hash values.
-
-Fri Apr 13 15:17:36 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/webrick/server.rb (WEBrick::GenericServer#stop): fix r35303;
- this method is to deny new connections, not shutdown yet.
-
- * lib/webrick/server.rb (WEBrick::GenericServer#start):
- re-raise exception only when the exception is Interrupt (^C).
-
-Thu Apr 12 19:51:45 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * ext/date/date_core.c: added some notes.
-
-Wed Apr 11 17:16:49 2012 Koichi Sasada <ko1@atdot.net>
-
- * compile.c (compile_array, compile_array_):
- Divide big array (or hash) literals into several blocks and
- concatenate them. There was a problem that a big array (hash)
- literal causes SystemStackError exception (stack overflow)
- because VM push all contents of the literal onto VM stack to
- make an array (or hash). To solve this issue, we make several
- arrays (hashes) and concatenate them to make a big array (hash)
- object. [ruby-dev:37701] [Bug #982]
-
- * compile.c (iseq_compile_each, setup_args): use modified
- compile_array.
-
- * vm.c (m_core_hash_from_ary, m_core_hash_merge_ary,
- m_core_hash_merge_ptr): added for above change.
-
- * id.c (Init_id), parse.y: add core method ids.
-
- * bootstraptest/test_literal.rb: add simple tests.
-
- * bootstraptest/test_eval.rb: remove rescue clause to catch
- SystemStackError exception.
-
- * test/ruby/test_literal.rb: add tests to check no stack overflow.
-
-Thu Apr 12 07:10:37 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/uri/generic.rb (module URI): URI now downcases the scheme to
- follow RFC 2396 section 3.1. [ruby-trunk - Feature #4551]
- * test/uri/test_generic.rb (class URI): Test for above
-
-Thu Apr 12 06:15:44 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/net/protocol.rb (module Net): Added ReadTimeout to match
- OpenTimeout. ReadTimeout is now raised by rbuf_fill instead of
- Timeout::Error to help users distinguish what type of timeout
- occurred. [ruby-trunk - Feature #6088]
- * lib/net/pop.rb (module Net): Updated documentation for ReadTimeout
- and OpenTimeout.
- * lib/net/http.rb (module Net): ditto
- * lib/net/smtp.rb (module Net): ditto
- * lib/net/telnet.rb (module Net): Net::ReadTimeout is now raised in
- waitfor to match Net::Protocol.
- * test/net/http/test_http.rb: Updated Timeout::Error expectation to
- Net::ReadTimeout.
- * test/net/ftp/test_ftp.rb: ditto
-
-Thu Apr 12 05:27:01 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/webrick/server.rb (module WEBrick::GenericServer): A server
- will now continue only when a StandardError subclass is raised. For
- other exception types the error will be logged at the fatal level and
- the server will safely stop. Based on a patch by Alex Young.
- [ruby-trunk - Feature #6236]
- * test/webrick/test_server.rb: Test for new exception handling
- behavior. Join the server thread instead of busy-waiting for it to
- shut down to remove race conditions.
-
-Thu Apr 12 03:50:44 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/test/unit.rb (Test::Unit:Runner::Worker#_run_suites):
- call GC.start before running the test suites.
-
-Wed Apr 11 22:31:19 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (rb_check_id_cstr): new function to check if ID is
- registered with NUL-terminated C string.
-
- * sprintf.c (rb_str_format): avoid inadvertent symbol creation.
-
-Wed Apr 11 20:28:36 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * io.c (rb_io_eof): use eof() instead of io_fillbuf(). It's because
- io_unread() doesn't work properly when reading CRLF with read(length)
- and mode 'r'.
- [ruby-core:44189][Bug #6271]
-
- * test/ruby/test_io_m17n.rb (TestIO_M17N#test_read_crlf_and_eof):
- test for above.
-
-Wed Apr 11 07:38:33 2012 Eric Hodel <drbrain@segment7.net>
-
- * ext/digest/sha2/lib/sha2.rb (Digest#block_length): Fixed method name
- in documentation examples. Patch by naleski via
- https://github.com/ruby/ruby/pull/115
-
-Wed Apr 11 07:33:13 2012 Eric Hodel <drbrain@segment7.net>
-
- * pack.c (pack_pack): Warn when an invalid character is found in the
- format string when $VERBOSE is true. [ruby-trunk - Feature #5219]
- * pack.c (pack_unpack): ditto
- * test/ruby/test_pack.rb (class TestPack): Test for warnings on
- invalid format characters.
-
-Wed Apr 11 06:11:10 2012 Eric Hodel <drbrain@segment7.net>
-
- * string.c (rb_str_tr): Documented use of \ to escape characters.
- [ruby-trunk - Bug #6161]
- * string.c (rb_str_count): ditto
-
-Wed Apr 11 05:14:51 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/abbrev.rb: Clarified that Abbrev.abbrev returns a Hash instead
- of an Array. Patch by Andrei Bocan. [ruby-trunk - Bug #6107]
-
-Wed Apr 11 03:02:24 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * ext/ripper/lib/ripper/sexp.rb: fix spelling. patched by
- Jonathan Hinkle via https://github.com/ruby/ruby/pull/116
-
-Tue Apr 10 19:07:04 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * error.c (rb_enc_raise): new function to raise an exception with
- the message in the given encoding. patched by now (Nikolai
- Weibull) at [ruby-core:41160]. [Feature #5650]
-
-Tue Apr 10 18:19:32 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/net/http.rb (Net::HTTP#send_request_with_body_stream):
- use IO.copy_stream for requests using body_stream.
- patched by Eric Wong. [ruby-core:40898] [Feature #5605]
-
-Tue Apr 10 16:53:21 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * thread_pthread.c: add prototype declarations for older Mac OS X.
- [ruby-core:43376][Bug #6170]
-
-Tue Apr 10 15:35:21 2012 Koichi Sasada <ko1@atdot.net>
-
- * compile.c (iseq_set_sequence): show a hint if there are duplicated
- "when" clauses. [ruby-core:41502] [ruby-trunk - Feature #5716]
-
-Tue Apr 10 09:57:00 2012 Eric Hodel <drbrain@segment7.net>
-
- * string.c (rb_str_split_m): Documented behavior of split on the empty
- string. [ruby-trunk - Feature #3575]
-
-Tue Apr 10 09:48:31 2012 Eric Hodel <drbrain@segment7.net>
-
- * ext/zlib/zlib.c (rb_deflate_s_deflate): Fixed ruby example replacing
- NO_FLUSH with FINISH. [ruby-trunk - Bug #6273]
-
-Mon Apr 9 23:10:26 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * win32/win32.c (isUNCRoot, winnt_stat): support long UNC.
- [ruby-core:30623][Feature #3399]
-
-Mon Apr 9 15:16:01 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (string_content, parser_yylex): count brace nesting to
- dispatch embexpr_end. [ruby-core:43775][Bug #6211]
-
-Mon Apr 9 13:06:58 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * hash.c (rb_hash_set_default_proc): Accept nil, patch by Run Paint
- [Feature #4234]
-
- * test/ruby/test_hash.rb: test for above.
-
-Mon Apr 9 08:01:15 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * ext/date/date_strftime.c: gets the value with range() consistently.
- * ext/date/date_strftime.c (range): now just replaces the given item.
-
-Mon Apr 9 06:58:01 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * complex.c (nucomp_expt): [ruby-core:44170].
-
-Mon Apr 9 02:52:03 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * complex.c (nucomp_expt): the result of f_complex_new2 may be a fixnum
- with mathn. [ruby-core:44170] [Bug #6267]
-
-Sun Apr 8 22:46:01 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * ext/json/generator/generator.c (generate_json_bignum):
- add RB_GC_GUARD.
- http://fb.rubyci.org/~chkbuild/ruby-trunk/log/20120407T210301Z.diff.html.gz
-
-Sun Apr 8 07:26:40 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler): get keys
- and fetch values from it to prevent @timeout_info's error
- "can't add a new key into hash during iteration".
-
-Sun Apr 8 06:51:57 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * io.c (io_unread): cast as long the value for extra_max.
- [ruby-core:44137] [Bug #6257]
-
-Sun Apr 8 06:46:48 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/webrick/httpresponse.rb (WEBrick::HTTPResponse#send_body_io):
- use readpartial to get data even if the response is streaming data and
- each data is smaller than @buffer_size.
- patched by yu nobuoka. [ruby-dev:45471] [Bug #6230]
-
-Sat Apr 7 22:35:36 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * include/ruby/win32.h (rb_w32_aspawn_flags): add the declaration of
- new function.
-
- * process.c (enum): add EXEC_OPTION_PGROUP and move the position
- above for the usage in proc_spawn_n().
-
- * process.c (proc_spawn_n): add an argument to pass new option
- `new_pgroup`. The option specifies CREATE_NEW_PROCESS_GROUP flag to
- CreateProcessW(). This flag is necessary for the usage of
- Process.kill on the subprocess on Windows.
-
- * process.c (rb_exec_arg_addopt): ditto.
-
- * process.c (rb_spawn_process): ditto.
-
- * process.c (documentation for rb_f_spawn): add documentation for new
- option `new_pgroup` of spawn.
-
- * test/ruby/test_process.rb (TestProcess#test_execopts_new_pgroup):
- add tests for option `new_pgroup`.
-
- * test/ruby/test_thread.rb
- (TestThreadGroup#test_thread_timer_and_interrupt):
- add option `new_pgroup: true` to spawn on Windows. It's needed for
- Process.kill on a subprocess.
-
- * win32/win32.c (CreateChild): add an argument to pass
- dwCreationFlags of CreateProcessW().
-
- * win32/win32.c (rb_w32_spawn): ditto.
-
- * win32/win32.c (rb_w32_aspawn_flags): add new function to pass
- dwCreationFlags.
-
- * win32/win32.c (rb_w32_aspawn): refactor to move the content to
- rb_w32_aspawn_flags().
- [ruby-core:43245][Bug #6131]
-
-Sat Apr 7 22:32:00 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * test/ruby/test_thread.rb
- (TestThreadGroup#test_thread_timer_and_interrupt): skip on Windows.
- Process.kill cannot kill a subprocess if CREATE_NEW_PROCESS_GROUP
- flag is not specified in a call to CreateProcessW().
-
- * win32/win32.c (CreateChild): revert the usage of
- CREATE_NEW_PROCESS_GROUP flag for compatibility.
- [ruby-core:43245][Bug #6131]
-
-Sat Apr 7 10:28:40 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych.rb: bumping up psych version to match release.
- * ext/psych/psych.gemspec: ditto
-
-Sat Apr 7 02:07:00 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/parser.c: fall back to any encoding if the external
- encoding is wrong. [ruby-core:44163]
- * test/psych/test_encoding.rb: fix test
-
-Fri Apr 6 16:24:24 2012 Martin Duerst <duerst@it.aoyama.ac.jp>
-
- * struct.c (documentation for rb_struct_members_m):
- fix 'array of strings' to 'array of symbols'
- [ruby-core:44152][Bug #6264]
-
-Fri Apr 6 14:27:04 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-
- * Makefile.in ($(LIBRUBY_A)): fix typo.
-
-Thu Apr 5 13:26:15 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * missing/alloca.c (xmalloc, xfree): use ruby version, not
- depending on RUBY_LIB_PREFIX. [ruby-dev:45492][Bug #6255]
-
-Wed Apr 4 13:06:39 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/ftp/ftp.rb (Net::FTP#close): restore original read_timeout.
-
-Wed Apr 4 10:33:31 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/ftp/ftp.rb (Net::FTP#close): ignore exceptions from shutdown and
- read on closing.
-
-Wed Apr 4 01:48:35 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/ftp/ftp.rb (Net::FTP#close): close socket more gracefully.
-
- * lib/ftp/ftp.rb (Net::BufferedSocket#shutdown): added.
-
- * test/net/ftp/test_ftp.rb (FTPTest#create_ftp_server): wait socket
- with shutdown and read.
-
-Tue Apr 3 19:00:52 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/net/ftp/test_ftp.rb (FTPTest#create_ftp_server): should wait
- a little before closing socket because if the client call
- Net::FTP#getmultiline the socket is suddenly closed by the server in
- the getline loop.
-
-Tue Apr 3 18:33:38 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * process.c (setreuid, setregid): suppress warnings.
- [ruby-core:43374][Bug #6169]
-
-Tue Apr 3 10:18:27 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * enumerator.c (inspect_enumerator): suppress uninitialized
- instance variable warnings. [ruby-dev:45449][Bug #6214]
- patched by no6v (Nobuhiro IMAI).
-
-Mon Apr 2 13:25:08 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/optparse/ac.rb: autoconf-like options.
-
-Mon Apr 2 10:34:00 2012 eregon <eregontp@gmail.com>
-
- * string.c (rb_str_start_with, rb_str_end_with): raise an error if
- an argument is not convertible to a String.
- [ruby-core:40623][Bug #5536]
-
-Mon Apr 2 03:35:25 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/webrick/server.rb (WEBrick::GenericServer): close socket only if
- the socket is not closed yet.
-
-Sun Apr 1 23:03:18 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/net/ftp.rb (Net::BufferedSocket): should delegate send() to @io
- for Net::FTP#abort and Net::FTP#status.
-
-Sun Apr 1 00:41:56 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * lib/net/ftp.rb: fixed the domain name in examples.
-
-Sat Mar 31 21:39:45 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler): dup to prevent
- @timeout_info's "can't add a new key into hash during iteration".
-
-Sat Mar 31 14:22:59 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * hash.c (hash_default_value): extract from rb_hash_aref(), to be
- shared with rb_hash_shift(), so that overriding Hash#default
- will be respected.
-
-Sat Mar 31 14:16:02 2012 Sokolov Yura (funny-falcon) <funny.falcon@gmail.com>
-
- * hash.c: do not allocate st_table when it is not necessary.
-
-Sat Mar 31 13:42:39 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * lib/net/ftp.rb (read_timeout=, open_timeout=): supported timeout.
-
-Sat Mar 31 13:20:40 2012 Sokolov Yura (funny-falcon) <funny.falcon@gmail.com>
-
- * hash.c: remove unnecessary checks for Qundef in hash iterations.
- since hash use st_foreach_check for iterations, such checks are
- needless.
-
-Sat Mar 31 12:05:01 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * ext/openssl/ossl_x509cert.c: Fix doc typo.
-
-Sat Mar 31 10:13:24 2012 Sokolov Yura (funny-falcon) <funny.falcon@gmail.com>
-
- * st.c (st_foreach_check, st_foreach): remove ancient check. This
- check are from initial ordered hash commit when first entry were
- created with entry->fore = entry->back = entry.
-
- * st.c (st_delete): use real_entries in st_delete for packed tables
-
-Sat Mar 31 07:53:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * st.c (st_foreach_check): remove the entry by replacing with never
- when ST_DELETE.
-
- * hash.c (st_foreach_safe): since table is not for VALUE, Qundef is
- not special value, so use 0 instead. therefore this function can be
- applied to only st_table which 0 is invalid as keys, e.g., IDs.
-
- * hash.c: Qundef cannot be passed from st_foreach_check().
-
- * hash.c, marshal.c, object.c, variable.c: fix callback argument types
- of iterators.
-
-Thu Mar 29 23:50:15 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * st.c (st_update): pass pointer to key to the callback function.
-
-Thu Mar 29 16:36:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * st.c (st_update): add existing parameter to the callback function.
-
-Thu Mar 29 16:35:32 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/test/unit.rb (terminal_width, del_status_line, put_status):
- extract as methods.
-
-Thu Mar 29 10:20:18 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * ext/openssl/ossl_pkcs7.c: fix crash when parsing garbage data.
- * test/openssl/test_pkcs7.rb: assert correct behavior for it.
- Thanks to Matt Venables for reporting the issue.
- [ruby-core:43250][Bug #6134]
-
-Thu Mar 29 10:16:05 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * thread_win32.c (TIME_QUANTUM_USEC): 10ms(= old setting) [experimental]
- cf. [Bug #6098]
-
-Thu Mar 29 10:12:12 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * thread.c (rb_threadptr_execute_interrupts_common): use defined
- TIME_QUANTUM_USEC instead of a magic number. there is no meanings
- to use different values for checking interval of interruption and
- thread switching limits.
- cf. [Bug #6098]
-
-Thu Mar 29 09:26:17 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * test/openssl/test_x509cert.rb: exclude test that fails when issuing
- a certificate with RSA signature and DSS1 digest for earlier
- OpenSSL versions when used in conjunction with OpenSSL 1.0.1.
- Thanks, Vit Ondruch, for reporting the issue.
- [ruby-core:42949][Bug #6089]
-
-Thu Mar 29 08:25:35 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * NEWS: add note about unified behavior of encoding nil values in
- instances of OpenSSL::ASN1::ASN1Data.
-
-Thu Mar 29 07:45:36 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * ext/openssl/ossl_asn1.c: raise TypeError when trying to encode nil
- values for Primitive instances.
- * test/openssl/test_asn1.rb: Assert consistent behavior when
- encoding nil values: Primitives raise TypeError, Constructives
- raise NoMethodError.
- Fixes [ruby-core:43009][Bug #6102]
-
-Wed Mar 28 16:39:59 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * process.c (obj2uid, obj2gid): allow strings as input user/group id.
- [ruby-core:40923][Feature #5610]
-
-Wed Mar 28 15:06:18 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * marshal.c (r_symreal): default to ASCII-8BIT for non-ascii symbols,
- otherwise it should be converted to US-ASCII in rb_intern_str() if
- possible. [ruby-core:43762][Bug #6209]
-
-Wed Mar 28 08:44:24 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych.rb: updating version to match gem
- * ext/psych/psych.gemspec: ditto
- * ext/psych/lib/psych/visitors/to_ruby.rb: fixing deprecation warning
-
-Tue Mar 27 23:44:11 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * io.c (io_unread): fixed memory leak. report by nagachika via IRC.
-
-Tue Mar 27 22:44:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in (verconf.h): separate load path specific stuff from
- config.h.
-
-Tue Mar 27 22:43:40 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * win32/Makefile.sub: fix config.h path to include.
-
-Tue Mar 27 17:08:08 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-
- * win32/win32.c (check_if_dir): fix memory leak.
-
-Tue Mar 27 13:13:51 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * string.c (str_new_empty): should copy also the encoding as an
- empty substring. [ruby-dev:45441][Bug #6206]
-
-Mon Mar 26 23:43:04 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * lib/net/ftp.rb (parse227, parse228, parse229): don't use $~.
-
-Mon Mar 26 23:34:40 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * lib/net/ftp.rb (parse227, parse228, parse229): don't use local
- variables defined by named capture for other Ruby implementations
- such as Rubinius.
-
-Mon Mar 26 23:19:03 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * lib/net/ftp.rb (parse_pasv_port): refactored.
-
-Mon Mar 26 19:49:49 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * test/net/ftp/test_ftp.rb: add the test, which was forgotten in the
- previous commit.
-
-Mon Mar 26 19:37:27 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * lib/net/ftp.rb (parse227, parse228, parse229): refactored.
-
-Mon Mar 26 11:46:23 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * enumerator.c (inspect_enumerator): show method arguments of
- lazy enumerators correctly.
-
-Mon Mar 26 13:51:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * win32/win32.c (check_if_dir, check_if_wdir): fix for Visual C++
- not to use S_ISDIR(). [Feature #2408][ruby-core:26925]
-
- * ruby.c (load_file_internal): ditto.
-
-Mon Mar 26 11:46:01 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ruby.c (load_file_internal): bail out if the script is a directory.
- [Feature #2408][ruby-core:26925]
-
- * win32/win32.c (rb_w32_open, rb_w32_wopen): check if the file is a
- directory when access denied, to set errno to EISDIR.
-
-Sun Mar 25 18:13:14 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * string.c (tr_setup_table): fix multiple non latin argument for
- non latin (over 256 characters) tr-like methods.
- [ruby-core:43371] [Bug #6167]
-
-Sun Mar 25 00:46:06 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * enumerator (lazy_initialize): set the instance variable "receiver"
- to include the receiver to the return value of inspect on a lazy
- enumerator directly created by Enumerator::Lazy.new.
-
- * enumerator (RETURN_LAZY): don't set the instance variable "receiver".
-
-Sat Mar 24 23:59:00 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * enumerator (enumerator_inspect): include the original receiver and
- method name of Enumerator::Lazy in the result of inspect.
- [ruby-core:43345] [Bug #6159]
-
- * enumerator (InitVM_Enumerator): don't use rb_define_alias for
- some methods such as collect in order to make rb_frame_this_func()
- return the correct method names.
-
-Sat Mar 24 22:22:18 2012 Sambasiva Rao Suda <sambasivarao@gmail.org>
-
- * time.c (time_init_1): Time.new will accept seconds as string or
- int. [ruby-core:43569][Bug #6193]
-
-Fri Mar 23 15:12:12 2012 Martin Duerst <duerst@it.aoyama.ac.jp>
-
- * transcode.c (documentation for str_encode): Explain
- that transcoding to the same encoding is a no-op
- (i.e. no exceptions, no replacements,...).
- [ruby-core:43557][Bug #6190]
-
-Fri Mar 23 13:19:20 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * bignum.c (rb_str_to_inum): must be ASCII compatible encoding as
- well as String#hex and String#oct. [ruby-core:43566][Bug #6192]
-
- * string.c (rb_must_asciicompat): check if ASCII compatible.
-
-Thu Mar 22 23:14:36 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * transcode.c (str_encode_bang, encoded_dup): if nothing was
- transcoded, just set encoding but leave coderange unchanged as
- force_encoding. [ruby-core:43557][Bug #6190]
-
-Thu Mar 22 22:30:44 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * io.c (static int io_fflush): add the definition.
- Use it in set_binary_mode_with_seek_cur().
-
- * io.c (set_binary_mode_with_seek_cur): refactoring to split the
- content into io_unread(). Fix the possibility of buffer overflow.
-
- * io.c (io_unread): add new implementation for Windows. Previous one
- caused invalid cursor position using IO#pos with OS text mode. New
- one fixes the bug.
-
- * test/ruby/test_io_m17n.rb
- (TestIO_M17N#test_pos_dont_move_cursor_position): add a test for
- above bug.
- [ruby-core:43497] [Bug #6179]
-
-Thu Mar 22 19:55:08 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * win32/win32.c (rb_w32_fstat, rb_w32_fstati64): convert FILETIME
- to time_t directly, not to be affected by TZ unnecessarily.
-
- * win32/win32.c (unixtime_to_filetime): convert time_t to FILETIME
- simply.
-
-Thu Mar 22 13:43:31 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/openssl/ossl_pkey_rsa.c (rsa_generate): fix argument type.
- [Bug #6094]
-
-Thu Mar 22 11:14:10 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/ruby/test_io.rb (TestIO#test_pos_with_getc): updated.
- see [ruby-core:43550]
-
-Wed Mar 21 17:57:57 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * regcomp.c: Merge Onigmo 3d855b30d574536d3ae600260208c6624ae4791c.
- [Bug#6143] [Bug#6144] [Bug#6145]
-
-Wed Mar 21 17:01:55 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/ruby/test_io.rb (TestIO#test_pos_with_getc): added.
- see [Bug #6179][ruby-core:43518]
-
-Mon Mar 19 17:18:51 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * enumerator.c (lazy_flat_map_func): convert the block value to
- Array if it doesn't respond to each. [ruby-core:43334]
- [Bug #6155]
-
-Mon Mar 19 16:34:14 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * enum.c (zip_i): variadic argument needs explicit cast on the
- platforms where VALUE is longer than int.
-
-Mon Mar 19 15:36:41 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * enumerator.c (enumerable_lazy): add an example of take and first
- to the documentation. [ruby-core:43344] [Bug #6158]
- add the description of the behavior when a block is given to zip
- or cycle.
-
-Mon Mar 19 15:20:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * compile.c (iseq_specialized_instruction): DRY and replace chain
- of if-else with switch for special instructions. based on a
- patch by Vasfed. https://github.com/ruby/ruby/pull/105
-
-Mon Mar 19 15:05:54 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
-
- * test/test_pty.rb: same as r29280, skip tests when PTY allocation
- failed (that's not our fault).
-
-Sun Mar 18 23:21:17 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * gc.c (aligned_free): fix condition for free. memalign() and
- posix_memalign() are not defined together normally.
-
-Sun Mar 18 18:31:45 2012 Yuki Sonoda (Yugui) <yugui@yugui.jp>
-
- * gc.c (aligned_malloc, aligned_free): added fallback implementations
- for platforms like OSX Leopard.
-
-Sun Mar 18 17:17:48 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * bignum.c (rb_big_pow): estimate result bit size more precisely.
- [ruby-core:30735][Feature #3429]
-
-Sun Mar 18 17:17:36 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * gc.c (free_method_entry_i): method entry may be in
- unlinked_method_entry_list. [ruby-core:43383][Bug #6171]
-
-Sun Mar 18 15:27:31 2012 Tanaka Akira <akr@fsij.org>
-
- * compile.c: typo fix by Run Paint Run Run.
- [ruby-core:28368] [Bug #2824]
-
-Sun Mar 18 10:01:02 2012 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * lib/profiler.rb: support calling singleton methods of
- an instance of BasicObject.
-
-Sat Mar 17 06:56:58 2012 Eric Hodel <drbrain@segment7.net>
-
- * object.c: Fix indentation of Class#inherited example.
-
-Sat Mar 17 01:46:05 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-
- * string.c (trnext): fix bug with string ending with '\\'.
- [ruby-dev:45374][Bug #6160]
-
- * test/ruby/test_string.rb (TestString#test_delete): test for
- above.
-
-Fri Mar 16 20:06:24 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * string.c (trnext): should advance char-wise.
- [ruby-core:43335][Bug #6156]
-
-Fri Mar 16 17:42:05 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (block_append_gen): fix unreachable warning line number.
- should warn at the code, not jump.
-
-Fri Mar 16 17:33:08 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * enum.c (enum_take): allocate buffer array before iteration, as well
- as enum_first did.
-
- * enum.c (enum_first): remove duplication.
-
-Fri Mar 16 14:43:18 2012 Yuki Sonoda (Yugui) <yugui@yugui.jp>
-
- * load.c (ruby_init_ext): don't free the given pointer itself.
- It is not guaranteed even that the pointer is on heap.
-
-Fri Mar 16 14:37:57 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * vm_eval.c (rb_mod_module_eval): fix the documentation of
- class_eval to mention class variable lookup. [ruby-core:40649]
- [Bug #5544]
-
-Fri Mar 16 14:27:11 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * vm_eval.c (rb_mod_module_eval): fix the documentation of
- class_eval to mention constant lookup. [ruby-core:41718]
- [Bug #5777]
-
-Fri Mar 16 14:10:45 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * lib/net/imap.rb (initialize): raise Net::IMAP::Error when the
- connection is closed without a greeting response.
- [ruby-core:40938] [Bug #5616]
-
-Fri Mar 16 13:50:12 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * lib/net/imap.rb (rfc822_text): ignore [] after RFC822.
- [ruby-core:40945] [Bug #5620]
-
-Fri Mar 16 12:00:42 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm_insnhelper.c (argument_error): use line number at the beginning
- of lambda, not the first code of its body.
- [ruby-core:43314][Bug #6151]
-
- * iseq.c (rb_iseq_first_lineno): constified.
-
-Fri Mar 16 11:20:07 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * enumerator.c (lazy_take): don't enumerate an extra value.
- [ruby-dev:45370] [Bug #6152]
-
-Fri Mar 16 06:30:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * enumerator.c (lazy_zip_func): variadic argument needs explicit cast
- on the platforms where VALUE is longer than int.
-
- * enumerator.c (lazy_init_iterator): no need to check overflow twice.
-
-Fri Mar 16 05:47:09 2012 Eric Hodel <drbrain@segment7.net>
-
- * enumerator.c (lazy_init_iterator): Fix type error (int vs long).
-
-Thu Mar 15 23:13:36 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * enum.c (rb_enum_values_pack): rename from enum_values_pack, and
- remove static.
-
- * enumerator.c (lazy_init_iterator, lazy_init_yielder,
- lazy_select_func, lazy_reject_func, lazy_grep_func): handle
- multiple values correctly.
-
- * enumerator.c (lazy_grep): change the behavior when a block is
- given, to be consistent with Enumerable#grep.
-
-Thu Mar 15 19:12:31 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * enumerator.c (lazy_zip): rescue StopIteration returned by
- Enumerator#next.
-
-Thu Mar 15 18:19:53 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * enumerator.c (lazy_zip, lazy_cycle): Enumerator::Lazy#{zip,cycle}
- should be eager when a block is given, to be consistent with
- Enumerable#{zip,cycle}.
-
-Thu Mar 15 17:45:27 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * enumerator.c (InitVM_Enumerator): renamed Enumerable::Lazy to
- Enumerator::Lazy.
-
-Thu Mar 15 16:37:38 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * enumerator.c (enumerable_lazy): added cycle to the documentation.
-
-Thu Mar 15 15:37:42 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (parser_yylex): fix warning line number.
-
-Thu Mar 15 15:19:38 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * enumerator.c (lazy_cycle): check argument number overflow before
- creating temporary array.
-
-Thu Mar 15 15:04:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * util.c (ruby_strtod): no need to check same digit for hexdigit
- twice. [ruby-dev:45363][Bug #6146]
-
- * parse.y (sym_check_asciionly): check ascii compatibility before
- scanning for code range.
-
- * parse.y (intern_str): set to us-ascii if ascii only.
- [ruby-dev:45363][Bug #6146]
-
- * file.c (ruby_enc_find_basename): allow NULL as alllen.
- [ruby-dev:45363][Bug #6146]
-
-Thu Mar 15 14:49:31 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * string.c (rb_str_conv_enc_opts): default to original encoding.
-
-Thu Mar 15 13:47:17 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * hash.c (env_str_new, rb_f_getenv, env_fetch): use rb_str_conv_enc()
- instead of rb_str_encode() to simplify the code.
-
-Thu Mar 15 12:44:50 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/win32.c, include/ruby/win32.h (rb_w32_ugetenv): new API to
- accept and to return UTF-8 strings.
-
- * win32/win32.c (rb_w32_getenv): follow above change.
-
- * win32/win32.c (rb_w32_get_environ): returns UTF-8 environment area.
-
- * hash.c (env_str_new, rb_f_getenv, env_fetch): follow above changes.
- [Bug #5570] [ruby-core:40737]
-
-Thu Mar 15 10:57:27 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * enumerator.c (lazy_cycle): add Enumerable::Lazy#cycle.
-
-Thu Mar 15 10:31:40 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * test/ruby/test_arity.rb (TestArity#err_mess): use assert_raise.
-
-Thu Mar 15 07:03:52 2012 Eric Hodel <drbrain@segment7.net>
-
- * vm_eval.c (check_funcall): Raise ArgumentError if respond_to?
- requires more than three arguments. [Bug #6000]
-
- * test/ruby/test_object.rb (class TestObject): Test for respond_to?
- requiring more than three arguments.
-
-Thu Mar 15 06:08:06 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * include/ruby/intern.h: Add rb_check_arity, rb_error_arity [#6085]
-
- * array.c: Use rb_check_arity / rb_error_arity
-
- * class.c: ditto
-
- * enumerator.c: ditto
-
- * eval.c: ditto
-
- * file.c: ditto
-
- * hash.c: ditto
-
- * numeric.c: ditto
-
- * proc.c: ditto
-
- * process.c: ditto
-
- * random.c: ditto
-
- * re.c: ditto
-
- * signal.c: ditto
-
- * string.c: ditto
-
- * struct.c: ditto
-
- * transcode.c: ditto
-
- * vm_eval.c: ditto
-
- * vm_insnhelper.c: ditto & implementation of rb_error_arity
-
- * test/ruby/test_arity.rb: tests for above
-
-Thu Mar 15 06:08:05 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * vm_insnhelper.c: improve number of arguments error in case of
- optional parameters (issue #6085)
-
- * include/ruby/intern.h: define UNLIMITED_ARGUMENTS
-
- * test/ruby/test_arity.rb: test for above
-
-Thu Mar 15 00:58:04 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * enumerator.c (enumerable_lazy): fix the documentation of
- Enumerable#lazy.
-
-Wed Mar 14 22:01:06 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * enumerator.c (lazy_init_iterator): break when Qundef is returned
- to make obj.drop(3).take(2) work properly.
-
- * enumerator.c (lazy_take_while): add Enumerable::Lazy#take_while.
-
- * enumerator.c (lazy_drop): add Enumerable::Lazy#drop.
-
- * enumerator.c (lazy_drop_while): add Enumerable::Lazy#drop_while.
-
- * enumerator.c (InitVM_Enumerator): add Enumerable::Lazy#force as an
- alias of to_a.
-
-Wed Mar 14 19:28:40 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * enumerator.c (lazy_take): add Enumerable::Lazy#take.
-
-Wed Mar 14 18:40:36 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * enumerator.c: use long for array indices.
-
-Wed Mar 14 18:25:18 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * enumerator.c: moved the comment of StopIteration.
-
-Wed Mar 14 17:55:29 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * numeric.c (flodivmod): must go through the same pass if HAVE_FMOD or
- not. this is a bugfix of r35013.
-
-Wed Mar 14 16:41:55 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/test_tmpdir.rb (TestTmpdir#test_world_writable): skip on Windows.
-
-Wed Mar 14 15:09:23 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * numeric.c: fix flodivmod for cornercases [Bug #6044]
- add ruby_float_mod
-
- * insns.def (opt_mod): use ruby_float_mod
-
- * internal.h: declare ruby_float_mod
-
- * test/ruby/test_float.rb: tests for above
-
- * test/ruby/envutil.rb: create helper assert_is_minus_zero
-
-Wed Mar 14 10:44:35 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * enumerator.c (lazy_grep_func): should use === instead of =~, as
- well as Enumerable#grep
-
-Wed Mar 14 08:15:54 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * enumerator.c (lazy_flat_map_func): use each for non-Array objects.
-
-Wed Mar 14 08:06:35 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * enumerator.c (lazy_zip): add Enumerable::Lazy#zip.
-
- * enumerator.c (lazy_lazy): just returns self.
-
-Wed Mar 14 07:48:36 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * ext/date/date_core.c (datetime_s_now): [ruby-core:43256].
-
-Tue Mar 13 22:00:14 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * compile.c (iseq_set_arguments): keyword rest arg without keyword args.
-
- * node.c (dump_node): dump kw_rest_arg too.
-
- * parse.y (block_param, f_arg): more kwrest patterns.
- [ruby-core:42455][Bug #5989]
-
- * parse.y (new_args_gen): no extra kw_rest_arg if no keyword rest arg.
-
-Tue Mar 13 15:17:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (block_param, f_args): add rules for the case arguments
- begin with kwrest. [ruby-core:42455][Bug #5989]
-
-Tue Mar 13 12:37:53 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * io.c (io_encoding_set): always warn if external encoding and internal
- encoding are identical. [ruby-core:40727] [Bug #5568]
-
-Tue Mar 13 12:37:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * gc.c: add ObjectSpace::WeakMap. [ruby-dev:44565][Bug #5350]
-
- * lib/weakref.rb: use WeakMap instead of _id2ref.
-
-Tue Mar 13 10:59:48 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * tool/rbinstall.rb (prepare): skip if basedir is not defined.
- [ruby-core:39135][Bug #5238]
-
- * tool/rbinstall.rb (CONFIG.[]): check for mandatory
- configurations.
-
-Tue Mar 13 00:09:18 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * enumerator.c (enumerable_lazy): added documentation.
-
-Mon Mar 12 20:19:25 2012 Tanaka Akira <akr@fsij.org>
-
- * lib/tmpdir.rb (Dir::tmpdir): test the current directory suitable for
- temporary directory.
-
-Mon Mar 12 20:08:16 2012 Tanaka Akira <akr@fsij.org>
-
- * lib/fileutils.rb (fu_have_symlink?): specify TypeError for rescue
- clause.
-
-Mon Mar 12 19:23:13 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * encoding.c (rb_find_encoding): new function find encoding from
- arbitrary object as a pointer to rb_encoding, and return NULL if
- not found.
-
- * io.c (io_encoding_set): just warn unsupported encodings, but not
- exception. [ruby-core:40726] [Bug #5567]
-
-Mon Mar 12 19:03:32 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm_method.c (Init_eval_method): respond_to? and
- respond_to_missing? are public.
-
-Mon Mar 12 14:56:52 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * node.h (NEW_YIELD), parse.y (new_yield_gen): array-values flags
- has been already obsolete. patch by Thomas Enebo.
- [ruby-core:41929][Bug #5847]
-
-Mon Mar 12 12:44:33 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm_method.c (Init_eval_method): copy basic methods to Exception.
- [ruby-core:40287][Bug #5473]
-
-Mon Mar 12 10:13:36 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * eval_jump.c (rb_exec_end_proc): remember the latest exit status.
- [ruby-core:43173][Bug #5218]
-
-Mon Mar 12 07:33:12 2012 Tanaka Akira <akr@fsij.org>
-
- * lib/tmpdir.rb: update document for changing
- FileUtils.remove_entry_secure to FileUtils.remove_entry.
-
- * NEWS: add incompatibility note for lib/tmpdir.rb.
-
-Mon Mar 12 07:19:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/tmpdir.rb (Dir.tmpdir): should not use world-writable but
- non-sticky directory.
-
- * lib/tmpdir.rb (Dir.mktmpdir): check the parent directory.
-
-Mon Mar 12 07:04:11 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * random.c (Init_Random): removed rb_Random_DEFAULT and register as
- mark-object instead of global variable.
-
-Mon Mar 12 07:03:32 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * random.c (random_s_rand): ensure default PRNG is re-initialized
- after fork. patched by Eric Wong. [ruby-core:41209][Bug #5661]
-
-Sun Mar 11 23:57:29 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * pack.c (pack_unpack): when unpack('M') occurs an illegal byte
- sequence, output the "=" character and the following character in
- the decoded data without any transformation.
- [ruby-dev:44875] [Bug #5635]
-
-Sun Mar 11 22:32:43 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * ext/json: Merge 164a75c8bd2007d32c4d7665d53140d8fc126dcd.
- [ruby-core:41917] [Bug #5846]
-
-Sun Mar 11 17:10:04 2012 Shota Fukumori <sorah@tubusu.net>
-
- * lib/test/unit.rb: Put error message into STDERR if failed to launch
- worker (job) process. [ruby-dev:44802] [Bug #5577]
-
- * lib/test/unit/parallel.rb: If failed to increment_io, exit with code
- 2. [ruby-dev:44802] [Bug #5577]
-
-Sun Mar 11 15:46:45 2012 Shota Fukumori <sorah@tubusu.net>
-
- * io.c: fix rdoc of `IO.binwrite` to show same as `IO.write` except
- it opens file with mode "wb:ASCII-8BIT". [Bug #5782] [ruby-core:42592]
-
-Sat Mar 10 23:52:28 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * st.c: pack tables also generic keys. patched by Sokolov Yura at
- https://github.com/ruby/ruby/pull/84
-
- * st.c: add st_foreach_check for fixing iteration over packed table
- and st_delete_safe. patched by Sokolov Yura at
- https://github.com/ruby/ruby/pull/84
-
- * st.c: fix packed num_entries on delete_safe. patched by Sokolov
- Yura at https://github.com/ruby/ruby/pull/84
-
-Fri Mar 9 14:29:32 2012 Shugo Maeda <shugo@ruby-lang.org>
-
- * enumerator.c (lazy_flat_map): add Enumerable::Lazy#flat_map.
-
-Fri Mar 9 06:29:22 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych.rb (load, parse): stop parsing or loading after
- the first document has been parsed.
-
- * test/psych/test_stream.rb: pertinent tests.
-
-Fri Mar 9 06:17:05 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych.rb (parse_stream, load_stream): if a block is
- given, documents will be yielded to the block as they are parsed.
- [ruby-core:42404] [Bug #5978]
-
- * ext/psych/lib/psych/handlers/document_stream.rb: add a handler that
- yields documents as they are parsed
-
- * test/psych/test_stream.rb: corresponding tests.
-
-Fri Mar 9 00:35:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * enumerator.c (lazy_initialize, enumerable_lazy): no additional
- arguments.
-
-Fri Mar 9 00:30:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * enumerator.c: add Enumerable#lazy. based on the patch by
- Innokenty Mikhailov at <https://github.com/ruby/ruby/pull/101>
- [ruby-core:37164] [Feature #4890]
-
-Fri Mar 9 00:25:59 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * enumerator.c (enumerator_each, generator_each): pass arguments to
- the block with yielder.
-
-Fri Mar 9 00:25:02 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * array.c (rb_ary_cat): new function to concat objects into array.
-
-Thu Mar 8 16:44:02 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * .gdbinit (rb_numtable_entry): update for recent refactoring of
- st_table.
-
-Wed Mar 7 22:41:50 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * lib/xmlrpc/client.rb (module XMLRPC): fix typo.
-
- * test/xmlrpc/test_client.rb (test_async_call): add test for
- XMLRPC::Client#call_async to check above fix.
-
-Wed Mar 7 16:30:24 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * error.c (rb_load_fail): should honor encoding.
-
- * load.c (load_failed): ditto.
-
-Wed Mar 7 12:26:25 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * error.c (rb_load_fail): use path as a string, not char*.
-
- * internal.h: (rb_load_fail): moved from ruby/intern.h.
-
- * ruby.c (load_file_internal): fname cannot be NULL.
-
-Wed Mar 7 08:32:43 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * error.c (rb_loaderror_with_path): Adding the missing file as an
- instance variable to the LoadError exception.
- [ruby-core:39079]
-
- * load.c: call rb_loaderror_with_path so that the missing path is
- added to the exception.
-
- * ruby.c: call rb_loaderror rather than raising our own LoadError
- exception.
-
- * include/ruby/intern.h: add declaration for rb_loaderror_with_path.
-
- * test/ruby/test_require.rb: add supporting test for LoadError#path
- method.
-
-Wed Mar 7 08:28:00 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * lib/xmlrpc/parser.rb: support i8 types. Thanks Stas Kelvich!
- [ruby-core:29246] [Feature #3090]
-
- * test/xmlrpc/test_client.rb: supporting test
-
-Wed Mar 7 07:43:29 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * lib/xmlrpc/client.rb: assume servers that do not send a Content-Type
- header are sending 'text/xml'. Thanks Nathan Leavitt!
- [ruby-core:41204] [Bug #5660]
-
- * test/xmlrpc/test_client.rb: supporting test
-
-Wed Mar 7 07:39:28 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * test/xmlrpc/test_client.rb: adding a test for performing an XMLRPC
- call.
- * test/xmlrpc/data/blog.xml: supporting XML document for the response.
-
-Tue Mar 6 16:24:01 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (parser_tokadd_string): escape simple regexp meta
- character terminators.
-
-Tue Mar 6 10:11:43 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/io/console/console.c (set_rawmode): clear ECHOE and ECHOK
- bits too.
-
- * ext/io/console/console.c (echo_p): ignore ECHOE and ECHOK bits.
- [ruby-dev:45309] [Bug #6116]
-
- * ext/io/console/console.c (console_raw): fix rdoc.
-
- * ext/io/console/console.c (console_set_echo): mentioned about
- platform dependency.
-
-Tue Mar 6 07:18:10 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * lib/xmlrpc/client.rb: switch net/http post2 calls to modern
- `request_post` methods.
-
-Tue Mar 6 02:31:20 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/core_ext.rb: only extend Kernel if IRB is loaded
- in order to stop method pollution.
-
-Tue Mar 6 01:34:19 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (block_call): rules for block_call after block_call.
- based on a patch by pasberth https://github.com/ruby/ruby/pull/102
- [ruby-dev:45308][Bug #6115]
-
-Tue Mar 6 01:24:13 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (block_command, block_call): simplified rules.
-
-Mon Mar 5 18:28:35 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-
- * test/ruby/test_regexp.rb (TestRegexp#test_source): fix typo.
- * test/ruby/test_regexp.rb (TestRegexp#test_equal): ditto.
-
-Mon Mar 5 17:11:44 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/syck/lib/syck/rubytypes.rb (Exception.yaml_new): fix bug
- that causes YAML serialization problem for Exception.
- Exception#initialize doesn't use visible instance variable for
- the exception message, so call the method with the message.
- patched by Jingwen Owen Ou <jingweno AT gmail.com>.
- http://github.com/ruby/ruby/pull/41
-
-Mon Mar 5 16:50:22 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/ruby/test_sleep.rb (TestSleep#test_sleep_5sec): syntax error.
-
- * test/ruby/test_sleep.rb (TestSleep#test_sleep_5sec): call uname
- only on linux because it's a workaround for linux only.
-
-Mon Mar 5 12:44:12 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * st.c (unpack_entries): chain entries directly. based on a patch
- by Sokolov Yura <funny.falcon AT gmail.com>.
-
- * st.c (unpack_entries): use union instead of casted pointer.
- patched by Sokolov Yura <funny.falcon AT gmail.com>.
-
- * st.c: use PACKED_ENT and FIND_ENTRY. patched by Sokolov
- Yura <funny.falcon AT gmail.com>.
-
- * st.c (unpack_entries): reallocate bins if packed array size
- is not same as initial bins size. based on a patch by
- Sokolov Yura <funny.falcon AT gmail.com>.
-
-Mon Mar 5 11:51:48 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * ext/bigdecimal/lib/bigdecimal/math.rb: remove description about
- BigMath#log. patched by Sho Hashimoto [ruby-dev:45307] [Bug #6112]
-
- * string.c (str_byteslice): fix typo.
-
-Sun Mar 4 23:21:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (parser_tokadd_string): regexp engine doesn't need
- terminators to be escaped. [ruby-core:40364][Bug #5484]
-
-Sat Mar 3 22:51:46 2012 Tanaka Akira <akr@fsij.org>
-
- * process.c (rb_run_exec_options_err): chdir at last to interpret
- relative pathnames from the current directory of the parent process.
-
-Sat Mar 3 12:20:44 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * ext/date/date_strftime.c: reassigned some variables.
-
-Sat Mar 3 12:12:16 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * ext/date/date_{parse,strptime}.c: [ruby-dev:45303].
-
-Sat Mar 3 10:09:21 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * lib/xmlrpc/client.rb (initialize): net/http defaults to 1_2 in 1.8+,
- so we can safely remove the call to enable it.
-
-Sat Mar 3 08:42:25 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * lib/xmlrpc/client.rb (new2): use URI for uri parsing.
- * test/xmlrpc/test_client.rb: test that query params are passed to the
- client constructor.
-
-Sat Mar 3 08:20:10 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * lib/xmlrpc/client.rb (new2): raises an ArgumentError on bad
- arguments.
- * test/xmlrpc/test_client.rb: tests for bad uris
-
-Sat Mar 3 08:08:11 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * lib/xmlrpc/client.rb (new2): fix custom port specification when an
- SSL uri is used.
- * test/xmlrpc/test_client.rb: tests for XMLRPC::Client.new2
-
-Sat Mar 3 08:03:29 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/syck/rubyext.c (mktime_do): use ISDIGIT().
- [ruby-core:43060] [Bug #6108]
-
- * ext/syck/token.c (sycklex_yaml_utf8): cast as unsigned char.
- [ruby-core:43060] [Bug #6108]
-
-Sat Mar 3 06:57:14 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in (ruby_pc): make configurable. [Bug #6051]
-
-Fri Mar 2 17:49:03 2012 Hiroshi Nakamura <nahi@ruby-lang.org>
-
- * .travis.yml (branches): Enable TravisCI for ruby_1_9_3.
-
-Fri Mar 2 17:13:33 2012 Hiroshi Nakamura <nahi@ruby-lang.org>
-
- * test/ruby/test_array.rb (test_combination2): Make the test case for
- [ruby-core:29240] more descriptive.
- cf. http://bugs.jruby.org/6518
-
-Fri Mar 2 16:37:11 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * file.c (file_expand_path): use wcscasecmp().
-
-Fri Mar 2 16:36:31 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * thread_pthread.c (native_cond_timeout): cast explicitly to suppress
- a warning.
-
-Fri Mar 2 16:35:56 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * io.c (pipe_open): cmd is no longer used if fork is available.
-
-Thu Mar 1 16:13:18 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * internal.h (rb_file_const, rb_file_load_ok): moved functions for
- internal use only.
-
-Thu Mar 1 15:40:05 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * win32/makedirs.bat: new command to make intermediate
- directories, and not to report any errors if the directory
- already exists.
-
- * win32/Makefile.sub (MAKEDIRS): enable command extensions.
-
-Thu Mar 1 01:25:43 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * regparse.c (is_onechar_cclass): optimize character class
- Merge Onigmo 27278c12e6674043cc8affca6507e20e119a86ee.
-
- * regparse.c (is_onechar_cclass): [bug] unexpected match occurs when a
- char class contains no char
-
- * enc/unicode.c (init_case_fold_table): define the sizes of case
- folding tables in casefold.h
-
-Wed Feb 29 16:11:34 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/Makefile.sub (MAKEDIRS): use mkdir of cmd.exe instead of ruby.
- [Bug #6103] [ruby-core:43012]
-
- * win32/README.win32: added a notice about command extension of cmd.exe.
-
-Wed Feb 29 15:39:39 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/ruby/test_io.rb (TestIO#test_readpartial_locktmp): skip on
- windows because of the platform restriction.
-
-Wed Feb 29 15:38:50 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/ruby/memory_status.rb (Memory): syntax error.
-
-Wed Feb 29 13:06:42 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * test/ruby/memory_status.rb: use /proc/self/status if it is in
- the expected format.
-
-Wed Feb 29 06:14:51 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * ext/date/date_core.c: reverted r34825.
-
-Tue Feb 28 23:20:01 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * Makefile.in (PLATFORM_DIR): add a variable for `win32` directory.
- * Makefile.in (clean-platform): add new target.
- It cleans `win32` directory.
-
- * common.mk (clean): add a dependency for `win32` directory.
- * common.mk (distclean): ditto.
- * common.mk (distclean-platform): add new target.
- It cleans `win32` directory.
- * common.mk ($(PLATFORM_D)): add new target to make `win32` directory.
- * common.mk (win32/win32.$(OBJEXT)): move win32.o into `win32`
- directory.
- * common.mk (win32/file.$(OBJEXT)): add new target for win32/file.c.
-
- * configure.in: move win32.o into `win32` directory and add
- win32/file.o to MISSING.
-
- * file.c (file_load_ok, rb_file_load_ok): replace static
- file_load_ok() with public rb_file_load_ok().
- It's to link Windows implementation in win32/file.c.
- * file.c (rb_find_file_ext_safe): ditto.
- * file.c (rb_find_file_safe): ditto.
-
- * win32/file.c (rb_file_load_ok): new file. Add Windows specific
- optimized implementation of rb_file_load_ok(). We created a
- separated file to avoid too many #ifdef macro which is unreadable.
-
- * win32/Makefile.sub (PLATFORM_DIR): add a variable for `win32`
- directory.
- * win32/Makefile.sub (MISSING): move win32.obj into `win32`
- directory and add win32/file.obj to MISSING.
- * win32/Makefile.sub (MAKEDIRS): replace MINIRUBY with BASERUBY.
- It's because miniruby doesn't exist when making `win32` directory.
- * win32/Makefile.sub (clean-platform): add new target to clean `win32`
- directory.
- * win32/Makefile.sub ({$(srcdir)}.c{}.obj): make it not match
- win32/file.c to build properly.
- * win32/Makefile.sub (win32/win32.$(OBJEXT)): move win32.obj into
- `win32` directory.
-
- Patch created with Luis Lavena.
- [ruby-core:42480] [Feature #5999]
-
-Tue Feb 28 20:27:25 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * ext/date/date_core.c: [ruby-core:42998]
-
-Tue Feb 28 18:47:44 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * io.c (io_binwrite, rb_io_syswrite): use shared frozen source
- strings.
-
- * io.c (io_fread, io_getpartial, rb_io_sysread): set buffer size
- after check if readable, which can cause thread switch.
- [ruby-dev:45297][Bug #6099]
-
-Tue Feb 28 17:16:01 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/time.rb (Time#xmlschema): use strftime specifiers instead of
- fractional exponential calculation which yields undesirable
- result. [ruby-core:42997][Bug #6100]
-
-Tue Feb 28 14:15:29 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/net/protocol.rb: Add OpenTimeout subclass of Timeout::Error
- * lib/net/pop.rb: Modernize Timeout usage. Patch by Eric Wong.
- Use Net::OpenTimeout instead of Timeout::Error. [Bug #5765]
- * lib/net/http.rb: ditto
- * lib/net/smtp.rb: ditto
- * lib/net/telnet.rb: ditto
-
-Tue Feb 28 13:51:12 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/net/http.rb: Retry HTTP requests for additional network errors.
- Introduce OpenTimeout subclass of Timeout::Error. [Bug #6001]
- * test/net/http/test_http.rb: Reduce timeout to 0.01s for faster test
- * test/net/http/test_https.rb: ditto
-
-Tue Feb 28 11:44:49 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in (debugflags): check if -ggdb is accepted.
- [ruby-core:42875][Bug #6080]
-
-Tue Feb 28 10:28:51 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych.rb: default open YAML files with utf8 external
- encoding. [ruby-core:42967]
- * test/psych/test_tainted.rb: ditto
-
-Mon Feb 27 23:46:09 2012 Yukihiro Matsumoto <matz@ruby-lang.org>
-
- * parse.y (opt_bv_decl): allow newline at the end. [ruby-dev:45292]
-
-Mon Feb 27 20:43:05 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * io.c (rb_io_set_pos): add rdoc about textmode.
-
- * test/ruby/test_io.rb (TestIO#test_setpos): use binmode.
-
-Mon Feb 27 17:00:15 2012 Akinori MUSHA <knu@iDaemons.org>
-
- * string.c (rb_str_crypt): Update rdoc and state that this
- function is system dependent. Reviewed by nobu, thanks to
- @takai.
-
-Mon Feb 27 17:03:20 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/bigdecimal/bigdecimal.c (GetVpValueWithPrec): since methods
- can be overridden, so should not make an assumption on the type
- of results. [ruby-core:42969][Bug #6093]
-
-Mon Feb 27 10:54:20 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/mkmf.rb (try_cppflags, try_cflags, try_ldflags): replace the
- target flags if the given flag is accepted.
-
-Mon Feb 27 10:53:44 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * test/rubygems/test_gem_specification.rb (test_self_from_yaml_syck_default_key_bug):
- ignore the test for too old versions.
-
-Mon Feb 27 10:53:12 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/test/unit.rb (Test::Unit::Runner#puke): skips with no
- messages should be trivial.
-
-Mon Feb 27 10:50:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * io.c, process.c, time.c, ext: use rb_sys_fail_str instead of
- rb_sys_fail.
-
-Mon Feb 27 10:48:49 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/openssl/extconf.rb: suppress useless deprecation warnings
- from OpenSSL added by Apple.
-
-Sun Feb 26 23:29:49 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * regparse.c (add_code_range_to_buf0): wrong condition of duplicated
- warnings.
-
-Sun Feb 26 11:26:44 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * compile.c (iseq_compile_each): call on special object instead of
- self. since stabby lambda is a syntax, so it should not be
- affected by the context. [ruby-core:42349][Bug #5966]
-
- * insns.def (send): no special deal for FCALL. self should be put
- on TOS instead.
-
-Sun Feb 26 05:35:43 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * error.c (report_bug): use buf and snprintf to avoid consuming stack.
- [ruby-dev:45272] [Bug #6058]
-
-Sat Feb 25 17:41:19 2012 Tanaka Akira <akr@fsij.org>
-
- * ext/dbm/extconf.rb (headers): try ambiguous headers at last.
-
-Sat Feb 25 17:07:15 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/fileutils.rb: use chomp(?/) instead of sub to optimize and avoid
- to regexping invalid string.
-
-Sat Feb 25 16:18:24 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * complex.c (nucomp_marshal_load): raise error on invalid data.
- reported by John Firebaugh [ruby-core:42860] [Bug #6076]
-
-Sat Feb 25 14:46:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/dl/dl.c (Init_dl): support intrinsic types, size_t, ptrdiff_t
- and intptr_t. [ruby-core:42460][Feature #5992]
-
- * ext/fiddle/fiddle.c (Init_fiddle): ditto.
-
- * ext/dl/lib/dl/cparser.rb (DL::CParser#parse_ctype): ditto.
-
-Sat Feb 25 11:08:28 2012 Tanaka Akira <akr@fsij.org>
-
- * ext/curses/curses.c (Init_curses): use rb_define_const once for
- Curses::VERSION.
-
- * ext/dbm/dbm.c (Init_dbm): ditto for DBM::VERSION.
-
-Sat Feb 25 10:34:22 2012 Tanaka Akira <akr@fsij.org>
-
- * ext/curses/curses.c (Init_curses): make Curses::VERSION
- understandable without context.
-
- * ext/dbm/dbm.c (Init_dbm): ditto for DBM::VERSION.
-
-Sat Feb 25 07:53:58 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (parser_tokadd_string): insert a backslash only if
- quoted by single quotes. [ruby-dev:45281] [Bug #6069]
-
-Sat Feb 25 07:53:49 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * dir.c (dir_inspect), io.c (rb_io_inspect): keep encoding of path.
- [Bug #6072]
-
-Sat Feb 25 07:53:40 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * dir.c (dir_initialize): keep path in original encoding.
-
- * error.c (syserr_initialize): prefer the encoding of message over
- locale. [ruby-dev:45279][Bug #6071]
-
-Sat Feb 25 06:55:29 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * file.c (utime_internal): fix a variable missed to replace.
- [ruby-core:42864] [Bug #6077]
-
-Fri Feb 24 18:21:55 2012 Hiroshi Nakamura <nahi@ruby-lang.org>
-
- * test/zlib/test_zlib.rb (TestZlibGzipReader#test_encoding): Add
- encoding testcases for GzipReader#read. read() emits
- Encoding.default_external in contrast to read(size) emits BINARY.
- See also: http://bugs.jruby.org/6208
-
-Fri Feb 24 17:56:39 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
-
- * test/ruby/test_literal.rb (TestRubyLiteral#test_special_const):
- test for https://bugs.php.net/bug.php?id=61095
-
-Fri Feb 24 16:48:29 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * dir.c, file.c, io.c (rb_sys_fail_path): use rb_sys_fail_str.
-
- * error.c: new functions to deal exceptions with string instances.
-
- * dir.c, file.c, io.c: use rb_sys_fail_path.
-
-Fri Feb 24 15:49:07 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in (__builtin_unreachable): check for clang.
- [ruby-core:42849]
-
- * include/ruby/ruby.h (UNREACHABLE): fallback definition.
-
-Fri Feb 24 13:54:33 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/parser.c: prevent a memory leak by protecting calls to
- handler callbacks.
- * test/psych/test_parser.rb: test to demonstrate leak.
-
-Fri Feb 24 12:07:34 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * lib/net/http.rb: Fix documentation. Patched from Florian Mhun
- via http://github.com/ruby/ruby/pull/96
-
-Fri Feb 24 11:48:07 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * string.c (rb_str_prepend): Fix documentation for String#prepend.
- Patched from Franck Verrot via http://github.com/ruby/ruby/pull/98
- and Andrew Horsman via http://github.com/ruby/ruby/pull/55
-
-Fri Feb 24 10:08:33 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/net/http.rb (Net::HTTP#transport_request): Fix infinite loop
- upon EOFError or Errno::ECONNRESET where count is reset to 0.
- * test/net/http/test_http.rb (class TestNetHTTPKeepAlive): Test for
- above.
-
-Fri Feb 24 09:05:40 2012 Eric Hodel <drbrain@segment7.net>
-
- * complex.c (Init_Complex): Document Complex::I. Patch by Sylvain
- Daubert. [Feature #5623]
-
-Fri Feb 24 08:52:09 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (parser_tokadd_string, parser_yylex): insert a backslash
- if the next character is non-ascii. [ruby-dev:45278] [Bug #6069]
-
-Fri Feb 24 08:13:20 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/profiler.rb: Add Profiler documentation by Gonzalo Rodriguez.
- [Bug #5816]
-
-Fri Feb 24 08:08:38 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/parser.c: set parser encoding based on the YAML input
- rather than user configuration.
- * test/psych/test_encoding.rb: corresponding tests.
- * test/psych/test_parser.rb: ditto
- * test/psych/test_tainted.rb: ditto
-
-Fri Feb 24 08:02:52 2012 Eric Hodel <drbrain@segment7.net>
-
- * hash.c (Init_Hash): Add section on how objects are used as Hash keys
- and how to use custom classes as Hash keys.
-
-Fri Feb 24 07:36:11 2012 Eric Hodel <drbrain@segment7.net>
-
- * object.c (rb_obj_eql): Improve equality documentation by adding an
- example of equal? vs == and recommending eql? be aliased to == when
- overridden.
-
-Fri Feb 24 07:21:15 2012 Eric Hodel <drbrain@segment7.net>
-
- * object.c (rb_obj_hash): Added note that the hash value is not
- deterministic on Marc-Andre's suggestion. Expanded description of
- the purpose of the hash method. [Bug #6068]
-
-Thu Feb 23 23:01:21 2012 Tanaka Akira <akr@fsij.org>
-
- * ext/dbm/extconf.rb: unused macro removed.
-
-Thu Feb 23 22:26:53 2012 Tanaka Akira <akr@fsij.org>
-
- * test/test_curses.rb: new file.
-
-Thu Feb 23 19:57:56 2012 Tanaka Akira <akr@fsij.org>
-
- * ext/curses/rain.rb: trap SIGHUP, SIGINT, SIGQUIT and SIGTERM only.
-
-Thu Feb 23 19:56:48 2012 Tanaka Akira <akr@fsij.org>
-
- * signal.c (sig_trap): show signal name on error.
-
-Thu Feb 23 12:21:48 2012 Tanaka Akira <akr@fsij.org>
-
- * ext/dbm/extconf.rb: use DBM_SUFFIX only to detect header of
- Berkeley DB.
-
-Thu Feb 23 10:00:18 2012 Eric Hodel <drbrain@segment7.net>
-
- * io.c (rb_io_f_sync): Fix double-negative typo. [ruby-trunk - #5837]
-
-Thu Feb 23 09:57:21 2012 Eric Hodel <drbrain@segment7.net>
-
- * load.c (rb_f_require): Add note to require for scope of items in the
- loaded file. [ruby-trunk - #5910]
-
-Thu Feb 23 03:58:08 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * lib/ostruct.rb (delete_field): Bug fix so previous value is
- returned. Patch by Nick Recobra [Bug #6063]
-
-Thu Feb 23 02:33:00 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * io.c (rb_io_extract_modeenc): fail only if conflicting
- text/binary modes given explicitly. [ruby-dev:45268][Bug #6055]
-
-Wed Feb 22 23:27:08 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * test/iconv/test_option.rb: enabled. [ruby-core:42802][Bug #6061]
-
-Wed Feb 22 21:45:56 2012 Tanaka Akira <akr@fsij.org>
-
- * ext/curses/curses.c: use defined() to suppress a warning.
-
-Wed Feb 22 21:44:29 2012 Tanaka Akira <akr@fsij.org>
-
- * ext/curses/extconf.rb: refactored.
-
-Wed Feb 22 20:42:28 2012 Tanaka Akira <akr@fsij.org>
-
- * ext/curses/extconf.rb: try to distinguish curses_version is a
- function or variable.
-
- * ext/curses/curses.c (Init_curses): refine Curses::VERSION.
-
-Wed Feb 22 19:47:03 2012 Tanaka Akira <akr@fsij.org>
-
- * ext/curses/extconf.rb: show the chosen header and library.
-
-Wed Feb 22 19:22:31 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * reverted 34739 for test/date.
-
-Wed Feb 22 19:08:55 2012 Tanaka Akira <akr@fsij.org>
-
- * ext/curses/extconf.rb: refactored.
-
-Wed Feb 22 18:44:41 2012 Shota Fukumori <sorah@tubusu.net>
-
- * lib/test/unit.rb (setup_options): add option "--retry" as opposite
- for "--no-retry"
-
-Wed Feb 22 18:34:02 2012 Shota Fukumori <sorah@tubusu.net>
-
- * lib/test/unit.rb (setup_options): add option "--show-skip" to
- cancel "--hide-skip" (-q)
-
-Wed Feb 22 17:36:22 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * io.c (rb_io_s_foreach): argument check before making Enumerator.
- [ruby-dev:31525]
-
-Wed Feb 22 17:07:35 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * io.c (rb_io_s_foreach): return enumerator including keyword
- arguments. [ruby-dev:45267][Bug #6054]
-
-Wed Feb 22 12:15:16 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * configure.in: allow llvm-gcc because it work fine with r34278.
-
-Wed Feb 22 10:57:08 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * regparse.c (fetch_token): don't use // comment.
-
-Wed Feb 22 10:32:11 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * test/mkmf/test_framework.rb: try CoreFoundation framework, than
- Cocoa which is dependent on QuickTime SDK which has separated
- since Xcode 4.3.
-
-Wed Feb 22 10:18:05 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * common.mk (test-all, test-ruby): more dependencies.
-
-Wed Feb 22 06:48:55 2012 Eric Hodel <drbrain@segment7.net>
-
- * file.c (rb_f_test): Fix formatting of Kernel#test rdoc.
-
-Wed Feb 22 06:12:15 2012 Tanaka Akira <akr@fsij.org>
-
- * ext/dbm/extconf.rb: check DBM_SUFFIX for Mac OS X.
- Its ndbm.h doesn't include db.h.
-
-Wed Feb 22 06:02:42 2012 Tanaka Akira <akr@fsij.org>
-
- * ext/dbm/dbm.c (fdbm_initialize): disable Berkeley DB error messages.
-
- * ext/dbm/extconf.rb: check DBC type for above.
-
- [ruby-dev:45269]
-
-Tue Feb 21 20:23:47 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * hash.c (rb_any_hash): treat Qundef like as other special constants.
-
- * hash.c (hash_foreach_iter): fix signature.
-
-Tue Feb 21 19:39:34 2012 Tanaka Akira <akr@fsij.org>
-
- * ext/curses/curses.c (Init_curses): use curses_version() for
- Curses::VERSION.
-
-Tue Feb 21 18:21:25 2012 Narihiro Nakamura <authornari@gmail.com>
-
- * gc.c : remove gc_clear_mark_on_sweep_slots() and use
- rest_sweep() instead of it, because some dead objects might be
- marked in next the mark phase by false pointers.
- [ruby-core:42672]
-
-Tue Feb 21 16:08:17 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * proc.c (rb_hash_proc): get wrapped pointer properly. [Bug #6048]
-
-Tue Feb 21 14:41:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * template/ruby.pc.in: added rubylibprefix, {rubylib,vendor,site}dir
- and {ruby,vendor,site}archdir. [ruby-core:42766][Feature #6052]
-
-Tue Feb 21 09:13:25 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * proc.c (method_hash, proc_hash): Fix {Unbound}Method#hash
- [Bug #6048]. Isolate hash computation for proc
-
- * internal.h: Declaration for above
-
- * vm_method.c (rb_method_definition_hash): Computation for
- hash part of a method definition
-
- * method.h: Declaration for above
-
- * test/ruby/test_method.rb: Test for above
-
-Tue Feb 21 02:56:15 2012 Yukihiro Matsumoto <matz@ruby-lang.org>
-
- * enumerator.c (enumerator_rewind): update the documentation.
- fixed: #6053
-
-Mon Feb 20 23:38:35 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * enc/depend: ignore mktable.c because it's not encoding library.
- [ruby-core:42760] [Bug #6049]
-
-Mon Feb 20 21:40:53 2012 Tanaka Akira <akr@fsij.org>
-
- * ext/curses/extconf.rb: fold too long lines.
-
-Mon Feb 20 21:16:48 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * lib/fileutils.rb: revert a line modified accidentally at r34669.
- This fixes mingw test errors in TestDir_M17N.
- [ruby-core:42728] [Feature #4970]
-
-Mon Feb 20 21:09:27 2012 Tanaka Akira <akr@fsij.org>
-
- * ext/curses/curses.c (Init_curses): define Curses::VERSION.
-
-Mon Feb 20 21:08:00 2012 Tanaka Akira <akr@fsij.org>
-
- * ext/curses/extconf.rb: restore $libs and $defs for each
- header/library choice.
-
-Mon Feb 20 19:57:26 2012 Tanaka Akira <akr@fsij.org>
-
- * ext/dbm/extconf.rb: weaken header/library consistency check if db is
- "ndbm". It seems several (possibly historical) distributions
- provide libndbm. However the content of libndbm vary: Berkeley DB,
- GDBM or even 4.3BSD NDBM. (Mandriva, Tru64 UNIX, OpenSuSE,
- SCO OpenServer, ...)
- "ndbm" is not searched automatically now (dblib doesn't contain it)
- but configure --with-dbm-type=ndbm choose libndbm and ndbm.h.
-
-Mon Feb 20 19:15:57 2012 Tanaka Akira <akr@fsij.org>
-
- * ext/dbm/extconf.rb: refine variable names.
-
-Mon Feb 20 15:50:33 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in: check if -fstack-protector is really available.
-
-Sun Feb 19 23:43:38 2012 Tanaka Akira <akr@fsij.org>
-
- * ext/dbm/extconf.rb: show header and library found.
-
-Sun Feb 19 23:01:01 2012 Tanaka Akira <akr@fsij.org>
-
- * ext/dbm/dbm.c (Init_dbm): refine DBM::VERSION definition.
-
- * ext/dbm/extconf.rb: provide RUBYDBM_GDBM_HEADER macro.
-
-Sun Feb 19 17:07:27 2012 Tanaka Akira <akr@fsij.org>
-
- * test/dbm/test_dbm.rb (test_dbmfile_suffix): check pag and dir is
- empty for 4.3BSD ndbm.
-
-Sun Feb 19 03:00:30 2012 Tanaka Akira <akr@fsij.org>
-
- * test/dbm/test_dbm.rb (test_dbmfile_suffix): check magic numbers.
-
-Sun Feb 19 01:05:41 2012 Tanaka Akira <akr@fsij.org>
-
- * ext/dbm/extconf.rb: detect GDBM's ndbm.h by testing dbm_clearerr is
- an empty macro.
-
-Sun Feb 19 00:25:55 2012 Tanaka Akira <akr@fsij.org>
-
- * ext/dbm/extconf.rb: don't choose 'dbm' if _GDB_H_ is defined which
- is available since GDBM 1.9 because 'gdbm_compat' is appropriate
- choice since GDBM 1.8.1.
-
-Sat Feb 18 23:27:00 2012 Kenta Murata <mrkn@mrkn.jp>
-
- * random.c: remove a duplicated comment.
-
-Sat Feb 18 18:43:13 2012 Tanaka Akira <akr@fsij.org>
-
- * ext/dbm/extconf.rb (dblib): prefer recent GDBM over older GDBM.
- (have_declared_libvar): new function to check a declared variable
- exists in a library.
- (have_undeclared_libvar): renamed from renamed from have_libvar.
- (headers.db_check2): check that GDBM version variable if GDBM header
- is chosen.
-
- * ext/dbm/dbm.c (Init_dbm): use HAVE_DECLARED_LIBVAR_GDBM_VERSION and
- HAVE_UNDECLARED_LIBVAR_GDBM_VERSION macro.
-
-Sat Feb 18 13:53:01 2012 Tanaka Akira <akr@fsij.org>
-
- * test/dbm/test_dbm.rb (test_dbmfile_suffix): DBM::VERSION should
- be Berkeley DB if foo.db is created by DBM.open.
-
-Sat Feb 18 13:40:37 2012 Tanaka Akira <akr@fsij.org>
-
- * test/dbm/test_dbm.rb (test_dbmfile_suffix): test dbm file suffix.
-
-Sat Feb 18 12:50:59 2012 Tanaka Akira <akr@fsij.org>
-
- * ext/dbm/dbm.c (DBM::VERSION): define it by detecting _GDBM_H_ or
- _DBM_IOERR.
-
-Sat Feb 18 07:52:45 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * tool/enc-unicode.rb: don't use 1.9 feature on tools.
-
-Sat Feb 18 02:48:39 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * lib/fileutils.rb: refactored FileUtil methods to use the
- `define_command` API. Patch from 7rans <transfire@gmail.com>
- * test/fileutils/test_dryrun.rb: corresponding test refactoring
- * test/fileutils/test_nowrite.rb: ditto
- * test/fileutils/test_verbose.rb: ditto
-
-Fri Feb 17 21:39:36 2012 Tanaka Akira <akr@fsij.org>
-
- * ext/dbm/extconf.rb: remove dbm.
-
-Fri Feb 17 21:18:39 2012 Tanaka Akira <akr@fsij.org>
-
- * ext/dbm/extconf.rb: refine header/library mismatch detection.
- check only for ndbm.h except libc. check _GDBM_H_ for gdbm.
- check _DBM_IOERR for the original ndbm.
-
-Fri Feb 17 20:30:44 2012 Tanaka Akira <akr@fsij.org>
-
- * ext/dbm/extconf.rb: don't check libdbm. It is not a ndbm
- implementation. (libdbm in Version 7 Unix is database library
- for single database per process.)
-
-Fri Feb 17 15:38:53 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * Merge Onigmo-5.13.1. [ruby-dev:45057] [Feature #5820]
- https://github.com/k-takata/Onigmo
- cp reg{comp,enc,error,exec,parse,syntax}.c reg{enc,int,parse}.h
- cp oniguruma.h
- cp tool/enc-unicode.rb
- cp -r enc/
-
-Fri Feb 17 15:20:30 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * enum.c (enum_each_slice): arrays to be yielded can be newly
- created in the block.
-
- * enum.c: move work variables to objects not to let called blocks
- access stack area out of scope. [Bug #5801]
-
-Fri Feb 17 12:35:55 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * tool/merger.rb: remove borders from the commit message which is used
- when the commit doesn't change ChangeLog.
-
-Fri Feb 17 11:50:11 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * common.mk (btest, btest-ruby, test-sample test-knownbugs)
- (test-all, test-ruby): depend on prog.
-
-Fri Feb 17 09:56:22 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/mkmf.rb (create_header): log the content of header.
-
-Fri Feb 17 09:44:55 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * tool/transcode-tblgen.rb (import_ucm): don't use \h because the
- script should work with ruby 1.8.
-
- * tool/enc-unicode.rb: ditto.
-
-Fri Feb 17 07:33:29 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * enum.c (id_lshift): use constant ID.
-
-Fri Feb 17 07:30:53 2012 Tanaka Akira <akr@fsij.org>
-
- * ext/dbm/extconf.rb: refactored to split too long conditions.
-
-Fri Feb 17 00:23:25 2012 Tanaka Akira <akr@fsij.org>
-
- * test/dbm/test_dbm.rb: fix skip condition for libgdbm 1.8.0 or prior.
- reported by Bohuslav Kabrda.
- [ruby-core:42685] [ruby-trunk - Bug #6036]
-
-Fri Feb 17 00:04:21 2012 Tanaka Akira <akr@fsij.org>
-
- * ext/dbm/extconf.rb: check _DB_H_ macro unavailable except
- Berkeley DB library.
-
-Thu Feb 16 05:41:35 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * insns.def (splatarray): make new array if flag is set.
-
- * compile.c (iseq_compile_each): make new array with
- splat. [ruby-core:21901][Feature #1125]
-
-Thu Feb 16 00:14:04 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-
- * lib/abbrev.rb (Array#abbrev): add missing '"' in documentation.
-
-Wed Feb 15 22:20:19 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * cont.c (rb_fiber_reset_root_local_storage): add a new function to
- restore rb_thread_t::local_storage.
-
- * cont.c (rb_obj_is_fiber): add a new function to tell finalizer to
- prevent fibers from destroy.
-
- * gc.c (rb_objspace_call_finalizer): don't sweep fibers at finalizing
- objspace.
-
- * internal.h (rb_fiber_reset_root_local_storage, rb_obj_is_fiber):
- add prototypes.
-
- * vm.c (ruby_vm_destruct): reset main thread's local_storage before
- free main thread. rb_thread_t::local_storage is replaced by fiber's
- local storage when forked from fiber, and it should be already freed
- when the fiber was destroyed. [ruby-core:41456] [Bug #5700]
-
- * test/ruby/test_fiber.rb (test_fork_from_fiber): add test for fork
- from fiber.
-
-Wed Feb 15 19:57:02 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/fiddle/closure.c (callback): deal with unsigned integers.
- [ruby-core:42458][Bug #5991][Bug #6022]
-
- * ext/fiddle/conversions.c (value_to_generic, generic_to_value):
- ditto.
-
- * ext/fiddle/closure.c (callback): same as r34506.
-
-Wed Feb 15 17:41:31 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * io.c (io_strsetbuf): call rb_str_modify to make str independent
- before calling rb_str_set_len for r34580.
-
-Wed Feb 15 12:30:10 2012 Eric Hodel <drbrain@segment7.net>
-
- * ext/zlib/zlib.c (Init_zlib): Added Zlib::TEXT and note that
- Zlib::ASCII is deprecated in zlib 1.2.3 and newer.
-
-Wed Feb 15 12:24:40 2012 Eric Hodel <drbrain@segment7.net>
-
- * ext/zlib/zlib.c: Move constant descriptions to constants. Remove
- extra comment block at the top of Init_zlib().
-
-Wed Feb 15 12:30:46 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * lib/ostruct.rb: Create getters and setters after dup.
- [Bug #6028] [rubyspecs:0380bcc]
-
-Wed Feb 15 10:59:52 2012 Narihiro Nakamura <authornari@gmail.com>
-
- * gc.c (HEAP_BITMAP_LIMIT): HEAP_BITMAP_LIMIT is computed on the
- basis of HEAP_SIZE because it must covers a whole heap block.
- [ruby-trunk - Bug #6006]
-
-Wed Feb 15 09:27:45 2012 Eric Hodel <drbrain@segment7.net>
-
- * ext/zlib/zlib.c (Init_zlib): Added Zlib::FIXED and Zlib::RLE
- strategies.
- * NEWS: Add note about the new Zlib constants.
-
-Wed Feb 15 09:11:36 2012 Eric Hodel <drbrain@segment7.net>
-
- * ext/zlib/zlib.c: Improve documentation. [ruby-trunk - Bug #5948]
-
-Wed Feb 15 07:28:54 2012 Eric Hodel <drbrain@segment7.net>
-
- * encoding.c (Init_Encoding): Add IO example of internal and external
- encoding. Fixed a typo in the force_encoding example. [#5949]
-
-Wed Feb 15 06:58:21 2012 Eric Hodel <drbrain@segment7.net>
-
- * encoding.c (Init_Encoding): Add Encoding documentation.
- [ruby-trunk - Bug #5949]
- * encoding.c (rb_set_default_external): Fix typo in documentation.
-
-Tue Feb 14 20:22:11 2012 Narihiro Nakamura <authornari@gmail.com>
-
- * gc.c (CEILDIV): rename to a appropriate name.
-
-Tue Feb 14 18:07:20 2012 Narihiro Nakamura <authornari@gmail.com>
-
- * gc.c (assign_heap_slot): SEGV happens cause on 64-bit platform
- sometime there should be `objs-=2` instead of `objs--`.
- [Bug #6006]
- patched by Sokolov Yura. https://github.com/ruby/ruby/pull/92
-
-Tue Feb 14 16:00:30 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * io.c (io_setstrbuf): cut down the buffer if longer.
-
-Tue Feb 14 15:06:37 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/test/unit/assertions.rb (build_message): skip escaped
- question marks.
-
-Tue Feb 14 12:10:04 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * variable.c (autoload_const_set, autoload_require): fix
- signatures.
-
-Tue Feb 14 05:23:40 2012 Eric Hodel <drbrain@segment7.net>
-
- * process.c (proc_wait): Change typo "SystemError" to
- "SystemCallError". [ruby-trunk - Bug #5962]
- * process.c (proc_wait2): ditto
-
-Tue Feb 14 05:18:24 2012 Eric Hodel <drbrain@segment7.net>
-
- * enumerator.c: Document use of Enumerator.new for creating a lazy
- enumeration for filtering/chaining. [ruby-trunk - Feature #707]
-
-Mon Feb 13 23:01:50 2012 Akinori MUSHA <knu@iDaemons.org>
-
- * vm_method.c (rb_method_boundp):
- obj.respond_to?(:a_protected_method) should return false because
- calling a protected method may cause NoMethodError if called
- from outside the class inheritance tree. Kernel#respond_to? is
- mostly used to test if it is safe to call a method, so the false
- positive should be avoided. [ruby-dev:40461] [ruby-dev:41739]
- [ruby-dev:41837]
-
-Mon Feb 13 21:52:06 2012 Narihiro Nakamura <authornari@gmail.com>
-
- * gc.c (HEAP_OBJ_LIMIT, HEAP_BITMAP_LIMIT): HEAP_OBJ_LIMIT used
- `sizeof(struct heaps_slot)` while heap is currently allocated
- with `struct heaps_header`.
- HEAP_BITMAP_LIMIT were calculated from
- `HEAP_OBJ_LIMIT/sizeof(uintptr_t)` - one Byte for each object,
- not one Bit. [Bug #6006]
- patched by Sokolov Yura. https://github.com/ruby/ruby/pull/92
-
-Mon Feb 13 18:30:32 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * io.c (io_setstrbuf): defer resizing buffer string until data is
- read actually.
-
-Mon Feb 13 10:24:39 2012 Loren Segal <lsegal@soen.ca>
-
- * io.c (Init_IO): use directive hack to make ARGF documentable
- in other tools. [ruby-core:42515][Bug #6007]
-
-Sun Feb 12 20:43:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * include/ruby/ruby.h (rb_event_hook_func_t): add argument names.
-
-Sun Feb 12 16:30:23 2012 Akinori MUSHA <knu@iDaemons.org>
-
- * tool/merger.rb (#default_merge_branch): Add support for
- Subversion 1.7 which adopted a whole new working directory
- structure.
-
-Sun Feb 12 15:14:41 2012 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * benchmark/driver.rb: suppress unused/shadowing variable warnings.
-
-Sun Feb 12 03:14:40 2012 Eric Hodel <drbrain@segment7.net>
-
- * vm_eval.c (check_funcall): Call respond_to? with matching arity for
- legacy single-argument implementations. [ruby-trunk - Bug #6000]
-
-Sat Feb 11 12:04:05 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * compile.c (defined_expr): guard the whole expression.
- [ruby-dev:45021][Bug#5786]
-
-Sat Feb 11 08:34:42 2012 Eric Hodel <drbrain@segment7.net>
-
- * ext/zlib/zlib.c (rb_inflate_add_dictionary): Added
- Zlib::Inflate#add_dictionary to allow users to pre-specify
- for using during #inflate. [ruby-trunk - Feature #5937]
-
-Sat Feb 11 08:23:02 2012 Eric Hodel <drbrain@segment7.net>
-
- * ext/zlib/zlib.c (do_inflate): Inflate more data if buffered data
- exists. Allows Zlib::Inflate#set_dictionary to work.
- [ruby-trunk - Bug #5929]
-
-Sat Feb 11 06:00:48 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * dir.c (fnmatch): The * needs to be escaped to avoid formatting in
- fnmatch comment.
- patched by @dalton. https://github.com/ruby/ruby/pull/91
-
-Fri Feb 10 03:41:31 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/parser.c: removed external encoding setter, allow parser
- to be reused.
- * ext/psych/lib/psych/parser.rb: added external encoding setter.
- * test/psych/test_parser.rb: test parser reuse
-
-Fri Feb 10 01:30:41 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/dl/dl.h (ALIGN_OF): use offsetof().
-
- * ext/dl/dl.h (DLALIGN): round up at once and get rid of overflow.
-
-Fri Feb 10 00:47:07 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * test/ruby/envutil.rb (assert_no_memory_leak): new assertion to
- check memory leak by invoking child ruby process and watch its
- memory size.
-
-Thu Feb 9 23:41:44 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * test/pathname/test_pathname.rb (test_binread): add assertion to
- check encoding.
-
-Thu Feb 9 16:48:19 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/dl/dl.c (Init_dl): fix mangled document.
-
-Thu Feb 9 16:10:34 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/ruby/memory_status.rb (Memory::Win32): 64bit support.
-
-Thu Feb 9 16:08:55 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * ext/dl/lib/value.rb (DL::ValueUtil.{unsigned_value,signed_value}):
- currently pack/unpack does not accept "q!" and "Q!".
-
-Thu Feb 9 16:01:29 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * ext/fiddle/conversions.c (value_to_generic): src is not guaranteed as
- a Bignum if the type is LONG_LONG. it may be a Fixnum if the value
- is small.
-
-Thu Feb 9 11:32:36 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * ext/dl/lib/types.rb: Win64 support.
-
-Thu Feb 9 04:12:29 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * test/pathname/test_pathname.rb: not read but binread.
- patched by Benoit Daloze, [ruby-core:42440] [Bug #5984]
-
-Wed Feb 8 22:29:59 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * string.c (rb_str_modify_expand): fix memory leak.
-
-Wed Feb 8 14:06:59 2012 Hiroshi Nakamura <nahi@ruby-lang.org>
-
- * ext/openssl/ossl_ssl.c: Add SSL constants and allow to unset SSL
- option to prevent BEAST attack. See [Bug #5353].
-
- In OpenSSL, OP_DONT_INSERT_EMPTY_FRAGMENTS is used to prevent
- TLS-CBC-IV vulnerability described at
- http://www.openssl.org/~bodo/tls-cbc.txt
- It's known issue of TLSv1/SSLv3 but it attracts lots of attention
- these days as BEAST attack. (CVE-2011-3389)
-
- Until now ossl sets OP_ALL at SSLContext allocation and call
- SSL_CTX_set_options at connection. SSL_CTX_set_options updates the
- value by using |= so bits set by OP_ALL cannot be unset afterwards.
-
- This commit changes to call SSL_CTX_set_options only 1 time for each
- SSLContext. It sets the specified value if SSLContext#options= are
- called and sets OP_ALL if not.
-
- To help users to unset bits in OP_ALL, this commit also adds several
- constant to SSL such as
- OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS. These constants were
- not exposed in Ruby because there's no way to unset bits in OP_ALL
- before.
-
- Following is an example to enable 0/n split for BEAST prevention.
-
- ctx.options = OP_ALL & ~OP_DONT_INSERT_EMPTY_FRAGMENTS
-
- * test/openssl/test_ssl.rb: Test above option exists.
-
-Wed Feb 8 13:12:02 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * ext/openssl/ossl_x509name.c: Use the numerical representation of
- unrecognized OIDs instead of the sn "UNDEF".
-
- * test/openssl/test_x509name.rb: Add tests for the fixed behavior.
-
- Patch provided by Paul Kehrer, thank you!
- [ruby-core:41769] [Feature #5787]
-
-Wed Feb 8 09:49:58 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * tool/merger.rb: don't abort, update first.
-
-Wed Feb 8 09:47:33 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * ext/openssl/ossl_asn1.c: Call INT2NUM only once for GeneralString.
- Thanks to Mantas Mikulenas for noticing and providing a patch!
- [ruby-core:42358] [Bug #5972]
-
-Wed Feb 8 09:19:00 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * ext/openssl/ossl_cipher.c: Add warning about key as IV.
-
-Tue Feb 7 20:08:12 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * error.c (exc_inspect): Fix typo. patch from Trent Ogren
- via https://github.com/ruby/ruby/pull/90
-
-Tue Feb 7 19:37:35 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * st.c: refactor packed entries using structs.
-
-Tue Feb 7 14:52:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * st.c (st_update): table can be unpacked in the callback.
-
- * st.c (st_foreach): should not yield same pair when checking
- after unpacking.
-
-Mon Feb 6 21:55:13 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * tool/merger.rb: abort if the working directory is dirty.
-
- * tool/merger.rb: update the working directory after commit.
-
-Mon Feb 6 00:16:27 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * encoding.c (rb_enc_compatible): return ASCII-8BIT even if 2nd string
- is ascii only string. [ruby-core:42354] [Bug #5968]
-
-Fri Feb 3 07:16:47 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/webrick.rb: Moved proxy rewriting to WEBrick::HTTPProxy.
- * lib/webrick/httpproxy.rb: Add examples of creating a proxy server
- and response rewriting using HTTPProxy.
-
-Fri Feb 3 06:53:22 2012 Eric Hodel <drbrain@segment7.net>
-
- * ext/openssl/ossl_x509store.c: Add class documentation for
- OpenSSL::X509::Store
-
-Thu Feb 2 22:28:13 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-
- * test/net/http/test_https_proxy.rb
- (HTTPSProxyTest#test_https_proxy_authentication):
- add workaround to avoid to hang up without openssl.
- see [ruby-dev:45021][Bug #5786]
-
- * test/resolv/test_dns.rb (TestResolvDNS#test_query_ipv4_address):
- ditto.
-
-Thu Feb 2 21:48:18 2012 Kouhei Sutou <kou@cozmixng.org>
-
- * lib/rexml/parsers/baseparser.rb: use meaningful names.
-
-Thu Feb 2 21:38:52 2012 Kouhei Sutou <kou@cozmixng.org>
-
- * lib/rexml/parsers/baseparser.rb, test/rexml/test_namespace.rb:
- fix the default xml namespace URI validation.
- [ruby-dev:45169] [Bug #5956]
- Reported by Miho Hiramatsu. Thanks!!!
-
-Thu Feb 2 17:51:02 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * io.c (argf_next_argv): reset ARGF.next_p on ARGV.replace.
- r34409 breaks replacing ARGV.
- [ruby-dev:45160] [Bug #5952]
-
-Thu Feb 2 16:21:01 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/net/http/test_http.rb (TestNetHTTPKeepAlive#*): remove debug
- output.
-
-Thu Feb 2 01:24:34 2012 Yusuke Endoh <mame@tsg.ne.jp>
-
- * parse.y (debug_lines, coverage): set file path encoding for coverage
- result. [ruby-dev:44950]
-
-Wed Feb 1 14:38:31 2012 Akinori MUSHA <knu@iDaemons.org>
-
- * lib/tempfile.rb (Tempfile#unlink, Tempfile::Remover#call): Just
- call File.unlink and ignore ENOENT because existence check
- before unlinking does not help in terms of race condition.
-
- * lib/tempfile.rb (Tempfile#unlink, Tempfile::Remover#call): My
- comment about thread safeness is obsolete.
-
-Wed Feb 1 09:50:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * doc/re.rdoc (Repetition): fix typo. reported by Ori Avtalion
- and patched by Zachary Scott. [Bug #5947]
-
-Wed Feb 1 06:38:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * io.c (argf_close): skip stdin, which should be readable again.
- [ruby-dev:45160] [Bug #5952]
-
- * io.c (argf_readlines): reinitialize after all read to be
- readable again.
-
-Tue Jan 31 21:27:43 2012 Narihiro Nakamura <authornari@gmail.com>
-
- * configure.in (HEAP_ALIGN_LOG): HEAP_ALIGN_LOG should be page
- size in OpenBSD. [ruby-core:42158][Bug #5901]
-
- * gc.c : avoid to redefine.
-
-Tue Jan 31 14:27:22 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * test/ruby/envutil.rb (EnvUtil.invoke_ruby): yield also child pid
- in block form.
-
-Mon Jan 30 19:08:19 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm_eval.c (vm_call0): should pass block to enumerators. patched
- by Kazuki Tsujimoto. [ruby-dev:44961][Bug #5731]
-
- * vm_eval.c (method_missing), vm_insnhelper.c (vm_call_method):
- ditto. patched by satoshi shiba.
-
-Mon Jan 30 12:31:05 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * file.c (append_fspath): need to set the encoding to result always.
-
-Mon Jan 30 10:38:37 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/irb/test_completion.rb: skip if cannot load irb/completion
- (maybe readline does not exist).
-
-Sun Jan 29 22:47:19 2012 Yutaka Kanemoto <kanemoto@ruby-lang.org>
-
- * tool/config.{guess,sub}: updated to automake-1.11.2.
-
-Sun Jan 29 12:17:56 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/readline/readline.c (readline_attempted_completion_function):
- respect encodings. [Bug #5941]
-
-Sat Jan 28 09:33:33 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * win32/win32.c (rb_w32_read): fix an issue that $stdin.read doesn't
- terminate by CTRL-C on Windows.
- [ruby-dev:45149] [Bug #5812]
-
-Sat Jan 28 08:18:11 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * test/ruby/test_thread.rb
- (TestThreadGroup#test_thread_timer_and_interrupt): skip exit status
- assertion because we cannot get signal status on Windows.
-
- * win32/win32.c (CreateChild): create process group to receive the
- signal by GenerateConsoleCtrlEvent().
-
- * win32/win32.c (kill): use CTRL_BREAK_EVENT instead of CTRL_C_EVENT
- if a process group is specified. CTRL_C_EVENT signal cannot be
- generated for process groups for the specification.
- [ruby-dev:45149] [Bug #5812]
-
-Sat Jan 28 07:46:03 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * thread_win32.c (rb_w32_wait_events_blocking): use
- ruby_thread_from_native() instead of GET_THREAD() because
- GET_THREAD() doesn't always return the current thread and
- WaitForMultipleObjects() at rb_w32_read() doesn't return by
- Thread#kill. This fixes TestQueue#test_thr_kill failure on
- Windows.
-
- * thread_win32.c (rb_w32_wait_events): use ruby_thread_from_native()
- instead of GET_THREAD() for consistency with the above change.
-
- * thread_win32.c (rb_w32_sleep): ditto.
-
- * thread_win32.c (rb_w32_Sleep): ditto.
- [ruby-dev:45149] [Bug #5812]
-
-Sat Jan 28 07:28:48 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * test/zlib/test_zlib.rb (TestZlibGzipReader#test_reader_wrap): set
- binmode explicitly for fixing test error on Windows. This is consistent
- with r34243.
- [ruby-dev:45149] [Bug #5812]
-
-Sat Jan 28 05:53:34 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/irb/completion.rb (IRB::InputCompletor::CompletionProc):
- ignore non-string name modules. [ruby-core:42244][Bug #5938]
-
-Fri Jan 27 16:31:45 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * gc.c (HEAP_ALIGN, HEAP_ALIGN_MASK): DRY, let compiler calculate
- from HEAP_ALIGN_LOG.
-
-Thu Jan 26 11:03:37 2012 Eric Hodel <drbrain@segment7.net>
-
- * lib/matrix.rb: Clean up extra whitespace in output documentation.
-
-Thu Jan 26 03:24:02 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/io/console/console.c (io_getch): default delegating method
- for StringIO. https://github.com/nobu/io-console/issues/4
-
- * ext/stringio/stringio.c: moved some methods to hidden modules.
-
-Wed Jan 25 13:27:42 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * file.c (rb_file_s_basename): ignore non-ascii extension in
- different encoding, which cannot match.
-
- * file.c (rmext): no extension to strip if empty string.
-
- * file.c (rb_enc_path_next, rb_enc_path_skip_prefix)
- (rb_enc_path_last_separator, rb_enc_path_end)
- (ruby_enc_find_basename, ruby_enc_find_extname): encoding-aware
- path handling functions.
-
- * file.c (rb_home_dir, file_expand_path, rb_realpath_internal)
- (rb_file_s_basename, rb_file_dirname, rb_file_s_extname)
- (rb_file_join): should respect the encodings of arguments than
- file system encoding. [ruby-dev:45145] [Bug #5919]
-
- * dir.c (check_dirname, ruby_glob0): ditto.
-
- * ext/pathname/pathname.c (path_sub_ext): ditto.
-
-Tue Jan 24 14:20:42 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm.c (rb_iter_break_value): new function to break a block with
- the value. [ruby-dev:45132] [Feature #5895]
-
-Tue Jan 24 12:58:41 2012 Yukihiro Matsumoto <matz@ruby-lang.org>
-
- * object.c (rb_Hash): add Kernel#Hash conversion method like
- Array() or Float(). a patch from Run Paint Run Run. Fix #3131
-
-Tue Jan 24 11:38:05 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/uri/common.rb (URI.encode_www_form_component): initialize on
- requiring to support JRuby, which runs parallel multithreads.
- [ruby-core:42222] [Bug #5925]
-
- * lib/uri/common.rb (URI.decode_www_form_component): initialize on
-
-Mon Jan 23 20:33:11 2012 Jason Kay <geniture@me.com>
-
- * lib/net/http.rb (Net::HTTP#connect): Writing entire packet at
- once to avoid incomplete transmission. Current code using
- writeline was causing sub-optimal conversing with a proxy due to
- the connect tunnel request headers being split over multiple
- packets. The modification I made allows the connect request to
- be written as one packet, avoiding problems and optimizing the
- conversation.
-
- https://github.com/ruby/ruby/pull/72
- [Feature #5460]
-
-Mon Jan 23 17:06:17 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/uri/mailto.rb (URI::MailTo.build): follow Array#to_s change of
- Ruby 1.9; use Array#join. [Bug #5840]
-
-Mon Jan 23 16:42:28 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * io.c (extract_binmode): raise an exception if binmode/textmode
- is specified with both vmode and opthash.
- [ruby-core:42199] [Bug #5918]
-
-Mon Jan 23 16:35:27 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * io.c (rb_io_extract_modeenc): set ASCII-8BIT if binmode is specified
- with opthash. [ruby-core:42197] [Bug #5917]
-
-Mon Jan 23 10:08:00 2012 Kenta Murata <mrkn@cookpad.com>
-
- * test/cgi/test_cgi_util.rb (test_cgi_escape_preserve_encoding):
- add a test for CGI::escape to preserve encoding.
-
- * test/cgi/test_cgi_util.rb (test_cgi_unescape_preserve_encoding):
- add a test for CGI::unescape to preserve encoding.
-
-Mon Jan 23 00:45:34 2012 Akinori MUSHA <knu@iDaemons.org>
-
- * misc/rdoc-mode.el (rdoc-imenu-create-index): Add imenu support
- to rdoc-mode.
-
- * misc/rdoc-mode.el (rdoc-mode): Fix regexp patterns containing
- "\s " where CR/LF is not supposed to match.
-
-Sun Jan 22 15:41:26 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (rb_intern3): split to registration check and new
- registration.
-
- * parse.y (rb_intern_str): make interned string shared with the
- given string.
-
- * parse.y (rb_intern3, rb_intern_str): check the coderange first.
-
-Sat Jan 21 22:21:07 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * include/ruby/ruby.h (FIXNUM_P): simple flag should be int.
-
-Sat Jan 21 21:51:19 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * encoding.c (rb_enc_compatible): fix segv on symbols.
- [ruby-core:42204] [Bug #5921]
-
-Sat Jan 21 11:43:45 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * dir.c (dir_chdir, check_dirname): get rid of optimization-out.
-
-Fri Jan 20 20:47:37 2012 Kenta Murata <mrkn@cookpad.com>
-
- * lib/cgi/util.rb (CGI.escape): support a string with invalid byte
- sequence. [Bug #5913]
-
- * test/cgi/test_cgi_util.rb
- (test_cgi_escape_with_invalid_byte_sequence): test for the above
- change.
-
-Fri Jan 20 17:37:37 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * vm.c (vm_exec): remove workaround for LLVM because r34278 fixes it.
-
- * vm_insnhelper.c (vm_call_cfunc): ditto.
-
-Fri Jan 20 14:31:43 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/net/http.rb (Net::HTTP#transport_request): retry a idempotent
- request automatically. [ruby-dev:45030] [Bug #5790]
- [ruby-core:41821] [Bug #5813]
-
- * lib/net/http.rb (Net::HTTP#keep_alive_timeout=): added to specify
- the second to reconnect the TCP connection on Keep-Alive.
- The default value is 2 second because current servers uses 2 sec.
- http://ftp-admin.blogspot.com/2009/09/keepalivetimeout2.html
-
- * lib/net/http.rb (Net::HTTP#begin_transport): reconnect TCP
- connection on keep-alive timeout.
-
-Thu Jan 19 07:53:09 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * ext/date/date_strptime.c: moved detector of leftover.
-
-Thu Jan 19 07:10:47 2012 Tadayoshi Funaba <tadf@dotrb.org>
-
- * ext/date/date_parse.c: [ruby-core:42173].
-
-Wed Jan 18 18:11:02 2012 Akinori MUSHA <knu@iDaemons.org>
-
- * misc/rdoc-mode.el (rdoc-mode): Add provide so that requiring
- this library succeeds.
-
-Wed Jan 18 18:06:45 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/curses/curses.c (cWindow, cMouseEvent): made typed data.
-
-Wed Jan 18 12:49:15 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/visitors/to_ruby.rb: Added support for loading
- subclasses of String with ivars
- * ext/psych/lib/psych/visitors/yaml_tree.rb: Added support for dumping
- subclasses of String with ivars
- * test/psych/test_string.rb: corresponding tests
-
-Wed Jan 18 10:39:47 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/visitors/to_ruby.rb: Added ability to load array
- subclasses with ivars.
- * ext/psych/lib/psych/visitors/yaml_tree.rb: Added ability to dump
- array subclasses with ivars.
- * test/psych/test_array.rb: corresponding tests
-
-Tue Jan 17 17:18:41 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in (SPT_TYPE): enable as SPT_REUSEARGV on Darwin.
-
- * missing/setproctitle.c (ruby_init_setproctitle): changed prefix.
-
-Tue Jan 17 12:32:46 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * gc.c (aligned_malloc, aligned_free): covered missing defined
- operators and fixes for cygwin.
-
-Tue Jan 17 10:54:46 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * st.c (do_hash): it's the time to remove cast to unsigned int.
-
-Tue Jan 17 07:30:12 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * st.c (unpack_entries): Fix r34310: on unpacking, the position of
- a hash must be do_hash-ed value.
-
- * st.c (add_packed_direct): ditto.
-
-Mon Jan 16 16:41:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/optparse.rb (Regexp): fix incorrect options when casting to
- a Regexp, and suppress encoding option warnings.
- https://github.com/ruby/ruby/pull/82
-
-Mon Jan 16 11:22:38 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * win32/win32.c (rb_chsize): no need to get the current file size.
-
-Mon Jan 16 00:41:33 2012 Sokolov Yura <funny.falcon@gmail.com>
-
- * st.c: st use function instead of macro. In my current
- environment (Ubuntu 11.04 32bit gcc-4.5.2) it gives 4%
- performance improvement.
-
- https://github.com/ruby/ruby/pull/77
-
-Sun Jan 15 14:09:48 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * object.c (rb_inspect): raise the result is not compatible with
- the default external encoding. [ruby-core:42095] [Bug #5848]
- If the default external encoding is ASCII compatible, the encoding of
- inspected result must be compatible with it.
- If the default external encoding is ASCII incompatible,
- the result must be ASCII only.
-
-Sun Jan 15 13:21:50 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * ext/json/parser/parser.rl (json_string_unescape): workaround fix
- for over optimization of GCC 4.7. [ruby-core:42085] [Bug #5888]
- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51862
-
-Sat Jan 14 22:24:09 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/dl/callback/mkcallback.rb (gencallback): suppress unused
- variables.
-
-Sat Jan 14 21:56:43 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * iseq.c (iseq_data_to_ary): check line info table boundary. line
- number 0 means no line number info is needed. [ruby-dev:45130]
- [Bug #5894]
-
-Sat Jan 14 18:24:13 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * error.c (exc_equal): clear rb_thread_t::errinfo when ignore
- an exception under rb_protect(). [ruby-core:41979] [Bug #5865]
-
-Sat Jan 14 12:02:55 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * sprintf.c (rb_enc_vsprintf): relaxed the restriction. since the
- implementation deeply depends on plain char, so wchar_t based
- encodings are not supported.
-
-Sat Jan 14 12:00:20 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * error.c (exc_equal): ignore exceptions during implicit
- conversion. [ruby-core:41979] [Bug #5865]
-
-Sat Jan 14 05:58:54 2012 Eric Hodel <drbrain@segment7.net>
-
- * io.c (rb_io_s_read): Fix formatting of open_args comment. Reported
- by Adam Prescott.
-
-Fri Jan 13 18:41:19 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * sprintf.c (rb_enc_vsprintf): can be used for ASCII compatible
- encodings only.
-
-Fri Jan 13 18:29:06 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * thread.c (rb_mutex_unlock_th): simplified.
-
- * thread.c (rb_barrier_waiting): fix potential overflows.
-
-Fri Jan 13 17:23:38 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * load.c (load_unlock): update loading table at once.
-
-Fri Jan 13 16:44:45 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * error.c (exc_equal): try implicit conversion for delegator.
- [ruby-core:41979] [Bug #5865]
-
-Fri Jan 13 03:46:53 2012 Akinori MUSHA <knu@iDaemons.org>
-
- * lib/shellwords.rb (Shellwords#shellescape): shellescape() now
- stringifies the given object using to_s.
-
- * lib/shellwords.rb (Shellwords#shelljoin): shelljoin() accepts
- non-string objects in the given array, each of which is
- stringified using to_s.
-
- * lib/shellwords.rb: Fix rdoc markups.
-
-Fri Jan 13 03:38:36 2012 Akinori MUSHA <knu@iDaemons.org>
-
- * lib/shellwords.rb (Shellwords#shellsplit): Fix a bug where
- consecutive backslashes in double quotes are all removed except
- the one at the tail.
-
-Fri Jan 13 03:28:00 2012 Luis Lavena <luislavena@gmail.com>
-
- * ext/socket/extconf.rb (if ipv6): only define _WIN32_WINNT if was not
- previously defined. This solve warnings with multiple defines in
- command line with GCC 4.6.1
-
-Thu Jan 12 18:44:31 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/mkmf.rb: fix r33904 and revert r33905. initialize global
- variables with init_mkmf before initializing constants.
- [ruby-dev:45124] [Bug #5879]
-
-Thu Jan 12 13:51:00 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * cont.c (cont_restore_0): prevent optimizing out `sp'. sp is used for
- reserving a memory space with ALLOCA_N for restoring machine stack
- stored in cont->machine_stack, but clang optimized out it (and
- maybe #5851 is also caused by this).
- This affected TestContinuation#test_check_localvars.
-
- * cont.c (cont_restore_1): revert workaround introduced in r32201.
-
-Thu Jan 12 02:14:43 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * object.c: Added examples for Object#is_a? and
- Object#instance_of? patched from Manoj Kumar.
- [Bug #5880] [ruby-core:42057]
-
-Thu Jan 12 00:57:48 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-
- * lib/mkmf.rb: verbose-mode can use by RM, RMDIRS, etc.
- (e.g. make V=1 realclean)
-
-Wed Jan 11 23:40:21 2012 Naohisa Goto <ngoto@gen-info.osaka-u.ac.jp>
-
- * string.c (rb_str_concat): set array element after definition
- to fix compile error with Fujitsu C Compiler 5.6 on Solaris 10
- on Sparc. [Bug #5878] [ruby-dev:45123]
-
-Wed Jan 11 22:52:51 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * gc.c (ruby_mimmalloc): don't set allocated size to header.
- ruby_mimmalloc() doesn't increment allocated_size/allocations and
- decrement them in ruby_xfree() cause inconsistency.
-
- * gc.c (ruby_xfree): don't decrement allocated_size/allocations if
- allocated size record is 0.
-
-Wed Jan 11 22:36:43 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * test/readline/test_readline.rb (test_completion_proc_empty_result):
- ensure clearance of Readline's line_buffer after the test.
-
-Tue Jan 10 21:57:38 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * ext/dbm/dbm.c (Init_dbm): fix a build error on mswin32.
- use `extern __declspec(dllimport)` for dll link with VC.
- [ruby-core:41996] [Bug #5869]
-
-Tue Jan 10 15:31:55 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * vm.c (vm_exec): refix r34162; suppress warning and add description.
-
-Tue Jan 10 15:13:58 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * ext/readline/readline.c (readline_attempted_completion_function):
- use rb_memerror().
-
-Tue Jan 10 12:49:42 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * gc.c: in fact, i686-linux doesn't need to define _XOPEN_SOURCE 600.
-
-Tue Jan 10 12:44:11 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * gc.c (ruby_mimmalloc): defined for objects need not rb_objspace,
- but should return pointer suitable for ruby_xfree;
- main vm and main thread.
- patched by Sokolov Yura. https://github.com/ruby/ruby/pull/79
-
- * internal.h: ditto.
-
- * vm.c (Init_BareVM): use ruby_mimmalloc.
-
- * ext/dl/cfunc.c: #include <ruby/util.h>.
-
- * ext/syslog/syslog.c: use xfree because it is allocated by
- ruby_strdup.
-
-Tue Jan 10 12:13:56 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-
- * ext/readline/readline.c (readline_attempted_completion_function):
- fix compile error.
-
-Tue Jan 10 10:41:11 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/readline/readline.c (readline_attempted_completion_function):
- empty completion result does not mean memory error.
-
-Tue Jan 10 02:19:22 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * test/ruby/test_io.rb (test_autoclose_true_closed_by_finalizer,
- test_autoclose_true_closed_by_finalizer): skip if IO objects are
- not recycled yet. [ruby-dev:45098] [Bug #5850]
-
-Tue Jan 10 00:41:28 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * lib/tempfile.rb (Tempfile#_close): clear @tempfile and @data[1] even
- when exception is raised at @tempfile.close. [ruby-dev:45113]
-
- * lib/tempfile.rb (Tempfile#unlink): fix a typo.
-
-Tue Jan 10 00:32:17 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * gc.c (run_finalizer): clear rb_thread_t::errinfo when ignore
- an exception under rb_protect(). [ruby-dev:45113]
-
-Mon Jan 9 23:37:43 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * ext/readline/readline.c (readline_attempted_completion_function):
- fix typos.
-
-Mon Jan 9 20:55:34 2012 Narihiro Nakamura <authornari@gmail.com>
-
- * gc.c : don't embed struct heaps_slot to a heap block because it
- can causes copy-on-write of memory page on heap block when its
- free_next is rewritten.
-
-Mon Jan 9 20:26:33 2012 Tanaka Akira <akr@fsij.org>
-
- * ext/pathname/pathname.c (path_entries): add document suggested by
- the thread [ruby-core:41959] [Bug #5859].
-
-Mon Jan 9 20:14:13 2012 Tanaka Akira <akr@fsij.org>
-
- * ext/socket/lib/socket.rb (family_addrinfo): don't require protocol
- equality. For example, protocol 0 and IPPROTO_TCP is not problem
- for TCP.
-
-Mon Jan 9 20:08:52 2012 Tanaka Akira <akr@fsij.org>
-
- * ext/socket/lib/socket.rb (family_addrinfo): return the given
- addrinfo object.
- Patch by Ippei Obayashi. [ruby-dev:45095] [Bug #5845]
-
-Mon Jan 9 19:40:20 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/zlib/test_zlib.rb (TestZlibGzipWriter#test_writer_wrap): set
- binmode explicitly.
-
-Mon Jan 9 14:42:41 2012 Narihiro Nakamura <authornari@gmail.com>
-
- * gc.c: free_slots is changed Singly linked list. clear
- free_slots before sweep.
-
-Mon Jan 9 07:46:17 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * gc.c: i686-linux needs to define _XOPEN_SOURCE 600 for posix_memalign.
-
-Mon Jan 9 04:24:59 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * gc.c (rb_objspace_free): global_List is allocated with xmalloc.
- patched by Sokolov Yura. https://github.com/ruby/ruby/pull/78
-
- * dln_find.c: remove useless replacement of free.
-
- * ext/readline/readline.c (readline_attempted_completion_function):
- strings for readline must allocated with malloc.
-
- * process.c (run_exec_dup2): use free; see also r20950.
-
- * re.c (onig_new_with_source): use malloc for oniguruma.
-
- * vm.c (ruby_vm_destruct): use free for VMs.
-
- * vm.c (thread_free): use free for threads.
-
-Mon Jan 9 04:24:59 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * dln_find.c: remove useless replacement of free.
-
- * ext/readline/readline.c (filename_completion_proc_call):
- matches should use xfree.
-
- * ext/readline/readline.c (username_completion_proc_call): ditto.
-
-Mon Jan 9 01:12:35 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * numeric.c (rb_enc_uint_char): raise RangeError when added codepoint
- is invalid. [Feature #5855] [Bug #5863] [Bug #5864]
-
- * string.c (rb_str_concat): ditto.
-
- * string.c (rb_str_concat): set encoding as ASCII-8BIT when the string
- is US-ASCII and the argument is an integer greater than 127.
-
- * regenc.c (onigenc_mb2_code_to_mbclen): rearrange error code.
-
- * enc/euc_jp.c (code_to_mbclen): ditto.
-
- * enc/shift_jis.c (code_to_mbclen): ditto.
-
-Sun Jan 8 20:31:45 2012 Narihiro Nakamura <narihiro@netlab.jp>
-
- * gc.c : consider header bytes which are used by malloc.
-
-Sun Jan 8 11:54:43 2012 Narihiro Nakamura <authornari@gmail.com>
-
- * gc.c (aligned_free): support MinGW. Patch by Hiroshi Shirosaki.
-
-Sun Jan 8 11:43:05 2012 Narihiro Nakamura <authornari@gmail.com>
-
- * gc.c (slot_sweep): add a assertion instead of a debug print.
-
-Sun Jan 8 01:18:19 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * test/-ext-/old_thread_select/test_old_thread_select.rb:
- avoid platform bug. [Bug #5858] [ruby-dev:45108]
-
-Sun Jan 8 00:46:34 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * gc.c: get rid of implicit narrowing conversion.
-
-Sun Jan 8 00:10:10 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * configure.in: check posix_memalign(3) and memalign(3).
-
- * gc.c (aligned_malloc): use configure's result instead of
- _POSIX_C_SOURCE and _XOPEN_SOURCE because they can't be used
- to check availability at least on FreeBSD.
-
-Sat Jan 7 22:25:50 2012 Narihiro Nakamura <authornari@gmail.com>
-
- * gc.c: use Bitmap Marking algorithm to avoid copy-on-write of
- memory pages. See [ruby-dev:45085] [Feature #5839]
- [ruby-core:41916].
-
- * include/ruby/ruby.h : FL_MARK rename to FL_RESERVED1.
-
- * node.h : ditto.
-
- * debug.c : ditto.
-
- * object.c (rb_obj_clone): FL_MARK move to a bitmap.
-
- * class.c (rb_singleton_class_clone): ditto.
-
-Sat Jan 7 00:47:07 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * configure.in: always define CANONICALIZATION_FOR_MATHN.
- [ruby-dev:45100] [Bug #5852]
-
-Fri Jan 6 23:11:20 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * include/ruby/version.h: RUBY_API_VERSION 2.0.0
-
-Fri Jan 6 12:24:11 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * object.c (rb_inspect): raises Encoding::CompatibilityError if the
- result is incompatible with the default external encoding.
- [ruby-core:41931] [Bug #5848]
-
-Thu Jan 5 15:26:15 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/win32.c (check_valid_dir): strict checking of root.
- GetDriveType() succeeds with non root directory as the argument,
- even if MSDN says that the API needs the root directory.
- this patch fixes a failure of test/ruby/test_file_exhaustive.rb.
-
-Thu Jan 5 12:15:55 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * file.c (rb_file_join): separator is appended by array length - 1
- times. patched by Benoit Daloze [ruby-core:41901] [Bug #5841]
-
-Thu Jan 5 11:47:54 2012 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/uri/common.rb (URI::Parser#initialize_regexp):
- use \A \z instead of ^ $. [Bug #5843]
-
-Wed Jan 4 17:55:53 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * array.c (rb_ary_sample): add example for Array#sample
- based on patch from https://github.com/ruby/ruby/pull/74
-
-Wed Jan 4 14:24:33 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * string.c (str_nth_len): count ascii-only run at the end. this
- bug appears only when single-byte-optimization is disabled due
- to unknown coderange. [ruby-core:41896] [Bug #5836]
-
-Wed Jan 4 11:32:07 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/win32.c (check_valid_dir): special case for a root directory.
- Reported by Masateru OKAMOTO at [Bug #5819].
-
-Wed Jan 4 00:19:54 2012 Kouhei Sutou <kou@cozmixng.org>
-
- * lib/rexml/parsers/baseparser.rb: use private instead of _xxx
- method name. This is Ruby code not Python code.
- refs #5696
-
-Tue Jan 3 23:57:37 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * lib/rexml/parsers/baseparser.rb: rexml BaseParser uses
- instance_eval unnecessarily on listener add.
- patch from Charles Nutter. [Bug #5696] [ruby-core:41437]
-
-Tue Jan 3 20:44:13 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * README: add comment for Git user. patch from Arun Agrawal.
- * README.ja: ditto.
-
-Tue Jan 3 15:58:22 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * thread.c: changed documentation for "thread-local" variables.
- patch from Julien Ammous.
-
-Tue Jan 3 15:50:12 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * process.c: Fix typo. patch from Aviv Ben-Yosef.
-
-Tue Jan 3 13:43:37 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * tool/merger.rb: allow r0123 style revision number.
-
-Tue Jan 3 11:17:55 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * tool/merger.rb (#version_up): version.h date should be Japanese
- locale date.
-
-Mon Jan 2 22:08:00 2012 Akinori MUSHA <knu@iDaemons.org>
-
- * tool/file2lastrev.rb (VCS::detect): Add support for Subversion
- 1.7 which adopted a whole new working directory structure.
-
- * tool/file2lastrev.rb (VCS::detect): Simply use .each instead of
- .sort.reverse_each which looks too arbitrary. If you want SVN
- to be tried first, then you just have to register it first as it
- is right now.
-
-Mon Jan 2 20:53:36 2012 Tanaka Akira <akr@fsij.org>
-
- * lib/securerandom.rb (random_bytes): use IO#read instead of
- IO#readpartial to make the intent more clear.
-
-Mon Jan 2 15:26:39 2012 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * test/ruby/test_object.rb (test_send_with_block): add a normal case.
-
-Mon Jan 2 15:18:54 2012 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * test/ruby/test_object.rb (test_send_with_block): moved from
- bootstraptest/test_flow.rb.
-
-Mon Jan 2 15:10:11 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-
- * lib/test/unit/parallel.rb: use pack("m0") instead of
- pack("m").gsub("\n","").
- * lib/test/unit.rb (Test::Unit::Runner::Worker#run): ditto.
-
-Mon Jan 2 15:05:09 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-
- * lib/test/unit.rb (Test::Unit::Runner::Worker#run): use
- File.basename with suffix instead of gsub.
-
-Mon Jan 2 14:55:28 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-
- * lib/test/unit.rb (Test::Unit::Runner#_run_parallel): find may
- return nil and nil can not dup.
-
-Sun Jan 1 12:23:10 2012 Akinori MUSHA <knu@iDaemons.org>
-
- * lib/shellwords.rb (Shellwords#shellescape): Drop the //n flag
- that only causes warnings with no real effect. [Bug #5637]
-
-Sat Dec 31 06:28:37 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * thread.c (rb_barrier_waiting): save the number of waiting threads
- in RBASIC()->flags. [ruby-dev:45002] [Bug #5768]
-
- * thread.c (rb_barrier_wait): increment and decrement around
- rb_mutex_lock, and use rb_barrier_waiting().
-
- * thread.c (rb_barrier_release): use rb_barrier_waiting().
-
- * thread.c (rb_barrier_destroy): ditto.
-
-Mon Dec 26 17:20:10 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * vm.c (vm_exec): add guard to prevent optimization for LLVM clang.
-
-Fri Dec 30 17:01:12 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * vm_eval.c (rb_f_send): fix obj.send() documentation issue.
- [Bug #5125] [ruby-core:38633]
-
-Thu Dec 29 22:36:16 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * lib/test/unit.rb (Test::Unit::Runner::Worker#_run_parallels): fix
- premature exit when all workers' status are :ready or :prepare.
- [ruby-dev:45061] [Bug #5822]
-
-Thu Dec 29 01:51:13 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * include/ruby/ruby.h: fix #error pragma. LLP64 platform is supported.
-
- * include/ruby/st.h: ditto.
-
-Wed Dec 28 11:22:45 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/fileutils.rb (FileUtils::Entry_#entries): use utility method
- instead of typoed regexp. [ruby-core:41829] [Bug #5817]
-
-Wed Dec 28 02:08:04 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * vm_insnhelper.c (unknown_keyword_error): add GC guard to prevent
- intermediate object from GC.
-
-Tue Dec 27 22:34:54 2011 Shota Fukumori <sorah@tubusu.net>
-
- * lib/test/unit.rb (Worker#close): "closing IO if IO is closed"
- should be "closing IO if IO isn't closed"
-
-Tue Dec 27 22:04:27 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * st.c (st_update): new function to lookup the given key and
- update the value. [ruby-dev:44998]
-
-Tue Dec 27 21:17:33 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * node.h (rb_args_info): change pre_args_num and post_args_num as
- int, to match with rb_iseq_t.
-
- * parse.y (new_args_gen): check overflow.
-
-Mon Dec 26 22:38:35 2011 Yusuke Endoh <mame@tsg.ne.jp>
-
- * vm_insnhelper.c (unknown_keyword_error): make it kind a error
- message when unknown keyword is given. It require more work.
- See [ruby-core:40518] and [ruby-core:40541] in detail.
-
-Mon Dec 26 22:31:07 2011 Yusuke Endoh <mame@tsg.ne.jp>
-
- * vm_core.h (struct rb_iseq_struct), compile.c (iseq_set_arguments),
- iseq.c (rb_iseq_parameters), vm_insnhelper.c
- (vm_callee_setup_arg_complex): support Method#parameters for keyword
- arguments. The provisional spec is what Benoit Daloze proposed.
- [ruby-core:40541]
-
- * test/ruby/test_keyword.rb: add a test for above.
-
-Mon Dec 26 22:15:27 2011 Yusuke Endoh <mame@tsg.ne.jp>
-
- * vm_core.h (struct rb_iseq_struct), compile.c (iseq_set_arguments,
- iseq_compile_each), vm_insnhelper.c (vm_callee_setup_arg_complex):
- implement keyword arguments. See [ruby-core:40290]
- The feature is promised to be included in 2.0, but the detail spec
- is still under discussion; this commit is a springboard for further
- discussion. Please try it and give us feedback.
- This commit includes fixes for some problems reported by Benoit
- Daloze <eregontp AT gmail.com> [ruby-core:40518] and Marc-Andre
- Lafortune <ruby-core-mailing-list AT marc-andre.ca>
- [ruby-core:41772].
-
- * iseq.c (iseq_free, prepare_iseq_build): bookkeeping.
-
- * test/ruby/test_keyword.rb: add tests for keyword arguments.
-
- * test/ripper/dummyparser.rb (class DummyParser): temporal fix for
- ripper test.
-
-Mon Dec 26 22:00:17 2011 Yusuke Endoh <mame@tsg.ne.jp>
-
- * node.h, node.c, parse.y: implement a parser part for keyword
- arguments.
- This is a preparation for keyword argument (see [ruby-core:40290]).
-
- * gc.c (gc_mark_children): bookkeeping.
-
-Mon Dec 26 21:03:18 2011 Yusuke Endoh <mame@tsg.ne.jp>
-
- * node.h, parse.y (new_args_gen), compile.c (iseq_set_arguments): use
- struct rb_args_info instead of NODEs.
- This is a preparation for keyword argument (see [ruby-core:40290]).
-
- * node.c (dump_node), gc.c (gc_mark_children, obj_free): bookkeeping.
-
-Mon Dec 26 20:59:51 2011 Yusuke Endoh <mame@tsg.ne.jp>
-
- * node.h, parse.y (lambda, f_larglist): remove NEW_LAMBDA hack.
- This is a preparation for keyword argument (see [ruby-core:40290]).
-
-Mon Dec 26 22:01:19 2011 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-
- * io.c (rb_sys_fail_path): move the definition.
- Move above for using it in set_binary_mode_with_seek_cur().
-
- * io.c (set_binary_mode_with_seek_cur): fix improper seek cursor.
- Seeking file cursor with setting binary mode has possibility to
- cause infinite loop. Fixed the bug and refined error handling.
- Introduced at r34043.
-
- And cleanups as below.
- Remove unnecessary parentheses of `fptr`.
- Use return value of setmode().
-
- * test/ruby/test_io_m17n.rb
- (TestIO_M17N#test_seek_with_setting_binmode): add a test for above.
- [ruby-core:41671] [Bug #5714]
-
-Mon Dec 26 17:01:14 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * common.mk (LIBRUBY_A): depends on main.o since r33774.
- [ruby-core:41786] [Bug #5796]
-
-Mon Dec 26 13:07:08 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/ruby/test_io.rb (TestIO#test_autoclose): Tempfile.new doesn't
- accept the block argument.
-
-Mon Dec 26 13:06:52 2011 Shota Fukumori <sorah@tubusu.net>
-
- * lib/test/unit.rb: Avoid zombie processes on "--separate" option
- added at r34121.
-
-Mon Dec 26 04:01:23 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * ext/openssl/ossl_cipher.c: Update and complete documentation.
-
-Sun Dec 25 23:16:11 2011 Shota Fukumori <sorah@tubusu.net>
-
- * test/testunit/test_parallel.rb (test_separate): Test for "--separate"
- option (r34121)
-
-Sun Dec 25 22:39:49 2011 Shota Fukumori <sorah@tubusu.net>
-
- * lib/test/unit.rb (_run_parallel):
- New option "--separate" for test/unit; when running tests with this
- option, a job process will be restarted after one test file has done.
- This means all test files will run with separated process.
-
- * lib/test/unit/parallel.rb: Fix for above. Now parallel.rb puts
- "ready!" for first ready, "ready" for afters.
-
-Sun Dec 25 00:02:15 2011 Luis Lavena <luislavena@gmail.com>
-
- * configure.in: change --with-ntver to --with-winnt-ver to be more
- descriptive in the context. [ruby-core:41794]
-
-Sat Dec 24 23:25:15 2011 Luis Lavena <luislavena@gmail.com>
-
- * configure.in: add --with-ntver option to match win32/configure.bat
- functionality. Set 0x0501 as default. [ruby-core:35010]
- [ruby-core:35035]
-
-Sat Dec 24 12:38:53 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * proc.c (proc_call): get rid of optimization-out by clang.
-
- * proc.c (rb_proc_call, rb_proc_call_with_block): ditto.
-
-Sat Dec 24 10:56:32 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/readline/readline.c (readline_readline): check if outstream
- is closed to get rid of a bug of readline 6. [ruby-dev:45043]
- [Bug #5803]
-
-Sat Dec 24 06:59:49 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * test/readline/test_readline.rb (test_line_buffer__point): use
- lambda not to exit entire method by "return". or "next" for
- proc. [ruby-dev:45042] [Bug #5802]
-
-Sat Dec 24 01:20:39 2011 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * vm_eval.c (send_internal): PASS_PASSED_BLOCK_TH must be placed
- just before calling rb_call0.
-
- * bootstraptest/test_flow.rb: add a test for above.
-
-Sat Dec 24 00:55:16 2011 Tanaka Akira <akr@fsij.org>
-
- * lib/tempfile.rb (Tempfile#initialize): warn if a block is given.
-
-Fri Dec 23 16:14:30 2011 TAKAO Kouji <kouji@takao7.net>
-
- * ext/readline/readline.c (readline_attempted_completion_function):
- in Readline module with GNU Readline 6 case, Readline module
- resets completion_append_character to " ", after it executes
- completion. So, Readline module stores
- completion_append_character, and Readline module always sets it
- after Readline module executes completion. [ruby-dev:43456]
- [Feature #4635]
-
-Fri Dec 23 15:59:05 2011 TAKAO Kouji <kouji@takao7.net>
-
- * ext/readline/readline.c (Init_readline): libedit check
- rl_getc_function only when rl_initialize() is called, and
- using_history() call rl_initialize(). This assignment should be
- placed before using_history(). [ruby-core:40641] [Bug #5539]
-
-Fri Dec 23 10:14:47 2011 Tanaka Akira <akr@fsij.org>
-
- * test/thread/test_queue.rb (test_thr_kill): show the number of loop
- run when the test failed.
-
-Fri Dec 23 09:23:48 2011 Tanaka Akira <akr@fsij.org>
-
- * test/test_pty.rb (test_pty_check_default): call PTY.check until
- "cat" command is finished.
-
-Fri Dec 23 06:03:00 2011 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-
- * common.mk: add "check succeeded" message.
-
- * README, README.ja: follow above change.
-
-Fri Dec 23 06:00:39 2011 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-
- * ext/bigdecimal/bigdecimal.h: add satisfy cc-mode comment.
- * util.c: ditto.
-
-Fri Dec 23 00:08:25 2011 Tanaka Akira <akr@fsij.org>
-
- * test/test_pty.rb (test_pty_check_default): "cat" may not terminated
- in the 0.1 second.
-
-Thu Dec 22 23:37:25 2011 Tanaka Akira <akr@fsij.org>
-
- * test/ruby/test_thread.rb (test_condvar_timed_wait): don't test the
- maximum sleep time. Ruby is not a real-time system.
-
-Thu Dec 22 22:37:45 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * thread_pthread.c (ping_signal_thread_list): remove return value.
- * thread_pthread.c (check_signal_thread_list): add a new function to
- check if signal thread list is empty.
- * thread_pthread.c (thread_timer): check signal thread list after
- timer_thread_function(). main thread might be added into signal thread
- list during timer_thread_function().
-
-Thu Dec 22 00:40:24 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * ext/bigdecimal/bigdecimal.c (VpMult, VpCtoV, VpSqrt): remove assigned
- but unused variables.
-
-Wed Dec 21 18:28:22 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * common.mk (newline.c, miniprelude.c): revert r33949 because the change
- broke mswin build, and the changer said no reason about the change.
- [ruby-dev:45016] [Bug #5783]
-
-Wed Dec 21 12:35:24 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/bigdecimal/bigdecimal.c (BigDecimal_s_allocate): follow
- Allocation Framework. [Bug #5775]
-
-Wed Dec 21 02:25:36 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/emitter.c: fixing clang warnings. Thanks Joey!
-
-Wed Dec 21 01:06:00 2011 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-
- * ext/bigdecimal/README: Update redmine.ruby-lang.org to bugs.ruby-lang.org
- * ext/socket/ancdata.c: ditto
- * test/-ext-/wait_for_single_fd/test_wait_for_single_fd.rb: ditto
- * test/syck/test_yaml.rb: ditto
- * doc/ChangeLog-1.9.3: ditto
-
-Tue Dec 20 23:50:12 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
-
- * PStore content update perf optimization. Patch by Masaki Matsushita.
- See #5248.
-
- * lib/pstore.rb (save_data):
-
- * Delete inadequate Marshal check.
-
- * Deferred file truncation: when writing the new content, truncate
- the saved file to the data size after writing the data, instead of
- truncating whole bytes before writing data.
-
- * Deferred MD5 calculation: when comparing MD5 hash to check the
- content modification, calculate MD5 hash of new data iif the
- content length is differ from the old one.
-
- * Compare content size with String#bytesize instead of String#size.
-
-Tue Dec 20 21:00:30 2011 Tadayoshi Funaba <tadf@dotrb.org>
-
- * ext/date/date_core.c: uses to_integer instead.
- * test/date/test_switch_hitter.rb: added a test.
-
-Tue Dec 20 15:04:18 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
-
- * Make sure to clear $! when ignoring an exception
-
- * ext/openssl/ossl.c (ossl_pem_passwd_cb0, ossl_verify_cb):
- pem_passwd_cb and verify_cb ignores the exception raised in a
- callback proc so it should clear $! for subsequent execution.
-
- That's said, both subsequent processes for pem_passwd_cb and
- verify_cb raises another exception before leaking $! to Ruby world.
- We cannot test this fix in Ruby land.
-
- * test/openssl/test_pkey_rsa.rb
- (test_read_private_key_pem_pw_exception): Test for pem_passwd_cb +
- exception.
-
-Tue Dec 20 11:49:13 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * test/date/test_date_base.rb (test_jd): tests for
- [ruby-dev:45008].
-
-Tue Dec 20 10:20:48 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * ext/date/date_core.c (wholenum): fix the type of the return value.
-
-Tue Dec 20 05:03:24 2011 Eric Hodel <drbrain@segment7.net>
-
- * README.ja: Update redmine.ruby-lang.org to bugs.ruby-lang.org
- * README: ditto
- * common.mk: ditto
- * man/erb.1: ditto
- * man/irb.1: ditto
- * man/ri.1: ditto
- * man/ruby.1: ditto
- * sparc.c: ditto
- * tool/install-sh: ditto
-
-Tue Dec 20 02:15:18 2011 Tadayoshi Funaba <tadf@dotrb.org>
-
- * ext/date/date_core.c: [ruby-dev:45008].
-
-Sun Dec 18 18:52:37 2011 Naohisa Goto <ngotogenome@gmail.com>
-
- * vm.c (vm_define_method): improve guard of iseq from GC. Fix
- failure or segmentation fault in test_singleton_method(TestGc)
- on sparc Solaris10 compiled with Oracle Solaris Studio 12.2.
- [Bug #5762] [ruby-dev:45000] [Bug #4178]
-
-Sun Dec 18 14:34:31 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/bigdecimal/bigdecimal.c (Init_bigdecimal): does not follow
- allocation framework right now. [ruby-core:41710] [Bug #5773]
-
-Sun Dec 18 12:42:48 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/visitors/to_ruby.rb: BigDecimals can be restored
- from YAML.
- * ext/psych/lib/psych/visitors/yaml_tree.rb: BigDecimals can be dumped
- to YAML.
- * test/psych/test_numeric.rb: tests for BigDecimal serialization
-
-Sun Dec 18 12:03:13 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/scalar_scanner.rb: Strings that look like dates
- should be treated as strings and not dates.
-
- * test/psych/test_scalar_scanner.rb: corresponding tests.
-
-Sun Dec 18 09:43:21 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * test/thread/test_queue.rb (test_thr_kill): extend timeout.
- this test takes a long time at slow machine.
-
-Sun Dec 18 09:36:51 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * test/ruby/envutil.rb (invoke_ruby): remove :timeout option before
- pass it to Kernel#spawn.
-
-Fri Dec 16 17:18:38 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * README, README.ja: 'make check' is preferable to 'make test'.
-
-Thu Dec 15 23:16:13 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * error.c (builtin_type_name): don't return pointer to the buffer of
- temporary String object.
-
-Thu Dec 15 17:56:58 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * io.c (argf_type): make typed data.
-
-Thu Dec 15 17:40:28 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * error.c (rb_check_type): fix typo.
-
-Thu Dec 15 14:48:35 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/strscan/strscan.c: use typed data with
- onig_region_memsize().
-
-Thu Dec 15 14:33:33 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * error.c (rb_check_typeddata): refine error message with
- including expected struct name.
-
-Thu Dec 15 13:15:51 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * regcomp.c (onig_region_memsize): implemented for memsize_of().
-
- * ext/objspace/objspace.c (memsize_of): use it.
-
-Thu Dec 15 10:44:54 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * array.c (rb_ary_reject_bang, rb_ary_delete_if): update rdoc.
- documentation from Thomas Leitner <t_leitner AT gmx.at> in
- [ruby-core:41616]. [Bug #5752]
-
-Thu Dec 15 10:10:43 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * test/ruby/test_require.rb (test_race_exception): get rid of
- not-guaranteed timing issue. [ruby-core:41655] [Bug #5754]
-
-Wed Dec 14 21:58:42 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/ruby/test_io_m17n.rb
- (TestIO_M17N#test_{read_with_binmode_and_get[cs]}): only for Windows.
-
-Wed Dec 14 19:57:23 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * common.mk,Makefile.in,win32/Makefile.sub (ECHO1): move platform
- specific hack from common.mk to Makefile.in (and win32/Makefile.sub).
- [Bug #5711]
-
- * lib/mkmf.rb: we can generate Makefile as we like.
-
-Wed Dec 14 19:22:33 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/win32.c, include/ruby/win32.h (rb_w32_fd_is_text): new function.
-
- * win32/win32.c (init_stdhandle): set default mode of stdin as binmode.
-
- * io.c (set_binary_mode_with_seek_cur): new function to replace
- SET_BINARY_MODE_WITH_SEEK_CUR macro. now returns previous mode of the
- fd and take care of LF in rbuf.
-
- * io.c (do_writeconv): set text mode when needed.
-
- * io.c (io_read): need to change the mode of the IO to binmode
- temporally when the length for IO#read, because IO#read with length
- must behave so.
-
- * test/ruby/test_io_m17n.rb (TestIO_M17N#test_{read_with_length,
- read_with_length_binmode,get[cs]_and_read_with_binmode,
- read_with_binmode_and_get[cs],read_write_with_binmode}): tests for
- above changes.
-
- all patches are written by Hiroshi Shirosaki. [ruby-core:41496]
- [Feature #5714]
-
-Wed Dec 14 15:28:31 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * transcode.c (str_encode): about the extension of :fallback
- option since 1.9.3.
-
-Wed Dec 14 12:19:59 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * load.c (load_unlock): release loading barrier and then remove it
- from loading_table if it is not in-use. [Bug #5754]
-
- * thread.c (rb_barrier_release, rb_barrier_destroy): return
- whether any other threads are waiting on it.
-
-Wed Dec 14 11:23:45 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * thread_pthread.c (ubf_select): call rb_thread_wakeup_timer_thread()
- only when it is not timer_thread. [Bug #5757] [ruby-dev:44985]
- patched by Tomoyuki Chikanaga.
-
-Wed Dec 14 10:20:08 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * load.c (load_lock): delete the loading barrier if it has been
- destroyed.
-
- * thread.c (rb_barrier_wait): return nil for recursive lock
- instead of false, to distinguish it from destroyed barrier.
-
-Wed Dec 14 01:24:55 2011 okkez <okkez000@gmail.com>
-
- * thread_pthread.c (rb_thread_create_timer_thread): fix memory
- leak. [ruby-dev:44904] [Bug #5688]
-
-Wed Dec 14 00:01:15 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (primary): point method name line. [ruby-core:40936]
- [Bug #5614]
-
-Tue Dec 13 23:43:48 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * error.c (name_err_mesg_to_str): clear rb_thread_t::errinfo when
- ignore exception under rb_protect(). [ruby-core:41612] [Bug #5755]
-
- * test/ruby/test_exception.rb (test_exception_in_name_error_to_str):
- add a corresponding test.
-
-Tue Dec 13 16:13:29 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * load.c (load_unlock): all threads requiring one file should
- share same loading barrier, so it must be kept alive while those
- are waiting on it. [ruby-core:41618] [Bug #5754]
-
-Tue Dec 13 07:30:14 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * lib/webrick/httpresponse.rb (setup_header): 1xx responses
- are allowed to have Keep-Alive connections.
-
- * test/webrick/test_httpresponse.rb: corresponding test.
-
-Tue Dec 13 07:13:28 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * lib/webrick/httpresponse.rb (setup_header): 204 and 304 responses
- are allowed to have a Keep-Alive connection. [ruby-core:41581]
-
- * test/webrick/test_httpresponse.rb: corresponding test.
-
-Tue Dec 13 06:29:39 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (parser_magic_comment): should pass the proper value.
- [ruby-dev:44984][Bug #5753]
-
-Tue Dec 13 05:50:07 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm_insnhelper.c (vm_yield_setup_block_args): splat single
- argument if optional arguments are defined not only mandatory or
- post arguments. [ruby-core:41557] [Bug #5730]
-
-Mon Dec 12 22:35:39 2011 Shugo Maeda <shugo@ruby-lang.org>
-
- * parse.y (stmt_or_begin): changed the error message for BEGIN not
- at toplevel. [ruby-dev:44963] [Bug #5738]
-
-Mon Dec 12 17:29:01 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * README: Fixed SupportedPlatforms URL in the README.
- patched by eMxyzptlk. https://github.com/ruby/ruby/pull/62
-
-Mon Dec 12 17:26:51 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * load.c (rb_feature_p): lazy assigned load_path searched in
- loading_table were not expanded, but all features, pushed to
- loading table, are expanded. a patch by Yura Sokolov
- <funny.falcon AT gmail.com> in [ruby-core:41545]. [Bug #5727]
-
-Mon Dec 12 15:41:03 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/stringio/stringio.c (strio_truncate): fix typo. patched by
- Nick Howard <ndh AT baroquebobcat.com>.
- https://github.com/ruby/ruby/pull/65
-
-Sun Dec 11 12:19:17 2011 Shugo Maeda <shugo@ruby-lang.org>
-
- * lib/net/imap.rb: includes the sequence number of UID in a error
- message. suggested by art lussos.
- [ruby-core:41413] [Feature #5692]
-
-Sun Dec 11 11:42:10 2011 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * ext/syslog/syslog.c: fix a typo. [ruby-core:41585] [Bug #5740]
-
-Sun Dec 11 10:48:16 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * error.c (exit_initialize): deal with true and false as well as
- Kernel#exit. [ruby-dev:44951] [Bug #5728]
-
-Sun Dec 11 10:37:47 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * object.c (rb_check_to_int): new function to convert a VALUE to
- an Integer if possible, but returns nil instead of raising an
- exception otherwise.
-
-Sun Dec 11 10:34:39 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * process.c (rb_exit_status_code): extract from rb_f_exit_bang and
- rb_f_exit. assume 0 to be success in Kernel#exit! too.
-
-Fri Dec 9 19:24:31 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * enc/trans/iso-8859-16-tbl.rb: add ISO-8859-16 converter.
-
- * enc/trans/single_byte.trans: ditto.
-
-Fri Dec 9 14:28:40 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * file.c (file_path_convert): don't convert it when the path string is
- ascii only. [ruby-core:41556] [Bug #5733]
- tests are contributed by nobu.
-
-Fri Dec 9 08:00:15 2011 Luis Lavena <luislavena@gmail.com>
-
- * include/ruby/win32.h: undef stat to silence mingw-w64 stat
- redefinition warnings (GCC 4.6.3).
-
-Thu Dec 8 23:38:24 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * variable.c (set_const_visibility): clear inline-cache when constant's
- visibility is modified. [ruby-dev:44929]
-
- * test/ruby/test_module.rb (test_private_constants_clear_inlinecache):
- add test for it.
-
-Thu Dec 8 23:26:11 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * ext/extmk.rb (extract_makefile): should sort after map, not before
- it. in this case there is no difference, but we should write better
- code. this bad smell was caught by nagachika.
-
-Thu Dec 8 22:31:13 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * ext/extmk.rb (extract_makefile): need to sort the array of current
- srcs before comparing to the sorted old srcs.
- fixed the problem that the configuring stage of exts were always
- run, introduced at r33801.
-
-Thu Dec 8 13:26:24 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/rexml/test_order.rb (OrderTester#test_more_ordering): use
- Zlib::GzipReader.open instead of Zlib::GzipReader.new with File.new.
- fixed a test error on Windows introduced at r33946.
-
-Thu Dec 8 13:11:26 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/ruby/test_process.rb (TestProcess#test_sete[gu]id): silently
- skip if not implemented such functions (such as, on Windows).
- fixed test errors on Windows introduced at r33953.
-
-Thu Dec 8 12:57:50 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * ext/socket/extconf.rb: forgotten to define HAVE_SOCKETPAIR for
- windows.
- fixed test errors on Windows introduced at r33947.
-
-Thu Dec 8 12:11:06 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in (RUBY_WERROR_FLAG): append all warning flags which
- are enabled to compile, so that printf format modifiers properly
- fail. [ruby-core:41351] [Bug #5679]
-
-Thu Dec 8 07:20:15 2011 Eric Hodel <drbrain@segment7.net>
-
- * doc/re.rdoc: Document difference between match and =~, options with
- Regexp.new and global variables. Patch by Sylvain Daubert.
- [Ruby 1.9 - Bug #5709]
-
-Thu Dec 8 06:53:10 2011 Eric Hodel <drbrain@segment7.net>
-
- * doc/re.rdoc: Fix example code to match documentation. Patch by
- Jarno Lamberg. [Ruby 1.9 - Bug #5624]
-
-Wed Dec 7 19:04:22 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in (rpath): fix typo in the help string. a patch from
- Yuji Yamano <yyamano AT kt.rim.or.jp> in [ruby-list:48568].
-
-Wed Dec 7 18:55:56 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm.c (vm_set_top_stack, vm_set_eval_stack): check for stack
- overflow with stack_max before push new frame. [ruby-core:41520]
- [Bug #5720]
-
- * vm.c (vm_set_main_stack): no stack overflow chances after
- vm_set_eval_stack().
-
-Wed Dec 7 09:58:15 2011 Eric Hodel <drbrain@segment7.net>
-
- * ext/bigdecimal/bigdecimal.c: Document +@, -@, hash, INFINITY, Nan.
- Patch by Sylvain Daubert. [Ruby 1.9 - Feature #5622]
-
-Wed Dec 7 09:48:00 2011 Eric Hodel <drbrain@segment7.net>
-
- * io.c (Init_IO): Mention io/console methods. [Ruby 1.9 - Bug #5602]
- * ext/io/console/console.c: Mention that io/console must be required
- similar to lib/time.rb
-
-Wed Dec 7 08:04:31 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych.rb (module Psych): parse and load methods take
- an optional file name that is used when raising Psych::SyntaxError
- exceptions
- * ext/psych/lib/psych/syntax_error.rb (module Psych): allow nil file
- names and handle nil file names in the exception message
- * test/psych/test_exception.rb (module Psych): Tests for changes.
-
-Tue Dec 6 18:26:33 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/dbm/dbm.c: use db_version() instead of DB_VERSION_STRING to
- detect runtime Berkeley DB version.
- use dpversion instead of _QDBM_VERSION to detect runtime QDBM
- version.
- [ruby-dev:44948]
-
-Tue Dec 6 12:30:41 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/dbm/extconf.rb: detect gdbm_version in libgdbm.
-
- * ext/dbm/dbm.c: make DBM::VERSION more informative for gdbm, qdbm and
- Berkeley DB 1.x. [ruby-dev:44944]
-
-Tue Dec 6 07:26:37 2011 Eric Hodel <drbrain@segment7.net>
-
- * range.c: Improve documentation for Range. Patch by Chris Zetter.
- [Ruby 1.9 - Bug #5656]
-
-Mon Dec 5 19:08:04 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * regparse.c (PFETCH_READY): separate gcc specific trick.
-
-Mon Dec 5 19:01:59 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * process.c (proc_seteuid_m): fix argument.
-
- * test/ruby/test_process.rb (test_geteuid): fix typo.
-
- * test/ruby/test_process.rb (test_getegid, test_set[eg]uid): add.
-
-Mon Dec 5 18:56:55 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * bignum.c (big_rshift), compile.c (validate_label,
- iseq_build_from_ary_exception), cont.c (cont_capture), dir.c
- (dir_open_dir), gc.c (objspace_each_objects), io.c (pipe_open)
- (rb_io_advise), parse.y (parser_compile_string)
- (rb_parser_compile_file), proc.c (binding_free), process.c
- (rb_proc_exec_n, rb_seteuid_core, proc_setegid, rb_setegid_core)
- (p_uid_exchange, p_gid_exchange), regparse.c (strdup_with_null),
- signal.c (sig_dfl), vm.c (rb_iseq_eval, rb_iseq_eval_main),
- vm_insnhelper.c (vm_expandarray): suppress
- unused-but-set-variable warnings.
-
- * class.c (rb_obj_methods), compile.c (iseq_compile_each),
- iseq.c(iseq_load, rb_iseq_parameters), pack.c (pack_pack),
- regcomp.c (is_not_included, update_string_node_case_fold),
- transcode.c (rb_econv_open0, make_replacement),
- vm_eval.c (raise_method_missing): remove unused variable.
-
- * signal.c (reserved_signal_p): static.
-
-Mon Dec 5 14:27:23 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * include/ruby/{subst.h,win32.h}, ext/socket/rubysocket.h: revert
- r33876. [ruby-core:41475] [Bug #5706]
-
- * ext/socket/extconf.rb: the alternative hack for [Bug #5675].
-
-Mon Dec 5 10:18:45 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * ext/zlib/zlib.c (rb_gzreader_initialize): revert a part of r33937.
- 1st, to change the mode of an IO is very sensitive problem, so
- the maintainer of this library should judge it.
- 2nd, usually Zlib::GzipReader.new is not called directly. #initialize
- is called via .open, and in the method the I/O is opened in binary
- mode, so there is no problem without changing the mode in #initialize.
-
-Sun Dec 4 22:53:12 2011 Tanaka Akira <akr@fsij.org>
-
- * lib/tempfile.rb: don't use lock directory. [ruby-dev:39197]
-
-Sun Dec 4 22:34:43 2011 Tanaka Akira <akr@fsij.org>
-
- * lib/tempfile.rb (Tempfile::MAX_TRY): remove unused constant.
-
-Sun Dec 4 12:11:28 2011 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * lib/pp.rb: fix rdoc.
-
-Sun Dec 4 12:03:16 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/delegate.rb (Delegator#methods): Kernel#methods receives
- zero or one argument. [ruby-core:37118] [Bug #4882]
-
-Sun Dec 4 10:15:00 2011 Luis Lavena <luislavena@gmail.com>
-
- * ext/zlib/zlib.c (rb_gzreader_initialize): use binary mode by default
- under Windows. Patch by Hiroshi Shirosaki. [ruby-core:40706]
- [Feature #5562]
-
- * include/ruby/encoding.h (void rb_econv_binmode): define NEWLINE
- decorator.
-
- * io.c (rb_cloexec_fcntl_dupfd): Introduce NEED_READCONV and
- NEED_WRITECONV to replace universal newline decorator by CRLF only
- when required to improve file reading and writing under Windows.
- Patch by Hiroshi Shirosaki. [ruby-core:40706] [Feature #5562]
- * io.c (do_writeconv): adjust binary mode if required.
- * io.c (read_all, appendline, swallow, rb_io_getline_1): ditto.
- * io.c (io_getc, rb_io_each_codepoint, rb_io_ungetc): ditto.
- * io.c (rb_io_binmode, rb_io_ascii8bit_binmode): ditto.
- * io.c (rb_io_extract_modeenc, rb_sysopen): ditto.
- * io.c (pipe_open, prep_stdio, io_encoding_set): ditto.
- * io.c (rb_io_s_pipe, copy_stream_body): ditto.
-
- * test/ruby/test_io_m17n.rb (EOT): add test for pipe and stdin in
- binary mode.
-
- * win32/win32.c (init_stdhandle): remove O_BINARY from stdhandle
- initialization.
- * win32/win32.c (rb_w32_write): use FTEXT mode accordingly.
-
-Sat Dec 3 20:49:16 2011 Yusuke Endoh <mame@tsg.ne.jp>
-
- * variable.c (set_const_visibility): print a warning when no argument
- is passwd to Module#private_constant. [ruby-list:48558]
-
- * vm_method.c (set_method_visibility): ditto for
- Module#private_class_method.
-
-Sat Dec 3 20:43:14 2011 Yusuke Endoh <mame@tsg.ne.jp>
-
- * variable.c (set_const_visibility): Module#private_constant has
- changed the visibility of only the first argument. Now it changes
- all of them. [ruby-list:48558]
-
- * test/ruby/test_module.rb: add a test for above.
-
-Sat Dec 3 07:17:29 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * Makefile.in (CFLAGS): append ARCH_FLAG.
-
- * configure.in (ARCH_FLAG): exclude from CFLAGS.
-
- * configure.in (UNIVERSAL_INTS): include short int. fix for
- test/mkmf.
-
-Fri Dec 2 15:48:08 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/bigdecimal/bigdecimal.c (VpAllocReal): reduce extra frac.
-
-Fri Dec 2 15:41:24 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in: check whether -pie or -Wl,-pie is valid as
- LDFLAGS. [ruby-core:41438] [Bug#5697]
-
- * configure.in: use $linker_flag for LDFLAGS option which is not
- limited to particular platforms.
-
-Thu Dec 1 23:21:58 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * thread_pthread.c (thread_timer): call prctl(PR_SET_NAME) only if
- PR_SET_NAME is available.
-
-Thu Dec 1 22:31:16 2011 Tanaka Akira <akr@fsij.org>
-
- * io.c (linux_get_maxfd): change local variable name.
-
-Thu Dec 1 16:59:24 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/socket/extconf.rb: add arguments for macro calls.
- [ruby-core:41370] [Bug#5681]
-
-Thu Dec 1 16:20:16 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/mkmf.rb (MakeMakefile#try_func): fix broken patch at r33834.
-
-Thu Dec 1 14:43:17 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/bigdecimal/bigdecimal.h (Real): suppress false warning from
- clang. [ruby-core:41418] [Bug#5693]
-
-Thu Dec 1 10:31:55 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in (LDFLAGS): -fstack-protector is always needed to
- link static library created with it. [ruby-core:41387]
- [Bug#5686]
-
-Thu Dec 1 07:03:51 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * configure.in: add sys/prctl.h test.
- * thread_pthread.c (thread_timer): call prctl(PR_SET_NAME) to change
- thread name. It may help to debug.
-
-Wed Nov 30 23:35:45 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * variable.c (rb_path2class): don't raise NameError when the middle
- constant of the path is not defined but defined on toplevel.
- [ruby-core:41410] [Bug #5691]
-
-Wed Nov 30 20:02:02 2011 Martin Duerst <duerst@it.aoyama.ac.jp>
-
- * transcode.c: Simplified rb_econv_binmode, avoided a warning on cygwin.
-
-Wed Nov 30 08:57:07 2011 Eric Hodel <drbrain@segment7.net>
-
- * lib/mkmf.rb: Use MakeMakefile's rm_f to avoid conflict with Rake or
- FileUtils.
- * test/ruby/test_module.rb: Hide MakeMakefile's inclusion in Object
-
-Wed Nov 30 09:12:43 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * lib/rdoc/encoding.rb (RDoc::Encoding.read_file): fixup newline chars
- on Windows.
- see https://github.com/rdoc/rdoc/issues/87
-
- * test/rdoc/test_rdoc_markup_pre_process.rb
- (TestRDocMarkupPreProcess#test_include_file,
- TestRDocMarkupPreProcess#test_include_file_encoding_incompatible):
- follow above change.
-
-Wed Nov 30 09:09:37 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/parser.c (parse): parse method can take an option file
- name for use in exception messages.
- * test/psych/test_parser.rb: corresponding tests.
-
-Tue Nov 29 09:07:59 2011 Eric Hodel <drbrain@segment7.net>
-
- * lib/mkmf.rb: Fix indentations of constants at end of module.
- Document some constants.
-
-Tue Nov 29 09:58:23 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * io.c (rb_write_error2): suppress unused variable warning.
-
-Tue Nov 29 07:45:26 2011 Eric Hodel <drbrain@segment7.net>
-
- * lib/mkmf.rb: Wrap comments to 78 columns and clean up formatting.
-
-Tue Nov 29 05:54:18 2011 Eric Hodel <drbrain@segment7.net>
-
- * lib/mkmf.rb: Wrap mkmf.rb in module MakeMakefile to clean up Object
- documentation. [Ruby 1.9 - Feature #5658]
- * ext/extmk.rb: Use MakeMakefile::CONFIG instead of Object::CONFIG
- * test/mkmf/base.rb: ditto
-
-Tue Nov 29 00:08:57 2011 Yuki Sonoda (Yugui) <yugui@yugui.jp>
-
- * common.mk (INSTRUBY_ARGS): added --mantype to apply mdoc2man.rb
- to man pages. Fixes #5598.
- (do-install-nodoc, do-install-local, do-install-man,
- dont-install-nodoc, dont-install-local, dont-install-man):
- No longer needs --mantype.
-
- Reported by Rainer Orth <ro AT cebitec.uni-bielefeld.de>,
- patch by George Koehler <xkernigh AT netscape.net>.
-
-Mon Nov 28 22:26:31 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/rake/test_rake_directory_task.rb
- (TestRakeDirectoryTask#test_directory_win32): shouldn't create any
- file/directory on root directory. create on @tempdir (= Dir.pwd).
- see https://github.com/jimweirich/rake/issues/91
-
-Mon Nov 28 12:57:29 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * io.c (rb_write_error2): fwrite() returns ssize_t.
-
-Mon Nov 28 12:47:19 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * parse.y (nodetype, nodeline): static. these functions are for
- debugging, and not intend to be public.
-
-Mon Nov 28 12:37:54 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * gc.c (initial_params): static. it seems to be forgotten at r33501.
-
-Mon Nov 28 12:32:24 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * include/ruby/win32.h, win32/win32.c (GetCurrentThreadHandle): remove
- unused old API.
-
-Mon Nov 28 12:29:20 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/mkexports.rb (Exports#initialize): remove old symbol name.
-
-Mon Nov 28 12:15:28 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * win32/mkexports.rb (Exports#read_substitution): need to read
- from subst.h too. [Bug #5675]
-
-Mon Nov 28 11:46:35 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * io.c (rb_io_flush): release GVL during fsync() on Windows.
-
-Mon Nov 28 11:00:25 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * include/ruby/subst.h: typo of r33876.
-
-Mon Nov 28 10:36:00 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * include/ruby/subst.h: moved Windows specific substitutions from
- win32.h.
-
- * ext/socket/rubysocket.h: include ruby/subst.h. [Bug #5675]
-
-Mon Nov 28 10:20:58 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/{Makeilfe.sub,win32.c} (FILE_COUNT, FILE_READPTR): move the
- definitions from config.h to win32.c. I dared to have left such
- macros, for other future compiler support.
- [ruby-core:41313] [Bug #5674]
-
-Mon Nov 28 09:28:30 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/win32.c (rb_w32_uchmod): typo. [Bug#5671] [ruby-dev:44898]
-
- * test/ruby/test_file.rb (TestFile#test_chmod_m17n): test of above bug.
-
-Sun Nov 27 21:25:33 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * configure.in: added -fno-strict-overflow. it suppress annoying
- -Wstrict-overflow warning.
-
-Sun Nov 27 20:58:02 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * io.c (rb_write_error2): get rid of warning on linux. fwrite
- of glibc is tagged __attribute__ ((__warn_unused_result__))
- if _FORTIFY_SOURCE != 0.
- * vm_dump.c (rb_vm_bugreport): ditto.
-
-Sun Nov 27 19:09:02 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in (stack_protector): disable on mingw. [Bug#5676]
-
- * Makefile.in (DLDFLAGS): also needs -fstack-protector.
- [Bug#5676]
-
-Sun Nov 27 14:13:33 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * configure.in: add -fstack-protector into XLDFLAGS as well as
- XCFLAGS if stack-protector is used.
-
-Sun Nov 27 13:09:25 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * configure.in: workaround to avoid MacOS X build error.
- Maybe autoconf 2.61 is slightly buggy. [ruby-core:41316]
-
-Sun Nov 27 04:57:11 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * configure.in (--no-undefined): r33840 breaks FreeBSD and DragonFly
- with gcc 4.4 or later. Their environ is in /usr/libexec/ld-elf.so.1,
- so it will be false negative.
-
-Sun Nov 27 04:55:45 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/net/http.rb (Net::HTTP::SSL_IVNAMES): rerefix 33701.
- SSL_ATTRIBUTES stores names for set_params, they are symbol.
- SSL_IVNAMES stores instance variable names.
-
-Sun Nov 27 00:16:07 2011 Tanaka Akira <akr@fsij.org>
-
- * io.c (copy_stream_body): use 0666 for permission argument for open.
- [ruby-core:40865]
-
-Sat Nov 26 23:01:38 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * test/openssl/test_engine.rb: remove side effect of generic engine
- load by explicitly loading software-based "openssl" engine for
- all tests.
-
-Sat Nov 26 20:41:48 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/net/http.rb (Net::HTTP.get_response): enable use_ssl
- if given URI object is https.
- patched by Mark Ferlatte [ruby-core:40665] [Bug #5545]
-
- * lib/net/http.rb (Net::HTTP.post_form): ditto.
-
-Sat Nov 26 20:01:18 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/net/http.rb (Net::HTTP::SSL_ATTRIBUTES): refix 33701.
- store instance variable symbol names.
-
-Sat Nov 26 15:40:25 2011 URABE Shyouhei <shyouhei@ruby-lang.org>
-
- * .travis.yml (script): should be ./configure
-
-Sat Nov 26 15:39:18 2011 URABE Shyouhei <shyouhei@ruby-lang.org>
-
- * .travis.yml (before_script): wrong name, sorry.
-
-Sat Nov 26 15:31:34 2011 URABE Shyouhei <shyouhei@ruby-lang.org>
-
- * .travis.yml (before-script): autoconf required.
-
-Sat Nov 26 15:24:05 2011 URABE Shyouhei <shyouhei@ruby-lang.org>
-
- * .travis.yml: Travis enable.
-
-Sat Nov 26 10:47:50 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * ext/openssl/extconf.rb: remove checks for available functions.
- * ext/openssl/missing.h: ditto.
- Thanks, Tim Mooney for reporting this!
- [Bug #5432] [ruby-core:40088]
-
-Sat Nov 26 10:22:28 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * ext/openssl/ossl_ssl.c: add comment on where to find implementation
- of OpenSSL::SSL::SSLSocket#session.
-
-Sat Nov 26 05:00:25 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in (--no-undefined): RUBY_TRY_CFLAGS does nothing for
- linker flags. use RUBY_TRY_LDFLAGS.
-
-Fri Nov 25 11:37:07 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * io.c (ioctl_narg_len, linux_iocparm_len): reinstantiate linux
- specific narg length calculation.
- * test/ruby/test_io.rb (test_ioctl_linux2): add new test for old and
- unstructured ioctl.
-
-Fri Nov 25 10:39:14 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * Makefile.in (EXTLDFLAGS): export it.
- * configure.in: add --no-undefined if --enable-shared is specified.
- Gentoo enabled this option long time. Also, export EXTLDFALGS.
-
-Fri Nov 25 08:48:35 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * configure.in: turn on PIE if --enable-shared is not specified.
-
-Fri Nov 25 08:05:07 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * configure.in: add -fstack-protector. It help to protect us from
- stack smashing attack.
-
-Fri Nov 25 08:03:28 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * configure.in: add -D_FORTIFY_SOURCE=2. It provide some compile
- time and runtime check for security.
-
-Fri Nov 25 08:00:23 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * lib/mkmf.rb: get rid of warnings of mkmf.rb if -Wmissing-declarations
- and/or -Wold-style-definition warnings if specified.
- Patch by Nikolai Weibull. Thank you! [Bug #5459] [ruby-core:40200]
-
-Fri Nov 25 07:46:09 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * configure.in: add -Wall always.
-
-Thu Nov 24 20:02:40 2011 Tanaka Akira <akr@fsij.org>
-
- * test/openssl/test_engine.rb: use IO#reopen to restore stderr.
-
-Thu Nov 24 19:59:56 2011 Tanaka Akira <akr@fsij.org>
-
- * io.c (rb_io_reopen): re-initialize buffering mode for stdout and
- stderr.
-
-Thu Nov 24 11:12:48 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * io.c (rb_io_fsync,rb_io_fdatasync): release GVL during fsync().
- fsync() and fdatasync() may take a long time on slow disks and/or
- if there is much dirty data.
- Patch by Eric Wong. [Feature #5665] [ruby-core:41247]
-
-Thu Nov 24 10:05:02 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * test/openssl/test_engine.rb: Suppress output from 'openssl'
- engine's RC4 cipher.
- [Bug #5633] [ruby-core:41026]
-
-Thu Nov 24 08:05:02 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * ext/openssl/ossl_pkey_dsa.c: remove redundant colon from error
- message.
- * ext/openssl/ossl_ssl.c: ditto.
- * ext/openssl/ossl_pkey_rsa: ditto.
- patched by Eric Hodel [Bug #5604] [ruby-core:40896]
-
-Wed Nov 23 20:03:43 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * io.c (ioctl_narg_len): don't use _IOC_SIZE macro on Linux.
- On Linux some constants for ioctl(2) doesn't include the size of
- its return value and 16bit value; for example FIONREAD 0x541B.
- Moreover the manual, ioctl_list(2), says "Note that the size
- bits are very unreliable: in lots of cases they are wrong,
- either because of buggy macros using sizeof(sizeof(struct)),
- or because of legacy values."
- So we shouldn't use it.
-
-Tue Nov 22 18:07:32 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/win32.c (_pioinfo): need to declare _pioinfo() before using
- _osfhnd and other macros which uses _pioinfo() internally.
-
-Tue Nov 22 17:49:45 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * win32/win32.c (_pioinfo): make an inline function.
-
-Tue Nov 22 11:26:08 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
-Tue Nov 22 11:33:58 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * win32/win32.c (dupfd): argument of _osfhnd and so on should not
- have side effect.
-
-Tue Nov 22 11:26:08 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * bignum.c (rb_big_divide): refix of r33536. Don't change behavior of Bignum#/.
- [ruby-core:40429] [Bug #5490]
-
-Tue Nov 22 10:46:57 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * numeric.c (ruby_float_step): improve floating point calculations.
- [ruby-core:35753] [Bug #4576]
-
- * numeric.c (ruby_float_step): correct the error of floating point
- numbers on the excluding case.
- patched by Masahiro Tanaka [ruby-core:39608]
-
- * numeric.c (ruby_float_step): use the end value when the current
- value is greater than or equal to the end value.
- patched by Akira Tanaka [ruby-core:39612]
-
-Tue Nov 22 06:59:21 2011 Tanaka Akira <akr@fsij.org>
-
- * test/ruby/test_io.rb (test_fcntl_dupfd): there is no known platform
- which don't have F_DUPFD. [ruby-dev:44874]
-
-Tue Nov 22 04:46:22 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych.rb: remove autoload from psych
- * ext/psych/lib/psych/json.rb: ditto
-
-Tue Nov 22 00:44:59 2011 Tanaka Akira <akr@fsij.org>
-
- * test/ruby/test_io.rb (test_fcntl_dupfd): the argument of F_DUPFD is
- minimum file descriptor.
-
-Tue Nov 22 00:25:17 2011 Tanaka Akira <akr@fsij.org>
-
- * io.c (linux_get_maxfd): get rid of a warning.
-
-Mon Nov 21 23:39:14 2011 Tanaka Akira <akr@fsij.org>
-
- * io.c (linux_get_maxfd): new function to find maximum fd on Linux.
- (rb_close_before_exec): use linux_get_maxfd.
-
-Mon Nov 21 06:16:24 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * cont.c (fiber_switch): ignore fiber context switch
- because destination fiber is same as current fiber.
- With out this, it may segv on FreeBSD 9.
- patched by Koichi Sasada.
-
-Sun Nov 20 23:22:42 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/extmk.rb (extract_makefile, extmake): regenerate makefiles
- if globbed source file list is changed.
-
- * lib/mkmf.rb (create_makefile): store ORIG_SRCS.
-
-Sun Nov 20 22:43:03 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * enc/unicode.c (PROPERTY_NAME_MAX_SIZE): +1.
- reported by Ken Takata. [ruby-dev:44894][Bug #5652]
-
-Sun Nov 20 11:01:28 2011 Tanaka Akira <akr@fsij.org>
-
- * lib/set.rb (SortedSet.setup): remove old_init after initialize
- method is redefined. The remove before redefinition makes the
- warning prevention fragile. [ruby-dev:44892]
-
-Sun Nov 20 04:01:45 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * Makefile.in (enc/unicode/name2ctype.h): remove duplicated
- ifdefs.
-
-Sat Nov 19 19:31:47 2011 Tanaka Akira <akr@fsij.org>
-
- * time.c (TIME_COPY_GMT): copy vtm.utc_offset and vtm.zone too.
- patch by Tomoyuki Chikanaga.
- [ruby-dev:44827] [Bug #5586]
-
-Sat Nov 19 16:36:57 2011 Tanaka Akira <akr@fsij.org>
-
- * test/net/http/test_http.rb: remove temporally files in ensure clause.
-
-Sat Nov 19 08:18:41 2011 Tanaka Akira <akr@fsij.org>
-
- * test/net/http/test_http.rb: remove temporally files.
-
-Fri Nov 18 17:18:16 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/io/console/console.c (console_raw, console_set_raw)
- (console_getch): optional parameters. [EXPERIMENTAL]
-
-Fri Nov 18 16:12:11 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/io/console/console.c (console_cooked, console_set_cooked):
- new methods to reset cooked mode. [EXPERIMENTAL]
-
-Fri Nov 18 13:20:26 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/unit/assertions.rb (MINI_DIR): quick dirty hack to get rid of
- warnings when using assert/assert_respond_to.
-
-Fri Nov 18 13:03:38 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * io.c (rb_cloexec_open): set O_NOINHERIT instead of O_CLOEXEC if it is
- available (for Windows).
-
- * win32/win32.c (fcntl): on F_DUPFD, determine the inheritance of the
- new handle by O_NOINHERIT flag of original fd.
-
-Fri Nov 18 08:00:41 2011 Ryan Davis <ryand-ruby@zenspider.com>
-
- * lib/minitest/*: Imported minitest 2.8.1 (r6750)
- * test/minitest/*: ditto
- * configure.in: Improved gcc-llvm error message to help people migrate.
-
-Thu Nov 17 20:43:34 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/dbm/extconf.rb: revert a part of the patch in [ruby-dev:41531].
- don't use db.h with other headers. [ruby-dev:44884].
-
-Thu Nov 17 20:23:03 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * benchmark/bm_io_select[23].rb: use Process::RLIMIT_NOFILE only when
- it is defined. if it is not defined, assume 64 as the max of fds.
-
-Thu Nov 17 10:36:46 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych.rb (load_file): make sure opened yaml files are
- also closed. [ruby-core:41088]
-
-Wed Nov 16 18:13:52 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * Makefile.in (LIBRUBY_A): check if generated linked library is
- valid for extconf.
-
-Wed Nov 16 13:51:40 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * bignum.c (rb_big2ulong): need to calc in unsigned long, because
- the range of VALUE is larger than it on LLP64 platform, such as Win64.
- this change fixes the failures of test/-ext-/num2int.
-
-Wed Nov 16 12:02:47 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/webrick/test_cgi.rb (TestWEBrickCGI#start_cgi_server): there are
- no guarantee of existence of RbConfig::CONFIG['LIBPATHENV'].
- it only exists in Unix-like environments.
-
- * test/webrick/test_filehandler.rb
- (WEBrick::TestFileHandler#test_script_disclosure): ditto.
-
-Wed Nov 16 11:34:20 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * io.c (argf_next_argv): wrong timing of setting ecflags.
- fixed the failure of TestArgf#test_textmode introduced at r33662.
-
-Wed Nov 16 10:45:00 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * ext/-test-/num2int/num2int.c: remove an unnecessary and wrong decl
- of rb_stdout. it's declared in ruby.h correctly.
-
-Wed Nov 16 10:26:41 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * bignum.c (rb_big2ull): add a cast to get rid of a VC++ warning.
-
-Wed Nov 16 09:39:27 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/minitest/unit.rb (assert_raises): experimental fix to run
- correctly on chkbuild over 64bit linux. call exception_details only
- when the detail is really needed to avoid create needless inspect
- under ulimit-ed environment.
-
-Wed Nov 16 06:34:30 2011 Tanaka Akira <akr@fsij.org>
-
- * test/ruby/test_thread.rb (test_condvar_timed_wait): use
- assert_operator.
-
-Tue Nov 15 21:56:25 2011 Tanaka Akira <akr@fsij.org>
-
- * test/ruby/test_sleep.rb (test_sleep_5sec): 0.1sec tolerance is too
- small for busy environment.
-
-Tue Nov 15 20:08:55 2011 Tanaka Akira <akr@fsij.org>
-
- * io.c, thread.c, ext/pty/pty.c, ext/fiddle/closure.c: use
- __linux__ macro for consistency.
-
-Tue Nov 15 14:45:15 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * include/ruby/ruby.h(NUM2LONG, NUM2INT, NUM2SHORT, NUM2LL,
- INT2NUM, UINT2NUM, LONG2NUM, ULONG2NUM, NUM2CHR): wrap by
- macros.
-
-Tue Nov 15 13:38:14 2011 Naohisa Goto <ngotogenome@gmail.com>
-
- * include/ruby/defines.h (FLUSH_REGISTER_WINDOWS): move sparc asm code
- to a separate file sparc.c for preventing inlining optimization.
- Patched by Jurij Smakov. [Bug #5244] [ruby-core:40685]
- * sparc.c (rb_sparc_flush_register_windows): ditto.
- * configure.in: ditto.
-
-Tue Nov 15 13:11:35 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * include/ruby/ruby.h: get rid of gcc specific rb_long2int(),
- NUM2LONG(), NUM2INT(), NUM2SHORT(), NUM2LL(), INT2NUM(),
- UINT2NUM(), LONG2NUM(), ULONG2NUM() and NUM2CHR()
- implementation. Because 1) They don't make any better code
- at all. 2) Inline function have a better debugger supoort.
-
-Tue Nov 15 09:58:25 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * test/ruby/test_io.rb (TestIO#test_fcntl_dupfd): fix OpenBSD test
- failure. [ruby-dev:44872]
-
-Tue Nov 15 09:50:21 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * regcomp.c (print_indent_tree): fix double printing of ENCLOSE_OPTION
- children bug. patched by Suraj Kurapati. [ruby-core:40964]
-
-Tue Nov 15 01:53:48 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * test/ruby/test_io.rb (test_fcntl_dupfd): fix test error on
- SnowLeopard. Pointed out by CHIKANAGA Tomoyuki. [ruby-dev:44866]
-
-Mon Nov 14 22:06:02 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/openssl/ossl_pkey.c (ossl_pkey_new_from_file): set close-on-exec
- flag.
-
- * ext/openssl/ossl_x509cert.c (rb_fd_fix_cloexec): ditto.
-
-Mon Nov 14 14:54:17 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * bignum.c (rb_big2ull): fix 32bit platform breakage. we must
- not assume sizeof(VALUE) == sizeof(LONG_LONG).
- * test/-ext-/num2int/test_num2int.rb (class TestNum2int):
- fix false assumption on 32bit platform.
-
-Mon Nov 14 14:52:54 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * numeric.c (rb_fix2ushort): fix typo. use num rb_num2ushort()
- instead of num2uint().
-
-Sun Nov 13 10:31:03 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * include/ruby/ruby.h: add #ifdef comment.
-
-Sun Nov 13 10:28:18 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * include/ruby/ruby.h: add NUM2SHORT(), NUM2USHORT() macros.
- * numeric.c: ditto.
-
- * test/-ext-/num2int/test_num2int.rb: add testcases for NUM2SHORT().
- * ext/-test-/num2int/num2int.c: ditto.
-
-Sun Nov 13 10:23:48 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * bignum.c (rb_big2ull): fix off-by-twice bug of NUM2ULL.
- * test/-ext-/num2int/test_num2int.rb (class TestNum2int):
- fix a testcase too.
-
-Sun Nov 13 10:22:44 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * test/-ext-/num2int/test_num2int.rb (class TestNum2int):
- add FIXNUM tests.
-
-Sun Nov 13 09:57:29 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * numeric.c (check_uint): fix off-by-one bug of NUM2UINT.
- * bignum.c (rb_big2ulong): fix off-by-one bug of NUM2ULONG.
-
- * test/-ext-/num2int/test_num2int.rb: add a testcase for NUM2INT()
- NUM2UINT(), NUM2LONG(), NUM2ULONG(), NUM2LL and NUM2ULL().
- * ext/-test-/num2int/depend: ditto.
- * ext/-test-/num2int/extconf.rb: ditto.
- * ext/-test-/num2int/num2int.c: ditto.
-
-Sun Nov 13 23:47:29 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/dbm/extconf.rb: use convertible_int.
-
-Sun Nov 13 23:45:57 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/mkmf.rb (checking_for): should not modify the result.
-
- * lib/mkmf.rb (have_struct_member): accept compiler options.
-
- * lib/mkmf.rb (convertible_int): add restricted support of struct
- member, and TYPEOF_ macro.
-
-Sun Nov 13 23:21:24 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/gdbm/gdbm.c (fgdbm_reorganize): set close-on-exec flag after
- gdbm_reorganize(). gdbm_reorganize() opens a new database internally.
-
-Sun Nov 13 19:57:18 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/dbm/extconf.rb: rollback for each headers for each libraries.
-
-Sun Nov 13 16:24:48 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/dbm/extconf.rb: treat libc as a choice for a library which
- provide ndbm API.
-
-Sun Nov 13 15:40:43 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/dbm/extconf.rb: duplicate $libs and $defs when save them.
-
-Sun Nov 13 12:43:48 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/dbm/extconf.rb: rollback $libs and $defs when db detection is
- failed. It fixes -lgdbm -lqdbm when the system has qdbm and gdbm
- without gdbm_compat.
-
-Sat Nov 12 21:14:51 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * test/webrick/test_cgi.rb (class TestWEBrickCGI): respect
- RbConfig::CONFIG["LIBPATHENV"]. [Bug #5135] [ruby-core:38653]
- * test/webrick/test_filehandler.rb (class WEBrick): ditto.
-
-Sat Nov 12 20:57:29 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * test/ruby/test_io.rb (test_fcntl_dupfd): skip if Fcntl::DUPFD
- is not defined. Pointed out by CHIKANAGA Tomoyuki. Thanks.
-
-Sat Nov 12 17:26:10 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * io.c (do_ioctl, ioctl_narg_len, setup_narg, rb_ioctl): use
- ioctl_req_t.
-
-Sat Nov 12 17:01:49 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/dbm/extconf.rb (headers.db_check): reduce duplicated code.
-
-Sat Nov 12 15:59:42 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/dbm/extconf.rb: dbm_clearerr should be available in all ndbm
- implementation. If it is not available, it is caused by
- header/library mismatch such that Berkeley DB header & gdbm library.
-
- * ext/dbm/dbm.c (fdbm_store): use dbm_clearerr() unconditionally.
- gdbm 1.9 provides it as a real function instead of a empty macro.
-
-Sat Nov 12 13:35:33 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * bootstraptest/runner.rb: don't suppress SIGINT.
- [Feature #5612] [ruby-dev:44856]
-
-Sat Nov 12 11:20:36 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * io.c (fcntl_narg_len): introduce narg calculation for fcntl instead
- of hard coded 256.
- * io.c (setup_narg): ditto.
-
-Sat Nov 12 11:19:35 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * test/ruby/test_io.rb (test_fcntl_dupfd): add another fcntl test.
-
-Sat Nov 12 11:18:17 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * test/ruby/test_io.rb (test_fcntl_lock_freebsd): add a testcase
- of fcntl lock for freebsd.
-
-Sat Nov 12 11:16:32 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * io.c (ioctl_narg_len): Linux doesn't have IOCPARM_LEN macro, but
- has _IOC_SIZE. support it.
-
-Sat Nov 12 11:13:18 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * io.c (rb_ioctl): don't expose our sanity check value to ruby script.
- It may change string value meaning if the value is string.
- (e.g. MacOS X has F_GETPATH ioctl)
- * io.c (rb_fcntl): ditto.
-
-Sat Nov 12 11:06:02 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * io.c (ioctl_req_t): Type of req argument of ioctl() depend on platform.
- Moreover almost all linux ioctl can't be represented by 32bit integer
- (i.e. MSB is 1). We need wrap ioctl argument type.
- [Bug #5429] [ruby-dev:44589]
- * io.c (struct ioctl_arg): ditto.
- * io.c (rb_ioctl): ditto.
- * test/ruby/test_io.rb (test_ioctl_linux): add a testcase for ioctl
-
-Sat Nov 12 11:00:42 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * io.c (struct io_cntl_arg): remove io_p member.
- * io.c (nogvl_fcntl, do_fcntl, rb_fcntl): separated from ioctl functions.
- * io.c (nogvl_io_cntl): remove fcntl depended logic.
- * io.c (io_cntl): ditto.
- * io.c (rb_io_ctl): ditto.
- * io.c (rb_io_ioctl): ditto.
-
-Sat Nov 12 10:59:49 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * io.c (setup_narg): fix off by one bug.
-
-Sat Nov 12 10:56:43 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * io.c (+setup_narg): factor out length calculation logic.
- * io.c (rb_io_ctl): ditto.
-
-Sat Nov 12 10:52:17 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * io.c (+ioctl_narg_len) new helper function.
- * io.c (rb_io_ctl): don't use ioctl specific length check
- if caller is fcntl.
-
-Fri Nov 11 23:00:46 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/dbm/extconf.rb: db_prefix is not required now.
-
-Fri Nov 11 21:13:30 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/gdbm/gdbm.c (fgdbm_initialize): use GDBM_CLOEXEC if available.
-
-Fri Nov 11 21:00:05 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/dbm/extconf.rb: fix dbm_pagfno and dbm_dirfno detection with
- Berkeley DB. Macro definitions needs arguments to detect correctly.
- SIZEOF_DSIZE needs -DDB_DBM_HSEARCH because db.h defines datum type
- only if DB_DBM_HSEARCH is defined.
-
-Fri Nov 11 18:41:57 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * process.c (proc_seteuid): separate an internal wrapper function
- from the method implementation.
-
-Fri Nov 11 17:21:15 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/mkmf.rb (have_library, find_library, have_func): allow
- arguments of function to be checked.
-
-Fri Nov 11 17:09:45 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm_dump.c (HAVE_BACKTRACE): fallback to 0.
-
- * vm_dump.c (rb_vm_bugreport): show "Other runtime information"
- header only when available.
-
- * vm_dump.c (rb_vm_bugreport): get rid of modifying the content of
- VM directly.
-
- * vm_dump.c (rb_vm_bugreport): check if vm is non-null.
- Pointed out by Ikegami Daisuke <ikegami.da@gmail.com>.
- Thank you.
-
-Fri Nov 11 12:36:37 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * io.c (pipe_open): Remove fflush(stdin). it's no effect.
- Pointed out by Ikegami Daisuke <ikegami.da@gmail.com>.
- Thank you.
-
-Fri Nov 11 07:33:30 2011 Eric Hodel <drbrain@segment7.net>
-
- * lib/net/http.rb (Net::HTTP::SSL_ATTRIBUTES): Use symbol keys instead
- of string keys to avoid duplicating parameters in
- OpenSSL::SSL:SSLContext#set_params.
-
-Thu Nov 10 15:02:37 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/mkmf.rb (have_library, have_func, have_var, have_header):
- add compiler option parameter.
-
-Thu Nov 10 07:45:16 2011 Eric Hodel <drbrain@segment7.net>
-
- * ext/openssl/lib/openssl/ssl.rb (class OpenSSL::SSL::SSLContext):
- Document #set_params.
-
-Wed Nov 9 11:36:53 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread_pthread.c (gvl_yield): don't prevent concurrent sched_yield().
- [Bug #5130] [ruby-core:38647]
-
-Wed Nov 9 23:20:22 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * io.c (rb_update_max_fd): fstat(2) can fail with other than
- EBADF. [ruby-dev:44837] [Bug #5593]. Cf.
- http://pubs.opengroup.org/onlinepubs/9699919799/functions/fstat.html
-
- * io.c (rb_sysopen): max fd is updated in rb_sysopen_internal()
- already.
-
-Wed Nov 9 22:13:38 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/ruby/test_file.rb (TestFile#test_utime_with_minus_time_segv):
- fixed previous commit.
-
-Wed Nov 9 19:53:45 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/ruby/test_file.rb (TestFile#test_utime_with_minus_time_segv):
- add test for r33685.
-
-Wed Nov 9 19:00:44 2011 Koichi Sasada <ko1@atdot.net>
-
- * test/ruby/test_fiber.rb: add tests for r33684 (Fiber#resume).
-
-Wed Nov 9 16:40:49 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/win32.c (unixtime_to_filetime): should check the return value
- of localtime(). reported by snowjail at gmail.com.
- [ruby-dev:44838] [Bug #5596]
-
-Thu Nov 9 13:17:25 2011 Koichi Sasada <ko1@atdot.net>
-
- * cont.c (rb_fiber_m_transfer, rb_fiber_resume): prohibit using
- "resume" after "transfer" method are used. You should not mix
- "resume" fiber and "transfer" fiber.
- [Bug #5526]
-
- * NEWS: add information about this change.
-
-Wed Nov 9 11:40:37 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * template/Doxyfile.tmpl (INCLUDE_PATH): add srcdir and include.
- [ruby-core:40843] [Bug #5597]
-
-Wed Nov 9 11:02:54 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * thread.c (do_select): fix cast, tv_sec is time_t.
-
-Wed Nov 9 10:32:20 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in: should not use test -e for portability.
- [ruby-core:40841] [Bug #5594]
-
-Wed Nov 9 04:52:16 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/tree_builder.rb: dump complex numbers,
- rationals, etc with reference ids.
- * ext/psych/lib/psych/visitors/yaml_tree.rb: ditto
- * ext/psych/lib/psych/visitors/to_ruby.rb: loading complex numbers,
- rationals, etc with reference ids.
- * test/psych/test_object_references.rb: corresponding tests
-
-Tue Nov 8 23:34:37 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/dbm/dbm.c (fdbm_fetch, fdbm_key, fdbm_delete, fdbm_store)
- (fdbm_has_key, fdbm_has_value): get rid of overflow.
-
- * ext/gdbm/gdbm.c (rb_gdbm_fetch2, rb_gdbm_nextkey)
- (rb_gdbm_delete, fgdbm_store, fgdbm_has_key): ditto.
-
- * ext/dbm/dbm.c (fdbm_delete_if): hide intermediate objects.
-
- * ext/gdbm/gdbm.c (fgdbm_delete_if): ditto.
-
- * ext/dbm/extconf.rb: check size of datum.dsize to get rid of
- overflow.
-
-Tue Nov 8 23:30:21 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * addr2line.c (PATH_MAX): define if not defined. [ruby-core:40840]
-
-Tue Nov 8 23:26:49 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/tk/tcltklib.c (rb_thread_critical): fix type.
-
- * ext/tk/tcltklib.c (eventloop_sleep, lib_eventloop_core): int is
- enough for micro seconds. may need to check overflow in the
- setter though.
-
- * ext/tk/tcltklib.c (RSTRING_LENINT): check overflow if necessary.
-
- * ext/tk/tcltklib.c (RbTk_ALLOC_N): wrapper for ckalloc() which
- takes an int.
-
- * ext/tk/tcltklib.c (ip_ruby_cmd_receiver_get, tcltklib_compile_info):
- get rid overflow.
-
- * ext/tk/tcltklib.c (tcltklib_compile_info): constified.
-
-Tue Nov 8 20:50:45 2011 Tanaka Akira <akr@fsij.org>
-
- * test/dbm/test_dbm.rb: split tests for read only database.
-
- * test/gdbm/test_gdbm.rb: ditto.
-
-Tue Nov 8 18:59:07 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/pty/pty.c (MasterDevice): define only when used.
- (SlaveDevice): ditto.
- (deviceNo): ditto.
-
-Tue Nov 8 17:59:24 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * include/ruby/ruby.h (rb_long2int): define as a macro always, so
- that cpp conditionals can tell if it is provided.
-
-Tue Nov 8 17:30:50 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/mkmf.rb (cpp_command): remove multiple -arch flags since cpp
- cannot work.
-
-Tue Nov 8 14:50:55 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * io.c (io_fwrite): call rb_w32_write_console() only if FMODE_TTY is
- set. this is the one of the reason of IO writing slowness of Windows
- in 1.9.3 or later.
-
-Tue Nov 8 11:01:04 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * ext/pty/pty.c (get_device_once): FreeBSD 8 supported O_CLOEXEC flag
- for posix_openpt, but FreeBSD 9's posix_openpt doesn't support
- O_CLOEXEC and fails if specified.
-
-Tue Nov 8 02:36:45 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * include/ruby/encoding.h (ECONV_NEWLINE_DECORATOR_READ_MASK,
- ECONV_NEWLINE_DECORATOR_WRITE_MASK): new macro.
-
- * io.c (rb_io_extract_modeenc, pipe_open, prep_stdio, argf_next_argv):
- set TEXTMODE_NEWLINE_DECORATOR_ON_WRITE for textmode on creating IO
- if the flag is available.
-
- * io.c (make_writeconv): drop decorators for reading.
-
- * io.c (make_readconv): drop decorators for writing.
-
- * io.c (do_writeconv): existing writeconv is not the condition to raise
- ArgumentError. should check textmode or not.
-
- * test/ruby/test_io_m17n.rb
- (TestIO_M17N#test_{cr,lf,crlf}_decorator_on_stdout): test above
- changes.
-
-Mon Nov 7 22:03:47 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/gdbm/gdbm.c (fgdbm_initialize): set close-on-exec flag.
-
-Mon Nov 7 20:31:52 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/scalar_scanner.rb: make sure strings that look
- like base 60 numbers are serialized as quoted strings.
- * test/psych/test_string.rb: test for change.
-
-Mon Nov 7 20:26:37 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * test/psych/test_yamlstore.rb: make test case inherit from MiniTest,
- load psych/helper so that psych is loaded.
-
-Mon Nov 7 20:18:29 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * test/psych/test_yamldbm.rb: Test case should inherit from MiniTest,
- load psych/helper so that psych and friends are loaded.
-
-Mon Nov 7 20:15:44 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/dbm/extconf.rb: check dbm_pagfno() and dbm_dirfno().
-
- * ext/dbm/dbm.c: use above to set close-on-exec flag.
-
-Mon Nov 7 20:05:16 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * io.c (io_fflush): remove fsync().
-
- * io.c (rb_io_flush, rb_io_rewind): fsync() here.
-
- these changes reduces fsync() calls to improve performance.
- first reported at [ruby-list:48515] by ak7 at mail.goo.ne.jp .
- [Bug #5585]
-
-Mon Nov 7 19:43:10 2011 Tanaka Akira <akr@fsij.org>
-
- * io.c (rb_close_before_exec): use F_MAXFD if available.
- F_MAXFD is available on NetBSD since NetBSD 2.0.
-
-Mon Nov 7 19:25:16 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/ruby/test_io_m17n.rb
- (TestIO_M17N#test_default_stdout_stderr_mode): new test for
- r33627-33629. see [backport #5565]
-
-Mon Nov 7 01:14:22 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * lib/debug.rb: add help for 'pp' and 'r[estart]'. patch
- from Sho Hashimoto. [Bug #5093] [ruby-dev:44222]
-
-Sun Nov 6 14:49:58 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/socket/rubysocket.h (rsock_recvmsg): declared.
-
- * ext/socket/ancdata.c (rsock_recvmsg): extracted from
- nogvl_recvmsg_func.
- (nogvl_recvmsg_func): use rsock_recvmsg.
-
- * ext/socket/unixsocket.c (recvmsg_blocking): use rsock_recvmsg.
-
-Sun Nov 6 03:22:36 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * test/openssl/test_engine.rb: add test for engine cipher. RC4 is used
- because AES is not supported by the "openssl" engine currently.
-
-Sun Nov 6 00:11:52 2011 Tanaka Akira <akr@fsij.org>
-
- * lib/test/unit.rb (Test::Unit::Options#non_options): options[:ruby]
- should be an array. This fixes
- "./ruby test/runner.rb test/testunit/test_parallel.rb"
- [ruby-dev:44782]
-
-Sat Nov 5 20:30:30 2011 Martin Duerst <duerst@it.aoyama.ac.jp>
-
- * insns.def: Some fixes and tweaks to English explanations
-
-Sat Nov 5 19:11:50 2011 Tanaka Akira <akr@fsij.org>
-
- * io.c (rb_cloexec_fcntl_dupfd): don't clear try_dupfd_cloexec if
- fcntl(F_DUPFD) failed as fcntl(F_DUPFD_CLOEXEC).
-
-Sat Nov 5 18:05:12 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/socket/socket.c (rsock_socketpair0): refactored.
-
-Sat Nov 5 17:55:52 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/socket/init.c (rsock_socket0): don't clear try_sock_cloexec if
- SOCK_CLOEXEC is not a reason for EINVAL.
-
-Sat Nov 5 16:27:52 2011 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * ext/pathname/lib/pathname.rb, ext/tk/lib/multi-tk.rb,
- ext/tk/sample/demos-en/widget, lib/benchmark.rb, lib/irb/cmd/fork.rb,
- lib/mkmf.rb, lib/net/ftp.rb, lib/net/smtp.rb, lib/open3.rb,
- lib/pstore.rb, lib/rexml/element.rb, lib/rexml/light/node.rb,
- lib/rinda/tuplespace.rb, lib/rss/maker/base.rb,
- lib/rss/maker/entry.rb, lib/scanf.rb, lib/set.rb, lib/shell.rb,
- lib/shell/command-processor.rb, lib/shell/process-controller.rb,
- lib/shell/system-command.rb, lib/uri/common.rb: remove unused block
- arguments to avoid creating Proc objects.
-
-Sat Nov 5 15:45:04 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/socket/init.c (rsock_socket0): extract single socket() call with
- CLOEXEC handling from rsock_socket.
-
-Sat Nov 5 13:49:40 2011 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * lib/pathname.rb (Pathname#find): return an enumerator if
- no block is given.
-
- * test/pathname/test_pathname.rb: add tests for above.
-
- [ruby-dev:44797] [Feature #5572]
-
-Sat Nov 5 11:18:12 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/socket/socket.c (rsock_socketpair0): don't clear
- try_sock_cloexec if SOCK_CLOEXEC is not a reason for EINVAL.
-
-Fri Nov 4 14:08:19 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
-
- * ext/openssl/ossl_pkey_rsa.c (rsa_generate): [SECURITY] Set RSA
- exponent value correctly. Awful bug. This bug caused exponent of
- generated key to be always '1'. By default, and regardless of e
- given as a parameter.
-
- !!! Keys generated by this code (trunk after 2011-09-01) must be
- re-generated !!! (ruby_1_9_3 is safe)
-
- * test/openssl/test_pkey_rsa.rb: Add tests for default exponent and
- specifying exponent by a parameter.
-
-Fri Nov 4 01:31:25 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * test/openssl/test_engine.rb: add first tests for builtin "openssl"
- engine.
-
-Fri Nov 4 08:41:26 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * ext/openssl/extconf.rb:
- * ext/openssl/ossl_engine.c: add some missing OpenSSL engines.
- Thanks, Yui Naruse, for providing the patch!
- [Bug #5548] [ruby-core:40670]
-
-Fri Nov 4 04:54:10 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/configure.bat: disable delayed expansion of enironment variable.
- [Bug #5517] [ruby-core:40531]
-
-Fri Nov 4 03:45:22 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * io.c (make_writeconv): fixed typo of previous commit.
-
-Fri Nov 4 01:56:30 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * io.c (make_writeconv): unversal_newline converter is for reading.
- so, if the io is text mode and has ECONV_UNIVERSAL_NEWLINE_DECORATOR
- flag, use crlf_newline converter for writing.
- this change fixes the problem about the luck of CR up Kernel.p and
- Kernel.puts to stdout/stderr on Windows.
-
-Fri Nov 4 01:04:48 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * ext/readline/readline.c (Init_readline): like r18313, libedit's
- replace_history_entry may use offset instead of which.
- so introduce history_replace_offset_func and initialize it.
-
- * ext/readline/readline.c (hist_set): use history_replace_offset_func.
-
-Fri Nov 4 00:53:35 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * ext/readline/readline.c (Init_readline): fix wrong condition.
-
-Thu Nov 3 23:53:04 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * encoding.c (rb_locale_charmap): ignore calling nl_langinfo_codeset()
- on Windows except cygwin. [experimental]
-
-Thu Nov 3 22:45:09 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/socket/socket.c (rsock_socketpair0): extracted from
- rsock_socketpair to set close-on-exec flag for each socketpair()
- call.
-
-Thu Nov 3 22:12:41 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * ext/socket/init.c (rsock_socket): set close-on-exec flag when
- SOCK_CLOEXEC is not available.
-
-Thu Nov 3 08:36:00 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * test/openssl/test_engine.rb: call Engine::cleanup on exit.
- Patch provided by Yui Naruse, thanks!
- [Bug #5547] [ruby-core:40669]
-
-Wed Nov 2 21:36:00 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * complex.c (nucomp_rationalize): fix function. [ruby-core:40667]
- [Bug #5546]
-
-Wed Nov 2 08:16:45 2011 Tanaka Akira <akr@fsij.org>
-
- * lib/webrick/utils.rb: fix fcntl call.
-
- * lib/drb/unix.rb: ditto.
-
-Wed Nov 2 00:43:59 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * test/psych/test_yamldbm.rb: avoid platform dependency.
- patch by Naohisa Goto. [ruby-dev:44763] [Bug #5535]
- * test/syck/test_yamldbm.rb: ditto.
-
-Wed Nov 2 00:14:15 2011 Shugo Maeda <shugo@ruby-lang.org>
-
- * test/ruby/test_marshal.rb: renamed methods duplicated with those
- of marshaltestlib.rb.
-
-Tue Nov 1 22:08:27 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in: reject llvm-gcc.
-
-Tue Nov 1 21:39:00 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * io.c (rb_cloexec_pipe): remove workaround of r33587.
- The bug of NetBSD is fixed on Mon Oct 31 21:31:29 UTC 2011.
- http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=45545
-
-Tue Nov 1 19:49:08 2011 Tanaka Akira <akr@fsij.org>
-
- * io.c (rb_io_reopen): call rb_fd_fix_cloexec instead of
- rb_maygvl_fd_fix_cloexec.
-
-Tue Nov 1 19:00:30 2011 Tanaka Akira <akr@fsij.org>
-
- * io.c (rb_io_reopen): call rb_maygvl_fd_fix_cloexec after freopen().
-
-Tue Nov 1 17:17:26 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * file.c (file_expand_path): reset coderange after expanding path.
-
-Tue Nov 1 14:55:29 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * io.c (nogvl_io_cntl): rb_cloexec_fcntl_dupfd's 2nd argument is int.
-
- * process.c (move_fds_to_avoid_crash): ditto.
-
-Tue Nov 1 13:14:33 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * vsnprintf.c (BSD_vfprintf): support 'll' prefix.
-
- * vsnprintf.c (__sfeof): rename to avoid the collision with NetBSD's
- one.
-
- * vsnprintf.c (__sferror): ditto.
-
- * vsnprintf.c (__sclearerr): ditto.
-
- * vsnprintf.c (__sfileno): ditto.
-
-Tue Nov 1 12:36:16 2011 Tanaka Akira <akr@fsij.org>
-
- * internal.h (rb_maygvl_fd_fix_cloexec): change the visibility for
- ext/socket.
-
-Tue Nov 1 12:00:53 2011 Tanaka Akira <akr@fsij.org>
-
- * io.c (rb_maygvl_fd_fix_cloexec): renamed from fd_set_cloexec.
-
- * internal.h (rb_maygvl_fd_fix_cloexec): declared.
-
- * ext/socket/init.c (cloexec_accept): use rb_maygvl_fd_fix_cloexec.
- (rsock_s_accept_nonblock): use rb_update_max_fd.
- (rsock_s_accept): use rb_update_max_fd.
-
-Tue Nov 1 08:24:40 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/socket/init.c (cloexec_accept): new function to use accept4 if
- available.
- (rsock_s_accept_nonblock): use cloexec_accept.
- (accept_blocking): ditto.
-
- * ext/socket/extconf.rb: check accept4.
-
-Tue Nov 1 07:31:55 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/socket/ancdata.c (nogvl_recvmsg_func): use MSG_CMSG_CLOEXEC if
- available.
-
- * ext/socket/unixsocket.c (recvmsg_blocking): ditto.
-
-Tue Nov 1 05:59:41 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/socket/socket.c (rsock_socketpair): use SOCK_CLOEXEC if
- available.
-
-Tue Nov 1 02:56:17 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * ruby.c (load_file_internal): convert the encoding of load path if
- needed by platform. calling open() was replaced by rb_cloexec_open()
- at r33549, but the function expected UTF-8 pathname on Windows.
- (open() expected "locale" pathname.)
- reported by taco via IRC.
-
- * ruby.c (load_file): change the type of the 2nd parameter to pass its
- encoding to load_file_internal().
-
- * ruby.c (process_options, rb_load_file): follow above change.
- NOTE: we should pass encoding information to rb_load_file().
-
-Mon Oct 31 23:49:38 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/socket/socket.c (rsock_socketpair): extracted from
- rsock_sock_s_socketpair.
-
-Mon Oct 31 23:31:53 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/socket/init.c (rsock_socket): use SOCK_CLOEXEC if available.
-
-Mon Oct 31 21:47:44 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * io.c (rb_cloexec_pipe): NetBSD 6.0 will support pipe2(2),
- but its return value is -1 or larger than 0.
-
-Mon Oct 31 22:04:54 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/dbm/dbm.c (fdbm_initialize): use O_CLOEXEC if available.
-
-Mon Oct 31 21:47:48 2011 Tanaka Akira <akr@fsij.org>
-
- * include/ruby/intern.h (rb_fd_fix_cloexec): renamed from
- rb_fd_set_cloexec.
-
- * io.c: follow the above renaming.
-
- * ext/pty/pty.c: ditto.
-
- * ext/socket/init.c: ditto.
-
- * ext/socket/socket.c: ditto.
-
- * ext/socket/ancdata.c: ditto.
-
- * ext/socket/unixsocket.c: ditto.
-
-Mon Oct 31 21:02:43 2011 Tanaka Akira <akr@fsij.org>
-
- * lib/resolv.rb (Resolv::DNS): retry IO.select for premature wakeup.
-
-Mon Oct 31 20:14:22 2011 Tanaka Akira <akr@fsij.org>
-
- * io.c (fd_set_cloexec): clear CLOEXEC flag for standard file
- descriptors.
- (rb_cloexec_dup): use rb_cloexec_fcntl_dupfd.
- (rb_cloexec_fcntl_dupfd): use F_DUPFD_CLOEXEC if available.
-
-Mon Oct 31 19:14:11 2011 Tanaka Akira <akr@fsij.org>
-
- * test/resolv/test_dns.rb: don't check maximum slept time.
- ruby doesn't guarantee the maximum time because it is not a
- realtime application.
-
-Mon Oct 31 13:10:06 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/win32.c (setfl): extract from fcntl().
-
- * win32/win32.c (dupfd): new function to support F_DUPFD. based on a
- patch written by akr.
-
- * win32/win32.c (fcntl): use above functions.
-
- * include/ruby/win32.h (F_DUPFD): define. [experimental]
-
- * include/ruby/win32.h (F_SETFL): change the value to correspond with
- other platforms.
-
-Mon Oct 31 12:37:50 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/pty/pty.c (get_device_once): use O_CLOEXEC for posix_openpt if
- available.
-
-Mon Oct 31 12:05:24 2011 Tanaka Akira <akr@fsij.org>
-
- * io.c (rb_cloexec_dup2): check oldfd == newfd at first.
- pointed by KOSAKI Motohiro. [ruby-dev:44713]
-
-Mon Oct 31 10:50:26 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * io.c (rb_cloexec_fcntl_dupfd): this function needs F_DUPFD.
-
- * io.c (nogvl_io_cntl): use rb_cloexec_fcntl_dupfd() only if the
- platform has F_DUPFD.
-
-Mon Oct 31 00:50:00 2011 Luis Lavena <luislavena@gmail.com>
-
- * configure.in: check -fno-omit-frame-pointer acceptance and usage
- under MinGW. [ruby-core:39957] [Bug #5407]
-
-Mon Oct 31 00:16:11 2011 Tanaka Akira <akr@fsij.org>
-
- * include/ruby/intern.h (rb_cloexec_fcntl_dupfd): declared.
-
- * io.c (rb_cloexec_fcntl_dupfd): new function.
- (nogvl_io_cntl): use rb_cloexec_fcntl_dupfd.
-
- * process.c (move_fds_to_avoid_crash): use rb_cloexec_fcntl_dupfd.
-
-Sun Oct 30 22:46:46 2011 Tanaka Akira <akr@fsij.org>
-
- * configure.in: check pipe2.
-
- * io.c (rb_cloexec_pipe): use pipe2 if available.
-
-Sun Oct 30 22:32:44 2011 Tanaka Akira <akr@fsij.org>
-
- * ruby.c (fill_standard_fds): use fstat() instead of fcntl(F_GETFD)
- for MinGW. reported by Luis Lavena. [ruby-core:40526] [Bug #5516]
-
-Sun Oct 30 21:12:47 2011 Tanaka Akira <akr@fsij.org>
-
- * include/ruby/intern.h (rb_cloexec_pipe): declared.
-
- * io.c (rb_cloexec_pipe): new function.
- (rb_pipe): use rb_cloexec_pipe.
-
- * thread_pthread.c (rb_thread_create_timer_thread): use
- rb_cloexec_pipe.
-
-Sun Oct 30 20:06:07 2011 Tanaka Akira <akr@fsij.org>
-
- * io.c (rb_cloexec_dup): refine control flow.
- (rb_cloexec_dup2): ditto.
-
-Sun Oct 30 18:45:50 2011 Tanaka Akira <akr@fsij.org>
-
- * ruby.c (fill_standard_fds): new function to open closed standard
- file descriptors.
- (ruby_sysinit): call fill_standard_fds.
-
-Sun Oct 30 10:50:36 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * tool/rbinstall.rb (install_recursive, bin-comm): split mere
- string not path name. [ruby-core:40462] [Bug #5492]
-
-Sun Oct 30 10:47:20 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * io.c (rb_cloexec_dup, rb_cloexec_dup2): CLOEXEC has been set if
- dup3 succeeded.
-
-Sun Oct 30 09:58:48 2011 Tanaka Akira <akr@fsij.org>
-
- * io.c (rb_cloexec_dup): don't allocate standard file descriptors.
-
-Sun Oct 30 08:29:51 2011 Tanaka Akira <akr@fsij.org>
-
- * io.c (rb_cloexec_dup2): don't set CLOEXEC for standard file
- descriptors.
-
-Sun Oct 30 07:47:10 2011 Tanaka Akira <akr@fsij.org>
-
- * configure.in: check dup3.
-
- * io.c (rb_cloexec_dup2): use dup3 if available.
-
-Sat Oct 29 22:06:37 2011 Tanaka Akira <akr@fsij.org>
-
- * include/ruby/intern.h (rb_cloexec_dup2): declared.
-
- * io.c (rb_cloexec_dup2): new function.
- (io_reopen): use rb_cloexec_dup2.
-
-Sat Oct 20 21:08:18 2011 Tajima Akio <artonx@yahoo.co.jp>
-
- * win32/Makefile.sub (CONFIG_H): have stdint.h if VC2010.
- [Bug #5243]
-
-Sat Oct 29 20:59:08 2011 Tanaka Akira <akr@fsij.org>
-
- * io.c (rb_cloexec_dup): use F_DUPFD_CLOEXEC if available.
-
-Sat Oct 29 20:00:26 2011 Tanaka Akira <akr@fsij.org>
-
- * include/ruby/intern.h (rb_cloexec_dup): declared.
-
- * io.c (rb_cloexec_dup): new function.
- (ruby_dup): use rb_cloexec_dup.
-
- * ext/pty/pty.c (pty_getpty): use rb_cloexec_dup.
-
- * ext/openssl/ossl_bio.c (ossl_obj2bio): ditto.
-
-Sat Oct 29 16:11:34 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/sdbm/_sdbm.c (sdbm_prep): use O_CLOEXEC if available.
-
-Sat Oct 29 14:26:56 2011 Tanaka Akira <akr@fsij.org>
-
- * io.c (rb_cloexec_open): use O_CLOEXEC if available.
-
-Sat Oct 29 12:57:15 2011 Tanaka Akira <akr@fsij.org>
-
- * process.c (ruby_setsid): use rb_cloexec_open.
- (rb_daemon): ditto.
-
- * ruby.c (load_file_internal): ditto.
-
- * file.c (rb_file_s_truncate): ditto.
- (file_load_ok): ditto.
-
- * random.c (fill_random_seed): ditto.
-
- * ext/pty/pty.c (chfunc): ditto.
- (get_device_once): ditto.
-
- * ext/io/console/console.c (console_dev): ditto.
-
-Sat Oct 29 10:40:19 2011 Tanaka Akira <akr@fsij.org>
-
- * include/ruby/intern.h (rb_cloexec_open): declared.
-
- * io.c (fd_set_cloexec): extracted from rb_fd_set_cloexec.
- (rb_cloexec_open): new function.
- (sysopen_func): use rb_cloexec_open.
- (rb_sysopen_internal): use rb_update_max_fd instead of
- rb_fd_set_cloexec.
-
-Sat Oct 29 09:05:07 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * thread_pthread.h: no Structured Exception Handling like macros.
- [ruby-core:40432] [Bug #5491]
-
-Fri Oct 28 22:05:34 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/sdbm/_sdbm.c: RCS $Id$ removed.
-
-Thu Oct 27 18:58:00 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * parse.y (parser_nextc): set encoding for the buffer of ripper.
-
-Fri Oct 28 06:06:08 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/sdbm/_sdbm.c (sdbm_prep): set FD_CLOEXEC flags for file
- descriptors.
- (fd_set_cloexec): new function.
-
-Fri Oct 28 03:01:27 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * vm_insnhelper.c (vm_call_cfunc): adding back useless hack. For some
- reason, this fixes CFP errors on OS X 10.7.
-
-Fri Oct 28 00:09:31 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/sdbm/_sdbm.c (sdbm_prep): refactored for less nesting.
-
-Thu Oct 27 18:28:18 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in (RUBY_DEFINE_IF): revert r33534 partially to get
- rid of AS_ECHO which is not available in autoconf 2.61.
- [ruby-dev:44702]
-
-Thu Oct 27 16:10:46 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * bignum.c (rb_big_divide): raise ZeroDivisionError if divisor is
- zero, as well as Fixnum. [ruby-core:40429] [Bug #5490]
-
-Thu Oct 27 14:56:22 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in (RUBY_FUNC_ATTRIBUTE): unset temporary variable.
-
- * configure.in (RUBY_STACK_GROW_DIRECTION): substitute CPU name as
- shell variable name. based on the patch by The Written Word Inc. at
- [ruby-core:40421]. [Bug #5488]
-
-Thu Oct 27 09:57:56 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * include/ruby/ruby.h (SIZE_MAX): define SIZE_MAX if not defined.
- patched by The Written Word Inc. [ruby-core:40422] [Bug #5489]
-
-Thu Oct 27 08:47:38 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * ext/psych/parser.c: remove unused variable.
-
-Thu Oct 27 08:38:41 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * ext/openssl/extconf.rb: add -Wall flag by default when compiler is
- GCC.
-
-Wed Oct 26 15:24:25 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * file.c (rb_file_join): honor input encodings than ASCII-8BIT.
- [ruby-core:40338] [Bug #5483]
-
-Tue Oct 25 21:52:31 2011 Tanaka Akira <akr@fsij.org>
-
- * include/ruby/defines.h: use "__sparc" instead of "sparc" and
- "__sparc__".
-
- * dln.c: ditto.
-
- [ruby-dev:44694]
-
-Tue Oct 25 06:34:39 2011 Eric Hodel <drbrain@segment7.net>
-
- * re.c (match_aref): Use <code> around indexing examples to prevent
- hyperlinks. [ruby-talk:389396]
-
-Mon Oct 24 23:55:31 2011 Tanaka Akira <akr@fsij.org>
-
- * complex.c: use "__sun" instead of "__sun__" to detect SunOS.
-
- * math.c: ditto.
-
- * hash.c: ditto.
-
- * atomic.h: ditto.
-
- * ext/io/wait/wait.c: ditto.
-
- [ruby-dev:44693]
-
-Mon Oct 24 22:45:37 2011 Tanaka Akira <akr@fsij.org>
-
- * io.c: use "__sun" instead of "sun" to detect SunOS.
-
- * dln.c: ditto.
-
- * cont.c: ditto.
-
- * ext/sdbm/_sdbm.c: ditto.
-
- [ruby-dev:44693]
-
-Mon Oct 24 22:38:08 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/pty/pty.c (get_device_once): delay rb_fd_set_cloexec() until
- grantpt() on Solaris. grantpt() doesn't work with CLOEXEC on
- Solaris 10.
- reported by Naohisa GOTO. [ruby-dev:44688] [Bug #5475]
-
-Mon Oct 24 08:18:14 2011 Tanaka Akira <akr@fsij.org>
-
- * io.c (copy_stream_fallback_body): check nil for EOF of read method.
- patch by Eric Wong. [ruby-core:39134] [Bug #5237]
-
-Sun Oct 23 18:21:23 2011 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * ext/tk/MANUAL_tcltklib.eng: fix typo.
-
-Sun Oct 23 18:03:31 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * numeric.c (rb_infinity, rb_nan): aggregated member initializers
- need braces.
-
-Sun Oct 23 16:43:43 2011 Naohisa Goto <ngotogenome@gmail.com>
-
- * ext/io/wait/wait.c: ioctl(2) is declared in unistd.h on Solaris.
-
-Sun Oct 23 16:33:35 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * ext/tk/MANUAL_tcltklib.eng: fix typo. reported by Mimura-san.
- [ruby-dev:44683] [Bug #5471]
-
-Sun Oct 23 08:01:29 2011 Tanaka Akira <akr@fsij.org>
-
- * io.c (rb_fd_set_cloexec): set close-on-exec flag only if F_GETFD is
- defined. reported by Luis Lavena. [ruby-core:40281] [Bug #5470]
-
-Sat Oct 22 19:48:50 2011 Tanaka Akira <akr@fsij.org>
-
- * test/openssl/test_ssl.rb (test_multibyte_read_write): start server
- for each length to avoid race condition.
-
-Sat Oct 22 18:49:24 2011 Tanaka Akira <akr@fsij.org>
-
- * include/ruby/intern.h (rb_fd_set_cloexec): declared.
-
- * io.c (rb_fd_set_cloexec): new function.
- (ruby_dup): call rb_fd_set_cloexec to set close-on-exec flag.
- (rb_sysopen_internal): ditto.
- (rb_pipe): ditto.
- (io_reopen): ditto.
- (io_cntl): ditto.
-
- * process.c (rb_f_exec): change the default :close_others option to
- true.
- (rb_f_system): ditto.
- (move_fds_to_avoid_crash): call rb_fd_set_cloexec to set
- close-on-exec flag.
- (ruby_setsid): ditto.
- (rb_daemon): ditto.
-
- * thread_pthread.c (rb_thread_create_timer_thread): call
- rb_fd_set_cloexec to set close-on-exec flag.
-
- * ruby.c (load_file_internal): ditto.
-
- * file.c (rb_file_s_truncate): ditto.
- (file_load_ok): ditto.
-
- * random.c (fill_random_seed): ditto.
-
- * ext/pty/pty.c (chfunc): ditto.
- (get_device_once): ditto.
-
- * ext/openssl/ossl_bio.c (ossl_obj2bio): ditto.
-
- * ext/socket/init.c (rsock_socket): ditto.
- (rsock_s_accept_nonblock): ditto.
- (rsock_s_accept): ditto.
-
- * ext/socket/socket.c (rsock_sock_s_socketpair): ditto.
-
- * ext/socket/ancdata.c (discard_cmsg): ditto.
- (make_io_for_unix_rights): ditto.
-
- * ext/socket/unixsocket.c (unix_recv_io): ditto.
-
- * ext/io/console/console.c (console_dev): ditto.
-
- [ruby-core:38140] [Feature #5041]
-
-Sat Oct 22 17:46:27 2011 Tanaka Akira <akr@fsij.org>
-
- * lib/resolv.rb: fix a exception name in previous patch.
-
-Sat Oct 22 17:43:33 2011 Tanaka Akira <akr@fsij.org>
-
- * lib/resolv.rb: make timeout configurable for DNS query.
- patch by Eric Wong. [ruby-core:38533] [Feature #5100]
-
-Sat Oct 22 02:07:48 2011 Naohisa Goto <ngotogenome@gmail.com>
-
- * numeric.c (rb_infinity, rb_nan): use union to prevent bus error
- caused by misalignment. [Bug #5469] [ruby-dev:44657]
-
- * include/ruby/missing.h (INFINITY, NAN): ditto
-
-Fri Oct 21 22:02:17 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * gc.c (initial_params): pack in a struct.
-
- * gc.c (rb_gc_set_params): set parameters always.
- [ruby-dev:44648] [Bug #5467]
-
-Fri Oct 21 12:10:20 2011 Naohisa Goto <ngotogenome@gmail.com>
-
- * atomic.h: change Solaris checking macro because atomic_ops can work
- not only with Sun Studio but also with Fujitsu C Compiler.
-
-Fri Oct 21 02:11:00 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * ext/openssl/ossl_ns_spki.c: Complete documentation.
- * test/openssl/test_ns_spki.rb: Integrate SPKI#to_text.
-
-Thu Oct 20 22:47:28 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/win32.c (socklist_insert, socklist_lookup, socklist_delete):
- new functions to wrap of st_insert(), st_lookup() and st_delete() to
- socklist.
- allocating socklist is deferred until it is really needed.
-
- * win32/win32.c (exit_handler): delete socklist only if it is
- initialized.
-
- * win32/win32.c (rb_w32_sysinit, StartSockets): refactoring: move
- initialization of select_mutex to StartSockets().
-
- * win32/win32.c (exit_handler): refactoring: delete select_mutex only
- if winsock is used.
-
-Thu Oct 20 22:38:53 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * ext/openssl/ossl_pkcs5.c: add note on timing attacks and general
- documentation.
-
-Thu Oct 20 21:19:15 2011 Naohisa Goto <ngotogenome@gmail.com>
-
- * vm_eval.c (check_funcall): set array elements one-by-one to fix
- compile error with Fujitsu C Compiler 5.6 on Solaris 10 on Sparc.
- [Bug #5464] [ruby-dev:44632]
-
-Thu Oct 20 13:09:35 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * include/ruby/defines.h (flush_register_windows): use software
- trap on Debian Sparc 32-bit userspace. [Bug #5244]
-
-Thu Oct 20 12:28:22 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * test/openssl/test_pkcs5.rb: add RFC 6070 tests for PBKDF2 with
- HMAC-SHA1
-
-Thu Oct 20 11:42:23 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * util.c (mmprepare): fix for fragmental size.
-
- * util.c (mmswap_, mmrot3_): portability improvement.
-
-Thu Oct 20 05:58:02 2011 Eric Hodel <drbrain@segment7.net>
-
- * ext/openssl/ossl_ns_spki.c (Init_ossl_ns_spki): Stub documentation
- for Netscape SPKI.
-
-Thu Oct 20 05:13:39 2011 Ryan Davis <ryand-ruby@zenspider.com>
-
- * lib/minitest/*: Imported minitest 2.6.2 (r6712)
- * test/minitest/*: ditto
-
-Thu Oct 20 06:55:32 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * lib/openssl/buffering.rb: Force multi-byte strings to be treated as
- binary data.
- * test/openssl/test_ssl.rb: Add test for it.
-
- Thanks to Niklas Baumstark for reporting the issue!
-
- [Ruby 1.9 - Bug #5233] [ruby-core:39120]
-
-Wed Oct 19 17:06:54 2011 Yukihiro Matsumoto <matz@ruby-lang.org>
-
- * version.h (RUBY_VERSION): finally declare start of 2.0 work!
-
-Wed Oct 19 11:48:44 2011 Eric Hodel <drbrain@segment7.net>
-
- * error.c (Init_Exception): Document $! and $@. Provide
- recommendations for creating exceptions for a library.
-
-Wed Oct 19 11:25:46 2011 Eric Hodel <drbrain@segment7.net>
-
- * error.c (Init_Exception): Add hierarchy of Exception subclasses.
- Based on patch by Sylvain Daubert. [Ruby 1.9 - Bug #5438]
-
-Wed Oct 19 11:04:47 2011 Eric Hodel <drbrain@segment7.net>
-
- * enum.c: Reformat block args to a single standard, { |args| ... }.
- Patch by b t. [Ruby 1.9 - Bug #5393]
-
-Wed Oct 19 12:11:26 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * ext/openssl/ossl_ssl.c: Remove set, but unused variables.
- ext/openssl/ossl_pkey.c: ditto
-
- * ext/openssl/ossl_pkey_dh.c: Make functions passed to
- rb_thread_blocking_region return VALUE instead of void.
- ext/openssl/ossl_pkey_dsa.c: ditto
- ext/openssl/ossl_pkey_rsa.c: ditto
-
-Tue Oct 18 23:28:53 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * hash.c (identhash): share with type_numhash.
-
- * st.c (st_hashtype_num): rename from type_numhash.
-
-Tue Oct 18 23:07:30 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm_core.h (ruby_current_thread): probeprofiler has been removed
- long ago.
-
-Tue Oct 18 23:05:49 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/ripper/eventids2.c (ripper_init_eventids2): separate
- initializations of IDs and objects.
-
- * ext/ripper/tools/generate.rb (generate_eventids1): ditto.
-
- * parse.y (Init_ripper, InitVM_ripper): fix inversed roles.
-
-Sun Oct 16 19:46:16 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/bigdecimal/bigdecimal.gemspec (files): fixed typo, and
- removed nonexistent file.
-
- * ext/bigdecimal/bigdecimal.gemspec (homepage): added.
-
- * ext/io/console/io-console.gemspec (homepage): ditto.
-
-Fri Oct 14 12:13:57 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/pty/pty.c (pty_check): should return nil until the child
- terminates or stops. [ruby-dev:44600] [Bug #2642]
-
-Fri Oct 14 11:19:37 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * include/ruby/intern.h (rb_ary_rotate): export.
-
-Fri Oct 14 05:58:05 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * atomic.h (ATOMIC_INC, ATOMIC_DEC): return old values.
- [ruby-dev:44596] [Bug #5439]
-
- * signal.c (ruby_atomic_exchange): no needs to define on the
- platforms where atomic.h is available.
-
-Thu Oct 13 19:29:40 2011 Naohisa Goto <ngotogenome@gmail.com>
-
- * atomic.h (ATOMIC_*): use atomic_ops(3C) when SunStudio on Solaris.
- [ruby-dev:44596] [Bug #5439]
-
-Thu Oct 13 18:13:04 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * atomic.h(ATOMIC_SET): add cast to void to prevent misuse.
- [ruby-dev:44596] [Bug #5439]
-
-Thu Oct 13 18:04:27 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * gc.c (rb_gc_finalize_deferred, rb_objspace_call_finalizer):
- should use ATOMIC_EXCHANGE() to check the previous value.
- [ruby-dev:44596] [Bug #5439]
-
-Wed Oct 12 23:39:58 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
-
- * test/openssl/test_ssl.rb: Move duplicated tests for SSL::Session to
- test_ssl_session.rb
-
-Tue Oct 11 08:49:40 2011 Eric Hodel <drbrain@segment7.net>
-
- * array.c (rb_ary_initialize): Improve explanation of Array.new
- parameters. Patch by Alvaro Pereyra Rabanal. [Ruby 1.9 - Bug #5425]
- * array.c (rb_ary_s_try_convert): Fix typo (try => tries)
- * array.c (rb_ary_rindex): Add spacing for block.
- * array.c (rb_ary_uniq_bang): Describe block
- * array.c (rb_ary_uniq): ditto
-
-Tue Oct 11 07:55:38 2011 Eric Hodel <drbrain@segment7.net>
-
- * array.c: Add a description to Array, minor cleanups. Patch by
- Andrea Singh. [Ruby 1.9 - Bug #5412]
-
-Tue Oct 11 06:09:52 2011 Eric Hodel <drbrain@segment7.net>
-
- * lib/pp.rb: Move PP documentation to top of class PP. Patch by
- Sylvain Daubert. [Ruby 1.9 - Bug #5430]
-
-Tue Oct 11 06:06:29 2011 Eric Hodel <drbrain@segment7.net>
-
- * ext/coverage/coverage.c (Init_coverage): Change list format and
- describe Coverage.result output. Patch by Sylvain Daubert.
- [Ruby 1.9 - Bug #5428]
-
-Tue Oct 11 05:53:23 2011 Eric Hodel <drbrain@segment7.net>
-
- * object.c (Init_Object): Add reference to BasicObject, brief
- explanation of constant lookup. Based on patch by Alvaro Pereyra
- Rabanal.
- [Ruby 1.9 - Bug #5426]
-
-Sun Oct 9 11:06:52 2011 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * test/psych/test_yamldbm.rb: don't run test if the system
- don't support yaml/dbm.
-
- * test/syck/test_yamldbm.rb: ditto.
-
-Sat Oct 8 08:54:56 2011 Eric Hodel <drbrain@segment7.net>
-
- * enum.c (group_by): Improve group_by description. Patch by b t.
- [#5411]
-
-Sat Oct 8 03:17:51 2011 Eric Hodel <drbrain@segment7.net>
-
- * lib/shell.rb: Document some methods of Shell. Patch by Carol
- Nichols. [Ruby 1.9 - Bug #5417]
-
-Fri Oct 7 17:54:28 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/test/unit/assertions.rb (assert_send, assert_not_send):
- parenthesize non-empty arguments.
-
-Fri Oct 7 06:35:50 2011 Eric Hodel <drbrain@segment7.net>
-
- * array.c: Use + for arguments described in documentation to allow
- rdoc -C2 to work better. Remove <code> from method references to
- allow cross-references in HTML documentation.
-
-Thu Oct 6 18:46:23 2011 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-
- * vm_eval.c (make_no_method_exception): fix typo.
-
- * vm_insnhelper.c, vm_insnhelper.h: ditto.
-
-Thu Oct 6 16:29:30 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm_eval.c (make_no_method_execption): extract from
- raise_method_missing().
-
- * vm_eval.c (send_internal): remove inadvertent symbol creation
- from public_send. based on a patch by Jeremy Evans <code AT
- jeremyevans.net> in [ruby-core:38576]. [Feature #5112]
-
- * vm_insnhelper.c (vm_call_method): remove inadvertent symbol
- creation from send and __send__, too.
-
-Thu Oct 6 14:59:11 2011 Eric Hodel <drbrain@segment7.net>
-
- * lib/time.rb: Clean up Time documentation. Patch by Jake Goulding.
- [Ruby 1.9 - Bug #5416]
-
-Thu Oct 6 10:00:54 2011 Eric Hodel <drbrain@segment7.net>
-
- * enum.c (group_by): Improve documentation based on patch by b t.
-
-Thu Oct 6 09:56:30 2011 Eric Hodel <drbrain@segment7.net>
-
- * enum.c: Clean up wording in Enumerable documentation. Patch by b t.
- [Ruby 1.9 - Bug #5411]
-
-Thu Oct 6 09:17:18 2011 Eric Hodel <drbrain@segment7.net>
-
- * time.c (Init_Time): Remove editorial comments from Time
- documentation, fix link.
-
-Thu Oct 6 09:14:20 2011 Eric Hodel <drbrain@segment7.net>
-
- * time.c (Init_Time): Improve Time documentation. Patch by Shane
- Emmons. [Ruby 1.9 - Bug #5404]
- * lib/time.rb: Improve time.rb documentation including Time.strptime.
- Patch by Shane Emmons. [Ruby 1.9 - Bug #5402]
-
-Thu Oct 6 08:54:05 2011 Eric Hodel <drbrain@segment7.net>
-
- * random.c: Improve documentation of Random. Patch by Gregory
- Parkhurst. [Ruby 1.9 - Bug #5410]
-
-Thu Oct 6 01:44:51 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * cont.c (cont_mark): mark original Thread object from saved_thread.
- [ruby-dev:44571] [Bug #5386]
-
-Wed Oct 5 16:33:04 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * vm_insnhelper.c (vm_call_cfunc): remove useless hack.
-
-Wed Oct 5 05:56:39 2011 Eric Hodel <drbrain@segment7.net>
-
- * hash.c (Init_Hash): Improve Hash documentation. Patch by Alvaro
- Pereyra Rabanal. [Ruby 1.9 - Bug #5405]
-
-Wed Oct 5 05:47:59 2011 Eric Hodel <drbrain@segment7.net>
-
- * random.c (Init_Random): Add a top-level comment for Random. Patch
- by Brett Bim. [Ruby 1.9 - Bug #5403]
-
-Wed Oct 5 02:50:27 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/syntax_error.rb: Add file, line, offset, and
- message attributes during parse failure.
- * ext/psych/parser.c: Update parser to raise exception with correct
- values.
- * test/psych/test_exception.rb: corresponding tests.
-
-Wed Oct 5 01:52:16 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/parser.c (parse): Use context_mark for indicating error
- line and column.
-
-Wed Oct 5 01:22:08 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/scalar_scanner.rb: use normal begin / rescue
- since postfix rescue cannot receive the exception class. Thanks
- nagachika!
-
-Tue Oct 4 21:10:08 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * class.c (class_alloc): allocate extra memory after containing
- object setup to get rid of rare-but-potential memory leak.
-
- * gc.c (gc_mark_children): skip marking extended members if ptr is
- NULL.
-
-Tue Oct 4 16:17:50 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/time.rb (Time.strptime): use Time.at if d[:seconds] is set.
- Reported by Christopher Eberz. [ruby-core:39903] Bug #5399
-
-Tue Oct 4 11:44:10 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * gc.c (rb_gc_set_params): ruby_verbose can be Qnil, so use RTEST.
-
-Tue Oct 4 08:33:41 2011 Eric Hodel <drbrain@segment7.net>
-
- * ext/etc/etc.c: Document Etc, Etc.sysconfdir, Etc.systmpdir. Patch
- by mathew murphy. [Ruby 1.9 - Bug #5396]
-
-Tue Oct 4 08:21:51 2011 Eric Hodel <drbrain@segment7.net>
-
- * lib/shellwords.rb: Update toplevel comment with an example. Patch
- by Samnang Chhun. [Ruby 1.9 - Bug #5388]
-
-Tue Oct 4 08:15:50 2011 Eric Hodel <drbrain@segment7.net>
-
- * proc.c (proc_call): Update documentation to match argument handling
- of proc/Proc.new/lambda/->()
-
-Tue Oct 4 07:59:16 2011 Eric Hodel <drbrain@segment7.net>
-
- * proc.c (proc_call): Fix documentation of Proc#call vs Proc#===.
- [Ruby 1.9 - Bug #5349]
-
-Tue Oct 4 07:43:18 2011 Eric Hodel <drbrain@segment7.net>
-
- * array.c (rb_ary_initialize): Make Array.new description match
- call-seq. Patch by Henry Maddocks. [Ruby 1.9 - Bug #5344]
-
-Tue Oct 4 07:35:23 2011 Eric Hodel <drbrain@segment7.net>
-
- * array.c (rb_ary_initialize): Add output for examples. Patch by
- Jonathan Mukai. [Ruby 1.9 - Bug #5216]
-
-Tue Oct 4 07:30:50 2011 Eric Hodel <drbrain@segment7.net>
-
- * array.c (rb_ary_s_create): Add example results for Array::[]. Patch
- by Jonathan Mukai. [Ruby 1.9 - Bug #5215]
-
-Tue Oct 4 07:15:17 2011 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems: Update to RubyGems 1.8.11. Move Deprecate into the
- Gem namespace.
-
-Tue Oct 4 06:43:47 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych.rb: update psych version.
- * ext/psych/psych.gemspec: generate new gemspec for new version.
-
-Tue Oct 4 06:29:55 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych.rb: calling `yaml` rather than `to_yaml`.
- * ext/psych/lib/psych/nodes/node.rb: Rename `to_yaml` to just `yaml`
- in order to avoid YAML::ENGINE switching from replacing this method.
- * test/psych/helper.rb: fix tests for method name change.
- * test/psych/test_document.rb: ditto
- * test/psych/visitors/test_emitter.rb: ditto
-
-Tue Oct 4 06:20:19 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/scalar_scanner.rb: Match values against the
- floating point spec defined in YAML to avoid erroneous parses.
- * test/psych/test_numeric.rb: corresponding test.
-
-Tue Oct 4 05:59:24 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/visitors/to_ruby.rb: ToRuby visitor can be
- constructed with a ScalarScanner.
- * ext/psych/lib/psych/visitors/yaml_tree.rb: ScalarScanner can be
- passed to the YAMLTree visitor.
-
-Tue Oct 4 05:47:23 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/visitors/to_ruby.rb: Define Regexp::NOENCODING
- for 1.9.2 backwards compatibility.
- * ext/psych/lib/psych/visitors/yaml_tree.rb: Fix Date string
- generation for 1.9.2 backwards compatibility.
-
-Mon Oct 3 23:56:39 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * gc.c (rb_gc_set_params): output GC parameter change messages only
- if -w/-v options are specified. these messages are output to stderr,
- not to stdout. [ruby-core:39795] [Bug #5380]
-
- * test/ruby/test_gc.rb (test_gc_parameter): add test for it.
-
-Sun Oct 2 20:05:32 2011 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * vm.c (rb_thread_mark), cont.c (cont_mark): revert r33369 and r33371
- that may cause SEGV in certain environments.
-
-Sun Oct 2 12:14:06 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * test/psych/test_yamldbm.rb: add test case.
- * test/syck/test_yamldbm.rb: ditto.
-
-Sun Oct 2 11:28:09 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * lib/yaml/store.rb: make initialize method signature match the
- superclass signature.
-
-Sun Oct 2 10:44:01 2011 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * io.c: fix documentation of ARGF.lineno=.
-
-Sat Oct 1 20:03:19 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/mkmf.rb (have_framework): try as Objective-C.
- https://twitter.com/nagachika/status/120294447660539904
-
-Sun Oct 2 08:43:25 2011 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * vm.c (rb_thread_mark), cont.c (cont_mark): self pointer should not
- be marked by itself. Patch by Koichi Sasada.
- [ruby-dev:44567] [Bug #5386]
-
-Sun Oct 2 00:42:14 2011 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * vm.c (rb_thread_mark): rb_thread_t needs self to be marked.
- [ruby-dev:44566] [Bug #5386]
-
-Sat Oct 1 09:48:53 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * gc.c (add_heap_slots, init_heap): reset heaps_inc zero when
- heap slots are expanded by environment variable RUBY_HEAP_MIN_SLOTS.
- [ruby-core:39777] [Bug #5380]
-
- * test/ruby/test_gc.rb (test_gc_parameter): add test for it.
-
- * test/ruby/envutil.rb (assert_normal_exit): add :child_env option to
- enable pass environment variables to child process.
-
-Thu Sep 29 13:17:51 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * array.c (ary_join_1): should not copy the encoding of non-string
- element after string element. [ruby-core:39776] [Bug #5379]
-
-Thu Sep 29 11:53:56 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * gc.c (slot_sweep, rb_gc_finalize_deferred)
- (rb_objspace_call_finalizer, rb_gc): run finalizers
- sequentially. [ruby-dev:44562]
-
-Thu Sep 29 20:37:38 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/gdbm/gdbm.c (rb_gdbm_fatal): adjust argument type.
-
-Thu Sep 29 20:10:42 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * gc.c (is_id_value, is_live_object): extract from id2ref().
-
- * gc.c (run_finalizer): use object instead of object id.
-
-Thu Sep 29 20:07:36 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * use RB_TYPE_P which is optimized for constant types, instead of
- comparison with TYPE.
-
-Wed Sep 28 09:20:37 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in (pthread_np.h): needs pthread.h to be included
- previously on OpenBSD. a patch by George Koehler <xkernigh AT
- netscape.net> at [ruby-core:39752]. [Bug #5376]
-
-Wed Sep 28 04:41:35 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * test/psych/test_yamlstore.rb: use tmpdir for tmpfile.
- * test/syck/test_yamlstore.rb: ditto.
-
-Wed Sep 28 04:10:46 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * ext/bigdecimal/README: update report to.
-
-Tue Sep 28 04:05:00 2011 Kenta Murata <mrkn@mrkn.jp>
-
- * ext/bigdecimal/bigdecimal_en.html: removed because this file isn't
- maintained now.
-
- * ext/bigdecimal/bigdecimal_ja.html: ditto.
-
-Tue Sep 27 09:55:40 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread_pthread.c: make native_fd_select().
- * thread.c (do_select): remove #ifdef _WIN32. Instead, use
- native_fd_select() always.
-
-Tue Sep 27 09:44:59 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread.c (do_select): remove cygwin specific hack. It's layer
- violation and too large hack.
- * thread.c (cmp_tv, subtract_tv): removed.
-
-Tue Sep 27 03:50:19 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * test/rexml/test_sax.rb: add require 'rexml/document'.
-
-Tue Sep 27 03:32:27 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * test/psych/test_yamldbm.rb: fix #setup and #teardown.
- [Bug #5370] [ruby-core:39730]
- * test/syck/test_yamldbm.rb: ditto.
-
-Mon Sep 26 11:27:38 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/webrick/httputils.rb: Add MIME Type definition of .js and .svg.
- patched by Hal Brodigan. [ruby-core:39704] [Bug #5365]
-
-Mon Sep 26 09:20:44 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * configure.in: remove DJGPP support. It's not longer supported
- since ruby 1.9.0.
-
-Mon Sep 26 09:07:46 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * include/ruby/defines.h: remove NextStep, OpenStep, Rhapsody
- support. Last activity of their OSes are 7 years ago.
- * configure.in: ditto.
- * dir.c: ditto.
- * ext/tk/extconf.rb: ditto.
-
-Mon Sep 26 09:02:49 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * configure.in: remove a code for human68k. it's no longer
- supported since r19677.
-
-Sun Sep 25 23:43:32 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * ext/openssl/ossl_asn1.c: fix int_ossl_asn1_decode0_cons when being
- fed arbitrary string values.
- Clearly distinguish between the cases "universal, infinite and
- not a SEQUENCE or SET" and "universal SEQUENCE or SET, possibly
- infinite". Raise error for universal tags that are not infinite.
- * test/openssl/test_asn1.rb: add a test for this.
-
- Thanks to Hiroshi Yoshida for reporting this bug.
- [Bug #5363] [ruby-dev:44542]
-
-Sun Sep 25 20:57:18 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * test/syck/test/yamldbm.rb: add test for Syck::DBM.
- * test/psych/test_yamldbm.rb: add test for Psych::DBM.
- * test/psych/test_yamlstore.rb: add test for Psych::PStore.
-
-Sun Sep 25 20:54:10 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * lib/yaml/dbm/dbm.rb: fix #update, add #key for using instead #index.
- [Bug #5305][ruby-dev:44485]
-
-Sun Sep 25 16:54:33 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * encoding.c (require_enc): reject only loading from untrusted
- load paths. [ruby-dev:44541] [Bug #5279]
-
- * transcode.c (load_transcoder_entry): ditto.
-
-Sun Sep 25 16:45:05 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in: ignore all warnings from an arbitrary
- header in /usr/local/include.
-
-Sun Sep 25 03:43:03 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * enum.c (slice_before_i): use rb_attr_get to suppress wrong warning
- for internal instance variable slicebefore_initial_state.
-
-Fri Sep 23 14:20:14 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * ext/openssl/ossl_asn1.c: remove unused variable.
-
-Fri Sep 23 13:46:59 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * test/openssl/test_ssl_session.rb: execute test_session_exts_read
- only for OpenSSL versions >= 0.9.8k. Thanks, Eric Wong, for
- reporting this.
- [Bug #4961] [ruby-core:37726]
-
-Fri Sep 23 11:59:08 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * test/openssl/test_ssl_session.rb: ensure server calls callbacks in
- test_ctx_server_session_cb. Thanks to Eric Wong for the patch.
- [Bug #5336] [ruby-core:39619]
-
-Thu Sep 22 02:53:19 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm_insnhelper.c (vm_call_cfunc): suppress a warning. note that
- `volatile type *var' doesn't make var itself volatile.
-
-Thu Sep 22 01:52:48 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * thread_pthread.c (ubf_select): activate timer thread when interrupt
- blocking thread.
- A patch created by Koichi Sasada. [ruby-core:39634] [Bug #5343]
- to cover race condition, timer thread periodically send SIGVTARLM to
- threads in signal thread list. so you should activate timer thread
- when interrupt a thread.
-
-Wed Sep 21 16:55:26 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/io/wait/test_io_wait.rb (TestIOWait#setup): of course, the
- behavior of mingw is just same with mswin.
-
-Tue Sep 20 18:08:51 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm_insnhelper.c (vm_get_cvar_base): reduce duplicated checks and
- move a warning outside the loop.
-
-Mon Sep 19 18:55:51 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * lib/fileutils.rb (module FileUtils): improve performance of
- FileUtils.compare_stream. a patch by Masaki Matsushita.
- [Feature #5337] [ruby-core:39622]
-
-Mon Sep 19 18:42:58 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * test/-ext-/old_thread_select/test_old_thread_select.rb:
- select() with timeout may return early in old Linux kernels
- with 250 Hz tickrate and no dynticks, so skip everything older
- than 2.6.32 (which has long term support).
- And, Make the timing assertions consistently use assert_operator with
- timing difference in error message
- Patch by Eric Wong. [Bug #5335] [ruby-core:39618]
-
-Mon Sep 19 09:28:06 2011 Eric Hodel <drbrain@segment7.net>
-
- * test/openssl/test_ssl.rb (class OpenSSL): Test
- OpenSSL::SSL::SSLSocket#session and #session=.
-
-Mon Sep 19 07:54:17 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * object.c (rb_obj_clone): singleton class should be attached
- singleton object to. a patch by Satoshi Shiba <shiba AT rvm.jp>
- at [ruby-dev:44460]. [Bug #5274]
-
-Sat Sep 17 23:34:10 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (parser_data_type): inherit the core type in ripper so
- that checks in core would work. [ruby-core:39591] [Bug #5331]
-
-Sat Sep 17 12:44:04 2011 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * lib/find.rb (Find.find): add documentation that Find.find
- without block returns an enumerator.
-
-Thu Sep 15 11:39:43 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * gc.c (mark_entry, mark_key, mark_keyvalue): adjust callback
- argument types.
-
-Thu Sep 15 01:44:10 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * ext/tk/*: Change encoding from EUC-JP to UTF-8
-
-Wed Sep 14 11:43:37 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread.c (rb_fd_rcopy): added an argument guard.
- Patch by NAKAMURA Usaku. [Bug #5306] [ruby-core:39435]
-
-Tue Sep 13 20:21:49 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/pstore.rb, test/test_pstore.rb: suppress warnings with -v.
-
- * lib/pstore.rb (PStore): always open in binary mode even if
- default encodings are set. [Bug #5311] [ruby-core:39503]
-
-Tue Sep 13 05:37:15 2011 Yukihiro Matsumoto <matz@ruby-lang.org>
-
- * io.c (Init_IO): update BINARY comment. it should not change the
- encoding of the result to ASCII-8BIT. [ruby-talk:387719]
-
-Mon Sep 12 19:55:00 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread.c (rb_thread_select): fix to ignore an argument
- modification of rb_thread_fd_select().
- based on a patch by Eric Wong. [Bug #5306] [ruby-core:39435]
- * thread.c (rb_fd_rcopy): New. for reverse fd copy.
-
- * test/-ext-/old_thread_select/test_old_thread_select.rb
- (test_old_select_false_positive): test for bug5306.
-
- * ext/-test-/old_thread_select/old_thread_select.c (fdset2array):
- New. convert fdsets to array.
- * ext/-test-/old_thread_select/old_thread_select.c (old_thread_select):
- return 'read', 'write', 'except' argument of rb_thread_select()
- to ruby script.
-
-Mon Sep 12 13:38:12 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * README.EXT, README.EXT.ja (2.2.2), parse.y (rb_check_id): add
- documents for rb_check_id().
-
-Mon Sep 12 12:53:39 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * lib/rake/file_list.rb (Rake::FileList#egrep): there is no need to
- open files in binary mode.
- see more details in https://github.com/jimweirich/rake/issues/74
-
-Mon Sep 12 12:42:36 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * test/ruby/test_exception.rb (TestException#test_exit_success_p):
- assert also the cases when exiting with true and false.
-
- * lib/test/unit/assertions.rb (assert_send): make arguments in
- the default message clearer.
-
-Sun Sep 11 05:23:14 2011 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * lib/matrix.rb: Deal with subclasses of Matrix [redmine #5307]
-
-Sat Sep 10 13:38:20 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * dir.c (dir_s_aref):
- * dir.c (dir_entries): Two small documentation fixes.
- A patch from Aaron Lerch. [Bug #5302] [ruby-core:39404]
-
-Sat Sep 10 08:30:03 2011 Koichi Sasada <ko1@atdot.net>
-
- * gc.c (GC_PROFILE_MORE_DETAIL, CALC_EXACT_MALLOC_SIZE):
- define macros only if they are not defined.
- fixes: [Ruby 1.9 - Feature #5291]
-
-Sat Sep 10 08:25:47 2011 Yukihiro Matsumoto <matz@ruby-lang.org>
-
- * parse.y (bv_decls): parse.y relies on $$ = $1 before action
- routines. a patch from Michael Edgar. [Bug #5303]
- [ruby-core:39429]
-
-Sat Sep 10 01:37:55 2011 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-
- * sample/drb/dhasenc.rb: coding cookie of Emacs is coding,
- not encoding.
-
- * sample/mine.rb: ditto.
-
-Fri Sep 9 21:56:40 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * ext/bigdecimal/bigdecimal.c (BigDecimal_sqrt): Fix comment.
- BigDecimal#sqrt requires argument. Reported by Makoto Kishimoto.
- Thanks for your contribution. [Bug #5267] [ruby-dev:44452]
-
-Fri Sep 9 11:00:55 2011 Shota Fukumori <sorah@tubusu.net>
-
- * test/rubygems/test_gem_commands_help_command.rb: Add one
- `require` because if run test-all with test/unit parallel
- running, sometimes this test fails by some constants not found.
- The error reason is some worker doesn't require the file needed by
- this test. This issue is related to [ruby-core:36168].
-
-Fri Sep 9 10:22:03 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * thread.c (rb_thread_select): fix a typo to initialize efds
- properly. [Bug #5299] [ruby-core:39380]
-
-Fri Sep 9 02:02:09 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * template/yarvarch.ja:
- Change encoding from Shift_JIS to UTF-8
-
-Thu Sep 9 01:14:00 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * sample/drb/README.rd.ja:
- * sample/drb/dhasenc.rb:
- * sample/mine.rb:
- Change encoding from EUC-JP to UTF-8
-
-Thu Sep 8 21:03:22 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * ext/nkf/nkf-utf8/nkf.c: import nkf 2.1.2 (be9c280)
- Bump version number/release date only.
-
-Thu Sep 8 12:43:18 2011 Narihiro Nakamura <authornari@gmail.com>
-
- * gc.c (Init_GC): defined GC::Profiler.raw_data. based on the
- patch by Eric Hodel. [ruby-core:37857] [Bug #4991]
-
-Thu Sep 8 09:02:53 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * gc.c (id2ref): objects which are unmarked but not in sweep_slots
- are not dead.
-
-Thu Sep 8 07:44:25 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * transcode.c (rb_declare_transcoder, load_transcoder_entry): no
- longer need to limit the length of transcoder library name.
-
-Thu Sep 8 07:36:36 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * ext/syck/lib/syck/types.rb: use toplevel Syck.
- for the case someone define Syck::Syck (or YAML::Syck).
-
-Thu Sep 8 07:33:12 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * gc.c (id2ref): unmarked object is already dead while lazy
- sweeping, and to it cannot come back since other objects
- referred from it might have been freed already.
-
-Wed Sep 8 03:48:00 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * ext/readline/README.ja:
- Change encoding from EUC-JP to UTF-8
-
-Wed Sep 8 02:59:00 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * test/rexml/test_encoding.rb:
- Add require 'require 'rexml/document'
-
-Wed Sep 8 02:53:00 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * ext/nkf/nkf-utf8/nkf.c:
- Change encoding from ISO-2022 to UTF-8
-
-Wed Sep 7 23:41:24 2011 Kouhei Sutou <kou@cozmixng.org>
-
- * lib/rexml/parsers/baseparser.rb, test/rexml/test_comment.rb:
- allow a single hyphen in comment. [Bug #5278] [ruby-core:39289]
- Reported by Thomas Fritzsche. Thanks!!!
-
-Wed Sep 7 17:27:18 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/yaml.rb: explicitly specify ::Object to avoid the collision with
- Syck::Object.
-
-Tue Sep 6 21:06:49 2011 Shota Fukumori <sorah@tubusu.net>
-
- * lib/test/unit.rb (_run_suites): Now reports are written the
- following order: Skip, Failure, Error. [Feature #5282]
-
- * test_sorting.rb: test for above.
-
- * test4test_sorting.rb: Ditto.
-
- * lib/test/unit.rb (run): Put RUBY_DESCRIPTION before quitting.
- [Feature #5282]
-
-Tue Sep 6 21:13:47 2011 Masaya Tarui <tarui@ruby-lang.org>
-
- * win32/Makefile.sub (INSNS): change command line option -Ks to -Ku
- for generate *.inc. because insns.def encoding has been changed SJIS
- to UTF-8. if $BASERUBY is 1.9, -Ks cause an error. [Feature #5128]
- (same as r33194)
-
-Tue Sep 6 15:55:24 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * transcode.c (load_transcoder_entry): concatenate paths directly.
-
- * encoding.c (load_encoding): predefined encoding names are safe.
- [ruby-dev:44469] [Bug #5279]
-
- * transcode.c (load_transcoder_entry): ditto.
-
-Tue Sep 6 12:07:10 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * transcode.c: enabled econv newline option.
-
-Tue Sep 6 06:44:57 2011 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * numeric.c (dbl2ival): Fix Float#divmod and #round for 32 bit
- platform. part 1 of [bug #5276]
-
-Tue Sep 6 06:44:25 2011 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * numeric.c (flo_round): Fix criteria for 32 bits platform
- part 2 of [bug #5276]
-
-Tue Sep 6 05:37:11 2011 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
-
- * test/rinda/test_rinda.rb (test_core_03_notify): Fixed test failures
- [ruby-dev:44430] [Ruby 1.9 - Bug #372]
-
-Mon Sep 5 20:59:30 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * insns.def: change encoding pragma for emacs (shift_jis to utf-8).
-
-Mon Sep 5 19:32:15 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * Makefile.in (INSNS): change command line option -Ks to -Ku for
- generate *.inc. because insns.def encoding has been changed SJIS to
- UTF-8. if $BASERUBY is 1.9, -Ks cause an error. [Feature #5128]
-
-Mon Sep 5 18:10:56 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * transcode.c (rb_econv_binmode): newline decorators are
- exclusive.
-
-Mon Sep 5 15:03:37 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * test/rubygems/test_gem_security.rb
- (test_class_build_self_signed_cert): reset opt[:trust_dir] to apply
- temporary Gem.user_home.
-
-Mon Sep 5 10:04:35 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * README.ja, README.EXT.ja: resolve conflicts. [ruby-dev:44459]
-
-Mon Sep 5 05:13:22 2011 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * numeric.c (flo_round): Make Float#round round big values [bug
- #5272]
-
-Mon Sep 5 04:28:25 2011 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * numeric.c (int_round): Integer#round always returns an Integer [Bug
- #5271]
-
-Sun Sep 4 22:28:50 2011 Shugo Maeda <shugo@ruby-lang.org>
-
- * lib/net/imap.rb (default_port, default_imap_port,
- default_tls_port, default_ssl_port, default_imaps_port):
- added methods for consistency with Net::POP.
- based on the patch by art lussos. [ruby-core:38997] [Bug #5198]
-
-Sun Sep 4 21:19:19 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-
- * Change encoding from EUC-JP to UTF-8. [Feature #5128]
-
-Sun Sep 4 00:47:39 2011 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * test/ruby/test_fiber.rb (TestFiber#test_no_valid_cfp):
- add a test. Unlike TestThread#test_no_valid_cfp,
- this test succeeds even if win32ole is required (see r33153).
-
-Sun Sep 4 00:11:49 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * variable.c (rb_const_set): show the previous definition
- location. [EXPERIMENTAL]
-
-Sat Sep 3 23:56:24 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in (sizeof_struct_dirent_too_small): check if struct
- dirent.d_name is too small.
-
- * configure.in (RUBY_MINGW32): take tool prefix from CC.
-
-Sat Sep 3 23:52:08 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * io.c (argf_next_argv): open in default text mode.
- [ruby-core:39234] [Bug #5268]
-
-Sat Sep 3 18:40:57 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * lib/thread.rb (SizedQueue#max=): raise ArgumentError if max is not
- positive number. patch by Masaki Matsushita.
- [ruby-dev:44449] [Bug #5259]
-
- * test/thread/test_queue.rb (test_sized_queue_initialize,
- test_sized_queue_assign_max): add tests for it.
-
-Fri Sep 2 21:11:16 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * io.c (validate_enc_binmode, prep_stdio): default to text mode on
- dosish platforms. [ruby-core:38822] [Bug #5164]
-
- * transcode.c (rb_econv_prepare_options): keep default ecflags
- unchanged if no options.
-
-Fri Sep 2 14:36:47 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm_insnhelper.c (vm_search_const_defined_class): search
- ancestors only when global scope. [ruby-core:39227] [Bug #5264]
-
-Fri Sep 2 09:58:08 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (parser_tokadd_string, parser_yylex): ignore a backslash
- which prefixes an non-ascii character, which has no escape
- syntax. [ruby-core:39222] [Ruby 1.9 - Bug #5262]
-
-Fri Sep 2 04:05:25 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/visitors/yaml_tree.rb: emit strings tagged as
- ascii-8bit as binary in YAML.
- * test/psych/test_string.rb: corresponding test.
-
-Fri Sep 2 01:07:14 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * numeric.c (flo_round): substitute machine dependent magic number.
-
-Thu Sep 1 17:31:22 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * insns.def (defineclass), vm_insnhelper.c (vm_get_cvar_base): see
- also inherited constants for classes without superclass and
- modules. [ruby-core:37698] [Bug #3423]
-
-Thu Sep 1 16:18:44 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
-
- * Release GVL while OpenSSL's public key generation.
-
- t = Thread.new { print "."; sleep 0.1 }
- key = OpenSSL::PKey::RSA.new(2048)
- #=> Thread t works in parallel with public key generation if
- OS/machine allows it.
-
- This works with OpenSSL >= 0.9.8. From this version, it has new
- public key generation function which allows us to interrupt the
- execution while pkey generation iterations.
-
- * ext/openssl/extconf.rb: Check existence of OpenSSL's new public key
- generation function. (DH_generate_parameters_ex,
- DSA_generate_parameters_ex and RSA_generate_key_ex.
-
- * ext/openssl/ossl_pkey.{h,c} (ossl_generate_cb_2,
- ossl_generate_cb_stop): Added new callback function for OpenSSL pkey
- generation which handles Thread interruption by Ruby.
- ossl_generate_cb_stop is the unblock function(ubf) for Ruby which
- sets a stop flag. New pkey generation callback ossl_generate_cb_2
- checks the stop flag at each iterations of OpenSSL and interrupts
- pkey generation when the flag is set.
-
- * ext/openssl/ossl_pkey_dsa.c (dsa_generate): Call
- rb_thread_blocking_region with the above unblock function to release
- GVL while pkey generation.
-
- * ext/openssl/ossl_pkey_rsa.c (rsa_generate): ditto.
-
- * ext/openssl/ossl_pkey_dh.c (dh_generate): ditto.
-
- * test/openssl/test_pkey_{dh,dsa,rsa}.rb: Test it.
-
-Thu Sep 1 14:06:54 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/ruby/test_thread.rb (TestThread#test_no_valid_cfp): skip when
- win32ole is required. in such case, win32ole redefines
- Thread#initialize, and the block argument becomes to be not the top
- of the thread, then this testcase always fails.
-
-Thu Sep 1 10:20:50 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/ruby/test_io_m17n.rb (TestIO_M17N#test_{default_mode_on_dosish,
- default_mode_on_unix,text_mode,binary_mode}): sorry for wrong test
- committed in r33144. I'd misunderstood the spec of ruby's universal
- newline.
-
-Thu Sep 1 09:27:57 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * variable.c (rb_autoloading_value): Fix the order of definitions.
- It is used by autoload_defined_p.
-
-Wed Aug 31 17:28:23 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
-
- * variable.c (rb_autoload): There was a chance to run GC (from
- rb_str_new2()) before finishing autoload_data_i construction. It
- caused SEGV at rb_gc_mark() at autoload_i_mark.
-
- * variable.c (rb_autoload_load): Move RB_GC_GUARD() to proper
- position based on suggestion by CHIKANAGA Tomoyuki at
- http://d.hatena.ne.jp/nagachika/20110826/ruby_trunk_changes_33070_33078
-
- * variable.c (autoload_defined_p): Fix incompatible autoload behavior
- that causes Rails crash. Class definition instruction defined in
- 'defineclass' in insns.def always invokes rb_autoload_load for a
- constant. It's invoked for every class definition regardless of
- existence of autoload definition. rb_autoload_load checks if a
- constant is defined as autoloaded, but new thread-safe autoload
- returned different value if the constant is under autoloading.
-
-Wed Aug 31 17:20:56 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
-
- * Re-apply r33078, thread-safe autoload which is reverted at r33093.
-
-Wed Aug 31 16:28:04 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/ruby/test_io_m17n.rb (TestIO_M17N#test_{default_mode_on_dosish,
- default_mode_on_unix,text_mode,binary_mode}): tests for [Bug #5164].
-
-Wed Aug 31 15:54:11 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * ext/json: Merge json gem v1.5.4 (3dab4c5a6a97fac03dac).
-
-Wed Aug 31 13:09:41 2011 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * numeric.c (flo_round): Avoid overflow by optimizing for trivial
- cases [Bug #5227]
-
-Wed Aug 31 00:50:01 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/win32.c (rb_w32_select_with_thread): and my typo. we all must
- be more careful.
-
-Wed Aug 31 00:48:38 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * thread.c (rb_thread_select): critical typo in r33117.
-
-Wed Aug 31 00:30:49 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/-ext-/old_thread_select/test_old_thread_select.rb
- (TestOldThreadSelect#test_old_select_read_timeout): if the machine
- is fast enough, the time used by code around IO.select may be smaller
- than Time implement threshold.
-
-Wed Aug 31 00:04:38 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * ext/-test-/old_thread_select/old_thread_select.c (old_thread_select):
- typo.
-
- * test/-ext-/old_thread_select/test_old_thread_select.rb
- (TestOldThreadSelect#test_old_select_signal_safe): use SIGINT instead
- of SIGUSR1 because the former is general and the latter is platform
- dependent.
-
-Tue Aug 30 23:59:36 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/win32.c, include/ruby/intern.h (rb_w32_fd_copy): implement
- for rb_thread_select() in thread.c. the use of rb_fd_copy() is
- introduced in r33117.
- [Bug #5251] [ruby-core:39195]
-
- * thread.c (rb_thread_select): must call rb_fd_init() before using
- rb_fdset_t. see the implementations of rb_fd_init()s if you want to
- know the reason.
-
-Tue Aug 30 22:34:45 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * test/dl/test_callback.rb (test_callback_with_string): prevents
- temporary string from GC.
-
-Tue Aug 30 22:25:38 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * vm_insnhelper.c (vm_call_cfunc): revert r33112. RB_GC_GUARD macro
- protect a VALUE from GC. It's not for general anti-optimizing
- purpose.
-
-Tue Aug 30 11:06:19 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * ext/json: Merge json gem 1.5.4+ (2149f4185c598fb97db1).
- [Bug #5173] [ruby-core:38866]
-
-Tue Aug 30 09:57:50 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * lib/thread.rb (Queue#pop): fix a race against Thread.wakeup.
- Patch by Masaki Matsushita <glass.saga at gmail dot com>
- [Bug #5195] [ruby-dev:44400]
-
-Tue Aug 30 09:48:07 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * cont.c (fiber_entry): fix stack allocation failure on Debian
- GNU/kFreeBSD.
- Patch by Lucas Nussbaum <lucas at lucas-nussbaum dot net>.
- [Bug #5241] [ruby-core:39147]
-
-Tue Aug 30 09:28:01 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread.c (rb_thread_select): rewrite by using
- rb_thread_fd_select(). old one is EINTR unsafe.
- Patch by Eric Wong. [Bug #5229] [ruby-core:39102]
-
- * test/-ext-/old_thread_select/test_old_thread_select.rb:
- a testcase for rb_thread_select().
- * ext/-test-/old_thread_select/old_thread_select.c: ditto.
- * ext/-test-/old_thread_select/depend: ditto.
- * ext/-test-/old_thread_select/extconf.rb: ditto.
-
-Tue Aug 30 09:08:22 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * configure.in: fix a build failure on GNU Hurd.
- Patch by Samuel Thibault <sthibault at debian dot org>. Thank you!
- [Bug #5250] [ruby-core:39185]
-
-Sun Aug 29 23:22:00 2011 Kenta Murata <mrkn@mrkn.jp>
-
- * test/ruby/test_numeric.rb (test_num2long): modify a test against the
- change by r33108.
-
-Sun Aug 29 09:58:00 2011 Kenta Murata <mrkn@mrkn.jp>
-
- * numeric.c (bit_coerce): A Fixnum and a Bignum are only permitted for
- bitwise arithmetic with a Fixnum. #1792
-
- * test/ruby/test_fixnum.rb: add tests for the above change.
-
- * bignum.c (bit_coerce): A Fixnum and a Bignum are only permitted for
- bitwise arithmetic with a Bignum. #1792
-
- * test/ruby/test_bignum.rb: add tests for the above change.
-
-Sun Aug 28 15:38:17 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * ext/date/date_parse.c (date_zone_to_diff): keep a temporary string
- stored in variable while the contents buffer is being used.
-
- * ext/date/date_parse.c (date_zone_to_diff): get rid of out of bounds
- memory read. [ruby-dev:44409] [Bug #5213]
-
-Sun Aug 28 05:29:50 2011 Ryan Davis <ryand-ruby@zenspider.com>
-
- * lib/minitest/*: Imported minitest 2.5.1 (r6596)
- * test/minitest/*: ditto
-
-Sat Aug 27 20:46:05 2011 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * vm.c (rb_vm_rewrite_dfp_in_errinfo): change return type
- to suppress a warning.
-
- * vm_core.h: ditto.
-
-Sat Aug 27 19:04:06 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * internal.h (rb_strftime_timespec): moved from time.c and define only
- if ruby/encoding.h is included.
-
- * internal.h (rb_strftime): ditto.
-
-Sat Aug 27 18:53:51 2011 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * proc.c (proc_new): force to rewrite errinfo when calling Proc.new in ensure.
- [Bug #5234] [ruby-core:39125]
- This code will be removed after changing throw mechanism (see r33064).
-
- * vm.c (rb_vm_rewrite_dfp_in_errinfo): new function.
-
- * vm.c (vm_make_env_each): changed accordingly.
-
- * vm_core.h: ditto.
-
- * bootstraptest/test_flow.rb: add tests for above.
-
-Sat Aug 27 18:44:06 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * internal.h (rb_strftime_timespec): move to time.c because it depends
- encoding.h.
-
-Sat Aug 27 18:17:58 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * strftime.c (rb_strftime_with_timespec): get enc argument to specify
- the encoding of the format. On Windows (at least Japanese Windows),
- Time#strftime("%Z") includes non ASCII in locale encoding (CP932).
- So convert locale to default internal. [ruby-core:39092] [Bug #5226]
-
- * strftime.c (rb_strftime): ditto.
-
- * strftime.c (rb_strftime_timespec): ditto.
-
- * internal.h (rb_strftime_timespec): follow above.
-
- * time.c (rb_strftime_alloc): ditto.
-
- * time.c (strftimev): ditto.
-
- * time.c (time_strftime): ditto.
-
- * time.c (time_to_s): the resulted string of Time#to_s is always
- ascii only, so this should be US-ASCII.
-
- * time.c (time_asctime): ditto.
-
-Sat Aug 27 11:18:12 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
-
- * Revert r33078. It caused a Rails application NoMethodError.
-
- /home/nahi/git/emptyApp/ruby/1.9.1/gems/rack-mount-0.6.14/lib/rack/mount/utils.rb:157: warning: toplevel constant ScanError referenced by Regin::Parser::ScanError
- /home/nahi/git/emptyApp/ruby/1.9.1/gems/rack-mount-0.6.14/lib/rack/mount/vendor/regin/regin/parser.rb:17:in `parse_regexp': undefined method `scan_str' for #<Regin::Parser:0x00000002344548> (NoMethodError)
-
-Sat Aug 27 08:44:58 2011 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc: Import RDoc 3.9.4. Typo and grammar fixes by Luke Gruber.
- [Ruby 1.9 - Bug #5203]
-
-Sat Aug 27 07:53:34 2011 Eric Hodel <drbrain@segment7.net>
-
- * lib/open-uri.rb: Fix indentation of OpenURI::OpenRead#open. Use ++
- instead of `' for method arguments in open-uri.rb
-
-Sat Aug 27 07:22:07 2011 Eric Hodel <drbrain@segment7.net>
-
- * ext/pathname/lib/pathname.rb: Fix typos and grammar mistakes. Patch
- by Luke Gruber. [#5203]
- * ext/pty/lib/expect.rb: ditto
- * lib/mathn.rb: ditto
- * lib/net/http.rb: ditto
- * lib/open-uri.rb: ditto
- * lib/ostruct.rb: ditto
- * lib/tempfile.rb: ditto
- * lib/thread.rb: ditto
- * lib/weakref.rb: ditto
- * sample/webrick/httpproxy.rb: ditto
-
-Sat Aug 27 04:03:18 2011 Koichi Sasada <ko1@atdot.net>
-
- * iseq.c (iseq_data_to_ary): fix type of variable
- (long -> unsigned long) to suppress a warning.
-
-Sat Aug 27 04:02:11 2011 Koichi Sasada <ko1@atdot.net>
-
- * vm_core.h: add a decl. of rb_autoloading_value().
-
-Fri Aug 26 19:12:08 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
-
- * variable.c: Make autoload thread-safe. See #921.
-
- What's the problem?
- autoload is thread unsafe. When we define a constant to be
- autoloaded, we expect the constant construction is invariant. But
- current autoload implementation allows other threads to access the
- constant while the first thread is loading a file.
-
- What's happening inside?
- The current implementation uses Qundef as a marker of autoload in
- Constant table. Once the first thread find Qundef as a value at
- constant lookup, it starts loading a defined feature. Generally a
- loaded file overrides the Qundef in Constant table by module/class
- declaration at very beginning lines of the file, so other threads
- can see the new Module/Class object before feature loading is
- finished. It breaks invariant construction.
-
- How to solve?
- To ensure invariant constant construction, we need to override
- Qundef with defined Object after the feature loading. For keeping
- Qundef in Constant table, I expanded autoload_data struct in
- Module to have a slot for keeping the defined object while feature
- loading. And changed Module's constant lookup/update logic a
- little so that the slot is only visible from the thread which
- invokes feature loading. (== the first thread which accessed the
- autoload constant)
-
- Evaluation?
- All test passes (bootstrap test, test-all and RubySpec) and added
- 8 tests for threading behavior. Extra logics are executed only
- when Qundef is found, so no perf drop should happen except
- autoloading.
-
- * variable.c (rb_autoload): Prepare new autoload_data struct.
-
- * variable.c (rb_autoload_load): Load feature and update Constant
- table after feature loading is finished.
-
- * variable.c (rb_const_get_0): When the fetched constant is under
- autoloading, it returns the object only for the thread which starts
- autoloading.
-
- * variable.c (rb_const_defined_0): Ditto.
-
- * variable.c (rb_const_set): When the specified constant is under
- autoloading, it sets the object only for the thread which starts
- autoloading. Otherwise, simply overrides Qundef with constant
- override warning.
-
- * vm_insnhelper.c (vm_get_ev_const): Apply same change as
- rb_const_get_0 in variable.c.
-
- * test/ruby/test_autoload.rb: Added tests for threading behavior.
-
-Fri Aug 26 10:10:37 2011 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems: Update to RubyGems 1.8.10. Fixes security issue in
- creating ruby-format gemspecs. Fixes Gem.dir not being at the front
- of Gem.path to fix uninstall and cleanup commands. Fixes gem
- uninstall stopping on the first missing gem.
-
-Fri Aug 26 08:21:10 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * time.c (strftimev): Make Time#to_s default to US-ASCII encoding but
- respect Encoding.default_internal. [ruby-core:39092]
- * test/ruby/test_time.rb (class TestTime): Corresponding test.
-
-Thu Aug 25 09:43:16 2011 Eric Hodel <drbrain@segment7.net>
-
- * ext/openssl/lib/openssl/bn.rb: Hide copyright info from RDoc.
- * ext/openssl/lib/openssl/digest.rb: ditto
- * ext/openssl/lib/openssl/x509.rb: ditto
- * ext/openssl/lib/openssl/cipher.rb: ditto
-
-Thu Aug 25 09:25:48 2011 Eric Hodel <drbrain@segment7.net>
-
- * ext/openssl/ossl_digest.c: Document OpenSSL::Digest::digest and add
- an example to OpenSSL::Digest. Patch by Sylvain Daubert.
- [Ruby 1.9 - Bug #5166]
- * ext/openssl/lib/openssl/digest.rb (module OpenSSL): ditto
-
-Thu Aug 25 08:19:43 2011 Koichi Sasada <ko1@atdot.net>
-
- * vm.c (vm_make_env_each): work around to solve Bug #2729.
- fixes: Bug #2729
- a patch from Kazuki Tsujimoto <kazuki@callcc.net>
- This problem is caused by changing dfp (dynamic env pointer)
- from saved dfp. Saved dfp is pointed env in VM stack. However,
- the dfp can be moved because VM copies env from VM stack to
- the heap. At this copying, dfp was also changed. To solve this
- problem, I'll try to change throw mechanism (not save target dfp,
- but save target cfp).
-
- * bootstraptest/test_flow.rb: add a test for above.
-
-Thu Aug 25 07:57:33 2011 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * numeric.c (int_round): Fix Integer#round [ruby-core:39096]
-
-Thu Aug 25 07:00:00 2011 Koichi Sasada <ko1@atdot.net>
-
- * vm_insnhelper.h, vm_insnhelper.c, vm.c, vm_method.c, insns.def:
- Manage a redefinition of special methods for each classes.
- A patch from Joel Gouly <joel.gouly@gmail.com>. Thanks!
-
-Thu Aug 25 06:51:08 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych.rb: Fixing psych version number.
- * ext/psych/psych.gemspec: updating the gemspec.
-
-Thu Aug 25 06:11:35 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/nodes/node.rb: default `to_yaml` encoding to be
- UTF-8.
- * test/psych/test_encoding.rb: test yaml dump encoding.
-
-Thu Aug 25 01:24:33 2011 Naohisa Goto <ngotogenome@gmail.com>
-
- * test/fileutils/test_fileutils.rb (test_chmod_symbol_mode): Solaris
- seems to behave the same as FreeBSD.
-
-Thu Aug 25 01:11:36 2011 Naohisa Goto <ngotogenome@gmail.com>
-
- * test/ruby/test_rubyoptions.rb (test_script_from_stdin): slave pty
- should be manipulated because master pty may not be a tty on some
- environment (e.g. Solaris). [Bug:#5222] [ruby-dev:44420]
-
-Wed Aug 24 15:13:56 2011 Koichi Sasada <ko1@atdot.net>
-
- * iseq.h, iseq.c, compile.c: Change the line number data structure
- to solve an issue reported at [ruby-dev:44413] [Ruby 1.9 - Bug #5217].
- Before this fix, each instruction has an information including
- line number (iseq::iseq_insn_info_table). Instead of this data
- structure, recording only line number changing places
- (iseq::iseq_line_info_table).
- The order of entries in iseq_line_info_table is ascending order of
- iseq_line_info_table_entry::position. You can get a line number
- by an iseq and a program counter with this data structure.
- This fix reduces memory consumption of iseq (bytecode).
- On my measurement, a rails application consumes 21.8MB for
- iseq with this fix on the 32bit CPU. Without this fix, it
- consumes 24.7MB for iseq [ruby-dev:44415].
-
- * proc.c: ditto.
-
- * vm_insnhelper.c: ditto.
-
- * vm_method.c: ditto.
-
- * vm.c (rb_vm_get_sourceline): change to use rb_iseq_line_no().
-
-Wed Aug 24 09:49:10 2011 Koichi Sasada <ko1@atdot.net>
-
- * insns.def (defined): fix to checking class variable.
- A patch by Magnus Holm <judofyr@gmail.com>. Thanks!
-
- * test/ruby/test_variable.rb: add a test for above.
-
-Wed Aug 24 08:53:06 2011 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc: Update to RDoc 3.9.3. Fixes RDoc with `ruby -Ku`. Allows
- HTTPS image paths to be turned into <img> tags. Prevents special
- markup inside <tt> from being processed.
-
-Wed Aug 24 07:57:43 2011 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems: Update to RubyGems 1.8.9. Fixes uninstalling multiple
- gems and gem cleanup.
-
-Wed Aug 24 06:45:20 2011 Ryan Davis <ryand-ruby@zenspider.com>
-
- * lib/minitest/*: Imported minitest 2.5.0 (r6557)
- * test/minitest/*: ditto
-
-Wed Aug 24 00:38:22 2011 Yusuke Endoh <mame@tsg.ne.jp>
-
- * thread.c (update_coverage): skip coverage count up if the current
- line is out of the way. rb_sourceline() is unreliable when source
- code is big. [ruby-dev:44413]
-
- * test/coverage/test_coverage.rb: add a test for above.
-
-Tue Aug 23 15:23:56 2011 Eric Hodel <drbrain@segment7.net>
-
- * load.c (rb_f_require): Improve documentation of Kernel#require.
- [Ruby 1.9 - Bug #5210]
-
-Tue Aug 23 11:27:26 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
-
- * ext/zlib/zlib.c (gzfile_read_header): Ensure that each section of
- gzip header is readable to avoid SEGV.
-
- * test/zlib/test_zlib.rb (test_corrupted_header): Test it.
-
-Mon Aug 22 23:43:33 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * sprintf.c (rb_str_format): add RB_GC_GUARD to prevent temporary
- strings from GC.
-
-Sun Aug 21 17:49:53 2011 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * iseq.c (iseq_s_disasm): remove variable which is no longer used
- since r33013.
-
-Sun Aug 21 14:20:58 2011 Naohisa Goto <ngotogenome@gmail.com>
-
- * configure.in: use LD_LIBRARY_PATH_64 on 64-bit Solaris.
-
-Sat Aug 20 13:19:52 2011 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * iseq.c (iseq_s_disasm): fix a bug that may cause SEGV.
-
- * test/ruby/test_method.rb (test_body): add a test for the above change.
-
-Sat Aug 20 10:43:24 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/stringio/stringio.c (strio_read): return new string if nil
- is explicitly given as a buffer ([Bug #5207]), otherwise set the
- encoding. also removed dead code.
-
-Fri Aug 19 14:25:51 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * process.c (proc_spawn_v, proc_spawn): should not wait the
- spawned process.
-
- * process.c (proc_spawn_v): fix missing argument, and try with
- /bin/sh only if failed with ENOEXEC.
-
-Fri Aug 19 14:12:57 2011 Shugo Maeda <shugo@ruby-lang.org>
-
- * lib/net/imap.rb (idle): raises a Net::IMAP::Error when the
- connection is closed. based on the patch by Hugo Barauna.
- [Bug #5190] [ruby-core:38930]
-
-Fri Aug 19 13:18:00 2011 Kenta Murata <mrkn@mrkn.jp>
-
- * configure.in: defines _DARWIN_UNLIMITED_SELECT if the target_os
- is darwin.
-
-Fri Aug 19 13:14:00 2011 Kenta Murata <mrkn@mrkn.jp>
-
- * thread.c: add a description for the behavior of select(2) on
- Mac OS X 10.7 (Lion).
-
-Fri Aug 19 11:28:58 2011 Shugo Maeda <shugo@ruby-lang.org>
-
- * lib/net/imap.rb (msg_att): accepts extra space before ')'.
- based on the patch by art lussos. [Bug #5163] [ruby-core:38820]
-
-Wed Aug 17 23:01:00 2011 Kenta Murata <mrkn@mrkn.jp>
-
- * ext/bigdecimal/bigdecimal.c (cannot_be_coerced_into_BigDecimal):
- remove duplication.
-
-Wed Aug 17 15:27:00 2011 Kenta Murata <mrkn@mrkn.jp>
-
- * ext/bigdecimal/bigdecimal.c (cannot_be_coerced_into_BigDecimal):
- add a new function for raising error when an object cannot coerce
- into BigDecimal. [Bug #5172]
-
- * ext/bigdecimal/bigdecimal.c (BigDecimalValueWithPrec): use
- cannot_be_coerced_into_BigDecimal function.
-
- * ext/bigdecimal/bigdecimal.c (BigMath_s_exp): ditto.
-
- * ext/bigdecimal/bigdecimal.c (BigMath_s_log): ditto.
-
- * test/bigdecimal/test_bigdecimal.rb: test for the above changes.
-
- * test/bigdecimal/testbase.rb (under_gc_stress): add a new utility
- method to run tests under the condition of GC.stress = true.
-
-Wed Aug 17 10:16:00 2011 Kenta Murata <mrkn@mrkn.jp>
-
- * rational.c (nurat_coerce): Rational#coerce should converts itself
- into Complex if the argument is a Complex with non-zero imaginary
- part. [Bug #5020] [ruby-dev:44088]
-
- * test/ruby/test_rational.rb (test_coerce): test for the above change.
-
-Wed Aug 17 06:33:19 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * ext/openssl/ossl_x509cert.c: Add class documentation for
- OpenSSL::X509::Certificate.
-
-Wed Aug 17 04:54:25 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * ext/openssl/ossl_pkey.c: corrected docs, OpenSSL::PKey::DH does
- *not* support #sign/verify.
-
-Tue Aug 16 18:56:54 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm.c (ruby_threadptr_data_type): rename to hide.
- [ruby-core:38972]
-
-Tue Aug 16 18:52:08 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * win32/mkexports.rb (Exports::Mswin#each_export): exclude Init_
- and _threadptr_ functions, as well as mingw.
-
-Tue Aug 16 09:31:44 2011 Eric Hodel <drbrain@segment7.net>
-
- * ext/dl: Add documentation. Patch by Vincent Batts.
- [Ruby 1.9 - Bug #5192]
-
-Tue Aug 16 08:48:26 2011 Eric Hodel <drbrain@segment7.net>
-
- * ext/.document (fiddle): Remove duplicate entry
- * ext/fiddle: Complete documentation of Fiddle. Patch by Vincent
- Batts. [#5192]
-
-Tue Aug 16 08:00:15 2011 Eric Hodel <drbrain@segment7.net>
-
- * ext/socket: Make Socket documentation appear. Add documentation for
- Socket, TCPServer, SOCKSSocket. Patch by Sylvain Daubert.
- [Ruby 1.9 - Feature #5182]
-
-Mon Aug 15 09:58:55 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * ext/openssl/ossl_ssl.c: Support disabling OpenSSL compression.
-
- * test/openssl/test_ssl.rb: Add a test for it.
- Thanks to Eric Wong for the patch.
- [Ruby 1.9 - Feature #5183] [ruby-core:38911]
-
-Sun Aug 14 05:57:01 2011 Tanaka Akira <akr@fsij.org>
-
- * test/socket/test_socket.rb (test_connect_timeout): added a test
- based on a patch by Eric Wong. [ruby-core:38910]
-
-Sat Aug 13 22:17:27 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * tool/mkconfig.rb: do not make the entries related to sitedir and
- verdordir if disabled by --without options. [ruby-core:38922]
- [Bug #5187]
-
-Sat Aug 13 17:03:22 2011 Tadayoshi Funaba <tadf@dotrb.org>
-
- * ext/date/date_core.c: [ruby-core:38861]
-
-Sat Aug 13 09:39:07 2011 Tadayoshi Funaba <tadf@dotrb.org>
-
- * test/date/test_*.rb: added tests.
-
-Sat Aug 13 09:36:19 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * ext/date/date_parse.c (parse_ddd_cb): fix r32896. RB_GC_GUARD
- insertion position was mistaken. [ruby-dev:44337] [Bug #5152]
-
-Sat Aug 13 09:26:24 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/core_ext.rb: Make Kernel#y private.
- [ruby-core:38913]
-
- * test/psych/test_yaml.rb: corresponding test.
-
-Sat Aug 13 09:05:16 2011 Tadayoshi Funaba <tadf@dotrb.org>
-
- * ext/date/date_core.c (date_strftime_alloc): followed the change
- of r32885.
-
- * doc/NEWS-1.9.3: followed the above change.
-
-Sat Aug 13 08:55:38 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych/scalar_scanner.rb: Only consider strings
- with fewer than 2 dots to be numbers. [ruby-core:38915]
-
-Sat Aug 13 08:47:20 2011 Tadayoshi Funaba <tadf@dotrb.org>
-
- * ext/date/date_core.c: [ruby-core:38855].
-
-Sat Aug 13 03:41:37 2011 Eric Hodel <drbrain@segment7.net>
-
- * lib/uri/common.rb: Fix documentation of URI::Parser.new. Patch by
- Steve Klabnik. [Ruby 1.9 - Bug #5177]
-
-Sat Aug 13 02:19:57 2011 Eric Hodel <drbrain@segment7.net>
-
- * ext/digest/digest.c: Add documentation for the Digest module. Patch
- by Sylvain Daubert. [Ruby 1.9 - Bug #5167]
-
-Sat Aug 13 01:56:11 2011 Eric Hodel <drbrain@segment7.net>
-
- * lib/rake: Update to Rake 0.9.2.2. Prevent pollution of toplevel
- namespace by Commands. Remove unused variable and debugging
- statement in tests.
-
-Fri Aug 12 11:39:35 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * configure.in: Describe "no" configure option for site_ruby
- and vendor_ruby. Patch by Vit Ondruch. [Bug #5187][ruby-core:38921]
-
-Fri Aug 12 09:00:24 2011 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems: Import RubyGems 1.8.8. Fixes encoding of YAML gemspec
- from gems. Github Issue #149
-
-Fri Aug 12 08:17:46 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/socket/ipsocket.c (init_inetsock_internal): use SOMAXCONN for
- listen backlog.
-
- * ext/socket/unixsocket.c (rsock_init_unixsock): ditto.
-
- * ext/socket/lib/socket.rb (Addrinfo#listen): ditto.
- (Socket.tcp_server_sockets_port0): ditto.
-
- * ext/socket/mkconstants.rb: define SOMAXCONN as 5 if not available.
-
- [ruby-core:38493]
-
-Fri Aug 12 03:24:35 2011 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc: Import RDoc 3.9.2. Fixes TIDYLINK for HTML output.
-
-Thu Aug 11 15:37:42 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
-
- * variable.c (autoload_delete): An autoload entry is still in a
- RCLASS_IV_TBL, not in a RCLASS_CONST_TBL, so take back the table
- changed in r29600. And an autoload entry keeps not a
- rb_const_entry_t but a NODE so remove rb_const_entry_t thing added
- in r29602.
-
-Thu Aug 11 15:07:36 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/mkmf.rb (link_command): use LIBRUBYARG in rbconfig for
- unbundled extensions. [ruby-core:38802] [Bug #5147]
-
- * lib/mkmf.rb (init_mkmf): revert r32902. [ruby-core:38903]
-
-Wed Aug 10 23:03:55 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/socket/lib/socket.rb: fix argument check in the previous commit.
-
-Wed Aug 10 22:12:28 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/socket/lib/socket.rb (Socket.tcp): add :connect_timeout option.
- (Addrinfo#connect_from): add :timeout option.
- (Addrinfo#connect): ditto.
- (Addrinfo#connect_to): ditto.
- [ruby-core:38538]
-
-Wed Aug 10 21:27:19 2011 Tanaka Akira <akr@fsij.org>
-
- * lib/net/pop.rb: fix typo in document.
-
- * lib/net/http.rb: ditto.
-
- * lib/net/imap.rb: ditto.
-
-Wed Aug 10 19:30:00 2011 Kenta Murata <mrkn@mrkn.jp>
-
- * complex.c (nucomp_rationalize): calls rationalize of real part if
- imaginary part is exactly zero. The patch is made by Marc-Andre
- Lafortune. fixes [Bug #5178] [ruby-core:38885]
-
- * test/ruby/test_complex.rb (test_rationalize): add a test for the
- above change.
-
- * complex.c (nucomp_to_r): fix RDoc comment. The patch is made by
- Marc-Andre Lafortune.
-
-Wed Aug 10 14:11:07 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/mkmf.rb (init_mkmf): set $LIBRUBYARG regardless of shared
- option. [ruby-core:38802] [Bug #5147]
-
-Wed Aug 10 02:53:27 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/net/http.rb: come back autoload. OpenSSL constant is used
- some places, so it leads mistakes like HTTP.start.
-
-Tue Aug 9 22:57:45 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * ext/date/date_parse.c (date_zone_to_diff): add RB_GC_GUARD.
- [ruby-dev:44337] [Bug #5152]
-
- * ext/date/data_parse.c (parse_ddd_cb): ditto.
-
-Tue Aug 9 14:25:47 2011 Naohisa Goto <ngotogenome@gmail.com>
-
- * ext/fiddle/conversions.c (generic_to_value): ffi_arg and ffi_sarg
- should be used to handle shorter return value. fix [Bug #3861]
- [ruby-core:32504]
-
- * ext/fiddle/closure.c (callback): ditto
-
- * ext/fiddle/conversions.h (fiddle_generic): ditto
-
- * ext/fiddle/conversions.c (value_to_generic): char, short and int
- are strictly distinguished on big-endian CPU, e.g. sparc64.
-
-Tue Aug 9 11:21:08 2011 Narihiro Nakamura <authornari@gmail.com>
-
- * gc.c (gc_lazy_sweep): if sweep target slots are not found, we
- try heap_increment() because it might be able to expand the
- heap. [Bug #5127] [ruby-dev:44285]
-
- * gc.c (gc_clear_mark_on_sweep_slots): if a sweeping was
- interrupted, we expand the heap if at all possible.
-
-Tue Aug 9 12:20:33 2011 Naohisa Goto <ngotogenome@gmail.com>
-
- * test/fiddle/helper.rb (libc_so, libm_so): Solaris support added.
- [ruby-core:38853] [Bug #5168]
-
- * test/dl/test_base.rb (libc_so, libm_so): on Solaris, remove libc
- and libm version numbers for detecting default libc and libm.
-
-Tue Aug 9 09:18:04 2011 Eric Hodel <drbrain@segment7.net>
-
- * ext/zlib/zlib.c (gzfile_wrap): Document encoding options.
-
- * ext/zlib/zlib.c (rb_gzwriter_s_open): ditto
-
- * ext/zlib/zlib.c (rb_gzreader_s_open): ditto
-
-Sun Aug 7 23:31:32 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * time.c (rb_strftime_alloc): raise ERANGE if width is too large.
- Patch by Nobuyoshi Nakada. [Bug #4457] [ruby-dev:43285]
-
- * test/ruby/test_time.rb (class TestTime): add a test for the
- above change.
-
-Sun Aug 7 22:51:45 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * ext/openssl/ossl_asn1.c (decode_eoc): remove unused variables.
- Patch by Eric Wong. [Feature #5157] [ruby-core:38798]
-
- * ext/openssl/ossl_asn1.c (ossl_asn1_decode): ditto.
-
- * ext/openssl/ossl_pkey.c (ossl_pkey_new_from_data): ditto.
-
-Sun Aug 7 22:37:08 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * configure.in: add -Wunused-variable to default CFLAGS.
- Patch by Eric Wong. [Feature #5157] [ruby-core:38798]
-
-Sun Aug 7 15:37:35 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * ext/digest/sha2/sha2ossl.c: use original SHA384_Final on DragonFly.
-
-Sun Aug 7 14:08:16 2011 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * ext/objspace/objspace.c: fix typos in a document.
-
-Sun Aug 7 07:14:57 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * cont.c (HAVE_GETCONTEXT): see getcontext(3) because DragonFly BSD
- x64 port doesn't have it.
-
-Sun Aug 7 00:42:55 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * ext/tk/lib/tk/wm.rb (Tk::Wm.command): Add the missing receiver
- before calling epath. patched by flori
- https://github.com/flori/ruby/commit/aa9474d32e5f2c57f8b0e2e0c528a03f06a4d433
-
-Sat Aug 6 07:06:34 2011 Eric Hodel <drbrain@segment7.net>
-
- * marshal.c (w_object): Fix exception message when _dump_data is not
- defined on a T_DATA object.
-
-Fri Aug 5 22:16:20 2011 Naohisa Goto <ngotogenome@gmail.com>
-
- * numeric.c (rb_infinity, rb_nan): use WORDS_BIGENDIAN to get endian.
- fix [Bug #5160] [ruby-dev:44356]
-
-Fri Aug 5 17:14:11 2011 Akinori MUSHA <knu@iDaemons.org>
-
- * test/test_syslog.rb (TestSyslog#test_log): Do not be too
- specific about the log line format. Fixes #5081.
-
-Fri Aug 5 15:57:10 2011 Naohisa Goto <ngotogenome@gmail.com>
-
- * complex.c (f_signbit): fix compile error in gcc4 on Solaris with
- CFLAGS="-std=gnu99". [ruby-dev:44355] fix [Bug #5159]
-
- * math.c: ditto.
-
-Fri Aug 5 15:55:33 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * test/ruby/test_object.rb: tests that respond_to? returns false.
-
-Fri Aug 5 13:32:43 2011 Shugo Maeda <shugo@ruby-lang.org>
-
- * lib/xmlrpc/client.rb, lib/xmlrpc/server.rb: should use
- String#bytesize instead of String#size.
-
-Fri Aug 5 12:18:20 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * vm_eval.c (check_funcall): try respond_to? first if redefined.
- [Bug #5158]
-
-Fri Aug 5 09:48:22 2011 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems: Import RubyGems 1.8.7:
- Added missing require for `gem uninstall --format-executable`.
-
- The correct name of the executable being uninstalled is now displayed
- with --format-executable.
-
- Fixed `gem unpack uninstalled_gem` default version picker.
-
- RubyGems no longer claims a nonexistent gem can be uninstalled.
-
- `gem which` no longer claims directories are requirable files.
-
- `gem cleanup` continues cleaning up gems if one can't be uninstalled
- due to permissions. Issue #82.
-
- Gem repository directories are no longer created world-writable.
- Patch by Sakuro OZAWA. [Ruby 1.9 - Bug #4930]
-
-Fri Aug 5 07:00:31 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * test/io/console/test_io_console.rb (test_noctty): daemon() on
- Fedora Rawhide seems not to detach the controlling terminal,
- when the argument noclose is non-zero. ref: [Bug #5135]
-
-Thu Aug 4 23:48:00 2011 Kenta Murata <mrkn@mrkn.jp>
-
- * thread_pthread.c (native_cond_signal): retry to call pthread_cond_signal
- and pthread_cond_broadcast if they return EAGAIN in
- native_cond_signal and native_cond_broadcast, respectively.
- It is for the pthread implementation of Mac OS X 10.7 (Lion).
- fixes #5155. [ruby-dev:44342].
-
- * thread_pthread.c (native_cond_broadcast): ditto.
-
- * thread_pthread.c (struct cached_thread_entry): stop using
- pthread_cond_t and its functions directly.
-
- * thread_pthread.c (register_cached_thread_and_wait): ditto.
-
- * thread_pthread.c (use_cached_thread): ditto.
-
-Thu Aug 4 20:29:41 2011 Naohisa Goto <ngotogenome@gmail.com>
-
- * configure.in: when Solaris cc, use $(CC) to link shared libs.
-
-Thu Aug 4 20:19:11 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * error.c (report_bug): use a small message buffer instead of BUFSIZ.
- It is needed for avoiding nested SIGSEGV on Linux.
- Note: BUFSIZ is not proper buffer size. It's unrelated with maximum
- filename length. :-/
- [Bug #5139] [ruby-dev:44315]
-
-Thu Aug 4 16:08:45 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * tool/rbinstall.rb (gem): install all gemspecs under lib and ext.
-
- * tool/rbinstall.rb (Gem::Specification): may not be defined when
- cross-compiling and BASERUBY is 1.8.
-
-Thu Aug 4 11:30:36 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * include/ruby/missing.h: define __syscall on OpenBSD as r32702.
-
-Thu Aug 4 03:02:54 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * tool/rbinstall.rb: use rubygems to load gemspecs, copy actual
- gemspecs on install rather than generate fake ones for all gems.
-
-Thu Aug 4 02:45:10 2011 Kenta Murata <mrkn@mrkn.jp>
-
- * configure.in: set CXX variable to the C++ compiler that matches the
- C compiler specified by CC variable (e.g. use g++-4.2 for gcc-4.2).
-
-Thu Aug 4 02:21:10 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * lib/mkmf.rb (link_command): use static library only for bundled
- extensions. [Bug #5147]
-
-Thu Aug 4 02:02:10 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/psych.gemspec: installing psych as a gem.
-
-Wed Aug 3 16:01:35 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * util.c, include/ruby/util.h (ruby_add_suffix): remove the function.
- [Bug #5153] [ruby-core:38736]
-
- * io.c (argf_next_argv): remove the call of above function.
-
- * ext/-test-/add_suffix, test/-ext-/test_add_suffix.rb: remove the test
- extension module because this is only for testing ruby_add_suffix().
-
- * LEGAL: remove the mention about a part of util.c, because now we
- removed the part.
-
- * io.c (argf_next_argv): now the new filename is not guaranteed to
- use, so should check the return value of rename(2).
-
- * test/ruby/test_argf.rb (TestArgf#test_inplace_rename_impossible):
- now we expect same result with other platforms on no_safe_rename
- platforms (=Windows).
-
-Wed Aug 3 09:18:08 2011 URABE Shyouhei <shyouhei@ruby-lang.org>
-
- * test/xmlrpc/webrick_testing.rb (WEBrick_Testing#start_server):
- Like r32795, bind address should be specified.
-
-Wed Aug 3 07:46:30 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * encoding.c (enc_find): mistakenly remained !. [Bug #5150]
-
-Wed Aug 3 00:11:08 2011 Tanaka Akira <akr@fsij.org>
-
- * lib/prettyprint.rb: update document. [ruby-core:36776]
-
-Tue Aug 2 22:04:46 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * gc.c (init_heap): allocate sigaltstack after heaps are allocated.
- [ruby-dev:44315] [Bug #5139]
-
- * vm.c (thread_free): use free because objspace is not ready.
-
- * vm.c (th_init): use malloc because objspace is not ready.
-
-Tue Aug 2 20:10:16 2011 Shota Fukumori <sorah@tubusu.net>
-
- * test/testunit/test_parallel.rb: pass "--ruby" option to
- test/testunit/tests_for_parallel/runner.rb. [Bug #5132] [ruby-dev:44303]
-
-Tue Aug 2 15:53:37 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * encoding.c (str_to_encoding): rename from to_encoding and
- use str_to_encindex.
-
- * encoding.c (str_to_encindex): split from to_encoding.
-
- * encoding.c (rb_to_encoding): use str_to_encoding.
-
- * encoding.c (rb_obj_encoding): don't bypass rb_encoding*.
- If it uses rb_encoding*, it bypass encindex. If it uses encindex,
- it doesn't bypass.
-
- * encoding.c (enc_find): add shortcut for encoding object, use
- str_to_encindex, and avoid bypass rb_encoding*.
-
-Tue Aug 2 12:03:16 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * hash.c (recursive_hash): hash value of emptied hash should be
- equal to an empty hash. [ruby-core:38650]
-
-Tue Aug 2 11:42:15 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (rb_enc_symname2_p): :! is valid symbol. [Bug #5136]
-
-Tue Aug 2 07:33:29 2011 URABE Shyouhei <shyouhei@ruby-lang.org>
-
- * test/net/http/test_http.rb (TestNetHTTP_version_1_1_methods#test_timeout_during_HTTP_session):
- If you connect to localhost, you should listen localhost.
-
- * test/net/http/test_https.rb (TestNetHTTPS#test_timeout_during_SSL_handshake):
- ditto.
-
-Tue Aug 2 06:18:15 2011 Luis Lavena <luislavena@gmail.com>
-
- * lib/rubygems/installer.rb (class Gem): Correct path check on Windows
- Possible fix for [Ruby 1.9 - Bug #5111]
- * test/rubygems/test_gem_installer.rb (load Gem): ditto
-
-Mon Aug 1 20:12:03 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/ruby/test_process.rb (TestProcess#windows?): new method.
-
- * test/ruby/test_process.rb (TestProcess#*): use above method.
-
- * test/ruby/test_process.rb (TestProcess#test_execopts_redirect):
- windows doesn't support FD_CLOEXEC.
-
-Mon Aug 1 15:45:23 2011 Eric Hodel <drbrain@segment7.net>
-
- * test/rake/test_rake_functional.rb: Don't assume the binary name of
- ruby is "ruby". [Ruby 1.9 - Bug #5114]
- * test/rake/helper.rb: ditto
-
-Mon Aug 1 15:31:14 2011 URABE Shyouhei <shyouhei@ruby-lang.org>
-
- * test/io/console/test_io_console.rb (TestIO_Console#test_sync):
- Skip when PTY allocation failed (that's not our fault).
-
-Mon Aug 1 15:04:12 2011 URABE Shyouhei <shyouhei@ruby-lang.org>
-
- * test/xmlrpc/test_webrick_server.rb (Test_Webrick#setup_http_server):
- XMLRPC::Client.new3(), when called without host: argument, tries
- to connect to a host where "localhost" resolves to. On the
- other hand a WEBrick::HTTPServer.new(), when called without
- BindAddress: argument, tries to listen all the address where
- getaddrinfo(AF_UNSPEC) resolves to. This is a mismatch because
- "localhost" might not resolve to one of those listening sockets.
- We would better explicitly specify "localhost" here and if
- failed, just skip the whole test.
-
-Mon Aug 1 14:24:56 2011 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc.rb: Import RDoc 3.9.1. Fixes bugs in the RDoc::Markup
- parser.
-
-Mon Aug 1 12:00:35 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * insns.def (concatstrings): don't use initial ASCII-8BIT string.
- [ruby-core:38635] [Bug #5126]
-
-Sun Jul 31 22:57:16 2011 Yuki Sonoda (Yugui) <yugui@yugui.jp>
-
- * enc/Makefile.in (ECHO1): Same as the recent fix in common.mk.
- ":" in a make variable replacement cause a syntax error with
- /usr/ccs/bin/make on Solaris. Uses $(NULLCMD) instead.
-
-Sun Jul 31 21:16:02 2011 Yuki Sonoda (Yugui) <yugui@yugui.jp>
-
- * complex.c (f_signbit): gcc4 on Solaris DOES have signbit but does
- not have it on header.
-
- * math.c: ditto.
-
-Sun Jul 31 21:09:04 2011 Yuki Sonoda (Yugui) <yugui@yugui.jp>
-
- * common.mk (node_name.inc): Use $(Q) for consistency.
-
- * Makefile.in (INSNS): ditto.
-
-Sun Jul 31 21:19:51 2011 Yuki Sonoda (Yugui) <yugui@yugui.jp>
-
- * lib/mkmf.rb (configuration:ECHO1): Same as the recent fix in
- common.mk.
- ":" in a make variable replacement cause a syntax error with
- /usr/ccs/bin/make on Solaris. Uses $(NULLCMD) instead.
-
-Sun Jul 31 20:39:12 2011 Yuki Sonoda (Yugui) <yugui@yugui.jp>
-
- * common.mk (ECHO1): nmake does not allow parenthesis in make variable
- replacement.
-
-Sun Jul 31 23:06:57 2011 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * vm.c (check_env): print debug messages to stderr.
- [Feature #4871] [ruby-dev:43743]
-
-Sun Jul 31 22:50:23 2011 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * vm.c (vm_make_env_each): don't save prev env value.
- It is no longer used. [Feature #4871] [ruby-dev:43743]
-
- * vm.c (check_env): changed accordingly.
-
-Sun Jul 31 20:21:36 2011 "Yuki Sonoda (Yugui)" <yugui@yugui.jp>
-
- * common.mk (ECHO1): ":" in a make variable replacement cause a syntax
- error with /usr/ccs/bin/make on Solaris. Uses $(NULLCMD) instead.
-
- * configure.in (NULLCMD): new check.
-
- * Makefile.in (NULLCMD): Reflects checking in configure.
-
- * win32/Makefile.sub (NULLCMD): new assignment.
-
-Sun Jul 31 18:58:59 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * io.c (rb_pipe): pipe on cygwin can succeed half but fail
- half.
-
-Sun Jul 31 11:31:07 2011 Kazuki Tsujimoto <kazuki@callcc.net>
-
- * vm.c: check if cfp is valid. [Bug #5083] [ruby-dev:44208]
-
-Sun Jul 31 09:18:28 2011 Eric Hodel <drbrain@segment7.net>
-
- * lib/rdoc: Update to RDoc 3.9. Fixed `ri []`, stopdoc creating an
- object reference, nodoc for class aliases, verbatim === lines.
-
-Sun Jul 31 01:29:08 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * io.c (rb_io_each_byte): remove unused variable e.
-
-Sat Jul 31 01:23:45 2011 Kenta Murata <mrkn@mrkn.jp>
-
- * test/bigdecimal/test_bigdecimal.rb (test_version): removed.
-
-Sat Jul 30 23:19:09 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * defs/default_gems: separate from tool/rbinstall.rb.
-
-Sat Jul 30 23:14:44 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * io.c (rb_io_each_byte): rbuf can be refreshed during yield.
- [Bug #5119]
-
-Sat Jul 30 22:35:50 2011 Naohisa Goto <ngotogenome@gmail.com>
-
- * strftime.c (NEEDS): avoid SEGV due to integer overflow in
- sparc-solaris2.10 and i686-linux. fix [Bug #4456] [ruby-dev:43284]
-
-Sat Jul 30 17:26:26 2011 Masaki Suketa <masaki.suketa@nifty.ne.jp>
-
- * test/win32ole/test_win32ole_variant.rb: use skip method to skip the test.
-
- * test/win32ole/test_win32ole_variant_outarg.rb: ditto.
-
-Sat Jul 30 14:27:00 2011 Kenta Murata <mrkn@mrkn.jp>
-
- * ext/bigdecimal/bigdecimal.c (BigDecimal_version): version 1.1.0.
-
- * ext/bigdecimal/bigdecimal.gemspec: turn into a default gem.
-
- * tool/rbinstall.rb: ditto.
-
-Sat Jul 30 11:21:55 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * vm_core.h (ALT_STACK_SIZE): use MINSIGSTKSZ*2 instead of SIGSTKSZ*2.
- [ruby-core:38607]
-
-Sat Jul 30 10:39:14 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * vm.c (th_init): preallocate alternative stack.
- NoMemoryError is better than rb_bug, of course.
- Patch by Eric Wong. [ruby-core:38572][ruby-core:38594].
-
- * signal.c (rb_register_sigaltstack): ditto.
-
- * vm_core.h: moved ALT_STACK_SIZE definition from signal.c.
- * vm.c (thread_free): use xfree() instead of free().
-
-Sat Jul 30 07:20:49 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/socket/lib/socket.rb (udp_server_sockets): unused variable
- removed.
- patch by Jeremy Evans. [ruby-core:38600]
-
-Fri Jul 29 23:56:32 2011 Tanaka Akira <akr@fsij.org>
-
- * lib/securerandom.rb: call OpenSSL::Random.seed at the
- SecureRandom.random_bytes call.
- based on the patch by Masahiro Tomita. [ruby-dev:44270]
-
-Fri Jul 29 23:53:48 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * array.c (rb_ary_set_len): new function to set array length.
-
- * vm_eval.c (method_missing): set the length of argv array, to mark
- arguments.
-
- * vm_eval.c (rb_apply): get rid of too large alloca.
-
-Fri Jul 29 20:48:39 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/socket/mkconstants.rb: fix typos.
-
-Fri Jul 29 20:28:56 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/socket/mkconstants.rb: use whitespaces as a separator.
-
-Fri Jul 29 18:59:07 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/socket/mkconstants.rb: add documents for constants.
- patch by Eric Hodel. [ruby-core:37853] [Bug #4989]
-
-Fri Jul 29 16:00:43 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * configure.in (enable_pthread): use -pthread on OpenBSD without
- explicit option. patched by Jeremy Evans. [ruby-core:38572]
-
-Thu Jul 28 23:36:28 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * ext/fiddle/closure.c (callback): use rb_ary_tmp_new() instead of
- xmalloc() to allocate an array for arguments of callback procedure,
- to prevent arguments from being swept by GC. [ruby-core:38546]
- [Bug #4929]
-
-Thu Jul 28 22:36:06 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
-
- * ext/openssl/ossl_cipher.c (ossl_cipher_initialize): Avoid possible
- SEGV from AES encryption/decryption. Processing data by
- Cipher#update without initializing key (meaningless usage of Cipher
- object since we don't offer a way to export a key) could cause SEGV.
-
- In OpenSSL, the EVP which has EVP_CIPH_RAND_KEY flag (such as DES3)
- allows uninitialized key, but other EVPs (such as AES) does not
- allow it. Calling EVP_CipherUpdate() without initializing key causes
- SEGV so we set the data filled with "\0" as the key by default. See
- #2768.
-
- * test/openssl/test_cipher.rb: test it.
-
-Thu Jul 28 14:25:08 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * lib/rubygems/user_interaction.rb (Gem::StreamUI#tty?): typo.
-
-Thu Jul 28 12:32:53 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/dl/callback/mkcallback.rb (gencallback): use PTR2NUM.
-
- * ext/dl/cptr.c (rb_dlptr_aref, rb_dlptr_aset): check NULL pointer
- dereference.
-
- * ext/dl/cptr.c (rb_dlptr_s_to_ptr): use rb_check_funcall.
-
- * ext/dl/cptr.c (rb_dlptr_s_to_ptr): fix wrapping condition.
-
-Thu Jul 28 04:53:31 2011 Eric Hodel <drbrain@segment7.net>
-
- * lib/delegate.rb: Move file-level documentation to the appropriate
- classes.
-
-Thu Jul 28 02:15:04 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * ext/dl/cfunc.c (dlcfunc_mark), ext/dl/cptr.c (dlptr_mark):
- workaround to mark wrapped object. this is not a true fix,
- because [Bug #4929] is caused by the interface design of DL.
-
-Thu Jul 28 00:28:15 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * test/fileutils/test_fileutils.rb: add OpenBSD case.
- patched by Jeremy Evans [ruby-core:38530] see #5097
-
- * test/ruby/test_process.rb: ditto.
-
-Wed Jul 27 22:46:59 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-
- * test/rinda/test_rinda.rb (test_remote_array_and_hash):
- add local variables to protect objects from GC. [ruby-dev:44253]
- [Bug #5104]
-
-Wed Jul 27 17:55:54 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * include/ruby/missing.h: define __syscall if the platform has
- __syscall in the library but doesn't define it in headers
- for example Mac OS X.
-
-Wed Jul 27 15:39:14 2011 Eric Hodel <drbrain@segment7.net>
-
- * object.c: Add usage documentation for BasicObject. Based on patch
- by Thomas Sawyer. [Ruby 1.9 - Bug #5067]
-
-Wed Jul 27 12:24:17 2011 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems/uninstaller.rb: Add missing require and update
- messaging to avoid confusion with uninstall --format-executable.
- [Ruby 1.9 - Bug #4062]
-
-Wed Jul 27 09:34:24 2011 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems: Update to RubyGems 1.8.6.1.
-
-Wed Jul 27 09:27:59 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * test/openssl/test_pkcs12.rb: Add test and intermediate certificates.
- [ Ruby 1.9 - Feature #3793 ] [ruby-core:32088]
-
-Wed Jul 27 01:05:32 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * eval_error.c (rb_print_undef_str): new function to raise
- NameError for undefined method.
-
- * load.c (rb_mod_autoload_p), object.c (rb_mod_const_get),
- variable.c (rb_f_untrace_var, set_const_visibility), vm_method.c
- (rb_mod_{remove,undef,alias}_method, set_method_visibility):
- remove inadvertent symbol creation. based on the first patch by
- Jeremy Evans at [ruby-core:38447]. [Feature #5089]
-
- * vm_method.c (obj_respond_to): fix the respond_to_missing? override
- case. based on the patch by Jeremy Evans at [ruby-core:38417].
- [Feature #5072]
-
- * parse.y (rb_check_id): make the given name a symbol or a string.
- based on the second patch by Jeremy Evans at [ruby-core:38447]
-
-Wed Jul 27 00:50:00 2011 Kenta Murata <mrkn@mrkn.jp>
-
- * ext/bigdecimal/lib/bigdecimal/util.rb (Rational#to_d):
- zero or negative precision is error. fixes #5098.
- [ruby-dev:44210]
-
- * test/bigdecimal/test_bigdecimal_util.rb: add test for the above
- change.
-
-Wed Jul 27 00:48:00 2011 Kenta Murata <mrkn@mrkn.jp>
-
- * ext/bigdecimal/lib/bigdecimal/util.rb (Float#to_d): modified for
- specifying precision. fixes #5098. [ruby-dev:44210]
-
- * test/bigdecimal/test_bigdecimal_util.rb: add test for the above
- change.
-
-Wed Jul 27 00:45:00 2011 Kenta Murata <mrkn@mrkn.jp>
-
- * ext/bigdecimal/lib/bigdecimal/util.rb (Integer#to_d): added
- for symmetry to BigDecimal() function with an Integer.
- fixes #5098. [ruby-dev:44210]
-
- * test/bigdecimal/test_bigdecimal_util.rb: add test for the above
- change.
-
-Wed Jul 27 00:30:00 2011 Kenta Murata <mrkn@mrkn.jp>
-
- * ext/bigdecimal/lib/bigdecimal/util.rb (BigDecimal#to_d): added
- for adapting other Numeric subclasses. [ruby-dev:44245]
-
- * test/bigdecimal/test_bigdecimal_util.rb: test for the above change.
-
-Wed Jul 27 00:27:00 2011 Kenta Murata <mrkn@mrkn.jp>
-
- * bigdecimal/bigdecimal.c (VpDup) a new function for duplicating
- a BigDecimal.
-
- * bigdecimal/bigdecimal.c (BigDecimal_new): support generating a new
- BigDecimal from another BigDecimal using BigDecimal global function
- or constructor. [ruby-dev:44245]
-
-Tue Jul 26 23:33:24 2011 Igor Zubkov <igor.zubkov@gmail.com>
-
- * array.c: Fix typo. https://github.com/ruby/ruby/pull/36
-
-Mon Jul 25 23:51:01 2011 Yusuke Endoh <mame@tsg.ne.jp>
-
- * proc.c: pre-allocate the unlinked_method_entry_list_entry struct to
- avoid memory allocation during GC. based on a patch from Eric Wong.
- [ruby-core:38498]
-
-Mon Jul 25 23:39:33 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * test/rake/test_rake_directory_task.rb (TestRakeDirectoryTask#
- test_directory_win32): fixed wrong test.
-
-Mon Jul 25 22:36:11 2011 Yusuke Endoh <mame@tsg.ne.jp>
-
- * proc.c (struct METHOD), gc.c (gc_marks), vm_method.c
- (rb_gc_mark_unlinked_live_method_entries): fix SEGV bug.
- rb_method_entry_t was free'd even when the method is still on the
- stack if it is BMETHOD (i.e., Method#call). This is because
- rb_method_entry_t is embedded in struct METHOD. This commit
- separates them and marks the live method entries.
- See [ruby-core:38449] in detail. fix [Bug #5047] [ruby-core:38171]
-
-Mon Jul 25 22:14:37 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
-
- * lib/xmlrpc/client.rb: Fix possible HTTP header formatting failure by
- 'Basic' header. Long username caused the base64 String truncation in
- HTTP header which is not allowed. See #5046.
-
- * test/xmlrpc/test_webrick_server.rb: test it.
-
-Mon Jul 25 15:04:33 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
-
- * ext/openssl/lib/openssl.rb: End of transition period introduced by
- [ruby-dev:38018]. From the next version of 1.9.3, you should use
- require "openssl"
- instead of
- require "openssl/ssl"
- and
- require "openssl/x509"
-
-Mon Jul 25 13:46:38 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
-
- * ext/openssl/lib/openssl/x509.rb: Cosmetic change: move definition
- introduced in r30152 to x509-internal.rb.
-
-Mon Jul 25 13:09:42 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
-
- * ext/openssl/ossl_ssl.c (ossl_ssl_shutdown): Avoid randomly generated
- SSLError from SSLSocket just after invoking SSLSocket#close.
- OpenSSL's SSL_shutdown could try to send alert packet and it might
- set SSLerr(global error stack) as the result. It causes the next
- SSL read/write operation to fail by unrelated reason.
-
- By design, we're ignoring any error at SSL_shutdown() so we clear
- global error stack after SSL_shutdown is called. See #5039.
-
-Sun Jul 24 20:29:53 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/socket/extconf.rb: refine the recvmsg test.
-
-Sun Jul 24 20:02:31 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/socket/extconf.rb: fix the recvmsg test.
-
-Sun Jul 24 08:42:51 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/socket/extconf.rb: test recvmsg allocates file descriptors for
- fd passing even with MSG_PEEK.
-
- * ext/socket/ancdata.c: use the above test result.
-
-Sun Jul 24 01:04:50 2011 Eric Hodel <drbrain@segment7.net>
-
- * lib/rubygems/specification.rb: Restore behavior of
- Gem::Specification#loaded. [Ruby 1.9 - Bug #5032]
-
-Sun Jul 24 00:05:00 2011 Jeremy Evans <merch-redmine@jeremyevans.net>
-
- * error.c (rb_name_error_str): new function to raise NameError
- with the name string but not ID.
-
- * object.c, proc.c, variable.c: more removal of inadvertent symbol
- creation. [Feature #5079]
-
-Sat Jul 23 21:14:00 2011 Tadayoshi Funaba <tadf@dotrb.org>
-
- * lib/cmath.rb (cbrt): should return a real number if possible.
-
-Sat Jul 23 20:12:52 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * test/rake/test_rake_functional.rb (setup): Use __FILE__ for the base
- directory. Current directory is not the top source directory when
- the building process runs on other than there.
-
- * test/rake/test_rake_rake_test_loader.rb: ditto.
-
- * test/rake/test_rake_task_argument_parsing.rb
- (test_terminal_width_using_hardcoded_80): hardcoded 80 is used
- when app.unix? is false.
-
-Sat Jul 23 20:11:50 2011 Tadayoshi Funaba <tadf@dotrb.org>
-
- * ext/date/date_core.c: an issue that is same as [ruby-dev:44071].
- * ext/date/date_strftime.c: identical to [ruby-dev:44112].
-
-Sat Jul 23 19:12:53 2011 Masaki Suketa <masaki.suketa@nifty.ne.jp>
-
- * test/win32ole/test_err_in_callback.rb (test_err_in_callback):
- skip test if ADODB.connection is not available.
-
-Sat Jul 23 15:37:04 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * parse.y (rb_enc_symname_type): :$a!, @a! and so on are not
- valid symbols, so they should be inspected with quotes.
-
-Sat Jul 23 17:06:25 2011 Tanaka Akira <akr@fsij.org>
-
- * io.c (rb_update_max_fd): validate fd.
-
- * ext/socket/rubysocket.h (rsock_discard_cmsg_resource): add
- msg_peek_p argument for the declaration.
-
- * ext/socket/ancdata.c (discard_cmsg): add msg_peek_p argument.
- assume FreeBSD, NetBSD and MacOS X doesn't generate passed fd
- when MSG_PEEK.
- (rsock_discard_cmsg_resource): add msg_peek_p argument.
- (bsock_recvmsg_internal): call rsock_discard_cmsg_resource with
- msg_peek_p argument.
-
- * ext/socket/unixsocket.c (unix_recv_io): call
- rsock_discard_cmsg_resource with msg_peek_p argument.
-
-Sat Jul 23 14:38:28 2011 Eric Hodel <drbrain@segment7.net>
-
- * test/rake*: Remove dependencies on flexmock and session gems.
- [Ruby 1.9 - Bug #4987]
-
-Sat Jul 23 12:19:04 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (rb_check_id): take care of attrset ID created
- implicitly by local ID. [Bug #5084]
-
- * parse.y (rb_check_id): conversion condition was inverse.
- [Bug #5084]
-
-Fri Jul 22 21:46:54 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * vm_insnhelper.c (vm_call_cfunc): added volatile for a workaround
- of cfp consistency error problem on OS X 10.7 (Lion). It's
- suspected llvm optimization bug.
- [Bug #5074] [ruby-dev:44185]
-
-Fri Jul 22 21:18:20 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/uri/generic.rb (WFKV_): unroll the loop of regexp.
-
- * lib/uri/generic.rb (URI.decode_www_form_component): ditto.
-
-Fri Jul 22 21:06:39 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * object.c (rb_mod_{const,cvar}_defined, rb_obj_ivar_defined):
- avoid inadvertent symbol creation in reflection methods. based
- on a patch by Jeremy Evans at [ruby-core:38367]. [Feature #5072]
-
- * vm_method.c (rb_mod_method_defined)
- (rb_mod_{public,private,protected}_method_defined)
- (obj_respond_to): ditto.
-
- * parse.y (rb_check_id): new function returns already interned ID
- or 0.
-
-Fri Jul 22 20:44:49 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (rb_is_global_id, rb_is_attrset_id): add missing
- predicates.
-
-Fri Jul 22 20:24:38 2011 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-
- * test/ruby/test_object.rb (TestObject#test_respond_to_missing):
- 2nd argument of respond_to_missing? is not optional.
-
-Fri Jul 22 19:05:47 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * parse.y (rb_enc_symname2_p): get rid of potential out-of-bound
- access.
-
-Fri Jul 22 13:55:59 2011 Eric Hodel <drbrain@segment7.net>
-
- * lib/net/http.rb: Net::HTTP#finish is used to manually close
- connections. [Ruby 1.9 - Bug #5045]
-
-Fri Jul 22 13:51:29 2011 Eric Hodel <drbrain@segment7.net>
-
- * ext/readline/readline.c: Add examples for Readline.completion_proc=.
- [Ruby 1.9 - Bug #5057]
-
-Fri Jul 22 13:03:12 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * ext/openssl/ossl_hmac.c: Revert checking return type of
- HMAC_Init_ex as it is not compatible with OpenSSL < 1.0.0.
-
-Fri Jul 22 12:10:21 2011 Eric Hodel <drbrain@segment7.net>
-
- * tool/rbinstall.rb (default gems): Install executables into the fake
- gem dir for Gem.bin_path. [#4485]
-
-Fri Jul 22 11:20:20 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * ext/openssl/ossl_digest.c: Check return value of EVP_DigestInit_ex.
- * ext/openssl/ossl_hmac.c: Check return value of HMAC_Init_ex.
- Thanks, Jared Jennings, for the patch.
- [ Ruby 1.9 - Bug #4944 ] [ruby-core:37670]
-
-Fri Jul 22 09:09:43 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * ext/openssl/ossl_engine.c: Avoid double free of ENGINE reference.
- * test/openssl/test_engine.rb: Add a test for it.
- Thanks to Ippei Obayashi for providing the patch.
- [ Ruby 1.9 - Bug #5062 ] [ruby-dev:44173]
-
-Fri Jul 22 06:37:13 2011 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * lib/csv.rb: Do not modify CSV.generate's argument [ruby-core:38356]
-
-Thu Jul 21 20:59:59 2011 Tanaka Akira <akr@fsij.org>
-
- * ext/socket/ancdata.c (discard_cmsg): workaround for MacOS X Lion.
-
-Thu Jul 21 20:02:11 2011 Yusuke Endoh <mame@tsg.ne.jp>
-
- * thread.c (set_trace_func, thread_set_trace_func_m): reset tracing
- state when set_trace_func hook is removed. This is workaround patch
- to force to reset tracing state that is broken by continuation call.
- a patch from James M. Lawrence. [Feature #4347] [ruby-core:34998]
-
- * test/ruby/test_continuation.rb (class TestContinuation): add a test
- for above. a patch from James M. Lawrence.
-
-Thu Jul 21 19:27:19 2011 Yusuke Endoh <mame@tsg.ne.jp>
-
- * node.c (dump_node): add today's knowledge. "init arguments (m)" and
- "init arguments (p)" of compile.c indicates a Ruby code that
- evaluates multiple assignments that is in method or block
- parameters: def foo((m1,m2), (m3,m4), *r, (p1,p2), (p3,p4)); end
- The former (init arguments (m)) evaluates the multiple assignments
- before rest argument, that are (m1,m2) and (m3,m4). The letter
- (init arguments (p)) does ones after rest argument, that are
- (p1,p2) and (p3, p4).
-
-Thu Jul 21 18:11:07 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * enum.c (enum_inject): remove empty line to notify rdoc
- Enumerable#reduce is alias. patched by milki@github.
- https://github.com/ruby/ruby/pull/26
-
-Thu Jul 21 17:30:21 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * array.c (rb_ary_delete_at_m): use simple array literal in rdoc.
- patched by samuel tonini. [ruby-core:38310] [Bug #5066]
-
-Thu Jul 21 17:14:21 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * lib/webrick/httprequest.rb (WEBrick::HTTPRequest#each):
- Allow HTTP/0.9 request which doesn't has any header or body.
- patched by Felix Jodoin. [ruby-core:38040] [Bug #5022]
-
-Wed Jul 20 23:02:18 2011 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-
- * io.c (rb_update_max_fd): remove parentheses. they are not in
- macro.
-
-Wed Jul 20 22:22:23 2011 Tanaka Akira <akr@fsij.org>
-
- * include/ruby/intern.h (rb_update_max_fd): declaration moved from
- internal.h.
-
- * file.c: ditto.
-
- * io.c: call rb_update_max_fd for each new fds.
-
- * process.c: ditto.
-
- * random.c: ditto.
-
- * ruby.c: ditto.
-
- * ext/io/console/console.c: ditto.
-
- * ext/openssl/ossl_bio.c: ditto.
-
- * ext/pty/pty.c: ditto.
-
- * ext/socket/init.c: ditto.
-
- * ext/socket/socket.c: ditto.
-
- * ext/socket/ancdata.c: ditto.
-
- * ext/socket/unixsocket.c: ditto.
-
-Wed Jul 20 15:16:22 2011 NARUSE, Yui <naruse@ruby-lang.org>
-
- * ext/dl/handle.c (dlhandle_sym): clear previous error with dlerror()
- before calling dlsym(). [ruby-dev:44091] [Bug #5021]
-
-Wed Jul 20 07:16:26 2011 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-
- * NEWS: mention Kernel#warn. [ruby-core:38119] [Feature #5029]
-
-Tue Jul 19 16:40:45 2011 TAKANO Mitsuhiro (takano32) <tak@no32.tk>
-
- * cont.c (cont_save_thread): fix missing semicolon.
-
-Tue Jul 19 16:25:15 2011 Tanaka Akira <akr@fsij.org>
-
- * io.c (UPDATE_MAXFD): removed.
-
-Tue Jul 19 16:07:45 2011 Tanaka Akira <akr@fsij.org>
-
- * io.c (rb_update_max_fd): new function.
-
- * internal.h (rb_update_max_fd): declare rb_update_max_fd.
-
- * thread_pthread.c (rb_thread_create_timer_thread): update max fd when
- timer thread pipe is created.
-
-Mon Jul 18 13:36:47 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * ext/psych/lib/psych.rb: define a new BadAlias error class.
-
- * ext/psych/lib/psych/visitors/to_ruby.rb: raise an exception when
- deserializing an alias that does not exist.
-
- * test/psych/test_merge_keys.rb: corresponding test.
-
-Mon Jul 18 00:00:46 2011 Shugo Maeda <shugo@ruby-lang.org>
-
- * ext/curses/curses.c: added the new class Curses::Pad, which
- supports scrolling. patch by Eric Hodel. [Feature #4896]
- [ruby-core:37206]
-
-Sun Jul 17 16:26:40 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * error.c (rb_check_trusted): new function to check an object is
- trusted.
-
- * struct.c (rb_struct_modify), time.c (time_modify): check by the
- above function to show proper class names. [Bug #5036]
-
-Sun Jul 17 15:30:04 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * error.c (rb_warn_m): accept multiple args in like puts. rdoc
- patch by Erik Price at [ruby-core:38119]. [Feature #5029]
-
-Sun Jul 17 07:56:31 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-
- * test/openssl/test_ssl_session.rb: add PEM SSL session without TLS
- extensions. Use this as the default for the tests to ensure
- compatibility with OpenSSL 0.9.7.
- [ Ruby 1.9 - Bug #4961 ] [ruby-core:37726]
-
-Sat Jul 16 17:29:20 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * configure.in (RUBY_UNIVERSAL_ARCH): restore arch flag.
- Bug #4977
-
-Sat Jul 16 06:27:51 2011 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-
- * lib/uri/common.rb (module): Remove optional parser argument to
- Kernel#URI
- [ruby-core:38061]
-
- * lib/uri/generic.rb (module): ditto
-
-Sat Jul 16 03:19:45 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/win32.c (is_socket, is_console): add prototypes to fix compile
- problem with gcc introduced at r32549.
- reported by Jon Forums. [Bug #5030] [ruby-core:38079]
-
-Sat Jul 16 00:55:38 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * time.c (time_dup): used rb_obj_class() instead of CLASS_OF().
- The patch is made by Kazuki Tsujimoto. [Bug #5012] [ruby-dev:44071]
-
- * test/ruby/test_time.rb (TestTime#test_getlocal_dont_share_eigenclass):
- added a new test for eigenclass of time object.
-
-Fri Jul 15 19:11:00 2011 Kenta Murata <mrkn@mrkn.jp>
-
- * bignum.c (bigsub_int): add RB_GC_GUARD. This patch is made by
- Makoto Kishimoto. fixes #4223 [ruby-dev:42907]
-
- * bignum.c (bigadd_int): ditto.
-
-Fri Jul 15 14:27:53 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/win32.c, include/ruby/win32.h (rb_w32_io_cancelable_p): renamed
- from rb_w32_has_cancel_io(). now it takes a parameter as fd to check
- the fd is console or not, because we cannot cancel console input even
- if we have cancel_io function.
-
- * io.c (WAIT_FD_IN_WIN32): call above function instead of the old one,
- so now we can kill the thread which calls STDIN.gets.
- the problem was reported by ko1 via IRC.
-
-Fri Jul 15 09:10:41 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
-
- * ext/digest/sha2/sha2.c (SHA256_Update, SHA512_Update): avoid Bus
- Error caused by unalignment access on Sparc-Solaris (and possibly on
- other similar environment.) This patch just do memcpy always instead
- of checking architecture. I see no perf drop on my 64bit env. For
- more details, see #4320.
-
- * test/digest/test_digest.rb: add test for unalignment access.
-
-Fri Jul 15 01:51:25 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * regint.h (PLATFORM_UNALIGNED_WORD_ACCESS): Power PC does not
- allow unaligned word access.
-
- * st.c (UNALIGNED_WORD_ACCESS): x86_64 allows unaligned word
- access as well as i386.
-
-Thu Jul 14 12:19:34 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
-
- * ext/openssl/ossl.c (ossl_verify_cb): trap the exception from
- verify callback of SSLContext and X509Store and make the
- verification fail normally. Raising exception directly from callback
- causes orphan resources in OpenSSL stack. Patched by Ippei Obayashi.
- See #4445.
-
- * test/openssl/test_ssl.rb
- (test_exception_in_verify_callback_is_ignored): test it.
-
-Tue Jul 12 23:41:49 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * NEWS: add a description of Signal.trap change.
-
-Tue Jul 12 20:02:35 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * signal.c (reserved_signal_p): reverted a part of r32523.
- chikanaga noticed trap(:CHLD) has some realworld usecase.
- * test/ruby/test_signal.rb (TestSignal#test_reserved_signal):
- ditto.
-
-Tue Jul 12 17:12:45 2011 Yukihiro Matsumoto <matz@ruby-lang.org>
-
- * vm_method.c (rb_add_method): should not call method_added hook
- for undef operation. [Bug #5015]
-
-Tue Jul 12 16:58:44 2011 Shota Fukumori <sorah@tubusu.net>
-
- * lib/test/unit.rb(Test::Unit::Options#process_args): Fix bug.
- Fix process_args didn't return `@option` after r30939.
-
-Tue Jul 12 14:07:46 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * signal.c (install_sighandler): fixed a race.
-
-Tue Jul 12 13:49:32 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * signal.c (sig_trap): don't permit to change a signal handler which
- the interpreter reserved.
- * signal.c (reserved_signal_p): ditto.
- [Bug #2616] [ruby-core:27625]
-
- * test/ruby/test_signal.rb (TestSignal#test_reserved_signal):
- added a test for reserved signal.
-
-Tue Jul 12 11:58:28 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * win32/setup.mak: support x86-amd64 cross compile environment.
-
-Mon Jul 11 23:22:28 2011 Yutaka Kanemoto <kanemoto@ruby-lang.org>
-
- * time.c: can't compile time.c on AIX due to missing declaration for
- ffs(). It is declared in strings.h on AIX.
-
-Mon Jul 11 15:54:24 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * process.c: removed signal() macro. It's no longer used.
-
-Mon Jul 11 15:02:24 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-
- * numeric.c (rb_num2ull): use FIX2LONG instead of FIX2ULONG. see
- rb_num2ulong(). fixed the problem of ObjectSpace._id2ref of IL32LLP64
- platforms, introduced at r32433.
-
-Mon Jul 11 05:38:05 2011 Yutaka Kanemoto <kanemoto@ruby-lang.org>
-
- * thread_pthread.c (get_stack): need to adjust stack addr for
- [Bug #1813] on AIX.
-
-Mon Jul 11 01:16:27 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-
- * thread_pthread.c (rb_thread_create_timer_thread): removed
- rb_disable_interrupt()/rb_enable_interrupt().
- * vm_core.h: ditto.
- * process.c (static void before_exec): ditto.
- * process.c (static void after_exec): ditto.
- [Bug #4765] [ruby-dev:43571]
-
- * eval_intern.h: removed rb_trap_restore_mask().
- * vm_eval.c (rb_throw_obj): ditto.
- * eval.c (setup_exception): ditto.
-
- * signal.c: removed trap_last_mask.
- * signal.c (trap_restore_mask): removed.
- * signal.c (init_sigchld): comment clarification why signal block
- is needed. and removed trap_last_mask operation.
- * signal.c (trap_ensure): removed trap_last_mask operation.
-
- * signal.c (rb_disable_interrupt, rb_enable_interrupt): made
- static and removed sigdelset(SIGVTALRM) and sigdelset(SIGSEGV).
-
- * process.c (rb_syswait): removed implicit signal handler change.
-
-Sun Jul 10 23:49:12 2011 Yuki Sonoda (Yugui) <yugui@yugui.jp>
-
- * docs/NEWS-1.9.3: moved from NEWS.
-
- * docs/ChangeLog-1.9.3: merged ChangeLog for 1.9.3.
-
- * NEWS: NEWS for 1.9.4 that describes changes since 1.9.3
-
- * ChangeLog: new ChangeLog for 1.9.4.
-
-Sun Jul 10 23:30:52 2011 Yuki Sonoda (Yugui) <yugui@yugui.jp>
-
- * version.h (RUBY_VERSION): ruby_1_9_3 branch was forked.
-
-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
-
-Local variables:
-coding: us-ascii
-add-log-time-format: (lambda ()
- (let* ((time (current-time))
- (system-time-locale "C")
- (diff (+ (cadr time) 32400))
- (lo (% diff 65536))
- (hi (+ (car time) (/ diff 65536))))
- (format-time-string "%a %b %e %H:%M:%S %Y" (list hi lo) t)))
-indent-tabs-mode: t
-tab-width: 8
-change-log-indent-text: 2
-end:
-vim: tabstop=8 shiftwidth=2
diff --git a/doc/ChangeLog-YARV b/doc/ChangeLog-YARV
index 529854586c..cbc51c5593 100644
--- a/doc/ChangeLog-YARV
+++ b/doc/ChangeLog-YARV
@@ -86,7 +86,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* blockinlining.c, compile.c, compile.h, debug.c, debug.h,
insnhelper.h, insns.def, iseq.c, thread.c, thread_pthread.ci,
thread_pthread.h, thread_win32.ci, thread_win32.h, vm.c, vm.h,
- vm_dump.c, vm_evalbody.ci, vm_opts.h.base, yarv.h,
+ vm_dump.c, vm_evalbody.ci, vm_opts.h.base, yarv.h,
yarv_version.h, yarvcore.c, yarvcore.h :
add a header includes copyright
@@ -110,7 +110,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* signal.c : ditto
- * test/ruby/test_signal.rb :
+ * test/ruby/test_signal.rb :
* thread_pthread.ci : rename timer thread functions
@@ -203,7 +203,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* ext/dbm, dl, gdbm, iconv, io, pty, sdbm : added
- * test/dbm, gdbm, io, logger, net, readline, sdbm, soap,
+ * test/dbm, gdbm, io, logger, net, readline, sdbm, soap,
webrick, win32ole, wsdl, xsd : added
@@ -652,7 +652,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* vm.c : ditto
- * yarvcore.c : prohibit tail call optimization to mark
+ * yarvcore.c : prohibit tail call optimization to mark
iseq object
* yarvcore.h : add some allocator function declaration
@@ -906,7 +906,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* yarvcore.h : disable to use get/setcontext
- * lib/webrick/server.rb : add experimental implementation
+ * lib/webrick/server.rb : add experimental implementation
using thraeds pool
@@ -1447,7 +1447,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* insns.def : ditto
- * vm_dump.c :
+ * vm_dump.c :
* intern.h : change rb_thread_signal_raise/exit interface
@@ -2060,7 +2060,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
2006-02-15(Wed) 17:39:16 +0900 Koichi Sasada <ko1@atdot.net>
- * eval_intern.h :
+ * eval_intern.h :
* eval_jump.h, vm.c : localjump_error() and jump_tag_but_local_jump()
move to th_localjump_error and th_jump_tag_but_local_jump at vm.c
@@ -2618,123 +2618,123 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* array.c : revert last commit
- * ascii.c : ditto
+ * ascii.c : ditto
- * bignum.c : ditto
+ * bignum.c : ditto
- * class.c : ditto
+ * class.c : ditto
- * compar.c : ditto
+ * compar.c : ditto
- * defines.h : ditto
+ * defines.h : ditto
- * dir.c : ditto
+ * dir.c : ditto
- * dln.c : ditto
+ * dln.c : ditto
- * dln.h : ditto
+ * dln.h : ditto
- * enum.c : ditto
+ * enum.c : ditto
- * enumerator.c : ditto
+ * enumerator.c : ditto
- * error.c : ditto
+ * error.c : ditto
- * euc_jp.c : ditto
+ * euc_jp.c : ditto
- * file.c : ditto
+ * file.c : ditto
- * gc.c : ditto
+ * gc.c : ditto
- * hash.c : ditto
+ * hash.c : ditto
- * intern.h : ditto
+ * intern.h : ditto
- * io.c : ditto
+ * io.c : ditto
- * lex.c : ditto
+ * lex.c : ditto
- * main.c : ditto
+ * main.c : ditto
- * marshal.c : ditto
+ * marshal.c : ditto
- * math.c : ditto
+ * math.c : ditto
- * missing.h : ditto
+ * missing.h : ditto
- * node.h : ditto
+ * node.h : ditto
- * numeric.c : ditto
+ * numeric.c : ditto
- * object.c : ditto
+ * object.c : ditto
- * oniguruma.h : ditto
+ * oniguruma.h : ditto
- * pack.c : ditto
+ * pack.c : ditto
- * prec.c : ditto
+ * prec.c : ditto
- * process.c : ditto
+ * process.c : ditto
- * random.c : ditto
+ * random.c : ditto
- * range.c : ditto
+ * range.c : ditto
- * rb/mklog.rb : ditto
+ * rb/mklog.rb : ditto
- * re.c : ditto
+ * re.c : ditto
- * regcomp.c : ditto
+ * regcomp.c : ditto
- * regenc.c : ditto
+ * regenc.c : ditto
- * regenc.h : ditto
+ * regenc.h : ditto
- * regerror.c : ditto
+ * regerror.c : ditto
- * regex.h : ditto
+ * regex.h : ditto
- * regexec.c : ditto
+ * regexec.c : ditto
- * regint.h : ditto
+ * regint.h : ditto
- * regparse.c : ditto
+ * regparse.c : ditto
- * regparse.h : ditto
+ * regparse.h : ditto
- * ruby.c : ditto
+ * ruby.c : ditto
- * ruby.h : ditto
+ * ruby.h : ditto
- * rubyio.h : ditto
+ * rubyio.h : ditto
- * rubysig.h : ditto
+ * rubysig.h : ditto
- * signal.c : ditto
+ * signal.c : ditto
- * sjis.c : ditto
+ * sjis.c : ditto
- * sprintf.c : ditto
+ * sprintf.c : ditto
- * st.c : ditto
+ * st.c : ditto
- * st.h : ditto
+ * st.h : ditto
- * string.c : ditto
+ * string.c : ditto
- * struct.c : ditto
+ * struct.c : ditto
- * time.c : ditto
+ * time.c : ditto
- * utf8.c : ditto
+ * utf8.c : ditto
- * util.c : ditto
+ * util.c : ditto
- * util.h : ditto
+ * util.h : ditto
- * variable.c : ditto
+ * variable.c : ditto
- * version.c : ditto
+ * version.c : ditto
2006-02-12(Sun) 21:33:10 +0900 Koichi Sasada <ko1@atdot.net>
@@ -3151,7 +3151,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
2006-02-12(Sun) 05:05:02 +0900 Koichi Sasada <ko1@atdot.net>
* eval.c, eval_intern.h, eval_load.c, eval_proc.c, node.h,
- insnhelper.h, insns.def, vm.c, yarvcore.c, yarvcore.h :
+ insnhelper.h, insns.def, vm.c, yarvcore.c, yarvcore.h :
change cref data structure and unify ruby_class and ruby_cbase
and some refoctoring
@@ -3810,7 +3810,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* yarvtest/test_eval.rb : added
- * yarvtest/test_proc.rb :
+ * yarvtest/test_proc.rb :
2005-12-29(Thu) 12:27:12 +0900 Koichi Sasada <ko1@atdot.net>
@@ -4091,7 +4091,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
2005-12-25(Sun) 01:45:55 +0900 Koichi Sasada <ko1@atdot.net>
- * insns.def, compile.c, rb/insns2vm.rb, template/insns_info.inc.tmpl :
+ * insns.def, compile.c, rb/insns2vm.rb, template/insns_info.inc.tmpl :
trace stack depth at compile time
and use it as cont_sp for exception handling
@@ -4167,7 +4167,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* compile.c, yarvcore.h : support all defined?() syntax
- * compile.c : fix NODE_COLON2
+ * compile.c : fix NODE_COLON2
* yarvtest/test_bin.rb : add or fix tests for above
@@ -4278,7 +4278,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* insns.def : remove logic for zsuper
- * template/optinsn.inc.tmpl :
+ * template/optinsn.inc.tmpl :
* vm.c : remove thread_yield_light_prepare, thread_yield_light_invoke
@@ -4292,7 +4292,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* array.c, numeric.c, range.c : add prototype of
block inlining function
- * blockinlining.c, vm_opts.h.base : add block inlining flag
+ * blockinlining.c, vm_opts.h.base : add block inlining flag
* common.mk, debug.h, debug.c : add debug_breakpoint() for gdb
@@ -4328,7 +4328,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* vm.c : fix to skip pushing value at "next"
- * yarvcore.h : move definition of
+ * yarvcore.h : move definision of
"struct iseq_compile_data_ensure_node_stack" to compile.c
* compile.c : fix ensure catch table creation
@@ -4390,7 +4390,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
2005-11-29(Tue) 16:39:07 +0900 Koichi Sasada <ko1@atdot.net>
- * eval.c, eval_proc.c, vm.c, vm_macro.def :
+ * eval.c, eval_proc.c, vm.c, vm_macro.def :
support define_method and invoke NODE_BMETHOD method
@@ -4478,7 +4478,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* debug.c : add debug_v() and change to use only printf
on debug_id()
- * sample/test.rb :
+ * sample/test.rb :
* vm.c : fix make_proc_from_block
@@ -4539,7 +4539,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* eval.c : support rb_frame_pop() and rb_frame_callee(),
add rb_sourcefile(), rb_sourceline(),
-
+
* compile.c : support postposition while/until,
fix block parameter index
@@ -4582,7 +4582,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* benchmark/other-lang/eval.rb : fix path
- * lib/English.rb, lib/cgi.rb, lib/complex.rb, lib/delegate.rb :
+ * lib/English.rb, lib/cgi.rb, lib/complex.rb, lib/delegate.rb :
added
@@ -4712,7 +4712,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
2005-10-05(Wed) 21:20:13 +0900 Koichi Sasada <ko1@atdot.net>
- * eva.c, eval_thread.c, ruby.h, eval_error.h, eval_jump.h,
+ * eva.c, eval_thread.c, ruby.h, eval_error.h, eval_jump.h,
eval_load.c, thread.c, error.c, compile.h : remove ruby_errinfo
* thread_win32.h, thread_pthread.h : set stack size to 4KB
@@ -4795,7 +4795,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* thread.c, common.mk : add thread.c
- * thread.c, gc.c, eval_thread.c, yarvcore.c, yarvcore.h :
+ * thread.c, gc.c, eval_thread.c, yarvcore.c, yarvcore.h :
support native thread (on pthread)
* insns.def : add YARV_CHECK_INTS() check
@@ -5322,7 +5322,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* yarvcore.c, yarvcore.h : remove cYarvThrowObject (unused)
- * yarvcore.c, yarvcore.h, insns.def :
+ * yarvcore.c, yarvcore.h, insns.def :
thread_object#stack_mark_poinetr
* depend, rb/eval.rb : BOPT, TOPT -> OPT
@@ -5394,7 +5394,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* tmpl/vmtc.inc.tmpl : add const prefix
- * /rb/asm_parse.rb, extconf.rb : added and make assembler analised output
+ * /rb/asm_parse.rb, extconf.rb : added and make assembler analised output
* opt_operand.def : add send operands unification
@@ -5493,7 +5493,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* depend : adde reconf rule
- * insnhelper.h :
+ * insnhelper.h :
* vm_evalbody.inc : rename to vm_evalbody.h
@@ -5711,7 +5711,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* yarvcore.h : make type "struct iseq_compile_data"
- * yarvcore.h : iseq_object#insn_info_ary to iseq_object#insn_info_tbl
+ * yarvcore.h : iseq_object#insn_info_ary to iseq_object#insn_info_tbl
2005-02-21(Mon) 05:24:01 +0900 Koichi Sasada <ko1@atdot.net>
@@ -5736,7 +5736,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* test/test_method.rb : add tests for above
- * insns.def : opt_ltlt and
+ * insns.def : opt_ltlt and
2005-02-18(Fri) 08:54:40 +0900 Koichi Sasada <ko1@atdot.net>
@@ -5770,7 +5770,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* yarvcore.h, insns.def, compile.c : support defined? expression (limited)
- * test/test_syn.rb : tests for above is added
+ * test/test_syn.rb : tests for above is added
* compile.c, insns.def : support block passed method dispatch
@@ -6002,7 +6002,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* vm.c (thread_dump_regs) : added
- * vm.c (thread_call0, thread_call0_cfunc, thread_invoke_yield,
+ * vm.c (thread_call0, thread_call0_cfunc, thread_invoke_yield,
thread_invoke_yield_cfunc), insns.def (yield, send) :
fixed, added to support IFUNC
@@ -6322,7 +6322,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
2004-12-02(Thu) 13:20:41 +0900 Koichi Sasada <ko1@atdot.net>
* yarvcore.c, vm.h, vm.c, insns.def, insnhelper.h, yarvutil.rb :
- add usage analisys framework
+ add usage analisys framework
* disasm.c : insn_operand_intern to separate function
@@ -6433,7 +6433,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
* yarv.h : added
- * yarvcore.c, yarv.h : support yarv_is_working, yarv_block_given_p,
+ * yarvcore.c, yarv.h : support yarv_is_working, yarv_block_given_p,
yarv_yield, yarv_funcall (only dummy function)
* vm.c : thread_eval_body changed return value
@@ -6488,7 +6488,7 @@ Sun Dec 31 17:42:05 2006 Koichi Sasada <ko1@atdot.net>
2004-11-01(Mon) 04:45:54 +0900 Koichi Sasada <ko1@atdot.net>
- * yarvcore.h, compile.c, debug.c, version.h :
+ * yarvcore.h, compile.c, debug.c, version.h :
redesgin gc debug scheme (GC_CHECK())
* yarvcore.c : mark iseqobj->current_block on GC
diff --git a/doc/NEWS-1.8.7 b/doc/NEWS-1.8.7
index 51fb5f1c6a..91862e97ba 100644
--- a/doc/NEWS-1.8.7
+++ b/doc/NEWS-1.8.7
@@ -54,7 +54,7 @@ with all sufficient information, see the ChangeLog file.
* Array#flatten
* Array#flatten!
- Takes an optional argument that determines the level of recursion
+ Take an optional argument that determines the level of recursion
to flatten.
* Array#eql?
@@ -77,7 +77,6 @@ with all sufficient information, see the ChangeLog file.
* Array#reject
* Array#reject!
* Array#delete_if
- * Array#select
Return an enumerator if no block is given.
@@ -162,10 +161,6 @@ with all sufficient information, see the ChangeLog file.
New alias to #inject.
- * Enumerable#to_a
-
- Can take optional arguments and pass them to #each.
-
* Hash#eql?
* Hash#hash
* Hash#==
@@ -267,17 +262,12 @@ with all sufficient information, see the ChangeLog file.
* Regexp.union accepts an array of patterns.
- * String#bytes
-
- New method
-
* String#bytesize
New method, returning the size in bytes. (alias length and size)
* String#chars
* String#each_char
- * String#lines
* String#partition
* String#rpartition
* String#start_with?
@@ -511,15 +501,6 @@ with all sufficient information, see the ChangeLog file.
always use Date.strptime() when you know what you are dealing
with.
-* REXML
-
- * REXML::Document.entity_expansion_limit=
-
- New method to set the entity expansion limit. By default the limit is
- set to 10000. See the following URL for details.
-
- http://www.ruby-lang.org/en/news/2008/08/23/dos-vulnerability-in-rexml/
-
* stringio
* StringIO#each_byte
diff --git a/doc/NEWS-1.9.1 b/doc/NEWS-1.9.1
index fb11026d60..5b85383b61 100644
--- a/doc/NEWS-1.9.1
+++ b/doc/NEWS-1.9.1
@@ -1,6 +1,6 @@
# -*- rdoc -*-
-= NEWS for Ruby 1.9.1
+= NEWS for RDoc 1.9.1
This document is a list of user visible feature changes made between
releases except for bug fixes.
@@ -33,18 +33,18 @@ See doc/NEWS-1.8.7 for changes between 1.8.6 and 1.8.7.
* builtin classes and objects
* Kernel and Object
- o Kernel#methods and #singleton_methods used to return an
+ o Kernel#methods and #singleton_methods used to return an
array of strings but now they return an array of symbols.
* Class and Module
o Module#attr works as Module#attr_reader by default.
Optional boolean argument is obsolete.
o Module#instance_methods, #private_instance_methods and
- #public_instance_methods used to return an array of
+ #public_instance_methods used to return an array of
strings but now they return an array of symbols.
o Extra subclassing check when binding UnboundMethods
-
+
* Exceptions
- o Exceptions are equal to each other if they belong to
+ o Exceptions are equal to each other if they belong to
the same class and have the same message and backtrace.
o SystemStackError used to be a subclass of StandardError
but not it is a direct subclass of Exception.
@@ -73,7 +73,7 @@ See doc/NEWS-1.8.7 for changes between 1.8.6 and 1.8.7.
o Most of the changes in Hash apply to hash like interfaces
such as ENV and *DBM.
* IO operations
- o Many methods used to act byte-wise but now some of those act
+ o Many methods used to act byte-wise but now some of those act
character-wise. You can use alternate byte-wise methods.
o IO#getc
o Non-blocking IO
@@ -96,7 +96,7 @@ See doc/NEWS-1.8.7 for changes between 1.8.6 and 1.8.7.
o IO#internal_encoding, IO#external_encoding,
IO#set_encoding
o IO.pipe takes encoding option
- o Directive %u behaves like %d for negative values in
+ o Directive %u behaves like %d for negative values in
printf-style formatting.
* File and Dir operations
o #to_path is called as necessary in File.path, File.chmod,
@@ -170,7 +170,7 @@ See doc/NEWS-1.8.7 for changes between 1.8.6 and 1.8.7.
* Pathname
o No longer has #to_str nor #=~.
* time and date
- o Time.parse and Date.parse interprets slashed numerical dates
+ o Time.parse and Date.parse interprets slashed numerical dates
as "dd/mm/yyyy".
* Readline
o If Readline uses libedit, Readline::HISTORY[0] returns the
@@ -211,15 +211,15 @@ See doc/NEWS-1.8.7 for changes between 1.8.6 and 1.8.7.
* New syntax and semantics
o Magic comments to declare in which encoding your source
code is written
- o New literal hash syntax and new syntax for hash style
- arguments
+ o New literal hash syntax and new syntax for hash style
+ arguments
o New syntax for lambdas
o .() and calling Procs without #call/#[]
o Block in block arguments
o Block local variables
o Mandatory arguments after optional arguments allowed
o Multiple splats allowed
- o #[] can take splatted arguments, hash style arguments
+ o #[] can take splatted arguments, hash style arguments
and a block.
o New directives in printf-style formatted strings (%).
o Newlines allowed before ternary colon operator (:) and
@@ -265,7 +265,7 @@ See doc/NEWS-1.8.7 for changes between 1.8.6 and 1.8.7.
* Enumerable and Enumerator
o Enumerator#enum_cons and Enumerator#enum_slice are
- removed. Use #each_cons and #each_slice without a block.
+ removed. Use #each_cons and #each_slice without a block.
o Enumerable#each_with_index can take optional arguments
and passes them to #each.
o Enumerable#each_with_object
@@ -335,11 +335,6 @@ See doc/NEWS-1.8.7 for changes between 1.8.6 and 1.8.7.
o Numeric#upto, #downto, #times, #step
o Numeric#real?, Complex#real?
o Numeric#magnitude
- o Numeric#round
- * Float
- o Float#round
- * Integer
- o Integer#round
* Rational / Complex
o They are in the core library now
* Math
@@ -393,7 +388,7 @@ See doc/NEWS-1.8.7 for changes between 1.8.6 and 1.8.7.
o Readline.emacs_editing_mode?
o Readline::HISTORY.clear
* Tk
- o TkXXX widget classes are removed and redefined as aliases of
+ o TkXXX widget classes are removed and redefined as aliases of
Tk::XXX classes.
* RDoc
o Updated to version 2.2.2. See:
diff --git a/doc/NEWS-1.9.2 b/doc/NEWS-1.9.2
index 9cf58c9aff..17e2f263e4 100644
--- a/doc/NEWS-1.9.2
+++ b/doc/NEWS-1.9.2
@@ -1,4 +1,5 @@
# -*- rdoc -*-
+
= NEWS for Ruby 1.9.2
This document is a list of user visible feature changes made between
@@ -14,7 +15,7 @@ with all sufficient information, see the ChangeLog file.
* builtin classes
* Array
- * new methods:
+ * new method:
* Array#keep_if
* Array#repeated_combination
* Array#repeated_permutation
@@ -23,11 +24,11 @@ with all sufficient information, see the ChangeLog file.
* Array#select!
* Array#sort_by!
- * extended method:
+ * extended methods:
* Array#{uniq,uniq!,product} can take a block.
* Complex
- * new method:
+ * new methods:
* Complex#rationalize
* Dir
@@ -50,7 +51,7 @@ with all sufficient information, see the ChangeLog file.
* ascii_compatible?
* Enumerable
- * new methods:
+ * New methods:
* Enumerable#chunk
* Enumerable#collect_concat
* Enumerable#each_entry
@@ -65,7 +66,7 @@ with all sufficient information, see the ChangeLog file.
* Enumerator#feed
* StopIteration#result
- * extended method:
+ * extended methods:
* #with_index accepts an optional argument that specifies the
index number to start with, defaulted to 0.
@@ -85,13 +86,14 @@ with all sufficient information, see the ChangeLog file.
* new constants:
* Float::INFINITY
* Float::NAN
- * new method:
+ * new methods:
* Float#rationalize
* File
* new methods:
* File.realpath
* File.realdirpath
+ * File#size
* GC::Profiler
* new method:
@@ -103,14 +105,14 @@ with all sufficient information, see the ChangeLog file.
* Hash#select!
* IO
- * new methods:
+ * new method:
* IO#autoclose=
* IO#autoclose?
* IO#fdatasync
* IO#codepoints
* IO#each_codepoint
- * extended method:
+ * extended methods:
* IO.pipe can take a block.
* new modules:
@@ -119,7 +121,7 @@ with all sufficient information, see the ChangeLog file.
They are used to extend non-blocking exceptions.
* Integer
- * new method:
+ * new methods:
* Integer#rationalize
* Kernel
@@ -128,7 +130,7 @@ with all sufficient information, see the ChangeLog file.
* Kernel#singleton_class
* Kernel#require_relative
- * extended method:
+ * extended methods:
* Kernel#respond_to? can be used to detect methods not implemented.
For example, Process.respond_to?(:fork) returns false on Windows.
@@ -146,15 +148,11 @@ with all sufficient information, see the ChangeLog file.
platforms.
* MatchData
- * new method:
+ * New method:
* MatchData#==
- * Method
- * new method:
- * Method#parameters
-
* NilClass
- * new method:
+ * new methods:
* NilClass#rationalize
* Object
@@ -163,20 +161,18 @@ with all sufficient information, see the ChangeLog file.
* printf() supports %a/%A format.
* Proc
- * new method:
- * Proc#parameters
* extended method:
* Proc#source_location returns location even if receiver is a method
defined by attr_reader / attr_writer / attr_accessor.
* Process
- * extended method:
+ * extended methods:
* Process.spawn accepts [:child, FD] for a redirect target.
* Random (new class to generate pseudo-random numbers)
* Rational
- * new method:
+ * new methods:
* Rational#rationalize
* String
@@ -189,27 +185,22 @@ with all sufficient information, see the ChangeLog file.
* Thread#set_trace_func
* Time
- * extended features:
+ * extended feature:
* time_t restriction is removed to represent before 1901 and after 2038.
Proleptic Gregorian calendar is used for old dates.
* Time.new have optional arguments to specify date with time offset.
* Time#getlocal, Time#localtime have optional time offset argument.
- * new methods:
+ * new method:
* Time#to_r
* Time#subsec
* Time#round
- * incompatible change:
+ * incompatible changes:
* The year argument of Time.{utc,gm,local,mktime} is now interpreted as
the value itself. For example, Time.utc(99) means the year 99 AD,
not 1999 AD.
- * UnboundMethod
- * new method:
- * UnboundMethod#parameters
-
-
* digest
* new methods:
* Digest::Class.base64digest
diff --git a/doc/NEWS-1.9.3 b/doc/NEWS-1.9.3
index 484660f420..e372b6627b 100644
--- a/doc/NEWS-1.9.3
+++ b/doc/NEWS-1.9.3
@@ -1,4 +1,5 @@
# -*- rdoc -*-
+
= NEWS for Ruby 1.9.3
This document is a list of user visible feature changes made between
@@ -14,13 +15,6 @@ with all sufficient information, see the ChangeLog file.
* Ruby's License is changed from a dual license with GPLv2
to a dual license with 2-clause BSDL.
-=== Known platform dependent issues
-==== OS X Lion
-
-* You have to configure ruby with '--with-gcc=gcc-4.2' if you're using
- Xcode 4.1, or, if you're using Xcode 4.2, you have to configure ruby
- with '--with-gcc=clang'.
-
=== C API updates
* rb_scan_args() is enhanced with support for option hash argument
@@ -29,9 +23,6 @@ with all sufficient information, see the ChangeLog file.
* ruby_vm_at_exit() added. This enables extension libs to hook a VM
termination.
-* rb_reserved_fd_p() added. If you want to close all file descriptors,
- check using this API. [ruby-core:37759]
-
=== Library updates (outstanding ones only)
* builtin classes
@@ -112,34 +103,16 @@ with all sufficient information, see the ChangeLog file.
the platform don't support supplementary groups concept.
* bigdecimal
-
* BigDecimal#power and BigDecimal#** support non-integral exponent.
* Kernel.BigDecimal and BigDecimal.new now accept instances of Integer,
- Rational, Float, and BigDecimal. If you pass a Rational or a Float to
- them, you must specify the precision to produce the digits of a BigDecimal.
+ Rational, and Float. If you pass a Rational or a Float to them, you must
+ specify the precision to produce the digits of a BigDecimal.
* The behavior of BigDecimal#coerce with a Rational is changed. It uses
the precision of the receiver BigDecimal to produce the digits of a
BigDecimal from the given Rational.
-* bigdecimal/util
-
- * BigDecimal#to_d and Integer#to_d are added.
-
- * Float#to_d accepts a precision.
-
- * Rational#to_d raises ArgumentError when passing zero or negative
- precision.
-
- * Rational#to_d
-
- * Zero and an implicit precision is deprecated.
- This feature is removed at the next release of bigdecimal.
-
- * A negative precision isn't supported.
- Be careful it is an incompatible change.
-
* date
* Accepts flonum explicitly with limitations.
@@ -192,9 +165,6 @@ with all sufficient information, see the ChangeLog file.
* IO#winsize
* IO.console
-* json
- * updated to v1.5.4.
-
* matrix
* new classes:
* Matrix::EigenvalueDecomposition
@@ -243,13 +213,9 @@ with all sufficient information, see the ChangeLog file.
http.request_post('/continue', 'body=BODY', 'expect' => '100-continue')
* new method:
- * Net::HTTPRequest#set_form): Added to support
+ * Net::HTTPRequest#set_form: Added to support
both application/x-www-form-urlencoded and multipart/form-data.
-* objspace
- * new method:
- * ObjectSpace::memsize_of_all
-
* openssl
* PKey::RSA and PKey::DSA now use the generic X.509 encoding scheme
(e.g. used in a X.509 certificate's Subject Public Key Info) when
@@ -271,18 +237,18 @@ with all sufficient information, see the ChangeLog file.
* support for bash/zsh completion.
* Rake
- * Rake has been upgraded from 0.8.7 to 0.9.2.2. For full release notes see
+ * Rake has been upgraded from 0.8.7 to 0.9.2.1. For full release notes see
https://github.com/jimweirich/rake/blob/master/CHANGES
* RDoc
- * RDoc has been upgraded to version 3.9.4. For full release notes see
+ * RDoc has been upgraded from 2.5.8 to 3.8. For full release notes see
http://docs.seattlerb.org/rdoc/History_txt.html
* rexml
* Support Ruby native encoding mechanism and iconv dependency is dropped.
* RubyGems
- * RubyGems has been upgraded to version 1.8.10. For full release notes see
+ * RubyGems has been upgraded to version 1.8.5.1. For full release notes see
http://rubygems.rubyforge.org/rubygems-update/History_txt.html
* stringio
@@ -336,6 +302,4 @@ with all sufficient information, see the ChangeLog file.
=== Compatibility issues (excluding feature bug fixes)
- * Rational#to_d
-
- See above.
+ None
diff --git a/doc/NEWS-2.0.0 b/doc/NEWS-2.0.0
deleted file mode 100644
index f99ba3e882..0000000000
--- a/doc/NEWS-2.0.0
+++ /dev/null
@@ -1,531 +0,0 @@
-# -*- rdoc -*-
-
-= NEWS for Ruby 2.0.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.
-
-== Changes since the 1.9.3 release
-
-=== Language changes
-
-* Added keyword arguments.
-
-* Added %i and %I for symbol list creation (similar to %w and %W).
-
-* Default source encoding is changed to UTF-8. (was US-ASCII)
-
-* No warning for unused variables starting with '_'
-
-=== Core classes updates (outstanding ones only)
-
-* ARGF
- * added method:
- * added ARGF#codepoints and ARGF#each_codepoint, like the corresponding
- methods for IO.
-
-* Array
- * added method:
- * added Array#bsearch for binary search.
- * incompatible changes:
- * random parameter of Array#shuffle! and Array#sample now
- will be called with one argument, maximum value.
- * when given Range arguments, Array#values_at now returns nil for each
- value that is out-of-range.
-
-* Enumerable
- * added method:
- * added Enumerable#lazy method for lazy enumeration.
-
-* Enumerator
- * added method:
- * added Enumerator#size for lazy size evaluation.
- * extended method:
- * Enumerator.new accept an argument for lazy size evaluation.
- * new class Enumerator::Lazy for lazy enumeration
-
-* ENV
- * aliased method:
- * ENV.to_h is a new alias for ENV.to_hash
-
-* Fiber
- * incompatible changes:
- * Fiber#resume cannot resume a fiber which invokes "Fiber#transfer".
-
-* File
- * extended method:
- * File.fnmatch? now expands braces in the pattern if
- File::FNM_EXTGLOB option is given.
-
-* GC
- * improvements:
- * introduced the bitmap marking which suppresses to copy a memory page
- with Copy-on-Write.
- * introduced the non-recursive marking which avoids unexpected stack overflow.
-
-* GC::Profiler
- * added method:
- * added GC::Profiler.raw_data which returns raw profile data for GC.
-
-* Hash
- * added method:
- * added Hash#to_h as explicit conversion method, like Array#to_a.
- * extended method:
- * Hash#default_proc= can be passed nil to clear the default proc.
-
-* IO
- * deprecated methods:
- * IO#lines, #bytes, #chars and #codepoints are deprecated.
-
-* Kernel
- * added method:
- * added Kernel#Hash conversion method like Array() or Float().
- * added Kernel#__dir__ which returns the absolute path of the
- directory of the file from which this method is called.
- * added Kernel#caller_locations which returns an array of
- frame information objects.
- * extended method:
- * Kernel#warn accepts multiple args in like puts.
- * Kernel#caller accepts second optional argument `n' which specify
- required caller size.
- * Kernel#to_enum and enum_for accept a block for lazy size evaluation.
- * incompatible changes:
- * system() and exec() closes non-standard file descriptors
- (The default of :close_others option is changed to true by default.)
- * respond_to? against a protected method now returns false unless
- the second argument is true.
- * __callee__ has returned to the original behavior, and now
- returns the called name but not the original name in an
- aliased method.
- * Kernel#inspect does not call #to_s anymore
- (it used to call redefined #to_s).
-
-* LoadError
- * added method:
- * added LoadError#path method to return the file name that could not be
- loaded.
-
-* Module
- * added method:
- * added Module#prepend which is similar to Module#include,
- however a method in the prepended module overrides the
- corresponding method in the prepending module.
- * added Module.prepended and Module.prepend_features, similar
- to included and append_features.
- * added Module#refine, which extends a class or module locally.
- [experimental]
- * extended method:
- * Module#define_method accepts a UnboundMethod from a Module.
- * Module#const_get accepts a qualified constant string, e.g.
- Object.const_get("Foo::Bar::Baz")
-
-* Mutex
- * added method:
- * added Mutex#owned? which returns the mutex is held by current
- thread or not. [experimental]
- * incompatible changes:
- * Mutex#lock, Mutex#unlock, Mutex#try_lock, Mutex#synchronize
- and Mutex#sleep are no longer allowed to be used from trap handler
- and raise a ThreadError in such case.
- * Mutex#sleep may spurious wakeup. Check after wakeup.
-
-* NilClass
- * added method:
- * added nil.to_h which returns {}
-
-* ObjectSpace::WeakMap
- * new low level class to hold weak references to objects.
-
-* Proc
- * incompatible change:
- * removed Proc#== and #eql? so two procs are == only when they are
- the same object.
-
-* Process
- * added method:
- * added getsid for getting session id (unix only).
-
-* Range
- * added method:
- * added Range#size for lazy size evaluation.
- * added Range#bsearch for binary search.
-
-* RubyVM (MRI specific)
- * added RubyVM::InstructionSequence.of to get the instruction sequence
- from a method or a block.
- * added RubyVM::InstructionSequence#path, #absolute_path, #label,
- #base_label and #first_lineno to retrieve information from where
- the instruction sequence was defined.
- * added Environment variables to specify stack usage:
- * RUBY_THREAD_VM_STACK_SIZE: vm stack size used at thread creation.
- default: 128KB (32bit CPU) or 256KB (64bit CPU).
- * RUBY_THREAD_MACHINE_STACK_SIZE: machine stack size used at thread
- creation. default: 512KB or 1024KB.
- * RUBY_FIBER_VM_STACK_SIZE: vm stack size used at fiber creation.
- default: 64KB or 128KB.
- * RUBY_FIBER_MACHINE_STACK_SIZE: machine stack size used at fiber
- creation. default: 256KB or 256KB.
- These variables are checked only at launched time.
- * added constant DEFAULT_PARAMS to get above default parameters.
-
-* Signal
- * added method:
- * added Signal.signame which returns signal name
-
- * incompatible changes:
- * Signal.trap raises ArgumentError when :SEGV, :BUS, :ILL, :FPE, :VTALRM
- are specified.
-
-* String
- * added method:
- * added String#b returning a copied string whose encoding is ASCII-8BIT.
- * change return value:
- * String#lines now returns an array instead of an enumerator.
- * String#chars now returns an array instead of an enumerator.
- * String#codepoints now returns an array instead of an enumerator.
- * String#bytes now returns an array instead of an enumerator.
-
-* Struct
- * added method:
- * added Struct#to_h returning values with keys corresponding to the
- instance variable names.
-
-* Thread
- * added method:
- * added Thread#thread_variable_get for getting thread local variables
- (these are different than Fiber local variables).
- * added Thread#thread_variable_set for setting thread local variables.
- * added Thread#thread_variables for getting a list of the thread local
- variable keys.
- * added Thread#thread_variable? for testing to see if a particular thread
- variable has been set.
- * added Thread.handle_interrupt as well as instance and singleton methods
- pending_interrupt? for asynchronous handling of exceptions
- * added Thread#backtrace_locations which returns similar information of
- Kernel#caller_locations.
- * new class Thread::Backtrace::Location to hold backtrace location
- information. These are returned by Thread#backtrace_locations and
- Kernel#caller_locations.
- * incompatible changes:
- * Thread#join and Thread#value now raises a ThreadError if target thread
- is the current or main thread.
-
-* Time
- * change return value:
- * Time#to_s now returns US-ASCII encoding instead of BINARY.
-
-* TracePoint
- * new class. This class is replacement of set_trace_func.
- Easy to use and efficient implementation.
-
-* toplevel
- * added method:
- * added main.define_method which defines a global function.
- * added main.using, which imports refinements into the current file or
- eval string. [experimental]
-
-=== Core classes compatibility issues (excluding feature bug fixes)
-
-* Array#values_at
-
- See above.
-
-* String#lines
-* String#chars
-* String#codepoints
-* String#bytes
-
- These methods no longer return an Enumerator, although passing a
- block is still supported for backwards compatibility.
-
- Code like str.lines.with_index(1) { |line, lineno| ... } no longer
- works because str.lines returns an array. Replace lines with
- each_line in such cases.
-
-* IO#lines
-* IO#chars
-* IO#codepoints
-* IO#bytes
-* ARGF#lines
-* ARGF#chars
-* ARGF#bytes
-* StringIO#lines
-* StringIO#chars
-* StringIO#codepoints
-* StringIO#bytes
-* Zlib::GzipReader#lines
-* Zlib::GzipReader#bytes
-
- These methods are deprecated in favor of each_line, each_byte,
- each_char and each_codepoint.
-
-* Proc#==
-* Proc#eql?
-
- These methods were removed. Two procs are == only when they are
- the same object.
-
-* Fixnum
-* Bignum
-* Float
-
- Fixnums, Bignums and Floats are frozen.
-
-* Signal.trap
-
- See above.
-
-* Merge Onigmo.
- https://github.com/k-takata/Onigmo
-
-* The :close_others option is true by default for system() and exec().
- Also, the close-on-exec flag is set by default for all new file descriptors.
- This means file descriptors doesn't inherit to spawned process unless
- explicitly requested such as system(..., fd=>fd).
-
-* Kernel#respond_to? against a protected method now returns false
- unless the second argument is true.
-
-* Kernel#respond_to_missing?
-* Kernel#initialize_clone
-* Kernel#initialize_dup
-
- These methods are now private.
-
-* Thread#join, Thread#value
-
- See above.
-
-* Mutex#lock, Mutex#unlock, Mutex#try_lock, Mutex#synchronize and Mutex#sleep
-
- See above.
-
-=== Stdlib updates (outstanding ones only)
-
-* cgi
- * Add HTML5 tag maker.
- * CGI#header has been renamed to CGI#http_header and
- aliased to CGI#header.
- * When HTML5 tagmaker called, overwrite CGI#header,
- CGI#header function is to create a <header> element.
-
-* CSV
- * Removed CSV::dump and CSV::load to protect users from dangerous
- serialization vulnerability
-
-* iconv
- * Iconv has been removed. Use String#encode instead.
-
-* io/console
- * new methods:
- * added IO#cooked which sets the terminal to cooked mode within the given block.
- * added IO#cooked! which sets the terminal to cooked.
- * extended method:
- * IO#raw, IO#raw!, and IO#getch accept keyword arguments, :min and :time.
-
-* io/wait
- * new features:
- * added IO#wait_writable method.
- * added IO#wait_readable method as alias of IO#wait.
-
-* json
- * updated to 1.7.7.
-
-* net/http
- * new features:
- * Proxies are now automatically detected from the http_proxy environment
- variable. See Net::HTTP::new for details.
- * gzip and deflate compression are now requested for all requests by
- default. See Net::HTTP for details.
- * SSL sessions are now reused across connections for a single instance.
- This speeds up connection by using a previously negotiated session.
- * Requests may be created from a URI which sets the request_uri and host
- header of the request (but does not change the host connected to).
- * Responses contain the URI requested which allows easier implementation of
- redirect following.
- * new methods:
- * Net::HTTP#local_host
- * Net::HTTP#local_host=
- * Net::HTTP#local_port
- * Net::HTTP#local_port=
- * extended method:
- * Net::HTTP#connect uses local_host and local_port if specified.
-
-* net/imap
- * new methods:
- * Net::IMAP.default_port
- * Net::IMAP.default_imap_port
- * Net::IMAP.default_tls_port
- * Net::IMAP.default_ssl_port
- * Net::IMAP.default_imaps_port
-
-* objspace
- * new method:
- * ObjectSpace.reachable_objects_from(obj)
-
-* openssl
- * Consistently raise an error when trying to encode nil values. All instances
- of OpenSSL::ASN1::Primitive now raise TypeError when calling to_der on an
- instance whose value is nil. All instances of OpenSSL::ASN1::Constructive
- raise NoMethodError in the same case. Constructing such values is still
- permitted.
- * TLS 1.1 & 1.2 support by setting OpenSSL::SSL::SSLContext#ssl_version to
- :TLSv1_2, :TLSv1_2_server, :TLSv1_2_client or :TLSv1_1, :TLSv1_1_server
- :TLSv1_1_client. The version being effectively used can be queried
- with OpenSSL::SSL#ssl_version. Furthermore, it is also possible to
- blacklist the new TLS versions with OpenSSL::SSL:OP_NO_TLSv1_1 and
- OpenSSL::SSL::OP_NO_TLSv1_2.
- * Added OpenSSL::SSL::SSLContext#renegotiation_cb. A user-defined callback
- may be set which gets called whenever a new handshake is negotiated. This
- also allows to programmatically decline (client) renegotiation attempts.
- * Support for "0/n" splitting of records as BEAST mitigation via
- OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS.
- * The default options for OpenSSL::SSL::SSLContext have changed to
- OpenSSL::SSL::OP_ALL & ~OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS
- instead of OpenSSL::SSL::OP_ALL only. This enables the countermeasure for
- the BEAST attack by default.
- * OpenSSL requires passwords for decrypting PEM-encoded files to be at least
- four characters long. This led to awkward situations where an export with
- a password with fewer than four characters was possible, but accessing the
- file afterwards failed. OpenSSL::PKey::RSA, OpenSSL::PKey::DSA and
- OpenSSL::PKey::EC therefore now enforce the same check when exporting a
- private key to PEM with a password - it has to be at least four characters
- long.
- * SSL/TLS support for the Next Protocol Negotiation extension. Supported
- with OpenSSL 1.0.1 and higher.
- * OpenSSL::OPENSSL_FIPS allows client applications to detect whether OpenSSL
- is FIPS-enabled. OpenSSL.fips_mode= allows turning on and off FIPS mode
- manually in order to adapt to situations where FIPS mode would be an
- explicit requirement.
- * Authenticated Encryption with Associated Data (AEAD) is supported via
- Cipher#auth_data= and Cipher#auth_tag/Cipher#auth_tag=.
- Currently (OpenSSL 1.0.1c), only GCM mode is supported.
-
-* ostruct
- * new methods:
- * OpenStruct#[], []=
- * OpenStruct#each_pair
- * OpenStruct#eql?
- * OpenStruct#hash
- * OpenStruct#to_h converts the struct to a hash.
- * extended method:
- * OpenStruct.new also accepts an OpenStruct / Struct.
-
-* pathname
- * extended method:
- * Pathname#find returns an enumerator if no block is given.
-
-* rake
- * rake has been updated to version 0.9.5.
-
- This version is backwards-compatible with previous rake versions and
- contains many bug fixes.
-
- See
- http://rake.rubyforge.org/doc/release_notes/rake-0_9_5_rdoc.html for a list
- of changes in rake 0.9.3, 0.9.4 and 0.9.5.
-
-* RDoc
- * RDoc has been updated to version 4.0
-
- This version is largely backwards-compatible with previous rdoc versions.
- The most notable change is an update to the ri data format (ri data must
- be regenerated for gems shared across rdoc versions). Further API changes
- are internal and won't affect most users.
-
- Notable changes include:
-
- * Page support for ri. Try `ri ruby:` for a list of pages in ruby or
- `ri ruby:syntax/literals` for the syntax documentation for literals.
-
- This also works for gems such as `ri rspec:README` for the rspec gem's
- README file.
- * Markdown support. See ri RDoc::Markdown for details.
-
- See https://github.com/rdoc/rdoc/blob/master/History.rdoc for a full list
- of changes in rdoc 4.0.
-
-* resolv
- * new methods:
- * Resolv::DNS#timeouts=
- * Resolv::DNS::Config#timeouts=
-
-* rexml
- * REXML::Document#write supports Hash arguments.
- * REXML::Document#write supports new :encoding option. It changes
- XML document encoding. Without :encoding option, encoding in
- XML declaration is used for XML document encoding.
-
-* RubyGems
- * Updated to 2.0.0
-
- RubyGems 2.0.0 features the following improvements:
-
- * Improved support for default gems shipping with ruby 2.0.0+
- * A gem can have arbitrary metadata through Gem::Specification#metadata
- * `gem search` now defaults to --remote and is anchored like gem list.
- * Added --document to replace --rdoc and --ri. Use --no-document to
- disable documentation, --document=rdoc to only generate rdoc.
- * Only ri-format documentation is generated by default.
- * `gem server` uses RDoc::Servlet from RDoc 4.0 to generate HTML
- documentation.
-
- For an expanded list of updates and bug fixes see:
- https://github.com/rubygems/rubygems/blob/master/History.txt
-
-* shellwords
- * Shellwords#shellescape now stringifies the given object using to_s.
- * Shellwords#shelljoin accepts non-string objects in the given
- array, each of which is stringified using to_s.
-
-* stringio
- * deprecated methods:
- * StringIO#lines, #bytes, #chars and #codepoints are deprecated.
-
-* syslog
- * Added Syslog::Logger which provides a Logger API atop Syslog.
- * Syslog::Priority, Syslog::Level, Syslog::Option and Syslog::Macros
- are introduced for easy detection of available constants on a
- running system.
-
-* tmpdir
- * incompatible changes:
- * Dir.mktmpdir uses FileUtils.remove_entry instead of
- FileUtils.remove_entry_secure. This means that applications should not
- change the permission of the created temporary directory to make
- accessible from other users.
-
-* yaml
- * Syck has been removed. YAML now completely depends on libyaml being
- installed.
- * libyaml is now bundled with ruby, for cases where the library is not
- installed locally.
-
-* zlib
- * Added streaming support for Zlib::Inflate and Zlib::Deflate. This allows
- processing of a stream without the use of large amounts of memory.
- * Added support for the new deflate strategies Zlib::RLE and Zlib::FIXED.
- * Zlib streams are now processed without the GVL. This allows gzip, zlib and
- deflate streams to be processed in parallel.
- * deprecated methods:
- * Zlib::GzipReader#lines and #bytes are deprecated.
-
-=== Stdlib compatibility issues (excluding feature bug fixes)
-
-* OpenStruct new methods can conflict with custom attributes named
- "each_pair", "eql?", "hash" or "to_h".
-
-* Dir.mktmpdir in lib/tmpdir.rb
-
- See above.
-
-=== C API updates
-
-* NUM2SHORT() and NUM2USHORT() added. They are similar to NUM2INT, but short.
-
-* rb_newobj_of() and NEWOBJ_OF() added. They create a new object of a given class.
-
diff --git a/doc/contributing.rdoc b/doc/contributing.rdoc
deleted file mode 100644
index 9d9fbdf2da..0000000000
--- a/doc/contributing.rdoc
+++ /dev/null
@@ -1,459 +0,0 @@
-= Contributing to Ruby
-
-Ruby has a vast and friendly community with hundreds of people contributing to
-a thriving open-source ecosystem. This guide is designed to cover ways for
-participating in the development of CRuby.
-
-There are plenty of ways for you to help even if you're not ready to write
-code or documentation. You can help by reporting issues, testing patches, and
-trying out beta releases with your applications.
-
-== How To Report
-
-If you've encountered a bug in Ruby please report it to the redmine issue
-tracker available at {bugs.ruby-lang.org}[http://bugs.ruby-lang.org/]. Do not
-report security vulnerabilities here, there is a {separate
-channel}[rdoc-label:label-Reporting+Security+Issues] for them.
-
-There are a few simple steps you should follow in order to receive feedback
-on your ticket.
-
-* If you haven't already,
- {sign up for an account}[https://bugs.ruby-lang.org/account/register] on the
- bug tracker.
-* Try the latest version.
-
- If you aren't already using the latest version, try installing a newer
- stable release. See
- {Downloading Ruby}[http://www.ruby-lang.org/en/downloads/].
-* Look to see if anyone already reported your issue, try
- {searching on redmine}[https://bugs.ruby-lang.org/projects/ruby-trunk/issues]
- for your problem.
-* If you can't find a ticket addressing your issue,
- {create a new one}[https://bugs.ruby-lang.org/projects/ruby-trunk/issues/new].
-* Choose the target version, usually current. Bugs will be first fixed in the
- current release and then {backported}[rdoc-label:label-Backport+Requests].
-* Fill in the Ruby version you're using when experiencing this issue
- (<code>ruby -v</code>).
-* Attach any logs or reproducible programs to provide additional information.
- Reproducible scripts should be as small as possible.
-* Briefly describe your problem. A 2-3 sentence description will help give a
- quick response.
-* Pick a category, such as core for common problems, or lib for a standard
- library.
-* Check the {Maintainers
- list}[https://bugs.ruby-lang.org/projects/ruby/wiki/Maintainers] and assign
- the ticket if there is an active maintainer for the library or feature.
-* If the ticket doesn't have any replies after 10 days, you can send a
- reminder.
-* Please reply to feedback requests. If a bug report doesn't get any feedback,
- it'll eventually get rejected.
-
-=== Reporting to downstream distributions
-
-You can reports downstream issues for the following distributions via their bugtracker:
-
-* {debian}[http://bugs.debian.org/cgi-bin/pkgreport.cgi?src=ruby-defaults]
-* {freebsd}[http://www.freebsd.org/cgi/query-pr-summary.cgi?text=ruby]
-* {redhat}[https://bugzilla.redhat.com/buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED]
-* {macports}[http://trac.macports.org/query?status=assigned&status=new&status=reopened&port=~ruby]
-* etc (add your distribution bug tracker here)
-
-=== Platform Maintainers
-
-For platform specific bugs in Ruby, you can assign your ticket the current
-maintainer for a specific platform.
-
-The current active platform maintainers are as follows:
-
-[mswin32, mswin64 (Microsoft Windows)]
- NAKAMURA Usaku (usa)
-[mingw32 (Minimalist GNU for Windows)]
- Nobuyoshi Nakada (nobu)
-[IA-64 (Debian GNU/Linux)]
- TAKANO Mitsuhiro (takano32)
-[Symbian OS]
- Alexander Zavorine (azov)
-[AIX]
- Yutaka Kanemoto (kanemoto)
-[FreeBSD]
- Akinori MUSHA (knu)
-[Solaris]
- Naohisa Goto (ngoto)
-[RHEL, CentOS]
- KOSAKI Motohiro kosaki
-[Mac OS X]
- Kenta Murata (mrkn)
-[cygwin, bcc32, djgpp, wince, ...]
- none. (Maintainer WANTED)
-
-== Reporting Security Issues
-
-Security vulnerabilities receive special treatment since they may negatively
-affect many users. There is a private mailing list that all security issues
-should be reported to and will be handled discretely. Email the
-mailto:security@ruby-lang.org list and the problem will be published after
-fixes have been released. You can also encrypt the issue using {the PGP public
-key}[http://www.ruby-lang.org/security.asc] for the list.
-
-== Reporting Other Issues
-
-If you're having an issue with the website, or maybe the mailing list, you can
-contact the webmaster to help resolve the problem.
-
-The current webmaster is:
-
-* Hiroshi SHIBATA (hsbt)
-
-You can also report issues with the ruby-lang.org website on the issue tracker:
-
-* {issue tracker}[https://github.com/ruby/www.ruby-lang.org/issues]
-
-== Resolve Existing Issues
-
-As a next step beyond reporting issues you can help the core team resolve
-existing issues. If you check the Everyone's Issues list in GitHub Issues,
-you'll find lots of issues already requiring attention. What can you do for
-these? Quite a bit, actually:
-
-When a bug report goes for a while without any feedback, it goes to the bug
-graveyard which is unfortunate. If you check the {issues
-list}[https://bugs.ruby-lang.org/projects/ruby-trunk/issues] you'll find lots
-of delinquent bugs that require attention.
-
-You can help by verifying the existing tickets, try to reproduce the reported
-issue on your own and comment if you still experience the bug. Some issues
-lack attention because of too much ambiguity, to help you can narrow down the
-problem and provide more specific details or instructions to reproduce the
-bug. You might also try contributing a failing test in the form of a patch,
-which we will cover later in this guide.
-
-It may also help to try out patches other contributors have submitted to
-redmine, if gone without notice. In this case the +patch+ command is your
-friend, see <code>man patch</code> for more information. Basically this would
-go something like this:
-
- cd path/to/ruby/trunk
- patch -p0 < path/to/patch
-
-You will then be prompted to apply the patch with the associated files. After
-building ruby again, you should try to run the tests and verify if the change
-actually worked or fixed the bug. It's important to provide valuable feedback
-on the patch that can help reach the overall goal, try to answer some of these
-questions:
-
-* What do you like about this change?
-* What would you do differently?
-* Are there any other edge cases not tested?
-* Is there any documentation that would be affected by this change?
-
-If you can answer some or all of these questions, you're on the right track.
-If your comment simply says "+1", then odds are that other reviewers aren't
-going to take it too seriously. Show that you took the time to review the
-patch.
-
-== How To Request Features
-
-If there's a new feature that you want to see added to Ruby, you'll need to
-write a convincing proposal and patch to implement the feature.
-
-For new features in CRuby, use the {'Feature'
-tracker}[https://bugs.ruby-lang.org/projects/ruby-trunk/issues?set_filter=1&tracker_id=2]
-on ruby-trunk. For non-CRuby dependent features, features that would apply to
-alternate Ruby implementations such as JRuby and Rubinius, use the {CommonRuby
-tracker}[https://bugs.ruby-lang.org/projects/common-ruby].
-
-When writing a proposal be sure to check for previous discussions on the
-topic and have a solid use case. You will need to be persuasive and convince
-Matz on your new feature. You should also consider the potential compatibility
-issues that this new feature might raise.
-
-Consider making your feature into a gem, and if there are enough people who
-benefit from your feature it could help persuade ruby-core. Although feature
-requests can seem like an alluring way to contribute to Ruby, often these
-discussions can lead nowhere and exhaust time and energy that could be better
-spent fixing bugs. Choose your battles.
-
-A good template for feature proposal should look something like this:
-
-[Abstract]
- Summary of your feature
-[Background]
- Describe current behavior and why it is problem. Related work, such as
- solutions in other language helps us to understand the problem.
-[Proposal]
- Describe your proposal in details
-[Details]
- If it has complicated feature, describe it
-[Usecase]
- How would your feature be used? Who will benefit from it?
-[Discussion]
- Discuss about this proposal. A list of pros and cons will help start
- discussion.
-[Limitation]
- Limitation of your proposal
-[Another alternative proposal]
- If there are alternative proposals, show them.
-[See also]
- Links to the other related resources
-
-=== Slideshow
-
-On Ruby Developer Meeting Japan, committers discuss about Feature Proposals together at Tokyo. We'll judge proposals accept, reject, or feedback. If you have a stalled proposal, making a slide to submit is good way to get feedback.
-
-Slides should be:
-
-* One-page slide
-* Include a corresponding ticket number
-* MUST include a figure and/or short example code
-* SHOULD have less sentence in natural language (try to write less than 140 characters)
-* It is RECOMMENDED to itemize: motivation/use case, proposal, pros/cons, corner case
-* PDF or Image (Web browsers can show it)
-
-Please note:
-
-* Even if the proposal is generally acceptable, it won't be accepted without writing corner cases in the ticket
-* Slide's example: DevelopersMeeting20130727Japan
-
-== Backport Requests
-
-When a new version of Ruby is released it starts at patch level 0 (p0), and
-bugs will be fixed first on the trunk branch. If its determined that a bug
-exists in a previous version of Ruby that is still in the bug fix stage of
-maintenance, then a patch will be backported. After the maintenance stage of a
-particular Ruby version ends, it goes into "security fix only" mode which
-means only security related vulnerabilities will be backported. Versions in
-End-of-life (EOL) will not receive any updates and it is recommended you
-upgrade as soon as possible.
-
-If a major security issue is found or after a certain amount of time since the
-last patch level release, a new patch-level release will be made.
-
-When submitting a backport request please confirm the bug has been fixed in
-newer versions and exists in maintenance mode versions. There is a backport
-tracker for each major version still in maintenance where you can request a
-particular revision merged in the affected version of Ruby.
-
-Each major version of Ruby has a release manager that should be assigned to
-handle backport requests. You can find the list of release managers on the
-{wiki}[https://bugs.ruby-lang.org/projects/ruby/wiki/ReleaseEngineering].
-
-=== Branch Maintainers
-
-A branch maintainer maintains a branch and releases a new release of Ruby. The
-branch depends on the associated version of Ruby, such as ruby_1_8_7 for
-version 1.8.7. The current branch maintainers are as follows:
-
-[trunk]
- unnecessary
-[ruby_2_0_0]
- Chikanaga Tomoyuki (nagachika)
-[ruby_1_9_3]
- NAKAMURA Usaku (usa)
-[ruby_1_9_2, ruby_1_9_1]
- _unmaintained_
-[ruby_1_8]
- _unmaintained_
-[ruby_1_8_7]
- _unmaintained_
-[ruby_1_8_6 ...]
- _unmaintained_
-
-== Running tests
-
-In order to help resolve existing issues and contributing patches to Ruby you
-need to be able to run the test suite.
-
-CRuby uses subversion for source control, you can find installation
-instructions and lots of great info to learn subversion on the
-{svnbook.red-bean.com}[http://svnbook.red-bean.com/]. For other resources see
-the {ruby-core documentation on
-ruby-lang.org}[http://www.ruby-lang.org/en/community/ruby-core/].
-
-This guide will use git for contributing. The {git
-homepage}[http://git-scm.com/] has installation instructions with links to
-documentation for learning more about git. There is a mirror of the subversion
-repository on {github}[https://github.com/ruby/ruby].
-
-Install the prerequisite dependencies for building the CRuby interpreter to
-run tests.
-
-* C compiler
-* autoconf
-* bison
-* gperf
-* ruby - Ruby itself is prerequisite in order to build Ruby from source. It
- can be 1.8.
-
-You should also have access to development headers for the following
-libraries, but these are not required:
-
-* Tcl/Tk
-* NDBM/QDBM
-* GDBM
-* OpenSSL
-* readline/editline(libedit)
-* zlib
-* libffi
-* libyaml
-* libexecinfo (FreeBSD)
-
-Now let's build CRuby:
-
-* Checkout the CRuby source code:
-
- git clone git://github.com/ruby/ruby.git ruby-trunk
-
-* Generate the configuration files and build:
-
- cd ruby-trunk
- autoconf
- mkdir build && cd build # its good practice to build outside of source dir
- mkdir ~/.rubies # we will install to .rubies/ruby-trunk in our home dir
- ../configure --prefix=~/.rubies/ruby-trunk
- make && make install
-
-After adding Ruby to your PATH, you should be ready to run the test suite:
-
- make test
-
-You can also use +test-all+ to run all of the tests with the RUNRUBY
-interpreter just built. Use TESTS or RUNRUBYOPT to pass parameters, such as:
-
- make test-all TESTS=-v
-
-This is also how you can run a specific test from our build dir:
-
- make test-all TESTS=drb/test_drb.rb
-
-For older versions of Ruby you'll need to run the build setup again after
-checking out the associated branch in git, for example if you wanted to
-checkout 1.9.3:
-
- git clone git://github.com/ruby/ruby.git --branch ruby_1_9_3
-
-== Contributing Documentation
-
-If you're interested in contributing documentation directly to CRuby there is
-a wealth of information available at
-{documenting-ruby.org}[http://documenting-ruby.org/].
-
-There is also the {Ruby Reference
-Manual}[https://bugs.ruby-lang.org/projects/rurema] in Japanese.
-
-== Contributing A Patch
-
-=== Deciding what to patch
-
-Before you submit a patch, there are a few things you should know:
-
-* Pay attention to the maintenance policy for stable and maintained versions of Ruby.
-* Released versions in security mode will not merge feature changes.
-* Search for previous discussions on ruby-core to verify the maintenance policy
-* Patches must be distributed under Ruby's license.
-* This license may change in the future, you must join the discussion if you don't agree to the change
-
-To improve the chance your patch will be accepted please follow these simple rules:
-
-* Bug fixes should be committed on trunk first
-* Format of the patch file must be a unified diff (ie: diff -pu, svn diff, or git diff)
-* Don't introduce cosmetic changes
-* Follow the original coding style of the code
-* Don't mix different changes in one commit
-
-First thing you should do is check out the code if you haven't already:
-
- git clone git://github.com/ruby/ruby.git ruby-trunk
-
-Now create a dedicated branch:
-
- cd ruby-trunk
- git checkout -b my_new_branch
-
-The name of your branch doesn't really matter because it will only exist on
-your local computer and won't be part of the official Ruby repository. It will
-be used to create patches based on the differences between your branch and
-trunk, or edge Ruby.
-
-=== Coding style
-
-Here are some general rules to follow when writing Ruby and C code for CRuby:
-
-* Indent 4 spaces for C with tabs for eight-space indentation (emacs default)
-* Indent 2 space tabs for Ruby
-* Do not use TABs in ruby codes
-* ANSI C style for 1.9+ for function declarations
-* Follow C90 (not C99) Standard
-* PascalStyle for class/module names.
-* UNDERSCORE_SEPARATED_UPPER_CASE for other constants.
-* Capitalize words.
-* ABBRs should be all upper case.
-* Do as others do
-
-=== ChangeLog
-
-Although not required, if you wish to add a ChangeLog entry for your change
-please note:
-
-You can use the following template for the ChangeLog entry on your commit:
-
- Thu Jan 1 00:00:00 2004 Your Name <yourmail@example.com>
-
- * filename (function): short description of this commit.
- This should include your intention of this change.
- [bug:#number] [mailinglist:number]
-
- * filename2 (function2): additional description for this file/function.
-
-This follows {GNU Coding Standards for Change
-Logs}[http://www.gnu.org/prep/standards/html_node/Change-Logs.html#Change-Logs],
-some other requirements and tips:
-
-* Timestamps must be in JST (+09:00) in the style as above.
-* Two spaces between the timestamp and your name. Two spaces between
- your name and your mail address.
-* One blank line between the timestamp and the description.
-* Indent the description with TAB. 2nd line should begin with TAB+2SP.
-* Write a entry (*) for each change.
-* Refer to redmine issue or discussion on the mailing list.
-* For GitHub issues, use [GH-#] (such as [Fixes GH-234]
-* One blank line between entries.
-* Do as other committers do.
-
-You can generate the ChangeLog entry by running <code>make change</code>
-
-When you're ready to commit, copy your ChangeLog entry into the commit message,
-keeping the same formatting and select your files:
-
- git commit ChangeLog path/to/files
-
-In the likely event that your branch becomes outdated, you will have to update
-your working branch:
-
- git fetch origin
- git rebase remotes/origin/master
-
-Now that you've got some code you want to contribute, let's get set up to
-generate a patch. Start by forking the github mirror, check the {github docs on
-forking}[https://help.github.com/articles/fork-a-repo] if you get stuck here.
-here. You will also need a github account if you don't yet have one.
-
-Next copy the writable url for your fork and add it as a git remote, replace
-"my_username" with your github account name:
-
- git remote add my_fork git@github.com:my_username/ruby.git
- # Now we can push our branch to our fork
- git push my_fork my_new_branch
-
-In order to generate a patch that you can upload to the bug tracker, we can use
-the github interface to review our changes just visit
-https://github.com/my_username/ruby/compare/trunk...my_new_branch
-
-Next, you can simply add '.patch' to the end of this URL and it will generate
-the patch for you, save the file to your computer and upload it to the bug
-tracker. Alternatively you can submit a pull request, but for the best chances
-to receive feedback add it is recommended you add it to redmine.
-
-
-
-
diff --git a/doc/contributors.rdoc b/doc/contributors.rdoc
deleted file mode 100644
index 96fe887e4e..0000000000
--- a/doc/contributors.rdoc
+++ /dev/null
@@ -1,778 +0,0 @@
-= Contributors to Ruby
-
-The following list might be imcomplete. Feel free to add your name if your
-patch was accepted into Ruby.
-
-== A
-
-Ayumu AIZAWA (ayumin)
-* committer
-
-AKIYOSHI, Masamichi (akiyoshi)
-* committer
-* He had maintained the VMS support on 2003-2004.
-
-Muhammad Ali
-* wrote rdoc for Fiber
-
-Minero Aoki (aamine)
-* committer
-* He is the maintainer of:
- * fileutils
- * net/http, net/https
- * net/pop
- * net/smtp
- * racc
- * ripper
- * strscan
-
-Wakou Aoyama (wakou)
-* committer
-* He was the maintainer of some standard libraries.
-
-Koji Arai
-* committer
-
-arton
-* He is the distributor of ActiveScriptRuby and experimental 1.9.0-x installers for win32.
-* Wrote patches for win32ole, gc.c, tmpdir.rb
-
-== B
-
-Daniel Berger
-* a patch for irb
-* documentation
-* He wrote forwardable.rb
-
-David Black (dblack)
-* committer
-* He is the maintainer of scanf
-
-Ken Bloom
-* a patch for REXML.
-
-Oliver M. Bolzer
-* a patch for soap
-
-Alexey Borzenkov
-* a patch for mkmf.rb
-
-Richard Brown
-* a patch for configure.in
-
-Dirkjan Bussink
-* a patch for date.rb
-
-Daniel Bovensiepen
-* documentation
-* a patch for irb
-
-== C
-
-Brian Candler
-* a patch for configure.in, net/telnet
-
-keith cascio
-* a patch for optparse.rb
-
-Frederick Cheung
-* a patch for test/ruby/test_symbol.rb
-
-Christoph
-* patches for set.rb
-
-Sean Chittenden
-* pathces for net/http, cgi
-
-William D. Clinger
-* ruby_strtod is based on his paper.
-
-== D
-
-Ryan Davis (ryan)
-* committer
-* He wrote and is the maintainer of miniunit
-
-Guy Decoux (ts)
-* committer
-
-Zach Dennis
-
-Martin Duerst (duerst)
-* committer
-* M17N
-
-Paul Duncan
-* pathces for rdoc
-
-Alexander Dymo
-* a patch for lib/benchmark.rb
-
-== E
-
-Yusuke Endoh (mame)
-* committer
-* He wrote and is the maintainer of base64 library (1.9)
-* did much upon YARV compiler.
-
-erlercw
-* wrote Integer::gcd2
-
-== F
-
-Frank S.Fejes
-* a patch for net/pop
-
-Fundakowski Feldman
-* a patch for process.c
-
-Mauricio Fernandez
-* patches for parse.y
-
-David Flanagan (davidflanagan)
-* committer
-* M17N
-
-Takeyuki Fujioka (xibbar)
-* committer
-* He is the maintainer of cgi/*
-
-FUKUMOTO, Atsushi
-* a patch for tracer.rb
-
-Shota Fukumori (sorah)
-* committer
-* #4415 parallel unit/test
-
-Tadayoshi Funaba (tadf)
-* committer
-* He wrote and is the maintainer of
- * date
- * parsedate (1.8)
-* He ported rational.rb and complex.rb, which 1.8 contains, into rational.c and complex.c of 1.9.
-
-== G
-
-David M. Gay
-* ruby_strtod
-
-Florian Gilcher
-* documentation
-
-GOTOU, Kentaro (gotoken)
-* committer
-* He wrote benchmark.rb
-* He is the maintainer of:
- * benchmark.rb
- * open3
-
-GOTOU, Yuuzou (gotoyuzo)
-* committer
-
-James Edward Gray II (jeg2)
-* committer
-* He wrote the faster implementation of CSV and is the maintainer of csv.
-* Wrote documentation for rdoc
-
-== H
-
-Phil Hagelberg
-* patch for ruby-mode.el's documentation.
-
-Kirk Haines (wyhaines)
-* committer
-* the maintainer of ruby_1_8_6 branch
-
-Shinichiro Hamaji
-* fixed memory leaks (marshal.c, string.c)
-
-Shin-ichiro HARA
-* the developer and the sysop of ruby-{dev,list,core,talk} archive.
-* a patch for numeric.c
-
-Chris Heath (traumdeutung)
-* a patch for proc.c
-
-HIROKAWA Hisashi
-* fixed socket/socket.c
-
-Daniel Hob
-* He wrote:
- * SMTP-TLS support for net/smtp.
- * POP3S support
-
-Eric Hodel (drbrain)
-* committer
-* He is the maintainer of:
- * rdoc
- * ri
- * rubygems
-
-Erik Hollensbe
-* a patch for delegate.rb
-
-Johan Holmberg
-* a patch for dir.c
-* documentation
-
-Erik Huelsmann
-
-Dae San Hwang
-* built a continuous integration environment on OpenSolaris.
-
-== I
-
-Nobuhiro IMAI
-* a patch for logger.rb
-
-"incorporate"
-* a patch for sprintf.c
-
-Keiju Ishitsuka (keiju)
-* committer
-* He wrote and is the maintainer of:
- * cmath.rb (1.9)
- * complex.rb (1.8)
- * e2mmap.rb
- * forwardable.rb
- * irb
- * mathn
- * matrix.rb
- * mutex_m.rb
- * rational.rb (1.8)
- * sync.rb
- * shell/*
- * thwait.rb
- * tracer.rb
-
-== J
-
-Curtis Jackson
-* missing/dup2.c
-
-Alan Johnson
-* a patch for net/ftp
-
-Lyle Johnson
-* patches for nkf, bigdecimal, numeric.c
-
-== K
-
-Yoshihiro Kambayashi
-* a patch for enc/trans/single_byte.trans.
-* He wrote supports for some encodings.
-
-Yutaka Kanemoto
-* patches for common.mk, AIX AF_INET6 support
-
-Motoyuki Kasahara
-* He wrote getoptlong.rb
-
-Masahiro Kawato
-* a patch for shellwords.rb
-
-Wataru Kimura
-* a patch for configure.in
-
-Michael Klishin
-* patch for make help.
-
-Noritada Kobayashi
-* a patch for optparse.rb
-
-Shigeo Kobayashi (shigek)
-* committer
-* He is the maintainer of bigdecimal
-
-KONISHI, Hiromasa (H_Konishi)
-* committer
-* He had maintained the bcc32 support in 2004.
-
-Kornelius "murphy" Kalnbach
-* documentation
-
-K.Kosako (kosako)
-* committer
-* He wrote Oniguruma.
-
-Takehiro Kubo
-* patches for dl 64bit support.
-
-== L
-
-Marc-Andre Lafortune (marcandre)
-* committer
-* patches for hash.c, array.c, thread.c, enumc, string.c, range.c and rdoc documentation.
-
-Hongli Lai
-* improved pstore.rb
-* patch for tool/file2lastrev.rb.
-
-raspberry lemon
-* a patch for webrick/httpproxy.rb.
-
-Christian Loew
-* a patch for fileutils.rb
-
-== M
-
-Shugo Maeda (shugo)
-* committer
-* A system administrator of ruby-lang.org servers.
-* He wrote and is the maintainer of:
- * monitor.rb
- * net/ftp
- * net/imap
-
-Stephan Maka (mathew)
-* documentation
-
-Yukihiro Matsumoto (matz)
-* Matz -- the founder, language designer of Ruby.
-* committer
-* Ruby itself, most of Ruby.
-* He is the maintainer of:
- * singleton
- * timeout
- * gdbm
- * sdbm
-
-Konrad Meyer
-* documentation
-
-Mib Software
-* missing/vsnprintf.c
-
-Todd C. Miller
-* missing/strlcat.c
-* missing/strlcpy.c
-
-MIYASAKA, Masaru
-* a patch for cgi.rb
-
-Stefan Monnier
-* regex.c was fixed with based on his Emacs21 patch.
-
-Marcel Moolenaar
-* patches for eval.c and gc.c.
-
-moonwolf
-* a patch for REXML, xmlrpc
-
-Hiroshi Moriyama
-* a patch for yaml.
-
-Kyosuke Morohashi
-* a patch for gem_prelude.rb
-
-Kenta Murata
-* patches for json, bignum.c
-
-Akinori MUSHA (knu)
-* committer
-* He wrote and is the maintainer of:
- * abbrev.rb
- * generator (1.8)
- * enumerator (1.8)
- * set
- * ipaddr.rb
- * digest/*
- * syslog
-* He is the branch maintainer of ruby_1_8, the release manager of 1.8 series.
-
-== N
-
-Hidetoshi NAGAI (nagai)
-* committer
-* He is the maintainer of tk/*
-
-Nobuyoshi Nakada (nobu)
-* committer
-* a.k.a. the "patch monster"
-* He wrote and is the maintainer of:
- * optparse
- * stringio
- * io/wait
- * iconv
-
-Satoshi Nakagawa
-* patches for util.c
-
-Narihiro Nakamura (nari)
-* committer
-* a.k.a. authorNari
-* working at GC
-
-NAKAMURA, Hiroshi (nahi)
-* committer
-* He is the maintainer of:
- * csv.rb (1.8)
- * logger.rb
- * soap/* (1.8)
- * wsdl/* (1.8)
- * xsd/* (1.8)
-
-NAKAMURA, Usaku (usa)
-* committer
-* a.k.a. unak
-* He is the maintainer of mswin32 and mswin64 support.
-
-NARUSE, Yui (naruse)
-* committer
-* a.k.a. "nurse"
-* Did much upon m17n.
-* He is the maintainer of:
- * json
- * nkf
-
-Christian Neukirchen
-* a patch for webrick/httputils
-
-Michael Neumann (mneumann)
-* committer
-* He is the maintainer of
- * xmlrpc (1.8)
- * gserver (1.8)
-
-NISHIO Hirokazu
-* wrote a patch for CVE-2010-0541
-
-Kazuhiro NISHIYAMA (kazu)
-* committer
-* a.k.a. znz
-
-Go Noguchi
-
-Martin Nordholts
-* misc/rdebug.el
-
-nmu
-* a patch for socket
-
-== O
-
-okkez
-* He is a sysop of the Ruby Reference Manual Renewal Project.
-* fixed ipaddr.rb, ext/etc
-
-Haruhiko Okumura
-* some of missing/* is based on his book:
- * missing/erf.c
- * missing/lgamma_r.c
- * missing/tgamma.c
-
-OMAE, jun
-* a patch for debug.rb
-
-Eugene Ossintsev
-* documentation
-
-== P
-
-Heesob Park
-* a patch for win32/win32.c.
-
-pegacorn
-* a patch for instruby.rb
-
-== Q
-
-== R
-
-Gaston Ramos
-* documentation
-
-The Regents of the University of California
-* missing/crypt.c
-* missing/vsnprintf.c
-
-Sam Roberts
-* patch for socket
-* documentation
-
-Michal Rokos (michal)
-* committer
-* He was the maintainer of DJGPP support.
-
-rubikitch
-* a patch for io.c
-
-Marcus Rueckert
-* a patch for mkconfig.rb.
-
-Run Paint Run Run
-* patch for enc/unicode.c
-* documentation
-
-Sean Russell (ser)
-* committer
-* He wrote and is the maintainer of REXML.
-
-== S
-
-Kazuo Saito (ksaito)
-* committer
-* M17N
-
-Tadashi Saito
-* patches for test/ruby/test_math.rb, thread_*.c, bignum.c
-* working upon BigDecimal.
-* did much upon documentation
-
-Masahiro Sakai
-* a patch for io.c
-
-Laurent Sansonetti
-* a patch for tool/ytab.sed
-
-Jeff Saracco
-* documentation
-
-Koichi Sasada (ko1)
-* committer
-* He wrote YARV.
-
-Hugh Sasse
-* a patch for net/http
-* documentation
-
-Charlie Savage
-* a patch for win32/Makefile.sub
-
-Michael Scholz
-* a patch for ruby-mode.el
-
-Arthur Schreiber
-* patch for net/http and rdoc.
-
-Masatoshi SEKI (seki)
-* committer
-* He wrote and is the maintainer of:
- * drb/*
- * erb
- * rinda
-
-Roman Shterenzon
-* a patch for open-uri.
-
-Kent Sibilev
-
-Gavin Sinclair (gsinclair)
-* committer
-
-John W. Small
-* He wrote gserver.rb
-
-Yuki Sonoda (yugui)
-* committer
-* She is the maintainer of man/* manual pages and is the release manager of 1.9 series.
-* She wrote prime.rb.
-* A developer and a sysop of redmine.ruby-lang.org.
-
-SOUMA, Yutaka
-* a patch for pack.c.
-
-Tatsuki Sugiura
-* WebDAV support for net/http
-
-Masaki Suketa (suke)
-* committer
-* He is the maintainer of win32ole
-
-sheepman
-* patches for ruby.c, thread.c, stringio, enum.c, webrick, net/http
-
-Siena. (siena)
-* committer
-
-Kirill A. Shutemov
-* a patch for parse.y
-
-Darren Smith
-* a patch for golf_prelude.rb
-
-Richard M. Stallman
-* missing/alloca.c
-
-Robin Stocker
-* documentation
-
-Adam Strzelecki
-* a patch for compile.c
-
-Masashi Sumi
-* improved net/pop.rb
-
-Eric Sunshine
-* NeXT OpenStep, Rhapsody support
-
-Kouhei Sutou (kou)
-* committer
-* He wrote and is the maintainer of rss/*
-
-David Symonds
-* documentation
-
-== T
-
-TAKANO Mitsuhiro (takano32)
-* committer
-* He is the maintainer of IA-64 support.
-* BigDecimal
-
-TAKAO, Kouji (kouji)
-* committer
-* He is the maintainer of readline.
-
-Nathaniel Talbott (ntalbott)
-* committer
-* He was the maintainer of test/unit, runit, rubyunit.
-
-TANAKA, Akira (akr)
-* committer
-* Did much upon m17n.
-* And he is the maintainer of:
- * open-uri
- * pathname
- * pp
- * resolv-replace
- * resolv
- * time
- * tsort
-
-Takaaki Tateishi (ttate)
-* committer
-* He was the maintainer of dl
-
-Technorama Ltd. (technoroma)
-* committer
-* openssl
-
-Andrew Thompson
-* a patch for socket.c IRIX support.
-
-Dave Thomas (dave)
-* committer
-* a.k.a. the Pragmatic Programmer.
-* He wrote rdoc.
-
-Tietew
-* patches for win32 support
-
-Masahiro Tomita
-* a patch for cgi.rb
-
-Jakub Travnik
-* a patch for eval.c
-
-Tom Truscott
-* missing/crypt.c
-
-== U
-
-UEDA, Satoshi
-* a patch for uri
-
-Takaaki Uematsu (uema2)
-* committer
-* He was the maintainer of WinCE support.
-
-UENO, Katsuhiro (katsu)
-* committer
-* He is the maintainer of zlib
-
-Hajimu UMEMOTO
-* He wrote ipaddr.rb
-
-URABE, Shyouhei (shyouhei)
-* committer
-* a.k.a. mput.
-* He is the branch maintainer of ruby_1_8_6 and ruby_1_8_7
-* and is the release manager of 1.8.x-pXXX.
-
-== V
-
-Joel VanderWerf
-* a patch for numeric.c
-
-Peter Vanbroekhoven
-
-Corinna Vinschen
-
-== W
-
-wanabe (wanabe)
-* committer
-* fixed YARV and Oniguruma.
-
-Chun Wang
-* a patch for time.rb
-
-WATANABE, Hirofumi (eban)
-* committer
-* He is the maintainer of
- * ftools (1.8)
- * tmpdir
- * un
- * Win32API
-
-WATANABE, Tetsuya
-* a patch for ruby.c
-
-William Webber (wew)
-* committer
-
-Jim Weirich (jim)
-* committer
-* He wrote Rake.
-
-Nathan Weizenbaum
-* fixed misc/ruby-mode.el.
-
-why the lukky stiff (why)
-* committer
-* He is the maintainer of syck
-
-Caley Woods
-* documentation
-
-Gary Wright
-* documentation
-
-== X
-
-== Y
-
-Akira Yamada (akira)
-* committer
-* He is the maintainer of ruby related packages at Debian project.
-
-Keita Yamaguchi
-* patches for enum.c, parse.y
-* documentation
-
-Hirokazu Yamamoto (ocean)
-* committer
-
-Hirotaka Yoshioka
-* a patch for improving SEGV handling
-
-== Z
-
-Aristarkh A Zagorodnikov
-* a patch for io.c
-
-Alexander Zavorine
-* committer
-* He is the maintainer for Symbian OS.
-
-Chiyuan Zhang
-* a patch for misc/ruby-mode.el.
-
-Dee Zsombor (zunda)
-* a patch for thread_pthread.c
-
-Dan Zwell
-* a patch for net/pop
-
-
diff --git a/doc/dtrace_probes.rdoc b/doc/dtrace_probes.rdoc
deleted file mode 100644
index a1e0fff3b0..0000000000
--- a/doc/dtrace_probes.rdoc
+++ /dev/null
@@ -1,178 +0,0 @@
-= DTrace Probes
-
-A list of DTrace probes and their functionality. "Module" and "Function" cannot
-be defined in user defined probes (known as USDT), so they will not be
-specified. Probe definitions are in the format of:
-
- provider:module:function:name(arguments)
-
-Since module and function cannot be specified, they will be blank. An example
-probe definition for Ruby would then be:
-
- ruby:::function-entry(class name, method name, file name, line number)
-
-Where "ruby" is the provider name, module and function names are blank, the
-probe name is "function-entry", and the probe takes four arguments:
-
-* class name
-* method name
-* file name
-* line number
-
-== Probes List
-
-=== Stability
-
-Before we list the specific probes, let's talk about stability. Probe stability
-is declared in the probes.d file at the bottom on the #pragma D attributes
-lines. Here is a description of each of the stability declarations.
-
-[Provider name stability]
- The provider name of "ruby" has been declared as stable. It is unlikely that
- we will change the provider name from "ruby" to something else.
-
-[Module and Function stability]
- Since we are not allowed to provide values for the module and function name,
- the values we have provided (no value) is declared as stable.
-
-[Probe name stability]
- The probe names are likely to change in the future, so they are marked as
- "Evolving". Consumers should not depend on these names to be stable.
-
-[Probe argument stability]
- The parameters passed to the probes are likely to change in the future, so
- they are marked as "Evolving". Consumers should not depend on these to be
- stable.
-
-=== Declared probes
-
-Probes are defined in the probes.d file. Here are the declared probes along
-with when they are fired and the arguments they take:
-
-[ruby:::method-entry(classname, methodname, filename, lineno);]
- This probe is fired just before a method is entered.
-
- classname name of the class (a string)
- methodname name of the method about to be executed (a string)
- filename the file name where the method is _being called_ (a string)
- lineno the line number where the method is _being called_ (an int)
-
-[ruby:::method-return(classname, methodname, filename, lineno);]
- This probe is fired just after a method has returned. The arguments are the
- same as "ruby:::function-entry".
-
-[ruby:::cmethod-entry(classname, methodname, filename, lineno);]
- This probe is fired just before a C method is entered. The arguments are the
- same as "ruby:::function-entry".
-
-[ruby:::cmethod-return(classname, methodname, filename, lineno);]
- This probe is fired just before a C method returns. The arguments are the
- same as "ruby:::function-entry".
-
-[ruby:::require-entry(requiredfile, filename, lineno);]
- This probe is fired on calls to rb_require_safe (when a file is required).
-
- requiredfile is the name of the file to be required (string).
- filename is the file that called "require" (string).
- lineno is the line number where the call to require was made (int).
-
-[ruby:::require-return(requiredfile, filename, lineno);]
- This probe is fired just before rb_require_safe (when a file is required)
- returns. The arguments are the same as "ruby:::require-entry". This probe
- will not fire if there was an exception during file require.
-
-[ruby:::find-require-entry(requiredfile, filename, lineno);]
- This probe is fired right before search_required is called. search_required
- determines whether the file has already been required by searching loaded
- features ($"), and if not, figures out which file must be loaded.
-
- requiredfile is the file to be required (string).
- filename is the file that called "require" (string).
- lineno is the line number where the call to require was made (int).
-
-[ruby:::find-require-return(requiredfile, filename, lineno);]
- This probe is fired right after search_required returns. See the
- documentation for "ruby:::find-require-entry" for more details. Arguments for
- this probe are the same as "ruby:::find-require-entry".
-
-[ruby:::load-entry(loadedfile, filename, lineno);]
- This probe is fired when calls to "load" are made. The arguments are the same
- as "ruby:::require-entry".
-
-[ruby:::load-return(loadedfile, filename, lineno);]
- This probe is fired when "load" returns. The arguments are the same as
- "ruby:::load-entry".
-
-[ruby:::raise(classname, filename, lineno);]
- This probe is fired when an exception is raised.
-
- classname is the class name of the raised exception (string)
- filename the name of the file where the exception was raised (string)
- lineno the line number in the file where the exception was raised (int)
-
-[ruby:::object-create(classname, filename, lineno);]
- This probe is fired when an object is about to be allocated.
-
- classname the class of the allocated object (string)
- filename the name of the file where the object is allocated (string)
- lineno the line number in the file where the object is allocated (int)
-
-[ruby:::array-create(length, filename, lineno);]
- This probe is fired when an Array is about to be allocated.
-
- length the size of the array (long)
- filename the name of the file where the array is allocated (string)
- lineno the line number in the file where the array is allocated (int)
-
-[ruby:::hash-create(length, filename, lineno);]
- This probe is fired when a Hash is about to be allocated.
-
- length the size of the hash (long)
- filename the name of the file where the hash is allocated (string)
- lineno the line number in the file where the hash is allocated (int)
-
-[ruby:::string-create(length, filename, lineno);]
- This probe is fired when a String is about to be allocated.
-
- length the size of the string (long)
- filename the name of the file where the string is allocated (string)
- lineno the line number in the file where the string is allocated (int)
-
-[ruby:::symbol-create(str, filename, lineno);]
- This probe is fired when a Symbol is about to be allocated.
-
- str the contents of the symbol (string)
- filename the name of the file where the string is allocated (string)
- lineno the line number in the file where the string is allocated (int)
-
-[ruby:::parse-begin(sourcefile, lineno);]
- Fired just before parsing and compiling a source file.
-
- sourcefile the file being parsed (string)
- lineno the line number where the source starts (int)
-
-[ruby:::parse-end(sourcefile, lineno);]
- Fired just after parsing and compiling a source file.
-
- sourcefile the file being parsed (string)
- lineno the line number where the source ended (int)
-
-[ruby:::gc-mark-begin();]
- Fired at the beginning of a mark phase.
-
-[ruby:::gc-mark-end();]
- Fired at the end of a mark phase.
-
-[ruby:::gc-sweep-begin();]
- Fired at the beginning of a sweep phase.
-
-[ruby:::gc-sweep-end();]
- Fired at the end of a sweep phase.
-
-[ruby:::method-cache-clear(class, sourcefile, lineno);]
- Fired when the method cache is cleared.
-
- class is the classname being cleared, or "global" (string)
- sourcefile the file being parsed (string)
- lineno the line number where the source ended (int)
-
diff --git a/doc/globals.rdoc b/doc/globals.rdoc
index f82b6f8796..379acea7cf 100644
--- a/doc/globals.rdoc
+++ b/doc/globals.rdoc
@@ -22,34 +22,26 @@ $_:: The last input line of string by gets or readline.
$0:: Contains the name of the script being executed. May be assignable.
$*:: Command line arguments given for the script sans args.
$$:: The process number of the Ruby running this script.
-$?:: The status of the last executed child process. This value is
- thread-local.
+$?:: The status of the last executed child process.
$::: Load path for scripts and binary modules by load or require.
$":: The array contains the module names loaded by require.
-$DEBUG:: The debug flag, which is set by the -d switch. Enabling debug
- output prints each exception raised to $stderr (but not its
- backtrace). Setting this to a true value enables debug output as
- if -d were given on the command line. Setting this to a false
- value disables debug output.
+$DEBUG:: The status of the -d switch.
$FILENAME:: Current input file from $<. Same as $<.filename.
$LOAD_PATH:: The alias to the $:.
$stderr:: The current standard error output.
$stdin:: The current standard input.
$stdout:: The current standard output.
-$VERBOSE:: The verbose flag, which is set by the -w or -v switch. Setting
- this to a true value enables warnings as if -w or -v were given
- on the command line. Setting this to nil disables warnings,
- including from Kernel#warn.
+$VERBOSE:: The verbose flag, which is set by the -v switch.
$-0:: The alias to $/.
$-a:: True if option -a is set. Read-only variable.
-$-d:: The alias of $DEBUG. See $DEBUG above for further discussion.
+$-d:: The alias to $DEBUG.
$-F:: The alias to $;.
$-i:: In in-place-edit mode, this variable holds the extension, otherwise nil.
$-I:: The alias to $:.
$-l:: True if option -l is set. Read-only variable.
$-p:: True if option -p is set. Read-only variable.
-$-v:: An alias of $VERBOSE. See $VERBOSE above for further discussion.
-$-w:: An alias of $VERBOSE. See $VERBOSE above for further discussion.
+$-v:: The alias to $VERBOSE.
+$-w:: True if option -w is set.
== Pre-defined global constants
diff --git a/doc/irb/irb.rd.ja b/doc/irb/irb.rd.ja
index 416dec3906..6c213a178c 100644
--- a/doc/irb/irb.rd.ja
+++ b/doc/irb/irb.rd.ja
@@ -12,7 +12,7 @@ irbã¯interactive rubyã®ç•¥ã§ã™. rubyã®å¼ã‚’標準入力ã‹ã‚‰ç°¡å˜ã«å…¥å
% irb
-ã§è¡Œãªã„ã¾ã™.
+ã§è¡Œãªã„ã¾ã™.
= ä½¿ã„æ–¹
@@ -30,7 +30,7 @@ irbã®ä½¿ã„æ–¹ã¯, Rubyã•ãˆçŸ¥ã£ã¦ã„れã°ã„ãŸã£ã¦ç°¡å˜ã§ã™. 基本
irb(main):005:2> end
irb(main):006:1> end
nil
- irb(main):007:0>
+ irb(main):007:0>
ã¾ãŸ, irbã¯Readlineモジュールã«ã‚‚対応ã—ã¦ã„ã¾ã™. ReadlineモジュールãŒ
インストールã•れã¦ã„る時ã«ã¯, ãれを使ã†ã®ãŒæ¨™æº–ã®å‹•作ã«ãªã‚Šã¾ã™.
@@ -48,19 +48,19 @@ irbã®ä½¿ã„æ–¹ã¯, Rubyã•ãˆçŸ¥ã£ã¦ã„れã°ã„ãŸã£ã¦ç°¡å˜ã§ã™. 基本
--noverbose ã“れã‹ã‚‰å®Ÿè¡Œã™ã‚‹è¡Œã‚’表示ã—ãªã„
--echo å®Ÿè¡Œçµæžœã‚’表示ã™ã‚‹(デフォルト)
--noecho å®Ÿè¡Œçµæžœã‚’表示ã—ãªã„
- --inspect çµæžœå‡ºåŠ›ã«inspectを用ã„ã‚‹(bcモード以外ã¯ãƒ‡ãƒ•ォルト).
+ --inspect çµæžœå‡ºåŠ›ã«inspectを用ã„ã‚‹(bcモード以外ã¯ãƒ‡ãƒ•ォルト).
--noinspect çµæžœå‡ºåŠ›ã«inspectを用ã„ãªã„.
--readline readlineライブラリを利用ã™ã‚‹.
--noreadline readlineライブラリを利用ã—ãªã„. デフォルトã®å‹•作ã¯,
inf-ruby-mode以外ã§readlineライブラリを利用ã—よã†
- ã¨ã™ã‚‹.
+ ã¨ã™ã‚‹.
--prompt prompt-mode
--prompt-mode prompt-mode
プロンプトモードを切替ãˆã¾ã™. ç¾åœ¨å®šç¾©ã•れã¦ã„るプ
ロンプトモードã¯, default, simple, xmp, inf-rubyãŒ
用æ„ã•れã¦ã„ã¾ã™. デフォルトã¯defaultプロンプトモー
ドã«ãªã£ã¦ã„ã¾ã™.
-
+
--inf-ruby-mode emacsã®inf-ruby-mode用ã®ãƒ—ロンプト表示を行ãªã†. 特
ã«æŒ‡å®šãŒãªã„é™ã‚Š, readlineライブラリã¯ä½¿ã‚ãªããªã‚‹.
--simple-prompt
@@ -69,7 +69,7 @@ irbã®ä½¿ã„æ–¹ã¯, Rubyã•ãˆçŸ¥ã£ã¦ã„れã°ã„ãŸã£ã¦ç°¡å˜ã§ã™. 基本
--tracer コマンド実行時ã«ãƒˆãƒ¬ãƒ¼ã‚¹ã‚’行ãªã†.
--back-trace-limit n
ãƒãƒƒã‚¯ãƒˆãƒ¬ãƒ¼ã‚¹è¡¨ç¤ºã‚’ãƒãƒƒã‚¯ãƒˆãƒ¬ãƒ¼ã‚¹ã®é ­ã‹ã‚‰ n, 後ã‚
- ã‹ã‚‰nã ã‘行ãªã†. デフォルトã¯16
+ ã‹ã‚‰nã ã‘行ãªã†. デフォルトã¯16
--irb_debug n irbã®ãƒ‡ãƒãƒƒã‚°ãƒ‡ãƒãƒƒã‚°ãƒ¬ãƒ™ãƒ«ã‚’nã«è¨­å®šã™ã‚‹(利用ã—ãª
ã„æ–¹ãŒç„¡é›£ã§ã—ょã†).
-v, --version irbã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’表示ã™ã‚‹
@@ -96,14 +96,14 @@ irb起動時ã«``~/.irbrc''を読ã¿è¾¼ã¿ã¾ã™. ã‚‚ã—存在ã—ãªã„å ´åˆã¯
IRB.conf[:USE_TRACER] = false
IRB.conf[:IGNORE_SIGINT] = true
IRB.conf[:IGNORE_EOF] = false
- IRB.conf[:PROMPT_MODE] = :DEFAULT
+ IRB.conf[:PROMPT_MODE] = :DEFALUT
IRB.conf[:PROMPT] = {...}
IRB.conf[:DEBUG_LEVEL]=0
IRB.conf[:VERBOSE]=true
== プロンプトã®è¨­å®š
-プロンプトをカスタマイズã—ãŸã„時ã«ã¯,
+プロンプトをカスタマイズã—ãŸã„時ã«ã¯,
IRB.conf[:PROMPT]
@@ -145,7 +145,7 @@ PROMPT_I, PROMPT_N, PROMPT_S, PROMPT_Cã¯, フォーマットを指定ã—ã¾ã™.
:PROMPT_S => "%N(%m):%03n:%i%l ",
:PROMPT_C => "%N(%m):%03n:%i* ",
:RETURN => "%s\n"
- }
+ }
ã¨ãªã£ã¦ã„ã¾ã™.
@@ -167,34 +167,34 @@ procã‚’irbã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‚’引数ã¨ã—ã¦å‘¼ã³å‡ºã—ã¾ã™. ã“れã«ã‚
irb拡張コマンドã¯, ç°¡å˜ãªåå‰ã¨é ­ã«`irb_'ã‚’ã¤ã‘ãŸåå‰ã¨ä¸¡æ–¹å®šç¾©ã•れã¦
ã„ã¾ã™. ã“れã¯, ç°¡å˜ãªåå‰ãŒoverrideã•ã‚ŒãŸæ™‚ã®ãŸã‚ã§ã™.
---- exit, quit, irb_exit
- 終了ã™ã‚‹.
+--- exit, quit, irb_exit
+ 終了ã™ã‚‹.
サブirbã®å ´åˆ, ãã®ã‚µãƒ–irbを終了ã™ã‚‹.
--- conf, irb_context
irbã®ç¾åœ¨ã®è¨­å®šã‚’表示ã™ã‚‹. 設定ã®å¤‰æ›´ã¯, confã«ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’é€ã‚‹ã“
- ã¨ã«ã‚ˆã£ã¦è¡Œãªãˆã‚‹.
+ ã¨ã«ã‚ˆã£ã¦è¡Œãªãˆã‚‹.
--- conf.eval_history = N
å®Ÿè¡Œçµæžœã®ãƒ’ストリ機能ã®è¨­å®š.
nnã¯æ•´æ•°ã‹nilã§ nn>0 ã§ã‚れã°ãã®æ•°ã ã‘ヒストリã«ãŸã‚る。nn==0ã®æ™‚ã¯
- 無制é™ã«è¨˜æ†¶ã™ã‚‹ã€nilã ã¨ãƒ’ストリ機能ã¯ã‚„ã‚ã‚‹(デフォルト).
+ 無制é™ã«è¨˜æ†¶ã™ã‚‹ã€nilã ã¨ãƒ’ストリ機能ã¯ã‚„ã‚ã‚‹(デフォルト).
--- Conf.back_trace_limit
ãƒãƒƒã‚¯ãƒˆãƒ¬ãƒ¼ã‚¹è¡¨ç¤ºã‚’ãƒãƒƒã‚¯ãƒˆãƒ¬ãƒ¼ã‚¹ã®é ­ã‹ã‚‰n, 後ã‚ã‹ã‚‰nã ã‘行ãªã†.
デフォルトã¯16
-
+
--- conf.debug_level = N
irb用ã®ãƒ‡ãƒãƒƒã‚°ãƒ¬ãƒ™ãƒ«ã®è¨­å®š
--- conf.ignore_eof = true/false
^DãŒå…¥åŠ›ã•ã‚ŒãŸæ™‚ã®å‹•作を設定ã™ã‚‹. trueã®æ™‚ã¯^Dを無視ã™ã‚‹, falseã®
- 時ã¯irbを終了ã™ã‚‹.
+ 時ã¯irbを終了ã™ã‚‹.
--- conf.ignore_sigint= true/false
^CãŒå…¥åŠ›ã•ã‚ŒãŸæ™‚ã®å‹•作を設定ã™ã‚‹. false時ã¯, irbを終了ã™ã‚‹. trueã®
時ã®å‹•作ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚‹:
- 入力中: ã“れã¾ã§å…¥åŠ›ã—ãŸã‚‚ã®ã‚’キャンセルã—ãƒˆãƒƒãƒ—ãƒ¬ãƒ™ãƒ«ã«æˆ»ã‚‹.
+ 入力中: ã“れã¾ã§å…¥åŠ›ã—ãŸã‚‚ã®ã‚’キャンセルã—ãƒˆãƒƒãƒ—ãƒ¬ãƒ™ãƒ«ã«æˆ»ã‚‹.
実行中: 実行を中止ã™ã‚‹.
--- conf.inf_ruby_mode = true/false
@@ -205,7 +205,7 @@ irb拡張コマンドã¯, ç°¡å˜ãªåå‰ã¨é ­ã«`irb_'ã‚’ã¤ã‘ãŸåå‰ã¨ä¸¡
true: インスペクトã—ã¦è¡¨ç¤ºã™ã‚‹.
false: 通常ã®printã§è¡¨ç¤ºã™ã‚‹.
nil: 通常モードã§ã‚れã°, inspect modeã¨ãªã‚Š, mathãƒ¢ãƒ¼ãƒ‰ã®æ™‚ã¯, non
- inspect modeã¨ãªã‚‹.
+ inspect modeã¨ãªã‚‹.
--- conf.math_mode
å‚ç…§ã®ã¿. bcモード(分数, 行列ã®è¨ˆç®—ãŒã§ãã¾ã™)ã‹ã©ã†ã‹?
@@ -234,7 +234,7 @@ irb拡張コマンドã¯, ç°¡å˜ãªåå‰ã¨é ­ã«`irb_'ã‚’ã¤ã‘ãŸåå‰ã¨ä¸¡
true: readlineを使ã†.
false: readlineを使ã‚ãªã„.
nil: (デフォルト)inf-ruby-mode以外ã§readlineライブラリを利用ã—よ
- ã†ã¨ã™ã‚‹.
+ ã†ã¨ã™ã‚‹.
#
#--- conf.verbose=T/F
# irbã‹ã‚‰ã„ã‚ã„ã‚ãªãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’出力ã™ã‚‹ã‹?
@@ -276,9 +276,9 @@ irb拡張コマンドã¯, ç°¡å˜ãªåå‰ã¨é ­ã«`irb_'ã‚’ã¤ã‘ãŸåå‰ã¨ä¸¡
= システム変数
---- _
+--- _
å‰ã®è¨ˆç®—ã®å®Ÿè¡Œçµæžœã‚’覚ãˆã¦ã„ã‚‹(ローカル変数).
---- __
+--- __
å®Ÿè¡Œçµæžœã®å±¥æ­´ã‚’覚ãˆã¦ã„ã‚‹.
__[line_no]ã§ã€ãã®è¡Œã§å®Ÿè¡Œã—ãŸçµæžœã‚’å¾—ã‚‹ã“ã¨ãŒã§ãã‚‹. line_noãŒè² ã®
時ã«ã¯ã€æœ€æ–°ã®çµæžœã‹ã‚‰-line_noå‰ã®çµæžœã‚’å¾—ã‚‹ã“ã¨ãŒã§ãã‚‹.
@@ -321,7 +321,7 @@ irb拡張コマンドã¯, ç°¡å˜ãªåå‰ã¨é ­ã«`irb_'ã‚’ã¤ã‘ãŸåå‰ã¨ä¸¡
nil
irb#2(Foo):010:0> Foo.instance_methods
["bar", "foo"]
- irb#2(Foo):011:0> fg 0
+ irb#2(Foo):011:0> fg 0
nil
irb(main):007:0> f = Foo.new
#<Foo:0x4010af3c>
@@ -343,7 +343,7 @@ irb拡張コマンドã¯, ç°¡å˜ãªåå‰ã¨é ­ã«`irb_'ã‚’ã¤ã‘ãŸåå‰ã¨ä¸¡
#0->irb on main (#<Thread:0x400fb7e4> : running)
nil
irb(main):010:0> exit # 終了
- dim%
+ dim%
= 使用上ã®åˆ¶é™
@@ -372,11 +372,11 @@ rubyã§ã¯, 以下ã®ãƒ—ログラムã¯ã‚¨ãƒ©ãƒ¼ã«ãªã‚Šã¾ã™.
ã¨ãªã‚Š, エラーを起ã“ã—ã¾ã›ã‚“. ã“れã¯, rubyãŒæœ€åˆã«ã‚¹ã‚¯ãƒªãƒ—ト全体をコン
パイルã—ã¦ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•°ã‚’決定ã™ã‚‹ã‹ã‚‰ã§ã™. ãれã«å¯¾ã—, irbã¯å®Ÿè¡Œå¯èƒ½ã«
-ãªã‚‹(å¼ãŒé–‰ã˜ã‚‹)ã¨è‡ªå‹•çš„ã«è©•価ã—ã¦ã„ã‚‹ã‹ã‚‰ã§ã™. 上記ã®ä¾‹ã§ã¯,
+ãªã‚‹(å¼ãŒé–‰ã˜ã‚‹)ã¨è‡ªå‹•çš„ã«è©•価ã—ã¦ã„ã‚‹ã‹ã‚‰ã§ã™. 上記ã®ä¾‹ã§ã¯,
- evel "foo = 0"
+ evel "foo = 0"
-を行ãªã£ãŸæ™‚点ã§è©•価を行ãªã„, ãã®æ™‚点ã§å¤‰æ•°ãŒå®šç¾©ã•れるãŸã‚, 次å¼ã§
+を行ãªã£ãŸæ™‚点ã§è©•価を行ãªã„, ãã®æ™‚点ã§å¤‰æ•°ãŒå®šç¾©ã•れるãŸã‚, 次å¼ã§
変数fooã¯å®šç¾©ã•れã¦ã„ã‚‹ã‹ã‚‰ã§ã™.
ã“ã®ã‚ˆã†ãªrubyã¨irbã®å‹•作ã®é•ã„を解決ã—ãŸã„å ´åˆã¯, begin...endã§æ‹¬ã£ã¦
@@ -392,7 +392,7 @@ rubyã§ã¯, 以下ã®ãƒ—ログラムã¯ã‚¨ãƒ©ãƒ¼ã«ãªã‚Šã¾ã™.
== ヒアドキュメント
-ç¾åœ¨ã®ã¨ã“ã‚ヒアドキュメントã®å®Ÿè£…ã¯ä¸å®Œå…¨ã§ã™.
+ç¾åœ¨ã®ã¨ã“ã‚ヒアドキュメントã®å®Ÿè£…ã¯ä¸å®Œå…¨ã§ã™.
== シンボル
diff --git a/doc/maintainers.rdoc b/doc/maintainers.rdoc
deleted file mode 100644
index 82b8004662..0000000000
--- a/doc/maintainers.rdoc
+++ /dev/null
@@ -1,322 +0,0 @@
-= Maintainers
-
-This page describes the current module, library, and extension maintainers of Ruby.
-
-== Module Maintainers
-
-A module maintainer is responsible for a certain part of Ruby.
-
-* The maintainer fixes bugs of the part. Particularly, they should fix security vulnerabilities as soon as possible.
-* They handle issues related the module on the Redmine or ML.
-* They may be discharged by the 3 months rule [ruby-core:25764].
-* They have commit right to Ruby's repository to modify their part in the repository.
-* They have "developer" role on the Redmine to modify issues.
-* They have authority to decide the feature of their part. But they should always respect discussions on ruby-core/ruby-dev.
-
-A submaintainer of a module is like a maintainer. But The submaintainer does
-not have authority to change/add a feature on his/her part. They need consensus
-on ruby-core/ruby-dev before changing/adding. Some of submaintainers have
-commit right, others don't.
-
-=== Language core features including security
-
-Yukihiro Matsumoto (matz)
-
-=== Evaluator
-
-Koichi Sasada (ko1)
-
-=== Core classes
-
-Yukihiro Matsumoto (matz)
-
-=== Documentation
-
-Zachary Scott (zzak)
-
-== Library Maintainers
-
-[lib/English.rb]
- _unmaintained_
-[lib/abbrev.rb]
- Akinori MUSHA (knu)
-[lib/base64.rb]
- * 1.8: _unmaintained_
- * 1.9: Yusuke Endoh (mame)
-[lib/benchmark.rb]
- _unmaintained_
-[lib/cgi.rb, lib/cgi/*]
- Takeyuki Fujioka (xibbar)
-[lib/complex.rb]
- * 1.8: _unmaintained_
- * 1.9: moved into core
-[lib/cmath.rb]
- * 1.8: 1.9 feature
- * 1.9: _unmaintained_
-[lib/csv.rb]
- * 1.8: Hiroshi Nakamura (nahi)
- * 1.9: James Edward Gray II (jeg2)
-[lib/date.rb, lib/date/*]
- Tadayoshi Funaba (tadf)
-[lib/drb.rb, lib/drb/*]
- Masatoshi SEKI (seki)
-[lib/debug.rb]
- _unmaintained_
-[lib/delegate.rb]
- _unmaintained_
-[lib/e2mmap.rb]
- Keiju ISHITSUKA (keiju)
-[lib/erb.rb]
- Masatoshi SEKI (seki)
-[lib/fileutils.rb]
- _unmaintained_
-[lib/find.rb]
- Kazuki Tsujimoto (ktsj)
-[lib/finalize.rb]
- * 1.8: _unmaintained_
- * 1.9: _deprecated_
-[lib/forwardable.rb]
- Keiju ISHITSUKA (keiju)
-[lib/ftools.rb]
- * 1.8: _unmaintained_
- * 1.9: _deprecated_
-[lib/generator.rb]
- * 1.8: Akinori MUSHA (knu)
- * 1.9: moved into core
-[lib/getoptlong.rb]
- _unmaintained_
-[lib/getopts.rb]
- * 1.8: Akinori MUSHA (knu)
- * 1.9: _deprecated_
-[lib/gserver.rb]
- James Edward Gray II (jeg2)
-[lib/ipaddr.rb]
- Akinori MUSHA (knu)
-[lib/irb.rb, lib/irb/*]
- Keiju ISHITSUKA (keiju)
-[lib/jcode.rb]
- * 1.8: _unmaintained_
- * 1.9: _deprecated_
-[lib/logger.rb]
- Hiroshi Nakamura (nahi)
-[lib/mathn.rb]
- Keiju ISHITSUKA (keiju)
-[lib/matrix.rb]
- Marc-Andre Lafortune (marcandre)
-[lib/minitest/*]
- * 1.8: 1.9 feature
- * 1.9: Ryan Davis (ryan)
-[lib/mkmf.rb]
- _unmaintained_
-[lib/monitor.rb]
- Shugo Maeda (shugo)
-[lib/mutex_m.rb]
- Keiju ISHITSUKA (keiju)
-[lib/net/ftp.rb]
- Shugo Maeda (shugo)
-[lib/net/imap.rb]
- Shugo Maeda (shugo)
-[lib/net/telnet.rb]
- _unmaintained_
-[lib/net/http.rb, lib/net/https]
- NARUSE, Yui (naruse)
-[lib/net/pop.rb]
- _unmaintained_
-[lib/net/smtp.rb]
- _unmaintained_
-[lib/observer.rb]
- _unmaintained_
-[lib/open-uri.rb]
- Tanaka Akira (akr)
-[lib/open3.rb]
- _unmaintained_
-[lib/optparse.rb, lib/optparse/*]
- Nobuyuki Nakada (nobu)
-[lib/ostruct.rb]
- Marc-Andre Lafortune (marcandre)
-[lib/parsearg.rb]
- * 1.8: _unmaintained_
- * 1.9: _deprecated_
-[lib/parsedate.rb]
- * 1.8: Tadayoshi Funaba (tadf)
- * 1.9: _deprecated_
-[lib/pathname.rb]
- Tanaka Akira (akr)
-[lib/ping.rb]
- * 1.8: _unmaintained_
- * 1.9: _deprecated_
-[lib/pp.rb]
- Tanaka Akira (akr)
-[lib/prettyprint.rb]
- Tanaka Akira (akr)
-[lib/prime.rb]
- Yuki Sonoda (yugui)
-[lib/profile.rb]
- _unmaintained_
-[lib/profiler.rb]
- _unmaintained_
-[lib/pstore.rb]
- _unmaintained_
-[lib/racc/*]
- Aaron Patterson (tenderlove)
-[lib/rake/*]
- Eric Hodel (drbrain)
-[lib/rational.rb]
- * 1.8: _unmaintained_
- * 1.9: moved into core
-[lib/rdoc/*]
- Eric Hodel (drbrain)
-[lib/readbytes.rb]
- * 1.8: _unmaintained_
- * 1.9: _deprecated_
-[lib/resolv-replace.rb]
- Tanaka Akira (akr)
-[lib/resolv.rb]
- Tanaka Akira (akr)
-[lib/rexml/*]
- Kouhei Sutou (kou)
-[lib/rinda/*]
- Masatoshi SEKI (seki)
-[lib/rss/*]
- Kouhei Sutou (kou)
-[lib/rubygems.rb, lib/ubygems.rb, lib/rubygems/*]
- * 1.8: 1.9 feature
- * 1.9: Eric Hodel (drbrain)
-[lib/rubyunit.rb, lib/runit/*]
- * 1.8: _unmaintained_
- * 1.9: _deprecated_
-[lib/scanf.rb]
- David A. Black (dblack)
-[lib/set.rb]
- Akinori MUSHA (knu)
-[lib/securerandom.rb]
- Tanaka Akira (akr)
-[lib/shell.rb, lib/shell/*]
- Keiju ISHITSUKA (keiju)
-[lib/shellwords.rb]
- Akinori MUSHA (knu)
-[lib/singleton.rb]
- Yukihiro Matsumoto (matz)
-[lib/{soap|wsdl|xsd}/*]
- * 1.8: Hiroshi Nakamura (nahi)
- * 1.9: _deprecated_
-[lib/sync.rb]
- Keiju ISHITSUKA (keiju)
-[lib/tempfile.rb]
- _unmaintained_
-[lib/test/*]
- Shota Fukumori (sorah)
-[lib/tmpdir.rb]
- _unmaintained_
-[lib/thread.rb]
- _unmaintained_
-[lib/thwait.rb]
- Keiju ISHITSUKA (keiju)
-[lib/time.rb]
- Tanaka Akira (akr)
-[lib/timeout.rb]
- Yukihiro Matsumoto (matz)
-[lib/tracer.rb]
- Keiju ISHITSUKA (keiju)
-[lib/tsort.rb]
- Tanaka Akira (akr)
-[lib/un.rb]
- WATANABE Hirofumi (eban)
-[lib/uri.rb, lib/uri/*]
- YAMADA, Akira (akira)
-[lib/weakref.rb]
- _unmaintained_
-[lib/webrick.rb, lib/webrick/*]
- Hiroshi Nakamura (nahi)
-[lib/xmlrpc/*]
- Kouhei Sutou (kou)
-[lib/yaml.rb, lib/yaml/*]
- Aaron Patterson (tenderlove)
-
-== Extension Maintainers
-
-[ext/Win32API]
- * 1.8: _unmaintained_
- * 1.9: merged into dl
-[ext/bigdecimal]
- Kenta Murata (mrkn)
-[ext/continuation]
- * 1.8: 1.9 feature
- * 1.9: Koichi Sasada (ko1)
-[ext/coverage]
- Yusuke Endoh (mame)
-[ext/dbm]
- _unmaintained_
-[ext/digest, ext/digest/*]
- Akinori MUSHA (knu)
-[ext/dl]
- Aaron Patterson (tenderlove)
-[ext/dl/win32]
- NAKAMURA Usaku (usa)
-[ext/enumerator]
- * 1.8: Akinori MUSHA (knu)
- * 1.9: moved into core
-[ext/etc]
- _unmaintained_
-[ext/fcntl]
- _unmaintained_
-[ext/fiber]
- * 1.8: 1.9 feature
- * 1.9: Koichi Sasada (ko1)
-[ext/fiddle]
- Aaron Patterson (tenderlove)
-[ext/gdbm]
- Yukihiro Matsumoto (matz)
-[ext/iconv]
- Nobuyuki Nakada (nobu)
-[ext/io/wait]
- Nobuyuki Nakada (nobu)
-[ext/json]
- NARUSE, Yui (naruse)
-[ext/mathn/complex]
- * 1.8: 1.9 feature
- * 1.9: Keiju ISHITSUKA (keiju)
-[ext/mathn/rational]
- * 1.8: 1.9 feature
- * 1.9: Keiju ISHITSUKA (keiju)
-[ext/nkf]
- NARUSE, Yui (narse)
-[ext/objspace]
- _unmaintained_
-[ext/openssl]
- Martin Boßlet (emboss)
-[ext/psych]
- Aaron Patterson (tenderlove)
-[ext/pty]
- _unmaintained_
-[ext/racc]
- Aaron Patterson (tenderlove)
-[ext/readline]
- TAKAO Kouji (kouji)
-[ext/ripper]
- _unmaintained_
-[ext/sdbm]
- Yukihiro Matsumoto (matz)
-[ext/socket]
- * Tanaka Akira (akr)
- * API change needs matz's approval
-[ext/stringio]
- Nobuyuki Nakada (nobu)
-[ext/strscan]
- _unmaintained_
-[ext/syck]
- _unmaintained_
-[ext/syslog]
- Akinori MUSHA (knu)
-[ext/thread]
- * 1.8: _unmaintained_
- * 1.9: 1.8 feature
-[ext/tcltklib]
- _deprecated_
-[ext/tk]
- Hidetoshi NAGAI (nagai)
-[ext/win32ole]
- Masaki Suketa (suke)
-[ext/zlib]
- _unmaintained_
-
diff --git a/doc/marshal.rdoc b/doc/marshal.rdoc
deleted file mode 100644
index f97db00a49..0000000000
--- a/doc/marshal.rdoc
+++ /dev/null
@@ -1,313 +0,0 @@
-= Marshal Format
-
-The Marshal format is used to serialize ruby objects. The format can store
-arbitrary objects through three user-defined extension mechanisms.
-
-For documentation on using Marshal to serialize and deserialize objects, see
-the Marshal module.
-
-This document calls a serialized set of objects a stream. The Ruby
-implementation can load a set of objects from a String, an IO or an object
-that implements a +getc+ method.
-
-== Stream Format
-
-The first two bytes of the stream contain the major and minor version, each as
-a single byte encoding a digit. The version implemented in Ruby is 4.8
-(stored as "\x04\x08") and is supported by ruby 1.8.0 and newer.
-
-Different major versions of the Marshal format are not compatible and cannot
-be understood by other major versions. Lesser minor versions of the format
-can be understood by newer minor versions. Format 4.7 can be loaded by a 4.8
-implementation but format 4.8 cannot be loaded by a 4.7 implementation.
-
-Following the version bytes is a stream describing the serialized object. The
-stream contains nested objects (the same as a Ruby object) but objects in the
-stream do not necessarily have a direct mapping to the Ruby object model.
-
-Each object in the stream is described by a byte indicating its type followed
-by one or more bytes describing the object. When "object" is mentioned below
-it means any of the types below that defines a Ruby object.
-
-=== true, false, nil
-
-These objects are each one byte long. "T" is represents +true+, "F"
-represents +false+ and "0" represents +nil+.
-
-=== Fixnum and long
-
-"i" represents a signed 32 bit value using a packed format. One through five
-bytes follows the type. The value loaded will always be a Fixnum. On
-32 bit platforms (where the precision of a Fixnum is less than 32 bits)
-loading large values will cause overflow on CRuby.
-
-The fixnum type is used to represent both ruby Fixnum objects and the sizes of
-marshaled arrays, hashes, instance variables and other types. In the
-following sections "long" will mean the format described below, which supports
-full 32 bit precision.
-
-The first byte has the following special values:
-
-"\x00"::
- The value of the integer is 0. No bytes follow.
-
-"\x01"::
- The total size of the integer is two bytes. The following byte is a
- positive integer in the range of 0 through 255. Only values between 123
- and 255 should be represented this way to save bytes.
-
-"\xff"::
- The total size of the integer is two bytes. The following byte is a
- negative integer in the range of -1 through -256.
-
-"\x02"::
- The total size of the integer is three bytes. The following two bytes are a
- positive little-endian integer.
-
-"\xfe"::
- The total size of the integer is three bytes. The following two bytes are a
- negative little-endian integer.
-
-"\x03"::
- The total size of the integer is four bytes. The following three bytes are
- a positive little-endian integer.
-
-"\xfd"::
- The total size of the integer is two bytes. The following three bytes are a
- negative little-endian integer.
-
-"\x04"::
- The total size of the integer is five bytes. The following four bytes are a
- positive little-endian integer. For compatibility with 32 bit ruby,
- only Fixnums less than 1073741824 should be represented this way. For sizes
- of stream objects full precision may be used.
-
-"\xfc"::
- The total size of the integer is two bytes. The following four bytes are a
- negative little-endian integer. For compatibility with 32 bit ruby,
- only Fixnums greater than -10737341824 should be represented this way. For
- sizes of stream objects full precision may be used.
-
-Otherwise the first byte is a sign-extended eight-bit value with an offset.
-If the value is positive the value is determined by subtracting 5 from the
-value. If the value is negative the value is determined by adding 5 to the
-value.
-
-There are multiple representations for many values. CRuby always outputs the
-shortest representation possible.
-
-=== Symbols and Byte Sequence
-
-":" represents a real symbol. A real symbol contains the data needed to
-define the symbol for the rest of the stream as future occurrences in the
-stream will instead be references (a symbol link) to this one. The reference
-is a zero-indexed 32 bit value (so the first occurrence of <code>:hello</code>
-is 0).
-
-Following the type byte is byte sequence which consists of a long indicating
-the number of bytes in the sequence followed by that many bytes of data. Byte
-sequences have no encoding.
-
-For example, the following stream contains the Symbol <code>:hello</code>:
-
- "\x04\x08:\x0ahello"
-
-";" represents a Symbol link which references a previously defined Symbol.
-Following the type byte is a long containing the index in the lookup table for
-the linked (referenced) Symbol.
-
-For example, the following stream contains <code>[:hello, :hello]</code>:
-
- "\x04\b[\a:\nhello;\x00"
-
-When a "symbol" is referenced below it may be either a real symbol or a
-symbol link.
-
-=== Object References
-
-Separate from but similar to symbol references, the stream contains only one
-copy of each object (as determined by #object_id) for all objects except
-true, false, nil, Fixnums and Symbols (which are stored separately as
-described above) a one-indexed 32 bit value will be stored and reused when the
-object is encountered again. (The first object has an index of 1).
-
-"@" represents an object link. Following the type byte is a long giving the
-index of the object.
-
-For example, the following stream contains an Array of the object
-<code>"hello"</code> twice:
-
- "\004\b[\a\"\nhello@\006"
-
-=== Instance Variables
-
-"I" indicates that instance variables follow the next object. An object
-follows the type byte. Following the object is a length indicating the number
-of instance variables for the object. Following the length is a set of
-name-value pairs. The names are symbols while the values are objects. The
-symbols must be instance variable names (<code>:@name</code>).
-
-An Object ("o" type, described below) uses the same format for its instance
-variables as described here.
-
-For a String and Regexp (described below) a special instance variable
-<code>:E</code> is used to indicate the Encoding.
-
-=== Extended
-
-"e" indicates that the next object is extended by a module. An object follows
-the type byte. Following the object is a symbol that contains the name of the
-module the object is extended by.
-
-=== Array
-
-"[" represents an Array. Following the type byte is a long indicating the
-number of objects in the array. The given number of objects follow the
-length.
-
-=== Bignum
-
-"l" represents a Bignum which is composed of three parts:
-
-sign::
- A single byte containing "+" for a positive value or "-" for a negative
- value.
-length::
- A long indicating the number of bytes of Bignum data follows, divided by
- two. Multiply the length by two to determine the number of bytes of data
- that follow.
-data::
- Bytes of Bignum data representing the number.
-
-The following ruby code will reconstruct the Bignum value from an array of
-bytes:
-
- result = 0
-
- bytes.each_with_index do |byte, exp|
- result += (byte * 2 ** (exp * 8))
- end
-
-=== Class and Module
-
-"c" represents a Class object, "m" represents a Module and "M" represents
-either a class or module (this is an old-style for compatibility). No class
-or module content is included, this type is only a reference. Following the
-type byte is a byte sequence which is used to look up an existing class or
-module, respectively.
-
-Instance variables are not allowed on a class or module.
-
-If no class or module exists an exception should be raised.
-
-For "c" and "m" types, the loaded object must be a class or module,
-respectively.
-
-=== Data
-
-"d" represents a Data object. (Data objects are wrapped pointers from ruby
-extensions.) Following the type byte is a symbol indicating the class for the
-Data object and an object that contains the state of the Data object.
-
-To dump a Data object Ruby calls _dump_data. To load a Data object Ruby calls
-_load_data with the state of the object on a newly allocated instance.
-
-=== Float
-
-"f" represents a Float object. Following the type byte is a byte sequence
-containing the float value. The following values are special:
-
-"inf"::
- Positive infinity
-
-"-inf"::
- Negative infinity
-
-"nan"::
- Not a Number
-
-Otherwise the byte sequence contains a C double (loadable by strtod(3)).
-Older minor versions of Marshal also stored extra mantissa bits to ensure
-portability across platforms but 4.8 does not include these. See
-[ruby-talk:69518] for some explanation.
-
-=== Hash and Hash with Default Value
-
-"{" represents a Hash object while "}" represents a Hash with a default value
-set (<code>Hash.new 0</code>). Following the type byte is a long indicating
-the number of key-value pairs in the Hash, the size. Double the given number
-of objects follow the size.
-
-For a Hash with a default value, the default value follows all the pairs.
-
-=== Module and Old Module
-
-=== Object
-
-"o" represents an object that doesn't have any other special form (such as
-a user-defined or built-in format). Following the type byte is a symbol
-containing the class name of the object. Following the class name is a long
-indicating the number of instance variable names and values for the object.
-Double the given number of pairs of objects follow the size.
-
-The keys in the pairs must be symbols containing instance variable names.
-
-=== Regular Expression
-
-"/" represents a regular expression. Following the type byte is a byte
-sequence containing the regular expression source. Following the type byte is
-a byte containing the regular expression options (case-insensitive, etc.) as a
-signed 8-bit value.
-
-Regular expressions can have an encoding attached through instance variables
-(see above). If no encoding is attached escapes for the following regexp
-specials not present in ruby 1.8 must be removed: g-m, o-q, u, y, E, F, H-L,
-N-V, X, Y.
-
-=== String
-
-'"' represents a String. Following the type byte is a byte sequence
-containing the string content. When dumped from ruby 1.9 an encoding instance
-variable (<code>:E</code> see above) should be included unless the encoding is
-binary.
-
-=== Struct
-
-"S" represents a Struct. Following the type byte is a symbol containing the
-name of the struct. Following the name is a long indicating the number of
-members in the struct. Double the number of objects follow the member count.
-Each member is a pair containing the member's symbol and an object for the
-value of that member.
-
-If the struct name does not match a Struct subclass in the running ruby an
-exception should be raised.
-
-If there is a mismatch between the struct in the currently running ruby and
-the member count in the marshaled struct an exception should be raised.
-
-=== User Class
-
-"C" represents a subclass of a String, Regexp, Array or Hash. Following the
-type byte is a symbol containing the name of the subclass. Following the name
-is the wrapped object.
-
-=== User Defined
-
-"u" represents an object with a user-defined serialization format using the
-+_dump+ instance method and +_load+ class method. Following the type byte is
-a symbol containing the class name. Following the class name is a byte
-sequence containing the user-defined representation of the object.
-
-The class method +_load+ is called on the class with a string created from the
-byte-sequence.
-
-=== User Marshal
-
-"U" represents an object with a user-defined serialization format using the
-+marshal_dump+ and +marshal_load+ instance methods. Following the type byte
-is a symbol containing the class name. Following the class name is an object
-containing the data.
-
-Upon loading a new instance must be allocated and +marshal_load+ must be
-called on the instance with the data.
-
diff --git a/doc/pty/README b/doc/pty/README
new file mode 100644
index 0000000000..d6368f3758
--- /dev/null
+++ b/doc/pty/README
@@ -0,0 +1,84 @@
+pty extension version 0.3 by A.ito
+
+1. Introduction
+
+This extension module adds ruby a functionality to execute an
+arbitrary command through pseudo tty (pty).
+
+2. Install
+
+Follow the instruction below.
+
+(1) Execute
+
+ ruby extconf.rb
+
+ then Makefile is generated.
+
+(3) Do make; make install.
+
+3. What you can do
+
+This extension module defines a module named PTY, which contains
+following module fungtions:
+
+ getpty(command)
+ spawn(command)
+
+ This function reserves a pty, executes command over the pty
+ and returns an array. The return value is an array with three
+ elements. The first element in the array is for reading and the
+ second for writing. The third element is the process ID of the
+ child process. If this function is called with an iterator block,
+ the array is passed to the block as block parameters, and the
+ function itself returns nil.
+
+ When the child process is suspended or finished, an exception is
+ raised. If this function is called with an iterator block,
+ exception is raised only within the block. Child process
+ monitor is terminated on block exit.
+
+ protect_signal
+ reset_signal
+
+ These functions are obsolete in this version of pty.
+
+ PTY.open
+
+ Allocates a pty (pseudo-terminal).
+
+ It returns an array which contains an IO object and a File object.
+ The former is the master of the pty.
+ The latter is the slave of the pty.
+
+ If a block is given, it yields the array instead of return.
+ The value of the block is returned.
+ master_io and slave_file is closed when return if they are not closed.
+
+ PTY.check(pid[, raise=false])
+
+ checks the status of the child process specified by pid, and
+ returns nil if the process is still alive and active.
+ Otherwise, returns Process::Status about the process if raise is
+ false, or PTY::ChildExited exception is raised.
+
+4. License
+
+(C) Copyright 1998 by Akinori Ito.
+
+This software may be redistributed freely for this purpose, in full
+or in part, provided that this entire copyright notice is included
+on any copies of this software and applications and derivations thereof.
+
+This software is provided on an "as is" basis, without warranty of any
+kind, either expressed or implied, as to any matter including, but not
+limited to warranty of fitness of purpose, or merchantability, or
+results obtained from use of this software.
+
+5. Bug report
+
+Please feel free to send E-mail to
+
+ aito@ei5sun.yz.yamagata-u.ac.jp
+
+for any bug report, opinion, contribution, etc.
diff --git a/doc/pty/README.expect b/doc/pty/README.expect
new file mode 100644
index 0000000000..fddbb6fdad
--- /dev/null
+++ b/doc/pty/README.expect
@@ -0,0 +1,22 @@
+ README for expect
+ by A. Ito, 28 October, 1998
+
+ Expect library adds IO class a method called expect(), which
+does similar act to tcl's expect extension.
+
+The usage of the method is:
+
+ IO#expect(pattern,timeout=9999999)
+
+where `pattern' is an instance of String or Regexp and `timeout'
+is Fixnum, which can be omitted.
+ When the method is called without block, it waits until the
+input which matches the pattern is obtained from the IO or the time
+specified as the timeout passes. When the pattern is obtained from the
+IO, the method returns an array. The first element of the array is the
+entire string obtained from the IO until the pattern matches. The
+following elements indicates the specific pattern which matched to the
+anchor in the regular expression. If the method ends because of
+timeout, it returns nil.
+ When the method is called with block, the array is passed as
+the block parameter.
diff --git a/doc/rake/CHANGES b/doc/rake/CHANGES
new file mode 100644
index 0000000000..1caac6f024
--- /dev/null
+++ b/doc/rake/CHANGES
@@ -0,0 +1,440 @@
+
+= Rake Changelog
+
+== Version 0.8.7
+
+* Fixed EXEEXT for JRuby on windows.
+
+== Version 0.8.6
+
+* Minor fixes to the RDoc generation (removed dependency on darkfish
+ and removed inline source option).
+
+== Version 0.8.5
+
+* Better support for the system command on Windows.
+
+== Version 0.8.4
+
+* Preserve case when locating rakefiles (patch from James
+ M. Lawrence/quix)
+
+* Better support for windows paths in the test task (patch from Simon
+ Chiang/bahuvrihi)
+
+* Windows system dir search order is now: HOME, HOMEDRIVE + HOMEPATH,
+ APPDATA, USERPROFILE (patch from Luis Lavena)
+
+* MingGW is now recognized as a windows platform. (patch from Luis
+ Lavena)
+
+* Numerous fixes to the windows test suite (patch from Luis Lavena).
+
+* Improved Rakefile case insensitivity testing (patch from Luis
+ Lavena).
+
+* Fixed stray ARGV option problem that was interfering with
+ Test::Unit::Runner.
+
+* Fixed default verbose mode (was accidently changed to false).
+
+* Removed reference to manage_gem to fix the warning produced by the
+ gem package task.
+
+== Version 0.8.3
+
+* Enhanced the system directory detection in windows. We now check
+ HOMEDRIVE/HOMEPATH and USERPROFILE if APPDATA isn't found. (Patch
+ supplied by James Tucker). Rake no long aborts if it can't find the
+ directory.
+
+* Added fix to handle ruby installations in directories with spaces in
+ their name.
+
+== Version 0.8.2
+
+* Fixed bug in package task so that it will include the subdir
+ directory in the package for testing. (Bug found by Adam Majer)
+
+* Added ENV var to rakefile to prevent OS X from including extended
+ attribute junk in a tar file. (Bug found by Adam Majer)
+
+* Fixed filename dependency order bug in test_inspect_pending and
+ test_to_s_pending. (Bug found by Adam Majer)
+
+* Fixed check for file utils options to make them immune to the
+ symbol/string differences. (Patch supplied by Edwin Pratomo)
+
+* Fixed bug with rules involving multiple source (Patch supplied by
+ Emanuel Indermühle)
+
+* Switched from getoptlong to optparse (patches supplied by Edwin
+ Pratomo)
+
+* The -T option will now attempt to dynamically sense the size of the
+ terminal. RAKE_COLUMNS will override any dynamic sensing.
+
+* FileList#clone and FileList#dup have better sematics w.r.t. taint
+ and freeze.
+
+* Added ability clear prerequisites, and/or actions from an existing
+ task.
+
+* Added the ability to reenable a task to be invoked a second time.
+
+* Changed RDoc test task to have no default template. This makes it
+ easier for the tempate to pick up the template from the environment.
+
+* Changed from using Mutex to Monitor. Evidently Mutex causes thread
+ join errors when Ruby is compiled with -disable-pthreads. (Patch
+ supplied by Ittay Dror)
+
+* Fixed bug in makefile parser that had problems with extra spaces in
+ file task names. (Patch supplied by Ittay Dror)
+
+* Added a performance patch for reading large makefile dependency
+ files. (Patch supplied by Ittay Dror)
+
+* Default values for task arguments can easily be specified with the
+ :with_defaults method. (Idea for default argument merging supplied
+ by (Adam Q. Salter)
+
+* The -T output will only self-truncate if the output is a tty.
+ However, if RAKE_COLUMNS is explicitly set, it will be honored in
+ any case. (Patch provided by Gavin Stark).
+
+* Numerous fixes for running under windows. A big thanks to Bheeshmar
+ Redheendran for spending a good part of the afternoon at the
+ Lonestar Ruby Conference to help me work out these issues.
+
+== Version 0.8.1
+
+* Removed requires on parsedate.rb (in Ftptools)
+* Removed ftools from rake.rb. Made it options in sys.rb
+
+== Version 0.8.0
+
+* Added task parameters (e.g. "rake build[version7]")
+* Made task parameters passable to prerequisites.
+* Comments are limited to 80 columns or so (suggested by Jamis Buck).
+* Added -D to display full comments (suggested by Jamis Buck).
+* The rake program will set the status value used in any explicit
+ exit(n) calls. (patch provided by Stephen Touset)
+* Fixed error in functional tests that were not including session (and
+ silently skipping the functionl tests.
+* Removed --usage and make -h the same as -H.
+* Make a prettier inspect for tasks.
+
+== Version 0.7.3
+
+* Added existing and existing! methods to FileList
+* FileLists now claim to be Arrays (via is_a?) to get better support
+ from the FileUtil module.
+* Added init and top_level for custom rake applications.
+
+== Version 0.7.2
+
+* Error messages are now send to stderr rather than stdout (from
+ Payton Quackenbush).
+* Better error handling on invalid command line arguments (from Payton
+ Quackenbush).
+* Added rcov task and updated unit testing for better code coverage.
+* Fixed some bugs where the application object was going to the global
+ appliation instead of using its own data.
+* Added square and curly bracket patterns to FileList#include (Tilman
+ Sauerbeck).
+* Added plain filename support to rule dependents (suggested by Nobu
+ Nakada).
+* Added pathmap support to rule dependents.
+* Added a 'tasks' method to a namespace to get a list of tasks
+ associated with the namespace.
+* Fixed the method name leak from FileUtils (bug found by Glenn
+ Vanderburg).
+* Added rake_extension to handle detection of extension collisions.
+* Added test for noop, bad_option and verbose flags to sh command.
+* Removed dependency on internal fu_xxx functions from FileUtils.
+* Added a 'shame' task to the Rakefile.
+* Added tar_command and zip_command options to the Package task.
+* Added a description to the gem task in GemPackageTask.
+* Fixed a bug when rules have multiple prerequisites (patch by Joel
+ VanderWerf)
+* Added a protected 'require "rubygems"' to test/test_application to
+ unbreak cruisecontrol.rb.
+* Added the handful of RakeFileUtils to the private method as well.
+* Added block based exclusion.
+* The clean task will no longer delete 'core' if it is a directory.
+* Removed rake_dup. Now we just simply rescue a bad dup.
+* Refactored the FileList reject logic to remove duplication.
+* Removed if __FILE__ at the end of the rake.rb file.
+
+== Version 0.7.1
+
+* Added optional filter parameter to the --tasks command line option.
+* Added flatten to allow rule transform procs to return lists of
+ prereqs (Joel VanderWerf provided patch).
+* Added pathmap to String and FileList.
+* The -r option will now load .rake files (but a straight require
+ doesn't yet). NOTE: This is experimental ... it may be
+ discontinued.
+* The -f option without a value will disable the search for a
+ Rakefile. The assumption is that the -r files are adequate.
+* Fixed the safe_ln function to fall back to cp in more error
+ scenarios.
+
+== Version 0.7.0
+
+* Added Rake.original_dir to return the original starting directory of
+ the rake application.
+* Added safe_ln support for openAFS (from Ludvig Omholt).
+* Added --trace reminder on short exception messages (David Heinemeier
+ Hansson suggestion).
+* Added multitask declaration that executes prerequisites in
+ parallel. (Doug Young providied an initial implementation).
+* Fixed missing_const hack to be compatible with Rails. (Jamis Buck
+ supplied test case).
+* Made the RDoc task default to internal (in-process) RDoc formatting.
+ The old behavior is still available by setting the +external+ flag
+ to true.
+* Rakefiles are now loaded with the expanded path to prevent
+ accidental polution from the Ruby load path.
+* The +namespace+ command now returns a NameSpace object that can be
+ used to lookup tasks defined in that namespace. This allows for
+ better anonymous namespace behavior.
+* Task objects my now be used in prerequisite lists directly.
+
+== Version 0.6.1
+
+* Rebuilt 0.6.0 gem without signing.
+
+== Version 0.6.0
+
+* Fixed file creation bug in the unit tests (caused infinite loop on
+ windows).
+* Fixed bug where session based functional tests were run under
+ windows.
+* Fixed bug in directory tasks so that updating a directory will not
+ retrigger file tasks depending on the directory (see
+ FileCreationTask and EarlyTime).
+* Added egrep to FileList
+* ruby command now runs same ruby version as rake.
+* Added investigation to task object. (suggested by Martin Fowler)
+* Added ruby_opts to the test task to allow arbitrary ruby options to
+ be passed to the test script. (Greg Fast)
+* Fixed the test loader to ignore options. (Greg Fast)
+* Moved Task, FileTask, FileCreationTask and RakeApp into the Rake
+ module namespace. Old style namespace behavior can be invoked via
+ the --classic-namespace option. (requested by Kelly Felkins).
+* GemTask is now sensitive to the gem platform (Masao Mutoh).
+* A non-existing file prerequisite will no longer cause an exception
+ (Philipp Neubeck).
+* Multiple prerequisites on Rake rules now allowed (initial patch
+ supplied by Stuart Jansen).
+
+== Version 0.5.4
+
+* Added double quotes to the test runner.
+* Added .svn to default ignore list.
+* Updated FileList#include to support nested arrays and filelists.
+
+== Version 0.5.3
+
+* Added support for importing Rakefile and other dependencies.
+* Fixed bug so that now rules can chain off of existing tasks as well
+ as existing files.
+* Fixed verbose flag bug in the testing task. Shortened some failure
+ messages.
+* Make FileUtils methods private at the top level module to avoid
+ accidental method leaking into other objects.
+* Added test loader option to test task. "testrb" is no longer the
+ default test loader. It is now eating syntax errors that should
+ halt the unit tests.
+* Revamped FileList so that it works more like and array (addressed
+ flatten bug). Added many tests around file list.
+* Added +ext+ method to both String and FileList.
+
+== Version 0.5.0
+
+* Fixed documentation that was lacking the Rake module name (Tilman
+ Sauerbeck).
+* Added tar.gz and tar.bz2 support to package task (Tilman Sauerbeck).
+* Recursive rules are now supported (Tilman Sauerbeck).
+* Added warning option for the Test Task (requested by Eric Hodel).
+* The jamis rdoc template is only used if it exists.
+* Added fix for Ruby 1.8.2 test/unit and rails problem.
+* Added contributed rake man file (Jani Monoses).
+* Added Brian Candler's fix for problems in --trace and --dry-run
+ mode.
+
+== Version 0.4.15
+
+* Fixed a bug that prevented the TESTOPTS flag from working with the
+ revised for 1.8.2 test task.
+* Updated the docs on --trace to indicate that it also enables a full
+ backtrace on errors.
+
+== Version 0.4.14
+
+* Modified the TestTask to workaround the Ruby 1.8.2 change in
+ autoexecuting unit tests.
+
+== Version 0.4.13
+
+* Fixed the dry-run flag so it is operating again.
+* Multiple arguments to sh and ruby commands will not be interpreted
+ by the shell (patch provided by Jonathan Paisley).
+
+== Version 0.4.12
+
+* Added --silent (-s) to suppress the (in directory) rake message.
+
+== Version 0.4.11
+
+* Changed the "don't know how to rake" message (finally)
+* Changes references to a literal "Rakefile" to reference the global
+ variable $rakefile (which contains the actual name of the rakefile).
+
+== Version 0.4.10
+
+* Added block support to the "sh" command, allowing users to take
+ special actions on the result of the system call. E.g.
+
+ sh "shell_command" do |ok, res|
+ puts "Program returned #{res.exitstatus}" if ! ok
+ end
+
+== Version 0.4.9
+
+* Switched to Jamis Buck's RDoc template.
+* Removed autorequire from Rake's gem spec. This prevents the Rake
+ libraries from loading while using rails.
+
+== Version 0.4.8
+
+* Added support for .rb versions of Rakefile.
+* Removed \\\n's from test task.
+* Fixed Ruby 1.9 compatibility issue with FileList.
+
+== Version 0.4.7
+
+* Fixed problem in FileList that caused Ruby 1.9 to go into infinite
+ recursion. Since to_a was removed from Object, it does not need to
+ added back into the list of methods to rewrite in FileList. (Thanks
+ to Kent Sibilev for pointing this out).
+
+== Version 0.4.6
+* Removed test version of ln in FileUtils that prevented safe_ln from
+ using ln.
+
+== Version 0.4.5
+* Upgraded comments in TestTask.
+* FileList to_s and inspect now automatically resolve pending changes.
+* FileList#exclude properly returns the FileList.
+
+== Version 0.4.4
+* Fixed initialization problem with @comment.
+* Now using multi -r technique in TestTask. Switch Rakefile back to
+ using the built-in test task macros because the rake runtime is no
+ longer needed.
+* Added 'TEST=filename' and 'TESTOPTS=options' to the Test Task
+ macros.
+* Allow a +test_files+ attribute in test tasks. This allows more
+ flexibility in specifying test files.
+
+== Version 0.4.3
+* Fixed Comment leakage.
+
+== Version 0.4.2
+* Added safe_ln that falls back to a copy if a file link is not supported.
+* Package builder now uses safe_ln.
+
+== Version 0.4.1
+* Task comments are now additive, combined with "/".
+* Works with (soon to be released) rubygems 0.6.2 (or 0.7.0)
+
+== Version 0.4.0
+* FileList now uses deferred loading. The file system is not searched
+ until the first call that needs the file names.
+* VAR=VALUE options are now accepted on the command line and are
+ treated like environment variables. The values may be tested in a
+ Rakefile by referencing ENV['VAR'].
+* File.mtime is now used (instead of File.new().mtime).
+
+== Version 0.3.2.x
+
+* Removed some hidden dependencies on rubygems. Tests now will test
+ gems only if they are installed.
+* Removed Sys from some example files. I believe that is that last
+ reference to Sys outside of the contrib area.
+* Updated all copyright notices to include 2004.
+
+== Version 0.3.2
+
+* GEM Installation now works with the application stub.
+
+== Version 0.3.1
+
+* FileLists now automatically ignore CVS, .bak, !
+* GEM Installation now works.
+
+== Version 0.3.0
+
+Promoted 0.2.10.
+
+== Version 0.2.10
+General
+
+* Added title to Rake's rdocs
+* Contrib packages are no longer included in the documentation.
+
+RDoc Issues
+
+* Removed default for the '--main' option
+* Fixed rendering of the rdoc options
+* Fixed clean/clobber confusion with rerdoc
+* 'title' attribute added
+
+Package Task Library Issues
+
+* Version (or explicit :noversion) is required.
+* +package_file+ attribute is now writable
+
+FileList Issues
+
+* Dropped bang version of exclude. Now using ant-like include/exclude semantics.
+* Enabled the "yield self" idiom in FileList#initialize.
+
+== Version 0.2.9
+
+This version contains numerous changes as the RubyConf.new(2003)
+presentation was being prepared. The changes include:
+
+* The monolithic rubyapp task library is in the process of being
+ dropped in favor of lighter weight task libraries.
+
+== Version 0.2.7
+
+* Added "desc" for task descriptions.
+* -T will now display tasks with descriptions.
+* -P will display tasks and prerequisites.
+* Dropped the Sys module in favor of the 1.8.x FileUtils module. Sys
+ is still supported in the contrib area.
+
+== Version 0.2.6
+
+* Moved to RubyForge
+
+== Version 0.2.5
+
+* Switched to standard ruby app builder.
+* Added no_match option to file matcher.
+
+== Version 0.2.4
+
+* Fixed indir, which neglected to actually change directories.
+
+== Version 0.2.3
+
+* Added rake module for a help target
+* Added 'for_files' to Sys
+* Added a $rakefile constant
+* Added test for selecting proper rule with multiple targets.
diff --git a/doc/rake/README b/doc/rake/README
new file mode 100644
index 0000000000..41668dd727
--- /dev/null
+++ b/doc/rake/README
@@ -0,0 +1,196 @@
+= RAKE -- Ruby Make
+
+Supporting Rake version: 0.8.6
+
+This package contains Rake, a simple ruby build program with
+capabilities similar to make.
+
+Rake has the following features:
+
+* Rakefiles (rake's version of Makefiles) are completely defined in
+ standard Ruby syntax. No XML files to edit. No quirky Makefile
+ syntax to worry about (is that a tab or a space?)
+
+* Users can specify tasks with prerequisites.
+
+* Rake supports rule patterns to synthesize implicit tasks.
+
+* Flexible FileLists that act like arrays but know about manipulating
+ file names and paths.
+
+* A library of prepackaged tasks to make building rakefiles easier. For example,
+ tasks for building tarballs, gems and RDoc output are provided.
+
+* Supports parallel execution of tasks.
+
+
+== Installation
+
+=== Gem Installation
+
+Download and install rake with the following.
+
+ gem install rake
+
+=== Normal Installation
+
+You can download the source tarball of the latest version of Rake from
+
+* http://rubyforge.org/project/showfiles.php?group_id=50
+
+Extract the tarball and run
+
+ % ruby install.rb
+
+from its distribution directory.
+
+== Usage
+
+=== Simple Example
+
+First, you must write a "Rakefile" file which contains the build rules. Here's
+a simple example:
+
+ task :default => [:test]
+
+ task :test do
+ ruby "test/unittest.rb"
+ end
+
+This Rakefile has two tasks:
+
+* A task named "test", which - upon invocation - will run a unit test file in
+ Ruby.
+* A task named "default". This task does nothing by itself, but it has exactly
+ one dependency, namely the "test" task. Invoking the "default" task will
+ cause Rake to invoke the "test" task as well.
+
+Running the "rake" command without any options will cause it to run the
+"default" task in the Rakefile:
+
+ % ls
+ Rakefile test/
+ % rake
+ (in /home/some_user/Projects/rake)
+ ruby test/unittest.rb
+ ....unit test output here...
+
+Type "rake --help" for all available options.
+
+
+=== More Information
+
+* For details on Rake's command-line invocation, read
+ doc/command_line_usage.rdoc[http://rake.rubyforge.org/files/doc/command_line_usage_rdoc.html]
+* For details on writing Rakefiles, see
+ doc/rakefile.rdoc[http://rake.rubyforge.org/files/doc/rakefile_rdoc.html].
+* For the original announcement of Rake, see
+ doc/rational.rdoc[http://rake.rubyforge.org/files/doc/rational_rdoc.html].
+* For a glossary of terms, see
+ doc/glossary.rdoc[http://rake.rubyforge.org/files/doc/glossary_rdoc.html].
+
+
+== Development
+
+=== Source Repository
+
+Rake is currently hosted at github. The github web page is
+http://github.com/jimweirich/rake. The public git clone URL is
+
+* git://github.com/jimweirich/rake.git
+
+=== Running the Rake Test Suite
+
+If you wish to run the unit and functional tests that come with Rake:
+
+* Install the 'session' gem in order to run the functional tests.
+* CD into the top project directory of rake.
+* Type one of the following:
+
+ rake # If you have a version of rake installed
+ ruby -Ilib bin/rake # If you do not have a version of rake installed.
+
+=== Issues and Bug Reports
+
+Bugs, features requests and other issues can be logged at
+
+* http://onestepback.org/redmine/projects/show/rake
+
+You will need an account to before you can post issues. Register at
+http://onestepback.org/redmine/account/register. Or you can send me
+an email (at jim dot weirich at gmail dot com)
+
+
+== Online Resources
+
+=== Rake References
+
+* Rake Documentation Home: http://docs.rubyrake.org
+* Rake Project Page: http://rubyforge.org/projects/rake
+* Rake API Documents: http://rake.rubyforge.org
+* Rake Source Code Repo: http://github.com/jimweirich/rake
+* Rake Git Repo Clone URL: git://github.com/jimweirich/rake.git
+
+=== Presentations and Articles about Rake
+
+* Jim Weirich's 2003 RubyConf presentation: http://onestepback.org/articles/buildingwithrake/
+* Martin Fowler's article on Rake: http://martinfowler.com/articles/rake.html
+
+== Other Make Reinvisionings ...
+
+Rake is a late entry in the make replacement field. Here are links to
+other projects with similar (and not so similar) goals.
+
+* http://directory.fsf.org/bras.html -- Bras, one of earliest
+ implementations of "make in a scripting language".
+* http://www.a-a-p.org -- Make in Python
+* http://www.aromatic.com/tools/jam.txt -- JAM, Java Automated Make
+* http://ant.apache.org -- The Ant project
+* http://ppt.perl.org/commands/make/index.html -- Make from the Perl
+ Power Tools implementation.
+* http://search.cpan.org/search?query=PerlBuildSystem -- The Perl Build System
+* http://make.rubyforge.org -- Rant, another Ruby make tool.
+
+== Credits
+
+[<b>Ryan Dlugosz</b>] For the initial conversation that sparked Rake.
+
+[<b>nobu.nokada@softhome.net</b>] For the initial patch for rule support.
+
+[<b>Tilman Sauerbeck <tilman@code-monkey.de></b>] For the recursive rule patch.
+
+== License
+
+Rake is available under an MIT-style license.
+
+:include: MIT-LICENSE
+
+== Support
+
+The Rake homepage is http://rake.rubyforge.org. You can find the Rake
+RubyForge page at http://rubyforge.org/projects/rake.
+
+Feel free to submit commits or feature requests. If you send a patch,
+remember to update the corresponding unit tests. If fact, I prefer
+new feature to be submitted in the form of new unit tests.
+
+For other information, feel free to ask on the ruby-talk mailing list
+(which is mirrored to comp.lang.ruby) or contact
+jim dot weirich at gmail.com.
+
+---
+
+= Other stuff
+
+Author:: Jim Weirich <jim.weirich@gmail.com>
+Requires:: Ruby 1.8.0 or later
+License:: Copyright 2003-2008 by Jim Weirich.
+ Released under an MIT-style license. See the LICENSE file
+ included in the distribution.
+
+== Warranty
+
+This software is provided "as is" and without any express or
+implied warranties, including, without limitation, the implied
+warranties of merchantibility and fitness for a particular
+purpose.
diff --git a/doc/rake/command_line_usage.rdoc b/doc/rake/command_line_usage.rdoc
new file mode 100644
index 0000000000..688e55a9af
--- /dev/null
+++ b/doc/rake/command_line_usage.rdoc
@@ -0,0 +1,169 @@
+= Rake Command Line Usage
+
+Rake is invoked from the command line using:
+
+ % rake [options ...] [VAR=VALUE ...] [targets ...]
+
+Options are:
+
+[<tt><em>name</em>=<em>value</em></tt>]
+ Set the environment variable <em>name</em> to <em>value</em>
+ during the execution of the <b>rake</b> command. You can access
+ the value by using ENV['<em>name</em>'].
+
+[<tt>--all</tt> (-A)]
+ Used in combination with the -T and -D options, will force
+ those options to show all the tasks, even the ones without comments.
+
+[<tt>--backtrace</tt>{=_output_} (-n)]
+ Enable a full backtrace (i.e. like --trace, but without the task
+ tracing details). The _output_ parameter is optional, but if
+ specified it controls where the backtrace output is sent. If
+ _output_ is <tt>stdout</tt>, then backtrace output is directed to
+ stardard output. If _output_ is <tt>stderr</tt>, or if it is
+ missing, then the backtrace output is sent to standard error.
+
+[<tt>--classic-namespace</tt> (-n)]
+ Import the Task, FileTask, and FileCreateTask into the top-level
+ scope to be compatible with older versions of Rake. Alternatively
+ you can include the line <code>require
+ 'rake/classic_namespace'</code> in your Rakefile to get the
+ classic behavior.
+
+[<tt>--comments</tt>]
+ Used in combination with the -W options to force the output to
+ contain commented options only. This is the reverse of
+ <tt>--all</tt>.
+
+[<tt>--describe</tt> _pattern_ (-D)]
+ Describe the tasks (matching optional PATTERN), then exit.
+
+[<tt>--dry-run</tt> (-n)]
+ Do a dry run. Print the tasks invoked and executed, but do not
+ actually execute any of the actions.
+
+[<tt>--execute</tt> _code_ (-e)]
+ Execute some Ruby code and exit.
+
+[<tt>--execute-print</tt> _code_ (-p)]
+ Execute some Ruby code, print the result, and exit.
+
+[<tt>--execute-continue</tt> _code_ (-E)]
+ Execute some Ruby code, then continue with normal task processing.
+
+[<tt>--help</tt> (-H)]
+ Display some help text and exit.
+
+[<tt>--jobs</tt> _number_ (-j)]
+ Specifies the number of active concurrent tasks used. The
+ suggested value is equal to the number of CPUs. The concurrent
+ tasks are used to execute the <tt>multitask</tt> prerequisites.
+ Also see the <tt>-m</tt> option which turns all tasks into
+ multitasks.
+
+ Sample values:
+ (no -j) : unlimited concurrent tasks (standard rake behavior)
+ -j : 2 concurrent tasks (exact number may change)
+ -j 16 : 16 concurrent tasks
+
+[<tt>--job-stats</tt> _level_]
+
+ Display job statistics at the completion of the run. By default,
+ this will display the requested number of active tasks (from the
+ -j options) and the maximum number of tasks in play at any given
+ time.
+
+ If the optional _level_ is <tt>history</tt>, then a complete trace
+ of task history will be displayed on standard output.
+
+[<tt>--libdir</tt> _directory_ (-I)]
+ Add _directory_ to the list of directories searched for require.
+
+[<tt>--multitask</tt> (-m)]
+ Treat all tasks as multitasks. ('make/drake' semantics)
+
+[<tt>--nosearch</tt> (-N)]
+ Do not search for a Rakefile in parent directories.
+
+[<tt>--prereqs</tt> (-P)]
+ Display a list of all tasks and their immediate prerequisites.
+
+[<tt>--quiet</tt> (-q)]
+ Do not echo commands from FileUtils.
+
+[<tt>--rakefile</tt> _filename_ (-f)]
+ Use _filename_ as the name of the rakefile. The default rakefile
+ names are +rakefile+ and +Rakefile+ (with +rakefile+ taking
+ precedence). If the rakefile is not found in the current
+ directory, +rake+ will search parent directories for a match. The
+ directory where the Rakefile is found will become the current
+ directory for the actions executed in the Rakefile.
+
+[<tt>--rakelibdir</tt> _rakelibdir_ (-R)]
+ Auto-import any .rake files in RAKELIBDIR. (default is 'rakelib')
+
+[<tt>--reduce-compat</tt>]
+
+ Remove the DSL commands from the Object inheritance hierarchy and
+ do not define top level constants. This reduces the backwards
+ compatibility of Rake, but allows rake to be used with software
+ that would otherwise have conflicting definitions.
+
+ *NOTE:* The next major version of Rake will only be able to be run
+ in "reduce-compat" mode.
+
+[<tt>--require</tt> _name_ (-r)]
+ Require _name_ before executing the Rakefile.
+
+[<tt>--rules</tt>]
+ Trace the rules resolution.
+
+[<tt>--silent (-s)</tt>]
+ Like --quiet, but also suppresses the 'in directory' announcement.
+
+[<tt>--suppress-backtrace _pattern_ </tt>]
+ Line matching the regular expression _pattern_ will be removed
+ from the backtrace output. Note that the --backtrace option is the
+ full backtrace without these lines suppressed.
+
+[<tt>--system</tt> (-g)]
+ Use the system wide (global) rakefiles. The project Rakefile is
+ ignored. By default, the system wide rakefiles are used only if no
+ project Rakefile is found. On Unix-like system, the system wide
+ rake files are located in $HOME/.rake. On a windows system they
+ are stored in $APPDATA/Rake.
+
+[<tt>--no-system</tt> (-G)]
+ Use the project level Rakefile, ignoring the system-wide (global)
+ rakefiles.
+
+[<tt>--tasks</tt> <em>pattern</em> (-T)]
+ Display a list of the major tasks and their comments. Comments
+ are defined using the "desc" command. If a pattern is given, then
+ only tasks matching the pattern are displayed.
+
+[<tt>--trace</tt>{=_output_} (-t)]
+ Turn on invoke/execute tracing. Also enable full backtrace on
+ errors. The _output_ parameter is optional, but if specified it
+ controls where the trace output is sent. If _output_ is
+ <tt>stdout</tt>, then trace output is directed to stardard output.
+ If _output_ is <tt>stderr</tt>, or if it is missing, then trace
+ output is sent to standard error.
+
+[<tt>--verbose</tt> (-v)]
+ Echo the Sys commands to standard output.
+
+[<tt>--version</tt> (-V)]
+ Display the program version and exit.
+
+[<tt>--where</tt> <em>pattern</em> (-W)]
+ Display tasks that match <em>pattern</em> and the file and line
+ number where the task is defined. By default this option will
+ display all tasks, not just the tasks that have descriptions.
+
+[<tt>--no-deprecation-warnings</tt> (-W)]
+ Do not display the deprecation warnings.
+
+In addition, any command line option of the form
+<em>VAR</em>=<em>VALUE</em> will be added to the environment hash
+<tt>ENV</tt> and may be tested in the Rakefile.
diff --git a/doc/rake/example/Rakefile1 b/doc/rake/example/Rakefile1
new file mode 100644
index 0000000000..39f8bcceb0
--- /dev/null
+++ b/doc/rake/example/Rakefile1
@@ -0,0 +1,38 @@
+# Example Rakefile -*- ruby -*-
+
+task :default => [:main]
+
+file "a.o" => ["a.c"] do |t|
+ src = t.name.sub(/\.o$/, '.c')
+ sh "gcc #{src} -c -o #{t.name}"
+end
+
+file "b.o" => ["b.c"] do |t|
+ src = t.name.sub(/\.o$/, '.c')
+ sh "gcc #{src} -c -o #{t.name}"
+end
+
+file "main.o" => ["main.c"] do |t|
+ src = t.name.sub(/\.o$/, '.c')
+ sh "gcc #{src} -c -o #{t.name}"
+end
+
+OBJFILES = ["a.o", "b.o", "main.o"]
+task :obj => OBJFILES
+
+file "main" => OBJFILES do |t|
+ sh "gcc -o #{t.name} main.o a.o b.o"
+end
+
+task :clean do
+ rm_f FileList['*.o']
+ Dir['*~'].each { |fn| rm_f fn }
+end
+
+task :clobber => [:clean] do
+ rm_f "main"
+end
+
+task :run => ["main"] do
+ sh "./main"
+end
diff --git a/doc/rake/example/Rakefile2 b/doc/rake/example/Rakefile2
new file mode 100644
index 0000000000..35310eceb5
--- /dev/null
+++ b/doc/rake/example/Rakefile2
@@ -0,0 +1,35 @@
+# Example Rakefile -*- ruby -*-
+# Using the power of Ruby
+
+task :default => [:main]
+
+def ext(fn, newext)
+ fn.sub(/\.[^.]+$/, newext)
+end
+
+SRCFILES = Dir['*.c']
+OBJFILES = SRCFILES.collect { |fn| ext(fn,".o") }
+
+OBJFILES.each do |objfile|
+ srcfile = ext(objfile, ".c")
+ file objfile => [srcfile] do |t|
+ sh "gcc #{srcfile} -c -o #{t.name}"
+ end
+end
+
+file "main" => OBJFILES do |t|
+ sh "gcc -o #{t.name} main.o a.o b.o"
+end
+
+task :clean do
+ rm_f FileList['*.o']
+ Dir['*~'].each { |fn| rm_f fn }
+end
+
+task :clobber => [:clean] do
+ rm_f "main"
+end
+
+task :run => ["main"] do
+ sh "./main"
+end
diff --git a/doc/rake/example/a.c b/doc/rake/example/a.c
new file mode 100644
index 0000000000..620e6f8007
--- /dev/null
+++ b/doc/rake/example/a.c
@@ -0,0 +1,6 @@
+#include <stdio.h>
+
+void a()
+{
+ printf ("In function a\n");
+}
diff --git a/doc/rake/example/b.c b/doc/rake/example/b.c
new file mode 100644
index 0000000000..9b24aa1273
--- /dev/null
+++ b/doc/rake/example/b.c
@@ -0,0 +1,6 @@
+#include <stdio.h>
+
+void b()
+{
+ printf ("In function b\n");
+}
diff --git a/doc/rake/example/main.c b/doc/rake/example/main.c
new file mode 100644
index 0000000000..a04558a251
--- /dev/null
+++ b/doc/rake/example/main.c
@@ -0,0 +1,11 @@
+#include <stdio.h>
+
+extern void a();
+extern void b();
+
+int main ()
+{
+ a();
+ b();
+ return 0;
+}
diff --git a/doc/rake/glossary.rdoc b/doc/rake/glossary.rdoc
new file mode 100644
index 0000000000..a811764091
--- /dev/null
+++ b/doc/rake/glossary.rdoc
@@ -0,0 +1,51 @@
+= Glossary
+
+[<b>action</b>]
+ Code to be executed in order to perform a task. Actions in a
+ rakefile are specified in a code block (usually delimited by
+ +do+/+end+ pairs.
+
+[<b>execute</b>]
+ When a task is executed, all of its actions are performed, in
+ the order they were defined. Note that unlike
+ <tt>invoke</tt>, <tt>execute</tt> always executes the actions
+ (without invoking or executing the prerequisites).
+
+[<b>file task</b> (FileTask)]
+ A file task is a task whose purpose is to create a file
+ (which has the same name as the task). When invoked, a file
+ task will only execute if one or more of the following
+ conditions are true.
+
+ 1. The associated file does not exist.
+ 2. A prerequisite has a later time stamp than the existing file.
+
+ Because normal Tasks always have the current time as
+ timestamp, a FileTask that has a normal Task prerequisite
+ will always execute.
+
+[<b>invoke</b>]
+ When a task is invoked, first we check to see if it has been
+ invoked before. if it has been, then nothing else is done.
+ If this is the first time its been invoked, then we invoke
+ each of its prerequisites. Finally, we check to see if we
+ need to execute the actions of this task by calling
+ <tt>needed?</tt>. Finally, if the task is needed, we execute
+ its actions.
+
+ NOTE: Currently prerequisites are invoked even if the task is
+ not needed. This may change in the future.
+
+[<b>prerequisites</b>]
+ Every task has a set (possibly empty) of prerequisites. A
+ prerequisite P to Task T is itself a task that must be invoked
+ before Task T.
+
+[<b>rule</b>]
+ A rule is a recipe for synthesizing a task when no task is
+ explicitly defined. Rules generally synthesize file tasks.
+
+[<b>task</b> (Task)]
+ Basic unit of work in a rakefile. A task has a name, a set of
+ prerequisites and a list of actions to be performed.
+
diff --git a/doc/rake/jamis.rb b/doc/rake/jamis.rb
new file mode 100644
index 0000000000..c7bc84ac5b
--- /dev/null
+++ b/doc/rake/jamis.rb
@@ -0,0 +1,591 @@
+module RDoc
+module Page
+
+FONTS = "\"Bitstream Vera Sans\", Verdana, Arial, Helvetica, sans-serif"
+
+STYLE = <<CSS
+a {
+ color: #00F;
+ text-decoration: none;
+}
+
+a:hover {
+ color: #77F;
+ text-decoration: underline;
+}
+
+body, td, p {
+ font-family: %fonts%;
+ background: #FFF;
+ color: #000;
+ margin: 0px;
+ font-size: small;
+}
+
+#content {
+ margin: 2em;
+}
+
+#description p {
+ margin-bottom: 0.5em;
+}
+
+.sectiontitle {
+ margin-top: 1em;
+ margin-bottom: 1em;
+ padding: 0.5em;
+ padding-left: 2em;
+ background: #005;
+ color: #FFF;
+ font-weight: bold;
+ border: 1px dotted black;
+}
+
+.attr-rw {
+ padding-left: 1em;
+ padding-right: 1em;
+ text-align: center;
+ color: #055;
+}
+
+.attr-name {
+ font-weight: bold;
+}
+
+.attr-desc {
+}
+
+.attr-value {
+ font-family: monospace;
+}
+
+.file-title-prefix {
+ font-size: large;
+}
+
+.file-title {
+ font-size: large;
+ font-weight: bold;
+ background: #005;
+ color: #FFF;
+}
+
+.banner {
+ background: #005;
+ color: #FFF;
+ border: 1px solid black;
+ padding: 1em;
+}
+
+.banner td {
+ background: transparent;
+ color: #FFF;
+}
+
+h1 a, h2 a, .sectiontitle a, .banner a {
+ color: #FF0;
+}
+
+h1 a:hover, h2 a:hover, .sectiontitle a:hover, .banner a:hover {
+ color: #FF7;
+}
+
+.dyn-source {
+ display: none;
+ background: #FFE;
+ color: #000;
+ border: 1px dotted black;
+ margin: 0.5em 2em 0.5em 2em;
+ padding: 0.5em;
+}
+
+.dyn-source .cmt {
+ color: #00F;
+ font-style: italic;
+}
+
+.dyn-source .kw {
+ color: #070;
+ font-weight: bold;
+}
+
+.method {
+ margin-left: 1em;
+ margin-right: 1em;
+ margin-bottom: 1em;
+}
+
+.description pre {
+ padding: 0.5em;
+ border: 1px dotted black;
+ background: #FFE;
+}
+
+.method .title {
+ font-family: monospace;
+ font-size: large;
+ border-bottom: 1px dashed black;
+ margin-bottom: 0.3em;
+ padding-bottom: 0.1em;
+}
+
+.method .description, .method .sourcecode {
+ margin-left: 1em;
+}
+
+.description p, .sourcecode p {
+ margin-bottom: 0.5em;
+}
+
+.method .sourcecode p.source-link {
+ text-indent: 0em;
+ margin-top: 0.5em;
+}
+
+.method .aka {
+ margin-top: 0.3em;
+ margin-left: 1em;
+ font-style: italic;
+ text-indent: 2em;
+}
+
+h1 {
+ padding: 1em;
+ border: 1px solid black;
+ font-size: x-large;
+ font-weight: bold;
+ color: #FFF;
+ background: #007;
+}
+
+h2 {
+ padding: 0.5em 1em 0.5em 1em;
+ border: 1px solid black;
+ font-size: large;
+ font-weight: bold;
+ color: #FFF;
+ background: #009;
+}
+
+h3, h4, h5, h6 {
+ padding: 0.2em 1em 0.2em 1em;
+ border: 1px dashed black;
+ color: #000;
+ background: #AAF;
+}
+
+.sourcecode > pre {
+ padding: 0.5em;
+ border: 1px dotted black;
+ background: #FFE;
+}
+
+CSS
+
+XHTML_PREAMBLE = %{<?xml version="1.0" encoding="%charset%"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+}
+
+HEADER = XHTML_PREAMBLE + <<ENDHEADER
+<html>
+ <head>
+ <title>%title%</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=%charset%" />
+ <link rel="stylesheet" href="%style_url%" type="text/css" media="screen" />
+
+ <script language="JavaScript" type="text/javascript">
+ // <![CDATA[
+
+ function toggleSource( id )
+ {
+ var elem
+ var link
+
+ if( document.getElementById )
+ {
+ elem = document.getElementById( id )
+ link = document.getElementById( "l_" + id )
+ }
+ else if ( document.all )
+ {
+ elem = eval( "document.all." + id )
+ link = eval( "document.all.l_" + id )
+ }
+ else
+ return false;
+
+ if( elem.style.display == "block" )
+ {
+ elem.style.display = "none"
+ link.innerHTML = "show source"
+ }
+ else
+ {
+ elem.style.display = "block"
+ link.innerHTML = "hide source"
+ }
+ }
+
+ function openCode( url )
+ {
+ window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" )
+ }
+ // ]]>
+ </script>
+ </head>
+
+ <body>
+ENDHEADER
+
+FILE_PAGE = <<HTML
+<table border='0' cellpadding='0' cellspacing='0' width="100%" class='banner'>
+ <tr><td>
+ <table width="100%" border='0' cellpadding='0' cellspacing='0'><tr>
+ <td class="file-title" colspan="2"><span class="file-title-prefix">File</span><br />%short_name%</td>
+ <td align="right">
+ <table border='0' cellspacing="0" cellpadding="2">
+ <tr>
+ <td>Path:</td>
+ <td>%full_path%
+IF:cvsurl
+ &nbsp;(<a href="%cvsurl%">CVS</a>)
+ENDIF:cvsurl
+ </td>
+ </tr>
+ <tr>
+ <td>Modified:</td>
+ <td>%dtm_modified%</td>
+ </tr>
+ </table>
+ </td></tr>
+ </table>
+ </td></tr>
+</table><br>
+HTML
+
+###################################################################
+
+CLASS_PAGE = <<HTML
+<table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
+ <td class="file-title"><span class="file-title-prefix">%classmod%</span><br />%full_name%</td>
+ <td align="right">
+ <table cellspacing=0 cellpadding=2>
+ <tr valign="top">
+ <td>In:</td>
+ <td>
+START:infiles
+HREF:full_path_url:full_path:
+IF:cvsurl
+&nbsp;(<a href="%cvsurl%">CVS</a>)
+ENDIF:cvsurl
+END:infiles
+ </td>
+ </tr>
+IF:parent
+ <tr>
+ <td>Parent:</td>
+ <td>
+IF:par_url
+ <a href="%par_url%">
+ENDIF:par_url
+%parent%
+IF:par_url
+ </a>
+ENDIF:par_url
+ </td>
+ </tr>
+ENDIF:parent
+ </table>
+ </td>
+ </tr>
+ </table>
+HTML
+
+###################################################################
+
+METHOD_LIST = <<HTML
+ <div id="content">
+IF:diagram
+ <table cellpadding='0' cellspacing='0' border='0' width="100%"><tr><td align="center">
+ %diagram%
+ </td></tr></table>
+ENDIF:diagram
+
+IF:description
+ <div class="description">%description%</div>
+ENDIF:description
+
+IF:requires
+ <div class="sectiontitle">Required Files</div>
+ <ul>
+START:requires
+ <li>HREF:aref:name:</li>
+END:requires
+ </ul>
+ENDIF:requires
+
+IF:toc
+ <div class="sectiontitle">Contents</div>
+ <ul>
+START:toc
+ <li><a href="#%href%">%secname%</a></li>
+END:toc
+ </ul>
+ENDIF:toc
+
+IF:methods
+ <div class="sectiontitle">Methods</div>
+ <ul>
+START:methods
+ <li>HREF:aref:name:</li>
+END:methods
+ </ul>
+ENDIF:methods
+
+IF:includes
+<div class="sectiontitle">Included Modules</div>
+<ul>
+START:includes
+ <li>HREF:aref:name:</li>
+END:includes
+</ul>
+ENDIF:includes
+
+START:sections
+IF:sectitle
+<div class="sectiontitle"><a nem="%secsequence%">%sectitle%</a></div>
+IF:seccomment
+<div class="description">
+%seccomment%
+</div>
+ENDIF:seccomment
+ENDIF:sectitle
+
+IF:classlist
+ <div class="sectiontitle">Classes and Modules</div>
+ %classlist%
+ENDIF:classlist
+
+IF:constants
+ <div class="sectiontitle">Constants</div>
+ <table border='0' cellpadding='5'>
+START:constants
+ <tr valign='top'>
+ <td class="attr-name">%name%</td>
+ <td>=</td>
+ <td class="attr-value">%value%</td>
+ </tr>
+IF:desc
+ <tr valign='top'>
+ <td>&nbsp;</td>
+ <td colspan="2" class="attr-desc">%desc%</td>
+ </tr>
+ENDIF:desc
+END:constants
+ </table>
+ENDIF:constants
+
+IF:attributes
+ <div class="sectiontitle">Attributes</div>
+ <table border='0' cellpadding='5'>
+START:attributes
+ <tr valign='top'>
+ <td class='attr-rw'>
+IF:rw
+[%rw%]
+ENDIF:rw
+ </td>
+ <td class='attr-name'>%name%</td>
+ <td class='attr-desc'>%a_desc%</td>
+ </tr>
+END:attributes
+ </table>
+ENDIF:attributes
+
+IF:method_list
+START:method_list
+IF:methods
+<div class="sectiontitle">%type% %category% methods</div>
+START:methods
+<div class="method">
+ <div class="title">
+IF:callseq
+ <a name="%aref%"></a><b>%callseq%</b>
+ENDIF:callseq
+IFNOT:callseq
+ <a name="%aref%"></a><b>%name%</b>%params%
+ENDIF:callseq
+IF:codeurl
+[ <a href="javascript:openCode('%codeurl%')">source</a> ]
+ENDIF:codeurl
+ </div>
+IF:m_desc
+ <div class="description">
+ %m_desc%
+ </div>
+ENDIF:m_desc
+IF:aka
+<div class="aka">
+ This method is also aliased as
+START:aka
+ <a href="%aref%">%name%</a>
+END:aka
+</div>
+ENDIF:aka
+IF:sourcecode
+<div class="sourcecode">
+ <p class="source-link">[ <a href="javascript:toggleSource('%aref%_source')" id="l_%aref%_source">show source</a> ]</p>
+ <div id="%aref%_source" class="dyn-source">
+<pre>
+%sourcecode%
+</pre>
+ </div>
+</div>
+ENDIF:sourcecode
+</div>
+END:methods
+ENDIF:methods
+END:method_list
+ENDIF:method_list
+END:sections
+</div>
+HTML
+
+FOOTER = <<ENDFOOTER
+ </body>
+</html>
+ENDFOOTER
+
+BODY = HEADER + <<ENDBODY
+ !INCLUDE! <!-- banner header -->
+
+ <div id="bodyContent">
+ #{METHOD_LIST}
+ </div>
+
+ #{FOOTER}
+ENDBODY
+
+########################## Source code ##########################
+
+SRC_PAGE = XHTML_PREAMBLE + <<HTML
+<html>
+<head><title>%title%</title>
+<meta http-equiv="Content-Type" content="text/html; charset=%charset%">
+<style>
+.ruby-comment { color: green; font-style: italic }
+.ruby-constant { color: #4433aa; font-weight: bold; }
+.ruby-identifier { color: #222222; }
+.ruby-ivar { color: #2233dd; }
+.ruby-keyword { color: #3333FF; font-weight: bold }
+.ruby-node { color: #777777; }
+.ruby-operator { color: #111111; }
+.ruby-regexp { color: #662222; }
+.ruby-value { color: #662222; font-style: italic }
+ .kw { color: #3333FF; font-weight: bold }
+ .cmt { color: green; font-style: italic }
+ .str { color: #662222; font-style: italic }
+ .re { color: #662222; }
+</style>
+</head>
+<body bgcolor="white">
+<pre>%code%</pre>
+</body>
+</html>
+HTML
+
+########################## Index ################################
+
+FR_INDEX_BODY = <<HTML
+!INCLUDE!
+HTML
+
+FILE_INDEX = XHTML_PREAMBLE + <<HTML
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=%charset%">
+<style>
+<!--
+ body {
+ background-color: #EEE;
+ font-family: #{FONTS};
+ color: #000;
+ margin: 0px;
+ }
+ .banner {
+ background: #005;
+ color: #FFF;
+ padding: 0.2em;
+ font-size: small;
+ font-weight: bold;
+ text-align: center;
+ }
+ .entries {
+ margin: 0.25em 1em 0 1em;
+ font-size: x-small;
+ }
+ a {
+ color: #00F;
+ text-decoration: none;
+ white-space: nowrap;
+ }
+ a:hover {
+ color: #77F;
+ text-decoration: underline;
+ }
+-->
+</style>
+<base target="docwin">
+</head>
+<body>
+<div class="banner">%list_title%</div>
+<div class="entries">
+START:entries
+<a href="%href%">%name%</a><br>
+END:entries
+</div>
+</body></html>
+HTML
+
+CLASS_INDEX = FILE_INDEX
+METHOD_INDEX = FILE_INDEX
+
+INDEX = XHTML_PREAMBLE + <<HTML
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>%title%</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=%charset%">
+</head>
+
+<frameset cols="20%,*">
+ <frameset rows="15%,35%,50%">
+ <frame src="fr_file_index.html" title="Files" name="Files" />
+ <frame src="fr_class_index.html" name="Classes" />
+ <frame src="fr_method_index.html" name="Methods" />
+ </frameset>
+IF:inline_source
+ <frame src="%initial_page%" name="docwin">
+ENDIF:inline_source
+IFNOT:inline_source
+ <frameset rows="80%,20%">
+ <frame src="%initial_page%" name="docwin">
+ <frame src="blank.html" name="source">
+ </frameset>
+ENDIF:inline_source
+ <noframes>
+ <body bgcolor="white">
+ Click <a href="html/index.html">here</a> for a non-frames
+ version of this page.
+ </body>
+ </noframes>
+</frameset>
+
+</html>
+HTML
+
+end
+end
+
+
diff --git a/doc/rake/proto_rake.rdoc b/doc/rake/proto_rake.rdoc
new file mode 100644
index 0000000000..a9e33d11da
--- /dev/null
+++ b/doc/rake/proto_rake.rdoc
@@ -0,0 +1,127 @@
+= Original Prototype Rake
+
+This is the original 100 line prototype rake program.
+
+---
+ #!/usr/bin/env ruby
+
+ require 'ftools'
+
+ class Task
+ TASKS = Hash.new
+
+ attr_reader :prerequisites
+
+ def initialize(task_name)
+ @name = task_name
+ @prerequisites = []
+ @actions = []
+ end
+
+ def enhance(deps=nil, &block)
+ @prerequisites |= deps if deps
+ @actions << block if block_given?
+ self
+ end
+
+ def name
+ @name.to_s
+ end
+
+ def invoke
+ @prerequisites.each { |n| Task[n].invoke }
+ execute if needed?
+ end
+
+ def execute
+ return if @triggered
+ @triggered = true
+ @actions.collect { |act| result = act.call(self) }.last
+ end
+
+ def needed?
+ true
+ end
+
+ def timestamp
+ Time.now
+ end
+
+ class << self
+ def [](task_name)
+ TASKS[intern(task_name)] or fail "Don't know how to rake #{task_name}"
+ end
+
+ def define_task(args, &block)
+ case args
+ when Hash
+ fail "Too Many Target Names: #{args.keys.join(' ')}" if args.size > 1
+ fail "No Task Name Given" if args.size < 1
+ task_name = args.keys[0]
+ deps = args[task_name]
+ else
+ task_name = args
+ deps = []
+ end
+ deps = deps.collect {|d| intern(d) }
+ get(task_name).enhance(deps, &block)
+ end
+
+ def get(task_name)
+ name = intern(task_name)
+ TASKS[name] ||= self.new(name)
+ end
+
+ def intern(task_name)
+ (Symbol === task_name) ? task_name : task_name.intern
+ end
+ end
+ end
+
+ class FileTask < Task
+ def needed?
+ return true unless File.exist?(name)
+ latest_prereq = @prerequisites.collect{|n| Task[n].timestamp}.max
+ return false if latest_prereq.nil?
+ timestamp < latest_prereq
+ end
+
+ def timestamp
+ File.new(name.to_s).mtime
+ end
+ end
+
+ def task(args, &block)
+ Task.define_task(args, &block)
+ end
+
+ def file(args, &block)
+ FileTask.define_task(args, &block)
+ end
+
+ def sys(cmd)
+ puts cmd
+ system(cmd) or fail "Command Failed: [#{cmd}]"
+ end
+
+ def rake
+ begin
+ here = Dir.pwd
+ while ! File.exist?("Rakefile")
+ Dir.chdir("..")
+ fail "No Rakefile found" if Dir.pwd == here
+ here = Dir.pwd
+ end
+ puts "(in #{Dir.pwd})"
+ load "./Rakefile"
+ ARGV.push("default") if ARGV.size == 0
+ ARGV.each { |task_name| Task[task_name].invoke }
+ rescue Exception => ex
+ puts "rake aborted ... #{ex.message}"
+ puts ex.backtrace.find {|str| str =~ /Rakefile/ } || ""
+ end
+ end
+
+ if __FILE__ == $0 then
+ rake
+ end
diff --git a/doc/rake/rakefile.rdoc b/doc/rake/rakefile.rdoc
new file mode 100644
index 0000000000..a00c9fd21e
--- /dev/null
+++ b/doc/rake/rakefile.rdoc
@@ -0,0 +1,557 @@
+= Rakefile Format (as of version 0.8.7)
+
+First of all, there is no special format for a Rakefile. A Rakefile
+contains executable Ruby code. Anything legal in a ruby script is
+allowed in a Rakefile.
+
+Now that we understand there is no special syntax in a Rakefile, there
+are some conventions that are used in a Rakefile that are a little
+unusual in a typical Ruby program. Since a Rakefile is tailored to
+specifying tasks and actions, the idioms used in a Rakefile are
+designed to support that.
+
+So, what goes into a Rakefile?
+
+== Tasks
+
+Tasks are the main unit of work in a Rakefile. Tasks have a name
+(usually given as a symbol or a string), a list of prerequisites (more
+symbols or strings) and a list of actions (given as a block).
+
+=== Simple Tasks
+
+A task is declared by using the +task+ method. +task+ takes a single
+parameter that is the name of the task.
+
+ task :name
+
+=== Tasks with Prerequisites
+
+Any prerequisites are given as a list (enclosed in square brackets)
+following the name and an arrow (=>).
+
+ task :name => [:prereq1, :prereq2]
+
+<b>NOTE:</b> Although this syntax looks a little funky, it is legal
+Ruby. We are constructing a hash where the key is :name and the value
+for that key is the list of prerequisites. It is equivalent to the
+following ...
+
+ hash = Hash.new
+ hash[:name] = [:prereq1, :prereq2]
+ task(hash)
+
+=== Tasks with Actions
+
+Actions are defined by passing a block to the +task+ method. Any Ruby
+code can be placed in the block. The block may reference the task
+object via the block parameter.
+
+ task :name => [:prereq1, :prereq2] do |t|
+ # actions (may reference t)
+ end
+
+=== Multiple Definitions
+
+A task may be specified more than once. Each specification adds its
+prerequisites and actions to the existing definition. This allows one
+part of a rakefile to specify the actions and a different rakefile
+(perhaps separately generated) to specify the dependencies.
+
+For example, the following is equivalent to the single task
+specification given above.
+
+ task :name
+ task :name => [:prereq1]
+ task :name => [:prereq2]
+ task :name do |t|
+ # actions
+ end
+
+== File Tasks
+
+Some tasks are designed to create a file from one or more other files.
+Tasks that generate these files may be skipped if the file already
+exists. File tasks are used to specify file creation tasks.
+
+File tasks are declared using the +file+ method (instead of the +task+
+method). In addition, file tasks are usually named with a string
+rather than a symbol.
+
+The following file task creates a executable program (named +prog+)
+given two object files name <tt>a.o</tt> and <tt>b.o</tt>. The tasks
+for creating <tt>a.o</tt> and <tt>b.o</tt> are not shown.
+
+ file "prog" => ["a.o", "b.o"] do |t|
+ sh "cc -o #{t.name} #{t.prerequisites.join(' ')}"
+ end
+
+== Directory Tasks
+
+It is common to need to create directories upon demand. The
++directory+ convenience method is a short-hand for creating a FileTask
+that creates the directory. For example, the following declaration
+...
+
+ directory "testdata/examples/doc"
+
+is equivalent to ...
+
+ file "testdata" do |t| mkdir t.name end
+ file "testdata/examples" do |t| mkdir t.name end
+ file "testdata/examples/doc" do |t| mkdir t.name end
+
+The +directory+ method does not accept prerequisites or actions, but
+both prerequisites and actions can be added later. For example ...
+
+ directory "testdata"
+ file "testdata" => ["otherdata"]
+ file "testdata" do
+ cp Dir["standard_data/*.data"], "testdata"
+ end
+
+== Tasks with Parallel Prerequisites
+
+Rake allows parallel execution of prerequisites using the following syntax:
+
+ multitask :copy_files => [:copy_src, :copy_doc, :copy_bin] do
+ puts "All Copies Complete"
+ end
+
+In this example, +copy_files+ is a normal rake task. Its actions are
+executed whenever all of its prerequisites are done. The big
+difference is that the prerequisites (+copy_src+, +copy_bin+ and
++copy_doc+) are executed in parallel. Each of the prerequisites are
+run in their own Ruby thread, possibly allowing faster overall runtime.
+
+=== Secondary Prerequisites
+
+If any of the primary prerequisites of a multitask have common secondary
+prerequisites, all of the primary/parallel prerequisites will wait
+until the common prerequisites have been run.
+
+For example, if the <tt>copy_<em>xxx</em></tt> tasks have the
+following prerequisites:
+
+ task :copy_src => [:prep_for_copy]
+ task :copy_bin => [:prep_for_copy]
+ task :copy_doc => [:prep_for_copy]
+
+Then the +prep_for_copy+ task is run before starting all the copies in
+parallel. Once +prep_for_copy+ is complete, +copy_src+, +copy_bin+,
+and +copy_doc+ are all run in parallel. Note that +prep_for_copy+ is
+run only once, even though it is referenced in multiple threads.
+
+=== Thread Safety
+
+The Rake internal data structures are thread-safe with respect
+to the multitask parallel execution, so there is no need for the user
+to do extra synchronization for Rake's benefit. However, if there are
+user data structures shared between the parallel prerequisites, the
+user must do whatever is necessary to prevent race conditions.
+
+== Tasks with Arguments
+
+Prior to version 0.8.0, rake was only able to handle command line
+arguments of the form NAME=VALUE that were passed into Rake via the
+ENV hash. Many folks had asked for some kind of simple command line
+arguments, perhaps using "--" to separate regular task names from
+argument values on the command line. The problem is that there was no
+easy way to associate positional arguments on the command line with
+different tasks. Suppose both tasks :a and :b expect a command line
+argument: does the first value go with :a? What if :b is run first?
+Should it then get the first command line argument.
+
+Rake 0.8.0 solves this problem by explicitly passing values directly
+to the tasks that need them. For example, if I had a release task
+that required a version number, I could say:
+
+ rake release[0.8.2]
+
+And the string "0.8.2" will be passed to the :release task. Multiple
+arguments can be passed by separating them with a comma, for example:
+
+ rake name[john,doe]
+
+Just a few words of caution. The rake task name and its arguments
+need to be a single command line argument to rake. This generally
+means no spaces. If spaces are needed, then the entire rake +
+argument string should be quoted. Something like this:
+
+ rake "name[billy bob, smith]"
+
+(Quoting rules vary between operating systems and shells, so make sure
+you consult the proper docs for your OS/shell).
+
+=== Tasks Arguments and the Environment
+
+Task argument values can also be picked up from the environment. For
+example, if the "release" task expected a parameter named
+"release_version", then either
+
+ rake release[0.8.2]
+
+or
+
+ RELEASE_VERSION rake release
+
+will work. Environment variable names must either match the task
+parameter exactly, or match an all-uppercase version of the task
+parameter.
+
+=== Tasks that Expect Parameters
+
+Parameters are only given to tasks that are setup to expect them. In
+order to handle named parameters, the task declaration syntax for
+tasks has been extended slightly.
+
+For example, a task that needs a first name and last name might be
+declared as:
+
+ task :name, [:first_name, :last_name]
+
+The first argument is still the name of the task (:name in this case).
+The next two arguments are the names of the parameters expected by
+:name in an array (:first_name and :last_name in the example).
+
+To access the values of the parameters, the block defining the task
+behaviour can now accept a second parameter:
+
+ task :name, [:first_name, :last_name] do |t, args|
+ puts "First name is #{args.first_name}"
+ puts "Last name is #{args.last_name}"
+ end
+
+The first argument of the block "t" is always bound to the current
+task object. The second argument "args" is an open-struct like object
+that allows access to the task arguments. Extra command line
+arguments to a task are ignored. Missing command line arguments are
+picked up from matching environment variables. If there are no
+matching environment variables, they are given the nil value.
+
+If you wish to specify default values for the arguments, you can use
+the with_defaults method in the task body. Here is the above example
+where we specify default values for the first and last names:
+
+ task :name, [:first_name, :last_name] do |t, args|
+ args.with_defaults(:first_name => "John", :last_name => "Dough")
+ puts "First name is #{args.first_name}"
+ puts "Last name is #{args.last_name}"
+ end
+
+=== Tasks that Expect Parameters and Have Prerequisites
+
+Tasks that use parameters have a slightly different format for
+prerequisites. Use the arrow notation to indicate the prerequisites
+for tasks with arguments. For example:
+
+ task :name, [:first_name, :last_name] => [:pre_name] do |t, args|
+ args.with_defaults(:first_name => "John", :last_name => "Dough")
+ puts "First name is #{args.first_name}"
+ puts "Last name is #{args.last_name}"
+ end
+
+=== Deprecated Task Parameters Format
+
+There is an older format for declaring task parameters that omitted
+the task argument array and used the :needs keyword to introduce the
+dependencies. That format is still supported for compatibility, but
+is not recommended for use. The older format may be dropped in future
+versions of rake.
+
+== Accessing Task Programmatically
+
+Sometimes it is useful to manipulate tasks programmatically in a
+Rakefile. To find a task object, use the <tt>:[]</tt> operator on the
+<tt>Rake::Task</tt>.
+
+=== Programmatic Task Example
+
+For example, the following Rakefile defines two tasks. The :doit task
+simply prints a simple "DONE" message. The :dont class will lookup
+the doit class and remove (clear) all of its prerequisites and
+actions.
+
+ task :doit do
+ puts "DONE"
+ end
+
+ task :dont do
+ Rake::Task[:doit].clear
+ end
+
+Running this example:
+
+ $ rake doit
+ (in /Users/jim/working/git/rake/x)
+ DONE
+ $ rake dont doit
+ (in /Users/jim/working/git/rake/x)
+ $
+
+The ability to programmatically manipulate tasks gives rake very
+powerful meta-programming capabilities w.r.t. task execution, but
+should be used with cation.
+
+== Rules
+
+When a file is named as a prerequisite, but does not have a file task
+defined for it, Rake will attempt to synthesize a task by looking at a
+list of rules supplied in the Rakefile.
+
+Suppose we were trying to invoke task "mycode.o", but no task is
+defined for it. But the rakefile has a rule that look like this ...
+
+ rule '.o' => ['.c'] do |t|
+ sh "cc #{t.source} -c -o #{t.name}"
+ end
+
+This rule will synthesize any task that ends in ".o". It has a
+prerequisite a source file with an extension of ".c" must exist. If
+Rake is able to find a file named "mycode.c", it will automatically
+create a task that builds "mycode.o" from "mycode.c".
+
+If the file "mycode.c" does not exist, rake will attempt
+to recursively synthesize a rule for it.
+
+When a task is synthesized from a rule, the +source+ attribute of the
+task is set to the matching source file. This allows us to write
+rules with actions that reference the source file.
+
+=== Advanced Rules
+
+Any regular expression may be used as the rule pattern. Additionally,
+a proc may be used to calculate the name of the source file. This
+allows for complex patterns and sources.
+
+The following rule is equivalent to the example above.
+
+ rule( /\.o$/ => [
+ proc {|task_name| task_name.sub(/\.[^.]+$/, '.c') }
+ ]) do |t|
+ sh "cc #{t.source} -c -o #{t.name}"
+ end
+
+<b>NOTE:</b> Because of a _quirk_ in Ruby syntax, parenthesis are
+required on *rule* when the first argument is a regular expression.
+
+The following rule might be used for Java files ...
+
+ rule '.java' => [
+ proc { |tn| tn.sub(/\.class$/, '.java').sub(/^classes\//, 'src/') }
+ ] do |t|
+ java_compile(t.source, t.name)
+ end
+
+<b>NOTE:</b> +java_compile+ is a hypothetical method that invokes the
+java compiler.
+
+== Importing Dependencies
+
+Any ruby file (including other rakefiles) can be included with a
+standard Ruby +require+ command. The rules and declarations in the
+required file are just added to the definitions already accumulated.
+
+Because the files are loaded _before_ the rake targets are evaluated,
+the loaded files must be "ready to go" when the rake command is
+invoked. This make generated dependency files difficult to use. By
+the time rake gets around to updating the dependencies file, it is too
+late to load it.
+
+The +Rake.import+ command addresses this by specifying a file to be
+loaded _after_ the main rakefile is loaded, but _before_ any targets
+on the command line are invoked. In addition, if the file name
+matches an explicit task, that task is invoked before loading the
+file. This allows dependency files to be generated and used in a
+single rake command invocation.
+
+<b>NOTE:</b> Starting in Rake version 0.9.0, the top level +import+
+command is deprecated and we recommend using the scoped
+"+Rake.import+" command mentioned above. Future versions of Rake will
+drop support for the top level +import+ command.
+
+=== Example:
+
+ require 'rake/loaders/makefile'
+
+ file ".depends.mf" => [SRC_LIST] do |t|
+ sh "makedepend -f- -- #{CFLAGS} -- #{t.prerequisites} > #{t.name}"
+ end
+
+ Rake.import ".depends.mf"
+
+If ".depends" does not exist, or is out of date w.r.t. the source
+files, a new ".depends" file is generated using +makedepend+ before
+loading.
+
+== Comments
+
+Standard Ruby comments (beginning with "#") can be used anywhere it is
+legal in Ruby source code, including comments for tasks and rules.
+However, if you wish a task to be described using the "-T" switch,
+then you need to use the +desc+ command to describe the task.
+
+=== Example:
+
+ desc "Create a distribution package"
+ task :package => [ ... ] do ... end
+
+The "-T" switch (or "--tasks" if you like to spell things out) will
+display a list of tasks that have a description. If you use +desc+ to
+describe your major tasks, you have a semi-automatic way of generating
+a summary of your Rake file.
+
+ traken$ rake -T
+ (in /home/.../rake)
+ rake clean # Remove any temporary products.
+ rake clobber # Remove any generated file.
+ rake clobber_rdoc # Remove rdoc products
+ rake contrib_test # Run tests for contrib_test
+ rake default # Default Task
+ rake install # Install the application
+ rake lines # Count lines in the main rake file
+ rake rdoc # Build the rdoc HTML Files
+ rake rerdoc # Force a rebuild of the RDOC files
+ rake test # Run tests
+ rake testall # Run all test targets
+
+Only tasks with descriptions will be displayed with the "-T" switch.
+Use "-P" (or "--prereqs") to get a list of all tasks and their
+prerequisites.
+
+== Namespaces
+
+As projects grow (and along with it, the number of tasks), it is
+common for task names to begin to clash. For example, if you might
+have a main program and a set of sample programs built by a single
+Rakefile. By placing the tasks related to the main program in one
+namespace, and the tasks for building the sample programs in a
+different namespace, the task names will not will not interfere with
+each other.
+
+For example:
+
+ namespace "main" do
+ task :build do
+ # Build the main program
+ end
+ end
+
+ namespace "samples" do
+ task :build do
+ # Build the sample programs
+ end
+ end
+
+ task :build => ["main:build", "samples:build"]
+
+Referencing a task in a separate namespace can be achieved by
+prefixing the task name with the namespace and a colon
+(e.g. "main:build" refers to the :build task in the +main+ namespace).
+Nested namespaces are supported, so
+
+Note that the name given in the +task+ command is always the unadorned
+task name without any namespace prefixes. The +task+ command always
+defines a task in the current namespace.
+
+=== FileTasks
+
+File task names are not scoped by the namespace command. Since the
+name of a file task is the name of an actual file in the file system,
+it makes little sense to include file task names in name space.
+Directory tasks (created by the +directory+ command) are a type of
+file task and are also not affected by namespaces.
+
+=== Name Resolution
+
+When looking up a task name, rake will start with the current
+namespace and attempt to find the name there. If it fails to find a
+name in the current namespace, it will search the parent namespaces
+until a match is found (or an error occurs if there is no match).
+
+The "rake" namespace is a special implicit namespace that refers to
+the toplevel names.
+
+If a task name begins with a "^" character, the name resolution will
+start in the parent namespace. Multiple "^" characters are allowed.
+
+Here is an example file with multiple :run tasks and how various names
+resolve in different locations.
+
+ task :run
+
+ namespace "one" do
+ task :run
+
+ namespace "two" do
+ task :run
+
+ # :run => "one:two:run"
+ # "two:run" => "one:two:run"
+ # "one:two:run" => "one:two:run"
+ # "one:run" => "one:run"
+ # "^run" => "one:run"
+ # "^^run" => "rake:run" (the top level task)
+ # "rake:run" => "rake:run" (the top level task)
+ end
+
+ # :run => "one:run"
+ # "two:run" => "one:two:run"
+ # "^run" => "rake:run"
+ end
+
+ # :run => "rake:run"
+ # "one:run" => "one:run"
+ # "one:two:run" => "one:two:run"
+
+== FileLists
+
+FileLists are the way Rake manages lists of files. You can treat a
+FileList as an array of strings for the most part, but FileLists
+support some additional operations.
+
+=== Creating a FileList
+
+Creating a file list is easy. Just give it the list of file names:
+
+ fl = FileList['file1.rb', file2.rb']
+
+Or give it a glob pattern:
+
+ fl = FileList['*.rb']
+
+== Odds and Ends
+
+=== do/end versus { }
+
+Blocks may be specified with either a +do+/+end+ pair, or with curly
+braces in Ruby. We _strongly_ recommend using +do+/+end+ to specify the
+actions for tasks and rules. Because the rakefile idiom tends to
+leave off parentheses on the task/file/rule methods, unusual
+ambiguities can arise when using curly braces.
+
+For example, suppose that the method +object_files+ returns a list of
+object files in a project. Now we use +object_files+ as the
+prerequisites in a rule specified with actions in curly braces.
+
+ # DON'T DO THIS!
+ file "prog" => object_files {
+ # Actions are expected here (but it doesn't work)!
+ }
+
+Because curly braces have a higher precedence than +do+/+end+, the
+block is associated with the +object_files+ method rather than the
++file+ method.
+
+This is the proper way to specify the task ...
+
+ # THIS IS FINE
+ file "prog" => object_files do
+ # Actions go here
+ end
+
+----
+
+== See
+
+* README.rdoc -- Main documentation for Rake.
diff --git a/doc/rake/rational.rdoc b/doc/rake/rational.rdoc
new file mode 100644
index 0000000000..0e1c33873d
--- /dev/null
+++ b/doc/rake/rational.rdoc
@@ -0,0 +1,151 @@
+= Why rake?
+
+Ok, let me state from the beginning that I never intended to write this
+code. I'm not convinced it is useful, and I'm not convinced anyone
+would even be interested in it. All I can say is that Why's onion truck
+must by been passing through the Ohio valley.
+
+What am I talking about? ... A Ruby version of Make.
+
+See, I can sense you cringing already, and I agree. The world certainly
+doesn't need yet another reworking of the "make" program. I mean, we
+already have "ant". Isn't that enough?
+
+It started yesterday. I was helping a coworker fix a problem in one of
+the Makefiles we use in our project. Not a particularly tough problem,
+but during the course of the conversation I began lamenting some of the
+shortcomings of make. In particular, in one of my makefiles I wanted to
+determine the name of a file dynamically and had to resort to some
+simple scripting (in Ruby) to make it work. "Wouldn't it be nice if you
+could just use Ruby inside a Makefile" I said.
+
+My coworker (a recent convert to Ruby) agreed, but wondered what it
+would look like. So I sketched the following on the whiteboard...
+
+ "What if you could specify the make tasks in Ruby, like this ..."
+
+ task "build" do
+ java_compile(...args, etc ...)
+ end
+
+ "The task function would register "build" as a target to be made,
+ and the block would be the action executed whenever the build
+ system determined that it was time to do the build target."
+
+We agreed that would be cool, but writing make from scratch would be WAY
+too much work. And that was the end of that!
+
+... Except I couldn't get the thought out of my head. What exactly
+would be needed to make the about syntax work as a make file? Hmmm, you
+would need to register the tasks, you need some way of specifying
+dependencies between tasks, and some way of kicking off the process.
+Hey! What if we did ... and fifteen minutes later I had a working
+prototype of Ruby make, complete with dependencies and actions.
+
+I showed the code to my coworker and we had a good laugh. It was just
+about a page worth of code that reproduced an amazing amount of the
+functionality of make. We were both truly stunned with the power of
+Ruby.
+
+But it didn't do everything make did. In particular, it didn't have
+timestamp based file dependencies (where a file is rebuilt if any of its
+prerequisite files have a later timestamp). Obviously THAT would be a
+pain to add and so Ruby Make would remain an interesting experiment.
+
+... Except as I walked back to my desk, I started thinking about what
+file based dependencies would really need. Rats! I was hooked again,
+and by adding a new class and two new methods, file/timestamp
+dependencies were implemented.
+
+Ok, now I was really hooked. Last night (during CSI!) I massaged the
+code and cleaned it up a bit. The result is a bare-bones replacement
+for make in exactly 100 lines of code.
+
+For the curious, you can see it at ...
+* doc/proto_rake.rdoc
+
+Oh, about the name. When I wrote the example Ruby Make task on my
+whiteboard, my coworker exclaimed "Oh! I have the perfect name: Rake ...
+Get it? Ruby-Make. Rake!" He said he envisioned the tasks as leaves
+and Rake would clean them up ... or something like that. Anyways, the
+name stuck.
+
+Some quick examples ...
+
+A simple task to delete backup files ...
+
+ task :clean do
+ Dir['*~'].each {|fn| rm fn rescue nil}
+ end
+
+Note that task names are symbols (they are slightly easier to type
+than quoted strings ... but you may use quoted string if you would
+rather). Rake makes the methods of the FileUtils module directly
+available, so we take advantage of the <tt>rm</tt> command. Also note
+the use of "rescue nil" to trap and ignore errors in the <tt>rm</tt>
+command.
+
+To run it, just type "rake clean". Rake will automatically find a
+Rakefile in the current directory (or above!) and will invoke the
+targets named on the command line. If there are no targets explicitly
+named, rake will invoke the task "default".
+
+Here's another task with dependencies ...
+
+ task :clobber => [:clean] do
+ rm_r "tempdir"
+ end
+
+Task :clobber depends upon task :clean, so :clean will be run before
+:clobber is executed.
+
+Files are specified by using the "file" command. It is similar to the
+task command, except that the task name represents a file, and the task
+will be run only if the file doesn't exist, or if its modification time
+is earlier than any of its prerequisites.
+
+Here is a file based dependency that will compile "hello.cc" to
+"hello.o".
+
+ file "hello.cc"
+ file "hello.o" => ["hello.cc"] do |t|
+ srcfile = t.name.sub(/\.o$/, ".cc")
+ sh %{g++ #{srcfile} -c -o #{t.name}}
+ end
+
+I normally specify file tasks with string (rather than symbols). Some
+file names can't be represented by symbols. Plus it makes the
+distinction between them more clear to the casual reader.
+
+Currently writing a task for each and every file in the project would be
+tedious at best. I envision a set of libraries to make this job
+easier. For instance, perhaps something like this ...
+
+ require 'rake/ctools'
+ Dir['*.c'].each do |fn|
+ c_source_file(fn)
+ end
+
+where "c_source_file" will create all the tasks need to compile all the
+C source files in a directory. Any number of useful libraries could be
+created for rake.
+
+That's it. There's no documentation (other than whats in this
+message). Does this sound interesting to anyone? If so, I'll continue
+to clean it up and write it up and publish it on RAA. Otherwise, I'll
+leave it as an interesting exercise and a tribute to the power of Ruby.
+
+Why /might/ rake be interesting to Ruby programmers. I don't know,
+perhaps ...
+
+* No weird make syntax (only weird Ruby syntax :-)
+* No need to edit or read XML (a la ant)
+* Platform independent build scripts.
+* Will run anywhere Ruby exists, so no need to have "make" installed.
+ If you stay away from the "sys" command and use things like
+ 'ftools', you can have a perfectly platform independent
+ build script. Also rake is only 100 lines of code, so it can
+ easily be packaged along with the rest of your code.
+
+So ... Sorry for the long rambling message. Like I said, I never
+intended to write this code at all.
diff --git a/doc/rake/release_notes/rake-0.8.7.rdoc b/doc/rake/release_notes/rake-0.8.7.rdoc
new file mode 100644
index 0000000000..884f4c659e
--- /dev/null
+++ b/doc/rake/release_notes/rake-0.8.7.rdoc
@@ -0,0 +1,55 @@
+= Rake 0.8.7 Released
+
+Rake version 0.8.5 introduced greatly improved support for executing
+commands on Windows. The "sh" command now has the same semantics on
+Windows that it has on Unix based platforms.
+
+Rake version 0.8.6 includes minor fixes the the RDoc generation.
+Rake version 0.8.7 includes a minor fix for JRuby running on windows.
+
+== Changes
+
+=== New Features / Enhancements in Version 0.8.5
+
+* Improved implementation of the Rake system command for Windows.
+ (patch from James M. Lawrence/quix)
+
+* Support for Ruby 1.9's improved system command. (patch from James
+ M. Lawrence/quix)
+
+* Rake now includes the configured extension when invoking an
+ executable (Config::CONFIG['EXEEXT])
+
+=== Bug Fixes in Version 0.8.5
+
+* Environment variable keys are now correctly cased (it matters in
+ some implementations).
+
+== What is Rake
+
+Rake is a build tool similar to the make program in many ways. But
+instead of cryptic make recipes, Rake uses standard Ruby code to
+declare tasks and dependencies. You have the full power of a modern
+scripting language built right into your build tool.
+
+== Availability
+
+The easiest way to get and install rake is via RubyGems ...
+
+ gem install rake (you may need root/admin privileges)
+
+Otherwise, you can get it from the more traditional places:
+
+Home Page:: http://rake.rubyforge.org/
+Download:: http://rubyforge.org/project/showfiles.php?group_id=50
+GitHub:: git://github.com/jimweirich/rake.git
+
+== Thanks
+
+As usual, it was input from users that drove a alot of these changes. The
+following people either contributed patches, made suggestions or made
+otherwise helpful comments. Thanks to ...
+
+* Charles Nutter
+
+-- Jim Weirich
diff --git a/doc/rake/release_notes/rake-0.9.0.rdoc b/doc/rake/release_notes/rake-0.9.0.rdoc
new file mode 100644
index 0000000000..823483cc27
--- /dev/null
+++ b/doc/rake/release_notes/rake-0.9.0.rdoc
@@ -0,0 +1,112 @@
+= Rake 0.9.0 Released
+
+Rake version 0.9.0 has a number of bug fixes and enhancments (see
+below for more details). Additionally, the internals have be slightly
+restructured and improved.
+
+== Changes
+
+=== New Features / Enhancements / Bug Fixes in Version 0.9.0
+
+* Rake now warns when the deprecated :needs syntax used (and suggests
+ the proper syntax in the warning).
+
+* Moved Rake DSL commands to top level ruby object 'main'. Rake DSL
+ commands are no longer private methods in Object. (Suggested by
+ James M. Lawrence/quix)
+
+* Rake now uses case-insensitive comparisons to find the Rakefile on Windows.
+ Based on patch by Roger Pack.
+
+* Rake now requires (instead of loads) files in the test task. Patch by Cezary
+ Baginski.
+
+* Fixed typos. Patches by Sean Scot August Moon and R.T. Lechow.
+
+* Rake now prints the Rakefile directory only when it's different from the
+ current directory. Patch by Alex Chaffee.
+
+* Improved rakefile_location discovery on Windows. Patch by James Tucker.
+
+* Rake now recognizes "Windows Server" as a windows system. Patch by Matthias
+ Lüdtke
+
+* Rake::RDocTask is deprecated. Use RDoc::Task from RDoc 2.4.2+ (require
+ 'rdoc/task')
+
+* Rake::GemPackageTask is deprecated. Use Gem::PackageTask (require
+ 'rubygems/package_task')
+
+* Rake now outputs various messages to $stderr instead of $stdout.
+
+* Rake no longer emits warnings for Config. Patch by Santiago Pastorino.
+
+* Removed Rake's DSL methods from the top level scope. If you need to
+ call 'task :xzy' in your code, include Rake::DSL into your class, or
+ put the code in a Rake::DSL.environment do ... end block.
+
+* Split rake.rb into individual files.
+
+* Support for the --where (-W) flag for showing where a task is defined.
+
+* Fixed quoting in test task.
+ (http://onestepback.org/redmine/issues/show/44,
+ http://www.pivotaltracker.com/story/show/1223138)
+
+* Fixed the silent option parsing problem.
+ (http://onestepback.org/redmine/issues/show/47)
+
+* Fixed :verbose=>false flag on sh and ruby commands.
+
+* Rake command line options may be given by default in a RAKEOPT
+ environment variable.
+
+* Errors in Rake will now display the task invocation chain in effect
+ at the time of the error.
+
+* Accepted change by warnickr to not expand test patterns in shell
+ (allowing more files in the test suite).
+
+* Fixed that file tasks did not perform prereq lookups in scope
+ (Redmine #57).
+
+== What is Rake
+
+Rake is a build tool similar to the make program in many ways. But
+instead of cryptic make recipes, Rake uses standard Ruby code to
+declare tasks and dependencies. You have the full power of a modern
+scripting language built right into your build tool.
+
+== Availability
+
+The easiest way to get and install rake is via RubyGems ...
+
+ gem install rake (you may need root/admin privileges)
+
+Otherwise, you can get it from the more traditional places:
+
+Home Page:: http://rake.rubyforge.org/
+Download:: http://rubyforge.org/project/showfiles.php?group_id=50
+GitHub:: git://github.com/jimweirich/rake.git
+
+== Thanks
+
+As usual, it was input from users that drove a alot of these changes. The
+following people either contributed patches, made suggestions or made
+otherwise helpful comments. Thanks to ...
+
+* James M. Lawrence (quix)
+* Roger Pack
+* Cezary Baginski
+* Sean Scot August Moon
+* R.T. Lechow
+* Alex Chaffee
+* James Tucker
+* Matthias Lüdtke
+* Santiago Pastorino
+
+Also, bit thanks to Eric Hodel for assisting with getting this release
+out the door (where "assisting" includes, but is not by any means
+limited to, "pushing" me to get it done).
+
+-- Jim Weirich
diff --git a/doc/rake/release_notes/rake-0.9.1.rdoc b/doc/rake/release_notes/rake-0.9.1.rdoc
new file mode 100644
index 0000000000..70be8b5688
--- /dev/null
+++ b/doc/rake/release_notes/rake-0.9.1.rdoc
@@ -0,0 +1,52 @@
+= Rake 0.9.1 Released
+
+Rake version 0.9.1 has a number of bug fixes and enhancments (see
+below for more details). Additionally, the internals have be slightly
+restructured and improved.
+
+== Changes
+
+Rake 0.9.1 adds back the global DSL methods, but with deprecation
+messages. This allows Rake 0.9.1 to be used with older rakefiles with
+warning messages.
+
+== What is Rake
+
+Rake is a build tool similar to the make program in many ways. But
+instead of cryptic make recipes, Rake uses standard Ruby code to
+declare tasks and dependencies. You have the full power of a modern
+scripting language built right into your build tool.
+
+== Availability
+
+The easiest way to get and install rake is via RubyGems ...
+
+ gem install rake (you may need root/admin privileges)
+
+Otherwise, you can get it from the more traditional places:
+
+Home Page:: http://rake.rubyforge.org/
+Download:: http://rubyforge.org/project/showfiles.php?group_id=50
+GitHub:: git://github.com/jimweirich/rake.git
+
+== Thanks
+
+As usual, it was input from users that drove a alot of these changes. The
+following people either contributed patches, made suggestions or made
+otherwise helpful comments. Thanks to ...
+
+* James M. Lawrence (quix)
+* Roger Pack
+* Cezary Baginski
+* Sean Scot August Moon
+* R.T. Lechow
+* Alex Chaffee
+* James Tucker
+* Matthias Lüdtke
+* Santiago Pastorino
+
+Also, bit thanks to Eric Hodel for assisting with getting this release
+out the door (where "assisting" includes, but is not by any means
+limited to, "pushing" me to get it done).
+
+-- Jim Weirich
diff --git a/doc/rake/release_notes/rake-0.9.2.2.rdoc b/doc/rake/release_notes/rake-0.9.2.2.rdoc
new file mode 100644
index 0000000000..d804aba81c
--- /dev/null
+++ b/doc/rake/release_notes/rake-0.9.2.2.rdoc
@@ -0,0 +1,55 @@
+= Rake 0.9.3 Released
+
+Rake version 0.9.3 is mainly bug fixes.
+
+== Changes
+
+* The rake test loader now removes arguments it has processed. Issue #51
+* Rake::TaskArguments now responds to #values_at
+* RakeFileUtils.verbose_flag = nil silences output the same as 0.8.7
+* Rake tests are now directory-independent
+* Rake tests are no longer require flexmock
+* Commands constant is no longer polluting top level namespace.
+* Show only the interesting portion of the backtrace by default (James M. Lawrence).
+* Added --reduce-compat option to remove backward compatible DSL hacks (James M. Lawrence).
+
+== What is Rake
+
+Rake is a build tool similar to the make program in many ways. But
+instead of cryptic make recipes, Rake uses standard Ruby code to
+declare tasks and dependencies. You have the full power of a modern
+scripting language built right into your build tool.
+
+== Availability
+
+The easiest way to get and install rake is via RubyGems ...
+
+ gem install rake (you may need root/admin privileges)
+
+Otherwise, you can get it from the more traditional places:
+
+Home Page:: http://rake.rubyforge.org/
+Download:: http://rubyforge.org/project/showfiles.php?group_id=50
+GitHub:: git://github.com/jimweirich/rake.git
+
+== Thanks
+
+As usual, it was input from users that drove a alot of these changes. The
+following people either contributed patches, made suggestions or made
+otherwise helpful comments. Thanks to ...
+
+* James M. Lawrence (quix)
+* Roger Pack
+* Cezary Baginski
+* Sean Scot August Moon
+* R.T. Lechow
+* Alex Chaffee
+* James Tucker
+* Matthias Lüdtke
+* Santiago Pastorino
+
+Also, bit thanks to Eric Hodel for assisting with getting this release
+out the door (where "assisting" includes, but is not by any means
+limited to, "pushing" me to get it done).
+
+-- Jim Weirich
diff --git a/doc/rake/release_notes/rake-0.9.2.rdoc b/doc/rake/release_notes/rake-0.9.2.rdoc
new file mode 100644
index 0000000000..2314193f5e
--- /dev/null
+++ b/doc/rake/release_notes/rake-0.9.2.rdoc
@@ -0,0 +1,49 @@
+= Rake 0.9.2 Released
+
+Rake version 0.9.2 has a few small fixes. See below for details.
+
+== Changes
+
+* Support for Ruby 1.8.6 was fixed.
+* Global DSL warnings now honor --no-deprecate
+
+== What is Rake
+
+Rake is a build tool similar to the make program in many ways. But
+instead of cryptic make recipes, Rake uses standard Ruby code to
+declare tasks and dependencies. You have the full power of a modern
+scripting language built right into your build tool.
+
+== Availability
+
+The easiest way to get and install rake is via RubyGems ...
+
+ gem install rake (you may need root/admin privileges)
+
+Otherwise, you can get it from the more traditional places:
+
+Home Page:: http://rake.rubyforge.org/
+Download:: http://rubyforge.org/project/showfiles.php?group_id=50
+GitHub:: git://github.com/jimweirich/rake.git
+
+== Thanks
+
+As usual, it was input from users that drove a alot of these changes. The
+following people either contributed patches, made suggestions or made
+otherwise helpful comments. Thanks to ...
+
+* James M. Lawrence (quix)
+* Roger Pack
+* Cezary Baginski
+* Sean Scot August Moon
+* R.T. Lechow
+* Alex Chaffee
+* James Tucker
+* Matthias Lüdtke
+* Santiago Pastorino
+
+Also, bit thanks to Eric Hodel for assisting with getting this release
+out the door (where "assisting" includes, but is not by any means
+limited to, "pushing" me to get it done).
+
+-- Jim Weirich
diff --git a/doc/rake/release_notes/rake-0.9.3.rdoc b/doc/rake/release_notes/rake-0.9.3.rdoc
new file mode 100644
index 0000000000..4476b4f184
--- /dev/null
+++ b/doc/rake/release_notes/rake-0.9.3.rdoc
@@ -0,0 +1,102 @@
+= Rake 0.9.3 Released
+
+Rake version 0.9.3 contains some new, backwards compatible features and
+a number of bug fixes.
+
+== Changes
+
+=== New Features
+
+* Multitask tasks now use a thread pool. Use -j to limit the number of
+ available threads.
+
+* Use -m to turn regular tasks into multitasks (use at your own risk).
+
+* You can now do "Rake.add_rakelib 'dir'" in your Rakefile to
+ programatically add rake task libraries.
+
+* You can specific backtrace suppression patterns (see
+ --supress-backtrace)
+
+* Directory tasks can now take prerequisites and actions
+
+* Use --backtrace to request a full backtrace without the task trace.
+
+* You can say "--backtrace=stdout" and "--trace=stdout" to route trace
+ output to standard output rather than standard error.
+
+* Optional 'phony' target (enable with 'require 'rake/phony'") for
+ special purpose builds.
+
+* Task#clear now clears task comments as well as actions and
+ prerequisites. Task#clear_comment will specifically target comments.
+
+* The --all option will force -T and -D to consider all the tasks,
+ with and without descriptions.
+
+=== Bug Fixes
+
+* Semi-colons in windows rakefile paths now work.
+
+* Improved Control-C support when invoking multiple test suites.
+
+* egrep method now reads files in text mode (better support for
+ Windows)
+
+* Better deprecation line number reporting.
+
+* The -W option now works with all tasks, whether they have a
+ description or not.
+
+* File globs in rake should not be sorted alphabetically, independent
+ of file system and platform.
+
+* Numerous internal improvements.
+
+* Documentation typos and fixes.
+
+== What is Rake
+
+Rake is a build tool similar to the make program in many ways. But
+instead of cryptic make recipes, Rake uses standard Ruby code to
+declare tasks and dependencies. You have the full power of a modern
+scripting language built right into your build tool.
+
+== Availability
+
+The easiest way to get and install rake is via RubyGems ...
+
+ gem install rake (you may need root/admin privileges)
+
+Otherwise, you can get it from the more traditional places:
+
+Home Page:: http://github.com/jimweirich/rake
+Download:: http://rubyforge.org/project/showfiles.php?group_id=50
+GitHub:: git://github.com/jimweirich/rake.git
+
+== Thanks
+
+As usual, it was input from users that drove a alot of these changes. The
+following people either contributed patches, made suggestions or made
+otherwise helpful comments. Thanks to ...
+
+* Aaron Patterson
+* Dylan Smith
+* Jo Liss
+* Jonas Pfenniger
+* Kazuki Tsujimoto
+* Michael Bishop
+* Michael Elufimov
+* NAKAMURA Usaku
+* Ryan Davis
+* Sam Grönblom
+* Sam Phippen
+* Sergio Wong
+* Tay Ray Chuan
+* grosser
+* quix
+
+Also, many thanks to Eric Hodel for assisting with getting this release
+out the door.
+
+-- Jim Weirich
diff --git a/doc/rake/release_notes/rake-0.9.4.rdoc b/doc/rake/release_notes/rake-0.9.4.rdoc
new file mode 100644
index 0000000000..e5d45b46ab
--- /dev/null
+++ b/doc/rake/release_notes/rake-0.9.4.rdoc
@@ -0,0 +1,110 @@
+= Rake 0.9.4 Released
+
+Rake version 0.9.4 contains a number of bug fixes.
+
+== Changes
+
+=== New Features (in 0.9.3)
+
+* Multitask tasks now use a thread pool. Use -j to limit the number of
+ available threads.
+
+* Use -m to turn regular tasks into multitasks (use at your own risk).
+
+* You can now do "Rake.add_rakelib 'dir'" in your Rakefile to
+ programatically add rake task libraries.
+
+* You can specific backtrace suppression patterns (see
+ --supress-backtrace)
+
+* Directory tasks can now take prerequisites and actions
+
+* Use --backtrace to request a full backtrace without the task trace.
+
+* You can say "--backtrace=stdout" and "--trace=stdout" to route trace
+ output to standard output rather than standard error.
+
+* Optional 'phony' target (enable with 'require 'rake/phony'") for
+ special purpose builds.
+
+* Task#clear now clears task comments as well as actions and
+ prerequisites. Task#clear_comment will specifically target comments.
+
+* The --all option will force -T and -D to consider all the tasks,
+ with and without descriptions.
+
+=== Bug Fixes (0.9.3)
+
+* Semi-colons in windows rakefile paths now work.
+
+* Improved Control-C support when invoking multiple test suites.
+
+* egrep method now reads files in text mode (better support for
+ Windows)
+
+* Better deprecation line number reporting.
+
+* The -W option now works with all tasks, whether they have a
+ description or not.
+
+* File globs in rake should not be sorted alphabetically, independent
+ of file system and platform.
+
+* Numerous internal improvements.
+
+* Documentation typos and fixes.
+
+=== Bug Fixes (0.9.4)
+
+* Exit status with failing tests is not correctly set to non-zero.
+
+* Simplified syntax for phony task (for older versions of RDoc).
+
+* Stand alone FileList usage gets glob function (without loading in
+ extra dependencies)
+
+== What is Rake
+
+Rake is a build tool similar to the make program in many ways. But
+instead of cryptic make recipes, Rake uses standard Ruby code to
+declare tasks and dependencies. You have the full power of a modern
+scripting language built right into your build tool.
+
+== Availability
+
+The easiest way to get and install rake is via RubyGems ...
+
+ gem install rake (you may need root/admin privileges)
+
+Otherwise, you can get it from the more traditional places:
+
+Home Page:: http://github.com/jimweirich/rake
+Download:: http://rubyforge.org/project/showfiles.php?group_id=50
+GitHub:: git://github.com/jimweirich/rake.git
+
+== Thanks
+
+As usual, it was input from users that drove a alot of these changes. The
+following people either contributed patches, made suggestions or made
+otherwise helpful comments. Thanks to ...
+
+* Aaron Patterson
+* Dylan Smith
+* Jo Liss
+* Jonas Pfenniger
+* Kazuki Tsujimoto
+* Michael Bishop
+* Michael Elufimov
+* NAKAMURA Usaku
+* Ryan Davis
+* Sam Grönblom
+* Sam Phippen
+* Sergio Wong
+* Tay Ray Chuan
+* grosser
+* quix
+
+Also, many thanks to Eric Hodel for assisting with getting this release
+out the door.
+
+-- Jim Weirich
diff --git a/doc/rake/release_notes/rake-0.9.5.rdoc b/doc/rake/release_notes/rake-0.9.5.rdoc
new file mode 100644
index 0000000000..88e2d7cf3b
--- /dev/null
+++ b/doc/rake/release_notes/rake-0.9.5.rdoc
@@ -0,0 +1,114 @@
+= Rake 0.9.5 Released
+
+Rake version 0.9.5 contains a number of bug fixes.
+
+== Changes
+
+=== New Features (in 0.9.3)
+
+* Multitask tasks now use a thread pool. Use -j to limit the number of
+ available threads.
+
+* Use -m to turn regular tasks into multitasks (use at your own risk).
+
+* You can now do "Rake.add_rakelib 'dir'" in your Rakefile to
+ programatically add rake task libraries.
+
+* You can specific backtrace suppression patterns (see
+ --supress-backtrace)
+
+* Directory tasks can now take prerequisites and actions
+
+* Use --backtrace to request a full backtrace without the task trace.
+
+* You can say "--backtrace=stdout" and "--trace=stdout" to route trace
+ output to standard output rather than standard error.
+
+* Optional 'phony' target (enable with 'require 'rake/phony'") for
+ special purpose builds.
+
+* Task#clear now clears task comments as well as actions and
+ prerequisites. Task#clear_comment will specifically target comments.
+
+* The --all option will force -T and -D to consider all the tasks,
+ with and without descriptions.
+
+=== Bug Fixes (0.9.3)
+
+* Semi-colons in windows rakefile paths now work.
+
+* Improved Control-C support when invoking multiple test suites.
+
+* egrep method now reads files in text mode (better support for
+ Windows)
+
+* Better deprecation line number reporting.
+
+* The -W option now works with all tasks, whether they have a
+ description or not.
+
+* File globs in rake should not be sorted alphabetically, independent
+ of file system and platform.
+
+* Numerous internal improvements.
+
+* Documentation typos and fixes.
+
+=== Bug Fixes (0.9.4)
+
+* Exit status with failing tests is not correctly set to non-zero.
+
+* Simplified syntax for phony task (for older versions of RDoc).
+
+* Stand alone FileList usage gets glob function (without loading in
+ extra dependencies)
+
+=== Bug Fixes (0.9.5)
+
+* --trace and --backtrace no longer swallow following task names.
+
+== What is Rake
+
+Rake is a build tool similar to the make program in many ways. But
+instead of cryptic make recipes, Rake uses standard Ruby code to
+declare tasks and dependencies. You have the full power of a modern
+scripting language built right into your build tool.
+
+== Availability
+
+The easiest way to get and install rake is via RubyGems ...
+
+ gem install rake (you may need root/admin privileges)
+
+Otherwise, you can get it from the more traditional places:
+
+Home Page:: http://github.com/jimweirich/rake
+Download:: http://rubyforge.org/project/showfiles.php?group_id=50
+GitHub:: git://github.com/jimweirich/rake.git
+
+== Thanks
+
+As usual, it was input from users that drove a alot of these changes. The
+following people either contributed patches, made suggestions or made
+otherwise helpful comments. Thanks to ...
+
+* Aaron Patterson
+* Dylan Smith
+* Jo Liss
+* Jonas Pfenniger
+* Kazuki Tsujimoto
+* Michael Bishop
+* Michael Elufimov
+* NAKAMURA Usaku
+* Ryan Davis
+* Sam Grönblom
+* Sam Phippen
+* Sergio Wong
+* Tay Ray Chuan
+* grosser
+* quix
+
+Also, many thanks to Eric Hodel for assisting with getting this release
+out the door.
+
+-- Jim Weirich
diff --git a/doc/rake/release_notes/rake-0.9.6.rdoc b/doc/rake/release_notes/rake-0.9.6.rdoc
new file mode 100644
index 0000000000..e1c5f88ca7
--- /dev/null
+++ b/doc/rake/release_notes/rake-0.9.6.rdoc
@@ -0,0 +1,127 @@
+= Rake 0.9.6 Released
+
+Rake version 0.9.6 contains a number of fixes mainly for merging
+Rake into the Ruby source tree and fixing tests.
+
+== Changes
+
+=== New Features (in 0.9.3)
+
+* Multitask tasks now use a thread pool. Use -j to limit the number of
+ available threads.
+
+* Use -m to turn regular tasks into multitasks (use at your own risk).
+
+* You can now do "Rake.add_rakelib 'dir'" in your Rakefile to
+ programatically add rake task libraries.
+
+* You can specific backtrace suppression patterns (see
+ --supress-backtrace)
+
+* Directory tasks can now take prerequisites and actions
+
+* Use --backtrace to request a full backtrace without the task trace.
+
+* You can say "--backtrace=stdout" and "--trace=stdout" to route trace
+ output to standard output rather than standard error.
+
+* Optional 'phony' target (enable with 'require 'rake/phony'") for
+ special purpose builds.
+
+* Task#clear now clears task comments as well as actions and
+ prerequisites. Task#clear_comment will specifically target comments.
+
+* The --all option will force -T and -D to consider all the tasks,
+ with and without descriptions.
+
+=== Bug Fixes (0.9.3)
+
+* Semi-colons in windows rakefile paths now work.
+
+* Improved Control-C support when invoking multiple test suites.
+
+* egrep method now reads files in text mode (better support for
+ Windows)
+
+* Better deprecation line number reporting.
+
+* The -W option now works with all tasks, whether they have a
+ description or not.
+
+* File globs in rake should not be sorted alphabetically, independent
+ of file system and platform.
+
+* Numerous internal improvements.
+
+* Documentation typos and fixes.
+
+=== Bug Fixes (0.9.4)
+
+* Exit status with failing tests is not correctly set to non-zero.
+
+* Simplified syntax for phony task (for older versions of RDoc).
+
+* Stand alone FileList usage gets glob function (without loading in
+ extra dependencies)
+
+=== Bug Fixes (0.9.5)
+
+* --trace and --backtrace no longer swallow following task names.
+
+=== Bug Fixes (0.9.6)
+
+* Better trace output when using a multi-threaded Rakefile.
+* Arg parsing is now consistent for tasks and multitasks.
+* Skip exit code test in versions of Ruby that don't support it well.
+
+Changes for better integration with the Ruby source tree:
+
+* Fix version literal for Ruby source tree build.
+* Better loading of libraries for testing in Ruby build.
+* Use the ruby version provided by Ruby's tests.
+
+== What is Rake
+
+Rake is a build tool similar to the make program in many ways. But
+instead of cryptic make recipes, Rake uses standard Ruby code to
+declare tasks and dependencies. You have the full power of a modern
+scripting language built right into your build tool.
+
+== Availability
+
+The easiest way to get and install rake is via RubyGems ...
+
+ gem install rake (you may need root/admin privileges)
+
+Otherwise, you can get it from the more traditional places:
+
+Home Page:: http://github.com/jimweirich/rake
+Download:: http://rubyforge.org/project/showfiles.php?group_id=50
+GitHub:: git://github.com/jimweirich/rake.git
+
+== Thanks
+
+As usual, it was input from users that drove a alot of these changes. The
+following people either contributed patches, made suggestions or made
+otherwise helpful comments. Thanks to ...
+
+* Aaron Patterson
+* Dylan Smith
+* Jo Liss
+* Jonas Pfenniger
+* Kazuki Tsujimoto
+* Michael Bishop
+* Michael Elufimov
+* NAKAMURA Usaku
+* Ryan Davis
+* Sam Grönblom
+* Sam Phippen
+* Sergio Wong
+* Tay Ray Chuan
+* grosser
+* quix
+
+Also, many thanks to Eric Hodel for assisting with getting this release
+out the door.
+
+-- Jim Weirich
diff --git a/doc/regexp.rdoc b/doc/re.rdoc
index 3c13b6683f..1c68533a8d 100644
--- a/doc/regexp.rdoc
+++ b/doc/re.rdoc
@@ -16,12 +16,9 @@ example:
If a string contains the pattern it is said to <i>match</i>. A literal
string matches itself.
-Here 'haystack' does not contain the pattern 'needle', so it doesn't match:
-
+ # 'haystack' does not contain the pattern 'needle', so doesn't match.
/needle/.match('haystack') #=> nil
-
-Here 'haystack' contains the pattern 'hay', so it matches:
-
+ # 'haystack' does contain the pattern 'hay', so it matches
/hay/.match('haystack') #=> #<MatchData "hay">
Specifically, <tt>/st/</tt> requires that the string contains the letter
@@ -53,7 +50,7 @@ object. Regexp.last_match is equivalent to <tt>$~</tt>.
=== Regexp#match method
-The #match method returns a MatchData object:
+#match method return a MatchData object :
/st/.match('haystack') #=> #<MatchData "st">
@@ -111,9 +108,7 @@ operator which performs set intersection on its arguments. The two can be
combined as follows:
/[a-w&&[^c-g]z]/ # ([a-w] AND ([^c-g] OR z))
-
-This is equivalent to:
-
+ # This is equivalent to:
/[abh-w]/
The following metacharacters also behave like character classes:
@@ -121,9 +116,7 @@ The following metacharacters also behave like character classes:
* <tt>/./</tt> - Any character except a newline.
* <tt>/./m</tt> - Any character (the +m+ modifier enables multiline mode)
* <tt>/\w/</tt> - A word character (<tt>[a-zA-Z0-9_]</tt>)
-* <tt>/\W/</tt> - A non-word character (<tt>[^a-zA-Z0-9_]</tt>).
- Please take a look at {Bug #4044}[https://bugs.ruby-lang.org/issues/4044] if
- using <tt>/\W/</tt> with the <tt>/i</tt> modifier.
+* <tt>/\W/</tt> - A non-word character (<tt>[^a-zA-Z0-9_]</tt>)
* <tt>/\d/</tt> - A digit character (<tt>[0-9]</tt>)
* <tt>/\D/</tt> - A non-digit character (<tt>[^0-9]</tt>)
* <tt>/\h/</tt> - A hexdigit character (<tt>[0-9a-fA-F]</tt>)
@@ -180,9 +173,8 @@ to occur. Such metacharacters are called <i>quantifiers</i>.
* <tt>{</tt><i>n</i><tt>,</tt><i>m</i><tt>}</tt> - At least <i>n</i> and
at most <i>m</i> times
-At least one uppercase character ('H'), at least one lowercase character
-('e'), two 'l' characters, then one 'o':
-
+ # At least one uppercase character ('H'), at least one lowercase
+ # character ('e'), two 'l' characters, then one 'o'
"Hello".match(/[[:upper:]]+[[:lower:]]+l{2}o/) #=> #<MatchData "Hello">
Repetition is <i>greedy</i> by default: as many occurrences as possible
@@ -191,10 +183,9 @@ contrast, <i>lazy</i> matching makes the minimal amount of matches
necessary for overall success. A greedy metacharacter can be made lazy by
following it with <tt>?</tt>.
-Both patterns below match the string. The first uses a greedy quantifier so
-'.+' matches '<a><b>'; the second uses a lazy quantifier so '.+?' matches
-'<a>':
-
+ # Both patterns below match the string. The first uses a greedy
+ # quantifier so '.+' matches '<a><b>'; the second uses a lazy
+ # quantifier so '.+?' matches '<a>'.
/<.+>/.match("<a><b>") #=> #<MatchData "<a><b>">
/<.+?>/.match("<a><b>") #=> #<MatchData "<a>">
@@ -211,15 +202,12 @@ with <i>n</i>. Within a pattern use the <i>backreference</i>
<tt>\n</tt>; outside of the pattern use
<tt>MatchData[</tt><i>n</i><tt>]</tt>.
-'at' is captured by the first group of parentheses, then referred to later
-with <tt>\1</tt>:
-
+ # 'at' is captured by the first group of parentheses, then referred to
+ # later with \1
/[csh](..) [csh]\1 in/.match("The cat sat in the hat")
#=> #<MatchData "cat sat in" 1:"at">
-
-Regexp#match returns a MatchData object which makes the captured text
-available with its #[] method:
-
+ # Regexp#match returns a MatchData object which makes the captured
+ # text available with its #[] method.
/[csh](..) [csh]\1 in/.match("The cat sat in the hat")[1] #=> 'at'
Capture groups can be referred to by name when defined with the
@@ -251,13 +239,11 @@ also assigned to local variables with corresponding names.
Parentheses also <i>group</i> the terms they enclose, allowing them to be
quantified as one <i>atomic</i> whole.
-The pattern below matches a vowel followed by 2 word characters:
-
+ # The pattern below matches a vowel followed by 2 word characters:
+ # 'aen'
/[aeiou]\w{2}/.match("Caenorhabditis elegans") #=> #<MatchData "aen">
-
-Whereas the following pattern matches a vowel followed by a word character,
-twice, i.e. <tt>[aeiou]\w[aeiou]\w</tt>: 'enor'.
-
+ # Whereas the following pattern matches a vowel followed by a word
+ # character, twice, i.e. <tt>[aeiou]\w[aeiou]\w</tt>: 'enor'.
/([aeiou]\w){2}/.match("Caenorhabditis elegans")
#=> #<MatchData "enor" 1:"or">
@@ -266,16 +252,13 @@ capturing. That is, it combines the terms it contains into an atomic whole
without creating a backreference. This benefits performance at the slight
expense of readability.
-The first group of parentheses captures 'n' and the second 'ti'. The second
-group is referred to later with the backreference <tt>\2</tt>:
-
+ # The group of parentheses captures 'n' and the second 'ti'. The
+ # second group is referred to later with the backreference \2
/I(n)ves(ti)ga\2ons/.match("Investigations")
#=> #<MatchData "Investigations" 1:"n" 2:"ti">
-
-The first group of parentheses is now made non-capturing with '?:', so it
-still matches 'n', but doesn't create the backreference. Thus, the
-backreference <tt>\1</tt> now refers to 'ti'.
-
+ # The first group of parentheses is now made non-capturing with '?:',
+ # so it still matches 'n', but doesn't create the backreference. Thus,
+ # the backreference \1 now refers to 'ti'.
/I(?:n)ves(ti)ga\1ons/.match("Investigations")
#=> #<MatchData "Investigations" 1:"ti">
@@ -290,16 +273,14 @@ way <i>pat</i> is treated as a non-divisible whole. Atomic grouping is
typically used to optimise patterns so as to prevent the regular
expression engine from backtracking needlessly.
-The <tt>"</tt> in the pattern below matches the first character of the string,
-then <tt>.*</tt> matches <i>Quote"</i>. This causes the overall match to fail,
-so the text matched by <tt>.*</tt> is backtracked by one position, which
-leaves the final character of the string available to match <tt>"</tt>
-
+ # The <tt>"</tt> in the pattern below matches the first character of
+ # the string, then <tt>.*</tt> matches <i>Quote"</i>. This causes the
+ # overall match to fail, so the text matched by <tt>.*</tt> is
+ # backtracked by one position, which leaves the final character of the
+ # string available to match <tt>"</tt>
/".*"/.match('"Quote"') #=> #<MatchData "\"Quote\"">
-
-If <tt>.*</tt> is grouped atomically, it refuses to backtrack <i>Quote"</i>,
-even though this means that the overall match fails
-
+ # If <tt>.*</tt> is grouped atomically, it refuses to backtrack
+ # <i>Quote"</i>, even though this means that the overall match fails
/"(?>.*)"/.match('"Quote"') #=> nil
== Subexpression Calls
@@ -309,10 +290,9 @@ subexpression named _name_, which can be a group name or number, again.
This differs from backreferences in that it re-executes the group rather
than simply trying to re-match the same text.
-This pattern matches a <i>(</i> character and assigns it to the <tt>paren</tt>
-group, tries to call that the <tt>paren</tt> sub-expression again but fails,
-then matches a literal <i>)</i>:
-
+ # Matches a <i>(</i> character and assigns it to the <tt>paren</tt>
+ # group, tries to call that the <tt>paren</tt> sub-expression again
+ # but fails, then matches a literal <i>)</i>.
/\A(?<paren>\(\g<paren>*\))*\z/ =~ '()'
@@ -446,17 +426,15 @@ following scripts are supported: <i>Arabic</i>, <i>Armenian</i>,
<i>Tamil</i>, <i>Telugu</i>, <i>Thaana</i>, <i>Thai</i>, <i>Tibetan</i>,
<i>Tifinagh</i>, <i>Ugaritic</i>, <i>Vai</i>, and <i>Yi</i>.
-Unicode codepoint U+06E9 is named "ARABIC PLACE OF SAJDAH" and belongs to the
-Arabic script:
-
+ # Unicode codepoint U+06E9 is named "ARABIC PLACE OF SAJDAH" and
+ # belongs to the Arabic script.
/\p{Arabic}/.match("\u06E9") #=> #<MatchData "\u06E9">
All character properties can be inverted by prefixing their name with a
caret (<tt>^</tt>).
-Letter 'A' is not in the Unicode Ll (Letter; Lowercase) category, so this
-match succeeds:
-
+ # Letter 'A' is not in the Unicode Ll (Letter; Lowercase) category, so
+ # this match succeeds
/\p{^Ll}/.match("A") #=> #<MatchData "A">
== Anchors
@@ -487,30 +465,22 @@ characters, <i>anchoring</i> the match to a specific position.
assertion: ensures that the preceding characters do not match
<i>pat</i>, but doesn't include those characters in the matched text
-If a pattern isn't anchored it can begin at any point in the string:
-
+ # If a pattern isn't anchored it can begin at any point in the string
/real/.match("surrealist") #=> #<MatchData "real">
-
-Anchoring the pattern to the beginning of the string forces the match to start
-there. 'real' doesn't occur at the beginning of the string, so now the match
-fails:
-
+ # Anchoring the pattern to the beginning of the string forces the
+ # match to start there. 'real' doesn't occur at the beginning of the
+ # string, so now the match fails
/\Areal/.match("surrealist") #=> nil
-
-The match below fails because although 'Demand' contains 'and', the pattern
-does not occur at a word boundary.
-
+ # The match below fails because although 'Demand' contains 'and', the
+ pattern does not occur at a word boundary.
/\band/.match("Demand")
-
-Whereas in the following example 'and' has been anchored to a non-word
-boundary so instead of matching the first 'and' it matches from the fourth
-letter of 'demand' instead:
-
+ # Whereas in the following example 'and' has been anchored to a
+ # non-word boundary so instead of matching the first 'and' it matches
+ # from the fourth letter of 'demand' instead
/\Band.+/.match("Supply and demand curve") #=> #<MatchData "and curve">
-
-The pattern below uses positive lookahead and positive lookbehind to match
-text appearing in <b></b> tags without including the tags in the match:
-
+ # The pattern below uses positive lookahead and positive lookbehind to
+ # match text appearing in <b></b> tags without including the tags in the
+ # match
/(?<=<b>)\w+(?=<\/b>)/.match("Fortune favours the <b>bold</b>")
#=> #<MatchData "bold">
@@ -548,8 +518,7 @@ octothorpe (<tt>#</tt>) character introduces a comment until the end of
the line. This allows the components of the pattern to be organised in a
potentially more readable fashion.
-A contrived pattern to match a number with optional decimal places:
-
+ # A contrived pattern to match a number with optional decimal places
float_pat = /\A
[[:digit:]]+ # 1 or more digits before the decimal point
(\. # Decimal point
@@ -608,7 +577,7 @@ Example:
m = /s(\w{2}).*(c)/.match('haystack') #=> #<MatchData "stac" 1:"ta" 2:"c">
$~ #=> #<MatchData "stac" 1:"ta" 2:"c">
- Regexp.last_match #=> #<MatchData "stac" 1:"ta" 2:"c">
+ Regexp.latch_match #=> #<MatchData "stac" 1:"ta" 2:"c">
$& #=> "stac"
# same as m[0]
@@ -642,7 +611,7 @@ The following patterns match instantly as you would expect:
/(b|a)/ =~ s #=> 0
/(b|a+)/ =~ s #=> 0
- /(b|a+)*/ =~ s #=> 0
+ /(b|a+)*\/ =~ s #=> 0
However, the following pattern takes appreciably longer:
@@ -665,9 +634,8 @@ backtracking:
A similar case is typified by the following example, which takes
approximately 60 seconds to execute for me:
-Match a string of 29 <i>a</i>s against a pattern of 29 optional <i>a</i>s
-followed by 29 mandatory <i>a</i>s:
-
+ # Match a string of 29 <i>a</i>s against a pattern of 29 optional
+ # <i>a</i>s followed by 29 mandatory <i>a</i>s.
Regexp.new('a?' * 29 + 'a' * 29) =~ 'a' * 29
The 29 optional <i>a</i>s match the string, but this prevents the 29
diff --git a/doc/rubygems/ChangeLog b/doc/rubygems/ChangeLog
new file mode 100644
index 0000000000..2e67a4c2c5
--- /dev/null
+++ b/doc/rubygems/ChangeLog
@@ -0,0 +1,5689 @@
+# -*- coding: utf-8 -*-
+
+2010-02-20 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems.rb: 1.3.6.
+ * test/*: Windows test fixes
+ * lib/rubygems/remote_fetcher.rb: Fix same file detection on windows.
+
+2010-02-15 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/config_file.rb: Fix use of ConfigFile#api_key= vs
+ #rubygems_api_key=. Patch by Nick Quaranto.
+
+2010-02-12 Eric Hodel <drbrain@segment7.net>
+
+ * Rakefile: RubyGems doesn't depend on previous RubyGems.
+
+2010-02-11 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems.rb: http://rubygems.org is now the default source.
+ * lib/rubygems/dependency.rb: Only warn once about
+ #version_requirement
+
+2010-02-09 Eric Hodel <drbrain@segment7.net>
+
+ * bin/update_rubygems: Use system, exec more correctly, remove
+ useless puts.
+ * lib/rubygems/commands/query_command.rb: List every version when
+ --prerelease --all is given.
+
+2010-02-08 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/commands/dependency_command.rb: Support --prerelease.
+ * lib/rubygems/commands/fetch_command.rb: Support --prerelease.
+ * lib/rubygems/format.rb: Don't crash on empty files. Bug #27292 by
+ Ian Ragsdale.
+ * lib/rubygems/server.rb: Fix markup. Bug #27045 by Eric Young.
+ * History.txt: RubyGems 1.3.6 release notes.
+
+2010-02-07 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/dependency_installer.rb: Allow prerelease gems to
+ depend on non-prerelease gems.
+
+2010-02-06 Eric Hodel <drbrain@segment7.net>
+
+ * test/test_gem_commands_specification_command.rb: Don't enforce YAML
+ format. Patch #27791 by Aaron Patterson.
+ * lib/rubygems/version.rb: Allow captial letters in prerelease
+ versions.
+ * lib/rubygems/config_file.rb: Explain format of ~/.gemrc. Bug
+ #27698 by J Smith.
+ * lib/rubygems/gem_path_searcher.rb: Handle nil require_paths.
+ Patch #27334 by Roger Pack.
+ * lib/rubygems/server.rb: Handle --bind option. Patch #27357 by
+ Bruno Michel.
+ * lib/rubygems/doc_manager: gem rdoc --overwrite to preserve built
+ rdoc. Patch #25982 by Akinori MUSHA.
+ * lib/rubygems/commands/which_command.rb: Fail if no paths were
+ found. Adapted patch #27681 by Caio Chassot.
+ * lib/rubygems/remote_fetcher.rb: Don't copy if the file is where we
+ want it. Patch #27409 by Jakub Šťastný.
+
+2010-02-01 John Barnette <jbarnette@rubygems.org>
+
+ * lib/rubygems/command*: Add 'gem push' and 'gem owner' for
+ interacting with modern/Gemcutter sources [Nick Quaranto]
+
+2010-01-18 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/dependency_list.rb: Ignore development dependencies
+ unless explicitly needed. Bug #27608 by Roger Pack.
+
+2010-01-12 John Barnette <jbarnette@rubygems.org>
+
+ * Rakefile: Don't add development deps when building the
+ rubygems-update gem, it borks older versions when they're updating
+ from a stub index.
+
+2009-12-22 Evan Phoenix <evan@fallingsnow.net>
+
+ * lib/rubygems/spec_fetcher.rb: Don't bother re-Marshaling the spec
+ YAML list.
+
+2009-11-04 John Barnette <jbarnette@rubygems.org>
+
+ * lib/rubygems/timer.rb: Removed. The deprecation sun set in July.
+
+2009-10-14 John Barnette <jbarnette@rubygems.org>
+
+ * lib/rubygems/dependency.rb: Burndown/cleanup. Refactored code
+ and tests. Gem::Dependency.version_requirement(s) is deprecated in
+ favor of Gem::Dependency.requirement.
+
+ * lib/rubygems/requirement.rb: Burndown/cleanup. Refactored code
+ and tests. See test/support/shortcuts.rb for some new test helpers.
+
+2009-10-13 John Barnette <jbarnette@rubygems.org>
+
+ * lib/rubygems/local_remote_options.rb: Make --source additive,
+ not exclusive. If exclusive sources are desired, use
+ --clear-sources first.
+
+2009-09-29 John Barnette <jbarnette@rubyforge.org>
+
+ * lib/rubygems/spec_fetcher.rb: Be slightly more robust when faced
+ with corrupted indexes.
+
+2009-09-03 John Barnette <jbarnette@rubyforge.org>
+
+ * LOTS: Use "raise" consistently, not "fail".
+
+2009-09-01 John Barnette <jbarnette@rubyforge.org>
+
+ * lib/rubygems/version.rb: Gem::Version immutability
+ burndown. Changed canonical internal representation to an
+ Array. Refactored significant amounts of the internals for
+ clarity. Breaking change: Gem::Version::Requirement is no longer
+ available, use Gem::Requirement instead. Breaking change: custom
+ YAML marshaling is gone. Credit to Yehuda Katz for certain bits of
+ a related patch.
+ * test/test_gem_dependency.rb: Moved a bunch of tests over from
+ test_gem_version.rb. Work in progress.
+ * test/test_gem_specification.rb: Removed a failing YAML
+ test. Many more will be going away shortly.
+ * test/test_gem_version.rb: Significant refactoring for
+ maintainability and clarity. Moved a ton of poorly-placed tests to
+ test_gem_dependency.rb for future refactoring.
+
+2009-08-19 Ryan Davis <ryand-ruby@zenspider.com>
+
+ * lib/rubygems.rb: Cleanup of rdoc and file layout.
+ * lib/rubygems/versions.rb: Added Version#spermy_recommendation
+ and fixed bug in Version::Part#inspect. General cleanup.
+
+2009-07-29 John Barnette <jbarnette@rubyforge.org>
+
+ * lib/rubygems/package/tar_input.rb: Add Maglev to the list of
+ implementations with working Zlib. Bug #26790 by Peter McLain.
+
+2009-07-21 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems.rb: 1.3.5.
+ * lib/rubygems/package.rb: Remove dangling digest require. Reported
+ by Jeremy Kemper.
+
+2009-06-25 Eric Hodel <drbrain@segment7.net>
+
+ * release_notes/: Merged into History.txt for Hoe.
+ * lib/rubygems/commands/setup_command.rb: Streamlined install text.
+
+2009-06-23 Eric Hodel <drbrain@segment7.net>
+
+ * release_notes/rel_1_3_5.rdoc: RubyGems 1.3.5 release notes.
+ * lib/rubygems/builder.rb: Only print out with verbose.
+ * lib/rubygems/package_task.rb: Only print out with -t.
+
+2009-06-12 Ryan Davis <ryand@zenspider.com>
+
+ * Rakefile: Switched to Hoe.
+
+2009-06-10 Phil Hagelberg <technomancy@gmail.com>
+
+ * lib/rubygems/installer.rb: --user-install is no longer enabled by
+ default.
+ * lib/rubygems/source_index.rb: Fix use of prerelease gems.
+
+2009-06-04 Eric Hodel <drbrain@segment7.net>
+
+ * util/gem_prelude.rb.template: Backports from 1.9.
+
+2009-06-03 Eric Hodel <drbrain@segment7.net>
+
+ * bin/gem: Support 1.8.6+
+ * lib/rubygems/digest*: Removed, support dropped for Ruby < 1.8.6
+ * lib/rubygems/installer.rb: Support env(1) in wrong path, use
+ /bin/sh if shebang has options. By Nobu, ruby trunk r22853.
+ * lib/rubygems/config_file.rb: Switch to stdcall for appdata folder.
+ [ruby-core:22601].
+ * lib/rubygems.rb: Use only File::expand_path on 1.9 for home dir.
+ Don't recklessly create directories. Simplify RbConfig::datadir
+ definition.
+
+2009-05-30 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/commands/which_command.rb: Only print out directory
+ information to a TTY.
+ * lib/rubygems/rubygems_version.rb: 1.3.4.
+ * doc/release_notes/rel_1_3_4.rdoc: RubyGems 1.3.4 release notes.
+
+2009-05-28 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/commands/setup_command.rb: Fix --format-executable
+ option name.
+ * lib/rubygems/requirement.rb: Fix typo in #parse. Bug #26000 by
+ Mike Gunderloy.
+
+2009-05-21 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems.rb: Add 'dev' and svn revision for -1 RUBY_PATCHLEVEL
+ and RUBY_REVISION.
+
+2009-05-20 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/defaults.rb: Restore 1.9.1 path behavior.
+ * lib/rubygems/specification.rb: Fix undefined ivar warning.
+ * lib/rubygems/indexer.rb: Force loading of builder gem.
+ * test/gemutilities.rb: Remove gem_prelude code by hand to avoid 1.9
+ warnings.
+
+2009-05-19 Luis Lavena <luislavena@gmail.com>
+
+ * test/test_gem_specification.rb: skip symlinks tests on Windows.
+ * test/test_gem_commands_install_command.rb: skip chmod test on
+ Windows.
+
+2009-05-15 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems*: Fix 1.9 warnings about circular require.
+
+2009-05-12 Daniel Berger <djberg96@gmail.com>
+
+ * lib/rubygems/remote_fetcher.rb: Fixed the download method in the
+ remote_fetcher.rb file so that it handles local installs on MS
+ Windows when using explicit paths that aren't on the 'C:' drive.
+ Bug #25882 by Lars Christensen.
+ * lib/rubygems/commands/update_command.rb: Replaced deprecated
+ Gem::SourceIndex method 'search' with 'find_name' in the 'execute'
+ method.
+
+2009-05-07 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/commands/query_command.rb: Support prerelease version
+ listing (--prerelease), list locally installed prereleases.
+ * lib/rubygems/source_info_cache.rb: Gem::SourceInfoCache is
+ officially unsupported, maintaining its tests is hard.
+ * lib/rubygems/source_index.rb: Add #all_gems, fix #remove_spec,
+ #search to work with it. Prerelease gems can now be used.
+
+2009-05-04 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/rubygems_version.rb: 1.3.3.
+ * doc/release_notes/rel_1_3_3.rdoc: RubyGems 1.3.3 release notes.
+ * lib/rubygems/specification.rb: Default has_rdoc to true, ignore
+ its value.
+ * lib/rubygems/doc_manager.rb: Always generate RDoc regardless of
+ #has_rdoc?
+ * lib/rubygems.rb: Raise Gem::LoadError if Kernel#gem fails due to
+ previously-loaded gem. Bug reported by Alf Mikula.
+
+2009-05-02 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/commands/server_command.rb: Allow port names with
+ --port.
+ * lib/rubygems/requirement.rb: Match prerelease versions and ~>
+ correctly. Patch #25759 by Yossef Mendelssohn.
+
+2009-05-01 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/specification.rb: Check bindir for executables, not
+ root. Bug reported by David Chelimsky. Remove Time.today, no way
+ to override it before RubyGems loads. Bug #25564 by Emanuele
+ Vicentini. Raise Gem::Exception for #installation_path when not
+ installed. Bug #25741 by Daniel Berger. Don't error in #validate
+ when homepage is nil. Bug #25677 by Mike Burrows.
+ * lib/rubygems/commands/cleanup_command.rb: Clean up --user-install
+ gems. Bug #25516 by Brett Eisenberg.
+ * lib/rubygems/uninstaller.rb: Uninstall executables from the correct
+ directory. Bug #25555 by Brett Eisenberg.
+ * lib/rubygems/server.rb: Add search that jumps to RDoc. Patch
+ #22959 by Vladimir Dobriakov.
+
+2009-05-01 James Tucker <jftucker@gmail.com>
+
+ * lib/rubygems.rb: Gem.bin_path now escapes paths with spaces.
+
+2009-04-30 Daniel Berger <djberg96@gmail.com>
+
+ * lib/rubygems/commands/install_command.rb: Replaced deprecated
+ Gem::SourceIndex method 'search' with 'find_name' when using
+ the -t option. Fixes bug # 25632 by Daniel Berger.
+
+2009-04-30 James Tucker <jftucker@gmail.com>
+
+ * lib/rubygems/ext/rake_builder.rb: Use explicit ruby command loading
+ rubygems to invoke rake.
+
+2009-04-24 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/commands/specification_command.rb: Added requesting
+ single fields from a spec.
+
+2009-04-23 James Tucker <jftucker@gmail.com>
+
+ * lib/rubygems/ext/configure_builder.rb: Support Gem::Command.build_args.
+
+2009-04-15 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/rubygems_version.rb: 1.3.2.
+
+2009-04-14 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/specification.rb: Complain when summary and
+ description are identical.
+
+2009-04-08 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/specification.rb: Strip directories, complain for
+ non-files in #validate.
+
+2009-04-07 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/specification.rb: Implement #initialize_copy.
+ * lib/rubygems/commands/contents_command.rb: Add --no-prefix and
+ --all.
+
+2009-04-06 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/defaults.rb: Don't allow gem to overwrite ruby on
+ install. Fixes bug #24958 by Michael Soulier.
+ * doc/release_notes/rel_1_3_2.rdoc: Preliminary 1.3.2 release notes.
+ * Rakefile: Trim off some stale code, switch to Manifest.txt, one
+ step closer to Hoe!
+
+2009-04-06 Daniel Berger <djberg96@gmail.com>
+
+ * test/test_gem_ext_configure_builder.rb: Better handling for MS
+ Windows.
+ * test/gemutilities.rb: Added the make_command and vc_windows? helper
+ methods.
+
+2009-04-03 Eric Hodel <drbrain@segment7.net>
+
+ * lib/: RDoc improvements.
+
+2009-04-02 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/commands/setup_command.rb: Fix --destdir. Patch
+ #24970 by Richard Brown.
+
+2009-04-02 Phil Hagelberg <technomancy@gmail.com>
+
+ * lib/rubygems/version.rb: Documentation of prerelease
+ versions. See http://technomancy.us/123 for details.
+
+2009-03-31 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/spec_fetcher.rb: If the cached specs file won't load,
+ refetch. Bug #24961 by Dylan Stamat.
+ * lib/rubygems/defaults.rb: Add a sanity check to
+ Gem.default_exec_format. Workaround for bug #24958 by Michael
+ Soulier.
+ * lib/rubygems/commands/setup_command.rb: Fix confusion with option
+ names. Patch #24971 by Richard Brown.
+ * lib/rubygems/specification.rb: Make #validate complain about
+ not-files.
+ * lib/gauntlet_rubygems.rb: For verification of the validator.
+
+2009-03-27 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems.rb: RubyGems now loads plugins from rubygems_plugin.rb
+ in installed gems. This can be used to add commands (See
+ Gem::CommandManager) or add install/uninstall hooks (See
+ Gem::Installer and Gem::Uninstaller).
+ * setup.rb: Ensure we're in a RubyGems dir when installing.
+
+2009-03-26 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/package_task.rb: Import from Rake's
+ rake/gempackagetask.rb
+ * Rakefile: Switched to RDoc::Task from RDoc 2.4.2.
+ * lib/rubygems.rb: Gem.find_files now returns paths in $LOAD_PATH.
+ * lib/rubygems/commands/sources_command.rb: Allow sources to be added
+ behind proxies. Bug #24785 by Elia Schito.
+
+2009-03-25 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/commands/install_command.rb: Fix typo. Patch #24446
+ by Luis Parravicini.
+ * lib/rubygems/version.rb: Handle non-String versions by calling
+ #to_s. Patch #24392 by Stephen Bannasch.
+
+2009-03-22 Daniel Berger <djberg96@gmail.com>
+
+ * lib/rubygems/remote_fetcher.rb: Always escape URI's to deal with spaces
+ and such, regardless of platform.
+ * lib/rubygesm/validator.rb: Use the test-unit gem if installed.
+ Part of the fix for RF #24261 by Daniel Berger
+ * lib/rubygems/commands/install_command.rb: Explictly require
+ rubygems/uninstaller.rb if the user wants to bail because of failed
+ tests.
+ Part of the fix for RF #24261 by Daniel Berger
+
+2009-03-17 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/commands/query_command.rb: Make `gem unpack` work with
+ more than one gem name, fix warning about installation location.
+
+2009-03-16 James Tucker <jftucker@gmail.com>
+
+ * lib/rubygems.rb: Deprecate ConfigMap[:RUBY_INSTALL_NAME]
+ * lib/rubygems/defaults.rb: Gem.default_exec_format to use
+ ConfigMap[:ruby_install_name].
+ Fixes Bug #24457
+ * util/gem_prelude.rb.template: Fix potential bug in
+ Gem.default_exec_format when ConfigMap[:BASERUBY] is not 'ruby'.
+
+2009-03-14 Luis Lavena <luislavena@gmail.com>
+
+ * lib/rubygems/installer.rb: Cleanup quotes on Windows stub scripts.
+ Fixes Bug #24039.
+ * lib/rubygems/commands/setup_command.rb: ditto.
+
+2008-03-13 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/commands/uninstall_command.rb: Add --user-install to
+ allow uninstallation from ~/.gem. Bug #23760 by Roger Pack.
+ * lib/rubygems/uninstaller.rb: Automatically uninstall from
+ Gem.user_dir.
+ * lib/rubygems/commands/update_command.rb: Rescue InstallError
+ and continue. Bug #19268 by Gabriel Wilkins.
+ * lib/rubygems/doc_manager.rb: Remove some options from the args list
+ that RDoc no longer supports.
+
+2008-03-12 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/specification.rb: #description no longer removes
+ newlines.
+ * lib/rubygems/indexer.rb: Wrap description in a pre and force-wrap
+ lines to 78 characters for prettier display.
+ * lib/rubygems/commands/setup_command.rb: Clarify RubyGems RDoc
+ installation location. Bug #22656 by Gian Marco Gherardi.
+
+2008-03-09 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/commands/query_command.rb: Add platforms to gem list
+ -d.
+ * lib/rubygems/commands/setup_command.rb: Allow setup to run from
+ read-only location. Patch #21862 by Luis Herrera.
+ * lib/rubygems/package/tar_input.rb: Use real File methods. Bug
+ #23966 by Mike Furr.
+ * lib/rubygems.rb: Don't add PATCHLEVEL if it's -1. Patch #24048 by
+ Jeremy Kemper.
+ * lib/rubygems/package/tar_input.rb: Choose security policy
+ correctly. Bug #24001 by Mike Furr.
+ * lib/rubygems/remote_fetcher.rb: Handle local paths with spaces.
+ Bug #24169 by Ryan Davis.
+ * lib/rubygems/specification.rb: Removed Gem::Specification::list,
+ causes leaks. Bug #23668 by Steve Purcell.
+
+2008-03-07 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/installer.rb: Use Gem::bin_path in executable stubs to
+ work around Kernel#load bug.
+ * lib/rubygems/commands/install_command.rb: Copy user_install down to
+ Gem::DependencyInstaller. Patch #23573 by Alf Mikula.
+ * lib/rubygems/command.rb: Add info on gem server directly to `gem
+ help`. Patch #22271 by Hugh Sasse.
+
+2008-03-06 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/specification.rb: Don't allow FIXME in specs.
+ * lib/rubygems/commands/spec_command.rb: Add --ruby and --marshal
+ formats.
+ * lib/rubygems.rb: Add Gem::bin_path. Patch #24114 by James Tucker.
+
+2008-03-04 Eric Hodel <drbrain@segment7.net>
+
+ * setup.rb: Moved guts to lib/rubygems/commands/setup_command.rb.
+ * lib/rubygems/indexer.rb: Added RSS feed generation on full index
+ update.
+
+2008-03-04 Phil Hagelberg <technomancy@gmail.com>
+
+ * lib/*: Prerelease gems go into their own index now and are excluded
+ from other indices. InstallCommand only gets prereleases if explicitly
+ requested. Thanks to Alex Vollmer.
+
+2008-03-04 Eric Hodel <drbrain@segment7.net>
+
+ * lib/*: Add lots of pretty pretty_print stuff!
+
+2008-02-25 Ryan Davis <ryand@zenspider.com>
+
+ * lib/rubygems/commands/check_command.rb: Fix various usability
+ issues.
+
+2009-02-10 Daniel Berger <djberg96@gmail.com>
+ * lib/rubygems/specification: Refactored and fixed the installation_path
+ method. It was overwrought and it now no longer uses File::SEPARATOR
+ explicitly.
+ [RubyForge: bug #23879 by Daniel Berger]
+
+2009-02-10 Daniel Berger <djberg96@gmail.com>
+ * lib/rubygems/validator.rb: The Gem::Validator#verify_gem_file method
+ now explicitly rescues Errno::EINVAL as well as Errno::ENOENT because
+ MS Windows raises a different SystemCallError for empty paths.
+
+2009-01-21 Daniel Berger <djberg96@gmail.com>
+ * lib/rubygems/remote_fetcher.rb: Split out nil and file handling in
+ the download method. Modified file URI handling to work properly.
+ [RubyForge: bug #16495 by Paul Sadauskas]
+
+2009-01-19 Daniel Berger <djberg96@gmail.com>
+ * lib/rubygems/remote_fetcher.rb: Added uri scheme validation back
+ into the open_uri_or_path method, though it now accepts 'https' and
+ 'file' as well.
+ * test/test_gem_remote_fetcher.rb: Updated the test_fetch_size_bad_uri
+ to reflect the updated error message.
+
+2009-01-15 Daniel Berger <djberg96@gmail.com>
+ * lib/rubygems/remote_fetcher.rb: Removed the open_file_uri_path method
+ since the URI#path method already does the same thing, and changed
+ the file_uri? method so that it explicitly calls .to_s.
+ * lib/rubygems/local_remote_options.rb: Allow file urls.
+
+2009-01-15 Daniel Berger <djberg96@gmail.com>
+ * lib/rubygems/commands/generate_index_command.rb: Fixed a typo in
+ the description.
+ * test/test_gem_doc_manager.rb: The test_uninstall_doc_unwritable
+ test is now skipped on Windows.
+ * test/test_gem_install_update_options.rb: The
+ test_user_install_disabled_read_only test is now skipped on Windows.
+ * test/test_gem_installer.rb: The test_generate_bin_symlink_no_perms
+ and test_generate_bin_script_no_perms tests are now skipped on Windows.
+
+2009-01-14 Daniel Berger <djberg96@gmail.com>
+ * lib/rubygems/specification.rb: Added support for a license attribute.
+ [RubyForge: feature #11041 (partial) by Kevin Williams]
+ * lib/rubygems/commands/query_command.rb: Gem detail information now
+ includes license information.
+ * test/test_gem_specification.rb: Added tests for the license attribute.
+
+2009-01-05 Chad Woolley <thewoolleyman@gmail.com>
+
+ * move processing of build args out of gem binary so they are handled correctly via API usage.
+ * lib/rubygems/command.rb: Add class accessor for build_args.
+ * lib/rubygems/ext/rake_builder.rb: Use Gem::Command.build_args instead of ARGV.
+ * lib/rubygems/ext/ext_conf_builder.rb: Use Gem::Command.build_args instead of ARGV.
+ * lib/rubygems/gem_runner.rb: Move build arg processing from gem binary.
+ * lib/rubygems/commands/contents_command.rb: Use nonzero return code (required to make tests pass).
+ * bin/gem: Move build arg processing to gem_runner.rb.
+ [RubyForge: bug #23210]
+
+ * lib/rubygems/config_file.rb: Fix --config-file option with no
+ equals and subsequent options to properly assign config file.
+ Previously config file was overwritten by subsequent option.
+ Fixes bug #16688.
+
+2009-1-4 Daniel Berger <djberg96@gmail.com>
+ * lib/rubygems/installer.rb: Remove existing path if it already
+ exists before installing.
+ [RubyForge: patch #22837 by Eric Wong]
+ * lib/rubygems.rb: Minor modification to the location_of_caller
+ method - deal with possible characters after line number
+
+2009-1-3 Daniel Berger <djberg96@gmail.com>
+ * lib/rubygems.rb: Better activation error message.
+ [RubyForge: patch #23082 by Tim Carey-Smith]
+
+2009-1-2 Daniel Berger <djberg96@gmail.com>
+ * lib/rubygems/ext/rake_builder.rb: Quote path if it contains spaces
+ [RubyForge: patch #23003 by Charlie Savage]
+ * lib/rubygems/local_remote_options.rb: Ignore duplicate sources
+ [RubyForge: bug #22277 by Elliot Temple]
+ * lib/rubygems/remote_fetcher.rb: Automatically normalize the URI
+ [RubyForge: bug #22151 by Alex Legler]
+ * lib/rubygems/specification.rb: Ensure that specification_version is
+ a Fixnum [RubyForge: bug #22598 by Tsutomu Kuroda]
+ * lib/rubygems/specification.rb: Bumped the CURRENT_SPECIFICATION_VERSION
+ and added an entry to the SPECIFICATION_VERSION_HISTORY
+
+2009-1-1 Daniel Berger <djberg96@gmail.com>
+
+ * test/test_gem_dependency.rb: Removed a duplicate "def dep" that
+ was causing a warning.
+ * lib/rubygems/platform.rb: Added an empty? method in order to
+ better handle gem indexing when dealing with gems created
+ prior to 0.9.5. [Rubyforge: bug #22603 by Johnathan Conley]
+ * lib/rubygems.rb: Added an explicit 'require "etc"'.
+ [RubyForge: bug #22313 by Matthew Boedicker]
+
+2008-12-31 Daniel Berger <djberg96@gmail.com>
+
+ * lib/rubygems/local_remote_options: Allow 'https' as a valid scheme
+ in addition to 'http' [RubyForge: patch #22485 by Duarte Henriques]
+ * setup.rb: Deal with extraneous quotation mark when autogenerating
+ .bat file on MS Windows [RubyForge: bug #22712 Takayuki Ishikawa]
+ * lib/rubygems/commands/unpack_command.rb: Fixed the --target option
+ [RubyForge: patch #22532 by Bryan Ash]
+
+2008-12-30 Daniel Berger <djberg96@gmail.com>
+
+ * lib/rubygems/builder.rb: Don't allow .gem file to be added back
+ onto itself [RubyForge: bug #19136, patch #23346 by Daniel Berger]
+ * lib/rubygems/defaults.rb: The default_path now only returns the
+ default_dir if the Gem.user_home doesn't exist
+ [RubyForge: bug #23037 by Pierre PLR]
+ * lib/rubygems.rb: Handle the possibility that Etc.getpwuid might
+ return nil on platforms other than Windows
+ [RubyForge: bug #22764 by Dudley Flanders]
+
+2008-12-16 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/doc_manager.rb: Set title for generated documentation.
+ * lib/rubygems/dependency.rb: Make #=~ work with Gem::Specification.
+
+2008-12-15 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/installer.rb: Fix documentation for
+ Gem::Installer#write_spec. Issue by okkez.
+
+2008-12-12 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/local_remote_options.rb: Merge documentation fix by
+ okkez [ruby-dev:37271].
+ * lib/rubygems/source_info_cache_entry.rb: Merge documentation fix
+ from [ruby-dev:37255].
+
+2008-12-08 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems.rb: Add Gem::promote_load_path
+
+2008-12-01 Ryan Davis <ryand-ruby@zenspider.com>
+
+ * lib/rubygems/remote_fetcher.rb: made threadsafe.
+
+2008-11-25 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/commands/install_command.rb: Don't do any post-install
+ stuff if no gems were installed. Issue by Daniel Berger.
+
+2008-11-20 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/source_index.rb: Read the file outside the exception
+ block so we raise a sane error.
+ * lib/rubygems/indexer.rb: Allow the modern index to be updated
+ incrementally. Allow the legacy and modern indicies to be updated
+ separately.
+
+2008-11-17 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/indexer.rb: Added ability to only generate modern or
+ legacy indicies.
+
+2008-11-14 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/timer.rb: Deprecate and move methods to Gem and
+ Gem::StreamUI.
+
+2008-11-11 Phil Hagelberg <technomancy@gmail.com>
+
+ * lib/rubygems/, test/: Make Version understand prerelease
+ versions using letters. (eg. '1.2.1.b') Thanks to Josh Susser and
+ Alex Vollmer.
+
+2008-11-03 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/specification.rb: Gem name must be a String.
+
+2008-10-31 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/defaults.rb: Update to support 1.9 libdir.
+ * util/gem_prelude.rb: Move to .template, automatically fold in
+ defaults.
+
+2008-10-29 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems.rb: Handle nonexistent home directory. Bug #22229 by
+ Alexey Verkhovsky.
+
+2008-10-25 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems.rb, lib/rubygems/custom_require.rb: Make kernel
+ methods private. Patch #20801 by James M. Lawrence. Expose
+ our kernel extensions to RDoc. Make Gem::location_of_caller behave on
+ Windows. Patch by Daniel Berger.
+ * doc/release_notes/rel_1_3_1.rdoc: Final release notes for 1.3.1.
+ * lib/rubygems/rubygems_version.rb: 1.3.1.
+
+2008-10-10 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/commands/unpack_command.rb: Silence PATH warning.
+
+2008-10-09 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems.rb: Fix requires for inflate, deflate, etc.
+ * test/*: Convert to minitest/unit.
+ * lib/rubygems/validator.rb: Fix for MiniTest instead of test/unit
+ classic in 1.9.
+
+2008-10-03 Phil Hagelberg <technomancy@gmail.com>
+
+ * lib/rubygems.rb: Make Gem.dir respect :gemhome value from config.
+ * lib/rubygems/config_file.rb: Expose :gemhome value.
+
+2008-09-26 Luis Lavena <luislavena@gmail.com>
+
+ * lib/rubygems.rb: Disregard ownership of ~ under Windows while
+ creating ~/.gem. Fixes issues related to no uid support under
+ Windows.
+
+2008-09-24 Eric Hodel <drbrain@segment7.net>
+
+ * doc/release_notes/rel_1_3_0.rdoc: Final release notes for 1.3.0.
+ * lib/rubygems/rubygems_version.rb: 1.3.0.
+ * lib/rubygems/builder.rb: Examine process status correctly. Patch
+ by Nobu.
+ * test/test_gem_ext_rake_builder.rb: Override Gem.ruby and
+ ENV['rake'] for 1.9 integration. Patch by Nobu.
+
+2008-09-16 Phil Hagelberg <technomancy@gmail.com>
+
+ * lib/rubygems.rb: Use the path set in the config file if
+ applicable.
+ * lib/rubygems/config_file.rb: Expose the path.
+
+2008-09-16 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems.rb: Only create ~/.gem by user owning ~. Bug #21561
+ by Neil Wilson.
+
+2008-09-15 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/source_index.rb: Autoload SpecFetcher to improve load
+ time. Patch #21577 by Simon Chiang.
+ * lib/rubygems/commands/lock_command.rb: Modernize. Fix --strict.
+ Patch #21814 by Sven Engelhardt.
+ * lib/rubygems/platform.rb: Fix for solaris platform. Patch #21911
+ by Bob Remeika.
+
+2008-09-10 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/commands/install_command.rb: Describe _version_ in `gem
+ help install`.
+ * lib/rubygems/commands/environment_command.rb: Describe environment
+ variables and gemrc in `gem help env`.
+ * lib/rubygems.rb: Warn when executing Gem::manage_gems.
+ * lib/rubygems/doc_manager.rb: Have RubyGems update the ri cache.
+ * lib/rubygems/source_index.rb: Ensure specs are read as UTF-8.
+ * lib/rubygems/specification.rb: Add magic comment to .gemspec files
+ so they are read in as UTF-8.
+
+2008-08-22 Luis Lavena <luislavena@gmail.com>
+
+ * lib/rubygems.rb: Corrected usage of HOMEDRIVE and HOMEPATH on Windows.
+ Escape Gem.ruby if spaces in the path are present. Solves bug related to
+ extensions compile process.
+ * test/test_gem.rb: Added test to verify both conditions.
+
+2008-08-17 Eric Hodel <drbrain@segment7.net>
+
+ * doc/release_notes/rel_1_3_0.rdoc: Initial release notes for 1.3.0.
+ * util/CL2notes: Release note creation helper script.
+
+2008-08-16 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/local_remote_options.rb: Added #both? to complement
+ #local? and #remote?.
+ * lib/rubygems/commands/query_command.rb: Print out LOCAL/REMOTE with
+ --both, even without a TTY.
+ * lib/rubygems.rb: Add Gem.find_files, allows a gem to discover
+ features provided by other gems.
+
+2008-08-14 Wilson Bilkovich <wilson@supremetyrant.com>
+
+ * lib/rubygems/source_index.rb: Deprecate options to 'search' other than
+ Gem::Dependency instances and issue warning until November 2008.
+ * lib/rubygems/platform.rb: Remove deprecated constant warnings
+ and really deprecate them.
+ * Rakefile: If the SETUP_OPTIONS environment variable is set, pass its
+ contents as arguments to setup.rb
+ * test/test_gem_commands_uninstall_command.rb: Added
+
+2008-08-13 Wilson Bilkovich <wilson@supremetyrant.com>
+
+ * lib/rubygems/uninstaller.rb: Fix binary script uninstallation.
+ Bug #21234 by Neil Wilson.
+ * test/test_gem_commands_uninstall_command.rb: Added
+
+2008-08-12 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/installer.rb: Try to create directory before diverting
+ to ~/.gems.
+ * lib/rubygems/uninstaller.rb: Fix uninstallation with -i. Bug
+ #20812 by John Clayton. Have #remove_all call #uninstall_gem so hooks
+ get called. Bug #21242 by Neil Wilson.
+ * lib/rubygems/commands/update_command.rb: Fix updating RubyGems when
+ no previous rubygems-update is installed. Bug #20775 by Hemant Kumar.
+
+2008-08-11 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/remote_fetcher.rb: Fix HTTPS support. Patch #21072 by
+ Alex Arnell. Fix Not Modified handling. Bug #21310 by Gordon
+ Thiesfeld.
+
+2008-07-11 Luis Lavena <luislavena@gmail.com>
+
+ * setup.rb: Properly build --destdir folder structure using Pathname.
+ * test/mockgemui.rb: Fix warnings about instance variables in a module.
+
+2008-07-02 Phil Hagelberg <technomancy@gmail.com>
+
+ * lib/rubygems/defaults.rb: Add Gem.user_dir to use paths like
+ ~/.gem/ruby/1.8/gems and the like instead of just ~/.gem. Update
+ remote fetcher and installer to use it.
+
+2008-07-01 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/installer.rb: Add #gem_home, #bin_dir for hooks. Use
+ DependencyInstaller's source_index so reinstallation via -i does not
+ fail.
+ * lib/rubygems/uninstaller.rb: Add #gem_home, #bin_dir for hooks.
+ * lib/rubygems/commands/query_command.rb: Don't print LOCAL/REMOTE
+ gems if stdout is not a TTY.
+ * lib/rubygems/commands/query_command.rb: Use the regexp we already
+ have for `gem list --installed`. Bug #20876 by Nick Hoffman.
+ * lib/rubygems/commands/which_command.rb: Clarify what `gem which` is
+ for.
+
+2008-06-30 Eric Hodel <drbrain@segment7.net>
+
+ * test/test_ext_configure_builder.rb: Locale-free patch by Yusuke
+ Endoh [ruby-core:17444].
+ * lib/rubygems.rb: Add pre/post (un)install hooks.
+ * lib/rubygems/installer.rb: Call pre/post install hooks as
+ appropriate.
+ * lib/rubygems/uninstaller.rb: Call pre/post uninstall hooks as
+ appropriate. Minor refactoring of #uninstall.
+ * lib/rubygems/package/tar_reader.rb: Some OSs raise EINVAL on seek.
+ Based on patch in bug #20791 by Neil Wilson.
+ * lib/rubygems/specification.rb: Correctly check for support of
+ development dependencies for #to_ruby. Bug #20778 by Evan Weaver.
+ * lib/rubygems/spec_fetcher.rb: Correctly load all cache file even if
+ latest has been loaded. Bug #20776 by Uwe Kubosch.
+
+2008-06-25 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/config_file.rb: Add Gem::ConfigFile constants for
+ packagers and implementors to override defaults.
+ * test/*: Fixes to run tests when under test/rubygems/. Patch by
+ Yusuke ENDOH [ruby-core:17353].
+
+2008-06-24 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/remote_fetcher.rb: Cleanup to support
+ if-modified-since requests. pair: Ryan Davis
+ * lib/rubygems/indexer: Force platform to Gem::Platform::RUBY when
+ nil or blank. Fixes various uninstallable gems.
+
+2008-06-24 Phil Hagelberg <technomancy@gmail.com>
+
+ * lib/rubygems/installer.rb: Fall back on ~/.gem if GEM_HOME is
+ not writable.
+ * lib/rubygems/install_update_options.rb: Allow --user-install or
+ --no-user-install command-line switch to explicitly force whether
+ or not ~/.gem should be used.
+ * lib/rubygems/remote_fetcher.rb: Use ~/.gem/cache if cache dir is
+ not writable.
+ * test/gemutilities.rb: Use MockGemUi for all tests.
+
+2008-06-21 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/specification.rb: Load specifications from the future.
+ Roll back specification version change.
+ * lib/rubygems/remote_fetcher.rb: Reset connection when an HTTP
+ server misbehaves.
+ * setup.rb: Fix --destdir for windows.
+ * doc/release_notes/rel_1_2_0.rdoc: Bugs in RubyGems were
+ unintentionally added, order bug fixes by importance.
+ * lib/rubygems/rubygems_version.rb: 1.2.0.
+
+2008-06-20 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/uninstaller.rb: Improve output when a gem to uninstall
+ isn't found. Bug #20746 reported by Chad Wooley.
+ * setup.rb: Fix rdoc installation with --destdir. Patch #20739 by
+ Matthew Kent.
+ * lib/rubygems/commands/install_command.rb: Don't reset GEM_PATH when
+ installing. Fixes Bug #20746 by Chad Wooley.
+
+2008-06-20 Luis Lavena <luislavena@gmail.com>
+
+ * setup.rb: Only prepend install_destdir when especified. Fixes
+ installation issues related to Windows paths (/C:/...)
+
+2008-06-19 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/dependency_installer.rb: Ensure that the entire
+ dependency chain is installed. Fixes bug reported by Chad Woolley.
+
+2008-06-18 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/commands/dependency_command.rb: Restore matching
+ everything when no name is specified, regexp matching. Fixes bug
+ #20716, bug #20717 by Chad Woolley.
+
+2008-06-18 Chad Woolley <thewoolleyman@gmail.com>
+
+ * lib/rubygems/config_file.rb: Fix --config-file option with no
+ equals and subsequent options to properly assign config file.
+ Previously config file was overwritten by subsequent option.
+ Fixes bug #16688.
+
+2008-06-17 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/version.rb: Gem::Version #hash and #eql? now operate
+ on the version string, terms of the version string, so "1" and "1.0"
+ no longer correspond to the same slot. Fixes indexer bug reported by
+ Chad Woolley.
+ * setup.rb: Fix --format-executable. Patch #20698 by Richard Brown.
+ * util/gem_prelude.rb: Prevent infinite recursion, check for Gem now.
+ Patch from ruby trunk by nobu.
+ * lib/*: Spelling cleanup. Patch from trunk by Evan Farrar.
+ * test/*: Fixes for win32 test failures reported by Luis Lavena.
+ * util/gem_prelude.rb: Only remove methods added by gem_prelude.rb.
+
+2008-06-16 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/indexer.rb: Fix quick_index generation.
+ * lib/rubygems/specification.rb: Correctly guard new spec features
+ for older RubyGems.
+ * lib/rubygems/config_file.rb: Add system-wide config file
+ (/etc/gemrc). Patch #14723 by Phil Hagelberg. Add windows code to
+ use appropriate directory. Code by Daniel Berger.
+ * doc/release_notes/rel_1_2_0.rdoc: Draft of 1.2.0 release notes.
+
+2008-06-15 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/server.rb: Store off if we are returning Marshal
+ format before running =~ again. Fixes bug reported by Chad Woolley.
+ * lib/rubygems/commands/stale_command.rb: `gem stale` lists gems by
+ last access time. Patch #20593 by Aaron Patterson.
+ * lib/rubygems/setup.rb: Add --vendor and --destdir to setup.rb for
+ packagers. Patch #20610 by Richard Brown. Don't look for stub
+ files to remove any more.
+ * lib/rubygems/specification.rb: Bump specification version and be
+ backwards compatible with type 2 specs.
+ * lib/rubygems/commands/query_command.rb: Add installed location to
+ details for installed gems.
+
+2008-06-09 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/dependency_installer.rb: Only install all dependencies
+ when install_dir option is set. Don't include satisfied dependencies
+ when gathering dependencies.
+ * lib/rubygems/commands/query_command.rb: Display authors, rubyforge
+ and homepage urls with details.
+ * lib/rubygems/commands/environment_command.rb: Add executable
+ directory (from Rubinius).
+ * lib/rubygems/commands/install_command.rb: Don't set install_dir by
+ default.
+ * lib/rubygems/commands/update_command.rb: Don't set install_dir by
+ default. Use #find_missing for efficiency.
+
+2008-06-07 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/server.rb: Fully mirror Gem::Indexer indexes, set
+ correct content-type headers, always refresh the source index.
+ * lib/rubygems/source_index.rb: Add spec_dirs so that #refresh! will
+ always reload from the same locations. #refresh! on manually-built
+ SourceIndex now raises. Fixes #20509 by Chad Woolley.
+
+2008-06-06 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/installer.rb: Remove previous bin_script_path in case
+ it is a symlink.
+ * lib/rubygems/commands/pristine_command.rb: Force reinstallation of
+ the gem using the installer. Fixes bug #20387 by Erik Persson.
+ * lib/rubygems/doc_manager.rb: Ensure args to RDoc are all strings.
+ * lib/rubygems/source_index.rb: Use find_matching to discover updated
+ specs instead of fetch.
+ * lib/rubygems/commands/query_command.rb: Platform, not name in spec
+ tuples.
+
+2008-06-05 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/local_remote_options.rb: Ensure remote repository URLs
+ reference directories. Fixes bug #20134 by Neil Wilson.
+ * lib/rubygems/source_index.rb: Gracefully handle ^C or explicit exit
+ while loading .gemspec files from disk. Fixes bug #20523 by Joel
+ VanderWerf.
+ * lib/rubygems/specification.rb: Use File#expand_path in
+ installation_path. Fixes bug #19317 by Hemant Kumar.
+ * lib/rubygems/spec_fetcher.rb: Fix legacy test against URI.
+ * lib/rubygems/remote_fetcher.rb: Always raise FetchError from
+ RemoteFetcher. Fix FetchErrors without URIs. Refactor Net::HTTP
+ request code to use persistent connections for HEAD requests. Feature
+ Request #7973 by Christian Schachtzabel.
+ * lib/rubygems.rb: Don't load custom_require until after the OS and
+ implementation have had a chance to set paths.
+
+2008-06-04 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/commands/source_index.rb: Only fetch specs we need in
+ #outdated.
+ * lib/rubygems.rb: Fix typo in ::activate exception.
+ * lib/rubygems/dependency.rb: For #to_s, display dependency type when
+ nil.
+ * lib/rubygems/dependency_installer.rb: Reset #installed_gems for
+ every #install. Fixes bug #19444 by Glenn Rempe.
+ * lib/rubygems/installer.rb: Don't re-read the disk to check for new
+ gems, add them by hand on install.
+
+2008-06-03 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems.rb: Add ::gzip, ::gunzip, ::deflate and ::inflate.
+ * lib/rubygems/server.rb: Add specs and latest_specs indicies.
+ * setup.rb: Don't require rdoc until needed. Patch #20414 by Brian
+ Candler.
+ * lib/uninstaller.rb: Correctly uninstall gems installed with a
+ legacy platform. Patch #19877 by Luis Lavena.
+ * lib/rubygems/commands/update_command.rb: Only fetch remote specs
+ when we know what we're looking for.
+
+2008-06-02 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/specification.rb: Remove double slash in
+ #installation_path. Fixes bug #19896 by Heiko Seebach.
+ * lib/rubygems/remote_fetcher.rb: Require StringIO. Fixes bug #19866
+ by Caleb Land.
+ * lib/rubygems.rb: Require rubygems/defaults/#{RBX_ENGINE}.rb and
+ rubygem/defaults/operating_system.rb if they exist. (OS require comes
+ first and may be overridden by operating system.)
+
+2008-06-01 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/indexer.rb: Ensure identical names, versions and
+ platforms are identical for a smaller index.
+ * lib/rubygems/spec_fetcher.rb: Only write to cache when we own it.
+ * lib/rubygems.rb: Honor default_path if GEM_PATH environment
+ variable is not set. Patch #19502 by Donavan Pantke.
+ * lib/rubygems/installer.rb: Set file mode indicated by tar file.
+ Patch #19737 by Jason Roelofs.
+
+2008-06-01 John Barnette <jbarnette@rubyforge.org>
+
+ * lib/rubygems.rb: Add Gem.available?(gem, *specs) for easy availability
+ checks at runtime.
+
+2008-05-31 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/commands/dependency_command.rb: Delay fetching specs
+ until needed. Reverse dependencies can no longer be calculated for
+ remote sources. Add backwards compatibility.
+ * lib/rubygems/commands/fetch_command.rb: Add backwards
+ compatibility.
+
+2008-05-30 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/local_remote_options.rb: --sources option should not
+ add URIs to Gem.sources.
+ * lib/rubygems/spec_fetcher.rb: Add #warn_legacy to help handling
+ legacy sources.
+ * luby/rubygems/commands/query_command.rb: Add backwards
+ compatibility with legacy sources.
+
+2008-05-28 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/remote_fetcher.rb: Add #uri to
+ Gem::RemoteFetcher::FetchError.
+ * lib/rubygems/user_interaction.rb: Improve RDoc slightly.
+ * lib/rubygems/spec_fetcher.rb: Introduce backwards compatibility for
+ legacy (pre 1.2) repositories
+ * lib/rubygems/commands/sources_command.rb: Backwards compatibility
+ and restoration of --update.
+ * lib/rubygems/specification.rb: Ensure nil-typed dependencies become
+ runtime dependencies.
+
+2008-05-27 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/spec_fetcher.rb: Switch #fetch, #find_matching to be
+ compatible with Gem::SourceInfoCache#search_with_source. Add caching
+ for .gemspec files.
+ * lib/rubygems/dependency_installer.rb: Switch to SpecFetcher.
+ * lib/rubygems/source_index.rb: Switch #outdated to use SpecFetcher.
+ * lib/rubygems/commands/dependency_command.rb: Switch to SpecFetcher.
+ * lib/rubygems/commands/outdated_command.rb: Switch to SpecFetcher.
+ * lib/rubygems/commands/query_command.rb: Switch to SpecFetcher.
+ * lib/rubygems/commands/sources_command.rb: Switch to SpecFetcher.
+ * lib/rubygems/commands/update_command.rb: Switch to SpecFetcher.
+ * lib/rubygems/version.rb: Handle comparisons with non-Gem::Version
+ objects.
+
+2008-05-13 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/spec_fetcher.rb: Add caching of specs, latest_specs
+ files.
+ * test/gemutilities.rb: Ensure Gem.user_home doesn't point to ~.
+
+2008-05-09 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/indexer.rb: Add Marshal format index of spec names,
+ versions and platforms. WIP.
+ * lib/rubygems/spec_fetcher.rb: WIP for replacement of
+ Gem::SourceInfoCache and SourceInfoCacheEntry.
+ * lib/rubygems/dependency.rb: Add #=~.
+
+2008-05-07 John Barnette <jbarnette@gmail.com>
+
+ * lib/rubygems/specification.rb, et. al: Let gems have development
+ dependencies, which aren't installed (except when --development is
+ supplied) or activated.
+
+2008-05-02 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/indexer.rb: Refactored into simpler more imperative
+ code.
+ * lib/rubygems.rb: Leave rbconfig/datadir.rb for non-RubyGems use.
+
+2008-04-16 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/server.rb: Refresh the source index per request so new
+ gems will be found after server startup.
+
+2008-04-15 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/source_index.rb: Only print out "Bulk updating" when
+ verbose, fix #latest_specs documentation.
+ * lib/rubygems/dependency_installer.rb: Add :cache_dir option for
+ Tinderbox.
+
+2008-04-14 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/test_utilities.rb: Expose some internal testing
+ utilities that are of general use.
+
+2008-04-10 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems.rb: Fix Gem.prefix so it reports nil when rubygems.rb
+ is in sitelibdir, libdir, or doesn't have 'lib' as a parent directory.
+ * doc/release_notes/rel_1_1_1.rdoc: RubyGems 1.1.1 release notes.
+ * lib/rubygems/rubygems_version.rb: 1.1.1.
+
+2008-04-07 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/server.rb: Fix fragment URIs. Patch by James Tucker.
+ * lib/rubygems/commands/update_command.rb: Pass
+ --no-format-executable to setup.rb. Patch by Stephen Bannasch.
+
+2008-04-06 Chad Woolley <thewoolleyman@gmail.com>
+
+ * lib/rubygems.rb: Add setter Gems.platforms=, to allow platforms
+ to be set/reset when invoking or testing RubyGems programatically.
+ Also force Gems.platforms to automatically reset to default of
+ [Gem::Platform::RUBY, Gem::Platform.local] if cleared.
+ * lib/rubygems/version_option.rb: Change add_platform_option
+ to initialize Gem.platforms to contain only Gem::Platform::RUBY
+
+2008-04-04 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/source_index.rb: Make Gem::SourceIndex#refresh!
+ more-correct. Reported by Paul Haddad.
+ * lib/rubygems.rb: Add Gem::refresh. Bug #19176 by Hongli Lai.
+ * lib/rubygems/dependency_installer.rb: Put downloaded gems into
+ install_dir's cache. Patch #19182 by Richard Brown.
+
+2008-04-03 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/source_info_cache.rb: Merge full cache file into
+ latest data. Don't write cache files when checking for them. Only
+ update full cache file when we've read it. Refresh all data when
+ loading all data.
+ * lib/rubygems/dependency_installer.rb: Fix --force to work without
+ network for dependent gems. Fix all-fetching test.
+ * lib/rubygems/commands/query_command.rb: Obey --all flag for gem
+ query.
+ * lib/rubygems/commands/environment_command.rb: Don't display
+ RubyGemsPackageVersion.
+ * lib/rubygems/indexer.rb: Fix typo. Patch by Tom Copeland.
+ * lib/rubygems/command_manager.rb: Display RubyGemsVersion with
+ --version.
+ * lib/rubygems/commands/pristine_command.rb: Rebuild extensions along
+ with everything else. Patch #19281 by Dr. Nic Williams.
+
+2008-04-01 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems.rb: Fix prefix to point to directory above RubyGems,
+ so RubyGems will be installed into lib/.
+ * setup.rb: Work around apple's libdir-installed RubyGems, by
+ installing into sitelibdir.
+ * Rakefile: Add svnversion to RubyGems version number for `rake
+ install`.
+
+2008-03-31 Luis Lavena <luislavena@gmail.com>
+
+ * test/: Allow tests to use a random (but controlled) port number
+ instead of a hardcoded one. This helps CI tools when running
+ parallels builds.
+
+2008-03-30 Luis Lavena <luislavena@gmail.com>
+
+ * test/test_gem.rb: Leave APPLE_GEM_HOME tests only to *nixes.
+ * lib/rubygems/remote_fetcher.rb: Errno::ECONNABORTED raised on Windows
+ on closed Keep-Alive connections.
+
+2008-03-29 Eric Hodel <drbrain@segment7.net>
+
+ * gemspecs/: Removed.
+ * examples/: Removed.
+ * doc/design/: Removed.
+ * doc/rdoc_templates/: Removed.
+ * Rakefile: Package doc/release_notes/.
+ * setup.rb: Use full path to release_notes, ensure RDoc can be
+ both removed and installed.
+
+2008-03-28 Eric Hodel <drbrain@segment7.net>
+
+ * bin/gem, Rakefile: RubyGems now requires Ruby > 1.8.3.
+ * lib/rubygems.rb: Added Gem.ruby_version, Gem.read_binary,
+ Gem.binary_mode.
+ * lib/, test/: Read files in binary mode for windows and ruby 1.9.
+ * lib/rubygems/commands/update_command.rb: Only update once.
+ * lib/rubygems/commands/sources_command.rb: Ditto.
+ * lib/rubygems/source_index.rb: Fix #remove_extra, #find_missing so
+ legacy platform gems don't get updated repeatedly.
+ * doc/release_notes/rel_1_1_0.rdoc: RubyGems 1.1.0 release notes.
+ * lib/rubygems/rubygems_version.rb: 1.1.0.
+
+2008-03-28 Ryan Woodrum <rwoodrum@avvo.com>
+
+ * lib/rubygems/commands/query_command.rb: Add --installed
+ subcommand to check if a gem and/or version is installed.
+ * test/test_gem_commands_query_command.rb: Add relevant tests.
+ * test/gemutilities.rb: Override exit() for query tests.
+ * test/mockgemui.rb: Add =() to manipulate output values (clear).
+
+2008-03-28 Chad Woolley <thewoolleyman@gmail.com>
+
+ * lib/rubygems/source_info_cache.rb: Add reset_cache_file.
+
+2008-03-27 Chad Woolley <thewoolleyman@gmail.com>
+
+ * lib/rubygems/user_interaction.rb: Raise Gem::SystemExitException
+ instead of exiting, kill unused terminate_interaction!.
+ * lib/rubygems/exceptions.rb: Add Gem::SystemExitException.
+ * lib/rubygems/commands/install_command.rb: Raise
+ Gem::SystemExitException instead of exiting.
+ * bin/gem: Rescue Gem::SystemExitException and exit with
+ specified exit_code.
+ * test/test_gem_commands_install_command.rb: Assert on
+ Gem::SystemExitException and exit_code in tests.
+
+2008-03-27 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/commands/sources_command.rb: Allow sources to be
+ removed without network. Fixes bug #18644 by Mikel Lindsaar.
+
+2008-03-27 Luis Lavena <luislavena@gmail.com>
+
+ * lib/rubygems/commands/environment_command.rb: Use platform specific
+ PATH_SEPARATOR instead of hardcoded ':'
+ * test/test_gem_commands_unpack_command.rb: Ditto.
+ * test/test_gem_commands_environment_command.rb: Ditto.
+ * test/gemutilities.rb: Fix binary file reads being truncated on
+ Windows.
+ * test/test_gem_commands_install_command.rb: Switch to read_binary.
+ * test/test_gem_commands_update_command.rb: Ditto.
+ * test/test_gem_commands_server_command.rb: Consider full path when
+ evaluating location (instead of hardcoded or missing drive leter).
+ * test/test_gem_installer.rb: Ditto.
+ * test/test_gem_dependency_installer.rb: exclude no-wrapper tests for
+ Windows.
+
+2008-03-26 Luis Lavena <luislavena@gmail.com>
+
+ * lib/rubygems.rb: Handle backslashes that came from GEM_HOME and
+ GEM_PATH on Windows.
+
+2008-03-25 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/source_index.rb: Add updating from latest index,
+ default to updating from latest index. Reduces common-case update
+ to under 3,000 gems at present.
+ * lib/rubygems/remote_fetcher: Fix error reporting from net/http.
+ * lib/rubygems.rb: Sort methods, remove last vestiges of autorequire,
+ RDoc cleanup.
+
+2008-03-23 Luis Lavena <luislavena@gmail.com>
+
+ * setup.rb: generated Windows stubs will honors prefix using Gem.ruby
+ instead of hardcoded 'ruby.exe'
+ * lib/rubygems/installer.rb: generated Windows stubs scripts will now
+ work from differnt directories than Gem::bindir. Fixes bug #16259 by
+ Claus Folke Brobak
+
+2008-03-20 Eric Hodel <drbrain@segment7.net>
+
+ * test/test_gem_source_info_cache.rb: Test with real objects now.
+ * lib/rubygems/source_index.rb: #latest_specs now has latest specs
+ for all platforms.
+ * lib/rubygems/source_info_cache.rb: Add latest cache data, only load
+ full cache data when needed.
+
+2008-03-20 Luis Lavena <luislavena@gmail.com>
+
+ * test/gemutilities.rb: Change all the file processing mechanism to
+ enable binary mode by default (required for Windows file operations
+ dealing with non-printable characters).
+
+2008-03-19 Luis Lavena <luislavena@gmail.com>
+
+ * lib/rubygems/package/tar_output.rb: Adapted code to use #wrap instead
+ of #new when dealing with Zlib::GzipWriter (fixes SEGV and warnings due
+ GzipWriter object not being closed explicitly).
+
+2008-03-12 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/indexer.rb: Add latest_index.
+
+2008-03-09 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/defaults.rb: Add special case for RUBY_ENGINE constant
+ when setting default gem dir.
+ * Rakefile: Add update_rubinius and diff_rubinius.
+
+2008-03-08 Lincoln Stoll <lstoll@lstoll.net>
+
+ * lib/rubygems/server.rb: Drop use of RDoc's TemplatePage in favor of
+ ERB.
+
+2008-03-04 Ryan Davis <ryan@wrath.local>
+
+ * lib/rubygems/remote_fetcher.rb: Moved #download from
+ DependencyInstaller.
+ * lib/rubygems/commands/fetch_command.rb: Updated to use #download.
+ * lib/rubygems/dependency_installer.rb: install now takes name or dep.
+ Renamed gather_specs_to_download to find_spec_by_name_and_version.
+ Modifed #initialize to not take gem name or version.
+
+2008-03-04 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/package*: Removed #open_from_io and friends, switched
+ to #open, no special handling for file names.
+ * lib/rubygems/package/tar_output.rb: Refactored ::open to use
+ instance methods.
+ * lib/rubygems/remote_fetcher.rb: Print out number of requests made
+ before connection reset.
+
+2008-02-29 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/package/tar_reader/entry.rb: Removed is_directory and
+ is_file? in favor of file? and directory?.
+
+2008-02-28 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/package.rb: Broke up Tar bits into separate files.
+ * lib/rubygems/package/tar_reader/entry.rb: Don't copy TarHeader data
+ into Entry, go through #header instead. Better tests for
+ TarReader::Entry.
+
+2008-02-27 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/dependency_installer.rb: Automatically fall back to
+ local-only install on network error. Fixes bug #15759 by Chauk-Mean P.
+ * lib/rubygems/source_index.rb: Process spec dirs so that earlier
+ dirs override later dirs. Fixes bug #14816 by Kurt Stephens.
+
+2008-02-26 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/commands/update_command.rb: Only update gems that need
+ updates. Fixes bug #14780 by Mathieu Lajugie. Don't force
+ remote-only updates. Properly handle dependencies when updating.
+ Fixes bug #17488 by Hongli Lai.
+ * lib/rubygems/commands/environment_command.rb: Display path as a
+ usable path.
+ * lib/rubygems.rb: Don't add APPLE_GEM_HOME with ENV['GEM_HOME'].
+
+2008-02-25 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems.rb: Expand sitelibdir when checking prefix. Fixes bug
+ #17983 by Hemant Kumar.
+ * setup.rb: Print release notes on installation. Tell people where
+ `gem` was installed.
+ * bin/update_rubygems: Added --help output to explain how to install
+ earlier versions of RubyGems. Added --version option workaround.
+ Fixes bug #16842 by Chad Woolley.
+ * lib/rubygems/install_command.rb: Give proper exit code on failure.
+ Fixes bug #17438 by Josh Nichols.
+
+2008-02-23 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/remote_fetcher.rb: Change hosts correctly when
+ redirecting. Handle EOFError from Net::HTTP.
+ * lib/rubygems/commands/specification_command.rb: Pull specifications
+ from gem files.
+ * lib/rubygems/uninstaller.rb: When :executable is set, don't ask the
+ user. Fixes bug #16812 by Matt Mower. Raise exception instead of
+ printing message when gem is not in GEM_HOME.
+ * lib/rubygems/uninstall_command.rb: Print message when gem is not in
+ GEM_HOME.
+ * lib/rubygems/commands/cleanup_command.rb: Clean up all old gems.
+ * lib/rubygems/commands/unpack_command.rb: Scan every gem path when
+ unpacking. Fixes bug #17602 by Ryan Davis.
+
+2008-02-20 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/install_update_options.rb: Add --bindir option to
+ specify destination to install executables into. Patch #17937 by
+ Donavan Pantke.
+ * lib/rubygems/specification.rb: Fix Time.today == Time.today. Bug
+ #17413 by Andrei Bocan.
+ * setup.rb: Properly check for deletablitily of user and system
+ caches. Bug #17869 by Alexey Verkhovsky. Fix --no-format-executable.
+ Fixes bug #16879 by Charles Nutter.
+
+2008-02-19 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/remote_fetcher.rb: Add persistent connection support.
+ Patch #18180 by Aaron Patterson.
+ * lib/rubygems/installer.rb: Fix #shebang to use the ruby install
+ name. Patch #16878 by Donavan Pantke.
+ * lib/rubygems/defaults.rb, lib/rubygems.rb: Enable defaults for
+ Gem.path and Gem.bindir. Patch #17886 by Donavan Pantke.
+ * test/test_gem_ext_configure_builder.rb: Make test_self_build_fail
+ more platform independent. Patch #17599 by Martin Krauskopf.
+
+2008-02-14 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/commands/fetch_command.rb: Fix a bug when fetching
+ from non-default sources. Report non-existent gems instead of
+ crashing.
+
+2008-01-09 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/commands/update_command.rb: Use portable and safe ENV
+ operation. Patch by usa in ruby SVN revision 14739.
+ * lib/rubygems/open-uri.rb: Fix tests. Patch by NARUSE Yui.
+ [ruby-dev:33336]
+
+2007-12-23 Eric Hodel <drbrain@segment7.net>
+
+ * util/gem_prelude.rb: Remove methods from Gem, not QuickLoader, to
+ fix warnings.
+
+2007-12-22 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/commands/environment_command.rb: Put GEM PATHS in the
+ correct order.
+ * lib/rubygems/commands/uninstall_command.rb: Add --install-dir to
+ specify which local repository to uninstall from. Patch #15151 by
+ Donavan Pantke.
+ * lib/rubygems/uninstaller.rb: Only allow uninstallation of gems from
+ specified directory. Properly clean up executables on uninstall.
+ Patch #15151 by Donavan Pantke.
+ * lib/rubygems/install_update_options.rb: Add --no-env-shebang
+ option. Patch #16508 by Donavan Pantke.
+ * util/gem_prelude.rb: Use require to load rubygems.rb to make
+ $LOADED_FEATURES correct on RubyGems update.
+
+2007-12-21 Eric Hodel <drbrain@segment7.net>
+
+ * util/gem_prelude.rb: Place bin before lib so bin stubs work.
+
+2007-12-20 Eric Hodel <drbrain@segment7.net>
+
+ * Rakefile: Require Ruby > 1.8.2. Enable CERT_DIR.
+ * lib/rubygems.rb: Work with RbConfig and Config. Bug #16457 by
+ Christian Ramilo, John Barnette.
+ * lib/rubygems/commands/build_command.rb: Relax yaml? test to work
+ with Ruby 1.8.3.
+ * lib/rubygems/rubygems_version.rb: 1.0.1.
+ * doc/release_notes/rel_1_0_1.rdoc: RubyGems 1.0.1 release notes.
+
+2007-12-19 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/installer.rb: Revert change that only wrapped
+ executables with #!.
+ * lib/rubygems/specification.rb: Warn about a lot of things that
+ could be wrong with gemspecs on build, including missing #!. Use
+ 'x86-mswin32' for legacy 'mswin32' platform, fix CURRENT platform.
+ Paired with Luis Lavena.
+ * lib/rubygems/remote_installer.rb: Deleted.
+ * lib/rubygems.rb: Removed Kernel#require_gem.
+ * doc/release_notes/rel_1_0_0.rdoc: RubyGems 1.0 release notes.
+ * lib/rubygems/rubygems_version.rb: 1.0.0.
+
+2007-12-18 Luis Lavena <luislavena@gmail.com>
+
+ * lib/rubygems/commands/mirror_command.rb: Work around URI::parse
+ processing file:// scheme and drive paths on Windows.
+ * test/test_gem_commands_mirror_command.rb: ditto.
+
+2007-12-17 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/installer.rb: Copy files into bindir if they don't
+ have a shebang. Bug reported by Luis Lavena.
+ * lib/rubygems/server.rb: Handle platforms in Gem::Server#quick.
+ Exactly match gem names. Bugs reported by Chad Woolley.
+ * lib/rubygems/platform.rb: Remove platform constants in favor of
+ Gem::Platform::CURRENT. Bug reported by Luis Lavena.
+ * lib/rubygems/dependency_installer.rb: Work around Dir::glob not
+ understanding File::ALT_SEPARATOR. Bug submitted by Luis Lavena.
+
+2007-12-16 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/remote_fetcher.rb: Be more verbose in error messages
+ from OpenURI.
+ * lib/rubygems/server.rb: Be more verbose in error/missing responses.
+
+2007-12-15 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/installer.rb: Output extension build results when
+ really verbose. From bug #15853 John Croisant.
+ * lib/rubygems/specification.rb: Fix backwards compatibility with
+ 0.9.4, don't allow the platform to be nil or an empty string. Bug
+ #16177 by Dan Manges.
+ * setup.rb: Re-exec setup.rb if rubygems is loaded and RUBYOPT is
+ set. Fixes bug #15974 by Joshua Sierles.
+ * lib/rubygems/update_command.rb: Tweak formatting of updated
+ message. Bug #15625 by Bil Kleb.
+ * lib/rubygems/remote_fetcher.rb: Add URI to exception message for
+ Gem::RemoteFetcher#fetch_size. Bug #14801 by Bil Kleb.
+
+2007-12-14 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/commands/query_command.rb: Don't display duplicate
+ version numbers. Bug #15828 by Tim Fletcher.
+ * setup.rb: Fix my stupidity with --help. Patch #16308 by Stephen
+ Bannasch. Fix --prefix= argument. Bug #16002 by Piglop.
+
+2007-12-13 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/commands/server_command.rb: Fix --no-daemon. Bug by
+ Chad Woolley.
+ * lib/rubygems/server.rb: Fix Marshal quick index. Bug by Chad
+ Woolley.
+ * lib/rubygems/installer.rb: Respect Gem::Specification#bindir. Bug
+ #16202 by Suraj Kurapati.
+ * lib/rubygems/commands/update_command.rb: Fix `gem update mysql`.
+ Bug #16244 by Stephen Bannasch.
+
+2007-12-12 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/installer.rb: Add --format-executable option to
+ install executables with ruby's program-suffix and prefix. Patch
+ #14688 by Jeremy Kemper. Also, installing in really-verbose mode
+ prints out written files.
+ * setup.rb: Add --format-executable option to install gem with ruby's
+ program-suffix and prefix. Add --help. Fixes bug #16056 by Chad
+ Woolley.
+ * lib/rubygems/uninstaller.rb: Fallback to original_platform_name
+ correctly. Patch #15960 by Nicola Piccinini's friend.
+
+2007-12-11 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/validator.rb: Correct test run failures when no tests
+ are provided. Patch #15701 by Jérémy Zurcher.
+ * lib/rubygems/commands/mirror_command.rb: Don't File.join a
+ URI::HTTP. Patch #16116 by Morgan Nelson.
+ * lib/rubygems/commands/unpack_command.rb: Add --target option to
+ `gem unpack`. Patch #16154 by Kevin Barnes.
+
+2007-12-10 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/dependency_installer.rb: Revert to nil for the default
+ security policy to avoid requiring OpenSSL.
+ * lib/rubygems/defaults.rb: Consolidate defaults for easier editing.
+ Patch #15150 by Donavan Pantke.
+
+2007-11-27 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/source_index.rb: Remove dependency on forwadable.
+ Patch by Koichi Sasada.
+ * lib/rubygems/specification.rb: Reduce dependency on time.rb. Patch
+ by Koichi Sasada.
+
+2007-11-26 Rich Kilmer <rich@infoether.com>
+
+ * lib/rubygems/version.rb: Fix bug 15948 with version bump
+ * test/test_gem_version.rb: Test for bug 15948 with version bump
+ * util/gem_prelude.rb: wrap init code with exception handler
+ and skip badly formed directory names
+
+2007-11-23 Rich Kilmer <rich@infoether.com>
+
+ * lib/rubygems.rb: Centralize all CONFIG options into Hash
+ Gem::ConfigMap with keys as symbols, change all references
+ to CONFIG to ConfigMap
+ * lib/rubygems/require_paths_builder.rb: Added to support
+ building .require_paths file
+ * lib/rubygems/installer.rb: Add building of .require_paths if
+ needed
+ * lib/rubygems/platform.rb: Use new ConfigMap hash for arch
+ * lib/rubygems
+ * util/gem_prelude.rb: new gem prelude for Ruby 1.9
+ * test/test_gem_installer.rb: change to use ConfigMap hash
+ * test/gemutilities.rb: change to use ConfigMap hash
+
+2007-11-21 Daniel Berger <djberg96@gmail.com>
+
+ * lib/rubygems/platform.rb: Gem::Platform.new now returns
+ Gem::Platform.local if the arch matches Gem::Platform::CURRENT.
+ Bugs #15815 and #15782 submitted by Daniel Berger.
+
+2007-11-20 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/platform.rb: Handle bare 'mswin32' platform's CPU.
+
+2007-11-19 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/rubygems_version.rb: 0.9.5.
+
+2007-11-16 Eric Hodel <drbrain@segment7.net>
+
+ * test/gemutilities: Add a legacy platform gem to the default test
+ gems list.
+ * lib/rubygems/specification.rb: Add Gem::Specification#original_name
+ for legacy purposes
+ * lib/rubygems/indexer.rb: Use #original_name to make the indexer
+ backwards compatible.
+ * lib/rubygems/master_index_builder.rb: Reduce memory consumption.
+
+2007-11-13 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/rubygems_version.rb: 0.9.4.7 beta.
+ * lib/rubygems.rb: Patch for RUBY_FRAMEWORK for OS X 10.5. Patch
+ submitted by Laurent Sansonetti.
+ * lib/rubygems.rb: cygwin, djgpp, mingw are Windows platforms. Fixes
+ bug #15537 by Roger Pack.
+
+2007-11-11 Eric Hodel <drbrain@segment7.net>
+
+ * Rakefile: Tasks for maintaining ruby trunk export of RubyGems.
+ * lib/rubygems/specification.rb: Preserve original platform across
+ serialization.
+ * lib/rubygems/dependency_installer.rb: Retry with original platform
+ name on fetch error.
+
+2007-11-09 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/specification.rb: Set #original_platform only once.
+ * lib/rubygems/indexer.rb: Handle legacy platforms.
+ * lib/rubygems/platform.rb: Gem::Platform is a valid argument. Bug
+ #15511 submitted by Daniel Berger.
+ * lib/rubygems/custom_require.rb: Fix compatibility with 1.8.2. Bug
+ #14933 submitted by Aaron Patterson.
+ * lib/rubygems/command.rb: Now '-V' enables verbose. Bug #14951
+ submitted by Sasa Ebach.
+ * lib/rubygems/commands/check_command.rb: Change use of '-v', '-V' to
+ match above.
+ * lib/rubygems/package.rb: #send! is gone again.
+ * lib/rubygems.rb: Don't add custom_require for 1.9.
+ * test/*: Make compatible with 1.9 import.
+
+2007-10-30 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/specification.rb: Don't re-use @platform to maintain
+ backwards compatibility.
+ * lib/rubygems/platform.rb: Handle nil and 'ruby' platforms in ::new.
+
+2007-10-20 Daniel Berger <djberg96@gmail.com>
+
+ * lib/rubygems/uninstaller.rb: Changed '.cmd' to '.bat' in the
+ remove_executables method for MS Windows. Patch from Luis Lavena.
+
+2007-10-18 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/rubygems_version.rb: 0.9.4.6 beta.
+
+2007-10-19 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/commands/update_command.rb: Don't install with
+ dependencies when updating. This is a hack.
+
+2007-10-19 Daniel Berger <djberg96@gmail.com>
+
+ * setup.rb: gem.cmd stub is now gem.cmd, and the stub generation was
+ changed - now better for NT. Patch #14725 (Luis Lavena).
+ * lib/rubygems/installer.rb: Same as for setup.rb.
+
+2007-10-18 Daniel Berger <djberg96@gmail.com>
+
+ * lib/rubygems/platform.rb: Modified the Platform.local method for MS
+ Windows for versions built with VC++ 6. Patch #14727 (Luis Lavena).
+ * test/test_gem_specification.rb: Added version independent tests for
+ MS Windows. Patch #14727 (Luis Lavena).
+
+2007-10-18 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/remote_fetcher.rb: Add platform to User-Agent.
+ * lib/rubygems/commands/install_command.rb: Fix typo. Debian bug
+ #443135 submitted by Reuben Thomas.
+ * lib/rubygems/dependency_installer.rb: Don't install dropped
+ dependencies. Fixes bug #14724 submitted by Luis Lavena.
+
+2007-10-17 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/commands/update_command.rb: Unset RUBYOPT when running
+ setup.rb
+ * setup.rb: Re-exec without RUBYOPT if it is set. Fixes bug #14683
+ submitted by Lyle Johnson.
+
+2007-10-16 Daniel Berger <djberg96@gmail.com>
+
+ * lib/rubygems/indexer/abstract_index_builder.rb: The compress method
+ now does a binary read to make MS Windows happy.
+
+2007-10-16 Eric Hodel <drbrain@segment7.net>
+
+ * setup.rb: Installs bin stubs that warn when you try to use the old
+ commands. Simple mswin deprecation stubs by Luis Lavena.
+
+2007-10-12 Eric Hodel <drbrain@segment7.net>
+
+ * setup.rb: Remove source caches on install.
+ * doc/release_notes/rel_0_9_5.rdoc: Draft added.
+ * lib/rubygems/rubygems_version.rb: 0.9.4.5 beta.
+
+2007-10-10 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/dependency_installer.rb: Fix small bug found by Alan C.
+ Francis.
+
+2007-10-09 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/dependency_installer.rb: Use install_dir so custom gem
+ repos can be used.
+ * lib/rubygems/specification.rb: Always set required attributes, even
+ if they match the default.
+
+2007-10-08 Ryan Davis <ryan@wrath.local>
+
+ * lib/rubygems.rb: Fixed require order so custom_require is
+ last. Added HACK tag to remind Jim to release rake.
+ * test/test_gem_source_index.rb: Fixed latest_specs' tests so
+ failures were much more readable.
+ * lib/rubygems/source_index.rb: Fixed latest_specs to deal with
+ platforms appropriately. Returns array again.
+
+2007-10-08 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/config_file.rb: Boost bulk_threshold to 1000, Marshal
+ format is smaller than yaml format quick index.
+ * lib/rubygems/installer.rb: Make #shebang correctly rewrite env
+ shebangs.
+ * lib/rubygems/specification.rb: Mark Time.today for removal, too much
+ depends upon it now.
+
+2007-10-07 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/specification.rb: Sped up ::_load.
+ * lib/rubygems/source_index.rb: Sped up #search.
+ * lib/rubygems/version.rb: Replace #to_ints with #ints, and cache
+ result.
+ * lib/rubygems/source_info_cache.rb: Only flush cache when it changes.
+
+2007-10-05 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/user_interaction.rb: Allow customization of completion
+ message for progress reporters.
+ * lib/rubygems/command.rb: Add --quiet option.
+ * lib/rubygems/commands/generate_index_command.rb: Add description.
+
+2007-10-04 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/uninstaller.rb: Also check and uninstall old platform
+ name to ensure legacy platform gems are uninstalled.
+ * lib/rubygems/doc_manager.rb: Remove existing rdoc and ri directory
+ so regenerating docs succeeds even if previously interrupted.
+
+2007-10-02 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/source_index.rb: Make #outdated search only for gems
+ matching the current platform.
+ * lib/rubygems/commands/dependency_command.rb: Add --platform.
+ * lib/rubygems/commands/outdated_command.rb: Ditto.
+ * lib/rubygems/commands/specification_command.rb: Ditto.
+ * lib/rubygems/commands/update_command.rb: Ditto.
+
+2007-10-02 Wilson Bilkovich <wilson@supremetyrant.com>
+
+ * lib/rubygems/specification.rb: Custom Marshal format to reduce index
+ size.
+ * lib/rubygems/requirement.rb: Ditto
+ * lib/rubygems/version.rb: Ditto
+
+2007-10-01 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/platform.rb: Handle mswin32 on VC6. Partial patch and
+ assistance by Luis Lavena. Handle cpu-os-version style platforms for
+ command-line arguments.
+
+2007-09-30 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/specification.rb: Gem::Specification is now
+ forward-compatible while loading.
+
+2007-09-29 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/source_info_cache_entry.rb: Correctly handle URIs.
+ * lib/rubygems/remote_fetcher.rb: ditto.
+ * lib/rubygems/remote_options.rb: Add --update-sources option. Patch
+ #14246 submitted by Alan Francis.
+ * lib/rubygems/config_file.rb: Add update_sources setting to control
+ automatic refreshing of sources (patch #14246). Fix bug where things
+ would be overwritten in ~/.gemrc when they shouldn't.
+
+2007-09-28 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/rubygems.rb: Gem.ruby now returns the full path. Added
+ Gem.prefix to make self updating work right.
+ * setup.rb, pre-install.rb, post-install.rb: Replace with a small,
+ simple setup script that works.
+ * lib/rubygems/commands/update_command.rb: Pass rdoc, ri and prefix
+ flags down to setup.rb when self updating.
+
+2007-09-26 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/version_option.rb: Always include RUBY platform,
+ allow RUBY platform as an option.
+ * lib/rubygems/specification.rb: Gems with non-ruby platform sort
+ last (first in preference for installation).
+ * lib/rubygems/platform.rb: Allow matching of legacy platforms.
+ * lib/rubygems/source_index.rb: Add only_platform option to #search.
+
+2007-09-24 Wilson Bilkovich <wilson@supremetyrant.com>
+ * lib/rubygems/indexer.rb: Generate a Marshal index in parallel to YAML
+ * lib/rubygems/source_index.rb: Fetch a Marshal index if it exists, to
+ avoid the memory cost of parsing a huge YAML file
+ * lib/rubygems/commands/mirror_command.rb: Check for Marshal first
+ * lib/rubygems/indexer/abstract_index_builder.rb: Index refactoring
+ * lib/rubygems/indexer/marshal_index_builder.rb: Build Marshal index
+ * lib/rubygems/indexer/master_index_builder.rb: Simplify YAML generation
+ * lib/rubygems/indexer/quick_index_builder.rb: Build Marshal quickindex
+ * lib/rubygems/server.rb: Serve up Marshal index as well as YAML
+ * lib/rubygems/source_info_cache_entry.rb: Expect a Marshal index
+
+2007-09-23 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/commands/fetch_command.rb: `gem fetch` downloads a gem
+ to the current directory. Feature request #10752 by Bret Pettichord.
+ * lib/rubygems/commands/local_remote_options.rb, etc.: Fix spelling of
+ 'threshold'.
+ * lib/rubygems/installer.rb: Revert feature request #8818, it
+ interferes with `ruby -S` and multiple versions of ruby (1.8 and 1.9).
+ * lib/rubygems/dependency_installer.rb: Fix a bug where the wrong
+ platform gem would be installed.
+ * lib/rubygems/version_option.rb: Add --platform.
+ * lib/rubygems/install_update_options.rb: Verify --security-policy.
+ * lib/rubygems/local_remote_options.rb: Verify --source, --http-proxy.
+
+2007-09-22 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/open-uri.rb: Don't document our OpenURI.
+ * lib/rubygems/commands/generate_index_command.rb: Fix Indexer class
+ change.
+ * lib/rubygems/commands/mirror_command.rb: Fix for 1.9.
+ * lib/rubygems/commands/pristine_command.rb: Have `gem pristine`
+ give a better report of what it accomplished.
+ * lib/rubygems/command.rb: Add optional description field.
+ * lib/rubygems/installer.rb: Hack around broken Pathname#absolute? on
+ windows. Patch #14139 by Jim Hughes.
+
+2007-09-20 Eric Hodel <drbrain@segment7.net>
+
+ * misc files: Tests pass on 1.9.
+ * test/gemutilities.rb: Added Object#send! stub for 1.8.
+ * test/test_open_uri.rb: Require gem_open_uri.rb to avoid warnings.
+ * lib/rubygems/commands/sources_command.rb: Clarify `gem sources -c`
+ and what `gem sources` does. Patch by Hugh Sasse.
+
+2007-09-19 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/platform.rb: Make Gem::Platform a class.
+ * lib/rubygems/specification.rb: Gem::Specification#validate returns
+ true, non-Gem::Platform platforms are no longer allowed.
+ * test/gemutilities.rb: 1.9 compatiblity fixes.
+ * lib/rubygems/dependency_installer.rb: Work around a bug in URI.parse
+ which misinterprets "C:/". Patch #13537 submitted by Daniel Berger.
+ * lib/rubygems/format.rb: Ensure file handles are closed. Patch
+ #13533 submitted by Daniel Berger.
+ * test/test_gem_installer.rb: Win32 path fix. Patch #13528 submitted
+ by Daniel Berger.
+ * test/gemutilities.rb: Make the platform be a win32 platform on
+ win32. Fixes confusion in generate_bin_symlink tests. Patch #13529
+ submitted by Daniel Berger.
+ * test/test_gem_specification.rb: Sequel to above. Patch
+ #13535 submitted by Daniel Berger.
+ * lib/rubygems/source_index.rb: Make the updating cache message more
+ clear. Patch #12778 submitted by Bil Kleb.
+ * lib/rubygems/server.rb: Allow gem's rdoc-style.css to be used.
+ Patch #13589 by Stephen Bannasch.
+ * lib/rubygems/indexer.rb: Fail on missing builder gem only when
+ trying to use the indexer. Fixes bug #13939 by Bryan Stearns.
+ * lib/rubygems/indexer/indexer.rb: Move Indexer up one level in
+ nesting.
+ * lib/rubygems/indexer/compressor.rb: Only used in
+ Gem::Indexer::AbstractIndexBuilder subclasses, merged there.
+ * lib/rubygems/command_aids.rb: Merged Gem::CommandAids into
+ Gem::Command since that's the only place it gets used.
+ * misc other files: mswin fixes. Paired with Daniel Berger.
+
+2007-08-24 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/specification.rb: Fix #full_name for versionless
+ platforms.
+ * lib/rubygems/command_manager.rb: We're only looking for NameError.
+ * lib/rubygems/command.rb: 1.9 fix.
+ * lib/rubygems/format.rb: ditto.
+ * lib/rubygems/installer.rb: ditto.
+
+2007-08-24 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/rubygems_version.rb: 0.9.4.4
+
+2007-08-23 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/platform.rb: Add HPUX, AIX and NetBSD. Thanks to
+ Daniel Berger, Yutaka KANEMOTO and Andre Nathan respectively.
+ * lib/rubygems/installer.rb: Move all option setting to #initialize to
+ make `gem pristine` work again.
+ * lib/rubygems/commands/environment_command.rb: Include platforms.
+ * lib/rubygems/dependency_installer.rb: Support local non-root
+ installation.
+
+2007-08-22 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/dependency_installer.rb: Don't reinstall dependencies
+ existing in the install dir. Don't install dependencies for older
+ versions of the gem we're installing. #installed_gems now contains
+ loaded gemspecs. Always prefer local gems. Handle globs correctly.
+ All deps are now installed into the install_dir.
+ * lib/rubygems/commands/install_command.rb: Switch to
+ Gem::DependencyInstaller. Warn when -y is given, it will be removed.
+ Try our best to install everything the user asked.
+ * lib/rubygems.rb: Gem.bindir now handles Pathname correctly.
+ * lib/rubygems/remote_fetcher.rb: Don't downcase anymore.
+
+2007-08-21 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/dependency_installer.rb: Add installation from local
+ gems. Install gems in the correct order. Handle -E, -f,
+ --ignore-dependencies, -i, -r, -l, -b, -P, -w, -v options for `gem
+ install`
+ * test/gemutilities.rb: Work around OS X /private/tmp.
+ * lib/rubygems/platform.rb: Switch to using arch instead of target_*
+ for JRuby compatibility. Thanks to Nick Sieger.
+
+2007-08-20 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/dependency_installer.rb: Add working but unfinished
+ Gem::DependencyInstaller.
+ * lib/rubygems/source_info_cache.rb: Add #search_with_source.
+ * lib/rubygems/dependency_list.rb: Move #fill_dependencies to
+ Gem::DependencyInstaller
+ * lib/rubygems/platform.rb: Split from specification.rb. Add methods
+ to recognize platforms from Config::CONFIG.
+ * lib/rubygems.rb: Add Gem::platforms.
+ * lib/rubygems/specification.rb: Disallow String platforms.
+
+2007-08-18 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/source_info_cache.rb: Search by Gem::Dependenency.
+ * lib/rubygems/source_index: Search by Gem::Dependenency.
+ * lib/rubygems/version.rb: Version can be String or Integer.
+ Gem::Requirement::default is now >= 0. Gem::Requirement can be built
+ from a Gem::Dependency.
+ * lib/rubygems/dependency_list.rb: Uses TSort now. Add
+ Gem::DependencyList#fill_dependencies.
+ * lib/rubygems/server.rb: Support quick index.
+
+2007-08-17 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/dependency_list.rb: For diamond dependencies with
+ different versions on the bottom of the diamond, trim all but the
+ latest dependency. This will prevent gems like hoe from being
+ installed multiple times.
+
+2007-08-15 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/installer.rb: Support building mkrf extensions. Fixes
+ bug #11313. Patch by Jeremy Hinegardner.
+ * lib/rubygems/installer.rb: Ensure bin files are executable. Fixes
+ bug #8985 submitted by Ara Howard.
+ * lib/rubygems/installer.rb: Insert installing gem home dir into bin
+ wrapper. Patch #8818 by Ara Howard.
+
+2007-08-13 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/commands/uninstall_command.rb: Gems with version of 0
+ can now be uninstalled.
+
+2007-08-11 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/config_file.rb: Command-line args override ~/.gemrc
+ now. Gem.sources is pulled from ~/.gemrc now. Gem::ConfigFile can
+ write itself out now.
+ * lib/rubygems/commands/sources_command.rb: Now writes out
+ Gem.configuration on changes. No longer checks source cache on
+ --list.
+
+2007-08-09 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/source_info_cache.rb: Make Gem::SourceInfoCache#search
+ only search gems in Gem.sources.
+ * lib/rubygems.rb: Make Gem::configuration a real Gem::ConfigFile
+ object.
+ * lib/rubygems/commands/query_command.rb: Fix `gem query --details`.
+ Add `gem query --no-versions`.
+ * lib/rubygems/local_remote_options.rb: Make `gem mumble --source URL`
+ only use that source.
+ * lib/rubygems/config_file.rb: Fix Gem::ConfigFile#[]= to match
+ Gem::ConfigFile#[].
+
+2007-08-08 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/commands/specification_command.rb: Match only exact gem
+ names. Fixes bug #9681. Patch by Michael DeCandia.
+ * lib/rubygems/commands/unpack_command.rb: Match only exact gem names.
+ Fixes bug #9681. Patch by Michael DeCandia.
+ * lib/rubygems/commands/contents_command.rb: Match only exact gem
+ names. Fixes bug #9681. Patch by Michael DeCandia
+ * lib/rubygems/remote_fetcher.rb: Perform a GET request if the HEAD
+ request doesn't have Content-Length. Fixes bug #9771. Patch by Ben
+ Bleything.
+ * lib/rubygems.rb: Clear Gem::searcher when we Gem::clear_paths.
+ Fixes bug #12886. Submitted by Peter Williams.
+ * lib/rubygems.rb: Add #default_sources and rework #sources to use it.
+ * post-install.rb: No longer runs install_sources.
+ * pkgs/sources: Updated to something what a 0.0.2 would look like, if
+ we ever make one.
+
+2007-08-02 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/gem_commands.rb: Removed and broken up into individual
+ files.
+ * lib/rubygems/command_manager.rb: Lazily loads gem commands. Now to
+ use CommandManager just "require 'rubygems/command_manager'" and
+ everything will be there.
+
+2007-08-01 Eric Hodel <drbrain@segment7.net>
+
+ * lib/*, test/*: Pushed down dependencies as far as reasonable.
+ Removed Gem::manage_gems. Now only 14 files are loaded with "require
+ 'rubygems'". Added tests for `gem build` and `gem cert`.
+ * lib/rubygems/extensions.rb: Added common place for all extensions.
+
+2007-07-26 Eric Hodel <drbrain@segment7.net>
+
+ * test/test_gem_ext_configure_builder.rb: Linux has different behavior
+ for `sh ./configure` when configure is missing. Fix adapted from
+ Patch #10019 by Donavan Pantke.
+ * lib/rubygems/commands/pristine_command.rb: Compare fully-qualified
+ paths. Fixes bug #7976 by Lyle Johnson.
+ * lib/rubygems/config_file.rb: Add ConfigFile#[]=, so --proxy
+ command-line option works. Fixes #8152 by Justin Sabelkko.
+ * lib/rubygems/post-install.rb: Make sure we use the
+ latest-and-greatest RubyGems when running post-install.rb. Fixes Bug
+ #8411 by Duy Nguyen.
+ * lib/rubygems/remote_fetcher.rb: An empty HTTP_PROXY means no proxy.
+ Fixes Bug #9042 by Michael Brodhead.
+ * lib/rubygems/version.rb: Disallow newlines in version string. Strip
+ spaces from version string. Fixes Bug #9499 by Bryce Kerley.
+ * lib/rubygems/commands/sources_command.rb: Fix spelling error. Fixes
+ Bug #11064 by Chris Eskow.
+
+2007-07-25 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/indexer.rb: Create the index in /tmp, then move it into
+ place when we're done. This will prevent spurious bulk index updates
+ from occurring while the quick index is missing. Remove the option to
+ not build the quick index.
+ * lib/rubygems/commands/generate_index_command.rb: --no-quick is gone.
+ * lib/rubygems/user_interaction.rb: If stdin is not a tty, it is
+ unlikely that gem is going to get a response when asking a question.
+ Patch #10660 by Paul Brannan.
+ * lib/rubygems/validator.rb: Output test failures when using install
+ -t. Patch #10659 by Paul Brannan.
+ * lib/rubygems/custom_require.rb (Kernel#require): Only rescue a
+ LoadError that matches the file we are requiring. Patch #10723 by
+ Tyler Rick.
+ * lib/rubygems/remote_fetcher.rb: Support HTTP basic authentication.
+ Patch #8121 by Max Dunn.
+ * lib/rubygems/commands/install_command.rb: Don't raise an error when
+ a gem has no tests. Patch #11824 by Katsuyuki MIYAMUKO.
+
+2007-07-23 Eric Hodel <drbrain@segment7.net>
+
+ * lib/commands/contents_command.rb: Add --lib-only option, remove
+ useless --list option. Feature request #9498 by Martin DeMello.
+ * lib/rubygems/specification.rb: Restrict to only files in
+ #require_paths. Add #required_rubygems_version. Feature request
+ #7780 by Eric Hodel.
+ * lib/rubygems/commands/dependency_command.rb: Display dependencies for
+ remote gems. Feature request #12133 by Eric Hodel. -r for reverse
+ dependencies is now -R.
+ * lib/rubygems/commands/specification_command.rb: Display
+ specifications for remote gems. Feature request #12133 by Eric Hodel.
+ * lib/rubygems/installer.rb (Gem::Installer#install): Check
+ required_rubygems_version.
+ * lib/rubygems/user_interaction.rb
+ (Gem::UserInteraction#choose_from_list): Check result for EOF. Fixes
+ bug #8018. Patch by Jos Backus.
+ * post-install.rb: Install using absolute path. Fixes bug #10675.
+ Patch by Jeremy Burks.
+ * lib/rubygems/commands/environment_command.rb: Add RUBY VERSION to
+ environment output.
+ * lib/rubygems/command.rb: Don't worry about duplicated command-line
+ options, OptionParser takes care of them for us.
+
+2007-07-22 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/specification.rb (Gem::Specification#files): Make it
+ faster
+ * lib/rubygems/command.rb: Better documentation. -v flag now lets you
+ get to "really verbose" mode which makes the verbose progress meter
+ work. Add command groups to separate types of commands easily.
+ * lib/rubygems/commands/which_command.rb, bin/gemwhich: Move `gemwhich`
+ under `gem`.
+ * lib/rubygems/commands/mirror_command.rb, bin/gem_mirror: Move
+ `gem_mirror` under `gem`.
+ * lib/rubygems/commands/lock_command.rb, bin/gemlock: Move `gemlock`
+ under `gem`.
+ * lib/rubygems/commands/server_command.rb, bin/gem_server: Move
+ `gem_server` under `gem`.
+ * lib/rubygems/doc_manager.rb (Gem::DocManager#initialize): Only raise
+ when operating on the filesystem.
+ * lib/rubygems/server.rb: Remove option processing, now in
+ Gem::Commands::ServerCommand.
+ * lib/rubygems/commands/generate_index.rb, bin/index_gem_repository.rb:
+ Move `index_gem_repository.rb` to `gem generate_index`.
+ * lib/rubygems/indexer (Gem::Indexer): Extract from
+ index_gem_repository.rb and merge RubyForge changes.
+ * lib/rubygems/command_manager.rb (Gem::CommandManager#run): Print
+ backtrace when --debug is set too.
+ * lib/rubygems/command_manager.rb (Gem::CommandManager#load_and_instantiate):
+ Don't infinitely loop in retry.
+ * bin/gemri: Removed. Everybody should have ri integration now.
+ * lib/rubygems/config_file.rb: Allow settings to be examined. Pull
+ settings from .gemrc.
+ * lib/rubygems/commands/environment_command.rb: Add ruby executable
+ and configuration settings to `gem env`.
+ * lib/rubygems/indexer/indexer.rb (Gem::Indexer::Indexer#build_index):
+ Now uses UserInteraction.
+ * various: Use UserInteraction for output.
+ * lib/gemconfigure.rb: Removed. Same as multiple gem commands.
+ * lib/rubygems/commands/contents_command.rb: Removed extra --verbose
+ option.
+ * lib/rubygems/gem_commands.rb (Gem::LocalRemoteOptions): Moved -B,
+ --source, -p from Gem::Commands::common_options.
+
+2007-07-22 Chad Fowler <chad@chadfowler.com>
+
+ * lib/rubygems/gem_commands.rb: Added another example to the gem
+ example output (Gile Bowkett)
+ * test/test_documentation_generation.rb, lib/rubygems/doc_manager.rb:
+ Added a test for documentation generation and fixed a bug when doc
+ location is not writable.
+
+2007-06-16 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/gem_path_searcher.rb (Gem::GemPathSearcher): Moved out
+ of lib/rubygems/custom_require.rb and added tests.
+
+2007-06-02 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/source_info_cache.rb (Gem::try_file): Fix for issue
+ where a non-existing source cache file causes the gem command to
+ not find a gem. This fixes it by marshalling out an empty
+ hash. (Thanks to Nick Sieger for this fix).
+
+2007-06-01 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems.rb
+ (Gem::OperationNotSupportedError::latest_partials): Changed from
+ match data style to $1 style regexp (on the recommendation of
+ better performance).
+
+2007-05-30 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/source_index.rb (Gem::SourceIndex::update):
+ Modified to get the bulk_threshhold from the configuration.
+ (Gem::SourceIndex::convert_specs): Ryan removed the "reduce_specs"
+ method because it is not needed any more and is creating memory
+ overhead.
+
+ * lib/rubygems/config_file.rb (Gem::ConfigFile): Added
+ bulk_threshhold field to ConfigFile.
+ (Gem::ConfigFile::initialize): Initialize bulk threshhold to 500.
+
+ * lib/rubygems/command.rb
+ (Gem::Command::specific_extra_args_hash): Added
+ -B (--bulk-threshhold) option to allow user specified bulk
+ download threshhold.
+
+2007-05-23 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/commands/sources_command.rb
+ (Gem::Commands::SourcesCommand::initialize): Added a --clear-all
+ option to the sources subcommand. Clear-all will remove the cache
+ files.
+
+ * lib/rubygems/source_info_cache.rb (Gem): Moved system_cache_file
+ and user_cache_file to class methods so that we can get the file
+ names without creating a SourceInfoCache instance.
+
+2007-05-23 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/source_info_cache.rb: Teach SIC to repair itself
+ when it encounters a bad cache file.
+
+2007-05-14 Chad Fowler <chad@chadfowler.com>
+ * lib/rubygems/command_manager.rb: Re-added registration for
+ gem cleanup command which I accidentally removed during refactoring.
+
+2007-05-10 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/remote_installer.rb: Uncommented the require
+ 'sources' line.
+
+ * lib/rubygems/source_info_cache.rb: Uncommented the require
+ 'sources' line.
+
+ * lib/rubygems/rubygems_version.rb (Gem): Bumped to version 0.9.3
+ in preparation for release.
+
+ * lib/rubygems/package.rb (Gem::TarInput::zipped_stream):
+ Zipped_stream now always uses the in memory string IO buffer.
+ There were just too many problems with ZLib (on windows)
+ otherwise.
+
+2007-03-26 Jim Weirich <jim@weirichhouse.org>
+
+ * (Index): new digest technique.
+
+ * lib/rubygems/validator.rb (Gem::Validator::verify_gem): Removed
+ really old MD5 and replaced with gem based digests.
+
+ * experimental/deployment.rb (Gem::Deployment::Manager::initialize):
+ New digest technique.
+
+ * experimental/test_deployment.rb (TestDeployment::test_deployed_file):
+ New digest technique.
+
+2007-03-26 Chad Fowler <chad@chadfowler.com>
+
+ * Extracted the big ball of mud that was gem_commands.rb into
+ separate files.
+
+2007-03-17 Chad Fowler <chad@chadfowler.com>
+
+ * Various ruby 1.8.6 fixes for failing tests.
+
+ * Updated setup.rb to 3.4.1
+
+ * Renamed cmd_manager to command_manager to keep names consistent
+
+ * lib/installer.rb: Rework path checking to use Pathname (ara howard bug #8811)
+
+2007-03-02 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems.rb: Add bin directory before library directory,
+ otherwise gems like rake don't work.
+
+2007-03-01 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/open-uri.rb: Fix all the infinite loop errors.
+
+ * lib/rubygems.rb: Add dirs from activate after -I and ENV['RUBYLIB']
+ dirs. Otherwise gems won't allow -I to work when #gem is called.
+
+2007-02-11 Chad Fowler <chad@chadfowler.com>
+
+ * test/gemutilities.rb: Fix to make Windows tests pass. (Anatol Pomozov)
+
+2007-02-05 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/rubygems_version.rb (Gem): Bumped to version 0.9.2
+ and made a release.
+
+2007-02-04 Chad Fowler <chad@chadfowler.com>
+
+ * Fixed failing tests (changed from assert_equal to assert_match to
+ deal with ARGV inconsistencies in test vs. production).
+
+2007-02-03 Jim Weirich <jim@weirichhouse.org>
+
+ * Bumped version to 0.9.1.1.
+
+ * lib/rubygems/gem_open_uri.rb: Added the patched open-uri back
+ into the gems software. Evidently, the 1.8 version of open-uri
+ does not handle authenticating proxies with username and password.
+
+ * lib/rubygems/source_info_cache.rb (Gem::cache_data): Added
+ rescue block to capture bad file loads. The original rescue was
+ only around the marshal load (bug was probably introduced when the
+ file data was preloaded into a string).
+ (Gem::set_cache_data): Added set_cache_data to be used during
+ testing to avoid reload the cache file over and over.
+
+ * lib/rubygems/gem_commands.rb: Added require for command class so
+ that this file can be loaded independently.
+
+ * lib/rubygems/source_index.rb (Gem::SourceIndex::outdated): Minor
+ cleanup.
+
+ * test/gemutilities.rb
+ (RubyGemTestCase::util_setup_source_info_cache): Minor cleanup
+
+ * test/test_gem_source_info_cache.rb
+ (TestGemSourceInfoCache::test_write_cache_user): Switched to using
+ set_cache_data here and several other places to avoid rereading
+ the cache data over and over again.
+
+2007-02-02 Chad Fowler <chad@chadfowler.com>
+
+ * lib/rubygems/gem_commands.rb:
+ Fixed gem unpack (broken since 0.9.1)
+
+2007-01-20 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/source_info_cache.rb (Gem::SourceInfoCache#cache_data):
+ Read the source_cache in binary mode for mswin.
+
+2007-01-16 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/rubygems_version.rb (Gem): Released 0.9.1.
+
+2007-01-15 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/installer.rb (Gem::Installer#extract_files): Only allow
+ installation to absolute directories. (Call File::expand_path first).
+ More informative message for attempting to install with bad path.
+ * post-install.rb: Install sources first, since its rather important.
+
+2007-01-14 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/source_info_cache.rb: require 'fileutils', as its
+ needed.
+
+2007-01-12 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/installer.rb (Gem::Installer#extract_files): Don't
+ allow gems to place files outside the installation directory. Fixes
+ bug 7751 by Gavin Sinclair.
+
+2007-01-08 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/specification.rb
+ (Gem::Specification::test_suite_file): Added rescue clause for
+ default_executable.
+ (Gem::Specification::add_bindir): Added rescue clause for
+ add_bindir.
+
+ * test/test_specification.rb
+ (TestSpecification::test_pathologically_bad_non_array_stuff_doesnt_goof_up_files):
+ Added a sanity check on hash for some pathologically bad case.
+ (TestSpecification::test_pathologically_bad_exectuables_doesnt_goof_up_hash):
+ Added sanity check for pathologically bad executables field.
+
+2007-01-08 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/gem_commands.rb (Gem::PristineCommand#execute): Better
+ messaging.
+ * lib/rubygems.rb, lib/rubygems/custom_require.rb: Correctly include
+ documentation for methods added to Kernel.
+
+2007-01-07 Eric Hodel <drbrain@segment7.net>
+
+ * Rakefile: Include GPL.txt. Fixes bug #7572 by David Lee.
+
+2007-01-06 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/rubygems_version.rb (Gem): Bumped to version
+ 0.9.0.9.
+
+ * lib/rubygems/specification.rb
+ (Gem::Specification::test_suite_file): Rewrote default_executable
+ to be a bit more explicit.
+ (Gem::Specification::add_bindir): Rewrote the 'files' accessor to
+ handle pathologically bad input.
+ (Gem::Specification::copy_of): Added as_array private method.
+
+ * Rakefile (package_version): Added '*.out' to clobber list.
+ Removed the broken-1.0.0.gem file from the clobber list.
+
+ * test/test_specification.rb
+ (TestSpecification::test_default_executable):
+ Seriously beefed up tests for certain specification issues.
+
+ * test/gemenvironment.rb (TestEnvironment::create): Added the 'f'
+ flag to deleting 'gemhome'.
+
+2006-12-30 Eric Hodel <drbrain@segment7.net>
+
+ * post-install.rb, lib/rubygems/server.rb: RubyGems now installs RDoc
+ and ri for itself.
+
+2006-12-28 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/installer.rb (Gem::Installer#build_extensions):
+ Extension build failures now raise Gem::Installer::ExtensionBuildErrors.
+
+2006-12-26 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/package.rb (Gem::Package::TarInput#initialize): Bad
+ packages now raise FormatError instead of a generic RuntimeError.
+ * lib/rubygems/installer.rb (Gem::Installer#install): Raise an
+ InstallError when we have a bad gem file.
+
+2006-12-25 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/custom_require.rb (Gem::GemPathSearcher::find):
+ Removed SUFFIX_PATTERN. Evidently this was miss during an earlier
+ attempt to remove it.
+ (Gem::GemPathSearcher::matching_file): Changed reference to
+ SUFFIX_PATTERN into a call to Gem.suffix_pattern.
+
+ * Removed tab characters from numerous source files.
+
+ * lib/rubygems/installer.rb (Gem::Uninstaller::uninstall): Removed
+ stray tab characters.
+
+ * lib/rubygems.rb (Kernel::require_gem): Added file and line
+ number information to require_gem worning (makes it easier to
+ track down those offending lines of code).
+ (Kernel::location_of_caller): Added helper function to determine
+ file and line number of caller.
+
+2006-12-25 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/installer.rb (Gem::Installer#app_script_text):
+ Simpler, more readable bin script.
+ * lib/rubygems/gem_commands.rb (Gem::PristineCommand#execute):
+ Regenerate bin scripts. This will clean up require_gem in scripts.
+
+2006-12-24 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/remote_fetcher.rb (Gem::RemoteFetcher#fetch_path):
+ Rescue various errors and return a more-friendly error.
+
+2006-12-23 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/command.rb lib/rubygems/gem_commands.rb: Make help
+ output fit in 80 columns.
+ * lib/rubygems/rubygems_version.rb: Bump version to 0.9.0.8, beta
+ time! (Oops, didn't go into beta.)
+
+2006-12-20 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/remote_fetcher.rb (Gem::RemoteFetcher#fetch_size): Give
+ a sensible error on bad URIs.
+ * lib/rubygems/gem_commands.rb (Gem::SourceCommand): Allow management
+ of sources in source_cache. Fixes bug #1128.
+ * lib/rubygems.rb (Kernel#require_gem): Add deprecation warning in
+ favor of gem.
+
+2006-12-19 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/installer.rb (Gem::ExtBuilder): Refactored for
+ uniformity.
+ * lib/rubygems/remote_installer.rb
+ (Gem::RemoteInstaller#specs_n_sources_matching): Don't display gems
+ that can't be installed.
+ * lib/rubygems.rb, pre-install.rb: Fix installation errors on 1.9.
+ Fixes bug #4536 by Ryan Davis.
+ * lib/rubygems/source_index.rb, lib/rubygems/gem_commands.rb,
+ lib/rubygems-custom_require.rb: Use File.join with glob strings.
+ Fixes bug #1096 submitted by Chad Fowler.
+ * lib/rubygems/remote_installer.rb
+ (Gem::RemoteInstaller#install_dependencies): Make --force actually
+ force. Fixes bug #7365 by Robert James.
+
+2006-12-18 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/gem_commands (Gem::OutdatedCommand): Add a way to see
+ which gems are out-of-date.
+
+ * setup.rb: Ignore errors for .config and InstalledFiles when
+ the source path is read-only/NFS. Fixes bugs #1395 and #1374. Patch
+ by Ryan Davis.
+
+ * bin/gem_server: Pull code out into lib/rubygems/server.rb for
+ reusability. Closes Feature Request #2220 by Chris Morris.
+
+2006-12-16 Chad Fowler <chad@chadfowler.com>
+
+ * test/: Added functional test for extension gems proving that
+ non-compiling extensions don't result in success message.
+
+ * lib/rubygems/specification.rb: Raise exception if loaded spec is
+ nil. Closes bug #7299.
+
+ * test/gemenvironment.rb: Clean out gemhome every time to avoid dirty
+ directory failing tests.
+
+ * lib/rubygems/installer.rb: Change uninstall to require a full gem
+ name (not a partial match). Fixes bug #6007 and related unreported
+ issues.
+
+2006-12-15 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/installer.rb (Gem::Uninstaller): Correctly uninstall
+ executables if GEM_HOME is set. Patch #2264 by Sylvain Joyeux.
+
+ * lib/rubygems.rb (Gem::loaded_specs): Expose list of currently loaded
+ gems.
+
+ * lib/rubygems/gem_commands (Gem::UninstallCommand): Allow multiple
+ gems to be uninstalled at once.
+
+2006-12-14 Eric Hodel <drbrain@segment7.net>
+
+ * post-install.rb: Don't attempt to read unreadable files. Fixes
+ bug #2851.
+
+2006-12-13 Eric Hodel <drbrain@segment7.net>
+
+ * pre-install.rb.rb, post-install.rb: Don't call manage_gems because
+ we don't have sources installed yet. Bump version requirement to
+ 1.8.2 since rubygems/open-uri.rb was removed. Should fix bug #6206.
+
+ * lib/rubygems/installer.rb (Gem::Installer#build_extensions): Capture
+ stderr into results when building extensions.
+
+ * lib/rubygems/gem_commands.rb (Gem::ContentsCommand): Allow version
+ to be passed to gem contents. Not backwards compatible, -v now -V and
+ vice versa. Select newest gem for contents. Fixes bugs #2723, #7225.
+ Patches by Sava Chankov, Tom Pollard.
+
+ * lib/rubygems/gem_commands.rb (Gem::InstallCommand#execute): Allow
+ install errors to result in non-zero exit code. Fixes bug #2773.
+
+2006-12-03 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/remote_installer.rb (Gem::RemoteInstaller#install):
+ Add :cache_dir option to override the default.
+
+ * lib/rubygems/remote_installer.rb (Gem::RemoteInstaller#download_gem):
+ Check cache to see if the gem has been cached before downloading.
+
+2006-12-02 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems.rb (Gem::OperationNotSupportedError::suffixes,
+ Gem::OperationNotSupportedError::suffix_pattern): Removed
+ duplicate copies of the SUFFIX_PATTERN by providing a global
+ method Gem.suffixes and Gem.suffix_pattern.
+
+ * lib/rubygems/remote_fetcher.rb (Gem::open_uri_or_path): Reworked
+ the connection options for the open-uri call. Since we are not
+ using the rubygems supplied open_uri, we can use some new options
+ available that make proxy handling much easier.
+ (Gem::file_uri): Renamed is_file_uri to file_uri?.
+
+ * lib/rubygems/loadpath_manager.rb (Gem::LoadPathManager::self):
+ Added .jar to list of suffixes.
+
+ * test/functional.rb (FunctionalTest::test_env_remotesources):
+ Changed test to uses Gem.sources (the sources method on
+ remote_fetcher was removed).
+
+ * test/test_remote_fetcher.rb (TestRemoteFetcher): Renamed some of
+ the test constants and instance variables so that they were more
+ consistent and explained the tests a wee bit better.
+ (TestRemoteFetcher::test_no_proxy): Added assert_data_from_server
+ and assert_data_from_proxy to make it clear what the test was
+ doing and give better error messages on errors.
+ (TestRemoteFetcher::assert_data_from_server): Added
+ assert_data_from_server.
+ (TestRemoteFetcher::assert_data_from_proxy): Added
+ assert_data_from_proxy.
+
+2006-11-30 Chad Fowler <chad@chadfowler.com>
+
+ * lib/rubygems/open-uri.rb: Removed the duplicated library.
+
+2006-11-30 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/specification (Gem::Specification#eql?): Allow gemspecs
+ to be used intelligently with Array#- and Array#uniq.
+
+ * lib/rubygems/installer.rb: Return extension-building results in
+ Exception on build failure.
+
+ * lib/rubygems/remote_installer.rb: Ensure gems with similar names
+ cannot be matched for install. (Broken when searching was removed
+ from RemoteInstaller.)
+
+2006-11-29 Eric Hodel <drbrain@segment7.net>
+
+ * post-install.rb: Now requires rbconfig.
+
+ * lib/rubygems/specification.rb, lib/rubygems/version.rb: Fixed many
+ ivar warnings due to YAML specs.
+
+ * lib/rubygems/validator.rb, lib/rubygems/validator.rb
+ (Gem::Validator#unit_test Gem::RemoteInstaller::): Ensure the
+ current directory is restored.
+
+ * lib/rubygems/remote_fetcher.rb, lib/rubygems/remote_installer.rb,
+ lib/rubygems/installer.rb: Raise more-friendly and less-deadly errors.
+
+ * lib/rubygems/remote_installer.rb (Gem::RemoteInstaller#install):
+ Create version requirement correctly.
+
+ * lib/rubygems/remote_installer.rb
+ (Gem::RemoteInstaller#find_gem_to_install): Allow RemoteInstaller to
+ work with SilentUI.
+
+ * lib/rubygems/remote_fetcher.rb (RemoteFetcher#open_uri_or_path):
+ Don't double-require open-uri.
+
+2006-11-27 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/specification.rb
+ (Gem::Specification#default_executable): Fixed bug where @executables
+ could be nil when loaded from index.
+
+2006-11-21 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/source_index.rb (Gem::SourceIndex#latest_specs): Grab
+ the latest versions of everything in the index. Written by Ryan
+ Davis.
+
+2006-11-20 Rich Kilmer <rich@infoether.com>
+
+ * lib/rubygems/cmd_manager.rb: Added PristineCommand
+
+ * lib/rubygems/gem_commands.rb: Added PristineCommand to restore
+ gems to pristine condition in the event of files begin deleted
+ based on the cached .gem file
+
+2006-11-19 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/*_fetcher.rb: Removed code specific to remote source
+ index updating.
+
+ * lib/rubygems/remote_installer.rb (Gem::RemoteInstaller#search):
+ Moved to Gem::SourceInfoCache#search
+
+ * lib/rubygems/source_info_cache.rb: Taught to update itself
+
+ * lib/rubygems/source_info_cache_entry.rb: Taught to update itself
+
+ * lib/rubygems/source_index.rb: Taught to update itself from a uri.
+
+2006-11-18 Chad Fowler <chad@chadfowler.com>
+
+ * lib/rubygems/installer.rb: Applied Kevin Clark's patch to make
+ RubyGems recognize mkrf files.
+
+2006-11-17 Eric Hodel <drbrain@segment7.net>
+
+ * test/test_remote_fetcher.rb: Don't allow files in Dir.pwd to make
+ tests fail. Spotted by Chad Fowler.
+
+ * lib/rubygems/remote_installer.rb (Gem::RemoteFetcher,
+ Gem::CacheFetcher): Break out of remote_installer.rb into separate
+ files.
+
+ * lib/rubygems/remote_installer.rb (Gem::SourceInfoCache,
+ Gem::SourceInfoCacheEntry): Allow requiring just the source cache
+ without the remote fetcher.
+
+2006-11-16 Eric Hodel <drbrain@segment7.net>
+
+ * test/test_local_cache.rb: Moved to better name
+
+ * test/test_gem_source_info_cache.rb: Renamed test methods to match
+ implementations. Sorted test names.
+
+ * lib/rubygems/remote_installer (Gem::SourceInfoCache): cache_data no
+ longer resets dirty flag. Sped up source cache loading. Exposed
+ cache file name in use.
+
+2006-11-15 Eric Hodel <drbrain@segment7.net>
+
+ * test/, lib/: Made files -w clean.
+
+ * test/: Made tests run independently.
+
+ * Rakefile: Tests now run with warnings on.
+
+2006-11-14 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/user_interaction.rb (Gem::StreamUI#progress_reporter):
+ Fix for Gem.configuration.verbose = nil, false
+
+ * lib/rubygems.rb (Gem::configuration): Fix RakeFileUtils pollution.
+
+2006-10-05 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/installer.rb (Gem::Installer::shebang): Updated to
+ optionally call env_shebang if the command line option is set.
+ (Gem::Installer::shebang_env): Added this method.
+
+2006-09-25 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/rubygems_version.rb (Gem): Bumped to version
+ 0.9.0.6.
+
+ * lib/rubygems/security.rb (Gem::Security::Exception): Added
+ permissions for cert files and directories.
+ (Gem::Security::Policy::verify_gem): File.exists? => File.exist?
+ (Gem::Security::self.verify_trust_dir): Beefed up code to create
+ trust directory structure.
+ (Gem::Security::self): Apply permissions when creating trust
+ files.
+
+ * lib/rubygems/package.rb (TarInput::initialize): File.exists? =>
+ File.exist?
+
+2006-09-24 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems.rb
+ (Gem::OperationNotSupportedError::configuration): Added
+ method_missing to configuration hash to allow nicer reference
+ syntax.
+
+2006-09-22 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/remote_installer.rb
+ (Gem::RemoteSourceFetcher::initialize): Proxy patch fixup to
+ escape user/password from Anatol Pomozov.
+ (Gem::RemoteSourceFetcher::connect_to): Proxy patch fixup to
+ escape user/password from Anatol Pomozov.
+
+ * test/test_remote_fetcher.rb (TestRemoteFetcher::setup): Proxy
+ patch fixup to escape user/password from Anatol Pomozov.
+ (TestRemoteFetcher::test_no_proxy): Proxy patch fixup to escape
+ user/password from Anatol Pomozov.
+
+ * test/io_capture.rb (Gem::IoCapture): Created new IoCapture
+ module to handle capturing output of code under test.
+
+ * test/test_installer.rb
+ (TestInstaller::test_generate_bin_symlinks_win32): Removed ugly
+ $TESTING hack and substituted new io capture module.
+ (TestInstaller::test_install_with_message): Removed one-off stdout
+ capture and replaced with new IO Capture module.
+
+2006-09-19 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/rubygems_version.rb (Gem): Bumped to version
+ 0.9.0.3.
+
+ * test/test_version_comparison.rb (TestRequirementEquality): Added
+ more tests for Dependency equality testing and one additions check
+ for requirement vs non-requirement equality.
+
+ * lib/rubygems/version.rb (Gem::Dependency::==) Fixed '=' bug in
+ '==' code.
+
+2006-09-18 Chad Fowler <chad@chadfowler.com>
+
+ * lib/rubygems/remote_installer.rb
+ Only show the last 3 gem versions on a multiplatform remote
+ install list.
+
+2006-09-18 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/remote_installer.rb
+ (Gem::RemoteInstaller::install): Added Hugh Sasse's patch for
+ skipping gems on install.
+
+ * lib/rubygems/rubygems_version.rb (Gem): Bumped to 0.9.0.2.
+
+ * lib/rubygems/version.rb (Gem::Dependency::hash): Added hash code
+ --http-proxy, the ENV var http_proxy and with no proxy.
+
+2006-08-26 Jim Weirich <jim@weirichhouse.org>
+ * lib/rubygems/remote_installer.rb
+ (Gem::RemoteInstaller::download_gem): Fixed download_gems so that
+ it properly passes the proxy option to the fetcher class. (based
+ on patch by Andy Shen).
+
+2006-08-12 Jim Weirich <jim@weirichhouse.org>
+
+ * bin/index_gem_repository.rb (Indexer::sanitize): Added a
+ sanitize step to the gem index generation in the hope of avoiding
+ problems with non-ASCII names in the yaml data.
+
+2006-06-14 Jim Weirich <jim@weirichhouse.org>
+
+ * Rakefile (announce): Added 1.9 hack for ENV['CERT_DIR']. Remove
+ this in the future if 1.9 behavior changes.
+
+2006-06-13 Jim Weirich <jim@weirichhouse.org>
+
+ * Rakefile: ENV['CERT_DIR'] is now '' rather than nil.
+
+ * lib/rubygems/specification.rb (Gem::Specification::initialize):
+ Eric added some 1.9 compatibility code (funcall vs send).
+
+ * lib/rubygems/package.rb (TarOutput::self): Eric added some 1.9
+ compatibility code (funcall vs send).
+
+ * experimental/deployment.rb (Gem::Deployment): Moved the
+ deployment code out of the live code base into the experimental
+ directory. The code wasn't used and the tests were not all
+ passing.
+
+2006-06-11 Jim Weirich <jim@weirichhouse.org>
+
+ * bin/gemri: Added gemri to bin directory.
+
+ * lib/rubygems/custom_require.rb (Gem::GemPathSearcher::find):
+ Added .rbw to suffix pattern in custom_require.
+
+2006-06-07 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems.rb: Added copyright notices to all Ruby files.
+
+2006-04-07 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/gem_commands.rb (Gem::RDocCommand::execute): Added
+ RI option to the rdoc subcommand.
+
+2006-04-05 Jim Weirich <jim@weirichhouse.org>
+
+ * test/test_parse_commands.rb
+ (TestParseCommands::test_parsing_update_options): Fixed unit tests
+ to assert that the install dir is expanded.
+
+ * lib/rubygems/doc_manager.rb (Gem::DocManager::generate_ri):
+ Break out from generate_rdoc to support installing all RI docs
+ first.
+
+ * lib/rubygems/gem_commands.rb
+ (Gem::InstallUpdateOptions::add_install_update_options): Expanded
+ repository directory to absolute path.
+ (Gem::InstallCommand::execute): Make sure that *all* of the RI
+ documents are generated before generating any RDocs (due to a bug
+ in the RDoc library).
+
+ * lib/rubygems/installer.rb (Gem::ExtExtConfBuilder::self): Fixed
+ typo in ExtExtConfBuilder that prevented C based gems to install.
+ (Gem::ExtExtConfBuilder::self): Installed patch to prevent the
+ overriding of target_prefix in native extensions (thanks to Aaron
+ Patterson for the patch).
+
+2006-04-04 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/rubygems_version.rb (Gem): Bumped to version
+ 0.8.11.10.
+
+ * lib/rubygems/incremental_fetcher.rb
+ (Gem::IncrementalFetcher::update_cache): Now falls back to bulk
+ updates if the number of gems if over 50.
+
+ * lib/rubygems/remote_installer.rb
+ (Gem::RemoteSourceFetcher::source_index): Added "bulk" to the
+ update message to differentiate it from the incremental message.
+
+ * lib/rubygems/specification.rb
+ (Gem::Specification::Specification): Modified to add dashes to
+ gemspecs generated under Ruby 1.8.3. This makes it easier to run
+ RubyGems on a 1.8.2 system.
+
+2006-04-01 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/doc_manager.rb (Gem::DocManager::run_rdoc): Changed
+ exception handler to print error message if document generation
+ fails, but then to continue with the rest of the installation.
+ Permission errors still terminate the install because if one
+ install fails because of permission problems, chances are that all
+ will fail.
+ (Gem::DocManager::install_ri): Removed wrapping of exceptions with
+ DocumentError. Most exceptions now don't propagate out of
+ run_rdoc.
+ (Gem::DocManager::install_rdoc): Removed wrapping of exceptions
+ with DocumentError. Most exceptions now don't propagate out of
+ run_rdoc.
+
+2006-02-23 Jim Weirich <jim@weirichhouse.org>
+
+ * bin/index_gem_repository.rb (MasterIndexBuilder::cleanup): Fixed
+ bug where we were trying to read the index file (to compress it)
+ before it was closed, often leading to a truncated index file.
+
+Tue Jan 24 16:26:13 2006 Chad Fowler <chad@chadfowler.com>
+ * lib/rubygems/config_file.rb
+ Luca Pireddu reported a fatal error when permissions on
+ .gemrc were too restrictive. Fixed.
+
+Tue Dec 6 14:51:13 2005 Jim Weirich <jim@tardis>
+
+ * lib/rubygems/source_index.rb
+ (Gem::SourceIndex::load_specification): Added an untaint call to
+ make the code run in SAFE=1 mode under 1.8.3.
+ (Gem::SourceIndex::load_gems_in): Untaint here too.
+
+ * lib/rubygems/installer.rb (Gem::Installer::install): Untaint
+ here too.
+ (Gem::Installer::extract_files): Untaint here too.
+
+ * lib/rubygems/custom_require.rb
+ (Gem::GemPathSearcher::matching_file): Untaint here too.
+
+ * test/gemenvironment.rb: Added $SAFE=1 to the test environment to
+ make sure we can run in $SAFE mode.
+
+2005-12-03 Jim Weirich <jim@tardis>
+
+ * lib/rubygems/rubygems_version.rb (Gem): Bumped version to
+ 0.8.11.6'
+
+ * lib/rubygems/user_interaction.rb
+ (Gem::StreamUI::SimpleProgressReporter::done): Added several new
+ progress reporters.
+
+ * lib/rubygems/command.rb
+ (Gem::Command::specific_extra_args_hash): Added --verbose
+ processing.
+
+ * lib/rubygems/config_file.rb (Gem::ConfigFile::handle_arguments):
+ Added --traceback as alias for --backtrace (I always get them
+ confused).
+ (Gem::ConfigFile::initialize): Added a verbose option.
+
+2005-11-28 Jim Weirich <jim@tardis>
+
+ * lib/rubygems/remote_installer.rb
+ (Gem::SourceInfoCacheEntry::replace_source_index): Fixed the
+ SourceIndexCacheEntry so that it will manufacture an empty source
+ index if given a nil value for the +si+ value.
+
+2005-11-08 Chad Fowler <chad@chadfowler.com>
+ * lib/rubygems.rb: Ara Howard's fix to allow 0.0.0 to be a valid gem
+ version.
+
+2005-11-08 Chad Fowler <chad@chadfowler.com>
+ * lib/rubygems/gem_commands.rb: Fixed bug in gem unpack. It was
+ sorting incorrectly, resulting in the wrong version being unpacked in
+ some edge cases. Thanks to Jakob Skjerning for the detailed bug report.
+
+2005-11-03 Chad Fowler <chad@chadfowler.com>
+ * lib/rubygems/installer.rb: Fixed bug that would cause the executables
+ from the wrong gem to be uninstalled if the names matched the same
+ regex. Thanks Eric Hodel.
+
+2005-11-01 Jim Weirich <jim@tardis>
+ * lib/rubygems/gem_commands.rb (Gem::UpdateCommand::initialize):
+ Upgrade => Update change.
+ (Gem::UpdateCommand::execute): Upgrade => Update change.
+ (Gem::UpdateCommand::execute): Upgrade => Update change.
+
+2005-11-01 Chad Fowler <chad@chadfowler.com>
+ * lib/rubygems/gem_commands.rb: Allow gem unpack to accept a gem file
+ path instead of gem name: gem unpack mygem-1.0.0.gem.
+
+2005-10-31 Chad Fowler <chad@chadfowler.com>
+ * lib/rubygems/installer.rb: Tilman Sauerbeck's patch to support
+ extensions built with Rake!
+
+2005-09-13 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/package.rb (TarInput::initialize): Removed
+ requirement for SSL when signatures are found in a gem. Only
+ require SSL if the security policy requires checking the
+ signatures.
+
+ * lib/rubygems/custom_require.rb (Kernel::require): Disabled
+ autorequire during custom require.
+
+2005-09-07 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/gem_openssl.rb (Gem::ensure_ssl_available): Added a
+ test in gem_openssl to make sure the ruby portion of ssl is also
+ loaded.
+
+2005-08-31 Jim Weirich <jim@weirichhouse.org>
+
+ * Rakefile (install): Changed the rake install task to use setup.rb.
+
+2005-07-08 Chad Fowler <chad@chadfowler.com>
+
+ * lib/rubygems/remote_installer.rb: Applied Daniel Roux's patch
+ to make RubyGems work with authenticating proxies.
+
+2005-07-08 Jim Weirich <jim@weirichhouse.org>
+
+ * Preparing for release 0.8.11.
+
+2005-06-12 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/installer.rb
+ (Gem::Installer::installation_satisfies_dependency): Refactored
+ dependency check into ensure_dependency! and
+ installation_satisfies_dependency?.
+
+2005-06-12 Chad Fowler <chad@chadfowler.com>
+ * lib/rubygems.rb,lib/rubygems/installer.rb: Applied Mark Hubbart's
+ * lib/rubygems/remote_installer.rb: Applied David Glasser's install-
+ * Applied Paul Duncan's incredibly complete gem signing patch.
+ Thanks, Paul!
+ * lib/rubygems/installer.rb: Fixed bug in installer that caused
+ dependency installation not to work.
+
+2005-06-06 Chad Fowler <chad@chadfowler.com>
+ * lib/rubygems/specification.rb: Fixed Erik hatcher's reported bug
+ of gem directories having "-" at the end of their names (e.g.
+ "BlueCloth-1.0.0-".
+
+2005-06-01 Jim Weirich <jim@weirichhouse.org>
+
+ * scripts/specdoc.rb (_resolve_links): Updated to generate hieraki
+ format so it can be included in the docs.rubygems.org site.
+
+ * test/test_specification.rb (TestSpecification::test_to_ruby):
+ Fixed test on date that hard-coded a specific date.
+
+2005-05-29 Jim Weirich <jim@weirichhouse.org>
+
+ * Changes from the Seattle Code fest: (1) Package list command
+ (e.g. gem inspect GEM). (2) .gemrc settings now allow cvsrc like
+ options to set defaults per subcommand. (3) The autorequire spec
+ attribute will now accept a list. (4) Binwrappers vs symlinks
+ (more info to follow). (5) Substituted Time for Date in specs,
+ increasing performance dramatically in an important area.
+
+2005-05-04 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems.rb (Gem::Exception::find_home): Changed rescue
+ clause from Exception to StandardError. Exception doesn't seem to
+ catch everything ... I'm not sure I understand why.
+
+2005-04-29 Chad Fowler <chad@chadfowler.com>
+ * lib/rubygems/specifiation.rb: Marcel Molina's patch to discover
+ which attributes in the spec are Array attributes.
+
+2005-04-27 Chad Fowler <chad@chadfowler.com>
+ * lib/rubygems/gem_commands.rb: -y is now a synonym for
+ --include-dependencies
+
+2005-04-21 Chad Fowler <chad@chadfowler.com>
+ * lib/rubygems/installer.rb: Added non-require_gem dependency check
+ for installation.
+
+2005-04-03 Chad Fowler <chad@chadfowler.com>
+
+ * pre-install.rb: Added version check to RubyGems installation.
+
+2005-03-25 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/rubygems_version.rb (Gem): Created release for
+ 0.8.10.
+
+ * lib/rubygems/gem_commands.rb
+ (Gem::UpdateCommand::do_rubygems_update): Update --system now runs
+ the ruby command directly rather than trying to load the
+ update-rubygems command. There were too many things to go wrong
+ with the old way.
+
+2005-03-24 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/remote_installer.rb
+ (Gem::RemoteInstaller::find_dependencies_not_installed): Fixed to
+ reload source index before attempting to detect dependencies.
+
+2005-03-23 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/remote_installer.rb
+ (Gem::RemoteInstaller::find_dependencies_not_installed): Switched
+ to using SourceIndex#find_name to detect missing dependencies,
+ avoiding a gem activation during an install.
+
+ * lib/rubygems/installer.rb (Gem::Installer::install): Removed
+ activate call from install step. If we need to do something about
+ dependencies at this time, then we need a better way to do them.
+
+ * lib/rubygems.rb: Removed the require for rubygems/timer.
+
+2005-03-16 Jim Weirich <jim@weirichhouse.org>
+
+ * test/gemenvironment.rb (TestEnvironment::create): Added require
+ on gem/builder.
+
+ * lib/rubygems/source_index.rb (Gem::SourceIndex::initialize):
+ Allowing default argument to new to be an empty hash.
+ (Gem::SourceIndex::from_installed_gems): Refactored into a class
+ method that invokes a instance method.
+ (Gem::SourceIndex::refresh): Refresh now does a complete reload
+ from disk. This should be more accurate that the earlier version.
+
+ * lib/rubygems/installer.rb (Gem::Uninstaller::uninstall): removed
+ unneeded refresh!.
+
+ * lib/rubygems.rb (Gem::Exception::source_index): Removed
+ automatic refresh from Gem.source_index ... it wasn't reliable
+ when removing installed gems.
+ (Gem::Exception::activate): Added detection of previously loaded
+ gems.
+
+2005-03-15 Chad Fowler <chad@chadfowler.com>
+
+ * bin/gem_server: (htonl) rdoc opens in existing browser window.
+
+2005-03-14 Jim Weirich <jim@weirichhouse.org>
+
+ * Released 0.8.8
+
+2005-03-14 Jim Weirich <jim@weirichhouse.org>
+
+ * Released 0.8.7
+
+2005-03-13 Gavin Sinclair <gsinclair@soyabean.com.au>
+
+ * lib/rubygems/installer.rb (Gem::Installer#shebang): Refactored and
+ stripped result to avoid ^M issues.
+
+2005-03-11 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/gem_commands.rb (Gem::DependencyCommand): Added a
+ new command "gem dependency" to show the dependencies of an
+ installed gem.
+
+ * lib/rubygems/cmd_manager.rb (Gem::CommandManager::initialize):
+ Added DependencyCommand to the command manager registrar.
+
+ * lib/rubygems/version.rb (Gem::Requirement): Unnested Requirement
+ from the Version class. There was no benefit to having it nested.
+ Gem::Version::Requirement is set to point to the new class so to
+ be compatible with old gems.
+
+ * lib/rubygems/installer.rb (Gem::Uninstaller::ask_if_ok): Changed
+ uninstaller confirm message to read 'Continue with uninstall'.
+ Its clearer that way.
+
+ * lib/rubygems.rb (Gem::Exception::required_location): Switch to
+ use SourceIndex#find_name rather than search. Made sure a nil
+ value is returned with a path is not found.
+
+ * lib/rubygems/source_index.rb (Gem::SourceIndex::search): Changed
+ parameter name to gem_pattern to emphasize using Regex in search.
+ (Gem::SourceIndex::find_name): Added find_name to handle the
+ common case of searching for an exact match on the short name.
+
+ * lib/rubygems.rb (Gem::Exception::activate): Make sure that
+ activate more closely adheres to honoring the auto_require=>false
+ request.
+ (Gem::Exception::report_activate_error): Out of line error
+ reporting for activate.
+
+ * lib/rubygems/remote_installer.rb
+ (Gem::RemoteInstaller::find_dependencies_not_installed): Found
+ another location that was using require_gem with auto_require.
+ Fixed to use :auto_require=>false.
+
+ * lib/rubygems/gem_commands.rb
+ (Gem::InstallUpdateOptions::add_install_update_options): Added
+ --ignore-dependencies option. Still needs to be wired to logic.
+
+ * lib/rubygems/installer.rb (Gem::Installer::install): Added call
+ to require_gem_with_options.
+
+ * lib/rubygems.rb (Kernel::require_gem_with_options): Added to
+ allow easier specification of the autorequire flag for
+ Gem.activate.
+
+2005-03-10 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/remote_installer.rb
+ (Gem::RemoteSourceFetcher::normalize_uri): Normialize a URI to
+ start with http:// if it does not already.
+
+ * test/test_deployment.rb (TestDeployment::xtest_deploy_sources):
+ Disabled this test. It is part of the new deployment software and
+ is not working yet.
+
+2005-03-09 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/gemconfigure.rb (Gem::self): Added to aid dynamic
+ versioning.
+
+ * lib/rubygems/command.rb (Gem::Command::command_manager): Moved
+ command_manager to base class.
+
+ * lib/rubygems/gem_commands.rb (Gem::CleanupCommand::execute):
+ Both implicit and explicit gems now work with cleanup.
+
+2005-03-08 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/installer.rb (Gem::Uninstaller::ok_to_remove):
+ Fixed source index to be loaded from the installed gems when doing
+ an "OK TO REMOVE" dependency check.
+
+2005-03-06 Rich Kilmer <rich@infoether.com>
+ * lib/rubygems/deployment.rb: beginning of a deployment capability
+
+ * test/test_deployment.rb: first tests of new deployment system
+
+2005-03-04 Chad Fowler <chad@chadfowler.com>
+ * lib/rubygems/gem_commands.rb: Small bugfix for the case when you
+ pass in a gem name (or more) to cleanup for the cleanup command.
+
+2005-03-04 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/installer.rb (Gem::Uninstaller::ok_to_remove):
+ Reworked logic in uninstall to be intelligent about dependencies.
+ We only complain about dependencies if removing a gem will cause a
+ dependency error. The uninstaller now checks for :ignore, :all
+ and :executables options.
+
+ * lib/rubygems/cmd_manager.rb (Gem::CommandManager::initialize):
+ Registered Cleanup command.
+
+ * lib/rubygems/gem_commands.rb (Gem::CleanupCommand): Added
+ Cleanup command to gem.
+ (Gem::UninstallCommand::initialize): Added --all, --ignore and
+ --executables options to uninstall. This helps to avoid excessive
+ YESes all the time.
+
+2005-02-28 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/remote_installer.rb
+ (Gem::LocalSourceInfoCache::write_cache): Open cache file in
+ binary mode.
+
+2005-02-28 Chad Fowler <chad@chadfowler.com>
+ * lib/rubygems/config_file.rb: don't warn about not being able to
+ find config file.
+ * lib/rubygems/doc_manager.rb: (for DHH) don't install rdoc docs for
+ * lib/rubygems/gem_commands.rb: Print which gems are updated on 'gem
+ update'. If --system is used, report that the rubygems system
+ software has been updated.
+ * lib/rubygems/installer.rb: Cleaned up the uninstall has_dependents
+ logic and output. It was misleading and buggy before.
+
+2005-02-27 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/config_file.rb
+ (Gem::ConfigFile::default_config_file_name): Fixed bug in finding
+ home directory for the .gemrc file.
+
+2005-02-27 Chad Fowler <chad@chadfowler.com>
+
+ * Released 0.8.6
+
+ * Fixed a small bug with shebang construction
+
+2005-02-26 Jim Weirich <jim@weirichhouse.org>
+
+ * Released 0.8.5
+
+ * lib/rubygems/doc_manager.rb (Gem::DocManager::generate_rdoc):
+ Removed warning about generating rdocs on gems w/o an rdoc flag.
+
+ * lib/rubygems/gem_commands.rb
+ (Gem::UpdateCommand::do_rubygems_update): Added --system option to
+ update to specifically update the version of rubygems.
+ (Gem::UpdateCommand::which_to_update): Fixed some refactoring bugs
+ in the which_to_update method.
+
+ * lib/rubygems/remote_installer.rb
+ (Gem::LocalSourceInfoCache::read_cache): switched to Marshal
+ rather than Yaml for local cache.
+
+ * bin/gem: Added requirement for Ruby >= 1.8.0.
+
+2005-02-10 Chad Fowler <chad@chadfowler.com>
+ * bin/gem_server: Added Martin Ankerl's wonderful new gem_server
+ template
+
+2005-01-27 Chad Fowler <chad@chadfowler.com>
+ * lib/rubygems/gem_commands.rb: Fixed
+ `gem update` so it accepts a list of gems to update and _only_
+ updates those.
+ * lib/rubygems/installer.rb: Fixed a bug in the new shebang code.
+ * lib/rubygems/remote_installer.rb: Attempt to fix Curt Hibbs'
+ reported Proxy bug without actually having a proxy to test with.
+
+2005-01-22 Chad Fowler <chad@chadfowler.com>
+ * lib/rubygems/custom_require.rb: Lyle Johnson's fix for Bug #1379
+
+2005-01-20 Chad Fowler <chad@chadfowler.com>
+ * lib/rubygems/validator.rb: Applied Austin Ziegler/Kasper Schiess's
+ patch to fix unit test running bug.
+
+2005-01-14 Chad Fowler <chad@chadfowler.com>
+ * lib/rubygems/installer.rb: attempt at fixing Ryan Davis's
+ reported Shebang bug. STILL NOT WORKING, because it doesn't work
+ with ^M characters.
+ * lib/rubygems/config_file.rb: small but ugly error fixed if no
+ config file exists.
+ * lib/rubygems/remote_installer.rb: Fixed bug http://rubyforge.org/tracker/index.php?func=detail&aid=1331&group_id=126&atid=575.
+
+2005-01-01 Chad Fowler <chad@chadfowler.com>
+ * Released 0.8.4
+
+2004-12-31 Jim Weirich <jim@weirichhouse.org>
+
+ * Rakefile: Switch to standard Rake test tasks.
+
+ * lib/rubygems/remote_installer.rb
+ (Gem::RemoteSourceFetcher::read_data): Added a retry to try a
+ lower case gem name if the open failed. This fixes a problem
+ where case differences are preventing some gems from installing.
+
+2004-12-29 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/gem_commands.rb (Gem::InstallCommand::execute):
+ Changed the RemoteInstaller to take an options hash rather than
+ individual options. This will leave the interface more resilient
+ to changes as more options are added
+ (e.g. --install_dependencies).
+
+ * lib/rubygems/specification.rb (Gem::Specification): Marked array
+ attributes explicitly. This allows for explicit conversion to
+ arrays when assigned.
+
+ * test/test_specification.rb
+ (TestSimpleSpecification::test_array_attributes): Added test for
+ array_attributes forcing values to arrays.
+
+2004-12-28 Jim Weirich <jim@tardis>
+
+ * lib/rubygems.rb (Gem::Exception::ensure_gem_subdirectories):
+ Fixed the Ryan Davis patch to work correctly when directories are
+ not writable.
+
+2004-12-18 Chad Fowler <chad@chadfowler.com>
+ * lib/rubygems/version.rb: Erik Veenstra's sort patch.
+ * lib/rubygems.rb: Ryan Davis's installation bug fix.
+
+2004-12-14 Gavin Sinclair <gsinclair@soyabean.com.au>
+
+ * test/test_loadmanager.rb: invalidated it as a unit test; it's
+ incompatible with custom_require.rb.
+
+2004-12-12 Gavin Sinclair <gsinclair@soyabean.com.au>
+
+ * lib/rubygems/custom_require.rb: simple bug fix.
+
+2004-12-12 Gavin Sinclair <gsinclair@soyabean.com.au>
+
+ * lib/rubygems/custom_require.rb: new file to replace
+ loadpath_manager.rb and speed up the custom require functionality.
+
+ * lib/rubygems/timer.rb: new file; simple benchmarking tool that's
+ useful at the moment but needn't stay in RubyGems permanently.
+
+ * lib/rubygems/source_index.rb: include Enumerable and implement #size
+ and #length.
+
+ * lib/rubygems/specification.rb: removed lazy initialisation of
+ attributes to reduce #copy_of invocations; folded
+ Specification.copy_of into Specification#copy_of.
+
+ * lib/rubygems.rb: require 'rubygems/custom_require' instead of
+ 'rubygems/loadpath_manager'; removed out of date documentation; added
+ "require 'rubygems/timer'" to temporarily assist with benchmarks.
+
+2004-12-07 Jim Weirich <jim@weirichhouse.org>
+
+ * Released 0.8.3
+
+2004-12-06 Jim Weirich <jim@weirichhouse.org>
+
+ * test/test_specification.rb
+ (TestLegacyYamlSpecification::test_load): Fixed test to avoid the
+ __FILE__ stuff. Running tests from rakefile guarantees that the
+ file paths start from the right location.
+
+ * pkgs/sources/sources.gemspec: Made Gem.sources_spec idempotent.
+
+ * lib/rubygems/specification.rb (Gem::Specification::initialize):
+ Added @@gather to Gem::Specification to facilitate proper loads.
+ (Gem::Specification::Specification): Added Specification.load.
+
+ * lib/rubygems/source_index.rb (Gem::SourceIndex): Fixed comments
+ 'long name' => 'full name'.
+
+ * lib/rubygems/gem_commands.rb (Gem::BuildCommand::load_gemspecs):
+ Changed to use Gem.Specification.load.
+
+ * Rakefile: Added sources-*.gem to clobber list.
+ (egrep): Upgraded the DBG finder to include breakpoint.
+
+ * post-install.rb (install_sources): Using block version of chdir.
+
+ * lib/rubygems/remote_installer.rb
+ (Gem::LocalSourceInfoCache::read_cache): Fixed initialization of
+ cache.
+
+ * lib/rubygems.rb: Updated version to 0.8.2.
+
+2004-12-04 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/remote_installer.rb
+ (Gem::LocalSourceInfoCache::writable_file): Now just returns the
+ selected cache file (which was selected based on writability).
+ (Gem::LocalSourceInfoCache::try_file): Added try_file to determine
+ if a file is a candidate for a cache file.
+ (Gem::LocalSourceInfoCache::select_cache_file): Added failure if
+ there are not valid cache file candidates.
+
+ * lib/rubygems.rb (Gem::Exception): Renamed @@cache to
+ @@source_index.
+ (Gem::Exception::source_index): Renamed Gem.cache to
+ Gem.source_index (but left cache as an alias).
+
+2004-12-03 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/remote_installer.rb (Gem::LocalSourceInfoCache):
+ Added a local cache manager object to implement the read/write
+ policies on the system and user cache files.
+ (Gem::LocalSourceInfoCache::update): Added update and flush to the
+ caching fetcher so that it knows when it needs to update the local
+ cache files.
+ (Gem::RemoteInstaller::initialize): Switched to using a cached
+ fetcher in the remote installer. All the caching logic was
+ removed from the installer. User writable cache files are now
+ supported.
+ (Gem::RemoteInstaller::write_gem_to_file): write_gem_to_file now
+ will create the path if needed.
+
+2004-12-02 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/package.rb (TarInput::zipped_stream): To workaround
+ a problem with earlier than 1.2.1, we read the zipped data into a
+ string, and then return an IO object on that string.
+ (TarInput::each): Refactored getting a stream to the zipped data
+ into <tt>zipped_stream</tt>.
+
+2004-12-01 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/remote_installer.rb
+ (Gem::RemoteSourceFetcher::convert_spec): We now proprocess the
+ yaml string data to reduce it in size. This was done to
+ workaround a problem with large YAML files (although it is just a
+ temporary fix because our yaml data keeps growing and growing).
+
+ * Rakefile: Added more targets to the clobber target.
+
+ * test/test_remote_fetcher.rb
+ (TestRemoteFetcher::test_explicit_proxy): Added tests for proxy
+ support.
+
+ * lib/rubygems/remote_installer.rb
+ (Gem::RemoteSourceFetcher::connect_to): Refactored to add proxy
+ support.
+
+2004-11-28 Chad Fowler <chad@chadfowler.com>
+ * lib/rubygems/loadpath_manager.rb: Added Mauricio's patch to work
+ around string contains null byte issue.
+
+2004-11-27 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/remote_installer.rb
+ (Gem::RemoteSourceFetcher::get_size): Switched from open-uri with
+ early abort to an HTTP.head call to get the size of the yaml file
+ on the server.
+
+2004-11-26 Jim Weirich <jim@weirichhouse.org>
+
+ * test/test_specification.rb
+ (TestDefaultSpecification::test_defaults): Added test for some
+ basic defaults in a gem spec.
+
+ * test/test_remote_installer.rb (MockFetcher::source_info): Made
+ the fake test data more realistic.
+ (TestRemoteInstaller::test_source_info): Improved tests.
+
+2004-11-26 Jim Weirich <jim@tardis>
+
+ * test/test_remote_installer.rb (MockFetcher): Added MockFetcher
+ to make testing the remote installer easier. Currently there are
+ two remote installer test classes. Eventually TestRemoteInstaller
+ will succeed RemoteInstallerTest, which is very incomplete.
+
+ * test/test_package.rb (TC_TarReader::TC_TarInput): Made the unit
+ test ignore the setgid bit. The setgid bit doesn't work on my
+ laptop for some reason. This may be a problem with my laptop
+ rather than with this code. Should investigate further.
+
+ * lib/rubygems/remote_installer.rb (Gem::RemoteSourceFetcher):
+ Added a Fetcher object to the remote installer to handle all the
+ details of getting the remote information. This allows testing
+ the logic of the remote installer without actually doing remote
+ calls.
+ (Gem::RemoteInstaller::sources): Renamed get_caches to
+ source_info. The problem is that cache is too generic and there
+ are actually several things that we will cache in the system.
+
+ * lib/rubygems/cache.rb (Gem::Cache::self): Changed interface to
+ from_installed_gems slightly.
+ (Gem::Cache::self): Reordered rescue clauses so that the syntax
+ exception might actually be handled.
+
+ * lib/rubygems.rb (Gem::Exception::ensure_gem_subdirectories):
+ Dumped the check_gem_subdirectories method to use the almost
+ identical ensure_gem_subdirectories method.
+ (Gem::Exception::ensure_gem_subdirectories): Only attempt to
+ create the gem subdirectories if we can actually write them.
+
+ * bin/gem_server: Added date of last file modification to header
+ of /yaml. This is in preparation for using a head command with
+ date/time stamping in fetching the source cache.
+
+2004-11-25 Ryan Davis <ryand@zenspider.com>
+ * lib/rubygems.rb: Added GEM_SKIP functionality, which will tell
+ loadpath_manager not to load specific libs from gems. For
+ testing/ development purposes. Created by Ryan Davis.
+
+2004-11-24 Chad Fowler <chad@chadfowler.com>
+ * lib/rubygems/specification.rb: Allow multiple authors per gem.
+ * lib/rubygems/gem_commands.rb: command line error message if you
+ run 'gem install' with no args.
+ * lib/rubygems/loadpath_manager.rb: Fixed @specs bug as reported by
+ Lothar Schulz on ruby-talk.
+
+2004-11-07 Chad Fowler <chad@chadfowler.com>
+ * lib/rubygems.rb,lib/rubygems/installer.rb,lib/rubygems/cache.rb
+ lib/rubygems/remote_installer.rb,lib/rubygems/gem_commands.rb:
+ Fixes to make non-root installation work properly. Still need to
+ fix uninstallation.
+ * lib/rubygems/gem_commands.rb: Allow multiple gems/gem names on the
+ command line for install.
+
+2004-10-31 Chad Fowler <chad@chadfowler.com>
+ * lib/rubygems/version.rb,test/test_version_comparison.rb: Patrick May's
+ * post-install.rb: Patrick May's fix for rubygems lib not being found
+ during install.
+
+2004-10-29 Chad Fowler <chad@chadfowler.com>
+ * packages/,pkgs,install.rb: renamed "packages" to "pkgs" to avoid
+ * remote_installer.rb: Added user-agent reporting for remote
+ operations
+ * setup.rb,install.rb,bin/update_rubygems: removed install.rb and
+ added setup.rb and post-install.rb. Changed update_rubygems so that
+ params passed to it can be passed on to setup.rb
+
+2004-10-25 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/installer.rb
+ (Gem::Uninstaller::remove_executables): Corrected spelling of
+ "addtion".
+
+2004-10-24 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/version.rb (Gem::Version::Requirement::self): Now
+ properly handles arrays of version constraints.
+
+ * lib/rubygems/loadpath_manager.rb
+ (Gem::LoadPathManager::Gem::Specification): Added comments
+ describing the fast Spec class purpose. Added to_s to
+ Gem::Specification (both fast and slow versions).
+ (Gem::LoadPathManager.paths): Returns (cached) list of gem paths.
+ (Gem::LoadPathManager::self): Refactored to use glob_over in
+ search_loadpaths and search_gempaths.
+
+ * lib/rubygems/installer.rb: Added some requires.
+
+ * lib/rubygems/cache.rb (Gem::Cache::refresh): Fixed refresh! to
+ call load_specification on the Cache class, not on itself.
+
+ * lib/rubygems.rb (Gem::Exception::activate): added comments to
+ activate. Also made sure that partial name matches in the gem
+ cache search were avoided.
+ (Gem::Exception::clear_paths): Added code to clear the gem cache
+ when reseting the gem paths.
+ (Gem::Exception::require): Added a function to take a gem name and
+ a library file name (in that gem) and return a path to the library
+ in the gem. David HH was interested in this in order to speed up
+ some require statements under ModRuby. Eventually I hope we won't
+ need these special tricks.
+ (Gem::Exception::latest_partials): Fixed bug that assumed exactly
+ three digits in a version number.
+
+ * Rakefile (egrep): Added two tasks to find all the FIXME/TODO
+ markers in the source code comments and to find the DBG print
+ lines.
+
+2004-10-23 Jim Weirich <jim@weirichhouse.org>
+
+ * test/test_specification.rb
+ (TestSimpleSpecification::test_add_bindir_to_list_of_files):
+ Verify that an executable doesn't need the bindir if bindir is
+ set.
+ (TestSimpleSpecification::test_no_bindir_in_list_of_files): Added
+ test the verify that exectuable can be written without a default
+ binder.
+
+ * lib/rubygems/installer.rb
+ (Gem::Installer::generate_bin_scripts): Added check so that the
+ bindir is access only when there are actually executables to
+ install. Checking for an installable bindir was giving permission
+ errors when installing test gems.
+
+2004-10-21 Chad Fowler <chad@chadfowler.com>
+ * lib/rubygems/installer.rb: Show extension build errors during install
+ in addition to logging them to gem_make.out
+
+2004-10-02 Chad Fowler <chad@chadfowler.com>
+
+ * lib/rubygems/validator.rb,lib/rubygems/gem_commands.rb: Added
+ --test option for "gem check" that runs unit tests on already-
+ installed gems.
+
+2004-09-30 Rich Kilmer <rich@infoether.com>
+
+ * lib/rubygems/specification.rb - externalized the loaded_from runtime
+ var on specification
+ * lib/rubygems/cache.rb - optimized cache refresh! method and refactored
+ processing of files when building cache.
+ * lib/rubygems/loadpath_manager.rb - fixed bug in loadpath manager in
+ finding native extensions that have ext on os x, win32 and solaris
+
+2004-09-20 Chad Fowler <chad@chadfowler.com>
+ * lib/rubygems/gem_commands.rb: If file match during local install is
+ a directory, don't try to treat it erroneously as a gem (bug reported
+ by Rich).
+ * lib/rubygems.rb: Fixed small bug in #latest_load_paths
+
+ (NOTE: It looks like 0.8.0/0.8.1 was released in this timeframe)
+
+2004-09-14 Chad Fowler <chad@chadfowler.com>
+ * lib/rubygems.rb: Fixed bug in require_gem (thanks Jamis Buck!)
+ that would require a gem based on an inexact search of its name
+ in the local cache. This caused copland-webrick to be loaded
+ when a request was made for "copland".
+
+2004-09-12 Chad Fowler <chad@chadfowler.com>
+ * lib/rubygems/specification.rb, test/test_specification.rb: Removed
+ library_stubs attribute.
+
+2004-09-12 Gavin Sinclair <gsinclair@soyabean.com.au>
+
+ * scripts/specdoc.rb: Check that all attributes are documented; and
+ improved formatting.
+ * scripts/specdoc.yaml: test_suite_file -> test_files; finished
+ documentation.
+ * scripts/specdoc.data: misc changes.
+
+2004-09-11 Chad Fowler <chad@chadfowler.com>
+
+ * test/test_parse_commands.rb: Fix failing unit tests due to Rich's fix from
+
+ * lib/rubygems/specification.rb: Add bindir to executable path on file list
+
+2004-09-11 Rich Kilmer <rich@infoether.com>
+
+ * lib/rubygems/gem_commands.rb - got rid of stub options
+
+ * lib/rubygems/install.rb - changed output of messages so the UI would format
+ better
+
+ * bin/gem_server - exit! from ^c
+
+2004-09-09 Chad Fowler <chad@chadfowler.com>
+ * lib/rubygems/loadpath_manager.rb: Small bug when gem specs have ruby
+ version requirements.
+ * lib/rubygems/specification.rb, lib/rubygems/gem_commands.rb: Fixed failing
+ functional test.
+
+2004-09-08 Chad Fowler <chad@chadfowler.com>
+ * install.rb: added stub removal to the install process
+
+2004-09-06 Chad Fowler <chad@chadfowler.com>
+ * test/test_package.rb: Fixed failing unit test as per Mauricio's email to
+ the rubygems list.
+ * Fixed minor issues with Windows cmd file generation.
+
+2004-09-06 Rich Kilmer <rich@infoether.com>
+ * lib/rubygems/remote_installer.rb - enabled caching of source caches
+ based on the size of the yaml.Z/yaml file.
+
+2004-08-29 Chad Fowler <chad@chadfowler.com>
+ * /lib/rubygems/gem_command.rb: small big fix for local gem installs
+ on Windows.
+
+2004-08-28 Rich Kilmer <rich@infoether.com>
+
+ * /lib/rubygems/installer.rb, /lib/rubygems/doc_manager.rb,
+ /lib/rubygems/cmd_manager.rb - Added an exception: FilePermissionError
+ which checks to ensure write access to the install/uninstall/rdoc
+ destination directories and raises a nice error instead of the standard
+ one.
+
+2004-08-28 Rich Kilmer <rich@infoether.com>
+
+ * /lib/rubygems/installer.rb - commented out stub addition and removal
+
+2004-08-28 Rich Kilmer <rich@infoether.com>
+
+ * /lib/rubygems.rb, /lib/rubygems/loadpath_manager.rb -
+ this adds all the loadpath_manager stuff with the 'ultimate require hack' to
+ rubygems.rb. Also, require_gem methods body has been extracted into a method
+ Gem.activate that differs in the calling signature in that the second param is
+ a boolean that determines whether to autorequire or not.
+
+2004-08-27 Rich Kilmer <rich@infoether.com>
+
+ * lib/rubygems/user_interaction - added ask_yes_no as a method
+ which returns true/false and formats/processes the [yn] stuff.
+ it also has an optional second parameter of true/false for the
+ default value.
+
+ * lib/rubygems/installer.rb, lib/rubygems/remote_installer.rb,
+ lib/rubygems/command_manager.rb - changed all places where ask
+ was used with [Yn] to ask_yes_no
+
+2004-08-24 Gavin Sinclair <gsinclair@soyabean.com.au>
+
+ * lib/rubygems/installer.rb: Library stubs are now installed as per
+ 'library_stubs' gemspec attribute. A stub is (still) also installed
+ for the 'autorequire' attribute. All library stub handling
+ refactored into two new classes: LibraryStubs and LibraryStub.
+
+ * test/test_parse_commands.rb: as per 2004-08-17 below, the 'update'
+ command takes --rdoc as its default now.
+
+2004-08-22 Rich Kilmer <rich@infoether.com>
+ * lib/rubygems/installer.rb: fixed stub generation...i added the version
+ stuff that only app stubs should have...sorry!
+
+2004-08-17 Gavin Sinclair <gsinclair@soyabean.com.au>
+
+ * lib/rubygems/gem_commands.rb: --rdoc is default on 'update' command,
+ consistent with 'install'. 'default_str' methods changed to reflect
+ --rdoc being default now.
+
+2004-08-21 Chad Fowler <chad@chadfowler.com>
+ * lib/rubygems/gem_commands.rb: Proper checking for gems in local
+ directory on local install. rescue Gem::LoadError to avoid ugly
+ backtrace.
+ * lib/rubygems/installer.rb: created Gem::LoadError to hold extra
+ metadata. Setting up for proper dependency installation on local
+ installs.
+
+2004-08-20 Chad Fowler <chad@chadfowler.com>
+
+ * lib/rubygems/specification.rb: Fixed small bug in the previous spec
+ change commit.
+
+ * lib/rubygems/cache.rb: Prevent catastrophic failure if a gemspec is
+ corrupted.
+
+ * lib/rubygems/installer.rb: Fixed (in not a great way) a bug that would
+ cause a zero-length spec file to be written to the gem specifications
+ directory.
+
+2004-08-19 Chad Fowler <chad@chadfowler.com>
+
+ * lib/rubygems/specification.rb: #files auto-includes any #extensions,
+ #extra_rdoc_files, #test_files, etc. that weren't explicitly added
+ to the file list.
+
+2004-08-18 Chad Fowler <chad@chadfowler.com>
+
+ * lib/rubygems/specification.rb: One more bug with #test_files.
+ Default value of [] wasn't set, resulting in an attempt to call
+ #empty? on nil.
+
+ * lib/rubygems/gem_commands.rb: Unit tests appear to be working now.
+ Still more testing to do.
+
+ * lib/rubygems/remote_installer.rb, lib/rubygems/installer.rb: Fixed
+ minor bugs in default selections for questions asked during
+ installation and uninstallation
+
+2004-08-17 Gavin Sinclair <gsinclair@soyabean.com.au>
+
+ * lib/rubygems/specification.rb:
+ - #test_suite_file and #test_files now work on older gems.
+ - Added Specification.from_yaml for loading YAML gemspecs
+ - #to_ruby doesn't emit 'specification_version'
+
+ * lib/rubygems/gem_commands.rb: Updated test-on-install code to use
+ Specification#test_files instead of #unit_test_suite.
+
+ * lib/rubygems/old_format.rb: Use Specification.from_yaml
+ * lib/rubygems/package.rb: Ditto
+
+2004-08-17 Gavin Sinclair <gsinclair@soyabean.com.au>
+
+ * lib/rubygems/command.rb: --debug option to turn on $DEBUG
+ * lib/rubygems/config_file.rb: ditto
+
+2004-08-11 Rich Kilmer <rich@infoether.com>
+ * lib/rubygems/installer.rb: The application stub now defaults to
+ the latest version of the library, and optionally allows an initial
+ parameter conforming to _VERSION_ to be passed to select a prior
+ version of the library (this initial parameter, if present, is shifted
+ off of ARGV). This change was re-added...I erased it somehow :(
+
+2004-08-11 Gavin Sinclair <gsinclair@soyabean.com.au>
+
+ * lib/rubygems/gem_commands.rb:
+ - 'gem spec X' displays spec for _latest_ version of X. Added
+ '--all' option if you want to see all versions.
+ - RDocCommand code cleanup and slight change: document _all_
+ versions of the gem by default, not just the first.
+
+ * lib/rubygems/doc_manager.rb: removed 'kilmer' default template
+ option and obsolete error message.
+
+2004-08-12 Chad Fowler <chad@chadfowler.com>
+ * Added "gem rdoc" command for generating docs for already-installed
+ gems
+
+2004-08-11 Rich Kilmer <rich@infoether.com>
+ * bin/generate_yaml_index: updated to work with new gem format (and use the Gem::Format
+ class to read). Will deploy after testing on RubyForge.
+ * lib/rubygems/gem_commands.rb: generate rdoc by default on installs (I think this is
+ just good practice.
+ * lib/rubygems/remote_install.rb: raise an exception if dependent gems cannot be found
+ on remote_install
+
+2004-08-11 Chad Fowler <chad@chadfowler.com>
+ * lib/rubygems/gem_commands.rb: query is now case insensitive (as it used to be)
+ * lib/rubygems/installer.rb: gem_make.out wasn't being written when an extension failed to compile.
+
+2004-08-11 Rich Kilmer <rich@infoether.com>
+
+ * removed String.to_requirement...we should not modify
+ base classes in Ruby! modified to get rid of said to_requirement
+ with Gem::Version::Requirement.create(obj)
+
+ * specification.rb - fixed constructor bug of version requirement...
+ it now defaults to Requirement.default
+
+2004-08-11 Chad Fowler <chad@chadfowler.com>
+
+ * One more specification.rb bug fixed.
+
+2004-08-11 Gavin Sinclair <gsinclair@soyabean.com.au>
+
+ * lib/rubygems/specification.rb:
+ - Added convenience class methods: attribute_names,
+ attribute_defaults, default_value, required_attributes, and
+ required_attribute?.
+
+ - IMPORTANT: attribute readers now use lazy initialization, just
+ like some of them did before the 2004-08-01 change. This was done
+ to fix the breakage when loading older gemspecs.
+
+ - IMPORTANT: replaced instance variable access with attribute reader
+ method calls in many cases. This is in line with the above change.
+
+ - Good documentation for the "attribute" method.
+
+ - Renamed _copy -> _copy_of.
+
+ * lib/rubygems/cache.rb:
+ - Some fairly shallow changes. Exception handling needs improvement.
+
+ * lib/rubygems/version.rb:
+ - (Version.create) new method (for convenience)
+ - (Version::Requirement.create) new method (for convenience)
+ - (Version::Requirement.default) new method (for consistency)
+
+ * test/test_specification.rb: test attribute_names instead of
+ attributes. Other "class convenience" methods remain to be tested
+ at this stage. Also added test classes for legacy gemspecs.
+
+ * test/data/legacy/keyedlist-0.4.0.ruby: added.
+ * test/data/legacy/keyedlist-0.4.0.yaml: added.
+
+2004-08-06 Gavin Sinclair <gsinclair@soyabean.com.au>
+
+ * lib/rubygems/specification.rb:
+ - Added convenience class methods: attribute_names,
+ attribute_defaults, default_value, required_attributes, and
+ required_attribute?.
+
+ - IMPORTANT: attribute readers now use lazy initialization, just
+ like some of them did before the 2004-08-01 change. This was done
+ to fix the breakage when loading older gemspecs.
+
+ - Good documentation for the "attribute" method.
+
+ - Renamed _copy -> _copy_of.
+
+ * test/test_specification.rb: test attribute_names instead of
+ attributes. Other "class convenience" methods remain to be tested
+ at this stage.
+
+2004-08-01 Gavin Sinclair <gsinclair@soyabean.com.au>
+
+ * lib/rubygems/specification.rb:
+ - (Re)defined class methods: attribute, attributes,
+ required_attribute, read_only, overwrite_accessor. @@attributes
+ contains a list of attribute names and default values. This
+ allows higher-level specification of gemspec attributes, and the
+ handling of them in a DRY fashion.
+
+ - to_yaml_properties now includes all properties, to ensure
+ correct deserialization of a Gem::Specification object.
+
+ - #to_ruby and #to_yaml_properties rewritten to use @@attributes
+
+ - Introduced 'specification_version' attribute and three constants:
+ NONEXISTENT_SPECIFICATION_VERSION, CURRENT_SPECIFICATION_VERSION, and
+ SPECIFICATION_VERSION_HISTORY. This allows us to track changes to
+ the spec format.
+
+ - Refactored several "helper" methods, using the new class method
+ 'attribute_alias_singular', which provides a "singular" alias for
+ a "plural" attribute (e.g. require_path and require_paths).
+
+ - All gemspec attributes now defined in a uniform fashion, which
+ implies that they all have valid instance variables on
+ initialization. Previously, some attributes were lazily
+ initialized.
+
+ - Introduced attribute 'library_stubs', to allow the specification
+ of several stub files. (That feature not implemented, though.)
+
+ - Introduced attribute 'test_files' and deprecated 'test_suite_file'.
+
+ - Provided #warn_deprecated stub of a method, but don't know what to
+ do with it.
+
+ - Deprecated #has_test_suite? in favour of (new) #has_unit_tests?
+
+ - Used overwrite_accessor to provide special behaviour for the
+ setting of some attributes.
+
+ - The 'date' attribute is now a Date object. We don't need high
+ resolution, and Time objects, being system-dependent, are not nice
+ to deal with.
+
+ - Various code style changes.
+
+ - Summary: uniform treatment of gemspec attributes; reduced code by
+ refactoring; 'test_suite_file' deprecated for 'test_files';
+ 'library_stubs' introduced; spec versioning introduced.
+
+ * lib/rubygems/version.rb: (Dependency) added #to_s, #==, and an
+ alias (requirements_list -> requirement_list).
+
+ * test/test_specification.rb: several new tests: _singular_attributes,
+ _deprecated_attributes, _defaults, _to_{yaml,ruby}_and_back,
+ _directly_setting_dependencies_doesnt_work, and more. Plus a new
+ class to give Specification a more thorough workout (TestSpecificationComplex).
+
+ * scripts/runtest.rb: require 'pp' so it's always available in unit
+ tests.
+
+2004-07-30 Rich Kilmer <rich@infoether.com>
+
+ * lib/rubygems/installer.rb The application stub now defaults
+ to the latest version of the library, and optionally allows
+ an initial parameter conforming to _VERSION_ to be passed
+ to select a prior version of the library (this initial
+ parameter, if present, is shifted off of ARGV).
+
+ * lib/rubygems/version.rb correct? is now a class method on
+ Version enabling Gem::Version.correct?(...)
+
+ * lib/rubygems/install.rb make it so uninstalling a gem will
+ not remove executables if another version of that gem is
+ installed and needs those executables
+
+2004-07-26 Jim Weirich <jim@tardis>
+
+ * lib/rubygems.rb (Gem::Exception::latest_load_paths): Added
+ latest_load_paths and refactored all_load_paths to use common
+ code.
+
+2004-07-25 Rich Kilmer <rich@infoether.com>
+ * fixed bug in using --source in command.rb (removed short -s version)
+
+ * changed spec to use the RUBY_PLATFORM for Platform::CURRENT
+
+ * added ability to choose from list of available gems on remote install
+ if (1) some of the gems are binary and (2) there are move than one.
+ If the gems are all source gems, the latest is selected.
+
+2004-07-25 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems.rb (Gem::Exception::all_load_paths): Added
+ all_load_paths utility function.
+
+ * bin/update_rubygems: Added a command to update the gem
+ installation based on a update gem.
+
+ * Rakefile: Pulled package file list out into a constant so it can
+ be reused between the package command and the gem package command.
+ Added a gem package target to support rubygems updates.
+
+2004-07-22 Gavin Sinclair <gsinclair@soyabean.com.au>
+
+ * lib/rubygems/version.rb:
+ * (Requirement#initialize) initialize @version to avoid warning
+ * (Dependency#initialize) initialize @version_requirement to avoid
+ warning
+
+2004-07-19 Chad Fowler <chad@chadfowler.com>
+ * install.rb: Shebang line should point to the ruby version used during
+ installation.
+
+2004-07-19 Assaph Mehr <assaph@avaya.com>
+ * lib/rubygems/command.rb, packages/sources/lib/sources.rb: Added
+ command-line-configurable sources.
+
+2004-07-18 Chad Fowler <chad@chadfowler.com>
+ * lib/rubygems/validator.rb: Fixed a bug that would cause "managed"
+ files to appear to be unmanaged due to differences in how the paths
+ were formatted.
+
+2004-07-17 Gavin Sinclair <gsinclair@soyabean.com.au>
+
+ * lib/rubygems/gem_commands.rb (InstallCommand#execute): removed clear
+ bug (name -> gem.name).
+
+2004-07-14 Rich Kilmer <rich@infoether.com>
+ * added old_format.rb which is used in the (hack) in format.rb
+ to detect the older version of a gem, and if present, switches
+ to that class instead.
+ * fixed the ARGV passing in bin/gem to ingore args past -- which
+ are used for passing params to source gems (extconf.rb)
+
+2004-07-13 Chad Fowler <chad@chadfowler.com>
+ * lib/rubygems/installer.rb, lib/rubygems/package.rb,
+ lib/rubygems/format.rb, test/test_package.rb: Added Mauricio
+ Fernandez's patch to replace old gem format with tar.gz format.
+ Fixed some failing unit tests that resulted. Still a couple left.
+ * lib/rubygems.rb: Fixed a bug introduced by the previous patch.
+
+2004-07-13 Gavin Sinclair <gsinclair@soyabean.com.au>
+
+ * lib/rubygems.rb: (#require_gem) added the ability to do
+ "require_gem 'rake/packagetask'", for instance, which is a
+ shortcut for "require_gem 'rake'; require 'rake/packagetask'".
+
+2004-07-13 Gavin Sinclair <gsinclair@soyabean.com.au>
+
+ * lib/rubygems/gem_commands.rb: refactored --version option
+ in all cases to the new VersionOption module.
+
+2004-07-13 Gavin Sinclair <gsinclair@soyabean.com.au>
+
+ * lib/rubygems/cmd_manager.rb: added 'unpack' command.
+
+ * lib/rubygems/gem_commands.rb (UnpackCommand): added.
+
+ * lib/rubygems/installer.rb (Installer#unpack): added.
+
+2004-07-09 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/user_interaction.rb (Gem::StreamUI::ask and
+ Gem::StreamUI::choose_from_list): Added flush before each gets.
+
+2004-07-05 Gavin Sinclair <gsinclair@soyabean.com.au>
+
+ * lib/rubygems/command.rb (Gem::Command#defaults_str): added.
+
+ * lib/rubygems/command.rb (Gem::Command#create_option_parser):
+ Defaults for the options are included in the parser output.
+
+ * lib/rubygems/gem_commands.rb: all commands which have options
+ and defaults now have #defaults_str implemented.
+
+2004-07-05 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/command.rb (Gem::Command#create_option_parser):
+ Make the argument and option sections optional. They are only
+ printed if there are options or arguments defined.
+
+2004-07-05 Gavin Sinclair <gsinclair@soyabean.com.au>
+
+ * lib/rubygems/gem_commands.rb:
+ - scrubbed up the 'help' command a bit, removing its options
+ - added information to 'help commands'
+
+2004-07-04 Gavin Sinclair <gsinclair@soyabean.com.au>
+
+ * lib/rubygems/gem_commands.rb:
+ - modified generic help and examples
+ - improved 'list' and 'search' help, and fixed bug in 'search'
+
+ * lib/rubygems/cmd_manager.rb:
+ - explicit support for top-level commands --help and --version
+ - no more support for --examples and --commands
+
+2004-07-04 Gavin Sinclair <gsinclair@soyabean.com.au>
+
+ * lib/rubygems/gem_commands.rb:
+ - added 'list' and 'search' commands ('list' is no longer an alias
+ for 'query')
+ - modified return value from all 'arguments' methods (see command.rb)
+
+ * lib/rubygems/cmd_manager.rb: added 'search' command.
+
+ * lib/rubygems/command.rb:
+ (Command#create_option_parser): enhanced the option parser for 'help'
+ display
+ (Command#remove_option): added (to support 'list' and 'search')
+
+ * Rakefile: added 'gem' target. Runs "local" (not installed) command
+ and libraries.
+
+2004-07-04 Gavin Sinclair <gsinclair@soyabean.com.au>
+
+ * Rakefile: added 'install' target.
+
+ * lib/rubygems/cmd_manager.rb: code formatting.
+
+ * lib/rubygems/gem_commands.rb:
+ - refactored common install and update options into new module
+ InstallUpdateOptions
+ . consolidated option pairs (e.g. --test & --no-test ==> --[no-]test)
+ . --gen-rdoc is now --rdoc
+ - (UninstallCommand) corrected typo
+ - (InstallCommand) corrected output with local install
+
+ * test/test_parse_commands.rb: :%s/--gen-rdoc/--rdoc/g
+
+2004-07-03 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/gem_commands.rb (Gem::InstallCommand::initialize):
+ Added --no-gen-rdoc and --no-test to allow the user to override
+ .gemrc default options.
+
+ * lib/rubygems/doc_manager.rb (Gem::DocManager::generate_rdoc):
+ Concatenate the local rdoc options to the end of the spec's rdoc
+ options.
+ (Gem::DocManager::configured_args): Added configured_args as a
+ place to store local rdoc options.
+
+ * lib/rubygems/gem_runner.rb (Gem::GemRunner::do_configuration):
+ Configuration handled in do_configuration now.
+ (Gem::GemRunner::do_configuration): Set the local rdoc
+ configuration from the config file.
+
+ * lib/rubygems/command.rb (Gem::Command::handles): Added a
+ handles? method to Command so that we can detect which extra
+ arguments can be used with a command.
+ (Gem::Command::add_extra_args): New method to add the config
+ file's extra arguments to the front of the argument list.
+ (Gem::Command::extra_args): Added extra_args to Command class to
+ hold the extra args discovered in the config file.
+
+ * Rakefile: Added TEST=filename option to all the test targets.
+
+ * test/functional.rb (FunctionalTest::test_gemrc): Added
+ functional test for gemrc.
+
+ * scripts/gemdoc.data: Added an example to the specification command.
+
+ * lib/rubygems.rb (Gem::Exception::manage_gems): Added gem_runner
+ and config_file to manage_gems.
+ (Gem::Exception::use_paths): use_paths now accepts (and ignores)
+ nil parameters.
+
+ * bin/gem: Make Gem::GemRunner the top level object. It now
+ creates and calls the CommandManager /after/ the arguments are
+ processed.
+
+ * Rakefile: Added test/data/gemhome to clobber list.
+
+2004-07-01 Jim Weirich <jim@weirichhouse.org>
+
+ * test/test_specification.rb
+ (TestSpecification::test_rdoc_files_included): Test for rdoc files
+ included in file list. Test for redundent file removal.
+
+ * lib/rubygems/specification.rb (Gem::Specification::validate):
+ Added gem version to validation requirement. Added normalize to
+ remove redundent files in lists.
+
+ * lib/rubygems/gem_commands.rb (Gem::InfoCommand::usage): Added
+ usage and arguments methods for InfoCommand.
+ (Gem::SpecificationCommand::usage): Fixed several usage comments.
+
+2004-06-30 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/gem_commands.rb (Gem::InstallCommand::usage):
+ Upcased the comment on the usage statement (and corresponding
+ option). This makes the variable part of the command
+ (e.g. GEMNAME) stand out from the static parts.
+
+ * lib/rubygems/cmd_manager.rb (Gem::CommandManager::process_args):
+ Downcased commands before searching (allows upper case or mixed
+ case for commands on command line).
+
+ * install.rb (install_rb): Fixed bug where the installer falsely
+ triggered the old repository upgrade when the directory part of
+ the file contained the matching "-digits." pattern. Now the
+ pattern must be in the file's base name.
+
+2004-06-26 Gavin Sinclair <gsinclair@soyabean.com.au>
+
+ * scripts/specdoc.rb: added (to generate gem specificiation document)
+ * scripts/specdoc.data: added (supports specdoc.rb)
+ * scripts/specdoc.yaml: added (supports specdoc.rb)
+
+2004-06-27 Jim Weirich <jim@weirichhouse.org>
+
+ * scripts/gemdoc.data Removed extraneous <em> marker.
+
+ * lib/rubygems/specification.rb
+ (Gem::Specification::satisfies_requirement): HA! Caught another
+ version_requirement vs version_requirements error. (I really
+ regret the decision to change that name.)
+
+ * lib/rubygems/installer.rb (Gem::Uninstaller::has_dependents):
+ Changed call to alert to alert_warning.
+
+ * lib/rubygems/gem_commands.rb (Gem::UninstallCommand::execute):
+ Again, remove local error handling to allow the error to perculate
+ up the chain to the top level.
+
+ * lib/rubygems/doc_manager.rb (Gem::DocManager::generate_rdoc):
+ Removed one level of exception handling. Only catching RDocErrors
+ at the outermost level. And instead of reporting the error and
+ swallowing it, I convert it to a Gem::DocumentError (with the same
+ error message). This is for better error handling.
+
+ * lib/rubygems/command.rb (Gem::Command::handle_options): Removed
+ exception handling from handle_options. This allows errors to be
+ handled at the top level. Makes for a more consistent error
+ interface.
+
+ * lib/rubygems/doc_manager.rb (Gem::DocumentError): Added
+ DocumentError to wrap RDocErrors (which derive from Exception
+ ... yuck).
+
+ * lib/rubygems/cmd_manager.rb (Gem::RemoteError): RemoteError and
+ LocalInstallationError are now Gem::Exceptions (rather than
+ StandardErrors).
+
+ * lib/rubygems.rb (Gem::Exception): Changed base of Gem::Exception
+ to RuntimeError (was ::Exception). Apps using gem as a library
+ would have to catch Gem::Exceptions explicitly (yuck), or catch
+ Exceptions generically. Catching Exceptions will catch
+ EVERYTHING, including things like SystemExit. By makeing
+ Gem::Exception a RuntimeError, apps can catch RuntimeError or even
+ StandardError.
+
+2004-06-26 Jim Weirich <jim@weirichhouse.org>
+
+ * test/functional.rb (FunctionalTest::test_all_command_helps):
+ Added functional test to show all commands have usage messaegs.
+
+ * lib/rubygems/gem_commands.rb (Gem::HelpCommand::execute): Added
+ version option to help (gem help version).
+ (Gem): Cleaned up the help text. Dropped unneeded verbage.
+
+ * lib/rubygems/cmd_manager.rb
+ (Gem::CommandManager::find_command_possibilities): Added
+ find_command_possibilities to help the Help command look for
+ commands.
+
+ * lib/rubygems/installer.rb (Gem::Uninstaller::uninstall): Fixed
+ null pointer bug where a list was destroyed in a method.
+
+ * lib/rubygems/gem_commands.rb (Gem::BuildCommand::load_gemspecs):
+ yaml gemspec files are now accepted by the build command.
+
+ * lib/rubygems/command.rb (Gem::Command::parser): Created an
+ on-demand option parser for all commands.
+ (Gem::Command::handle_options): Command line option hash is now
+ and instance variable with a reader.
+
+ * Rakefile: Linked package version to the value in the rubygems.rb
+ file. The gem env command now shows both gem version (e.g. 0.6)
+ and the package version (e.g. 0.6.1).
+
+2004-06-25 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/gem_commands.rb (Gem::InfoCommand): Dropped the
+ version command (its available via gem env). Added a gem info
+ command to extract the yaml from a gemfile.
+ (Gem::LocalRemoteOptions): Refactored the local/remote options
+ (adding and testing) into a mixin module.
+
+ * test/test_version_comparison.rb
+ (TestDependencies::test_normalization): Added some tests for the
+ normalization issues mentions below.
+
+ * lib/rubygems/version.rb (Gem::Dependency::normalize): Old gems
+ have requirements and dependencies incoded in the Yaml spec in an
+ out of date format. When loaded, they have incorrect instance
+ variables for modern objects. I added a normalize call to handle
+ transforming out dated objects in to modern objects. (Remember
+ this next time we change the data structure of something in the
+ spec file.)
+ (Gem::Version::Requirement::parse): Requirements are comparable
+ now, just so that we can test them with asserts.
+
+ * lib/rubygems/remote_installer.rb
+ (Gem::RemoteInstaller::find_dependencies_not_installed): Fixed
+ recursive call to require_gem to properly pass dependency
+ information.
+
+ * lib/rubygems/installer.rb (Gem::Uninstaller::has_dependents):
+ Fixed reference to version_requirement (needs to be plural).
+
+ * lib/rubygems/command.rb (Gem::Command::invoke): Command now
+ handles it own help messages. Commands no longer have to return
+ true/false to trigger help messages.
+
+ * lib/rubygems/cmd_manager.rb (Gem::CommandManager::process_args):
+ Moved help handling into the help command.
+
+ * lib/rubygems/gem_commands.rb (Gem::HelpCommand): Renamed the
+ base command to HelpCommand and made it handle a lot of the help
+ options. Still need work on individual command helps.
+
+ * test/functional.rb (FunctionalTest::test_env_version): Added a
+ bunch of new functional tests for the environment command.
+
+ * lib/rubygems/gem_commands.rb (Gem::InstallCommand::execute):
+ Made multiple gem names an error for now. Should look at later.
+
+ * lib/rubygems/cmd_manager.rb (Gem::ListCommand): Added list as an
+ alias to query.
+ (Gem::UpdateCommand::initialize): Corrected spelling of install
+ (intall) in several places.
+
+ * bin/gem_server: Added Gem.manage_gems to the gem_server to fix
+ missing requirements.
+
+ * lib/rubygems/cmd_manager.rb (Gem::InstallCommand::initialize):
+ Added missing --both option to install.
+
+ * test/test_command.rb
+ (TestCommand::test_invode_with_bad_options): Catch the termination
+ request.
+
+ * test/mockgemui.rb (MockGemUi::terminate_interaction): Make the
+ mock UI throw an exception when a termination is requested. This
+ makes sure that we don't miss accidental terminations.
+
+ * lib/rubygems/cmd_manager.rb (Gem::CommandManager::find_command):
+ Added find_command to handle best matching command names.
+
+ * test/functional.rb (FunctionalTest::test_build): Updated
+ functional tests to use the new command structure.
+
+ * lib/rubygems/version.rb (Gem::Version::Requirement): Changed the
+ pessimistic version comparison operator to "~>". I like to think
+ of it as "approximately greater than". (It was ">*").
+
+ * bin/gem: Moved gem2 into the standard gem script location. It
+ is now stable enough to use as the standard command.
+
+ * lib/rubygems/cmd_manager.rb (Gem::CommandManager::run): Added
+ run method to trap errors while running commands. Makes for
+ prettier output.
+ (Gem::CommandManager): Move *all* commands to their own classes.
+ Simplified CommandManager. Lowered the coupling between
+ CommandManager and the Commands (the commands don't even need to
+ know about the manager anymore). CommandManager maybe created
+ with "new" for testing (the script will continue to use
+ "instance").
+ (Gem::RubyGemsInfoCommand): New command.
+ (Gem::VersionCommand): New command.
+
+2004-06-24 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/user_interaction.rb (Gem::UserInteraction):
+ Significantly rewrote the whole user interaction scheme. We are
+ now using an UI object that responds to the standard list of UI
+ commands (e.g. say, alert, ask). The UserInteraction module
+ defines all the interaction methods to be forwarded to the default
+ UI objects. The "ui" method returns that default object (and you
+ can use self.ui=(new_ui) to change it). Also the use_ui(new_ui) {
+ } command is convienent for switching the UI object for a short
+ period of time.
+
+2004-06-18 Rich Kilmer <rich@infoether.com>
+ * broke test_cmd_manager.rb into test_parse_commands and
+ test_process_commands to test the parsing of command line options
+ and the funtionality, respectively.
+
+2004-06-18 Rich Kilmer <rich@infoether.com>
+ * added new unit test file: test/test_cmd_manager.rb to test the
+ command manager classes. this is just the first few tests which
+ will be expanded to a full test suite.
+
+2004-06-17 Chad FOwler <chad@chadfowler.com>
+
+ * lib/rubygems/installer.rb: Fixed bug in windows batch file generation
+ which was causing file not found errors.
+ * lib/rubygems/installer.rb: Uninstall now removes scripts and batch
+ * lib/rubygems/specification.rb: Fixed install bug. Thanks to Mark
+ Sparshatt for the fix (via the rubyforge bug tracker).
+
+2004-06-17 Jim Weirich <jim@weirichhouse.org>
+
+ * lib/rubygems/doc_manager.rb (Gem::DocManager::generate_rdoc):
+ Changed rdoc generation to do a chdir into the base source
+ directory and then to use a relative path for all the source
+ files. This makes the generated RDOC html look better and may fix
+ the windows drive/rdoc bug as a side effect.
+
+2004-06-17 Rich Kilmer <rich@infoether.com>
+ * Added ability to capture the UserInteraction with:
+ c = Gem::UserInteraction.capture
+ and then you can override specific methods like 'say':
+ c.on_say {|statement| puts "you said: #{statement}"}
+
+2004-06-15 Rich Kilmer <rich@infoether.com>
+ * Added refactored command handling in rubygems/cmd_manager.rb and a
+ (temporary) bin/gem2 command file to test things out. Once we feel
+ comfortable, we can replace gem with gem2.
+
+2004-06-10 Rich Kilmer <rich@infoether.com>
+ * Isolated all user interaction to pass through module methods on a new
+ Gem::UserInteraction module. Those methods will be the method of abstracting
+ the interaction of RubyGems for use in a GUI-based solution.
+
+2004-06-10 Rich Kilmer <rich@infoether.com>
+ * require 'rubygems' now minimally requires only the files needed
+ for runtime access to gems...not management of gems. To manage
+ gems you now additionally need to execute Gem::manage_gems prior
+ to using the builder/installer/etc. This makes gemspecs not
+ backward compatible unless they add that line to the gemspec
+ after the require 'rubygems' line.
+
+2004-06-10 Gavin Sinclair <gsinclair@soyabean.com.au>
+ * bin/gem: --upgrade-all was broken, probably as a result of the
+ search changes listed below.
+
+2004-06-09 Chad Fowler <chad@chadfowler.com>
+ * lib/rubygems/remote_install.rb: delegate search functionality to
+ Cache class, bringing remote and local search and list together into
+ one piece of code.
+ * bin/gem, lib/rubygems/validator.rb: move all STDIO work to bin/gem.
+ Validator.alien now returns a hash of ErrorData objects.
+ * bin/gem, lib/rubygems/installer.rb: move most of the STDIO stuff to
+ bin/gem, communicating via exceptions in this case.
+
+2004-06-08 Rich Kilmer <rich@infoether.com>
+ * Fixed the drive problem on win32 (hopefully) so multiple drives
+ should now work. Its still a hack until rdoc is fixed.
+
+2004-06-08 Chad Fowler <chad@chadfowler.com>
+ * Fixed bug caused by method change on Version::Requirement
+
+2004-06-08 Rich Kilmer <rich@infoether.com>
+ * fixed bug in doc_manager.rb whereby the extra_rdoc_files should
+ be appended to the list of directories prior to prepending the
+ full path.
+
+2004-06-08 Gavin Sinclair <gsinclair@soyabean.com.au>
+ * bin/gem_server: List installed gems in [name,version] order.
+
+2004-06-08 Gavin Sinclair <gsinclair@soyabean.com.au>
+ * lib/rubygems/installer.rb: don't warn about not being able to
+ install a library stub if a library stub is already installed.
+ Still warn if it's not a library stub that's there already.
+
+2004-06-08 Gavin Sinclair <gsinclair@soyabean.com.au>
+ * bin/gem: renamed --upgrade-dist to --upgrade--all and fixed bug.
+ * lib/rubygems/installer.rb: fixed bug with Ruby version assertion.
+
+2004-06-07 Chad Fowler <chad@chadfowler.com>
+ * lib/rubygems/remote_installer.rb, lib/rubygems/version.rb: Fixed old
+ dependency on #version method for Gem::Version::Requirement
+ * bin/gem: new --upgrade-dist option allows one to upgrade every
+ installed gem
+ * lib/rubygems/specification.rb,lib/rubygems/installer.rb: new
+ #required_ruby_version attribute added to gem specification for specifying a
+ dependency on which version of ruby the gem needs. Format it accepts is
+ the same as the Gem::Version::Requirement format.
+
+2004-06-06 Chad Fowler <chad@chadfowler.com>
+ * bin/gem: install_stub is once again the default due to requests.
+
+2004-06-04 Chad Fowler <chad@chadfowler.com>
+ * lib/rubygems/specification.rb, lib/rubygems/doc_manager.rb:
+ Allow arbitrary files to be added for rdoc to run over them (as per
+ Jim's request).
+
+2004-06-04 Chad Fowler <chad@chadfowler.com>
+ * bin/gem: Reformatted --search and --list output such that
+ multiple versions of a gem are compressed into a single entry
+ (with version numbers in parentheses)
+
+2004-05-31 Jim Weirich <jweirich@one.net>
+
+ * lib/rubygems/version.rb (Gem::Dependency): Dependency attribute
+ renamed to version_requirements (made plural).
+ (Gem::Version::bump): Added bump to implement pessimistic
+ operator.
+ (Gem::Version::Requirement): Added pessimistic operator to list of
+ operators. Operators now implemented using lambda.
+
+ * lib/rubygems.rb (Kernel::require_gem): require_gem now takes an
+ array of requirement strings.
+
+ * lib/rubygems/version.rb (Gem::Version::Requirement::initialize):
+ Simplified initialization by making parse a bit smarter.
+ (Gem::Version::Requirement::satisfied_by): Simplified by using
+ all?
+ (Gem::Version::Requirement::satisfy): Added explicit one
+ requirement satisfy test.
+ (Gem::Version::Requirement::parse): parse now returns a two
+ element string array (operator and version string). We don't
+ bother converting to an integer array during parsing.
+
+2004-05-31 18:38 chadfowler
+
+ * gemspec now supports #rdoc_options, to which you can append
+ strings that will be passed to rdoc as additional options.
+
+2004-05-08 21:57 chadfowler
+
+ * Using Gem::RubyGemsVersion to match the release number. If we
+ need to use this as an internal version format specifier in the
+ future, we can use the Gem::Version semantics.
+
+2004-05-30 14:33 gsinclair
+
+ * bin/gem: Split --help into --help (basic), --help-options (what
+ --help used to be), and --help-examples.
+
+2004-04-30 15:57 chadfowler
+
+ * bin/gem: --install-stub is no longer the default ;)
+
+2004-04-30 15:51 chadfowler
+
+ * lib/rubygems/installer.rb: Rich Kilmer (who kicks butt) figured
+ out how to fix the library stub stuff.
+
+2004-04-29 19:12 chadfowler
+
+ * lib/rubygems/doc_manager.rb: Dick Davies fixed a bug in the doc
+ generator.
+
+2004-04-29 13:41 gsinclair
+
+ * lib/rubygems/installer.rb: Added skeleton code and comments to
+ uninstall stub apps and libs
+
+2004-04-29 12:20 gsinclair
+
+ * install.rb: Don't install library stub for 'sources'
+
+2004-04-29 12:20 gsinclair
+
+ * lib/rubygems/installer.rb: Improvements to library stub
+ installation: * don't overwrite existing file (emit warning) *
+ nice warning if there's a permission problem * observe
+ --[no-]install-stub flag (rather, observe the argument to
+ #install)
+
+2004-04-29 12:16 gsinclair
+
+ * bin/gem: --install-stub is now the default
+
+2004-04-26 20:20 chadfowler
+
+ * test/test_remote_installer.rb: Cleaning up after Gavin and his
+ test-breaking self. ;)
+
+2004-04-26 12:06 gsinclair
+
+ * bin/gem, lib/rubygems/installer.rb,
+ lib/rubygems/remote_installer.rb: Installing a gem now causes a
+ library stub to be installed as well, allowing you to require
+ 'package' without knowing it's a gem.
+
+2004-04-25 23:18 chadfowler
+
+ * lib/rubygems/: installer.rb, specification.rb: Prompt user if
+ trying to uninstall a gem that other gems *may* depend on.
+
+2004-04-25 09:27 chadfowler
+
+ * test/test_remote_installer.rb: Changed expected test results to
+ match new (old) gem naming scheme--"ruby" doesn't appear as a
+ platform in the gem name.
+
+2004-04-25 05:50 gsinclair
+
+ * bin/gem: Changed @directory -> @install_dir for clarity
+
+2004-04-25 05:47 gsinclair
+
+ * bin/gem: Improved display of gems, platform-wise
+
+2004-04-25 05:46 gsinclair
+
+ * lib/rubygems/specification.rb: Added documentation
+
+2004-04-25 04:17 jimweirich
+
+ * test/functional.rb: Fixed functional test to properly name a Ruby
+ platform gem.
+
+2004-04-25 04:17 jimweirich
+
+ * packages/sources/.cvsignore, test/data/one/.cvsignore: Ignore the
+ proper gem name.
+
+2004-04-25 04:17 jimweirich
+
+ * lib/rubygems/specification.rb: Undefined several attributes that
+ were redefined to avoid warnings.
+
+2004-04-25 04:17 jimweirich
+
+ * lib/rubygems.rb: Need to initialize @gem_home and @gem_path with
+ ||= to avoid warning.
+
+2004-04-25 03:40 gsinclair
+
+ * lib/rubygems.rb, test/test_gempaths.rb: RUBY_GEMS -> GEM_PATH
+ (environment variable)
+
+2004-04-25 03:33 gsinclair
+
+ * lib/rubygems/specification.rb: Pretty-print the specification
+
+2004-04-25 03:18 gsinclair
+
+ * lib/rubygems/specification.rb: Handle platform in a (hopefully)
+ consistent manner
+
+2004-04-25 03:16 gsinclair
+
+ * install.rb: Use return value from Builder#build to locate gem
+ file
+
+2004-04-25 03:09 gsinclair
+
+ * lib/rubygems/builder.rb: Return file name from #build
+
+2004-04-25 02:32 gsinclair
+
+ * lib/rubygems/specification.rb: Platform goes at the *end* of the
+ full name now.
+
+2004-04-22 06:19 chadfowler
+
+ * test/test_remote_installer.rb: Fixed test to reflect fewer cache
+ sources :(
+
+2004-04-21 17:19 rich
+
+ * lib/rubygems/remote_installer.rb: added support to download the
+ yaml index as a .Z (zlib compressed) file if it exists, then move
+ on to the plain yaml file if it does not
+
+2004-04-20 20:23 chadfowler
+
+ * examples/application/an-app.gemspec, lib/rubygems/format.rb,
+ packages/sources/lib/sources.rb: Committed Dick Davies' patch to
+ fix broken tests.
+
+2004-04-18 01:51 gsinclair
+
+ * bin/gem, lib/rubygems/doc_manager.rb: RDoc generation observes
+ 'rdoc' config file value
+
+2004-04-17 12:15 gsinclair
+
+ * bin/gem: Improved 'build' error output
+
+2004-04-17 12:12 gsinclair
+
+ * lib/: rubygems.rb, rubygems/remote_installer.rb,
+ rubygems/specification.rb, rubygems/validator.rb: All
+ gems-related exceptions now extend Gem::Exception
+
+2004-04-17 12:11 gsinclair
+
+ * lib/rubygems/specification.rb: Improved handling of summary and
+ decription strings - convert to single line
+
+2004-04-17 01:09 gsinclair
+
+ * bin/gem: Prevent remote install attempt if local install was
+ successful
+
+2004-04-17 00:49 gsinclair
+
+ * lib/rubygems/builder.rb: Better formatted the output code
+
+2004-04-16 21:31 gsinclair
+
+ * lib/rubygems/remote_installer.rb: Stoopid coding error (thanks
+ Kent Sibilev)
+
+2004-04-16 00:00 rich
+
+ * lib/rubygems/installer.rb: added code to optionally use nmake
+ instead of make on win32 systems
+
+2004-04-15 20:12 gsinclair
+
+ * bin/gem, lib/rubygems/remote_installer.rb: Clarified proxy
+ handling and interface: --[no-]http-proxy [URL]
+
+2004-04-13 00:16 jimweirich
+
+ * bin/gem, test/bogussources.rb, test/functional.rb: Oops, missed
+ an instance of GEM_PATH in the gem binary.
+
+2004-04-12 21:28 jimweirich
+
+ * lib/rubygems/cache.rb: Oops. Missed a GEM_PATH.
+
+2004-04-12 21:11 jimweirich
+
+ * test/test_remote_installer.rb: removed setting of environment
+ variable for now.
+
+2004-04-12 21:09 jimweirich
+
+ * Rakefile, lib/rubygems.rb, lib/rubygems/cache.rb,
+ lib/rubygems/installer.rb, packages/sources/.cvsignore,
+ scripts/runtest.rb, test/.cvsignore, test/bogussources.rb,
+ test/test_format.rb, test/test_gempaths.rb,
+ test/test_remote_installer.rb, test/test_validator.rb: Added
+ test/temp to the clobber list. Broke out tests into inline to
+ avoid test dependencies on rubygem.
+
+2004-04-12 07:52 chadfowler
+
+ * lib/: rubygems.rb, rubygems/installer.rb,
+ rubygems/remote_installer.rb: Cleaning up output strings wrt
+ formating of "gem (version)".
+
+2004-04-12 07:41 chadfowler
+
+ * lib/rubygems/installer.rb: Gavin Sinclair's uninstall bug.
+
+2004-04-11 15:26 jimweirich
+
+ * test/data/one/: .cvsignore, one-ruby-0.0.1.gem: removed
+ one-ruby*.gem from source control. This gem is automatically
+ generated in testing.
+
+2004-04-11 10:50 chadfowler
+
+ * bin/gem: Gavin Sinclair's test code enhancements
+
+2004-04-11 07:50 chadfowler
+
+ * bin/gem, lib/rubygems/installer.rb,
+ lib/rubygems/remote_installer.rb, lib/rubygems/specification.rb,
+ test/insure_session.rb, test/test_remote_installer.rb,
+ test/data/one/one-ruby-0.0.1.gem: Gavin Sinclair patches to make
+ installer return types less ambiguous.
+
+2004-04-09 10:29 chadfowler
+
+ * lib/rubygems/installer.rb, test/data/one/one-ruby-0.0.1.gem: gem
+ -u input validation patch by Ville Aine
+
+2004-04-07 07:49 chadfowler
+
+ * bin/gem, lib/rubygems/cache.rb, test/data/one/one-ruby-0.0.1.gem:
+ Finally have passing tests.
+
+2004-04-07 07:24 chadfowler
+
+ * lib/rubygems/remote_installer.rb,
+ test/data/one/one-ruby-0.0.1.gem: Allow default option to work on
+ remote dependency prompt.
+
+2004-04-07 07:05 chadfowler
+
+ * lib/rubygems/remote_installer.rb, test/test_remote_installer.rb,
+ test/data/one/one-ruby-0.0.1.gem: Applied George Marrows' patch
+ to remote_install
+
+2004-04-07 06:23 chadfowler
+
+ * bin/gem, test/data/one/one-ruby-0.0.1.gem: No longer "seeing"
+ double on remote searches
+
+2004-04-05 07:39 chadfowler
+
+ * Rakefile, test/test_remote_installer.rb,
+ test/data/one/one-ruby-0.0.1.gem: remote_installer tests aren't
+ completely hosed anymore.
+
+2004-04-05 06:16 chadfowler
+
+ * Rakefile, test/data/one/one-ruby-0.0.1.gem: Rake target for
+ running all tests (unit + functional) "alltests"
+
+2004-04-05 00:48 jimweirich
+
+ * test/: insure_session.rb, data/one/README.one,
+ data/one/one-ruby-0.0.1.gem, data/one/one.gemspec,
+ data/one/lib/one.rb: added for functional tests
+
+2004-04-05 00:48 jimweirich
+
+ * test/functional.rb: Moved session gem detection to insure_session
+ file. Modified functional tests to use gem command. Removed
+ some directory stuff because rake guarantees the starting
+ directory. Added test_info functional test. Added test_build
+ functional test. Added assert status.
+
+2004-04-05 00:48 jimweirich
+
+ * lib/rubygems/remote_installer.rb: Changed exceptions to inherit
+ from RunTimeError
+
+2004-04-05 00:48 jimweirich
+
+ * bin/gem: Changed Installer to RemoteInstaller in rubygems-info.
+
+2004-04-05 00:48 jimweirich
+
+ * Rakefile: Added generated test gem to clobber list. Added
+ functional test target to rakefile.
+
+2004-04-04 21:17 chadfowler
+
+ * packages/sources/lib/sources.rb: Added gems mirror at
+ http://gems.chadfowler.com
+
+2004-04-04 20:51 chadfowler
+
+ * bin/gem, lib/rubygems/remote_installer.rb, test/functional.rb:
+ More improved error messages (don't show stack trace when using
+ bin/gem)
+
+2004-04-04 20:43 chadfowler
+
+ * lib/rubygems/cache.rb: Only read specs that end in "gemspec".
+ The code doesn't handle non-gemspecs very well at all.
+
+2004-04-04 20:15 chadfowler
+
+ * test/mock/gems/specifications/sources-0.0.1.gemspec: [no log
+ message]
+
+2004-04-04 20:09 chadfowler
+
+ * test/mock/gems/gems/sources-0.0.1/lib/sources.rb: Rearranging
+ things a bit
+
+2004-04-04 20:02 chadfowler
+
+ * bin/gem, lib/rubygems/remote_installer.rb, test/bogussources.rb,
+ test/functional.rb: Better error messages on unresolvable host.
+
+2004-04-04 12:50 chadfowler
+
+ * redist/session.gem, test/bogussources.rb, test/functional.rb:
+ Added the beginnings of a functional test suite.
+
+2004-04-03 22:02 chadfowler
+
+ * lib/rubygems/validator.rb: Just had to explicitly rescue
+ VerificationError. All is well.
+
+2004-04-03 22:01 chadfowler
+
+ * lib/rubygems/validator.rb: Mauricio fixed a problem with alien
+ (just failed to update it when we changed the gem directory), but
+ now there's another issue I can't find. Anyway, this fix is
+ obviously needed. But alien is broken anyway.
+
+2004-04-03 21:57 chadfowler
+
+ * install.rb, lib/rubygems/builder.rb: Batsman's bug report and
+ code for the bugs I introduced today. :)
+
+2004-04-03 09:50 chadfowler
+
+ * lib/rubygems/specification.rb: Defaulting a spec's require_path
+ to [] to avoid downstream errors.
+
+2004-04-03 09:06 chadfowler
+
+ * lib/rubygems/builder.rb, test/test_builder.rb: builder now
+ validates the gemspec.
+
+2004-04-03 08:48 chadfowler
+
+ * lib/rubygems/specification.rb, test/test_specification.rb: Added
+ checking for gem specs to make sure they have all required
+ attributes.
+
+2004-04-03 08:06 chadfowler
+
+ * gemspecs/rublog.gemspec: My original rublog gem was broken, in
+ that it didn't have a require_path.
+
+2004-04-02 07:48 chadfowler
+
+ * lib/rubygems/remote_installer.rb: Prompt for installation of
+ dependencies.
+
+ For now, there is a puts/gets in the middle of
+ remote_installer.rb This should probably be cleaned up later
+ (return control flow to the gem program to install the
+ dependencies, for example.
+
+2004-04-02 07:37 chadfowler
+
+ * TODO: [no log message]
+
+2004-04-02 07:34 chadfowler
+
+ * test/: simple_gem.rb, test_format.rb: Some things I forgot to cvs
+ add earlier.
+
+2004-04-02 07:29 chadfowler
+
+ * example/: test.gemspec, lib/test.rb, lib/test/wow.rb: Removing
+ example directory in favor of "examples" directory (just better
+ organized).
+
+2004-04-02 07:26 chadfowler
+
+ * test/test_all.rb: Removed test_all.rb. Rake is obviously a
+ better way to do it.
+
+2004-03-31 19:13 chadfowler
+
+ * lib/rubygems/format.rb, lib/rubygems/installer.rb,
+ lib/rubygems/validator.rb, test/test_all.rb,
+ test/test_validator.rb: More tests and refactoring to support
+ them.
+
+2004-03-30 02:41 rich
+
+ * lib/rubygems/installer.rb: allow passing parameters to extconf.rb
+ with:
+
+ ruby -i blah.gem --local -- --with-option
+
+ everything past the -- will go to the extconf.rb...just like
+ setup.rb
+
+2004-03-30 02:34 rich
+
+ * lib/rubygems/: installer.rb, specification.rb: very initial
+ capability to build source gems. this only lets you build native
+ extensions so long as you do not have to specify --with-
+ directories
+
+2004-03-29 08:31 rich
+
+ * install.rb: switched migration of old gems to new ./gems subdir
+ to use FileUtils rather than ftools...hope to fix reported win32
+ error.
+
+2004-03-29 01:04 rich
+
+ * lib/rubygems/doc_manager.rb: fixed bug in pathing based on new
+ directory structure
+
+2004-03-29 01:03 rich
+
+ * lib/rubygems/remote_installer.rb: fixed bug in default for proxy
+ (should default to nil not true)
+
+2004-03-29 01:03 rich
+
+ * bin/gem: updated with patch to allow for config file with minor
+ difference from gavin's patch which passes a nil to the
+ RemoteInstaller if the proxy does not exist
+
+2004-03-28 23:22 rich
+
+ * install.rb: added code to migrate gems if they are in the old
+ directory structure
+
+2004-03-28 21:30 rich
+
+ * install.rb, lib/rubygems.rb, lib/rubygems/installer.rb,
+ lib/rubygems/specification.rb: changed path of installed gems to
+ be:
+
+ ruby/gems/1.8/gems
+
+ which cleans up the root.
+
+2004-03-28 18:53 chadfowler
+
+ * test/test_all.rb: This is the file to run for all of the tests.
+
+ test_remote_installer is commented out for now. The open URI
+ patch that George gave us makes the code a lot nicer to look at,
+ but a little harder to test.
+
+2004-03-28 18:50 chadfowler
+
+ * lib/rubygems/remote_installer.rb, test/test_cache.rb,
+ test/test_remote_installer.rb: Added some tests for cache search
+
+2004-03-28 12:19 chadfowler
+
+ * bin/gem, lib/rubygems/validator.rb, test/test_validator.rb: Some
+ tests for the validator.
+
+ Made the validator more testable.
+
+2004-03-28 09:30 chadfowler
+
+ * bin/gem, lib/rubygems/validator.rb: Fixed a problem with false
+ alarms in the validator.
+
+2004-03-27 08:23 chadfowler
+
+ * bin/gem: No longer have an option to pass http proxy host into
+ the gem program. Only reads it from the environment. This is
+ because George's patch (and open-uri) work this way, and I'm lazy
+ right now.
+
+2004-03-27 08:17 chadfowler
+
+ * lib/rubygems/remote_installer.rb: George Marrows' nice patch to
+ remove a bunch of code from remote_installer.
+
+ Our remote_installer tests are failing. We really need to start
+ paying attention to the test directory. :(`
+
+2004-03-24 23:26 jimweirich
+
+ * install.rb: Do not install commands ending in ~.
+
+2004-03-24 23:25 jimweirich
+
+ * lib/rubygems/specification.rb: Changed executables from accessor
+ to writer to avoid redefinition.
+
+2004-03-21 21:10 jimweirich
+
+ * bin/gem: fixed uninitialized directory option
+
+2004-03-21 15:34 jimweirich
+
+ * bin/gem: removed carriage returns that screwed up the #! line
+
+2004-03-21 09:02 chadfowler
+
+ * bin/gem: Gavin's bin/gem refactoring.
+
+2004-03-20 17:03 jimweirich
+
+ * bin/gem: added wrapping to gem listing
+
+2004-03-20 12:22 chadfowler
+
+ * install.rb: More cleaning by Gavin Sinclair
+
+2004-03-20 12:08 chadfowler
+
+ * examples/application/an-app.gemspec,
+ examples/application/bin/myapp,
+ examples/application/lib/somefunctionality.rb, lib/rubygems.rb,
+ lib/rubygems/installer.rb, lib/rubygems/specification.rb: Added
+ functionality for installing applications into the system bindir.
+ Needs cleaning and refactoring.
+
+2004-03-20 07:53 chadfowler
+
+ * bin/gem: [no log message]
+
+2004-03-19 23:03 chadfowler
+
+ * bin/gem: More intuitive default.
+
+2004-03-19 10:45 chadfowler
+
+ * bin/gem: * Some minor rearranging of the test stuff so that
+ installation errors will also abort the test run * Don't try to
+ run tests if none are included with the gem
+
+2004-03-18 22:27 chadfowler
+
+ * bin/gem, example/lib/test.rb, lib/rubygems/cache.rb,
+ lib/rubygems/specification.rb: * Preliminary support for: gem -i
+ blah-0.0.1.gem --run-tests Needs to be cleaned up considerably.
+ * Introduction of new gemspec metadata "unit_test_suite", which
+ will be require'd in order to load all unit tests
+
+2004-03-17 09:33 chadfowler
+
+ * bin/gem: Applied Gavin Sinclair's patch to make help output
+ better.
+
+2004-03-16 21:55 chadfowler
+
+ * bin/gem: Added --remote-list option for gem command to display
+ all gems on server.
+
+2004-03-16 21:50 chadfowler
+
+ * bin/gem, doc/UserDoc.html: Fixed --help case inconsistencies and
+ documentation typos as per Scott Harper's email.
+
+2004-03-16 21:41 chadfowler
+
+ * bin/gem: --list and --search display are the same.
+
+2004-03-16 21:33 chadfowler
+
+ * bin/gem: Implemented some of Scott Harper's search suggestions:
+ case insensitive sort of returned gems and display description
+ with gem name in search results.
+
+2004-03-16 21:20 chadfowler
+
+ * bin/gem, lib/rubygems/remote_installer.rb: http_proxy option
+ implemented
+
+2004-03-15 07:19 chadfowler
+
+ * lib/rubygems/remote_installer.rb: Installation is now case
+ insensitive (like search)
+
+2004-03-15 07:07 chadfowler
+
+ * TODO, bin/gem, lib/rubygems/remote_installer.rb: Better error
+ messages. updated TODO list.
+
+2004-03-14 21:02 chadfowler
+
+ * bin/gem, lib/rubygems/remote_installer.rb: --dir didn't work with
+ remote-install. Now it does.
+
+2004-03-14 17:48 rich
+
+ * bin/gem: fixed uninstall bug
+
+2004-03-14 17:18 rich
+
+ * lib/rubygems/doc_manager.rb: changed to remove <drive>: on
+ win32...ug
+
+2004-03-14 16:15 rich
+
+ * install.rb: fixed typo
+
+2004-03-14 16:13 rich
+
+ * install.rb: generate cmd files
+
+2004-03-14 16:13 rich
+
+ * bin/: gem.cmd, gem_server.cmd: now generate cmd files
+
+2004-03-14 15:52 chadfowler
+
+ * bin/gem: Fixed a small bug with --gen-rdoc and the remote
+ installer.
+
+2004-03-14 15:38 chadfowler
+
+ * lib/rubygems.rb: Back to version 1.0 ;)
+
+2004-03-14 15:36 chadfowler
+
+ * lib/rubygems.rb: Updated rubygemsversion
+
+2004-03-14 15:31 chadfowler
+
+ * README: credits
+
+2004-03-14 15:24 rich
+
+ * README: initial readme
+
+2004-03-14 15:12 rich
+
+ * doc/UserDoc.html: updated w/doc on documentation ;-)
+
+2004-03-14 15:01 rich
+
+ * gemspecs/jabber4r.gemspec: added jabber4r gemspec
+
+2004-03-14 14:58 rich
+
+ * bin/gem_server: change the documentation path to /
+
+2004-03-14 14:57 rich
+
+ * install.rb: remove installing .rb files from ./bin
+
+2004-03-14 14:32 rich
+
+ * doc/: DevDoc.txt, GemSpecification.txt, UserDoc.html,
+ UserDoc.txt: updated with latest docs
+
+2004-03-14 12:05 chadfowler
+
+ * test/test_remote_installer.rb: Fixed tests.
+
+2004-03-14 11:31 chadfowler
+
+ * lib/rubygems/specification.rb: Fixed bug that would manifest
+ itself if a gem creator put apostrophes/single-quotes in the gem
+ spec.
+
+2004-03-14 00:04 rich
+
+ * doc/: UserDoc.html, UserDoc.txt: finished user's guide
+
+2004-03-13 21:48 rich
+
+ * doc/: DevDoc.html, UserDoc.html, UserDoc.txt: updated user's
+ guide...will finish section on ruby's library mgt soon ;-)
+
+2004-03-13 20:48 chadfowler
+
+ * doc/DevDoc.txt: Added documentation on making and distributing
+ gems
+
+2004-03-13 20:20 chadfowler
+
+ * TODO: [no log message]
+
+2004-03-13 19:51 rich
+
+ * doc/: DevDoc.html, DevDoc.txt, GemSpecification.html,
+ GemSpecification.txt, UserDoc.html, UserDoc.txt, doc.css,
+ makedoc.rb: added these doc (wiki) files from
+ http://rubygems.rubyforge.org/
+
+2004-03-13 17:56 chadfowler
+
+ * TODO, gemspecs/README, gemspecs/cgikit-1.1.0.gemspec,
+ gemspecs/linguistics.gemspec, gemspecs/ook.gemspec,
+ gemspecs/progressbar.gemspec, gemspecs/redcloth.gemspec,
+ gemspecs/rublog.gemspec, gemspecs/ruby-doom.gemspec,
+ gemspecs/rubyjdwp.gemspec, gemspecs/statistics.gemspec: Added
+ some gemspecs for actual RAA packages.
+
+2004-03-13 14:35 chadfowler
+
+ * TODO, lib/rubygems/remote_installer.rb: Preliminary HTTP Proxy
+ support. Untested.
+
+2004-03-13 09:11 chadfowler
+
+ * packages/sources/lib/sources.rb: Changed to point to rubyforge
+
+2004-03-12 22:40 rich
+
+ * bin/generate_yaml_index.rb: generates a yaml index for a gems
+ repository
+
+2004-03-12 22:02 chadfowler
+
+ * bin/gem_server: No longer serving gem specs.
+
+2004-03-12 21:42 chadfowler
+
+ * TODO, bin/gem_server.cgi: We decided to trash gem_server.cgi in
+ favor of the static content generator Rich is working on.
+
+2004-03-12 21:15 chadfowler
+
+ * TODO: [no log message]
+
+2004-03-12 20:11 chadfowler
+
+ * bin/gem, lib/rubygems/installer.rb,
+ lib/rubygems/remote_installer.rb: Basic search funtionality in.
+
+ Slight refactoring of Installer and RemoteInstaller
+
+2004-03-12 18:28 chadfowler
+
+ * TODO: [no log message]
+
+2004-03-12 16:37 chadfowler
+
+ * TODO: [no log message]
+
+2004-03-12 16:14 chadfowler
+
+ * TODO: More TODO items
+
+2004-03-08 13:50 chadfowler
+
+ * TODO, bin/gem_server, example/test.gemspec: Use rdoc templates
+ for HTML. Nearly XHTML compliant.
+
+2004-03-08 08:21 chadfowler
+
+ * TODO: Added TODO list
+
+2004-03-08 08:12 chadfowler
+
+ * lib/rubygems/validator.rb: Fixed a small (but crippling) bug in
+ the validator.
+
+2004-01-24 13:49 chadfowler
+
+ * bin/gem, lib/rubygems.rb, lib/rubygems/cache.rb,
+ lib/rubygems/validator.rb, lib/rubygems/version.rb: More cleanup.
+
+2004-01-24 13:29 chadfowler
+
+ * bin/gem, lib/rubygems/remote_installer.rb: A little cleaning of
+ (Remote)Installer inconsistencies
+
+2004-01-24 13:23 chadfowler
+
+ * bin/gem: Removed the weird instance variable thing we had going
+ on. :)
+
+2004-01-07 17:34 chadfowler
+
+ * bin/gem: removed old cruft
+
+2003-12-24 11:32 chadfowler
+
+ * lib/rubygems/validator.rb: Gem validation was returning false
+ negatives (corrupted gems were not reporting their corruption).
+
+2003-12-18 14:18 chadfowler
+
+ * lib/rubygems/cache.rb: Lyle noticed some out of date rdoc
+ documentation. Thanks Lyle!
+
+2003-12-03 08:05 chadfowler
+
+ * install.rb: Gavin's patch for installing the files in bin/ on
+ rubygems installation.
+
+2003-11-30 00:36 chadfowler
+
+ * lib/rubygems/specification.rb: Little warnings adjustment
+
+2003-11-29 17:27 jimweirich
+
+ * Rakefile: added Rakefile to package
+
+2003-11-29 16:23 jimweirich
+
+ * lib/rubygems/specification.rb: Removed defined? and initialized
+ @platform
+
+2003-11-29 16:08 jimweirich
+
+ * lib/rubygems/specification.rb: Initialized @loaded and check
+ defined?(@platform) to silence some -w warnings.
+
+2003-11-29 09:26 rich
+
+ * bin/gem_server, lib/rubygems/doc_manager.rb: updated to support
+ /doc URL to generate list of installed gems w/doc link for rdoc
+ generated links.
+
+2003-11-29 08:30 rich
+
+ * lib/rubygems/doc_manager.rb: minor format change of error message
+
+2003-11-29 08:29 rich
+
+ * bin/gem, lib/rubygems/builder.rb, lib/rubygems/doc_manager.rb,
+ lib/rubygems/installer.rb: instantiates DocManager now. errors
+ out on no install of RDoc. warns if .gemspec does not specify
+ having rdoc, but rdoc is generated
+
+2003-11-29 02:13 rich
+
+ * bin/gem, lib/rubygems.rb, lib/rubygems/doc_manager.rb,
+ lib/rubygems/format.rb, lib/rubygems/installer.rb,
+ lib/rubygems/specification.rb: added capability to generate rdoc
+ on install of gem (--gen-rdoc). this doc is placed in
+ Gem.dir+doc+gem.full_name fixed but in installer when moving to
+ format (not calling each) added doc manager to add/remove
+ documenatation (right now only rdoc)
+
+2003-11-29 01:28 rich
+
+ * lib/rubygems/specification.rb: should not define the attr_readers
+ for requirements/dependencies so undef is unnecessary
+
+2003-11-29 00:12 jimweirich
+
+ * lib/rubygems/specification.rb: Undefing dependencies and
+ requirements removes warning when used with -w.
+
+2003-11-29 00:12 jimweirich
+
+ * lib/rubygems.rb: Using defined?($GEM_PATH) avoids warning when
+ used with -w switch.
+
+2003-11-28 15:58 chadfowler
+
+ * bin/gem, example/test.gemspec, lib/rubygems.rb,
+ lib/rubygems/installer.rb, lib/rubygems/validator.rb,
+ lib/rubygems/format.rb: Separated gem file reading into a
+ separate class/file.
+
+2003-11-28 15:20 rich
+
+ * lib/rubygems/specification.rb: added has_rdoc?/has_rdoc methods
+ ... will be used to autogenerate rdoc
+
+2003-11-28 12:30 chadfowler
+
+ * lib/rubygems/validator.rb: Rdoc added
+
+2003-11-28 11:51 chadfowler
+
+ * bin/gem, lib/rubygems.rb, lib/rubygems/validator.rb: A little
+ rearranging of the validation/alien code. It's still ugly, but
+ at least it's in its own file now. :)
+
+2003-11-28 11:40 chadfowler
+
+ * bin/gem: Removed a little cruft.
+
+2003-11-27 11:04 chadfowler
+
+ * bin/gem: Print success message for each gem *not* containing
+ errors.
+
+2003-11-27 11:00 chadfowler
+
+ * bin/gem, lib/rubygems/installer.rb: Preliminary support for gem
+ directory validation (--alien). Looks for bad or missing gem
+ files, missing spec files, files installed that aren't part of
+ the gem, checksum mismatches, etc.
+
+ Very ugly code. Very ugly output. Work in progress.
+
+2003-11-24 11:58 rich
+
+ * lib/rubygems/specification.rb: change full_name to include
+ platform
+
+2003-11-24 09:15 chadfowler
+
+ * bin/gem: Option for HTTP Proxy server for remote-install. Not
+ yet implemented.
+
+2003-11-23 20:22 chadfowler
+
+ * lib/rubygems/builder.rb: Removed a stray \" in builder's success
+ message
+
+2003-11-23 20:16 chadfowler
+
+ * lib/rubygems/specification.rb: Leaving escape in but commenting
+ out its functionality because it hosed some other things up.
+ Need to revisit this for the case where:
+
+ s.summary = "Chad's Thing" # It's the apostrophe
+
+2003-11-23 20:08 chadfowler
+
+ * lib/rubygems/specification.rb: Escape quotes to avoid invalid
+ gemspecs in the #{Gem.dir}/specifications directory
+
+2003-11-23 19:21 chadfowler
+
+ * bin/gem: Less ugly error message on file IO problems.
+
+2003-11-22 22:34 chadfowler
+
+ * bin/gem: Very simple support for validating a gem. Will probably
+ move this into the libs eventually.
+
+2003-11-22 20:53 chadfowler
+
+ * example/test.gemspec, lib/rubygems/builder.rb: Generate MD5
+ checksum for gem and store it in the file. Will be used to
+ validate gem file before installation.
+
+2003-11-22 13:58 chadfowler
+
+ * install.rb, lib/rubygems/remote_installer.rb,
+ packages/sources/sources.gemspec,
+ packages/sources/lib/sources.rb: remote-install sources are now
+ installed as a ruby gem at the time of rubygems installation.
+ sources gemspec included in the rubygems distribution.
+
+2003-11-22 12:52 chadfowler
+
+ * bin/gem: Allow gem info by --version
+
+2003-11-22 11:50 chadfowler
+
+ * lib/: rubygems.rb, rubygems/cache.rb: Fixed the bug I introduced
+ by fixing Rich's bug with gem cache caching. ;)
+
+ Gem::Cache now has a #refresh! method.
+
+2003-11-22 10:16 chadfowler
+
+ * bin/gem, lib/rubygems.rb, lib/rubygems/installer.rb,
+ lib/rubygems/remote_installer.rb: - Fixed bug in Gem.cache
+ (though we may want to revisit it for in-memory caching - Command
+ line configurable version for uninstall
+
+2003-11-22 00:28 rich
+
+ * lib/rubygems/cache.rb: rdoc'd search method
+
+2003-11-22 00:24 rich
+
+ * bin/gem, lib/rubygems/cache.rb, lib/rubygems/version.rb,
+ test/test_version_comparison.rb: removed search_by_name because
+ search does the same thing. version::requirement was updated to
+ that if you did not specific a version operation, it assumes an =
+ sign. updated tests accordingly
+
+2003-11-21 23:58 rich
+
+ * lib/rubygems/: cache.rb, installer.rb: allow version to be
+ specified in uninstall (if called programatically)
+
+2003-11-21 23:52 rich
+
+ * lib/: rubygems.rb, rubygems/cache.rb, rubygems/installer.rb,
+ rubygems/specification.rb: > moved all searching into cache..and
+ now search by name/version and return an
+ ordered list (.last == highest version).
+ > modified uninstaller to allow selecting a specific version to
+ uninstall if
+ multiple versions are installed.
+ > implemented comparison function on specification.
+ > changed require_gem to use new search of cache function
+
+2003-11-21 21:06 chadfowler
+
+ * bin/gem, lib/rubygems/remote_installer.rb: Added ability to
+ specify optional version requirement for remote installations
+
+2003-11-21 20:25 chadfowler
+
+ * test/test_remote_installer.rb: Removed carriage returns
+
+2003-11-21 19:04 chadfowler
+
+ * bin/gem_server: Converted from getopts to optparse.
+
+2003-11-21 18:31 rich
+
+ * lib/rubygems.rb: changed the order in which operations are
+ performed in require_gem. it now requires dependent gems prior
+ to adding the require_paths to a gem. otherwise we could have
+ had a LoadError on a dependent gem but the paths were already
+ added...potential problem
+
+2003-11-21 18:21 rich
+
+ * lib/rubygems/installer.rb: updated to ensure
+ (specifications/cache) directories exist for a provided path
+
+2003-11-21 18:01 rich
+
+ * lib/rubygems/specification.rb: updated rdoc
+
+2003-11-21 17:59 rich
+
+ * bin/gem, lib/rubygems/builder.rb, lib/rubygems/installer.rb,
+ lib/rubygems/specification.rb: fixed various bugs with the
+ $GEM_PATH stuff, specifically on uninstall. Also, changed to
+ allow specifying a directory on install (--dir) and force install
+ (--force). Changed the builder generated ruby header to use
+ optparse.
+
+2003-11-21 07:03 chadfowler
+
+ * lib/: rubygems.rb, rubygems/cache.rb,
+ rubygems/remote_installer.rb: Remote installation of dependencies
+ now works. It downloads all dependent gems or errors out.
+
+ Fixed bug in require_gem. Wrong call to cache.
+
+2003-11-21 00:59 rich
+
+ * bin/gem, example/test.gemspec, lib/rubygems.rb,
+ lib/rubygems/cache.rb, lib/rubygems/installer.rb,
+ lib/rubygems/specification.rb: added capability to support
+ multiple paths $GEM_PATH in Ruby and RUBY_GEMS in the ARGV. Lots
+ of changes were needed to support this. also added the --force
+ and --dir options to gem installtion
+
+2003-11-20 22:50 chadfowler
+
+ * bin/gem: Switched to optparse. Not a whole lot gained, but it
+ seems to be the way Ruby is going. It's nice not to have to do
+ the "when" stuff, I guess.
+
+2003-11-19 23:41 chadfowler
+
+ * lib/rubygems/: installer.rb, remote_installer.rb: Added
+ chadfowler.com to the hardcoded remote install list.
+
+ Fixed a dangling YAML.load that broke uninstall.
+
+2003-11-19 22:56 rich
+
+ * lib/rubygems.rb: fixed bug in loading rubygems
+
+2003-11-19 22:51 chadfowler
+
+ * bin/: gem_server, gem_server.cgi: require 'yaml' :)
+
+2003-11-19 22:44 rich
+
+ * lib/: rubygems.rb, rubygems/cache.rb, rubygems/specification.rb:
+ changed the format of stuff stored in the spec directory to ruby
+ instead of YAML. This allows us to not have to load yaml in
+ 'require_gem'. switched the specification list to a Cache
+ object.
+
+2003-11-19 21:56 rich
+
+ * lib/rubygems/installer.rb: write the spec file in ruby and not in
+ yaml format (in the spec dir)
+
+2003-11-19 20:32 rich
+
+ * lib/rubygems/specification.rb: added to_ruby method to generate a
+ ruby string that can be eval'ed in to build a Gem Specification
+
+2003-11-17 21:37 jimweirich
+
+ * bin/: gem_server, gem_server.cgi: removed carriage returns
+
+2003-11-17 21:19 chadfowler
+
+ * install.rb: Accidentally left some junk in the file.
+
+2003-11-17 19:50 dblack
+
+ * test/test_version_comparison.rb: * Test cases for Version.rb
+
+2003-11-17 19:50 dblack
+
+ * lib/rubygems/version.rb: * Split off tests into
+ rubygems/tests/test_version_comparison.rb
+
+2003-11-17 12:37 chadfowler
+
+ * install.rb: Create File.join(Config::CONFIG['libdir'], "ruby",
+ "gems") + "specifications" and + "cache" during installation.
+
+ Need to remove this from rubygems.rb and replace with
+ ensure_directory call.
+
+2003-11-17 12:29 rich
+
+ * lib/rubygems/version.rb: rdoc added
+
+2003-11-17 11:31 rich
+
+ * lib/rubygems/specification.rb: rdoc added
+
+2003-11-17 10:38 rich
+
+ * lib/rubygems/: cache.rb, installer.rb: made rdoc comments and
+ renamed some variables
+
+2003-11-17 08:48 dblack
+
+ * lib/rubygems/version.rb: * Added stricter checking of incoming
+ Requirement string
+
+ * Added unit tests at end of file
+
+2003-11-17 07:32 chadfowler
+
+ * bin/: gem_server, gem_server.cgi: Refactored gem_server program
+ and added an equivalent CGI version.
+
+2003-11-17 00:14 rich
+
+ * lib/: rubygems.rb, rubygems/builder.rb, rubygems/cache.rb: added
+ rdoc documentation
+
+2003-11-16 17:15 chadfowler
+
+ * bin/: gem.cmd, gem_server.cmd: Added some batch files for Windows
+
+2003-11-16 17:08 rich
+
+ * install.rb, bin/gem, bin/gem_server, example/test.gemspec,
+ example/lib/test.rb, example/lib/test/wow.rb, lib/rubygems.rb,
+ lib/rubygems/builder.rb, lib/rubygems/cache.rb,
+ lib/rubygems/installer.rb, lib/rubygems/remote_installer.rb,
+ lib/rubygems/specification.rb, lib/rubygems/version.rb,
+ test/test_remote_installer.rb: Initial import developed at
+ RubyConf 2003 by:
+
+ Rich Kilmer Chad Fowler David Black Paul Brannon Jim Weirich
+
+2003-11-16 17:08 rich
+
+ * install.rb, bin/gem, bin/gem_server, example/test.gemspec,
+ example/lib/test.rb, example/lib/test/wow.rb, lib/rubygems.rb,
+ lib/rubygems/builder.rb, lib/rubygems/cache.rb,
+ lib/rubygems/installer.rb, lib/rubygems/remote_installer.rb,
+ lib/rubygems/specification.rb, lib/rubygems/version.rb,
+ test/test_remote_installer.rb: Initial revision
+
+Local variables:
+indent-tabs-mode: t
+tab-width: 8
+end:
diff --git a/doc/rubygems/History.txt b/doc/rubygems/History.txt
new file mode 100644
index 0000000000..4a80b1bfb4
--- /dev/null
+++ b/doc/rubygems/History.txt
@@ -0,0 +1,852 @@
+# -*- coding: utf-8 -*-
+
+=== 1.3.6 / 2010-02-17
+
+NOTE:
+
+http://rubygems.org is now the default source for downloading gems.
+
+You may have sources set via ~/.gemrc, so you should replace
+http://gems.rubyforge.org with http://rubygems.org
+
+http://gems.rubyforge.org will continue to work for the forseeable future.
+
+New features:
+
+* `gem` commands
+ * Added `gem push` and `gem owner` for interacting with modern/Gemcutter
+ sources
+ * `gem dep` now supports --prerelease.
+ * `gem fetch` now supports --prerelease.
+ * `gem server` now supports --bind. Patch #27357 by Bruno Michel.
+ * `gem rdoc` no longer overwrites built documentation. Use --overwrite
+ force rebuilding. Patch #25982 by Akinori MUSHA.
+* Captial letters are now allowed in prerelease versions.
+
+Bug fixes:
+
+* Development deps are no longer added to rubygems-update gem so older
+ versions can update sucessfully.
+* Installer bugs:
+ * Prerelease gems can now depend on non-prerelease gems.
+ * Development dependencies are ignored unless explicitly needed. Bug #27608
+ by Roger Pack.
+* `gem` commands
+ * `gem which` now fails if no paths were found. Adapted patch #27681 by
+ Caio Chassot.
+ * `gem server` no longer has invalid markup. Bug #27045 by Eric Young.
+ * `gem list` and friends show both prerelease and regular gems when
+ --prerelease --all is given
+* Gem::Format no longer crashes on empty files. Bug #27292 by Ian Ragsdale.
+* Gem::GemPathSearcher handles nil require_paths. Patch #27334 by Roger Pack.
+* Gem::RemoteFetcher no longer copies the file if it is where we want it.
+ Patch #27409 by Jakub Šťastný.
+
+Deprecation Notices:
+
+* lib/rubygems/timer.rb has been removed.
+* Gem::Dependency#version_requirements is deprecated and will be removed on or
+ after August 2010.
+* Bulk index update is no longer supported.
+* Gem::manage_gems was removed in 1.3.3.
+* Time::today was removed in 1.3.3.
+
+=== 1.3.5 / 2009-07-21
+
+Bug fixes:
+
+* Fix use of prerelease gems.
+* Gem.bin_path no longer escapes path with spaces. Bug #25935 and #26458.
+
+Deprecation Notices:
+
+* Bulk index update is no longer supported (the code currently remains, but not
+ the tests)
+* Gem::manage_gems was removed in 1.3.3.
+* Time::today was removed in 1.3.3.
+
+=== 1.3.4 / 2009-05-03
+
+Bug Fixes:
+
+* Fixed various warnings
+* Gem::ruby_version works correctly for 1.8 branch and trunk
+* Prerelease gems now show up in `gem list` and can be used
+* Fixed option name for `gem setup --format-executable`
+* RubyGems now matches Ruby > 1.9.1 gem paths
+* Gem::RemoteFetcher#download now works for explicit Windows paths across
+ drives. Bug #25882 by Lars Christensen
+* Fix typo in Gem::Requirement#parse. Bug #26000 by Mike Gunderloy.
+
+Deprecation Notices:
+
+* Bulk index update is no longer supported (the code currently remains, but not
+ the tests)
+* Gem::manage_gems was removed in 1.3.3.
+* Time::today was removed in 1.3.3.
+
+=== 1.3.3 / 2009-05-04
+
+New Features:
+
+* `gem server` allows port names (from /etc/services) with --port.
+* `gem server` now has search that jumps to RDoc. Patch #22959 by Vladimir
+ Dobriakov.
+* `gem spec` can retrieve single fields from a spec (like `gem spec rake
+ authors`).
+* Gem::Specification#has_rdoc= is deprecated and ignored (defaults to true)
+* RDoc is now generated regardless of Gem::Specification#has_rdoc?
+
+Bug Fixes:
+
+* `gem clean` now cleans up --user-install gems. Bug #25516 by Brett
+ Eisenberg.
+* Gem.bin_path now escapes paths with spaces.
+* Rake extension builder uses explicit correctly loads rubygems when invoking
+ rake.
+* Prerelease versions now match "~>" correctly. Patch #25759 by Yossef
+ Mendelssohn.
+* Check bindir for executables, not root when validating. Bug reported by
+ David Chelimsky.
+* Remove Time.today, no way to override it before RubyGems loads. Bug #25564
+ by Emanuele Vicentini
+* Raise Gem::Exception for #installation_path when not installed. Bug #25741
+ by Daniel Berger.
+* Don't raise in Gem::Specification#validate when homepage is nil. Bug #25677
+ by Mike Burrows.
+* Uninstall executables from the correct directory. Bug #25555 by Brett
+ Eisenberg.
+* Raise Gem::LoadError if Kernel#gem fails due to previously-loaded gem. Bug
+ reported by Alf Mikula.
+
+Deprecation Notices:
+
+* Gem::manage_gems has been removed.
+* Time::today has been removed early. There was no way to make it warn and be
+ easy to override with user code.
+
+=== 1.3.2 / 2009-04-15
+
+Select New Features:
+
+* RubyGems now loads plugins from rubygems_plugin.rb in installed gems.
+ This can be used to add commands (See Gem::CommandManager) or add
+ install/uninstall hooks (See Gem::Installer and Gem::Uninstaller).
+* Gem::Version now understands prerelease versions using letters. (eg.
+ '1.2.1.b') Thanks to Josh Susser, Alex Vollmer and Phil Hagelberg.
+* RubyGems now includes a Rake task for creating gems which replaces rake's
+ Rake::GemPackageTask. See Gem::PackageTask.
+* Gem::find_files now returns paths in $LOAD_PATH.
+* Added Gem::promote_load_path for use with Gem::find_files
+* Added Gem::bin_path to make finding executables easier. Patch #24114 by
+ James Tucker.
+* Various improvements to build arguments for installing gems.
+* `gem contents` added --all and --no-prefix.
+* Gem::Specification
+ * #validate strips directories and errors on not-files.
+ * #description no longer removes newlines.
+ * #name must be a String.
+ * FIXME and TODO are no longer allowed in various fields.
+ * Added support for a license attribute. Feature #11041 (partial).
+ * Removed Gem::Specification::list, too much process growth. Bug #23668 by
+ Steve Purcell.
+* `gem generate_index`
+ * Can now generate an RSS feed.
+ * Modern indicies can now be updated incrementally.
+ * Legacy indicies can be updated separately from modern.
+
+Select Bugs Fixed:
+
+* Better gem activation error message. Patch #23082.
+* Kernel methods are now private. Patch #20801 by James M. Lawrence.
+* Fixed various usability issues with `gem check`.
+* `gem update` now rescues InstallError and continues. Bug #19268 by Gabriel
+ Wilkins.
+* Allow 'https', 'file' as a valid schemes for --source. Patch #22485.
+* `gem install`
+ * Now removes existing path before installing. Bug #22837.
+ * Uses Gem::bin_path in executable stubs to work around Kernel#load bug in
+ 1.9.
+ * Correctly handle build args (after --) via the API. Bug #23210.
+* --user-install
+ * `gem install --no-user-install` now works. Patch #23573 by Alf Mikula.
+ * `gem uninstall` can now uninstall from ~/.gem. Bug #23760 by Roger Pack.
+* setup.rb
+ * Clarify RubyGems RDoc installation location. Bug #22656 by Gian Marco
+ Gherardi.
+ * Allow setup to run from read-only location. Patch #21862 by Luis Herrera.
+ * Fixed overwriting ruby executable when BASERUBY was not set. Bug #24958
+ by Michael Soulier.
+ * Ensure we're in a RubyGems dir when installing.
+ * Deal with extraneous quotation mark when autogenerating .bat file on MS
+ Windows. Bug #22712.
+
+Deprecation Notices:
+
+* Gem::manage_gems has been removed.
+* Time::today will be removed in RubyGems 1.4.
+
+Special thanks to Chad Wooley for backwards compatibility testing and Luis
+Lavena and Daniel Berger for continuing windows support.
+
+=== 1.3.1 / 2008-10-28
+
+Bugs fixed:
+
+* Disregard ownership of ~ under Windows while creating ~/.gem. Fixes
+ issues related to no uid support under Windows.
+* Fix requires for Gem::inflate, Gem::deflate, etc.
+* Make Gem.dir respect :gemhome value from config. (Note: this feature may be
+ removed since it is hard to implement on 1.9.)
+* Kernel methods are now private. Patch #20801 by James M. Lawrence.
+* Gem::location_of_caller now behaves on Windows. Patch by Daniel Berger.
+* Silence PATH warning.
+
+Deprecation Notices:
+
+* Gem::manage_gems will be removed on or after March 2009.
+
+=== 1.3.0 / 2008-09-25
+
+New features:
+
+* RubyGems doesn't print LOCAL/REMOTE titles for `gem query` and friends if
+ stdout is not a TTY, except with --both.
+* Added Gem.find_files, allows a gem to discover features provided by other
+ gems.
+* Added pre/post (un)install hooks for packagers of RubyGems. (Not for gems
+ themselves).
+* RubyGems now installs gems into ~/.gem if GEM_HOME is not writable. Use
+ --no-user-install command-line switch to disable this behavior.
+* Fetching specs for update now uses If-Modified-Since requests.
+* RubyGems now updates the ri cache when the rdoc gem is installed and
+ documentation is generated.
+
+Deprecation Notices:
+
+* Gem::manage_gems now warns when called. It will be removed on or after March
+ 2009.
+
+Bugs Fixed:
+
+* RubyGems 1.3.0+ now updates when no previous rubygems-update is installed.
+ Bug #20775 by Hemant Kumar.
+* RubyGems now uses the regexp we already have for `gem list --installed`. Bug
+ #20876 by Nick Hoffman.
+* Platform is now forced to Gem::Platform::RUBY when nil or blank in the
+ indexer. Fixes various uninstallable gems.
+* Handle EINVAL on seek. Based on patch in bug #20791 by Neil Wilson.
+* Fix HTTPS support. Patch #21072 by Alex Arnell.
+* RubyGems now loads all cache files even if latest has been loaded. Bug
+ #20776 by Uwe Kubosch.
+* RubyGems checks for support of development dependencies for #to_ruby. Bug
+ #20778 by Evan Weaver.
+* Now specifications from the future can be loaded.
+* Binary script uninstallation fixed. Bug #21234 by Neil Wilson.
+* Uninstallation with -i fixed. Bug #20812 by John Clayton.
+* Gem::Uninstaller#remove_all now calls Gem::Uninstaller#uninstall_gem so hooks
+ get called. Bug #21242 by Neil Wilson.
+* Gem.ruby now properly escaped on windows. Fixes problem with extension
+ compilation.
+* `gem lock --strict` works again. Patch #21814 by Sven Engelhardt.
+* Platform detection for Solaris was improved. Patch #21911 by Bob Remeika.
+
+Other Changes Include:
+
+* `gem help install` now describes _version_ argument to executable stubs
+* `gem help environment` describes environment variables and ~/.gemrc and
+ /etc/gemrc
+* On-disk gemspecs are now read in UTF-8 and written with a UTF-8 magic comment
+* Rakefile
+ * If the SETUP_OPTIONS environment variable is set, pass its contents as
+ arguments to setup.rb
+* lib/rubygems/platform.rb
+ * Remove deprecated constant warnings and really deprecate them. (WIN32,
+ etc).
+* lib/rubygems/remote_fetcher.rb
+ * Now uses ~/.gem/cache if the cache dir in GEM_HOME is not writable.
+* lib/rubygems/source_index.rb
+ * Deprecate options to 'search' other than Gem::Dependency instances and
+ issue warning until November 2008.
+* setup.rb
+ * --destdir folder structure now built using Pathname, so it works for
+ Windows platforms.
+* test/*
+ * Fixes to run tests when under test/rubygems/. Patch by Yusuke ENDOH
+ [ruby-core:17353].
+* test/test_ext_configure_builder.rb
+ * Locale-free patch by Yusuke Endoh [ruby-core:17444].
+
+=== 1.2.0 / 2008-06-21
+
+New features:
+
+* RubyGems no longer performs bulk updates and instead only fetches the gemspec
+ files it needs. Alternate sources will need to upgrade to RubyGems 1.2 to
+ allow RubyGems to take advantage of the new metadata updater. If a pre 1.2
+ remote source is in the sources list, RubyGems will revert to the bulk update
+ code for compatibility.
+* RubyGems now has runtime and development dependency types. Use
+ #add_development_dependency and #add_runtime_dependency. All typeless
+ dependencies are considered to be runtime dependencies.
+* RubyGems will now require rubygems/defaults/operating_system.rb and
+ rubygems/defaults/#{RBX_ENGINE}.rb if they exist. This allows packagers and
+ ruby implementers to add custom behavior to RubyGems via these files. (If
+ the RubyGems API is insufficient, please suggest improvements via the
+ RubyGems list.)
+* /etc/gemrc (and windows equivalent) for global settings
+* setup.rb now handles --vendor and --destdir for packagers
+* `gem stale` command that lists gems by last access time
+
+Bugs Fixed:
+
+* File modes from gems are now honored, patch #19737
+* Marshal Gem::Specification objects from the future can now be loaded.
+* A trailing / is now added to remote sources when missing, bug #20134
+* Gems with legacy platforms will now be correctly uninstalled, patch #19877
+* `gem install --no-wrappers` followed by `gem install --wrappers` no longer
+ overwrites executables
+* `gem pristine` now forces reinstallation of gems, bug #20387
+* RubyGems gracefully handles ^C while loading .gemspec files from disk, bug
+ #20523
+* Paths are expanded in more places, bug #19317, bug #19896
+* Gem::DependencyInstaller resets installed gems every install, bug #19444
+* Gem.default_path is now honored if GEM_PATH is not set, patch #19502
+
+Other Changes Include:
+
+* setup.rb
+ * stub files created by RubyGems 0.7.x and older are no longer removed. When
+ upgrading from these ancient versions, upgrade to 1.1.x first to clean up
+ stubs.
+ * RDoc is no longer required until necessary, patch #20414
+* `gem server`
+ * Now completely matches the output of `gem generate_index` and
+ has correct content types
+ * Refreshes from source directories for every hit. The server will no longer
+ need to be restarted after installing gems.
+* `gem query --details` and friends now display author, homepage, rubyforge url
+ and installed location
+* `gem install` without -i no longer reinstalls dependencies if they are in
+ GEM_PATH but not in GEM_HOME
+* Gem::RemoteFetcher now performs persistent connections for HEAD requests,
+ bug #7973
+
+=== 1.1.1 / 2008-04-11
+
+Bugs Fixed:
+
+* Gem.prefix now returns non-nil only when RubyGems was installed outside
+ sitelibdir or libdir.
+* The `gem server` gem list now correctly links to gem details.
+* `gem update --system` now passes --no-format-executable to setup.rb.
+* Gem::SourceIndex#refresh! now works with multiple gem repositories.
+* Downloaded gems now go into --install-dir's cache directory.
+* Various fixes to downloading gem metadata.
+* `gem install --force` now ignores network errors too.
+* `gem pristine` now rebuilds extensions.
+* `gem update --system` now works on virgin Apple ruby.
+* Gem::RemoteFetcher handles Errno::ECONNABORTED.
+* Printing of release notes fixed.
+
+=== 1.1.0 / 2008-03-29
+
+New features:
+
+* RubyGems now uses persistent connections on index updates. Index updates are
+ much faster now.
+* RubyGems only updates from a latest index by default, cutting candidate gems
+ for updates to roughly 1/4 (at present). Index updates are even faster
+ still.
+ * `gem list -r` may only show the latest version of a gem, add --all to see
+ all gems.
+* `gem spec` now extracts specifications from .gem files.
+* `gem query --installed` to aid automation of checking for gems.
+
+Bugs Fixed:
+
+* RubyGems works with both Config and RbConfig now.
+* Executables are now cleaned upon uninstall.
+* You can now uninstall from a particular directory.
+* Updating from non-default sources fixed.
+* Executable stubs now use ruby install name in shebang.
+* `gem unpack` checks every directory in Gem.path now.
+* `gem install` now exits with non-zero exit code when appropriate.
+* `gem update` only updates gems that need updates.
+* `gem update` doesn't force remote-only updates.
+* `gem update` handles dependencies properly when updating.
+* Gems are now loaded in Gem.path order.
+* Gem stub scripts on windows now work outside Gem.bindir.
+* `gem sources -r` now works without network access.
+
+Other Changes Include:
+
+* RubyGems now requires Ruby > 1.8.3.
+* Release notes are now printed upon installation.
+* `gem env path` now prints a usable path.
+* `gem install` reverts to local-only installation upon network error.
+* Tar handling code refactoring and cleanup.
+* Gem::DependencyInstaller's API has changed.
+
+For a full list of changes to RubyGems, see the ChangeLog file.
+
+=== 1.0.1 / 2007-12-20
+
+Bugs Fixed:
+
+* Installation on Ruby 1.8.3 through 1.8.5 fixed
+* `gem build` on 1.8.3 fixed
+
+Other Changes Include:
+
+* Since RubyGems 0.9.5, RubyGems is no longer supported on Ruby 1.8.2 or older,
+ this is official in RubyGems 1.0.1.
+
+=== 1.0.0 / 2007-12-20
+
+Major New Features Include:
+
+* RubyGems warns about various problems with gemspecs during gem building
+* More-consistent versioning for the RubyGems software
+
+Other Changes Include:
+
+* Fixed various bugs and problems with installing gems on Windows
+* Fixed using `gem server` for installing gems
+* Various operations are even more verbose with --verbose
+* Built gems are now backwards compatible with 0.9.4
+* Improved detection of RUBYOPT loading rubygems
+* `ruby setup.rb` now has a --help option
+* Gem::Specification#bindir is now respected on installation
+* Executable stubs can now be installed to match ruby's name, so if ruby is
+ installed as 'ruby18', foo_exec will be installed as 'foo_exec18'
+* `gem unpack` can now unpack into a specific directory with --target
+* OpenSSL is no longer required by default
+
+Deprecations and Deletions:
+
+* Kernel#require_gem has been removed
+* Executables without a shebang will not be wrapped in a future version, this
+ may cause such executables to fail to operate on installation
+* Gem::Platform constants other than RUBY and CURRENT have been removed
+* Gem::RemoteInstaller was removed
+* Gem::Specification#test_suite_file and #test_suite_file= are deprecated in
+ favor of #test_file and #test_file=
+* Gem::Specification#autorequire= has been deprecated
+* Time::today will be removed in a future version
+
+=== 0.9.5 / 2007-11-19
+
+Major New Features Include:
+
+* Platform support
+* Automatic installation of platform gems
+* New bandwidth and memory friendlier index file format
+* "Offline" mode (--no-update-sources)
+* Bulk update threshold can be specified (-B, --bulk-threshold)
+* New `gem fetch` command
+* `gem` now has "really verbose" output when you specify -v
+* Improved stubs and `gem.bat` on mswin, including better compatiblity
+ with the One-Click Installer.
+
+Other Changes Include:
+
+* Time::today is deprecated and will be removed at a future date
+* Gem::manage_gems is deprecated and will be removed at a future date
+* `gem install --include-dependencies` (-y) is now deprecated since it is the
+ default, use --ignore-dependencies to turn off automatic dependency
+ installation
+* Multi-version diamond dependencies only are installed once
+* Processing a YAML bulk index update takes less memory
+* `gem install -i` makes sure all depenencies are installed
+* `gem update --system` reinstalls into the prefix it was originally installed
+ in
+* `gem update --system` respects --no-rdoc and --no-ri flags
+* HTTP basic authentication support for proxies
+* Gem::Specification#platforms should no longer be a String, use
+ Gem::Platform::CURRENT when building binary gems instead
+* `gem env` has more diagnostic information
+* require 'rubygems' loads less code
+* sources.gem is gone, RubyGems now uses built-in defaults
+* `gem install --source` will no longer add --source by default, use `gem
+ sources --add` to make it a permanent extra source
+* `gem query` (list) no longer prints details by default
+* Exact gem names are matched in various places
+* mkrf extensions are now supported
+* A gem can depend on a specific RubyGems version
+* `gem_server` is now `gem server`
+* `gemlock` is now `gem lock`
+* `gem_mirror` is now `gem mirror`
+* `gemwhich` is now `gem which`
+* `gemri` is no longer included with RubyGems
+* `index_gem_repository.rb` is now `gem generate_index`
+* `gem` performs more validation of parameters
+* Custom rdoc styles are now supported
+* Gem indexer no longer removes quick index during index creation
+* Kernel#require only rescues a LoadError for the file being required now
+* `gem dependencies` can now display some information for remote gems
+* Updating RubyGems now works with RUBYOPT=-rubygems
+
+Special thanks to:
+
+* Daniel Berger
+* Luis Lavena
+* Tom Copeland
+* Wilson Bilkovich
+
+=== 0.9.4 / 2007-05-23
+
+If you are experiencing problems with the source index (e.g. strange
+"No Method" errors), or problems with zlib (e.g. "Buffer Error"
+messsage), we recommend upgrading to RubyGems 0.9.4.
+
+Bug Fixes Include:
+
+* Several people have been experiencing problems with no method errors
+ on the source index cache. The source index cache is now a bit more
+ self healing. Furthermore, if the source index cache is
+ irreparable, then it is automatically dropped and reloaded.
+* The source cache files may now be dropped with the "gem sources
+ --clear-all" command. (This command may require root is the system
+ source cache is in a root protected area).
+* Several sub-commands were accidently dropped from the "gem" command.
+ These commands have been restored.
+
+=== 0.9.3 / 2007-05-10
+
+Bug Fixes Include:
+
+The ZLib library on Windows will occasionally complains about a buffer error
+when unpacking gems. The Gems software has a workaround for that problem, but
+the workaround was only enabled for versions of ZLib 1.2.1 or earlier. We
+have received several reports of the error occuring with ZLib 1.2.3, so we
+have permanently enabled the work around on all versions.
+
+=== 0.9.2 / 2007-02-05
+
+Bug Fixes Include:
+
+* The "unpack" command now works properly.
+* User name and password are now passed properly to the authenticating
+ proxy when downloading gems.
+
+=== 0.9.1 / 2007-01-16
+
+See ChangeLog
+
+=== 0.9.0 / 2006-06-28
+
+Finally, the much anticipated RubyGems version 0.9.0 is now available.
+This release includes a number of new features and bug fixes. The
+number one change is that we can now download the gem index
+incrementally. This will greatly speed up the gem command when only a
+few gems are out of date.
+
+Major Enhancments include:
+
+* The gem index is now downloaded incrementally, only updating entries
+ that are out of date. If more than 50 entries are out of date, we
+ revert back to a bulk download.
+* Several patches related to allowing RubyGems to work with
+ authenticating proxies (from Danie Roux and Anatol Pomozov). Just
+ put the user and password in the proxy URL (e.g. -p
+ http://user:password@proxy.address.com:8080) or use the
+ HTTP_PROXY_USER and HTTP_PROXY_PASS environment variables.
+* The gem unpack command can now accept a file path rather than just a
+ install gem name.
+* Both RI and RDOC documents are now generated by default.
+* A gemri command is included to read gem RI docs (only needed for
+ Ruby 1.8.4 or earlier).
+
+Minor enhancements include:
+
+* Verison 0.0.0 is now a valid gem version.
+* Better detection of missing SSL functionality.
+* SSL is not required if the security policy does not require
+ signature checking.
+* Rake built extensions are now supported (Tilman Sauerbeck).
+* Several autorequire bug fixes.
+* --traceback is now an alias for --backtrace (I can never remember
+ which one it is).
+* SAFE=1 compatibility fixes.
+* .rbw is now a supported suffix for RubyGem's custom require.
+* Several Ruby 1.9 compatibility fixes (Eric Hodel).
+
+Bug Fixes:
+
+* Added dashes to gemspecs generated in Ruby 1.8.3. This solves some
+ cross-Ruby version compatibility issues.
+* Fixed bug where the wrong executables could be uninstalled (Eric
+ Hodel).
+* Fixed bug where gem unpack occasionally unpacked the wrong gem.
+* Fixed bug where a fatal error occured when permissions on .gemrc
+ were too restrictive (reported by Luca Pireddu).
+* Fixed prefix handling for native expressions (patch by Aaron Patterson).
+* Fixed several Upgrade => Update typos.
+
+=== 0.8.11 / 2005-07-13
+
+* -y is a synonym for --include-dependencies.
+* Better handling of errors in the top level rescue clause.
+* Package list command (e.g. gem inspect GEM).
+* .gemrc now allows cvsrc-like options to set defaults per subcommand.
+* The autorequire gem spec field will now accept a list.
+* Substituted Time for Date in specs, increasing performance
+ dramatically.
+* Fixed reported bug of gem directories ending in "-" (reported by
+ Erik Hatcher).
+* Fixed but in installer that caused dependency installation to not
+ work.
+* Added Paul Duncan's gem signing patch.
+* Added Mark Hubbart's Framework patch (for better integration with OS
+ X).
+* Added David Glasser's install-from-mirror patch.
+* Additional internal structural cleanup and test reorganization.
+
+=== 0.8.10 / 2005-03-27
+
+* In multi-user environments, it is common to supply mulitple versions of gems
+ (for example Rails), allowing individual users to select the version of the
+ gem they desire. This allows a user to be insulated from updates to that
+ gem. RubyGems 0.8.10 fixes a problem where gems could occasionally become
+ confused about the current versions of libraries selected by the user.
+* The other annoying bug is that if there are any existing rubygems-update gems
+ installed, then the "gem update --system" command will download a new
+ update, but install the latest update prior to the download.
+
+=== 0.8.9
+
+Never released
+
+=== 0.8.8 / 2005-03-14
+
+* Moved the master definition of class Requirement back under version.
+ Kept the body of Requirement under Gem.
+
+=== 0.8.7 / 2005-03-14
+
+Even though it has only been a few weeks since that last release,
+there are quite a number of new features in 0.8.7. A complete list of
+new features will be given below, but here is a summary of the hot
+items.
+
+* The bug that prevented some users from installing rails has been
+ squashed. A big thanks to Bill Guindon (aGorilla) for helping track
+ that one down.
+
+There are several new commands available on the gem command:
+
+* gem cleanup GEMNAME -- Cleanup (uninstall) all the old versions of
+ gem. If the gem name is omitted, the entire repository is cleaned.
+* gem dependency GEMNAME -- Show the dependencies for the named gems.
+ This is really helpful when trying to figure out what gem needs what
+ other gem.
+
+There changes to the existing commands as well.
+
+* gem uninstall is much smarter about removing gems from the
+ repository. Lists of gems are now uninstalled in proper dependency
+ order (ie. if A depends on B, A is uninstalled first). Also,
+ warnings about broken dependencies occur only when removing the
+ *last* gem that supports a dependency is removed.
+
+Both gem install and gem uninstall support some new command line
+options that can reduce the amount of yes/no queries given the user.
+For install we have:
+
+* --ignore-dependencies -- Only install requests gems, no
+ dependendecies are automatically installed.
+* --include-dependencies -- Automatically install dependencies,
+ without confirmation.
+
+For gem uninstall, the new options are:
+
+* --all -- Uninstall all matching gems without confirmation.
+* --ignore-dependencies -- Uninstall, even if dependencies are broken.
+* --executables -- Remove executables without confirmation
+
+Under general cleanup, gems will not, by default, run RDoc on packages
+that do not have the RDoc flag set.
+
+And finally there is a new library file 'gemconfigure' to aid in
+writing version sensitive applications (without undue dependencies on
+RubyGems); and 'gemwhich', a short script to locate libraries in the
+file system. You can read more about them here:
+
+* gemconfigure: http://docs.rubygems.org/read/chapter/4#page73
+* gemwhich: http://docs.rubygems.org/read/chapter/17
+
+=== 0.8.6 / 2005-02-27
+
+* Fixed a small bug with shebang construction
+
+=== 0.8.5 / 2005-02-26
+
+Do you know how you used to dread getting the following message while
+installing gems?
+
+ Updating Gem source index for: http://gems.rubyforge.org
+
+It could take up to 30 seconds (on my machine, even worse on others) for
+that crazy source index to update.
+
+This latest release of RubyGems speeds that wait time up considerably.
+The following table gives the following times for installing RedCloth
+with a required source index update on three system we had available to
+us. No RDoc generation was included in the following times.
+
+ RubyGems Linux Mac OSX Windows
+ 0.8.4 33 secs 73 secs 58 secs
+ 0.8.5 8 secs 14 secs 21 secs
+
+The new caching code is at least 3x faster than previous versions. Woo
+Hoo!
+
+=== 0.8.4 / 2005-01-01
+
+* Rubygems 0.8.3's installer was broken unless you already had an older
+ version of RubyGems installed. That's fixed.
+* Change in the way Gem::Specification internally deals with lazy attributes
+ and defaults, bringing (with some loadpath_manager changes) a fairly
+ significant increase in speed.
+* Support for lower-cased Gem file names (for you, Paul Duncan :)
+* Erik Veenstra's patch for making Gem versions sortable.
+
+=== 0.8.3 / 2004-12-07
+
+No real earth shattering news here, but there were a number of really
+annoying issues involving other libraries that RubyGems depends upon.
+0.8.3 contains some workarounds for these issues. In particular:
+
+* Added workaround for the null byte in Dir string issue. (see
+ http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/121702).
+ (Thanks to Mauricio Fernández for the quick response on this one).
+* Added workaround for old version of Zlib on windows that caused
+ Ruwiki to fail to install. (see
+ http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/121770)
+* Added workaround for large YAML file issues. (We dynamically cut
+ down the size of the source index YAML file and seem to have worked
+ around immediate issues.
+
+There has been some minor usability enhancements and changes ...
+
+* A user specific source index cache can be used when the site-wide
+ cache is unwritable (i.e. because you are running as a non-admin).
+ This *greatly* speeds up gem commands run in non-admin mode when the
+ site-wide cache is out of date.
+* The gem command now used an HTTP HEAD command to detect if the
+ server's source index needs to be downloaed.
+* gem check gemname --test will run unit tests on installed gems that
+ have unit tests.
+* Multiple gem names are allowed on the gem install command line.
+ This means you can do:
+
+ gem install rake rails needle postgres-pr pimki
+
+ (Ok, you get the idea)
+* Multiple authors my be specified in a Gem spec.
+* Switched to using setup.rb (rather than a custom install script) for
+ the installation of RubyGems itself. If you have installed RubyGems
+ before, double check the installation instructions and make sure you
+ use setup.rb instead of install.rb.
+* Ryan Davis has provided a patch so you can use an env variable
+ (GEM_SKIP), to tell loadpath_manager not to load gems of those
+ names. This was useful for him while testing libs that he had in
+ development.
+
+=== 0.8.1 / 2009-09-14
+
+* Quick release to capture some bug fixes.
+
+=== 0.8.0 / 2009-09-12
+
+* Remove need for library stubs. Set the RUBYOPT environment variable to
+ include "rrubygems", and a normal require will find gem files. Continue to
+ use 'require_gem gem_name, version' to specify gem versions.
+* Deprecated "test_suite_file" gemspec attribute in favor of "test_files" array.
+* Generates rdoc by default on installs.
+* Adopted tar/gzip file format, thanks to Mauricio Fernandez.
+* "gem rdoc" allows generation of rdoc after gem installation (will add a "gem
+ test"
+* Application stubs can now accept an optional parameter of _VERSION_ that will
+ run an arbitrary version of the application requested.
+* Various bug fixes
+* Various platform-independency improvements
+* "gem spec --all" displays spec info for all installed version of a given gem.
+* Dynamic caching of sources
+* Support for user-definable sources on the command line (thanks Assaph Mehr)
+* More intelligent support for platform-dependent gems. Use Platform::CURRENT
+ when building a gem to set its platform to the one you're building on.
+ Installation displays a choice of platform-dependent gems, allowing the user
+ to pick.
+* Added "gem unpack" for "unpacking" a gem to the current directory
+
+=== 0.7.0 / 2004-07-09
+
+See ChangeLog
+
+=== 0.6.0 / 2004-06-08
+
+* Collapse output of --search and --list (and gem_server) operations so that
+ each gem is listed only once, with each of its versions listed on the same
+ line.
+* bin/gem: new --upgrade-all option allows one to upgrade every installed gem
+* new #required_ruby_version attribute added to gem specification for
+ specifying a dependency on which version of ruby the gem needs. Format it
+ accepts is the same as the Gem::Version::Requirement format:
+
+ spec.required_ruby_version = "> 1.8.0"
+* --install-stub defaults to true, so library stubs are created
+
+=== 0.5.0 / 2004-06-06
+
+* Jim added the ability to specify version constraints to avoid API
+ incompatibilities. This has been the subject of much debate for the past
+ couple of months, with many ideas and code contributed by Eivind Eklund and
+ Mauricio Fernandez. The following set of assertions shows how it works:
+
+ assert_inadequate("1.3", "~> 1.4")
+ assert_adequate( "1.4", "~> 1.4")
+ assert_adequate( "1.5", "~> 1.4")
+ assert_inadequate("2.0", "~> 1.4") # This one is key--the new operator
+ # disallows major version number
+ # differences.
+* Group gem search output when multiple versions exist for a given gem:
+
+ activerecord (0.7.8, 0.7.7, 0.7.6, 0.7.5)
+ Implements the ActiveRecord pattern for ORM.
+* Add arbitrary RDoc-able files via gemspec (not just Ruby source files) for
+ people who have, for example, README.rdoc in their distributions. Add to
+ gemspec via: spec.extra_rdoc_files = ["list", "of", "files"]. Ruby files are
+ automatically included.
+* Some small bug fixes
+
+=== 0.4.0 / 2004-05-31
+
+* Minor bug fixes including Windows compatability issues
+
+=== 0.3.0 / 2004-04-30
+
+* Cleanup of command-line arguments and handling. Most commands accept a
+ --local or --remote modifier.
+* Creation of Application Gems (packages that include executable programs).
+ See http://rubygems.rubyforge.org/wiki/wiki.pl?DeveloperGuide for information
+ on how to use it.
+* Basic functionality for installing binary gems from source (:extensions
+ property of gem specification holds an array of paths to extconf.rb files to
+ be used for compilation)
+* Install library "stub" allowing a normal 'require' to work (which then does
+ the rubygems require and 'require_gem'
+* --run-tests runs the test suite specified by the "test_suite_file" property
+ of a gem specification
+* HTTP Proxy support works. Rewrite of HTTP code.
+* Unit and functional tests added (see Rakefile).
+* Prompt before remote-installing dependencies during gem installation.
+* Config file for storing preferences for 'gem' command usage.
+* Generally improved error messages (still more work to do)
+* Rearranged gem directory structure for cleanliness.
+
+=== 0.2.0 / 2004-03-14
+
+* Initial public release
+
diff --git a/doc/rubygems/LICENSE.txt b/doc/rubygems/LICENSE.txt
new file mode 100644
index 0000000000..db88c5e118
--- /dev/null
+++ b/doc/rubygems/LICENSE.txt
@@ -0,0 +1,53 @@
+RubyGems is copyrighted free software by Chad Fowler, Rich Kilmer, Jim
+Weirich and others. You can redistribute it and/or modify it under
+either the terms of the GPL (see the GPL.txt file), or the conditions
+below:
+
+ 1. You may make and give away verbatim copies of the source form of the
+ software without restriction, provided that you duplicate all of the
+ original copyright notices and associated disclaimers.
+
+ 2. You may modify your copy of the software in any way, provided that
+ you do at least ONE of the following:
+
+ a) place your modifications in the Public Domain or otherwise
+ make them Freely Available, such as by posting said
+ modifications to Usenet or an equivalent medium, or by allowing
+ the author to include your modifications in the software.
+
+ b) use the modified software only within your corporation or
+ organization.
+
+ c) rename any non-standard executables so the names do not conflict
+ with standard executables, which must also be provided.
+
+ d) make other distribution arrangements with the author.
+
+ 3. You may distribute the software in object code or executable
+ form, provided that you do at least ONE of the following:
+
+ a) distribute the executables and library files of the software,
+ together with instructions (in the manual page or equivalent)
+ on where to get the original distribution.
+
+ b) accompany the distribution with the machine-readable source of
+ the software.
+
+ c) give non-standard executables non-standard names, with
+ instructions on where to get the original software distribution.
+
+ d) make other distribution arrangements with the author.
+
+ 4. You may modify and include the part of the software into any other
+ software (possibly commercial).
+
+ 5. The scripts and library files supplied as input to or produced as
+ output from the software do not automatically fall under the
+ copyright of the software, but belong to whomever generated them,
+ and may be sold commercially, and may be aggregated with this
+ software.
+
+ 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
+ IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE.
diff --git a/doc/rubygems/README b/doc/rubygems/README
new file mode 100644
index 0000000000..68a52593d4
--- /dev/null
+++ b/doc/rubygems/README
@@ -0,0 +1,41 @@
+= RubyGems
+
+* http://rubygems.org/
+* http://docs.rubygems.org/
+* http://rubygems.rubyforge.org/
+* http://rubyforge.org/projects/rubygems
+
+== DESCRIPTION
+
+RubyGems is a package management framework for Ruby.
+
+This gem is an update for the RubyGems software. You must have an
+installation of RubyGems before this update can be applied.
+
+See Gem for information on RubyGems (or `ri Gem`)
+
+To upgrade to the latest RubyGems, run:
+
+ $ gem update --system # you might need to be an administrator or root
+
+NOTE: RubyGems 1.1 and 1.2 have problems upgrading when there is no
+rubygems-update installed. You will need to use the following instructions
+if you see "Nothing to update".
+
+If you have an older version of RubyGems installed, then you can still
+do it in two steps:
+
+ $ gem install rubygems-update # again, might need to be admin/root
+ $ update_rubygems # ... here too
+
+If you don't have any RubyGems install, there is still the pre-gem approach to
+getting software, doing it manually:
+
+1. Download from: http://rubyforge.org/frs/?group_id=126
+2. Unpack into a directory and cd there
+3. Install with: ruby setup.rb # you may need admin/root privilege
+
+For more details and other options, see:
+
+ ruby setup.rb --help
+
diff --git a/doc/security.rdoc b/doc/security.rdoc
deleted file mode 100644
index d8efca0042..0000000000
--- a/doc/security.rdoc
+++ /dev/null
@@ -1,144 +0,0 @@
-= Ruby Security
-
-The Ruby programming language is large and complex and there are many security
-pitfalls often encountered by newcomers and experienced Rubyists alike.
-
-This document aims to discuss many of these pitfalls and provide more secure
-alternatives where applicable.
-
-Please check the full list of publicly known CVEs and how to correctly report a
-security vulnerability, at: http://www.ruby-lang.org/en/security/
-Japanese version is here: http://www.ruby-lang.org/ja/security/
-
-Security vulnerabilities should be reported via an email to
-mailto:security@ruby-lang.org ({the PGP public
-key}[http://www.ruby-lang.org/security.asc]), which is a private mailing list.
-Reported problems will be published after fixes.
-
-== <code>$SAFE</code>
-
-Ruby provides a mechanism to restrict what operations can be performed by Ruby
-code in the form of the <code>$SAFE</code> variable.
-
-However, <code>$SAFE</code> does not provide a secure environment for executing
-untrusted code.
-
-If you need to execute untrusted code, you should use an operating system level
-sandboxing mechanism. On Linux, ptrace or LXC can be used to sandbox
-potentially malicious code. Other similar mechanisms exist on every major
-operating system.
-
-== +Marshal.load+
-
-Ruby's +Marshal+ module provides methods for serializing and deserializing Ruby
-object trees to and from a binary data format.
-
-Never use +Marshal.load+ to deserialize untrusted or user supplied data.
-Because +Marshal+ can deserialize to almost any Ruby object and has full
-control over instance variables, it is possible to craft a malicious payload
-that executes code shortly after deserialization.
-
-If you need to deserialize untrusted data, you should use JSON as it is only
-capable of returning 'primitive' types such as strings, arrays, hashes, numbers
-and nil. If you need to deserialize other classes, you should handle this
-manually. Never deserialize to a user specified class.
-
-== YAML
-
-YAML is a popular human readable data serialization format used by many Ruby
-programs for configuration and database persistence of Ruby object trees.
-
-Similar to +Marshal+, it is able to deserialize into arbitrary Ruby classes.
-For example, the following YAML data will create an +ERB+ object when
-deserialized:
-
- !ruby/object:ERB
- src: puts `uname`
-
-Because of this, many of the security considerations applying to Marshal are
-also applicable to YAML. Do not use YAML to deserialize untrusted data.
-
-== Symbols
-
-Symbols are often seen as syntax sugar for simple strings, but they play a much
-more crucial role. The MRI Ruby implementation uses Symbols internally for
-method, variable and constant names. The reason for this is that symbols are
-simply integers with names attached to them, so they are faster to look up in
-hashtables.
-
-Once a symbol is created, the memory used by it is never freed. If you convert
-user input to symbols with +to_sym+ or +intern+, it is possible for an attacker
-to mount a denial of service attack against your application by flooding it
-with unique strings. Because each string is kept in memory until the Ruby
-process exits, this will cause memory consumption to grow and grow until Ruby
-runs out of memory and crashes.
-
-Be careful with passing user input to methods such as +send+,
-+instance_variable_get+ or +_set+, +const_get+ or +_set+, etc. as these methods
-will convert string parameters to symbols internally and pose the same DoS
-potential as direct conversion through +to_sym+/+intern+.
-
-The workaround to this is simple - don't convert user input to symbols. You
-should attempt to leave user input in string form instead.
-
-== Regular expressions
-
-Ruby's regular expression syntax has some minor differences when compared to
-other languages. In Ruby, the <code>^</code> and <code>$</code> anchors do not
-refer to the beginning and end of the string, rather the beginning and end of a
-*line*.
-
-This means that if you're using a regular expression like
-<code>/^[a-z]+$/</code> to restrict a string to only letters, an attacker can
-bypass this check by passing a string containing a letter, then a newline, then
-any string of their choosing.
-
-If you want to match the beginning and end of the entire string in Ruby, use
-the anchors +\A+ and +\z+.
-
-== +eval+
-
-Never pass untrusted or user controlled input to +eval+.
-
-Unless you are implementing a REPL like +irb+ or +pry+, +eval+ is almost
-certainly not what you want. Do not attempt to filter user input before passing
-it to +eval+ - this approach is fraught with danger and will most likely open
-your application up to a serious remote code execution vulnerability.
-
-== +send+
-
-'Global functions' in Ruby (+puts+, +exit+, etc.) are actually private instance
-methods on +Object+. This means it is possible to invoke these methods with
-+send+, even if the call to +send+ has an explicit receiver.
-
-For example, the following code snippet writes "Hello world" to the terminal:
-
- 1.send(:puts, "Hello world")
-
-You should never call +send+ with user supplied input as the first parameter.
-Doing so can introduce a denial of service vulnerability:
-
- foo.send(params[:bar]) # params[:bar] is "exit!"
-
-If an attacker can control the first two arguments to +send+, remote code
-execution is possible:
-
- # params is { :a => "eval", :b => "...ruby code to be executed..." }
- foo.send(params[:a], params[:b])
-
-When dispatching a method call based on user input, carefully verify that the
-method name. If possible, check it against a whitelist of safe method names.
-
-Note that the use of +public_send+ is also dangerous, as +send+ itself is
-public:
-
- 1.public_send("send", "eval", "...ruby code to be executed...")
-
-== DRb
-
-As DRb allows remote clients to invoke arbitrary methods, it is not suitable to
-expose to untrusted clients.
-
-When using DRb, try to avoid exposing it over the network if possible. If this
-isn't possible and you need to expose DRb to the world, you *must* configure an
-appropriate security policy with <code>DRb::ACL</code>.
diff --git a/doc/standard_library.rdoc b/doc/standard_library.rdoc
deleted file mode 100644
index 448635758b..0000000000
--- a/doc/standard_library.rdoc
+++ /dev/null
@@ -1,125 +0,0 @@
-= Ruby Standard Library
-
-The Ruby Standard Library is a vast collection of classes and modules that you
-can require in your code for additional features.
-
-Below is an overview of libraries and extensions followed by a brief
-description.
-
-== Libraries
-
-Abbrev:: Calculates a set of unique abbreviations for a given set of strings
-Base64:: Support for encoding and decoding binary data using a Base64 representation
-Benchmark:: Provides methods to measure and report the time used to execute code
-CGI:: Support for the Common Gateway Interface protocol
-CMath:: Provides Trigonometric and Transcendental functions for complex numbers
-complex.rb:: Deprecated library replaced by C implementation in core
-ConditionVariable:: Augments the Mutex class, provided by thread.rb
-CSV:: Provides an interface to read and write CSV files and data
-DEBUGGER__:: Debugging functionality for Ruby
-Delegator:: Provides three abilities to delegate method calls to an object
-DRb:: Distributed object system for Ruby
-E2MM:: Module for defining custom exceptions with specific messages
-English.rb:: Require 'English.rb' to reference global variables with less cryptic names
-ERB:: An easy to use but powerful templating system for Ruby
-FileUtils:: Several file utility methods for copying, moving, removing, etc
-Find:: This module supports top-down traversal of a set of file paths
-Forwardable:: Provides delegation of specified methods to a designated object
-GetoptLong:: Parse command line options similar to the GNU C getopt_long()
-GServer:: HTTP server with logging, thread pooling and multi-server management
-IPAddr:: Provides methods to manipulate IPv4 and IPv6 IP addresses
-IRB:: Interactive Ruby command-line tool for REPL (Read Eval Print Loop)
-Logger:: Provides a simple logging utility for outputing messages
-mathn.rb:: Deprecated library that extends math operations
-MakeMakefile:: Module used to generate a Makefile for C extensions
-Matrix:: Represents a mathematical matrix.
-MiniTest:: A test suite with TDD, BDD, mocking and benchmarking
-Monitor:: Provides an object or module to use safely by more than one thread
-Mutex_m:: Mixin to extend objects to be handled like a Mutex
-Net::FTP:: Support for the File Transfer Protocol
-Net::HTTP:: HTTP client api for Ruby
-Net::IMAP:: Ruby client api for Internet Message Access Protocol
-Net::POP3:: Ruby client library for POP3
-Net::SMTP:: Simple Mail Transfer Protocol client library for Ruby
-Net::Telnet:: Telnet client library for Ruby
-Observable:: Provides a mechanism for publich/subscribe pattern in Ruby
-OpenURI:: An easy-to-use wrapper for Net::HTTP, Net::HTTPS and Net::FTP
-Open3:: Provides access to stdin, stdout and stderr when running other programs
-OptionParser:: Ruby-oriented class for command-line option analysis
-OpenStruct:: Class to build custom data structures, similar to a Hash
-PP:: Provides a PrettyPrinter for Ruby objects
-PrettyPrinter:: Implements a pretty printing algorithm for readable structure
-Prime:: Prime numbers and factorization library
-profile.rb:: Runs the Ruby Profiler__
-Profiler__:: Provides a way to profile your Ruby application
-PStore:: Implements a file based persistence mechanism based on a Hash
-Queue:: Synchronized communication between threads, provided by thread.rb
-Racc:: A LALR(1) parser generator written in Ruby.
-Rake:: Ruby build program with capabilities similar to make
-rational.rb:: Deprecated library replaced by C implementation in core
-RbConfig:: Information of your configure and build of Ruby
-RDoc:: Produces HTML and command-line documentation for Ruby
-resolv-replace.rb:: Replace Socket DNS with Resolv
-Resolv:: Thread-aware DNS resolver library in Ruby
-REXML:: An XML toolkit for Ruby
-Rinda:: The Linda distributed computing paradigm in Ruby
-RSS:: Family of libraries that support various formats of XML "feeds"
-Gem:: Package management framework for Ruby
-Scanf:: A Ruby implementation of the C function scanf(3)
-SecureRandom:: Interface for secure random number generator
-Set:: Provides a class to deal with collections of unordered, unique values
-Shell:: An idiomatic Ruby interface for common UNIX shell commands
-Shellwords:: Manipulates strings with word parsing rules of UNIX Bourne shell
-Singleton:: Implementation of the Singleton pattern for Ruby
-Synchronizer:: A module that provides a two-phase lock with a counter
-Tempfile:: A utility class for managing temporary files
-Test::Unit:: A compatibility layer for MiniTest
-Thread:: Provides support classes for threaded programs
-ThreadsWait:: Watches for termination of multiple threads
-Time:: Extends the Time class with methods for parsing and conversion
-Timeout:: Auto-terminate potentially long-running operations in Ruby
-tmpdir.rb:: Extends the Dir class to manage the OS temporary file path
-Tracer:: Outputs a source level execution trace of a Ruby program
-TSort:: Topological sorting using Tarjan's algorithm
-un.rb:: Utilities to replace common UNIX commands
-URI:: A Ruby module providing support for Uniform Resource Identifiers
-WeakRef:: Allows a referenced object to be garbage-collected
-WEBrick:: An HTTP server toolkit for Ruby
-XMLRPC:: Remote Procedure Call over HTTP support for Ruby
-YAML:: Ruby client library for the Psych YAML implementation
-
-== Extensions
-
-BigDecimal:: Provides arbitrary-precision floating point decimal arithmetic
-Coverage:: Provides coverage measurement for Ruby
-Date:: A subclass of Object includes Comparable module for handling dates
-DateTime:: Subclass of Date to handling dates, hours, minutes, seconds, offsets
-DBM:: Provides a wrapper for the UNIX-style Database Manager Library
-Digest:: Provides a framework for message digest libraries
-DL:: Provides a wrapper for the UNIX dlopen() library
-Etc:: Provides access to information typically stored in UNIX /etc directory
-Fcntl:: Loads constants defined in the OS fcntl.h C header file
-Fiddle:: A libffi wrapper for Ruby
-GDBM:: Ruby extension for the GNU dbm (gdbm) library
-IO:: Extensions for Ruby IO class, including #wait and ::console
-JSON:: Implements Javascript Object Notation for Ruby
-NKF:: Ruby extension for Network Kanji Filter
-objspace:: Extends ObjectSpace module to add methods for internal statistics
-OpenSSL:: Provides SSL, TSL and general purpose cryptography for Ruby
-Pathname:: Representation of the name of a file or directory on the filesystem
-Psych:: A YAML parser and emitter for Ruby
-PTY:: Creates and manages pseudo terminals
-Readline:: Provides an interface for GNU Readline and Edit Line (libedit)
-Ripper:: Provides an interface for parsing Ruby programs into S-expressions
-SBDM:: Provides a simple file-based key-value store with String keys and values
-Socket:: Access underlying OS socket implementations
-StringIO:: Pseudo I/O on String objects
-StringScanner:: Provides lexical scanning operations on a String
-Syslog:: Ruby interface for the POSIX system logging facility
-Tk:: Provides a framework for building a Graphical User Interface (GUI)
-WIN32OLE:: Provides an interface for OLE Automation in Ruby
-Zlib:: Ruby interface for the zlib compression/decompression library
-
-
-
-
diff --git a/doc/syntax.rdoc b/doc/syntax.rdoc
index fe0f98ce4c..b90c0680b7 100644
--- a/doc/syntax.rdoc
+++ b/doc/syntax.rdoc
@@ -2,33 +2,12 @@
The Ruby syntax is large and is split up into the following sections:
-Literals[rdoc-ref:syntax/literals.rdoc] ::
+Literals[rdoc-ref:doc/syntax/literals.rdoc] ::
Numbers, Strings, Arrays, Hashes, etc.
-Assignment[rdoc-ref:syntax/assignment.rdoc] ::
- Assignment and variables
-
-{Control Expressions}[rdoc-ref:syntax/control_expressions.rdoc] ::
- +if+, +unless+, +while+, +until+, +for+, +break+, +next+, +redo+
-
-Methods[rdoc-ref:syntax/methods.rdoc] ::
+Methods[rdoc-ref:doc/syntax/methods.rdoc] ::
Method and method argument syntax
-{Calling Methods}[rdoc-ref:syntax/calling_methods.rdoc] ::
- How to call a method (or send a message to a method)
-
-{Modules and Classes}[rdoc-ref:syntax/modules_and_classes.rdoc] ::
- Creating modules and classes including inheritance
-
-Exceptions[rdoc-ref:syntax/exceptions.rdoc] ::
+Exceptions[rdoc-ref:doc/syntax/exceptions.rdoc] ::
Exception handling syntax
-Precedence[rdoc-ref:syntax/precedence.rdoc] ::
- Precedence of ruby operators
-
-Refinements[rdoc-ref:syntax/refinements.rdoc] ::
- Use and behavior of the experimental refinements feature
-
-Miscellaneous[rdoc-ref:syntax/miscellaneous.rdoc] ::
- +alias+, +undef+, +BEGIN+, +END+
-
diff --git a/doc/syntax/assignment.rdoc b/doc/syntax/assignment.rdoc
deleted file mode 100644
index 7424d4885f..0000000000
--- a/doc/syntax/assignment.rdoc
+++ /dev/null
@@ -1,455 +0,0 @@
-= Assignment
-
-In Ruby assignment uses the <code>=</code> (equals sign) character. This
-example assigns the number five to the local variable +v+:
-
- v = 5
-
-Assignment creates a local variable if the variable was not previously
-referenced.
-
-== Local Variable Names
-
-A local variable name must start with a lowercase US-ASCII letter or a
-character with the eight bit set. Typically local variables are US-ASCII
-compatible since the keys to type them exist on all keyboards.
-
-(Ruby programs must be written in a US-ASCII-compatible character set. In
-such character sets if the eight bit is set it indicates an extended
-character. Ruby allows local variables to contain such characters.)
-
-A local variable name may contain letters, numbers, an <code>_</code>
-(underscore or low line) or a character with the eighth bit set.
-
-== Local Variable Scope
-
-Once a local variable name has been assigned-to all uses of the name for the
-rest of the scope are considered local variables.
-
-Here is an example:
-
- 1.times do
- a = 1
- puts "local variables in the block: #{local_variables.join ", "}"
- end
-
- puts "no local variables outside the block" if local_variables.empty?
-
-This prints:
-
- local variables in the block: a
- no local variables outside the block
-
-Since the block creates a new scope, any local variables created inside it do
-not leak to the surrounding scope.
-
-Variables defined in an outer scope appear inner scope:
-
- a = 0
-
- 1.times do
- puts "local variables: #{local_variables.join ", "}"
- end
-
-This prints:
-
- local variables: a
-
-You may isolate variables in a block from the outer scope by listing them
-following a <code>;</code> in the block's arguments. See the documentation
-for block local variables in the {calling
-methods}[rdoc-ref:syntax/calling_methods.rdoc] documentation for an example.
-
-See also Kernel#local_variables, but note that a +for+ loop does not create a
-new scope like a block does.
-
-== Local Variables and Methods
-
-In Ruby local variable names and method names are nearly identical. If you
-have not assigned to one of these ambiguous names ruby will assume you wish to
-call a method. Once you have assigned to the name ruby will assume you wish
-to reference a local variable.
-
-The local variable is created when the parser encounters the assignment, not
-when the assignment occurs:
-
- a = 0 if false # does not assign to a
-
- p local_variables # prints [:a]
-
- p a # prints nil
-
-The similarity between method and local variable names can lead to confusing
-code, for example:
-
- def big_calculation
- 42 # pretend this takes a long time
- end
-
- big_calculation = big_calculation()
-
-Now any reference to +big_calculation+ is considered a local variable and will
-be cached. To call the method, use <code>self.big_calculation</code>.
-
-You can force a method call by using empty argument parentheses as shown above
-or by using an explicit receiver like <code>self.</code>. Using an explicit
-receiver may raise a NameError if the method's visibility is not public.
-
-Another commonly confusing case is when using a modifier +if+:
-
- p a if a = 0.zero?
-
-Rather than printing "true" you receive a NameError, "undefined local variable
-or method `a'". Since ruby parses the bare +a+ left of the +if+ first and has
-not yet seen an assignment to +a+ it assumes you wish to call a method. Ruby
-then sees the assignment to +a+ and will assume you are referencing a local
-method.
-
-The confusion comes from the out-of-order execution of the expression. First
-the local variable is assigned-to then you attempt to call a nonexistent
-method.
-
-== Instance Variables
-
-Instance variables are shared across all methods for the same object.
-
-An instance variable must start with a <code>@</code> ("at" sign or
-commercial at). Otherwise instance variable names follow the rules as local
-variable names. Since the instance variable starts with an <code>@</code> the
-second character may be an upper-case letter.
-
-Here is an example of instance variable usage:
-
- class C
- def initialize(value)
- @instance_variable = value
- end
-
- def value
- @instance_variable
- end
- end
-
- object1 = C.new "some value"
- object2 = C.new "other value"
-
- p object1.value # prints "some value"
- p object2.value # prints "other value"
-
-An uninitialized instance variable has a value of +nil+. If you run Ruby with
-warnings enabled you will get a warning when accessing an uninitialized
-instance variable.
-
-The +value+ method has access to the value set by the +initialize+ method, but
-only for the same object.
-
-== Class Variables
-
-Class variables are shared between a class, its subclasses and its instances.
-
-A class variable must start with a <code>@@</code> (two "at" signs). The rest
-of the name follows the same rules as instance variables.
-
-Here is an example:
-
- class A
- @@class_variable = 0
-
- def value
- @@class_variable
- end
-
- def update
- @@class_variable = @@class_variable + 1
- end
- end
-
- class B < A
- def update
- @@class_variable = @@class_variable + 2
- end
- end
-
- a = A.new
- b = B.new
-
- puts "A value: #{a.value}"
- puts "B value: #{b.value}"
-
-This prints:
-
- A value: 0
- B value: 0
-
-Continuing with the same example, we can update using objects from either
-class and the value is shared:
-
- puts "update A"
- a.update
-
- puts "A value: #{a.value}"
- puts "B value: #{b.value}"
-
- puts "update B"
- b.update
-
- puts "A value: #{a.value}"
- puts "B value: #{b.value}"
-
- puts "update A"
- a.update
-
- puts "A value: #{a.value}"
- puts "B value: #{b.value}"
-
-This prints:
-
- update A
- A value: 1
- B value: 1
- update B
- A value: 3
- B value: 3
- update A
- A value: 4
- B value: 4
-
-Accessing an uninitialized class variable will raise a NameError exception.
-
-Note that classes have instance variables because classes are objects, so
-try not to confuse class and instance variables.
-
-== Global Variables
-
-Global variables are accessible everywhere.
-
-Global variables start with a <code>$</code> (dollar sign). The rest of the
-name follows the same rules as instance variables.
-
-Here is an example:
-
- $global = 0
-
- class C
- puts "in a class: #{$global}"
-
- def my_method
- puts "in a method: #{$global}"
-
- $global = $global + 1
- $other_global = 3
- end
- end
-
- C.new.my_method
-
- puts "at top-level, $global: #{$global}, $other_global: #{$other_global}"
-
-This prints:
-
- in a class: 0
- in a method: 0
- at top-level, $global: 1, $other_global: 3
-
-An uninitialized global variable has a value of +nil+.
-
-Ruby has some special globals that behave differently depending on context
-such as the regular expression match variables or that have a side-effect when
-assigned to. See the {global variables documentation}[rdoc-ref:globals.rdoc]
-for details.
-
-== Assignment Methods
-
-You can define methods that will behave like assignment, for example:
-
- class C
- def value=(value)
- @value = value
- end
- end
-
- c = C.new
- c.value = 42
-
-Using assignment methods allows your programs to look nicer. When assigning
-to an instance variable most people use Module#attr_accessor:
-
- class C
- attr_accessor :value
- end
-
-When using method assignment you must always have a receiver. If you do not
-have a receiver Ruby assumes you are assigning to a local variable:
-
- class C
- attr_accessor :value
-
- def my_method
- value = 42
-
- puts "local_variables: #{local_variables.join ", "}"
- puts "@value: #{@value.inspect}"
- end
- end
-
- C.new.my_method
-
-This prints:
-
- local_variables: value
- @value: nil
-
-To use the assignment method you must set the receiver:
-
- class C
- attr_accessor :value
-
- def my_method
- self.value = 42
-
- puts "local_variables: #{local_variables.join ", "}"
- puts "@value: #{@value.inspect}"
- end
- end
-
- C.new.my_method
-
-This prints:
-
- local_variables:
- @value: 42
-
-== Abbreviated Assignment
-
-You can mix several of the operators and assignment. To add 1 to an object
-you can write:
-
- a = 1
-
- a += 2
-
- p a # prints 3
-
-This is equivalent to:
-
- a = 1
-
- a = a + 2
-
- p a # prints 3
-
-You can use the following operators this way: <code>+</code>, <code>-</code>,
-<code>*</code>, <code>/</code>, <code>%</code>, <code>**</code>,
-<code>&</code>, <code>|</code>, <code>^</code>, <code><<</code>,
-<code>>></code>
-
-There are also <code>||=</code> and <code>&&=</code>. The former makes an
-assignment if the value was +nil+ or +false+ while the latter makes an
-assignment if the value was not +nil+ or +false+.
-
-Here is an example:
-
- a ||= 0
- a &&= 1
-
- p a # prints 1
-
-Note that these two operators behave more like <code>a || a = 0<code> than
-<code>a = a || 0</code>.
-
-== Implicit Array Assignment
-
-You can implicitly create an array by listing multiple values when assigning:
-
- a = 1, 2, 3
-
- p a # prints [1, 2, 3]
-
-This implicitly creates an Array.
-
-You can use <code>*</code> or the "splat" operator or unpack an Array when
-assigning. This is similar to multiple assignment:
-
- a = *[1, 2, 3]
-
- p a # prints [1, 2, 3]
-
-You can splat anywhere in the left-hand side of the assignment:
-
- a = 1, *[2, 3]
-
- p a # prints [1, 2, 3]
-
-== Multiple Assignment
-
-You can assign multiple values on the left-hand side to multiple variables:
-
- a, b = 1, 2
-
- p a: a, b: b # prints {:a=>1, :b=>2}
-
-In the following sections any place "variable" is used an assignment method,
-instance, class or global will also work:
-
- def value=(value)
- p assigned: value
- end
-
- self.value, $global = 1, 2 # prints {:assigned=>1}
-
- p $global # prints 2
-
-You can use multiple assignment to swap two values in-place:
-
- old_value = 1
-
- new_value, old_value = old_value, 2
-
- p new_value: new_value, old_value: old_value
- # prints {:new_value=>1, :old_value=>2}
-
-If you have more values on the left hand side of the assignment than variables
-on the right hand side the extra values are ignored:
-
- a, b = 1, 2, 3
-
- p a: a, b: b # prints {:a=>1, :b=>2}
-
-You can use <code>*</code> to gather extra values on the right-hand side of
-the assignment.
-
- a, *b = 1, 2, 3
-
- p a: a, b: b # prints {:a=>1, :b=>[2, 3]}
-
-The <code>*</code> can appear anywhere on the right-hand side:
-
- *a, b = 1, 2, 3
-
- p a: a, b: b # prints {:a=>[1, 2], :b=>3}
-
-But you may only use one <code>*</code> in an assignment.
-
-== Array Decomposition
-
-Like Array decomposition in {method arguments}[rdoc-ref:syntax/methods.rdoc]
-you can decompose an Array during assignment using parenthesis:
-
- (a, b) = [1, 2]
-
- p a: a, b: b # prints {:a=>1, :b=>2}
-
-You can decompose an Array as part of a larger multiple assignment:
-
- a, (b, c) = 1, [2, 3]
-
- p a: a, b: b, c: c # prints {:a=>1, :b=>2, :c=>3}
-
-Since each decomposition is considered its own multiple assignment you can use
-<code>*</code> to gather arguments in the decomposition:
-
- a, (b, *c), *d = 1, [2, 3, 4], 5, 6
-
- p a: a, b: b, c: c, d: d
- # prints {:a=>1, :b=>2, :c=>[3, 4], :d=>[5, 6]}
-
diff --git a/doc/syntax/calling_methods.rdoc b/doc/syntax/calling_methods.rdoc
deleted file mode 100644
index 79c0de59dc..0000000000
--- a/doc/syntax/calling_methods.rdoc
+++ /dev/null
@@ -1,349 +0,0 @@
-= Calling Methods
-
-Calling a method sends a message to an object so it can perform some work.
-
-In ruby you send a message to an object like this:
-
- my_method()
-
-Note that the parenthesis are optional:
-
- my_method
-
-Except when there is difference between using and omitting parentheses, this
-document uses parenthesis when arguments are present to avoid confusion.
-
-This section only covers calling methods. See also the {syntax documentation
-on defining methods}[rdoc-ref:syntax/methods.rdoc].
-
-== Receiver
-
-+self+ is the default receiver. If you don't specify any receiver +self+ will
-be used. To specify a receiver use <code>.</code>:
-
- my_object.my_method
-
-This sends the +my_method+ message to +my_object+. Any object can be a
-receiver but depending on the method's visibility sending a message may raise a
-NoMethodError.
-
-You may also use <code>::</code> to designate a receiver, but this is rarely
-used due to the potential for confusion with <code>::</code> for namespaces.
-
-== Arguments
-
-There are three types of arguments when sending a message, the positional
-arguments, keyword (or named) arguments and the block argument. Each message
-sent may use one, two or all types of arguments, but the arguments must be
-supplied in this order.
-
-All arguments in ruby are passed by reference and are not lazily evaluated.
-
-Each argument is separated by a <code>,</code>:
-
- my_method(1, '2', :three)
-
-Arguments may be an expression, a hash argument:
-
- 'key' => value
-
-or a keyword argument:
-
- key: value
-
-Hash and keyword arguments must be contiguous and must appear after all
-positional arguments, but may be mixed:
-
- my_method('a' => 1, b: 2, 'c' => 3)
-
-=== Positional Arguments
-
-The positional arguments for the message follow the method name:
-
- my_method(argument1, argument2)
-
-In many cases parenthesis are not necessary when sending a message:
-
- my_method argument1, argument2
-
-However, parenthesis are necessary to avoid ambiguity. This will raise a
-SyntaxError because ruby does not know which method argument3 should be sent
-to:
-
- method_one argument1, method_two argument2, argument3
-
-If the method definition has a <code>*argument</code> extra positional
-arguments will be assigned to +argument+ in the method as an Array.
-
-If the method definition doesn't include keyword arguments the keyword or
-hash-type arguments are assigned as a single hash to the last argument:
-
- def my_method(options)
- p options
- end
-
- my_method('a' => 1, b: 2) # prints: {'a'=>1, :b=>2}
-
-If too many positional arguments are given an ArgumentError is raised.
-
-=== Default Positional Arguments
-
-When the method defines default arguments you do not need to supply all the
-arguments to the method. Ruby will fill in the missing arguments in-order.
-
-First we'll cover the simple case where the default arguments appear on the
-right. Consider this method:
-
- def my_method(a, b, c = 3, d = 4)
- p [a, b, c, d]
- end
-
-Here +c+ and +d+ have default values which ruby will apply for you. If you
-send only two arguments to this method:
-
- my_method(1, 2)
-
-You will see ruby print <code>[1, 2, 3, 4]</code>.
-
-If you send three arguments:
-
- my_method(1, 2, 5)
-
-You will see ruby print <code>[1, 2, 5, 4]</code>
-
-Ruby fills in the missing arguments from left to right.
-
-Ruby allows default values to appear in the middle of positional arguments.
-Consider this more complicated method:
-
- def my_method(a, b = 2, c = 3, d)
- p [a, b, c, d]
- end
-
-Here +b+ and +c+ have default values. If you send only two arguments to this
-method:
-
- my_method(1, 4)
-
-You will see ruby print <code>[1, 2, 3, 4]</code>.
-
-If you send three arguments:
-
- my_method(1, 5, 6)
-
-You will see ruby print <code>[1, 5, 3, 6]</code>.
-
-Describing this in words gets complicated and confusing. I'll describe it
-in variables and values instead.
-
-First <code>1</code> is assigned to +a+, then <code>6</code> is assigned to
-+d+. This leaves only the arguments with default values. Since
-<code>5</code> has not been assigned to a value yet, it is given to +b+ and
-+c+ uses its default value of <code>3</code>.
-
-=== Keyword Arguments
-
-Keyword arguments follow any positional arguments and are separated by commas
-like positional arguments:
-
- my_method(positional1, keyword1: value1, keyword2: value2)
-
-Any keyword arguments not given will use the default value from the method
-definition. If a keyword argument is given that the method did not list an
-ArgumentError will be raised.
-
-=== Block Argument
-
-The block argument sends a closure from the calling scope to the method.
-
-The block argument is always last when sending a message to a method. A block
-is sent to a method using <code>do ... end</code> or <code>{ ... }</code>:
-
- my_method do
- # ...
- end
-
-or:
-
- my_method {
- # ...
- }
-
-<code>do end</code> has lower precedence than <code>{ }</code> so:
-
- method_1 method_2 {
- # ...
- }
-
-Sends the block to +method_2+ while:
-
- method_1 method_2 do
- # ...
- end
-
-Sends the block to +method_1+. Note that in the first case if parentheses are
-used the block is sent to +method_1+.
-
-A block will accept arguments from the method it was sent to. Arguments are
-defined similar to the way a method defines arguments. The block's arguments
-go in <code>| ... |</code> following the opening <code>do</code> or
-<code>{</code>:
-
- my_method do |argument1, argument2|
- # ...
- end
-
-==== Block Local Arguments
-
-You may also declare block-local arguments to a block using <code>;</code> in
-the block arguments list. Assigning to a block-local argument will not
-override local arguments outside the block in the caller's scope:
-
- def my_method
- yield self
- end
-
- place = "world"
-
- my_method do |obj; place|
- place = "block"
- puts "hello #{obj} this is #{place}"
- end
-
- puts "place is: #{place}"
-
-This prints:
-
- hello main this is block
- place is world
-
-So the +place+ variable in the block is not the same +place+ variable as
-outside the block. Removing <code>; place</code> from the block arguments
-gives this result:
-
- hello main this is block
- place is block
-
-=== Array to Arguments Conversion
-
-Given the following method:
-
- def my_method(argument1, argument2, argument3)
- end
-
-You can turn an Array into an argument list with <code>*</code> (or splat)
-operator:
-
- arguments = [1, 2, 3]
- my_method(*arguments)
-
-or:
-
- arguments = [2, 3]
- my_method(1, *arguments)
-
-Both are equivalent to:
-
- my_method(1, 2, 3)
-
-If the method accepts keyword arguments the splat operator will convert a hash
-at the end of the array into keyword arguments:
-
- def my_method(a, b, c: 3)
- end
-
- arguments = [1, 2, { c: 4 }]
- my_method(*arguments)
-
-You may also use the <code>**</code> (described next) to convert a Hash into
-keyword arguments.
-
-If the number of objects in the Array do not match the number of arguments for
-the method an ArgumentError will be raised.
-
-If the splat operator comes first in the call, parentheses must be used to
-avoid a warning.
-
-=== Hash to Keyword Arguments Conversion
-
-Given the following method:
-
- def my_method(first: 1, second: 2, third: 3)
- end
-
-You can turn a Hash into keyword arguments with the <code>**</code> operator:
-
- arguments = { first: 3, second: 4, third: 5 }
- my_method(**arguments)
-
-or:
-
- arguments = { first: 3, second: 4 }
- my_method(third: 5, **arguments)
-
-Both are equivalent to:
-
- my_method(first: 3, second: 4, third: 5)
-
-If the method definition uses <code>**</code> to gather arbitrary keyword
-arguments they will not be gathered by <code>*</code>:
-
- def my_method(*a, **kw)
- p arguments: a, keywords: kw
- end
-
- my_method(1, 2, '3' => 4, five: 6)
-
-Prints:
-
- {:arguments=>[1, 2], :keywords=>{"3"=>4, :five=>6}}
-
-Unlike the splat operator described above the <code>**</code> operator has no
-commonly recognized name.
-
-=== Proc to Block Conversion
-
-Given a method that use a block:
-
- def my_method
- yield self
- end
-
-You can convert a proc or lambda to a block argument with the <code>&</code>
-operator:
-
- argument = proc { |a| puts "#{a.inspect} was yielded" }
-
- my_method(&argument)
-
-If the splat operator comes first in the call, parenthesis must be used to
-avoid a warning.
-
-Unlike the splat operator described above the <code>&</code> operator has no
-commonly recognized name.
-
-== Method Lookup
-
-When you send a message Ruby looks up the method that matches the name of the
-message for the receiver. Methods are stored in classes and modules so method
-lookup walks these, not the objects themselves.
-
-Here is the order of method lookup for the receiver's class or module +R+:
-
-* The prepended modules of +R+ in reverse order
-* For a matching method in +R+
-* The included modules of +R+ in reverse order
-
-If +R+ is a class with a superclass, this is repeated with +R+'s superclass
-until a method is found.
-
-Once a match is found method lookup stops.
-
-If no match is found this repeats from the beginning, but looking for
-+method_missing+. The default +method_missing+ is BasicObject#method_missing
-which raises a NameError when invoked.
-
-If refinements (an experimental feature) are active the method lookup changes.
-See the {refinements documentation}[rdoc-ref:syntax/refinements.rdoc] for
-details.
-
diff --git a/doc/syntax/control_expressions.rdoc b/doc/syntax/control_expressions.rdoc
deleted file mode 100644
index 0efc1668ad..0000000000
--- a/doc/syntax/control_expressions.rdoc
+++ /dev/null
@@ -1,500 +0,0 @@
-= Control Expressions
-
-Ruby has a variety of ways to control execution. All the expressions described
-here return a value.
-
-For the tests in these control expressions, +nil+ and +false+ are false-values
-and +true+ and any other object are true-values. In this document "true" will
-mean "true-value" and "false" will mean "false-value".
-
-== +if+ Expression
-
-The simplest +if+ expression has two parts, a "test" expression and a "then"
-expression. If the "test" expression evaluates to a true then the "then"
-expression is evaluated.
-
-Here is a simple if statement:
-
- if true then
- puts "the test resulted in a true-value"
- end
-
-This will print "the test resulted in a true-value".
-
-The +then+ is optional:
-
- if true
- puts "the test resulted in a true-value"
- end
-
-This document will omit the optional +then+ for all expressions as that is the
-most common usage of +if+.
-
-You may also add an +else+ expression. If the test does not evaluate to true
-the +else+ expression will be executed:
-
- if false
- puts "the test resulted in a true-value"
- else
- puts "the test resulted in a false-value"
- end
-
-This will print "the test resulted in a false-value".
-
-You may add an arbitrary number of extra tests to an if expression using
-+elsif+. An +elsif+ executes when all tests above the +elsif+ are false.
-
- a = 1
-
- if a == 0
- puts "a is zero"
- elsif a == 1
- puts "a is one"
- else
- puts "a is some other value"
- end
-
-This will print "a is one" as <code>1</code> is not equal to <code>0</code>.
-Since +else+ is only executed when there are no matching conditions.
-
-Once a condition matches, either the +if+ condition or any +elsif+ condition,
-the +if+ expression is complete and no further tests will be performed.
-
-Like an +if+, an +elsif+ condition may be followed by a +then+.
-
-In this example only "a is one" is printed:
-
- a = 1
-
- if a == 0
- puts "a is zero"
- elsif a == 1
- puts "a is one"
- elsif a >= 1
- puts "a is greater than or equal to one"
- else
- puts "a is some other value"
- end
-
-The tests for +if+ and +elsif+ may have side-effects. The most common use of
-side-effect is to cache a value into a local variable:
-
- if a = object.some_value
- # do something to a
- end
-
-The result value of an +if+ expression is the last value executed in the
-expression.
-
-== Ternary if
-
-You may also write a if-then-else expression using <code>?</code> and
-<code>:</code>. This ternary if:
-
- input_type = gets =~ /hello/i ? "greeting" : "other"
-
-Is the same as this +if+ expression:
-
- input_type =
- if gets =~ /hello/i
- "greeting"
- else
- "other"
- end
-
-While the ternary if is much shorter to write than the more verbose form, for
-readability it is recommended that the ternary if is only used for simple
-conditionals. Also, avoid using multiple ternary conditions in the same
-expression as this can be confusing.
-
-== +unless+ Expression
-
-The +unless+ expression is the opposite of the +if+ expression. If the value
-is false the "then" expression is executed:
-
- unless true
- puts "the value is a false-value"
- end
-
-This prints nothing as true is not a false-value.
-
-You may use an optional +then+ with +unless+ just like +if+.
-
-Note that the above +unless+ expression is the same as:
-
- if not true
- puts "the value is a false-value"
- end
-
-Like an +if+ expression you may use an +else+ condition with +unless+:
-
- unless true
- puts "the value is false"
- else
- puts "the value is true"
- end
-
-This prints "the value is true" from the +else+ condition.
-
-You may not use +elsif+ with an +unless+ expression.
-
-The result value of an +unless+ expression is the last value executed in the
-expression.
-
-== Modifier +if+ and +unless+
-
-+if+ and +unless+ can also be used to modify an expression. When used as a
-modifier the left-hand side is the "then" expression and the right-hand side
-is the "test" expression:
-
- a = 0
-
- a += 1 if a.zero?
-
- p a
-
-This will print 1.
-
- a = 0
-
- a += 1 unless a.zero?
-
- p a
-
-This will print 0.
-
-While the modifier and standard versions have both a "test" expression and a
-"then" expression, they are not exact transformations of each other due to
-parse order. Here is an example that shows the difference:
-
- p a if a = 0.zero?
-
-This raises the NameError "undefined local variable or method `a'".
-
-When ruby parses this expression it first encounters +a+ as a method call in
-the "then" expression, then later it sees the assignment to +a+ in the "test"
-expression and marks +a+ as a local variable.
-
-When running this line it first executes the "test" expression, <code>a =
-0.zero?</code>.
-
-Since the test is true it executes the "then" expression, <code>p a</code>.
-Since the +a+ in the body was recorded as a method which does not exist the
-NameError is raised.
-
-The same is true for +unless+.
-
-== +case+ Expression
-
-The +case+ expression can be used in two ways.
-
-The most common way is to compare an object against multiple patterns. The
-patterns are matched using the +===+ method which is aliased to +==+ on
-Object. Other classes must override it to give meaningful behavior. See
-Module#=== and Regexp#=== for examples.
-
-Here is an example of using +case+ to compare a String against a pattern:
-
- case "12345"
- when /^1/
- puts "the string starts with one"
- else
- puts "I don't know what the string starts with"
- end
-
-Here the string <code>"12345"</code> is compared with <code>/^1/</code> by
-calling <code>/^1/ === "12345"</code> which returns +true+. Like the +if+
-expression the first +when+ that matches is executed and all other matches are
-ignored.
-
-If no matches are found the +else+ is executed.
-
-The +else+ and +then+ are optional, this +case+ expression gives the same
-result as the one above:
-
- case "12345"
- when /^1/
- puts "the string starts with one"
- end
-
-You may place multiple conditions on the same +when+:
-
- case "2"
- when /^1/, "2"
- puts "the string starts with one or is '2'"
- end
-
-Ruby will try each condition in turn, so first <code>/^1/ === "2"</code>
-returns +false+, then <code>"2" === "2"</code> returns +true+, so "the string
-starts with one or is '2'" is printed.
-
-You may use +then+ after the +when+ condition. This is most frequently used
-to place the body of the +when+ on a single line.
-
- case a
- when 1, 2 then puts "a is one or two
- when 3 then puts "a is three"
- else puts "I don't know what a is"
- end
-
-The other way to use a +case+ expression is like an if-elsif expression:
-
- a = 2
-
- case
- when a == 1, a == 2
- puts "a is one or two"
- when a == 3
- puts "a is three"
- else
- puts "I don't know what a is"
- end
-
-Again, the +then+ and +else+ are optional.
-
-The result value of a +case+ expression is the last value executed in the
-expression.
-
-== +while+ Loop
-
-The +while+ loop executes while a condition is true:
-
- a = 0
-
- while a < 10 do
- p a
- a += 1
- end
-
- p a
-
-Prints the numbers 0 through 10. The condition <code>a < 10</code> is checked
-before the loop is entered, then the body executes, then the condition is
-checked again. When the condition results in false the loop is terminated.
-
-The +do+ keyword is optional. The following loop is equivalent to the loop
-above:
-
- while a < 10
- p a
- a += 1
- end
-
-The result of a +while+ loop is +nil+ unless +break+ is used to supply a
-value.
-
-== +until+ Loop
-
-The +until+ loop executes while a condition is false:
-
- a = 0
-
- until a > 10 do
- p a
- a += 1
- end
-
- p a
-
-This prints the numbers 0 through 11. Like a while loop the condition <code>a
-> 10</code> is checked when entering the loop and each time the loop body
-executes. If the condition is false the loop will continue to execute.
-
-Like a +while+ loop the +do+ is optional.
-
-Like a +while+ loop the result of an +until+ loop is nil unless +break+ is
-used.
-
-== +for+ Loop
-
-The +for+ loop consists of +for+ followed by a variable to contain the
-iteration argument followed by +in+ and the value to iterate over using #each.
-The +do+ is optional:
-
- for value in [1, 2, 3] do
- puts value
- end
-
-Prints 1, 2 and 3.
-
-Like +while+ and +until+, the +do+ is optional.
-
-The +for+ loop is similar to using #each, but does not create a new variable
-scope.
-
-The result value of a +for+ loop is the value iterated over unless +break+ is
-used.
-
-The +for+ loop is rarely used in modern ruby programs.
-
-== Modifier +while+ and +until+
-
-Like +if+ and +unless+, +while+ and +until+ can be used as modifiers:
-
- a = 0
-
- a += 1 while a < 10
-
- p a # prints 10
-
-+until+ used as a modifier:
-
- a = 0
-
- a += 1 until a > 10
-
- p a # prints 11
-
-You can use +begin+ and +end+ to create a +while+ loop that runs the body once
-before the condition:
-
- a = 0
-
- begin
- a += 1
- end while a < 10
-
- p a # prints 10
-
-If you don't use +rescue+ or +ensure+ Ruby optimizes away any exception
-handling overhead.
-
-== +break+ Statement
-
-Use +break+ to leave a block early. This will stop iterating over the items in +values+ if one of them is even:
-
- values.each do |value|
- break if value.even?
-
- # ...
- end
-
-You can also terminate from a +while+ loop using +break+:
-
- a = 0
-
- while true do
- p a
- a += 1
-
- break if a < 10
- end
-
- p a
-
-This prints the numbers 0 and 1.
-
-+break+ accepts a value that supplies the result of the expression it is
-"breaking" out of:
-
- result = [1, 2, 3].each do |value|
- break value * 2 if value.even?
- end
-
- p result # prints 4
-
-== +next+ Statement
-
-Use +next+ to skip the rest of the current iteration:
-
- result = [1, 2, 3].map do |value|
- next if value.even?
-
- value * 2
- end
-
- p result # prints [2, nil, 6]
-
-+next+ accepts an argument that can be used the result of the current block
-iteration:
-
- result = [1, 2, 3].map do |value|
- next value if value.even?
-
- value * 2
- end
-
- p result # prints [2, 2, 6]
-
-== +redo+ Statement
-
-Use +redo+ to redo the current iteration:
-
- result = []
-
- while result.length < 10 do
- result << result.length
-
- redo if result.last.even?
-
- result << result.length + 1
- end
-
- p result
-
-This prints [0, 1, 3, 3, 5, 5, 7, 7, 9, 9, 11]
-
-In Ruby 1.8 you could also use +retry+ where you used +redo+. This is no
-longer true, now you will receive a SyntaxError when you use +retry+ outside
-of a +rescue+ block. See {Exceptions}[rdoc-ref:syntax/exceptions.rdoc]
-for proper usage of +retry+.
-
-== Flip-Flop
-
-The flip-flop is rarely seen conditional expression. It's primary use is
-for processing text from ruby one-line programs used with <code>ruby -n</code>
-or <code>ruby -p</code>.
-
-The form of the flip-flop is an expression that indicates when the
-flip-flop turns on, <code>..</code> (or <code>...</code>), then an expression
-that indicates when the flip-flop will turn off. While the flip-flop is on it
-will continue to evaluate to +true+, and +false+ when off.
-
-Here is an example:
-
-
- selected = []
-
- 0.upto 10 do |value|
- selected << value if value==2..value==8
- end
-
- p selected # prints [2, 3, 4, 5, 6, 7, 8]
-
-In the above example the on condition is <code>n==2</code>. The flip-flop
-is initially off (false) for 0 and 1, but becomes on (true) for 2 and remains
-on through 8. After 8 it turns off and remains off for 9 and 10.
-
-The flip-flop must be used inside a conditional such as +if+, +while+,
-+unless+, +until+ etc. including the modifier forms.
-
-When you use an inclusive range (<code>..</code>) the off condition is
-evaluated when the on condition changes:
-
- selected = []
-
- 0.upto 5 do |value|
- selected << value if value==2..value==2
- end
-
- p selected # prints [2]
-
-Here both sides of the flip-flop are evaluated so the flip-flop turns on and
-off only when +value+ equals 2. Since the flip-flop turned on in the
-iteration it returns true.
-
-When you use an exclusive range (<code>...</code>) the off condition is
-evaluated on the following iteration:
-
- selected = []
-
- 0.upto 5 do |value|
- selected << value if value==2...value==2
- end
-
- p selected # prints [2, 3, 4, 5]
-
-Here the flip-flop turns on when +value+ equals 2 but doesn't turn off on the
-same iteration. The off condition isn't evaluated until the following
-iteration and +value+ will never be two again.
-
diff --git a/doc/syntax/exceptions.rdoc b/doc/syntax/exceptions.rdoc
index 0efc35a59f..390eb86256 100644
--- a/doc/syntax/exceptions.rdoc
+++ b/doc/syntax/exceptions.rdoc
@@ -55,23 +55,6 @@ The exception is matched to the rescue section starting at the top, and matches
only once. If an ArgumentError is raised in the begin section it will not be
handled in the StandardError section.
-You may retry rescued exceptions:
-
- begin
- # ...
- rescue
- # do something that may change the result of the begin block
- retry
- end
-
-Execution will resume at the start of the begin block, so be careful not to
-create an infinite loop.
-
-Inside a rescue block is the only valid location for +retry+, all other uses
-will raise a SyntaxError. If you wish to retry a block iteration use +redo+.
-See {Control Expressions}[rdoc-ref:syntax/control_expressions.rdoc] for
-details.
-
To always run some code whether an exception was raised or not, use +ensure+:
begin
diff --git a/doc/syntax/literals.rdoc b/doc/syntax/literals.rdoc
index e01b6875d4..ea3c3d8135 100644
--- a/doc/syntax/literals.rdoc
+++ b/doc/syntax/literals.rdoc
@@ -75,7 +75,7 @@ you may use an underscore for readability.
The most common way of writing strings is using <tt>"</tt>:
- "This is a string."
+ "This is a string".
The string may be many lines long.
@@ -111,18 +111,6 @@ like a single-quote string (no interpolation or character escaping) while
<tt>%Q</tt> behaves as a double-quote string. See Percent Strings below for
more discussion of the syntax of percent strings.
-Adjacent string literals are automatically concatenated by the interpreter:
-
- "con" "cat" "en" "at" "ion" #=> "concatenation"
- "This string contains "\
- "no newlines." #=> "This string contains no newlines."
-
-Any combination of adjacent single-quote, double-quote, percent strings will
-be concatenated as long as a percent-string is not last.
-
- %q{a} 'b' "c" #=> "abc"
- "a" 'b' %q{c} #=> NameError: uninitialized constant q
-
=== Here Documents
If you are writing a large block of text you may use a "here document" or
@@ -203,7 +191,7 @@ symbols using interpolation.
Like strings, a single-quote may be used to disable interpolation:
- :'my_symbol#{1 + 1}' #=> :"my_symbol\#{1 + 1}"
+ :"my_symbol#{1 + 1}" #=> :"my_symbol\#{1 + 1}"
When creating a Hash there is a special syntax for referencing a Symbol as
well.
diff --git a/doc/syntax/methods.rdoc b/doc/syntax/methods.rdoc
index 7fd69983f3..832ba269b0 100644
--- a/doc/syntax/methods.rdoc
+++ b/doc/syntax/methods.rdoc
@@ -11,82 +11,7 @@ A method definition consists of the +def+ keyword, a method name, the body of
the method, then the +end+ keyword. When called the method will execute the
body of the method. This method returns +2+.
-This section only covers defining methods. See also the {syntax documentation
-on calling methods}[rdoc-ref:syntax/calling_methods.rdoc].
-
-== Method Names
-
-Method names may be one of the operators or must start a letter or a character
-with the eight bit set. Typically method names are US-ASCII compatible since
-the keys to type them exist on all keyboards.
-
-(Ruby programs must be written in a US-ASCII-compatible character set. In
-such character sets if the eight bit is set it indicates an extended
-character. Ruby allows method names and other identifiers to contain such
-characters.)
-
-Method names may contain letters, numbers, an <code>_</code> (underscore or
-low line) or a character with the eight bit set.
-
-Method names may end with a <code>!</code> (bang or exclamation mark), a
-<code>?</code> (question mark) or <code>=</code> equals sign.
-
-In the ruby core library when a method ends with a bang it indicates there is
-a non-bang method that has does not modify the receiver. This is typically
-true for the standard library but does not hold true for other ruby libraries.
-
-Methods that end with a question mark do not always return just +true+ or
-+false+. Often they will may return an object to indicate a true value (or
-"truthy" value).
-
-Methods that end with an equals sign indicate an assignment method. For
-assignment methods the return value is ignored, the arguments are returned
-instead.
-
-These are method names for the various ruby operators. Each of these
-operators accept only one argument. Following the operator is the typical
-use or name of the operator. Creating an alternate meaning for the operator
-may lead to confusion as the user expects plus to add things, minus to
-subtract things, etc. Additionally, you cannot alter the precedence of the
-operators.
-
-<code>+</code> :: add
-<code>-</code> :: subtract
-<code>*</code> :: multiply
-<code>**</code> :: power
-<code>/</code> :: divide
-<code>%</code> :: modulus division, String#%
-<code>&</code> :: AND
-<code>^</code> :: XOR (exclusive OR)
-<code>>></code> :: right-shift
-<code><<</code> :: left-shift, append
-<code>==</code> :: equal
-<code>!=</code> :: not equal
-<code>===</code> :: case equality. See Object#===
-<code>=~</code> :: pattern match. (Not just for regular expressions)
-<code>!~</code> :: does not match
-<code><=></code> :: comparison aka spaceship operator. See Comparable
-<code><</code> :: less-than
-<code><=</code> :: less-than or equal
-<code>></code> :: greater-than
-<code>>=</code> :: greater-than or equal
-
-To define unary methods minus, plus, tilde and not (<code>!</code>) follow the
-operator with an <code>@</code> as in <code>+@</code> or <code>!@</code>:
-
- class C
- def -@
- puts "you inverted this object"
- end
- end
-
- obj = C.new
-
- -obj # prints "you inverted this object"
-
-Unary methods accept zero arguments.
-
-== Return Values
+== Return values
By default, a method returns the last expression that was evaluated in the body
of the method. In the example above, the last (and only) expression evaluated
@@ -105,15 +30,6 @@ evaluated.
1 + 1 # this expression is never evaluated
end
-Note that for assignment methods the return value will always be ignored.
-Instead the argument will be returned:
-
- def a=(value)
- return 1 + value
- end
-
- p(a = 5) # prints 5
-
== Scope
The standard syntax to define a method:
@@ -237,71 +153,25 @@ This will raise a SyntaxError:
a + b + c
end
-=== Array Decomposition
-
-You can decompose (unpack or extract values from) an Array using extra
-parentheses in the arguments:
-
- def my_method((a, b))
- p a: a, b: b
- end
-
- my_method([1, 2])
-
-This prints:
-
- {:a=>1, :b=>2}
-
-If the argument has extra elements in the Array they will be ignored:
-
- def my_method((a, b))
- p a: a, b: b
- end
-
- my_method([1, 2, 3])
-
-This has the same output as above.
-
-You can use a <code>*</code> to collect the remaining arguments. This splits
-an Array into a first element and the rest:
-
- def my_method((a, *b))
- p a: a, b: b
- end
-
- my_method([1, 2, 3])
-
-This prints:
-
- {:a=>1, :b=>[2, 3]}
-
-The argument will be decomposed if it responds to #to_ary. You should only
-define #to_ary if you can use your object in place of an Array.
+=== Keyword Arguments
-Use of the inner parentheses only uses one of the sent arguments. If the
-argument is not an Array it will be assigned to the first argument in the
-decomposition and the remaining arguments in the decomposition will be +nil+:
+Keyword arguments are similar to positional arguments with default values:
- def my_method(a, (b, c), d)
- p a: a, b: b, c: c, d: d
+ def add_values(first: 1, second: 2)
+ first + second
end
- my_method(1, 2, 3)
-
-This prints:
-
- {:a=>1, :b=>2, :c=>nil, :d=>3}
-
-You can nest decomposition arbitrarily:
+When calling a method with keyword arguments the arguments may appear in any
+order. If an unknown keyword argument is sent by the caller an ArgumentError
+is raised.
- def my_method(((a, b), c))
- # ...
- end
+When mixing keyword arguments and positional arguments, all positional
+arguments must appear before any keyword arguments.
=== Array/Hash Argument
-Prefixing an argument with <code>*</code> causes any remaining arguments to be
-converted to an Array:
+Prefixing an argument with "*" causes any remaining arguments to be converted
+to an Array:
def gather_arguments(*arguments)
p arguments
@@ -326,67 +196,6 @@ However, this only occurs if the method does not declare any keyword arguments.
gather_arguments_keyword 1, 2, three: 3
#=> raises: unknown keyword: three (ArgumentError)
-Also, note that a bare <code>*</code> can be used to ignore arguments:
-
- def ignore_arguments(*)
- end
-
-=== Keyword Arguments
-
-Keyword arguments are similar to positional arguments with default values:
-
- def add_values(first: 1, second: 2)
- first + second
- end
-
-Arbitrary keyword arguments will be accepted with <code>**</code>:
-
- def gather_arguments(first: nil, **rest)
- p first, rest
- end
-
- gather_arguments first: 1, second: 2, third: 3
- # prints 1 then {:second=>2, :third=>3}
-
-When calling a method with keyword arguments the arguments may appear in any
-order. If an unknown keyword argument is sent by the caller an ArgumentError
-is raised.
-
-When mixing keyword arguments and positional arguments, all positional
-arguments must appear before any keyword arguments.
-
-== Block Argument
-
-The block argument is indicated by <code>&</code> and must come last:
-
- def my_method(&my_block)
- my_method.call(self)
- end
-
-Most frequently the block argument is used to pass a block to another method:
-
- def each_item(&block)
- @items.each(&block)
- end
-
-If you are only going to call the block and will not otherwise manipulate it
-or send it to another method using <code>yield</code> without an explicit
-block parameter is preferred. This method is equivalent to the first method
-in this section:
-
- def my_method
- yield self
- end
-
-There is also a performance benefit to using yield over a calling a block
-parameter. When a block argument is assigned to a variable a Proc object is
-created which holds the block. When using yield this Proc object is not
-created.
-
-If you only need to use the block sometimes you can use Proc.new to create a
-proc from the block that was passed to your method. See Proc.new for further
-details.
-
== Exception Handling
Methods have an implied exception handling block so you do not need to use
@@ -409,6 +218,6 @@ May be written as:
end
If you wish to rescue an exception for only part of your method use +begin+ and
-+end+. For more details see the page on {exception
-handling}[rdoc-ref:syntax/exceptions.rdoc].
++end+. For more details see the page on {Exception
+Handling}[rdoc-ref:doc/syntax/exceptions.rdoc].
diff --git a/doc/syntax/miscellaneous.rdoc b/doc/syntax/miscellaneous.rdoc
deleted file mode 100644
index 8f424f019f..0000000000
--- a/doc/syntax/miscellaneous.rdoc
+++ /dev/null
@@ -1,107 +0,0 @@
-= Miscellaneous Syntax
-
-== Ending an Expression
-
-Ruby uses a newline as the end of an expression. When ending a line with an
-operator, open parentheses, comma, etc. the expression will continue.
-
-You can end an expression with a <code>;</code> (semicolon). Semicolons are
-most frequently used with <code>ruby -e</code>.
-
-== Indentation
-
-Ruby does not require any indentation. Typically ruby programs are indented
-two spaces.
-
-If you run ruby with warnings enabled and have an indentation mis-match you
-will receive a warning.
-
-== +alias+
-
-The +alias+ keyword is most frequently used to alias methods. When aliasing a
-method you can use either its name or a symbol:
-
- alias new_name old_name
- alias :new_name :old_name
-
-For methods, Module#alias_method can often be used instead of +alias+.
-
-You can also use +alias+ to alias global variables:
-
- $old = 0
-
- alias $new $old
-
- p $new # prints 0
-
-You may use +alias+ in any scope.
-
-== +undef+
-
-The +undef+ keyword prevents the current class from responding to calls to the
-named methods.
-
- undef my_method
-
-You may use symbols instead of method names:
-
- undef :my_method
-
-You may undef multiple methods:
-
- undef method1, method2
-
-You may use +undef+ in any scope. See also Module#undef_method
-
-== +defined?+
-
-+defined?+ is a keyword that returns a string describing its argument:
-
- p defined?(UNDEFINED_CONSTANT) # prints nil
- p defined?(RUBY_VERSION) # prints "constant"
- p defined?(1 + 1) # prints "method"
-
-You don't need to use parenthesis with +defined?+ but they are recommended due
-to the {low precedence}[rdoc-ref:syntax/precedence.rdoc] of +defined?+.
-
-For example, if you wish to check if an instance variable exists and that the
-instance variable is zero:
-
- defined? @instance_variable && @instance_variable.zero?
-
-This returns <code>"expression"</code> which is not what you want if the
-instance variable is not defined.
-
- @instance_variable = 1
- defined?(@instance_variable) && @instance_variable.zero?
-
-Adding parentheses when checking if the instance variable is defined is a
-better check. This correctly returns +nil+ when the instance variable is not
-defined and +false+ when the instance variable is not zero.
-
-Using the specific reflection methods such as instance_variable_defined? for
-instance variables or const_defined? for constants is less error prone than
-using +defined?+.
-
-== +BEGIN+ and +END+
-
-+BEGIN+ defines a block that is run before any other code in the current file.
-It is typically used in one-liners with <code>ruby -e</code>. Similarly +END+
-defines a block that is run after any other code.
-
-+BEGIN+ must appear at top-level and +END+ will issue a warning when you use it
-inside a method.
-
-Here is an example:
-
- BEGIN {
- count = 0
- }
-
-You must use <code>{</code> and <code>}</code> you may not use +do+ and +end+.
-
-Here is an example one-liner that adds numbers from standard input or any files
-in the argument list:
-
- ruby -ne 'BEGIN { count = 0 }; END { puts count }; count += gets.to_i'
-
diff --git a/doc/syntax/modules_and_classes.rdoc b/doc/syntax/modules_and_classes.rdoc
index a82a6f27ed..bcf805ac46 100644
--- a/doc/syntax/modules_and_classes.rdoc
+++ b/doc/syntax/modules_and_classes.rdoc
@@ -4,8 +4,8 @@ Modules serve two purposes in Ruby, namespacing and mix-in functionality.
A namespace can be used to organize code by package or functionality that
separates common names from interference by other packages. For example, the
-IRB namespace provides functionality for irb that prevents a collision
-for the common name "Context".
+Curses namespace provides functionality for curses that prevents a collision
+for the common name "Window".
Mix-in functionality allows sharing common methods across multiple classes or
modules. Ruby comes with the Enumerable mix-in module which provides many
@@ -93,9 +93,8 @@ nesting:
end
end
-However, if you use <code>::</code> to define <code>A::B</code> without
-nesting it inside +A+ a NameError exception will be raised because the nesting
-does not include +A+:
+However, if you use <code>::</code> to define <code>A::B</code> without nesting
+it inside +A+ a NameError exception will be raised because the nesting does not include +A+:
module A
Z = 1
@@ -122,7 +121,7 @@ If a constant is defined at the top-level you may preceded it with
=== Methods
For method definition documentation see the {syntax documentation for
-methods}[rdoc-ref:syntax/methods.rdoc].
+methods}[rdoc-ref:doc/syntax/methods.rdoc].
Class methods may be called directly. (This is slightly confusing, but a
method on a module is often called a "class method" instead of a "module
@@ -194,12 +193,6 @@ The third visibility is +private+. A private method may not be called with a
receiver, not even +self+. If a private method is called with a receiver a
NoMethodError will be raised.
-=== +alias+ and +undef+
-
-You may also alias or undefine methods, but these operations are not
-restricted to modules or classes. See the {miscellaneous syntax
-section}[rdoc-ref:syntax/miscellaneous.rdoc] for documentation.
-
= Classes
Every class is also a module, but unlike modules a class may not be mixed-in to
diff --git a/doc/syntax/precedence.rdoc b/doc/syntax/precedence.rdoc
deleted file mode 100644
index 515626c74f..0000000000
--- a/doc/syntax/precedence.rdoc
+++ /dev/null
@@ -1,60 +0,0 @@
-= Precedence
-
-From highest to lowest, this is the precedence table for ruby. High precedence
-operations happen before low precedence operations.
-
- !, ~, unary +
-
- **
-
- unary -
-
- *, /, %
-
- +, -
-
- <<, >>
-
- &
-
- |, ^
-
- >, >=, <, <=
-
- <=>, ==, ===, !=, =~, !~
-
- &&
-
- ||
-
- .., ...
-
- ?, :
-
- modifier-rescue
-
- =, +=, -=, etc.
-
- defined?
-
- not
-
- or, and
-
- modifier-if, modifier-unless, modifier-while, modifier-until
-
- { } blocks
-
-Unary <code>+</code> and unary <code>-</code> are for <code>+1</code>,
-<code>-1</code> or <code>-(a + b)</code>.
-
-Modifier-if, modifier-unless, etc. are for the modifier versions of those
-keywords. For example, this is a modifier-unless expression:
-
- a += 1 unless a.zero?
-
-<code>{ ... }</code> blocks have priority below all listed operations, but
-<code>do ... end</code> blocks have lower priority.
-
-All other words in the precedence table above are keywords.
-
diff --git a/doc/syntax/refinements.rdoc b/doc/syntax/refinements.rdoc
deleted file mode 100644
index 1a516ed8b2..0000000000
--- a/doc/syntax/refinements.rdoc
+++ /dev/null
@@ -1,266 +0,0 @@
-= Refinements
-
-Due to Ruby's open classes you can redefine or add functionality to existing
-classes. This is called a "monkey patch". Unfortunately the scope of such
-changes is global. All users of the monkey-patched class see the same
-changes. This can cause unintended side-effects or breakage of programs.
-
-Refinements are designed to reduce the impact of monkey patching on other
-users of the monkey-patched class. Refinements provide a way to extend a
-class locally.
-
-Refinements are an experimental feature in Ruby 2.0. At the time of writing,
-refinements are expected to exist in future versions of Ruby but the
-specification of refinements may change. You will receive a warning the first
-time you define or activate a refinement.
-
-Here is a basic refinement:
-
- class C
- def foo
- puts "C#foo"
- end
- end
-
- module M
- refine C do
- def foo
- puts "C#foo in M"
- end
- end
- end
-
-First, a class +C+ is defined. Next a refinement for +C+ is created using
-Module#refine. Refinements only modify classes, not modules so the argument
-must be a class.
-
-Module#refine creates an anonymous module that contains the changes or
-refinements to the class (+C+ in the example). +self+ in the refine block is
-this anonymous module similar to Module#module_eval.
-
-Activate the refinement with #using:
-
- using M
-
- x = C.new
-
- c.foo # prints "C#foo in M"
-
-== Scope
-
-You may only activate refinements at top-level, not inside any class, module
-or method scope. You may activate refinements in a string passed to
-Kernel#eval that is evaluated at top-level. Refinements are active until the
-end of the file or the end of the eval string, respectively.
-
-Refinements are lexical in scope. When control is transferred outside the
-scope the refinement is deactivated. This means that if you require or load a
-file or call a method that is defined outside the current scope the refinement
-will be deactivated:
-
- class C
- end
-
- module M
- refine C do
- def foo
- puts "C#foo in M"
- end
- end
- end
-
- def call_foo(x)
- x.foo
- end
-
- using M
-
- x = C.new
- x.foo # prints "C#foo in M"
- call_foo(x) #=> raises NoMethodError
-
-If a method is defined in a scope where a refinement is active the refinement
-will be active when the method is called. This example spans multiple files:
-
-c.rb:
-
- class C
- end
-
-m.rb:
-
- require "c"
-
- module M
- refine C do
- def foo
- puts "C#foo in M"
- end
- end
- end
-
-m_user.rb:
-
- require "m"
-
- using M
-
- class MUser
- def call_foo(x)
- x.foo
- end
- end
-
-main.rb:
-
- require "m_user"
-
- x = C.new
- m_user = MUser.new
- m_user.call_foo(x) # prints "C#foo in M"
- x.foo #=> raises NoMethodError
-
-Since the refinement +M+ is active in <code>m_user.rb</code> where
-<code>MUser#call_foo</code> is defined it is also active when
-<code>main.rb</code> calls +call_foo+.
-
-Since #using is a method, refinements are only active when it is called. Here
-are examples of where a refinement +M+ is and is not active.
-
-In a file:
-
- # not activated here
- using M
- # activated here
- class Foo
- # activated here
- def foo
- # activated here
- end
- # activated here
- end
- # activated here
-
-In eval:
-
- # not activated here
- eval <<EOF
- # not activated here
- using M
- # activated here
- EOF
- # not activated here
-
-When not evaluated:
-
- # not activated here
- if false
- using M
- end
- # not activated here
-
-When defining multiple refinements in the same module, inside a refine block
-all refinements from the same module are active when a refined method is
-called:
-
- module ToJSON
- refine Integer do
- def to_json
- to_s
- end
- end
-
- refine Array do
- def to_json
- "[" + map { |i| i.to_json }.join(",") + "]"
- end
- end
-
- refine Hash do
- def to_json
- "{" + map { |k, v| k.to_s.dump + ":" + v.to_json }.join(",") + "}"
- end
- end
- end
-
- using ToJSON
-
- p [{1=>2}, {3=>4}].to_json # prints "[{\"1\":2},{\"3\":4}]"
-
-You may also activate refinements in a class or module definition, in which
-case the refinements are activated from the point where using is called to
-the end of the class or module definition:
-
- # not activated here
- class Foo
- # not activated here
- using M
- # activated here
- def foo
- # activated here
- end
- # activated here
- end
- # not activated here
-
-Note that the refinements in M are not activated automatically even if the class
-Foo is reopened later.
-
-== Method Lookup
-
-When looking up a method for an instance of class +C+ Ruby checks:
-
-* If refinements are active for +C+, in the reverse order they were activated:
- * The prepended modules from the refinement for +C+
- * The refinement for +C+
- * The included modules from the refinement for +C+
-* The prepended modules of +C+
-* +C+
-* The included modules of +C+
-
-If no method was found at any point this repeats with the superclass of +C+.
-
-Note that methods in a subclass have priority over refinements in a
-superclass. For example, if the method <code>/</code> is defined in a
-refinement for Integer <code>1 / 2</code> invokes the original Fixnum#/
-because Fixnum is a subclass of Integer and is searched before the refinements
-for the superclass Integer.
-
-If a method +foo+ is defined on Integer in a refinement, <code>1.foo</code>
-invokes that method since +foo+ does not exist on Fixnum.
-
-== +super+
-
-When +super+ is invoked method lookup checks:
-
-* The included modules of the current class. Note that the current class may
- be a refinement.
-* If the current class is a refinement, the method lookup proceeds as in the
- Method Lookup section above.
-* If the current class has a direct superclass, the method proceeds as in the
- Method Lookup section above using the superclass.
-
-Note that +super+ in a method of a refinement invokes the method in the
-refined class even if there is another refinement which has been activated in
-the same context.
-
-== Indirect Method Calls
-
-When using indirect method access such as Kernel#send, Kernel#method or
-Kernel#respond_to? refinements are not honored for the caller context during
-method lookup.
-
-This behavior may be changed in the future.
-
-== Refinements and module inclusion
-
-Refinements are inherited by module inclusion. That is, using activates all
-refinements in the ancestors of the specified module. Refinements in a
-descendant have priority over refinements in an ancestor.
-
-== Further Reading
-
-See http://bugs.ruby-lang.org/projects/ruby-trunk/wiki/RefinementsSpec for the
-current specification for implementing refinements. The specification also
-contains more details.
-
diff --git a/enc/Makefile.in b/enc/Makefile.in
index a64785d1c5..2c15e904dc 100644
--- a/enc/Makefile.in
+++ b/enc/Makefile.in
@@ -35,7 +35,6 @@ LIBRUBYARG_STATIC = $(LIBRUBYARG_SHARED)
empty =
AR = @AR@
CC = @CC@
-ARFLAGS = @ARFLAGS@$(empty)
RANLIB = @RANLIB@
OUTFLAG = @OUTFLAG@$(empty)
COUTFLAG = @COUTFLAG@$(empty)
diff --git a/enc/depend b/enc/depend
index 5750a0dc49..c437da70a2 100644
--- a/enc/depend
+++ b/enc/depend
@@ -10,9 +10,6 @@
% rule_subst = CONFIG["RULE_SUBST"] || "%s"
% transvpath = rule_subst.dup.sub!(/\{[^{}]+\}/, '$(TRANSVPATH)/') || "enc/trans/%s"
% transvpath_prefix = (rule_subst.dup.sub!(/\{[^{}]+\}/, '{$(TRANSVPATH)}') || "%s") % ""
-% CONFIG['ARFLAGS'] = 'rcu ' if (CONFIG['ARFLAGS'] || "").empty?
-% CONFIG['RANLIB'] = ':' if (CONFIG['RANLIB'] || "").empty?
-% CONFIG['CPPFLAGS'] += " -DRUBY_EXPORT=1" if CONFIG["EXTSTATIC"] == "static"
% if File::ALT_SEPARATOR
% pathrep = proc {|path| path.gsub('/', File::ALT_SEPARATOR).gsub(/\$\(([@<?*]\w?|\w+)\)/, "$(\\1:/=\\#{File::ALT_SEPARATOR})")}
% else
@@ -66,12 +63,12 @@ libtrans: $(LIBTRANS)
$(LIBENC): $(ENCOBJS)
@$(RM) $@
$(ECHO) linking statically-linked encoding library $@
- $(Q) $(AR) $(ARFLAGS)$@ $(ENCOBJS)
+ $(Q) $(AR) <%=CONFIG['ARFLAGS'] || 'rcu' %> $@ $(ENCOBJS)
@-$(RANLIB) $@ 2> /dev/null || true
$(LIBTRANS): $(TRANSOBJS)
@$(RM) $@
$(ECHO) linking statically-linked transcoder library $@
- $(Q) $(AR) $(ARFLAGS)$@ $(TRANSOBJS)
+ $(Q) $(AR) <%=CONFIG['ARFLAGS'] || 'rcu' %> $@ $(TRANSOBJS)
@-$(RANLIB) $@ 2> /dev/null || true
srcs: $(TRANSCSRCS)
@@ -83,13 +80,13 @@ srcs: $(TRANSCSRCS)
% unless ENCS.empty? or TRANS.empty?
% unless ENCS.empty?
-$(ENCOBJS): $(hdrdir)/ruby.h regenc.h oniguruma.h config.h defines.h ruby.h missing.h subst.h intern.h st.h encoding.h
+$(ENCOBJS): regenc.h oniguruma.h config.h defines.h
% end
% ENC_DEPS.each do |e, deps|
enc/<%=e%>.$(OBJEXT): <%=deps.map {|n| rule_subst % n}.join(' ')%>
% end
% unless TRANS.empty?
-$(TRANSOBJS): $(hdrdir)/ruby.h ruby.h intern.h config.h defines.h missing.h encoding.h oniguruma.h st.h transcode_data.h subst.h encoding.h
+$(TRANSOBJS): ruby.h intern.h config.h defines.h missing.h encoding.h oniguruma.h st.h transcode_data.h
% end
% ATRANS.each do |e|
% src = "#{e}.trans"
diff --git a/enc/encdb.c b/enc/encdb.c
index fa04a5f7f6..32def53aeb 100644
--- a/enc/encdb.c
+++ b/enc/encdb.c
@@ -14,15 +14,13 @@ int rb_encdb_alias(const char *alias, const char *orig);
int rb_encdb_dummy(const char *name);
void rb_encdb_declare(const char *name);
void rb_enc_set_base(const char *name, const char *orig);
-int rb_enc_set_dummy(int index);
void rb_encdb_set_unicode(int index);
#define ENC_REPLICATE(name, orig) rb_encdb_replicate((name), (orig))
#define ENC_ALIAS(name, orig) rb_encdb_alias((name), (orig))
#define ENC_DUMMY(name) rb_encdb_dummy(name)
#define ENC_DEFINE(name) rb_encdb_declare(name)
#define ENC_SET_BASE(name, orig) rb_enc_set_base((name), (orig))
-#define ENC_SET_DUMMY(name, orig) rb_enc_set_dummy(name)
-#define ENC_DUMMY_UNICODE(name) rb_encdb_set_unicode(rb_enc_set_dummy(ENC_REPLICATE((name), name "BE")))
+#define ENC_DUMMY_UNICODE(name) rb_encdb_set_unicode(ENC_DUMMY(name))
void
Init_encdb(void)
diff --git a/enc/euc_jp.c b/enc/euc_jp.c
index d7af1abaee..d794145b49 100644
--- a/enc/euc_jp.c
+++ b/enc/euc_jp.c
@@ -637,8 +637,8 @@ ENC_ALIAS("euc-jp-ms", "eucJP-ms")
ENC_REPLICATE("CP51932", "EUC-JP")
/*
- * Name: EUC-JIS-2004
- * Link: http://ja.wikipedia.org/wiki/EUC-JIS-2004
+ * Name: EUC-JP-2004
+ * Link: http://ja.wikipedia.org/wiki/EUC-JP-2004
*/
-ENC_REPLICATE("EUC-JIS-2004", "EUC-JP") /* defined at JIS X 0213:2004 */
-ENC_ALIAS("EUC-JISX0213", "EUC-JIS-2004") /* defined at JIS X 0213:2000, and obsolete at JIS X 0213:2004 */
+ENC_REPLICATE("EUC-JP-2004", "EUC-JP") /* defined at JIS X 0213:2004 */
+ENC_ALIAS("EUC-JISX0213", "EUC-JP-2004") /* defined at JIS X 0213:2000, and obsolete at JIS X 0213:2004 */
diff --git a/enc/shift_jis.c b/enc/shift_jis.c
index 5f5a802874..e2bcaec189 100644
--- a/enc/shift_jis.c
+++ b/enc/shift_jis.c
@@ -231,7 +231,7 @@ code_to_mbclen(OnigCodePoint code, OnigEncoding enc ARG_UNUSED)
}
else if (code <= 0xffff) {
int low = code & 0xff;
- if (! SJIS_ISMB_TRAIL(low))
+ if (low < 0x40 || low == 0x7f || 0xfc < low)
return ONIGERR_INVALID_CODE_POINT_VALUE;
return 2;
}
diff --git a/enc/trans/japanese_euc.trans b/enc/trans/japanese_euc.trans
index d96f69feda..0f63272321 100644
--- a/enc/trans/japanese_euc.trans
+++ b/enc/trans/japanese_euc.trans
@@ -18,7 +18,7 @@
citrus_decode_mapsrc("euc", 0x8080, "JISX0208VDC:NEC/UCS,CP932VDC:NEC_IBM/UCS,JISX0208:MS/UCS") +
citrus_decode_mapsrc("euc", 0x0080, "JISX0201-KANA/UCS")
- transcode_tblgen "EUC-JIS-2004", "UTF-8",
+ transcode_tblgen "EUC-JP-2004", "UTF-8",
[["{00-7f}", :nomap]] +
citrus_decode_mapsrc("euc", 0x8080, "JISX0208:1990/UCS,JISX0213-1/UCS@BMP,JISX0213-1/UCS@SIP") +
citrus_decode_mapsrc("euc", 0x0080, "JISX0201-KANA/UCS") +
@@ -42,7 +42,7 @@
citrus_decode_mapsrc("euc", 0x8080, "UCS/JISX0208:MS,UCS/JISX0208VDC:NEC,UCS/CP932VDC:NEC_IBM") +
citrus_decode_mapsrc("euc", 0x0080, "UCS/JISX0201-KANA")
- transcode_tblgen "UTF-8", "EUC-JIS-2004",
+ transcode_tblgen "UTF-8", "EUC-JP-2004",
[["{00-7f}", :nomap]] +
citrus_decode_mapsrc("euc", 0x8080, "UCS/JISX0208:1990,UCS@BMP/JISX0213-1,UCS@SIP/JISX0213-1") +
citrus_decode_mapsrc("euc", 0x0080, "UCS/JISX0201-KANA") +
diff --git a/enc/trans/utf8_mac-tbl.rb b/enc/trans/utf8_mac-tbl.rb
index 80bd049114..f43478bd3e 100644
--- a/enc/trans/utf8_mac-tbl.rb
+++ b/enc/trans/utf8_mac-tbl.rb
@@ -1,23099 +1,856 @@
+# http://developer.apple.com/technotes/tn/tn1150table.html
MAC_DECOMPOSE_TBL = [
- ["cdbe", "3b"],
["c380", "41cc80"],
["c381", "41cc81"],
["c382", "41cc82"],
- ["e1baa6", "41cc82cc80"],
- ["e1baa6", "c382cc80"],
- ["e1baa4", "41cc82cc81"],
- ["e1baa4", "c382cc81"],
- ["e1baaa", "41cc82cc83"],
- ["e1baaa", "c382cc83"],
- ["e1baa8", "41cc82cc89"],
- ["e1baa8", "c382cc89"],
["c383", "41cc83"],
- ["c480", "41cc84"],
- ["c482", "41cc86"],
- ["e1bab0", "41cc86cc80"],
- ["e1bab0", "c482cc80"],
- ["e1baae", "41cc86cc81"],
- ["e1baae", "c482cc81"],
- ["e1bab4", "41cc86cc83"],
- ["e1bab4", "c482cc83"],
- ["e1bab2", "41cc86cc89"],
- ["e1bab2", "c482cc89"],
- ["c8a6", "41cc87"],
- ["c7a0", "41cc87cc84"],
- ["c7a0", "c8a6cc84"],
["c384", "41cc88"],
- ["c79e", "41cc88cc84"],
- ["c79e", "c384cc84"],
- ["e1baa2", "41cc89"],
["c385", "41cc8a"],
- ["c7ba", "41cc8acc81"],
- ["c7ba", "c385cc81"],
- ["c78d", "41cc8c"],
- ["c880", "41cc8f"],
- ["c882", "41cc91"],
- ["e1baa0", "41cca3"],
- ["e1baac", "41cca3cc82"],
- ["e1baac", "e1baa0cc82"],
- ["e1bab6", "41cca3cc86"],
- ["e1bab6", "e1baa0cc86"],
- ["e1b880", "41cca5"],
+ ["c387", "43cca7"],
+ ["c388", "45cc80"],
+ ["c389", "45cc81"],
+ ["c38a", "45cc82"],
+ ["c38b", "45cc88"],
+ ["c38c", "49cc80"],
+ ["c38d", "49cc81"],
+ ["c38e", "49cc82"],
+ ["c38f", "49cc88"],
+ ["c391", "4ecc83"],
+ ["c392", "4fcc80"],
+ ["c393", "4fcc81"],
+ ["c394", "4fcc82"],
+ ["c395", "4fcc83"],
+ ["c396", "4fcc88"],
+ ["c399", "55cc80"],
+ ["c39a", "55cc81"],
+ ["c39b", "55cc82"],
+ ["c39c", "55cc88"],
+ ["c39d", "59cc81"],
+ ["c3a0", "61cc80"],
+ ["c3a1", "61cc81"],
+ ["c3a2", "61cc82"],
+ ["c3a3", "61cc83"],
+ ["c3a4", "61cc88"],
+ ["c3a5", "61cc8a"],
+ ["c3a7", "63cca7"],
+ ["c3a8", "65cc80"],
+ ["c3a9", "65cc81"],
+ ["c3aa", "65cc82"],
+ ["c3ab", "65cc88"],
+ ["c3ac", "69cc80"],
+ ["c3ad", "69cc81"],
+ ["c3ae", "69cc82"],
+ ["c3af", "69cc88"],
+ ["c3b1", "6ecc83"],
+ ["c3b2", "6fcc80"],
+ ["c3b3", "6fcc81"],
+ ["c3b4", "6fcc82"],
+ ["c3b5", "6fcc83"],
+ ["c3b6", "6fcc88"],
+ ["c3b9", "75cc80"],
+ ["c3ba", "75cc81"],
+ ["c3bb", "75cc82"],
+ ["c3bc", "75cc88"],
+ ["c3bd", "79cc81"],
+ ["c3bf", "79cc88"],
+ ["c480", "41cc84"],
+ ["c481", "61cc84"],
+ ["c482", "41cc86"],
+ ["c483", "61cc86"],
["c484", "41cca8"],
- ["e1b882", "42cc87"],
- ["e1b884", "42cca3"],
- ["e1b886", "42ccb1"],
+ ["c485", "61cca8"],
["c486", "43cc81"],
+ ["c487", "63cc81"],
["c488", "43cc82"],
+ ["c489", "63cc82"],
["c48a", "43cc87"],
+ ["c48b", "63cc87"],
["c48c", "43cc8c"],
- ["c387", "43cca7"],
- ["e1b888", "43cca7cc81"],
- ["e1b888", "c387cc81"],
- ["e1b88a", "44cc87"],
+ ["c48d", "63cc8c"],
["c48e", "44cc8c"],
- ["e1b88c", "44cca3"],
- ["e1b890", "44cca7"],
- ["e1b892", "44ccad"],
- ["e1b88e", "44ccb1"],
- ["c388", "45cc80"],
- ["c389", "45cc81"],
- ["c38a", "45cc82"],
- ["e1bb80", "45cc82cc80"],
- ["e1bb80", "c38acc80"],
- ["e1babe", "45cc82cc81"],
- ["e1babe", "c38acc81"],
- ["e1bb84", "45cc82cc83"],
- ["e1bb84", "c38acc83"],
- ["e1bb82", "45cc82cc89"],
- ["e1bb82", "c38acc89"],
- ["e1babc", "45cc83"],
+ ["c48f", "64cc8c"],
["c492", "45cc84"],
- ["e1b894", "45cc84cc80"],
- ["e1b894", "c492cc80"],
- ["e1b896", "45cc84cc81"],
- ["e1b896", "c492cc81"],
+ ["c493", "65cc84"],
["c494", "45cc86"],
+ ["c495", "65cc86"],
["c496", "45cc87"],
- ["c38b", "45cc88"],
- ["e1baba", "45cc89"],
- ["c49a", "45cc8c"],
- ["c884", "45cc8f"],
- ["c886", "45cc91"],
- ["e1bab8", "45cca3"],
- ["e1bb86", "45cca3cc82"],
- ["e1bb86", "e1bab8cc82"],
- ["c8a8", "45cca7"],
- ["e1b89c", "45cca7cc86"],
- ["e1b89c", "c8a8cc86"],
+ ["c497", "65cc87"],
["c498", "45cca8"],
- ["e1b898", "45ccad"],
- ["e1b89a", "45ccb0"],
- ["e1b89e", "46cc87"],
- ["c7b4", "47cc81"],
+ ["c499", "65cca8"],
+ ["c49a", "45cc8c"],
+ ["c49b", "65cc8c"],
["c49c", "47cc82"],
- ["e1b8a0", "47cc84"],
+ ["c49d", "67cc82"],
["c49e", "47cc86"],
+ ["c49f", "67cc86"],
["c4a0", "47cc87"],
- ["c7a6", "47cc8c"],
+ ["c4a1", "67cc87"],
["c4a2", "47cca7"],
+ ["c4a3", "67cca7"],
["c4a4", "48cc82"],
- ["e1b8a2", "48cc87"],
- ["e1b8a6", "48cc88"],
- ["c89e", "48cc8c"],
- ["e1b8a4", "48cca3"],
- ["e1b8a8", "48cca7"],
- ["e1b8aa", "48ccae"],
- ["c38c", "49cc80"],
- ["c38d", "49cc81"],
- ["c38e", "49cc82"],
+ ["c4a5", "68cc82"],
["c4a8", "49cc83"],
+ ["c4a9", "69cc83"],
["c4aa", "49cc84"],
+ ["c4ab", "69cc84"],
["c4ac", "49cc86"],
- ["c4b0", "49cc87"],
- ["c38f", "49cc88"],
- ["e1b8ae", "49cc88cc81"],
- ["e1b8ae", "c38fcc81"],
- ["e1bb88", "49cc89"],
- ["c78f", "49cc8c"],
- ["c888", "49cc8f"],
- ["c88a", "49cc91"],
- ["e1bb8a", "49cca3"],
+ ["c4ad", "69cc86"],
["c4ae", "49cca8"],
- ["e1b8ac", "49ccb0"],
+ ["c4af", "69cca8"],
+ ["c4b0", "49cc87"],
["c4b4", "4acc82"],
- ["e1b8b0", "4bcc81"],
- ["c7a8", "4bcc8c"],
- ["e1b8b2", "4bcca3"],
+ ["c4b5", "6acc82"],
["c4b6", "4bcca7"],
- ["e1b8b4", "4bccb1"],
+ ["c4b7", "6bcca7"],
["c4b9", "4ccc81"],
- ["c4bd", "4ccc8c"],
- ["e1b8b6", "4ccca3"],
- ["e1b8b8", "4ccca3cc84"],
- ["e1b8b8", "e1b8b6cc84"],
+ ["c4ba", "6ccc81"],
["c4bb", "4ccca7"],
- ["e1b8bc", "4cccad"],
- ["e1b8ba", "4cccb1"],
- ["e1b8be", "4dcc81"],
- ["e1b980", "4dcc87"],
- ["e1b982", "4dcca3"],
- ["c7b8", "4ecc80"],
+ ["c4bc", "6ccca7"],
+ ["c4bd", "4ccc8c"],
+ ["c4be", "6ccc8c"],
["c583", "4ecc81"],
- ["c391", "4ecc83"],
- ["e1b984", "4ecc87"],
- ["c587", "4ecc8c"],
- ["e1b986", "4ecca3"],
+ ["c584", "6ecc81"],
["c585", "4ecca7"],
- ["e1b98a", "4eccad"],
- ["e1b988", "4eccb1"],
- ["c392", "4fcc80"],
- ["c393", "4fcc81"],
- ["c394", "4fcc82"],
- ["e1bb92", "4fcc82cc80"],
- ["e1bb92", "c394cc80"],
- ["e1bb90", "4fcc82cc81"],
- ["e1bb90", "c394cc81"],
- ["e1bb96", "4fcc82cc83"],
- ["e1bb96", "c394cc83"],
- ["e1bb94", "4fcc82cc89"],
- ["e1bb94", "c394cc89"],
- ["c395", "4fcc83"],
- ["e1b98c", "4fcc83cc81"],
- ["e1b98c", "c395cc81"],
- ["c8ac", "4fcc83cc84"],
- ["c8ac", "c395cc84"],
- ["e1b98e", "4fcc83cc88"],
- ["e1b98e", "c395cc88"],
+ ["c586", "6ecca7"],
+ ["c587", "4ecc8c"],
+ ["c588", "6ecc8c"],
["c58c", "4fcc84"],
- ["e1b990", "4fcc84cc80"],
- ["e1b990", "c58ccc80"],
- ["e1b992", "4fcc84cc81"],
- ["e1b992", "c58ccc81"],
+ ["c58d", "6fcc84"],
["c58e", "4fcc86"],
- ["c8ae", "4fcc87"],
- ["c8b0", "4fcc87cc84"],
- ["c8b0", "c8aecc84"],
- ["c396", "4fcc88"],
- ["c8aa", "4fcc88cc84"],
- ["c8aa", "c396cc84"],
- ["e1bb8e", "4fcc89"],
+ ["c58f", "6fcc86"],
["c590", "4fcc8b"],
- ["c791", "4fcc8c"],
- ["c88c", "4fcc8f"],
- ["c88e", "4fcc91"],
- ["c6a0", "4fcc9b"],
- ["e1bb9c", "4fcc9bcc80"],
- ["e1bb9c", "c6a0cc80"],
- ["e1bb9a", "4fcc9bcc81"],
- ["e1bb9a", "c6a0cc81"],
- ["e1bba0", "4fcc9bcc83"],
- ["e1bba0", "c6a0cc83"],
- ["e1bb9e", "4fcc9bcc89"],
- ["e1bb9e", "c6a0cc89"],
- ["e1bba2", "4fcc9bcca3"],
- ["e1bba2", "c6a0cca3"],
- ["e1bb8c", "4fcca3"],
- ["e1bb98", "4fcca3cc82"],
- ["e1bb98", "e1bb8ccc82"],
- ["c7aa", "4fcca8"],
- ["c7ac", "4fcca8cc84"],
- ["c7ac", "c7aacc84"],
- ["e1b994", "50cc81"],
- ["e1b996", "50cc87"],
+ ["c591", "6fcc8b"],
["c594", "52cc81"],
- ["e1b998", "52cc87"],
- ["c598", "52cc8c"],
- ["c890", "52cc8f"],
- ["c892", "52cc91"],
- ["e1b99a", "52cca3"],
- ["e1b99c", "52cca3cc84"],
- ["e1b99c", "e1b99acc84"],
+ ["c595", "72cc81"],
["c596", "52cca7"],
- ["e1b99e", "52ccb1"],
+ ["c597", "72cca7"],
+ ["c598", "52cc8c"],
+ ["c599", "72cc8c"],
["c59a", "53cc81"],
- ["e1b9a4", "53cc81cc87"],
- ["e1b9a4", "c59acc87"],
+ ["c59b", "73cc81"],
["c59c", "53cc82"],
- ["e1b9a0", "53cc87"],
- ["c5a0", "53cc8c"],
- ["e1b9a6", "53cc8ccc87"],
- ["e1b9a6", "c5a0cc87"],
- ["e1b9a2", "53cca3"],
- ["e1b9a8", "53cca3cc87"],
- ["e1b9a8", "e1b9a2cc87"],
- ["c898", "53cca6"],
+ ["c59d", "73cc82"],
["c59e", "53cca7"],
- ["e1b9aa", "54cc87"],
- ["c5a4", "54cc8c"],
- ["e1b9ac", "54cca3"],
- ["c89a", "54cca6"],
+ ["c59f", "73cca7"],
+ ["c5a0", "53cc8c"],
+ ["c5a1", "73cc8c"],
["c5a2", "54cca7"],
- ["e1b9b0", "54ccad"],
- ["e1b9ae", "54ccb1"],
- ["c399", "55cc80"],
- ["c39a", "55cc81"],
- ["c39b", "55cc82"],
+ ["c5a3", "74cca7"],
+ ["c5a4", "54cc8c"],
+ ["c5a5", "74cc8c"],
["c5a8", "55cc83"],
- ["e1b9b8", "55cc83cc81"],
- ["e1b9b8", "c5a8cc81"],
+ ["c5a9", "75cc83"],
["c5aa", "55cc84"],
- ["e1b9ba", "55cc84cc88"],
- ["e1b9ba", "c5aacc88"],
+ ["c5ab", "75cc84"],
["c5ac", "55cc86"],
- ["c39c", "55cc88"],
- ["c79b", "55cc88cc80"],
- ["c79b", "c39ccc80"],
- ["c797", "55cc88cc81"],
- ["c797", "c39ccc81"],
- ["c795", "55cc88cc84"],
- ["c795", "c39ccc84"],
- ["c799", "55cc88cc8c"],
- ["c799", "c39ccc8c"],
- ["e1bba6", "55cc89"],
+ ["c5ad", "75cc86"],
["c5ae", "55cc8a"],
+ ["c5af", "75cc8a"],
["c5b0", "55cc8b"],
- ["c793", "55cc8c"],
- ["c894", "55cc8f"],
- ["c896", "55cc91"],
- ["c6af", "55cc9b"],
- ["e1bbaa", "55cc9bcc80"],
- ["e1bbaa", "c6afcc80"],
- ["e1bba8", "55cc9bcc81"],
- ["e1bba8", "c6afcc81"],
- ["e1bbae", "55cc9bcc83"],
- ["e1bbae", "c6afcc83"],
- ["e1bbac", "55cc9bcc89"],
- ["e1bbac", "c6afcc89"],
- ["e1bbb0", "55cc9bcca3"],
- ["e1bbb0", "c6afcca3"],
- ["e1bba4", "55cca3"],
- ["e1b9b2", "55cca4"],
+ ["c5b1", "75cc8b"],
["c5b2", "55cca8"],
- ["e1b9b6", "55ccad"],
- ["e1b9b4", "55ccb0"],
- ["e1b9bc", "56cc83"],
- ["e1b9be", "56cca3"],
- ["e1ba80", "57cc80"],
- ["e1ba82", "57cc81"],
+ ["c5b3", "75cca8"],
["c5b4", "57cc82"],
- ["e1ba86", "57cc87"],
- ["e1ba84", "57cc88"],
- ["e1ba88", "57cca3"],
- ["e1ba8a", "58cc87"],
- ["e1ba8c", "58cc88"],
- ["e1bbb2", "59cc80"],
- ["c39d", "59cc81"],
+ ["c5b5", "77cc82"],
["c5b6", "59cc82"],
- ["e1bbb8", "59cc83"],
- ["c8b2", "59cc84"],
- ["e1ba8e", "59cc87"],
+ ["c5b7", "79cc82"],
["c5b8", "59cc88"],
- ["e1bbb6", "59cc89"],
- ["e1bbb4", "59cca3"],
["c5b9", "5acc81"],
- ["e1ba90", "5acc82"],
+ ["c5ba", "7acc81"],
["c5bb", "5acc87"],
+ ["c5bc", "7acc87"],
["c5bd", "5acc8c"],
- ["e1ba92", "5acca3"],
- ["e1ba94", "5accb1"],
- ["e1bfaf", "60"],
- ["c3a0", "61cc80"],
- ["c3a1", "61cc81"],
- ["c3a2", "61cc82"],
- ["e1baa7", "61cc82cc80"],
- ["e1baa7", "c3a2cc80"],
- ["e1baa5", "61cc82cc81"],
- ["e1baa5", "c3a2cc81"],
- ["e1baab", "61cc82cc83"],
- ["e1baab", "c3a2cc83"],
- ["e1baa9", "61cc82cc89"],
- ["e1baa9", "c3a2cc89"],
- ["c3a3", "61cc83"],
- ["c481", "61cc84"],
- ["c483", "61cc86"],
- ["e1bab1", "61cc86cc80"],
- ["e1bab1", "c483cc80"],
- ["e1baaf", "61cc86cc81"],
- ["e1baaf", "c483cc81"],
- ["e1bab5", "61cc86cc83"],
- ["e1bab5", "c483cc83"],
- ["e1bab3", "61cc86cc89"],
- ["e1bab3", "c483cc89"],
- ["c8a7", "61cc87"],
- ["c7a1", "61cc87cc84"],
- ["c7a1", "c8a7cc84"],
- ["c3a4", "61cc88"],
+ ["c5be", "7acc8c"],
+ ["c6a0", "4fcc9b"],
+ ["c6a1", "6fcc9b"],
+ ["c6af", "55cc9b"],
+ ["c6b0", "75cc9b"],
+ ["c78d", "41cc8c"],
+ ["c78e", "61cc8c"],
+ ["c78f", "49cc8c"],
+ ["c790", "69cc8c"],
+ ["c791", "4fcc8c"],
+ ["c792", "6fcc8c"],
+ ["c793", "55cc8c"],
+ ["c794", "75cc8c"],
+ ["c795", "55cc88cc84"],
+ ["c796", "75cc88cc84"],
+ ["c797", "55cc88cc81"],
+ ["c798", "75cc88cc81"],
+ ["c799", "55cc88cc8c"],
+ ["c79a", "75cc88cc8c"],
+ ["c79b", "55cc88cc80"],
+ ["c79c", "75cc88cc80"],
+ ["c79e", "41cc88cc84"],
["c79f", "61cc88cc84"],
- ["c79f", "c3a4cc84"],
- ["e1baa3", "61cc89"],
- ["c3a5", "61cc8a"],
+ ["c7a0", "41cc87cc84"],
+ ["c7a1", "61cc87cc84"],
+ ["c7a2", "c386cc84"],
+ ["c7a3", "c3a6cc84"],
+ ["c7a6", "47cc8c"],
+ ["c7a7", "67cc8c"],
+ ["c7a8", "4bcc8c"],
+ ["c7a9", "6bcc8c"],
+ ["c7aa", "4fcca8"],
+ ["c7ab", "6fcca8"],
+ ["c7ac", "4fcca8cc84"],
+ ["c7ad", "6fcca8cc84"],
+ ["c7ae", "c6b7cc8c"],
+ ["c7af", "ca92cc8c"],
+ ["c7b0", "6acc8c"],
+ ["c7b4", "47cc81"],
+ ["c7b5", "67cc81"],
+ ["c7ba", "41cc8acc81"],
["c7bb", "61cc8acc81"],
- ["c7bb", "c3a5cc81"],
- ["c78e", "61cc8c"],
+ ["c7bc", "c386cc81"],
+ ["c7bd", "c3a6cc81"],
+ ["c7be", "c398cc81"],
+ ["c7bf", "c3b8cc81"],
+ ["c880", "41cc8f"],
["c881", "61cc8f"],
+ ["c882", "41cc91"],
["c883", "61cc91"],
- ["e1baa1", "61cca3"],
- ["e1baad", "61cca3cc82"],
- ["e1baad", "e1baa1cc82"],
- ["e1bab7", "61cca3cc86"],
- ["e1bab7", "e1baa1cc86"],
+ ["c884", "45cc8f"],
+ ["c885", "65cc8f"],
+ ["c886", "45cc91"],
+ ["c887", "65cc91"],
+ ["c888", "49cc8f"],
+ ["c889", "69cc8f"],
+ ["c88a", "49cc91"],
+ ["c88b", "69cc91"],
+ ["c88c", "4fcc8f"],
+ ["c88d", "6fcc8f"],
+ ["c88e", "4fcc91"],
+ ["c88f", "6fcc91"],
+ ["c890", "52cc8f"],
+ ["c891", "72cc8f"],
+ ["c892", "52cc91"],
+ ["c893", "72cc91"],
+ ["c894", "55cc8f"],
+ ["c895", "75cc8f"],
+ ["c896", "55cc91"],
+ ["c897", "75cc91"],
+ ["cc90", "cc86cc87"],
+ ["cd80", "cc80"],
+ ["cd81", "cc81"],
+ ["cd83", "cc93"],
+ ["cd84", "cc88cc8d"],
+ ["cdb4", "cab9"],
+ ["cdbe", "3b"],
+ ["ce85", "c2a8cc8d"],
+ ["ce86", "ce91cc8d"],
+ ["ce87", "c2b7"],
+ ["ce88", "ce95cc8d"],
+ ["ce89", "ce97cc8d"],
+ ["ce8a", "ce99cc8d"],
+ ["ce8c", "ce9fcc8d"],
+ ["ce8e", "cea5cc8d"],
+ ["ce8f", "cea9cc8d"],
+ ["ce90", "ceb9cc88cc8d"],
+ ["ceaa", "ce99cc88"],
+ ["ceab", "cea5cc88"],
+ ["ceac", "ceb1cc8d"],
+ ["cead", "ceb5cc8d"],
+ ["ceae", "ceb7cc8d"],
+ ["ceaf", "ceb9cc8d"],
+ ["ceb0", "cf85cc88cc8d"],
+ ["cf8a", "ceb9cc88"],
+ ["cf8b", "cf85cc88"],
+ ["cf8c", "cebfcc8d"],
+ ["cf8d", "cf85cc8d"],
+ ["cf8e", "cf89cc8d"],
+ ["cf93", "cf92cc8d"],
+ ["cf94", "cf92cc88"],
+ ["d081", "d095cc88"],
+ ["d083", "d093cc81"],
+ ["d087", "d086cc88"],
+ ["d08c", "d09acc81"],
+ ["d08e", "d0a3cc86"],
+ ["d099", "d098cc86"],
+ ["d0b9", "d0b8cc86"],
+ ["d191", "d0b5cc88"],
+ ["d193", "d0b3cc81"],
+ ["d197", "d196cc88"],
+ ["d19c", "d0bacc81"],
+ ["d19e", "d183cc86"],
+ ["d1b6", "d1b4cc8f"],
+ ["d1b7", "d1b5cc8f"],
+ ["d381", "d096cc86"],
+ ["d382", "d0b6cc86"],
+ ["d390", "d090cc86"],
+ ["d391", "d0b0cc86"],
+ ["d392", "d090cc88"],
+ ["d393", "d0b0cc88"],
+ ["d394", "c386"],
+ ["d395", "c3a6"],
+ ["d396", "d095cc86"],
+ ["d397", "d0b5cc86"],
+ ["d398", "c68f"],
+ ["d399", "c999"],
+ ["d39a", "c68fcc88"],
+ ["d39b", "c999cc88"],
+ ["d39c", "d096cc88"],
+ ["d39d", "d0b6cc88"],
+ ["d39e", "d097cc88"],
+ ["d39f", "d0b7cc88"],
+ ["d3a0", "c6b7"],
+ ["d3a1", "ca92"],
+ ["d3a2", "d098cc84"],
+ ["d3a3", "d0b8cc84"],
+ ["d3a4", "d098cc88"],
+ ["d3a5", "d0b8cc88"],
+ ["d3a6", "d09ecc88"],
+ ["d3a7", "d0becc88"],
+ ["d3a8", "c69f"],
+ ["d3a9", "c9b5"],
+ ["d3aa", "c69fcc88"],
+ ["d3ab", "c9b5cc88"],
+ ["d3ae", "d0a3cc84"],
+ ["d3af", "d183cc84"],
+ ["d3b0", "d0a3cc88"],
+ ["d3b1", "d183cc88"],
+ ["d3b2", "d0a3cc8b"],
+ ["d3b3", "d183cc8b"],
+ ["d3b4", "d0a7cc88"],
+ ["d3b5", "d187cc88"],
+ ["d3b8", "d0abcc88"],
+ ["d3b9", "d18bcc88"],
+ ["e0a4a9", "e0a4a8e0a4bc"],
+ ["e0a4b1", "e0a4b0e0a4bc"],
+ ["e0a4b4", "e0a4b3e0a4bc"],
+ ["e0a598", "e0a495e0a4bc"],
+ ["e0a599", "e0a496e0a4bc"],
+ ["e0a59a", "e0a497e0a4bc"],
+ ["e0a59b", "e0a49ce0a4bc"],
+ ["e0a59c", "e0a4a1e0a4bc"],
+ ["e0a59d", "e0a4a2e0a4bc"],
+ ["e0a59e", "e0a4abe0a4bc"],
+ ["e0a59f", "e0a4afe0a4bc"],
+ ["e0a6b0", "e0a6ace0a6bc"],
+ ["e0a78b", "e0a787e0a6be"],
+ ["e0a78c", "e0a787e0a797"],
+ ["e0a79c", "e0a6a1e0a6bc"],
+ ["e0a79d", "e0a6a2e0a6bc"],
+ ["e0a79f", "e0a6afe0a6bc"],
+ ["e0a999", "e0a896e0a8bc"],
+ ["e0a99a", "e0a897e0a8bc"],
+ ["e0a99b", "e0a89ce0a8bc"],
+ ["e0a99c", "e0a8a1e0a8bc"],
+ ["e0a99e", "e0a8abe0a8bc"],
+ ["e0ad88", "e0ad87e0ad96"],
+ ["e0ad8b", "e0ad87e0acbe"],
+ ["e0ad8c", "e0ad87e0ad97"],
+ ["e0ad9c", "e0aca1e0acbc"],
+ ["e0ad9d", "e0aca2e0acbc"],
+ ["e0ad9f", "e0acafe0acbc"],
+ ["e0ae94", "e0ae92e0af97"],
+ ["e0af8a", "e0af86e0aebe"],
+ ["e0af8b", "e0af87e0aebe"],
+ ["e0af8c", "e0af86e0af97"],
+ ["e0b188", "e0b186e0b196"],
+ ["e0b380", "e0b2bfe0b395"],
+ ["e0b387", "e0b386e0b395"],
+ ["e0b388", "e0b386e0b396"],
+ ["e0b38a", "e0b386e0b382"],
+ ["e0b38b", "e0b386e0b382e0b395"],
+ ["e0b58a", "e0b586e0b4be"],
+ ["e0b58b", "e0b587e0b4be"],
+ ["e0b58c", "e0b586e0b597"],
+ ["e0b8b3", "e0b98de0b8b2"],
+ ["e0bab3", "e0bb8de0bab2"],
+ ["e0bd83", "e0bd82e0beb7"],
+ ["e0bd8d", "e0bd8ce0beb7"],
+ ["e0bd92", "e0bd91e0beb7"],
+ ["e0bd97", "e0bd96e0beb7"],
+ ["e0bd9c", "e0bd9be0beb7"],
+ ["e0bda9", "e0bd80e0beb5"],
+ ["e0bdb3", "e0bdb2e0bdb1"],
+ ["e0bdb5", "e0bdb4e0bdb1"],
+ ["e0bdb6", "e0beb2e0be80"],
+ ["e0bdb7", "e0beb2e0be80e0bdb1"],
+ ["e0bdb8", "e0beb3e0be80"],
+ ["e0bdb9", "e0beb3e0be80e0bdb1"],
+ ["e0be81", "e0be80e0bdb1"],
+ ["e0be93", "e0be92e0beb7"],
+ ["e0be9d", "e0be9ce0beb7"],
+ ["e0bea2", "e0bea1e0beb7"],
+ ["e0bea7", "e0bea6e0beb7"],
+ ["e0beac", "e0beabe0beb7"],
+ ["e0beb9", "e0be90e0beb5"],
+ ["e1b880", "41cca5"],
["e1b881", "61cca5"],
- ["c485", "61cca8"],
+ ["e1b882", "42cc87"],
["e1b883", "62cc87"],
+ ["e1b884", "42cca3"],
["e1b885", "62cca3"],
+ ["e1b886", "42ccb1"],
["e1b887", "62ccb1"],
- ["c487", "63cc81"],
- ["c489", "63cc82"],
- ["c48b", "63cc87"],
- ["c48d", "63cc8c"],
- ["c3a7", "63cca7"],
+ ["e1b888", "43cca7cc81"],
["e1b889", "63cca7cc81"],
- ["e1b889", "c3a7cc81"],
+ ["e1b88a", "44cc87"],
["e1b88b", "64cc87"],
- ["c48f", "64cc8c"],
+ ["e1b88c", "44cca3"],
["e1b88d", "64cca3"],
+ ["e1b88e", "44ccb1"],
+ ["e1b88f", "64ccb1"],
+ ["e1b890", "44cca7"],
["e1b891", "64cca7"],
+ ["e1b892", "44ccad"],
["e1b893", "64ccad"],
- ["e1b88f", "64ccb1"],
- ["c3a8", "65cc80"],
- ["c3a9", "65cc81"],
- ["c3aa", "65cc82"],
- ["e1bb81", "65cc82cc80"],
- ["e1bb81", "c3aacc80"],
- ["e1babf", "65cc82cc81"],
- ["e1babf", "c3aacc81"],
- ["e1bb85", "65cc82cc83"],
- ["e1bb85", "c3aacc83"],
- ["e1bb83", "65cc82cc89"],
- ["e1bb83", "c3aacc89"],
- ["e1babd", "65cc83"],
- ["c493", "65cc84"],
+ ["e1b894", "45cc84cc80"],
["e1b895", "65cc84cc80"],
- ["e1b895", "c493cc80"],
+ ["e1b896", "45cc84cc81"],
["e1b897", "65cc84cc81"],
- ["e1b897", "c493cc81"],
- ["c495", "65cc86"],
- ["c497", "65cc87"],
- ["c3ab", "65cc88"],
- ["e1babb", "65cc89"],
- ["c49b", "65cc8c"],
- ["c885", "65cc8f"],
- ["c887", "65cc91"],
- ["e1bab9", "65cca3"],
- ["e1bb87", "65cca3cc82"],
- ["e1bb87", "e1bab9cc82"],
- ["c8a9", "65cca7"],
- ["e1b89d", "65cca7cc86"],
- ["e1b89d", "c8a9cc86"],
- ["c499", "65cca8"],
+ ["e1b898", "45ccad"],
["e1b899", "65ccad"],
+ ["e1b89a", "45ccb0"],
["e1b89b", "65ccb0"],
+ ["e1b89c", "45cca7cc86"],
+ ["e1b89d", "65cca7cc86"],
+ ["e1b89e", "46cc87"],
["e1b89f", "66cc87"],
- ["c7b5", "67cc81"],
- ["c49d", "67cc82"],
+ ["e1b8a0", "47cc84"],
["e1b8a1", "67cc84"],
- ["c49f", "67cc86"],
- ["c4a1", "67cc87"],
- ["c7a7", "67cc8c"],
- ["c4a3", "67cca7"],
- ["c4a5", "68cc82"],
+ ["e1b8a2", "48cc87"],
["e1b8a3", "68cc87"],
- ["e1b8a7", "68cc88"],
- ["c89f", "68cc8c"],
+ ["e1b8a4", "48cca3"],
["e1b8a5", "68cca3"],
+ ["e1b8a6", "48cc88"],
+ ["e1b8a7", "68cc88"],
+ ["e1b8a8", "48cca7"],
["e1b8a9", "68cca7"],
+ ["e1b8aa", "48ccae"],
["e1b8ab", "68ccae"],
- ["e1ba96", "68ccb1"],
- ["c3ac", "69cc80"],
- ["c3ad", "69cc81"],
- ["c3ae", "69cc82"],
- ["c4a9", "69cc83"],
- ["c4ab", "69cc84"],
- ["c4ad", "69cc86"],
- ["c3af", "69cc88"],
- ["e1b8af", "69cc88cc81"],
- ["e1b8af", "c3afcc81"],
- ["e1bb89", "69cc89"],
- ["c790", "69cc8c"],
- ["c889", "69cc8f"],
- ["c88b", "69cc91"],
- ["e1bb8b", "69cca3"],
- ["c4af", "69cca8"],
+ ["e1b8ac", "49ccb0"],
["e1b8ad", "69ccb0"],
- ["c4b5", "6acc82"],
- ["c7b0", "6acc8c"],
+ ["e1b8ae", "49cc88cc81"],
+ ["e1b8af", "69cc88cc81"],
+ ["e1b8b0", "4bcc81"],
["e1b8b1", "6bcc81"],
- ["c7a9", "6bcc8c"],
+ ["e1b8b2", "4bcca3"],
["e1b8b3", "6bcca3"],
- ["c4b7", "6bcca7"],
+ ["e1b8b4", "4bccb1"],
["e1b8b5", "6bccb1"],
- ["c4ba", "6ccc81"],
- ["c4be", "6ccc8c"],
+ ["e1b8b6", "4ccca3"],
["e1b8b7", "6ccca3"],
+ ["e1b8b8", "4ccca3cc84"],
["e1b8b9", "6ccca3cc84"],
- ["e1b8b9", "e1b8b7cc84"],
- ["c4bc", "6ccca7"],
- ["e1b8bd", "6cccad"],
+ ["e1b8ba", "4cccb1"],
["e1b8bb", "6cccb1"],
+ ["e1b8bc", "4cccad"],
+ ["e1b8bd", "6cccad"],
+ ["e1b8be", "4dcc81"],
["e1b8bf", "6dcc81"],
+ ["e1b980", "4dcc87"],
["e1b981", "6dcc87"],
+ ["e1b982", "4dcca3"],
["e1b983", "6dcca3"],
- ["c7b9", "6ecc80"],
- ["c584", "6ecc81"],
- ["c3b1", "6ecc83"],
+ ["e1b984", "4ecc87"],
["e1b985", "6ecc87"],
- ["c588", "6ecc8c"],
+ ["e1b986", "4ecca3"],
["e1b987", "6ecca3"],
- ["c586", "6ecca7"],
- ["e1b98b", "6eccad"],
+ ["e1b988", "4eccb1"],
["e1b989", "6eccb1"],
- ["c3b2", "6fcc80"],
- ["c3b3", "6fcc81"],
- ["c3b4", "6fcc82"],
- ["e1bb93", "6fcc82cc80"],
- ["e1bb93", "c3b4cc80"],
- ["e1bb91", "6fcc82cc81"],
- ["e1bb91", "c3b4cc81"],
- ["e1bb97", "6fcc82cc83"],
- ["e1bb97", "c3b4cc83"],
- ["e1bb95", "6fcc82cc89"],
- ["e1bb95", "c3b4cc89"],
- ["c3b5", "6fcc83"],
+ ["e1b98a", "4eccad"],
+ ["e1b98b", "6eccad"],
+ ["e1b98c", "4fcc83cc81"],
["e1b98d", "6fcc83cc81"],
- ["e1b98d", "c3b5cc81"],
- ["c8ad", "6fcc83cc84"],
- ["c8ad", "c3b5cc84"],
+ ["e1b98e", "4fcc83cc88"],
["e1b98f", "6fcc83cc88"],
- ["e1b98f", "c3b5cc88"],
- ["c58d", "6fcc84"],
+ ["e1b990", "4fcc84cc80"],
["e1b991", "6fcc84cc80"],
- ["e1b991", "c58dcc80"],
+ ["e1b992", "4fcc84cc81"],
["e1b993", "6fcc84cc81"],
- ["e1b993", "c58dcc81"],
- ["c58f", "6fcc86"],
- ["c8af", "6fcc87"],
- ["c8b1", "6fcc87cc84"],
- ["c8b1", "c8afcc84"],
- ["c3b6", "6fcc88"],
- ["c8ab", "6fcc88cc84"],
- ["c8ab", "c3b6cc84"],
- ["e1bb8f", "6fcc89"],
- ["c591", "6fcc8b"],
- ["c792", "6fcc8c"],
- ["c88d", "6fcc8f"],
- ["c88f", "6fcc91"],
- ["c6a1", "6fcc9b"],
- ["e1bb9d", "6fcc9bcc80"],
- ["e1bb9d", "c6a1cc80"],
- ["e1bb9b", "6fcc9bcc81"],
- ["e1bb9b", "c6a1cc81"],
- ["e1bba1", "6fcc9bcc83"],
- ["e1bba1", "c6a1cc83"],
- ["e1bb9f", "6fcc9bcc89"],
- ["e1bb9f", "c6a1cc89"],
- ["e1bba3", "6fcc9bcca3"],
- ["e1bba3", "c6a1cca3"],
- ["e1bb8d", "6fcca3"],
- ["e1bb99", "6fcca3cc82"],
- ["e1bb99", "e1bb8dcc82"],
- ["c7ab", "6fcca8"],
- ["c7ad", "6fcca8cc84"],
- ["c7ad", "c7abcc84"],
+ ["e1b994", "50cc81"],
["e1b995", "70cc81"],
+ ["e1b996", "50cc87"],
["e1b997", "70cc87"],
- ["c595", "72cc81"],
+ ["e1b998", "52cc87"],
["e1b999", "72cc87"],
- ["c599", "72cc8c"],
- ["c891", "72cc8f"],
- ["c893", "72cc91"],
+ ["e1b99a", "52cca3"],
["e1b99b", "72cca3"],
+ ["e1b99c", "52cca3cc84"],
["e1b99d", "72cca3cc84"],
- ["e1b99d", "e1b99bcc84"],
- ["c597", "72cca7"],
+ ["e1b99e", "52ccb1"],
["e1b99f", "72ccb1"],
- ["c59b", "73cc81"],
- ["e1b9a5", "73cc81cc87"],
- ["e1b9a5", "c59bcc87"],
- ["c59d", "73cc82"],
+ ["e1b9a0", "53cc87"],
["e1b9a1", "73cc87"],
- ["c5a1", "73cc8c"],
- ["e1b9a7", "73cc8ccc87"],
- ["e1b9a7", "c5a1cc87"],
+ ["e1b9a2", "53cca3"],
["e1b9a3", "73cca3"],
+ ["e1b9a4", "53cc81cc87"],
+ ["e1b9a5", "73cc81cc87"],
+ ["e1b9a6", "53cc8ccc87"],
+ ["e1b9a7", "73cc8ccc87"],
+ ["e1b9a8", "53cca3cc87"],
["e1b9a9", "73cca3cc87"],
- ["e1b9a9", "e1b9a3cc87"],
- ["c899", "73cca6"],
- ["c59f", "73cca7"],
+ ["e1b9aa", "54cc87"],
["e1b9ab", "74cc87"],
- ["e1ba97", "74cc88"],
- ["c5a5", "74cc8c"],
+ ["e1b9ac", "54cca3"],
["e1b9ad", "74cca3"],
- ["c89b", "74cca6"],
- ["c5a3", "74cca7"],
- ["e1b9b1", "74ccad"],
+ ["e1b9ae", "54ccb1"],
["e1b9af", "74ccb1"],
- ["c3b9", "75cc80"],
- ["c3ba", "75cc81"],
- ["c3bb", "75cc82"],
- ["c5a9", "75cc83"],
- ["e1b9b9", "75cc83cc81"],
- ["e1b9b9", "c5a9cc81"],
- ["c5ab", "75cc84"],
- ["e1b9bb", "75cc84cc88"],
- ["e1b9bb", "c5abcc88"],
- ["c5ad", "75cc86"],
- ["c3bc", "75cc88"],
- ["c79c", "75cc88cc80"],
- ["c79c", "c3bccc80"],
- ["c798", "75cc88cc81"],
- ["c798", "c3bccc81"],
- ["c796", "75cc88cc84"],
- ["c796", "c3bccc84"],
- ["c79a", "75cc88cc8c"],
- ["c79a", "c3bccc8c"],
- ["e1bba7", "75cc89"],
- ["c5af", "75cc8a"],
- ["c5b1", "75cc8b"],
- ["c794", "75cc8c"],
- ["c895", "75cc8f"],
- ["c897", "75cc91"],
- ["c6b0", "75cc9b"],
- ["e1bbab", "75cc9bcc80"],
- ["e1bbab", "c6b0cc80"],
- ["e1bba9", "75cc9bcc81"],
- ["e1bba9", "c6b0cc81"],
- ["e1bbaf", "75cc9bcc83"],
- ["e1bbaf", "c6b0cc83"],
- ["e1bbad", "75cc9bcc89"],
- ["e1bbad", "c6b0cc89"],
- ["e1bbb1", "75cc9bcca3"],
- ["e1bbb1", "c6b0cca3"],
- ["e1bba5", "75cca3"],
+ ["e1b9b0", "54ccad"],
+ ["e1b9b1", "74ccad"],
+ ["e1b9b2", "55cca4"],
["e1b9b3", "75cca4"],
- ["c5b3", "75cca8"],
- ["e1b9b7", "75ccad"],
+ ["e1b9b4", "55ccb0"],
["e1b9b5", "75ccb0"],
+ ["e1b9b6", "55ccad"],
+ ["e1b9b7", "75ccad"],
+ ["e1b9b8", "55cc83cc81"],
+ ["e1b9b9", "75cc83cc81"],
+ ["e1b9ba", "55cc84cc88"],
+ ["e1b9bb", "75cc84cc88"],
+ ["e1b9bc", "56cc83"],
["e1b9bd", "76cc83"],
+ ["e1b9be", "56cca3"],
["e1b9bf", "76cca3"],
+ ["e1ba80", "57cc80"],
["e1ba81", "77cc80"],
+ ["e1ba82", "57cc81"],
["e1ba83", "77cc81"],
- ["c5b5", "77cc82"],
- ["e1ba87", "77cc87"],
+ ["e1ba84", "57cc88"],
["e1ba85", "77cc88"],
- ["e1ba98", "77cc8a"],
+ ["e1ba86", "57cc87"],
+ ["e1ba87", "77cc87"],
+ ["e1ba88", "57cca3"],
["e1ba89", "77cca3"],
+ ["e1ba8a", "58cc87"],
["e1ba8b", "78cc87"],
+ ["e1ba8c", "58cc88"],
["e1ba8d", "78cc88"],
- ["e1bbb3", "79cc80"],
- ["c3bd", "79cc81"],
- ["c5b7", "79cc82"],
- ["e1bbb9", "79cc83"],
- ["c8b3", "79cc84"],
+ ["e1ba8e", "59cc87"],
["e1ba8f", "79cc87"],
- ["c3bf", "79cc88"],
- ["e1bbb7", "79cc89"],
- ["e1ba99", "79cc8a"],
- ["e1bbb5", "79cca3"],
- ["c5ba", "7acc81"],
+ ["e1ba90", "5acc82"],
["e1ba91", "7acc82"],
- ["c5bc", "7acc87"],
- ["c5be", "7acc8c"],
+ ["e1ba92", "5acca3"],
["e1ba93", "7acca3"],
+ ["e1ba94", "5accb1"],
["e1ba95", "7accb1"],
- ["e1bfad", "c2a8cc80"],
- ["ce85", "c2a8cc81"],
- ["e1bf81", "c2a8cd82"],
- ["e1bfbd", "c2b4"],
- ["ce87", "c2b7"],
- ["c7bc", "c386cc81"],
- ["c7a2", "c386cc84"],
- ["c7be", "c398cc81"],
- ["c7bd", "c3a6cc81"],
- ["c7a3", "c3a6cc84"],
- ["c7bf", "c3b8cc81"],
+ ["e1ba96", "68ccb1"],
+ ["e1ba97", "74cc88"],
+ ["e1ba98", "77cc8a"],
+ ["e1ba99", "79cc8a"],
["e1ba9b", "c5bfcc87"],
- ["c7ae", "c6b7cc8c"],
- ["c7af", "ca92cc8c"],
- ["cdb4", "cab9"],
- ["cd80", "cc80"],
- ["cd81", "cc81"],
- ["cd84", "cc88cc81"],
- ["cd83", "cc93"],
- ["e1beba", "ce91cc80"],
- ["ce86", "ce91cc81"],
- ["e1beb9", "ce91cc84"],
- ["e1beb8", "ce91cc86"],
+ ["e1baa0", "41cca3"],
+ ["e1baa1", "61cca3"],
+ ["e1baa2", "41cc89"],
+ ["e1baa3", "61cc89"],
+ ["e1baa4", "41cc82cc81"],
+ ["e1baa5", "61cc82cc81"],
+ ["e1baa6", "41cc82cc80"],
+ ["e1baa7", "61cc82cc80"],
+ ["e1baa8", "41cc82cc89"],
+ ["e1baa9", "61cc82cc89"],
+ ["e1baaa", "41cc82cc83"],
+ ["e1baab", "61cc82cc83"],
+ ["e1baac", "41cca3cc82"],
+ ["e1baad", "61cca3cc82"],
+ ["e1baae", "41cc86cc81"],
+ ["e1baaf", "61cc86cc81"],
+ ["e1bab0", "41cc86cc80"],
+ ["e1bab1", "61cc86cc80"],
+ ["e1bab2", "41cc86cc89"],
+ ["e1bab3", "61cc86cc89"],
+ ["e1bab4", "41cc86cc83"],
+ ["e1bab5", "61cc86cc83"],
+ ["e1bab6", "41cca3cc86"],
+ ["e1bab7", "61cca3cc86"],
+ ["e1bab8", "45cca3"],
+ ["e1bab9", "65cca3"],
+ ["e1baba", "45cc89"],
+ ["e1babb", "65cc89"],
+ ["e1babc", "45cc83"],
+ ["e1babd", "65cc83"],
+ ["e1babe", "45cc82cc81"],
+ ["e1babf", "65cc82cc81"],
+ ["e1bb80", "45cc82cc80"],
+ ["e1bb81", "65cc82cc80"],
+ ["e1bb82", "45cc82cc89"],
+ ["e1bb83", "65cc82cc89"],
+ ["e1bb84", "45cc82cc83"],
+ ["e1bb85", "65cc82cc83"],
+ ["e1bb86", "45cca3cc82"],
+ ["e1bb87", "65cca3cc82"],
+ ["e1bb88", "49cc89"],
+ ["e1bb89", "69cc89"],
+ ["e1bb8a", "49cca3"],
+ ["e1bb8b", "69cca3"],
+ ["e1bb8c", "4fcca3"],
+ ["e1bb8d", "6fcca3"],
+ ["e1bb8e", "4fcc89"],
+ ["e1bb8f", "6fcc89"],
+ ["e1bb90", "4fcc82cc81"],
+ ["e1bb91", "6fcc82cc81"],
+ ["e1bb92", "4fcc82cc80"],
+ ["e1bb93", "6fcc82cc80"],
+ ["e1bb94", "4fcc82cc89"],
+ ["e1bb95", "6fcc82cc89"],
+ ["e1bb96", "4fcc82cc83"],
+ ["e1bb97", "6fcc82cc83"],
+ ["e1bb98", "4fcca3cc82"],
+ ["e1bb99", "6fcca3cc82"],
+ ["e1bb9a", "4fcc9bcc81"],
+ ["e1bb9b", "6fcc9bcc81"],
+ ["e1bb9c", "4fcc9bcc80"],
+ ["e1bb9d", "6fcc9bcc80"],
+ ["e1bb9e", "4fcc9bcc89"],
+ ["e1bb9f", "6fcc9bcc89"],
+ ["e1bba0", "4fcc9bcc83"],
+ ["e1bba1", "6fcc9bcc83"],
+ ["e1bba2", "4fcc9bcca3"],
+ ["e1bba3", "6fcc9bcca3"],
+ ["e1bba4", "55cca3"],
+ ["e1bba5", "75cca3"],
+ ["e1bba6", "55cc89"],
+ ["e1bba7", "75cc89"],
+ ["e1bba8", "55cc9bcc81"],
+ ["e1bba9", "75cc9bcc81"],
+ ["e1bbaa", "55cc9bcc80"],
+ ["e1bbab", "75cc9bcc80"],
+ ["e1bbac", "55cc9bcc89"],
+ ["e1bbad", "75cc9bcc89"],
+ ["e1bbae", "55cc9bcc83"],
+ ["e1bbaf", "75cc9bcc83"],
+ ["e1bbb0", "55cc9bcca3"],
+ ["e1bbb1", "75cc9bcca3"],
+ ["e1bbb2", "59cc80"],
+ ["e1bbb3", "79cc80"],
+ ["e1bbb4", "59cca3"],
+ ["e1bbb5", "79cca3"],
+ ["e1bbb6", "59cc89"],
+ ["e1bbb7", "79cc89"],
+ ["e1bbb8", "59cc83"],
+ ["e1bbb9", "79cc83"],
+ ["e1bc80", "ceb1cc93"],
+ ["e1bc81", "ceb1cc94"],
+ ["e1bc82", "ceb1cc93cc80"],
+ ["e1bc83", "ceb1cc94cc80"],
+ ["e1bc84", "ceb1cc93cc81"],
+ ["e1bc85", "ceb1cc94cc81"],
+ ["e1bc86", "ceb1cc93cd82"],
+ ["e1bc87", "ceb1cc94cd82"],
["e1bc88", "ce91cc93"],
- ["e1bc8a", "ce91cc93cc80"],
- ["e1bc8a", "e1bc88cc80"],
- ["e1be8a", "ce91cc93cc80cd85"],
- ["e1be8a", "e1bc8acd85"],
- ["e1bc8c", "ce91cc93cc81"],
- ["e1bc8c", "e1bc88cc81"],
- ["e1be8c", "ce91cc93cc81cd85"],
- ["e1be8c", "e1bc8ccd85"],
- ["e1bc8e", "ce91cc93cd82"],
- ["e1bc8e", "e1bc88cd82"],
- ["e1be8e", "ce91cc93cd82cd85"],
- ["e1be8e", "e1bc8ecd85"],
- ["e1be88", "ce91cc93cd85"],
- ["e1be88", "e1bc88cd85"],
["e1bc89", "ce91cc94"],
+ ["e1bc8a", "ce91cc93cc80"],
["e1bc8b", "ce91cc94cc80"],
- ["e1bc8b", "e1bc89cc80"],
- ["e1be8b", "ce91cc94cc80cd85"],
- ["e1be8b", "e1bc8bcd85"],
+ ["e1bc8c", "ce91cc93cc81"],
["e1bc8d", "ce91cc94cc81"],
- ["e1bc8d", "e1bc89cc81"],
- ["e1be8d", "ce91cc94cc81cd85"],
- ["e1be8d", "e1bc8dcd85"],
+ ["e1bc8e", "ce91cc93cd82"],
["e1bc8f", "ce91cc94cd82"],
- ["e1bc8f", "e1bc89cd82"],
- ["e1be8f", "ce91cc94cd82cd85"],
- ["e1be8f", "e1bc8fcd85"],
- ["e1be89", "ce91cc94cd85"],
- ["e1be89", "e1bc89cd85"],
- ["e1bebc", "ce91cd85"],
- ["e1bf88", "ce95cc80"],
- ["ce88", "ce95cc81"],
+ ["e1bc90", "ceb5cc93"],
+ ["e1bc91", "ceb5cc94"],
+ ["e1bc92", "ceb5cc93cc80"],
+ ["e1bc93", "ceb5cc94cc80"],
+ ["e1bc94", "ceb5cc93cc81"],
+ ["e1bc95", "ceb5cc94cc81"],
["e1bc98", "ce95cc93"],
- ["e1bc9a", "ce95cc93cc80"],
- ["e1bc9a", "e1bc98cc80"],
- ["e1bc9c", "ce95cc93cc81"],
- ["e1bc9c", "e1bc98cc81"],
["e1bc99", "ce95cc94"],
+ ["e1bc9a", "ce95cc93cc80"],
["e1bc9b", "ce95cc94cc80"],
- ["e1bc9b", "e1bc99cc80"],
+ ["e1bc9c", "ce95cc93cc81"],
["e1bc9d", "ce95cc94cc81"],
- ["e1bc9d", "e1bc99cc81"],
- ["e1bf8a", "ce97cc80"],
- ["ce89", "ce97cc81"],
+ ["e1bca0", "ceb7cc93"],
+ ["e1bca1", "ceb7cc94"],
+ ["e1bca2", "ceb7cc93cc80"],
+ ["e1bca3", "ceb7cc94cc80"],
+ ["e1bca4", "ceb7cc93cc81"],
+ ["e1bca5", "ceb7cc94cc81"],
+ ["e1bca6", "ceb7cc93cd82"],
+ ["e1bca7", "ceb7cc94cd82"],
["e1bca8", "ce97cc93"],
- ["e1bcaa", "ce97cc93cc80"],
- ["e1bcaa", "e1bca8cc80"],
- ["e1be9a", "ce97cc93cc80cd85"],
- ["e1be9a", "e1bcaacd85"],
- ["e1bcac", "ce97cc93cc81"],
- ["e1bcac", "e1bca8cc81"],
- ["e1be9c", "ce97cc93cc81cd85"],
- ["e1be9c", "e1bcaccd85"],
- ["e1bcae", "ce97cc93cd82"],
- ["e1bcae", "e1bca8cd82"],
- ["e1be9e", "ce97cc93cd82cd85"],
- ["e1be9e", "e1bcaecd85"],
- ["e1be98", "ce97cc93cd85"],
- ["e1be98", "e1bca8cd85"],
["e1bca9", "ce97cc94"],
+ ["e1bcaa", "ce97cc93cc80"],
["e1bcab", "ce97cc94cc80"],
- ["e1bcab", "e1bca9cc80"],
- ["e1be9b", "ce97cc94cc80cd85"],
- ["e1be9b", "e1bcabcd85"],
+ ["e1bcac", "ce97cc93cc81"],
["e1bcad", "ce97cc94cc81"],
- ["e1bcad", "e1bca9cc81"],
- ["e1be9d", "ce97cc94cc81cd85"],
- ["e1be9d", "e1bcadcd85"],
+ ["e1bcae", "ce97cc93cd82"],
["e1bcaf", "ce97cc94cd82"],
- ["e1bcaf", "e1bca9cd82"],
- ["e1be9f", "ce97cc94cd82cd85"],
- ["e1be9f", "e1bcafcd85"],
- ["e1be99", "ce97cc94cd85"],
- ["e1be99", "e1bca9cd85"],
- ["e1bf8c", "ce97cd85"],
- ["e1bf9a", "ce99cc80"],
- ["ce8a", "ce99cc81"],
- ["e1bf99", "ce99cc84"],
- ["e1bf98", "ce99cc86"],
- ["ceaa", "ce99cc88"],
+ ["e1bcb0", "ceb9cc93"],
+ ["e1bcb1", "ceb9cc94"],
+ ["e1bcb2", "ceb9cc93cc80"],
+ ["e1bcb3", "ceb9cc94cc80"],
+ ["e1bcb4", "ceb9cc93cc81"],
+ ["e1bcb5", "ceb9cc94cc81"],
+ ["e1bcb6", "ceb9cc93cd82"],
+ ["e1bcb7", "ceb9cc94cd82"],
["e1bcb8", "ce99cc93"],
- ["e1bcba", "ce99cc93cc80"],
- ["e1bcba", "e1bcb8cc80"],
- ["e1bcbc", "ce99cc93cc81"],
- ["e1bcbc", "e1bcb8cc81"],
- ["e1bcbe", "ce99cc93cd82"],
- ["e1bcbe", "e1bcb8cd82"],
["e1bcb9", "ce99cc94"],
+ ["e1bcba", "ce99cc93cc80"],
["e1bcbb", "ce99cc94cc80"],
- ["e1bcbb", "e1bcb9cc80"],
+ ["e1bcbc", "ce99cc93cc81"],
["e1bcbd", "ce99cc94cc81"],
- ["e1bcbd", "e1bcb9cc81"],
+ ["e1bcbe", "ce99cc93cd82"],
["e1bcbf", "ce99cc94cd82"],
- ["e1bcbf", "e1bcb9cd82"],
- ["e1bfb8", "ce9fcc80"],
- ["ce8c", "ce9fcc81"],
+ ["e1bd80", "cebfcc93"],
+ ["e1bd81", "cebfcc94"],
+ ["e1bd82", "cebfcc93cc80"],
+ ["e1bd83", "cebfcc94cc80"],
+ ["e1bd84", "cebfcc93cc81"],
+ ["e1bd85", "cebfcc94cc81"],
["e1bd88", "ce9fcc93"],
- ["e1bd8a", "ce9fcc93cc80"],
- ["e1bd8a", "e1bd88cc80"],
- ["e1bd8c", "ce9fcc93cc81"],
- ["e1bd8c", "e1bd88cc81"],
["e1bd89", "ce9fcc94"],
+ ["e1bd8a", "ce9fcc93cc80"],
["e1bd8b", "ce9fcc94cc80"],
- ["e1bd8b", "e1bd89cc80"],
+ ["e1bd8c", "ce9fcc93cc81"],
["e1bd8d", "ce9fcc94cc81"],
- ["e1bd8d", "e1bd89cc81"],
- ["e1bfac", "cea1cc94"],
- ["e1bfaa", "cea5cc80"],
- ["ce8e", "cea5cc81"],
- ["e1bfa9", "cea5cc84"],
- ["e1bfa8", "cea5cc86"],
- ["ceab", "cea5cc88"],
+ ["e1bd90", "cf85cc93"],
+ ["e1bd91", "cf85cc94"],
+ ["e1bd92", "cf85cc93cc80"],
+ ["e1bd93", "cf85cc94cc80"],
+ ["e1bd94", "cf85cc93cc81"],
+ ["e1bd95", "cf85cc94cc81"],
+ ["e1bd96", "cf85cc93cd82"],
+ ["e1bd97", "cf85cc94cd82"],
["e1bd99", "cea5cc94"],
["e1bd9b", "cea5cc94cc80"],
- ["e1bd9b", "e1bd99cc80"],
["e1bd9d", "cea5cc94cc81"],
- ["e1bd9d", "e1bd99cc81"],
["e1bd9f", "cea5cc94cd82"],
- ["e1bd9f", "e1bd99cd82"],
- ["e1bfba", "cea9cc80"],
- ["ce8f", "cea9cc81"],
+ ["e1bda0", "cf89cc93"],
+ ["e1bda1", "cf89cc94"],
+ ["e1bda2", "cf89cc93cc80"],
+ ["e1bda3", "cf89cc94cc80"],
+ ["e1bda4", "cf89cc93cc81"],
+ ["e1bda5", "cf89cc94cc81"],
+ ["e1bda6", "cf89cc93cd82"],
+ ["e1bda7", "cf89cc94cd82"],
["e1bda8", "cea9cc93"],
- ["e1bdaa", "cea9cc93cc80"],
- ["e1bdaa", "e1bda8cc80"],
- ["e1beaa", "cea9cc93cc80cd85"],
- ["e1beaa", "e1bdaacd85"],
- ["e1bdac", "cea9cc93cc81"],
- ["e1bdac", "e1bda8cc81"],
- ["e1beac", "cea9cc93cc81cd85"],
- ["e1beac", "e1bdaccd85"],
- ["e1bdae", "cea9cc93cd82"],
- ["e1bdae", "e1bda8cd82"],
- ["e1beae", "cea9cc93cd82cd85"],
- ["e1beae", "e1bdaecd85"],
- ["e1bea8", "cea9cc93cd85"],
- ["e1bea8", "e1bda8cd85"],
["e1bda9", "cea9cc94"],
+ ["e1bdaa", "cea9cc93cc80"],
["e1bdab", "cea9cc94cc80"],
- ["e1bdab", "e1bda9cc80"],
- ["e1beab", "cea9cc94cc80cd85"],
- ["e1beab", "e1bdabcd85"],
+ ["e1bdac", "cea9cc93cc81"],
["e1bdad", "cea9cc94cc81"],
- ["e1bdad", "e1bda9cc81"],
- ["e1bead", "cea9cc94cc81cd85"],
- ["e1bead", "e1bdadcd85"],
+ ["e1bdae", "cea9cc93cd82"],
["e1bdaf", "cea9cc94cd82"],
- ["e1bdaf", "e1bda9cd82"],
- ["e1beaf", "cea9cc94cd82cd85"],
- ["e1beaf", "e1bdafcd85"],
- ["e1bea9", "cea9cc94cd85"],
- ["e1bea9", "e1bda9cd85"],
- ["e1bfbc", "cea9cd85"],
["e1bdb0", "ceb1cc80"],
- ["e1beb2", "ceb1cc80cd85"],
- ["e1beb2", "e1bdb0cd85"],
- ["ceac", "ceb1cc81"],
- ["e1beb4", "ceb1cc81cd85"],
- ["e1beb4", "ceaccd85"],
- ["e1beb1", "ceb1cc84"],
- ["e1beb0", "ceb1cc86"],
- ["e1bc80", "ceb1cc93"],
- ["e1bc82", "ceb1cc93cc80"],
- ["e1bc82", "e1bc80cc80"],
- ["e1be82", "ceb1cc93cc80cd85"],
- ["e1be82", "e1bc82cd85"],
- ["e1bc84", "ceb1cc93cc81"],
- ["e1bc84", "e1bc80cc81"],
- ["e1be84", "ceb1cc93cc81cd85"],
- ["e1be84", "e1bc84cd85"],
- ["e1bc86", "ceb1cc93cd82"],
- ["e1bc86", "e1bc80cd82"],
- ["e1be86", "ceb1cc93cd82cd85"],
- ["e1be86", "e1bc86cd85"],
- ["e1be80", "ceb1cc93cd85"],
- ["e1be80", "e1bc80cd85"],
- ["e1bc81", "ceb1cc94"],
- ["e1bc83", "ceb1cc94cc80"],
- ["e1bc83", "e1bc81cc80"],
- ["e1be83", "ceb1cc94cc80cd85"],
- ["e1be83", "e1bc83cd85"],
- ["e1bc85", "ceb1cc94cc81"],
- ["e1bc85", "e1bc81cc81"],
- ["e1be85", "ceb1cc94cc81cd85"],
- ["e1be85", "e1bc85cd85"],
- ["e1bc87", "ceb1cc94cd82"],
- ["e1bc87", "e1bc81cd82"],
- ["e1be87", "ceb1cc94cd82cd85"],
- ["e1be87", "e1bc87cd85"],
- ["e1be81", "ceb1cc94cd85"],
- ["e1be81", "e1bc81cd85"],
- ["e1beb6", "ceb1cd82"],
- ["e1beb7", "ceb1cd82cd85"],
- ["e1beb7", "e1beb6cd85"],
- ["e1beb3", "ceb1cd85"],
+ ["e1bdb1", "ceb1cc81"],
["e1bdb2", "ceb5cc80"],
- ["cead", "ceb5cc81"],
- ["e1bc90", "ceb5cc93"],
- ["e1bc92", "ceb5cc93cc80"],
- ["e1bc92", "e1bc90cc80"],
- ["e1bc94", "ceb5cc93cc81"],
- ["e1bc94", "e1bc90cc81"],
- ["e1bc91", "ceb5cc94"],
- ["e1bc93", "ceb5cc94cc80"],
- ["e1bc93", "e1bc91cc80"],
- ["e1bc95", "ceb5cc94cc81"],
- ["e1bc95", "e1bc91cc81"],
+ ["e1bdb3", "ceb5cc81"],
["e1bdb4", "ceb7cc80"],
- ["e1bf82", "ceb7cc80cd85"],
- ["e1bf82", "e1bdb4cd85"],
- ["ceae", "ceb7cc81"],
- ["e1bf84", "ceb7cc81cd85"],
- ["e1bf84", "ceaecd85"],
- ["e1bca0", "ceb7cc93"],
- ["e1bca2", "ceb7cc93cc80"],
- ["e1bca2", "e1bca0cc80"],
- ["e1be92", "ceb7cc93cc80cd85"],
- ["e1be92", "e1bca2cd85"],
- ["e1bca4", "ceb7cc93cc81"],
- ["e1bca4", "e1bca0cc81"],
- ["e1be94", "ceb7cc93cc81cd85"],
- ["e1be94", "e1bca4cd85"],
- ["e1bca6", "ceb7cc93cd82"],
- ["e1bca6", "e1bca0cd82"],
- ["e1be96", "ceb7cc93cd82cd85"],
- ["e1be96", "e1bca6cd85"],
- ["e1be90", "ceb7cc93cd85"],
- ["e1be90", "e1bca0cd85"],
- ["e1bca1", "ceb7cc94"],
- ["e1bca3", "ceb7cc94cc80"],
- ["e1bca3", "e1bca1cc80"],
- ["e1be93", "ceb7cc94cc80cd85"],
- ["e1be93", "e1bca3cd85"],
- ["e1bca5", "ceb7cc94cc81"],
- ["e1bca5", "e1bca1cc81"],
- ["e1be95", "ceb7cc94cc81cd85"],
- ["e1be95", "e1bca5cd85"],
- ["e1bca7", "ceb7cc94cd82"],
- ["e1bca7", "e1bca1cd82"],
- ["e1be97", "ceb7cc94cd82cd85"],
- ["e1be97", "e1bca7cd85"],
- ["e1be91", "ceb7cc94cd85"],
- ["e1be91", "e1bca1cd85"],
- ["e1bf86", "ceb7cd82"],
- ["e1bf87", "ceb7cd82cd85"],
- ["e1bf87", "e1bf86cd85"],
- ["e1bf83", "ceb7cd85"],
- ["e1bebe", "ceb9"],
+ ["e1bdb5", "ceb7cc81"],
["e1bdb6", "ceb9cc80"],
- ["ceaf", "ceb9cc81"],
- ["e1bf91", "ceb9cc84"],
- ["e1bf90", "ceb9cc86"],
- ["cf8a", "ceb9cc88"],
- ["e1bf92", "ceb9cc88cc80"],
- ["e1bf92", "cf8acc80"],
- ["e1bf93", "ceb9cc88cc81"],
- ["e1bf93", "cf8acc81"],
- ["e1bf97", "ceb9cc88cd82"],
- ["e1bf97", "cf8acd82"],
- ["e1bcb0", "ceb9cc93"],
- ["e1bcb2", "ceb9cc93cc80"],
- ["e1bcb2", "e1bcb0cc80"],
- ["e1bcb4", "ceb9cc93cc81"],
- ["e1bcb4", "e1bcb0cc81"],
- ["e1bcb6", "ceb9cc93cd82"],
- ["e1bcb6", "e1bcb0cd82"],
- ["e1bcb1", "ceb9cc94"],
- ["e1bcb3", "ceb9cc94cc80"],
- ["e1bcb3", "e1bcb1cc80"],
- ["e1bcb5", "ceb9cc94cc81"],
- ["e1bcb5", "e1bcb1cc81"],
- ["e1bcb7", "ceb9cc94cd82"],
- ["e1bcb7", "e1bcb1cd82"],
- ["e1bf96", "ceb9cd82"],
+ ["e1bdb7", "ceb9cc81"],
["e1bdb8", "cebfcc80"],
- ["cf8c", "cebfcc81"],
- ["e1bd80", "cebfcc93"],
- ["e1bd82", "cebfcc93cc80"],
- ["e1bd82", "e1bd80cc80"],
- ["e1bd84", "cebfcc93cc81"],
- ["e1bd84", "e1bd80cc81"],
- ["e1bd81", "cebfcc94"],
- ["e1bd83", "cebfcc94cc80"],
- ["e1bd83", "e1bd81cc80"],
- ["e1bd85", "cebfcc94cc81"],
- ["e1bd85", "e1bd81cc81"],
- ["e1bfa4", "cf81cc93"],
- ["e1bfa5", "cf81cc94"],
+ ["e1bdb9", "cebfcc81"],
["e1bdba", "cf85cc80"],
- ["cf8d", "cf85cc81"],
- ["e1bfa1", "cf85cc84"],
- ["e1bfa0", "cf85cc86"],
- ["cf8b", "cf85cc88"],
- ["e1bfa2", "cf85cc88cc80"],
- ["e1bfa2", "cf8bcc80"],
- ["e1bfa3", "cf85cc88cc81"],
- ["e1bfa3", "cf8bcc81"],
- ["e1bfa7", "cf85cc88cd82"],
- ["e1bfa7", "cf8bcd82"],
- ["e1bd90", "cf85cc93"],
- ["e1bd92", "cf85cc93cc80"],
- ["e1bd92", "e1bd90cc80"],
- ["e1bd94", "cf85cc93cc81"],
- ["e1bd94", "e1bd90cc81"],
- ["e1bd96", "cf85cc93cd82"],
- ["e1bd96", "e1bd90cd82"],
- ["e1bd91", "cf85cc94"],
- ["e1bd93", "cf85cc94cc80"],
- ["e1bd93", "e1bd91cc80"],
- ["e1bd95", "cf85cc94cc81"],
- ["e1bd95", "e1bd91cc81"],
- ["e1bd97", "cf85cc94cd82"],
- ["e1bd97", "e1bd91cd82"],
- ["e1bfa6", "cf85cd82"],
+ ["e1bdbb", "cf85cc81"],
["e1bdbc", "cf89cc80"],
- ["e1bfb2", "cf89cc80cd85"],
- ["e1bfb2", "e1bdbccd85"],
- ["cf8e", "cf89cc81"],
- ["e1bfb4", "cf89cc81cd85"],
- ["e1bfb4", "cf8ecd85"],
- ["e1bda0", "cf89cc93"],
- ["e1bda2", "cf89cc93cc80"],
- ["e1bda2", "e1bda0cc80"],
- ["e1bea2", "cf89cc93cc80cd85"],
- ["e1bea2", "e1bda2cd85"],
- ["e1bda4", "cf89cc93cc81"],
- ["e1bda4", "e1bda0cc81"],
- ["e1bea4", "cf89cc93cc81cd85"],
- ["e1bea4", "e1bda4cd85"],
- ["e1bda6", "cf89cc93cd82"],
- ["e1bda6", "e1bda0cd82"],
- ["e1bea6", "cf89cc93cd82cd85"],
- ["e1bea6", "e1bda6cd85"],
- ["e1bea0", "cf89cc93cd85"],
- ["e1bea0", "e1bda0cd85"],
- ["e1bda1", "cf89cc94"],
- ["e1bda3", "cf89cc94cc80"],
- ["e1bda3", "e1bda1cc80"],
- ["e1bea3", "cf89cc94cc80cd85"],
- ["e1bea3", "e1bda3cd85"],
- ["e1bda5", "cf89cc94cc81"],
- ["e1bda5", "e1bda1cc81"],
- ["e1bea5", "cf89cc94cc81cd85"],
- ["e1bea5", "e1bda5cd85"],
- ["e1bda7", "cf89cc94cd82"],
- ["e1bda7", "e1bda1cd82"],
- ["e1bea7", "cf89cc94cd82cd85"],
- ["e1bea7", "e1bda7cd85"],
- ["e1bea1", "cf89cc94cd85"],
- ["e1bea1", "e1bda1cd85"],
- ["e1bfb6", "cf89cd82"],
- ["e1bfb7", "cf89cd82cd85"],
- ["e1bfb7", "e1bfb6cd85"],
- ["e1bfb3", "cf89cd85"],
- ["cf93", "cf92cc81"],
- ["cf94", "cf92cc88"],
- ["d087", "d086cc88"],
- ["d390", "d090cc86"],
- ["d392", "d090cc88"],
- ["d083", "d093cc81"],
- ["d080", "d095cc80"],
- ["d396", "d095cc86"],
- ["d081", "d095cc88"],
- ["d381", "d096cc86"],
- ["d39c", "d096cc88"],
- ["d39e", "d097cc88"],
- ["d08d", "d098cc80"],
- ["d3a2", "d098cc84"],
- ["d099", "d098cc86"],
- ["d3a4", "d098cc88"],
- ["d08c", "d09acc81"],
- ["d3a6", "d09ecc88"],
- ["d3ae", "d0a3cc84"],
- ["d08e", "d0a3cc86"],
- ["d3b0", "d0a3cc88"],
- ["d3b2", "d0a3cc8b"],
- ["d3b4", "d0a7cc88"],
- ["d3b8", "d0abcc88"],
- ["d3ac", "d0adcc88"],
- ["d391", "d0b0cc86"],
- ["d393", "d0b0cc88"],
- ["d193", "d0b3cc81"],
- ["d190", "d0b5cc80"],
- ["d397", "d0b5cc86"],
- ["d191", "d0b5cc88"],
- ["d382", "d0b6cc86"],
- ["d39d", "d0b6cc88"],
- ["d39f", "d0b7cc88"],
- ["d19d", "d0b8cc80"],
- ["d3a3", "d0b8cc84"],
- ["d0b9", "d0b8cc86"],
- ["d3a5", "d0b8cc88"],
- ["d19c", "d0bacc81"],
- ["d3a7", "d0becc88"],
- ["d3af", "d183cc84"],
- ["d19e", "d183cc86"],
- ["d3b1", "d183cc88"],
- ["d3b3", "d183cc8b"],
- ["d3b5", "d187cc88"],
- ["d3b9", "d18bcc88"],
- ["d3ad", "d18dcc88"],
- ["d197", "d196cc88"],
- ["d1b6", "d1b4cc8f"],
- ["d1b7", "d1b5cc8f"],
- ["d39a", "d398cc88"],
- ["d39b", "d399cc88"],
- ["d3aa", "d3a8cc88"],
- ["d3ab", "d3a9cc88"],
- ["efacae", "d790d6b7"],
- ["efacaf", "d790d6b8"],
- ["efacb0", "d790d6bc"],
- ["efacb1", "d791d6bc"],
- ["efad8c", "d791d6bf"],
- ["efacb2", "d792d6bc"],
- ["efacb3", "d793d6bc"],
- ["efacb4", "d794d6bc"],
- ["efad8b", "d795d6b9"],
- ["efacb5", "d795d6bc"],
- ["efacb6", "d796d6bc"],
- ["efacb8", "d798d6bc"],
- ["efac9d", "d799d6b4"],
- ["efacb9", "d799d6bc"],
- ["efacba", "d79ad6bc"],
- ["efacbb", "d79bd6bc"],
- ["efad8d", "d79bd6bf"],
- ["efacbc", "d79cd6bc"],
- ["efacbe", "d79ed6bc"],
- ["efad80", "d7a0d6bc"],
- ["efad81", "d7a1d6bc"],
- ["efad83", "d7a3d6bc"],
- ["efad84", "d7a4d6bc"],
- ["efad8e", "d7a4d6bf"],
- ["efad86", "d7a6d6bc"],
- ["efad87", "d7a7d6bc"],
- ["efad88", "d7a8d6bc"],
- ["efad89", "d7a9d6bc"],
- ["efacac", "d7a9d6bcd781"],
- ["efacac", "efad89d781"],
- ["efacad", "d7a9d6bcd782"],
- ["efacad", "efad89d782"],
- ["efacaa", "d7a9d781"],
- ["efacab", "d7a9d782"],
- ["efad8a", "d7aad6bc"],
- ["efac9f", "d7b2d6b7"],
- ["d8a2", "d8a7d993"],
- ["d8a3", "d8a7d994"],
- ["d8a5", "d8a7d995"],
- ["d8a4", "d988d994"],
- ["d8a6", "d98ad994"],
- ["db82", "db81d994"],
- ["db93", "db92d994"],
- ["db80", "db95d994"],
- ["e0a598", "e0a495e0a4bc"],
- ["e0a599", "e0a496e0a4bc"],
- ["e0a59a", "e0a497e0a4bc"],
- ["e0a59b", "e0a49ce0a4bc"],
- ["e0a59c", "e0a4a1e0a4bc"],
- ["e0a59d", "e0a4a2e0a4bc"],
- ["e0a4a9", "e0a4a8e0a4bc"],
- ["e0a59e", "e0a4abe0a4bc"],
- ["e0a59f", "e0a4afe0a4bc"],
- ["e0a4b1", "e0a4b0e0a4bc"],
- ["e0a4b4", "e0a4b3e0a4bc"],
- ["e0a79c", "e0a6a1e0a6bc"],
- ["e0a79d", "e0a6a2e0a6bc"],
- ["e0a79f", "e0a6afe0a6bc"],
- ["e0a78b", "e0a787e0a6be"],
- ["e0a78c", "e0a787e0a797"],
- ["e0a999", "e0a896e0a8bc"],
- ["e0a99a", "e0a897e0a8bc"],
- ["e0a99b", "e0a89ce0a8bc"],
- ["e0a99e", "e0a8abe0a8bc"],
- ["e0a8b3", "e0a8b2e0a8bc"],
- ["e0a8b6", "e0a8b8e0a8bc"],
- ["e0ad9c", "e0aca1e0acbc"],
- ["e0ad9d", "e0aca2e0acbc"],
- ["e0ad8b", "e0ad87e0acbe"],
- ["e0ad88", "e0ad87e0ad96"],
- ["e0ad8c", "e0ad87e0ad97"],
- ["e0ae94", "e0ae92e0af97"],
- ["e0af8a", "e0af86e0aebe"],
- ["e0af8c", "e0af86e0af97"],
- ["e0af8b", "e0af87e0aebe"],
- ["e0b188", "e0b186e0b196"],
- ["e0b380", "e0b2bfe0b395"],
- ["e0b38a", "e0b386e0b382"],
- ["e0b38b", "e0b386e0b382e0b395"],
- ["e0b38b", "e0b38ae0b395"],
- ["e0b387", "e0b386e0b395"],
- ["e0b388", "e0b386e0b396"],
- ["e0b58a", "e0b586e0b4be"],
- ["e0b58c", "e0b586e0b597"],
- ["e0b58b", "e0b587e0b4be"],
- ["e0b79a", "e0b799e0b78a"],
- ["e0b79c", "e0b799e0b78f"],
- ["e0b79d", "e0b799e0b78fe0b78a"],
- ["e0b79d", "e0b79ce0b78a"],
- ["e0b79e", "e0b799e0b79f"],
- ["e0bda9", "e0bd80e0beb5"],
- ["e0bd83", "e0bd82e0beb7"],
- ["e0bd8d", "e0bd8ce0beb7"],
- ["e0bd92", "e0bd91e0beb7"],
- ["e0bd97", "e0bd96e0beb7"],
- ["e0bd9c", "e0bd9be0beb7"],
- ["e0bdb3", "e0bdb1e0bdb2"],
- ["e0bdb5", "e0bdb1e0bdb4"],
- ["e0be81", "e0bdb1e0be80"],
- ["e0beb9", "e0be90e0beb5"],
- ["e0be93", "e0be92e0beb7"],
- ["e0be9d", "e0be9ce0beb7"],
- ["e0bea2", "e0bea1e0beb7"],
- ["e0bea7", "e0bea6e0beb7"],
- ["e0beac", "e0beabe0beb7"],
- ["e0bdb6", "e0beb2e0be80"],
- ["e0bdb8", "e0beb3e0be80"],
- ["e180a6", "e180a5e180ae"],
- ["eab080", "e18480e185a1"],
- ["eab081", "e18480e185a1e186a8"],
- ["eab081", "eab080e186a8"],
- ["eab082", "e18480e185a1e186a9"],
- ["eab082", "eab080e186a9"],
- ["eab083", "e18480e185a1e186aa"],
- ["eab083", "eab080e186aa"],
- ["eab084", "e18480e185a1e186ab"],
- ["eab084", "eab080e186ab"],
- ["eab085", "e18480e185a1e186ac"],
- ["eab085", "eab080e186ac"],
- ["eab086", "e18480e185a1e186ad"],
- ["eab086", "eab080e186ad"],
- ["eab087", "e18480e185a1e186ae"],
- ["eab087", "eab080e186ae"],
- ["eab088", "e18480e185a1e186af"],
- ["eab088", "eab080e186af"],
- ["eab089", "e18480e185a1e186b0"],
- ["eab089", "eab080e186b0"],
- ["eab08a", "e18480e185a1e186b1"],
- ["eab08a", "eab080e186b1"],
- ["eab08b", "e18480e185a1e186b2"],
- ["eab08b", "eab080e186b2"],
- ["eab08c", "e18480e185a1e186b3"],
- ["eab08c", "eab080e186b3"],
- ["eab08d", "e18480e185a1e186b4"],
- ["eab08d", "eab080e186b4"],
- ["eab08e", "e18480e185a1e186b5"],
- ["eab08e", "eab080e186b5"],
- ["eab08f", "e18480e185a1e186b6"],
- ["eab08f", "eab080e186b6"],
- ["eab090", "e18480e185a1e186b7"],
- ["eab090", "eab080e186b7"],
- ["eab091", "e18480e185a1e186b8"],
- ["eab091", "eab080e186b8"],
- ["eab092", "e18480e185a1e186b9"],
- ["eab092", "eab080e186b9"],
- ["eab093", "e18480e185a1e186ba"],
- ["eab093", "eab080e186ba"],
- ["eab094", "e18480e185a1e186bb"],
- ["eab094", "eab080e186bb"],
- ["eab095", "e18480e185a1e186bc"],
- ["eab095", "eab080e186bc"],
- ["eab096", "e18480e185a1e186bd"],
- ["eab096", "eab080e186bd"],
- ["eab097", "e18480e185a1e186be"],
- ["eab097", "eab080e186be"],
- ["eab098", "e18480e185a1e186bf"],
- ["eab098", "eab080e186bf"],
- ["eab099", "e18480e185a1e18780"],
- ["eab099", "eab080e18780"],
- ["eab09a", "e18480e185a1e18781"],
- ["eab09a", "eab080e18781"],
- ["eab09b", "e18480e185a1e18782"],
- ["eab09b", "eab080e18782"],
- ["eab09c", "e18480e185a2"],
- ["eab09d", "e18480e185a2e186a8"],
- ["eab09d", "eab09ce186a8"],
- ["eab09e", "e18480e185a2e186a9"],
- ["eab09e", "eab09ce186a9"],
- ["eab09f", "e18480e185a2e186aa"],
- ["eab09f", "eab09ce186aa"],
- ["eab0a0", "e18480e185a2e186ab"],
- ["eab0a0", "eab09ce186ab"],
- ["eab0a1", "e18480e185a2e186ac"],
- ["eab0a1", "eab09ce186ac"],
- ["eab0a2", "e18480e185a2e186ad"],
- ["eab0a2", "eab09ce186ad"],
- ["eab0a3", "e18480e185a2e186ae"],
- ["eab0a3", "eab09ce186ae"],
- ["eab0a4", "e18480e185a2e186af"],
- ["eab0a4", "eab09ce186af"],
- ["eab0a5", "e18480e185a2e186b0"],
- ["eab0a5", "eab09ce186b0"],
- ["eab0a6", "e18480e185a2e186b1"],
- ["eab0a6", "eab09ce186b1"],
- ["eab0a7", "e18480e185a2e186b2"],
- ["eab0a7", "eab09ce186b2"],
- ["eab0a8", "e18480e185a2e186b3"],
- ["eab0a8", "eab09ce186b3"],
- ["eab0a9", "e18480e185a2e186b4"],
- ["eab0a9", "eab09ce186b4"],
- ["eab0aa", "e18480e185a2e186b5"],
- ["eab0aa", "eab09ce186b5"],
- ["eab0ab", "e18480e185a2e186b6"],
- ["eab0ab", "eab09ce186b6"],
- ["eab0ac", "e18480e185a2e186b7"],
- ["eab0ac", "eab09ce186b7"],
- ["eab0ad", "e18480e185a2e186b8"],
- ["eab0ad", "eab09ce186b8"],
- ["eab0ae", "e18480e185a2e186b9"],
- ["eab0ae", "eab09ce186b9"],
- ["eab0af", "e18480e185a2e186ba"],
- ["eab0af", "eab09ce186ba"],
- ["eab0b0", "e18480e185a2e186bb"],
- ["eab0b0", "eab09ce186bb"],
- ["eab0b1", "e18480e185a2e186bc"],
- ["eab0b1", "eab09ce186bc"],
- ["eab0b2", "e18480e185a2e186bd"],
- ["eab0b2", "eab09ce186bd"],
- ["eab0b3", "e18480e185a2e186be"],
- ["eab0b3", "eab09ce186be"],
- ["eab0b4", "e18480e185a2e186bf"],
- ["eab0b4", "eab09ce186bf"],
- ["eab0b5", "e18480e185a2e18780"],
- ["eab0b5", "eab09ce18780"],
- ["eab0b6", "e18480e185a2e18781"],
- ["eab0b6", "eab09ce18781"],
- ["eab0b7", "e18480e185a2e18782"],
- ["eab0b7", "eab09ce18782"],
- ["eab0b8", "e18480e185a3"],
- ["eab0b9", "e18480e185a3e186a8"],
- ["eab0b9", "eab0b8e186a8"],
- ["eab0ba", "e18480e185a3e186a9"],
- ["eab0ba", "eab0b8e186a9"],
- ["eab0bb", "e18480e185a3e186aa"],
- ["eab0bb", "eab0b8e186aa"],
- ["eab0bc", "e18480e185a3e186ab"],
- ["eab0bc", "eab0b8e186ab"],
- ["eab0bd", "e18480e185a3e186ac"],
- ["eab0bd", "eab0b8e186ac"],
- ["eab0be", "e18480e185a3e186ad"],
- ["eab0be", "eab0b8e186ad"],
- ["eab0bf", "e18480e185a3e186ae"],
- ["eab0bf", "eab0b8e186ae"],
- ["eab180", "e18480e185a3e186af"],
- ["eab180", "eab0b8e186af"],
- ["eab181", "e18480e185a3e186b0"],
- ["eab181", "eab0b8e186b0"],
- ["eab182", "e18480e185a3e186b1"],
- ["eab182", "eab0b8e186b1"],
- ["eab183", "e18480e185a3e186b2"],
- ["eab183", "eab0b8e186b2"],
- ["eab184", "e18480e185a3e186b3"],
- ["eab184", "eab0b8e186b3"],
- ["eab185", "e18480e185a3e186b4"],
- ["eab185", "eab0b8e186b4"],
- ["eab186", "e18480e185a3e186b5"],
- ["eab186", "eab0b8e186b5"],
- ["eab187", "e18480e185a3e186b6"],
- ["eab187", "eab0b8e186b6"],
- ["eab188", "e18480e185a3e186b7"],
- ["eab188", "eab0b8e186b7"],
- ["eab189", "e18480e185a3e186b8"],
- ["eab189", "eab0b8e186b8"],
- ["eab18a", "e18480e185a3e186b9"],
- ["eab18a", "eab0b8e186b9"],
- ["eab18b", "e18480e185a3e186ba"],
- ["eab18b", "eab0b8e186ba"],
- ["eab18c", "e18480e185a3e186bb"],
- ["eab18c", "eab0b8e186bb"],
- ["eab18d", "e18480e185a3e186bc"],
- ["eab18d", "eab0b8e186bc"],
- ["eab18e", "e18480e185a3e186bd"],
- ["eab18e", "eab0b8e186bd"],
- ["eab18f", "e18480e185a3e186be"],
- ["eab18f", "eab0b8e186be"],
- ["eab190", "e18480e185a3e186bf"],
- ["eab190", "eab0b8e186bf"],
- ["eab191", "e18480e185a3e18780"],
- ["eab191", "eab0b8e18780"],
- ["eab192", "e18480e185a3e18781"],
- ["eab192", "eab0b8e18781"],
- ["eab193", "e18480e185a3e18782"],
- ["eab193", "eab0b8e18782"],
- ["eab194", "e18480e185a4"],
- ["eab195", "e18480e185a4e186a8"],
- ["eab195", "eab194e186a8"],
- ["eab196", "e18480e185a4e186a9"],
- ["eab196", "eab194e186a9"],
- ["eab197", "e18480e185a4e186aa"],
- ["eab197", "eab194e186aa"],
- ["eab198", "e18480e185a4e186ab"],
- ["eab198", "eab194e186ab"],
- ["eab199", "e18480e185a4e186ac"],
- ["eab199", "eab194e186ac"],
- ["eab19a", "e18480e185a4e186ad"],
- ["eab19a", "eab194e186ad"],
- ["eab19b", "e18480e185a4e186ae"],
- ["eab19b", "eab194e186ae"],
- ["eab19c", "e18480e185a4e186af"],
- ["eab19c", "eab194e186af"],
- ["eab19d", "e18480e185a4e186b0"],
- ["eab19d", "eab194e186b0"],
- ["eab19e", "e18480e185a4e186b1"],
- ["eab19e", "eab194e186b1"],
- ["eab19f", "e18480e185a4e186b2"],
- ["eab19f", "eab194e186b2"],
- ["eab1a0", "e18480e185a4e186b3"],
- ["eab1a0", "eab194e186b3"],
- ["eab1a1", "e18480e185a4e186b4"],
- ["eab1a1", "eab194e186b4"],
- ["eab1a2", "e18480e185a4e186b5"],
- ["eab1a2", "eab194e186b5"],
- ["eab1a3", "e18480e185a4e186b6"],
- ["eab1a3", "eab194e186b6"],
- ["eab1a4", "e18480e185a4e186b7"],
- ["eab1a4", "eab194e186b7"],
- ["eab1a5", "e18480e185a4e186b8"],
- ["eab1a5", "eab194e186b8"],
- ["eab1a6", "e18480e185a4e186b9"],
- ["eab1a6", "eab194e186b9"],
- ["eab1a7", "e18480e185a4e186ba"],
- ["eab1a7", "eab194e186ba"],
- ["eab1a8", "e18480e185a4e186bb"],
- ["eab1a8", "eab194e186bb"],
- ["eab1a9", "e18480e185a4e186bc"],
- ["eab1a9", "eab194e186bc"],
- ["eab1aa", "e18480e185a4e186bd"],
- ["eab1aa", "eab194e186bd"],
- ["eab1ab", "e18480e185a4e186be"],
- ["eab1ab", "eab194e186be"],
- ["eab1ac", "e18480e185a4e186bf"],
- ["eab1ac", "eab194e186bf"],
- ["eab1ad", "e18480e185a4e18780"],
- ["eab1ad", "eab194e18780"],
- ["eab1ae", "e18480e185a4e18781"],
- ["eab1ae", "eab194e18781"],
- ["eab1af", "e18480e185a4e18782"],
- ["eab1af", "eab194e18782"],
- ["eab1b0", "e18480e185a5"],
- ["eab1b1", "e18480e185a5e186a8"],
- ["eab1b1", "eab1b0e186a8"],
- ["eab1b2", "e18480e185a5e186a9"],
- ["eab1b2", "eab1b0e186a9"],
- ["eab1b3", "e18480e185a5e186aa"],
- ["eab1b3", "eab1b0e186aa"],
- ["eab1b4", "e18480e185a5e186ab"],
- ["eab1b4", "eab1b0e186ab"],
- ["eab1b5", "e18480e185a5e186ac"],
- ["eab1b5", "eab1b0e186ac"],
- ["eab1b6", "e18480e185a5e186ad"],
- ["eab1b6", "eab1b0e186ad"],
- ["eab1b7", "e18480e185a5e186ae"],
- ["eab1b7", "eab1b0e186ae"],
- ["eab1b8", "e18480e185a5e186af"],
- ["eab1b8", "eab1b0e186af"],
- ["eab1b9", "e18480e185a5e186b0"],
- ["eab1b9", "eab1b0e186b0"],
- ["eab1ba", "e18480e185a5e186b1"],
- ["eab1ba", "eab1b0e186b1"],
- ["eab1bb", "e18480e185a5e186b2"],
- ["eab1bb", "eab1b0e186b2"],
- ["eab1bc", "e18480e185a5e186b3"],
- ["eab1bc", "eab1b0e186b3"],
- ["eab1bd", "e18480e185a5e186b4"],
- ["eab1bd", "eab1b0e186b4"],
- ["eab1be", "e18480e185a5e186b5"],
- ["eab1be", "eab1b0e186b5"],
- ["eab1bf", "e18480e185a5e186b6"],
- ["eab1bf", "eab1b0e186b6"],
- ["eab280", "e18480e185a5e186b7"],
- ["eab280", "eab1b0e186b7"],
- ["eab281", "e18480e185a5e186b8"],
- ["eab281", "eab1b0e186b8"],
- ["eab282", "e18480e185a5e186b9"],
- ["eab282", "eab1b0e186b9"],
- ["eab283", "e18480e185a5e186ba"],
- ["eab283", "eab1b0e186ba"],
- ["eab284", "e18480e185a5e186bb"],
- ["eab284", "eab1b0e186bb"],
- ["eab285", "e18480e185a5e186bc"],
- ["eab285", "eab1b0e186bc"],
- ["eab286", "e18480e185a5e186bd"],
- ["eab286", "eab1b0e186bd"],
- ["eab287", "e18480e185a5e186be"],
- ["eab287", "eab1b0e186be"],
- ["eab288", "e18480e185a5e186bf"],
- ["eab288", "eab1b0e186bf"],
- ["eab289", "e18480e185a5e18780"],
- ["eab289", "eab1b0e18780"],
- ["eab28a", "e18480e185a5e18781"],
- ["eab28a", "eab1b0e18781"],
- ["eab28b", "e18480e185a5e18782"],
- ["eab28b", "eab1b0e18782"],
- ["eab28c", "e18480e185a6"],
- ["eab28d", "e18480e185a6e186a8"],
- ["eab28d", "eab28ce186a8"],
- ["eab28e", "e18480e185a6e186a9"],
- ["eab28e", "eab28ce186a9"],
- ["eab28f", "e18480e185a6e186aa"],
- ["eab28f", "eab28ce186aa"],
- ["eab290", "e18480e185a6e186ab"],
- ["eab290", "eab28ce186ab"],
- ["eab291", "e18480e185a6e186ac"],
- ["eab291", "eab28ce186ac"],
- ["eab292", "e18480e185a6e186ad"],
- ["eab292", "eab28ce186ad"],
- ["eab293", "e18480e185a6e186ae"],
- ["eab293", "eab28ce186ae"],
- ["eab294", "e18480e185a6e186af"],
- ["eab294", "eab28ce186af"],
- ["eab295", "e18480e185a6e186b0"],
- ["eab295", "eab28ce186b0"],
- ["eab296", "e18480e185a6e186b1"],
- ["eab296", "eab28ce186b1"],
- ["eab297", "e18480e185a6e186b2"],
- ["eab297", "eab28ce186b2"],
- ["eab298", "e18480e185a6e186b3"],
- ["eab298", "eab28ce186b3"],
- ["eab299", "e18480e185a6e186b4"],
- ["eab299", "eab28ce186b4"],
- ["eab29a", "e18480e185a6e186b5"],
- ["eab29a", "eab28ce186b5"],
- ["eab29b", "e18480e185a6e186b6"],
- ["eab29b", "eab28ce186b6"],
- ["eab29c", "e18480e185a6e186b7"],
- ["eab29c", "eab28ce186b7"],
- ["eab29d", "e18480e185a6e186b8"],
- ["eab29d", "eab28ce186b8"],
- ["eab29e", "e18480e185a6e186b9"],
- ["eab29e", "eab28ce186b9"],
- ["eab29f", "e18480e185a6e186ba"],
- ["eab29f", "eab28ce186ba"],
- ["eab2a0", "e18480e185a6e186bb"],
- ["eab2a0", "eab28ce186bb"],
- ["eab2a1", "e18480e185a6e186bc"],
- ["eab2a1", "eab28ce186bc"],
- ["eab2a2", "e18480e185a6e186bd"],
- ["eab2a2", "eab28ce186bd"],
- ["eab2a3", "e18480e185a6e186be"],
- ["eab2a3", "eab28ce186be"],
- ["eab2a4", "e18480e185a6e186bf"],
- ["eab2a4", "eab28ce186bf"],
- ["eab2a5", "e18480e185a6e18780"],
- ["eab2a5", "eab28ce18780"],
- ["eab2a6", "e18480e185a6e18781"],
- ["eab2a6", "eab28ce18781"],
- ["eab2a7", "e18480e185a6e18782"],
- ["eab2a7", "eab28ce18782"],
- ["eab2a8", "e18480e185a7"],
- ["eab2a9", "e18480e185a7e186a8"],
- ["eab2a9", "eab2a8e186a8"],
- ["eab2aa", "e18480e185a7e186a9"],
- ["eab2aa", "eab2a8e186a9"],
- ["eab2ab", "e18480e185a7e186aa"],
- ["eab2ab", "eab2a8e186aa"],
- ["eab2ac", "e18480e185a7e186ab"],
- ["eab2ac", "eab2a8e186ab"],
- ["eab2ad", "e18480e185a7e186ac"],
- ["eab2ad", "eab2a8e186ac"],
- ["eab2ae", "e18480e185a7e186ad"],
- ["eab2ae", "eab2a8e186ad"],
- ["eab2af", "e18480e185a7e186ae"],
- ["eab2af", "eab2a8e186ae"],
- ["eab2b0", "e18480e185a7e186af"],
- ["eab2b0", "eab2a8e186af"],
- ["eab2b1", "e18480e185a7e186b0"],
- ["eab2b1", "eab2a8e186b0"],
- ["eab2b2", "e18480e185a7e186b1"],
- ["eab2b2", "eab2a8e186b1"],
- ["eab2b3", "e18480e185a7e186b2"],
- ["eab2b3", "eab2a8e186b2"],
- ["eab2b4", "e18480e185a7e186b3"],
- ["eab2b4", "eab2a8e186b3"],
- ["eab2b5", "e18480e185a7e186b4"],
- ["eab2b5", "eab2a8e186b4"],
- ["eab2b6", "e18480e185a7e186b5"],
- ["eab2b6", "eab2a8e186b5"],
- ["eab2b7", "e18480e185a7e186b6"],
- ["eab2b7", "eab2a8e186b6"],
- ["eab2b8", "e18480e185a7e186b7"],
- ["eab2b8", "eab2a8e186b7"],
- ["eab2b9", "e18480e185a7e186b8"],
- ["eab2b9", "eab2a8e186b8"],
- ["eab2ba", "e18480e185a7e186b9"],
- ["eab2ba", "eab2a8e186b9"],
- ["eab2bb", "e18480e185a7e186ba"],
- ["eab2bb", "eab2a8e186ba"],
- ["eab2bc", "e18480e185a7e186bb"],
- ["eab2bc", "eab2a8e186bb"],
- ["eab2bd", "e18480e185a7e186bc"],
- ["eab2bd", "eab2a8e186bc"],
- ["eab2be", "e18480e185a7e186bd"],
- ["eab2be", "eab2a8e186bd"],
- ["eab2bf", "e18480e185a7e186be"],
- ["eab2bf", "eab2a8e186be"],
- ["eab380", "e18480e185a7e186bf"],
- ["eab380", "eab2a8e186bf"],
- ["eab381", "e18480e185a7e18780"],
- ["eab381", "eab2a8e18780"],
- ["eab382", "e18480e185a7e18781"],
- ["eab382", "eab2a8e18781"],
- ["eab383", "e18480e185a7e18782"],
- ["eab383", "eab2a8e18782"],
- ["eab384", "e18480e185a8"],
- ["eab385", "e18480e185a8e186a8"],
- ["eab385", "eab384e186a8"],
- ["eab386", "e18480e185a8e186a9"],
- ["eab386", "eab384e186a9"],
- ["eab387", "e18480e185a8e186aa"],
- ["eab387", "eab384e186aa"],
- ["eab388", "e18480e185a8e186ab"],
- ["eab388", "eab384e186ab"],
- ["eab389", "e18480e185a8e186ac"],
- ["eab389", "eab384e186ac"],
- ["eab38a", "e18480e185a8e186ad"],
- ["eab38a", "eab384e186ad"],
- ["eab38b", "e18480e185a8e186ae"],
- ["eab38b", "eab384e186ae"],
- ["eab38c", "e18480e185a8e186af"],
- ["eab38c", "eab384e186af"],
- ["eab38d", "e18480e185a8e186b0"],
- ["eab38d", "eab384e186b0"],
- ["eab38e", "e18480e185a8e186b1"],
- ["eab38e", "eab384e186b1"],
- ["eab38f", "e18480e185a8e186b2"],
- ["eab38f", "eab384e186b2"],
- ["eab390", "e18480e185a8e186b3"],
- ["eab390", "eab384e186b3"],
- ["eab391", "e18480e185a8e186b4"],
- ["eab391", "eab384e186b4"],
- ["eab392", "e18480e185a8e186b5"],
- ["eab392", "eab384e186b5"],
- ["eab393", "e18480e185a8e186b6"],
- ["eab393", "eab384e186b6"],
- ["eab394", "e18480e185a8e186b7"],
- ["eab394", "eab384e186b7"],
- ["eab395", "e18480e185a8e186b8"],
- ["eab395", "eab384e186b8"],
- ["eab396", "e18480e185a8e186b9"],
- ["eab396", "eab384e186b9"],
- ["eab397", "e18480e185a8e186ba"],
- ["eab397", "eab384e186ba"],
- ["eab398", "e18480e185a8e186bb"],
- ["eab398", "eab384e186bb"],
- ["eab399", "e18480e185a8e186bc"],
- ["eab399", "eab384e186bc"],
- ["eab39a", "e18480e185a8e186bd"],
- ["eab39a", "eab384e186bd"],
- ["eab39b", "e18480e185a8e186be"],
- ["eab39b", "eab384e186be"],
- ["eab39c", "e18480e185a8e186bf"],
- ["eab39c", "eab384e186bf"],
- ["eab39d", "e18480e185a8e18780"],
- ["eab39d", "eab384e18780"],
- ["eab39e", "e18480e185a8e18781"],
- ["eab39e", "eab384e18781"],
- ["eab39f", "e18480e185a8e18782"],
- ["eab39f", "eab384e18782"],
- ["eab3a0", "e18480e185a9"],
- ["eab3a1", "e18480e185a9e186a8"],
- ["eab3a1", "eab3a0e186a8"],
- ["eab3a2", "e18480e185a9e186a9"],
- ["eab3a2", "eab3a0e186a9"],
- ["eab3a3", "e18480e185a9e186aa"],
- ["eab3a3", "eab3a0e186aa"],
- ["eab3a4", "e18480e185a9e186ab"],
- ["eab3a4", "eab3a0e186ab"],
- ["eab3a5", "e18480e185a9e186ac"],
- ["eab3a5", "eab3a0e186ac"],
- ["eab3a6", "e18480e185a9e186ad"],
- ["eab3a6", "eab3a0e186ad"],
- ["eab3a7", "e18480e185a9e186ae"],
- ["eab3a7", "eab3a0e186ae"],
- ["eab3a8", "e18480e185a9e186af"],
- ["eab3a8", "eab3a0e186af"],
- ["eab3a9", "e18480e185a9e186b0"],
- ["eab3a9", "eab3a0e186b0"],
- ["eab3aa", "e18480e185a9e186b1"],
- ["eab3aa", "eab3a0e186b1"],
- ["eab3ab", "e18480e185a9e186b2"],
- ["eab3ab", "eab3a0e186b2"],
- ["eab3ac", "e18480e185a9e186b3"],
- ["eab3ac", "eab3a0e186b3"],
- ["eab3ad", "e18480e185a9e186b4"],
- ["eab3ad", "eab3a0e186b4"],
- ["eab3ae", "e18480e185a9e186b5"],
- ["eab3ae", "eab3a0e186b5"],
- ["eab3af", "e18480e185a9e186b6"],
- ["eab3af", "eab3a0e186b6"],
- ["eab3b0", "e18480e185a9e186b7"],
- ["eab3b0", "eab3a0e186b7"],
- ["eab3b1", "e18480e185a9e186b8"],
- ["eab3b1", "eab3a0e186b8"],
- ["eab3b2", "e18480e185a9e186b9"],
- ["eab3b2", "eab3a0e186b9"],
- ["eab3b3", "e18480e185a9e186ba"],
- ["eab3b3", "eab3a0e186ba"],
- ["eab3b4", "e18480e185a9e186bb"],
- ["eab3b4", "eab3a0e186bb"],
- ["eab3b5", "e18480e185a9e186bc"],
- ["eab3b5", "eab3a0e186bc"],
- ["eab3b6", "e18480e185a9e186bd"],
- ["eab3b6", "eab3a0e186bd"],
- ["eab3b7", "e18480e185a9e186be"],
- ["eab3b7", "eab3a0e186be"],
- ["eab3b8", "e18480e185a9e186bf"],
- ["eab3b8", "eab3a0e186bf"],
- ["eab3b9", "e18480e185a9e18780"],
- ["eab3b9", "eab3a0e18780"],
- ["eab3ba", "e18480e185a9e18781"],
- ["eab3ba", "eab3a0e18781"],
- ["eab3bb", "e18480e185a9e18782"],
- ["eab3bb", "eab3a0e18782"],
- ["eab3bc", "e18480e185aa"],
- ["eab3bd", "e18480e185aae186a8"],
- ["eab3bd", "eab3bce186a8"],
- ["eab3be", "e18480e185aae186a9"],
- ["eab3be", "eab3bce186a9"],
- ["eab3bf", "e18480e185aae186aa"],
- ["eab3bf", "eab3bce186aa"],
- ["eab480", "e18480e185aae186ab"],
- ["eab480", "eab3bce186ab"],
- ["eab481", "e18480e185aae186ac"],
- ["eab481", "eab3bce186ac"],
- ["eab482", "e18480e185aae186ad"],
- ["eab482", "eab3bce186ad"],
- ["eab483", "e18480e185aae186ae"],
- ["eab483", "eab3bce186ae"],
- ["eab484", "e18480e185aae186af"],
- ["eab484", "eab3bce186af"],
- ["eab485", "e18480e185aae186b0"],
- ["eab485", "eab3bce186b0"],
- ["eab486", "e18480e185aae186b1"],
- ["eab486", "eab3bce186b1"],
- ["eab487", "e18480e185aae186b2"],
- ["eab487", "eab3bce186b2"],
- ["eab488", "e18480e185aae186b3"],
- ["eab488", "eab3bce186b3"],
- ["eab489", "e18480e185aae186b4"],
- ["eab489", "eab3bce186b4"],
- ["eab48a", "e18480e185aae186b5"],
- ["eab48a", "eab3bce186b5"],
- ["eab48b", "e18480e185aae186b6"],
- ["eab48b", "eab3bce186b6"],
- ["eab48c", "e18480e185aae186b7"],
- ["eab48c", "eab3bce186b7"],
- ["eab48d", "e18480e185aae186b8"],
- ["eab48d", "eab3bce186b8"],
- ["eab48e", "e18480e185aae186b9"],
- ["eab48e", "eab3bce186b9"],
- ["eab48f", "e18480e185aae186ba"],
- ["eab48f", "eab3bce186ba"],
- ["eab490", "e18480e185aae186bb"],
- ["eab490", "eab3bce186bb"],
- ["eab491", "e18480e185aae186bc"],
- ["eab491", "eab3bce186bc"],
- ["eab492", "e18480e185aae186bd"],
- ["eab492", "eab3bce186bd"],
- ["eab493", "e18480e185aae186be"],
- ["eab493", "eab3bce186be"],
- ["eab494", "e18480e185aae186bf"],
- ["eab494", "eab3bce186bf"],
- ["eab495", "e18480e185aae18780"],
- ["eab495", "eab3bce18780"],
- ["eab496", "e18480e185aae18781"],
- ["eab496", "eab3bce18781"],
- ["eab497", "e18480e185aae18782"],
- ["eab497", "eab3bce18782"],
- ["eab498", "e18480e185ab"],
- ["eab499", "e18480e185abe186a8"],
- ["eab499", "eab498e186a8"],
- ["eab49a", "e18480e185abe186a9"],
- ["eab49a", "eab498e186a9"],
- ["eab49b", "e18480e185abe186aa"],
- ["eab49b", "eab498e186aa"],
- ["eab49c", "e18480e185abe186ab"],
- ["eab49c", "eab498e186ab"],
- ["eab49d", "e18480e185abe186ac"],
- ["eab49d", "eab498e186ac"],
- ["eab49e", "e18480e185abe186ad"],
- ["eab49e", "eab498e186ad"],
- ["eab49f", "e18480e185abe186ae"],
- ["eab49f", "eab498e186ae"],
- ["eab4a0", "e18480e185abe186af"],
- ["eab4a0", "eab498e186af"],
- ["eab4a1", "e18480e185abe186b0"],
- ["eab4a1", "eab498e186b0"],
- ["eab4a2", "e18480e185abe186b1"],
- ["eab4a2", "eab498e186b1"],
- ["eab4a3", "e18480e185abe186b2"],
- ["eab4a3", "eab498e186b2"],
- ["eab4a4", "e18480e185abe186b3"],
- ["eab4a4", "eab498e186b3"],
- ["eab4a5", "e18480e185abe186b4"],
- ["eab4a5", "eab498e186b4"],
- ["eab4a6", "e18480e185abe186b5"],
- ["eab4a6", "eab498e186b5"],
- ["eab4a7", "e18480e185abe186b6"],
- ["eab4a7", "eab498e186b6"],
- ["eab4a8", "e18480e185abe186b7"],
- ["eab4a8", "eab498e186b7"],
- ["eab4a9", "e18480e185abe186b8"],
- ["eab4a9", "eab498e186b8"],
- ["eab4aa", "e18480e185abe186b9"],
- ["eab4aa", "eab498e186b9"],
- ["eab4ab", "e18480e185abe186ba"],
- ["eab4ab", "eab498e186ba"],
- ["eab4ac", "e18480e185abe186bb"],
- ["eab4ac", "eab498e186bb"],
- ["eab4ad", "e18480e185abe186bc"],
- ["eab4ad", "eab498e186bc"],
- ["eab4ae", "e18480e185abe186bd"],
- ["eab4ae", "eab498e186bd"],
- ["eab4af", "e18480e185abe186be"],
- ["eab4af", "eab498e186be"],
- ["eab4b0", "e18480e185abe186bf"],
- ["eab4b0", "eab498e186bf"],
- ["eab4b1", "e18480e185abe18780"],
- ["eab4b1", "eab498e18780"],
- ["eab4b2", "e18480e185abe18781"],
- ["eab4b2", "eab498e18781"],
- ["eab4b3", "e18480e185abe18782"],
- ["eab4b3", "eab498e18782"],
- ["eab4b4", "e18480e185ac"],
- ["eab4b5", "e18480e185ace186a8"],
- ["eab4b5", "eab4b4e186a8"],
- ["eab4b6", "e18480e185ace186a9"],
- ["eab4b6", "eab4b4e186a9"],
- ["eab4b7", "e18480e185ace186aa"],
- ["eab4b7", "eab4b4e186aa"],
- ["eab4b8", "e18480e185ace186ab"],
- ["eab4b8", "eab4b4e186ab"],
- ["eab4b9", "e18480e185ace186ac"],
- ["eab4b9", "eab4b4e186ac"],
- ["eab4ba", "e18480e185ace186ad"],
- ["eab4ba", "eab4b4e186ad"],
- ["eab4bb", "e18480e185ace186ae"],
- ["eab4bb", "eab4b4e186ae"],
- ["eab4bc", "e18480e185ace186af"],
- ["eab4bc", "eab4b4e186af"],
- ["eab4bd", "e18480e185ace186b0"],
- ["eab4bd", "eab4b4e186b0"],
- ["eab4be", "e18480e185ace186b1"],
- ["eab4be", "eab4b4e186b1"],
- ["eab4bf", "e18480e185ace186b2"],
- ["eab4bf", "eab4b4e186b2"],
- ["eab580", "e18480e185ace186b3"],
- ["eab580", "eab4b4e186b3"],
- ["eab581", "e18480e185ace186b4"],
- ["eab581", "eab4b4e186b4"],
- ["eab582", "e18480e185ace186b5"],
- ["eab582", "eab4b4e186b5"],
- ["eab583", "e18480e185ace186b6"],
- ["eab583", "eab4b4e186b6"],
- ["eab584", "e18480e185ace186b7"],
- ["eab584", "eab4b4e186b7"],
- ["eab585", "e18480e185ace186b8"],
- ["eab585", "eab4b4e186b8"],
- ["eab586", "e18480e185ace186b9"],
- ["eab586", "eab4b4e186b9"],
- ["eab587", "e18480e185ace186ba"],
- ["eab587", "eab4b4e186ba"],
- ["eab588", "e18480e185ace186bb"],
- ["eab588", "eab4b4e186bb"],
- ["eab589", "e18480e185ace186bc"],
- ["eab589", "eab4b4e186bc"],
- ["eab58a", "e18480e185ace186bd"],
- ["eab58a", "eab4b4e186bd"],
- ["eab58b", "e18480e185ace186be"],
- ["eab58b", "eab4b4e186be"],
- ["eab58c", "e18480e185ace186bf"],
- ["eab58c", "eab4b4e186bf"],
- ["eab58d", "e18480e185ace18780"],
- ["eab58d", "eab4b4e18780"],
- ["eab58e", "e18480e185ace18781"],
- ["eab58e", "eab4b4e18781"],
- ["eab58f", "e18480e185ace18782"],
- ["eab58f", "eab4b4e18782"],
- ["eab590", "e18480e185ad"],
- ["eab591", "e18480e185ade186a8"],
- ["eab591", "eab590e186a8"],
- ["eab592", "e18480e185ade186a9"],
- ["eab592", "eab590e186a9"],
- ["eab593", "e18480e185ade186aa"],
- ["eab593", "eab590e186aa"],
- ["eab594", "e18480e185ade186ab"],
- ["eab594", "eab590e186ab"],
- ["eab595", "e18480e185ade186ac"],
- ["eab595", "eab590e186ac"],
- ["eab596", "e18480e185ade186ad"],
- ["eab596", "eab590e186ad"],
- ["eab597", "e18480e185ade186ae"],
- ["eab597", "eab590e186ae"],
- ["eab598", "e18480e185ade186af"],
- ["eab598", "eab590e186af"],
- ["eab599", "e18480e185ade186b0"],
- ["eab599", "eab590e186b0"],
- ["eab59a", "e18480e185ade186b1"],
- ["eab59a", "eab590e186b1"],
- ["eab59b", "e18480e185ade186b2"],
- ["eab59b", "eab590e186b2"],
- ["eab59c", "e18480e185ade186b3"],
- ["eab59c", "eab590e186b3"],
- ["eab59d", "e18480e185ade186b4"],
- ["eab59d", "eab590e186b4"],
- ["eab59e", "e18480e185ade186b5"],
- ["eab59e", "eab590e186b5"],
- ["eab59f", "e18480e185ade186b6"],
- ["eab59f", "eab590e186b6"],
- ["eab5a0", "e18480e185ade186b7"],
- ["eab5a0", "eab590e186b7"],
- ["eab5a1", "e18480e185ade186b8"],
- ["eab5a1", "eab590e186b8"],
- ["eab5a2", "e18480e185ade186b9"],
- ["eab5a2", "eab590e186b9"],
- ["eab5a3", "e18480e185ade186ba"],
- ["eab5a3", "eab590e186ba"],
- ["eab5a4", "e18480e185ade186bb"],
- ["eab5a4", "eab590e186bb"],
- ["eab5a5", "e18480e185ade186bc"],
- ["eab5a5", "eab590e186bc"],
- ["eab5a6", "e18480e185ade186bd"],
- ["eab5a6", "eab590e186bd"],
- ["eab5a7", "e18480e185ade186be"],
- ["eab5a7", "eab590e186be"],
- ["eab5a8", "e18480e185ade186bf"],
- ["eab5a8", "eab590e186bf"],
- ["eab5a9", "e18480e185ade18780"],
- ["eab5a9", "eab590e18780"],
- ["eab5aa", "e18480e185ade18781"],
- ["eab5aa", "eab590e18781"],
- ["eab5ab", "e18480e185ade18782"],
- ["eab5ab", "eab590e18782"],
- ["eab5ac", "e18480e185ae"],
- ["eab5ad", "e18480e185aee186a8"],
- ["eab5ad", "eab5ace186a8"],
- ["eab5ae", "e18480e185aee186a9"],
- ["eab5ae", "eab5ace186a9"],
- ["eab5af", "e18480e185aee186aa"],
- ["eab5af", "eab5ace186aa"],
- ["eab5b0", "e18480e185aee186ab"],
- ["eab5b0", "eab5ace186ab"],
- ["eab5b1", "e18480e185aee186ac"],
- ["eab5b1", "eab5ace186ac"],
- ["eab5b2", "e18480e185aee186ad"],
- ["eab5b2", "eab5ace186ad"],
- ["eab5b3", "e18480e185aee186ae"],
- ["eab5b3", "eab5ace186ae"],
- ["eab5b4", "e18480e185aee186af"],
- ["eab5b4", "eab5ace186af"],
- ["eab5b5", "e18480e185aee186b0"],
- ["eab5b5", "eab5ace186b0"],
- ["eab5b6", "e18480e185aee186b1"],
- ["eab5b6", "eab5ace186b1"],
- ["eab5b7", "e18480e185aee186b2"],
- ["eab5b7", "eab5ace186b2"],
- ["eab5b8", "e18480e185aee186b3"],
- ["eab5b8", "eab5ace186b3"],
- ["eab5b9", "e18480e185aee186b4"],
- ["eab5b9", "eab5ace186b4"],
- ["eab5ba", "e18480e185aee186b5"],
- ["eab5ba", "eab5ace186b5"],
- ["eab5bb", "e18480e185aee186b6"],
- ["eab5bb", "eab5ace186b6"],
- ["eab5bc", "e18480e185aee186b7"],
- ["eab5bc", "eab5ace186b7"],
- ["eab5bd", "e18480e185aee186b8"],
- ["eab5bd", "eab5ace186b8"],
- ["eab5be", "e18480e185aee186b9"],
- ["eab5be", "eab5ace186b9"],
- ["eab5bf", "e18480e185aee186ba"],
- ["eab5bf", "eab5ace186ba"],
- ["eab680", "e18480e185aee186bb"],
- ["eab680", "eab5ace186bb"],
- ["eab681", "e18480e185aee186bc"],
- ["eab681", "eab5ace186bc"],
- ["eab682", "e18480e185aee186bd"],
- ["eab682", "eab5ace186bd"],
- ["eab683", "e18480e185aee186be"],
- ["eab683", "eab5ace186be"],
- ["eab684", "e18480e185aee186bf"],
- ["eab684", "eab5ace186bf"],
- ["eab685", "e18480e185aee18780"],
- ["eab685", "eab5ace18780"],
- ["eab686", "e18480e185aee18781"],
- ["eab686", "eab5ace18781"],
- ["eab687", "e18480e185aee18782"],
- ["eab687", "eab5ace18782"],
- ["eab688", "e18480e185af"],
- ["eab689", "e18480e185afe186a8"],
- ["eab689", "eab688e186a8"],
- ["eab68a", "e18480e185afe186a9"],
- ["eab68a", "eab688e186a9"],
- ["eab68b", "e18480e185afe186aa"],
- ["eab68b", "eab688e186aa"],
- ["eab68c", "e18480e185afe186ab"],
- ["eab68c", "eab688e186ab"],
- ["eab68d", "e18480e185afe186ac"],
- ["eab68d", "eab688e186ac"],
- ["eab68e", "e18480e185afe186ad"],
- ["eab68e", "eab688e186ad"],
- ["eab68f", "e18480e185afe186ae"],
- ["eab68f", "eab688e186ae"],
- ["eab690", "e18480e185afe186af"],
- ["eab690", "eab688e186af"],
- ["eab691", "e18480e185afe186b0"],
- ["eab691", "eab688e186b0"],
- ["eab692", "e18480e185afe186b1"],
- ["eab692", "eab688e186b1"],
- ["eab693", "e18480e185afe186b2"],
- ["eab693", "eab688e186b2"],
- ["eab694", "e18480e185afe186b3"],
- ["eab694", "eab688e186b3"],
- ["eab695", "e18480e185afe186b4"],
- ["eab695", "eab688e186b4"],
- ["eab696", "e18480e185afe186b5"],
- ["eab696", "eab688e186b5"],
- ["eab697", "e18480e185afe186b6"],
- ["eab697", "eab688e186b6"],
- ["eab698", "e18480e185afe186b7"],
- ["eab698", "eab688e186b7"],
- ["eab699", "e18480e185afe186b8"],
- ["eab699", "eab688e186b8"],
- ["eab69a", "e18480e185afe186b9"],
- ["eab69a", "eab688e186b9"],
- ["eab69b", "e18480e185afe186ba"],
- ["eab69b", "eab688e186ba"],
- ["eab69c", "e18480e185afe186bb"],
- ["eab69c", "eab688e186bb"],
- ["eab69d", "e18480e185afe186bc"],
- ["eab69d", "eab688e186bc"],
- ["eab69e", "e18480e185afe186bd"],
- ["eab69e", "eab688e186bd"],
- ["eab69f", "e18480e185afe186be"],
- ["eab69f", "eab688e186be"],
- ["eab6a0", "e18480e185afe186bf"],
- ["eab6a0", "eab688e186bf"],
- ["eab6a1", "e18480e185afe18780"],
- ["eab6a1", "eab688e18780"],
- ["eab6a2", "e18480e185afe18781"],
- ["eab6a2", "eab688e18781"],
- ["eab6a3", "e18480e185afe18782"],
- ["eab6a3", "eab688e18782"],
- ["eab6a4", "e18480e185b0"],
- ["eab6a5", "e18480e185b0e186a8"],
- ["eab6a5", "eab6a4e186a8"],
- ["eab6a6", "e18480e185b0e186a9"],
- ["eab6a6", "eab6a4e186a9"],
- ["eab6a7", "e18480e185b0e186aa"],
- ["eab6a7", "eab6a4e186aa"],
- ["eab6a8", "e18480e185b0e186ab"],
- ["eab6a8", "eab6a4e186ab"],
- ["eab6a9", "e18480e185b0e186ac"],
- ["eab6a9", "eab6a4e186ac"],
- ["eab6aa", "e18480e185b0e186ad"],
- ["eab6aa", "eab6a4e186ad"],
- ["eab6ab", "e18480e185b0e186ae"],
- ["eab6ab", "eab6a4e186ae"],
- ["eab6ac", "e18480e185b0e186af"],
- ["eab6ac", "eab6a4e186af"],
- ["eab6ad", "e18480e185b0e186b0"],
- ["eab6ad", "eab6a4e186b0"],
- ["eab6ae", "e18480e185b0e186b1"],
- ["eab6ae", "eab6a4e186b1"],
- ["eab6af", "e18480e185b0e186b2"],
- ["eab6af", "eab6a4e186b2"],
- ["eab6b0", "e18480e185b0e186b3"],
- ["eab6b0", "eab6a4e186b3"],
- ["eab6b1", "e18480e185b0e186b4"],
- ["eab6b1", "eab6a4e186b4"],
- ["eab6b2", "e18480e185b0e186b5"],
- ["eab6b2", "eab6a4e186b5"],
- ["eab6b3", "e18480e185b0e186b6"],
- ["eab6b3", "eab6a4e186b6"],
- ["eab6b4", "e18480e185b0e186b7"],
- ["eab6b4", "eab6a4e186b7"],
- ["eab6b5", "e18480e185b0e186b8"],
- ["eab6b5", "eab6a4e186b8"],
- ["eab6b6", "e18480e185b0e186b9"],
- ["eab6b6", "eab6a4e186b9"],
- ["eab6b7", "e18480e185b0e186ba"],
- ["eab6b7", "eab6a4e186ba"],
- ["eab6b8", "e18480e185b0e186bb"],
- ["eab6b8", "eab6a4e186bb"],
- ["eab6b9", "e18480e185b0e186bc"],
- ["eab6b9", "eab6a4e186bc"],
- ["eab6ba", "e18480e185b0e186bd"],
- ["eab6ba", "eab6a4e186bd"],
- ["eab6bb", "e18480e185b0e186be"],
- ["eab6bb", "eab6a4e186be"],
- ["eab6bc", "e18480e185b0e186bf"],
- ["eab6bc", "eab6a4e186bf"],
- ["eab6bd", "e18480e185b0e18780"],
- ["eab6bd", "eab6a4e18780"],
- ["eab6be", "e18480e185b0e18781"],
- ["eab6be", "eab6a4e18781"],
- ["eab6bf", "e18480e185b0e18782"],
- ["eab6bf", "eab6a4e18782"],
- ["eab780", "e18480e185b1"],
- ["eab781", "e18480e185b1e186a8"],
- ["eab781", "eab780e186a8"],
- ["eab782", "e18480e185b1e186a9"],
- ["eab782", "eab780e186a9"],
- ["eab783", "e18480e185b1e186aa"],
- ["eab783", "eab780e186aa"],
- ["eab784", "e18480e185b1e186ab"],
- ["eab784", "eab780e186ab"],
- ["eab785", "e18480e185b1e186ac"],
- ["eab785", "eab780e186ac"],
- ["eab786", "e18480e185b1e186ad"],
- ["eab786", "eab780e186ad"],
- ["eab787", "e18480e185b1e186ae"],
- ["eab787", "eab780e186ae"],
- ["eab788", "e18480e185b1e186af"],
- ["eab788", "eab780e186af"],
- ["eab789", "e18480e185b1e186b0"],
- ["eab789", "eab780e186b0"],
- ["eab78a", "e18480e185b1e186b1"],
- ["eab78a", "eab780e186b1"],
- ["eab78b", "e18480e185b1e186b2"],
- ["eab78b", "eab780e186b2"],
- ["eab78c", "e18480e185b1e186b3"],
- ["eab78c", "eab780e186b3"],
- ["eab78d", "e18480e185b1e186b4"],
- ["eab78d", "eab780e186b4"],
- ["eab78e", "e18480e185b1e186b5"],
- ["eab78e", "eab780e186b5"],
- ["eab78f", "e18480e185b1e186b6"],
- ["eab78f", "eab780e186b6"],
- ["eab790", "e18480e185b1e186b7"],
- ["eab790", "eab780e186b7"],
- ["eab791", "e18480e185b1e186b8"],
- ["eab791", "eab780e186b8"],
- ["eab792", "e18480e185b1e186b9"],
- ["eab792", "eab780e186b9"],
- ["eab793", "e18480e185b1e186ba"],
- ["eab793", "eab780e186ba"],
- ["eab794", "e18480e185b1e186bb"],
- ["eab794", "eab780e186bb"],
- ["eab795", "e18480e185b1e186bc"],
- ["eab795", "eab780e186bc"],
- ["eab796", "e18480e185b1e186bd"],
- ["eab796", "eab780e186bd"],
- ["eab797", "e18480e185b1e186be"],
- ["eab797", "eab780e186be"],
- ["eab798", "e18480e185b1e186bf"],
- ["eab798", "eab780e186bf"],
- ["eab799", "e18480e185b1e18780"],
- ["eab799", "eab780e18780"],
- ["eab79a", "e18480e185b1e18781"],
- ["eab79a", "eab780e18781"],
- ["eab79b", "e18480e185b1e18782"],
- ["eab79b", "eab780e18782"],
- ["eab79c", "e18480e185b2"],
- ["eab79d", "e18480e185b2e186a8"],
- ["eab79d", "eab79ce186a8"],
- ["eab79e", "e18480e185b2e186a9"],
- ["eab79e", "eab79ce186a9"],
- ["eab79f", "e18480e185b2e186aa"],
- ["eab79f", "eab79ce186aa"],
- ["eab7a0", "e18480e185b2e186ab"],
- ["eab7a0", "eab79ce186ab"],
- ["eab7a1", "e18480e185b2e186ac"],
- ["eab7a1", "eab79ce186ac"],
- ["eab7a2", "e18480e185b2e186ad"],
- ["eab7a2", "eab79ce186ad"],
- ["eab7a3", "e18480e185b2e186ae"],
- ["eab7a3", "eab79ce186ae"],
- ["eab7a4", "e18480e185b2e186af"],
- ["eab7a4", "eab79ce186af"],
- ["eab7a5", "e18480e185b2e186b0"],
- ["eab7a5", "eab79ce186b0"],
- ["eab7a6", "e18480e185b2e186b1"],
- ["eab7a6", "eab79ce186b1"],
- ["eab7a7", "e18480e185b2e186b2"],
- ["eab7a7", "eab79ce186b2"],
- ["eab7a8", "e18480e185b2e186b3"],
- ["eab7a8", "eab79ce186b3"],
- ["eab7a9", "e18480e185b2e186b4"],
- ["eab7a9", "eab79ce186b4"],
- ["eab7aa", "e18480e185b2e186b5"],
- ["eab7aa", "eab79ce186b5"],
- ["eab7ab", "e18480e185b2e186b6"],
- ["eab7ab", "eab79ce186b6"],
- ["eab7ac", "e18480e185b2e186b7"],
- ["eab7ac", "eab79ce186b7"],
- ["eab7ad", "e18480e185b2e186b8"],
- ["eab7ad", "eab79ce186b8"],
- ["eab7ae", "e18480e185b2e186b9"],
- ["eab7ae", "eab79ce186b9"],
- ["eab7af", "e18480e185b2e186ba"],
- ["eab7af", "eab79ce186ba"],
- ["eab7b0", "e18480e185b2e186bb"],
- ["eab7b0", "eab79ce186bb"],
- ["eab7b1", "e18480e185b2e186bc"],
- ["eab7b1", "eab79ce186bc"],
- ["eab7b2", "e18480e185b2e186bd"],
- ["eab7b2", "eab79ce186bd"],
- ["eab7b3", "e18480e185b2e186be"],
- ["eab7b3", "eab79ce186be"],
- ["eab7b4", "e18480e185b2e186bf"],
- ["eab7b4", "eab79ce186bf"],
- ["eab7b5", "e18480e185b2e18780"],
- ["eab7b5", "eab79ce18780"],
- ["eab7b6", "e18480e185b2e18781"],
- ["eab7b6", "eab79ce18781"],
- ["eab7b7", "e18480e185b2e18782"],
- ["eab7b7", "eab79ce18782"],
- ["eab7b8", "e18480e185b3"],
- ["eab7b9", "e18480e185b3e186a8"],
- ["eab7b9", "eab7b8e186a8"],
- ["eab7ba", "e18480e185b3e186a9"],
- ["eab7ba", "eab7b8e186a9"],
- ["eab7bb", "e18480e185b3e186aa"],
- ["eab7bb", "eab7b8e186aa"],
- ["eab7bc", "e18480e185b3e186ab"],
- ["eab7bc", "eab7b8e186ab"],
- ["eab7bd", "e18480e185b3e186ac"],
- ["eab7bd", "eab7b8e186ac"],
- ["eab7be", "e18480e185b3e186ad"],
- ["eab7be", "eab7b8e186ad"],
- ["eab7bf", "e18480e185b3e186ae"],
- ["eab7bf", "eab7b8e186ae"],
- ["eab880", "e18480e185b3e186af"],
- ["eab880", "eab7b8e186af"],
- ["eab881", "e18480e185b3e186b0"],
- ["eab881", "eab7b8e186b0"],
- ["eab882", "e18480e185b3e186b1"],
- ["eab882", "eab7b8e186b1"],
- ["eab883", "e18480e185b3e186b2"],
- ["eab883", "eab7b8e186b2"],
- ["eab884", "e18480e185b3e186b3"],
- ["eab884", "eab7b8e186b3"],
- ["eab885", "e18480e185b3e186b4"],
- ["eab885", "eab7b8e186b4"],
- ["eab886", "e18480e185b3e186b5"],
- ["eab886", "eab7b8e186b5"],
- ["eab887", "e18480e185b3e186b6"],
- ["eab887", "eab7b8e186b6"],
- ["eab888", "e18480e185b3e186b7"],
- ["eab888", "eab7b8e186b7"],
- ["eab889", "e18480e185b3e186b8"],
- ["eab889", "eab7b8e186b8"],
- ["eab88a", "e18480e185b3e186b9"],
- ["eab88a", "eab7b8e186b9"],
- ["eab88b", "e18480e185b3e186ba"],
- ["eab88b", "eab7b8e186ba"],
- ["eab88c", "e18480e185b3e186bb"],
- ["eab88c", "eab7b8e186bb"],
- ["eab88d", "e18480e185b3e186bc"],
- ["eab88d", "eab7b8e186bc"],
- ["eab88e", "e18480e185b3e186bd"],
- ["eab88e", "eab7b8e186bd"],
- ["eab88f", "e18480e185b3e186be"],
- ["eab88f", "eab7b8e186be"],
- ["eab890", "e18480e185b3e186bf"],
- ["eab890", "eab7b8e186bf"],
- ["eab891", "e18480e185b3e18780"],
- ["eab891", "eab7b8e18780"],
- ["eab892", "e18480e185b3e18781"],
- ["eab892", "eab7b8e18781"],
- ["eab893", "e18480e185b3e18782"],
- ["eab893", "eab7b8e18782"],
- ["eab894", "e18480e185b4"],
- ["eab895", "e18480e185b4e186a8"],
- ["eab895", "eab894e186a8"],
- ["eab896", "e18480e185b4e186a9"],
- ["eab896", "eab894e186a9"],
- ["eab897", "e18480e185b4e186aa"],
- ["eab897", "eab894e186aa"],
- ["eab898", "e18480e185b4e186ab"],
- ["eab898", "eab894e186ab"],
- ["eab899", "e18480e185b4e186ac"],
- ["eab899", "eab894e186ac"],
- ["eab89a", "e18480e185b4e186ad"],
- ["eab89a", "eab894e186ad"],
- ["eab89b", "e18480e185b4e186ae"],
- ["eab89b", "eab894e186ae"],
- ["eab89c", "e18480e185b4e186af"],
- ["eab89c", "eab894e186af"],
- ["eab89d", "e18480e185b4e186b0"],
- ["eab89d", "eab894e186b0"],
- ["eab89e", "e18480e185b4e186b1"],
- ["eab89e", "eab894e186b1"],
- ["eab89f", "e18480e185b4e186b2"],
- ["eab89f", "eab894e186b2"],
- ["eab8a0", "e18480e185b4e186b3"],
- ["eab8a0", "eab894e186b3"],
- ["eab8a1", "e18480e185b4e186b4"],
- ["eab8a1", "eab894e186b4"],
- ["eab8a2", "e18480e185b4e186b5"],
- ["eab8a2", "eab894e186b5"],
- ["eab8a3", "e18480e185b4e186b6"],
- ["eab8a3", "eab894e186b6"],
- ["eab8a4", "e18480e185b4e186b7"],
- ["eab8a4", "eab894e186b7"],
- ["eab8a5", "e18480e185b4e186b8"],
- ["eab8a5", "eab894e186b8"],
- ["eab8a6", "e18480e185b4e186b9"],
- ["eab8a6", "eab894e186b9"],
- ["eab8a7", "e18480e185b4e186ba"],
- ["eab8a7", "eab894e186ba"],
- ["eab8a8", "e18480e185b4e186bb"],
- ["eab8a8", "eab894e186bb"],
- ["eab8a9", "e18480e185b4e186bc"],
- ["eab8a9", "eab894e186bc"],
- ["eab8aa", "e18480e185b4e186bd"],
- ["eab8aa", "eab894e186bd"],
- ["eab8ab", "e18480e185b4e186be"],
- ["eab8ab", "eab894e186be"],
- ["eab8ac", "e18480e185b4e186bf"],
- ["eab8ac", "eab894e186bf"],
- ["eab8ad", "e18480e185b4e18780"],
- ["eab8ad", "eab894e18780"],
- ["eab8ae", "e18480e185b4e18781"],
- ["eab8ae", "eab894e18781"],
- ["eab8af", "e18480e185b4e18782"],
- ["eab8af", "eab894e18782"],
- ["eab8b0", "e18480e185b5"],
- ["eab8b1", "e18480e185b5e186a8"],
- ["eab8b1", "eab8b0e186a8"],
- ["eab8b2", "e18480e185b5e186a9"],
- ["eab8b2", "eab8b0e186a9"],
- ["eab8b3", "e18480e185b5e186aa"],
- ["eab8b3", "eab8b0e186aa"],
- ["eab8b4", "e18480e185b5e186ab"],
- ["eab8b4", "eab8b0e186ab"],
- ["eab8b5", "e18480e185b5e186ac"],
- ["eab8b5", "eab8b0e186ac"],
- ["eab8b6", "e18480e185b5e186ad"],
- ["eab8b6", "eab8b0e186ad"],
- ["eab8b7", "e18480e185b5e186ae"],
- ["eab8b7", "eab8b0e186ae"],
- ["eab8b8", "e18480e185b5e186af"],
- ["eab8b8", "eab8b0e186af"],
- ["eab8b9", "e18480e185b5e186b0"],
- ["eab8b9", "eab8b0e186b0"],
- ["eab8ba", "e18480e185b5e186b1"],
- ["eab8ba", "eab8b0e186b1"],
- ["eab8bb", "e18480e185b5e186b2"],
- ["eab8bb", "eab8b0e186b2"],
- ["eab8bc", "e18480e185b5e186b3"],
- ["eab8bc", "eab8b0e186b3"],
- ["eab8bd", "e18480e185b5e186b4"],
- ["eab8bd", "eab8b0e186b4"],
- ["eab8be", "e18480e185b5e186b5"],
- ["eab8be", "eab8b0e186b5"],
- ["eab8bf", "e18480e185b5e186b6"],
- ["eab8bf", "eab8b0e186b6"],
- ["eab980", "e18480e185b5e186b7"],
- ["eab980", "eab8b0e186b7"],
- ["eab981", "e18480e185b5e186b8"],
- ["eab981", "eab8b0e186b8"],
- ["eab982", "e18480e185b5e186b9"],
- ["eab982", "eab8b0e186b9"],
- ["eab983", "e18480e185b5e186ba"],
- ["eab983", "eab8b0e186ba"],
- ["eab984", "e18480e185b5e186bb"],
- ["eab984", "eab8b0e186bb"],
- ["eab985", "e18480e185b5e186bc"],
- ["eab985", "eab8b0e186bc"],
- ["eab986", "e18480e185b5e186bd"],
- ["eab986", "eab8b0e186bd"],
- ["eab987", "e18480e185b5e186be"],
- ["eab987", "eab8b0e186be"],
- ["eab988", "e18480e185b5e186bf"],
- ["eab988", "eab8b0e186bf"],
- ["eab989", "e18480e185b5e18780"],
- ["eab989", "eab8b0e18780"],
- ["eab98a", "e18480e185b5e18781"],
- ["eab98a", "eab8b0e18781"],
- ["eab98b", "e18480e185b5e18782"],
- ["eab98b", "eab8b0e18782"],
- ["eab98c", "e18481e185a1"],
- ["eab98d", "e18481e185a1e186a8"],
- ["eab98d", "eab98ce186a8"],
- ["eab98e", "e18481e185a1e186a9"],
- ["eab98e", "eab98ce186a9"],
- ["eab98f", "e18481e185a1e186aa"],
- ["eab98f", "eab98ce186aa"],
- ["eab990", "e18481e185a1e186ab"],
- ["eab990", "eab98ce186ab"],
- ["eab991", "e18481e185a1e186ac"],
- ["eab991", "eab98ce186ac"],
- ["eab992", "e18481e185a1e186ad"],
- ["eab992", "eab98ce186ad"],
- ["eab993", "e18481e185a1e186ae"],
- ["eab993", "eab98ce186ae"],
- ["eab994", "e18481e185a1e186af"],
- ["eab994", "eab98ce186af"],
- ["eab995", "e18481e185a1e186b0"],
- ["eab995", "eab98ce186b0"],
- ["eab996", "e18481e185a1e186b1"],
- ["eab996", "eab98ce186b1"],
- ["eab997", "e18481e185a1e186b2"],
- ["eab997", "eab98ce186b2"],
- ["eab998", "e18481e185a1e186b3"],
- ["eab998", "eab98ce186b3"],
- ["eab999", "e18481e185a1e186b4"],
- ["eab999", "eab98ce186b4"],
- ["eab99a", "e18481e185a1e186b5"],
- ["eab99a", "eab98ce186b5"],
- ["eab99b", "e18481e185a1e186b6"],
- ["eab99b", "eab98ce186b6"],
- ["eab99c", "e18481e185a1e186b7"],
- ["eab99c", "eab98ce186b7"],
- ["eab99d", "e18481e185a1e186b8"],
- ["eab99d", "eab98ce186b8"],
- ["eab99e", "e18481e185a1e186b9"],
- ["eab99e", "eab98ce186b9"],
- ["eab99f", "e18481e185a1e186ba"],
- ["eab99f", "eab98ce186ba"],
- ["eab9a0", "e18481e185a1e186bb"],
- ["eab9a0", "eab98ce186bb"],
- ["eab9a1", "e18481e185a1e186bc"],
- ["eab9a1", "eab98ce186bc"],
- ["eab9a2", "e18481e185a1e186bd"],
- ["eab9a2", "eab98ce186bd"],
- ["eab9a3", "e18481e185a1e186be"],
- ["eab9a3", "eab98ce186be"],
- ["eab9a4", "e18481e185a1e186bf"],
- ["eab9a4", "eab98ce186bf"],
- ["eab9a5", "e18481e185a1e18780"],
- ["eab9a5", "eab98ce18780"],
- ["eab9a6", "e18481e185a1e18781"],
- ["eab9a6", "eab98ce18781"],
- ["eab9a7", "e18481e185a1e18782"],
- ["eab9a7", "eab98ce18782"],
- ["eab9a8", "e18481e185a2"],
- ["eab9a9", "e18481e185a2e186a8"],
- ["eab9a9", "eab9a8e186a8"],
- ["eab9aa", "e18481e185a2e186a9"],
- ["eab9aa", "eab9a8e186a9"],
- ["eab9ab", "e18481e185a2e186aa"],
- ["eab9ab", "eab9a8e186aa"],
- ["eab9ac", "e18481e185a2e186ab"],
- ["eab9ac", "eab9a8e186ab"],
- ["eab9ad", "e18481e185a2e186ac"],
- ["eab9ad", "eab9a8e186ac"],
- ["eab9ae", "e18481e185a2e186ad"],
- ["eab9ae", "eab9a8e186ad"],
- ["eab9af", "e18481e185a2e186ae"],
- ["eab9af", "eab9a8e186ae"],
- ["eab9b0", "e18481e185a2e186af"],
- ["eab9b0", "eab9a8e186af"],
- ["eab9b1", "e18481e185a2e186b0"],
- ["eab9b1", "eab9a8e186b0"],
- ["eab9b2", "e18481e185a2e186b1"],
- ["eab9b2", "eab9a8e186b1"],
- ["eab9b3", "e18481e185a2e186b2"],
- ["eab9b3", "eab9a8e186b2"],
- ["eab9b4", "e18481e185a2e186b3"],
- ["eab9b4", "eab9a8e186b3"],
- ["eab9b5", "e18481e185a2e186b4"],
- ["eab9b5", "eab9a8e186b4"],
- ["eab9b6", "e18481e185a2e186b5"],
- ["eab9b6", "eab9a8e186b5"],
- ["eab9b7", "e18481e185a2e186b6"],
- ["eab9b7", "eab9a8e186b6"],
- ["eab9b8", "e18481e185a2e186b7"],
- ["eab9b8", "eab9a8e186b7"],
- ["eab9b9", "e18481e185a2e186b8"],
- ["eab9b9", "eab9a8e186b8"],
- ["eab9ba", "e18481e185a2e186b9"],
- ["eab9ba", "eab9a8e186b9"],
- ["eab9bb", "e18481e185a2e186ba"],
- ["eab9bb", "eab9a8e186ba"],
- ["eab9bc", "e18481e185a2e186bb"],
- ["eab9bc", "eab9a8e186bb"],
- ["eab9bd", "e18481e185a2e186bc"],
- ["eab9bd", "eab9a8e186bc"],
- ["eab9be", "e18481e185a2e186bd"],
- ["eab9be", "eab9a8e186bd"],
- ["eab9bf", "e18481e185a2e186be"],
- ["eab9bf", "eab9a8e186be"],
- ["eaba80", "e18481e185a2e186bf"],
- ["eaba80", "eab9a8e186bf"],
- ["eaba81", "e18481e185a2e18780"],
- ["eaba81", "eab9a8e18780"],
- ["eaba82", "e18481e185a2e18781"],
- ["eaba82", "eab9a8e18781"],
- ["eaba83", "e18481e185a2e18782"],
- ["eaba83", "eab9a8e18782"],
- ["eaba84", "e18481e185a3"],
- ["eaba85", "e18481e185a3e186a8"],
- ["eaba85", "eaba84e186a8"],
- ["eaba86", "e18481e185a3e186a9"],
- ["eaba86", "eaba84e186a9"],
- ["eaba87", "e18481e185a3e186aa"],
- ["eaba87", "eaba84e186aa"],
- ["eaba88", "e18481e185a3e186ab"],
- ["eaba88", "eaba84e186ab"],
- ["eaba89", "e18481e185a3e186ac"],
- ["eaba89", "eaba84e186ac"],
- ["eaba8a", "e18481e185a3e186ad"],
- ["eaba8a", "eaba84e186ad"],
- ["eaba8b", "e18481e185a3e186ae"],
- ["eaba8b", "eaba84e186ae"],
- ["eaba8c", "e18481e185a3e186af"],
- ["eaba8c", "eaba84e186af"],
- ["eaba8d", "e18481e185a3e186b0"],
- ["eaba8d", "eaba84e186b0"],
- ["eaba8e", "e18481e185a3e186b1"],
- ["eaba8e", "eaba84e186b1"],
- ["eaba8f", "e18481e185a3e186b2"],
- ["eaba8f", "eaba84e186b2"],
- ["eaba90", "e18481e185a3e186b3"],
- ["eaba90", "eaba84e186b3"],
- ["eaba91", "e18481e185a3e186b4"],
- ["eaba91", "eaba84e186b4"],
- ["eaba92", "e18481e185a3e186b5"],
- ["eaba92", "eaba84e186b5"],
- ["eaba93", "e18481e185a3e186b6"],
- ["eaba93", "eaba84e186b6"],
- ["eaba94", "e18481e185a3e186b7"],
- ["eaba94", "eaba84e186b7"],
- ["eaba95", "e18481e185a3e186b8"],
- ["eaba95", "eaba84e186b8"],
- ["eaba96", "e18481e185a3e186b9"],
- ["eaba96", "eaba84e186b9"],
- ["eaba97", "e18481e185a3e186ba"],
- ["eaba97", "eaba84e186ba"],
- ["eaba98", "e18481e185a3e186bb"],
- ["eaba98", "eaba84e186bb"],
- ["eaba99", "e18481e185a3e186bc"],
- ["eaba99", "eaba84e186bc"],
- ["eaba9a", "e18481e185a3e186bd"],
- ["eaba9a", "eaba84e186bd"],
- ["eaba9b", "e18481e185a3e186be"],
- ["eaba9b", "eaba84e186be"],
- ["eaba9c", "e18481e185a3e186bf"],
- ["eaba9c", "eaba84e186bf"],
- ["eaba9d", "e18481e185a3e18780"],
- ["eaba9d", "eaba84e18780"],
- ["eaba9e", "e18481e185a3e18781"],
- ["eaba9e", "eaba84e18781"],
- ["eaba9f", "e18481e185a3e18782"],
- ["eaba9f", "eaba84e18782"],
- ["eabaa0", "e18481e185a4"],
- ["eabaa1", "e18481e185a4e186a8"],
- ["eabaa1", "eabaa0e186a8"],
- ["eabaa2", "e18481e185a4e186a9"],
- ["eabaa2", "eabaa0e186a9"],
- ["eabaa3", "e18481e185a4e186aa"],
- ["eabaa3", "eabaa0e186aa"],
- ["eabaa4", "e18481e185a4e186ab"],
- ["eabaa4", "eabaa0e186ab"],
- ["eabaa5", "e18481e185a4e186ac"],
- ["eabaa5", "eabaa0e186ac"],
- ["eabaa6", "e18481e185a4e186ad"],
- ["eabaa6", "eabaa0e186ad"],
- ["eabaa7", "e18481e185a4e186ae"],
- ["eabaa7", "eabaa0e186ae"],
- ["eabaa8", "e18481e185a4e186af"],
- ["eabaa8", "eabaa0e186af"],
- ["eabaa9", "e18481e185a4e186b0"],
- ["eabaa9", "eabaa0e186b0"],
- ["eabaaa", "e18481e185a4e186b1"],
- ["eabaaa", "eabaa0e186b1"],
- ["eabaab", "e18481e185a4e186b2"],
- ["eabaab", "eabaa0e186b2"],
- ["eabaac", "e18481e185a4e186b3"],
- ["eabaac", "eabaa0e186b3"],
- ["eabaad", "e18481e185a4e186b4"],
- ["eabaad", "eabaa0e186b4"],
- ["eabaae", "e18481e185a4e186b5"],
- ["eabaae", "eabaa0e186b5"],
- ["eabaaf", "e18481e185a4e186b6"],
- ["eabaaf", "eabaa0e186b6"],
- ["eabab0", "e18481e185a4e186b7"],
- ["eabab0", "eabaa0e186b7"],
- ["eabab1", "e18481e185a4e186b8"],
- ["eabab1", "eabaa0e186b8"],
- ["eabab2", "e18481e185a4e186b9"],
- ["eabab2", "eabaa0e186b9"],
- ["eabab3", "e18481e185a4e186ba"],
- ["eabab3", "eabaa0e186ba"],
- ["eabab4", "e18481e185a4e186bb"],
- ["eabab4", "eabaa0e186bb"],
- ["eabab5", "e18481e185a4e186bc"],
- ["eabab5", "eabaa0e186bc"],
- ["eabab6", "e18481e185a4e186bd"],
- ["eabab6", "eabaa0e186bd"],
- ["eabab7", "e18481e185a4e186be"],
- ["eabab7", "eabaa0e186be"],
- ["eabab8", "e18481e185a4e186bf"],
- ["eabab8", "eabaa0e186bf"],
- ["eabab9", "e18481e185a4e18780"],
- ["eabab9", "eabaa0e18780"],
- ["eababa", "e18481e185a4e18781"],
- ["eababa", "eabaa0e18781"],
- ["eababb", "e18481e185a4e18782"],
- ["eababb", "eabaa0e18782"],
- ["eababc", "e18481e185a5"],
- ["eababd", "e18481e185a5e186a8"],
- ["eababd", "eababce186a8"],
- ["eababe", "e18481e185a5e186a9"],
- ["eababe", "eababce186a9"],
- ["eababf", "e18481e185a5e186aa"],
- ["eababf", "eababce186aa"],
- ["eabb80", "e18481e185a5e186ab"],
- ["eabb80", "eababce186ab"],
- ["eabb81", "e18481e185a5e186ac"],
- ["eabb81", "eababce186ac"],
- ["eabb82", "e18481e185a5e186ad"],
- ["eabb82", "eababce186ad"],
- ["eabb83", "e18481e185a5e186ae"],
- ["eabb83", "eababce186ae"],
- ["eabb84", "e18481e185a5e186af"],
- ["eabb84", "eababce186af"],
- ["eabb85", "e18481e185a5e186b0"],
- ["eabb85", "eababce186b0"],
- ["eabb86", "e18481e185a5e186b1"],
- ["eabb86", "eababce186b1"],
- ["eabb87", "e18481e185a5e186b2"],
- ["eabb87", "eababce186b2"],
- ["eabb88", "e18481e185a5e186b3"],
- ["eabb88", "eababce186b3"],
- ["eabb89", "e18481e185a5e186b4"],
- ["eabb89", "eababce186b4"],
- ["eabb8a", "e18481e185a5e186b5"],
- ["eabb8a", "eababce186b5"],
- ["eabb8b", "e18481e185a5e186b6"],
- ["eabb8b", "eababce186b6"],
- ["eabb8c", "e18481e185a5e186b7"],
- ["eabb8c", "eababce186b7"],
- ["eabb8d", "e18481e185a5e186b8"],
- ["eabb8d", "eababce186b8"],
- ["eabb8e", "e18481e185a5e186b9"],
- ["eabb8e", "eababce186b9"],
- ["eabb8f", "e18481e185a5e186ba"],
- ["eabb8f", "eababce186ba"],
- ["eabb90", "e18481e185a5e186bb"],
- ["eabb90", "eababce186bb"],
- ["eabb91", "e18481e185a5e186bc"],
- ["eabb91", "eababce186bc"],
- ["eabb92", "e18481e185a5e186bd"],
- ["eabb92", "eababce186bd"],
- ["eabb93", "e18481e185a5e186be"],
- ["eabb93", "eababce186be"],
- ["eabb94", "e18481e185a5e186bf"],
- ["eabb94", "eababce186bf"],
- ["eabb95", "e18481e185a5e18780"],
- ["eabb95", "eababce18780"],
- ["eabb96", "e18481e185a5e18781"],
- ["eabb96", "eababce18781"],
- ["eabb97", "e18481e185a5e18782"],
- ["eabb97", "eababce18782"],
- ["eabb98", "e18481e185a6"],
- ["eabb99", "e18481e185a6e186a8"],
- ["eabb99", "eabb98e186a8"],
- ["eabb9a", "e18481e185a6e186a9"],
- ["eabb9a", "eabb98e186a9"],
- ["eabb9b", "e18481e185a6e186aa"],
- ["eabb9b", "eabb98e186aa"],
- ["eabb9c", "e18481e185a6e186ab"],
- ["eabb9c", "eabb98e186ab"],
- ["eabb9d", "e18481e185a6e186ac"],
- ["eabb9d", "eabb98e186ac"],
- ["eabb9e", "e18481e185a6e186ad"],
- ["eabb9e", "eabb98e186ad"],
- ["eabb9f", "e18481e185a6e186ae"],
- ["eabb9f", "eabb98e186ae"],
- ["eabba0", "e18481e185a6e186af"],
- ["eabba0", "eabb98e186af"],
- ["eabba1", "e18481e185a6e186b0"],
- ["eabba1", "eabb98e186b0"],
- ["eabba2", "e18481e185a6e186b1"],
- ["eabba2", "eabb98e186b1"],
- ["eabba3", "e18481e185a6e186b2"],
- ["eabba3", "eabb98e186b2"],
- ["eabba4", "e18481e185a6e186b3"],
- ["eabba4", "eabb98e186b3"],
- ["eabba5", "e18481e185a6e186b4"],
- ["eabba5", "eabb98e186b4"],
- ["eabba6", "e18481e185a6e186b5"],
- ["eabba6", "eabb98e186b5"],
- ["eabba7", "e18481e185a6e186b6"],
- ["eabba7", "eabb98e186b6"],
- ["eabba8", "e18481e185a6e186b7"],
- ["eabba8", "eabb98e186b7"],
- ["eabba9", "e18481e185a6e186b8"],
- ["eabba9", "eabb98e186b8"],
- ["eabbaa", "e18481e185a6e186b9"],
- ["eabbaa", "eabb98e186b9"],
- ["eabbab", "e18481e185a6e186ba"],
- ["eabbab", "eabb98e186ba"],
- ["eabbac", "e18481e185a6e186bb"],
- ["eabbac", "eabb98e186bb"],
- ["eabbad", "e18481e185a6e186bc"],
- ["eabbad", "eabb98e186bc"],
- ["eabbae", "e18481e185a6e186bd"],
- ["eabbae", "eabb98e186bd"],
- ["eabbaf", "e18481e185a6e186be"],
- ["eabbaf", "eabb98e186be"],
- ["eabbb0", "e18481e185a6e186bf"],
- ["eabbb0", "eabb98e186bf"],
- ["eabbb1", "e18481e185a6e18780"],
- ["eabbb1", "eabb98e18780"],
- ["eabbb2", "e18481e185a6e18781"],
- ["eabbb2", "eabb98e18781"],
- ["eabbb3", "e18481e185a6e18782"],
- ["eabbb3", "eabb98e18782"],
- ["eabbb4", "e18481e185a7"],
- ["eabbb5", "e18481e185a7e186a8"],
- ["eabbb5", "eabbb4e186a8"],
- ["eabbb6", "e18481e185a7e186a9"],
- ["eabbb6", "eabbb4e186a9"],
- ["eabbb7", "e18481e185a7e186aa"],
- ["eabbb7", "eabbb4e186aa"],
- ["eabbb8", "e18481e185a7e186ab"],
- ["eabbb8", "eabbb4e186ab"],
- ["eabbb9", "e18481e185a7e186ac"],
- ["eabbb9", "eabbb4e186ac"],
- ["eabbba", "e18481e185a7e186ad"],
- ["eabbba", "eabbb4e186ad"],
- ["eabbbb", "e18481e185a7e186ae"],
- ["eabbbb", "eabbb4e186ae"],
- ["eabbbc", "e18481e185a7e186af"],
- ["eabbbc", "eabbb4e186af"],
- ["eabbbd", "e18481e185a7e186b0"],
- ["eabbbd", "eabbb4e186b0"],
- ["eabbbe", "e18481e185a7e186b1"],
- ["eabbbe", "eabbb4e186b1"],
- ["eabbbf", "e18481e185a7e186b2"],
- ["eabbbf", "eabbb4e186b2"],
- ["eabc80", "e18481e185a7e186b3"],
- ["eabc80", "eabbb4e186b3"],
- ["eabc81", "e18481e185a7e186b4"],
- ["eabc81", "eabbb4e186b4"],
- ["eabc82", "e18481e185a7e186b5"],
- ["eabc82", "eabbb4e186b5"],
- ["eabc83", "e18481e185a7e186b6"],
- ["eabc83", "eabbb4e186b6"],
- ["eabc84", "e18481e185a7e186b7"],
- ["eabc84", "eabbb4e186b7"],
- ["eabc85", "e18481e185a7e186b8"],
- ["eabc85", "eabbb4e186b8"],
- ["eabc86", "e18481e185a7e186b9"],
- ["eabc86", "eabbb4e186b9"],
- ["eabc87", "e18481e185a7e186ba"],
- ["eabc87", "eabbb4e186ba"],
- ["eabc88", "e18481e185a7e186bb"],
- ["eabc88", "eabbb4e186bb"],
- ["eabc89", "e18481e185a7e186bc"],
- ["eabc89", "eabbb4e186bc"],
- ["eabc8a", "e18481e185a7e186bd"],
- ["eabc8a", "eabbb4e186bd"],
- ["eabc8b", "e18481e185a7e186be"],
- ["eabc8b", "eabbb4e186be"],
- ["eabc8c", "e18481e185a7e186bf"],
- ["eabc8c", "eabbb4e186bf"],
- ["eabc8d", "e18481e185a7e18780"],
- ["eabc8d", "eabbb4e18780"],
- ["eabc8e", "e18481e185a7e18781"],
- ["eabc8e", "eabbb4e18781"],
- ["eabc8f", "e18481e185a7e18782"],
- ["eabc8f", "eabbb4e18782"],
- ["eabc90", "e18481e185a8"],
- ["eabc91", "e18481e185a8e186a8"],
- ["eabc91", "eabc90e186a8"],
- ["eabc92", "e18481e185a8e186a9"],
- ["eabc92", "eabc90e186a9"],
- ["eabc93", "e18481e185a8e186aa"],
- ["eabc93", "eabc90e186aa"],
- ["eabc94", "e18481e185a8e186ab"],
- ["eabc94", "eabc90e186ab"],
- ["eabc95", "e18481e185a8e186ac"],
- ["eabc95", "eabc90e186ac"],
- ["eabc96", "e18481e185a8e186ad"],
- ["eabc96", "eabc90e186ad"],
- ["eabc97", "e18481e185a8e186ae"],
- ["eabc97", "eabc90e186ae"],
- ["eabc98", "e18481e185a8e186af"],
- ["eabc98", "eabc90e186af"],
- ["eabc99", "e18481e185a8e186b0"],
- ["eabc99", "eabc90e186b0"],
- ["eabc9a", "e18481e185a8e186b1"],
- ["eabc9a", "eabc90e186b1"],
- ["eabc9b", "e18481e185a8e186b2"],
- ["eabc9b", "eabc90e186b2"],
- ["eabc9c", "e18481e185a8e186b3"],
- ["eabc9c", "eabc90e186b3"],
- ["eabc9d", "e18481e185a8e186b4"],
- ["eabc9d", "eabc90e186b4"],
- ["eabc9e", "e18481e185a8e186b5"],
- ["eabc9e", "eabc90e186b5"],
- ["eabc9f", "e18481e185a8e186b6"],
- ["eabc9f", "eabc90e186b6"],
- ["eabca0", "e18481e185a8e186b7"],
- ["eabca0", "eabc90e186b7"],
- ["eabca1", "e18481e185a8e186b8"],
- ["eabca1", "eabc90e186b8"],
- ["eabca2", "e18481e185a8e186b9"],
- ["eabca2", "eabc90e186b9"],
- ["eabca3", "e18481e185a8e186ba"],
- ["eabca3", "eabc90e186ba"],
- ["eabca4", "e18481e185a8e186bb"],
- ["eabca4", "eabc90e186bb"],
- ["eabca5", "e18481e185a8e186bc"],
- ["eabca5", "eabc90e186bc"],
- ["eabca6", "e18481e185a8e186bd"],
- ["eabca6", "eabc90e186bd"],
- ["eabca7", "e18481e185a8e186be"],
- ["eabca7", "eabc90e186be"],
- ["eabca8", "e18481e185a8e186bf"],
- ["eabca8", "eabc90e186bf"],
- ["eabca9", "e18481e185a8e18780"],
- ["eabca9", "eabc90e18780"],
- ["eabcaa", "e18481e185a8e18781"],
- ["eabcaa", "eabc90e18781"],
- ["eabcab", "e18481e185a8e18782"],
- ["eabcab", "eabc90e18782"],
- ["eabcac", "e18481e185a9"],
- ["eabcad", "e18481e185a9e186a8"],
- ["eabcad", "eabcace186a8"],
- ["eabcae", "e18481e185a9e186a9"],
- ["eabcae", "eabcace186a9"],
- ["eabcaf", "e18481e185a9e186aa"],
- ["eabcaf", "eabcace186aa"],
- ["eabcb0", "e18481e185a9e186ab"],
- ["eabcb0", "eabcace186ab"],
- ["eabcb1", "e18481e185a9e186ac"],
- ["eabcb1", "eabcace186ac"],
- ["eabcb2", "e18481e185a9e186ad"],
- ["eabcb2", "eabcace186ad"],
- ["eabcb3", "e18481e185a9e186ae"],
- ["eabcb3", "eabcace186ae"],
- ["eabcb4", "e18481e185a9e186af"],
- ["eabcb4", "eabcace186af"],
- ["eabcb5", "e18481e185a9e186b0"],
- ["eabcb5", "eabcace186b0"],
- ["eabcb6", "e18481e185a9e186b1"],
- ["eabcb6", "eabcace186b1"],
- ["eabcb7", "e18481e185a9e186b2"],
- ["eabcb7", "eabcace186b2"],
- ["eabcb8", "e18481e185a9e186b3"],
- ["eabcb8", "eabcace186b3"],
- ["eabcb9", "e18481e185a9e186b4"],
- ["eabcb9", "eabcace186b4"],
- ["eabcba", "e18481e185a9e186b5"],
- ["eabcba", "eabcace186b5"],
- ["eabcbb", "e18481e185a9e186b6"],
- ["eabcbb", "eabcace186b6"],
- ["eabcbc", "e18481e185a9e186b7"],
- ["eabcbc", "eabcace186b7"],
- ["eabcbd", "e18481e185a9e186b8"],
- ["eabcbd", "eabcace186b8"],
- ["eabcbe", "e18481e185a9e186b9"],
- ["eabcbe", "eabcace186b9"],
- ["eabcbf", "e18481e185a9e186ba"],
- ["eabcbf", "eabcace186ba"],
- ["eabd80", "e18481e185a9e186bb"],
- ["eabd80", "eabcace186bb"],
- ["eabd81", "e18481e185a9e186bc"],
- ["eabd81", "eabcace186bc"],
- ["eabd82", "e18481e185a9e186bd"],
- ["eabd82", "eabcace186bd"],
- ["eabd83", "e18481e185a9e186be"],
- ["eabd83", "eabcace186be"],
- ["eabd84", "e18481e185a9e186bf"],
- ["eabd84", "eabcace186bf"],
- ["eabd85", "e18481e185a9e18780"],
- ["eabd85", "eabcace18780"],
- ["eabd86", "e18481e185a9e18781"],
- ["eabd86", "eabcace18781"],
- ["eabd87", "e18481e185a9e18782"],
- ["eabd87", "eabcace18782"],
- ["eabd88", "e18481e185aa"],
- ["eabd89", "e18481e185aae186a8"],
- ["eabd89", "eabd88e186a8"],
- ["eabd8a", "e18481e185aae186a9"],
- ["eabd8a", "eabd88e186a9"],
- ["eabd8b", "e18481e185aae186aa"],
- ["eabd8b", "eabd88e186aa"],
- ["eabd8c", "e18481e185aae186ab"],
- ["eabd8c", "eabd88e186ab"],
- ["eabd8d", "e18481e185aae186ac"],
- ["eabd8d", "eabd88e186ac"],
- ["eabd8e", "e18481e185aae186ad"],
- ["eabd8e", "eabd88e186ad"],
- ["eabd8f", "e18481e185aae186ae"],
- ["eabd8f", "eabd88e186ae"],
- ["eabd90", "e18481e185aae186af"],
- ["eabd90", "eabd88e186af"],
- ["eabd91", "e18481e185aae186b0"],
- ["eabd91", "eabd88e186b0"],
- ["eabd92", "e18481e185aae186b1"],
- ["eabd92", "eabd88e186b1"],
- ["eabd93", "e18481e185aae186b2"],
- ["eabd93", "eabd88e186b2"],
- ["eabd94", "e18481e185aae186b3"],
- ["eabd94", "eabd88e186b3"],
- ["eabd95", "e18481e185aae186b4"],
- ["eabd95", "eabd88e186b4"],
- ["eabd96", "e18481e185aae186b5"],
- ["eabd96", "eabd88e186b5"],
- ["eabd97", "e18481e185aae186b6"],
- ["eabd97", "eabd88e186b6"],
- ["eabd98", "e18481e185aae186b7"],
- ["eabd98", "eabd88e186b7"],
- ["eabd99", "e18481e185aae186b8"],
- ["eabd99", "eabd88e186b8"],
- ["eabd9a", "e18481e185aae186b9"],
- ["eabd9a", "eabd88e186b9"],
- ["eabd9b", "e18481e185aae186ba"],
- ["eabd9b", "eabd88e186ba"],
- ["eabd9c", "e18481e185aae186bb"],
- ["eabd9c", "eabd88e186bb"],
- ["eabd9d", "e18481e185aae186bc"],
- ["eabd9d", "eabd88e186bc"],
- ["eabd9e", "e18481e185aae186bd"],
- ["eabd9e", "eabd88e186bd"],
- ["eabd9f", "e18481e185aae186be"],
- ["eabd9f", "eabd88e186be"],
- ["eabda0", "e18481e185aae186bf"],
- ["eabda0", "eabd88e186bf"],
- ["eabda1", "e18481e185aae18780"],
- ["eabda1", "eabd88e18780"],
- ["eabda2", "e18481e185aae18781"],
- ["eabda2", "eabd88e18781"],
- ["eabda3", "e18481e185aae18782"],
- ["eabda3", "eabd88e18782"],
- ["eabda4", "e18481e185ab"],
- ["eabda5", "e18481e185abe186a8"],
- ["eabda5", "eabda4e186a8"],
- ["eabda6", "e18481e185abe186a9"],
- ["eabda6", "eabda4e186a9"],
- ["eabda7", "e18481e185abe186aa"],
- ["eabda7", "eabda4e186aa"],
- ["eabda8", "e18481e185abe186ab"],
- ["eabda8", "eabda4e186ab"],
- ["eabda9", "e18481e185abe186ac"],
- ["eabda9", "eabda4e186ac"],
- ["eabdaa", "e18481e185abe186ad"],
- ["eabdaa", "eabda4e186ad"],
- ["eabdab", "e18481e185abe186ae"],
- ["eabdab", "eabda4e186ae"],
- ["eabdac", "e18481e185abe186af"],
- ["eabdac", "eabda4e186af"],
- ["eabdad", "e18481e185abe186b0"],
- ["eabdad", "eabda4e186b0"],
- ["eabdae", "e18481e185abe186b1"],
- ["eabdae", "eabda4e186b1"],
- ["eabdaf", "e18481e185abe186b2"],
- ["eabdaf", "eabda4e186b2"],
- ["eabdb0", "e18481e185abe186b3"],
- ["eabdb0", "eabda4e186b3"],
- ["eabdb1", "e18481e185abe186b4"],
- ["eabdb1", "eabda4e186b4"],
- ["eabdb2", "e18481e185abe186b5"],
- ["eabdb2", "eabda4e186b5"],
- ["eabdb3", "e18481e185abe186b6"],
- ["eabdb3", "eabda4e186b6"],
- ["eabdb4", "e18481e185abe186b7"],
- ["eabdb4", "eabda4e186b7"],
- ["eabdb5", "e18481e185abe186b8"],
- ["eabdb5", "eabda4e186b8"],
- ["eabdb6", "e18481e185abe186b9"],
- ["eabdb6", "eabda4e186b9"],
- ["eabdb7", "e18481e185abe186ba"],
- ["eabdb7", "eabda4e186ba"],
- ["eabdb8", "e18481e185abe186bb"],
- ["eabdb8", "eabda4e186bb"],
- ["eabdb9", "e18481e185abe186bc"],
- ["eabdb9", "eabda4e186bc"],
- ["eabdba", "e18481e185abe186bd"],
- ["eabdba", "eabda4e186bd"],
- ["eabdbb", "e18481e185abe186be"],
- ["eabdbb", "eabda4e186be"],
- ["eabdbc", "e18481e185abe186bf"],
- ["eabdbc", "eabda4e186bf"],
- ["eabdbd", "e18481e185abe18780"],
- ["eabdbd", "eabda4e18780"],
- ["eabdbe", "e18481e185abe18781"],
- ["eabdbe", "eabda4e18781"],
- ["eabdbf", "e18481e185abe18782"],
- ["eabdbf", "eabda4e18782"],
- ["eabe80", "e18481e185ac"],
- ["eabe81", "e18481e185ace186a8"],
- ["eabe81", "eabe80e186a8"],
- ["eabe82", "e18481e185ace186a9"],
- ["eabe82", "eabe80e186a9"],
- ["eabe83", "e18481e185ace186aa"],
- ["eabe83", "eabe80e186aa"],
- ["eabe84", "e18481e185ace186ab"],
- ["eabe84", "eabe80e186ab"],
- ["eabe85", "e18481e185ace186ac"],
- ["eabe85", "eabe80e186ac"],
- ["eabe86", "e18481e185ace186ad"],
- ["eabe86", "eabe80e186ad"],
- ["eabe87", "e18481e185ace186ae"],
- ["eabe87", "eabe80e186ae"],
- ["eabe88", "e18481e185ace186af"],
- ["eabe88", "eabe80e186af"],
- ["eabe89", "e18481e185ace186b0"],
- ["eabe89", "eabe80e186b0"],
- ["eabe8a", "e18481e185ace186b1"],
- ["eabe8a", "eabe80e186b1"],
- ["eabe8b", "e18481e185ace186b2"],
- ["eabe8b", "eabe80e186b2"],
- ["eabe8c", "e18481e185ace186b3"],
- ["eabe8c", "eabe80e186b3"],
- ["eabe8d", "e18481e185ace186b4"],
- ["eabe8d", "eabe80e186b4"],
- ["eabe8e", "e18481e185ace186b5"],
- ["eabe8e", "eabe80e186b5"],
- ["eabe8f", "e18481e185ace186b6"],
- ["eabe8f", "eabe80e186b6"],
- ["eabe90", "e18481e185ace186b7"],
- ["eabe90", "eabe80e186b7"],
- ["eabe91", "e18481e185ace186b8"],
- ["eabe91", "eabe80e186b8"],
- ["eabe92", "e18481e185ace186b9"],
- ["eabe92", "eabe80e186b9"],
- ["eabe93", "e18481e185ace186ba"],
- ["eabe93", "eabe80e186ba"],
- ["eabe94", "e18481e185ace186bb"],
- ["eabe94", "eabe80e186bb"],
- ["eabe95", "e18481e185ace186bc"],
- ["eabe95", "eabe80e186bc"],
- ["eabe96", "e18481e185ace186bd"],
- ["eabe96", "eabe80e186bd"],
- ["eabe97", "e18481e185ace186be"],
- ["eabe97", "eabe80e186be"],
- ["eabe98", "e18481e185ace186bf"],
- ["eabe98", "eabe80e186bf"],
- ["eabe99", "e18481e185ace18780"],
- ["eabe99", "eabe80e18780"],
- ["eabe9a", "e18481e185ace18781"],
- ["eabe9a", "eabe80e18781"],
- ["eabe9b", "e18481e185ace18782"],
- ["eabe9b", "eabe80e18782"],
- ["eabe9c", "e18481e185ad"],
- ["eabe9d", "e18481e185ade186a8"],
- ["eabe9d", "eabe9ce186a8"],
- ["eabe9e", "e18481e185ade186a9"],
- ["eabe9e", "eabe9ce186a9"],
- ["eabe9f", "e18481e185ade186aa"],
- ["eabe9f", "eabe9ce186aa"],
- ["eabea0", "e18481e185ade186ab"],
- ["eabea0", "eabe9ce186ab"],
- ["eabea1", "e18481e185ade186ac"],
- ["eabea1", "eabe9ce186ac"],
- ["eabea2", "e18481e185ade186ad"],
- ["eabea2", "eabe9ce186ad"],
- ["eabea3", "e18481e185ade186ae"],
- ["eabea3", "eabe9ce186ae"],
- ["eabea4", "e18481e185ade186af"],
- ["eabea4", "eabe9ce186af"],
- ["eabea5", "e18481e185ade186b0"],
- ["eabea5", "eabe9ce186b0"],
- ["eabea6", "e18481e185ade186b1"],
- ["eabea6", "eabe9ce186b1"],
- ["eabea7", "e18481e185ade186b2"],
- ["eabea7", "eabe9ce186b2"],
- ["eabea8", "e18481e185ade186b3"],
- ["eabea8", "eabe9ce186b3"],
- ["eabea9", "e18481e185ade186b4"],
- ["eabea9", "eabe9ce186b4"],
- ["eabeaa", "e18481e185ade186b5"],
- ["eabeaa", "eabe9ce186b5"],
- ["eabeab", "e18481e185ade186b6"],
- ["eabeab", "eabe9ce186b6"],
- ["eabeac", "e18481e185ade186b7"],
- ["eabeac", "eabe9ce186b7"],
- ["eabead", "e18481e185ade186b8"],
- ["eabead", "eabe9ce186b8"],
- ["eabeae", "e18481e185ade186b9"],
- ["eabeae", "eabe9ce186b9"],
- ["eabeaf", "e18481e185ade186ba"],
- ["eabeaf", "eabe9ce186ba"],
- ["eabeb0", "e18481e185ade186bb"],
- ["eabeb0", "eabe9ce186bb"],
- ["eabeb1", "e18481e185ade186bc"],
- ["eabeb1", "eabe9ce186bc"],
- ["eabeb2", "e18481e185ade186bd"],
- ["eabeb2", "eabe9ce186bd"],
- ["eabeb3", "e18481e185ade186be"],
- ["eabeb3", "eabe9ce186be"],
- ["eabeb4", "e18481e185ade186bf"],
- ["eabeb4", "eabe9ce186bf"],
- ["eabeb5", "e18481e185ade18780"],
- ["eabeb5", "eabe9ce18780"],
- ["eabeb6", "e18481e185ade18781"],
- ["eabeb6", "eabe9ce18781"],
- ["eabeb7", "e18481e185ade18782"],
- ["eabeb7", "eabe9ce18782"],
- ["eabeb8", "e18481e185ae"],
- ["eabeb9", "e18481e185aee186a8"],
- ["eabeb9", "eabeb8e186a8"],
- ["eabeba", "e18481e185aee186a9"],
- ["eabeba", "eabeb8e186a9"],
- ["eabebb", "e18481e185aee186aa"],
- ["eabebb", "eabeb8e186aa"],
- ["eabebc", "e18481e185aee186ab"],
- ["eabebc", "eabeb8e186ab"],
- ["eabebd", "e18481e185aee186ac"],
- ["eabebd", "eabeb8e186ac"],
- ["eabebe", "e18481e185aee186ad"],
- ["eabebe", "eabeb8e186ad"],
- ["eabebf", "e18481e185aee186ae"],
- ["eabebf", "eabeb8e186ae"],
- ["eabf80", "e18481e185aee186af"],
- ["eabf80", "eabeb8e186af"],
- ["eabf81", "e18481e185aee186b0"],
- ["eabf81", "eabeb8e186b0"],
- ["eabf82", "e18481e185aee186b1"],
- ["eabf82", "eabeb8e186b1"],
- ["eabf83", "e18481e185aee186b2"],
- ["eabf83", "eabeb8e186b2"],
- ["eabf84", "e18481e185aee186b3"],
- ["eabf84", "eabeb8e186b3"],
- ["eabf85", "e18481e185aee186b4"],
- ["eabf85", "eabeb8e186b4"],
- ["eabf86", "e18481e185aee186b5"],
- ["eabf86", "eabeb8e186b5"],
- ["eabf87", "e18481e185aee186b6"],
- ["eabf87", "eabeb8e186b6"],
- ["eabf88", "e18481e185aee186b7"],
- ["eabf88", "eabeb8e186b7"],
- ["eabf89", "e18481e185aee186b8"],
- ["eabf89", "eabeb8e186b8"],
- ["eabf8a", "e18481e185aee186b9"],
- ["eabf8a", "eabeb8e186b9"],
- ["eabf8b", "e18481e185aee186ba"],
- ["eabf8b", "eabeb8e186ba"],
- ["eabf8c", "e18481e185aee186bb"],
- ["eabf8c", "eabeb8e186bb"],
- ["eabf8d", "e18481e185aee186bc"],
- ["eabf8d", "eabeb8e186bc"],
- ["eabf8e", "e18481e185aee186bd"],
- ["eabf8e", "eabeb8e186bd"],
- ["eabf8f", "e18481e185aee186be"],
- ["eabf8f", "eabeb8e186be"],
- ["eabf90", "e18481e185aee186bf"],
- ["eabf90", "eabeb8e186bf"],
- ["eabf91", "e18481e185aee18780"],
- ["eabf91", "eabeb8e18780"],
- ["eabf92", "e18481e185aee18781"],
- ["eabf92", "eabeb8e18781"],
- ["eabf93", "e18481e185aee18782"],
- ["eabf93", "eabeb8e18782"],
- ["eabf94", "e18481e185af"],
- ["eabf95", "e18481e185afe186a8"],
- ["eabf95", "eabf94e186a8"],
- ["eabf96", "e18481e185afe186a9"],
- ["eabf96", "eabf94e186a9"],
- ["eabf97", "e18481e185afe186aa"],
- ["eabf97", "eabf94e186aa"],
- ["eabf98", "e18481e185afe186ab"],
- ["eabf98", "eabf94e186ab"],
- ["eabf99", "e18481e185afe186ac"],
- ["eabf99", "eabf94e186ac"],
- ["eabf9a", "e18481e185afe186ad"],
- ["eabf9a", "eabf94e186ad"],
- ["eabf9b", "e18481e185afe186ae"],
- ["eabf9b", "eabf94e186ae"],
- ["eabf9c", "e18481e185afe186af"],
- ["eabf9c", "eabf94e186af"],
- ["eabf9d", "e18481e185afe186b0"],
- ["eabf9d", "eabf94e186b0"],
- ["eabf9e", "e18481e185afe186b1"],
- ["eabf9e", "eabf94e186b1"],
- ["eabf9f", "e18481e185afe186b2"],
- ["eabf9f", "eabf94e186b2"],
- ["eabfa0", "e18481e185afe186b3"],
- ["eabfa0", "eabf94e186b3"],
- ["eabfa1", "e18481e185afe186b4"],
- ["eabfa1", "eabf94e186b4"],
- ["eabfa2", "e18481e185afe186b5"],
- ["eabfa2", "eabf94e186b5"],
- ["eabfa3", "e18481e185afe186b6"],
- ["eabfa3", "eabf94e186b6"],
- ["eabfa4", "e18481e185afe186b7"],
- ["eabfa4", "eabf94e186b7"],
- ["eabfa5", "e18481e185afe186b8"],
- ["eabfa5", "eabf94e186b8"],
- ["eabfa6", "e18481e185afe186b9"],
- ["eabfa6", "eabf94e186b9"],
- ["eabfa7", "e18481e185afe186ba"],
- ["eabfa7", "eabf94e186ba"],
- ["eabfa8", "e18481e185afe186bb"],
- ["eabfa8", "eabf94e186bb"],
- ["eabfa9", "e18481e185afe186bc"],
- ["eabfa9", "eabf94e186bc"],
- ["eabfaa", "e18481e185afe186bd"],
- ["eabfaa", "eabf94e186bd"],
- ["eabfab", "e18481e185afe186be"],
- ["eabfab", "eabf94e186be"],
- ["eabfac", "e18481e185afe186bf"],
- ["eabfac", "eabf94e186bf"],
- ["eabfad", "e18481e185afe18780"],
- ["eabfad", "eabf94e18780"],
- ["eabfae", "e18481e185afe18781"],
- ["eabfae", "eabf94e18781"],
- ["eabfaf", "e18481e185afe18782"],
- ["eabfaf", "eabf94e18782"],
- ["eabfb0", "e18481e185b0"],
- ["eabfb1", "e18481e185b0e186a8"],
- ["eabfb1", "eabfb0e186a8"],
- ["eabfb2", "e18481e185b0e186a9"],
- ["eabfb2", "eabfb0e186a9"],
- ["eabfb3", "e18481e185b0e186aa"],
- ["eabfb3", "eabfb0e186aa"],
- ["eabfb4", "e18481e185b0e186ab"],
- ["eabfb4", "eabfb0e186ab"],
- ["eabfb5", "e18481e185b0e186ac"],
- ["eabfb5", "eabfb0e186ac"],
- ["eabfb6", "e18481e185b0e186ad"],
- ["eabfb6", "eabfb0e186ad"],
- ["eabfb7", "e18481e185b0e186ae"],
- ["eabfb7", "eabfb0e186ae"],
- ["eabfb8", "e18481e185b0e186af"],
- ["eabfb8", "eabfb0e186af"],
- ["eabfb9", "e18481e185b0e186b0"],
- ["eabfb9", "eabfb0e186b0"],
- ["eabfba", "e18481e185b0e186b1"],
- ["eabfba", "eabfb0e186b1"],
- ["eabfbb", "e18481e185b0e186b2"],
- ["eabfbb", "eabfb0e186b2"],
- ["eabfbc", "e18481e185b0e186b3"],
- ["eabfbc", "eabfb0e186b3"],
- ["eabfbd", "e18481e185b0e186b4"],
- ["eabfbd", "eabfb0e186b4"],
- ["eabfbe", "e18481e185b0e186b5"],
- ["eabfbe", "eabfb0e186b5"],
- ["eabfbf", "e18481e185b0e186b6"],
- ["eabfbf", "eabfb0e186b6"],
- ["eb8080", "e18481e185b0e186b7"],
- ["eb8080", "eabfb0e186b7"],
- ["eb8081", "e18481e185b0e186b8"],
- ["eb8081", "eabfb0e186b8"],
- ["eb8082", "e18481e185b0e186b9"],
- ["eb8082", "eabfb0e186b9"],
- ["eb8083", "e18481e185b0e186ba"],
- ["eb8083", "eabfb0e186ba"],
- ["eb8084", "e18481e185b0e186bb"],
- ["eb8084", "eabfb0e186bb"],
- ["eb8085", "e18481e185b0e186bc"],
- ["eb8085", "eabfb0e186bc"],
- ["eb8086", "e18481e185b0e186bd"],
- ["eb8086", "eabfb0e186bd"],
- ["eb8087", "e18481e185b0e186be"],
- ["eb8087", "eabfb0e186be"],
- ["eb8088", "e18481e185b0e186bf"],
- ["eb8088", "eabfb0e186bf"],
- ["eb8089", "e18481e185b0e18780"],
- ["eb8089", "eabfb0e18780"],
- ["eb808a", "e18481e185b0e18781"],
- ["eb808a", "eabfb0e18781"],
- ["eb808b", "e18481e185b0e18782"],
- ["eb808b", "eabfb0e18782"],
- ["eb808c", "e18481e185b1"],
- ["eb808d", "e18481e185b1e186a8"],
- ["eb808d", "eb808ce186a8"],
- ["eb808e", "e18481e185b1e186a9"],
- ["eb808e", "eb808ce186a9"],
- ["eb808f", "e18481e185b1e186aa"],
- ["eb808f", "eb808ce186aa"],
- ["eb8090", "e18481e185b1e186ab"],
- ["eb8090", "eb808ce186ab"],
- ["eb8091", "e18481e185b1e186ac"],
- ["eb8091", "eb808ce186ac"],
- ["eb8092", "e18481e185b1e186ad"],
- ["eb8092", "eb808ce186ad"],
- ["eb8093", "e18481e185b1e186ae"],
- ["eb8093", "eb808ce186ae"],
- ["eb8094", "e18481e185b1e186af"],
- ["eb8094", "eb808ce186af"],
- ["eb8095", "e18481e185b1e186b0"],
- ["eb8095", "eb808ce186b0"],
- ["eb8096", "e18481e185b1e186b1"],
- ["eb8096", "eb808ce186b1"],
- ["eb8097", "e18481e185b1e186b2"],
- ["eb8097", "eb808ce186b2"],
- ["eb8098", "e18481e185b1e186b3"],
- ["eb8098", "eb808ce186b3"],
- ["eb8099", "e18481e185b1e186b4"],
- ["eb8099", "eb808ce186b4"],
- ["eb809a", "e18481e185b1e186b5"],
- ["eb809a", "eb808ce186b5"],
- ["eb809b", "e18481e185b1e186b6"],
- ["eb809b", "eb808ce186b6"],
- ["eb809c", "e18481e185b1e186b7"],
- ["eb809c", "eb808ce186b7"],
- ["eb809d", "e18481e185b1e186b8"],
- ["eb809d", "eb808ce186b8"],
- ["eb809e", "e18481e185b1e186b9"],
- ["eb809e", "eb808ce186b9"],
- ["eb809f", "e18481e185b1e186ba"],
- ["eb809f", "eb808ce186ba"],
- ["eb80a0", "e18481e185b1e186bb"],
- ["eb80a0", "eb808ce186bb"],
- ["eb80a1", "e18481e185b1e186bc"],
- ["eb80a1", "eb808ce186bc"],
- ["eb80a2", "e18481e185b1e186bd"],
- ["eb80a2", "eb808ce186bd"],
- ["eb80a3", "e18481e185b1e186be"],
- ["eb80a3", "eb808ce186be"],
- ["eb80a4", "e18481e185b1e186bf"],
- ["eb80a4", "eb808ce186bf"],
- ["eb80a5", "e18481e185b1e18780"],
- ["eb80a5", "eb808ce18780"],
- ["eb80a6", "e18481e185b1e18781"],
- ["eb80a6", "eb808ce18781"],
- ["eb80a7", "e18481e185b1e18782"],
- ["eb80a7", "eb808ce18782"],
- ["eb80a8", "e18481e185b2"],
- ["eb80a9", "e18481e185b2e186a8"],
- ["eb80a9", "eb80a8e186a8"],
- ["eb80aa", "e18481e185b2e186a9"],
- ["eb80aa", "eb80a8e186a9"],
- ["eb80ab", "e18481e185b2e186aa"],
- ["eb80ab", "eb80a8e186aa"],
- ["eb80ac", "e18481e185b2e186ab"],
- ["eb80ac", "eb80a8e186ab"],
- ["eb80ad", "e18481e185b2e186ac"],
- ["eb80ad", "eb80a8e186ac"],
- ["eb80ae", "e18481e185b2e186ad"],
- ["eb80ae", "eb80a8e186ad"],
- ["eb80af", "e18481e185b2e186ae"],
- ["eb80af", "eb80a8e186ae"],
- ["eb80b0", "e18481e185b2e186af"],
- ["eb80b0", "eb80a8e186af"],
- ["eb80b1", "e18481e185b2e186b0"],
- ["eb80b1", "eb80a8e186b0"],
- ["eb80b2", "e18481e185b2e186b1"],
- ["eb80b2", "eb80a8e186b1"],
- ["eb80b3", "e18481e185b2e186b2"],
- ["eb80b3", "eb80a8e186b2"],
- ["eb80b4", "e18481e185b2e186b3"],
- ["eb80b4", "eb80a8e186b3"],
- ["eb80b5", "e18481e185b2e186b4"],
- ["eb80b5", "eb80a8e186b4"],
- ["eb80b6", "e18481e185b2e186b5"],
- ["eb80b6", "eb80a8e186b5"],
- ["eb80b7", "e18481e185b2e186b6"],
- ["eb80b7", "eb80a8e186b6"],
- ["eb80b8", "e18481e185b2e186b7"],
- ["eb80b8", "eb80a8e186b7"],
- ["eb80b9", "e18481e185b2e186b8"],
- ["eb80b9", "eb80a8e186b8"],
- ["eb80ba", "e18481e185b2e186b9"],
- ["eb80ba", "eb80a8e186b9"],
- ["eb80bb", "e18481e185b2e186ba"],
- ["eb80bb", "eb80a8e186ba"],
- ["eb80bc", "e18481e185b2e186bb"],
- ["eb80bc", "eb80a8e186bb"],
- ["eb80bd", "e18481e185b2e186bc"],
- ["eb80bd", "eb80a8e186bc"],
- ["eb80be", "e18481e185b2e186bd"],
- ["eb80be", "eb80a8e186bd"],
- ["eb80bf", "e18481e185b2e186be"],
- ["eb80bf", "eb80a8e186be"],
- ["eb8180", "e18481e185b2e186bf"],
- ["eb8180", "eb80a8e186bf"],
- ["eb8181", "e18481e185b2e18780"],
- ["eb8181", "eb80a8e18780"],
- ["eb8182", "e18481e185b2e18781"],
- ["eb8182", "eb80a8e18781"],
- ["eb8183", "e18481e185b2e18782"],
- ["eb8183", "eb80a8e18782"],
- ["eb8184", "e18481e185b3"],
- ["eb8185", "e18481e185b3e186a8"],
- ["eb8185", "eb8184e186a8"],
- ["eb8186", "e18481e185b3e186a9"],
- ["eb8186", "eb8184e186a9"],
- ["eb8187", "e18481e185b3e186aa"],
- ["eb8187", "eb8184e186aa"],
- ["eb8188", "e18481e185b3e186ab"],
- ["eb8188", "eb8184e186ab"],
- ["eb8189", "e18481e185b3e186ac"],
- ["eb8189", "eb8184e186ac"],
- ["eb818a", "e18481e185b3e186ad"],
- ["eb818a", "eb8184e186ad"],
- ["eb818b", "e18481e185b3e186ae"],
- ["eb818b", "eb8184e186ae"],
- ["eb818c", "e18481e185b3e186af"],
- ["eb818c", "eb8184e186af"],
- ["eb818d", "e18481e185b3e186b0"],
- ["eb818d", "eb8184e186b0"],
- ["eb818e", "e18481e185b3e186b1"],
- ["eb818e", "eb8184e186b1"],
- ["eb818f", "e18481e185b3e186b2"],
- ["eb818f", "eb8184e186b2"],
- ["eb8190", "e18481e185b3e186b3"],
- ["eb8190", "eb8184e186b3"],
- ["eb8191", "e18481e185b3e186b4"],
- ["eb8191", "eb8184e186b4"],
- ["eb8192", "e18481e185b3e186b5"],
- ["eb8192", "eb8184e186b5"],
- ["eb8193", "e18481e185b3e186b6"],
- ["eb8193", "eb8184e186b6"],
- ["eb8194", "e18481e185b3e186b7"],
- ["eb8194", "eb8184e186b7"],
- ["eb8195", "e18481e185b3e186b8"],
- ["eb8195", "eb8184e186b8"],
- ["eb8196", "e18481e185b3e186b9"],
- ["eb8196", "eb8184e186b9"],
- ["eb8197", "e18481e185b3e186ba"],
- ["eb8197", "eb8184e186ba"],
- ["eb8198", "e18481e185b3e186bb"],
- ["eb8198", "eb8184e186bb"],
- ["eb8199", "e18481e185b3e186bc"],
- ["eb8199", "eb8184e186bc"],
- ["eb819a", "e18481e185b3e186bd"],
- ["eb819a", "eb8184e186bd"],
- ["eb819b", "e18481e185b3e186be"],
- ["eb819b", "eb8184e186be"],
- ["eb819c", "e18481e185b3e186bf"],
- ["eb819c", "eb8184e186bf"],
- ["eb819d", "e18481e185b3e18780"],
- ["eb819d", "eb8184e18780"],
- ["eb819e", "e18481e185b3e18781"],
- ["eb819e", "eb8184e18781"],
- ["eb819f", "e18481e185b3e18782"],
- ["eb819f", "eb8184e18782"],
- ["eb81a0", "e18481e185b4"],
- ["eb81a1", "e18481e185b4e186a8"],
- ["eb81a1", "eb81a0e186a8"],
- ["eb81a2", "e18481e185b4e186a9"],
- ["eb81a2", "eb81a0e186a9"],
- ["eb81a3", "e18481e185b4e186aa"],
- ["eb81a3", "eb81a0e186aa"],
- ["eb81a4", "e18481e185b4e186ab"],
- ["eb81a4", "eb81a0e186ab"],
- ["eb81a5", "e18481e185b4e186ac"],
- ["eb81a5", "eb81a0e186ac"],
- ["eb81a6", "e18481e185b4e186ad"],
- ["eb81a6", "eb81a0e186ad"],
- ["eb81a7", "e18481e185b4e186ae"],
- ["eb81a7", "eb81a0e186ae"],
- ["eb81a8", "e18481e185b4e186af"],
- ["eb81a8", "eb81a0e186af"],
- ["eb81a9", "e18481e185b4e186b0"],
- ["eb81a9", "eb81a0e186b0"],
- ["eb81aa", "e18481e185b4e186b1"],
- ["eb81aa", "eb81a0e186b1"],
- ["eb81ab", "e18481e185b4e186b2"],
- ["eb81ab", "eb81a0e186b2"],
- ["eb81ac", "e18481e185b4e186b3"],
- ["eb81ac", "eb81a0e186b3"],
- ["eb81ad", "e18481e185b4e186b4"],
- ["eb81ad", "eb81a0e186b4"],
- ["eb81ae", "e18481e185b4e186b5"],
- ["eb81ae", "eb81a0e186b5"],
- ["eb81af", "e18481e185b4e186b6"],
- ["eb81af", "eb81a0e186b6"],
- ["eb81b0", "e18481e185b4e186b7"],
- ["eb81b0", "eb81a0e186b7"],
- ["eb81b1", "e18481e185b4e186b8"],
- ["eb81b1", "eb81a0e186b8"],
- ["eb81b2", "e18481e185b4e186b9"],
- ["eb81b2", "eb81a0e186b9"],
- ["eb81b3", "e18481e185b4e186ba"],
- ["eb81b3", "eb81a0e186ba"],
- ["eb81b4", "e18481e185b4e186bb"],
- ["eb81b4", "eb81a0e186bb"],
- ["eb81b5", "e18481e185b4e186bc"],
- ["eb81b5", "eb81a0e186bc"],
- ["eb81b6", "e18481e185b4e186bd"],
- ["eb81b6", "eb81a0e186bd"],
- ["eb81b7", "e18481e185b4e186be"],
- ["eb81b7", "eb81a0e186be"],
- ["eb81b8", "e18481e185b4e186bf"],
- ["eb81b8", "eb81a0e186bf"],
- ["eb81b9", "e18481e185b4e18780"],
- ["eb81b9", "eb81a0e18780"],
- ["eb81ba", "e18481e185b4e18781"],
- ["eb81ba", "eb81a0e18781"],
- ["eb81bb", "e18481e185b4e18782"],
- ["eb81bb", "eb81a0e18782"],
- ["eb81bc", "e18481e185b5"],
- ["eb81bd", "e18481e185b5e186a8"],
- ["eb81bd", "eb81bce186a8"],
- ["eb81be", "e18481e185b5e186a9"],
- ["eb81be", "eb81bce186a9"],
- ["eb81bf", "e18481e185b5e186aa"],
- ["eb81bf", "eb81bce186aa"],
- ["eb8280", "e18481e185b5e186ab"],
- ["eb8280", "eb81bce186ab"],
- ["eb8281", "e18481e185b5e186ac"],
- ["eb8281", "eb81bce186ac"],
- ["eb8282", "e18481e185b5e186ad"],
- ["eb8282", "eb81bce186ad"],
- ["eb8283", "e18481e185b5e186ae"],
- ["eb8283", "eb81bce186ae"],
- ["eb8284", "e18481e185b5e186af"],
- ["eb8284", "eb81bce186af"],
- ["eb8285", "e18481e185b5e186b0"],
- ["eb8285", "eb81bce186b0"],
- ["eb8286", "e18481e185b5e186b1"],
- ["eb8286", "eb81bce186b1"],
- ["eb8287", "e18481e185b5e186b2"],
- ["eb8287", "eb81bce186b2"],
- ["eb8288", "e18481e185b5e186b3"],
- ["eb8288", "eb81bce186b3"],
- ["eb8289", "e18481e185b5e186b4"],
- ["eb8289", "eb81bce186b4"],
- ["eb828a", "e18481e185b5e186b5"],
- ["eb828a", "eb81bce186b5"],
- ["eb828b", "e18481e185b5e186b6"],
- ["eb828b", "eb81bce186b6"],
- ["eb828c", "e18481e185b5e186b7"],
- ["eb828c", "eb81bce186b7"],
- ["eb828d", "e18481e185b5e186b8"],
- ["eb828d", "eb81bce186b8"],
- ["eb828e", "e18481e185b5e186b9"],
- ["eb828e", "eb81bce186b9"],
- ["eb828f", "e18481e185b5e186ba"],
- ["eb828f", "eb81bce186ba"],
- ["eb8290", "e18481e185b5e186bb"],
- ["eb8290", "eb81bce186bb"],
- ["eb8291", "e18481e185b5e186bc"],
- ["eb8291", "eb81bce186bc"],
- ["eb8292", "e18481e185b5e186bd"],
- ["eb8292", "eb81bce186bd"],
- ["eb8293", "e18481e185b5e186be"],
- ["eb8293", "eb81bce186be"],
- ["eb8294", "e18481e185b5e186bf"],
- ["eb8294", "eb81bce186bf"],
- ["eb8295", "e18481e185b5e18780"],
- ["eb8295", "eb81bce18780"],
- ["eb8296", "e18481e185b5e18781"],
- ["eb8296", "eb81bce18781"],
- ["eb8297", "e18481e185b5e18782"],
- ["eb8297", "eb81bce18782"],
- ["eb8298", "e18482e185a1"],
- ["eb8299", "e18482e185a1e186a8"],
- ["eb8299", "eb8298e186a8"],
- ["eb829a", "e18482e185a1e186a9"],
- ["eb829a", "eb8298e186a9"],
- ["eb829b", "e18482e185a1e186aa"],
- ["eb829b", "eb8298e186aa"],
- ["eb829c", "e18482e185a1e186ab"],
- ["eb829c", "eb8298e186ab"],
- ["eb829d", "e18482e185a1e186ac"],
- ["eb829d", "eb8298e186ac"],
- ["eb829e", "e18482e185a1e186ad"],
- ["eb829e", "eb8298e186ad"],
- ["eb829f", "e18482e185a1e186ae"],
- ["eb829f", "eb8298e186ae"],
- ["eb82a0", "e18482e185a1e186af"],
- ["eb82a0", "eb8298e186af"],
- ["eb82a1", "e18482e185a1e186b0"],
- ["eb82a1", "eb8298e186b0"],
- ["eb82a2", "e18482e185a1e186b1"],
- ["eb82a2", "eb8298e186b1"],
- ["eb82a3", "e18482e185a1e186b2"],
- ["eb82a3", "eb8298e186b2"],
- ["eb82a4", "e18482e185a1e186b3"],
- ["eb82a4", "eb8298e186b3"],
- ["eb82a5", "e18482e185a1e186b4"],
- ["eb82a5", "eb8298e186b4"],
- ["eb82a6", "e18482e185a1e186b5"],
- ["eb82a6", "eb8298e186b5"],
- ["eb82a7", "e18482e185a1e186b6"],
- ["eb82a7", "eb8298e186b6"],
- ["eb82a8", "e18482e185a1e186b7"],
- ["eb82a8", "eb8298e186b7"],
- ["eb82a9", "e18482e185a1e186b8"],
- ["eb82a9", "eb8298e186b8"],
- ["eb82aa", "e18482e185a1e186b9"],
- ["eb82aa", "eb8298e186b9"],
- ["eb82ab", "e18482e185a1e186ba"],
- ["eb82ab", "eb8298e186ba"],
- ["eb82ac", "e18482e185a1e186bb"],
- ["eb82ac", "eb8298e186bb"],
- ["eb82ad", "e18482e185a1e186bc"],
- ["eb82ad", "eb8298e186bc"],
- ["eb82ae", "e18482e185a1e186bd"],
- ["eb82ae", "eb8298e186bd"],
- ["eb82af", "e18482e185a1e186be"],
- ["eb82af", "eb8298e186be"],
- ["eb82b0", "e18482e185a1e186bf"],
- ["eb82b0", "eb8298e186bf"],
- ["eb82b1", "e18482e185a1e18780"],
- ["eb82b1", "eb8298e18780"],
- ["eb82b2", "e18482e185a1e18781"],
- ["eb82b2", "eb8298e18781"],
- ["eb82b3", "e18482e185a1e18782"],
- ["eb82b3", "eb8298e18782"],
- ["eb82b4", "e18482e185a2"],
- ["eb82b5", "e18482e185a2e186a8"],
- ["eb82b5", "eb82b4e186a8"],
- ["eb82b6", "e18482e185a2e186a9"],
- ["eb82b6", "eb82b4e186a9"],
- ["eb82b7", "e18482e185a2e186aa"],
- ["eb82b7", "eb82b4e186aa"],
- ["eb82b8", "e18482e185a2e186ab"],
- ["eb82b8", "eb82b4e186ab"],
- ["eb82b9", "e18482e185a2e186ac"],
- ["eb82b9", "eb82b4e186ac"],
- ["eb82ba", "e18482e185a2e186ad"],
- ["eb82ba", "eb82b4e186ad"],
- ["eb82bb", "e18482e185a2e186ae"],
- ["eb82bb", "eb82b4e186ae"],
- ["eb82bc", "e18482e185a2e186af"],
- ["eb82bc", "eb82b4e186af"],
- ["eb82bd", "e18482e185a2e186b0"],
- ["eb82bd", "eb82b4e186b0"],
- ["eb82be", "e18482e185a2e186b1"],
- ["eb82be", "eb82b4e186b1"],
- ["eb82bf", "e18482e185a2e186b2"],
- ["eb82bf", "eb82b4e186b2"],
- ["eb8380", "e18482e185a2e186b3"],
- ["eb8380", "eb82b4e186b3"],
- ["eb8381", "e18482e185a2e186b4"],
- ["eb8381", "eb82b4e186b4"],
- ["eb8382", "e18482e185a2e186b5"],
- ["eb8382", "eb82b4e186b5"],
- ["eb8383", "e18482e185a2e186b6"],
- ["eb8383", "eb82b4e186b6"],
- ["eb8384", "e18482e185a2e186b7"],
- ["eb8384", "eb82b4e186b7"],
- ["eb8385", "e18482e185a2e186b8"],
- ["eb8385", "eb82b4e186b8"],
- ["eb8386", "e18482e185a2e186b9"],
- ["eb8386", "eb82b4e186b9"],
- ["eb8387", "e18482e185a2e186ba"],
- ["eb8387", "eb82b4e186ba"],
- ["eb8388", "e18482e185a2e186bb"],
- ["eb8388", "eb82b4e186bb"],
- ["eb8389", "e18482e185a2e186bc"],
- ["eb8389", "eb82b4e186bc"],
- ["eb838a", "e18482e185a2e186bd"],
- ["eb838a", "eb82b4e186bd"],
- ["eb838b", "e18482e185a2e186be"],
- ["eb838b", "eb82b4e186be"],
- ["eb838c", "e18482e185a2e186bf"],
- ["eb838c", "eb82b4e186bf"],
- ["eb838d", "e18482e185a2e18780"],
- ["eb838d", "eb82b4e18780"],
- ["eb838e", "e18482e185a2e18781"],
- ["eb838e", "eb82b4e18781"],
- ["eb838f", "e18482e185a2e18782"],
- ["eb838f", "eb82b4e18782"],
- ["eb8390", "e18482e185a3"],
- ["eb8391", "e18482e185a3e186a8"],
- ["eb8391", "eb8390e186a8"],
- ["eb8392", "e18482e185a3e186a9"],
- ["eb8392", "eb8390e186a9"],
- ["eb8393", "e18482e185a3e186aa"],
- ["eb8393", "eb8390e186aa"],
- ["eb8394", "e18482e185a3e186ab"],
- ["eb8394", "eb8390e186ab"],
- ["eb8395", "e18482e185a3e186ac"],
- ["eb8395", "eb8390e186ac"],
- ["eb8396", "e18482e185a3e186ad"],
- ["eb8396", "eb8390e186ad"],
- ["eb8397", "e18482e185a3e186ae"],
- ["eb8397", "eb8390e186ae"],
- ["eb8398", "e18482e185a3e186af"],
- ["eb8398", "eb8390e186af"],
- ["eb8399", "e18482e185a3e186b0"],
- ["eb8399", "eb8390e186b0"],
- ["eb839a", "e18482e185a3e186b1"],
- ["eb839a", "eb8390e186b1"],
- ["eb839b", "e18482e185a3e186b2"],
- ["eb839b", "eb8390e186b2"],
- ["eb839c", "e18482e185a3e186b3"],
- ["eb839c", "eb8390e186b3"],
- ["eb839d", "e18482e185a3e186b4"],
- ["eb839d", "eb8390e186b4"],
- ["eb839e", "e18482e185a3e186b5"],
- ["eb839e", "eb8390e186b5"],
- ["eb839f", "e18482e185a3e186b6"],
- ["eb839f", "eb8390e186b6"],
- ["eb83a0", "e18482e185a3e186b7"],
- ["eb83a0", "eb8390e186b7"],
- ["eb83a1", "e18482e185a3e186b8"],
- ["eb83a1", "eb8390e186b8"],
- ["eb83a2", "e18482e185a3e186b9"],
- ["eb83a2", "eb8390e186b9"],
- ["eb83a3", "e18482e185a3e186ba"],
- ["eb83a3", "eb8390e186ba"],
- ["eb83a4", "e18482e185a3e186bb"],
- ["eb83a4", "eb8390e186bb"],
- ["eb83a5", "e18482e185a3e186bc"],
- ["eb83a5", "eb8390e186bc"],
- ["eb83a6", "e18482e185a3e186bd"],
- ["eb83a6", "eb8390e186bd"],
- ["eb83a7", "e18482e185a3e186be"],
- ["eb83a7", "eb8390e186be"],
- ["eb83a8", "e18482e185a3e186bf"],
- ["eb83a8", "eb8390e186bf"],
- ["eb83a9", "e18482e185a3e18780"],
- ["eb83a9", "eb8390e18780"],
- ["eb83aa", "e18482e185a3e18781"],
- ["eb83aa", "eb8390e18781"],
- ["eb83ab", "e18482e185a3e18782"],
- ["eb83ab", "eb8390e18782"],
- ["eb83ac", "e18482e185a4"],
- ["eb83ad", "e18482e185a4e186a8"],
- ["eb83ad", "eb83ace186a8"],
- ["eb83ae", "e18482e185a4e186a9"],
- ["eb83ae", "eb83ace186a9"],
- ["eb83af", "e18482e185a4e186aa"],
- ["eb83af", "eb83ace186aa"],
- ["eb83b0", "e18482e185a4e186ab"],
- ["eb83b0", "eb83ace186ab"],
- ["eb83b1", "e18482e185a4e186ac"],
- ["eb83b1", "eb83ace186ac"],
- ["eb83b2", "e18482e185a4e186ad"],
- ["eb83b2", "eb83ace186ad"],
- ["eb83b3", "e18482e185a4e186ae"],
- ["eb83b3", "eb83ace186ae"],
- ["eb83b4", "e18482e185a4e186af"],
- ["eb83b4", "eb83ace186af"],
- ["eb83b5", "e18482e185a4e186b0"],
- ["eb83b5", "eb83ace186b0"],
- ["eb83b6", "e18482e185a4e186b1"],
- ["eb83b6", "eb83ace186b1"],
- ["eb83b7", "e18482e185a4e186b2"],
- ["eb83b7", "eb83ace186b2"],
- ["eb83b8", "e18482e185a4e186b3"],
- ["eb83b8", "eb83ace186b3"],
- ["eb83b9", "e18482e185a4e186b4"],
- ["eb83b9", "eb83ace186b4"],
- ["eb83ba", "e18482e185a4e186b5"],
- ["eb83ba", "eb83ace186b5"],
- ["eb83bb", "e18482e185a4e186b6"],
- ["eb83bb", "eb83ace186b6"],
- ["eb83bc", "e18482e185a4e186b7"],
- ["eb83bc", "eb83ace186b7"],
- ["eb83bd", "e18482e185a4e186b8"],
- ["eb83bd", "eb83ace186b8"],
- ["eb83be", "e18482e185a4e186b9"],
- ["eb83be", "eb83ace186b9"],
- ["eb83bf", "e18482e185a4e186ba"],
- ["eb83bf", "eb83ace186ba"],
- ["eb8480", "e18482e185a4e186bb"],
- ["eb8480", "eb83ace186bb"],
- ["eb8481", "e18482e185a4e186bc"],
- ["eb8481", "eb83ace186bc"],
- ["eb8482", "e18482e185a4e186bd"],
- ["eb8482", "eb83ace186bd"],
- ["eb8483", "e18482e185a4e186be"],
- ["eb8483", "eb83ace186be"],
- ["eb8484", "e18482e185a4e186bf"],
- ["eb8484", "eb83ace186bf"],
- ["eb8485", "e18482e185a4e18780"],
- ["eb8485", "eb83ace18780"],
- ["eb8486", "e18482e185a4e18781"],
- ["eb8486", "eb83ace18781"],
- ["eb8487", "e18482e185a4e18782"],
- ["eb8487", "eb83ace18782"],
- ["eb8488", "e18482e185a5"],
- ["eb8489", "e18482e185a5e186a8"],
- ["eb8489", "eb8488e186a8"],
- ["eb848a", "e18482e185a5e186a9"],
- ["eb848a", "eb8488e186a9"],
- ["eb848b", "e18482e185a5e186aa"],
- ["eb848b", "eb8488e186aa"],
- ["eb848c", "e18482e185a5e186ab"],
- ["eb848c", "eb8488e186ab"],
- ["eb848d", "e18482e185a5e186ac"],
- ["eb848d", "eb8488e186ac"],
- ["eb848e", "e18482e185a5e186ad"],
- ["eb848e", "eb8488e186ad"],
- ["eb848f", "e18482e185a5e186ae"],
- ["eb848f", "eb8488e186ae"],
- ["eb8490", "e18482e185a5e186af"],
- ["eb8490", "eb8488e186af"],
- ["eb8491", "e18482e185a5e186b0"],
- ["eb8491", "eb8488e186b0"],
- ["eb8492", "e18482e185a5e186b1"],
- ["eb8492", "eb8488e186b1"],
- ["eb8493", "e18482e185a5e186b2"],
- ["eb8493", "eb8488e186b2"],
- ["eb8494", "e18482e185a5e186b3"],
- ["eb8494", "eb8488e186b3"],
- ["eb8495", "e18482e185a5e186b4"],
- ["eb8495", "eb8488e186b4"],
- ["eb8496", "e18482e185a5e186b5"],
- ["eb8496", "eb8488e186b5"],
- ["eb8497", "e18482e185a5e186b6"],
- ["eb8497", "eb8488e186b6"],
- ["eb8498", "e18482e185a5e186b7"],
- ["eb8498", "eb8488e186b7"],
- ["eb8499", "e18482e185a5e186b8"],
- ["eb8499", "eb8488e186b8"],
- ["eb849a", "e18482e185a5e186b9"],
- ["eb849a", "eb8488e186b9"],
- ["eb849b", "e18482e185a5e186ba"],
- ["eb849b", "eb8488e186ba"],
- ["eb849c", "e18482e185a5e186bb"],
- ["eb849c", "eb8488e186bb"],
- ["eb849d", "e18482e185a5e186bc"],
- ["eb849d", "eb8488e186bc"],
- ["eb849e", "e18482e185a5e186bd"],
- ["eb849e", "eb8488e186bd"],
- ["eb849f", "e18482e185a5e186be"],
- ["eb849f", "eb8488e186be"],
- ["eb84a0", "e18482e185a5e186bf"],
- ["eb84a0", "eb8488e186bf"],
- ["eb84a1", "e18482e185a5e18780"],
- ["eb84a1", "eb8488e18780"],
- ["eb84a2", "e18482e185a5e18781"],
- ["eb84a2", "eb8488e18781"],
- ["eb84a3", "e18482e185a5e18782"],
- ["eb84a3", "eb8488e18782"],
- ["eb84a4", "e18482e185a6"],
- ["eb84a5", "e18482e185a6e186a8"],
- ["eb84a5", "eb84a4e186a8"],
- ["eb84a6", "e18482e185a6e186a9"],
- ["eb84a6", "eb84a4e186a9"],
- ["eb84a7", "e18482e185a6e186aa"],
- ["eb84a7", "eb84a4e186aa"],
- ["eb84a8", "e18482e185a6e186ab"],
- ["eb84a8", "eb84a4e186ab"],
- ["eb84a9", "e18482e185a6e186ac"],
- ["eb84a9", "eb84a4e186ac"],
- ["eb84aa", "e18482e185a6e186ad"],
- ["eb84aa", "eb84a4e186ad"],
- ["eb84ab", "e18482e185a6e186ae"],
- ["eb84ab", "eb84a4e186ae"],
- ["eb84ac", "e18482e185a6e186af"],
- ["eb84ac", "eb84a4e186af"],
- ["eb84ad", "e18482e185a6e186b0"],
- ["eb84ad", "eb84a4e186b0"],
- ["eb84ae", "e18482e185a6e186b1"],
- ["eb84ae", "eb84a4e186b1"],
- ["eb84af", "e18482e185a6e186b2"],
- ["eb84af", "eb84a4e186b2"],
- ["eb84b0", "e18482e185a6e186b3"],
- ["eb84b0", "eb84a4e186b3"],
- ["eb84b1", "e18482e185a6e186b4"],
- ["eb84b1", "eb84a4e186b4"],
- ["eb84b2", "e18482e185a6e186b5"],
- ["eb84b2", "eb84a4e186b5"],
- ["eb84b3", "e18482e185a6e186b6"],
- ["eb84b3", "eb84a4e186b6"],
- ["eb84b4", "e18482e185a6e186b7"],
- ["eb84b4", "eb84a4e186b7"],
- ["eb84b5", "e18482e185a6e186b8"],
- ["eb84b5", "eb84a4e186b8"],
- ["eb84b6", "e18482e185a6e186b9"],
- ["eb84b6", "eb84a4e186b9"],
- ["eb84b7", "e18482e185a6e186ba"],
- ["eb84b7", "eb84a4e186ba"],
- ["eb84b8", "e18482e185a6e186bb"],
- ["eb84b8", "eb84a4e186bb"],
- ["eb84b9", "e18482e185a6e186bc"],
- ["eb84b9", "eb84a4e186bc"],
- ["eb84ba", "e18482e185a6e186bd"],
- ["eb84ba", "eb84a4e186bd"],
- ["eb84bb", "e18482e185a6e186be"],
- ["eb84bb", "eb84a4e186be"],
- ["eb84bc", "e18482e185a6e186bf"],
- ["eb84bc", "eb84a4e186bf"],
- ["eb84bd", "e18482e185a6e18780"],
- ["eb84bd", "eb84a4e18780"],
- ["eb84be", "e18482e185a6e18781"],
- ["eb84be", "eb84a4e18781"],
- ["eb84bf", "e18482e185a6e18782"],
- ["eb84bf", "eb84a4e18782"],
- ["eb8580", "e18482e185a7"],
- ["eb8581", "e18482e185a7e186a8"],
- ["eb8581", "eb8580e186a8"],
- ["eb8582", "e18482e185a7e186a9"],
- ["eb8582", "eb8580e186a9"],
- ["eb8583", "e18482e185a7e186aa"],
- ["eb8583", "eb8580e186aa"],
- ["eb8584", "e18482e185a7e186ab"],
- ["eb8584", "eb8580e186ab"],
- ["eb8585", "e18482e185a7e186ac"],
- ["eb8585", "eb8580e186ac"],
- ["eb8586", "e18482e185a7e186ad"],
- ["eb8586", "eb8580e186ad"],
- ["eb8587", "e18482e185a7e186ae"],
- ["eb8587", "eb8580e186ae"],
- ["eb8588", "e18482e185a7e186af"],
- ["eb8588", "eb8580e186af"],
- ["eb8589", "e18482e185a7e186b0"],
- ["eb8589", "eb8580e186b0"],
- ["eb858a", "e18482e185a7e186b1"],
- ["eb858a", "eb8580e186b1"],
- ["eb858b", "e18482e185a7e186b2"],
- ["eb858b", "eb8580e186b2"],
- ["eb858c", "e18482e185a7e186b3"],
- ["eb858c", "eb8580e186b3"],
- ["eb858d", "e18482e185a7e186b4"],
- ["eb858d", "eb8580e186b4"],
- ["eb858e", "e18482e185a7e186b5"],
- ["eb858e", "eb8580e186b5"],
- ["eb858f", "e18482e185a7e186b6"],
- ["eb858f", "eb8580e186b6"],
- ["eb8590", "e18482e185a7e186b7"],
- ["eb8590", "eb8580e186b7"],
- ["eb8591", "e18482e185a7e186b8"],
- ["eb8591", "eb8580e186b8"],
- ["eb8592", "e18482e185a7e186b9"],
- ["eb8592", "eb8580e186b9"],
- ["eb8593", "e18482e185a7e186ba"],
- ["eb8593", "eb8580e186ba"],
- ["eb8594", "e18482e185a7e186bb"],
- ["eb8594", "eb8580e186bb"],
- ["eb8595", "e18482e185a7e186bc"],
- ["eb8595", "eb8580e186bc"],
- ["eb8596", "e18482e185a7e186bd"],
- ["eb8596", "eb8580e186bd"],
- ["eb8597", "e18482e185a7e186be"],
- ["eb8597", "eb8580e186be"],
- ["eb8598", "e18482e185a7e186bf"],
- ["eb8598", "eb8580e186bf"],
- ["eb8599", "e18482e185a7e18780"],
- ["eb8599", "eb8580e18780"],
- ["eb859a", "e18482e185a7e18781"],
- ["eb859a", "eb8580e18781"],
- ["eb859b", "e18482e185a7e18782"],
- ["eb859b", "eb8580e18782"],
- ["eb859c", "e18482e185a8"],
- ["eb859d", "e18482e185a8e186a8"],
- ["eb859d", "eb859ce186a8"],
- ["eb859e", "e18482e185a8e186a9"],
- ["eb859e", "eb859ce186a9"],
- ["eb859f", "e18482e185a8e186aa"],
- ["eb859f", "eb859ce186aa"],
- ["eb85a0", "e18482e185a8e186ab"],
- ["eb85a0", "eb859ce186ab"],
- ["eb85a1", "e18482e185a8e186ac"],
- ["eb85a1", "eb859ce186ac"],
- ["eb85a2", "e18482e185a8e186ad"],
- ["eb85a2", "eb859ce186ad"],
- ["eb85a3", "e18482e185a8e186ae"],
- ["eb85a3", "eb859ce186ae"],
- ["eb85a4", "e18482e185a8e186af"],
- ["eb85a4", "eb859ce186af"],
- ["eb85a5", "e18482e185a8e186b0"],
- ["eb85a5", "eb859ce186b0"],
- ["eb85a6", "e18482e185a8e186b1"],
- ["eb85a6", "eb859ce186b1"],
- ["eb85a7", "e18482e185a8e186b2"],
- ["eb85a7", "eb859ce186b2"],
- ["eb85a8", "e18482e185a8e186b3"],
- ["eb85a8", "eb859ce186b3"],
- ["eb85a9", "e18482e185a8e186b4"],
- ["eb85a9", "eb859ce186b4"],
- ["eb85aa", "e18482e185a8e186b5"],
- ["eb85aa", "eb859ce186b5"],
- ["eb85ab", "e18482e185a8e186b6"],
- ["eb85ab", "eb859ce186b6"],
- ["eb85ac", "e18482e185a8e186b7"],
- ["eb85ac", "eb859ce186b7"],
- ["eb85ad", "e18482e185a8e186b8"],
- ["eb85ad", "eb859ce186b8"],
- ["eb85ae", "e18482e185a8e186b9"],
- ["eb85ae", "eb859ce186b9"],
- ["eb85af", "e18482e185a8e186ba"],
- ["eb85af", "eb859ce186ba"],
- ["eb85b0", "e18482e185a8e186bb"],
- ["eb85b0", "eb859ce186bb"],
- ["eb85b1", "e18482e185a8e186bc"],
- ["eb85b1", "eb859ce186bc"],
- ["eb85b2", "e18482e185a8e186bd"],
- ["eb85b2", "eb859ce186bd"],
- ["eb85b3", "e18482e185a8e186be"],
- ["eb85b3", "eb859ce186be"],
- ["eb85b4", "e18482e185a8e186bf"],
- ["eb85b4", "eb859ce186bf"],
- ["eb85b5", "e18482e185a8e18780"],
- ["eb85b5", "eb859ce18780"],
- ["eb85b6", "e18482e185a8e18781"],
- ["eb85b6", "eb859ce18781"],
- ["eb85b7", "e18482e185a8e18782"],
- ["eb85b7", "eb859ce18782"],
- ["eb85b8", "e18482e185a9"],
- ["eb85b9", "e18482e185a9e186a8"],
- ["eb85b9", "eb85b8e186a8"],
- ["eb85ba", "e18482e185a9e186a9"],
- ["eb85ba", "eb85b8e186a9"],
- ["eb85bb", "e18482e185a9e186aa"],
- ["eb85bb", "eb85b8e186aa"],
- ["eb85bc", "e18482e185a9e186ab"],
- ["eb85bc", "eb85b8e186ab"],
- ["eb85bd", "e18482e185a9e186ac"],
- ["eb85bd", "eb85b8e186ac"],
- ["eb85be", "e18482e185a9e186ad"],
- ["eb85be", "eb85b8e186ad"],
- ["eb85bf", "e18482e185a9e186ae"],
- ["eb85bf", "eb85b8e186ae"],
- ["eb8680", "e18482e185a9e186af"],
- ["eb8680", "eb85b8e186af"],
- ["eb8681", "e18482e185a9e186b0"],
- ["eb8681", "eb85b8e186b0"],
- ["eb8682", "e18482e185a9e186b1"],
- ["eb8682", "eb85b8e186b1"],
- ["eb8683", "e18482e185a9e186b2"],
- ["eb8683", "eb85b8e186b2"],
- ["eb8684", "e18482e185a9e186b3"],
- ["eb8684", "eb85b8e186b3"],
- ["eb8685", "e18482e185a9e186b4"],
- ["eb8685", "eb85b8e186b4"],
- ["eb8686", "e18482e185a9e186b5"],
- ["eb8686", "eb85b8e186b5"],
- ["eb8687", "e18482e185a9e186b6"],
- ["eb8687", "eb85b8e186b6"],
- ["eb8688", "e18482e185a9e186b7"],
- ["eb8688", "eb85b8e186b7"],
- ["eb8689", "e18482e185a9e186b8"],
- ["eb8689", "eb85b8e186b8"],
- ["eb868a", "e18482e185a9e186b9"],
- ["eb868a", "eb85b8e186b9"],
- ["eb868b", "e18482e185a9e186ba"],
- ["eb868b", "eb85b8e186ba"],
- ["eb868c", "e18482e185a9e186bb"],
- ["eb868c", "eb85b8e186bb"],
- ["eb868d", "e18482e185a9e186bc"],
- ["eb868d", "eb85b8e186bc"],
- ["eb868e", "e18482e185a9e186bd"],
- ["eb868e", "eb85b8e186bd"],
- ["eb868f", "e18482e185a9e186be"],
- ["eb868f", "eb85b8e186be"],
- ["eb8690", "e18482e185a9e186bf"],
- ["eb8690", "eb85b8e186bf"],
- ["eb8691", "e18482e185a9e18780"],
- ["eb8691", "eb85b8e18780"],
- ["eb8692", "e18482e185a9e18781"],
- ["eb8692", "eb85b8e18781"],
- ["eb8693", "e18482e185a9e18782"],
- ["eb8693", "eb85b8e18782"],
- ["eb8694", "e18482e185aa"],
- ["eb8695", "e18482e185aae186a8"],
- ["eb8695", "eb8694e186a8"],
- ["eb8696", "e18482e185aae186a9"],
- ["eb8696", "eb8694e186a9"],
- ["eb8697", "e18482e185aae186aa"],
- ["eb8697", "eb8694e186aa"],
- ["eb8698", "e18482e185aae186ab"],
- ["eb8698", "eb8694e186ab"],
- ["eb8699", "e18482e185aae186ac"],
- ["eb8699", "eb8694e186ac"],
- ["eb869a", "e18482e185aae186ad"],
- ["eb869a", "eb8694e186ad"],
- ["eb869b", "e18482e185aae186ae"],
- ["eb869b", "eb8694e186ae"],
- ["eb869c", "e18482e185aae186af"],
- ["eb869c", "eb8694e186af"],
- ["eb869d", "e18482e185aae186b0"],
- ["eb869d", "eb8694e186b0"],
- ["eb869e", "e18482e185aae186b1"],
- ["eb869e", "eb8694e186b1"],
- ["eb869f", "e18482e185aae186b2"],
- ["eb869f", "eb8694e186b2"],
- ["eb86a0", "e18482e185aae186b3"],
- ["eb86a0", "eb8694e186b3"],
- ["eb86a1", "e18482e185aae186b4"],
- ["eb86a1", "eb8694e186b4"],
- ["eb86a2", "e18482e185aae186b5"],
- ["eb86a2", "eb8694e186b5"],
- ["eb86a3", "e18482e185aae186b6"],
- ["eb86a3", "eb8694e186b6"],
- ["eb86a4", "e18482e185aae186b7"],
- ["eb86a4", "eb8694e186b7"],
- ["eb86a5", "e18482e185aae186b8"],
- ["eb86a5", "eb8694e186b8"],
- ["eb86a6", "e18482e185aae186b9"],
- ["eb86a6", "eb8694e186b9"],
- ["eb86a7", "e18482e185aae186ba"],
- ["eb86a7", "eb8694e186ba"],
- ["eb86a8", "e18482e185aae186bb"],
- ["eb86a8", "eb8694e186bb"],
- ["eb86a9", "e18482e185aae186bc"],
- ["eb86a9", "eb8694e186bc"],
- ["eb86aa", "e18482e185aae186bd"],
- ["eb86aa", "eb8694e186bd"],
- ["eb86ab", "e18482e185aae186be"],
- ["eb86ab", "eb8694e186be"],
- ["eb86ac", "e18482e185aae186bf"],
- ["eb86ac", "eb8694e186bf"],
- ["eb86ad", "e18482e185aae18780"],
- ["eb86ad", "eb8694e18780"],
- ["eb86ae", "e18482e185aae18781"],
- ["eb86ae", "eb8694e18781"],
- ["eb86af", "e18482e185aae18782"],
- ["eb86af", "eb8694e18782"],
- ["eb86b0", "e18482e185ab"],
- ["eb86b1", "e18482e185abe186a8"],
- ["eb86b1", "eb86b0e186a8"],
- ["eb86b2", "e18482e185abe186a9"],
- ["eb86b2", "eb86b0e186a9"],
- ["eb86b3", "e18482e185abe186aa"],
- ["eb86b3", "eb86b0e186aa"],
- ["eb86b4", "e18482e185abe186ab"],
- ["eb86b4", "eb86b0e186ab"],
- ["eb86b5", "e18482e185abe186ac"],
- ["eb86b5", "eb86b0e186ac"],
- ["eb86b6", "e18482e185abe186ad"],
- ["eb86b6", "eb86b0e186ad"],
- ["eb86b7", "e18482e185abe186ae"],
- ["eb86b7", "eb86b0e186ae"],
- ["eb86b8", "e18482e185abe186af"],
- ["eb86b8", "eb86b0e186af"],
- ["eb86b9", "e18482e185abe186b0"],
- ["eb86b9", "eb86b0e186b0"],
- ["eb86ba", "e18482e185abe186b1"],
- ["eb86ba", "eb86b0e186b1"],
- ["eb86bb", "e18482e185abe186b2"],
- ["eb86bb", "eb86b0e186b2"],
- ["eb86bc", "e18482e185abe186b3"],
- ["eb86bc", "eb86b0e186b3"],
- ["eb86bd", "e18482e185abe186b4"],
- ["eb86bd", "eb86b0e186b4"],
- ["eb86be", "e18482e185abe186b5"],
- ["eb86be", "eb86b0e186b5"],
- ["eb86bf", "e18482e185abe186b6"],
- ["eb86bf", "eb86b0e186b6"],
- ["eb8780", "e18482e185abe186b7"],
- ["eb8780", "eb86b0e186b7"],
- ["eb8781", "e18482e185abe186b8"],
- ["eb8781", "eb86b0e186b8"],
- ["eb8782", "e18482e185abe186b9"],
- ["eb8782", "eb86b0e186b9"],
- ["eb8783", "e18482e185abe186ba"],
- ["eb8783", "eb86b0e186ba"],
- ["eb8784", "e18482e185abe186bb"],
- ["eb8784", "eb86b0e186bb"],
- ["eb8785", "e18482e185abe186bc"],
- ["eb8785", "eb86b0e186bc"],
- ["eb8786", "e18482e185abe186bd"],
- ["eb8786", "eb86b0e186bd"],
- ["eb8787", "e18482e185abe186be"],
- ["eb8787", "eb86b0e186be"],
- ["eb8788", "e18482e185abe186bf"],
- ["eb8788", "eb86b0e186bf"],
- ["eb8789", "e18482e185abe18780"],
- ["eb8789", "eb86b0e18780"],
- ["eb878a", "e18482e185abe18781"],
- ["eb878a", "eb86b0e18781"],
- ["eb878b", "e18482e185abe18782"],
- ["eb878b", "eb86b0e18782"],
- ["eb878c", "e18482e185ac"],
- ["eb878d", "e18482e185ace186a8"],
- ["eb878d", "eb878ce186a8"],
- ["eb878e", "e18482e185ace186a9"],
- ["eb878e", "eb878ce186a9"],
- ["eb878f", "e18482e185ace186aa"],
- ["eb878f", "eb878ce186aa"],
- ["eb8790", "e18482e185ace186ab"],
- ["eb8790", "eb878ce186ab"],
- ["eb8791", "e18482e185ace186ac"],
- ["eb8791", "eb878ce186ac"],
- ["eb8792", "e18482e185ace186ad"],
- ["eb8792", "eb878ce186ad"],
- ["eb8793", "e18482e185ace186ae"],
- ["eb8793", "eb878ce186ae"],
- ["eb8794", "e18482e185ace186af"],
- ["eb8794", "eb878ce186af"],
- ["eb8795", "e18482e185ace186b0"],
- ["eb8795", "eb878ce186b0"],
- ["eb8796", "e18482e185ace186b1"],
- ["eb8796", "eb878ce186b1"],
- ["eb8797", "e18482e185ace186b2"],
- ["eb8797", "eb878ce186b2"],
- ["eb8798", "e18482e185ace186b3"],
- ["eb8798", "eb878ce186b3"],
- ["eb8799", "e18482e185ace186b4"],
- ["eb8799", "eb878ce186b4"],
- ["eb879a", "e18482e185ace186b5"],
- ["eb879a", "eb878ce186b5"],
- ["eb879b", "e18482e185ace186b6"],
- ["eb879b", "eb878ce186b6"],
- ["eb879c", "e18482e185ace186b7"],
- ["eb879c", "eb878ce186b7"],
- ["eb879d", "e18482e185ace186b8"],
- ["eb879d", "eb878ce186b8"],
- ["eb879e", "e18482e185ace186b9"],
- ["eb879e", "eb878ce186b9"],
- ["eb879f", "e18482e185ace186ba"],
- ["eb879f", "eb878ce186ba"],
- ["eb87a0", "e18482e185ace186bb"],
- ["eb87a0", "eb878ce186bb"],
- ["eb87a1", "e18482e185ace186bc"],
- ["eb87a1", "eb878ce186bc"],
- ["eb87a2", "e18482e185ace186bd"],
- ["eb87a2", "eb878ce186bd"],
- ["eb87a3", "e18482e185ace186be"],
- ["eb87a3", "eb878ce186be"],
- ["eb87a4", "e18482e185ace186bf"],
- ["eb87a4", "eb878ce186bf"],
- ["eb87a5", "e18482e185ace18780"],
- ["eb87a5", "eb878ce18780"],
- ["eb87a6", "e18482e185ace18781"],
- ["eb87a6", "eb878ce18781"],
- ["eb87a7", "e18482e185ace18782"],
- ["eb87a7", "eb878ce18782"],
- ["eb87a8", "e18482e185ad"],
- ["eb87a9", "e18482e185ade186a8"],
- ["eb87a9", "eb87a8e186a8"],
- ["eb87aa", "e18482e185ade186a9"],
- ["eb87aa", "eb87a8e186a9"],
- ["eb87ab", "e18482e185ade186aa"],
- ["eb87ab", "eb87a8e186aa"],
- ["eb87ac", "e18482e185ade186ab"],
- ["eb87ac", "eb87a8e186ab"],
- ["eb87ad", "e18482e185ade186ac"],
- ["eb87ad", "eb87a8e186ac"],
- ["eb87ae", "e18482e185ade186ad"],
- ["eb87ae", "eb87a8e186ad"],
- ["eb87af", "e18482e185ade186ae"],
- ["eb87af", "eb87a8e186ae"],
- ["eb87b0", "e18482e185ade186af"],
- ["eb87b0", "eb87a8e186af"],
- ["eb87b1", "e18482e185ade186b0"],
- ["eb87b1", "eb87a8e186b0"],
- ["eb87b2", "e18482e185ade186b1"],
- ["eb87b2", "eb87a8e186b1"],
- ["eb87b3", "e18482e185ade186b2"],
- ["eb87b3", "eb87a8e186b2"],
- ["eb87b4", "e18482e185ade186b3"],
- ["eb87b4", "eb87a8e186b3"],
- ["eb87b5", "e18482e185ade186b4"],
- ["eb87b5", "eb87a8e186b4"],
- ["eb87b6", "e18482e185ade186b5"],
- ["eb87b6", "eb87a8e186b5"],
- ["eb87b7", "e18482e185ade186b6"],
- ["eb87b7", "eb87a8e186b6"],
- ["eb87b8", "e18482e185ade186b7"],
- ["eb87b8", "eb87a8e186b7"],
- ["eb87b9", "e18482e185ade186b8"],
- ["eb87b9", "eb87a8e186b8"],
- ["eb87ba", "e18482e185ade186b9"],
- ["eb87ba", "eb87a8e186b9"],
- ["eb87bb", "e18482e185ade186ba"],
- ["eb87bb", "eb87a8e186ba"],
- ["eb87bc", "e18482e185ade186bb"],
- ["eb87bc", "eb87a8e186bb"],
- ["eb87bd", "e18482e185ade186bc"],
- ["eb87bd", "eb87a8e186bc"],
- ["eb87be", "e18482e185ade186bd"],
- ["eb87be", "eb87a8e186bd"],
- ["eb87bf", "e18482e185ade186be"],
- ["eb87bf", "eb87a8e186be"],
- ["eb8880", "e18482e185ade186bf"],
- ["eb8880", "eb87a8e186bf"],
- ["eb8881", "e18482e185ade18780"],
- ["eb8881", "eb87a8e18780"],
- ["eb8882", "e18482e185ade18781"],
- ["eb8882", "eb87a8e18781"],
- ["eb8883", "e18482e185ade18782"],
- ["eb8883", "eb87a8e18782"],
- ["eb8884", "e18482e185ae"],
- ["eb8885", "e18482e185aee186a8"],
- ["eb8885", "eb8884e186a8"],
- ["eb8886", "e18482e185aee186a9"],
- ["eb8886", "eb8884e186a9"],
- ["eb8887", "e18482e185aee186aa"],
- ["eb8887", "eb8884e186aa"],
- ["eb8888", "e18482e185aee186ab"],
- ["eb8888", "eb8884e186ab"],
- ["eb8889", "e18482e185aee186ac"],
- ["eb8889", "eb8884e186ac"],
- ["eb888a", "e18482e185aee186ad"],
- ["eb888a", "eb8884e186ad"],
- ["eb888b", "e18482e185aee186ae"],
- ["eb888b", "eb8884e186ae"],
- ["eb888c", "e18482e185aee186af"],
- ["eb888c", "eb8884e186af"],
- ["eb888d", "e18482e185aee186b0"],
- ["eb888d", "eb8884e186b0"],
- ["eb888e", "e18482e185aee186b1"],
- ["eb888e", "eb8884e186b1"],
- ["eb888f", "e18482e185aee186b2"],
- ["eb888f", "eb8884e186b2"],
- ["eb8890", "e18482e185aee186b3"],
- ["eb8890", "eb8884e186b3"],
- ["eb8891", "e18482e185aee186b4"],
- ["eb8891", "eb8884e186b4"],
- ["eb8892", "e18482e185aee186b5"],
- ["eb8892", "eb8884e186b5"],
- ["eb8893", "e18482e185aee186b6"],
- ["eb8893", "eb8884e186b6"],
- ["eb8894", "e18482e185aee186b7"],
- ["eb8894", "eb8884e186b7"],
- ["eb8895", "e18482e185aee186b8"],
- ["eb8895", "eb8884e186b8"],
- ["eb8896", "e18482e185aee186b9"],
- ["eb8896", "eb8884e186b9"],
- ["eb8897", "e18482e185aee186ba"],
- ["eb8897", "eb8884e186ba"],
- ["eb8898", "e18482e185aee186bb"],
- ["eb8898", "eb8884e186bb"],
- ["eb8899", "e18482e185aee186bc"],
- ["eb8899", "eb8884e186bc"],
- ["eb889a", "e18482e185aee186bd"],
- ["eb889a", "eb8884e186bd"],
- ["eb889b", "e18482e185aee186be"],
- ["eb889b", "eb8884e186be"],
- ["eb889c", "e18482e185aee186bf"],
- ["eb889c", "eb8884e186bf"],
- ["eb889d", "e18482e185aee18780"],
- ["eb889d", "eb8884e18780"],
- ["eb889e", "e18482e185aee18781"],
- ["eb889e", "eb8884e18781"],
- ["eb889f", "e18482e185aee18782"],
- ["eb889f", "eb8884e18782"],
- ["eb88a0", "e18482e185af"],
- ["eb88a1", "e18482e185afe186a8"],
- ["eb88a1", "eb88a0e186a8"],
- ["eb88a2", "e18482e185afe186a9"],
- ["eb88a2", "eb88a0e186a9"],
- ["eb88a3", "e18482e185afe186aa"],
- ["eb88a3", "eb88a0e186aa"],
- ["eb88a4", "e18482e185afe186ab"],
- ["eb88a4", "eb88a0e186ab"],
- ["eb88a5", "e18482e185afe186ac"],
- ["eb88a5", "eb88a0e186ac"],
- ["eb88a6", "e18482e185afe186ad"],
- ["eb88a6", "eb88a0e186ad"],
- ["eb88a7", "e18482e185afe186ae"],
- ["eb88a7", "eb88a0e186ae"],
- ["eb88a8", "e18482e185afe186af"],
- ["eb88a8", "eb88a0e186af"],
- ["eb88a9", "e18482e185afe186b0"],
- ["eb88a9", "eb88a0e186b0"],
- ["eb88aa", "e18482e185afe186b1"],
- ["eb88aa", "eb88a0e186b1"],
- ["eb88ab", "e18482e185afe186b2"],
- ["eb88ab", "eb88a0e186b2"],
- ["eb88ac", "e18482e185afe186b3"],
- ["eb88ac", "eb88a0e186b3"],
- ["eb88ad", "e18482e185afe186b4"],
- ["eb88ad", "eb88a0e186b4"],
- ["eb88ae", "e18482e185afe186b5"],
- ["eb88ae", "eb88a0e186b5"],
- ["eb88af", "e18482e185afe186b6"],
- ["eb88af", "eb88a0e186b6"],
- ["eb88b0", "e18482e185afe186b7"],
- ["eb88b0", "eb88a0e186b7"],
- ["eb88b1", "e18482e185afe186b8"],
- ["eb88b1", "eb88a0e186b8"],
- ["eb88b2", "e18482e185afe186b9"],
- ["eb88b2", "eb88a0e186b9"],
- ["eb88b3", "e18482e185afe186ba"],
- ["eb88b3", "eb88a0e186ba"],
- ["eb88b4", "e18482e185afe186bb"],
- ["eb88b4", "eb88a0e186bb"],
- ["eb88b5", "e18482e185afe186bc"],
- ["eb88b5", "eb88a0e186bc"],
- ["eb88b6", "e18482e185afe186bd"],
- ["eb88b6", "eb88a0e186bd"],
- ["eb88b7", "e18482e185afe186be"],
- ["eb88b7", "eb88a0e186be"],
- ["eb88b8", "e18482e185afe186bf"],
- ["eb88b8", "eb88a0e186bf"],
- ["eb88b9", "e18482e185afe18780"],
- ["eb88b9", "eb88a0e18780"],
- ["eb88ba", "e18482e185afe18781"],
- ["eb88ba", "eb88a0e18781"],
- ["eb88bb", "e18482e185afe18782"],
- ["eb88bb", "eb88a0e18782"],
- ["eb88bc", "e18482e185b0"],
- ["eb88bd", "e18482e185b0e186a8"],
- ["eb88bd", "eb88bce186a8"],
- ["eb88be", "e18482e185b0e186a9"],
- ["eb88be", "eb88bce186a9"],
- ["eb88bf", "e18482e185b0e186aa"],
- ["eb88bf", "eb88bce186aa"],
- ["eb8980", "e18482e185b0e186ab"],
- ["eb8980", "eb88bce186ab"],
- ["eb8981", "e18482e185b0e186ac"],
- ["eb8981", "eb88bce186ac"],
- ["eb8982", "e18482e185b0e186ad"],
- ["eb8982", "eb88bce186ad"],
- ["eb8983", "e18482e185b0e186ae"],
- ["eb8983", "eb88bce186ae"],
- ["eb8984", "e18482e185b0e186af"],
- ["eb8984", "eb88bce186af"],
- ["eb8985", "e18482e185b0e186b0"],
- ["eb8985", "eb88bce186b0"],
- ["eb8986", "e18482e185b0e186b1"],
- ["eb8986", "eb88bce186b1"],
- ["eb8987", "e18482e185b0e186b2"],
- ["eb8987", "eb88bce186b2"],
- ["eb8988", "e18482e185b0e186b3"],
- ["eb8988", "eb88bce186b3"],
- ["eb8989", "e18482e185b0e186b4"],
- ["eb8989", "eb88bce186b4"],
- ["eb898a", "e18482e185b0e186b5"],
- ["eb898a", "eb88bce186b5"],
- ["eb898b", "e18482e185b0e186b6"],
- ["eb898b", "eb88bce186b6"],
- ["eb898c", "e18482e185b0e186b7"],
- ["eb898c", "eb88bce186b7"],
- ["eb898d", "e18482e185b0e186b8"],
- ["eb898d", "eb88bce186b8"],
- ["eb898e", "e18482e185b0e186b9"],
- ["eb898e", "eb88bce186b9"],
- ["eb898f", "e18482e185b0e186ba"],
- ["eb898f", "eb88bce186ba"],
- ["eb8990", "e18482e185b0e186bb"],
- ["eb8990", "eb88bce186bb"],
- ["eb8991", "e18482e185b0e186bc"],
- ["eb8991", "eb88bce186bc"],
- ["eb8992", "e18482e185b0e186bd"],
- ["eb8992", "eb88bce186bd"],
- ["eb8993", "e18482e185b0e186be"],
- ["eb8993", "eb88bce186be"],
- ["eb8994", "e18482e185b0e186bf"],
- ["eb8994", "eb88bce186bf"],
- ["eb8995", "e18482e185b0e18780"],
- ["eb8995", "eb88bce18780"],
- ["eb8996", "e18482e185b0e18781"],
- ["eb8996", "eb88bce18781"],
- ["eb8997", "e18482e185b0e18782"],
- ["eb8997", "eb88bce18782"],
- ["eb8998", "e18482e185b1"],
- ["eb8999", "e18482e185b1e186a8"],
- ["eb8999", "eb8998e186a8"],
- ["eb899a", "e18482e185b1e186a9"],
- ["eb899a", "eb8998e186a9"],
- ["eb899b", "e18482e185b1e186aa"],
- ["eb899b", "eb8998e186aa"],
- ["eb899c", "e18482e185b1e186ab"],
- ["eb899c", "eb8998e186ab"],
- ["eb899d", "e18482e185b1e186ac"],
- ["eb899d", "eb8998e186ac"],
- ["eb899e", "e18482e185b1e186ad"],
- ["eb899e", "eb8998e186ad"],
- ["eb899f", "e18482e185b1e186ae"],
- ["eb899f", "eb8998e186ae"],
- ["eb89a0", "e18482e185b1e186af"],
- ["eb89a0", "eb8998e186af"],
- ["eb89a1", "e18482e185b1e186b0"],
- ["eb89a1", "eb8998e186b0"],
- ["eb89a2", "e18482e185b1e186b1"],
- ["eb89a2", "eb8998e186b1"],
- ["eb89a3", "e18482e185b1e186b2"],
- ["eb89a3", "eb8998e186b2"],
- ["eb89a4", "e18482e185b1e186b3"],
- ["eb89a4", "eb8998e186b3"],
- ["eb89a5", "e18482e185b1e186b4"],
- ["eb89a5", "eb8998e186b4"],
- ["eb89a6", "e18482e185b1e186b5"],
- ["eb89a6", "eb8998e186b5"],
- ["eb89a7", "e18482e185b1e186b6"],
- ["eb89a7", "eb8998e186b6"],
- ["eb89a8", "e18482e185b1e186b7"],
- ["eb89a8", "eb8998e186b7"],
- ["eb89a9", "e18482e185b1e186b8"],
- ["eb89a9", "eb8998e186b8"],
- ["eb89aa", "e18482e185b1e186b9"],
- ["eb89aa", "eb8998e186b9"],
- ["eb89ab", "e18482e185b1e186ba"],
- ["eb89ab", "eb8998e186ba"],
- ["eb89ac", "e18482e185b1e186bb"],
- ["eb89ac", "eb8998e186bb"],
- ["eb89ad", "e18482e185b1e186bc"],
- ["eb89ad", "eb8998e186bc"],
- ["eb89ae", "e18482e185b1e186bd"],
- ["eb89ae", "eb8998e186bd"],
- ["eb89af", "e18482e185b1e186be"],
- ["eb89af", "eb8998e186be"],
- ["eb89b0", "e18482e185b1e186bf"],
- ["eb89b0", "eb8998e186bf"],
- ["eb89b1", "e18482e185b1e18780"],
- ["eb89b1", "eb8998e18780"],
- ["eb89b2", "e18482e185b1e18781"],
- ["eb89b2", "eb8998e18781"],
- ["eb89b3", "e18482e185b1e18782"],
- ["eb89b3", "eb8998e18782"],
- ["eb89b4", "e18482e185b2"],
- ["eb89b5", "e18482e185b2e186a8"],
- ["eb89b5", "eb89b4e186a8"],
- ["eb89b6", "e18482e185b2e186a9"],
- ["eb89b6", "eb89b4e186a9"],
- ["eb89b7", "e18482e185b2e186aa"],
- ["eb89b7", "eb89b4e186aa"],
- ["eb89b8", "e18482e185b2e186ab"],
- ["eb89b8", "eb89b4e186ab"],
- ["eb89b9", "e18482e185b2e186ac"],
- ["eb89b9", "eb89b4e186ac"],
- ["eb89ba", "e18482e185b2e186ad"],
- ["eb89ba", "eb89b4e186ad"],
- ["eb89bb", "e18482e185b2e186ae"],
- ["eb89bb", "eb89b4e186ae"],
- ["eb89bc", "e18482e185b2e186af"],
- ["eb89bc", "eb89b4e186af"],
- ["eb89bd", "e18482e185b2e186b0"],
- ["eb89bd", "eb89b4e186b0"],
- ["eb89be", "e18482e185b2e186b1"],
- ["eb89be", "eb89b4e186b1"],
- ["eb89bf", "e18482e185b2e186b2"],
- ["eb89bf", "eb89b4e186b2"],
- ["eb8a80", "e18482e185b2e186b3"],
- ["eb8a80", "eb89b4e186b3"],
- ["eb8a81", "e18482e185b2e186b4"],
- ["eb8a81", "eb89b4e186b4"],
- ["eb8a82", "e18482e185b2e186b5"],
- ["eb8a82", "eb89b4e186b5"],
- ["eb8a83", "e18482e185b2e186b6"],
- ["eb8a83", "eb89b4e186b6"],
- ["eb8a84", "e18482e185b2e186b7"],
- ["eb8a84", "eb89b4e186b7"],
- ["eb8a85", "e18482e185b2e186b8"],
- ["eb8a85", "eb89b4e186b8"],
- ["eb8a86", "e18482e185b2e186b9"],
- ["eb8a86", "eb89b4e186b9"],
- ["eb8a87", "e18482e185b2e186ba"],
- ["eb8a87", "eb89b4e186ba"],
- ["eb8a88", "e18482e185b2e186bb"],
- ["eb8a88", "eb89b4e186bb"],
- ["eb8a89", "e18482e185b2e186bc"],
- ["eb8a89", "eb89b4e186bc"],
- ["eb8a8a", "e18482e185b2e186bd"],
- ["eb8a8a", "eb89b4e186bd"],
- ["eb8a8b", "e18482e185b2e186be"],
- ["eb8a8b", "eb89b4e186be"],
- ["eb8a8c", "e18482e185b2e186bf"],
- ["eb8a8c", "eb89b4e186bf"],
- ["eb8a8d", "e18482e185b2e18780"],
- ["eb8a8d", "eb89b4e18780"],
- ["eb8a8e", "e18482e185b2e18781"],
- ["eb8a8e", "eb89b4e18781"],
- ["eb8a8f", "e18482e185b2e18782"],
- ["eb8a8f", "eb89b4e18782"],
- ["eb8a90", "e18482e185b3"],
- ["eb8a91", "e18482e185b3e186a8"],
- ["eb8a91", "eb8a90e186a8"],
- ["eb8a92", "e18482e185b3e186a9"],
- ["eb8a92", "eb8a90e186a9"],
- ["eb8a93", "e18482e185b3e186aa"],
- ["eb8a93", "eb8a90e186aa"],
- ["eb8a94", "e18482e185b3e186ab"],
- ["eb8a94", "eb8a90e186ab"],
- ["eb8a95", "e18482e185b3e186ac"],
- ["eb8a95", "eb8a90e186ac"],
- ["eb8a96", "e18482e185b3e186ad"],
- ["eb8a96", "eb8a90e186ad"],
- ["eb8a97", "e18482e185b3e186ae"],
- ["eb8a97", "eb8a90e186ae"],
- ["eb8a98", "e18482e185b3e186af"],
- ["eb8a98", "eb8a90e186af"],
- ["eb8a99", "e18482e185b3e186b0"],
- ["eb8a99", "eb8a90e186b0"],
- ["eb8a9a", "e18482e185b3e186b1"],
- ["eb8a9a", "eb8a90e186b1"],
- ["eb8a9b", "e18482e185b3e186b2"],
- ["eb8a9b", "eb8a90e186b2"],
- ["eb8a9c", "e18482e185b3e186b3"],
- ["eb8a9c", "eb8a90e186b3"],
- ["eb8a9d", "e18482e185b3e186b4"],
- ["eb8a9d", "eb8a90e186b4"],
- ["eb8a9e", "e18482e185b3e186b5"],
- ["eb8a9e", "eb8a90e186b5"],
- ["eb8a9f", "e18482e185b3e186b6"],
- ["eb8a9f", "eb8a90e186b6"],
- ["eb8aa0", "e18482e185b3e186b7"],
- ["eb8aa0", "eb8a90e186b7"],
- ["eb8aa1", "e18482e185b3e186b8"],
- ["eb8aa1", "eb8a90e186b8"],
- ["eb8aa2", "e18482e185b3e186b9"],
- ["eb8aa2", "eb8a90e186b9"],
- ["eb8aa3", "e18482e185b3e186ba"],
- ["eb8aa3", "eb8a90e186ba"],
- ["eb8aa4", "e18482e185b3e186bb"],
- ["eb8aa4", "eb8a90e186bb"],
- ["eb8aa5", "e18482e185b3e186bc"],
- ["eb8aa5", "eb8a90e186bc"],
- ["eb8aa6", "e18482e185b3e186bd"],
- ["eb8aa6", "eb8a90e186bd"],
- ["eb8aa7", "e18482e185b3e186be"],
- ["eb8aa7", "eb8a90e186be"],
- ["eb8aa8", "e18482e185b3e186bf"],
- ["eb8aa8", "eb8a90e186bf"],
- ["eb8aa9", "e18482e185b3e18780"],
- ["eb8aa9", "eb8a90e18780"],
- ["eb8aaa", "e18482e185b3e18781"],
- ["eb8aaa", "eb8a90e18781"],
- ["eb8aab", "e18482e185b3e18782"],
- ["eb8aab", "eb8a90e18782"],
- ["eb8aac", "e18482e185b4"],
- ["eb8aad", "e18482e185b4e186a8"],
- ["eb8aad", "eb8aace186a8"],
- ["eb8aae", "e18482e185b4e186a9"],
- ["eb8aae", "eb8aace186a9"],
- ["eb8aaf", "e18482e185b4e186aa"],
- ["eb8aaf", "eb8aace186aa"],
- ["eb8ab0", "e18482e185b4e186ab"],
- ["eb8ab0", "eb8aace186ab"],
- ["eb8ab1", "e18482e185b4e186ac"],
- ["eb8ab1", "eb8aace186ac"],
- ["eb8ab2", "e18482e185b4e186ad"],
- ["eb8ab2", "eb8aace186ad"],
- ["eb8ab3", "e18482e185b4e186ae"],
- ["eb8ab3", "eb8aace186ae"],
- ["eb8ab4", "e18482e185b4e186af"],
- ["eb8ab4", "eb8aace186af"],
- ["eb8ab5", "e18482e185b4e186b0"],
- ["eb8ab5", "eb8aace186b0"],
- ["eb8ab6", "e18482e185b4e186b1"],
- ["eb8ab6", "eb8aace186b1"],
- ["eb8ab7", "e18482e185b4e186b2"],
- ["eb8ab7", "eb8aace186b2"],
- ["eb8ab8", "e18482e185b4e186b3"],
- ["eb8ab8", "eb8aace186b3"],
- ["eb8ab9", "e18482e185b4e186b4"],
- ["eb8ab9", "eb8aace186b4"],
- ["eb8aba", "e18482e185b4e186b5"],
- ["eb8aba", "eb8aace186b5"],
- ["eb8abb", "e18482e185b4e186b6"],
- ["eb8abb", "eb8aace186b6"],
- ["eb8abc", "e18482e185b4e186b7"],
- ["eb8abc", "eb8aace186b7"],
- ["eb8abd", "e18482e185b4e186b8"],
- ["eb8abd", "eb8aace186b8"],
- ["eb8abe", "e18482e185b4e186b9"],
- ["eb8abe", "eb8aace186b9"],
- ["eb8abf", "e18482e185b4e186ba"],
- ["eb8abf", "eb8aace186ba"],
- ["eb8b80", "e18482e185b4e186bb"],
- ["eb8b80", "eb8aace186bb"],
- ["eb8b81", "e18482e185b4e186bc"],
- ["eb8b81", "eb8aace186bc"],
- ["eb8b82", "e18482e185b4e186bd"],
- ["eb8b82", "eb8aace186bd"],
- ["eb8b83", "e18482e185b4e186be"],
- ["eb8b83", "eb8aace186be"],
- ["eb8b84", "e18482e185b4e186bf"],
- ["eb8b84", "eb8aace186bf"],
- ["eb8b85", "e18482e185b4e18780"],
- ["eb8b85", "eb8aace18780"],
- ["eb8b86", "e18482e185b4e18781"],
- ["eb8b86", "eb8aace18781"],
- ["eb8b87", "e18482e185b4e18782"],
- ["eb8b87", "eb8aace18782"],
- ["eb8b88", "e18482e185b5"],
- ["eb8b89", "e18482e185b5e186a8"],
- ["eb8b89", "eb8b88e186a8"],
- ["eb8b8a", "e18482e185b5e186a9"],
- ["eb8b8a", "eb8b88e186a9"],
- ["eb8b8b", "e18482e185b5e186aa"],
- ["eb8b8b", "eb8b88e186aa"],
- ["eb8b8c", "e18482e185b5e186ab"],
- ["eb8b8c", "eb8b88e186ab"],
- ["eb8b8d", "e18482e185b5e186ac"],
- ["eb8b8d", "eb8b88e186ac"],
- ["eb8b8e", "e18482e185b5e186ad"],
- ["eb8b8e", "eb8b88e186ad"],
- ["eb8b8f", "e18482e185b5e186ae"],
- ["eb8b8f", "eb8b88e186ae"],
- ["eb8b90", "e18482e185b5e186af"],
- ["eb8b90", "eb8b88e186af"],
- ["eb8b91", "e18482e185b5e186b0"],
- ["eb8b91", "eb8b88e186b0"],
- ["eb8b92", "e18482e185b5e186b1"],
- ["eb8b92", "eb8b88e186b1"],
- ["eb8b93", "e18482e185b5e186b2"],
- ["eb8b93", "eb8b88e186b2"],
- ["eb8b94", "e18482e185b5e186b3"],
- ["eb8b94", "eb8b88e186b3"],
- ["eb8b95", "e18482e185b5e186b4"],
- ["eb8b95", "eb8b88e186b4"],
- ["eb8b96", "e18482e185b5e186b5"],
- ["eb8b96", "eb8b88e186b5"],
- ["eb8b97", "e18482e185b5e186b6"],
- ["eb8b97", "eb8b88e186b6"],
- ["eb8b98", "e18482e185b5e186b7"],
- ["eb8b98", "eb8b88e186b7"],
- ["eb8b99", "e18482e185b5e186b8"],
- ["eb8b99", "eb8b88e186b8"],
- ["eb8b9a", "e18482e185b5e186b9"],
- ["eb8b9a", "eb8b88e186b9"],
- ["eb8b9b", "e18482e185b5e186ba"],
- ["eb8b9b", "eb8b88e186ba"],
- ["eb8b9c", "e18482e185b5e186bb"],
- ["eb8b9c", "eb8b88e186bb"],
- ["eb8b9d", "e18482e185b5e186bc"],
- ["eb8b9d", "eb8b88e186bc"],
- ["eb8b9e", "e18482e185b5e186bd"],
- ["eb8b9e", "eb8b88e186bd"],
- ["eb8b9f", "e18482e185b5e186be"],
- ["eb8b9f", "eb8b88e186be"],
- ["eb8ba0", "e18482e185b5e186bf"],
- ["eb8ba0", "eb8b88e186bf"],
- ["eb8ba1", "e18482e185b5e18780"],
- ["eb8ba1", "eb8b88e18780"],
- ["eb8ba2", "e18482e185b5e18781"],
- ["eb8ba2", "eb8b88e18781"],
- ["eb8ba3", "e18482e185b5e18782"],
- ["eb8ba3", "eb8b88e18782"],
- ["eb8ba4", "e18483e185a1"],
- ["eb8ba5", "e18483e185a1e186a8"],
- ["eb8ba5", "eb8ba4e186a8"],
- ["eb8ba6", "e18483e185a1e186a9"],
- ["eb8ba6", "eb8ba4e186a9"],
- ["eb8ba7", "e18483e185a1e186aa"],
- ["eb8ba7", "eb8ba4e186aa"],
- ["eb8ba8", "e18483e185a1e186ab"],
- ["eb8ba8", "eb8ba4e186ab"],
- ["eb8ba9", "e18483e185a1e186ac"],
- ["eb8ba9", "eb8ba4e186ac"],
- ["eb8baa", "e18483e185a1e186ad"],
- ["eb8baa", "eb8ba4e186ad"],
- ["eb8bab", "e18483e185a1e186ae"],
- ["eb8bab", "eb8ba4e186ae"],
- ["eb8bac", "e18483e185a1e186af"],
- ["eb8bac", "eb8ba4e186af"],
- ["eb8bad", "e18483e185a1e186b0"],
- ["eb8bad", "eb8ba4e186b0"],
- ["eb8bae", "e18483e185a1e186b1"],
- ["eb8bae", "eb8ba4e186b1"],
- ["eb8baf", "e18483e185a1e186b2"],
- ["eb8baf", "eb8ba4e186b2"],
- ["eb8bb0", "e18483e185a1e186b3"],
- ["eb8bb0", "eb8ba4e186b3"],
- ["eb8bb1", "e18483e185a1e186b4"],
- ["eb8bb1", "eb8ba4e186b4"],
- ["eb8bb2", "e18483e185a1e186b5"],
- ["eb8bb2", "eb8ba4e186b5"],
- ["eb8bb3", "e18483e185a1e186b6"],
- ["eb8bb3", "eb8ba4e186b6"],
- ["eb8bb4", "e18483e185a1e186b7"],
- ["eb8bb4", "eb8ba4e186b7"],
- ["eb8bb5", "e18483e185a1e186b8"],
- ["eb8bb5", "eb8ba4e186b8"],
- ["eb8bb6", "e18483e185a1e186b9"],
- ["eb8bb6", "eb8ba4e186b9"],
- ["eb8bb7", "e18483e185a1e186ba"],
- ["eb8bb7", "eb8ba4e186ba"],
- ["eb8bb8", "e18483e185a1e186bb"],
- ["eb8bb8", "eb8ba4e186bb"],
- ["eb8bb9", "e18483e185a1e186bc"],
- ["eb8bb9", "eb8ba4e186bc"],
- ["eb8bba", "e18483e185a1e186bd"],
- ["eb8bba", "eb8ba4e186bd"],
- ["eb8bbb", "e18483e185a1e186be"],
- ["eb8bbb", "eb8ba4e186be"],
- ["eb8bbc", "e18483e185a1e186bf"],
- ["eb8bbc", "eb8ba4e186bf"],
- ["eb8bbd", "e18483e185a1e18780"],
- ["eb8bbd", "eb8ba4e18780"],
- ["eb8bbe", "e18483e185a1e18781"],
- ["eb8bbe", "eb8ba4e18781"],
- ["eb8bbf", "e18483e185a1e18782"],
- ["eb8bbf", "eb8ba4e18782"],
- ["eb8c80", "e18483e185a2"],
- ["eb8c81", "e18483e185a2e186a8"],
- ["eb8c81", "eb8c80e186a8"],
- ["eb8c82", "e18483e185a2e186a9"],
- ["eb8c82", "eb8c80e186a9"],
- ["eb8c83", "e18483e185a2e186aa"],
- ["eb8c83", "eb8c80e186aa"],
- ["eb8c84", "e18483e185a2e186ab"],
- ["eb8c84", "eb8c80e186ab"],
- ["eb8c85", "e18483e185a2e186ac"],
- ["eb8c85", "eb8c80e186ac"],
- ["eb8c86", "e18483e185a2e186ad"],
- ["eb8c86", "eb8c80e186ad"],
- ["eb8c87", "e18483e185a2e186ae"],
- ["eb8c87", "eb8c80e186ae"],
- ["eb8c88", "e18483e185a2e186af"],
- ["eb8c88", "eb8c80e186af"],
- ["eb8c89", "e18483e185a2e186b0"],
- ["eb8c89", "eb8c80e186b0"],
- ["eb8c8a", "e18483e185a2e186b1"],
- ["eb8c8a", "eb8c80e186b1"],
- ["eb8c8b", "e18483e185a2e186b2"],
- ["eb8c8b", "eb8c80e186b2"],
- ["eb8c8c", "e18483e185a2e186b3"],
- ["eb8c8c", "eb8c80e186b3"],
- ["eb8c8d", "e18483e185a2e186b4"],
- ["eb8c8d", "eb8c80e186b4"],
- ["eb8c8e", "e18483e185a2e186b5"],
- ["eb8c8e", "eb8c80e186b5"],
- ["eb8c8f", "e18483e185a2e186b6"],
- ["eb8c8f", "eb8c80e186b6"],
- ["eb8c90", "e18483e185a2e186b7"],
- ["eb8c90", "eb8c80e186b7"],
- ["eb8c91", "e18483e185a2e186b8"],
- ["eb8c91", "eb8c80e186b8"],
- ["eb8c92", "e18483e185a2e186b9"],
- ["eb8c92", "eb8c80e186b9"],
- ["eb8c93", "e18483e185a2e186ba"],
- ["eb8c93", "eb8c80e186ba"],
- ["eb8c94", "e18483e185a2e186bb"],
- ["eb8c94", "eb8c80e186bb"],
- ["eb8c95", "e18483e185a2e186bc"],
- ["eb8c95", "eb8c80e186bc"],
- ["eb8c96", "e18483e185a2e186bd"],
- ["eb8c96", "eb8c80e186bd"],
- ["eb8c97", "e18483e185a2e186be"],
- ["eb8c97", "eb8c80e186be"],
- ["eb8c98", "e18483e185a2e186bf"],
- ["eb8c98", "eb8c80e186bf"],
- ["eb8c99", "e18483e185a2e18780"],
- ["eb8c99", "eb8c80e18780"],
- ["eb8c9a", "e18483e185a2e18781"],
- ["eb8c9a", "eb8c80e18781"],
- ["eb8c9b", "e18483e185a2e18782"],
- ["eb8c9b", "eb8c80e18782"],
- ["eb8c9c", "e18483e185a3"],
- ["eb8c9d", "e18483e185a3e186a8"],
- ["eb8c9d", "eb8c9ce186a8"],
- ["eb8c9e", "e18483e185a3e186a9"],
- ["eb8c9e", "eb8c9ce186a9"],
- ["eb8c9f", "e18483e185a3e186aa"],
- ["eb8c9f", "eb8c9ce186aa"],
- ["eb8ca0", "e18483e185a3e186ab"],
- ["eb8ca0", "eb8c9ce186ab"],
- ["eb8ca1", "e18483e185a3e186ac"],
- ["eb8ca1", "eb8c9ce186ac"],
- ["eb8ca2", "e18483e185a3e186ad"],
- ["eb8ca2", "eb8c9ce186ad"],
- ["eb8ca3", "e18483e185a3e186ae"],
- ["eb8ca3", "eb8c9ce186ae"],
- ["eb8ca4", "e18483e185a3e186af"],
- ["eb8ca4", "eb8c9ce186af"],
- ["eb8ca5", "e18483e185a3e186b0"],
- ["eb8ca5", "eb8c9ce186b0"],
- ["eb8ca6", "e18483e185a3e186b1"],
- ["eb8ca6", "eb8c9ce186b1"],
- ["eb8ca7", "e18483e185a3e186b2"],
- ["eb8ca7", "eb8c9ce186b2"],
- ["eb8ca8", "e18483e185a3e186b3"],
- ["eb8ca8", "eb8c9ce186b3"],
- ["eb8ca9", "e18483e185a3e186b4"],
- ["eb8ca9", "eb8c9ce186b4"],
- ["eb8caa", "e18483e185a3e186b5"],
- ["eb8caa", "eb8c9ce186b5"],
- ["eb8cab", "e18483e185a3e186b6"],
- ["eb8cab", "eb8c9ce186b6"],
- ["eb8cac", "e18483e185a3e186b7"],
- ["eb8cac", "eb8c9ce186b7"],
- ["eb8cad", "e18483e185a3e186b8"],
- ["eb8cad", "eb8c9ce186b8"],
- ["eb8cae", "e18483e185a3e186b9"],
- ["eb8cae", "eb8c9ce186b9"],
- ["eb8caf", "e18483e185a3e186ba"],
- ["eb8caf", "eb8c9ce186ba"],
- ["eb8cb0", "e18483e185a3e186bb"],
- ["eb8cb0", "eb8c9ce186bb"],
- ["eb8cb1", "e18483e185a3e186bc"],
- ["eb8cb1", "eb8c9ce186bc"],
- ["eb8cb2", "e18483e185a3e186bd"],
- ["eb8cb2", "eb8c9ce186bd"],
- ["eb8cb3", "e18483e185a3e186be"],
- ["eb8cb3", "eb8c9ce186be"],
- ["eb8cb4", "e18483e185a3e186bf"],
- ["eb8cb4", "eb8c9ce186bf"],
- ["eb8cb5", "e18483e185a3e18780"],
- ["eb8cb5", "eb8c9ce18780"],
- ["eb8cb6", "e18483e185a3e18781"],
- ["eb8cb6", "eb8c9ce18781"],
- ["eb8cb7", "e18483e185a3e18782"],
- ["eb8cb7", "eb8c9ce18782"],
- ["eb8cb8", "e18483e185a4"],
- ["eb8cb9", "e18483e185a4e186a8"],
- ["eb8cb9", "eb8cb8e186a8"],
- ["eb8cba", "e18483e185a4e186a9"],
- ["eb8cba", "eb8cb8e186a9"],
- ["eb8cbb", "e18483e185a4e186aa"],
- ["eb8cbb", "eb8cb8e186aa"],
- ["eb8cbc", "e18483e185a4e186ab"],
- ["eb8cbc", "eb8cb8e186ab"],
- ["eb8cbd", "e18483e185a4e186ac"],
- ["eb8cbd", "eb8cb8e186ac"],
- ["eb8cbe", "e18483e185a4e186ad"],
- ["eb8cbe", "eb8cb8e186ad"],
- ["eb8cbf", "e18483e185a4e186ae"],
- ["eb8cbf", "eb8cb8e186ae"],
- ["eb8d80", "e18483e185a4e186af"],
- ["eb8d80", "eb8cb8e186af"],
- ["eb8d81", "e18483e185a4e186b0"],
- ["eb8d81", "eb8cb8e186b0"],
- ["eb8d82", "e18483e185a4e186b1"],
- ["eb8d82", "eb8cb8e186b1"],
- ["eb8d83", "e18483e185a4e186b2"],
- ["eb8d83", "eb8cb8e186b2"],
- ["eb8d84", "e18483e185a4e186b3"],
- ["eb8d84", "eb8cb8e186b3"],
- ["eb8d85", "e18483e185a4e186b4"],
- ["eb8d85", "eb8cb8e186b4"],
- ["eb8d86", "e18483e185a4e186b5"],
- ["eb8d86", "eb8cb8e186b5"],
- ["eb8d87", "e18483e185a4e186b6"],
- ["eb8d87", "eb8cb8e186b6"],
- ["eb8d88", "e18483e185a4e186b7"],
- ["eb8d88", "eb8cb8e186b7"],
- ["eb8d89", "e18483e185a4e186b8"],
- ["eb8d89", "eb8cb8e186b8"],
- ["eb8d8a", "e18483e185a4e186b9"],
- ["eb8d8a", "eb8cb8e186b9"],
- ["eb8d8b", "e18483e185a4e186ba"],
- ["eb8d8b", "eb8cb8e186ba"],
- ["eb8d8c", "e18483e185a4e186bb"],
- ["eb8d8c", "eb8cb8e186bb"],
- ["eb8d8d", "e18483e185a4e186bc"],
- ["eb8d8d", "eb8cb8e186bc"],
- ["eb8d8e", "e18483e185a4e186bd"],
- ["eb8d8e", "eb8cb8e186bd"],
- ["eb8d8f", "e18483e185a4e186be"],
- ["eb8d8f", "eb8cb8e186be"],
- ["eb8d90", "e18483e185a4e186bf"],
- ["eb8d90", "eb8cb8e186bf"],
- ["eb8d91", "e18483e185a4e18780"],
- ["eb8d91", "eb8cb8e18780"],
- ["eb8d92", "e18483e185a4e18781"],
- ["eb8d92", "eb8cb8e18781"],
- ["eb8d93", "e18483e185a4e18782"],
- ["eb8d93", "eb8cb8e18782"],
- ["eb8d94", "e18483e185a5"],
- ["eb8d95", "e18483e185a5e186a8"],
- ["eb8d95", "eb8d94e186a8"],
- ["eb8d96", "e18483e185a5e186a9"],
- ["eb8d96", "eb8d94e186a9"],
- ["eb8d97", "e18483e185a5e186aa"],
- ["eb8d97", "eb8d94e186aa"],
- ["eb8d98", "e18483e185a5e186ab"],
- ["eb8d98", "eb8d94e186ab"],
- ["eb8d99", "e18483e185a5e186ac"],
- ["eb8d99", "eb8d94e186ac"],
- ["eb8d9a", "e18483e185a5e186ad"],
- ["eb8d9a", "eb8d94e186ad"],
- ["eb8d9b", "e18483e185a5e186ae"],
- ["eb8d9b", "eb8d94e186ae"],
- ["eb8d9c", "e18483e185a5e186af"],
- ["eb8d9c", "eb8d94e186af"],
- ["eb8d9d", "e18483e185a5e186b0"],
- ["eb8d9d", "eb8d94e186b0"],
- ["eb8d9e", "e18483e185a5e186b1"],
- ["eb8d9e", "eb8d94e186b1"],
- ["eb8d9f", "e18483e185a5e186b2"],
- ["eb8d9f", "eb8d94e186b2"],
- ["eb8da0", "e18483e185a5e186b3"],
- ["eb8da0", "eb8d94e186b3"],
- ["eb8da1", "e18483e185a5e186b4"],
- ["eb8da1", "eb8d94e186b4"],
- ["eb8da2", "e18483e185a5e186b5"],
- ["eb8da2", "eb8d94e186b5"],
- ["eb8da3", "e18483e185a5e186b6"],
- ["eb8da3", "eb8d94e186b6"],
- ["eb8da4", "e18483e185a5e186b7"],
- ["eb8da4", "eb8d94e186b7"],
- ["eb8da5", "e18483e185a5e186b8"],
- ["eb8da5", "eb8d94e186b8"],
- ["eb8da6", "e18483e185a5e186b9"],
- ["eb8da6", "eb8d94e186b9"],
- ["eb8da7", "e18483e185a5e186ba"],
- ["eb8da7", "eb8d94e186ba"],
- ["eb8da8", "e18483e185a5e186bb"],
- ["eb8da8", "eb8d94e186bb"],
- ["eb8da9", "e18483e185a5e186bc"],
- ["eb8da9", "eb8d94e186bc"],
- ["eb8daa", "e18483e185a5e186bd"],
- ["eb8daa", "eb8d94e186bd"],
- ["eb8dab", "e18483e185a5e186be"],
- ["eb8dab", "eb8d94e186be"],
- ["eb8dac", "e18483e185a5e186bf"],
- ["eb8dac", "eb8d94e186bf"],
- ["eb8dad", "e18483e185a5e18780"],
- ["eb8dad", "eb8d94e18780"],
- ["eb8dae", "e18483e185a5e18781"],
- ["eb8dae", "eb8d94e18781"],
- ["eb8daf", "e18483e185a5e18782"],
- ["eb8daf", "eb8d94e18782"],
- ["eb8db0", "e18483e185a6"],
- ["eb8db1", "e18483e185a6e186a8"],
- ["eb8db1", "eb8db0e186a8"],
- ["eb8db2", "e18483e185a6e186a9"],
- ["eb8db2", "eb8db0e186a9"],
- ["eb8db3", "e18483e185a6e186aa"],
- ["eb8db3", "eb8db0e186aa"],
- ["eb8db4", "e18483e185a6e186ab"],
- ["eb8db4", "eb8db0e186ab"],
- ["eb8db5", "e18483e185a6e186ac"],
- ["eb8db5", "eb8db0e186ac"],
- ["eb8db6", "e18483e185a6e186ad"],
- ["eb8db6", "eb8db0e186ad"],
- ["eb8db7", "e18483e185a6e186ae"],
- ["eb8db7", "eb8db0e186ae"],
- ["eb8db8", "e18483e185a6e186af"],
- ["eb8db8", "eb8db0e186af"],
- ["eb8db9", "e18483e185a6e186b0"],
- ["eb8db9", "eb8db0e186b0"],
- ["eb8dba", "e18483e185a6e186b1"],
- ["eb8dba", "eb8db0e186b1"],
- ["eb8dbb", "e18483e185a6e186b2"],
- ["eb8dbb", "eb8db0e186b2"],
- ["eb8dbc", "e18483e185a6e186b3"],
- ["eb8dbc", "eb8db0e186b3"],
- ["eb8dbd", "e18483e185a6e186b4"],
- ["eb8dbd", "eb8db0e186b4"],
- ["eb8dbe", "e18483e185a6e186b5"],
- ["eb8dbe", "eb8db0e186b5"],
- ["eb8dbf", "e18483e185a6e186b6"],
- ["eb8dbf", "eb8db0e186b6"],
- ["eb8e80", "e18483e185a6e186b7"],
- ["eb8e80", "eb8db0e186b7"],
- ["eb8e81", "e18483e185a6e186b8"],
- ["eb8e81", "eb8db0e186b8"],
- ["eb8e82", "e18483e185a6e186b9"],
- ["eb8e82", "eb8db0e186b9"],
- ["eb8e83", "e18483e185a6e186ba"],
- ["eb8e83", "eb8db0e186ba"],
- ["eb8e84", "e18483e185a6e186bb"],
- ["eb8e84", "eb8db0e186bb"],
- ["eb8e85", "e18483e185a6e186bc"],
- ["eb8e85", "eb8db0e186bc"],
- ["eb8e86", "e18483e185a6e186bd"],
- ["eb8e86", "eb8db0e186bd"],
- ["eb8e87", "e18483e185a6e186be"],
- ["eb8e87", "eb8db0e186be"],
- ["eb8e88", "e18483e185a6e186bf"],
- ["eb8e88", "eb8db0e186bf"],
- ["eb8e89", "e18483e185a6e18780"],
- ["eb8e89", "eb8db0e18780"],
- ["eb8e8a", "e18483e185a6e18781"],
- ["eb8e8a", "eb8db0e18781"],
- ["eb8e8b", "e18483e185a6e18782"],
- ["eb8e8b", "eb8db0e18782"],
- ["eb8e8c", "e18483e185a7"],
- ["eb8e8d", "e18483e185a7e186a8"],
- ["eb8e8d", "eb8e8ce186a8"],
- ["eb8e8e", "e18483e185a7e186a9"],
- ["eb8e8e", "eb8e8ce186a9"],
- ["eb8e8f", "e18483e185a7e186aa"],
- ["eb8e8f", "eb8e8ce186aa"],
- ["eb8e90", "e18483e185a7e186ab"],
- ["eb8e90", "eb8e8ce186ab"],
- ["eb8e91", "e18483e185a7e186ac"],
- ["eb8e91", "eb8e8ce186ac"],
- ["eb8e92", "e18483e185a7e186ad"],
- ["eb8e92", "eb8e8ce186ad"],
- ["eb8e93", "e18483e185a7e186ae"],
- ["eb8e93", "eb8e8ce186ae"],
- ["eb8e94", "e18483e185a7e186af"],
- ["eb8e94", "eb8e8ce186af"],
- ["eb8e95", "e18483e185a7e186b0"],
- ["eb8e95", "eb8e8ce186b0"],
- ["eb8e96", "e18483e185a7e186b1"],
- ["eb8e96", "eb8e8ce186b1"],
- ["eb8e97", "e18483e185a7e186b2"],
- ["eb8e97", "eb8e8ce186b2"],
- ["eb8e98", "e18483e185a7e186b3"],
- ["eb8e98", "eb8e8ce186b3"],
- ["eb8e99", "e18483e185a7e186b4"],
- ["eb8e99", "eb8e8ce186b4"],
- ["eb8e9a", "e18483e185a7e186b5"],
- ["eb8e9a", "eb8e8ce186b5"],
- ["eb8e9b", "e18483e185a7e186b6"],
- ["eb8e9b", "eb8e8ce186b6"],
- ["eb8e9c", "e18483e185a7e186b7"],
- ["eb8e9c", "eb8e8ce186b7"],
- ["eb8e9d", "e18483e185a7e186b8"],
- ["eb8e9d", "eb8e8ce186b8"],
- ["eb8e9e", "e18483e185a7e186b9"],
- ["eb8e9e", "eb8e8ce186b9"],
- ["eb8e9f", "e18483e185a7e186ba"],
- ["eb8e9f", "eb8e8ce186ba"],
- ["eb8ea0", "e18483e185a7e186bb"],
- ["eb8ea0", "eb8e8ce186bb"],
- ["eb8ea1", "e18483e185a7e186bc"],
- ["eb8ea1", "eb8e8ce186bc"],
- ["eb8ea2", "e18483e185a7e186bd"],
- ["eb8ea2", "eb8e8ce186bd"],
- ["eb8ea3", "e18483e185a7e186be"],
- ["eb8ea3", "eb8e8ce186be"],
- ["eb8ea4", "e18483e185a7e186bf"],
- ["eb8ea4", "eb8e8ce186bf"],
- ["eb8ea5", "e18483e185a7e18780"],
- ["eb8ea5", "eb8e8ce18780"],
- ["eb8ea6", "e18483e185a7e18781"],
- ["eb8ea6", "eb8e8ce18781"],
- ["eb8ea7", "e18483e185a7e18782"],
- ["eb8ea7", "eb8e8ce18782"],
- ["eb8ea8", "e18483e185a8"],
- ["eb8ea9", "e18483e185a8e186a8"],
- ["eb8ea9", "eb8ea8e186a8"],
- ["eb8eaa", "e18483e185a8e186a9"],
- ["eb8eaa", "eb8ea8e186a9"],
- ["eb8eab", "e18483e185a8e186aa"],
- ["eb8eab", "eb8ea8e186aa"],
- ["eb8eac", "e18483e185a8e186ab"],
- ["eb8eac", "eb8ea8e186ab"],
- ["eb8ead", "e18483e185a8e186ac"],
- ["eb8ead", "eb8ea8e186ac"],
- ["eb8eae", "e18483e185a8e186ad"],
- ["eb8eae", "eb8ea8e186ad"],
- ["eb8eaf", "e18483e185a8e186ae"],
- ["eb8eaf", "eb8ea8e186ae"],
- ["eb8eb0", "e18483e185a8e186af"],
- ["eb8eb0", "eb8ea8e186af"],
- ["eb8eb1", "e18483e185a8e186b0"],
- ["eb8eb1", "eb8ea8e186b0"],
- ["eb8eb2", "e18483e185a8e186b1"],
- ["eb8eb2", "eb8ea8e186b1"],
- ["eb8eb3", "e18483e185a8e186b2"],
- ["eb8eb3", "eb8ea8e186b2"],
- ["eb8eb4", "e18483e185a8e186b3"],
- ["eb8eb4", "eb8ea8e186b3"],
- ["eb8eb5", "e18483e185a8e186b4"],
- ["eb8eb5", "eb8ea8e186b4"],
- ["eb8eb6", "e18483e185a8e186b5"],
- ["eb8eb6", "eb8ea8e186b5"],
- ["eb8eb7", "e18483e185a8e186b6"],
- ["eb8eb7", "eb8ea8e186b6"],
- ["eb8eb8", "e18483e185a8e186b7"],
- ["eb8eb8", "eb8ea8e186b7"],
- ["eb8eb9", "e18483e185a8e186b8"],
- ["eb8eb9", "eb8ea8e186b8"],
- ["eb8eba", "e18483e185a8e186b9"],
- ["eb8eba", "eb8ea8e186b9"],
- ["eb8ebb", "e18483e185a8e186ba"],
- ["eb8ebb", "eb8ea8e186ba"],
- ["eb8ebc", "e18483e185a8e186bb"],
- ["eb8ebc", "eb8ea8e186bb"],
- ["eb8ebd", "e18483e185a8e186bc"],
- ["eb8ebd", "eb8ea8e186bc"],
- ["eb8ebe", "e18483e185a8e186bd"],
- ["eb8ebe", "eb8ea8e186bd"],
- ["eb8ebf", "e18483e185a8e186be"],
- ["eb8ebf", "eb8ea8e186be"],
- ["eb8f80", "e18483e185a8e186bf"],
- ["eb8f80", "eb8ea8e186bf"],
- ["eb8f81", "e18483e185a8e18780"],
- ["eb8f81", "eb8ea8e18780"],
- ["eb8f82", "e18483e185a8e18781"],
- ["eb8f82", "eb8ea8e18781"],
- ["eb8f83", "e18483e185a8e18782"],
- ["eb8f83", "eb8ea8e18782"],
- ["eb8f84", "e18483e185a9"],
- ["eb8f85", "e18483e185a9e186a8"],
- ["eb8f85", "eb8f84e186a8"],
- ["eb8f86", "e18483e185a9e186a9"],
- ["eb8f86", "eb8f84e186a9"],
- ["eb8f87", "e18483e185a9e186aa"],
- ["eb8f87", "eb8f84e186aa"],
- ["eb8f88", "e18483e185a9e186ab"],
- ["eb8f88", "eb8f84e186ab"],
- ["eb8f89", "e18483e185a9e186ac"],
- ["eb8f89", "eb8f84e186ac"],
- ["eb8f8a", "e18483e185a9e186ad"],
- ["eb8f8a", "eb8f84e186ad"],
- ["eb8f8b", "e18483e185a9e186ae"],
- ["eb8f8b", "eb8f84e186ae"],
- ["eb8f8c", "e18483e185a9e186af"],
- ["eb8f8c", "eb8f84e186af"],
- ["eb8f8d", "e18483e185a9e186b0"],
- ["eb8f8d", "eb8f84e186b0"],
- ["eb8f8e", "e18483e185a9e186b1"],
- ["eb8f8e", "eb8f84e186b1"],
- ["eb8f8f", "e18483e185a9e186b2"],
- ["eb8f8f", "eb8f84e186b2"],
- ["eb8f90", "e18483e185a9e186b3"],
- ["eb8f90", "eb8f84e186b3"],
- ["eb8f91", "e18483e185a9e186b4"],
- ["eb8f91", "eb8f84e186b4"],
- ["eb8f92", "e18483e185a9e186b5"],
- ["eb8f92", "eb8f84e186b5"],
- ["eb8f93", "e18483e185a9e186b6"],
- ["eb8f93", "eb8f84e186b6"],
- ["eb8f94", "e18483e185a9e186b7"],
- ["eb8f94", "eb8f84e186b7"],
- ["eb8f95", "e18483e185a9e186b8"],
- ["eb8f95", "eb8f84e186b8"],
- ["eb8f96", "e18483e185a9e186b9"],
- ["eb8f96", "eb8f84e186b9"],
- ["eb8f97", "e18483e185a9e186ba"],
- ["eb8f97", "eb8f84e186ba"],
- ["eb8f98", "e18483e185a9e186bb"],
- ["eb8f98", "eb8f84e186bb"],
- ["eb8f99", "e18483e185a9e186bc"],
- ["eb8f99", "eb8f84e186bc"],
- ["eb8f9a", "e18483e185a9e186bd"],
- ["eb8f9a", "eb8f84e186bd"],
- ["eb8f9b", "e18483e185a9e186be"],
- ["eb8f9b", "eb8f84e186be"],
- ["eb8f9c", "e18483e185a9e186bf"],
- ["eb8f9c", "eb8f84e186bf"],
- ["eb8f9d", "e18483e185a9e18780"],
- ["eb8f9d", "eb8f84e18780"],
- ["eb8f9e", "e18483e185a9e18781"],
- ["eb8f9e", "eb8f84e18781"],
- ["eb8f9f", "e18483e185a9e18782"],
- ["eb8f9f", "eb8f84e18782"],
- ["eb8fa0", "e18483e185aa"],
- ["eb8fa1", "e18483e185aae186a8"],
- ["eb8fa1", "eb8fa0e186a8"],
- ["eb8fa2", "e18483e185aae186a9"],
- ["eb8fa2", "eb8fa0e186a9"],
- ["eb8fa3", "e18483e185aae186aa"],
- ["eb8fa3", "eb8fa0e186aa"],
- ["eb8fa4", "e18483e185aae186ab"],
- ["eb8fa4", "eb8fa0e186ab"],
- ["eb8fa5", "e18483e185aae186ac"],
- ["eb8fa5", "eb8fa0e186ac"],
- ["eb8fa6", "e18483e185aae186ad"],
- ["eb8fa6", "eb8fa0e186ad"],
- ["eb8fa7", "e18483e185aae186ae"],
- ["eb8fa7", "eb8fa0e186ae"],
- ["eb8fa8", "e18483e185aae186af"],
- ["eb8fa8", "eb8fa0e186af"],
- ["eb8fa9", "e18483e185aae186b0"],
- ["eb8fa9", "eb8fa0e186b0"],
- ["eb8faa", "e18483e185aae186b1"],
- ["eb8faa", "eb8fa0e186b1"],
- ["eb8fab", "e18483e185aae186b2"],
- ["eb8fab", "eb8fa0e186b2"],
- ["eb8fac", "e18483e185aae186b3"],
- ["eb8fac", "eb8fa0e186b3"],
- ["eb8fad", "e18483e185aae186b4"],
- ["eb8fad", "eb8fa0e186b4"],
- ["eb8fae", "e18483e185aae186b5"],
- ["eb8fae", "eb8fa0e186b5"],
- ["eb8faf", "e18483e185aae186b6"],
- ["eb8faf", "eb8fa0e186b6"],
- ["eb8fb0", "e18483e185aae186b7"],
- ["eb8fb0", "eb8fa0e186b7"],
- ["eb8fb1", "e18483e185aae186b8"],
- ["eb8fb1", "eb8fa0e186b8"],
- ["eb8fb2", "e18483e185aae186b9"],
- ["eb8fb2", "eb8fa0e186b9"],
- ["eb8fb3", "e18483e185aae186ba"],
- ["eb8fb3", "eb8fa0e186ba"],
- ["eb8fb4", "e18483e185aae186bb"],
- ["eb8fb4", "eb8fa0e186bb"],
- ["eb8fb5", "e18483e185aae186bc"],
- ["eb8fb5", "eb8fa0e186bc"],
- ["eb8fb6", "e18483e185aae186bd"],
- ["eb8fb6", "eb8fa0e186bd"],
- ["eb8fb7", "e18483e185aae186be"],
- ["eb8fb7", "eb8fa0e186be"],
- ["eb8fb8", "e18483e185aae186bf"],
- ["eb8fb8", "eb8fa0e186bf"],
- ["eb8fb9", "e18483e185aae18780"],
- ["eb8fb9", "eb8fa0e18780"],
- ["eb8fba", "e18483e185aae18781"],
- ["eb8fba", "eb8fa0e18781"],
- ["eb8fbb", "e18483e185aae18782"],
- ["eb8fbb", "eb8fa0e18782"],
- ["eb8fbc", "e18483e185ab"],
- ["eb8fbd", "e18483e185abe186a8"],
- ["eb8fbd", "eb8fbce186a8"],
- ["eb8fbe", "e18483e185abe186a9"],
- ["eb8fbe", "eb8fbce186a9"],
- ["eb8fbf", "e18483e185abe186aa"],
- ["eb8fbf", "eb8fbce186aa"],
- ["eb9080", "e18483e185abe186ab"],
- ["eb9080", "eb8fbce186ab"],
- ["eb9081", "e18483e185abe186ac"],
- ["eb9081", "eb8fbce186ac"],
- ["eb9082", "e18483e185abe186ad"],
- ["eb9082", "eb8fbce186ad"],
- ["eb9083", "e18483e185abe186ae"],
- ["eb9083", "eb8fbce186ae"],
- ["eb9084", "e18483e185abe186af"],
- ["eb9084", "eb8fbce186af"],
- ["eb9085", "e18483e185abe186b0"],
- ["eb9085", "eb8fbce186b0"],
- ["eb9086", "e18483e185abe186b1"],
- ["eb9086", "eb8fbce186b1"],
- ["eb9087", "e18483e185abe186b2"],
- ["eb9087", "eb8fbce186b2"],
- ["eb9088", "e18483e185abe186b3"],
- ["eb9088", "eb8fbce186b3"],
- ["eb9089", "e18483e185abe186b4"],
- ["eb9089", "eb8fbce186b4"],
- ["eb908a", "e18483e185abe186b5"],
- ["eb908a", "eb8fbce186b5"],
- ["eb908b", "e18483e185abe186b6"],
- ["eb908b", "eb8fbce186b6"],
- ["eb908c", "e18483e185abe186b7"],
- ["eb908c", "eb8fbce186b7"],
- ["eb908d", "e18483e185abe186b8"],
- ["eb908d", "eb8fbce186b8"],
- ["eb908e", "e18483e185abe186b9"],
- ["eb908e", "eb8fbce186b9"],
- ["eb908f", "e18483e185abe186ba"],
- ["eb908f", "eb8fbce186ba"],
- ["eb9090", "e18483e185abe186bb"],
- ["eb9090", "eb8fbce186bb"],
- ["eb9091", "e18483e185abe186bc"],
- ["eb9091", "eb8fbce186bc"],
- ["eb9092", "e18483e185abe186bd"],
- ["eb9092", "eb8fbce186bd"],
- ["eb9093", "e18483e185abe186be"],
- ["eb9093", "eb8fbce186be"],
- ["eb9094", "e18483e185abe186bf"],
- ["eb9094", "eb8fbce186bf"],
- ["eb9095", "e18483e185abe18780"],
- ["eb9095", "eb8fbce18780"],
- ["eb9096", "e18483e185abe18781"],
- ["eb9096", "eb8fbce18781"],
- ["eb9097", "e18483e185abe18782"],
- ["eb9097", "eb8fbce18782"],
- ["eb9098", "e18483e185ac"],
- ["eb9099", "e18483e185ace186a8"],
- ["eb9099", "eb9098e186a8"],
- ["eb909a", "e18483e185ace186a9"],
- ["eb909a", "eb9098e186a9"],
- ["eb909b", "e18483e185ace186aa"],
- ["eb909b", "eb9098e186aa"],
- ["eb909c", "e18483e185ace186ab"],
- ["eb909c", "eb9098e186ab"],
- ["eb909d", "e18483e185ace186ac"],
- ["eb909d", "eb9098e186ac"],
- ["eb909e", "e18483e185ace186ad"],
- ["eb909e", "eb9098e186ad"],
- ["eb909f", "e18483e185ace186ae"],
- ["eb909f", "eb9098e186ae"],
- ["eb90a0", "e18483e185ace186af"],
- ["eb90a0", "eb9098e186af"],
- ["eb90a1", "e18483e185ace186b0"],
- ["eb90a1", "eb9098e186b0"],
- ["eb90a2", "e18483e185ace186b1"],
- ["eb90a2", "eb9098e186b1"],
- ["eb90a3", "e18483e185ace186b2"],
- ["eb90a3", "eb9098e186b2"],
- ["eb90a4", "e18483e185ace186b3"],
- ["eb90a4", "eb9098e186b3"],
- ["eb90a5", "e18483e185ace186b4"],
- ["eb90a5", "eb9098e186b4"],
- ["eb90a6", "e18483e185ace186b5"],
- ["eb90a6", "eb9098e186b5"],
- ["eb90a7", "e18483e185ace186b6"],
- ["eb90a7", "eb9098e186b6"],
- ["eb90a8", "e18483e185ace186b7"],
- ["eb90a8", "eb9098e186b7"],
- ["eb90a9", "e18483e185ace186b8"],
- ["eb90a9", "eb9098e186b8"],
- ["eb90aa", "e18483e185ace186b9"],
- ["eb90aa", "eb9098e186b9"],
- ["eb90ab", "e18483e185ace186ba"],
- ["eb90ab", "eb9098e186ba"],
- ["eb90ac", "e18483e185ace186bb"],
- ["eb90ac", "eb9098e186bb"],
- ["eb90ad", "e18483e185ace186bc"],
- ["eb90ad", "eb9098e186bc"],
- ["eb90ae", "e18483e185ace186bd"],
- ["eb90ae", "eb9098e186bd"],
- ["eb90af", "e18483e185ace186be"],
- ["eb90af", "eb9098e186be"],
- ["eb90b0", "e18483e185ace186bf"],
- ["eb90b0", "eb9098e186bf"],
- ["eb90b1", "e18483e185ace18780"],
- ["eb90b1", "eb9098e18780"],
- ["eb90b2", "e18483e185ace18781"],
- ["eb90b2", "eb9098e18781"],
- ["eb90b3", "e18483e185ace18782"],
- ["eb90b3", "eb9098e18782"],
- ["eb90b4", "e18483e185ad"],
- ["eb90b5", "e18483e185ade186a8"],
- ["eb90b5", "eb90b4e186a8"],
- ["eb90b6", "e18483e185ade186a9"],
- ["eb90b6", "eb90b4e186a9"],
- ["eb90b7", "e18483e185ade186aa"],
- ["eb90b7", "eb90b4e186aa"],
- ["eb90b8", "e18483e185ade186ab"],
- ["eb90b8", "eb90b4e186ab"],
- ["eb90b9", "e18483e185ade186ac"],
- ["eb90b9", "eb90b4e186ac"],
- ["eb90ba", "e18483e185ade186ad"],
- ["eb90ba", "eb90b4e186ad"],
- ["eb90bb", "e18483e185ade186ae"],
- ["eb90bb", "eb90b4e186ae"],
- ["eb90bc", "e18483e185ade186af"],
- ["eb90bc", "eb90b4e186af"],
- ["eb90bd", "e18483e185ade186b0"],
- ["eb90bd", "eb90b4e186b0"],
- ["eb90be", "e18483e185ade186b1"],
- ["eb90be", "eb90b4e186b1"],
- ["eb90bf", "e18483e185ade186b2"],
- ["eb90bf", "eb90b4e186b2"],
- ["eb9180", "e18483e185ade186b3"],
- ["eb9180", "eb90b4e186b3"],
- ["eb9181", "e18483e185ade186b4"],
- ["eb9181", "eb90b4e186b4"],
- ["eb9182", "e18483e185ade186b5"],
- ["eb9182", "eb90b4e186b5"],
- ["eb9183", "e18483e185ade186b6"],
- ["eb9183", "eb90b4e186b6"],
- ["eb9184", "e18483e185ade186b7"],
- ["eb9184", "eb90b4e186b7"],
- ["eb9185", "e18483e185ade186b8"],
- ["eb9185", "eb90b4e186b8"],
- ["eb9186", "e18483e185ade186b9"],
- ["eb9186", "eb90b4e186b9"],
- ["eb9187", "e18483e185ade186ba"],
- ["eb9187", "eb90b4e186ba"],
- ["eb9188", "e18483e185ade186bb"],
- ["eb9188", "eb90b4e186bb"],
- ["eb9189", "e18483e185ade186bc"],
- ["eb9189", "eb90b4e186bc"],
- ["eb918a", "e18483e185ade186bd"],
- ["eb918a", "eb90b4e186bd"],
- ["eb918b", "e18483e185ade186be"],
- ["eb918b", "eb90b4e186be"],
- ["eb918c", "e18483e185ade186bf"],
- ["eb918c", "eb90b4e186bf"],
- ["eb918d", "e18483e185ade18780"],
- ["eb918d", "eb90b4e18780"],
- ["eb918e", "e18483e185ade18781"],
- ["eb918e", "eb90b4e18781"],
- ["eb918f", "e18483e185ade18782"],
- ["eb918f", "eb90b4e18782"],
- ["eb9190", "e18483e185ae"],
- ["eb9191", "e18483e185aee186a8"],
- ["eb9191", "eb9190e186a8"],
- ["eb9192", "e18483e185aee186a9"],
- ["eb9192", "eb9190e186a9"],
- ["eb9193", "e18483e185aee186aa"],
- ["eb9193", "eb9190e186aa"],
- ["eb9194", "e18483e185aee186ab"],
- ["eb9194", "eb9190e186ab"],
- ["eb9195", "e18483e185aee186ac"],
- ["eb9195", "eb9190e186ac"],
- ["eb9196", "e18483e185aee186ad"],
- ["eb9196", "eb9190e186ad"],
- ["eb9197", "e18483e185aee186ae"],
- ["eb9197", "eb9190e186ae"],
- ["eb9198", "e18483e185aee186af"],
- ["eb9198", "eb9190e186af"],
- ["eb9199", "e18483e185aee186b0"],
- ["eb9199", "eb9190e186b0"],
- ["eb919a", "e18483e185aee186b1"],
- ["eb919a", "eb9190e186b1"],
- ["eb919b", "e18483e185aee186b2"],
- ["eb919b", "eb9190e186b2"],
- ["eb919c", "e18483e185aee186b3"],
- ["eb919c", "eb9190e186b3"],
- ["eb919d", "e18483e185aee186b4"],
- ["eb919d", "eb9190e186b4"],
- ["eb919e", "e18483e185aee186b5"],
- ["eb919e", "eb9190e186b5"],
- ["eb919f", "e18483e185aee186b6"],
- ["eb919f", "eb9190e186b6"],
- ["eb91a0", "e18483e185aee186b7"],
- ["eb91a0", "eb9190e186b7"],
- ["eb91a1", "e18483e185aee186b8"],
- ["eb91a1", "eb9190e186b8"],
- ["eb91a2", "e18483e185aee186b9"],
- ["eb91a2", "eb9190e186b9"],
- ["eb91a3", "e18483e185aee186ba"],
- ["eb91a3", "eb9190e186ba"],
- ["eb91a4", "e18483e185aee186bb"],
- ["eb91a4", "eb9190e186bb"],
- ["eb91a5", "e18483e185aee186bc"],
- ["eb91a5", "eb9190e186bc"],
- ["eb91a6", "e18483e185aee186bd"],
- ["eb91a6", "eb9190e186bd"],
- ["eb91a7", "e18483e185aee186be"],
- ["eb91a7", "eb9190e186be"],
- ["eb91a8", "e18483e185aee186bf"],
- ["eb91a8", "eb9190e186bf"],
- ["eb91a9", "e18483e185aee18780"],
- ["eb91a9", "eb9190e18780"],
- ["eb91aa", "e18483e185aee18781"],
- ["eb91aa", "eb9190e18781"],
- ["eb91ab", "e18483e185aee18782"],
- ["eb91ab", "eb9190e18782"],
- ["eb91ac", "e18483e185af"],
- ["eb91ad", "e18483e185afe186a8"],
- ["eb91ad", "eb91ace186a8"],
- ["eb91ae", "e18483e185afe186a9"],
- ["eb91ae", "eb91ace186a9"],
- ["eb91af", "e18483e185afe186aa"],
- ["eb91af", "eb91ace186aa"],
- ["eb91b0", "e18483e185afe186ab"],
- ["eb91b0", "eb91ace186ab"],
- ["eb91b1", "e18483e185afe186ac"],
- ["eb91b1", "eb91ace186ac"],
- ["eb91b2", "e18483e185afe186ad"],
- ["eb91b2", "eb91ace186ad"],
- ["eb91b3", "e18483e185afe186ae"],
- ["eb91b3", "eb91ace186ae"],
- ["eb91b4", "e18483e185afe186af"],
- ["eb91b4", "eb91ace186af"],
- ["eb91b5", "e18483e185afe186b0"],
- ["eb91b5", "eb91ace186b0"],
- ["eb91b6", "e18483e185afe186b1"],
- ["eb91b6", "eb91ace186b1"],
- ["eb91b7", "e18483e185afe186b2"],
- ["eb91b7", "eb91ace186b2"],
- ["eb91b8", "e18483e185afe186b3"],
- ["eb91b8", "eb91ace186b3"],
- ["eb91b9", "e18483e185afe186b4"],
- ["eb91b9", "eb91ace186b4"],
- ["eb91ba", "e18483e185afe186b5"],
- ["eb91ba", "eb91ace186b5"],
- ["eb91bb", "e18483e185afe186b6"],
- ["eb91bb", "eb91ace186b6"],
- ["eb91bc", "e18483e185afe186b7"],
- ["eb91bc", "eb91ace186b7"],
- ["eb91bd", "e18483e185afe186b8"],
- ["eb91bd", "eb91ace186b8"],
- ["eb91be", "e18483e185afe186b9"],
- ["eb91be", "eb91ace186b9"],
- ["eb91bf", "e18483e185afe186ba"],
- ["eb91bf", "eb91ace186ba"],
- ["eb9280", "e18483e185afe186bb"],
- ["eb9280", "eb91ace186bb"],
- ["eb9281", "e18483e185afe186bc"],
- ["eb9281", "eb91ace186bc"],
- ["eb9282", "e18483e185afe186bd"],
- ["eb9282", "eb91ace186bd"],
- ["eb9283", "e18483e185afe186be"],
- ["eb9283", "eb91ace186be"],
- ["eb9284", "e18483e185afe186bf"],
- ["eb9284", "eb91ace186bf"],
- ["eb9285", "e18483e185afe18780"],
- ["eb9285", "eb91ace18780"],
- ["eb9286", "e18483e185afe18781"],
- ["eb9286", "eb91ace18781"],
- ["eb9287", "e18483e185afe18782"],
- ["eb9287", "eb91ace18782"],
- ["eb9288", "e18483e185b0"],
- ["eb9289", "e18483e185b0e186a8"],
- ["eb9289", "eb9288e186a8"],
- ["eb928a", "e18483e185b0e186a9"],
- ["eb928a", "eb9288e186a9"],
- ["eb928b", "e18483e185b0e186aa"],
- ["eb928b", "eb9288e186aa"],
- ["eb928c", "e18483e185b0e186ab"],
- ["eb928c", "eb9288e186ab"],
- ["eb928d", "e18483e185b0e186ac"],
- ["eb928d", "eb9288e186ac"],
- ["eb928e", "e18483e185b0e186ad"],
- ["eb928e", "eb9288e186ad"],
- ["eb928f", "e18483e185b0e186ae"],
- ["eb928f", "eb9288e186ae"],
- ["eb9290", "e18483e185b0e186af"],
- ["eb9290", "eb9288e186af"],
- ["eb9291", "e18483e185b0e186b0"],
- ["eb9291", "eb9288e186b0"],
- ["eb9292", "e18483e185b0e186b1"],
- ["eb9292", "eb9288e186b1"],
- ["eb9293", "e18483e185b0e186b2"],
- ["eb9293", "eb9288e186b2"],
- ["eb9294", "e18483e185b0e186b3"],
- ["eb9294", "eb9288e186b3"],
- ["eb9295", "e18483e185b0e186b4"],
- ["eb9295", "eb9288e186b4"],
- ["eb9296", "e18483e185b0e186b5"],
- ["eb9296", "eb9288e186b5"],
- ["eb9297", "e18483e185b0e186b6"],
- ["eb9297", "eb9288e186b6"],
- ["eb9298", "e18483e185b0e186b7"],
- ["eb9298", "eb9288e186b7"],
- ["eb9299", "e18483e185b0e186b8"],
- ["eb9299", "eb9288e186b8"],
- ["eb929a", "e18483e185b0e186b9"],
- ["eb929a", "eb9288e186b9"],
- ["eb929b", "e18483e185b0e186ba"],
- ["eb929b", "eb9288e186ba"],
- ["eb929c", "e18483e185b0e186bb"],
- ["eb929c", "eb9288e186bb"],
- ["eb929d", "e18483e185b0e186bc"],
- ["eb929d", "eb9288e186bc"],
- ["eb929e", "e18483e185b0e186bd"],
- ["eb929e", "eb9288e186bd"],
- ["eb929f", "e18483e185b0e186be"],
- ["eb929f", "eb9288e186be"],
- ["eb92a0", "e18483e185b0e186bf"],
- ["eb92a0", "eb9288e186bf"],
- ["eb92a1", "e18483e185b0e18780"],
- ["eb92a1", "eb9288e18780"],
- ["eb92a2", "e18483e185b0e18781"],
- ["eb92a2", "eb9288e18781"],
- ["eb92a3", "e18483e185b0e18782"],
- ["eb92a3", "eb9288e18782"],
- ["eb92a4", "e18483e185b1"],
- ["eb92a5", "e18483e185b1e186a8"],
- ["eb92a5", "eb92a4e186a8"],
- ["eb92a6", "e18483e185b1e186a9"],
- ["eb92a6", "eb92a4e186a9"],
- ["eb92a7", "e18483e185b1e186aa"],
- ["eb92a7", "eb92a4e186aa"],
- ["eb92a8", "e18483e185b1e186ab"],
- ["eb92a8", "eb92a4e186ab"],
- ["eb92a9", "e18483e185b1e186ac"],
- ["eb92a9", "eb92a4e186ac"],
- ["eb92aa", "e18483e185b1e186ad"],
- ["eb92aa", "eb92a4e186ad"],
- ["eb92ab", "e18483e185b1e186ae"],
- ["eb92ab", "eb92a4e186ae"],
- ["eb92ac", "e18483e185b1e186af"],
- ["eb92ac", "eb92a4e186af"],
- ["eb92ad", "e18483e185b1e186b0"],
- ["eb92ad", "eb92a4e186b0"],
- ["eb92ae", "e18483e185b1e186b1"],
- ["eb92ae", "eb92a4e186b1"],
- ["eb92af", "e18483e185b1e186b2"],
- ["eb92af", "eb92a4e186b2"],
- ["eb92b0", "e18483e185b1e186b3"],
- ["eb92b0", "eb92a4e186b3"],
- ["eb92b1", "e18483e185b1e186b4"],
- ["eb92b1", "eb92a4e186b4"],
- ["eb92b2", "e18483e185b1e186b5"],
- ["eb92b2", "eb92a4e186b5"],
- ["eb92b3", "e18483e185b1e186b6"],
- ["eb92b3", "eb92a4e186b6"],
- ["eb92b4", "e18483e185b1e186b7"],
- ["eb92b4", "eb92a4e186b7"],
- ["eb92b5", "e18483e185b1e186b8"],
- ["eb92b5", "eb92a4e186b8"],
- ["eb92b6", "e18483e185b1e186b9"],
- ["eb92b6", "eb92a4e186b9"],
- ["eb92b7", "e18483e185b1e186ba"],
- ["eb92b7", "eb92a4e186ba"],
- ["eb92b8", "e18483e185b1e186bb"],
- ["eb92b8", "eb92a4e186bb"],
- ["eb92b9", "e18483e185b1e186bc"],
- ["eb92b9", "eb92a4e186bc"],
- ["eb92ba", "e18483e185b1e186bd"],
- ["eb92ba", "eb92a4e186bd"],
- ["eb92bb", "e18483e185b1e186be"],
- ["eb92bb", "eb92a4e186be"],
- ["eb92bc", "e18483e185b1e186bf"],
- ["eb92bc", "eb92a4e186bf"],
- ["eb92bd", "e18483e185b1e18780"],
- ["eb92bd", "eb92a4e18780"],
- ["eb92be", "e18483e185b1e18781"],
- ["eb92be", "eb92a4e18781"],
- ["eb92bf", "e18483e185b1e18782"],
- ["eb92bf", "eb92a4e18782"],
- ["eb9380", "e18483e185b2"],
- ["eb9381", "e18483e185b2e186a8"],
- ["eb9381", "eb9380e186a8"],
- ["eb9382", "e18483e185b2e186a9"],
- ["eb9382", "eb9380e186a9"],
- ["eb9383", "e18483e185b2e186aa"],
- ["eb9383", "eb9380e186aa"],
- ["eb9384", "e18483e185b2e186ab"],
- ["eb9384", "eb9380e186ab"],
- ["eb9385", "e18483e185b2e186ac"],
- ["eb9385", "eb9380e186ac"],
- ["eb9386", "e18483e185b2e186ad"],
- ["eb9386", "eb9380e186ad"],
- ["eb9387", "e18483e185b2e186ae"],
- ["eb9387", "eb9380e186ae"],
- ["eb9388", "e18483e185b2e186af"],
- ["eb9388", "eb9380e186af"],
- ["eb9389", "e18483e185b2e186b0"],
- ["eb9389", "eb9380e186b0"],
- ["eb938a", "e18483e185b2e186b1"],
- ["eb938a", "eb9380e186b1"],
- ["eb938b", "e18483e185b2e186b2"],
- ["eb938b", "eb9380e186b2"],
- ["eb938c", "e18483e185b2e186b3"],
- ["eb938c", "eb9380e186b3"],
- ["eb938d", "e18483e185b2e186b4"],
- ["eb938d", "eb9380e186b4"],
- ["eb938e", "e18483e185b2e186b5"],
- ["eb938e", "eb9380e186b5"],
- ["eb938f", "e18483e185b2e186b6"],
- ["eb938f", "eb9380e186b6"],
- ["eb9390", "e18483e185b2e186b7"],
- ["eb9390", "eb9380e186b7"],
- ["eb9391", "e18483e185b2e186b8"],
- ["eb9391", "eb9380e186b8"],
- ["eb9392", "e18483e185b2e186b9"],
- ["eb9392", "eb9380e186b9"],
- ["eb9393", "e18483e185b2e186ba"],
- ["eb9393", "eb9380e186ba"],
- ["eb9394", "e18483e185b2e186bb"],
- ["eb9394", "eb9380e186bb"],
- ["eb9395", "e18483e185b2e186bc"],
- ["eb9395", "eb9380e186bc"],
- ["eb9396", "e18483e185b2e186bd"],
- ["eb9396", "eb9380e186bd"],
- ["eb9397", "e18483e185b2e186be"],
- ["eb9397", "eb9380e186be"],
- ["eb9398", "e18483e185b2e186bf"],
- ["eb9398", "eb9380e186bf"],
- ["eb9399", "e18483e185b2e18780"],
- ["eb9399", "eb9380e18780"],
- ["eb939a", "e18483e185b2e18781"],
- ["eb939a", "eb9380e18781"],
- ["eb939b", "e18483e185b2e18782"],
- ["eb939b", "eb9380e18782"],
- ["eb939c", "e18483e185b3"],
- ["eb939d", "e18483e185b3e186a8"],
- ["eb939d", "eb939ce186a8"],
- ["eb939e", "e18483e185b3e186a9"],
- ["eb939e", "eb939ce186a9"],
- ["eb939f", "e18483e185b3e186aa"],
- ["eb939f", "eb939ce186aa"],
- ["eb93a0", "e18483e185b3e186ab"],
- ["eb93a0", "eb939ce186ab"],
- ["eb93a1", "e18483e185b3e186ac"],
- ["eb93a1", "eb939ce186ac"],
- ["eb93a2", "e18483e185b3e186ad"],
- ["eb93a2", "eb939ce186ad"],
- ["eb93a3", "e18483e185b3e186ae"],
- ["eb93a3", "eb939ce186ae"],
- ["eb93a4", "e18483e185b3e186af"],
- ["eb93a4", "eb939ce186af"],
- ["eb93a5", "e18483e185b3e186b0"],
- ["eb93a5", "eb939ce186b0"],
- ["eb93a6", "e18483e185b3e186b1"],
- ["eb93a6", "eb939ce186b1"],
- ["eb93a7", "e18483e185b3e186b2"],
- ["eb93a7", "eb939ce186b2"],
- ["eb93a8", "e18483e185b3e186b3"],
- ["eb93a8", "eb939ce186b3"],
- ["eb93a9", "e18483e185b3e186b4"],
- ["eb93a9", "eb939ce186b4"],
- ["eb93aa", "e18483e185b3e186b5"],
- ["eb93aa", "eb939ce186b5"],
- ["eb93ab", "e18483e185b3e186b6"],
- ["eb93ab", "eb939ce186b6"],
- ["eb93ac", "e18483e185b3e186b7"],
- ["eb93ac", "eb939ce186b7"],
- ["eb93ad", "e18483e185b3e186b8"],
- ["eb93ad", "eb939ce186b8"],
- ["eb93ae", "e18483e185b3e186b9"],
- ["eb93ae", "eb939ce186b9"],
- ["eb93af", "e18483e185b3e186ba"],
- ["eb93af", "eb939ce186ba"],
- ["eb93b0", "e18483e185b3e186bb"],
- ["eb93b0", "eb939ce186bb"],
- ["eb93b1", "e18483e185b3e186bc"],
- ["eb93b1", "eb939ce186bc"],
- ["eb93b2", "e18483e185b3e186bd"],
- ["eb93b2", "eb939ce186bd"],
- ["eb93b3", "e18483e185b3e186be"],
- ["eb93b3", "eb939ce186be"],
- ["eb93b4", "e18483e185b3e186bf"],
- ["eb93b4", "eb939ce186bf"],
- ["eb93b5", "e18483e185b3e18780"],
- ["eb93b5", "eb939ce18780"],
- ["eb93b6", "e18483e185b3e18781"],
- ["eb93b6", "eb939ce18781"],
- ["eb93b7", "e18483e185b3e18782"],
- ["eb93b7", "eb939ce18782"],
- ["eb93b8", "e18483e185b4"],
- ["eb93b9", "e18483e185b4e186a8"],
- ["eb93b9", "eb93b8e186a8"],
- ["eb93ba", "e18483e185b4e186a9"],
- ["eb93ba", "eb93b8e186a9"],
- ["eb93bb", "e18483e185b4e186aa"],
- ["eb93bb", "eb93b8e186aa"],
- ["eb93bc", "e18483e185b4e186ab"],
- ["eb93bc", "eb93b8e186ab"],
- ["eb93bd", "e18483e185b4e186ac"],
- ["eb93bd", "eb93b8e186ac"],
- ["eb93be", "e18483e185b4e186ad"],
- ["eb93be", "eb93b8e186ad"],
- ["eb93bf", "e18483e185b4e186ae"],
- ["eb93bf", "eb93b8e186ae"],
- ["eb9480", "e18483e185b4e186af"],
- ["eb9480", "eb93b8e186af"],
- ["eb9481", "e18483e185b4e186b0"],
- ["eb9481", "eb93b8e186b0"],
- ["eb9482", "e18483e185b4e186b1"],
- ["eb9482", "eb93b8e186b1"],
- ["eb9483", "e18483e185b4e186b2"],
- ["eb9483", "eb93b8e186b2"],
- ["eb9484", "e18483e185b4e186b3"],
- ["eb9484", "eb93b8e186b3"],
- ["eb9485", "e18483e185b4e186b4"],
- ["eb9485", "eb93b8e186b4"],
- ["eb9486", "e18483e185b4e186b5"],
- ["eb9486", "eb93b8e186b5"],
- ["eb9487", "e18483e185b4e186b6"],
- ["eb9487", "eb93b8e186b6"],
- ["eb9488", "e18483e185b4e186b7"],
- ["eb9488", "eb93b8e186b7"],
- ["eb9489", "e18483e185b4e186b8"],
- ["eb9489", "eb93b8e186b8"],
- ["eb948a", "e18483e185b4e186b9"],
- ["eb948a", "eb93b8e186b9"],
- ["eb948b", "e18483e185b4e186ba"],
- ["eb948b", "eb93b8e186ba"],
- ["eb948c", "e18483e185b4e186bb"],
- ["eb948c", "eb93b8e186bb"],
- ["eb948d", "e18483e185b4e186bc"],
- ["eb948d", "eb93b8e186bc"],
- ["eb948e", "e18483e185b4e186bd"],
- ["eb948e", "eb93b8e186bd"],
- ["eb948f", "e18483e185b4e186be"],
- ["eb948f", "eb93b8e186be"],
- ["eb9490", "e18483e185b4e186bf"],
- ["eb9490", "eb93b8e186bf"],
- ["eb9491", "e18483e185b4e18780"],
- ["eb9491", "eb93b8e18780"],
- ["eb9492", "e18483e185b4e18781"],
- ["eb9492", "eb93b8e18781"],
- ["eb9493", "e18483e185b4e18782"],
- ["eb9493", "eb93b8e18782"],
- ["eb9494", "e18483e185b5"],
- ["eb9495", "e18483e185b5e186a8"],
- ["eb9495", "eb9494e186a8"],
- ["eb9496", "e18483e185b5e186a9"],
- ["eb9496", "eb9494e186a9"],
- ["eb9497", "e18483e185b5e186aa"],
- ["eb9497", "eb9494e186aa"],
- ["eb9498", "e18483e185b5e186ab"],
- ["eb9498", "eb9494e186ab"],
- ["eb9499", "e18483e185b5e186ac"],
- ["eb9499", "eb9494e186ac"],
- ["eb949a", "e18483e185b5e186ad"],
- ["eb949a", "eb9494e186ad"],
- ["eb949b", "e18483e185b5e186ae"],
- ["eb949b", "eb9494e186ae"],
- ["eb949c", "e18483e185b5e186af"],
- ["eb949c", "eb9494e186af"],
- ["eb949d", "e18483e185b5e186b0"],
- ["eb949d", "eb9494e186b0"],
- ["eb949e", "e18483e185b5e186b1"],
- ["eb949e", "eb9494e186b1"],
- ["eb949f", "e18483e185b5e186b2"],
- ["eb949f", "eb9494e186b2"],
- ["eb94a0", "e18483e185b5e186b3"],
- ["eb94a0", "eb9494e186b3"],
- ["eb94a1", "e18483e185b5e186b4"],
- ["eb94a1", "eb9494e186b4"],
- ["eb94a2", "e18483e185b5e186b5"],
- ["eb94a2", "eb9494e186b5"],
- ["eb94a3", "e18483e185b5e186b6"],
- ["eb94a3", "eb9494e186b6"],
- ["eb94a4", "e18483e185b5e186b7"],
- ["eb94a4", "eb9494e186b7"],
- ["eb94a5", "e18483e185b5e186b8"],
- ["eb94a5", "eb9494e186b8"],
- ["eb94a6", "e18483e185b5e186b9"],
- ["eb94a6", "eb9494e186b9"],
- ["eb94a7", "e18483e185b5e186ba"],
- ["eb94a7", "eb9494e186ba"],
- ["eb94a8", "e18483e185b5e186bb"],
- ["eb94a8", "eb9494e186bb"],
- ["eb94a9", "e18483e185b5e186bc"],
- ["eb94a9", "eb9494e186bc"],
- ["eb94aa", "e18483e185b5e186bd"],
- ["eb94aa", "eb9494e186bd"],
- ["eb94ab", "e18483e185b5e186be"],
- ["eb94ab", "eb9494e186be"],
- ["eb94ac", "e18483e185b5e186bf"],
- ["eb94ac", "eb9494e186bf"],
- ["eb94ad", "e18483e185b5e18780"],
- ["eb94ad", "eb9494e18780"],
- ["eb94ae", "e18483e185b5e18781"],
- ["eb94ae", "eb9494e18781"],
- ["eb94af", "e18483e185b5e18782"],
- ["eb94af", "eb9494e18782"],
- ["eb94b0", "e18484e185a1"],
- ["eb94b1", "e18484e185a1e186a8"],
- ["eb94b1", "eb94b0e186a8"],
- ["eb94b2", "e18484e185a1e186a9"],
- ["eb94b2", "eb94b0e186a9"],
- ["eb94b3", "e18484e185a1e186aa"],
- ["eb94b3", "eb94b0e186aa"],
- ["eb94b4", "e18484e185a1e186ab"],
- ["eb94b4", "eb94b0e186ab"],
- ["eb94b5", "e18484e185a1e186ac"],
- ["eb94b5", "eb94b0e186ac"],
- ["eb94b6", "e18484e185a1e186ad"],
- ["eb94b6", "eb94b0e186ad"],
- ["eb94b7", "e18484e185a1e186ae"],
- ["eb94b7", "eb94b0e186ae"],
- ["eb94b8", "e18484e185a1e186af"],
- ["eb94b8", "eb94b0e186af"],
- ["eb94b9", "e18484e185a1e186b0"],
- ["eb94b9", "eb94b0e186b0"],
- ["eb94ba", "e18484e185a1e186b1"],
- ["eb94ba", "eb94b0e186b1"],
- ["eb94bb", "e18484e185a1e186b2"],
- ["eb94bb", "eb94b0e186b2"],
- ["eb94bc", "e18484e185a1e186b3"],
- ["eb94bc", "eb94b0e186b3"],
- ["eb94bd", "e18484e185a1e186b4"],
- ["eb94bd", "eb94b0e186b4"],
- ["eb94be", "e18484e185a1e186b5"],
- ["eb94be", "eb94b0e186b5"],
- ["eb94bf", "e18484e185a1e186b6"],
- ["eb94bf", "eb94b0e186b6"],
- ["eb9580", "e18484e185a1e186b7"],
- ["eb9580", "eb94b0e186b7"],
- ["eb9581", "e18484e185a1e186b8"],
- ["eb9581", "eb94b0e186b8"],
- ["eb9582", "e18484e185a1e186b9"],
- ["eb9582", "eb94b0e186b9"],
- ["eb9583", "e18484e185a1e186ba"],
- ["eb9583", "eb94b0e186ba"],
- ["eb9584", "e18484e185a1e186bb"],
- ["eb9584", "eb94b0e186bb"],
- ["eb9585", "e18484e185a1e186bc"],
- ["eb9585", "eb94b0e186bc"],
- ["eb9586", "e18484e185a1e186bd"],
- ["eb9586", "eb94b0e186bd"],
- ["eb9587", "e18484e185a1e186be"],
- ["eb9587", "eb94b0e186be"],
- ["eb9588", "e18484e185a1e186bf"],
- ["eb9588", "eb94b0e186bf"],
- ["eb9589", "e18484e185a1e18780"],
- ["eb9589", "eb94b0e18780"],
- ["eb958a", "e18484e185a1e18781"],
- ["eb958a", "eb94b0e18781"],
- ["eb958b", "e18484e185a1e18782"],
- ["eb958b", "eb94b0e18782"],
- ["eb958c", "e18484e185a2"],
- ["eb958d", "e18484e185a2e186a8"],
- ["eb958d", "eb958ce186a8"],
- ["eb958e", "e18484e185a2e186a9"],
- ["eb958e", "eb958ce186a9"],
- ["eb958f", "e18484e185a2e186aa"],
- ["eb958f", "eb958ce186aa"],
- ["eb9590", "e18484e185a2e186ab"],
- ["eb9590", "eb958ce186ab"],
- ["eb9591", "e18484e185a2e186ac"],
- ["eb9591", "eb958ce186ac"],
- ["eb9592", "e18484e185a2e186ad"],
- ["eb9592", "eb958ce186ad"],
- ["eb9593", "e18484e185a2e186ae"],
- ["eb9593", "eb958ce186ae"],
- ["eb9594", "e18484e185a2e186af"],
- ["eb9594", "eb958ce186af"],
- ["eb9595", "e18484e185a2e186b0"],
- ["eb9595", "eb958ce186b0"],
- ["eb9596", "e18484e185a2e186b1"],
- ["eb9596", "eb958ce186b1"],
- ["eb9597", "e18484e185a2e186b2"],
- ["eb9597", "eb958ce186b2"],
- ["eb9598", "e18484e185a2e186b3"],
- ["eb9598", "eb958ce186b3"],
- ["eb9599", "e18484e185a2e186b4"],
- ["eb9599", "eb958ce186b4"],
- ["eb959a", "e18484e185a2e186b5"],
- ["eb959a", "eb958ce186b5"],
- ["eb959b", "e18484e185a2e186b6"],
- ["eb959b", "eb958ce186b6"],
- ["eb959c", "e18484e185a2e186b7"],
- ["eb959c", "eb958ce186b7"],
- ["eb959d", "e18484e185a2e186b8"],
- ["eb959d", "eb958ce186b8"],
- ["eb959e", "e18484e185a2e186b9"],
- ["eb959e", "eb958ce186b9"],
- ["eb959f", "e18484e185a2e186ba"],
- ["eb959f", "eb958ce186ba"],
- ["eb95a0", "e18484e185a2e186bb"],
- ["eb95a0", "eb958ce186bb"],
- ["eb95a1", "e18484e185a2e186bc"],
- ["eb95a1", "eb958ce186bc"],
- ["eb95a2", "e18484e185a2e186bd"],
- ["eb95a2", "eb958ce186bd"],
- ["eb95a3", "e18484e185a2e186be"],
- ["eb95a3", "eb958ce186be"],
- ["eb95a4", "e18484e185a2e186bf"],
- ["eb95a4", "eb958ce186bf"],
- ["eb95a5", "e18484e185a2e18780"],
- ["eb95a5", "eb958ce18780"],
- ["eb95a6", "e18484e185a2e18781"],
- ["eb95a6", "eb958ce18781"],
- ["eb95a7", "e18484e185a2e18782"],
- ["eb95a7", "eb958ce18782"],
- ["eb95a8", "e18484e185a3"],
- ["eb95a9", "e18484e185a3e186a8"],
- ["eb95a9", "eb95a8e186a8"],
- ["eb95aa", "e18484e185a3e186a9"],
- ["eb95aa", "eb95a8e186a9"],
- ["eb95ab", "e18484e185a3e186aa"],
- ["eb95ab", "eb95a8e186aa"],
- ["eb95ac", "e18484e185a3e186ab"],
- ["eb95ac", "eb95a8e186ab"],
- ["eb95ad", "e18484e185a3e186ac"],
- ["eb95ad", "eb95a8e186ac"],
- ["eb95ae", "e18484e185a3e186ad"],
- ["eb95ae", "eb95a8e186ad"],
- ["eb95af", "e18484e185a3e186ae"],
- ["eb95af", "eb95a8e186ae"],
- ["eb95b0", "e18484e185a3e186af"],
- ["eb95b0", "eb95a8e186af"],
- ["eb95b1", "e18484e185a3e186b0"],
- ["eb95b1", "eb95a8e186b0"],
- ["eb95b2", "e18484e185a3e186b1"],
- ["eb95b2", "eb95a8e186b1"],
- ["eb95b3", "e18484e185a3e186b2"],
- ["eb95b3", "eb95a8e186b2"],
- ["eb95b4", "e18484e185a3e186b3"],
- ["eb95b4", "eb95a8e186b3"],
- ["eb95b5", "e18484e185a3e186b4"],
- ["eb95b5", "eb95a8e186b4"],
- ["eb95b6", "e18484e185a3e186b5"],
- ["eb95b6", "eb95a8e186b5"],
- ["eb95b7", "e18484e185a3e186b6"],
- ["eb95b7", "eb95a8e186b6"],
- ["eb95b8", "e18484e185a3e186b7"],
- ["eb95b8", "eb95a8e186b7"],
- ["eb95b9", "e18484e185a3e186b8"],
- ["eb95b9", "eb95a8e186b8"],
- ["eb95ba", "e18484e185a3e186b9"],
- ["eb95ba", "eb95a8e186b9"],
- ["eb95bb", "e18484e185a3e186ba"],
- ["eb95bb", "eb95a8e186ba"],
- ["eb95bc", "e18484e185a3e186bb"],
- ["eb95bc", "eb95a8e186bb"],
- ["eb95bd", "e18484e185a3e186bc"],
- ["eb95bd", "eb95a8e186bc"],
- ["eb95be", "e18484e185a3e186bd"],
- ["eb95be", "eb95a8e186bd"],
- ["eb95bf", "e18484e185a3e186be"],
- ["eb95bf", "eb95a8e186be"],
- ["eb9680", "e18484e185a3e186bf"],
- ["eb9680", "eb95a8e186bf"],
- ["eb9681", "e18484e185a3e18780"],
- ["eb9681", "eb95a8e18780"],
- ["eb9682", "e18484e185a3e18781"],
- ["eb9682", "eb95a8e18781"],
- ["eb9683", "e18484e185a3e18782"],
- ["eb9683", "eb95a8e18782"],
- ["eb9684", "e18484e185a4"],
- ["eb9685", "e18484e185a4e186a8"],
- ["eb9685", "eb9684e186a8"],
- ["eb9686", "e18484e185a4e186a9"],
- ["eb9686", "eb9684e186a9"],
- ["eb9687", "e18484e185a4e186aa"],
- ["eb9687", "eb9684e186aa"],
- ["eb9688", "e18484e185a4e186ab"],
- ["eb9688", "eb9684e186ab"],
- ["eb9689", "e18484e185a4e186ac"],
- ["eb9689", "eb9684e186ac"],
- ["eb968a", "e18484e185a4e186ad"],
- ["eb968a", "eb9684e186ad"],
- ["eb968b", "e18484e185a4e186ae"],
- ["eb968b", "eb9684e186ae"],
- ["eb968c", "e18484e185a4e186af"],
- ["eb968c", "eb9684e186af"],
- ["eb968d", "e18484e185a4e186b0"],
- ["eb968d", "eb9684e186b0"],
- ["eb968e", "e18484e185a4e186b1"],
- ["eb968e", "eb9684e186b1"],
- ["eb968f", "e18484e185a4e186b2"],
- ["eb968f", "eb9684e186b2"],
- ["eb9690", "e18484e185a4e186b3"],
- ["eb9690", "eb9684e186b3"],
- ["eb9691", "e18484e185a4e186b4"],
- ["eb9691", "eb9684e186b4"],
- ["eb9692", "e18484e185a4e186b5"],
- ["eb9692", "eb9684e186b5"],
- ["eb9693", "e18484e185a4e186b6"],
- ["eb9693", "eb9684e186b6"],
- ["eb9694", "e18484e185a4e186b7"],
- ["eb9694", "eb9684e186b7"],
- ["eb9695", "e18484e185a4e186b8"],
- ["eb9695", "eb9684e186b8"],
- ["eb9696", "e18484e185a4e186b9"],
- ["eb9696", "eb9684e186b9"],
- ["eb9697", "e18484e185a4e186ba"],
- ["eb9697", "eb9684e186ba"],
- ["eb9698", "e18484e185a4e186bb"],
- ["eb9698", "eb9684e186bb"],
- ["eb9699", "e18484e185a4e186bc"],
- ["eb9699", "eb9684e186bc"],
- ["eb969a", "e18484e185a4e186bd"],
- ["eb969a", "eb9684e186bd"],
- ["eb969b", "e18484e185a4e186be"],
- ["eb969b", "eb9684e186be"],
- ["eb969c", "e18484e185a4e186bf"],
- ["eb969c", "eb9684e186bf"],
- ["eb969d", "e18484e185a4e18780"],
- ["eb969d", "eb9684e18780"],
- ["eb969e", "e18484e185a4e18781"],
- ["eb969e", "eb9684e18781"],
- ["eb969f", "e18484e185a4e18782"],
- ["eb969f", "eb9684e18782"],
- ["eb96a0", "e18484e185a5"],
- ["eb96a1", "e18484e185a5e186a8"],
- ["eb96a1", "eb96a0e186a8"],
- ["eb96a2", "e18484e185a5e186a9"],
- ["eb96a2", "eb96a0e186a9"],
- ["eb96a3", "e18484e185a5e186aa"],
- ["eb96a3", "eb96a0e186aa"],
- ["eb96a4", "e18484e185a5e186ab"],
- ["eb96a4", "eb96a0e186ab"],
- ["eb96a5", "e18484e185a5e186ac"],
- ["eb96a5", "eb96a0e186ac"],
- ["eb96a6", "e18484e185a5e186ad"],
- ["eb96a6", "eb96a0e186ad"],
- ["eb96a7", "e18484e185a5e186ae"],
- ["eb96a7", "eb96a0e186ae"],
- ["eb96a8", "e18484e185a5e186af"],
- ["eb96a8", "eb96a0e186af"],
- ["eb96a9", "e18484e185a5e186b0"],
- ["eb96a9", "eb96a0e186b0"],
- ["eb96aa", "e18484e185a5e186b1"],
- ["eb96aa", "eb96a0e186b1"],
- ["eb96ab", "e18484e185a5e186b2"],
- ["eb96ab", "eb96a0e186b2"],
- ["eb96ac", "e18484e185a5e186b3"],
- ["eb96ac", "eb96a0e186b3"],
- ["eb96ad", "e18484e185a5e186b4"],
- ["eb96ad", "eb96a0e186b4"],
- ["eb96ae", "e18484e185a5e186b5"],
- ["eb96ae", "eb96a0e186b5"],
- ["eb96af", "e18484e185a5e186b6"],
- ["eb96af", "eb96a0e186b6"],
- ["eb96b0", "e18484e185a5e186b7"],
- ["eb96b0", "eb96a0e186b7"],
- ["eb96b1", "e18484e185a5e186b8"],
- ["eb96b1", "eb96a0e186b8"],
- ["eb96b2", "e18484e185a5e186b9"],
- ["eb96b2", "eb96a0e186b9"],
- ["eb96b3", "e18484e185a5e186ba"],
- ["eb96b3", "eb96a0e186ba"],
- ["eb96b4", "e18484e185a5e186bb"],
- ["eb96b4", "eb96a0e186bb"],
- ["eb96b5", "e18484e185a5e186bc"],
- ["eb96b5", "eb96a0e186bc"],
- ["eb96b6", "e18484e185a5e186bd"],
- ["eb96b6", "eb96a0e186bd"],
- ["eb96b7", "e18484e185a5e186be"],
- ["eb96b7", "eb96a0e186be"],
- ["eb96b8", "e18484e185a5e186bf"],
- ["eb96b8", "eb96a0e186bf"],
- ["eb96b9", "e18484e185a5e18780"],
- ["eb96b9", "eb96a0e18780"],
- ["eb96ba", "e18484e185a5e18781"],
- ["eb96ba", "eb96a0e18781"],
- ["eb96bb", "e18484e185a5e18782"],
- ["eb96bb", "eb96a0e18782"],
- ["eb96bc", "e18484e185a6"],
- ["eb96bd", "e18484e185a6e186a8"],
- ["eb96bd", "eb96bce186a8"],
- ["eb96be", "e18484e185a6e186a9"],
- ["eb96be", "eb96bce186a9"],
- ["eb96bf", "e18484e185a6e186aa"],
- ["eb96bf", "eb96bce186aa"],
- ["eb9780", "e18484e185a6e186ab"],
- ["eb9780", "eb96bce186ab"],
- ["eb9781", "e18484e185a6e186ac"],
- ["eb9781", "eb96bce186ac"],
- ["eb9782", "e18484e185a6e186ad"],
- ["eb9782", "eb96bce186ad"],
- ["eb9783", "e18484e185a6e186ae"],
- ["eb9783", "eb96bce186ae"],
- ["eb9784", "e18484e185a6e186af"],
- ["eb9784", "eb96bce186af"],
- ["eb9785", "e18484e185a6e186b0"],
- ["eb9785", "eb96bce186b0"],
- ["eb9786", "e18484e185a6e186b1"],
- ["eb9786", "eb96bce186b1"],
- ["eb9787", "e18484e185a6e186b2"],
- ["eb9787", "eb96bce186b2"],
- ["eb9788", "e18484e185a6e186b3"],
- ["eb9788", "eb96bce186b3"],
- ["eb9789", "e18484e185a6e186b4"],
- ["eb9789", "eb96bce186b4"],
- ["eb978a", "e18484e185a6e186b5"],
- ["eb978a", "eb96bce186b5"],
- ["eb978b", "e18484e185a6e186b6"],
- ["eb978b", "eb96bce186b6"],
- ["eb978c", "e18484e185a6e186b7"],
- ["eb978c", "eb96bce186b7"],
- ["eb978d", "e18484e185a6e186b8"],
- ["eb978d", "eb96bce186b8"],
- ["eb978e", "e18484e185a6e186b9"],
- ["eb978e", "eb96bce186b9"],
- ["eb978f", "e18484e185a6e186ba"],
- ["eb978f", "eb96bce186ba"],
- ["eb9790", "e18484e185a6e186bb"],
- ["eb9790", "eb96bce186bb"],
- ["eb9791", "e18484e185a6e186bc"],
- ["eb9791", "eb96bce186bc"],
- ["eb9792", "e18484e185a6e186bd"],
- ["eb9792", "eb96bce186bd"],
- ["eb9793", "e18484e185a6e186be"],
- ["eb9793", "eb96bce186be"],
- ["eb9794", "e18484e185a6e186bf"],
- ["eb9794", "eb96bce186bf"],
- ["eb9795", "e18484e185a6e18780"],
- ["eb9795", "eb96bce18780"],
- ["eb9796", "e18484e185a6e18781"],
- ["eb9796", "eb96bce18781"],
- ["eb9797", "e18484e185a6e18782"],
- ["eb9797", "eb96bce18782"],
- ["eb9798", "e18484e185a7"],
- ["eb9799", "e18484e185a7e186a8"],
- ["eb9799", "eb9798e186a8"],
- ["eb979a", "e18484e185a7e186a9"],
- ["eb979a", "eb9798e186a9"],
- ["eb979b", "e18484e185a7e186aa"],
- ["eb979b", "eb9798e186aa"],
- ["eb979c", "e18484e185a7e186ab"],
- ["eb979c", "eb9798e186ab"],
- ["eb979d", "e18484e185a7e186ac"],
- ["eb979d", "eb9798e186ac"],
- ["eb979e", "e18484e185a7e186ad"],
- ["eb979e", "eb9798e186ad"],
- ["eb979f", "e18484e185a7e186ae"],
- ["eb979f", "eb9798e186ae"],
- ["eb97a0", "e18484e185a7e186af"],
- ["eb97a0", "eb9798e186af"],
- ["eb97a1", "e18484e185a7e186b0"],
- ["eb97a1", "eb9798e186b0"],
- ["eb97a2", "e18484e185a7e186b1"],
- ["eb97a2", "eb9798e186b1"],
- ["eb97a3", "e18484e185a7e186b2"],
- ["eb97a3", "eb9798e186b2"],
- ["eb97a4", "e18484e185a7e186b3"],
- ["eb97a4", "eb9798e186b3"],
- ["eb97a5", "e18484e185a7e186b4"],
- ["eb97a5", "eb9798e186b4"],
- ["eb97a6", "e18484e185a7e186b5"],
- ["eb97a6", "eb9798e186b5"],
- ["eb97a7", "e18484e185a7e186b6"],
- ["eb97a7", "eb9798e186b6"],
- ["eb97a8", "e18484e185a7e186b7"],
- ["eb97a8", "eb9798e186b7"],
- ["eb97a9", "e18484e185a7e186b8"],
- ["eb97a9", "eb9798e186b8"],
- ["eb97aa", "e18484e185a7e186b9"],
- ["eb97aa", "eb9798e186b9"],
- ["eb97ab", "e18484e185a7e186ba"],
- ["eb97ab", "eb9798e186ba"],
- ["eb97ac", "e18484e185a7e186bb"],
- ["eb97ac", "eb9798e186bb"],
- ["eb97ad", "e18484e185a7e186bc"],
- ["eb97ad", "eb9798e186bc"],
- ["eb97ae", "e18484e185a7e186bd"],
- ["eb97ae", "eb9798e186bd"],
- ["eb97af", "e18484e185a7e186be"],
- ["eb97af", "eb9798e186be"],
- ["eb97b0", "e18484e185a7e186bf"],
- ["eb97b0", "eb9798e186bf"],
- ["eb97b1", "e18484e185a7e18780"],
- ["eb97b1", "eb9798e18780"],
- ["eb97b2", "e18484e185a7e18781"],
- ["eb97b2", "eb9798e18781"],
- ["eb97b3", "e18484e185a7e18782"],
- ["eb97b3", "eb9798e18782"],
- ["eb97b4", "e18484e185a8"],
- ["eb97b5", "e18484e185a8e186a8"],
- ["eb97b5", "eb97b4e186a8"],
- ["eb97b6", "e18484e185a8e186a9"],
- ["eb97b6", "eb97b4e186a9"],
- ["eb97b7", "e18484e185a8e186aa"],
- ["eb97b7", "eb97b4e186aa"],
- ["eb97b8", "e18484e185a8e186ab"],
- ["eb97b8", "eb97b4e186ab"],
- ["eb97b9", "e18484e185a8e186ac"],
- ["eb97b9", "eb97b4e186ac"],
- ["eb97ba", "e18484e185a8e186ad"],
- ["eb97ba", "eb97b4e186ad"],
- ["eb97bb", "e18484e185a8e186ae"],
- ["eb97bb", "eb97b4e186ae"],
- ["eb97bc", "e18484e185a8e186af"],
- ["eb97bc", "eb97b4e186af"],
- ["eb97bd", "e18484e185a8e186b0"],
- ["eb97bd", "eb97b4e186b0"],
- ["eb97be", "e18484e185a8e186b1"],
- ["eb97be", "eb97b4e186b1"],
- ["eb97bf", "e18484e185a8e186b2"],
- ["eb97bf", "eb97b4e186b2"],
- ["eb9880", "e18484e185a8e186b3"],
- ["eb9880", "eb97b4e186b3"],
- ["eb9881", "e18484e185a8e186b4"],
- ["eb9881", "eb97b4e186b4"],
- ["eb9882", "e18484e185a8e186b5"],
- ["eb9882", "eb97b4e186b5"],
- ["eb9883", "e18484e185a8e186b6"],
- ["eb9883", "eb97b4e186b6"],
- ["eb9884", "e18484e185a8e186b7"],
- ["eb9884", "eb97b4e186b7"],
- ["eb9885", "e18484e185a8e186b8"],
- ["eb9885", "eb97b4e186b8"],
- ["eb9886", "e18484e185a8e186b9"],
- ["eb9886", "eb97b4e186b9"],
- ["eb9887", "e18484e185a8e186ba"],
- ["eb9887", "eb97b4e186ba"],
- ["eb9888", "e18484e185a8e186bb"],
- ["eb9888", "eb97b4e186bb"],
- ["eb9889", "e18484e185a8e186bc"],
- ["eb9889", "eb97b4e186bc"],
- ["eb988a", "e18484e185a8e186bd"],
- ["eb988a", "eb97b4e186bd"],
- ["eb988b", "e18484e185a8e186be"],
- ["eb988b", "eb97b4e186be"],
- ["eb988c", "e18484e185a8e186bf"],
- ["eb988c", "eb97b4e186bf"],
- ["eb988d", "e18484e185a8e18780"],
- ["eb988d", "eb97b4e18780"],
- ["eb988e", "e18484e185a8e18781"],
- ["eb988e", "eb97b4e18781"],
- ["eb988f", "e18484e185a8e18782"],
- ["eb988f", "eb97b4e18782"],
- ["eb9890", "e18484e185a9"],
- ["eb9891", "e18484e185a9e186a8"],
- ["eb9891", "eb9890e186a8"],
- ["eb9892", "e18484e185a9e186a9"],
- ["eb9892", "eb9890e186a9"],
- ["eb9893", "e18484e185a9e186aa"],
- ["eb9893", "eb9890e186aa"],
- ["eb9894", "e18484e185a9e186ab"],
- ["eb9894", "eb9890e186ab"],
- ["eb9895", "e18484e185a9e186ac"],
- ["eb9895", "eb9890e186ac"],
- ["eb9896", "e18484e185a9e186ad"],
- ["eb9896", "eb9890e186ad"],
- ["eb9897", "e18484e185a9e186ae"],
- ["eb9897", "eb9890e186ae"],
- ["eb9898", "e18484e185a9e186af"],
- ["eb9898", "eb9890e186af"],
- ["eb9899", "e18484e185a9e186b0"],
- ["eb9899", "eb9890e186b0"],
- ["eb989a", "e18484e185a9e186b1"],
- ["eb989a", "eb9890e186b1"],
- ["eb989b", "e18484e185a9e186b2"],
- ["eb989b", "eb9890e186b2"],
- ["eb989c", "e18484e185a9e186b3"],
- ["eb989c", "eb9890e186b3"],
- ["eb989d", "e18484e185a9e186b4"],
- ["eb989d", "eb9890e186b4"],
- ["eb989e", "e18484e185a9e186b5"],
- ["eb989e", "eb9890e186b5"],
- ["eb989f", "e18484e185a9e186b6"],
- ["eb989f", "eb9890e186b6"],
- ["eb98a0", "e18484e185a9e186b7"],
- ["eb98a0", "eb9890e186b7"],
- ["eb98a1", "e18484e185a9e186b8"],
- ["eb98a1", "eb9890e186b8"],
- ["eb98a2", "e18484e185a9e186b9"],
- ["eb98a2", "eb9890e186b9"],
- ["eb98a3", "e18484e185a9e186ba"],
- ["eb98a3", "eb9890e186ba"],
- ["eb98a4", "e18484e185a9e186bb"],
- ["eb98a4", "eb9890e186bb"],
- ["eb98a5", "e18484e185a9e186bc"],
- ["eb98a5", "eb9890e186bc"],
- ["eb98a6", "e18484e185a9e186bd"],
- ["eb98a6", "eb9890e186bd"],
- ["eb98a7", "e18484e185a9e186be"],
- ["eb98a7", "eb9890e186be"],
- ["eb98a8", "e18484e185a9e186bf"],
- ["eb98a8", "eb9890e186bf"],
- ["eb98a9", "e18484e185a9e18780"],
- ["eb98a9", "eb9890e18780"],
- ["eb98aa", "e18484e185a9e18781"],
- ["eb98aa", "eb9890e18781"],
- ["eb98ab", "e18484e185a9e18782"],
- ["eb98ab", "eb9890e18782"],
- ["eb98ac", "e18484e185aa"],
- ["eb98ad", "e18484e185aae186a8"],
- ["eb98ad", "eb98ace186a8"],
- ["eb98ae", "e18484e185aae186a9"],
- ["eb98ae", "eb98ace186a9"],
- ["eb98af", "e18484e185aae186aa"],
- ["eb98af", "eb98ace186aa"],
- ["eb98b0", "e18484e185aae186ab"],
- ["eb98b0", "eb98ace186ab"],
- ["eb98b1", "e18484e185aae186ac"],
- ["eb98b1", "eb98ace186ac"],
- ["eb98b2", "e18484e185aae186ad"],
- ["eb98b2", "eb98ace186ad"],
- ["eb98b3", "e18484e185aae186ae"],
- ["eb98b3", "eb98ace186ae"],
- ["eb98b4", "e18484e185aae186af"],
- ["eb98b4", "eb98ace186af"],
- ["eb98b5", "e18484e185aae186b0"],
- ["eb98b5", "eb98ace186b0"],
- ["eb98b6", "e18484e185aae186b1"],
- ["eb98b6", "eb98ace186b1"],
- ["eb98b7", "e18484e185aae186b2"],
- ["eb98b7", "eb98ace186b2"],
- ["eb98b8", "e18484e185aae186b3"],
- ["eb98b8", "eb98ace186b3"],
- ["eb98b9", "e18484e185aae186b4"],
- ["eb98b9", "eb98ace186b4"],
- ["eb98ba", "e18484e185aae186b5"],
- ["eb98ba", "eb98ace186b5"],
- ["eb98bb", "e18484e185aae186b6"],
- ["eb98bb", "eb98ace186b6"],
- ["eb98bc", "e18484e185aae186b7"],
- ["eb98bc", "eb98ace186b7"],
- ["eb98bd", "e18484e185aae186b8"],
- ["eb98bd", "eb98ace186b8"],
- ["eb98be", "e18484e185aae186b9"],
- ["eb98be", "eb98ace186b9"],
- ["eb98bf", "e18484e185aae186ba"],
- ["eb98bf", "eb98ace186ba"],
- ["eb9980", "e18484e185aae186bb"],
- ["eb9980", "eb98ace186bb"],
- ["eb9981", "e18484e185aae186bc"],
- ["eb9981", "eb98ace186bc"],
- ["eb9982", "e18484e185aae186bd"],
- ["eb9982", "eb98ace186bd"],
- ["eb9983", "e18484e185aae186be"],
- ["eb9983", "eb98ace186be"],
- ["eb9984", "e18484e185aae186bf"],
- ["eb9984", "eb98ace186bf"],
- ["eb9985", "e18484e185aae18780"],
- ["eb9985", "eb98ace18780"],
- ["eb9986", "e18484e185aae18781"],
- ["eb9986", "eb98ace18781"],
- ["eb9987", "e18484e185aae18782"],
- ["eb9987", "eb98ace18782"],
- ["eb9988", "e18484e185ab"],
- ["eb9989", "e18484e185abe186a8"],
- ["eb9989", "eb9988e186a8"],
- ["eb998a", "e18484e185abe186a9"],
- ["eb998a", "eb9988e186a9"],
- ["eb998b", "e18484e185abe186aa"],
- ["eb998b", "eb9988e186aa"],
- ["eb998c", "e18484e185abe186ab"],
- ["eb998c", "eb9988e186ab"],
- ["eb998d", "e18484e185abe186ac"],
- ["eb998d", "eb9988e186ac"],
- ["eb998e", "e18484e185abe186ad"],
- ["eb998e", "eb9988e186ad"],
- ["eb998f", "e18484e185abe186ae"],
- ["eb998f", "eb9988e186ae"],
- ["eb9990", "e18484e185abe186af"],
- ["eb9990", "eb9988e186af"],
- ["eb9991", "e18484e185abe186b0"],
- ["eb9991", "eb9988e186b0"],
- ["eb9992", "e18484e185abe186b1"],
- ["eb9992", "eb9988e186b1"],
- ["eb9993", "e18484e185abe186b2"],
- ["eb9993", "eb9988e186b2"],
- ["eb9994", "e18484e185abe186b3"],
- ["eb9994", "eb9988e186b3"],
- ["eb9995", "e18484e185abe186b4"],
- ["eb9995", "eb9988e186b4"],
- ["eb9996", "e18484e185abe186b5"],
- ["eb9996", "eb9988e186b5"],
- ["eb9997", "e18484e185abe186b6"],
- ["eb9997", "eb9988e186b6"],
- ["eb9998", "e18484e185abe186b7"],
- ["eb9998", "eb9988e186b7"],
- ["eb9999", "e18484e185abe186b8"],
- ["eb9999", "eb9988e186b8"],
- ["eb999a", "e18484e185abe186b9"],
- ["eb999a", "eb9988e186b9"],
- ["eb999b", "e18484e185abe186ba"],
- ["eb999b", "eb9988e186ba"],
- ["eb999c", "e18484e185abe186bb"],
- ["eb999c", "eb9988e186bb"],
- ["eb999d", "e18484e185abe186bc"],
- ["eb999d", "eb9988e186bc"],
- ["eb999e", "e18484e185abe186bd"],
- ["eb999e", "eb9988e186bd"],
- ["eb999f", "e18484e185abe186be"],
- ["eb999f", "eb9988e186be"],
- ["eb99a0", "e18484e185abe186bf"],
- ["eb99a0", "eb9988e186bf"],
- ["eb99a1", "e18484e185abe18780"],
- ["eb99a1", "eb9988e18780"],
- ["eb99a2", "e18484e185abe18781"],
- ["eb99a2", "eb9988e18781"],
- ["eb99a3", "e18484e185abe18782"],
- ["eb99a3", "eb9988e18782"],
- ["eb99a4", "e18484e185ac"],
- ["eb99a5", "e18484e185ace186a8"],
- ["eb99a5", "eb99a4e186a8"],
- ["eb99a6", "e18484e185ace186a9"],
- ["eb99a6", "eb99a4e186a9"],
- ["eb99a7", "e18484e185ace186aa"],
- ["eb99a7", "eb99a4e186aa"],
- ["eb99a8", "e18484e185ace186ab"],
- ["eb99a8", "eb99a4e186ab"],
- ["eb99a9", "e18484e185ace186ac"],
- ["eb99a9", "eb99a4e186ac"],
- ["eb99aa", "e18484e185ace186ad"],
- ["eb99aa", "eb99a4e186ad"],
- ["eb99ab", "e18484e185ace186ae"],
- ["eb99ab", "eb99a4e186ae"],
- ["eb99ac", "e18484e185ace186af"],
- ["eb99ac", "eb99a4e186af"],
- ["eb99ad", "e18484e185ace186b0"],
- ["eb99ad", "eb99a4e186b0"],
- ["eb99ae", "e18484e185ace186b1"],
- ["eb99ae", "eb99a4e186b1"],
- ["eb99af", "e18484e185ace186b2"],
- ["eb99af", "eb99a4e186b2"],
- ["eb99b0", "e18484e185ace186b3"],
- ["eb99b0", "eb99a4e186b3"],
- ["eb99b1", "e18484e185ace186b4"],
- ["eb99b1", "eb99a4e186b4"],
- ["eb99b2", "e18484e185ace186b5"],
- ["eb99b2", "eb99a4e186b5"],
- ["eb99b3", "e18484e185ace186b6"],
- ["eb99b3", "eb99a4e186b6"],
- ["eb99b4", "e18484e185ace186b7"],
- ["eb99b4", "eb99a4e186b7"],
- ["eb99b5", "e18484e185ace186b8"],
- ["eb99b5", "eb99a4e186b8"],
- ["eb99b6", "e18484e185ace186b9"],
- ["eb99b6", "eb99a4e186b9"],
- ["eb99b7", "e18484e185ace186ba"],
- ["eb99b7", "eb99a4e186ba"],
- ["eb99b8", "e18484e185ace186bb"],
- ["eb99b8", "eb99a4e186bb"],
- ["eb99b9", "e18484e185ace186bc"],
- ["eb99b9", "eb99a4e186bc"],
- ["eb99ba", "e18484e185ace186bd"],
- ["eb99ba", "eb99a4e186bd"],
- ["eb99bb", "e18484e185ace186be"],
- ["eb99bb", "eb99a4e186be"],
- ["eb99bc", "e18484e185ace186bf"],
- ["eb99bc", "eb99a4e186bf"],
- ["eb99bd", "e18484e185ace18780"],
- ["eb99bd", "eb99a4e18780"],
- ["eb99be", "e18484e185ace18781"],
- ["eb99be", "eb99a4e18781"],
- ["eb99bf", "e18484e185ace18782"],
- ["eb99bf", "eb99a4e18782"],
- ["eb9a80", "e18484e185ad"],
- ["eb9a81", "e18484e185ade186a8"],
- ["eb9a81", "eb9a80e186a8"],
- ["eb9a82", "e18484e185ade186a9"],
- ["eb9a82", "eb9a80e186a9"],
- ["eb9a83", "e18484e185ade186aa"],
- ["eb9a83", "eb9a80e186aa"],
- ["eb9a84", "e18484e185ade186ab"],
- ["eb9a84", "eb9a80e186ab"],
- ["eb9a85", "e18484e185ade186ac"],
- ["eb9a85", "eb9a80e186ac"],
- ["eb9a86", "e18484e185ade186ad"],
- ["eb9a86", "eb9a80e186ad"],
- ["eb9a87", "e18484e185ade186ae"],
- ["eb9a87", "eb9a80e186ae"],
- ["eb9a88", "e18484e185ade186af"],
- ["eb9a88", "eb9a80e186af"],
- ["eb9a89", "e18484e185ade186b0"],
- ["eb9a89", "eb9a80e186b0"],
- ["eb9a8a", "e18484e185ade186b1"],
- ["eb9a8a", "eb9a80e186b1"],
- ["eb9a8b", "e18484e185ade186b2"],
- ["eb9a8b", "eb9a80e186b2"],
- ["eb9a8c", "e18484e185ade186b3"],
- ["eb9a8c", "eb9a80e186b3"],
- ["eb9a8d", "e18484e185ade186b4"],
- ["eb9a8d", "eb9a80e186b4"],
- ["eb9a8e", "e18484e185ade186b5"],
- ["eb9a8e", "eb9a80e186b5"],
- ["eb9a8f", "e18484e185ade186b6"],
- ["eb9a8f", "eb9a80e186b6"],
- ["eb9a90", "e18484e185ade186b7"],
- ["eb9a90", "eb9a80e186b7"],
- ["eb9a91", "e18484e185ade186b8"],
- ["eb9a91", "eb9a80e186b8"],
- ["eb9a92", "e18484e185ade186b9"],
- ["eb9a92", "eb9a80e186b9"],
- ["eb9a93", "e18484e185ade186ba"],
- ["eb9a93", "eb9a80e186ba"],
- ["eb9a94", "e18484e185ade186bb"],
- ["eb9a94", "eb9a80e186bb"],
- ["eb9a95", "e18484e185ade186bc"],
- ["eb9a95", "eb9a80e186bc"],
- ["eb9a96", "e18484e185ade186bd"],
- ["eb9a96", "eb9a80e186bd"],
- ["eb9a97", "e18484e185ade186be"],
- ["eb9a97", "eb9a80e186be"],
- ["eb9a98", "e18484e185ade186bf"],
- ["eb9a98", "eb9a80e186bf"],
- ["eb9a99", "e18484e185ade18780"],
- ["eb9a99", "eb9a80e18780"],
- ["eb9a9a", "e18484e185ade18781"],
- ["eb9a9a", "eb9a80e18781"],
- ["eb9a9b", "e18484e185ade18782"],
- ["eb9a9b", "eb9a80e18782"],
- ["eb9a9c", "e18484e185ae"],
- ["eb9a9d", "e18484e185aee186a8"],
- ["eb9a9d", "eb9a9ce186a8"],
- ["eb9a9e", "e18484e185aee186a9"],
- ["eb9a9e", "eb9a9ce186a9"],
- ["eb9a9f", "e18484e185aee186aa"],
- ["eb9a9f", "eb9a9ce186aa"],
- ["eb9aa0", "e18484e185aee186ab"],
- ["eb9aa0", "eb9a9ce186ab"],
- ["eb9aa1", "e18484e185aee186ac"],
- ["eb9aa1", "eb9a9ce186ac"],
- ["eb9aa2", "e18484e185aee186ad"],
- ["eb9aa2", "eb9a9ce186ad"],
- ["eb9aa3", "e18484e185aee186ae"],
- ["eb9aa3", "eb9a9ce186ae"],
- ["eb9aa4", "e18484e185aee186af"],
- ["eb9aa4", "eb9a9ce186af"],
- ["eb9aa5", "e18484e185aee186b0"],
- ["eb9aa5", "eb9a9ce186b0"],
- ["eb9aa6", "e18484e185aee186b1"],
- ["eb9aa6", "eb9a9ce186b1"],
- ["eb9aa7", "e18484e185aee186b2"],
- ["eb9aa7", "eb9a9ce186b2"],
- ["eb9aa8", "e18484e185aee186b3"],
- ["eb9aa8", "eb9a9ce186b3"],
- ["eb9aa9", "e18484e185aee186b4"],
- ["eb9aa9", "eb9a9ce186b4"],
- ["eb9aaa", "e18484e185aee186b5"],
- ["eb9aaa", "eb9a9ce186b5"],
- ["eb9aab", "e18484e185aee186b6"],
- ["eb9aab", "eb9a9ce186b6"],
- ["eb9aac", "e18484e185aee186b7"],
- ["eb9aac", "eb9a9ce186b7"],
- ["eb9aad", "e18484e185aee186b8"],
- ["eb9aad", "eb9a9ce186b8"],
- ["eb9aae", "e18484e185aee186b9"],
- ["eb9aae", "eb9a9ce186b9"],
- ["eb9aaf", "e18484e185aee186ba"],
- ["eb9aaf", "eb9a9ce186ba"],
- ["eb9ab0", "e18484e185aee186bb"],
- ["eb9ab0", "eb9a9ce186bb"],
- ["eb9ab1", "e18484e185aee186bc"],
- ["eb9ab1", "eb9a9ce186bc"],
- ["eb9ab2", "e18484e185aee186bd"],
- ["eb9ab2", "eb9a9ce186bd"],
- ["eb9ab3", "e18484e185aee186be"],
- ["eb9ab3", "eb9a9ce186be"],
- ["eb9ab4", "e18484e185aee186bf"],
- ["eb9ab4", "eb9a9ce186bf"],
- ["eb9ab5", "e18484e185aee18780"],
- ["eb9ab5", "eb9a9ce18780"],
- ["eb9ab6", "e18484e185aee18781"],
- ["eb9ab6", "eb9a9ce18781"],
- ["eb9ab7", "e18484e185aee18782"],
- ["eb9ab7", "eb9a9ce18782"],
- ["eb9ab8", "e18484e185af"],
- ["eb9ab9", "e18484e185afe186a8"],
- ["eb9ab9", "eb9ab8e186a8"],
- ["eb9aba", "e18484e185afe186a9"],
- ["eb9aba", "eb9ab8e186a9"],
- ["eb9abb", "e18484e185afe186aa"],
- ["eb9abb", "eb9ab8e186aa"],
- ["eb9abc", "e18484e185afe186ab"],
- ["eb9abc", "eb9ab8e186ab"],
- ["eb9abd", "e18484e185afe186ac"],
- ["eb9abd", "eb9ab8e186ac"],
- ["eb9abe", "e18484e185afe186ad"],
- ["eb9abe", "eb9ab8e186ad"],
- ["eb9abf", "e18484e185afe186ae"],
- ["eb9abf", "eb9ab8e186ae"],
- ["eb9b80", "e18484e185afe186af"],
- ["eb9b80", "eb9ab8e186af"],
- ["eb9b81", "e18484e185afe186b0"],
- ["eb9b81", "eb9ab8e186b0"],
- ["eb9b82", "e18484e185afe186b1"],
- ["eb9b82", "eb9ab8e186b1"],
- ["eb9b83", "e18484e185afe186b2"],
- ["eb9b83", "eb9ab8e186b2"],
- ["eb9b84", "e18484e185afe186b3"],
- ["eb9b84", "eb9ab8e186b3"],
- ["eb9b85", "e18484e185afe186b4"],
- ["eb9b85", "eb9ab8e186b4"],
- ["eb9b86", "e18484e185afe186b5"],
- ["eb9b86", "eb9ab8e186b5"],
- ["eb9b87", "e18484e185afe186b6"],
- ["eb9b87", "eb9ab8e186b6"],
- ["eb9b88", "e18484e185afe186b7"],
- ["eb9b88", "eb9ab8e186b7"],
- ["eb9b89", "e18484e185afe186b8"],
- ["eb9b89", "eb9ab8e186b8"],
- ["eb9b8a", "e18484e185afe186b9"],
- ["eb9b8a", "eb9ab8e186b9"],
- ["eb9b8b", "e18484e185afe186ba"],
- ["eb9b8b", "eb9ab8e186ba"],
- ["eb9b8c", "e18484e185afe186bb"],
- ["eb9b8c", "eb9ab8e186bb"],
- ["eb9b8d", "e18484e185afe186bc"],
- ["eb9b8d", "eb9ab8e186bc"],
- ["eb9b8e", "e18484e185afe186bd"],
- ["eb9b8e", "eb9ab8e186bd"],
- ["eb9b8f", "e18484e185afe186be"],
- ["eb9b8f", "eb9ab8e186be"],
- ["eb9b90", "e18484e185afe186bf"],
- ["eb9b90", "eb9ab8e186bf"],
- ["eb9b91", "e18484e185afe18780"],
- ["eb9b91", "eb9ab8e18780"],
- ["eb9b92", "e18484e185afe18781"],
- ["eb9b92", "eb9ab8e18781"],
- ["eb9b93", "e18484e185afe18782"],
- ["eb9b93", "eb9ab8e18782"],
- ["eb9b94", "e18484e185b0"],
- ["eb9b95", "e18484e185b0e186a8"],
- ["eb9b95", "eb9b94e186a8"],
- ["eb9b96", "e18484e185b0e186a9"],
- ["eb9b96", "eb9b94e186a9"],
- ["eb9b97", "e18484e185b0e186aa"],
- ["eb9b97", "eb9b94e186aa"],
- ["eb9b98", "e18484e185b0e186ab"],
- ["eb9b98", "eb9b94e186ab"],
- ["eb9b99", "e18484e185b0e186ac"],
- ["eb9b99", "eb9b94e186ac"],
- ["eb9b9a", "e18484e185b0e186ad"],
- ["eb9b9a", "eb9b94e186ad"],
- ["eb9b9b", "e18484e185b0e186ae"],
- ["eb9b9b", "eb9b94e186ae"],
- ["eb9b9c", "e18484e185b0e186af"],
- ["eb9b9c", "eb9b94e186af"],
- ["eb9b9d", "e18484e185b0e186b0"],
- ["eb9b9d", "eb9b94e186b0"],
- ["eb9b9e", "e18484e185b0e186b1"],
- ["eb9b9e", "eb9b94e186b1"],
- ["eb9b9f", "e18484e185b0e186b2"],
- ["eb9b9f", "eb9b94e186b2"],
- ["eb9ba0", "e18484e185b0e186b3"],
- ["eb9ba0", "eb9b94e186b3"],
- ["eb9ba1", "e18484e185b0e186b4"],
- ["eb9ba1", "eb9b94e186b4"],
- ["eb9ba2", "e18484e185b0e186b5"],
- ["eb9ba2", "eb9b94e186b5"],
- ["eb9ba3", "e18484e185b0e186b6"],
- ["eb9ba3", "eb9b94e186b6"],
- ["eb9ba4", "e18484e185b0e186b7"],
- ["eb9ba4", "eb9b94e186b7"],
- ["eb9ba5", "e18484e185b0e186b8"],
- ["eb9ba5", "eb9b94e186b8"],
- ["eb9ba6", "e18484e185b0e186b9"],
- ["eb9ba6", "eb9b94e186b9"],
- ["eb9ba7", "e18484e185b0e186ba"],
- ["eb9ba7", "eb9b94e186ba"],
- ["eb9ba8", "e18484e185b0e186bb"],
- ["eb9ba8", "eb9b94e186bb"],
- ["eb9ba9", "e18484e185b0e186bc"],
- ["eb9ba9", "eb9b94e186bc"],
- ["eb9baa", "e18484e185b0e186bd"],
- ["eb9baa", "eb9b94e186bd"],
- ["eb9bab", "e18484e185b0e186be"],
- ["eb9bab", "eb9b94e186be"],
- ["eb9bac", "e18484e185b0e186bf"],
- ["eb9bac", "eb9b94e186bf"],
- ["eb9bad", "e18484e185b0e18780"],
- ["eb9bad", "eb9b94e18780"],
- ["eb9bae", "e18484e185b0e18781"],
- ["eb9bae", "eb9b94e18781"],
- ["eb9baf", "e18484e185b0e18782"],
- ["eb9baf", "eb9b94e18782"],
- ["eb9bb0", "e18484e185b1"],
- ["eb9bb1", "e18484e185b1e186a8"],
- ["eb9bb1", "eb9bb0e186a8"],
- ["eb9bb2", "e18484e185b1e186a9"],
- ["eb9bb2", "eb9bb0e186a9"],
- ["eb9bb3", "e18484e185b1e186aa"],
- ["eb9bb3", "eb9bb0e186aa"],
- ["eb9bb4", "e18484e185b1e186ab"],
- ["eb9bb4", "eb9bb0e186ab"],
- ["eb9bb5", "e18484e185b1e186ac"],
- ["eb9bb5", "eb9bb0e186ac"],
- ["eb9bb6", "e18484e185b1e186ad"],
- ["eb9bb6", "eb9bb0e186ad"],
- ["eb9bb7", "e18484e185b1e186ae"],
- ["eb9bb7", "eb9bb0e186ae"],
- ["eb9bb8", "e18484e185b1e186af"],
- ["eb9bb8", "eb9bb0e186af"],
- ["eb9bb9", "e18484e185b1e186b0"],
- ["eb9bb9", "eb9bb0e186b0"],
- ["eb9bba", "e18484e185b1e186b1"],
- ["eb9bba", "eb9bb0e186b1"],
- ["eb9bbb", "e18484e185b1e186b2"],
- ["eb9bbb", "eb9bb0e186b2"],
- ["eb9bbc", "e18484e185b1e186b3"],
- ["eb9bbc", "eb9bb0e186b3"],
- ["eb9bbd", "e18484e185b1e186b4"],
- ["eb9bbd", "eb9bb0e186b4"],
- ["eb9bbe", "e18484e185b1e186b5"],
- ["eb9bbe", "eb9bb0e186b5"],
- ["eb9bbf", "e18484e185b1e186b6"],
- ["eb9bbf", "eb9bb0e186b6"],
- ["eb9c80", "e18484e185b1e186b7"],
- ["eb9c80", "eb9bb0e186b7"],
- ["eb9c81", "e18484e185b1e186b8"],
- ["eb9c81", "eb9bb0e186b8"],
- ["eb9c82", "e18484e185b1e186b9"],
- ["eb9c82", "eb9bb0e186b9"],
- ["eb9c83", "e18484e185b1e186ba"],
- ["eb9c83", "eb9bb0e186ba"],
- ["eb9c84", "e18484e185b1e186bb"],
- ["eb9c84", "eb9bb0e186bb"],
- ["eb9c85", "e18484e185b1e186bc"],
- ["eb9c85", "eb9bb0e186bc"],
- ["eb9c86", "e18484e185b1e186bd"],
- ["eb9c86", "eb9bb0e186bd"],
- ["eb9c87", "e18484e185b1e186be"],
- ["eb9c87", "eb9bb0e186be"],
- ["eb9c88", "e18484e185b1e186bf"],
- ["eb9c88", "eb9bb0e186bf"],
- ["eb9c89", "e18484e185b1e18780"],
- ["eb9c89", "eb9bb0e18780"],
- ["eb9c8a", "e18484e185b1e18781"],
- ["eb9c8a", "eb9bb0e18781"],
- ["eb9c8b", "e18484e185b1e18782"],
- ["eb9c8b", "eb9bb0e18782"],
- ["eb9c8c", "e18484e185b2"],
- ["eb9c8d", "e18484e185b2e186a8"],
- ["eb9c8d", "eb9c8ce186a8"],
- ["eb9c8e", "e18484e185b2e186a9"],
- ["eb9c8e", "eb9c8ce186a9"],
- ["eb9c8f", "e18484e185b2e186aa"],
- ["eb9c8f", "eb9c8ce186aa"],
- ["eb9c90", "e18484e185b2e186ab"],
- ["eb9c90", "eb9c8ce186ab"],
- ["eb9c91", "e18484e185b2e186ac"],
- ["eb9c91", "eb9c8ce186ac"],
- ["eb9c92", "e18484e185b2e186ad"],
- ["eb9c92", "eb9c8ce186ad"],
- ["eb9c93", "e18484e185b2e186ae"],
- ["eb9c93", "eb9c8ce186ae"],
- ["eb9c94", "e18484e185b2e186af"],
- ["eb9c94", "eb9c8ce186af"],
- ["eb9c95", "e18484e185b2e186b0"],
- ["eb9c95", "eb9c8ce186b0"],
- ["eb9c96", "e18484e185b2e186b1"],
- ["eb9c96", "eb9c8ce186b1"],
- ["eb9c97", "e18484e185b2e186b2"],
- ["eb9c97", "eb9c8ce186b2"],
- ["eb9c98", "e18484e185b2e186b3"],
- ["eb9c98", "eb9c8ce186b3"],
- ["eb9c99", "e18484e185b2e186b4"],
- ["eb9c99", "eb9c8ce186b4"],
- ["eb9c9a", "e18484e185b2e186b5"],
- ["eb9c9a", "eb9c8ce186b5"],
- ["eb9c9b", "e18484e185b2e186b6"],
- ["eb9c9b", "eb9c8ce186b6"],
- ["eb9c9c", "e18484e185b2e186b7"],
- ["eb9c9c", "eb9c8ce186b7"],
- ["eb9c9d", "e18484e185b2e186b8"],
- ["eb9c9d", "eb9c8ce186b8"],
- ["eb9c9e", "e18484e185b2e186b9"],
- ["eb9c9e", "eb9c8ce186b9"],
- ["eb9c9f", "e18484e185b2e186ba"],
- ["eb9c9f", "eb9c8ce186ba"],
- ["eb9ca0", "e18484e185b2e186bb"],
- ["eb9ca0", "eb9c8ce186bb"],
- ["eb9ca1", "e18484e185b2e186bc"],
- ["eb9ca1", "eb9c8ce186bc"],
- ["eb9ca2", "e18484e185b2e186bd"],
- ["eb9ca2", "eb9c8ce186bd"],
- ["eb9ca3", "e18484e185b2e186be"],
- ["eb9ca3", "eb9c8ce186be"],
- ["eb9ca4", "e18484e185b2e186bf"],
- ["eb9ca4", "eb9c8ce186bf"],
- ["eb9ca5", "e18484e185b2e18780"],
- ["eb9ca5", "eb9c8ce18780"],
- ["eb9ca6", "e18484e185b2e18781"],
- ["eb9ca6", "eb9c8ce18781"],
- ["eb9ca7", "e18484e185b2e18782"],
- ["eb9ca7", "eb9c8ce18782"],
- ["eb9ca8", "e18484e185b3"],
- ["eb9ca9", "e18484e185b3e186a8"],
- ["eb9ca9", "eb9ca8e186a8"],
- ["eb9caa", "e18484e185b3e186a9"],
- ["eb9caa", "eb9ca8e186a9"],
- ["eb9cab", "e18484e185b3e186aa"],
- ["eb9cab", "eb9ca8e186aa"],
- ["eb9cac", "e18484e185b3e186ab"],
- ["eb9cac", "eb9ca8e186ab"],
- ["eb9cad", "e18484e185b3e186ac"],
- ["eb9cad", "eb9ca8e186ac"],
- ["eb9cae", "e18484e185b3e186ad"],
- ["eb9cae", "eb9ca8e186ad"],
- ["eb9caf", "e18484e185b3e186ae"],
- ["eb9caf", "eb9ca8e186ae"],
- ["eb9cb0", "e18484e185b3e186af"],
- ["eb9cb0", "eb9ca8e186af"],
- ["eb9cb1", "e18484e185b3e186b0"],
- ["eb9cb1", "eb9ca8e186b0"],
- ["eb9cb2", "e18484e185b3e186b1"],
- ["eb9cb2", "eb9ca8e186b1"],
- ["eb9cb3", "e18484e185b3e186b2"],
- ["eb9cb3", "eb9ca8e186b2"],
- ["eb9cb4", "e18484e185b3e186b3"],
- ["eb9cb4", "eb9ca8e186b3"],
- ["eb9cb5", "e18484e185b3e186b4"],
- ["eb9cb5", "eb9ca8e186b4"],
- ["eb9cb6", "e18484e185b3e186b5"],
- ["eb9cb6", "eb9ca8e186b5"],
- ["eb9cb7", "e18484e185b3e186b6"],
- ["eb9cb7", "eb9ca8e186b6"],
- ["eb9cb8", "e18484e185b3e186b7"],
- ["eb9cb8", "eb9ca8e186b7"],
- ["eb9cb9", "e18484e185b3e186b8"],
- ["eb9cb9", "eb9ca8e186b8"],
- ["eb9cba", "e18484e185b3e186b9"],
- ["eb9cba", "eb9ca8e186b9"],
- ["eb9cbb", "e18484e185b3e186ba"],
- ["eb9cbb", "eb9ca8e186ba"],
- ["eb9cbc", "e18484e185b3e186bb"],
- ["eb9cbc", "eb9ca8e186bb"],
- ["eb9cbd", "e18484e185b3e186bc"],
- ["eb9cbd", "eb9ca8e186bc"],
- ["eb9cbe", "e18484e185b3e186bd"],
- ["eb9cbe", "eb9ca8e186bd"],
- ["eb9cbf", "e18484e185b3e186be"],
- ["eb9cbf", "eb9ca8e186be"],
- ["eb9d80", "e18484e185b3e186bf"],
- ["eb9d80", "eb9ca8e186bf"],
- ["eb9d81", "e18484e185b3e18780"],
- ["eb9d81", "eb9ca8e18780"],
- ["eb9d82", "e18484e185b3e18781"],
- ["eb9d82", "eb9ca8e18781"],
- ["eb9d83", "e18484e185b3e18782"],
- ["eb9d83", "eb9ca8e18782"],
- ["eb9d84", "e18484e185b4"],
- ["eb9d85", "e18484e185b4e186a8"],
- ["eb9d85", "eb9d84e186a8"],
- ["eb9d86", "e18484e185b4e186a9"],
- ["eb9d86", "eb9d84e186a9"],
- ["eb9d87", "e18484e185b4e186aa"],
- ["eb9d87", "eb9d84e186aa"],
- ["eb9d88", "e18484e185b4e186ab"],
- ["eb9d88", "eb9d84e186ab"],
- ["eb9d89", "e18484e185b4e186ac"],
- ["eb9d89", "eb9d84e186ac"],
- ["eb9d8a", "e18484e185b4e186ad"],
- ["eb9d8a", "eb9d84e186ad"],
- ["eb9d8b", "e18484e185b4e186ae"],
- ["eb9d8b", "eb9d84e186ae"],
- ["eb9d8c", "e18484e185b4e186af"],
- ["eb9d8c", "eb9d84e186af"],
- ["eb9d8d", "e18484e185b4e186b0"],
- ["eb9d8d", "eb9d84e186b0"],
- ["eb9d8e", "e18484e185b4e186b1"],
- ["eb9d8e", "eb9d84e186b1"],
- ["eb9d8f", "e18484e185b4e186b2"],
- ["eb9d8f", "eb9d84e186b2"],
- ["eb9d90", "e18484e185b4e186b3"],
- ["eb9d90", "eb9d84e186b3"],
- ["eb9d91", "e18484e185b4e186b4"],
- ["eb9d91", "eb9d84e186b4"],
- ["eb9d92", "e18484e185b4e186b5"],
- ["eb9d92", "eb9d84e186b5"],
- ["eb9d93", "e18484e185b4e186b6"],
- ["eb9d93", "eb9d84e186b6"],
- ["eb9d94", "e18484e185b4e186b7"],
- ["eb9d94", "eb9d84e186b7"],
- ["eb9d95", "e18484e185b4e186b8"],
- ["eb9d95", "eb9d84e186b8"],
- ["eb9d96", "e18484e185b4e186b9"],
- ["eb9d96", "eb9d84e186b9"],
- ["eb9d97", "e18484e185b4e186ba"],
- ["eb9d97", "eb9d84e186ba"],
- ["eb9d98", "e18484e185b4e186bb"],
- ["eb9d98", "eb9d84e186bb"],
- ["eb9d99", "e18484e185b4e186bc"],
- ["eb9d99", "eb9d84e186bc"],
- ["eb9d9a", "e18484e185b4e186bd"],
- ["eb9d9a", "eb9d84e186bd"],
- ["eb9d9b", "e18484e185b4e186be"],
- ["eb9d9b", "eb9d84e186be"],
- ["eb9d9c", "e18484e185b4e186bf"],
- ["eb9d9c", "eb9d84e186bf"],
- ["eb9d9d", "e18484e185b4e18780"],
- ["eb9d9d", "eb9d84e18780"],
- ["eb9d9e", "e18484e185b4e18781"],
- ["eb9d9e", "eb9d84e18781"],
- ["eb9d9f", "e18484e185b4e18782"],
- ["eb9d9f", "eb9d84e18782"],
- ["eb9da0", "e18484e185b5"],
- ["eb9da1", "e18484e185b5e186a8"],
- ["eb9da1", "eb9da0e186a8"],
- ["eb9da2", "e18484e185b5e186a9"],
- ["eb9da2", "eb9da0e186a9"],
- ["eb9da3", "e18484e185b5e186aa"],
- ["eb9da3", "eb9da0e186aa"],
- ["eb9da4", "e18484e185b5e186ab"],
- ["eb9da4", "eb9da0e186ab"],
- ["eb9da5", "e18484e185b5e186ac"],
- ["eb9da5", "eb9da0e186ac"],
- ["eb9da6", "e18484e185b5e186ad"],
- ["eb9da6", "eb9da0e186ad"],
- ["eb9da7", "e18484e185b5e186ae"],
- ["eb9da7", "eb9da0e186ae"],
- ["eb9da8", "e18484e185b5e186af"],
- ["eb9da8", "eb9da0e186af"],
- ["eb9da9", "e18484e185b5e186b0"],
- ["eb9da9", "eb9da0e186b0"],
- ["eb9daa", "e18484e185b5e186b1"],
- ["eb9daa", "eb9da0e186b1"],
- ["eb9dab", "e18484e185b5e186b2"],
- ["eb9dab", "eb9da0e186b2"],
- ["eb9dac", "e18484e185b5e186b3"],
- ["eb9dac", "eb9da0e186b3"],
- ["eb9dad", "e18484e185b5e186b4"],
- ["eb9dad", "eb9da0e186b4"],
- ["eb9dae", "e18484e185b5e186b5"],
- ["eb9dae", "eb9da0e186b5"],
- ["eb9daf", "e18484e185b5e186b6"],
- ["eb9daf", "eb9da0e186b6"],
- ["eb9db0", "e18484e185b5e186b7"],
- ["eb9db0", "eb9da0e186b7"],
- ["eb9db1", "e18484e185b5e186b8"],
- ["eb9db1", "eb9da0e186b8"],
- ["eb9db2", "e18484e185b5e186b9"],
- ["eb9db2", "eb9da0e186b9"],
- ["eb9db3", "e18484e185b5e186ba"],
- ["eb9db3", "eb9da0e186ba"],
- ["eb9db4", "e18484e185b5e186bb"],
- ["eb9db4", "eb9da0e186bb"],
- ["eb9db5", "e18484e185b5e186bc"],
- ["eb9db5", "eb9da0e186bc"],
- ["eb9db6", "e18484e185b5e186bd"],
- ["eb9db6", "eb9da0e186bd"],
- ["eb9db7", "e18484e185b5e186be"],
- ["eb9db7", "eb9da0e186be"],
- ["eb9db8", "e18484e185b5e186bf"],
- ["eb9db8", "eb9da0e186bf"],
- ["eb9db9", "e18484e185b5e18780"],
- ["eb9db9", "eb9da0e18780"],
- ["eb9dba", "e18484e185b5e18781"],
- ["eb9dba", "eb9da0e18781"],
- ["eb9dbb", "e18484e185b5e18782"],
- ["eb9dbb", "eb9da0e18782"],
- ["eb9dbc", "e18485e185a1"],
- ["eb9dbd", "e18485e185a1e186a8"],
- ["eb9dbd", "eb9dbce186a8"],
- ["eb9dbe", "e18485e185a1e186a9"],
- ["eb9dbe", "eb9dbce186a9"],
- ["eb9dbf", "e18485e185a1e186aa"],
- ["eb9dbf", "eb9dbce186aa"],
- ["eb9e80", "e18485e185a1e186ab"],
- ["eb9e80", "eb9dbce186ab"],
- ["eb9e81", "e18485e185a1e186ac"],
- ["eb9e81", "eb9dbce186ac"],
- ["eb9e82", "e18485e185a1e186ad"],
- ["eb9e82", "eb9dbce186ad"],
- ["eb9e83", "e18485e185a1e186ae"],
- ["eb9e83", "eb9dbce186ae"],
- ["eb9e84", "e18485e185a1e186af"],
- ["eb9e84", "eb9dbce186af"],
- ["eb9e85", "e18485e185a1e186b0"],
- ["eb9e85", "eb9dbce186b0"],
- ["eb9e86", "e18485e185a1e186b1"],
- ["eb9e86", "eb9dbce186b1"],
- ["eb9e87", "e18485e185a1e186b2"],
- ["eb9e87", "eb9dbce186b2"],
- ["eb9e88", "e18485e185a1e186b3"],
- ["eb9e88", "eb9dbce186b3"],
- ["eb9e89", "e18485e185a1e186b4"],
- ["eb9e89", "eb9dbce186b4"],
- ["eb9e8a", "e18485e185a1e186b5"],
- ["eb9e8a", "eb9dbce186b5"],
- ["eb9e8b", "e18485e185a1e186b6"],
- ["eb9e8b", "eb9dbce186b6"],
- ["eb9e8c", "e18485e185a1e186b7"],
- ["eb9e8c", "eb9dbce186b7"],
- ["eb9e8d", "e18485e185a1e186b8"],
- ["eb9e8d", "eb9dbce186b8"],
- ["eb9e8e", "e18485e185a1e186b9"],
- ["eb9e8e", "eb9dbce186b9"],
- ["eb9e8f", "e18485e185a1e186ba"],
- ["eb9e8f", "eb9dbce186ba"],
- ["eb9e90", "e18485e185a1e186bb"],
- ["eb9e90", "eb9dbce186bb"],
- ["eb9e91", "e18485e185a1e186bc"],
- ["eb9e91", "eb9dbce186bc"],
- ["eb9e92", "e18485e185a1e186bd"],
- ["eb9e92", "eb9dbce186bd"],
- ["eb9e93", "e18485e185a1e186be"],
- ["eb9e93", "eb9dbce186be"],
- ["eb9e94", "e18485e185a1e186bf"],
- ["eb9e94", "eb9dbce186bf"],
- ["eb9e95", "e18485e185a1e18780"],
- ["eb9e95", "eb9dbce18780"],
- ["eb9e96", "e18485e185a1e18781"],
- ["eb9e96", "eb9dbce18781"],
- ["eb9e97", "e18485e185a1e18782"],
- ["eb9e97", "eb9dbce18782"],
- ["eb9e98", "e18485e185a2"],
- ["eb9e99", "e18485e185a2e186a8"],
- ["eb9e99", "eb9e98e186a8"],
- ["eb9e9a", "e18485e185a2e186a9"],
- ["eb9e9a", "eb9e98e186a9"],
- ["eb9e9b", "e18485e185a2e186aa"],
- ["eb9e9b", "eb9e98e186aa"],
- ["eb9e9c", "e18485e185a2e186ab"],
- ["eb9e9c", "eb9e98e186ab"],
- ["eb9e9d", "e18485e185a2e186ac"],
- ["eb9e9d", "eb9e98e186ac"],
- ["eb9e9e", "e18485e185a2e186ad"],
- ["eb9e9e", "eb9e98e186ad"],
- ["eb9e9f", "e18485e185a2e186ae"],
- ["eb9e9f", "eb9e98e186ae"],
- ["eb9ea0", "e18485e185a2e186af"],
- ["eb9ea0", "eb9e98e186af"],
- ["eb9ea1", "e18485e185a2e186b0"],
- ["eb9ea1", "eb9e98e186b0"],
- ["eb9ea2", "e18485e185a2e186b1"],
- ["eb9ea2", "eb9e98e186b1"],
- ["eb9ea3", "e18485e185a2e186b2"],
- ["eb9ea3", "eb9e98e186b2"],
- ["eb9ea4", "e18485e185a2e186b3"],
- ["eb9ea4", "eb9e98e186b3"],
- ["eb9ea5", "e18485e185a2e186b4"],
- ["eb9ea5", "eb9e98e186b4"],
- ["eb9ea6", "e18485e185a2e186b5"],
- ["eb9ea6", "eb9e98e186b5"],
- ["eb9ea7", "e18485e185a2e186b6"],
- ["eb9ea7", "eb9e98e186b6"],
- ["eb9ea8", "e18485e185a2e186b7"],
- ["eb9ea8", "eb9e98e186b7"],
- ["eb9ea9", "e18485e185a2e186b8"],
- ["eb9ea9", "eb9e98e186b8"],
- ["eb9eaa", "e18485e185a2e186b9"],
- ["eb9eaa", "eb9e98e186b9"],
- ["eb9eab", "e18485e185a2e186ba"],
- ["eb9eab", "eb9e98e186ba"],
- ["eb9eac", "e18485e185a2e186bb"],
- ["eb9eac", "eb9e98e186bb"],
- ["eb9ead", "e18485e185a2e186bc"],
- ["eb9ead", "eb9e98e186bc"],
- ["eb9eae", "e18485e185a2e186bd"],
- ["eb9eae", "eb9e98e186bd"],
- ["eb9eaf", "e18485e185a2e186be"],
- ["eb9eaf", "eb9e98e186be"],
- ["eb9eb0", "e18485e185a2e186bf"],
- ["eb9eb0", "eb9e98e186bf"],
- ["eb9eb1", "e18485e185a2e18780"],
- ["eb9eb1", "eb9e98e18780"],
- ["eb9eb2", "e18485e185a2e18781"],
- ["eb9eb2", "eb9e98e18781"],
- ["eb9eb3", "e18485e185a2e18782"],
- ["eb9eb3", "eb9e98e18782"],
- ["eb9eb4", "e18485e185a3"],
- ["eb9eb5", "e18485e185a3e186a8"],
- ["eb9eb5", "eb9eb4e186a8"],
- ["eb9eb6", "e18485e185a3e186a9"],
- ["eb9eb6", "eb9eb4e186a9"],
- ["eb9eb7", "e18485e185a3e186aa"],
- ["eb9eb7", "eb9eb4e186aa"],
- ["eb9eb8", "e18485e185a3e186ab"],
- ["eb9eb8", "eb9eb4e186ab"],
- ["eb9eb9", "e18485e185a3e186ac"],
- ["eb9eb9", "eb9eb4e186ac"],
- ["eb9eba", "e18485e185a3e186ad"],
- ["eb9eba", "eb9eb4e186ad"],
- ["eb9ebb", "e18485e185a3e186ae"],
- ["eb9ebb", "eb9eb4e186ae"],
- ["eb9ebc", "e18485e185a3e186af"],
- ["eb9ebc", "eb9eb4e186af"],
- ["eb9ebd", "e18485e185a3e186b0"],
- ["eb9ebd", "eb9eb4e186b0"],
- ["eb9ebe", "e18485e185a3e186b1"],
- ["eb9ebe", "eb9eb4e186b1"],
- ["eb9ebf", "e18485e185a3e186b2"],
- ["eb9ebf", "eb9eb4e186b2"],
- ["eb9f80", "e18485e185a3e186b3"],
- ["eb9f80", "eb9eb4e186b3"],
- ["eb9f81", "e18485e185a3e186b4"],
- ["eb9f81", "eb9eb4e186b4"],
- ["eb9f82", "e18485e185a3e186b5"],
- ["eb9f82", "eb9eb4e186b5"],
- ["eb9f83", "e18485e185a3e186b6"],
- ["eb9f83", "eb9eb4e186b6"],
- ["eb9f84", "e18485e185a3e186b7"],
- ["eb9f84", "eb9eb4e186b7"],
- ["eb9f85", "e18485e185a3e186b8"],
- ["eb9f85", "eb9eb4e186b8"],
- ["eb9f86", "e18485e185a3e186b9"],
- ["eb9f86", "eb9eb4e186b9"],
- ["eb9f87", "e18485e185a3e186ba"],
- ["eb9f87", "eb9eb4e186ba"],
- ["eb9f88", "e18485e185a3e186bb"],
- ["eb9f88", "eb9eb4e186bb"],
- ["eb9f89", "e18485e185a3e186bc"],
- ["eb9f89", "eb9eb4e186bc"],
- ["eb9f8a", "e18485e185a3e186bd"],
- ["eb9f8a", "eb9eb4e186bd"],
- ["eb9f8b", "e18485e185a3e186be"],
- ["eb9f8b", "eb9eb4e186be"],
- ["eb9f8c", "e18485e185a3e186bf"],
- ["eb9f8c", "eb9eb4e186bf"],
- ["eb9f8d", "e18485e185a3e18780"],
- ["eb9f8d", "eb9eb4e18780"],
- ["eb9f8e", "e18485e185a3e18781"],
- ["eb9f8e", "eb9eb4e18781"],
- ["eb9f8f", "e18485e185a3e18782"],
- ["eb9f8f", "eb9eb4e18782"],
- ["eb9f90", "e18485e185a4"],
- ["eb9f91", "e18485e185a4e186a8"],
- ["eb9f91", "eb9f90e186a8"],
- ["eb9f92", "e18485e185a4e186a9"],
- ["eb9f92", "eb9f90e186a9"],
- ["eb9f93", "e18485e185a4e186aa"],
- ["eb9f93", "eb9f90e186aa"],
- ["eb9f94", "e18485e185a4e186ab"],
- ["eb9f94", "eb9f90e186ab"],
- ["eb9f95", "e18485e185a4e186ac"],
- ["eb9f95", "eb9f90e186ac"],
- ["eb9f96", "e18485e185a4e186ad"],
- ["eb9f96", "eb9f90e186ad"],
- ["eb9f97", "e18485e185a4e186ae"],
- ["eb9f97", "eb9f90e186ae"],
- ["eb9f98", "e18485e185a4e186af"],
- ["eb9f98", "eb9f90e186af"],
- ["eb9f99", "e18485e185a4e186b0"],
- ["eb9f99", "eb9f90e186b0"],
- ["eb9f9a", "e18485e185a4e186b1"],
- ["eb9f9a", "eb9f90e186b1"],
- ["eb9f9b", "e18485e185a4e186b2"],
- ["eb9f9b", "eb9f90e186b2"],
- ["eb9f9c", "e18485e185a4e186b3"],
- ["eb9f9c", "eb9f90e186b3"],
- ["eb9f9d", "e18485e185a4e186b4"],
- ["eb9f9d", "eb9f90e186b4"],
- ["eb9f9e", "e18485e185a4e186b5"],
- ["eb9f9e", "eb9f90e186b5"],
- ["eb9f9f", "e18485e185a4e186b6"],
- ["eb9f9f", "eb9f90e186b6"],
- ["eb9fa0", "e18485e185a4e186b7"],
- ["eb9fa0", "eb9f90e186b7"],
- ["eb9fa1", "e18485e185a4e186b8"],
- ["eb9fa1", "eb9f90e186b8"],
- ["eb9fa2", "e18485e185a4e186b9"],
- ["eb9fa2", "eb9f90e186b9"],
- ["eb9fa3", "e18485e185a4e186ba"],
- ["eb9fa3", "eb9f90e186ba"],
- ["eb9fa4", "e18485e185a4e186bb"],
- ["eb9fa4", "eb9f90e186bb"],
- ["eb9fa5", "e18485e185a4e186bc"],
- ["eb9fa5", "eb9f90e186bc"],
- ["eb9fa6", "e18485e185a4e186bd"],
- ["eb9fa6", "eb9f90e186bd"],
- ["eb9fa7", "e18485e185a4e186be"],
- ["eb9fa7", "eb9f90e186be"],
- ["eb9fa8", "e18485e185a4e186bf"],
- ["eb9fa8", "eb9f90e186bf"],
- ["eb9fa9", "e18485e185a4e18780"],
- ["eb9fa9", "eb9f90e18780"],
- ["eb9faa", "e18485e185a4e18781"],
- ["eb9faa", "eb9f90e18781"],
- ["eb9fab", "e18485e185a4e18782"],
- ["eb9fab", "eb9f90e18782"],
- ["eb9fac", "e18485e185a5"],
- ["eb9fad", "e18485e185a5e186a8"],
- ["eb9fad", "eb9face186a8"],
- ["eb9fae", "e18485e185a5e186a9"],
- ["eb9fae", "eb9face186a9"],
- ["eb9faf", "e18485e185a5e186aa"],
- ["eb9faf", "eb9face186aa"],
- ["eb9fb0", "e18485e185a5e186ab"],
- ["eb9fb0", "eb9face186ab"],
- ["eb9fb1", "e18485e185a5e186ac"],
- ["eb9fb1", "eb9face186ac"],
- ["eb9fb2", "e18485e185a5e186ad"],
- ["eb9fb2", "eb9face186ad"],
- ["eb9fb3", "e18485e185a5e186ae"],
- ["eb9fb3", "eb9face186ae"],
- ["eb9fb4", "e18485e185a5e186af"],
- ["eb9fb4", "eb9face186af"],
- ["eb9fb5", "e18485e185a5e186b0"],
- ["eb9fb5", "eb9face186b0"],
- ["eb9fb6", "e18485e185a5e186b1"],
- ["eb9fb6", "eb9face186b1"],
- ["eb9fb7", "e18485e185a5e186b2"],
- ["eb9fb7", "eb9face186b2"],
- ["eb9fb8", "e18485e185a5e186b3"],
- ["eb9fb8", "eb9face186b3"],
- ["eb9fb9", "e18485e185a5e186b4"],
- ["eb9fb9", "eb9face186b4"],
- ["eb9fba", "e18485e185a5e186b5"],
- ["eb9fba", "eb9face186b5"],
- ["eb9fbb", "e18485e185a5e186b6"],
- ["eb9fbb", "eb9face186b6"],
- ["eb9fbc", "e18485e185a5e186b7"],
- ["eb9fbc", "eb9face186b7"],
- ["eb9fbd", "e18485e185a5e186b8"],
- ["eb9fbd", "eb9face186b8"],
- ["eb9fbe", "e18485e185a5e186b9"],
- ["eb9fbe", "eb9face186b9"],
- ["eb9fbf", "e18485e185a5e186ba"],
- ["eb9fbf", "eb9face186ba"],
- ["eba080", "e18485e185a5e186bb"],
- ["eba080", "eb9face186bb"],
- ["eba081", "e18485e185a5e186bc"],
- ["eba081", "eb9face186bc"],
- ["eba082", "e18485e185a5e186bd"],
- ["eba082", "eb9face186bd"],
- ["eba083", "e18485e185a5e186be"],
- ["eba083", "eb9face186be"],
- ["eba084", "e18485e185a5e186bf"],
- ["eba084", "eb9face186bf"],
- ["eba085", "e18485e185a5e18780"],
- ["eba085", "eb9face18780"],
- ["eba086", "e18485e185a5e18781"],
- ["eba086", "eb9face18781"],
- ["eba087", "e18485e185a5e18782"],
- ["eba087", "eb9face18782"],
- ["eba088", "e18485e185a6"],
- ["eba089", "e18485e185a6e186a8"],
- ["eba089", "eba088e186a8"],
- ["eba08a", "e18485e185a6e186a9"],
- ["eba08a", "eba088e186a9"],
- ["eba08b", "e18485e185a6e186aa"],
- ["eba08b", "eba088e186aa"],
- ["eba08c", "e18485e185a6e186ab"],
- ["eba08c", "eba088e186ab"],
- ["eba08d", "e18485e185a6e186ac"],
- ["eba08d", "eba088e186ac"],
- ["eba08e", "e18485e185a6e186ad"],
- ["eba08e", "eba088e186ad"],
- ["eba08f", "e18485e185a6e186ae"],
- ["eba08f", "eba088e186ae"],
- ["eba090", "e18485e185a6e186af"],
- ["eba090", "eba088e186af"],
- ["eba091", "e18485e185a6e186b0"],
- ["eba091", "eba088e186b0"],
- ["eba092", "e18485e185a6e186b1"],
- ["eba092", "eba088e186b1"],
- ["eba093", "e18485e185a6e186b2"],
- ["eba093", "eba088e186b2"],
- ["eba094", "e18485e185a6e186b3"],
- ["eba094", "eba088e186b3"],
- ["eba095", "e18485e185a6e186b4"],
- ["eba095", "eba088e186b4"],
- ["eba096", "e18485e185a6e186b5"],
- ["eba096", "eba088e186b5"],
- ["eba097", "e18485e185a6e186b6"],
- ["eba097", "eba088e186b6"],
- ["eba098", "e18485e185a6e186b7"],
- ["eba098", "eba088e186b7"],
- ["eba099", "e18485e185a6e186b8"],
- ["eba099", "eba088e186b8"],
- ["eba09a", "e18485e185a6e186b9"],
- ["eba09a", "eba088e186b9"],
- ["eba09b", "e18485e185a6e186ba"],
- ["eba09b", "eba088e186ba"],
- ["eba09c", "e18485e185a6e186bb"],
- ["eba09c", "eba088e186bb"],
- ["eba09d", "e18485e185a6e186bc"],
- ["eba09d", "eba088e186bc"],
- ["eba09e", "e18485e185a6e186bd"],
- ["eba09e", "eba088e186bd"],
- ["eba09f", "e18485e185a6e186be"],
- ["eba09f", "eba088e186be"],
- ["eba0a0", "e18485e185a6e186bf"],
- ["eba0a0", "eba088e186bf"],
- ["eba0a1", "e18485e185a6e18780"],
- ["eba0a1", "eba088e18780"],
- ["eba0a2", "e18485e185a6e18781"],
- ["eba0a2", "eba088e18781"],
- ["eba0a3", "e18485e185a6e18782"],
- ["eba0a3", "eba088e18782"],
- ["eba0a4", "e18485e185a7"],
- ["eba0a5", "e18485e185a7e186a8"],
- ["eba0a5", "eba0a4e186a8"],
- ["eba0a6", "e18485e185a7e186a9"],
- ["eba0a6", "eba0a4e186a9"],
- ["eba0a7", "e18485e185a7e186aa"],
- ["eba0a7", "eba0a4e186aa"],
- ["eba0a8", "e18485e185a7e186ab"],
- ["eba0a8", "eba0a4e186ab"],
- ["eba0a9", "e18485e185a7e186ac"],
- ["eba0a9", "eba0a4e186ac"],
- ["eba0aa", "e18485e185a7e186ad"],
- ["eba0aa", "eba0a4e186ad"],
- ["eba0ab", "e18485e185a7e186ae"],
- ["eba0ab", "eba0a4e186ae"],
- ["eba0ac", "e18485e185a7e186af"],
- ["eba0ac", "eba0a4e186af"],
- ["eba0ad", "e18485e185a7e186b0"],
- ["eba0ad", "eba0a4e186b0"],
- ["eba0ae", "e18485e185a7e186b1"],
- ["eba0ae", "eba0a4e186b1"],
- ["eba0af", "e18485e185a7e186b2"],
- ["eba0af", "eba0a4e186b2"],
- ["eba0b0", "e18485e185a7e186b3"],
- ["eba0b0", "eba0a4e186b3"],
- ["eba0b1", "e18485e185a7e186b4"],
- ["eba0b1", "eba0a4e186b4"],
- ["eba0b2", "e18485e185a7e186b5"],
- ["eba0b2", "eba0a4e186b5"],
- ["eba0b3", "e18485e185a7e186b6"],
- ["eba0b3", "eba0a4e186b6"],
- ["eba0b4", "e18485e185a7e186b7"],
- ["eba0b4", "eba0a4e186b7"],
- ["eba0b5", "e18485e185a7e186b8"],
- ["eba0b5", "eba0a4e186b8"],
- ["eba0b6", "e18485e185a7e186b9"],
- ["eba0b6", "eba0a4e186b9"],
- ["eba0b7", "e18485e185a7e186ba"],
- ["eba0b7", "eba0a4e186ba"],
- ["eba0b8", "e18485e185a7e186bb"],
- ["eba0b8", "eba0a4e186bb"],
- ["eba0b9", "e18485e185a7e186bc"],
- ["eba0b9", "eba0a4e186bc"],
- ["eba0ba", "e18485e185a7e186bd"],
- ["eba0ba", "eba0a4e186bd"],
- ["eba0bb", "e18485e185a7e186be"],
- ["eba0bb", "eba0a4e186be"],
- ["eba0bc", "e18485e185a7e186bf"],
- ["eba0bc", "eba0a4e186bf"],
- ["eba0bd", "e18485e185a7e18780"],
- ["eba0bd", "eba0a4e18780"],
- ["eba0be", "e18485e185a7e18781"],
- ["eba0be", "eba0a4e18781"],
- ["eba0bf", "e18485e185a7e18782"],
- ["eba0bf", "eba0a4e18782"],
- ["eba180", "e18485e185a8"],
- ["eba181", "e18485e185a8e186a8"],
- ["eba181", "eba180e186a8"],
- ["eba182", "e18485e185a8e186a9"],
- ["eba182", "eba180e186a9"],
- ["eba183", "e18485e185a8e186aa"],
- ["eba183", "eba180e186aa"],
- ["eba184", "e18485e185a8e186ab"],
- ["eba184", "eba180e186ab"],
- ["eba185", "e18485e185a8e186ac"],
- ["eba185", "eba180e186ac"],
- ["eba186", "e18485e185a8e186ad"],
- ["eba186", "eba180e186ad"],
- ["eba187", "e18485e185a8e186ae"],
- ["eba187", "eba180e186ae"],
- ["eba188", "e18485e185a8e186af"],
- ["eba188", "eba180e186af"],
- ["eba189", "e18485e185a8e186b0"],
- ["eba189", "eba180e186b0"],
- ["eba18a", "e18485e185a8e186b1"],
- ["eba18a", "eba180e186b1"],
- ["eba18b", "e18485e185a8e186b2"],
- ["eba18b", "eba180e186b2"],
- ["eba18c", "e18485e185a8e186b3"],
- ["eba18c", "eba180e186b3"],
- ["eba18d", "e18485e185a8e186b4"],
- ["eba18d", "eba180e186b4"],
- ["eba18e", "e18485e185a8e186b5"],
- ["eba18e", "eba180e186b5"],
- ["eba18f", "e18485e185a8e186b6"],
- ["eba18f", "eba180e186b6"],
- ["eba190", "e18485e185a8e186b7"],
- ["eba190", "eba180e186b7"],
- ["eba191", "e18485e185a8e186b8"],
- ["eba191", "eba180e186b8"],
- ["eba192", "e18485e185a8e186b9"],
- ["eba192", "eba180e186b9"],
- ["eba193", "e18485e185a8e186ba"],
- ["eba193", "eba180e186ba"],
- ["eba194", "e18485e185a8e186bb"],
- ["eba194", "eba180e186bb"],
- ["eba195", "e18485e185a8e186bc"],
- ["eba195", "eba180e186bc"],
- ["eba196", "e18485e185a8e186bd"],
- ["eba196", "eba180e186bd"],
- ["eba197", "e18485e185a8e186be"],
- ["eba197", "eba180e186be"],
- ["eba198", "e18485e185a8e186bf"],
- ["eba198", "eba180e186bf"],
- ["eba199", "e18485e185a8e18780"],
- ["eba199", "eba180e18780"],
- ["eba19a", "e18485e185a8e18781"],
- ["eba19a", "eba180e18781"],
- ["eba19b", "e18485e185a8e18782"],
- ["eba19b", "eba180e18782"],
- ["eba19c", "e18485e185a9"],
- ["eba19d", "e18485e185a9e186a8"],
- ["eba19d", "eba19ce186a8"],
- ["eba19e", "e18485e185a9e186a9"],
- ["eba19e", "eba19ce186a9"],
- ["eba19f", "e18485e185a9e186aa"],
- ["eba19f", "eba19ce186aa"],
- ["eba1a0", "e18485e185a9e186ab"],
- ["eba1a0", "eba19ce186ab"],
- ["eba1a1", "e18485e185a9e186ac"],
- ["eba1a1", "eba19ce186ac"],
- ["eba1a2", "e18485e185a9e186ad"],
- ["eba1a2", "eba19ce186ad"],
- ["eba1a3", "e18485e185a9e186ae"],
- ["eba1a3", "eba19ce186ae"],
- ["eba1a4", "e18485e185a9e186af"],
- ["eba1a4", "eba19ce186af"],
- ["eba1a5", "e18485e185a9e186b0"],
- ["eba1a5", "eba19ce186b0"],
- ["eba1a6", "e18485e185a9e186b1"],
- ["eba1a6", "eba19ce186b1"],
- ["eba1a7", "e18485e185a9e186b2"],
- ["eba1a7", "eba19ce186b2"],
- ["eba1a8", "e18485e185a9e186b3"],
- ["eba1a8", "eba19ce186b3"],
- ["eba1a9", "e18485e185a9e186b4"],
- ["eba1a9", "eba19ce186b4"],
- ["eba1aa", "e18485e185a9e186b5"],
- ["eba1aa", "eba19ce186b5"],
- ["eba1ab", "e18485e185a9e186b6"],
- ["eba1ab", "eba19ce186b6"],
- ["eba1ac", "e18485e185a9e186b7"],
- ["eba1ac", "eba19ce186b7"],
- ["eba1ad", "e18485e185a9e186b8"],
- ["eba1ad", "eba19ce186b8"],
- ["eba1ae", "e18485e185a9e186b9"],
- ["eba1ae", "eba19ce186b9"],
- ["eba1af", "e18485e185a9e186ba"],
- ["eba1af", "eba19ce186ba"],
- ["eba1b0", "e18485e185a9e186bb"],
- ["eba1b0", "eba19ce186bb"],
- ["eba1b1", "e18485e185a9e186bc"],
- ["eba1b1", "eba19ce186bc"],
- ["eba1b2", "e18485e185a9e186bd"],
- ["eba1b2", "eba19ce186bd"],
- ["eba1b3", "e18485e185a9e186be"],
- ["eba1b3", "eba19ce186be"],
- ["eba1b4", "e18485e185a9e186bf"],
- ["eba1b4", "eba19ce186bf"],
- ["eba1b5", "e18485e185a9e18780"],
- ["eba1b5", "eba19ce18780"],
- ["eba1b6", "e18485e185a9e18781"],
- ["eba1b6", "eba19ce18781"],
- ["eba1b7", "e18485e185a9e18782"],
- ["eba1b7", "eba19ce18782"],
- ["eba1b8", "e18485e185aa"],
- ["eba1b9", "e18485e185aae186a8"],
- ["eba1b9", "eba1b8e186a8"],
- ["eba1ba", "e18485e185aae186a9"],
- ["eba1ba", "eba1b8e186a9"],
- ["eba1bb", "e18485e185aae186aa"],
- ["eba1bb", "eba1b8e186aa"],
- ["eba1bc", "e18485e185aae186ab"],
- ["eba1bc", "eba1b8e186ab"],
- ["eba1bd", "e18485e185aae186ac"],
- ["eba1bd", "eba1b8e186ac"],
- ["eba1be", "e18485e185aae186ad"],
- ["eba1be", "eba1b8e186ad"],
- ["eba1bf", "e18485e185aae186ae"],
- ["eba1bf", "eba1b8e186ae"],
- ["eba280", "e18485e185aae186af"],
- ["eba280", "eba1b8e186af"],
- ["eba281", "e18485e185aae186b0"],
- ["eba281", "eba1b8e186b0"],
- ["eba282", "e18485e185aae186b1"],
- ["eba282", "eba1b8e186b1"],
- ["eba283", "e18485e185aae186b2"],
- ["eba283", "eba1b8e186b2"],
- ["eba284", "e18485e185aae186b3"],
- ["eba284", "eba1b8e186b3"],
- ["eba285", "e18485e185aae186b4"],
- ["eba285", "eba1b8e186b4"],
- ["eba286", "e18485e185aae186b5"],
- ["eba286", "eba1b8e186b5"],
- ["eba287", "e18485e185aae186b6"],
- ["eba287", "eba1b8e186b6"],
- ["eba288", "e18485e185aae186b7"],
- ["eba288", "eba1b8e186b7"],
- ["eba289", "e18485e185aae186b8"],
- ["eba289", "eba1b8e186b8"],
- ["eba28a", "e18485e185aae186b9"],
- ["eba28a", "eba1b8e186b9"],
- ["eba28b", "e18485e185aae186ba"],
- ["eba28b", "eba1b8e186ba"],
- ["eba28c", "e18485e185aae186bb"],
- ["eba28c", "eba1b8e186bb"],
- ["eba28d", "e18485e185aae186bc"],
- ["eba28d", "eba1b8e186bc"],
- ["eba28e", "e18485e185aae186bd"],
- ["eba28e", "eba1b8e186bd"],
- ["eba28f", "e18485e185aae186be"],
- ["eba28f", "eba1b8e186be"],
- ["eba290", "e18485e185aae186bf"],
- ["eba290", "eba1b8e186bf"],
- ["eba291", "e18485e185aae18780"],
- ["eba291", "eba1b8e18780"],
- ["eba292", "e18485e185aae18781"],
- ["eba292", "eba1b8e18781"],
- ["eba293", "e18485e185aae18782"],
- ["eba293", "eba1b8e18782"],
- ["eba294", "e18485e185ab"],
- ["eba295", "e18485e185abe186a8"],
- ["eba295", "eba294e186a8"],
- ["eba296", "e18485e185abe186a9"],
- ["eba296", "eba294e186a9"],
- ["eba297", "e18485e185abe186aa"],
- ["eba297", "eba294e186aa"],
- ["eba298", "e18485e185abe186ab"],
- ["eba298", "eba294e186ab"],
- ["eba299", "e18485e185abe186ac"],
- ["eba299", "eba294e186ac"],
- ["eba29a", "e18485e185abe186ad"],
- ["eba29a", "eba294e186ad"],
- ["eba29b", "e18485e185abe186ae"],
- ["eba29b", "eba294e186ae"],
- ["eba29c", "e18485e185abe186af"],
- ["eba29c", "eba294e186af"],
- ["eba29d", "e18485e185abe186b0"],
- ["eba29d", "eba294e186b0"],
- ["eba29e", "e18485e185abe186b1"],
- ["eba29e", "eba294e186b1"],
- ["eba29f", "e18485e185abe186b2"],
- ["eba29f", "eba294e186b2"],
- ["eba2a0", "e18485e185abe186b3"],
- ["eba2a0", "eba294e186b3"],
- ["eba2a1", "e18485e185abe186b4"],
- ["eba2a1", "eba294e186b4"],
- ["eba2a2", "e18485e185abe186b5"],
- ["eba2a2", "eba294e186b5"],
- ["eba2a3", "e18485e185abe186b6"],
- ["eba2a3", "eba294e186b6"],
- ["eba2a4", "e18485e185abe186b7"],
- ["eba2a4", "eba294e186b7"],
- ["eba2a5", "e18485e185abe186b8"],
- ["eba2a5", "eba294e186b8"],
- ["eba2a6", "e18485e185abe186b9"],
- ["eba2a6", "eba294e186b9"],
- ["eba2a7", "e18485e185abe186ba"],
- ["eba2a7", "eba294e186ba"],
- ["eba2a8", "e18485e185abe186bb"],
- ["eba2a8", "eba294e186bb"],
- ["eba2a9", "e18485e185abe186bc"],
- ["eba2a9", "eba294e186bc"],
- ["eba2aa", "e18485e185abe186bd"],
- ["eba2aa", "eba294e186bd"],
- ["eba2ab", "e18485e185abe186be"],
- ["eba2ab", "eba294e186be"],
- ["eba2ac", "e18485e185abe186bf"],
- ["eba2ac", "eba294e186bf"],
- ["eba2ad", "e18485e185abe18780"],
- ["eba2ad", "eba294e18780"],
- ["eba2ae", "e18485e185abe18781"],
- ["eba2ae", "eba294e18781"],
- ["eba2af", "e18485e185abe18782"],
- ["eba2af", "eba294e18782"],
- ["eba2b0", "e18485e185ac"],
- ["eba2b1", "e18485e185ace186a8"],
- ["eba2b1", "eba2b0e186a8"],
- ["eba2b2", "e18485e185ace186a9"],
- ["eba2b2", "eba2b0e186a9"],
- ["eba2b3", "e18485e185ace186aa"],
- ["eba2b3", "eba2b0e186aa"],
- ["eba2b4", "e18485e185ace186ab"],
- ["eba2b4", "eba2b0e186ab"],
- ["eba2b5", "e18485e185ace186ac"],
- ["eba2b5", "eba2b0e186ac"],
- ["eba2b6", "e18485e185ace186ad"],
- ["eba2b6", "eba2b0e186ad"],
- ["eba2b7", "e18485e185ace186ae"],
- ["eba2b7", "eba2b0e186ae"],
- ["eba2b8", "e18485e185ace186af"],
- ["eba2b8", "eba2b0e186af"],
- ["eba2b9", "e18485e185ace186b0"],
- ["eba2b9", "eba2b0e186b0"],
- ["eba2ba", "e18485e185ace186b1"],
- ["eba2ba", "eba2b0e186b1"],
- ["eba2bb", "e18485e185ace186b2"],
- ["eba2bb", "eba2b0e186b2"],
- ["eba2bc", "e18485e185ace186b3"],
- ["eba2bc", "eba2b0e186b3"],
- ["eba2bd", "e18485e185ace186b4"],
- ["eba2bd", "eba2b0e186b4"],
- ["eba2be", "e18485e185ace186b5"],
- ["eba2be", "eba2b0e186b5"],
- ["eba2bf", "e18485e185ace186b6"],
- ["eba2bf", "eba2b0e186b6"],
- ["eba380", "e18485e185ace186b7"],
- ["eba380", "eba2b0e186b7"],
- ["eba381", "e18485e185ace186b8"],
- ["eba381", "eba2b0e186b8"],
- ["eba382", "e18485e185ace186b9"],
- ["eba382", "eba2b0e186b9"],
- ["eba383", "e18485e185ace186ba"],
- ["eba383", "eba2b0e186ba"],
- ["eba384", "e18485e185ace186bb"],
- ["eba384", "eba2b0e186bb"],
- ["eba385", "e18485e185ace186bc"],
- ["eba385", "eba2b0e186bc"],
- ["eba386", "e18485e185ace186bd"],
- ["eba386", "eba2b0e186bd"],
- ["eba387", "e18485e185ace186be"],
- ["eba387", "eba2b0e186be"],
- ["eba388", "e18485e185ace186bf"],
- ["eba388", "eba2b0e186bf"],
- ["eba389", "e18485e185ace18780"],
- ["eba389", "eba2b0e18780"],
- ["eba38a", "e18485e185ace18781"],
- ["eba38a", "eba2b0e18781"],
- ["eba38b", "e18485e185ace18782"],
- ["eba38b", "eba2b0e18782"],
- ["eba38c", "e18485e185ad"],
- ["eba38d", "e18485e185ade186a8"],
- ["eba38d", "eba38ce186a8"],
- ["eba38e", "e18485e185ade186a9"],
- ["eba38e", "eba38ce186a9"],
- ["eba38f", "e18485e185ade186aa"],
- ["eba38f", "eba38ce186aa"],
- ["eba390", "e18485e185ade186ab"],
- ["eba390", "eba38ce186ab"],
- ["eba391", "e18485e185ade186ac"],
- ["eba391", "eba38ce186ac"],
- ["eba392", "e18485e185ade186ad"],
- ["eba392", "eba38ce186ad"],
- ["eba393", "e18485e185ade186ae"],
- ["eba393", "eba38ce186ae"],
- ["eba394", "e18485e185ade186af"],
- ["eba394", "eba38ce186af"],
- ["eba395", "e18485e185ade186b0"],
- ["eba395", "eba38ce186b0"],
- ["eba396", "e18485e185ade186b1"],
- ["eba396", "eba38ce186b1"],
- ["eba397", "e18485e185ade186b2"],
- ["eba397", "eba38ce186b2"],
- ["eba398", "e18485e185ade186b3"],
- ["eba398", "eba38ce186b3"],
- ["eba399", "e18485e185ade186b4"],
- ["eba399", "eba38ce186b4"],
- ["eba39a", "e18485e185ade186b5"],
- ["eba39a", "eba38ce186b5"],
- ["eba39b", "e18485e185ade186b6"],
- ["eba39b", "eba38ce186b6"],
- ["eba39c", "e18485e185ade186b7"],
- ["eba39c", "eba38ce186b7"],
- ["eba39d", "e18485e185ade186b8"],
- ["eba39d", "eba38ce186b8"],
- ["eba39e", "e18485e185ade186b9"],
- ["eba39e", "eba38ce186b9"],
- ["eba39f", "e18485e185ade186ba"],
- ["eba39f", "eba38ce186ba"],
- ["eba3a0", "e18485e185ade186bb"],
- ["eba3a0", "eba38ce186bb"],
- ["eba3a1", "e18485e185ade186bc"],
- ["eba3a1", "eba38ce186bc"],
- ["eba3a2", "e18485e185ade186bd"],
- ["eba3a2", "eba38ce186bd"],
- ["eba3a3", "e18485e185ade186be"],
- ["eba3a3", "eba38ce186be"],
- ["eba3a4", "e18485e185ade186bf"],
- ["eba3a4", "eba38ce186bf"],
- ["eba3a5", "e18485e185ade18780"],
- ["eba3a5", "eba38ce18780"],
- ["eba3a6", "e18485e185ade18781"],
- ["eba3a6", "eba38ce18781"],
- ["eba3a7", "e18485e185ade18782"],
- ["eba3a7", "eba38ce18782"],
- ["eba3a8", "e18485e185ae"],
- ["eba3a9", "e18485e185aee186a8"],
- ["eba3a9", "eba3a8e186a8"],
- ["eba3aa", "e18485e185aee186a9"],
- ["eba3aa", "eba3a8e186a9"],
- ["eba3ab", "e18485e185aee186aa"],
- ["eba3ab", "eba3a8e186aa"],
- ["eba3ac", "e18485e185aee186ab"],
- ["eba3ac", "eba3a8e186ab"],
- ["eba3ad", "e18485e185aee186ac"],
- ["eba3ad", "eba3a8e186ac"],
- ["eba3ae", "e18485e185aee186ad"],
- ["eba3ae", "eba3a8e186ad"],
- ["eba3af", "e18485e185aee186ae"],
- ["eba3af", "eba3a8e186ae"],
- ["eba3b0", "e18485e185aee186af"],
- ["eba3b0", "eba3a8e186af"],
- ["eba3b1", "e18485e185aee186b0"],
- ["eba3b1", "eba3a8e186b0"],
- ["eba3b2", "e18485e185aee186b1"],
- ["eba3b2", "eba3a8e186b1"],
- ["eba3b3", "e18485e185aee186b2"],
- ["eba3b3", "eba3a8e186b2"],
- ["eba3b4", "e18485e185aee186b3"],
- ["eba3b4", "eba3a8e186b3"],
- ["eba3b5", "e18485e185aee186b4"],
- ["eba3b5", "eba3a8e186b4"],
- ["eba3b6", "e18485e185aee186b5"],
- ["eba3b6", "eba3a8e186b5"],
- ["eba3b7", "e18485e185aee186b6"],
- ["eba3b7", "eba3a8e186b6"],
- ["eba3b8", "e18485e185aee186b7"],
- ["eba3b8", "eba3a8e186b7"],
- ["eba3b9", "e18485e185aee186b8"],
- ["eba3b9", "eba3a8e186b8"],
- ["eba3ba", "e18485e185aee186b9"],
- ["eba3ba", "eba3a8e186b9"],
- ["eba3bb", "e18485e185aee186ba"],
- ["eba3bb", "eba3a8e186ba"],
- ["eba3bc", "e18485e185aee186bb"],
- ["eba3bc", "eba3a8e186bb"],
- ["eba3bd", "e18485e185aee186bc"],
- ["eba3bd", "eba3a8e186bc"],
- ["eba3be", "e18485e185aee186bd"],
- ["eba3be", "eba3a8e186bd"],
- ["eba3bf", "e18485e185aee186be"],
- ["eba3bf", "eba3a8e186be"],
- ["eba480", "e18485e185aee186bf"],
- ["eba480", "eba3a8e186bf"],
- ["eba481", "e18485e185aee18780"],
- ["eba481", "eba3a8e18780"],
- ["eba482", "e18485e185aee18781"],
- ["eba482", "eba3a8e18781"],
- ["eba483", "e18485e185aee18782"],
- ["eba483", "eba3a8e18782"],
- ["eba484", "e18485e185af"],
- ["eba485", "e18485e185afe186a8"],
- ["eba485", "eba484e186a8"],
- ["eba486", "e18485e185afe186a9"],
- ["eba486", "eba484e186a9"],
- ["eba487", "e18485e185afe186aa"],
- ["eba487", "eba484e186aa"],
- ["eba488", "e18485e185afe186ab"],
- ["eba488", "eba484e186ab"],
- ["eba489", "e18485e185afe186ac"],
- ["eba489", "eba484e186ac"],
- ["eba48a", "e18485e185afe186ad"],
- ["eba48a", "eba484e186ad"],
- ["eba48b", "e18485e185afe186ae"],
- ["eba48b", "eba484e186ae"],
- ["eba48c", "e18485e185afe186af"],
- ["eba48c", "eba484e186af"],
- ["eba48d", "e18485e185afe186b0"],
- ["eba48d", "eba484e186b0"],
- ["eba48e", "e18485e185afe186b1"],
- ["eba48e", "eba484e186b1"],
- ["eba48f", "e18485e185afe186b2"],
- ["eba48f", "eba484e186b2"],
- ["eba490", "e18485e185afe186b3"],
- ["eba490", "eba484e186b3"],
- ["eba491", "e18485e185afe186b4"],
- ["eba491", "eba484e186b4"],
- ["eba492", "e18485e185afe186b5"],
- ["eba492", "eba484e186b5"],
- ["eba493", "e18485e185afe186b6"],
- ["eba493", "eba484e186b6"],
- ["eba494", "e18485e185afe186b7"],
- ["eba494", "eba484e186b7"],
- ["eba495", "e18485e185afe186b8"],
- ["eba495", "eba484e186b8"],
- ["eba496", "e18485e185afe186b9"],
- ["eba496", "eba484e186b9"],
- ["eba497", "e18485e185afe186ba"],
- ["eba497", "eba484e186ba"],
- ["eba498", "e18485e185afe186bb"],
- ["eba498", "eba484e186bb"],
- ["eba499", "e18485e185afe186bc"],
- ["eba499", "eba484e186bc"],
- ["eba49a", "e18485e185afe186bd"],
- ["eba49a", "eba484e186bd"],
- ["eba49b", "e18485e185afe186be"],
- ["eba49b", "eba484e186be"],
- ["eba49c", "e18485e185afe186bf"],
- ["eba49c", "eba484e186bf"],
- ["eba49d", "e18485e185afe18780"],
- ["eba49d", "eba484e18780"],
- ["eba49e", "e18485e185afe18781"],
- ["eba49e", "eba484e18781"],
- ["eba49f", "e18485e185afe18782"],
- ["eba49f", "eba484e18782"],
- ["eba4a0", "e18485e185b0"],
- ["eba4a1", "e18485e185b0e186a8"],
- ["eba4a1", "eba4a0e186a8"],
- ["eba4a2", "e18485e185b0e186a9"],
- ["eba4a2", "eba4a0e186a9"],
- ["eba4a3", "e18485e185b0e186aa"],
- ["eba4a3", "eba4a0e186aa"],
- ["eba4a4", "e18485e185b0e186ab"],
- ["eba4a4", "eba4a0e186ab"],
- ["eba4a5", "e18485e185b0e186ac"],
- ["eba4a5", "eba4a0e186ac"],
- ["eba4a6", "e18485e185b0e186ad"],
- ["eba4a6", "eba4a0e186ad"],
- ["eba4a7", "e18485e185b0e186ae"],
- ["eba4a7", "eba4a0e186ae"],
- ["eba4a8", "e18485e185b0e186af"],
- ["eba4a8", "eba4a0e186af"],
- ["eba4a9", "e18485e185b0e186b0"],
- ["eba4a9", "eba4a0e186b0"],
- ["eba4aa", "e18485e185b0e186b1"],
- ["eba4aa", "eba4a0e186b1"],
- ["eba4ab", "e18485e185b0e186b2"],
- ["eba4ab", "eba4a0e186b2"],
- ["eba4ac", "e18485e185b0e186b3"],
- ["eba4ac", "eba4a0e186b3"],
- ["eba4ad", "e18485e185b0e186b4"],
- ["eba4ad", "eba4a0e186b4"],
- ["eba4ae", "e18485e185b0e186b5"],
- ["eba4ae", "eba4a0e186b5"],
- ["eba4af", "e18485e185b0e186b6"],
- ["eba4af", "eba4a0e186b6"],
- ["eba4b0", "e18485e185b0e186b7"],
- ["eba4b0", "eba4a0e186b7"],
- ["eba4b1", "e18485e185b0e186b8"],
- ["eba4b1", "eba4a0e186b8"],
- ["eba4b2", "e18485e185b0e186b9"],
- ["eba4b2", "eba4a0e186b9"],
- ["eba4b3", "e18485e185b0e186ba"],
- ["eba4b3", "eba4a0e186ba"],
- ["eba4b4", "e18485e185b0e186bb"],
- ["eba4b4", "eba4a0e186bb"],
- ["eba4b5", "e18485e185b0e186bc"],
- ["eba4b5", "eba4a0e186bc"],
- ["eba4b6", "e18485e185b0e186bd"],
- ["eba4b6", "eba4a0e186bd"],
- ["eba4b7", "e18485e185b0e186be"],
- ["eba4b7", "eba4a0e186be"],
- ["eba4b8", "e18485e185b0e186bf"],
- ["eba4b8", "eba4a0e186bf"],
- ["eba4b9", "e18485e185b0e18780"],
- ["eba4b9", "eba4a0e18780"],
- ["eba4ba", "e18485e185b0e18781"],
- ["eba4ba", "eba4a0e18781"],
- ["eba4bb", "e18485e185b0e18782"],
- ["eba4bb", "eba4a0e18782"],
- ["eba4bc", "e18485e185b1"],
- ["eba4bd", "e18485e185b1e186a8"],
- ["eba4bd", "eba4bce186a8"],
- ["eba4be", "e18485e185b1e186a9"],
- ["eba4be", "eba4bce186a9"],
- ["eba4bf", "e18485e185b1e186aa"],
- ["eba4bf", "eba4bce186aa"],
- ["eba580", "e18485e185b1e186ab"],
- ["eba580", "eba4bce186ab"],
- ["eba581", "e18485e185b1e186ac"],
- ["eba581", "eba4bce186ac"],
- ["eba582", "e18485e185b1e186ad"],
- ["eba582", "eba4bce186ad"],
- ["eba583", "e18485e185b1e186ae"],
- ["eba583", "eba4bce186ae"],
- ["eba584", "e18485e185b1e186af"],
- ["eba584", "eba4bce186af"],
- ["eba585", "e18485e185b1e186b0"],
- ["eba585", "eba4bce186b0"],
- ["eba586", "e18485e185b1e186b1"],
- ["eba586", "eba4bce186b1"],
- ["eba587", "e18485e185b1e186b2"],
- ["eba587", "eba4bce186b2"],
- ["eba588", "e18485e185b1e186b3"],
- ["eba588", "eba4bce186b3"],
- ["eba589", "e18485e185b1e186b4"],
- ["eba589", "eba4bce186b4"],
- ["eba58a", "e18485e185b1e186b5"],
- ["eba58a", "eba4bce186b5"],
- ["eba58b", "e18485e185b1e186b6"],
- ["eba58b", "eba4bce186b6"],
- ["eba58c", "e18485e185b1e186b7"],
- ["eba58c", "eba4bce186b7"],
- ["eba58d", "e18485e185b1e186b8"],
- ["eba58d", "eba4bce186b8"],
- ["eba58e", "e18485e185b1e186b9"],
- ["eba58e", "eba4bce186b9"],
- ["eba58f", "e18485e185b1e186ba"],
- ["eba58f", "eba4bce186ba"],
- ["eba590", "e18485e185b1e186bb"],
- ["eba590", "eba4bce186bb"],
- ["eba591", "e18485e185b1e186bc"],
- ["eba591", "eba4bce186bc"],
- ["eba592", "e18485e185b1e186bd"],
- ["eba592", "eba4bce186bd"],
- ["eba593", "e18485e185b1e186be"],
- ["eba593", "eba4bce186be"],
- ["eba594", "e18485e185b1e186bf"],
- ["eba594", "eba4bce186bf"],
- ["eba595", "e18485e185b1e18780"],
- ["eba595", "eba4bce18780"],
- ["eba596", "e18485e185b1e18781"],
- ["eba596", "eba4bce18781"],
- ["eba597", "e18485e185b1e18782"],
- ["eba597", "eba4bce18782"],
- ["eba598", "e18485e185b2"],
- ["eba599", "e18485e185b2e186a8"],
- ["eba599", "eba598e186a8"],
- ["eba59a", "e18485e185b2e186a9"],
- ["eba59a", "eba598e186a9"],
- ["eba59b", "e18485e185b2e186aa"],
- ["eba59b", "eba598e186aa"],
- ["eba59c", "e18485e185b2e186ab"],
- ["eba59c", "eba598e186ab"],
- ["eba59d", "e18485e185b2e186ac"],
- ["eba59d", "eba598e186ac"],
- ["eba59e", "e18485e185b2e186ad"],
- ["eba59e", "eba598e186ad"],
- ["eba59f", "e18485e185b2e186ae"],
- ["eba59f", "eba598e186ae"],
- ["eba5a0", "e18485e185b2e186af"],
- ["eba5a0", "eba598e186af"],
- ["eba5a1", "e18485e185b2e186b0"],
- ["eba5a1", "eba598e186b0"],
- ["eba5a2", "e18485e185b2e186b1"],
- ["eba5a2", "eba598e186b1"],
- ["eba5a3", "e18485e185b2e186b2"],
- ["eba5a3", "eba598e186b2"],
- ["eba5a4", "e18485e185b2e186b3"],
- ["eba5a4", "eba598e186b3"],
- ["eba5a5", "e18485e185b2e186b4"],
- ["eba5a5", "eba598e186b4"],
- ["eba5a6", "e18485e185b2e186b5"],
- ["eba5a6", "eba598e186b5"],
- ["eba5a7", "e18485e185b2e186b6"],
- ["eba5a7", "eba598e186b6"],
- ["eba5a8", "e18485e185b2e186b7"],
- ["eba5a8", "eba598e186b7"],
- ["eba5a9", "e18485e185b2e186b8"],
- ["eba5a9", "eba598e186b8"],
- ["eba5aa", "e18485e185b2e186b9"],
- ["eba5aa", "eba598e186b9"],
- ["eba5ab", "e18485e185b2e186ba"],
- ["eba5ab", "eba598e186ba"],
- ["eba5ac", "e18485e185b2e186bb"],
- ["eba5ac", "eba598e186bb"],
- ["eba5ad", "e18485e185b2e186bc"],
- ["eba5ad", "eba598e186bc"],
- ["eba5ae", "e18485e185b2e186bd"],
- ["eba5ae", "eba598e186bd"],
- ["eba5af", "e18485e185b2e186be"],
- ["eba5af", "eba598e186be"],
- ["eba5b0", "e18485e185b2e186bf"],
- ["eba5b0", "eba598e186bf"],
- ["eba5b1", "e18485e185b2e18780"],
- ["eba5b1", "eba598e18780"],
- ["eba5b2", "e18485e185b2e18781"],
- ["eba5b2", "eba598e18781"],
- ["eba5b3", "e18485e185b2e18782"],
- ["eba5b3", "eba598e18782"],
- ["eba5b4", "e18485e185b3"],
- ["eba5b5", "e18485e185b3e186a8"],
- ["eba5b5", "eba5b4e186a8"],
- ["eba5b6", "e18485e185b3e186a9"],
- ["eba5b6", "eba5b4e186a9"],
- ["eba5b7", "e18485e185b3e186aa"],
- ["eba5b7", "eba5b4e186aa"],
- ["eba5b8", "e18485e185b3e186ab"],
- ["eba5b8", "eba5b4e186ab"],
- ["eba5b9", "e18485e185b3e186ac"],
- ["eba5b9", "eba5b4e186ac"],
- ["eba5ba", "e18485e185b3e186ad"],
- ["eba5ba", "eba5b4e186ad"],
- ["eba5bb", "e18485e185b3e186ae"],
- ["eba5bb", "eba5b4e186ae"],
- ["eba5bc", "e18485e185b3e186af"],
- ["eba5bc", "eba5b4e186af"],
- ["eba5bd", "e18485e185b3e186b0"],
- ["eba5bd", "eba5b4e186b0"],
- ["eba5be", "e18485e185b3e186b1"],
- ["eba5be", "eba5b4e186b1"],
- ["eba5bf", "e18485e185b3e186b2"],
- ["eba5bf", "eba5b4e186b2"],
- ["eba680", "e18485e185b3e186b3"],
- ["eba680", "eba5b4e186b3"],
- ["eba681", "e18485e185b3e186b4"],
- ["eba681", "eba5b4e186b4"],
- ["eba682", "e18485e185b3e186b5"],
- ["eba682", "eba5b4e186b5"],
- ["eba683", "e18485e185b3e186b6"],
- ["eba683", "eba5b4e186b6"],
- ["eba684", "e18485e185b3e186b7"],
- ["eba684", "eba5b4e186b7"],
- ["eba685", "e18485e185b3e186b8"],
- ["eba685", "eba5b4e186b8"],
- ["eba686", "e18485e185b3e186b9"],
- ["eba686", "eba5b4e186b9"],
- ["eba687", "e18485e185b3e186ba"],
- ["eba687", "eba5b4e186ba"],
- ["eba688", "e18485e185b3e186bb"],
- ["eba688", "eba5b4e186bb"],
- ["eba689", "e18485e185b3e186bc"],
- ["eba689", "eba5b4e186bc"],
- ["eba68a", "e18485e185b3e186bd"],
- ["eba68a", "eba5b4e186bd"],
- ["eba68b", "e18485e185b3e186be"],
- ["eba68b", "eba5b4e186be"],
- ["eba68c", "e18485e185b3e186bf"],
- ["eba68c", "eba5b4e186bf"],
- ["eba68d", "e18485e185b3e18780"],
- ["eba68d", "eba5b4e18780"],
- ["eba68e", "e18485e185b3e18781"],
- ["eba68e", "eba5b4e18781"],
- ["eba68f", "e18485e185b3e18782"],
- ["eba68f", "eba5b4e18782"],
- ["eba690", "e18485e185b4"],
- ["eba691", "e18485e185b4e186a8"],
- ["eba691", "eba690e186a8"],
- ["eba692", "e18485e185b4e186a9"],
- ["eba692", "eba690e186a9"],
- ["eba693", "e18485e185b4e186aa"],
- ["eba693", "eba690e186aa"],
- ["eba694", "e18485e185b4e186ab"],
- ["eba694", "eba690e186ab"],
- ["eba695", "e18485e185b4e186ac"],
- ["eba695", "eba690e186ac"],
- ["eba696", "e18485e185b4e186ad"],
- ["eba696", "eba690e186ad"],
- ["eba697", "e18485e185b4e186ae"],
- ["eba697", "eba690e186ae"],
- ["eba698", "e18485e185b4e186af"],
- ["eba698", "eba690e186af"],
- ["eba699", "e18485e185b4e186b0"],
- ["eba699", "eba690e186b0"],
- ["eba69a", "e18485e185b4e186b1"],
- ["eba69a", "eba690e186b1"],
- ["eba69b", "e18485e185b4e186b2"],
- ["eba69b", "eba690e186b2"],
- ["eba69c", "e18485e185b4e186b3"],
- ["eba69c", "eba690e186b3"],
- ["eba69d", "e18485e185b4e186b4"],
- ["eba69d", "eba690e186b4"],
- ["eba69e", "e18485e185b4e186b5"],
- ["eba69e", "eba690e186b5"],
- ["eba69f", "e18485e185b4e186b6"],
- ["eba69f", "eba690e186b6"],
- ["eba6a0", "e18485e185b4e186b7"],
- ["eba6a0", "eba690e186b7"],
- ["eba6a1", "e18485e185b4e186b8"],
- ["eba6a1", "eba690e186b8"],
- ["eba6a2", "e18485e185b4e186b9"],
- ["eba6a2", "eba690e186b9"],
- ["eba6a3", "e18485e185b4e186ba"],
- ["eba6a3", "eba690e186ba"],
- ["eba6a4", "e18485e185b4e186bb"],
- ["eba6a4", "eba690e186bb"],
- ["eba6a5", "e18485e185b4e186bc"],
- ["eba6a5", "eba690e186bc"],
- ["eba6a6", "e18485e185b4e186bd"],
- ["eba6a6", "eba690e186bd"],
- ["eba6a7", "e18485e185b4e186be"],
- ["eba6a7", "eba690e186be"],
- ["eba6a8", "e18485e185b4e186bf"],
- ["eba6a8", "eba690e186bf"],
- ["eba6a9", "e18485e185b4e18780"],
- ["eba6a9", "eba690e18780"],
- ["eba6aa", "e18485e185b4e18781"],
- ["eba6aa", "eba690e18781"],
- ["eba6ab", "e18485e185b4e18782"],
- ["eba6ab", "eba690e18782"],
- ["eba6ac", "e18485e185b5"],
- ["eba6ad", "e18485e185b5e186a8"],
- ["eba6ad", "eba6ace186a8"],
- ["eba6ae", "e18485e185b5e186a9"],
- ["eba6ae", "eba6ace186a9"],
- ["eba6af", "e18485e185b5e186aa"],
- ["eba6af", "eba6ace186aa"],
- ["eba6b0", "e18485e185b5e186ab"],
- ["eba6b0", "eba6ace186ab"],
- ["eba6b1", "e18485e185b5e186ac"],
- ["eba6b1", "eba6ace186ac"],
- ["eba6b2", "e18485e185b5e186ad"],
- ["eba6b2", "eba6ace186ad"],
- ["eba6b3", "e18485e185b5e186ae"],
- ["eba6b3", "eba6ace186ae"],
- ["eba6b4", "e18485e185b5e186af"],
- ["eba6b4", "eba6ace186af"],
- ["eba6b5", "e18485e185b5e186b0"],
- ["eba6b5", "eba6ace186b0"],
- ["eba6b6", "e18485e185b5e186b1"],
- ["eba6b6", "eba6ace186b1"],
- ["eba6b7", "e18485e185b5e186b2"],
- ["eba6b7", "eba6ace186b2"],
- ["eba6b8", "e18485e185b5e186b3"],
- ["eba6b8", "eba6ace186b3"],
- ["eba6b9", "e18485e185b5e186b4"],
- ["eba6b9", "eba6ace186b4"],
- ["eba6ba", "e18485e185b5e186b5"],
- ["eba6ba", "eba6ace186b5"],
- ["eba6bb", "e18485e185b5e186b6"],
- ["eba6bb", "eba6ace186b6"],
- ["eba6bc", "e18485e185b5e186b7"],
- ["eba6bc", "eba6ace186b7"],
- ["eba6bd", "e18485e185b5e186b8"],
- ["eba6bd", "eba6ace186b8"],
- ["eba6be", "e18485e185b5e186b9"],
- ["eba6be", "eba6ace186b9"],
- ["eba6bf", "e18485e185b5e186ba"],
- ["eba6bf", "eba6ace186ba"],
- ["eba780", "e18485e185b5e186bb"],
- ["eba780", "eba6ace186bb"],
- ["eba781", "e18485e185b5e186bc"],
- ["eba781", "eba6ace186bc"],
- ["eba782", "e18485e185b5e186bd"],
- ["eba782", "eba6ace186bd"],
- ["eba783", "e18485e185b5e186be"],
- ["eba783", "eba6ace186be"],
- ["eba784", "e18485e185b5e186bf"],
- ["eba784", "eba6ace186bf"],
- ["eba785", "e18485e185b5e18780"],
- ["eba785", "eba6ace18780"],
- ["eba786", "e18485e185b5e18781"],
- ["eba786", "eba6ace18781"],
- ["eba787", "e18485e185b5e18782"],
- ["eba787", "eba6ace18782"],
- ["eba788", "e18486e185a1"],
- ["eba789", "e18486e185a1e186a8"],
- ["eba789", "eba788e186a8"],
- ["eba78a", "e18486e185a1e186a9"],
- ["eba78a", "eba788e186a9"],
- ["eba78b", "e18486e185a1e186aa"],
- ["eba78b", "eba788e186aa"],
- ["eba78c", "e18486e185a1e186ab"],
- ["eba78c", "eba788e186ab"],
- ["eba78d", "e18486e185a1e186ac"],
- ["eba78d", "eba788e186ac"],
- ["eba78e", "e18486e185a1e186ad"],
- ["eba78e", "eba788e186ad"],
- ["eba78f", "e18486e185a1e186ae"],
- ["eba78f", "eba788e186ae"],
- ["eba790", "e18486e185a1e186af"],
- ["eba790", "eba788e186af"],
- ["eba791", "e18486e185a1e186b0"],
- ["eba791", "eba788e186b0"],
- ["eba792", "e18486e185a1e186b1"],
- ["eba792", "eba788e186b1"],
- ["eba793", "e18486e185a1e186b2"],
- ["eba793", "eba788e186b2"],
- ["eba794", "e18486e185a1e186b3"],
- ["eba794", "eba788e186b3"],
- ["eba795", "e18486e185a1e186b4"],
- ["eba795", "eba788e186b4"],
- ["eba796", "e18486e185a1e186b5"],
- ["eba796", "eba788e186b5"],
- ["eba797", "e18486e185a1e186b6"],
- ["eba797", "eba788e186b6"],
- ["eba798", "e18486e185a1e186b7"],
- ["eba798", "eba788e186b7"],
- ["eba799", "e18486e185a1e186b8"],
- ["eba799", "eba788e186b8"],
- ["eba79a", "e18486e185a1e186b9"],
- ["eba79a", "eba788e186b9"],
- ["eba79b", "e18486e185a1e186ba"],
- ["eba79b", "eba788e186ba"],
- ["eba79c", "e18486e185a1e186bb"],
- ["eba79c", "eba788e186bb"],
- ["eba79d", "e18486e185a1e186bc"],
- ["eba79d", "eba788e186bc"],
- ["eba79e", "e18486e185a1e186bd"],
- ["eba79e", "eba788e186bd"],
- ["eba79f", "e18486e185a1e186be"],
- ["eba79f", "eba788e186be"],
- ["eba7a0", "e18486e185a1e186bf"],
- ["eba7a0", "eba788e186bf"],
- ["eba7a1", "e18486e185a1e18780"],
- ["eba7a1", "eba788e18780"],
- ["eba7a2", "e18486e185a1e18781"],
- ["eba7a2", "eba788e18781"],
- ["eba7a3", "e18486e185a1e18782"],
- ["eba7a3", "eba788e18782"],
- ["eba7a4", "e18486e185a2"],
- ["eba7a5", "e18486e185a2e186a8"],
- ["eba7a5", "eba7a4e186a8"],
- ["eba7a6", "e18486e185a2e186a9"],
- ["eba7a6", "eba7a4e186a9"],
- ["eba7a7", "e18486e185a2e186aa"],
- ["eba7a7", "eba7a4e186aa"],
- ["eba7a8", "e18486e185a2e186ab"],
- ["eba7a8", "eba7a4e186ab"],
- ["eba7a9", "e18486e185a2e186ac"],
- ["eba7a9", "eba7a4e186ac"],
- ["eba7aa", "e18486e185a2e186ad"],
- ["eba7aa", "eba7a4e186ad"],
- ["eba7ab", "e18486e185a2e186ae"],
- ["eba7ab", "eba7a4e186ae"],
- ["eba7ac", "e18486e185a2e186af"],
- ["eba7ac", "eba7a4e186af"],
- ["eba7ad", "e18486e185a2e186b0"],
- ["eba7ad", "eba7a4e186b0"],
- ["eba7ae", "e18486e185a2e186b1"],
- ["eba7ae", "eba7a4e186b1"],
- ["eba7af", "e18486e185a2e186b2"],
- ["eba7af", "eba7a4e186b2"],
- ["eba7b0", "e18486e185a2e186b3"],
- ["eba7b0", "eba7a4e186b3"],
- ["eba7b1", "e18486e185a2e186b4"],
- ["eba7b1", "eba7a4e186b4"],
- ["eba7b2", "e18486e185a2e186b5"],
- ["eba7b2", "eba7a4e186b5"],
- ["eba7b3", "e18486e185a2e186b6"],
- ["eba7b3", "eba7a4e186b6"],
- ["eba7b4", "e18486e185a2e186b7"],
- ["eba7b4", "eba7a4e186b7"],
- ["eba7b5", "e18486e185a2e186b8"],
- ["eba7b5", "eba7a4e186b8"],
- ["eba7b6", "e18486e185a2e186b9"],
- ["eba7b6", "eba7a4e186b9"],
- ["eba7b7", "e18486e185a2e186ba"],
- ["eba7b7", "eba7a4e186ba"],
- ["eba7b8", "e18486e185a2e186bb"],
- ["eba7b8", "eba7a4e186bb"],
- ["eba7b9", "e18486e185a2e186bc"],
- ["eba7b9", "eba7a4e186bc"],
- ["eba7ba", "e18486e185a2e186bd"],
- ["eba7ba", "eba7a4e186bd"],
- ["eba7bb", "e18486e185a2e186be"],
- ["eba7bb", "eba7a4e186be"],
- ["eba7bc", "e18486e185a2e186bf"],
- ["eba7bc", "eba7a4e186bf"],
- ["eba7bd", "e18486e185a2e18780"],
- ["eba7bd", "eba7a4e18780"],
- ["eba7be", "e18486e185a2e18781"],
- ["eba7be", "eba7a4e18781"],
- ["eba7bf", "e18486e185a2e18782"],
- ["eba7bf", "eba7a4e18782"],
- ["eba880", "e18486e185a3"],
- ["eba881", "e18486e185a3e186a8"],
- ["eba881", "eba880e186a8"],
- ["eba882", "e18486e185a3e186a9"],
- ["eba882", "eba880e186a9"],
- ["eba883", "e18486e185a3e186aa"],
- ["eba883", "eba880e186aa"],
- ["eba884", "e18486e185a3e186ab"],
- ["eba884", "eba880e186ab"],
- ["eba885", "e18486e185a3e186ac"],
- ["eba885", "eba880e186ac"],
- ["eba886", "e18486e185a3e186ad"],
- ["eba886", "eba880e186ad"],
- ["eba887", "e18486e185a3e186ae"],
- ["eba887", "eba880e186ae"],
- ["eba888", "e18486e185a3e186af"],
- ["eba888", "eba880e186af"],
- ["eba889", "e18486e185a3e186b0"],
- ["eba889", "eba880e186b0"],
- ["eba88a", "e18486e185a3e186b1"],
- ["eba88a", "eba880e186b1"],
- ["eba88b", "e18486e185a3e186b2"],
- ["eba88b", "eba880e186b2"],
- ["eba88c", "e18486e185a3e186b3"],
- ["eba88c", "eba880e186b3"],
- ["eba88d", "e18486e185a3e186b4"],
- ["eba88d", "eba880e186b4"],
- ["eba88e", "e18486e185a3e186b5"],
- ["eba88e", "eba880e186b5"],
- ["eba88f", "e18486e185a3e186b6"],
- ["eba88f", "eba880e186b6"],
- ["eba890", "e18486e185a3e186b7"],
- ["eba890", "eba880e186b7"],
- ["eba891", "e18486e185a3e186b8"],
- ["eba891", "eba880e186b8"],
- ["eba892", "e18486e185a3e186b9"],
- ["eba892", "eba880e186b9"],
- ["eba893", "e18486e185a3e186ba"],
- ["eba893", "eba880e186ba"],
- ["eba894", "e18486e185a3e186bb"],
- ["eba894", "eba880e186bb"],
- ["eba895", "e18486e185a3e186bc"],
- ["eba895", "eba880e186bc"],
- ["eba896", "e18486e185a3e186bd"],
- ["eba896", "eba880e186bd"],
- ["eba897", "e18486e185a3e186be"],
- ["eba897", "eba880e186be"],
- ["eba898", "e18486e185a3e186bf"],
- ["eba898", "eba880e186bf"],
- ["eba899", "e18486e185a3e18780"],
- ["eba899", "eba880e18780"],
- ["eba89a", "e18486e185a3e18781"],
- ["eba89a", "eba880e18781"],
- ["eba89b", "e18486e185a3e18782"],
- ["eba89b", "eba880e18782"],
- ["eba89c", "e18486e185a4"],
- ["eba89d", "e18486e185a4e186a8"],
- ["eba89d", "eba89ce186a8"],
- ["eba89e", "e18486e185a4e186a9"],
- ["eba89e", "eba89ce186a9"],
- ["eba89f", "e18486e185a4e186aa"],
- ["eba89f", "eba89ce186aa"],
- ["eba8a0", "e18486e185a4e186ab"],
- ["eba8a0", "eba89ce186ab"],
- ["eba8a1", "e18486e185a4e186ac"],
- ["eba8a1", "eba89ce186ac"],
- ["eba8a2", "e18486e185a4e186ad"],
- ["eba8a2", "eba89ce186ad"],
- ["eba8a3", "e18486e185a4e186ae"],
- ["eba8a3", "eba89ce186ae"],
- ["eba8a4", "e18486e185a4e186af"],
- ["eba8a4", "eba89ce186af"],
- ["eba8a5", "e18486e185a4e186b0"],
- ["eba8a5", "eba89ce186b0"],
- ["eba8a6", "e18486e185a4e186b1"],
- ["eba8a6", "eba89ce186b1"],
- ["eba8a7", "e18486e185a4e186b2"],
- ["eba8a7", "eba89ce186b2"],
- ["eba8a8", "e18486e185a4e186b3"],
- ["eba8a8", "eba89ce186b3"],
- ["eba8a9", "e18486e185a4e186b4"],
- ["eba8a9", "eba89ce186b4"],
- ["eba8aa", "e18486e185a4e186b5"],
- ["eba8aa", "eba89ce186b5"],
- ["eba8ab", "e18486e185a4e186b6"],
- ["eba8ab", "eba89ce186b6"],
- ["eba8ac", "e18486e185a4e186b7"],
- ["eba8ac", "eba89ce186b7"],
- ["eba8ad", "e18486e185a4e186b8"],
- ["eba8ad", "eba89ce186b8"],
- ["eba8ae", "e18486e185a4e186b9"],
- ["eba8ae", "eba89ce186b9"],
- ["eba8af", "e18486e185a4e186ba"],
- ["eba8af", "eba89ce186ba"],
- ["eba8b0", "e18486e185a4e186bb"],
- ["eba8b0", "eba89ce186bb"],
- ["eba8b1", "e18486e185a4e186bc"],
- ["eba8b1", "eba89ce186bc"],
- ["eba8b2", "e18486e185a4e186bd"],
- ["eba8b2", "eba89ce186bd"],
- ["eba8b3", "e18486e185a4e186be"],
- ["eba8b3", "eba89ce186be"],
- ["eba8b4", "e18486e185a4e186bf"],
- ["eba8b4", "eba89ce186bf"],
- ["eba8b5", "e18486e185a4e18780"],
- ["eba8b5", "eba89ce18780"],
- ["eba8b6", "e18486e185a4e18781"],
- ["eba8b6", "eba89ce18781"],
- ["eba8b7", "e18486e185a4e18782"],
- ["eba8b7", "eba89ce18782"],
- ["eba8b8", "e18486e185a5"],
- ["eba8b9", "e18486e185a5e186a8"],
- ["eba8b9", "eba8b8e186a8"],
- ["eba8ba", "e18486e185a5e186a9"],
- ["eba8ba", "eba8b8e186a9"],
- ["eba8bb", "e18486e185a5e186aa"],
- ["eba8bb", "eba8b8e186aa"],
- ["eba8bc", "e18486e185a5e186ab"],
- ["eba8bc", "eba8b8e186ab"],
- ["eba8bd", "e18486e185a5e186ac"],
- ["eba8bd", "eba8b8e186ac"],
- ["eba8be", "e18486e185a5e186ad"],
- ["eba8be", "eba8b8e186ad"],
- ["eba8bf", "e18486e185a5e186ae"],
- ["eba8bf", "eba8b8e186ae"],
- ["eba980", "e18486e185a5e186af"],
- ["eba980", "eba8b8e186af"],
- ["eba981", "e18486e185a5e186b0"],
- ["eba981", "eba8b8e186b0"],
- ["eba982", "e18486e185a5e186b1"],
- ["eba982", "eba8b8e186b1"],
- ["eba983", "e18486e185a5e186b2"],
- ["eba983", "eba8b8e186b2"],
- ["eba984", "e18486e185a5e186b3"],
- ["eba984", "eba8b8e186b3"],
- ["eba985", "e18486e185a5e186b4"],
- ["eba985", "eba8b8e186b4"],
- ["eba986", "e18486e185a5e186b5"],
- ["eba986", "eba8b8e186b5"],
- ["eba987", "e18486e185a5e186b6"],
- ["eba987", "eba8b8e186b6"],
- ["eba988", "e18486e185a5e186b7"],
- ["eba988", "eba8b8e186b7"],
- ["eba989", "e18486e185a5e186b8"],
- ["eba989", "eba8b8e186b8"],
- ["eba98a", "e18486e185a5e186b9"],
- ["eba98a", "eba8b8e186b9"],
- ["eba98b", "e18486e185a5e186ba"],
- ["eba98b", "eba8b8e186ba"],
- ["eba98c", "e18486e185a5e186bb"],
- ["eba98c", "eba8b8e186bb"],
- ["eba98d", "e18486e185a5e186bc"],
- ["eba98d", "eba8b8e186bc"],
- ["eba98e", "e18486e185a5e186bd"],
- ["eba98e", "eba8b8e186bd"],
- ["eba98f", "e18486e185a5e186be"],
- ["eba98f", "eba8b8e186be"],
- ["eba990", "e18486e185a5e186bf"],
- ["eba990", "eba8b8e186bf"],
- ["eba991", "e18486e185a5e18780"],
- ["eba991", "eba8b8e18780"],
- ["eba992", "e18486e185a5e18781"],
- ["eba992", "eba8b8e18781"],
- ["eba993", "e18486e185a5e18782"],
- ["eba993", "eba8b8e18782"],
- ["eba994", "e18486e185a6"],
- ["eba995", "e18486e185a6e186a8"],
- ["eba995", "eba994e186a8"],
- ["eba996", "e18486e185a6e186a9"],
- ["eba996", "eba994e186a9"],
- ["eba997", "e18486e185a6e186aa"],
- ["eba997", "eba994e186aa"],
- ["eba998", "e18486e185a6e186ab"],
- ["eba998", "eba994e186ab"],
- ["eba999", "e18486e185a6e186ac"],
- ["eba999", "eba994e186ac"],
- ["eba99a", "e18486e185a6e186ad"],
- ["eba99a", "eba994e186ad"],
- ["eba99b", "e18486e185a6e186ae"],
- ["eba99b", "eba994e186ae"],
- ["eba99c", "e18486e185a6e186af"],
- ["eba99c", "eba994e186af"],
- ["eba99d", "e18486e185a6e186b0"],
- ["eba99d", "eba994e186b0"],
- ["eba99e", "e18486e185a6e186b1"],
- ["eba99e", "eba994e186b1"],
- ["eba99f", "e18486e185a6e186b2"],
- ["eba99f", "eba994e186b2"],
- ["eba9a0", "e18486e185a6e186b3"],
- ["eba9a0", "eba994e186b3"],
- ["eba9a1", "e18486e185a6e186b4"],
- ["eba9a1", "eba994e186b4"],
- ["eba9a2", "e18486e185a6e186b5"],
- ["eba9a2", "eba994e186b5"],
- ["eba9a3", "e18486e185a6e186b6"],
- ["eba9a3", "eba994e186b6"],
- ["eba9a4", "e18486e185a6e186b7"],
- ["eba9a4", "eba994e186b7"],
- ["eba9a5", "e18486e185a6e186b8"],
- ["eba9a5", "eba994e186b8"],
- ["eba9a6", "e18486e185a6e186b9"],
- ["eba9a6", "eba994e186b9"],
- ["eba9a7", "e18486e185a6e186ba"],
- ["eba9a7", "eba994e186ba"],
- ["eba9a8", "e18486e185a6e186bb"],
- ["eba9a8", "eba994e186bb"],
- ["eba9a9", "e18486e185a6e186bc"],
- ["eba9a9", "eba994e186bc"],
- ["eba9aa", "e18486e185a6e186bd"],
- ["eba9aa", "eba994e186bd"],
- ["eba9ab", "e18486e185a6e186be"],
- ["eba9ab", "eba994e186be"],
- ["eba9ac", "e18486e185a6e186bf"],
- ["eba9ac", "eba994e186bf"],
- ["eba9ad", "e18486e185a6e18780"],
- ["eba9ad", "eba994e18780"],
- ["eba9ae", "e18486e185a6e18781"],
- ["eba9ae", "eba994e18781"],
- ["eba9af", "e18486e185a6e18782"],
- ["eba9af", "eba994e18782"],
- ["eba9b0", "e18486e185a7"],
- ["eba9b1", "e18486e185a7e186a8"],
- ["eba9b1", "eba9b0e186a8"],
- ["eba9b2", "e18486e185a7e186a9"],
- ["eba9b2", "eba9b0e186a9"],
- ["eba9b3", "e18486e185a7e186aa"],
- ["eba9b3", "eba9b0e186aa"],
- ["eba9b4", "e18486e185a7e186ab"],
- ["eba9b4", "eba9b0e186ab"],
- ["eba9b5", "e18486e185a7e186ac"],
- ["eba9b5", "eba9b0e186ac"],
- ["eba9b6", "e18486e185a7e186ad"],
- ["eba9b6", "eba9b0e186ad"],
- ["eba9b7", "e18486e185a7e186ae"],
- ["eba9b7", "eba9b0e186ae"],
- ["eba9b8", "e18486e185a7e186af"],
- ["eba9b8", "eba9b0e186af"],
- ["eba9b9", "e18486e185a7e186b0"],
- ["eba9b9", "eba9b0e186b0"],
- ["eba9ba", "e18486e185a7e186b1"],
- ["eba9ba", "eba9b0e186b1"],
- ["eba9bb", "e18486e185a7e186b2"],
- ["eba9bb", "eba9b0e186b2"],
- ["eba9bc", "e18486e185a7e186b3"],
- ["eba9bc", "eba9b0e186b3"],
- ["eba9bd", "e18486e185a7e186b4"],
- ["eba9bd", "eba9b0e186b4"],
- ["eba9be", "e18486e185a7e186b5"],
- ["eba9be", "eba9b0e186b5"],
- ["eba9bf", "e18486e185a7e186b6"],
- ["eba9bf", "eba9b0e186b6"],
- ["ebaa80", "e18486e185a7e186b7"],
- ["ebaa80", "eba9b0e186b7"],
- ["ebaa81", "e18486e185a7e186b8"],
- ["ebaa81", "eba9b0e186b8"],
- ["ebaa82", "e18486e185a7e186b9"],
- ["ebaa82", "eba9b0e186b9"],
- ["ebaa83", "e18486e185a7e186ba"],
- ["ebaa83", "eba9b0e186ba"],
- ["ebaa84", "e18486e185a7e186bb"],
- ["ebaa84", "eba9b0e186bb"],
- ["ebaa85", "e18486e185a7e186bc"],
- ["ebaa85", "eba9b0e186bc"],
- ["ebaa86", "e18486e185a7e186bd"],
- ["ebaa86", "eba9b0e186bd"],
- ["ebaa87", "e18486e185a7e186be"],
- ["ebaa87", "eba9b0e186be"],
- ["ebaa88", "e18486e185a7e186bf"],
- ["ebaa88", "eba9b0e186bf"],
- ["ebaa89", "e18486e185a7e18780"],
- ["ebaa89", "eba9b0e18780"],
- ["ebaa8a", "e18486e185a7e18781"],
- ["ebaa8a", "eba9b0e18781"],
- ["ebaa8b", "e18486e185a7e18782"],
- ["ebaa8b", "eba9b0e18782"],
- ["ebaa8c", "e18486e185a8"],
- ["ebaa8d", "e18486e185a8e186a8"],
- ["ebaa8d", "ebaa8ce186a8"],
- ["ebaa8e", "e18486e185a8e186a9"],
- ["ebaa8e", "ebaa8ce186a9"],
- ["ebaa8f", "e18486e185a8e186aa"],
- ["ebaa8f", "ebaa8ce186aa"],
- ["ebaa90", "e18486e185a8e186ab"],
- ["ebaa90", "ebaa8ce186ab"],
- ["ebaa91", "e18486e185a8e186ac"],
- ["ebaa91", "ebaa8ce186ac"],
- ["ebaa92", "e18486e185a8e186ad"],
- ["ebaa92", "ebaa8ce186ad"],
- ["ebaa93", "e18486e185a8e186ae"],
- ["ebaa93", "ebaa8ce186ae"],
- ["ebaa94", "e18486e185a8e186af"],
- ["ebaa94", "ebaa8ce186af"],
- ["ebaa95", "e18486e185a8e186b0"],
- ["ebaa95", "ebaa8ce186b0"],
- ["ebaa96", "e18486e185a8e186b1"],
- ["ebaa96", "ebaa8ce186b1"],
- ["ebaa97", "e18486e185a8e186b2"],
- ["ebaa97", "ebaa8ce186b2"],
- ["ebaa98", "e18486e185a8e186b3"],
- ["ebaa98", "ebaa8ce186b3"],
- ["ebaa99", "e18486e185a8e186b4"],
- ["ebaa99", "ebaa8ce186b4"],
- ["ebaa9a", "e18486e185a8e186b5"],
- ["ebaa9a", "ebaa8ce186b5"],
- ["ebaa9b", "e18486e185a8e186b6"],
- ["ebaa9b", "ebaa8ce186b6"],
- ["ebaa9c", "e18486e185a8e186b7"],
- ["ebaa9c", "ebaa8ce186b7"],
- ["ebaa9d", "e18486e185a8e186b8"],
- ["ebaa9d", "ebaa8ce186b8"],
- ["ebaa9e", "e18486e185a8e186b9"],
- ["ebaa9e", "ebaa8ce186b9"],
- ["ebaa9f", "e18486e185a8e186ba"],
- ["ebaa9f", "ebaa8ce186ba"],
- ["ebaaa0", "e18486e185a8e186bb"],
- ["ebaaa0", "ebaa8ce186bb"],
- ["ebaaa1", "e18486e185a8e186bc"],
- ["ebaaa1", "ebaa8ce186bc"],
- ["ebaaa2", "e18486e185a8e186bd"],
- ["ebaaa2", "ebaa8ce186bd"],
- ["ebaaa3", "e18486e185a8e186be"],
- ["ebaaa3", "ebaa8ce186be"],
- ["ebaaa4", "e18486e185a8e186bf"],
- ["ebaaa4", "ebaa8ce186bf"],
- ["ebaaa5", "e18486e185a8e18780"],
- ["ebaaa5", "ebaa8ce18780"],
- ["ebaaa6", "e18486e185a8e18781"],
- ["ebaaa6", "ebaa8ce18781"],
- ["ebaaa7", "e18486e185a8e18782"],
- ["ebaaa7", "ebaa8ce18782"],
- ["ebaaa8", "e18486e185a9"],
- ["ebaaa9", "e18486e185a9e186a8"],
- ["ebaaa9", "ebaaa8e186a8"],
- ["ebaaaa", "e18486e185a9e186a9"],
- ["ebaaaa", "ebaaa8e186a9"],
- ["ebaaab", "e18486e185a9e186aa"],
- ["ebaaab", "ebaaa8e186aa"],
- ["ebaaac", "e18486e185a9e186ab"],
- ["ebaaac", "ebaaa8e186ab"],
- ["ebaaad", "e18486e185a9e186ac"],
- ["ebaaad", "ebaaa8e186ac"],
- ["ebaaae", "e18486e185a9e186ad"],
- ["ebaaae", "ebaaa8e186ad"],
- ["ebaaaf", "e18486e185a9e186ae"],
- ["ebaaaf", "ebaaa8e186ae"],
- ["ebaab0", "e18486e185a9e186af"],
- ["ebaab0", "ebaaa8e186af"],
- ["ebaab1", "e18486e185a9e186b0"],
- ["ebaab1", "ebaaa8e186b0"],
- ["ebaab2", "e18486e185a9e186b1"],
- ["ebaab2", "ebaaa8e186b1"],
- ["ebaab3", "e18486e185a9e186b2"],
- ["ebaab3", "ebaaa8e186b2"],
- ["ebaab4", "e18486e185a9e186b3"],
- ["ebaab4", "ebaaa8e186b3"],
- ["ebaab5", "e18486e185a9e186b4"],
- ["ebaab5", "ebaaa8e186b4"],
- ["ebaab6", "e18486e185a9e186b5"],
- ["ebaab6", "ebaaa8e186b5"],
- ["ebaab7", "e18486e185a9e186b6"],
- ["ebaab7", "ebaaa8e186b6"],
- ["ebaab8", "e18486e185a9e186b7"],
- ["ebaab8", "ebaaa8e186b7"],
- ["ebaab9", "e18486e185a9e186b8"],
- ["ebaab9", "ebaaa8e186b8"],
- ["ebaaba", "e18486e185a9e186b9"],
- ["ebaaba", "ebaaa8e186b9"],
- ["ebaabb", "e18486e185a9e186ba"],
- ["ebaabb", "ebaaa8e186ba"],
- ["ebaabc", "e18486e185a9e186bb"],
- ["ebaabc", "ebaaa8e186bb"],
- ["ebaabd", "e18486e185a9e186bc"],
- ["ebaabd", "ebaaa8e186bc"],
- ["ebaabe", "e18486e185a9e186bd"],
- ["ebaabe", "ebaaa8e186bd"],
- ["ebaabf", "e18486e185a9e186be"],
- ["ebaabf", "ebaaa8e186be"],
- ["ebab80", "e18486e185a9e186bf"],
- ["ebab80", "ebaaa8e186bf"],
- ["ebab81", "e18486e185a9e18780"],
- ["ebab81", "ebaaa8e18780"],
- ["ebab82", "e18486e185a9e18781"],
- ["ebab82", "ebaaa8e18781"],
- ["ebab83", "e18486e185a9e18782"],
- ["ebab83", "ebaaa8e18782"],
- ["ebab84", "e18486e185aa"],
- ["ebab85", "e18486e185aae186a8"],
- ["ebab85", "ebab84e186a8"],
- ["ebab86", "e18486e185aae186a9"],
- ["ebab86", "ebab84e186a9"],
- ["ebab87", "e18486e185aae186aa"],
- ["ebab87", "ebab84e186aa"],
- ["ebab88", "e18486e185aae186ab"],
- ["ebab88", "ebab84e186ab"],
- ["ebab89", "e18486e185aae186ac"],
- ["ebab89", "ebab84e186ac"],
- ["ebab8a", "e18486e185aae186ad"],
- ["ebab8a", "ebab84e186ad"],
- ["ebab8b", "e18486e185aae186ae"],
- ["ebab8b", "ebab84e186ae"],
- ["ebab8c", "e18486e185aae186af"],
- ["ebab8c", "ebab84e186af"],
- ["ebab8d", "e18486e185aae186b0"],
- ["ebab8d", "ebab84e186b0"],
- ["ebab8e", "e18486e185aae186b1"],
- ["ebab8e", "ebab84e186b1"],
- ["ebab8f", "e18486e185aae186b2"],
- ["ebab8f", "ebab84e186b2"],
- ["ebab90", "e18486e185aae186b3"],
- ["ebab90", "ebab84e186b3"],
- ["ebab91", "e18486e185aae186b4"],
- ["ebab91", "ebab84e186b4"],
- ["ebab92", "e18486e185aae186b5"],
- ["ebab92", "ebab84e186b5"],
- ["ebab93", "e18486e185aae186b6"],
- ["ebab93", "ebab84e186b6"],
- ["ebab94", "e18486e185aae186b7"],
- ["ebab94", "ebab84e186b7"],
- ["ebab95", "e18486e185aae186b8"],
- ["ebab95", "ebab84e186b8"],
- ["ebab96", "e18486e185aae186b9"],
- ["ebab96", "ebab84e186b9"],
- ["ebab97", "e18486e185aae186ba"],
- ["ebab97", "ebab84e186ba"],
- ["ebab98", "e18486e185aae186bb"],
- ["ebab98", "ebab84e186bb"],
- ["ebab99", "e18486e185aae186bc"],
- ["ebab99", "ebab84e186bc"],
- ["ebab9a", "e18486e185aae186bd"],
- ["ebab9a", "ebab84e186bd"],
- ["ebab9b", "e18486e185aae186be"],
- ["ebab9b", "ebab84e186be"],
- ["ebab9c", "e18486e185aae186bf"],
- ["ebab9c", "ebab84e186bf"],
- ["ebab9d", "e18486e185aae18780"],
- ["ebab9d", "ebab84e18780"],
- ["ebab9e", "e18486e185aae18781"],
- ["ebab9e", "ebab84e18781"],
- ["ebab9f", "e18486e185aae18782"],
- ["ebab9f", "ebab84e18782"],
- ["ebaba0", "e18486e185ab"],
- ["ebaba1", "e18486e185abe186a8"],
- ["ebaba1", "ebaba0e186a8"],
- ["ebaba2", "e18486e185abe186a9"],
- ["ebaba2", "ebaba0e186a9"],
- ["ebaba3", "e18486e185abe186aa"],
- ["ebaba3", "ebaba0e186aa"],
- ["ebaba4", "e18486e185abe186ab"],
- ["ebaba4", "ebaba0e186ab"],
- ["ebaba5", "e18486e185abe186ac"],
- ["ebaba5", "ebaba0e186ac"],
- ["ebaba6", "e18486e185abe186ad"],
- ["ebaba6", "ebaba0e186ad"],
- ["ebaba7", "e18486e185abe186ae"],
- ["ebaba7", "ebaba0e186ae"],
- ["ebaba8", "e18486e185abe186af"],
- ["ebaba8", "ebaba0e186af"],
- ["ebaba9", "e18486e185abe186b0"],
- ["ebaba9", "ebaba0e186b0"],
- ["ebabaa", "e18486e185abe186b1"],
- ["ebabaa", "ebaba0e186b1"],
- ["ebabab", "e18486e185abe186b2"],
- ["ebabab", "ebaba0e186b2"],
- ["ebabac", "e18486e185abe186b3"],
- ["ebabac", "ebaba0e186b3"],
- ["ebabad", "e18486e185abe186b4"],
- ["ebabad", "ebaba0e186b4"],
- ["ebabae", "e18486e185abe186b5"],
- ["ebabae", "ebaba0e186b5"],
- ["ebabaf", "e18486e185abe186b6"],
- ["ebabaf", "ebaba0e186b6"],
- ["ebabb0", "e18486e185abe186b7"],
- ["ebabb0", "ebaba0e186b7"],
- ["ebabb1", "e18486e185abe186b8"],
- ["ebabb1", "ebaba0e186b8"],
- ["ebabb2", "e18486e185abe186b9"],
- ["ebabb2", "ebaba0e186b9"],
- ["ebabb3", "e18486e185abe186ba"],
- ["ebabb3", "ebaba0e186ba"],
- ["ebabb4", "e18486e185abe186bb"],
- ["ebabb4", "ebaba0e186bb"],
- ["ebabb5", "e18486e185abe186bc"],
- ["ebabb5", "ebaba0e186bc"],
- ["ebabb6", "e18486e185abe186bd"],
- ["ebabb6", "ebaba0e186bd"],
- ["ebabb7", "e18486e185abe186be"],
- ["ebabb7", "ebaba0e186be"],
- ["ebabb8", "e18486e185abe186bf"],
- ["ebabb8", "ebaba0e186bf"],
- ["ebabb9", "e18486e185abe18780"],
- ["ebabb9", "ebaba0e18780"],
- ["ebabba", "e18486e185abe18781"],
- ["ebabba", "ebaba0e18781"],
- ["ebabbb", "e18486e185abe18782"],
- ["ebabbb", "ebaba0e18782"],
- ["ebabbc", "e18486e185ac"],
- ["ebabbd", "e18486e185ace186a8"],
- ["ebabbd", "ebabbce186a8"],
- ["ebabbe", "e18486e185ace186a9"],
- ["ebabbe", "ebabbce186a9"],
- ["ebabbf", "e18486e185ace186aa"],
- ["ebabbf", "ebabbce186aa"],
- ["ebac80", "e18486e185ace186ab"],
- ["ebac80", "ebabbce186ab"],
- ["ebac81", "e18486e185ace186ac"],
- ["ebac81", "ebabbce186ac"],
- ["ebac82", "e18486e185ace186ad"],
- ["ebac82", "ebabbce186ad"],
- ["ebac83", "e18486e185ace186ae"],
- ["ebac83", "ebabbce186ae"],
- ["ebac84", "e18486e185ace186af"],
- ["ebac84", "ebabbce186af"],
- ["ebac85", "e18486e185ace186b0"],
- ["ebac85", "ebabbce186b0"],
- ["ebac86", "e18486e185ace186b1"],
- ["ebac86", "ebabbce186b1"],
- ["ebac87", "e18486e185ace186b2"],
- ["ebac87", "ebabbce186b2"],
- ["ebac88", "e18486e185ace186b3"],
- ["ebac88", "ebabbce186b3"],
- ["ebac89", "e18486e185ace186b4"],
- ["ebac89", "ebabbce186b4"],
- ["ebac8a", "e18486e185ace186b5"],
- ["ebac8a", "ebabbce186b5"],
- ["ebac8b", "e18486e185ace186b6"],
- ["ebac8b", "ebabbce186b6"],
- ["ebac8c", "e18486e185ace186b7"],
- ["ebac8c", "ebabbce186b7"],
- ["ebac8d", "e18486e185ace186b8"],
- ["ebac8d", "ebabbce186b8"],
- ["ebac8e", "e18486e185ace186b9"],
- ["ebac8e", "ebabbce186b9"],
- ["ebac8f", "e18486e185ace186ba"],
- ["ebac8f", "ebabbce186ba"],
- ["ebac90", "e18486e185ace186bb"],
- ["ebac90", "ebabbce186bb"],
- ["ebac91", "e18486e185ace186bc"],
- ["ebac91", "ebabbce186bc"],
- ["ebac92", "e18486e185ace186bd"],
- ["ebac92", "ebabbce186bd"],
- ["ebac93", "e18486e185ace186be"],
- ["ebac93", "ebabbce186be"],
- ["ebac94", "e18486e185ace186bf"],
- ["ebac94", "ebabbce186bf"],
- ["ebac95", "e18486e185ace18780"],
- ["ebac95", "ebabbce18780"],
- ["ebac96", "e18486e185ace18781"],
- ["ebac96", "ebabbce18781"],
- ["ebac97", "e18486e185ace18782"],
- ["ebac97", "ebabbce18782"],
- ["ebac98", "e18486e185ad"],
- ["ebac99", "e18486e185ade186a8"],
- ["ebac99", "ebac98e186a8"],
- ["ebac9a", "e18486e185ade186a9"],
- ["ebac9a", "ebac98e186a9"],
- ["ebac9b", "e18486e185ade186aa"],
- ["ebac9b", "ebac98e186aa"],
- ["ebac9c", "e18486e185ade186ab"],
- ["ebac9c", "ebac98e186ab"],
- ["ebac9d", "e18486e185ade186ac"],
- ["ebac9d", "ebac98e186ac"],
- ["ebac9e", "e18486e185ade186ad"],
- ["ebac9e", "ebac98e186ad"],
- ["ebac9f", "e18486e185ade186ae"],
- ["ebac9f", "ebac98e186ae"],
- ["ebaca0", "e18486e185ade186af"],
- ["ebaca0", "ebac98e186af"],
- ["ebaca1", "e18486e185ade186b0"],
- ["ebaca1", "ebac98e186b0"],
- ["ebaca2", "e18486e185ade186b1"],
- ["ebaca2", "ebac98e186b1"],
- ["ebaca3", "e18486e185ade186b2"],
- ["ebaca3", "ebac98e186b2"],
- ["ebaca4", "e18486e185ade186b3"],
- ["ebaca4", "ebac98e186b3"],
- ["ebaca5", "e18486e185ade186b4"],
- ["ebaca5", "ebac98e186b4"],
- ["ebaca6", "e18486e185ade186b5"],
- ["ebaca6", "ebac98e186b5"],
- ["ebaca7", "e18486e185ade186b6"],
- ["ebaca7", "ebac98e186b6"],
- ["ebaca8", "e18486e185ade186b7"],
- ["ebaca8", "ebac98e186b7"],
- ["ebaca9", "e18486e185ade186b8"],
- ["ebaca9", "ebac98e186b8"],
- ["ebacaa", "e18486e185ade186b9"],
- ["ebacaa", "ebac98e186b9"],
- ["ebacab", "e18486e185ade186ba"],
- ["ebacab", "ebac98e186ba"],
- ["ebacac", "e18486e185ade186bb"],
- ["ebacac", "ebac98e186bb"],
- ["ebacad", "e18486e185ade186bc"],
- ["ebacad", "ebac98e186bc"],
- ["ebacae", "e18486e185ade186bd"],
- ["ebacae", "ebac98e186bd"],
- ["ebacaf", "e18486e185ade186be"],
- ["ebacaf", "ebac98e186be"],
- ["ebacb0", "e18486e185ade186bf"],
- ["ebacb0", "ebac98e186bf"],
- ["ebacb1", "e18486e185ade18780"],
- ["ebacb1", "ebac98e18780"],
- ["ebacb2", "e18486e185ade18781"],
- ["ebacb2", "ebac98e18781"],
- ["ebacb3", "e18486e185ade18782"],
- ["ebacb3", "ebac98e18782"],
- ["ebacb4", "e18486e185ae"],
- ["ebacb5", "e18486e185aee186a8"],
- ["ebacb5", "ebacb4e186a8"],
- ["ebacb6", "e18486e185aee186a9"],
- ["ebacb6", "ebacb4e186a9"],
- ["ebacb7", "e18486e185aee186aa"],
- ["ebacb7", "ebacb4e186aa"],
- ["ebacb8", "e18486e185aee186ab"],
- ["ebacb8", "ebacb4e186ab"],
- ["ebacb9", "e18486e185aee186ac"],
- ["ebacb9", "ebacb4e186ac"],
- ["ebacba", "e18486e185aee186ad"],
- ["ebacba", "ebacb4e186ad"],
- ["ebacbb", "e18486e185aee186ae"],
- ["ebacbb", "ebacb4e186ae"],
- ["ebacbc", "e18486e185aee186af"],
- ["ebacbc", "ebacb4e186af"],
- ["ebacbd", "e18486e185aee186b0"],
- ["ebacbd", "ebacb4e186b0"],
- ["ebacbe", "e18486e185aee186b1"],
- ["ebacbe", "ebacb4e186b1"],
- ["ebacbf", "e18486e185aee186b2"],
- ["ebacbf", "ebacb4e186b2"],
- ["ebad80", "e18486e185aee186b3"],
- ["ebad80", "ebacb4e186b3"],
- ["ebad81", "e18486e185aee186b4"],
- ["ebad81", "ebacb4e186b4"],
- ["ebad82", "e18486e185aee186b5"],
- ["ebad82", "ebacb4e186b5"],
- ["ebad83", "e18486e185aee186b6"],
- ["ebad83", "ebacb4e186b6"],
- ["ebad84", "e18486e185aee186b7"],
- ["ebad84", "ebacb4e186b7"],
- ["ebad85", "e18486e185aee186b8"],
- ["ebad85", "ebacb4e186b8"],
- ["ebad86", "e18486e185aee186b9"],
- ["ebad86", "ebacb4e186b9"],
- ["ebad87", "e18486e185aee186ba"],
- ["ebad87", "ebacb4e186ba"],
- ["ebad88", "e18486e185aee186bb"],
- ["ebad88", "ebacb4e186bb"],
- ["ebad89", "e18486e185aee186bc"],
- ["ebad89", "ebacb4e186bc"],
- ["ebad8a", "e18486e185aee186bd"],
- ["ebad8a", "ebacb4e186bd"],
- ["ebad8b", "e18486e185aee186be"],
- ["ebad8b", "ebacb4e186be"],
- ["ebad8c", "e18486e185aee186bf"],
- ["ebad8c", "ebacb4e186bf"],
- ["ebad8d", "e18486e185aee18780"],
- ["ebad8d", "ebacb4e18780"],
- ["ebad8e", "e18486e185aee18781"],
- ["ebad8e", "ebacb4e18781"],
- ["ebad8f", "e18486e185aee18782"],
- ["ebad8f", "ebacb4e18782"],
- ["ebad90", "e18486e185af"],
- ["ebad91", "e18486e185afe186a8"],
- ["ebad91", "ebad90e186a8"],
- ["ebad92", "e18486e185afe186a9"],
- ["ebad92", "ebad90e186a9"],
- ["ebad93", "e18486e185afe186aa"],
- ["ebad93", "ebad90e186aa"],
- ["ebad94", "e18486e185afe186ab"],
- ["ebad94", "ebad90e186ab"],
- ["ebad95", "e18486e185afe186ac"],
- ["ebad95", "ebad90e186ac"],
- ["ebad96", "e18486e185afe186ad"],
- ["ebad96", "ebad90e186ad"],
- ["ebad97", "e18486e185afe186ae"],
- ["ebad97", "ebad90e186ae"],
- ["ebad98", "e18486e185afe186af"],
- ["ebad98", "ebad90e186af"],
- ["ebad99", "e18486e185afe186b0"],
- ["ebad99", "ebad90e186b0"],
- ["ebad9a", "e18486e185afe186b1"],
- ["ebad9a", "ebad90e186b1"],
- ["ebad9b", "e18486e185afe186b2"],
- ["ebad9b", "ebad90e186b2"],
- ["ebad9c", "e18486e185afe186b3"],
- ["ebad9c", "ebad90e186b3"],
- ["ebad9d", "e18486e185afe186b4"],
- ["ebad9d", "ebad90e186b4"],
- ["ebad9e", "e18486e185afe186b5"],
- ["ebad9e", "ebad90e186b5"],
- ["ebad9f", "e18486e185afe186b6"],
- ["ebad9f", "ebad90e186b6"],
- ["ebada0", "e18486e185afe186b7"],
- ["ebada0", "ebad90e186b7"],
- ["ebada1", "e18486e185afe186b8"],
- ["ebada1", "ebad90e186b8"],
- ["ebada2", "e18486e185afe186b9"],
- ["ebada2", "ebad90e186b9"],
- ["ebada3", "e18486e185afe186ba"],
- ["ebada3", "ebad90e186ba"],
- ["ebada4", "e18486e185afe186bb"],
- ["ebada4", "ebad90e186bb"],
- ["ebada5", "e18486e185afe186bc"],
- ["ebada5", "ebad90e186bc"],
- ["ebada6", "e18486e185afe186bd"],
- ["ebada6", "ebad90e186bd"],
- ["ebada7", "e18486e185afe186be"],
- ["ebada7", "ebad90e186be"],
- ["ebada8", "e18486e185afe186bf"],
- ["ebada8", "ebad90e186bf"],
- ["ebada9", "e18486e185afe18780"],
- ["ebada9", "ebad90e18780"],
- ["ebadaa", "e18486e185afe18781"],
- ["ebadaa", "ebad90e18781"],
- ["ebadab", "e18486e185afe18782"],
- ["ebadab", "ebad90e18782"],
- ["ebadac", "e18486e185b0"],
- ["ebadad", "e18486e185b0e186a8"],
- ["ebadad", "ebadace186a8"],
- ["ebadae", "e18486e185b0e186a9"],
- ["ebadae", "ebadace186a9"],
- ["ebadaf", "e18486e185b0e186aa"],
- ["ebadaf", "ebadace186aa"],
- ["ebadb0", "e18486e185b0e186ab"],
- ["ebadb0", "ebadace186ab"],
- ["ebadb1", "e18486e185b0e186ac"],
- ["ebadb1", "ebadace186ac"],
- ["ebadb2", "e18486e185b0e186ad"],
- ["ebadb2", "ebadace186ad"],
- ["ebadb3", "e18486e185b0e186ae"],
- ["ebadb3", "ebadace186ae"],
- ["ebadb4", "e18486e185b0e186af"],
- ["ebadb4", "ebadace186af"],
- ["ebadb5", "e18486e185b0e186b0"],
- ["ebadb5", "ebadace186b0"],
- ["ebadb6", "e18486e185b0e186b1"],
- ["ebadb6", "ebadace186b1"],
- ["ebadb7", "e18486e185b0e186b2"],
- ["ebadb7", "ebadace186b2"],
- ["ebadb8", "e18486e185b0e186b3"],
- ["ebadb8", "ebadace186b3"],
- ["ebadb9", "e18486e185b0e186b4"],
- ["ebadb9", "ebadace186b4"],
- ["ebadba", "e18486e185b0e186b5"],
- ["ebadba", "ebadace186b5"],
- ["ebadbb", "e18486e185b0e186b6"],
- ["ebadbb", "ebadace186b6"],
- ["ebadbc", "e18486e185b0e186b7"],
- ["ebadbc", "ebadace186b7"],
- ["ebadbd", "e18486e185b0e186b8"],
- ["ebadbd", "ebadace186b8"],
- ["ebadbe", "e18486e185b0e186b9"],
- ["ebadbe", "ebadace186b9"],
- ["ebadbf", "e18486e185b0e186ba"],
- ["ebadbf", "ebadace186ba"],
- ["ebae80", "e18486e185b0e186bb"],
- ["ebae80", "ebadace186bb"],
- ["ebae81", "e18486e185b0e186bc"],
- ["ebae81", "ebadace186bc"],
- ["ebae82", "e18486e185b0e186bd"],
- ["ebae82", "ebadace186bd"],
- ["ebae83", "e18486e185b0e186be"],
- ["ebae83", "ebadace186be"],
- ["ebae84", "e18486e185b0e186bf"],
- ["ebae84", "ebadace186bf"],
- ["ebae85", "e18486e185b0e18780"],
- ["ebae85", "ebadace18780"],
- ["ebae86", "e18486e185b0e18781"],
- ["ebae86", "ebadace18781"],
- ["ebae87", "e18486e185b0e18782"],
- ["ebae87", "ebadace18782"],
- ["ebae88", "e18486e185b1"],
- ["ebae89", "e18486e185b1e186a8"],
- ["ebae89", "ebae88e186a8"],
- ["ebae8a", "e18486e185b1e186a9"],
- ["ebae8a", "ebae88e186a9"],
- ["ebae8b", "e18486e185b1e186aa"],
- ["ebae8b", "ebae88e186aa"],
- ["ebae8c", "e18486e185b1e186ab"],
- ["ebae8c", "ebae88e186ab"],
- ["ebae8d", "e18486e185b1e186ac"],
- ["ebae8d", "ebae88e186ac"],
- ["ebae8e", "e18486e185b1e186ad"],
- ["ebae8e", "ebae88e186ad"],
- ["ebae8f", "e18486e185b1e186ae"],
- ["ebae8f", "ebae88e186ae"],
- ["ebae90", "e18486e185b1e186af"],
- ["ebae90", "ebae88e186af"],
- ["ebae91", "e18486e185b1e186b0"],
- ["ebae91", "ebae88e186b0"],
- ["ebae92", "e18486e185b1e186b1"],
- ["ebae92", "ebae88e186b1"],
- ["ebae93", "e18486e185b1e186b2"],
- ["ebae93", "ebae88e186b2"],
- ["ebae94", "e18486e185b1e186b3"],
- ["ebae94", "ebae88e186b3"],
- ["ebae95", "e18486e185b1e186b4"],
- ["ebae95", "ebae88e186b4"],
- ["ebae96", "e18486e185b1e186b5"],
- ["ebae96", "ebae88e186b5"],
- ["ebae97", "e18486e185b1e186b6"],
- ["ebae97", "ebae88e186b6"],
- ["ebae98", "e18486e185b1e186b7"],
- ["ebae98", "ebae88e186b7"],
- ["ebae99", "e18486e185b1e186b8"],
- ["ebae99", "ebae88e186b8"],
- ["ebae9a", "e18486e185b1e186b9"],
- ["ebae9a", "ebae88e186b9"],
- ["ebae9b", "e18486e185b1e186ba"],
- ["ebae9b", "ebae88e186ba"],
- ["ebae9c", "e18486e185b1e186bb"],
- ["ebae9c", "ebae88e186bb"],
- ["ebae9d", "e18486e185b1e186bc"],
- ["ebae9d", "ebae88e186bc"],
- ["ebae9e", "e18486e185b1e186bd"],
- ["ebae9e", "ebae88e186bd"],
- ["ebae9f", "e18486e185b1e186be"],
- ["ebae9f", "ebae88e186be"],
- ["ebaea0", "e18486e185b1e186bf"],
- ["ebaea0", "ebae88e186bf"],
- ["ebaea1", "e18486e185b1e18780"],
- ["ebaea1", "ebae88e18780"],
- ["ebaea2", "e18486e185b1e18781"],
- ["ebaea2", "ebae88e18781"],
- ["ebaea3", "e18486e185b1e18782"],
- ["ebaea3", "ebae88e18782"],
- ["ebaea4", "e18486e185b2"],
- ["ebaea5", "e18486e185b2e186a8"],
- ["ebaea5", "ebaea4e186a8"],
- ["ebaea6", "e18486e185b2e186a9"],
- ["ebaea6", "ebaea4e186a9"],
- ["ebaea7", "e18486e185b2e186aa"],
- ["ebaea7", "ebaea4e186aa"],
- ["ebaea8", "e18486e185b2e186ab"],
- ["ebaea8", "ebaea4e186ab"],
- ["ebaea9", "e18486e185b2e186ac"],
- ["ebaea9", "ebaea4e186ac"],
- ["ebaeaa", "e18486e185b2e186ad"],
- ["ebaeaa", "ebaea4e186ad"],
- ["ebaeab", "e18486e185b2e186ae"],
- ["ebaeab", "ebaea4e186ae"],
- ["ebaeac", "e18486e185b2e186af"],
- ["ebaeac", "ebaea4e186af"],
- ["ebaead", "e18486e185b2e186b0"],
- ["ebaead", "ebaea4e186b0"],
- ["ebaeae", "e18486e185b2e186b1"],
- ["ebaeae", "ebaea4e186b1"],
- ["ebaeaf", "e18486e185b2e186b2"],
- ["ebaeaf", "ebaea4e186b2"],
- ["ebaeb0", "e18486e185b2e186b3"],
- ["ebaeb0", "ebaea4e186b3"],
- ["ebaeb1", "e18486e185b2e186b4"],
- ["ebaeb1", "ebaea4e186b4"],
- ["ebaeb2", "e18486e185b2e186b5"],
- ["ebaeb2", "ebaea4e186b5"],
- ["ebaeb3", "e18486e185b2e186b6"],
- ["ebaeb3", "ebaea4e186b6"],
- ["ebaeb4", "e18486e185b2e186b7"],
- ["ebaeb4", "ebaea4e186b7"],
- ["ebaeb5", "e18486e185b2e186b8"],
- ["ebaeb5", "ebaea4e186b8"],
- ["ebaeb6", "e18486e185b2e186b9"],
- ["ebaeb6", "ebaea4e186b9"],
- ["ebaeb7", "e18486e185b2e186ba"],
- ["ebaeb7", "ebaea4e186ba"],
- ["ebaeb8", "e18486e185b2e186bb"],
- ["ebaeb8", "ebaea4e186bb"],
- ["ebaeb9", "e18486e185b2e186bc"],
- ["ebaeb9", "ebaea4e186bc"],
- ["ebaeba", "e18486e185b2e186bd"],
- ["ebaeba", "ebaea4e186bd"],
- ["ebaebb", "e18486e185b2e186be"],
- ["ebaebb", "ebaea4e186be"],
- ["ebaebc", "e18486e185b2e186bf"],
- ["ebaebc", "ebaea4e186bf"],
- ["ebaebd", "e18486e185b2e18780"],
- ["ebaebd", "ebaea4e18780"],
- ["ebaebe", "e18486e185b2e18781"],
- ["ebaebe", "ebaea4e18781"],
- ["ebaebf", "e18486e185b2e18782"],
- ["ebaebf", "ebaea4e18782"],
- ["ebaf80", "e18486e185b3"],
- ["ebaf81", "e18486e185b3e186a8"],
- ["ebaf81", "ebaf80e186a8"],
- ["ebaf82", "e18486e185b3e186a9"],
- ["ebaf82", "ebaf80e186a9"],
- ["ebaf83", "e18486e185b3e186aa"],
- ["ebaf83", "ebaf80e186aa"],
- ["ebaf84", "e18486e185b3e186ab"],
- ["ebaf84", "ebaf80e186ab"],
- ["ebaf85", "e18486e185b3e186ac"],
- ["ebaf85", "ebaf80e186ac"],
- ["ebaf86", "e18486e185b3e186ad"],
- ["ebaf86", "ebaf80e186ad"],
- ["ebaf87", "e18486e185b3e186ae"],
- ["ebaf87", "ebaf80e186ae"],
- ["ebaf88", "e18486e185b3e186af"],
- ["ebaf88", "ebaf80e186af"],
- ["ebaf89", "e18486e185b3e186b0"],
- ["ebaf89", "ebaf80e186b0"],
- ["ebaf8a", "e18486e185b3e186b1"],
- ["ebaf8a", "ebaf80e186b1"],
- ["ebaf8b", "e18486e185b3e186b2"],
- ["ebaf8b", "ebaf80e186b2"],
- ["ebaf8c", "e18486e185b3e186b3"],
- ["ebaf8c", "ebaf80e186b3"],
- ["ebaf8d", "e18486e185b3e186b4"],
- ["ebaf8d", "ebaf80e186b4"],
- ["ebaf8e", "e18486e185b3e186b5"],
- ["ebaf8e", "ebaf80e186b5"],
- ["ebaf8f", "e18486e185b3e186b6"],
- ["ebaf8f", "ebaf80e186b6"],
- ["ebaf90", "e18486e185b3e186b7"],
- ["ebaf90", "ebaf80e186b7"],
- ["ebaf91", "e18486e185b3e186b8"],
- ["ebaf91", "ebaf80e186b8"],
- ["ebaf92", "e18486e185b3e186b9"],
- ["ebaf92", "ebaf80e186b9"],
- ["ebaf93", "e18486e185b3e186ba"],
- ["ebaf93", "ebaf80e186ba"],
- ["ebaf94", "e18486e185b3e186bb"],
- ["ebaf94", "ebaf80e186bb"],
- ["ebaf95", "e18486e185b3e186bc"],
- ["ebaf95", "ebaf80e186bc"],
- ["ebaf96", "e18486e185b3e186bd"],
- ["ebaf96", "ebaf80e186bd"],
- ["ebaf97", "e18486e185b3e186be"],
- ["ebaf97", "ebaf80e186be"],
- ["ebaf98", "e18486e185b3e186bf"],
- ["ebaf98", "ebaf80e186bf"],
- ["ebaf99", "e18486e185b3e18780"],
- ["ebaf99", "ebaf80e18780"],
- ["ebaf9a", "e18486e185b3e18781"],
- ["ebaf9a", "ebaf80e18781"],
- ["ebaf9b", "e18486e185b3e18782"],
- ["ebaf9b", "ebaf80e18782"],
- ["ebaf9c", "e18486e185b4"],
- ["ebaf9d", "e18486e185b4e186a8"],
- ["ebaf9d", "ebaf9ce186a8"],
- ["ebaf9e", "e18486e185b4e186a9"],
- ["ebaf9e", "ebaf9ce186a9"],
- ["ebaf9f", "e18486e185b4e186aa"],
- ["ebaf9f", "ebaf9ce186aa"],
- ["ebafa0", "e18486e185b4e186ab"],
- ["ebafa0", "ebaf9ce186ab"],
- ["ebafa1", "e18486e185b4e186ac"],
- ["ebafa1", "ebaf9ce186ac"],
- ["ebafa2", "e18486e185b4e186ad"],
- ["ebafa2", "ebaf9ce186ad"],
- ["ebafa3", "e18486e185b4e186ae"],
- ["ebafa3", "ebaf9ce186ae"],
- ["ebafa4", "e18486e185b4e186af"],
- ["ebafa4", "ebaf9ce186af"],
- ["ebafa5", "e18486e185b4e186b0"],
- ["ebafa5", "ebaf9ce186b0"],
- ["ebafa6", "e18486e185b4e186b1"],
- ["ebafa6", "ebaf9ce186b1"],
- ["ebafa7", "e18486e185b4e186b2"],
- ["ebafa7", "ebaf9ce186b2"],
- ["ebafa8", "e18486e185b4e186b3"],
- ["ebafa8", "ebaf9ce186b3"],
- ["ebafa9", "e18486e185b4e186b4"],
- ["ebafa9", "ebaf9ce186b4"],
- ["ebafaa", "e18486e185b4e186b5"],
- ["ebafaa", "ebaf9ce186b5"],
- ["ebafab", "e18486e185b4e186b6"],
- ["ebafab", "ebaf9ce186b6"],
- ["ebafac", "e18486e185b4e186b7"],
- ["ebafac", "ebaf9ce186b7"],
- ["ebafad", "e18486e185b4e186b8"],
- ["ebafad", "ebaf9ce186b8"],
- ["ebafae", "e18486e185b4e186b9"],
- ["ebafae", "ebaf9ce186b9"],
- ["ebafaf", "e18486e185b4e186ba"],
- ["ebafaf", "ebaf9ce186ba"],
- ["ebafb0", "e18486e185b4e186bb"],
- ["ebafb0", "ebaf9ce186bb"],
- ["ebafb1", "e18486e185b4e186bc"],
- ["ebafb1", "ebaf9ce186bc"],
- ["ebafb2", "e18486e185b4e186bd"],
- ["ebafb2", "ebaf9ce186bd"],
- ["ebafb3", "e18486e185b4e186be"],
- ["ebafb3", "ebaf9ce186be"],
- ["ebafb4", "e18486e185b4e186bf"],
- ["ebafb4", "ebaf9ce186bf"],
- ["ebafb5", "e18486e185b4e18780"],
- ["ebafb5", "ebaf9ce18780"],
- ["ebafb6", "e18486e185b4e18781"],
- ["ebafb6", "ebaf9ce18781"],
- ["ebafb7", "e18486e185b4e18782"],
- ["ebafb7", "ebaf9ce18782"],
- ["ebafb8", "e18486e185b5"],
- ["ebafb9", "e18486e185b5e186a8"],
- ["ebafb9", "ebafb8e186a8"],
- ["ebafba", "e18486e185b5e186a9"],
- ["ebafba", "ebafb8e186a9"],
- ["ebafbb", "e18486e185b5e186aa"],
- ["ebafbb", "ebafb8e186aa"],
- ["ebafbc", "e18486e185b5e186ab"],
- ["ebafbc", "ebafb8e186ab"],
- ["ebafbd", "e18486e185b5e186ac"],
- ["ebafbd", "ebafb8e186ac"],
- ["ebafbe", "e18486e185b5e186ad"],
- ["ebafbe", "ebafb8e186ad"],
- ["ebafbf", "e18486e185b5e186ae"],
- ["ebafbf", "ebafb8e186ae"],
- ["ebb080", "e18486e185b5e186af"],
- ["ebb080", "ebafb8e186af"],
- ["ebb081", "e18486e185b5e186b0"],
- ["ebb081", "ebafb8e186b0"],
- ["ebb082", "e18486e185b5e186b1"],
- ["ebb082", "ebafb8e186b1"],
- ["ebb083", "e18486e185b5e186b2"],
- ["ebb083", "ebafb8e186b2"],
- ["ebb084", "e18486e185b5e186b3"],
- ["ebb084", "ebafb8e186b3"],
- ["ebb085", "e18486e185b5e186b4"],
- ["ebb085", "ebafb8e186b4"],
- ["ebb086", "e18486e185b5e186b5"],
- ["ebb086", "ebafb8e186b5"],
- ["ebb087", "e18486e185b5e186b6"],
- ["ebb087", "ebafb8e186b6"],
- ["ebb088", "e18486e185b5e186b7"],
- ["ebb088", "ebafb8e186b7"],
- ["ebb089", "e18486e185b5e186b8"],
- ["ebb089", "ebafb8e186b8"],
- ["ebb08a", "e18486e185b5e186b9"],
- ["ebb08a", "ebafb8e186b9"],
- ["ebb08b", "e18486e185b5e186ba"],
- ["ebb08b", "ebafb8e186ba"],
- ["ebb08c", "e18486e185b5e186bb"],
- ["ebb08c", "ebafb8e186bb"],
- ["ebb08d", "e18486e185b5e186bc"],
- ["ebb08d", "ebafb8e186bc"],
- ["ebb08e", "e18486e185b5e186bd"],
- ["ebb08e", "ebafb8e186bd"],
- ["ebb08f", "e18486e185b5e186be"],
- ["ebb08f", "ebafb8e186be"],
- ["ebb090", "e18486e185b5e186bf"],
- ["ebb090", "ebafb8e186bf"],
- ["ebb091", "e18486e185b5e18780"],
- ["ebb091", "ebafb8e18780"],
- ["ebb092", "e18486e185b5e18781"],
- ["ebb092", "ebafb8e18781"],
- ["ebb093", "e18486e185b5e18782"],
- ["ebb093", "ebafb8e18782"],
- ["ebb094", "e18487e185a1"],
- ["ebb095", "e18487e185a1e186a8"],
- ["ebb095", "ebb094e186a8"],
- ["ebb096", "e18487e185a1e186a9"],
- ["ebb096", "ebb094e186a9"],
- ["ebb097", "e18487e185a1e186aa"],
- ["ebb097", "ebb094e186aa"],
- ["ebb098", "e18487e185a1e186ab"],
- ["ebb098", "ebb094e186ab"],
- ["ebb099", "e18487e185a1e186ac"],
- ["ebb099", "ebb094e186ac"],
- ["ebb09a", "e18487e185a1e186ad"],
- ["ebb09a", "ebb094e186ad"],
- ["ebb09b", "e18487e185a1e186ae"],
- ["ebb09b", "ebb094e186ae"],
- ["ebb09c", "e18487e185a1e186af"],
- ["ebb09c", "ebb094e186af"],
- ["ebb09d", "e18487e185a1e186b0"],
- ["ebb09d", "ebb094e186b0"],
- ["ebb09e", "e18487e185a1e186b1"],
- ["ebb09e", "ebb094e186b1"],
- ["ebb09f", "e18487e185a1e186b2"],
- ["ebb09f", "ebb094e186b2"],
- ["ebb0a0", "e18487e185a1e186b3"],
- ["ebb0a0", "ebb094e186b3"],
- ["ebb0a1", "e18487e185a1e186b4"],
- ["ebb0a1", "ebb094e186b4"],
- ["ebb0a2", "e18487e185a1e186b5"],
- ["ebb0a2", "ebb094e186b5"],
- ["ebb0a3", "e18487e185a1e186b6"],
- ["ebb0a3", "ebb094e186b6"],
- ["ebb0a4", "e18487e185a1e186b7"],
- ["ebb0a4", "ebb094e186b7"],
- ["ebb0a5", "e18487e185a1e186b8"],
- ["ebb0a5", "ebb094e186b8"],
- ["ebb0a6", "e18487e185a1e186b9"],
- ["ebb0a6", "ebb094e186b9"],
- ["ebb0a7", "e18487e185a1e186ba"],
- ["ebb0a7", "ebb094e186ba"],
- ["ebb0a8", "e18487e185a1e186bb"],
- ["ebb0a8", "ebb094e186bb"],
- ["ebb0a9", "e18487e185a1e186bc"],
- ["ebb0a9", "ebb094e186bc"],
- ["ebb0aa", "e18487e185a1e186bd"],
- ["ebb0aa", "ebb094e186bd"],
- ["ebb0ab", "e18487e185a1e186be"],
- ["ebb0ab", "ebb094e186be"],
- ["ebb0ac", "e18487e185a1e186bf"],
- ["ebb0ac", "ebb094e186bf"],
- ["ebb0ad", "e18487e185a1e18780"],
- ["ebb0ad", "ebb094e18780"],
- ["ebb0ae", "e18487e185a1e18781"],
- ["ebb0ae", "ebb094e18781"],
- ["ebb0af", "e18487e185a1e18782"],
- ["ebb0af", "ebb094e18782"],
- ["ebb0b0", "e18487e185a2"],
- ["ebb0b1", "e18487e185a2e186a8"],
- ["ebb0b1", "ebb0b0e186a8"],
- ["ebb0b2", "e18487e185a2e186a9"],
- ["ebb0b2", "ebb0b0e186a9"],
- ["ebb0b3", "e18487e185a2e186aa"],
- ["ebb0b3", "ebb0b0e186aa"],
- ["ebb0b4", "e18487e185a2e186ab"],
- ["ebb0b4", "ebb0b0e186ab"],
- ["ebb0b5", "e18487e185a2e186ac"],
- ["ebb0b5", "ebb0b0e186ac"],
- ["ebb0b6", "e18487e185a2e186ad"],
- ["ebb0b6", "ebb0b0e186ad"],
- ["ebb0b7", "e18487e185a2e186ae"],
- ["ebb0b7", "ebb0b0e186ae"],
- ["ebb0b8", "e18487e185a2e186af"],
- ["ebb0b8", "ebb0b0e186af"],
- ["ebb0b9", "e18487e185a2e186b0"],
- ["ebb0b9", "ebb0b0e186b0"],
- ["ebb0ba", "e18487e185a2e186b1"],
- ["ebb0ba", "ebb0b0e186b1"],
- ["ebb0bb", "e18487e185a2e186b2"],
- ["ebb0bb", "ebb0b0e186b2"],
- ["ebb0bc", "e18487e185a2e186b3"],
- ["ebb0bc", "ebb0b0e186b3"],
- ["ebb0bd", "e18487e185a2e186b4"],
- ["ebb0bd", "ebb0b0e186b4"],
- ["ebb0be", "e18487e185a2e186b5"],
- ["ebb0be", "ebb0b0e186b5"],
- ["ebb0bf", "e18487e185a2e186b6"],
- ["ebb0bf", "ebb0b0e186b6"],
- ["ebb180", "e18487e185a2e186b7"],
- ["ebb180", "ebb0b0e186b7"],
- ["ebb181", "e18487e185a2e186b8"],
- ["ebb181", "ebb0b0e186b8"],
- ["ebb182", "e18487e185a2e186b9"],
- ["ebb182", "ebb0b0e186b9"],
- ["ebb183", "e18487e185a2e186ba"],
- ["ebb183", "ebb0b0e186ba"],
- ["ebb184", "e18487e185a2e186bb"],
- ["ebb184", "ebb0b0e186bb"],
- ["ebb185", "e18487e185a2e186bc"],
- ["ebb185", "ebb0b0e186bc"],
- ["ebb186", "e18487e185a2e186bd"],
- ["ebb186", "ebb0b0e186bd"],
- ["ebb187", "e18487e185a2e186be"],
- ["ebb187", "ebb0b0e186be"],
- ["ebb188", "e18487e185a2e186bf"],
- ["ebb188", "ebb0b0e186bf"],
- ["ebb189", "e18487e185a2e18780"],
- ["ebb189", "ebb0b0e18780"],
- ["ebb18a", "e18487e185a2e18781"],
- ["ebb18a", "ebb0b0e18781"],
- ["ebb18b", "e18487e185a2e18782"],
- ["ebb18b", "ebb0b0e18782"],
- ["ebb18c", "e18487e185a3"],
- ["ebb18d", "e18487e185a3e186a8"],
- ["ebb18d", "ebb18ce186a8"],
- ["ebb18e", "e18487e185a3e186a9"],
- ["ebb18e", "ebb18ce186a9"],
- ["ebb18f", "e18487e185a3e186aa"],
- ["ebb18f", "ebb18ce186aa"],
- ["ebb190", "e18487e185a3e186ab"],
- ["ebb190", "ebb18ce186ab"],
- ["ebb191", "e18487e185a3e186ac"],
- ["ebb191", "ebb18ce186ac"],
- ["ebb192", "e18487e185a3e186ad"],
- ["ebb192", "ebb18ce186ad"],
- ["ebb193", "e18487e185a3e186ae"],
- ["ebb193", "ebb18ce186ae"],
- ["ebb194", "e18487e185a3e186af"],
- ["ebb194", "ebb18ce186af"],
- ["ebb195", "e18487e185a3e186b0"],
- ["ebb195", "ebb18ce186b0"],
- ["ebb196", "e18487e185a3e186b1"],
- ["ebb196", "ebb18ce186b1"],
- ["ebb197", "e18487e185a3e186b2"],
- ["ebb197", "ebb18ce186b2"],
- ["ebb198", "e18487e185a3e186b3"],
- ["ebb198", "ebb18ce186b3"],
- ["ebb199", "e18487e185a3e186b4"],
- ["ebb199", "ebb18ce186b4"],
- ["ebb19a", "e18487e185a3e186b5"],
- ["ebb19a", "ebb18ce186b5"],
- ["ebb19b", "e18487e185a3e186b6"],
- ["ebb19b", "ebb18ce186b6"],
- ["ebb19c", "e18487e185a3e186b7"],
- ["ebb19c", "ebb18ce186b7"],
- ["ebb19d", "e18487e185a3e186b8"],
- ["ebb19d", "ebb18ce186b8"],
- ["ebb19e", "e18487e185a3e186b9"],
- ["ebb19e", "ebb18ce186b9"],
- ["ebb19f", "e18487e185a3e186ba"],
- ["ebb19f", "ebb18ce186ba"],
- ["ebb1a0", "e18487e185a3e186bb"],
- ["ebb1a0", "ebb18ce186bb"],
- ["ebb1a1", "e18487e185a3e186bc"],
- ["ebb1a1", "ebb18ce186bc"],
- ["ebb1a2", "e18487e185a3e186bd"],
- ["ebb1a2", "ebb18ce186bd"],
- ["ebb1a3", "e18487e185a3e186be"],
- ["ebb1a3", "ebb18ce186be"],
- ["ebb1a4", "e18487e185a3e186bf"],
- ["ebb1a4", "ebb18ce186bf"],
- ["ebb1a5", "e18487e185a3e18780"],
- ["ebb1a5", "ebb18ce18780"],
- ["ebb1a6", "e18487e185a3e18781"],
- ["ebb1a6", "ebb18ce18781"],
- ["ebb1a7", "e18487e185a3e18782"],
- ["ebb1a7", "ebb18ce18782"],
- ["ebb1a8", "e18487e185a4"],
- ["ebb1a9", "e18487e185a4e186a8"],
- ["ebb1a9", "ebb1a8e186a8"],
- ["ebb1aa", "e18487e185a4e186a9"],
- ["ebb1aa", "ebb1a8e186a9"],
- ["ebb1ab", "e18487e185a4e186aa"],
- ["ebb1ab", "ebb1a8e186aa"],
- ["ebb1ac", "e18487e185a4e186ab"],
- ["ebb1ac", "ebb1a8e186ab"],
- ["ebb1ad", "e18487e185a4e186ac"],
- ["ebb1ad", "ebb1a8e186ac"],
- ["ebb1ae", "e18487e185a4e186ad"],
- ["ebb1ae", "ebb1a8e186ad"],
- ["ebb1af", "e18487e185a4e186ae"],
- ["ebb1af", "ebb1a8e186ae"],
- ["ebb1b0", "e18487e185a4e186af"],
- ["ebb1b0", "ebb1a8e186af"],
- ["ebb1b1", "e18487e185a4e186b0"],
- ["ebb1b1", "ebb1a8e186b0"],
- ["ebb1b2", "e18487e185a4e186b1"],
- ["ebb1b2", "ebb1a8e186b1"],
- ["ebb1b3", "e18487e185a4e186b2"],
- ["ebb1b3", "ebb1a8e186b2"],
- ["ebb1b4", "e18487e185a4e186b3"],
- ["ebb1b4", "ebb1a8e186b3"],
- ["ebb1b5", "e18487e185a4e186b4"],
- ["ebb1b5", "ebb1a8e186b4"],
- ["ebb1b6", "e18487e185a4e186b5"],
- ["ebb1b6", "ebb1a8e186b5"],
- ["ebb1b7", "e18487e185a4e186b6"],
- ["ebb1b7", "ebb1a8e186b6"],
- ["ebb1b8", "e18487e185a4e186b7"],
- ["ebb1b8", "ebb1a8e186b7"],
- ["ebb1b9", "e18487e185a4e186b8"],
- ["ebb1b9", "ebb1a8e186b8"],
- ["ebb1ba", "e18487e185a4e186b9"],
- ["ebb1ba", "ebb1a8e186b9"],
- ["ebb1bb", "e18487e185a4e186ba"],
- ["ebb1bb", "ebb1a8e186ba"],
- ["ebb1bc", "e18487e185a4e186bb"],
- ["ebb1bc", "ebb1a8e186bb"],
- ["ebb1bd", "e18487e185a4e186bc"],
- ["ebb1bd", "ebb1a8e186bc"],
- ["ebb1be", "e18487e185a4e186bd"],
- ["ebb1be", "ebb1a8e186bd"],
- ["ebb1bf", "e18487e185a4e186be"],
- ["ebb1bf", "ebb1a8e186be"],
- ["ebb280", "e18487e185a4e186bf"],
- ["ebb280", "ebb1a8e186bf"],
- ["ebb281", "e18487e185a4e18780"],
- ["ebb281", "ebb1a8e18780"],
- ["ebb282", "e18487e185a4e18781"],
- ["ebb282", "ebb1a8e18781"],
- ["ebb283", "e18487e185a4e18782"],
- ["ebb283", "ebb1a8e18782"],
- ["ebb284", "e18487e185a5"],
- ["ebb285", "e18487e185a5e186a8"],
- ["ebb285", "ebb284e186a8"],
- ["ebb286", "e18487e185a5e186a9"],
- ["ebb286", "ebb284e186a9"],
- ["ebb287", "e18487e185a5e186aa"],
- ["ebb287", "ebb284e186aa"],
- ["ebb288", "e18487e185a5e186ab"],
- ["ebb288", "ebb284e186ab"],
- ["ebb289", "e18487e185a5e186ac"],
- ["ebb289", "ebb284e186ac"],
- ["ebb28a", "e18487e185a5e186ad"],
- ["ebb28a", "ebb284e186ad"],
- ["ebb28b", "e18487e185a5e186ae"],
- ["ebb28b", "ebb284e186ae"],
- ["ebb28c", "e18487e185a5e186af"],
- ["ebb28c", "ebb284e186af"],
- ["ebb28d", "e18487e185a5e186b0"],
- ["ebb28d", "ebb284e186b0"],
- ["ebb28e", "e18487e185a5e186b1"],
- ["ebb28e", "ebb284e186b1"],
- ["ebb28f", "e18487e185a5e186b2"],
- ["ebb28f", "ebb284e186b2"],
- ["ebb290", "e18487e185a5e186b3"],
- ["ebb290", "ebb284e186b3"],
- ["ebb291", "e18487e185a5e186b4"],
- ["ebb291", "ebb284e186b4"],
- ["ebb292", "e18487e185a5e186b5"],
- ["ebb292", "ebb284e186b5"],
- ["ebb293", "e18487e185a5e186b6"],
- ["ebb293", "ebb284e186b6"],
- ["ebb294", "e18487e185a5e186b7"],
- ["ebb294", "ebb284e186b7"],
- ["ebb295", "e18487e185a5e186b8"],
- ["ebb295", "ebb284e186b8"],
- ["ebb296", "e18487e185a5e186b9"],
- ["ebb296", "ebb284e186b9"],
- ["ebb297", "e18487e185a5e186ba"],
- ["ebb297", "ebb284e186ba"],
- ["ebb298", "e18487e185a5e186bb"],
- ["ebb298", "ebb284e186bb"],
- ["ebb299", "e18487e185a5e186bc"],
- ["ebb299", "ebb284e186bc"],
- ["ebb29a", "e18487e185a5e186bd"],
- ["ebb29a", "ebb284e186bd"],
- ["ebb29b", "e18487e185a5e186be"],
- ["ebb29b", "ebb284e186be"],
- ["ebb29c", "e18487e185a5e186bf"],
- ["ebb29c", "ebb284e186bf"],
- ["ebb29d", "e18487e185a5e18780"],
- ["ebb29d", "ebb284e18780"],
- ["ebb29e", "e18487e185a5e18781"],
- ["ebb29e", "ebb284e18781"],
- ["ebb29f", "e18487e185a5e18782"],
- ["ebb29f", "ebb284e18782"],
- ["ebb2a0", "e18487e185a6"],
- ["ebb2a1", "e18487e185a6e186a8"],
- ["ebb2a1", "ebb2a0e186a8"],
- ["ebb2a2", "e18487e185a6e186a9"],
- ["ebb2a2", "ebb2a0e186a9"],
- ["ebb2a3", "e18487e185a6e186aa"],
- ["ebb2a3", "ebb2a0e186aa"],
- ["ebb2a4", "e18487e185a6e186ab"],
- ["ebb2a4", "ebb2a0e186ab"],
- ["ebb2a5", "e18487e185a6e186ac"],
- ["ebb2a5", "ebb2a0e186ac"],
- ["ebb2a6", "e18487e185a6e186ad"],
- ["ebb2a6", "ebb2a0e186ad"],
- ["ebb2a7", "e18487e185a6e186ae"],
- ["ebb2a7", "ebb2a0e186ae"],
- ["ebb2a8", "e18487e185a6e186af"],
- ["ebb2a8", "ebb2a0e186af"],
- ["ebb2a9", "e18487e185a6e186b0"],
- ["ebb2a9", "ebb2a0e186b0"],
- ["ebb2aa", "e18487e185a6e186b1"],
- ["ebb2aa", "ebb2a0e186b1"],
- ["ebb2ab", "e18487e185a6e186b2"],
- ["ebb2ab", "ebb2a0e186b2"],
- ["ebb2ac", "e18487e185a6e186b3"],
- ["ebb2ac", "ebb2a0e186b3"],
- ["ebb2ad", "e18487e185a6e186b4"],
- ["ebb2ad", "ebb2a0e186b4"],
- ["ebb2ae", "e18487e185a6e186b5"],
- ["ebb2ae", "ebb2a0e186b5"],
- ["ebb2af", "e18487e185a6e186b6"],
- ["ebb2af", "ebb2a0e186b6"],
- ["ebb2b0", "e18487e185a6e186b7"],
- ["ebb2b0", "ebb2a0e186b7"],
- ["ebb2b1", "e18487e185a6e186b8"],
- ["ebb2b1", "ebb2a0e186b8"],
- ["ebb2b2", "e18487e185a6e186b9"],
- ["ebb2b2", "ebb2a0e186b9"],
- ["ebb2b3", "e18487e185a6e186ba"],
- ["ebb2b3", "ebb2a0e186ba"],
- ["ebb2b4", "e18487e185a6e186bb"],
- ["ebb2b4", "ebb2a0e186bb"],
- ["ebb2b5", "e18487e185a6e186bc"],
- ["ebb2b5", "ebb2a0e186bc"],
- ["ebb2b6", "e18487e185a6e186bd"],
- ["ebb2b6", "ebb2a0e186bd"],
- ["ebb2b7", "e18487e185a6e186be"],
- ["ebb2b7", "ebb2a0e186be"],
- ["ebb2b8", "e18487e185a6e186bf"],
- ["ebb2b8", "ebb2a0e186bf"],
- ["ebb2b9", "e18487e185a6e18780"],
- ["ebb2b9", "ebb2a0e18780"],
- ["ebb2ba", "e18487e185a6e18781"],
- ["ebb2ba", "ebb2a0e18781"],
- ["ebb2bb", "e18487e185a6e18782"],
- ["ebb2bb", "ebb2a0e18782"],
- ["ebb2bc", "e18487e185a7"],
- ["ebb2bd", "e18487e185a7e186a8"],
- ["ebb2bd", "ebb2bce186a8"],
- ["ebb2be", "e18487e185a7e186a9"],
- ["ebb2be", "ebb2bce186a9"],
- ["ebb2bf", "e18487e185a7e186aa"],
- ["ebb2bf", "ebb2bce186aa"],
- ["ebb380", "e18487e185a7e186ab"],
- ["ebb380", "ebb2bce186ab"],
- ["ebb381", "e18487e185a7e186ac"],
- ["ebb381", "ebb2bce186ac"],
- ["ebb382", "e18487e185a7e186ad"],
- ["ebb382", "ebb2bce186ad"],
- ["ebb383", "e18487e185a7e186ae"],
- ["ebb383", "ebb2bce186ae"],
- ["ebb384", "e18487e185a7e186af"],
- ["ebb384", "ebb2bce186af"],
- ["ebb385", "e18487e185a7e186b0"],
- ["ebb385", "ebb2bce186b0"],
- ["ebb386", "e18487e185a7e186b1"],
- ["ebb386", "ebb2bce186b1"],
- ["ebb387", "e18487e185a7e186b2"],
- ["ebb387", "ebb2bce186b2"],
- ["ebb388", "e18487e185a7e186b3"],
- ["ebb388", "ebb2bce186b3"],
- ["ebb389", "e18487e185a7e186b4"],
- ["ebb389", "ebb2bce186b4"],
- ["ebb38a", "e18487e185a7e186b5"],
- ["ebb38a", "ebb2bce186b5"],
- ["ebb38b", "e18487e185a7e186b6"],
- ["ebb38b", "ebb2bce186b6"],
- ["ebb38c", "e18487e185a7e186b7"],
- ["ebb38c", "ebb2bce186b7"],
- ["ebb38d", "e18487e185a7e186b8"],
- ["ebb38d", "ebb2bce186b8"],
- ["ebb38e", "e18487e185a7e186b9"],
- ["ebb38e", "ebb2bce186b9"],
- ["ebb38f", "e18487e185a7e186ba"],
- ["ebb38f", "ebb2bce186ba"],
- ["ebb390", "e18487e185a7e186bb"],
- ["ebb390", "ebb2bce186bb"],
- ["ebb391", "e18487e185a7e186bc"],
- ["ebb391", "ebb2bce186bc"],
- ["ebb392", "e18487e185a7e186bd"],
- ["ebb392", "ebb2bce186bd"],
- ["ebb393", "e18487e185a7e186be"],
- ["ebb393", "ebb2bce186be"],
- ["ebb394", "e18487e185a7e186bf"],
- ["ebb394", "ebb2bce186bf"],
- ["ebb395", "e18487e185a7e18780"],
- ["ebb395", "ebb2bce18780"],
- ["ebb396", "e18487e185a7e18781"],
- ["ebb396", "ebb2bce18781"],
- ["ebb397", "e18487e185a7e18782"],
- ["ebb397", "ebb2bce18782"],
- ["ebb398", "e18487e185a8"],
- ["ebb399", "e18487e185a8e186a8"],
- ["ebb399", "ebb398e186a8"],
- ["ebb39a", "e18487e185a8e186a9"],
- ["ebb39a", "ebb398e186a9"],
- ["ebb39b", "e18487e185a8e186aa"],
- ["ebb39b", "ebb398e186aa"],
- ["ebb39c", "e18487e185a8e186ab"],
- ["ebb39c", "ebb398e186ab"],
- ["ebb39d", "e18487e185a8e186ac"],
- ["ebb39d", "ebb398e186ac"],
- ["ebb39e", "e18487e185a8e186ad"],
- ["ebb39e", "ebb398e186ad"],
- ["ebb39f", "e18487e185a8e186ae"],
- ["ebb39f", "ebb398e186ae"],
- ["ebb3a0", "e18487e185a8e186af"],
- ["ebb3a0", "ebb398e186af"],
- ["ebb3a1", "e18487e185a8e186b0"],
- ["ebb3a1", "ebb398e186b0"],
- ["ebb3a2", "e18487e185a8e186b1"],
- ["ebb3a2", "ebb398e186b1"],
- ["ebb3a3", "e18487e185a8e186b2"],
- ["ebb3a3", "ebb398e186b2"],
- ["ebb3a4", "e18487e185a8e186b3"],
- ["ebb3a4", "ebb398e186b3"],
- ["ebb3a5", "e18487e185a8e186b4"],
- ["ebb3a5", "ebb398e186b4"],
- ["ebb3a6", "e18487e185a8e186b5"],
- ["ebb3a6", "ebb398e186b5"],
- ["ebb3a7", "e18487e185a8e186b6"],
- ["ebb3a7", "ebb398e186b6"],
- ["ebb3a8", "e18487e185a8e186b7"],
- ["ebb3a8", "ebb398e186b7"],
- ["ebb3a9", "e18487e185a8e186b8"],
- ["ebb3a9", "ebb398e186b8"],
- ["ebb3aa", "e18487e185a8e186b9"],
- ["ebb3aa", "ebb398e186b9"],
- ["ebb3ab", "e18487e185a8e186ba"],
- ["ebb3ab", "ebb398e186ba"],
- ["ebb3ac", "e18487e185a8e186bb"],
- ["ebb3ac", "ebb398e186bb"],
- ["ebb3ad", "e18487e185a8e186bc"],
- ["ebb3ad", "ebb398e186bc"],
- ["ebb3ae", "e18487e185a8e186bd"],
- ["ebb3ae", "ebb398e186bd"],
- ["ebb3af", "e18487e185a8e186be"],
- ["ebb3af", "ebb398e186be"],
- ["ebb3b0", "e18487e185a8e186bf"],
- ["ebb3b0", "ebb398e186bf"],
- ["ebb3b1", "e18487e185a8e18780"],
- ["ebb3b1", "ebb398e18780"],
- ["ebb3b2", "e18487e185a8e18781"],
- ["ebb3b2", "ebb398e18781"],
- ["ebb3b3", "e18487e185a8e18782"],
- ["ebb3b3", "ebb398e18782"],
- ["ebb3b4", "e18487e185a9"],
- ["ebb3b5", "e18487e185a9e186a8"],
- ["ebb3b5", "ebb3b4e186a8"],
- ["ebb3b6", "e18487e185a9e186a9"],
- ["ebb3b6", "ebb3b4e186a9"],
- ["ebb3b7", "e18487e185a9e186aa"],
- ["ebb3b7", "ebb3b4e186aa"],
- ["ebb3b8", "e18487e185a9e186ab"],
- ["ebb3b8", "ebb3b4e186ab"],
- ["ebb3b9", "e18487e185a9e186ac"],
- ["ebb3b9", "ebb3b4e186ac"],
- ["ebb3ba", "e18487e185a9e186ad"],
- ["ebb3ba", "ebb3b4e186ad"],
- ["ebb3bb", "e18487e185a9e186ae"],
- ["ebb3bb", "ebb3b4e186ae"],
- ["ebb3bc", "e18487e185a9e186af"],
- ["ebb3bc", "ebb3b4e186af"],
- ["ebb3bd", "e18487e185a9e186b0"],
- ["ebb3bd", "ebb3b4e186b0"],
- ["ebb3be", "e18487e185a9e186b1"],
- ["ebb3be", "ebb3b4e186b1"],
- ["ebb3bf", "e18487e185a9e186b2"],
- ["ebb3bf", "ebb3b4e186b2"],
- ["ebb480", "e18487e185a9e186b3"],
- ["ebb480", "ebb3b4e186b3"],
- ["ebb481", "e18487e185a9e186b4"],
- ["ebb481", "ebb3b4e186b4"],
- ["ebb482", "e18487e185a9e186b5"],
- ["ebb482", "ebb3b4e186b5"],
- ["ebb483", "e18487e185a9e186b6"],
- ["ebb483", "ebb3b4e186b6"],
- ["ebb484", "e18487e185a9e186b7"],
- ["ebb484", "ebb3b4e186b7"],
- ["ebb485", "e18487e185a9e186b8"],
- ["ebb485", "ebb3b4e186b8"],
- ["ebb486", "e18487e185a9e186b9"],
- ["ebb486", "ebb3b4e186b9"],
- ["ebb487", "e18487e185a9e186ba"],
- ["ebb487", "ebb3b4e186ba"],
- ["ebb488", "e18487e185a9e186bb"],
- ["ebb488", "ebb3b4e186bb"],
- ["ebb489", "e18487e185a9e186bc"],
- ["ebb489", "ebb3b4e186bc"],
- ["ebb48a", "e18487e185a9e186bd"],
- ["ebb48a", "ebb3b4e186bd"],
- ["ebb48b", "e18487e185a9e186be"],
- ["ebb48b", "ebb3b4e186be"],
- ["ebb48c", "e18487e185a9e186bf"],
- ["ebb48c", "ebb3b4e186bf"],
- ["ebb48d", "e18487e185a9e18780"],
- ["ebb48d", "ebb3b4e18780"],
- ["ebb48e", "e18487e185a9e18781"],
- ["ebb48e", "ebb3b4e18781"],
- ["ebb48f", "e18487e185a9e18782"],
- ["ebb48f", "ebb3b4e18782"],
- ["ebb490", "e18487e185aa"],
- ["ebb491", "e18487e185aae186a8"],
- ["ebb491", "ebb490e186a8"],
- ["ebb492", "e18487e185aae186a9"],
- ["ebb492", "ebb490e186a9"],
- ["ebb493", "e18487e185aae186aa"],
- ["ebb493", "ebb490e186aa"],
- ["ebb494", "e18487e185aae186ab"],
- ["ebb494", "ebb490e186ab"],
- ["ebb495", "e18487e185aae186ac"],
- ["ebb495", "ebb490e186ac"],
- ["ebb496", "e18487e185aae186ad"],
- ["ebb496", "ebb490e186ad"],
- ["ebb497", "e18487e185aae186ae"],
- ["ebb497", "ebb490e186ae"],
- ["ebb498", "e18487e185aae186af"],
- ["ebb498", "ebb490e186af"],
- ["ebb499", "e18487e185aae186b0"],
- ["ebb499", "ebb490e186b0"],
- ["ebb49a", "e18487e185aae186b1"],
- ["ebb49a", "ebb490e186b1"],
- ["ebb49b", "e18487e185aae186b2"],
- ["ebb49b", "ebb490e186b2"],
- ["ebb49c", "e18487e185aae186b3"],
- ["ebb49c", "ebb490e186b3"],
- ["ebb49d", "e18487e185aae186b4"],
- ["ebb49d", "ebb490e186b4"],
- ["ebb49e", "e18487e185aae186b5"],
- ["ebb49e", "ebb490e186b5"],
- ["ebb49f", "e18487e185aae186b6"],
- ["ebb49f", "ebb490e186b6"],
- ["ebb4a0", "e18487e185aae186b7"],
- ["ebb4a0", "ebb490e186b7"],
- ["ebb4a1", "e18487e185aae186b8"],
- ["ebb4a1", "ebb490e186b8"],
- ["ebb4a2", "e18487e185aae186b9"],
- ["ebb4a2", "ebb490e186b9"],
- ["ebb4a3", "e18487e185aae186ba"],
- ["ebb4a3", "ebb490e186ba"],
- ["ebb4a4", "e18487e185aae186bb"],
- ["ebb4a4", "ebb490e186bb"],
- ["ebb4a5", "e18487e185aae186bc"],
- ["ebb4a5", "ebb490e186bc"],
- ["ebb4a6", "e18487e185aae186bd"],
- ["ebb4a6", "ebb490e186bd"],
- ["ebb4a7", "e18487e185aae186be"],
- ["ebb4a7", "ebb490e186be"],
- ["ebb4a8", "e18487e185aae186bf"],
- ["ebb4a8", "ebb490e186bf"],
- ["ebb4a9", "e18487e185aae18780"],
- ["ebb4a9", "ebb490e18780"],
- ["ebb4aa", "e18487e185aae18781"],
- ["ebb4aa", "ebb490e18781"],
- ["ebb4ab", "e18487e185aae18782"],
- ["ebb4ab", "ebb490e18782"],
- ["ebb4ac", "e18487e185ab"],
- ["ebb4ad", "e18487e185abe186a8"],
- ["ebb4ad", "ebb4ace186a8"],
- ["ebb4ae", "e18487e185abe186a9"],
- ["ebb4ae", "ebb4ace186a9"],
- ["ebb4af", "e18487e185abe186aa"],
- ["ebb4af", "ebb4ace186aa"],
- ["ebb4b0", "e18487e185abe186ab"],
- ["ebb4b0", "ebb4ace186ab"],
- ["ebb4b1", "e18487e185abe186ac"],
- ["ebb4b1", "ebb4ace186ac"],
- ["ebb4b2", "e18487e185abe186ad"],
- ["ebb4b2", "ebb4ace186ad"],
- ["ebb4b3", "e18487e185abe186ae"],
- ["ebb4b3", "ebb4ace186ae"],
- ["ebb4b4", "e18487e185abe186af"],
- ["ebb4b4", "ebb4ace186af"],
- ["ebb4b5", "e18487e185abe186b0"],
- ["ebb4b5", "ebb4ace186b0"],
- ["ebb4b6", "e18487e185abe186b1"],
- ["ebb4b6", "ebb4ace186b1"],
- ["ebb4b7", "e18487e185abe186b2"],
- ["ebb4b7", "ebb4ace186b2"],
- ["ebb4b8", "e18487e185abe186b3"],
- ["ebb4b8", "ebb4ace186b3"],
- ["ebb4b9", "e18487e185abe186b4"],
- ["ebb4b9", "ebb4ace186b4"],
- ["ebb4ba", "e18487e185abe186b5"],
- ["ebb4ba", "ebb4ace186b5"],
- ["ebb4bb", "e18487e185abe186b6"],
- ["ebb4bb", "ebb4ace186b6"],
- ["ebb4bc", "e18487e185abe186b7"],
- ["ebb4bc", "ebb4ace186b7"],
- ["ebb4bd", "e18487e185abe186b8"],
- ["ebb4bd", "ebb4ace186b8"],
- ["ebb4be", "e18487e185abe186b9"],
- ["ebb4be", "ebb4ace186b9"],
- ["ebb4bf", "e18487e185abe186ba"],
- ["ebb4bf", "ebb4ace186ba"],
- ["ebb580", "e18487e185abe186bb"],
- ["ebb580", "ebb4ace186bb"],
- ["ebb581", "e18487e185abe186bc"],
- ["ebb581", "ebb4ace186bc"],
- ["ebb582", "e18487e185abe186bd"],
- ["ebb582", "ebb4ace186bd"],
- ["ebb583", "e18487e185abe186be"],
- ["ebb583", "ebb4ace186be"],
- ["ebb584", "e18487e185abe186bf"],
- ["ebb584", "ebb4ace186bf"],
- ["ebb585", "e18487e185abe18780"],
- ["ebb585", "ebb4ace18780"],
- ["ebb586", "e18487e185abe18781"],
- ["ebb586", "ebb4ace18781"],
- ["ebb587", "e18487e185abe18782"],
- ["ebb587", "ebb4ace18782"],
- ["ebb588", "e18487e185ac"],
- ["ebb589", "e18487e185ace186a8"],
- ["ebb589", "ebb588e186a8"],
- ["ebb58a", "e18487e185ace186a9"],
- ["ebb58a", "ebb588e186a9"],
- ["ebb58b", "e18487e185ace186aa"],
- ["ebb58b", "ebb588e186aa"],
- ["ebb58c", "e18487e185ace186ab"],
- ["ebb58c", "ebb588e186ab"],
- ["ebb58d", "e18487e185ace186ac"],
- ["ebb58d", "ebb588e186ac"],
- ["ebb58e", "e18487e185ace186ad"],
- ["ebb58e", "ebb588e186ad"],
- ["ebb58f", "e18487e185ace186ae"],
- ["ebb58f", "ebb588e186ae"],
- ["ebb590", "e18487e185ace186af"],
- ["ebb590", "ebb588e186af"],
- ["ebb591", "e18487e185ace186b0"],
- ["ebb591", "ebb588e186b0"],
- ["ebb592", "e18487e185ace186b1"],
- ["ebb592", "ebb588e186b1"],
- ["ebb593", "e18487e185ace186b2"],
- ["ebb593", "ebb588e186b2"],
- ["ebb594", "e18487e185ace186b3"],
- ["ebb594", "ebb588e186b3"],
- ["ebb595", "e18487e185ace186b4"],
- ["ebb595", "ebb588e186b4"],
- ["ebb596", "e18487e185ace186b5"],
- ["ebb596", "ebb588e186b5"],
- ["ebb597", "e18487e185ace186b6"],
- ["ebb597", "ebb588e186b6"],
- ["ebb598", "e18487e185ace186b7"],
- ["ebb598", "ebb588e186b7"],
- ["ebb599", "e18487e185ace186b8"],
- ["ebb599", "ebb588e186b8"],
- ["ebb59a", "e18487e185ace186b9"],
- ["ebb59a", "ebb588e186b9"],
- ["ebb59b", "e18487e185ace186ba"],
- ["ebb59b", "ebb588e186ba"],
- ["ebb59c", "e18487e185ace186bb"],
- ["ebb59c", "ebb588e186bb"],
- ["ebb59d", "e18487e185ace186bc"],
- ["ebb59d", "ebb588e186bc"],
- ["ebb59e", "e18487e185ace186bd"],
- ["ebb59e", "ebb588e186bd"],
- ["ebb59f", "e18487e185ace186be"],
- ["ebb59f", "ebb588e186be"],
- ["ebb5a0", "e18487e185ace186bf"],
- ["ebb5a0", "ebb588e186bf"],
- ["ebb5a1", "e18487e185ace18780"],
- ["ebb5a1", "ebb588e18780"],
- ["ebb5a2", "e18487e185ace18781"],
- ["ebb5a2", "ebb588e18781"],
- ["ebb5a3", "e18487e185ace18782"],
- ["ebb5a3", "ebb588e18782"],
- ["ebb5a4", "e18487e185ad"],
- ["ebb5a5", "e18487e185ade186a8"],
- ["ebb5a5", "ebb5a4e186a8"],
- ["ebb5a6", "e18487e185ade186a9"],
- ["ebb5a6", "ebb5a4e186a9"],
- ["ebb5a7", "e18487e185ade186aa"],
- ["ebb5a7", "ebb5a4e186aa"],
- ["ebb5a8", "e18487e185ade186ab"],
- ["ebb5a8", "ebb5a4e186ab"],
- ["ebb5a9", "e18487e185ade186ac"],
- ["ebb5a9", "ebb5a4e186ac"],
- ["ebb5aa", "e18487e185ade186ad"],
- ["ebb5aa", "ebb5a4e186ad"],
- ["ebb5ab", "e18487e185ade186ae"],
- ["ebb5ab", "ebb5a4e186ae"],
- ["ebb5ac", "e18487e185ade186af"],
- ["ebb5ac", "ebb5a4e186af"],
- ["ebb5ad", "e18487e185ade186b0"],
- ["ebb5ad", "ebb5a4e186b0"],
- ["ebb5ae", "e18487e185ade186b1"],
- ["ebb5ae", "ebb5a4e186b1"],
- ["ebb5af", "e18487e185ade186b2"],
- ["ebb5af", "ebb5a4e186b2"],
- ["ebb5b0", "e18487e185ade186b3"],
- ["ebb5b0", "ebb5a4e186b3"],
- ["ebb5b1", "e18487e185ade186b4"],
- ["ebb5b1", "ebb5a4e186b4"],
- ["ebb5b2", "e18487e185ade186b5"],
- ["ebb5b2", "ebb5a4e186b5"],
- ["ebb5b3", "e18487e185ade186b6"],
- ["ebb5b3", "ebb5a4e186b6"],
- ["ebb5b4", "e18487e185ade186b7"],
- ["ebb5b4", "ebb5a4e186b7"],
- ["ebb5b5", "e18487e185ade186b8"],
- ["ebb5b5", "ebb5a4e186b8"],
- ["ebb5b6", "e18487e185ade186b9"],
- ["ebb5b6", "ebb5a4e186b9"],
- ["ebb5b7", "e18487e185ade186ba"],
- ["ebb5b7", "ebb5a4e186ba"],
- ["ebb5b8", "e18487e185ade186bb"],
- ["ebb5b8", "ebb5a4e186bb"],
- ["ebb5b9", "e18487e185ade186bc"],
- ["ebb5b9", "ebb5a4e186bc"],
- ["ebb5ba", "e18487e185ade186bd"],
- ["ebb5ba", "ebb5a4e186bd"],
- ["ebb5bb", "e18487e185ade186be"],
- ["ebb5bb", "ebb5a4e186be"],
- ["ebb5bc", "e18487e185ade186bf"],
- ["ebb5bc", "ebb5a4e186bf"],
- ["ebb5bd", "e18487e185ade18780"],
- ["ebb5bd", "ebb5a4e18780"],
- ["ebb5be", "e18487e185ade18781"],
- ["ebb5be", "ebb5a4e18781"],
- ["ebb5bf", "e18487e185ade18782"],
- ["ebb5bf", "ebb5a4e18782"],
- ["ebb680", "e18487e185ae"],
- ["ebb681", "e18487e185aee186a8"],
- ["ebb681", "ebb680e186a8"],
- ["ebb682", "e18487e185aee186a9"],
- ["ebb682", "ebb680e186a9"],
- ["ebb683", "e18487e185aee186aa"],
- ["ebb683", "ebb680e186aa"],
- ["ebb684", "e18487e185aee186ab"],
- ["ebb684", "ebb680e186ab"],
- ["ebb685", "e18487e185aee186ac"],
- ["ebb685", "ebb680e186ac"],
- ["ebb686", "e18487e185aee186ad"],
- ["ebb686", "ebb680e186ad"],
- ["ebb687", "e18487e185aee186ae"],
- ["ebb687", "ebb680e186ae"],
- ["ebb688", "e18487e185aee186af"],
- ["ebb688", "ebb680e186af"],
- ["ebb689", "e18487e185aee186b0"],
- ["ebb689", "ebb680e186b0"],
- ["ebb68a", "e18487e185aee186b1"],
- ["ebb68a", "ebb680e186b1"],
- ["ebb68b", "e18487e185aee186b2"],
- ["ebb68b", "ebb680e186b2"],
- ["ebb68c", "e18487e185aee186b3"],
- ["ebb68c", "ebb680e186b3"],
- ["ebb68d", "e18487e185aee186b4"],
- ["ebb68d", "ebb680e186b4"],
- ["ebb68e", "e18487e185aee186b5"],
- ["ebb68e", "ebb680e186b5"],
- ["ebb68f", "e18487e185aee186b6"],
- ["ebb68f", "ebb680e186b6"],
- ["ebb690", "e18487e185aee186b7"],
- ["ebb690", "ebb680e186b7"],
- ["ebb691", "e18487e185aee186b8"],
- ["ebb691", "ebb680e186b8"],
- ["ebb692", "e18487e185aee186b9"],
- ["ebb692", "ebb680e186b9"],
- ["ebb693", "e18487e185aee186ba"],
- ["ebb693", "ebb680e186ba"],
- ["ebb694", "e18487e185aee186bb"],
- ["ebb694", "ebb680e186bb"],
- ["ebb695", "e18487e185aee186bc"],
- ["ebb695", "ebb680e186bc"],
- ["ebb696", "e18487e185aee186bd"],
- ["ebb696", "ebb680e186bd"],
- ["ebb697", "e18487e185aee186be"],
- ["ebb697", "ebb680e186be"],
- ["ebb698", "e18487e185aee186bf"],
- ["ebb698", "ebb680e186bf"],
- ["ebb699", "e18487e185aee18780"],
- ["ebb699", "ebb680e18780"],
- ["ebb69a", "e18487e185aee18781"],
- ["ebb69a", "ebb680e18781"],
- ["ebb69b", "e18487e185aee18782"],
- ["ebb69b", "ebb680e18782"],
- ["ebb69c", "e18487e185af"],
- ["ebb69d", "e18487e185afe186a8"],
- ["ebb69d", "ebb69ce186a8"],
- ["ebb69e", "e18487e185afe186a9"],
- ["ebb69e", "ebb69ce186a9"],
- ["ebb69f", "e18487e185afe186aa"],
- ["ebb69f", "ebb69ce186aa"],
- ["ebb6a0", "e18487e185afe186ab"],
- ["ebb6a0", "ebb69ce186ab"],
- ["ebb6a1", "e18487e185afe186ac"],
- ["ebb6a1", "ebb69ce186ac"],
- ["ebb6a2", "e18487e185afe186ad"],
- ["ebb6a2", "ebb69ce186ad"],
- ["ebb6a3", "e18487e185afe186ae"],
- ["ebb6a3", "ebb69ce186ae"],
- ["ebb6a4", "e18487e185afe186af"],
- ["ebb6a4", "ebb69ce186af"],
- ["ebb6a5", "e18487e185afe186b0"],
- ["ebb6a5", "ebb69ce186b0"],
- ["ebb6a6", "e18487e185afe186b1"],
- ["ebb6a6", "ebb69ce186b1"],
- ["ebb6a7", "e18487e185afe186b2"],
- ["ebb6a7", "ebb69ce186b2"],
- ["ebb6a8", "e18487e185afe186b3"],
- ["ebb6a8", "ebb69ce186b3"],
- ["ebb6a9", "e18487e185afe186b4"],
- ["ebb6a9", "ebb69ce186b4"],
- ["ebb6aa", "e18487e185afe186b5"],
- ["ebb6aa", "ebb69ce186b5"],
- ["ebb6ab", "e18487e185afe186b6"],
- ["ebb6ab", "ebb69ce186b6"],
- ["ebb6ac", "e18487e185afe186b7"],
- ["ebb6ac", "ebb69ce186b7"],
- ["ebb6ad", "e18487e185afe186b8"],
- ["ebb6ad", "ebb69ce186b8"],
- ["ebb6ae", "e18487e185afe186b9"],
- ["ebb6ae", "ebb69ce186b9"],
- ["ebb6af", "e18487e185afe186ba"],
- ["ebb6af", "ebb69ce186ba"],
- ["ebb6b0", "e18487e185afe186bb"],
- ["ebb6b0", "ebb69ce186bb"],
- ["ebb6b1", "e18487e185afe186bc"],
- ["ebb6b1", "ebb69ce186bc"],
- ["ebb6b2", "e18487e185afe186bd"],
- ["ebb6b2", "ebb69ce186bd"],
- ["ebb6b3", "e18487e185afe186be"],
- ["ebb6b3", "ebb69ce186be"],
- ["ebb6b4", "e18487e185afe186bf"],
- ["ebb6b4", "ebb69ce186bf"],
- ["ebb6b5", "e18487e185afe18780"],
- ["ebb6b5", "ebb69ce18780"],
- ["ebb6b6", "e18487e185afe18781"],
- ["ebb6b6", "ebb69ce18781"],
- ["ebb6b7", "e18487e185afe18782"],
- ["ebb6b7", "ebb69ce18782"],
- ["ebb6b8", "e18487e185b0"],
- ["ebb6b9", "e18487e185b0e186a8"],
- ["ebb6b9", "ebb6b8e186a8"],
- ["ebb6ba", "e18487e185b0e186a9"],
- ["ebb6ba", "ebb6b8e186a9"],
- ["ebb6bb", "e18487e185b0e186aa"],
- ["ebb6bb", "ebb6b8e186aa"],
- ["ebb6bc", "e18487e185b0e186ab"],
- ["ebb6bc", "ebb6b8e186ab"],
- ["ebb6bd", "e18487e185b0e186ac"],
- ["ebb6bd", "ebb6b8e186ac"],
- ["ebb6be", "e18487e185b0e186ad"],
- ["ebb6be", "ebb6b8e186ad"],
- ["ebb6bf", "e18487e185b0e186ae"],
- ["ebb6bf", "ebb6b8e186ae"],
- ["ebb780", "e18487e185b0e186af"],
- ["ebb780", "ebb6b8e186af"],
- ["ebb781", "e18487e185b0e186b0"],
- ["ebb781", "ebb6b8e186b0"],
- ["ebb782", "e18487e185b0e186b1"],
- ["ebb782", "ebb6b8e186b1"],
- ["ebb783", "e18487e185b0e186b2"],
- ["ebb783", "ebb6b8e186b2"],
- ["ebb784", "e18487e185b0e186b3"],
- ["ebb784", "ebb6b8e186b3"],
- ["ebb785", "e18487e185b0e186b4"],
- ["ebb785", "ebb6b8e186b4"],
- ["ebb786", "e18487e185b0e186b5"],
- ["ebb786", "ebb6b8e186b5"],
- ["ebb787", "e18487e185b0e186b6"],
- ["ebb787", "ebb6b8e186b6"],
- ["ebb788", "e18487e185b0e186b7"],
- ["ebb788", "ebb6b8e186b7"],
- ["ebb789", "e18487e185b0e186b8"],
- ["ebb789", "ebb6b8e186b8"],
- ["ebb78a", "e18487e185b0e186b9"],
- ["ebb78a", "ebb6b8e186b9"],
- ["ebb78b", "e18487e185b0e186ba"],
- ["ebb78b", "ebb6b8e186ba"],
- ["ebb78c", "e18487e185b0e186bb"],
- ["ebb78c", "ebb6b8e186bb"],
- ["ebb78d", "e18487e185b0e186bc"],
- ["ebb78d", "ebb6b8e186bc"],
- ["ebb78e", "e18487e185b0e186bd"],
- ["ebb78e", "ebb6b8e186bd"],
- ["ebb78f", "e18487e185b0e186be"],
- ["ebb78f", "ebb6b8e186be"],
- ["ebb790", "e18487e185b0e186bf"],
- ["ebb790", "ebb6b8e186bf"],
- ["ebb791", "e18487e185b0e18780"],
- ["ebb791", "ebb6b8e18780"],
- ["ebb792", "e18487e185b0e18781"],
- ["ebb792", "ebb6b8e18781"],
- ["ebb793", "e18487e185b0e18782"],
- ["ebb793", "ebb6b8e18782"],
- ["ebb794", "e18487e185b1"],
- ["ebb795", "e18487e185b1e186a8"],
- ["ebb795", "ebb794e186a8"],
- ["ebb796", "e18487e185b1e186a9"],
- ["ebb796", "ebb794e186a9"],
- ["ebb797", "e18487e185b1e186aa"],
- ["ebb797", "ebb794e186aa"],
- ["ebb798", "e18487e185b1e186ab"],
- ["ebb798", "ebb794e186ab"],
- ["ebb799", "e18487e185b1e186ac"],
- ["ebb799", "ebb794e186ac"],
- ["ebb79a", "e18487e185b1e186ad"],
- ["ebb79a", "ebb794e186ad"],
- ["ebb79b", "e18487e185b1e186ae"],
- ["ebb79b", "ebb794e186ae"],
- ["ebb79c", "e18487e185b1e186af"],
- ["ebb79c", "ebb794e186af"],
- ["ebb79d", "e18487e185b1e186b0"],
- ["ebb79d", "ebb794e186b0"],
- ["ebb79e", "e18487e185b1e186b1"],
- ["ebb79e", "ebb794e186b1"],
- ["ebb79f", "e18487e185b1e186b2"],
- ["ebb79f", "ebb794e186b2"],
- ["ebb7a0", "e18487e185b1e186b3"],
- ["ebb7a0", "ebb794e186b3"],
- ["ebb7a1", "e18487e185b1e186b4"],
- ["ebb7a1", "ebb794e186b4"],
- ["ebb7a2", "e18487e185b1e186b5"],
- ["ebb7a2", "ebb794e186b5"],
- ["ebb7a3", "e18487e185b1e186b6"],
- ["ebb7a3", "ebb794e186b6"],
- ["ebb7a4", "e18487e185b1e186b7"],
- ["ebb7a4", "ebb794e186b7"],
- ["ebb7a5", "e18487e185b1e186b8"],
- ["ebb7a5", "ebb794e186b8"],
- ["ebb7a6", "e18487e185b1e186b9"],
- ["ebb7a6", "ebb794e186b9"],
- ["ebb7a7", "e18487e185b1e186ba"],
- ["ebb7a7", "ebb794e186ba"],
- ["ebb7a8", "e18487e185b1e186bb"],
- ["ebb7a8", "ebb794e186bb"],
- ["ebb7a9", "e18487e185b1e186bc"],
- ["ebb7a9", "ebb794e186bc"],
- ["ebb7aa", "e18487e185b1e186bd"],
- ["ebb7aa", "ebb794e186bd"],
- ["ebb7ab", "e18487e185b1e186be"],
- ["ebb7ab", "ebb794e186be"],
- ["ebb7ac", "e18487e185b1e186bf"],
- ["ebb7ac", "ebb794e186bf"],
- ["ebb7ad", "e18487e185b1e18780"],
- ["ebb7ad", "ebb794e18780"],
- ["ebb7ae", "e18487e185b1e18781"],
- ["ebb7ae", "ebb794e18781"],
- ["ebb7af", "e18487e185b1e18782"],
- ["ebb7af", "ebb794e18782"],
- ["ebb7b0", "e18487e185b2"],
- ["ebb7b1", "e18487e185b2e186a8"],
- ["ebb7b1", "ebb7b0e186a8"],
- ["ebb7b2", "e18487e185b2e186a9"],
- ["ebb7b2", "ebb7b0e186a9"],
- ["ebb7b3", "e18487e185b2e186aa"],
- ["ebb7b3", "ebb7b0e186aa"],
- ["ebb7b4", "e18487e185b2e186ab"],
- ["ebb7b4", "ebb7b0e186ab"],
- ["ebb7b5", "e18487e185b2e186ac"],
- ["ebb7b5", "ebb7b0e186ac"],
- ["ebb7b6", "e18487e185b2e186ad"],
- ["ebb7b6", "ebb7b0e186ad"],
- ["ebb7b7", "e18487e185b2e186ae"],
- ["ebb7b7", "ebb7b0e186ae"],
- ["ebb7b8", "e18487e185b2e186af"],
- ["ebb7b8", "ebb7b0e186af"],
- ["ebb7b9", "e18487e185b2e186b0"],
- ["ebb7b9", "ebb7b0e186b0"],
- ["ebb7ba", "e18487e185b2e186b1"],
- ["ebb7ba", "ebb7b0e186b1"],
- ["ebb7bb", "e18487e185b2e186b2"],
- ["ebb7bb", "ebb7b0e186b2"],
- ["ebb7bc", "e18487e185b2e186b3"],
- ["ebb7bc", "ebb7b0e186b3"],
- ["ebb7bd", "e18487e185b2e186b4"],
- ["ebb7bd", "ebb7b0e186b4"],
- ["ebb7be", "e18487e185b2e186b5"],
- ["ebb7be", "ebb7b0e186b5"],
- ["ebb7bf", "e18487e185b2e186b6"],
- ["ebb7bf", "ebb7b0e186b6"],
- ["ebb880", "e18487e185b2e186b7"],
- ["ebb880", "ebb7b0e186b7"],
- ["ebb881", "e18487e185b2e186b8"],
- ["ebb881", "ebb7b0e186b8"],
- ["ebb882", "e18487e185b2e186b9"],
- ["ebb882", "ebb7b0e186b9"],
- ["ebb883", "e18487e185b2e186ba"],
- ["ebb883", "ebb7b0e186ba"],
- ["ebb884", "e18487e185b2e186bb"],
- ["ebb884", "ebb7b0e186bb"],
- ["ebb885", "e18487e185b2e186bc"],
- ["ebb885", "ebb7b0e186bc"],
- ["ebb886", "e18487e185b2e186bd"],
- ["ebb886", "ebb7b0e186bd"],
- ["ebb887", "e18487e185b2e186be"],
- ["ebb887", "ebb7b0e186be"],
- ["ebb888", "e18487e185b2e186bf"],
- ["ebb888", "ebb7b0e186bf"],
- ["ebb889", "e18487e185b2e18780"],
- ["ebb889", "ebb7b0e18780"],
- ["ebb88a", "e18487e185b2e18781"],
- ["ebb88a", "ebb7b0e18781"],
- ["ebb88b", "e18487e185b2e18782"],
- ["ebb88b", "ebb7b0e18782"],
- ["ebb88c", "e18487e185b3"],
- ["ebb88d", "e18487e185b3e186a8"],
- ["ebb88d", "ebb88ce186a8"],
- ["ebb88e", "e18487e185b3e186a9"],
- ["ebb88e", "ebb88ce186a9"],
- ["ebb88f", "e18487e185b3e186aa"],
- ["ebb88f", "ebb88ce186aa"],
- ["ebb890", "e18487e185b3e186ab"],
- ["ebb890", "ebb88ce186ab"],
- ["ebb891", "e18487e185b3e186ac"],
- ["ebb891", "ebb88ce186ac"],
- ["ebb892", "e18487e185b3e186ad"],
- ["ebb892", "ebb88ce186ad"],
- ["ebb893", "e18487e185b3e186ae"],
- ["ebb893", "ebb88ce186ae"],
- ["ebb894", "e18487e185b3e186af"],
- ["ebb894", "ebb88ce186af"],
- ["ebb895", "e18487e185b3e186b0"],
- ["ebb895", "ebb88ce186b0"],
- ["ebb896", "e18487e185b3e186b1"],
- ["ebb896", "ebb88ce186b1"],
- ["ebb897", "e18487e185b3e186b2"],
- ["ebb897", "ebb88ce186b2"],
- ["ebb898", "e18487e185b3e186b3"],
- ["ebb898", "ebb88ce186b3"],
- ["ebb899", "e18487e185b3e186b4"],
- ["ebb899", "ebb88ce186b4"],
- ["ebb89a", "e18487e185b3e186b5"],
- ["ebb89a", "ebb88ce186b5"],
- ["ebb89b", "e18487e185b3e186b6"],
- ["ebb89b", "ebb88ce186b6"],
- ["ebb89c", "e18487e185b3e186b7"],
- ["ebb89c", "ebb88ce186b7"],
- ["ebb89d", "e18487e185b3e186b8"],
- ["ebb89d", "ebb88ce186b8"],
- ["ebb89e", "e18487e185b3e186b9"],
- ["ebb89e", "ebb88ce186b9"],
- ["ebb89f", "e18487e185b3e186ba"],
- ["ebb89f", "ebb88ce186ba"],
- ["ebb8a0", "e18487e185b3e186bb"],
- ["ebb8a0", "ebb88ce186bb"],
- ["ebb8a1", "e18487e185b3e186bc"],
- ["ebb8a1", "ebb88ce186bc"],
- ["ebb8a2", "e18487e185b3e186bd"],
- ["ebb8a2", "ebb88ce186bd"],
- ["ebb8a3", "e18487e185b3e186be"],
- ["ebb8a3", "ebb88ce186be"],
- ["ebb8a4", "e18487e185b3e186bf"],
- ["ebb8a4", "ebb88ce186bf"],
- ["ebb8a5", "e18487e185b3e18780"],
- ["ebb8a5", "ebb88ce18780"],
- ["ebb8a6", "e18487e185b3e18781"],
- ["ebb8a6", "ebb88ce18781"],
- ["ebb8a7", "e18487e185b3e18782"],
- ["ebb8a7", "ebb88ce18782"],
- ["ebb8a8", "e18487e185b4"],
- ["ebb8a9", "e18487e185b4e186a8"],
- ["ebb8a9", "ebb8a8e186a8"],
- ["ebb8aa", "e18487e185b4e186a9"],
- ["ebb8aa", "ebb8a8e186a9"],
- ["ebb8ab", "e18487e185b4e186aa"],
- ["ebb8ab", "ebb8a8e186aa"],
- ["ebb8ac", "e18487e185b4e186ab"],
- ["ebb8ac", "ebb8a8e186ab"],
- ["ebb8ad", "e18487e185b4e186ac"],
- ["ebb8ad", "ebb8a8e186ac"],
- ["ebb8ae", "e18487e185b4e186ad"],
- ["ebb8ae", "ebb8a8e186ad"],
- ["ebb8af", "e18487e185b4e186ae"],
- ["ebb8af", "ebb8a8e186ae"],
- ["ebb8b0", "e18487e185b4e186af"],
- ["ebb8b0", "ebb8a8e186af"],
- ["ebb8b1", "e18487e185b4e186b0"],
- ["ebb8b1", "ebb8a8e186b0"],
- ["ebb8b2", "e18487e185b4e186b1"],
- ["ebb8b2", "ebb8a8e186b1"],
- ["ebb8b3", "e18487e185b4e186b2"],
- ["ebb8b3", "ebb8a8e186b2"],
- ["ebb8b4", "e18487e185b4e186b3"],
- ["ebb8b4", "ebb8a8e186b3"],
- ["ebb8b5", "e18487e185b4e186b4"],
- ["ebb8b5", "ebb8a8e186b4"],
- ["ebb8b6", "e18487e185b4e186b5"],
- ["ebb8b6", "ebb8a8e186b5"],
- ["ebb8b7", "e18487e185b4e186b6"],
- ["ebb8b7", "ebb8a8e186b6"],
- ["ebb8b8", "e18487e185b4e186b7"],
- ["ebb8b8", "ebb8a8e186b7"],
- ["ebb8b9", "e18487e185b4e186b8"],
- ["ebb8b9", "ebb8a8e186b8"],
- ["ebb8ba", "e18487e185b4e186b9"],
- ["ebb8ba", "ebb8a8e186b9"],
- ["ebb8bb", "e18487e185b4e186ba"],
- ["ebb8bb", "ebb8a8e186ba"],
- ["ebb8bc", "e18487e185b4e186bb"],
- ["ebb8bc", "ebb8a8e186bb"],
- ["ebb8bd", "e18487e185b4e186bc"],
- ["ebb8bd", "ebb8a8e186bc"],
- ["ebb8be", "e18487e185b4e186bd"],
- ["ebb8be", "ebb8a8e186bd"],
- ["ebb8bf", "e18487e185b4e186be"],
- ["ebb8bf", "ebb8a8e186be"],
- ["ebb980", "e18487e185b4e186bf"],
- ["ebb980", "ebb8a8e186bf"],
- ["ebb981", "e18487e185b4e18780"],
- ["ebb981", "ebb8a8e18780"],
- ["ebb982", "e18487e185b4e18781"],
- ["ebb982", "ebb8a8e18781"],
- ["ebb983", "e18487e185b4e18782"],
- ["ebb983", "ebb8a8e18782"],
- ["ebb984", "e18487e185b5"],
- ["ebb985", "e18487e185b5e186a8"],
- ["ebb985", "ebb984e186a8"],
- ["ebb986", "e18487e185b5e186a9"],
- ["ebb986", "ebb984e186a9"],
- ["ebb987", "e18487e185b5e186aa"],
- ["ebb987", "ebb984e186aa"],
- ["ebb988", "e18487e185b5e186ab"],
- ["ebb988", "ebb984e186ab"],
- ["ebb989", "e18487e185b5e186ac"],
- ["ebb989", "ebb984e186ac"],
- ["ebb98a", "e18487e185b5e186ad"],
- ["ebb98a", "ebb984e186ad"],
- ["ebb98b", "e18487e185b5e186ae"],
- ["ebb98b", "ebb984e186ae"],
- ["ebb98c", "e18487e185b5e186af"],
- ["ebb98c", "ebb984e186af"],
- ["ebb98d", "e18487e185b5e186b0"],
- ["ebb98d", "ebb984e186b0"],
- ["ebb98e", "e18487e185b5e186b1"],
- ["ebb98e", "ebb984e186b1"],
- ["ebb98f", "e18487e185b5e186b2"],
- ["ebb98f", "ebb984e186b2"],
- ["ebb990", "e18487e185b5e186b3"],
- ["ebb990", "ebb984e186b3"],
- ["ebb991", "e18487e185b5e186b4"],
- ["ebb991", "ebb984e186b4"],
- ["ebb992", "e18487e185b5e186b5"],
- ["ebb992", "ebb984e186b5"],
- ["ebb993", "e18487e185b5e186b6"],
- ["ebb993", "ebb984e186b6"],
- ["ebb994", "e18487e185b5e186b7"],
- ["ebb994", "ebb984e186b7"],
- ["ebb995", "e18487e185b5e186b8"],
- ["ebb995", "ebb984e186b8"],
- ["ebb996", "e18487e185b5e186b9"],
- ["ebb996", "ebb984e186b9"],
- ["ebb997", "e18487e185b5e186ba"],
- ["ebb997", "ebb984e186ba"],
- ["ebb998", "e18487e185b5e186bb"],
- ["ebb998", "ebb984e186bb"],
- ["ebb999", "e18487e185b5e186bc"],
- ["ebb999", "ebb984e186bc"],
- ["ebb99a", "e18487e185b5e186bd"],
- ["ebb99a", "ebb984e186bd"],
- ["ebb99b", "e18487e185b5e186be"],
- ["ebb99b", "ebb984e186be"],
- ["ebb99c", "e18487e185b5e186bf"],
- ["ebb99c", "ebb984e186bf"],
- ["ebb99d", "e18487e185b5e18780"],
- ["ebb99d", "ebb984e18780"],
- ["ebb99e", "e18487e185b5e18781"],
- ["ebb99e", "ebb984e18781"],
- ["ebb99f", "e18487e185b5e18782"],
- ["ebb99f", "ebb984e18782"],
- ["ebb9a0", "e18488e185a1"],
- ["ebb9a1", "e18488e185a1e186a8"],
- ["ebb9a1", "ebb9a0e186a8"],
- ["ebb9a2", "e18488e185a1e186a9"],
- ["ebb9a2", "ebb9a0e186a9"],
- ["ebb9a3", "e18488e185a1e186aa"],
- ["ebb9a3", "ebb9a0e186aa"],
- ["ebb9a4", "e18488e185a1e186ab"],
- ["ebb9a4", "ebb9a0e186ab"],
- ["ebb9a5", "e18488e185a1e186ac"],
- ["ebb9a5", "ebb9a0e186ac"],
- ["ebb9a6", "e18488e185a1e186ad"],
- ["ebb9a6", "ebb9a0e186ad"],
- ["ebb9a7", "e18488e185a1e186ae"],
- ["ebb9a7", "ebb9a0e186ae"],
- ["ebb9a8", "e18488e185a1e186af"],
- ["ebb9a8", "ebb9a0e186af"],
- ["ebb9a9", "e18488e185a1e186b0"],
- ["ebb9a9", "ebb9a0e186b0"],
- ["ebb9aa", "e18488e185a1e186b1"],
- ["ebb9aa", "ebb9a0e186b1"],
- ["ebb9ab", "e18488e185a1e186b2"],
- ["ebb9ab", "ebb9a0e186b2"],
- ["ebb9ac", "e18488e185a1e186b3"],
- ["ebb9ac", "ebb9a0e186b3"],
- ["ebb9ad", "e18488e185a1e186b4"],
- ["ebb9ad", "ebb9a0e186b4"],
- ["ebb9ae", "e18488e185a1e186b5"],
- ["ebb9ae", "ebb9a0e186b5"],
- ["ebb9af", "e18488e185a1e186b6"],
- ["ebb9af", "ebb9a0e186b6"],
- ["ebb9b0", "e18488e185a1e186b7"],
- ["ebb9b0", "ebb9a0e186b7"],
- ["ebb9b1", "e18488e185a1e186b8"],
- ["ebb9b1", "ebb9a0e186b8"],
- ["ebb9b2", "e18488e185a1e186b9"],
- ["ebb9b2", "ebb9a0e186b9"],
- ["ebb9b3", "e18488e185a1e186ba"],
- ["ebb9b3", "ebb9a0e186ba"],
- ["ebb9b4", "e18488e185a1e186bb"],
- ["ebb9b4", "ebb9a0e186bb"],
- ["ebb9b5", "e18488e185a1e186bc"],
- ["ebb9b5", "ebb9a0e186bc"],
- ["ebb9b6", "e18488e185a1e186bd"],
- ["ebb9b6", "ebb9a0e186bd"],
- ["ebb9b7", "e18488e185a1e186be"],
- ["ebb9b7", "ebb9a0e186be"],
- ["ebb9b8", "e18488e185a1e186bf"],
- ["ebb9b8", "ebb9a0e186bf"],
- ["ebb9b9", "e18488e185a1e18780"],
- ["ebb9b9", "ebb9a0e18780"],
- ["ebb9ba", "e18488e185a1e18781"],
- ["ebb9ba", "ebb9a0e18781"],
- ["ebb9bb", "e18488e185a1e18782"],
- ["ebb9bb", "ebb9a0e18782"],
- ["ebb9bc", "e18488e185a2"],
- ["ebb9bd", "e18488e185a2e186a8"],
- ["ebb9bd", "ebb9bce186a8"],
- ["ebb9be", "e18488e185a2e186a9"],
- ["ebb9be", "ebb9bce186a9"],
- ["ebb9bf", "e18488e185a2e186aa"],
- ["ebb9bf", "ebb9bce186aa"],
- ["ebba80", "e18488e185a2e186ab"],
- ["ebba80", "ebb9bce186ab"],
- ["ebba81", "e18488e185a2e186ac"],
- ["ebba81", "ebb9bce186ac"],
- ["ebba82", "e18488e185a2e186ad"],
- ["ebba82", "ebb9bce186ad"],
- ["ebba83", "e18488e185a2e186ae"],
- ["ebba83", "ebb9bce186ae"],
- ["ebba84", "e18488e185a2e186af"],
- ["ebba84", "ebb9bce186af"],
- ["ebba85", "e18488e185a2e186b0"],
- ["ebba85", "ebb9bce186b0"],
- ["ebba86", "e18488e185a2e186b1"],
- ["ebba86", "ebb9bce186b1"],
- ["ebba87", "e18488e185a2e186b2"],
- ["ebba87", "ebb9bce186b2"],
- ["ebba88", "e18488e185a2e186b3"],
- ["ebba88", "ebb9bce186b3"],
- ["ebba89", "e18488e185a2e186b4"],
- ["ebba89", "ebb9bce186b4"],
- ["ebba8a", "e18488e185a2e186b5"],
- ["ebba8a", "ebb9bce186b5"],
- ["ebba8b", "e18488e185a2e186b6"],
- ["ebba8b", "ebb9bce186b6"],
- ["ebba8c", "e18488e185a2e186b7"],
- ["ebba8c", "ebb9bce186b7"],
- ["ebba8d", "e18488e185a2e186b8"],
- ["ebba8d", "ebb9bce186b8"],
- ["ebba8e", "e18488e185a2e186b9"],
- ["ebba8e", "ebb9bce186b9"],
- ["ebba8f", "e18488e185a2e186ba"],
- ["ebba8f", "ebb9bce186ba"],
- ["ebba90", "e18488e185a2e186bb"],
- ["ebba90", "ebb9bce186bb"],
- ["ebba91", "e18488e185a2e186bc"],
- ["ebba91", "ebb9bce186bc"],
- ["ebba92", "e18488e185a2e186bd"],
- ["ebba92", "ebb9bce186bd"],
- ["ebba93", "e18488e185a2e186be"],
- ["ebba93", "ebb9bce186be"],
- ["ebba94", "e18488e185a2e186bf"],
- ["ebba94", "ebb9bce186bf"],
- ["ebba95", "e18488e185a2e18780"],
- ["ebba95", "ebb9bce18780"],
- ["ebba96", "e18488e185a2e18781"],
- ["ebba96", "ebb9bce18781"],
- ["ebba97", "e18488e185a2e18782"],
- ["ebba97", "ebb9bce18782"],
- ["ebba98", "e18488e185a3"],
- ["ebba99", "e18488e185a3e186a8"],
- ["ebba99", "ebba98e186a8"],
- ["ebba9a", "e18488e185a3e186a9"],
- ["ebba9a", "ebba98e186a9"],
- ["ebba9b", "e18488e185a3e186aa"],
- ["ebba9b", "ebba98e186aa"],
- ["ebba9c", "e18488e185a3e186ab"],
- ["ebba9c", "ebba98e186ab"],
- ["ebba9d", "e18488e185a3e186ac"],
- ["ebba9d", "ebba98e186ac"],
- ["ebba9e", "e18488e185a3e186ad"],
- ["ebba9e", "ebba98e186ad"],
- ["ebba9f", "e18488e185a3e186ae"],
- ["ebba9f", "ebba98e186ae"],
- ["ebbaa0", "e18488e185a3e186af"],
- ["ebbaa0", "ebba98e186af"],
- ["ebbaa1", "e18488e185a3e186b0"],
- ["ebbaa1", "ebba98e186b0"],
- ["ebbaa2", "e18488e185a3e186b1"],
- ["ebbaa2", "ebba98e186b1"],
- ["ebbaa3", "e18488e185a3e186b2"],
- ["ebbaa3", "ebba98e186b2"],
- ["ebbaa4", "e18488e185a3e186b3"],
- ["ebbaa4", "ebba98e186b3"],
- ["ebbaa5", "e18488e185a3e186b4"],
- ["ebbaa5", "ebba98e186b4"],
- ["ebbaa6", "e18488e185a3e186b5"],
- ["ebbaa6", "ebba98e186b5"],
- ["ebbaa7", "e18488e185a3e186b6"],
- ["ebbaa7", "ebba98e186b6"],
- ["ebbaa8", "e18488e185a3e186b7"],
- ["ebbaa8", "ebba98e186b7"],
- ["ebbaa9", "e18488e185a3e186b8"],
- ["ebbaa9", "ebba98e186b8"],
- ["ebbaaa", "e18488e185a3e186b9"],
- ["ebbaaa", "ebba98e186b9"],
- ["ebbaab", "e18488e185a3e186ba"],
- ["ebbaab", "ebba98e186ba"],
- ["ebbaac", "e18488e185a3e186bb"],
- ["ebbaac", "ebba98e186bb"],
- ["ebbaad", "e18488e185a3e186bc"],
- ["ebbaad", "ebba98e186bc"],
- ["ebbaae", "e18488e185a3e186bd"],
- ["ebbaae", "ebba98e186bd"],
- ["ebbaaf", "e18488e185a3e186be"],
- ["ebbaaf", "ebba98e186be"],
- ["ebbab0", "e18488e185a3e186bf"],
- ["ebbab0", "ebba98e186bf"],
- ["ebbab1", "e18488e185a3e18780"],
- ["ebbab1", "ebba98e18780"],
- ["ebbab2", "e18488e185a3e18781"],
- ["ebbab2", "ebba98e18781"],
- ["ebbab3", "e18488e185a3e18782"],
- ["ebbab3", "ebba98e18782"],
- ["ebbab4", "e18488e185a4"],
- ["ebbab5", "e18488e185a4e186a8"],
- ["ebbab5", "ebbab4e186a8"],
- ["ebbab6", "e18488e185a4e186a9"],
- ["ebbab6", "ebbab4e186a9"],
- ["ebbab7", "e18488e185a4e186aa"],
- ["ebbab7", "ebbab4e186aa"],
- ["ebbab8", "e18488e185a4e186ab"],
- ["ebbab8", "ebbab4e186ab"],
- ["ebbab9", "e18488e185a4e186ac"],
- ["ebbab9", "ebbab4e186ac"],
- ["ebbaba", "e18488e185a4e186ad"],
- ["ebbaba", "ebbab4e186ad"],
- ["ebbabb", "e18488e185a4e186ae"],
- ["ebbabb", "ebbab4e186ae"],
- ["ebbabc", "e18488e185a4e186af"],
- ["ebbabc", "ebbab4e186af"],
- ["ebbabd", "e18488e185a4e186b0"],
- ["ebbabd", "ebbab4e186b0"],
- ["ebbabe", "e18488e185a4e186b1"],
- ["ebbabe", "ebbab4e186b1"],
- ["ebbabf", "e18488e185a4e186b2"],
- ["ebbabf", "ebbab4e186b2"],
- ["ebbb80", "e18488e185a4e186b3"],
- ["ebbb80", "ebbab4e186b3"],
- ["ebbb81", "e18488e185a4e186b4"],
- ["ebbb81", "ebbab4e186b4"],
- ["ebbb82", "e18488e185a4e186b5"],
- ["ebbb82", "ebbab4e186b5"],
- ["ebbb83", "e18488e185a4e186b6"],
- ["ebbb83", "ebbab4e186b6"],
- ["ebbb84", "e18488e185a4e186b7"],
- ["ebbb84", "ebbab4e186b7"],
- ["ebbb85", "e18488e185a4e186b8"],
- ["ebbb85", "ebbab4e186b8"],
- ["ebbb86", "e18488e185a4e186b9"],
- ["ebbb86", "ebbab4e186b9"],
- ["ebbb87", "e18488e185a4e186ba"],
- ["ebbb87", "ebbab4e186ba"],
- ["ebbb88", "e18488e185a4e186bb"],
- ["ebbb88", "ebbab4e186bb"],
- ["ebbb89", "e18488e185a4e186bc"],
- ["ebbb89", "ebbab4e186bc"],
- ["ebbb8a", "e18488e185a4e186bd"],
- ["ebbb8a", "ebbab4e186bd"],
- ["ebbb8b", "e18488e185a4e186be"],
- ["ebbb8b", "ebbab4e186be"],
- ["ebbb8c", "e18488e185a4e186bf"],
- ["ebbb8c", "ebbab4e186bf"],
- ["ebbb8d", "e18488e185a4e18780"],
- ["ebbb8d", "ebbab4e18780"],
- ["ebbb8e", "e18488e185a4e18781"],
- ["ebbb8e", "ebbab4e18781"],
- ["ebbb8f", "e18488e185a4e18782"],
- ["ebbb8f", "ebbab4e18782"],
- ["ebbb90", "e18488e185a5"],
- ["ebbb91", "e18488e185a5e186a8"],
- ["ebbb91", "ebbb90e186a8"],
- ["ebbb92", "e18488e185a5e186a9"],
- ["ebbb92", "ebbb90e186a9"],
- ["ebbb93", "e18488e185a5e186aa"],
- ["ebbb93", "ebbb90e186aa"],
- ["ebbb94", "e18488e185a5e186ab"],
- ["ebbb94", "ebbb90e186ab"],
- ["ebbb95", "e18488e185a5e186ac"],
- ["ebbb95", "ebbb90e186ac"],
- ["ebbb96", "e18488e185a5e186ad"],
- ["ebbb96", "ebbb90e186ad"],
- ["ebbb97", "e18488e185a5e186ae"],
- ["ebbb97", "ebbb90e186ae"],
- ["ebbb98", "e18488e185a5e186af"],
- ["ebbb98", "ebbb90e186af"],
- ["ebbb99", "e18488e185a5e186b0"],
- ["ebbb99", "ebbb90e186b0"],
- ["ebbb9a", "e18488e185a5e186b1"],
- ["ebbb9a", "ebbb90e186b1"],
- ["ebbb9b", "e18488e185a5e186b2"],
- ["ebbb9b", "ebbb90e186b2"],
- ["ebbb9c", "e18488e185a5e186b3"],
- ["ebbb9c", "ebbb90e186b3"],
- ["ebbb9d", "e18488e185a5e186b4"],
- ["ebbb9d", "ebbb90e186b4"],
- ["ebbb9e", "e18488e185a5e186b5"],
- ["ebbb9e", "ebbb90e186b5"],
- ["ebbb9f", "e18488e185a5e186b6"],
- ["ebbb9f", "ebbb90e186b6"],
- ["ebbba0", "e18488e185a5e186b7"],
- ["ebbba0", "ebbb90e186b7"],
- ["ebbba1", "e18488e185a5e186b8"],
- ["ebbba1", "ebbb90e186b8"],
- ["ebbba2", "e18488e185a5e186b9"],
- ["ebbba2", "ebbb90e186b9"],
- ["ebbba3", "e18488e185a5e186ba"],
- ["ebbba3", "ebbb90e186ba"],
- ["ebbba4", "e18488e185a5e186bb"],
- ["ebbba4", "ebbb90e186bb"],
- ["ebbba5", "e18488e185a5e186bc"],
- ["ebbba5", "ebbb90e186bc"],
- ["ebbba6", "e18488e185a5e186bd"],
- ["ebbba6", "ebbb90e186bd"],
- ["ebbba7", "e18488e185a5e186be"],
- ["ebbba7", "ebbb90e186be"],
- ["ebbba8", "e18488e185a5e186bf"],
- ["ebbba8", "ebbb90e186bf"],
- ["ebbba9", "e18488e185a5e18780"],
- ["ebbba9", "ebbb90e18780"],
- ["ebbbaa", "e18488e185a5e18781"],
- ["ebbbaa", "ebbb90e18781"],
- ["ebbbab", "e18488e185a5e18782"],
- ["ebbbab", "ebbb90e18782"],
- ["ebbbac", "e18488e185a6"],
- ["ebbbad", "e18488e185a6e186a8"],
- ["ebbbad", "ebbbace186a8"],
- ["ebbbae", "e18488e185a6e186a9"],
- ["ebbbae", "ebbbace186a9"],
- ["ebbbaf", "e18488e185a6e186aa"],
- ["ebbbaf", "ebbbace186aa"],
- ["ebbbb0", "e18488e185a6e186ab"],
- ["ebbbb0", "ebbbace186ab"],
- ["ebbbb1", "e18488e185a6e186ac"],
- ["ebbbb1", "ebbbace186ac"],
- ["ebbbb2", "e18488e185a6e186ad"],
- ["ebbbb2", "ebbbace186ad"],
- ["ebbbb3", "e18488e185a6e186ae"],
- ["ebbbb3", "ebbbace186ae"],
- ["ebbbb4", "e18488e185a6e186af"],
- ["ebbbb4", "ebbbace186af"],
- ["ebbbb5", "e18488e185a6e186b0"],
- ["ebbbb5", "ebbbace186b0"],
- ["ebbbb6", "e18488e185a6e186b1"],
- ["ebbbb6", "ebbbace186b1"],
- ["ebbbb7", "e18488e185a6e186b2"],
- ["ebbbb7", "ebbbace186b2"],
- ["ebbbb8", "e18488e185a6e186b3"],
- ["ebbbb8", "ebbbace186b3"],
- ["ebbbb9", "e18488e185a6e186b4"],
- ["ebbbb9", "ebbbace186b4"],
- ["ebbbba", "e18488e185a6e186b5"],
- ["ebbbba", "ebbbace186b5"],
- ["ebbbbb", "e18488e185a6e186b6"],
- ["ebbbbb", "ebbbace186b6"],
- ["ebbbbc", "e18488e185a6e186b7"],
- ["ebbbbc", "ebbbace186b7"],
- ["ebbbbd", "e18488e185a6e186b8"],
- ["ebbbbd", "ebbbace186b8"],
- ["ebbbbe", "e18488e185a6e186b9"],
- ["ebbbbe", "ebbbace186b9"],
- ["ebbbbf", "e18488e185a6e186ba"],
- ["ebbbbf", "ebbbace186ba"],
- ["ebbc80", "e18488e185a6e186bb"],
- ["ebbc80", "ebbbace186bb"],
- ["ebbc81", "e18488e185a6e186bc"],
- ["ebbc81", "ebbbace186bc"],
- ["ebbc82", "e18488e185a6e186bd"],
- ["ebbc82", "ebbbace186bd"],
- ["ebbc83", "e18488e185a6e186be"],
- ["ebbc83", "ebbbace186be"],
- ["ebbc84", "e18488e185a6e186bf"],
- ["ebbc84", "ebbbace186bf"],
- ["ebbc85", "e18488e185a6e18780"],
- ["ebbc85", "ebbbace18780"],
- ["ebbc86", "e18488e185a6e18781"],
- ["ebbc86", "ebbbace18781"],
- ["ebbc87", "e18488e185a6e18782"],
- ["ebbc87", "ebbbace18782"],
- ["ebbc88", "e18488e185a7"],
- ["ebbc89", "e18488e185a7e186a8"],
- ["ebbc89", "ebbc88e186a8"],
- ["ebbc8a", "e18488e185a7e186a9"],
- ["ebbc8a", "ebbc88e186a9"],
- ["ebbc8b", "e18488e185a7e186aa"],
- ["ebbc8b", "ebbc88e186aa"],
- ["ebbc8c", "e18488e185a7e186ab"],
- ["ebbc8c", "ebbc88e186ab"],
- ["ebbc8d", "e18488e185a7e186ac"],
- ["ebbc8d", "ebbc88e186ac"],
- ["ebbc8e", "e18488e185a7e186ad"],
- ["ebbc8e", "ebbc88e186ad"],
- ["ebbc8f", "e18488e185a7e186ae"],
- ["ebbc8f", "ebbc88e186ae"],
- ["ebbc90", "e18488e185a7e186af"],
- ["ebbc90", "ebbc88e186af"],
- ["ebbc91", "e18488e185a7e186b0"],
- ["ebbc91", "ebbc88e186b0"],
- ["ebbc92", "e18488e185a7e186b1"],
- ["ebbc92", "ebbc88e186b1"],
- ["ebbc93", "e18488e185a7e186b2"],
- ["ebbc93", "ebbc88e186b2"],
- ["ebbc94", "e18488e185a7e186b3"],
- ["ebbc94", "ebbc88e186b3"],
- ["ebbc95", "e18488e185a7e186b4"],
- ["ebbc95", "ebbc88e186b4"],
- ["ebbc96", "e18488e185a7e186b5"],
- ["ebbc96", "ebbc88e186b5"],
- ["ebbc97", "e18488e185a7e186b6"],
- ["ebbc97", "ebbc88e186b6"],
- ["ebbc98", "e18488e185a7e186b7"],
- ["ebbc98", "ebbc88e186b7"],
- ["ebbc99", "e18488e185a7e186b8"],
- ["ebbc99", "ebbc88e186b8"],
- ["ebbc9a", "e18488e185a7e186b9"],
- ["ebbc9a", "ebbc88e186b9"],
- ["ebbc9b", "e18488e185a7e186ba"],
- ["ebbc9b", "ebbc88e186ba"],
- ["ebbc9c", "e18488e185a7e186bb"],
- ["ebbc9c", "ebbc88e186bb"],
- ["ebbc9d", "e18488e185a7e186bc"],
- ["ebbc9d", "ebbc88e186bc"],
- ["ebbc9e", "e18488e185a7e186bd"],
- ["ebbc9e", "ebbc88e186bd"],
- ["ebbc9f", "e18488e185a7e186be"],
- ["ebbc9f", "ebbc88e186be"],
- ["ebbca0", "e18488e185a7e186bf"],
- ["ebbca0", "ebbc88e186bf"],
- ["ebbca1", "e18488e185a7e18780"],
- ["ebbca1", "ebbc88e18780"],
- ["ebbca2", "e18488e185a7e18781"],
- ["ebbca2", "ebbc88e18781"],
- ["ebbca3", "e18488e185a7e18782"],
- ["ebbca3", "ebbc88e18782"],
- ["ebbca4", "e18488e185a8"],
- ["ebbca5", "e18488e185a8e186a8"],
- ["ebbca5", "ebbca4e186a8"],
- ["ebbca6", "e18488e185a8e186a9"],
- ["ebbca6", "ebbca4e186a9"],
- ["ebbca7", "e18488e185a8e186aa"],
- ["ebbca7", "ebbca4e186aa"],
- ["ebbca8", "e18488e185a8e186ab"],
- ["ebbca8", "ebbca4e186ab"],
- ["ebbca9", "e18488e185a8e186ac"],
- ["ebbca9", "ebbca4e186ac"],
- ["ebbcaa", "e18488e185a8e186ad"],
- ["ebbcaa", "ebbca4e186ad"],
- ["ebbcab", "e18488e185a8e186ae"],
- ["ebbcab", "ebbca4e186ae"],
- ["ebbcac", "e18488e185a8e186af"],
- ["ebbcac", "ebbca4e186af"],
- ["ebbcad", "e18488e185a8e186b0"],
- ["ebbcad", "ebbca4e186b0"],
- ["ebbcae", "e18488e185a8e186b1"],
- ["ebbcae", "ebbca4e186b1"],
- ["ebbcaf", "e18488e185a8e186b2"],
- ["ebbcaf", "ebbca4e186b2"],
- ["ebbcb0", "e18488e185a8e186b3"],
- ["ebbcb0", "ebbca4e186b3"],
- ["ebbcb1", "e18488e185a8e186b4"],
- ["ebbcb1", "ebbca4e186b4"],
- ["ebbcb2", "e18488e185a8e186b5"],
- ["ebbcb2", "ebbca4e186b5"],
- ["ebbcb3", "e18488e185a8e186b6"],
- ["ebbcb3", "ebbca4e186b6"],
- ["ebbcb4", "e18488e185a8e186b7"],
- ["ebbcb4", "ebbca4e186b7"],
- ["ebbcb5", "e18488e185a8e186b8"],
- ["ebbcb5", "ebbca4e186b8"],
- ["ebbcb6", "e18488e185a8e186b9"],
- ["ebbcb6", "ebbca4e186b9"],
- ["ebbcb7", "e18488e185a8e186ba"],
- ["ebbcb7", "ebbca4e186ba"],
- ["ebbcb8", "e18488e185a8e186bb"],
- ["ebbcb8", "ebbca4e186bb"],
- ["ebbcb9", "e18488e185a8e186bc"],
- ["ebbcb9", "ebbca4e186bc"],
- ["ebbcba", "e18488e185a8e186bd"],
- ["ebbcba", "ebbca4e186bd"],
- ["ebbcbb", "e18488e185a8e186be"],
- ["ebbcbb", "ebbca4e186be"],
- ["ebbcbc", "e18488e185a8e186bf"],
- ["ebbcbc", "ebbca4e186bf"],
- ["ebbcbd", "e18488e185a8e18780"],
- ["ebbcbd", "ebbca4e18780"],
- ["ebbcbe", "e18488e185a8e18781"],
- ["ebbcbe", "ebbca4e18781"],
- ["ebbcbf", "e18488e185a8e18782"],
- ["ebbcbf", "ebbca4e18782"],
- ["ebbd80", "e18488e185a9"],
- ["ebbd81", "e18488e185a9e186a8"],
- ["ebbd81", "ebbd80e186a8"],
- ["ebbd82", "e18488e185a9e186a9"],
- ["ebbd82", "ebbd80e186a9"],
- ["ebbd83", "e18488e185a9e186aa"],
- ["ebbd83", "ebbd80e186aa"],
- ["ebbd84", "e18488e185a9e186ab"],
- ["ebbd84", "ebbd80e186ab"],
- ["ebbd85", "e18488e185a9e186ac"],
- ["ebbd85", "ebbd80e186ac"],
- ["ebbd86", "e18488e185a9e186ad"],
- ["ebbd86", "ebbd80e186ad"],
- ["ebbd87", "e18488e185a9e186ae"],
- ["ebbd87", "ebbd80e186ae"],
- ["ebbd88", "e18488e185a9e186af"],
- ["ebbd88", "ebbd80e186af"],
- ["ebbd89", "e18488e185a9e186b0"],
- ["ebbd89", "ebbd80e186b0"],
- ["ebbd8a", "e18488e185a9e186b1"],
- ["ebbd8a", "ebbd80e186b1"],
- ["ebbd8b", "e18488e185a9e186b2"],
- ["ebbd8b", "ebbd80e186b2"],
- ["ebbd8c", "e18488e185a9e186b3"],
- ["ebbd8c", "ebbd80e186b3"],
- ["ebbd8d", "e18488e185a9e186b4"],
- ["ebbd8d", "ebbd80e186b4"],
- ["ebbd8e", "e18488e185a9e186b5"],
- ["ebbd8e", "ebbd80e186b5"],
- ["ebbd8f", "e18488e185a9e186b6"],
- ["ebbd8f", "ebbd80e186b6"],
- ["ebbd90", "e18488e185a9e186b7"],
- ["ebbd90", "ebbd80e186b7"],
- ["ebbd91", "e18488e185a9e186b8"],
- ["ebbd91", "ebbd80e186b8"],
- ["ebbd92", "e18488e185a9e186b9"],
- ["ebbd92", "ebbd80e186b9"],
- ["ebbd93", "e18488e185a9e186ba"],
- ["ebbd93", "ebbd80e186ba"],
- ["ebbd94", "e18488e185a9e186bb"],
- ["ebbd94", "ebbd80e186bb"],
- ["ebbd95", "e18488e185a9e186bc"],
- ["ebbd95", "ebbd80e186bc"],
- ["ebbd96", "e18488e185a9e186bd"],
- ["ebbd96", "ebbd80e186bd"],
- ["ebbd97", "e18488e185a9e186be"],
- ["ebbd97", "ebbd80e186be"],
- ["ebbd98", "e18488e185a9e186bf"],
- ["ebbd98", "ebbd80e186bf"],
- ["ebbd99", "e18488e185a9e18780"],
- ["ebbd99", "ebbd80e18780"],
- ["ebbd9a", "e18488e185a9e18781"],
- ["ebbd9a", "ebbd80e18781"],
- ["ebbd9b", "e18488e185a9e18782"],
- ["ebbd9b", "ebbd80e18782"],
- ["ebbd9c", "e18488e185aa"],
- ["ebbd9d", "e18488e185aae186a8"],
- ["ebbd9d", "ebbd9ce186a8"],
- ["ebbd9e", "e18488e185aae186a9"],
- ["ebbd9e", "ebbd9ce186a9"],
- ["ebbd9f", "e18488e185aae186aa"],
- ["ebbd9f", "ebbd9ce186aa"],
- ["ebbda0", "e18488e185aae186ab"],
- ["ebbda0", "ebbd9ce186ab"],
- ["ebbda1", "e18488e185aae186ac"],
- ["ebbda1", "ebbd9ce186ac"],
- ["ebbda2", "e18488e185aae186ad"],
- ["ebbda2", "ebbd9ce186ad"],
- ["ebbda3", "e18488e185aae186ae"],
- ["ebbda3", "ebbd9ce186ae"],
- ["ebbda4", "e18488e185aae186af"],
- ["ebbda4", "ebbd9ce186af"],
- ["ebbda5", "e18488e185aae186b0"],
- ["ebbda5", "ebbd9ce186b0"],
- ["ebbda6", "e18488e185aae186b1"],
- ["ebbda6", "ebbd9ce186b1"],
- ["ebbda7", "e18488e185aae186b2"],
- ["ebbda7", "ebbd9ce186b2"],
- ["ebbda8", "e18488e185aae186b3"],
- ["ebbda8", "ebbd9ce186b3"],
- ["ebbda9", "e18488e185aae186b4"],
- ["ebbda9", "ebbd9ce186b4"],
- ["ebbdaa", "e18488e185aae186b5"],
- ["ebbdaa", "ebbd9ce186b5"],
- ["ebbdab", "e18488e185aae186b6"],
- ["ebbdab", "ebbd9ce186b6"],
- ["ebbdac", "e18488e185aae186b7"],
- ["ebbdac", "ebbd9ce186b7"],
- ["ebbdad", "e18488e185aae186b8"],
- ["ebbdad", "ebbd9ce186b8"],
- ["ebbdae", "e18488e185aae186b9"],
- ["ebbdae", "ebbd9ce186b9"],
- ["ebbdaf", "e18488e185aae186ba"],
- ["ebbdaf", "ebbd9ce186ba"],
- ["ebbdb0", "e18488e185aae186bb"],
- ["ebbdb0", "ebbd9ce186bb"],
- ["ebbdb1", "e18488e185aae186bc"],
- ["ebbdb1", "ebbd9ce186bc"],
- ["ebbdb2", "e18488e185aae186bd"],
- ["ebbdb2", "ebbd9ce186bd"],
- ["ebbdb3", "e18488e185aae186be"],
- ["ebbdb3", "ebbd9ce186be"],
- ["ebbdb4", "e18488e185aae186bf"],
- ["ebbdb4", "ebbd9ce186bf"],
- ["ebbdb5", "e18488e185aae18780"],
- ["ebbdb5", "ebbd9ce18780"],
- ["ebbdb6", "e18488e185aae18781"],
- ["ebbdb6", "ebbd9ce18781"],
- ["ebbdb7", "e18488e185aae18782"],
- ["ebbdb7", "ebbd9ce18782"],
- ["ebbdb8", "e18488e185ab"],
- ["ebbdb9", "e18488e185abe186a8"],
- ["ebbdb9", "ebbdb8e186a8"],
- ["ebbdba", "e18488e185abe186a9"],
- ["ebbdba", "ebbdb8e186a9"],
- ["ebbdbb", "e18488e185abe186aa"],
- ["ebbdbb", "ebbdb8e186aa"],
- ["ebbdbc", "e18488e185abe186ab"],
- ["ebbdbc", "ebbdb8e186ab"],
- ["ebbdbd", "e18488e185abe186ac"],
- ["ebbdbd", "ebbdb8e186ac"],
- ["ebbdbe", "e18488e185abe186ad"],
- ["ebbdbe", "ebbdb8e186ad"],
- ["ebbdbf", "e18488e185abe186ae"],
- ["ebbdbf", "ebbdb8e186ae"],
- ["ebbe80", "e18488e185abe186af"],
- ["ebbe80", "ebbdb8e186af"],
- ["ebbe81", "e18488e185abe186b0"],
- ["ebbe81", "ebbdb8e186b0"],
- ["ebbe82", "e18488e185abe186b1"],
- ["ebbe82", "ebbdb8e186b1"],
- ["ebbe83", "e18488e185abe186b2"],
- ["ebbe83", "ebbdb8e186b2"],
- ["ebbe84", "e18488e185abe186b3"],
- ["ebbe84", "ebbdb8e186b3"],
- ["ebbe85", "e18488e185abe186b4"],
- ["ebbe85", "ebbdb8e186b4"],
- ["ebbe86", "e18488e185abe186b5"],
- ["ebbe86", "ebbdb8e186b5"],
- ["ebbe87", "e18488e185abe186b6"],
- ["ebbe87", "ebbdb8e186b6"],
- ["ebbe88", "e18488e185abe186b7"],
- ["ebbe88", "ebbdb8e186b7"],
- ["ebbe89", "e18488e185abe186b8"],
- ["ebbe89", "ebbdb8e186b8"],
- ["ebbe8a", "e18488e185abe186b9"],
- ["ebbe8a", "ebbdb8e186b9"],
- ["ebbe8b", "e18488e185abe186ba"],
- ["ebbe8b", "ebbdb8e186ba"],
- ["ebbe8c", "e18488e185abe186bb"],
- ["ebbe8c", "ebbdb8e186bb"],
- ["ebbe8d", "e18488e185abe186bc"],
- ["ebbe8d", "ebbdb8e186bc"],
- ["ebbe8e", "e18488e185abe186bd"],
- ["ebbe8e", "ebbdb8e186bd"],
- ["ebbe8f", "e18488e185abe186be"],
- ["ebbe8f", "ebbdb8e186be"],
- ["ebbe90", "e18488e185abe186bf"],
- ["ebbe90", "ebbdb8e186bf"],
- ["ebbe91", "e18488e185abe18780"],
- ["ebbe91", "ebbdb8e18780"],
- ["ebbe92", "e18488e185abe18781"],
- ["ebbe92", "ebbdb8e18781"],
- ["ebbe93", "e18488e185abe18782"],
- ["ebbe93", "ebbdb8e18782"],
- ["ebbe94", "e18488e185ac"],
- ["ebbe95", "e18488e185ace186a8"],
- ["ebbe95", "ebbe94e186a8"],
- ["ebbe96", "e18488e185ace186a9"],
- ["ebbe96", "ebbe94e186a9"],
- ["ebbe97", "e18488e185ace186aa"],
- ["ebbe97", "ebbe94e186aa"],
- ["ebbe98", "e18488e185ace186ab"],
- ["ebbe98", "ebbe94e186ab"],
- ["ebbe99", "e18488e185ace186ac"],
- ["ebbe99", "ebbe94e186ac"],
- ["ebbe9a", "e18488e185ace186ad"],
- ["ebbe9a", "ebbe94e186ad"],
- ["ebbe9b", "e18488e185ace186ae"],
- ["ebbe9b", "ebbe94e186ae"],
- ["ebbe9c", "e18488e185ace186af"],
- ["ebbe9c", "ebbe94e186af"],
- ["ebbe9d", "e18488e185ace186b0"],
- ["ebbe9d", "ebbe94e186b0"],
- ["ebbe9e", "e18488e185ace186b1"],
- ["ebbe9e", "ebbe94e186b1"],
- ["ebbe9f", "e18488e185ace186b2"],
- ["ebbe9f", "ebbe94e186b2"],
- ["ebbea0", "e18488e185ace186b3"],
- ["ebbea0", "ebbe94e186b3"],
- ["ebbea1", "e18488e185ace186b4"],
- ["ebbea1", "ebbe94e186b4"],
- ["ebbea2", "e18488e185ace186b5"],
- ["ebbea2", "ebbe94e186b5"],
- ["ebbea3", "e18488e185ace186b6"],
- ["ebbea3", "ebbe94e186b6"],
- ["ebbea4", "e18488e185ace186b7"],
- ["ebbea4", "ebbe94e186b7"],
- ["ebbea5", "e18488e185ace186b8"],
- ["ebbea5", "ebbe94e186b8"],
- ["ebbea6", "e18488e185ace186b9"],
- ["ebbea6", "ebbe94e186b9"],
- ["ebbea7", "e18488e185ace186ba"],
- ["ebbea7", "ebbe94e186ba"],
- ["ebbea8", "e18488e185ace186bb"],
- ["ebbea8", "ebbe94e186bb"],
- ["ebbea9", "e18488e185ace186bc"],
- ["ebbea9", "ebbe94e186bc"],
- ["ebbeaa", "e18488e185ace186bd"],
- ["ebbeaa", "ebbe94e186bd"],
- ["ebbeab", "e18488e185ace186be"],
- ["ebbeab", "ebbe94e186be"],
- ["ebbeac", "e18488e185ace186bf"],
- ["ebbeac", "ebbe94e186bf"],
- ["ebbead", "e18488e185ace18780"],
- ["ebbead", "ebbe94e18780"],
- ["ebbeae", "e18488e185ace18781"],
- ["ebbeae", "ebbe94e18781"],
- ["ebbeaf", "e18488e185ace18782"],
- ["ebbeaf", "ebbe94e18782"],
- ["ebbeb0", "e18488e185ad"],
- ["ebbeb1", "e18488e185ade186a8"],
- ["ebbeb1", "ebbeb0e186a8"],
- ["ebbeb2", "e18488e185ade186a9"],
- ["ebbeb2", "ebbeb0e186a9"],
- ["ebbeb3", "e18488e185ade186aa"],
- ["ebbeb3", "ebbeb0e186aa"],
- ["ebbeb4", "e18488e185ade186ab"],
- ["ebbeb4", "ebbeb0e186ab"],
- ["ebbeb5", "e18488e185ade186ac"],
- ["ebbeb5", "ebbeb0e186ac"],
- ["ebbeb6", "e18488e185ade186ad"],
- ["ebbeb6", "ebbeb0e186ad"],
- ["ebbeb7", "e18488e185ade186ae"],
- ["ebbeb7", "ebbeb0e186ae"],
- ["ebbeb8", "e18488e185ade186af"],
- ["ebbeb8", "ebbeb0e186af"],
- ["ebbeb9", "e18488e185ade186b0"],
- ["ebbeb9", "ebbeb0e186b0"],
- ["ebbeba", "e18488e185ade186b1"],
- ["ebbeba", "ebbeb0e186b1"],
- ["ebbebb", "e18488e185ade186b2"],
- ["ebbebb", "ebbeb0e186b2"],
- ["ebbebc", "e18488e185ade186b3"],
- ["ebbebc", "ebbeb0e186b3"],
- ["ebbebd", "e18488e185ade186b4"],
- ["ebbebd", "ebbeb0e186b4"],
- ["ebbebe", "e18488e185ade186b5"],
- ["ebbebe", "ebbeb0e186b5"],
- ["ebbebf", "e18488e185ade186b6"],
- ["ebbebf", "ebbeb0e186b6"],
- ["ebbf80", "e18488e185ade186b7"],
- ["ebbf80", "ebbeb0e186b7"],
- ["ebbf81", "e18488e185ade186b8"],
- ["ebbf81", "ebbeb0e186b8"],
- ["ebbf82", "e18488e185ade186b9"],
- ["ebbf82", "ebbeb0e186b9"],
- ["ebbf83", "e18488e185ade186ba"],
- ["ebbf83", "ebbeb0e186ba"],
- ["ebbf84", "e18488e185ade186bb"],
- ["ebbf84", "ebbeb0e186bb"],
- ["ebbf85", "e18488e185ade186bc"],
- ["ebbf85", "ebbeb0e186bc"],
- ["ebbf86", "e18488e185ade186bd"],
- ["ebbf86", "ebbeb0e186bd"],
- ["ebbf87", "e18488e185ade186be"],
- ["ebbf87", "ebbeb0e186be"],
- ["ebbf88", "e18488e185ade186bf"],
- ["ebbf88", "ebbeb0e186bf"],
- ["ebbf89", "e18488e185ade18780"],
- ["ebbf89", "ebbeb0e18780"],
- ["ebbf8a", "e18488e185ade18781"],
- ["ebbf8a", "ebbeb0e18781"],
- ["ebbf8b", "e18488e185ade18782"],
- ["ebbf8b", "ebbeb0e18782"],
- ["ebbf8c", "e18488e185ae"],
- ["ebbf8d", "e18488e185aee186a8"],
- ["ebbf8d", "ebbf8ce186a8"],
- ["ebbf8e", "e18488e185aee186a9"],
- ["ebbf8e", "ebbf8ce186a9"],
- ["ebbf8f", "e18488e185aee186aa"],
- ["ebbf8f", "ebbf8ce186aa"],
- ["ebbf90", "e18488e185aee186ab"],
- ["ebbf90", "ebbf8ce186ab"],
- ["ebbf91", "e18488e185aee186ac"],
- ["ebbf91", "ebbf8ce186ac"],
- ["ebbf92", "e18488e185aee186ad"],
- ["ebbf92", "ebbf8ce186ad"],
- ["ebbf93", "e18488e185aee186ae"],
- ["ebbf93", "ebbf8ce186ae"],
- ["ebbf94", "e18488e185aee186af"],
- ["ebbf94", "ebbf8ce186af"],
- ["ebbf95", "e18488e185aee186b0"],
- ["ebbf95", "ebbf8ce186b0"],
- ["ebbf96", "e18488e185aee186b1"],
- ["ebbf96", "ebbf8ce186b1"],
- ["ebbf97", "e18488e185aee186b2"],
- ["ebbf97", "ebbf8ce186b2"],
- ["ebbf98", "e18488e185aee186b3"],
- ["ebbf98", "ebbf8ce186b3"],
- ["ebbf99", "e18488e185aee186b4"],
- ["ebbf99", "ebbf8ce186b4"],
- ["ebbf9a", "e18488e185aee186b5"],
- ["ebbf9a", "ebbf8ce186b5"],
- ["ebbf9b", "e18488e185aee186b6"],
- ["ebbf9b", "ebbf8ce186b6"],
- ["ebbf9c", "e18488e185aee186b7"],
- ["ebbf9c", "ebbf8ce186b7"],
- ["ebbf9d", "e18488e185aee186b8"],
- ["ebbf9d", "ebbf8ce186b8"],
- ["ebbf9e", "e18488e185aee186b9"],
- ["ebbf9e", "ebbf8ce186b9"],
- ["ebbf9f", "e18488e185aee186ba"],
- ["ebbf9f", "ebbf8ce186ba"],
- ["ebbfa0", "e18488e185aee186bb"],
- ["ebbfa0", "ebbf8ce186bb"],
- ["ebbfa1", "e18488e185aee186bc"],
- ["ebbfa1", "ebbf8ce186bc"],
- ["ebbfa2", "e18488e185aee186bd"],
- ["ebbfa2", "ebbf8ce186bd"],
- ["ebbfa3", "e18488e185aee186be"],
- ["ebbfa3", "ebbf8ce186be"],
- ["ebbfa4", "e18488e185aee186bf"],
- ["ebbfa4", "ebbf8ce186bf"],
- ["ebbfa5", "e18488e185aee18780"],
- ["ebbfa5", "ebbf8ce18780"],
- ["ebbfa6", "e18488e185aee18781"],
- ["ebbfa6", "ebbf8ce18781"],
- ["ebbfa7", "e18488e185aee18782"],
- ["ebbfa7", "ebbf8ce18782"],
- ["ebbfa8", "e18488e185af"],
- ["ebbfa9", "e18488e185afe186a8"],
- ["ebbfa9", "ebbfa8e186a8"],
- ["ebbfaa", "e18488e185afe186a9"],
- ["ebbfaa", "ebbfa8e186a9"],
- ["ebbfab", "e18488e185afe186aa"],
- ["ebbfab", "ebbfa8e186aa"],
- ["ebbfac", "e18488e185afe186ab"],
- ["ebbfac", "ebbfa8e186ab"],
- ["ebbfad", "e18488e185afe186ac"],
- ["ebbfad", "ebbfa8e186ac"],
- ["ebbfae", "e18488e185afe186ad"],
- ["ebbfae", "ebbfa8e186ad"],
- ["ebbfaf", "e18488e185afe186ae"],
- ["ebbfaf", "ebbfa8e186ae"],
- ["ebbfb0", "e18488e185afe186af"],
- ["ebbfb0", "ebbfa8e186af"],
- ["ebbfb1", "e18488e185afe186b0"],
- ["ebbfb1", "ebbfa8e186b0"],
- ["ebbfb2", "e18488e185afe186b1"],
- ["ebbfb2", "ebbfa8e186b1"],
- ["ebbfb3", "e18488e185afe186b2"],
- ["ebbfb3", "ebbfa8e186b2"],
- ["ebbfb4", "e18488e185afe186b3"],
- ["ebbfb4", "ebbfa8e186b3"],
- ["ebbfb5", "e18488e185afe186b4"],
- ["ebbfb5", "ebbfa8e186b4"],
- ["ebbfb6", "e18488e185afe186b5"],
- ["ebbfb6", "ebbfa8e186b5"],
- ["ebbfb7", "e18488e185afe186b6"],
- ["ebbfb7", "ebbfa8e186b6"],
- ["ebbfb8", "e18488e185afe186b7"],
- ["ebbfb8", "ebbfa8e186b7"],
- ["ebbfb9", "e18488e185afe186b8"],
- ["ebbfb9", "ebbfa8e186b8"],
- ["ebbfba", "e18488e185afe186b9"],
- ["ebbfba", "ebbfa8e186b9"],
- ["ebbfbb", "e18488e185afe186ba"],
- ["ebbfbb", "ebbfa8e186ba"],
- ["ebbfbc", "e18488e185afe186bb"],
- ["ebbfbc", "ebbfa8e186bb"],
- ["ebbfbd", "e18488e185afe186bc"],
- ["ebbfbd", "ebbfa8e186bc"],
- ["ebbfbe", "e18488e185afe186bd"],
- ["ebbfbe", "ebbfa8e186bd"],
- ["ebbfbf", "e18488e185afe186be"],
- ["ebbfbf", "ebbfa8e186be"],
- ["ec8080", "e18488e185afe186bf"],
- ["ec8080", "ebbfa8e186bf"],
- ["ec8081", "e18488e185afe18780"],
- ["ec8081", "ebbfa8e18780"],
- ["ec8082", "e18488e185afe18781"],
- ["ec8082", "ebbfa8e18781"],
- ["ec8083", "e18488e185afe18782"],
- ["ec8083", "ebbfa8e18782"],
- ["ec8084", "e18488e185b0"],
- ["ec8085", "e18488e185b0e186a8"],
- ["ec8085", "ec8084e186a8"],
- ["ec8086", "e18488e185b0e186a9"],
- ["ec8086", "ec8084e186a9"],
- ["ec8087", "e18488e185b0e186aa"],
- ["ec8087", "ec8084e186aa"],
- ["ec8088", "e18488e185b0e186ab"],
- ["ec8088", "ec8084e186ab"],
- ["ec8089", "e18488e185b0e186ac"],
- ["ec8089", "ec8084e186ac"],
- ["ec808a", "e18488e185b0e186ad"],
- ["ec808a", "ec8084e186ad"],
- ["ec808b", "e18488e185b0e186ae"],
- ["ec808b", "ec8084e186ae"],
- ["ec808c", "e18488e185b0e186af"],
- ["ec808c", "ec8084e186af"],
- ["ec808d", "e18488e185b0e186b0"],
- ["ec808d", "ec8084e186b0"],
- ["ec808e", "e18488e185b0e186b1"],
- ["ec808e", "ec8084e186b1"],
- ["ec808f", "e18488e185b0e186b2"],
- ["ec808f", "ec8084e186b2"],
- ["ec8090", "e18488e185b0e186b3"],
- ["ec8090", "ec8084e186b3"],
- ["ec8091", "e18488e185b0e186b4"],
- ["ec8091", "ec8084e186b4"],
- ["ec8092", "e18488e185b0e186b5"],
- ["ec8092", "ec8084e186b5"],
- ["ec8093", "e18488e185b0e186b6"],
- ["ec8093", "ec8084e186b6"],
- ["ec8094", "e18488e185b0e186b7"],
- ["ec8094", "ec8084e186b7"],
- ["ec8095", "e18488e185b0e186b8"],
- ["ec8095", "ec8084e186b8"],
- ["ec8096", "e18488e185b0e186b9"],
- ["ec8096", "ec8084e186b9"],
- ["ec8097", "e18488e185b0e186ba"],
- ["ec8097", "ec8084e186ba"],
- ["ec8098", "e18488e185b0e186bb"],
- ["ec8098", "ec8084e186bb"],
- ["ec8099", "e18488e185b0e186bc"],
- ["ec8099", "ec8084e186bc"],
- ["ec809a", "e18488e185b0e186bd"],
- ["ec809a", "ec8084e186bd"],
- ["ec809b", "e18488e185b0e186be"],
- ["ec809b", "ec8084e186be"],
- ["ec809c", "e18488e185b0e186bf"],
- ["ec809c", "ec8084e186bf"],
- ["ec809d", "e18488e185b0e18780"],
- ["ec809d", "ec8084e18780"],
- ["ec809e", "e18488e185b0e18781"],
- ["ec809e", "ec8084e18781"],
- ["ec809f", "e18488e185b0e18782"],
- ["ec809f", "ec8084e18782"],
- ["ec80a0", "e18488e185b1"],
- ["ec80a1", "e18488e185b1e186a8"],
- ["ec80a1", "ec80a0e186a8"],
- ["ec80a2", "e18488e185b1e186a9"],
- ["ec80a2", "ec80a0e186a9"],
- ["ec80a3", "e18488e185b1e186aa"],
- ["ec80a3", "ec80a0e186aa"],
- ["ec80a4", "e18488e185b1e186ab"],
- ["ec80a4", "ec80a0e186ab"],
- ["ec80a5", "e18488e185b1e186ac"],
- ["ec80a5", "ec80a0e186ac"],
- ["ec80a6", "e18488e185b1e186ad"],
- ["ec80a6", "ec80a0e186ad"],
- ["ec80a7", "e18488e185b1e186ae"],
- ["ec80a7", "ec80a0e186ae"],
- ["ec80a8", "e18488e185b1e186af"],
- ["ec80a8", "ec80a0e186af"],
- ["ec80a9", "e18488e185b1e186b0"],
- ["ec80a9", "ec80a0e186b0"],
- ["ec80aa", "e18488e185b1e186b1"],
- ["ec80aa", "ec80a0e186b1"],
- ["ec80ab", "e18488e185b1e186b2"],
- ["ec80ab", "ec80a0e186b2"],
- ["ec80ac", "e18488e185b1e186b3"],
- ["ec80ac", "ec80a0e186b3"],
- ["ec80ad", "e18488e185b1e186b4"],
- ["ec80ad", "ec80a0e186b4"],
- ["ec80ae", "e18488e185b1e186b5"],
- ["ec80ae", "ec80a0e186b5"],
- ["ec80af", "e18488e185b1e186b6"],
- ["ec80af", "ec80a0e186b6"],
- ["ec80b0", "e18488e185b1e186b7"],
- ["ec80b0", "ec80a0e186b7"],
- ["ec80b1", "e18488e185b1e186b8"],
- ["ec80b1", "ec80a0e186b8"],
- ["ec80b2", "e18488e185b1e186b9"],
- ["ec80b2", "ec80a0e186b9"],
- ["ec80b3", "e18488e185b1e186ba"],
- ["ec80b3", "ec80a0e186ba"],
- ["ec80b4", "e18488e185b1e186bb"],
- ["ec80b4", "ec80a0e186bb"],
- ["ec80b5", "e18488e185b1e186bc"],
- ["ec80b5", "ec80a0e186bc"],
- ["ec80b6", "e18488e185b1e186bd"],
- ["ec80b6", "ec80a0e186bd"],
- ["ec80b7", "e18488e185b1e186be"],
- ["ec80b7", "ec80a0e186be"],
- ["ec80b8", "e18488e185b1e186bf"],
- ["ec80b8", "ec80a0e186bf"],
- ["ec80b9", "e18488e185b1e18780"],
- ["ec80b9", "ec80a0e18780"],
- ["ec80ba", "e18488e185b1e18781"],
- ["ec80ba", "ec80a0e18781"],
- ["ec80bb", "e18488e185b1e18782"],
- ["ec80bb", "ec80a0e18782"],
- ["ec80bc", "e18488e185b2"],
- ["ec80bd", "e18488e185b2e186a8"],
- ["ec80bd", "ec80bce186a8"],
- ["ec80be", "e18488e185b2e186a9"],
- ["ec80be", "ec80bce186a9"],
- ["ec80bf", "e18488e185b2e186aa"],
- ["ec80bf", "ec80bce186aa"],
- ["ec8180", "e18488e185b2e186ab"],
- ["ec8180", "ec80bce186ab"],
- ["ec8181", "e18488e185b2e186ac"],
- ["ec8181", "ec80bce186ac"],
- ["ec8182", "e18488e185b2e186ad"],
- ["ec8182", "ec80bce186ad"],
- ["ec8183", "e18488e185b2e186ae"],
- ["ec8183", "ec80bce186ae"],
- ["ec8184", "e18488e185b2e186af"],
- ["ec8184", "ec80bce186af"],
- ["ec8185", "e18488e185b2e186b0"],
- ["ec8185", "ec80bce186b0"],
- ["ec8186", "e18488e185b2e186b1"],
- ["ec8186", "ec80bce186b1"],
- ["ec8187", "e18488e185b2e186b2"],
- ["ec8187", "ec80bce186b2"],
- ["ec8188", "e18488e185b2e186b3"],
- ["ec8188", "ec80bce186b3"],
- ["ec8189", "e18488e185b2e186b4"],
- ["ec8189", "ec80bce186b4"],
- ["ec818a", "e18488e185b2e186b5"],
- ["ec818a", "ec80bce186b5"],
- ["ec818b", "e18488e185b2e186b6"],
- ["ec818b", "ec80bce186b6"],
- ["ec818c", "e18488e185b2e186b7"],
- ["ec818c", "ec80bce186b7"],
- ["ec818d", "e18488e185b2e186b8"],
- ["ec818d", "ec80bce186b8"],
- ["ec818e", "e18488e185b2e186b9"],
- ["ec818e", "ec80bce186b9"],
- ["ec818f", "e18488e185b2e186ba"],
- ["ec818f", "ec80bce186ba"],
- ["ec8190", "e18488e185b2e186bb"],
- ["ec8190", "ec80bce186bb"],
- ["ec8191", "e18488e185b2e186bc"],
- ["ec8191", "ec80bce186bc"],
- ["ec8192", "e18488e185b2e186bd"],
- ["ec8192", "ec80bce186bd"],
- ["ec8193", "e18488e185b2e186be"],
- ["ec8193", "ec80bce186be"],
- ["ec8194", "e18488e185b2e186bf"],
- ["ec8194", "ec80bce186bf"],
- ["ec8195", "e18488e185b2e18780"],
- ["ec8195", "ec80bce18780"],
- ["ec8196", "e18488e185b2e18781"],
- ["ec8196", "ec80bce18781"],
- ["ec8197", "e18488e185b2e18782"],
- ["ec8197", "ec80bce18782"],
- ["ec8198", "e18488e185b3"],
- ["ec8199", "e18488e185b3e186a8"],
- ["ec8199", "ec8198e186a8"],
- ["ec819a", "e18488e185b3e186a9"],
- ["ec819a", "ec8198e186a9"],
- ["ec819b", "e18488e185b3e186aa"],
- ["ec819b", "ec8198e186aa"],
- ["ec819c", "e18488e185b3e186ab"],
- ["ec819c", "ec8198e186ab"],
- ["ec819d", "e18488e185b3e186ac"],
- ["ec819d", "ec8198e186ac"],
- ["ec819e", "e18488e185b3e186ad"],
- ["ec819e", "ec8198e186ad"],
- ["ec819f", "e18488e185b3e186ae"],
- ["ec819f", "ec8198e186ae"],
- ["ec81a0", "e18488e185b3e186af"],
- ["ec81a0", "ec8198e186af"],
- ["ec81a1", "e18488e185b3e186b0"],
- ["ec81a1", "ec8198e186b0"],
- ["ec81a2", "e18488e185b3e186b1"],
- ["ec81a2", "ec8198e186b1"],
- ["ec81a3", "e18488e185b3e186b2"],
- ["ec81a3", "ec8198e186b2"],
- ["ec81a4", "e18488e185b3e186b3"],
- ["ec81a4", "ec8198e186b3"],
- ["ec81a5", "e18488e185b3e186b4"],
- ["ec81a5", "ec8198e186b4"],
- ["ec81a6", "e18488e185b3e186b5"],
- ["ec81a6", "ec8198e186b5"],
- ["ec81a7", "e18488e185b3e186b6"],
- ["ec81a7", "ec8198e186b6"],
- ["ec81a8", "e18488e185b3e186b7"],
- ["ec81a8", "ec8198e186b7"],
- ["ec81a9", "e18488e185b3e186b8"],
- ["ec81a9", "ec8198e186b8"],
- ["ec81aa", "e18488e185b3e186b9"],
- ["ec81aa", "ec8198e186b9"],
- ["ec81ab", "e18488e185b3e186ba"],
- ["ec81ab", "ec8198e186ba"],
- ["ec81ac", "e18488e185b3e186bb"],
- ["ec81ac", "ec8198e186bb"],
- ["ec81ad", "e18488e185b3e186bc"],
- ["ec81ad", "ec8198e186bc"],
- ["ec81ae", "e18488e185b3e186bd"],
- ["ec81ae", "ec8198e186bd"],
- ["ec81af", "e18488e185b3e186be"],
- ["ec81af", "ec8198e186be"],
- ["ec81b0", "e18488e185b3e186bf"],
- ["ec81b0", "ec8198e186bf"],
- ["ec81b1", "e18488e185b3e18780"],
- ["ec81b1", "ec8198e18780"],
- ["ec81b2", "e18488e185b3e18781"],
- ["ec81b2", "ec8198e18781"],
- ["ec81b3", "e18488e185b3e18782"],
- ["ec81b3", "ec8198e18782"],
- ["ec81b4", "e18488e185b4"],
- ["ec81b5", "e18488e185b4e186a8"],
- ["ec81b5", "ec81b4e186a8"],
- ["ec81b6", "e18488e185b4e186a9"],
- ["ec81b6", "ec81b4e186a9"],
- ["ec81b7", "e18488e185b4e186aa"],
- ["ec81b7", "ec81b4e186aa"],
- ["ec81b8", "e18488e185b4e186ab"],
- ["ec81b8", "ec81b4e186ab"],
- ["ec81b9", "e18488e185b4e186ac"],
- ["ec81b9", "ec81b4e186ac"],
- ["ec81ba", "e18488e185b4e186ad"],
- ["ec81ba", "ec81b4e186ad"],
- ["ec81bb", "e18488e185b4e186ae"],
- ["ec81bb", "ec81b4e186ae"],
- ["ec81bc", "e18488e185b4e186af"],
- ["ec81bc", "ec81b4e186af"],
- ["ec81bd", "e18488e185b4e186b0"],
- ["ec81bd", "ec81b4e186b0"],
- ["ec81be", "e18488e185b4e186b1"],
- ["ec81be", "ec81b4e186b1"],
- ["ec81bf", "e18488e185b4e186b2"],
- ["ec81bf", "ec81b4e186b2"],
- ["ec8280", "e18488e185b4e186b3"],
- ["ec8280", "ec81b4e186b3"],
- ["ec8281", "e18488e185b4e186b4"],
- ["ec8281", "ec81b4e186b4"],
- ["ec8282", "e18488e185b4e186b5"],
- ["ec8282", "ec81b4e186b5"],
- ["ec8283", "e18488e185b4e186b6"],
- ["ec8283", "ec81b4e186b6"],
- ["ec8284", "e18488e185b4e186b7"],
- ["ec8284", "ec81b4e186b7"],
- ["ec8285", "e18488e185b4e186b8"],
- ["ec8285", "ec81b4e186b8"],
- ["ec8286", "e18488e185b4e186b9"],
- ["ec8286", "ec81b4e186b9"],
- ["ec8287", "e18488e185b4e186ba"],
- ["ec8287", "ec81b4e186ba"],
- ["ec8288", "e18488e185b4e186bb"],
- ["ec8288", "ec81b4e186bb"],
- ["ec8289", "e18488e185b4e186bc"],
- ["ec8289", "ec81b4e186bc"],
- ["ec828a", "e18488e185b4e186bd"],
- ["ec828a", "ec81b4e186bd"],
- ["ec828b", "e18488e185b4e186be"],
- ["ec828b", "ec81b4e186be"],
- ["ec828c", "e18488e185b4e186bf"],
- ["ec828c", "ec81b4e186bf"],
- ["ec828d", "e18488e185b4e18780"],
- ["ec828d", "ec81b4e18780"],
- ["ec828e", "e18488e185b4e18781"],
- ["ec828e", "ec81b4e18781"],
- ["ec828f", "e18488e185b4e18782"],
- ["ec828f", "ec81b4e18782"],
- ["ec8290", "e18488e185b5"],
- ["ec8291", "e18488e185b5e186a8"],
- ["ec8291", "ec8290e186a8"],
- ["ec8292", "e18488e185b5e186a9"],
- ["ec8292", "ec8290e186a9"],
- ["ec8293", "e18488e185b5e186aa"],
- ["ec8293", "ec8290e186aa"],
- ["ec8294", "e18488e185b5e186ab"],
- ["ec8294", "ec8290e186ab"],
- ["ec8295", "e18488e185b5e186ac"],
- ["ec8295", "ec8290e186ac"],
- ["ec8296", "e18488e185b5e186ad"],
- ["ec8296", "ec8290e186ad"],
- ["ec8297", "e18488e185b5e186ae"],
- ["ec8297", "ec8290e186ae"],
- ["ec8298", "e18488e185b5e186af"],
- ["ec8298", "ec8290e186af"],
- ["ec8299", "e18488e185b5e186b0"],
- ["ec8299", "ec8290e186b0"],
- ["ec829a", "e18488e185b5e186b1"],
- ["ec829a", "ec8290e186b1"],
- ["ec829b", "e18488e185b5e186b2"],
- ["ec829b", "ec8290e186b2"],
- ["ec829c", "e18488e185b5e186b3"],
- ["ec829c", "ec8290e186b3"],
- ["ec829d", "e18488e185b5e186b4"],
- ["ec829d", "ec8290e186b4"],
- ["ec829e", "e18488e185b5e186b5"],
- ["ec829e", "ec8290e186b5"],
- ["ec829f", "e18488e185b5e186b6"],
- ["ec829f", "ec8290e186b6"],
- ["ec82a0", "e18488e185b5e186b7"],
- ["ec82a0", "ec8290e186b7"],
- ["ec82a1", "e18488e185b5e186b8"],
- ["ec82a1", "ec8290e186b8"],
- ["ec82a2", "e18488e185b5e186b9"],
- ["ec82a2", "ec8290e186b9"],
- ["ec82a3", "e18488e185b5e186ba"],
- ["ec82a3", "ec8290e186ba"],
- ["ec82a4", "e18488e185b5e186bb"],
- ["ec82a4", "ec8290e186bb"],
- ["ec82a5", "e18488e185b5e186bc"],
- ["ec82a5", "ec8290e186bc"],
- ["ec82a6", "e18488e185b5e186bd"],
- ["ec82a6", "ec8290e186bd"],
- ["ec82a7", "e18488e185b5e186be"],
- ["ec82a7", "ec8290e186be"],
- ["ec82a8", "e18488e185b5e186bf"],
- ["ec82a8", "ec8290e186bf"],
- ["ec82a9", "e18488e185b5e18780"],
- ["ec82a9", "ec8290e18780"],
- ["ec82aa", "e18488e185b5e18781"],
- ["ec82aa", "ec8290e18781"],
- ["ec82ab", "e18488e185b5e18782"],
- ["ec82ab", "ec8290e18782"],
- ["ec82ac", "e18489e185a1"],
- ["ec82ad", "e18489e185a1e186a8"],
- ["ec82ad", "ec82ace186a8"],
- ["ec82ae", "e18489e185a1e186a9"],
- ["ec82ae", "ec82ace186a9"],
- ["ec82af", "e18489e185a1e186aa"],
- ["ec82af", "ec82ace186aa"],
- ["ec82b0", "e18489e185a1e186ab"],
- ["ec82b0", "ec82ace186ab"],
- ["ec82b1", "e18489e185a1e186ac"],
- ["ec82b1", "ec82ace186ac"],
- ["ec82b2", "e18489e185a1e186ad"],
- ["ec82b2", "ec82ace186ad"],
- ["ec82b3", "e18489e185a1e186ae"],
- ["ec82b3", "ec82ace186ae"],
- ["ec82b4", "e18489e185a1e186af"],
- ["ec82b4", "ec82ace186af"],
- ["ec82b5", "e18489e185a1e186b0"],
- ["ec82b5", "ec82ace186b0"],
- ["ec82b6", "e18489e185a1e186b1"],
- ["ec82b6", "ec82ace186b1"],
- ["ec82b7", "e18489e185a1e186b2"],
- ["ec82b7", "ec82ace186b2"],
- ["ec82b8", "e18489e185a1e186b3"],
- ["ec82b8", "ec82ace186b3"],
- ["ec82b9", "e18489e185a1e186b4"],
- ["ec82b9", "ec82ace186b4"],
- ["ec82ba", "e18489e185a1e186b5"],
- ["ec82ba", "ec82ace186b5"],
- ["ec82bb", "e18489e185a1e186b6"],
- ["ec82bb", "ec82ace186b6"],
- ["ec82bc", "e18489e185a1e186b7"],
- ["ec82bc", "ec82ace186b7"],
- ["ec82bd", "e18489e185a1e186b8"],
- ["ec82bd", "ec82ace186b8"],
- ["ec82be", "e18489e185a1e186b9"],
- ["ec82be", "ec82ace186b9"],
- ["ec82bf", "e18489e185a1e186ba"],
- ["ec82bf", "ec82ace186ba"],
- ["ec8380", "e18489e185a1e186bb"],
- ["ec8380", "ec82ace186bb"],
- ["ec8381", "e18489e185a1e186bc"],
- ["ec8381", "ec82ace186bc"],
- ["ec8382", "e18489e185a1e186bd"],
- ["ec8382", "ec82ace186bd"],
- ["ec8383", "e18489e185a1e186be"],
- ["ec8383", "ec82ace186be"],
- ["ec8384", "e18489e185a1e186bf"],
- ["ec8384", "ec82ace186bf"],
- ["ec8385", "e18489e185a1e18780"],
- ["ec8385", "ec82ace18780"],
- ["ec8386", "e18489e185a1e18781"],
- ["ec8386", "ec82ace18781"],
- ["ec8387", "e18489e185a1e18782"],
- ["ec8387", "ec82ace18782"],
- ["ec8388", "e18489e185a2"],
- ["ec8389", "e18489e185a2e186a8"],
- ["ec8389", "ec8388e186a8"],
- ["ec838a", "e18489e185a2e186a9"],
- ["ec838a", "ec8388e186a9"],
- ["ec838b", "e18489e185a2e186aa"],
- ["ec838b", "ec8388e186aa"],
- ["ec838c", "e18489e185a2e186ab"],
- ["ec838c", "ec8388e186ab"],
- ["ec838d", "e18489e185a2e186ac"],
- ["ec838d", "ec8388e186ac"],
- ["ec838e", "e18489e185a2e186ad"],
- ["ec838e", "ec8388e186ad"],
- ["ec838f", "e18489e185a2e186ae"],
- ["ec838f", "ec8388e186ae"],
- ["ec8390", "e18489e185a2e186af"],
- ["ec8390", "ec8388e186af"],
- ["ec8391", "e18489e185a2e186b0"],
- ["ec8391", "ec8388e186b0"],
- ["ec8392", "e18489e185a2e186b1"],
- ["ec8392", "ec8388e186b1"],
- ["ec8393", "e18489e185a2e186b2"],
- ["ec8393", "ec8388e186b2"],
- ["ec8394", "e18489e185a2e186b3"],
- ["ec8394", "ec8388e186b3"],
- ["ec8395", "e18489e185a2e186b4"],
- ["ec8395", "ec8388e186b4"],
- ["ec8396", "e18489e185a2e186b5"],
- ["ec8396", "ec8388e186b5"],
- ["ec8397", "e18489e185a2e186b6"],
- ["ec8397", "ec8388e186b6"],
- ["ec8398", "e18489e185a2e186b7"],
- ["ec8398", "ec8388e186b7"],
- ["ec8399", "e18489e185a2e186b8"],
- ["ec8399", "ec8388e186b8"],
- ["ec839a", "e18489e185a2e186b9"],
- ["ec839a", "ec8388e186b9"],
- ["ec839b", "e18489e185a2e186ba"],
- ["ec839b", "ec8388e186ba"],
- ["ec839c", "e18489e185a2e186bb"],
- ["ec839c", "ec8388e186bb"],
- ["ec839d", "e18489e185a2e186bc"],
- ["ec839d", "ec8388e186bc"],
- ["ec839e", "e18489e185a2e186bd"],
- ["ec839e", "ec8388e186bd"],
- ["ec839f", "e18489e185a2e186be"],
- ["ec839f", "ec8388e186be"],
- ["ec83a0", "e18489e185a2e186bf"],
- ["ec83a0", "ec8388e186bf"],
- ["ec83a1", "e18489e185a2e18780"],
- ["ec83a1", "ec8388e18780"],
- ["ec83a2", "e18489e185a2e18781"],
- ["ec83a2", "ec8388e18781"],
- ["ec83a3", "e18489e185a2e18782"],
- ["ec83a3", "ec8388e18782"],
- ["ec83a4", "e18489e185a3"],
- ["ec83a5", "e18489e185a3e186a8"],
- ["ec83a5", "ec83a4e186a8"],
- ["ec83a6", "e18489e185a3e186a9"],
- ["ec83a6", "ec83a4e186a9"],
- ["ec83a7", "e18489e185a3e186aa"],
- ["ec83a7", "ec83a4e186aa"],
- ["ec83a8", "e18489e185a3e186ab"],
- ["ec83a8", "ec83a4e186ab"],
- ["ec83a9", "e18489e185a3e186ac"],
- ["ec83a9", "ec83a4e186ac"],
- ["ec83aa", "e18489e185a3e186ad"],
- ["ec83aa", "ec83a4e186ad"],
- ["ec83ab", "e18489e185a3e186ae"],
- ["ec83ab", "ec83a4e186ae"],
- ["ec83ac", "e18489e185a3e186af"],
- ["ec83ac", "ec83a4e186af"],
- ["ec83ad", "e18489e185a3e186b0"],
- ["ec83ad", "ec83a4e186b0"],
- ["ec83ae", "e18489e185a3e186b1"],
- ["ec83ae", "ec83a4e186b1"],
- ["ec83af", "e18489e185a3e186b2"],
- ["ec83af", "ec83a4e186b2"],
- ["ec83b0", "e18489e185a3e186b3"],
- ["ec83b0", "ec83a4e186b3"],
- ["ec83b1", "e18489e185a3e186b4"],
- ["ec83b1", "ec83a4e186b4"],
- ["ec83b2", "e18489e185a3e186b5"],
- ["ec83b2", "ec83a4e186b5"],
- ["ec83b3", "e18489e185a3e186b6"],
- ["ec83b3", "ec83a4e186b6"],
- ["ec83b4", "e18489e185a3e186b7"],
- ["ec83b4", "ec83a4e186b7"],
- ["ec83b5", "e18489e185a3e186b8"],
- ["ec83b5", "ec83a4e186b8"],
- ["ec83b6", "e18489e185a3e186b9"],
- ["ec83b6", "ec83a4e186b9"],
- ["ec83b7", "e18489e185a3e186ba"],
- ["ec83b7", "ec83a4e186ba"],
- ["ec83b8", "e18489e185a3e186bb"],
- ["ec83b8", "ec83a4e186bb"],
- ["ec83b9", "e18489e185a3e186bc"],
- ["ec83b9", "ec83a4e186bc"],
- ["ec83ba", "e18489e185a3e186bd"],
- ["ec83ba", "ec83a4e186bd"],
- ["ec83bb", "e18489e185a3e186be"],
- ["ec83bb", "ec83a4e186be"],
- ["ec83bc", "e18489e185a3e186bf"],
- ["ec83bc", "ec83a4e186bf"],
- ["ec83bd", "e18489e185a3e18780"],
- ["ec83bd", "ec83a4e18780"],
- ["ec83be", "e18489e185a3e18781"],
- ["ec83be", "ec83a4e18781"],
- ["ec83bf", "e18489e185a3e18782"],
- ["ec83bf", "ec83a4e18782"],
- ["ec8480", "e18489e185a4"],
- ["ec8481", "e18489e185a4e186a8"],
- ["ec8481", "ec8480e186a8"],
- ["ec8482", "e18489e185a4e186a9"],
- ["ec8482", "ec8480e186a9"],
- ["ec8483", "e18489e185a4e186aa"],
- ["ec8483", "ec8480e186aa"],
- ["ec8484", "e18489e185a4e186ab"],
- ["ec8484", "ec8480e186ab"],
- ["ec8485", "e18489e185a4e186ac"],
- ["ec8485", "ec8480e186ac"],
- ["ec8486", "e18489e185a4e186ad"],
- ["ec8486", "ec8480e186ad"],
- ["ec8487", "e18489e185a4e186ae"],
- ["ec8487", "ec8480e186ae"],
- ["ec8488", "e18489e185a4e186af"],
- ["ec8488", "ec8480e186af"],
- ["ec8489", "e18489e185a4e186b0"],
- ["ec8489", "ec8480e186b0"],
- ["ec848a", "e18489e185a4e186b1"],
- ["ec848a", "ec8480e186b1"],
- ["ec848b", "e18489e185a4e186b2"],
- ["ec848b", "ec8480e186b2"],
- ["ec848c", "e18489e185a4e186b3"],
- ["ec848c", "ec8480e186b3"],
- ["ec848d", "e18489e185a4e186b4"],
- ["ec848d", "ec8480e186b4"],
- ["ec848e", "e18489e185a4e186b5"],
- ["ec848e", "ec8480e186b5"],
- ["ec848f", "e18489e185a4e186b6"],
- ["ec848f", "ec8480e186b6"],
- ["ec8490", "e18489e185a4e186b7"],
- ["ec8490", "ec8480e186b7"],
- ["ec8491", "e18489e185a4e186b8"],
- ["ec8491", "ec8480e186b8"],
- ["ec8492", "e18489e185a4e186b9"],
- ["ec8492", "ec8480e186b9"],
- ["ec8493", "e18489e185a4e186ba"],
- ["ec8493", "ec8480e186ba"],
- ["ec8494", "e18489e185a4e186bb"],
- ["ec8494", "ec8480e186bb"],
- ["ec8495", "e18489e185a4e186bc"],
- ["ec8495", "ec8480e186bc"],
- ["ec8496", "e18489e185a4e186bd"],
- ["ec8496", "ec8480e186bd"],
- ["ec8497", "e18489e185a4e186be"],
- ["ec8497", "ec8480e186be"],
- ["ec8498", "e18489e185a4e186bf"],
- ["ec8498", "ec8480e186bf"],
- ["ec8499", "e18489e185a4e18780"],
- ["ec8499", "ec8480e18780"],
- ["ec849a", "e18489e185a4e18781"],
- ["ec849a", "ec8480e18781"],
- ["ec849b", "e18489e185a4e18782"],
- ["ec849b", "ec8480e18782"],
- ["ec849c", "e18489e185a5"],
- ["ec849d", "e18489e185a5e186a8"],
- ["ec849d", "ec849ce186a8"],
- ["ec849e", "e18489e185a5e186a9"],
- ["ec849e", "ec849ce186a9"],
- ["ec849f", "e18489e185a5e186aa"],
- ["ec849f", "ec849ce186aa"],
- ["ec84a0", "e18489e185a5e186ab"],
- ["ec84a0", "ec849ce186ab"],
- ["ec84a1", "e18489e185a5e186ac"],
- ["ec84a1", "ec849ce186ac"],
- ["ec84a2", "e18489e185a5e186ad"],
- ["ec84a2", "ec849ce186ad"],
- ["ec84a3", "e18489e185a5e186ae"],
- ["ec84a3", "ec849ce186ae"],
- ["ec84a4", "e18489e185a5e186af"],
- ["ec84a4", "ec849ce186af"],
- ["ec84a5", "e18489e185a5e186b0"],
- ["ec84a5", "ec849ce186b0"],
- ["ec84a6", "e18489e185a5e186b1"],
- ["ec84a6", "ec849ce186b1"],
- ["ec84a7", "e18489e185a5e186b2"],
- ["ec84a7", "ec849ce186b2"],
- ["ec84a8", "e18489e185a5e186b3"],
- ["ec84a8", "ec849ce186b3"],
- ["ec84a9", "e18489e185a5e186b4"],
- ["ec84a9", "ec849ce186b4"],
- ["ec84aa", "e18489e185a5e186b5"],
- ["ec84aa", "ec849ce186b5"],
- ["ec84ab", "e18489e185a5e186b6"],
- ["ec84ab", "ec849ce186b6"],
- ["ec84ac", "e18489e185a5e186b7"],
- ["ec84ac", "ec849ce186b7"],
- ["ec84ad", "e18489e185a5e186b8"],
- ["ec84ad", "ec849ce186b8"],
- ["ec84ae", "e18489e185a5e186b9"],
- ["ec84ae", "ec849ce186b9"],
- ["ec84af", "e18489e185a5e186ba"],
- ["ec84af", "ec849ce186ba"],
- ["ec84b0", "e18489e185a5e186bb"],
- ["ec84b0", "ec849ce186bb"],
- ["ec84b1", "e18489e185a5e186bc"],
- ["ec84b1", "ec849ce186bc"],
- ["ec84b2", "e18489e185a5e186bd"],
- ["ec84b2", "ec849ce186bd"],
- ["ec84b3", "e18489e185a5e186be"],
- ["ec84b3", "ec849ce186be"],
- ["ec84b4", "e18489e185a5e186bf"],
- ["ec84b4", "ec849ce186bf"],
- ["ec84b5", "e18489e185a5e18780"],
- ["ec84b5", "ec849ce18780"],
- ["ec84b6", "e18489e185a5e18781"],
- ["ec84b6", "ec849ce18781"],
- ["ec84b7", "e18489e185a5e18782"],
- ["ec84b7", "ec849ce18782"],
- ["ec84b8", "e18489e185a6"],
- ["ec84b9", "e18489e185a6e186a8"],
- ["ec84b9", "ec84b8e186a8"],
- ["ec84ba", "e18489e185a6e186a9"],
- ["ec84ba", "ec84b8e186a9"],
- ["ec84bb", "e18489e185a6e186aa"],
- ["ec84bb", "ec84b8e186aa"],
- ["ec84bc", "e18489e185a6e186ab"],
- ["ec84bc", "ec84b8e186ab"],
- ["ec84bd", "e18489e185a6e186ac"],
- ["ec84bd", "ec84b8e186ac"],
- ["ec84be", "e18489e185a6e186ad"],
- ["ec84be", "ec84b8e186ad"],
- ["ec84bf", "e18489e185a6e186ae"],
- ["ec84bf", "ec84b8e186ae"],
- ["ec8580", "e18489e185a6e186af"],
- ["ec8580", "ec84b8e186af"],
- ["ec8581", "e18489e185a6e186b0"],
- ["ec8581", "ec84b8e186b0"],
- ["ec8582", "e18489e185a6e186b1"],
- ["ec8582", "ec84b8e186b1"],
- ["ec8583", "e18489e185a6e186b2"],
- ["ec8583", "ec84b8e186b2"],
- ["ec8584", "e18489e185a6e186b3"],
- ["ec8584", "ec84b8e186b3"],
- ["ec8585", "e18489e185a6e186b4"],
- ["ec8585", "ec84b8e186b4"],
- ["ec8586", "e18489e185a6e186b5"],
- ["ec8586", "ec84b8e186b5"],
- ["ec8587", "e18489e185a6e186b6"],
- ["ec8587", "ec84b8e186b6"],
- ["ec8588", "e18489e185a6e186b7"],
- ["ec8588", "ec84b8e186b7"],
- ["ec8589", "e18489e185a6e186b8"],
- ["ec8589", "ec84b8e186b8"],
- ["ec858a", "e18489e185a6e186b9"],
- ["ec858a", "ec84b8e186b9"],
- ["ec858b", "e18489e185a6e186ba"],
- ["ec858b", "ec84b8e186ba"],
- ["ec858c", "e18489e185a6e186bb"],
- ["ec858c", "ec84b8e186bb"],
- ["ec858d", "e18489e185a6e186bc"],
- ["ec858d", "ec84b8e186bc"],
- ["ec858e", "e18489e185a6e186bd"],
- ["ec858e", "ec84b8e186bd"],
- ["ec858f", "e18489e185a6e186be"],
- ["ec858f", "ec84b8e186be"],
- ["ec8590", "e18489e185a6e186bf"],
- ["ec8590", "ec84b8e186bf"],
- ["ec8591", "e18489e185a6e18780"],
- ["ec8591", "ec84b8e18780"],
- ["ec8592", "e18489e185a6e18781"],
- ["ec8592", "ec84b8e18781"],
- ["ec8593", "e18489e185a6e18782"],
- ["ec8593", "ec84b8e18782"],
- ["ec8594", "e18489e185a7"],
- ["ec8595", "e18489e185a7e186a8"],
- ["ec8595", "ec8594e186a8"],
- ["ec8596", "e18489e185a7e186a9"],
- ["ec8596", "ec8594e186a9"],
- ["ec8597", "e18489e185a7e186aa"],
- ["ec8597", "ec8594e186aa"],
- ["ec8598", "e18489e185a7e186ab"],
- ["ec8598", "ec8594e186ab"],
- ["ec8599", "e18489e185a7e186ac"],
- ["ec8599", "ec8594e186ac"],
- ["ec859a", "e18489e185a7e186ad"],
- ["ec859a", "ec8594e186ad"],
- ["ec859b", "e18489e185a7e186ae"],
- ["ec859b", "ec8594e186ae"],
- ["ec859c", "e18489e185a7e186af"],
- ["ec859c", "ec8594e186af"],
- ["ec859d", "e18489e185a7e186b0"],
- ["ec859d", "ec8594e186b0"],
- ["ec859e", "e18489e185a7e186b1"],
- ["ec859e", "ec8594e186b1"],
- ["ec859f", "e18489e185a7e186b2"],
- ["ec859f", "ec8594e186b2"],
- ["ec85a0", "e18489e185a7e186b3"],
- ["ec85a0", "ec8594e186b3"],
- ["ec85a1", "e18489e185a7e186b4"],
- ["ec85a1", "ec8594e186b4"],
- ["ec85a2", "e18489e185a7e186b5"],
- ["ec85a2", "ec8594e186b5"],
- ["ec85a3", "e18489e185a7e186b6"],
- ["ec85a3", "ec8594e186b6"],
- ["ec85a4", "e18489e185a7e186b7"],
- ["ec85a4", "ec8594e186b7"],
- ["ec85a5", "e18489e185a7e186b8"],
- ["ec85a5", "ec8594e186b8"],
- ["ec85a6", "e18489e185a7e186b9"],
- ["ec85a6", "ec8594e186b9"],
- ["ec85a7", "e18489e185a7e186ba"],
- ["ec85a7", "ec8594e186ba"],
- ["ec85a8", "e18489e185a7e186bb"],
- ["ec85a8", "ec8594e186bb"],
- ["ec85a9", "e18489e185a7e186bc"],
- ["ec85a9", "ec8594e186bc"],
- ["ec85aa", "e18489e185a7e186bd"],
- ["ec85aa", "ec8594e186bd"],
- ["ec85ab", "e18489e185a7e186be"],
- ["ec85ab", "ec8594e186be"],
- ["ec85ac", "e18489e185a7e186bf"],
- ["ec85ac", "ec8594e186bf"],
- ["ec85ad", "e18489e185a7e18780"],
- ["ec85ad", "ec8594e18780"],
- ["ec85ae", "e18489e185a7e18781"],
- ["ec85ae", "ec8594e18781"],
- ["ec85af", "e18489e185a7e18782"],
- ["ec85af", "ec8594e18782"],
- ["ec85b0", "e18489e185a8"],
- ["ec85b1", "e18489e185a8e186a8"],
- ["ec85b1", "ec85b0e186a8"],
- ["ec85b2", "e18489e185a8e186a9"],
- ["ec85b2", "ec85b0e186a9"],
- ["ec85b3", "e18489e185a8e186aa"],
- ["ec85b3", "ec85b0e186aa"],
- ["ec85b4", "e18489e185a8e186ab"],
- ["ec85b4", "ec85b0e186ab"],
- ["ec85b5", "e18489e185a8e186ac"],
- ["ec85b5", "ec85b0e186ac"],
- ["ec85b6", "e18489e185a8e186ad"],
- ["ec85b6", "ec85b0e186ad"],
- ["ec85b7", "e18489e185a8e186ae"],
- ["ec85b7", "ec85b0e186ae"],
- ["ec85b8", "e18489e185a8e186af"],
- ["ec85b8", "ec85b0e186af"],
- ["ec85b9", "e18489e185a8e186b0"],
- ["ec85b9", "ec85b0e186b0"],
- ["ec85ba", "e18489e185a8e186b1"],
- ["ec85ba", "ec85b0e186b1"],
- ["ec85bb", "e18489e185a8e186b2"],
- ["ec85bb", "ec85b0e186b2"],
- ["ec85bc", "e18489e185a8e186b3"],
- ["ec85bc", "ec85b0e186b3"],
- ["ec85bd", "e18489e185a8e186b4"],
- ["ec85bd", "ec85b0e186b4"],
- ["ec85be", "e18489e185a8e186b5"],
- ["ec85be", "ec85b0e186b5"],
- ["ec85bf", "e18489e185a8e186b6"],
- ["ec85bf", "ec85b0e186b6"],
- ["ec8680", "e18489e185a8e186b7"],
- ["ec8680", "ec85b0e186b7"],
- ["ec8681", "e18489e185a8e186b8"],
- ["ec8681", "ec85b0e186b8"],
- ["ec8682", "e18489e185a8e186b9"],
- ["ec8682", "ec85b0e186b9"],
- ["ec8683", "e18489e185a8e186ba"],
- ["ec8683", "ec85b0e186ba"],
- ["ec8684", "e18489e185a8e186bb"],
- ["ec8684", "ec85b0e186bb"],
- ["ec8685", "e18489e185a8e186bc"],
- ["ec8685", "ec85b0e186bc"],
- ["ec8686", "e18489e185a8e186bd"],
- ["ec8686", "ec85b0e186bd"],
- ["ec8687", "e18489e185a8e186be"],
- ["ec8687", "ec85b0e186be"],
- ["ec8688", "e18489e185a8e186bf"],
- ["ec8688", "ec85b0e186bf"],
- ["ec8689", "e18489e185a8e18780"],
- ["ec8689", "ec85b0e18780"],
- ["ec868a", "e18489e185a8e18781"],
- ["ec868a", "ec85b0e18781"],
- ["ec868b", "e18489e185a8e18782"],
- ["ec868b", "ec85b0e18782"],
- ["ec868c", "e18489e185a9"],
- ["ec868d", "e18489e185a9e186a8"],
- ["ec868d", "ec868ce186a8"],
- ["ec868e", "e18489e185a9e186a9"],
- ["ec868e", "ec868ce186a9"],
- ["ec868f", "e18489e185a9e186aa"],
- ["ec868f", "ec868ce186aa"],
- ["ec8690", "e18489e185a9e186ab"],
- ["ec8690", "ec868ce186ab"],
- ["ec8691", "e18489e185a9e186ac"],
- ["ec8691", "ec868ce186ac"],
- ["ec8692", "e18489e185a9e186ad"],
- ["ec8692", "ec868ce186ad"],
- ["ec8693", "e18489e185a9e186ae"],
- ["ec8693", "ec868ce186ae"],
- ["ec8694", "e18489e185a9e186af"],
- ["ec8694", "ec868ce186af"],
- ["ec8695", "e18489e185a9e186b0"],
- ["ec8695", "ec868ce186b0"],
- ["ec8696", "e18489e185a9e186b1"],
- ["ec8696", "ec868ce186b1"],
- ["ec8697", "e18489e185a9e186b2"],
- ["ec8697", "ec868ce186b2"],
- ["ec8698", "e18489e185a9e186b3"],
- ["ec8698", "ec868ce186b3"],
- ["ec8699", "e18489e185a9e186b4"],
- ["ec8699", "ec868ce186b4"],
- ["ec869a", "e18489e185a9e186b5"],
- ["ec869a", "ec868ce186b5"],
- ["ec869b", "e18489e185a9e186b6"],
- ["ec869b", "ec868ce186b6"],
- ["ec869c", "e18489e185a9e186b7"],
- ["ec869c", "ec868ce186b7"],
- ["ec869d", "e18489e185a9e186b8"],
- ["ec869d", "ec868ce186b8"],
- ["ec869e", "e18489e185a9e186b9"],
- ["ec869e", "ec868ce186b9"],
- ["ec869f", "e18489e185a9e186ba"],
- ["ec869f", "ec868ce186ba"],
- ["ec86a0", "e18489e185a9e186bb"],
- ["ec86a0", "ec868ce186bb"],
- ["ec86a1", "e18489e185a9e186bc"],
- ["ec86a1", "ec868ce186bc"],
- ["ec86a2", "e18489e185a9e186bd"],
- ["ec86a2", "ec868ce186bd"],
- ["ec86a3", "e18489e185a9e186be"],
- ["ec86a3", "ec868ce186be"],
- ["ec86a4", "e18489e185a9e186bf"],
- ["ec86a4", "ec868ce186bf"],
- ["ec86a5", "e18489e185a9e18780"],
- ["ec86a5", "ec868ce18780"],
- ["ec86a6", "e18489e185a9e18781"],
- ["ec86a6", "ec868ce18781"],
- ["ec86a7", "e18489e185a9e18782"],
- ["ec86a7", "ec868ce18782"],
- ["ec86a8", "e18489e185aa"],
- ["ec86a9", "e18489e185aae186a8"],
- ["ec86a9", "ec86a8e186a8"],
- ["ec86aa", "e18489e185aae186a9"],
- ["ec86aa", "ec86a8e186a9"],
- ["ec86ab", "e18489e185aae186aa"],
- ["ec86ab", "ec86a8e186aa"],
- ["ec86ac", "e18489e185aae186ab"],
- ["ec86ac", "ec86a8e186ab"],
- ["ec86ad", "e18489e185aae186ac"],
- ["ec86ad", "ec86a8e186ac"],
- ["ec86ae", "e18489e185aae186ad"],
- ["ec86ae", "ec86a8e186ad"],
- ["ec86af", "e18489e185aae186ae"],
- ["ec86af", "ec86a8e186ae"],
- ["ec86b0", "e18489e185aae186af"],
- ["ec86b0", "ec86a8e186af"],
- ["ec86b1", "e18489e185aae186b0"],
- ["ec86b1", "ec86a8e186b0"],
- ["ec86b2", "e18489e185aae186b1"],
- ["ec86b2", "ec86a8e186b1"],
- ["ec86b3", "e18489e185aae186b2"],
- ["ec86b3", "ec86a8e186b2"],
- ["ec86b4", "e18489e185aae186b3"],
- ["ec86b4", "ec86a8e186b3"],
- ["ec86b5", "e18489e185aae186b4"],
- ["ec86b5", "ec86a8e186b4"],
- ["ec86b6", "e18489e185aae186b5"],
- ["ec86b6", "ec86a8e186b5"],
- ["ec86b7", "e18489e185aae186b6"],
- ["ec86b7", "ec86a8e186b6"],
- ["ec86b8", "e18489e185aae186b7"],
- ["ec86b8", "ec86a8e186b7"],
- ["ec86b9", "e18489e185aae186b8"],
- ["ec86b9", "ec86a8e186b8"],
- ["ec86ba", "e18489e185aae186b9"],
- ["ec86ba", "ec86a8e186b9"],
- ["ec86bb", "e18489e185aae186ba"],
- ["ec86bb", "ec86a8e186ba"],
- ["ec86bc", "e18489e185aae186bb"],
- ["ec86bc", "ec86a8e186bb"],
- ["ec86bd", "e18489e185aae186bc"],
- ["ec86bd", "ec86a8e186bc"],
- ["ec86be", "e18489e185aae186bd"],
- ["ec86be", "ec86a8e186bd"],
- ["ec86bf", "e18489e185aae186be"],
- ["ec86bf", "ec86a8e186be"],
- ["ec8780", "e18489e185aae186bf"],
- ["ec8780", "ec86a8e186bf"],
- ["ec8781", "e18489e185aae18780"],
- ["ec8781", "ec86a8e18780"],
- ["ec8782", "e18489e185aae18781"],
- ["ec8782", "ec86a8e18781"],
- ["ec8783", "e18489e185aae18782"],
- ["ec8783", "ec86a8e18782"],
- ["ec8784", "e18489e185ab"],
- ["ec8785", "e18489e185abe186a8"],
- ["ec8785", "ec8784e186a8"],
- ["ec8786", "e18489e185abe186a9"],
- ["ec8786", "ec8784e186a9"],
- ["ec8787", "e18489e185abe186aa"],
- ["ec8787", "ec8784e186aa"],
- ["ec8788", "e18489e185abe186ab"],
- ["ec8788", "ec8784e186ab"],
- ["ec8789", "e18489e185abe186ac"],
- ["ec8789", "ec8784e186ac"],
- ["ec878a", "e18489e185abe186ad"],
- ["ec878a", "ec8784e186ad"],
- ["ec878b", "e18489e185abe186ae"],
- ["ec878b", "ec8784e186ae"],
- ["ec878c", "e18489e185abe186af"],
- ["ec878c", "ec8784e186af"],
- ["ec878d", "e18489e185abe186b0"],
- ["ec878d", "ec8784e186b0"],
- ["ec878e", "e18489e185abe186b1"],
- ["ec878e", "ec8784e186b1"],
- ["ec878f", "e18489e185abe186b2"],
- ["ec878f", "ec8784e186b2"],
- ["ec8790", "e18489e185abe186b3"],
- ["ec8790", "ec8784e186b3"],
- ["ec8791", "e18489e185abe186b4"],
- ["ec8791", "ec8784e186b4"],
- ["ec8792", "e18489e185abe186b5"],
- ["ec8792", "ec8784e186b5"],
- ["ec8793", "e18489e185abe186b6"],
- ["ec8793", "ec8784e186b6"],
- ["ec8794", "e18489e185abe186b7"],
- ["ec8794", "ec8784e186b7"],
- ["ec8795", "e18489e185abe186b8"],
- ["ec8795", "ec8784e186b8"],
- ["ec8796", "e18489e185abe186b9"],
- ["ec8796", "ec8784e186b9"],
- ["ec8797", "e18489e185abe186ba"],
- ["ec8797", "ec8784e186ba"],
- ["ec8798", "e18489e185abe186bb"],
- ["ec8798", "ec8784e186bb"],
- ["ec8799", "e18489e185abe186bc"],
- ["ec8799", "ec8784e186bc"],
- ["ec879a", "e18489e185abe186bd"],
- ["ec879a", "ec8784e186bd"],
- ["ec879b", "e18489e185abe186be"],
- ["ec879b", "ec8784e186be"],
- ["ec879c", "e18489e185abe186bf"],
- ["ec879c", "ec8784e186bf"],
- ["ec879d", "e18489e185abe18780"],
- ["ec879d", "ec8784e18780"],
- ["ec879e", "e18489e185abe18781"],
- ["ec879e", "ec8784e18781"],
- ["ec879f", "e18489e185abe18782"],
- ["ec879f", "ec8784e18782"],
- ["ec87a0", "e18489e185ac"],
- ["ec87a1", "e18489e185ace186a8"],
- ["ec87a1", "ec87a0e186a8"],
- ["ec87a2", "e18489e185ace186a9"],
- ["ec87a2", "ec87a0e186a9"],
- ["ec87a3", "e18489e185ace186aa"],
- ["ec87a3", "ec87a0e186aa"],
- ["ec87a4", "e18489e185ace186ab"],
- ["ec87a4", "ec87a0e186ab"],
- ["ec87a5", "e18489e185ace186ac"],
- ["ec87a5", "ec87a0e186ac"],
- ["ec87a6", "e18489e185ace186ad"],
- ["ec87a6", "ec87a0e186ad"],
- ["ec87a7", "e18489e185ace186ae"],
- ["ec87a7", "ec87a0e186ae"],
- ["ec87a8", "e18489e185ace186af"],
- ["ec87a8", "ec87a0e186af"],
- ["ec87a9", "e18489e185ace186b0"],
- ["ec87a9", "ec87a0e186b0"],
- ["ec87aa", "e18489e185ace186b1"],
- ["ec87aa", "ec87a0e186b1"],
- ["ec87ab", "e18489e185ace186b2"],
- ["ec87ab", "ec87a0e186b2"],
- ["ec87ac", "e18489e185ace186b3"],
- ["ec87ac", "ec87a0e186b3"],
- ["ec87ad", "e18489e185ace186b4"],
- ["ec87ad", "ec87a0e186b4"],
- ["ec87ae", "e18489e185ace186b5"],
- ["ec87ae", "ec87a0e186b5"],
- ["ec87af", "e18489e185ace186b6"],
- ["ec87af", "ec87a0e186b6"],
- ["ec87b0", "e18489e185ace186b7"],
- ["ec87b0", "ec87a0e186b7"],
- ["ec87b1", "e18489e185ace186b8"],
- ["ec87b1", "ec87a0e186b8"],
- ["ec87b2", "e18489e185ace186b9"],
- ["ec87b2", "ec87a0e186b9"],
- ["ec87b3", "e18489e185ace186ba"],
- ["ec87b3", "ec87a0e186ba"],
- ["ec87b4", "e18489e185ace186bb"],
- ["ec87b4", "ec87a0e186bb"],
- ["ec87b5", "e18489e185ace186bc"],
- ["ec87b5", "ec87a0e186bc"],
- ["ec87b6", "e18489e185ace186bd"],
- ["ec87b6", "ec87a0e186bd"],
- ["ec87b7", "e18489e185ace186be"],
- ["ec87b7", "ec87a0e186be"],
- ["ec87b8", "e18489e185ace186bf"],
- ["ec87b8", "ec87a0e186bf"],
- ["ec87b9", "e18489e185ace18780"],
- ["ec87b9", "ec87a0e18780"],
- ["ec87ba", "e18489e185ace18781"],
- ["ec87ba", "ec87a0e18781"],
- ["ec87bb", "e18489e185ace18782"],
- ["ec87bb", "ec87a0e18782"],
- ["ec87bc", "e18489e185ad"],
- ["ec87bd", "e18489e185ade186a8"],
- ["ec87bd", "ec87bce186a8"],
- ["ec87be", "e18489e185ade186a9"],
- ["ec87be", "ec87bce186a9"],
- ["ec87bf", "e18489e185ade186aa"],
- ["ec87bf", "ec87bce186aa"],
- ["ec8880", "e18489e185ade186ab"],
- ["ec8880", "ec87bce186ab"],
- ["ec8881", "e18489e185ade186ac"],
- ["ec8881", "ec87bce186ac"],
- ["ec8882", "e18489e185ade186ad"],
- ["ec8882", "ec87bce186ad"],
- ["ec8883", "e18489e185ade186ae"],
- ["ec8883", "ec87bce186ae"],
- ["ec8884", "e18489e185ade186af"],
- ["ec8884", "ec87bce186af"],
- ["ec8885", "e18489e185ade186b0"],
- ["ec8885", "ec87bce186b0"],
- ["ec8886", "e18489e185ade186b1"],
- ["ec8886", "ec87bce186b1"],
- ["ec8887", "e18489e185ade186b2"],
- ["ec8887", "ec87bce186b2"],
- ["ec8888", "e18489e185ade186b3"],
- ["ec8888", "ec87bce186b3"],
- ["ec8889", "e18489e185ade186b4"],
- ["ec8889", "ec87bce186b4"],
- ["ec888a", "e18489e185ade186b5"],
- ["ec888a", "ec87bce186b5"],
- ["ec888b", "e18489e185ade186b6"],
- ["ec888b", "ec87bce186b6"],
- ["ec888c", "e18489e185ade186b7"],
- ["ec888c", "ec87bce186b7"],
- ["ec888d", "e18489e185ade186b8"],
- ["ec888d", "ec87bce186b8"],
- ["ec888e", "e18489e185ade186b9"],
- ["ec888e", "ec87bce186b9"],
- ["ec888f", "e18489e185ade186ba"],
- ["ec888f", "ec87bce186ba"],
- ["ec8890", "e18489e185ade186bb"],
- ["ec8890", "ec87bce186bb"],
- ["ec8891", "e18489e185ade186bc"],
- ["ec8891", "ec87bce186bc"],
- ["ec8892", "e18489e185ade186bd"],
- ["ec8892", "ec87bce186bd"],
- ["ec8893", "e18489e185ade186be"],
- ["ec8893", "ec87bce186be"],
- ["ec8894", "e18489e185ade186bf"],
- ["ec8894", "ec87bce186bf"],
- ["ec8895", "e18489e185ade18780"],
- ["ec8895", "ec87bce18780"],
- ["ec8896", "e18489e185ade18781"],
- ["ec8896", "ec87bce18781"],
- ["ec8897", "e18489e185ade18782"],
- ["ec8897", "ec87bce18782"],
- ["ec8898", "e18489e185ae"],
- ["ec8899", "e18489e185aee186a8"],
- ["ec8899", "ec8898e186a8"],
- ["ec889a", "e18489e185aee186a9"],
- ["ec889a", "ec8898e186a9"],
- ["ec889b", "e18489e185aee186aa"],
- ["ec889b", "ec8898e186aa"],
- ["ec889c", "e18489e185aee186ab"],
- ["ec889c", "ec8898e186ab"],
- ["ec889d", "e18489e185aee186ac"],
- ["ec889d", "ec8898e186ac"],
- ["ec889e", "e18489e185aee186ad"],
- ["ec889e", "ec8898e186ad"],
- ["ec889f", "e18489e185aee186ae"],
- ["ec889f", "ec8898e186ae"],
- ["ec88a0", "e18489e185aee186af"],
- ["ec88a0", "ec8898e186af"],
- ["ec88a1", "e18489e185aee186b0"],
- ["ec88a1", "ec8898e186b0"],
- ["ec88a2", "e18489e185aee186b1"],
- ["ec88a2", "ec8898e186b1"],
- ["ec88a3", "e18489e185aee186b2"],
- ["ec88a3", "ec8898e186b2"],
- ["ec88a4", "e18489e185aee186b3"],
- ["ec88a4", "ec8898e186b3"],
- ["ec88a5", "e18489e185aee186b4"],
- ["ec88a5", "ec8898e186b4"],
- ["ec88a6", "e18489e185aee186b5"],
- ["ec88a6", "ec8898e186b5"],
- ["ec88a7", "e18489e185aee186b6"],
- ["ec88a7", "ec8898e186b6"],
- ["ec88a8", "e18489e185aee186b7"],
- ["ec88a8", "ec8898e186b7"],
- ["ec88a9", "e18489e185aee186b8"],
- ["ec88a9", "ec8898e186b8"],
- ["ec88aa", "e18489e185aee186b9"],
- ["ec88aa", "ec8898e186b9"],
- ["ec88ab", "e18489e185aee186ba"],
- ["ec88ab", "ec8898e186ba"],
- ["ec88ac", "e18489e185aee186bb"],
- ["ec88ac", "ec8898e186bb"],
- ["ec88ad", "e18489e185aee186bc"],
- ["ec88ad", "ec8898e186bc"],
- ["ec88ae", "e18489e185aee186bd"],
- ["ec88ae", "ec8898e186bd"],
- ["ec88af", "e18489e185aee186be"],
- ["ec88af", "ec8898e186be"],
- ["ec88b0", "e18489e185aee186bf"],
- ["ec88b0", "ec8898e186bf"],
- ["ec88b1", "e18489e185aee18780"],
- ["ec88b1", "ec8898e18780"],
- ["ec88b2", "e18489e185aee18781"],
- ["ec88b2", "ec8898e18781"],
- ["ec88b3", "e18489e185aee18782"],
- ["ec88b3", "ec8898e18782"],
- ["ec88b4", "e18489e185af"],
- ["ec88b5", "e18489e185afe186a8"],
- ["ec88b5", "ec88b4e186a8"],
- ["ec88b6", "e18489e185afe186a9"],
- ["ec88b6", "ec88b4e186a9"],
- ["ec88b7", "e18489e185afe186aa"],
- ["ec88b7", "ec88b4e186aa"],
- ["ec88b8", "e18489e185afe186ab"],
- ["ec88b8", "ec88b4e186ab"],
- ["ec88b9", "e18489e185afe186ac"],
- ["ec88b9", "ec88b4e186ac"],
- ["ec88ba", "e18489e185afe186ad"],
- ["ec88ba", "ec88b4e186ad"],
- ["ec88bb", "e18489e185afe186ae"],
- ["ec88bb", "ec88b4e186ae"],
- ["ec88bc", "e18489e185afe186af"],
- ["ec88bc", "ec88b4e186af"],
- ["ec88bd", "e18489e185afe186b0"],
- ["ec88bd", "ec88b4e186b0"],
- ["ec88be", "e18489e185afe186b1"],
- ["ec88be", "ec88b4e186b1"],
- ["ec88bf", "e18489e185afe186b2"],
- ["ec88bf", "ec88b4e186b2"],
- ["ec8980", "e18489e185afe186b3"],
- ["ec8980", "ec88b4e186b3"],
- ["ec8981", "e18489e185afe186b4"],
- ["ec8981", "ec88b4e186b4"],
- ["ec8982", "e18489e185afe186b5"],
- ["ec8982", "ec88b4e186b5"],
- ["ec8983", "e18489e185afe186b6"],
- ["ec8983", "ec88b4e186b6"],
- ["ec8984", "e18489e185afe186b7"],
- ["ec8984", "ec88b4e186b7"],
- ["ec8985", "e18489e185afe186b8"],
- ["ec8985", "ec88b4e186b8"],
- ["ec8986", "e18489e185afe186b9"],
- ["ec8986", "ec88b4e186b9"],
- ["ec8987", "e18489e185afe186ba"],
- ["ec8987", "ec88b4e186ba"],
- ["ec8988", "e18489e185afe186bb"],
- ["ec8988", "ec88b4e186bb"],
- ["ec8989", "e18489e185afe186bc"],
- ["ec8989", "ec88b4e186bc"],
- ["ec898a", "e18489e185afe186bd"],
- ["ec898a", "ec88b4e186bd"],
- ["ec898b", "e18489e185afe186be"],
- ["ec898b", "ec88b4e186be"],
- ["ec898c", "e18489e185afe186bf"],
- ["ec898c", "ec88b4e186bf"],
- ["ec898d", "e18489e185afe18780"],
- ["ec898d", "ec88b4e18780"],
- ["ec898e", "e18489e185afe18781"],
- ["ec898e", "ec88b4e18781"],
- ["ec898f", "e18489e185afe18782"],
- ["ec898f", "ec88b4e18782"],
- ["ec8990", "e18489e185b0"],
- ["ec8991", "e18489e185b0e186a8"],
- ["ec8991", "ec8990e186a8"],
- ["ec8992", "e18489e185b0e186a9"],
- ["ec8992", "ec8990e186a9"],
- ["ec8993", "e18489e185b0e186aa"],
- ["ec8993", "ec8990e186aa"],
- ["ec8994", "e18489e185b0e186ab"],
- ["ec8994", "ec8990e186ab"],
- ["ec8995", "e18489e185b0e186ac"],
- ["ec8995", "ec8990e186ac"],
- ["ec8996", "e18489e185b0e186ad"],
- ["ec8996", "ec8990e186ad"],
- ["ec8997", "e18489e185b0e186ae"],
- ["ec8997", "ec8990e186ae"],
- ["ec8998", "e18489e185b0e186af"],
- ["ec8998", "ec8990e186af"],
- ["ec8999", "e18489e185b0e186b0"],
- ["ec8999", "ec8990e186b0"],
- ["ec899a", "e18489e185b0e186b1"],
- ["ec899a", "ec8990e186b1"],
- ["ec899b", "e18489e185b0e186b2"],
- ["ec899b", "ec8990e186b2"],
- ["ec899c", "e18489e185b0e186b3"],
- ["ec899c", "ec8990e186b3"],
- ["ec899d", "e18489e185b0e186b4"],
- ["ec899d", "ec8990e186b4"],
- ["ec899e", "e18489e185b0e186b5"],
- ["ec899e", "ec8990e186b5"],
- ["ec899f", "e18489e185b0e186b6"],
- ["ec899f", "ec8990e186b6"],
- ["ec89a0", "e18489e185b0e186b7"],
- ["ec89a0", "ec8990e186b7"],
- ["ec89a1", "e18489e185b0e186b8"],
- ["ec89a1", "ec8990e186b8"],
- ["ec89a2", "e18489e185b0e186b9"],
- ["ec89a2", "ec8990e186b9"],
- ["ec89a3", "e18489e185b0e186ba"],
- ["ec89a3", "ec8990e186ba"],
- ["ec89a4", "e18489e185b0e186bb"],
- ["ec89a4", "ec8990e186bb"],
- ["ec89a5", "e18489e185b0e186bc"],
- ["ec89a5", "ec8990e186bc"],
- ["ec89a6", "e18489e185b0e186bd"],
- ["ec89a6", "ec8990e186bd"],
- ["ec89a7", "e18489e185b0e186be"],
- ["ec89a7", "ec8990e186be"],
- ["ec89a8", "e18489e185b0e186bf"],
- ["ec89a8", "ec8990e186bf"],
- ["ec89a9", "e18489e185b0e18780"],
- ["ec89a9", "ec8990e18780"],
- ["ec89aa", "e18489e185b0e18781"],
- ["ec89aa", "ec8990e18781"],
- ["ec89ab", "e18489e185b0e18782"],
- ["ec89ab", "ec8990e18782"],
- ["ec89ac", "e18489e185b1"],
- ["ec89ad", "e18489e185b1e186a8"],
- ["ec89ad", "ec89ace186a8"],
- ["ec89ae", "e18489e185b1e186a9"],
- ["ec89ae", "ec89ace186a9"],
- ["ec89af", "e18489e185b1e186aa"],
- ["ec89af", "ec89ace186aa"],
- ["ec89b0", "e18489e185b1e186ab"],
- ["ec89b0", "ec89ace186ab"],
- ["ec89b1", "e18489e185b1e186ac"],
- ["ec89b1", "ec89ace186ac"],
- ["ec89b2", "e18489e185b1e186ad"],
- ["ec89b2", "ec89ace186ad"],
- ["ec89b3", "e18489e185b1e186ae"],
- ["ec89b3", "ec89ace186ae"],
- ["ec89b4", "e18489e185b1e186af"],
- ["ec89b4", "ec89ace186af"],
- ["ec89b5", "e18489e185b1e186b0"],
- ["ec89b5", "ec89ace186b0"],
- ["ec89b6", "e18489e185b1e186b1"],
- ["ec89b6", "ec89ace186b1"],
- ["ec89b7", "e18489e185b1e186b2"],
- ["ec89b7", "ec89ace186b2"],
- ["ec89b8", "e18489e185b1e186b3"],
- ["ec89b8", "ec89ace186b3"],
- ["ec89b9", "e18489e185b1e186b4"],
- ["ec89b9", "ec89ace186b4"],
- ["ec89ba", "e18489e185b1e186b5"],
- ["ec89ba", "ec89ace186b5"],
- ["ec89bb", "e18489e185b1e186b6"],
- ["ec89bb", "ec89ace186b6"],
- ["ec89bc", "e18489e185b1e186b7"],
- ["ec89bc", "ec89ace186b7"],
- ["ec89bd", "e18489e185b1e186b8"],
- ["ec89bd", "ec89ace186b8"],
- ["ec89be", "e18489e185b1e186b9"],
- ["ec89be", "ec89ace186b9"],
- ["ec89bf", "e18489e185b1e186ba"],
- ["ec89bf", "ec89ace186ba"],
- ["ec8a80", "e18489e185b1e186bb"],
- ["ec8a80", "ec89ace186bb"],
- ["ec8a81", "e18489e185b1e186bc"],
- ["ec8a81", "ec89ace186bc"],
- ["ec8a82", "e18489e185b1e186bd"],
- ["ec8a82", "ec89ace186bd"],
- ["ec8a83", "e18489e185b1e186be"],
- ["ec8a83", "ec89ace186be"],
- ["ec8a84", "e18489e185b1e186bf"],
- ["ec8a84", "ec89ace186bf"],
- ["ec8a85", "e18489e185b1e18780"],
- ["ec8a85", "ec89ace18780"],
- ["ec8a86", "e18489e185b1e18781"],
- ["ec8a86", "ec89ace18781"],
- ["ec8a87", "e18489e185b1e18782"],
- ["ec8a87", "ec89ace18782"],
- ["ec8a88", "e18489e185b2"],
- ["ec8a89", "e18489e185b2e186a8"],
- ["ec8a89", "ec8a88e186a8"],
- ["ec8a8a", "e18489e185b2e186a9"],
- ["ec8a8a", "ec8a88e186a9"],
- ["ec8a8b", "e18489e185b2e186aa"],
- ["ec8a8b", "ec8a88e186aa"],
- ["ec8a8c", "e18489e185b2e186ab"],
- ["ec8a8c", "ec8a88e186ab"],
- ["ec8a8d", "e18489e185b2e186ac"],
- ["ec8a8d", "ec8a88e186ac"],
- ["ec8a8e", "e18489e185b2e186ad"],
- ["ec8a8e", "ec8a88e186ad"],
- ["ec8a8f", "e18489e185b2e186ae"],
- ["ec8a8f", "ec8a88e186ae"],
- ["ec8a90", "e18489e185b2e186af"],
- ["ec8a90", "ec8a88e186af"],
- ["ec8a91", "e18489e185b2e186b0"],
- ["ec8a91", "ec8a88e186b0"],
- ["ec8a92", "e18489e185b2e186b1"],
- ["ec8a92", "ec8a88e186b1"],
- ["ec8a93", "e18489e185b2e186b2"],
- ["ec8a93", "ec8a88e186b2"],
- ["ec8a94", "e18489e185b2e186b3"],
- ["ec8a94", "ec8a88e186b3"],
- ["ec8a95", "e18489e185b2e186b4"],
- ["ec8a95", "ec8a88e186b4"],
- ["ec8a96", "e18489e185b2e186b5"],
- ["ec8a96", "ec8a88e186b5"],
- ["ec8a97", "e18489e185b2e186b6"],
- ["ec8a97", "ec8a88e186b6"],
- ["ec8a98", "e18489e185b2e186b7"],
- ["ec8a98", "ec8a88e186b7"],
- ["ec8a99", "e18489e185b2e186b8"],
- ["ec8a99", "ec8a88e186b8"],
- ["ec8a9a", "e18489e185b2e186b9"],
- ["ec8a9a", "ec8a88e186b9"],
- ["ec8a9b", "e18489e185b2e186ba"],
- ["ec8a9b", "ec8a88e186ba"],
- ["ec8a9c", "e18489e185b2e186bb"],
- ["ec8a9c", "ec8a88e186bb"],
- ["ec8a9d", "e18489e185b2e186bc"],
- ["ec8a9d", "ec8a88e186bc"],
- ["ec8a9e", "e18489e185b2e186bd"],
- ["ec8a9e", "ec8a88e186bd"],
- ["ec8a9f", "e18489e185b2e186be"],
- ["ec8a9f", "ec8a88e186be"],
- ["ec8aa0", "e18489e185b2e186bf"],
- ["ec8aa0", "ec8a88e186bf"],
- ["ec8aa1", "e18489e185b2e18780"],
- ["ec8aa1", "ec8a88e18780"],
- ["ec8aa2", "e18489e185b2e18781"],
- ["ec8aa2", "ec8a88e18781"],
- ["ec8aa3", "e18489e185b2e18782"],
- ["ec8aa3", "ec8a88e18782"],
- ["ec8aa4", "e18489e185b3"],
- ["ec8aa5", "e18489e185b3e186a8"],
- ["ec8aa5", "ec8aa4e186a8"],
- ["ec8aa6", "e18489e185b3e186a9"],
- ["ec8aa6", "ec8aa4e186a9"],
- ["ec8aa7", "e18489e185b3e186aa"],
- ["ec8aa7", "ec8aa4e186aa"],
- ["ec8aa8", "e18489e185b3e186ab"],
- ["ec8aa8", "ec8aa4e186ab"],
- ["ec8aa9", "e18489e185b3e186ac"],
- ["ec8aa9", "ec8aa4e186ac"],
- ["ec8aaa", "e18489e185b3e186ad"],
- ["ec8aaa", "ec8aa4e186ad"],
- ["ec8aab", "e18489e185b3e186ae"],
- ["ec8aab", "ec8aa4e186ae"],
- ["ec8aac", "e18489e185b3e186af"],
- ["ec8aac", "ec8aa4e186af"],
- ["ec8aad", "e18489e185b3e186b0"],
- ["ec8aad", "ec8aa4e186b0"],
- ["ec8aae", "e18489e185b3e186b1"],
- ["ec8aae", "ec8aa4e186b1"],
- ["ec8aaf", "e18489e185b3e186b2"],
- ["ec8aaf", "ec8aa4e186b2"],
- ["ec8ab0", "e18489e185b3e186b3"],
- ["ec8ab0", "ec8aa4e186b3"],
- ["ec8ab1", "e18489e185b3e186b4"],
- ["ec8ab1", "ec8aa4e186b4"],
- ["ec8ab2", "e18489e185b3e186b5"],
- ["ec8ab2", "ec8aa4e186b5"],
- ["ec8ab3", "e18489e185b3e186b6"],
- ["ec8ab3", "ec8aa4e186b6"],
- ["ec8ab4", "e18489e185b3e186b7"],
- ["ec8ab4", "ec8aa4e186b7"],
- ["ec8ab5", "e18489e185b3e186b8"],
- ["ec8ab5", "ec8aa4e186b8"],
- ["ec8ab6", "e18489e185b3e186b9"],
- ["ec8ab6", "ec8aa4e186b9"],
- ["ec8ab7", "e18489e185b3e186ba"],
- ["ec8ab7", "ec8aa4e186ba"],
- ["ec8ab8", "e18489e185b3e186bb"],
- ["ec8ab8", "ec8aa4e186bb"],
- ["ec8ab9", "e18489e185b3e186bc"],
- ["ec8ab9", "ec8aa4e186bc"],
- ["ec8aba", "e18489e185b3e186bd"],
- ["ec8aba", "ec8aa4e186bd"],
- ["ec8abb", "e18489e185b3e186be"],
- ["ec8abb", "ec8aa4e186be"],
- ["ec8abc", "e18489e185b3e186bf"],
- ["ec8abc", "ec8aa4e186bf"],
- ["ec8abd", "e18489e185b3e18780"],
- ["ec8abd", "ec8aa4e18780"],
- ["ec8abe", "e18489e185b3e18781"],
- ["ec8abe", "ec8aa4e18781"],
- ["ec8abf", "e18489e185b3e18782"],
- ["ec8abf", "ec8aa4e18782"],
- ["ec8b80", "e18489e185b4"],
- ["ec8b81", "e18489e185b4e186a8"],
- ["ec8b81", "ec8b80e186a8"],
- ["ec8b82", "e18489e185b4e186a9"],
- ["ec8b82", "ec8b80e186a9"],
- ["ec8b83", "e18489e185b4e186aa"],
- ["ec8b83", "ec8b80e186aa"],
- ["ec8b84", "e18489e185b4e186ab"],
- ["ec8b84", "ec8b80e186ab"],
- ["ec8b85", "e18489e185b4e186ac"],
- ["ec8b85", "ec8b80e186ac"],
- ["ec8b86", "e18489e185b4e186ad"],
- ["ec8b86", "ec8b80e186ad"],
- ["ec8b87", "e18489e185b4e186ae"],
- ["ec8b87", "ec8b80e186ae"],
- ["ec8b88", "e18489e185b4e186af"],
- ["ec8b88", "ec8b80e186af"],
- ["ec8b89", "e18489e185b4e186b0"],
- ["ec8b89", "ec8b80e186b0"],
- ["ec8b8a", "e18489e185b4e186b1"],
- ["ec8b8a", "ec8b80e186b1"],
- ["ec8b8b", "e18489e185b4e186b2"],
- ["ec8b8b", "ec8b80e186b2"],
- ["ec8b8c", "e18489e185b4e186b3"],
- ["ec8b8c", "ec8b80e186b3"],
- ["ec8b8d", "e18489e185b4e186b4"],
- ["ec8b8d", "ec8b80e186b4"],
- ["ec8b8e", "e18489e185b4e186b5"],
- ["ec8b8e", "ec8b80e186b5"],
- ["ec8b8f", "e18489e185b4e186b6"],
- ["ec8b8f", "ec8b80e186b6"],
- ["ec8b90", "e18489e185b4e186b7"],
- ["ec8b90", "ec8b80e186b7"],
- ["ec8b91", "e18489e185b4e186b8"],
- ["ec8b91", "ec8b80e186b8"],
- ["ec8b92", "e18489e185b4e186b9"],
- ["ec8b92", "ec8b80e186b9"],
- ["ec8b93", "e18489e185b4e186ba"],
- ["ec8b93", "ec8b80e186ba"],
- ["ec8b94", "e18489e185b4e186bb"],
- ["ec8b94", "ec8b80e186bb"],
- ["ec8b95", "e18489e185b4e186bc"],
- ["ec8b95", "ec8b80e186bc"],
- ["ec8b96", "e18489e185b4e186bd"],
- ["ec8b96", "ec8b80e186bd"],
- ["ec8b97", "e18489e185b4e186be"],
- ["ec8b97", "ec8b80e186be"],
- ["ec8b98", "e18489e185b4e186bf"],
- ["ec8b98", "ec8b80e186bf"],
- ["ec8b99", "e18489e185b4e18780"],
- ["ec8b99", "ec8b80e18780"],
- ["ec8b9a", "e18489e185b4e18781"],
- ["ec8b9a", "ec8b80e18781"],
- ["ec8b9b", "e18489e185b4e18782"],
- ["ec8b9b", "ec8b80e18782"],
- ["ec8b9c", "e18489e185b5"],
- ["ec8b9d", "e18489e185b5e186a8"],
- ["ec8b9d", "ec8b9ce186a8"],
- ["ec8b9e", "e18489e185b5e186a9"],
- ["ec8b9e", "ec8b9ce186a9"],
- ["ec8b9f", "e18489e185b5e186aa"],
- ["ec8b9f", "ec8b9ce186aa"],
- ["ec8ba0", "e18489e185b5e186ab"],
- ["ec8ba0", "ec8b9ce186ab"],
- ["ec8ba1", "e18489e185b5e186ac"],
- ["ec8ba1", "ec8b9ce186ac"],
- ["ec8ba2", "e18489e185b5e186ad"],
- ["ec8ba2", "ec8b9ce186ad"],
- ["ec8ba3", "e18489e185b5e186ae"],
- ["ec8ba3", "ec8b9ce186ae"],
- ["ec8ba4", "e18489e185b5e186af"],
- ["ec8ba4", "ec8b9ce186af"],
- ["ec8ba5", "e18489e185b5e186b0"],
- ["ec8ba5", "ec8b9ce186b0"],
- ["ec8ba6", "e18489e185b5e186b1"],
- ["ec8ba6", "ec8b9ce186b1"],
- ["ec8ba7", "e18489e185b5e186b2"],
- ["ec8ba7", "ec8b9ce186b2"],
- ["ec8ba8", "e18489e185b5e186b3"],
- ["ec8ba8", "ec8b9ce186b3"],
- ["ec8ba9", "e18489e185b5e186b4"],
- ["ec8ba9", "ec8b9ce186b4"],
- ["ec8baa", "e18489e185b5e186b5"],
- ["ec8baa", "ec8b9ce186b5"],
- ["ec8bab", "e18489e185b5e186b6"],
- ["ec8bab", "ec8b9ce186b6"],
- ["ec8bac", "e18489e185b5e186b7"],
- ["ec8bac", "ec8b9ce186b7"],
- ["ec8bad", "e18489e185b5e186b8"],
- ["ec8bad", "ec8b9ce186b8"],
- ["ec8bae", "e18489e185b5e186b9"],
- ["ec8bae", "ec8b9ce186b9"],
- ["ec8baf", "e18489e185b5e186ba"],
- ["ec8baf", "ec8b9ce186ba"],
- ["ec8bb0", "e18489e185b5e186bb"],
- ["ec8bb0", "ec8b9ce186bb"],
- ["ec8bb1", "e18489e185b5e186bc"],
- ["ec8bb1", "ec8b9ce186bc"],
- ["ec8bb2", "e18489e185b5e186bd"],
- ["ec8bb2", "ec8b9ce186bd"],
- ["ec8bb3", "e18489e185b5e186be"],
- ["ec8bb3", "ec8b9ce186be"],
- ["ec8bb4", "e18489e185b5e186bf"],
- ["ec8bb4", "ec8b9ce186bf"],
- ["ec8bb5", "e18489e185b5e18780"],
- ["ec8bb5", "ec8b9ce18780"],
- ["ec8bb6", "e18489e185b5e18781"],
- ["ec8bb6", "ec8b9ce18781"],
- ["ec8bb7", "e18489e185b5e18782"],
- ["ec8bb7", "ec8b9ce18782"],
- ["ec8bb8", "e1848ae185a1"],
- ["ec8bb9", "e1848ae185a1e186a8"],
- ["ec8bb9", "ec8bb8e186a8"],
- ["ec8bba", "e1848ae185a1e186a9"],
- ["ec8bba", "ec8bb8e186a9"],
- ["ec8bbb", "e1848ae185a1e186aa"],
- ["ec8bbb", "ec8bb8e186aa"],
- ["ec8bbc", "e1848ae185a1e186ab"],
- ["ec8bbc", "ec8bb8e186ab"],
- ["ec8bbd", "e1848ae185a1e186ac"],
- ["ec8bbd", "ec8bb8e186ac"],
- ["ec8bbe", "e1848ae185a1e186ad"],
- ["ec8bbe", "ec8bb8e186ad"],
- ["ec8bbf", "e1848ae185a1e186ae"],
- ["ec8bbf", "ec8bb8e186ae"],
- ["ec8c80", "e1848ae185a1e186af"],
- ["ec8c80", "ec8bb8e186af"],
- ["ec8c81", "e1848ae185a1e186b0"],
- ["ec8c81", "ec8bb8e186b0"],
- ["ec8c82", "e1848ae185a1e186b1"],
- ["ec8c82", "ec8bb8e186b1"],
- ["ec8c83", "e1848ae185a1e186b2"],
- ["ec8c83", "ec8bb8e186b2"],
- ["ec8c84", "e1848ae185a1e186b3"],
- ["ec8c84", "ec8bb8e186b3"],
- ["ec8c85", "e1848ae185a1e186b4"],
- ["ec8c85", "ec8bb8e186b4"],
- ["ec8c86", "e1848ae185a1e186b5"],
- ["ec8c86", "ec8bb8e186b5"],
- ["ec8c87", "e1848ae185a1e186b6"],
- ["ec8c87", "ec8bb8e186b6"],
- ["ec8c88", "e1848ae185a1e186b7"],
- ["ec8c88", "ec8bb8e186b7"],
- ["ec8c89", "e1848ae185a1e186b8"],
- ["ec8c89", "ec8bb8e186b8"],
- ["ec8c8a", "e1848ae185a1e186b9"],
- ["ec8c8a", "ec8bb8e186b9"],
- ["ec8c8b", "e1848ae185a1e186ba"],
- ["ec8c8b", "ec8bb8e186ba"],
- ["ec8c8c", "e1848ae185a1e186bb"],
- ["ec8c8c", "ec8bb8e186bb"],
- ["ec8c8d", "e1848ae185a1e186bc"],
- ["ec8c8d", "ec8bb8e186bc"],
- ["ec8c8e", "e1848ae185a1e186bd"],
- ["ec8c8e", "ec8bb8e186bd"],
- ["ec8c8f", "e1848ae185a1e186be"],
- ["ec8c8f", "ec8bb8e186be"],
- ["ec8c90", "e1848ae185a1e186bf"],
- ["ec8c90", "ec8bb8e186bf"],
- ["ec8c91", "e1848ae185a1e18780"],
- ["ec8c91", "ec8bb8e18780"],
- ["ec8c92", "e1848ae185a1e18781"],
- ["ec8c92", "ec8bb8e18781"],
- ["ec8c93", "e1848ae185a1e18782"],
- ["ec8c93", "ec8bb8e18782"],
- ["ec8c94", "e1848ae185a2"],
- ["ec8c95", "e1848ae185a2e186a8"],
- ["ec8c95", "ec8c94e186a8"],
- ["ec8c96", "e1848ae185a2e186a9"],
- ["ec8c96", "ec8c94e186a9"],
- ["ec8c97", "e1848ae185a2e186aa"],
- ["ec8c97", "ec8c94e186aa"],
- ["ec8c98", "e1848ae185a2e186ab"],
- ["ec8c98", "ec8c94e186ab"],
- ["ec8c99", "e1848ae185a2e186ac"],
- ["ec8c99", "ec8c94e186ac"],
- ["ec8c9a", "e1848ae185a2e186ad"],
- ["ec8c9a", "ec8c94e186ad"],
- ["ec8c9b", "e1848ae185a2e186ae"],
- ["ec8c9b", "ec8c94e186ae"],
- ["ec8c9c", "e1848ae185a2e186af"],
- ["ec8c9c", "ec8c94e186af"],
- ["ec8c9d", "e1848ae185a2e186b0"],
- ["ec8c9d", "ec8c94e186b0"],
- ["ec8c9e", "e1848ae185a2e186b1"],
- ["ec8c9e", "ec8c94e186b1"],
- ["ec8c9f", "e1848ae185a2e186b2"],
- ["ec8c9f", "ec8c94e186b2"],
- ["ec8ca0", "e1848ae185a2e186b3"],
- ["ec8ca0", "ec8c94e186b3"],
- ["ec8ca1", "e1848ae185a2e186b4"],
- ["ec8ca1", "ec8c94e186b4"],
- ["ec8ca2", "e1848ae185a2e186b5"],
- ["ec8ca2", "ec8c94e186b5"],
- ["ec8ca3", "e1848ae185a2e186b6"],
- ["ec8ca3", "ec8c94e186b6"],
- ["ec8ca4", "e1848ae185a2e186b7"],
- ["ec8ca4", "ec8c94e186b7"],
- ["ec8ca5", "e1848ae185a2e186b8"],
- ["ec8ca5", "ec8c94e186b8"],
- ["ec8ca6", "e1848ae185a2e186b9"],
- ["ec8ca6", "ec8c94e186b9"],
- ["ec8ca7", "e1848ae185a2e186ba"],
- ["ec8ca7", "ec8c94e186ba"],
- ["ec8ca8", "e1848ae185a2e186bb"],
- ["ec8ca8", "ec8c94e186bb"],
- ["ec8ca9", "e1848ae185a2e186bc"],
- ["ec8ca9", "ec8c94e186bc"],
- ["ec8caa", "e1848ae185a2e186bd"],
- ["ec8caa", "ec8c94e186bd"],
- ["ec8cab", "e1848ae185a2e186be"],
- ["ec8cab", "ec8c94e186be"],
- ["ec8cac", "e1848ae185a2e186bf"],
- ["ec8cac", "ec8c94e186bf"],
- ["ec8cad", "e1848ae185a2e18780"],
- ["ec8cad", "ec8c94e18780"],
- ["ec8cae", "e1848ae185a2e18781"],
- ["ec8cae", "ec8c94e18781"],
- ["ec8caf", "e1848ae185a2e18782"],
- ["ec8caf", "ec8c94e18782"],
- ["ec8cb0", "e1848ae185a3"],
- ["ec8cb1", "e1848ae185a3e186a8"],
- ["ec8cb1", "ec8cb0e186a8"],
- ["ec8cb2", "e1848ae185a3e186a9"],
- ["ec8cb2", "ec8cb0e186a9"],
- ["ec8cb3", "e1848ae185a3e186aa"],
- ["ec8cb3", "ec8cb0e186aa"],
- ["ec8cb4", "e1848ae185a3e186ab"],
- ["ec8cb4", "ec8cb0e186ab"],
- ["ec8cb5", "e1848ae185a3e186ac"],
- ["ec8cb5", "ec8cb0e186ac"],
- ["ec8cb6", "e1848ae185a3e186ad"],
- ["ec8cb6", "ec8cb0e186ad"],
- ["ec8cb7", "e1848ae185a3e186ae"],
- ["ec8cb7", "ec8cb0e186ae"],
- ["ec8cb8", "e1848ae185a3e186af"],
- ["ec8cb8", "ec8cb0e186af"],
- ["ec8cb9", "e1848ae185a3e186b0"],
- ["ec8cb9", "ec8cb0e186b0"],
- ["ec8cba", "e1848ae185a3e186b1"],
- ["ec8cba", "ec8cb0e186b1"],
- ["ec8cbb", "e1848ae185a3e186b2"],
- ["ec8cbb", "ec8cb0e186b2"],
- ["ec8cbc", "e1848ae185a3e186b3"],
- ["ec8cbc", "ec8cb0e186b3"],
- ["ec8cbd", "e1848ae185a3e186b4"],
- ["ec8cbd", "ec8cb0e186b4"],
- ["ec8cbe", "e1848ae185a3e186b5"],
- ["ec8cbe", "ec8cb0e186b5"],
- ["ec8cbf", "e1848ae185a3e186b6"],
- ["ec8cbf", "ec8cb0e186b6"],
- ["ec8d80", "e1848ae185a3e186b7"],
- ["ec8d80", "ec8cb0e186b7"],
- ["ec8d81", "e1848ae185a3e186b8"],
- ["ec8d81", "ec8cb0e186b8"],
- ["ec8d82", "e1848ae185a3e186b9"],
- ["ec8d82", "ec8cb0e186b9"],
- ["ec8d83", "e1848ae185a3e186ba"],
- ["ec8d83", "ec8cb0e186ba"],
- ["ec8d84", "e1848ae185a3e186bb"],
- ["ec8d84", "ec8cb0e186bb"],
- ["ec8d85", "e1848ae185a3e186bc"],
- ["ec8d85", "ec8cb0e186bc"],
- ["ec8d86", "e1848ae185a3e186bd"],
- ["ec8d86", "ec8cb0e186bd"],
- ["ec8d87", "e1848ae185a3e186be"],
- ["ec8d87", "ec8cb0e186be"],
- ["ec8d88", "e1848ae185a3e186bf"],
- ["ec8d88", "ec8cb0e186bf"],
- ["ec8d89", "e1848ae185a3e18780"],
- ["ec8d89", "ec8cb0e18780"],
- ["ec8d8a", "e1848ae185a3e18781"],
- ["ec8d8a", "ec8cb0e18781"],
- ["ec8d8b", "e1848ae185a3e18782"],
- ["ec8d8b", "ec8cb0e18782"],
- ["ec8d8c", "e1848ae185a4"],
- ["ec8d8d", "e1848ae185a4e186a8"],
- ["ec8d8d", "ec8d8ce186a8"],
- ["ec8d8e", "e1848ae185a4e186a9"],
- ["ec8d8e", "ec8d8ce186a9"],
- ["ec8d8f", "e1848ae185a4e186aa"],
- ["ec8d8f", "ec8d8ce186aa"],
- ["ec8d90", "e1848ae185a4e186ab"],
- ["ec8d90", "ec8d8ce186ab"],
- ["ec8d91", "e1848ae185a4e186ac"],
- ["ec8d91", "ec8d8ce186ac"],
- ["ec8d92", "e1848ae185a4e186ad"],
- ["ec8d92", "ec8d8ce186ad"],
- ["ec8d93", "e1848ae185a4e186ae"],
- ["ec8d93", "ec8d8ce186ae"],
- ["ec8d94", "e1848ae185a4e186af"],
- ["ec8d94", "ec8d8ce186af"],
- ["ec8d95", "e1848ae185a4e186b0"],
- ["ec8d95", "ec8d8ce186b0"],
- ["ec8d96", "e1848ae185a4e186b1"],
- ["ec8d96", "ec8d8ce186b1"],
- ["ec8d97", "e1848ae185a4e186b2"],
- ["ec8d97", "ec8d8ce186b2"],
- ["ec8d98", "e1848ae185a4e186b3"],
- ["ec8d98", "ec8d8ce186b3"],
- ["ec8d99", "e1848ae185a4e186b4"],
- ["ec8d99", "ec8d8ce186b4"],
- ["ec8d9a", "e1848ae185a4e186b5"],
- ["ec8d9a", "ec8d8ce186b5"],
- ["ec8d9b", "e1848ae185a4e186b6"],
- ["ec8d9b", "ec8d8ce186b6"],
- ["ec8d9c", "e1848ae185a4e186b7"],
- ["ec8d9c", "ec8d8ce186b7"],
- ["ec8d9d", "e1848ae185a4e186b8"],
- ["ec8d9d", "ec8d8ce186b8"],
- ["ec8d9e", "e1848ae185a4e186b9"],
- ["ec8d9e", "ec8d8ce186b9"],
- ["ec8d9f", "e1848ae185a4e186ba"],
- ["ec8d9f", "ec8d8ce186ba"],
- ["ec8da0", "e1848ae185a4e186bb"],
- ["ec8da0", "ec8d8ce186bb"],
- ["ec8da1", "e1848ae185a4e186bc"],
- ["ec8da1", "ec8d8ce186bc"],
- ["ec8da2", "e1848ae185a4e186bd"],
- ["ec8da2", "ec8d8ce186bd"],
- ["ec8da3", "e1848ae185a4e186be"],
- ["ec8da3", "ec8d8ce186be"],
- ["ec8da4", "e1848ae185a4e186bf"],
- ["ec8da4", "ec8d8ce186bf"],
- ["ec8da5", "e1848ae185a4e18780"],
- ["ec8da5", "ec8d8ce18780"],
- ["ec8da6", "e1848ae185a4e18781"],
- ["ec8da6", "ec8d8ce18781"],
- ["ec8da7", "e1848ae185a4e18782"],
- ["ec8da7", "ec8d8ce18782"],
- ["ec8da8", "e1848ae185a5"],
- ["ec8da9", "e1848ae185a5e186a8"],
- ["ec8da9", "ec8da8e186a8"],
- ["ec8daa", "e1848ae185a5e186a9"],
- ["ec8daa", "ec8da8e186a9"],
- ["ec8dab", "e1848ae185a5e186aa"],
- ["ec8dab", "ec8da8e186aa"],
- ["ec8dac", "e1848ae185a5e186ab"],
- ["ec8dac", "ec8da8e186ab"],
- ["ec8dad", "e1848ae185a5e186ac"],
- ["ec8dad", "ec8da8e186ac"],
- ["ec8dae", "e1848ae185a5e186ad"],
- ["ec8dae", "ec8da8e186ad"],
- ["ec8daf", "e1848ae185a5e186ae"],
- ["ec8daf", "ec8da8e186ae"],
- ["ec8db0", "e1848ae185a5e186af"],
- ["ec8db0", "ec8da8e186af"],
- ["ec8db1", "e1848ae185a5e186b0"],
- ["ec8db1", "ec8da8e186b0"],
- ["ec8db2", "e1848ae185a5e186b1"],
- ["ec8db2", "ec8da8e186b1"],
- ["ec8db3", "e1848ae185a5e186b2"],
- ["ec8db3", "ec8da8e186b2"],
- ["ec8db4", "e1848ae185a5e186b3"],
- ["ec8db4", "ec8da8e186b3"],
- ["ec8db5", "e1848ae185a5e186b4"],
- ["ec8db5", "ec8da8e186b4"],
- ["ec8db6", "e1848ae185a5e186b5"],
- ["ec8db6", "ec8da8e186b5"],
- ["ec8db7", "e1848ae185a5e186b6"],
- ["ec8db7", "ec8da8e186b6"],
- ["ec8db8", "e1848ae185a5e186b7"],
- ["ec8db8", "ec8da8e186b7"],
- ["ec8db9", "e1848ae185a5e186b8"],
- ["ec8db9", "ec8da8e186b8"],
- ["ec8dba", "e1848ae185a5e186b9"],
- ["ec8dba", "ec8da8e186b9"],
- ["ec8dbb", "e1848ae185a5e186ba"],
- ["ec8dbb", "ec8da8e186ba"],
- ["ec8dbc", "e1848ae185a5e186bb"],
- ["ec8dbc", "ec8da8e186bb"],
- ["ec8dbd", "e1848ae185a5e186bc"],
- ["ec8dbd", "ec8da8e186bc"],
- ["ec8dbe", "e1848ae185a5e186bd"],
- ["ec8dbe", "ec8da8e186bd"],
- ["ec8dbf", "e1848ae185a5e186be"],
- ["ec8dbf", "ec8da8e186be"],
- ["ec8e80", "e1848ae185a5e186bf"],
- ["ec8e80", "ec8da8e186bf"],
- ["ec8e81", "e1848ae185a5e18780"],
- ["ec8e81", "ec8da8e18780"],
- ["ec8e82", "e1848ae185a5e18781"],
- ["ec8e82", "ec8da8e18781"],
- ["ec8e83", "e1848ae185a5e18782"],
- ["ec8e83", "ec8da8e18782"],
- ["ec8e84", "e1848ae185a6"],
- ["ec8e85", "e1848ae185a6e186a8"],
- ["ec8e85", "ec8e84e186a8"],
- ["ec8e86", "e1848ae185a6e186a9"],
- ["ec8e86", "ec8e84e186a9"],
- ["ec8e87", "e1848ae185a6e186aa"],
- ["ec8e87", "ec8e84e186aa"],
- ["ec8e88", "e1848ae185a6e186ab"],
- ["ec8e88", "ec8e84e186ab"],
- ["ec8e89", "e1848ae185a6e186ac"],
- ["ec8e89", "ec8e84e186ac"],
- ["ec8e8a", "e1848ae185a6e186ad"],
- ["ec8e8a", "ec8e84e186ad"],
- ["ec8e8b", "e1848ae185a6e186ae"],
- ["ec8e8b", "ec8e84e186ae"],
- ["ec8e8c", "e1848ae185a6e186af"],
- ["ec8e8c", "ec8e84e186af"],
- ["ec8e8d", "e1848ae185a6e186b0"],
- ["ec8e8d", "ec8e84e186b0"],
- ["ec8e8e", "e1848ae185a6e186b1"],
- ["ec8e8e", "ec8e84e186b1"],
- ["ec8e8f", "e1848ae185a6e186b2"],
- ["ec8e8f", "ec8e84e186b2"],
- ["ec8e90", "e1848ae185a6e186b3"],
- ["ec8e90", "ec8e84e186b3"],
- ["ec8e91", "e1848ae185a6e186b4"],
- ["ec8e91", "ec8e84e186b4"],
- ["ec8e92", "e1848ae185a6e186b5"],
- ["ec8e92", "ec8e84e186b5"],
- ["ec8e93", "e1848ae185a6e186b6"],
- ["ec8e93", "ec8e84e186b6"],
- ["ec8e94", "e1848ae185a6e186b7"],
- ["ec8e94", "ec8e84e186b7"],
- ["ec8e95", "e1848ae185a6e186b8"],
- ["ec8e95", "ec8e84e186b8"],
- ["ec8e96", "e1848ae185a6e186b9"],
- ["ec8e96", "ec8e84e186b9"],
- ["ec8e97", "e1848ae185a6e186ba"],
- ["ec8e97", "ec8e84e186ba"],
- ["ec8e98", "e1848ae185a6e186bb"],
- ["ec8e98", "ec8e84e186bb"],
- ["ec8e99", "e1848ae185a6e186bc"],
- ["ec8e99", "ec8e84e186bc"],
- ["ec8e9a", "e1848ae185a6e186bd"],
- ["ec8e9a", "ec8e84e186bd"],
- ["ec8e9b", "e1848ae185a6e186be"],
- ["ec8e9b", "ec8e84e186be"],
- ["ec8e9c", "e1848ae185a6e186bf"],
- ["ec8e9c", "ec8e84e186bf"],
- ["ec8e9d", "e1848ae185a6e18780"],
- ["ec8e9d", "ec8e84e18780"],
- ["ec8e9e", "e1848ae185a6e18781"],
- ["ec8e9e", "ec8e84e18781"],
- ["ec8e9f", "e1848ae185a6e18782"],
- ["ec8e9f", "ec8e84e18782"],
- ["ec8ea0", "e1848ae185a7"],
- ["ec8ea1", "e1848ae185a7e186a8"],
- ["ec8ea1", "ec8ea0e186a8"],
- ["ec8ea2", "e1848ae185a7e186a9"],
- ["ec8ea2", "ec8ea0e186a9"],
- ["ec8ea3", "e1848ae185a7e186aa"],
- ["ec8ea3", "ec8ea0e186aa"],
- ["ec8ea4", "e1848ae185a7e186ab"],
- ["ec8ea4", "ec8ea0e186ab"],
- ["ec8ea5", "e1848ae185a7e186ac"],
- ["ec8ea5", "ec8ea0e186ac"],
- ["ec8ea6", "e1848ae185a7e186ad"],
- ["ec8ea6", "ec8ea0e186ad"],
- ["ec8ea7", "e1848ae185a7e186ae"],
- ["ec8ea7", "ec8ea0e186ae"],
- ["ec8ea8", "e1848ae185a7e186af"],
- ["ec8ea8", "ec8ea0e186af"],
- ["ec8ea9", "e1848ae185a7e186b0"],
- ["ec8ea9", "ec8ea0e186b0"],
- ["ec8eaa", "e1848ae185a7e186b1"],
- ["ec8eaa", "ec8ea0e186b1"],
- ["ec8eab", "e1848ae185a7e186b2"],
- ["ec8eab", "ec8ea0e186b2"],
- ["ec8eac", "e1848ae185a7e186b3"],
- ["ec8eac", "ec8ea0e186b3"],
- ["ec8ead", "e1848ae185a7e186b4"],
- ["ec8ead", "ec8ea0e186b4"],
- ["ec8eae", "e1848ae185a7e186b5"],
- ["ec8eae", "ec8ea0e186b5"],
- ["ec8eaf", "e1848ae185a7e186b6"],
- ["ec8eaf", "ec8ea0e186b6"],
- ["ec8eb0", "e1848ae185a7e186b7"],
- ["ec8eb0", "ec8ea0e186b7"],
- ["ec8eb1", "e1848ae185a7e186b8"],
- ["ec8eb1", "ec8ea0e186b8"],
- ["ec8eb2", "e1848ae185a7e186b9"],
- ["ec8eb2", "ec8ea0e186b9"],
- ["ec8eb3", "e1848ae185a7e186ba"],
- ["ec8eb3", "ec8ea0e186ba"],
- ["ec8eb4", "e1848ae185a7e186bb"],
- ["ec8eb4", "ec8ea0e186bb"],
- ["ec8eb5", "e1848ae185a7e186bc"],
- ["ec8eb5", "ec8ea0e186bc"],
- ["ec8eb6", "e1848ae185a7e186bd"],
- ["ec8eb6", "ec8ea0e186bd"],
- ["ec8eb7", "e1848ae185a7e186be"],
- ["ec8eb7", "ec8ea0e186be"],
- ["ec8eb8", "e1848ae185a7e186bf"],
- ["ec8eb8", "ec8ea0e186bf"],
- ["ec8eb9", "e1848ae185a7e18780"],
- ["ec8eb9", "ec8ea0e18780"],
- ["ec8eba", "e1848ae185a7e18781"],
- ["ec8eba", "ec8ea0e18781"],
- ["ec8ebb", "e1848ae185a7e18782"],
- ["ec8ebb", "ec8ea0e18782"],
- ["ec8ebc", "e1848ae185a8"],
- ["ec8ebd", "e1848ae185a8e186a8"],
- ["ec8ebd", "ec8ebce186a8"],
- ["ec8ebe", "e1848ae185a8e186a9"],
- ["ec8ebe", "ec8ebce186a9"],
- ["ec8ebf", "e1848ae185a8e186aa"],
- ["ec8ebf", "ec8ebce186aa"],
- ["ec8f80", "e1848ae185a8e186ab"],
- ["ec8f80", "ec8ebce186ab"],
- ["ec8f81", "e1848ae185a8e186ac"],
- ["ec8f81", "ec8ebce186ac"],
- ["ec8f82", "e1848ae185a8e186ad"],
- ["ec8f82", "ec8ebce186ad"],
- ["ec8f83", "e1848ae185a8e186ae"],
- ["ec8f83", "ec8ebce186ae"],
- ["ec8f84", "e1848ae185a8e186af"],
- ["ec8f84", "ec8ebce186af"],
- ["ec8f85", "e1848ae185a8e186b0"],
- ["ec8f85", "ec8ebce186b0"],
- ["ec8f86", "e1848ae185a8e186b1"],
- ["ec8f86", "ec8ebce186b1"],
- ["ec8f87", "e1848ae185a8e186b2"],
- ["ec8f87", "ec8ebce186b2"],
- ["ec8f88", "e1848ae185a8e186b3"],
- ["ec8f88", "ec8ebce186b3"],
- ["ec8f89", "e1848ae185a8e186b4"],
- ["ec8f89", "ec8ebce186b4"],
- ["ec8f8a", "e1848ae185a8e186b5"],
- ["ec8f8a", "ec8ebce186b5"],
- ["ec8f8b", "e1848ae185a8e186b6"],
- ["ec8f8b", "ec8ebce186b6"],
- ["ec8f8c", "e1848ae185a8e186b7"],
- ["ec8f8c", "ec8ebce186b7"],
- ["ec8f8d", "e1848ae185a8e186b8"],
- ["ec8f8d", "ec8ebce186b8"],
- ["ec8f8e", "e1848ae185a8e186b9"],
- ["ec8f8e", "ec8ebce186b9"],
- ["ec8f8f", "e1848ae185a8e186ba"],
- ["ec8f8f", "ec8ebce186ba"],
- ["ec8f90", "e1848ae185a8e186bb"],
- ["ec8f90", "ec8ebce186bb"],
- ["ec8f91", "e1848ae185a8e186bc"],
- ["ec8f91", "ec8ebce186bc"],
- ["ec8f92", "e1848ae185a8e186bd"],
- ["ec8f92", "ec8ebce186bd"],
- ["ec8f93", "e1848ae185a8e186be"],
- ["ec8f93", "ec8ebce186be"],
- ["ec8f94", "e1848ae185a8e186bf"],
- ["ec8f94", "ec8ebce186bf"],
- ["ec8f95", "e1848ae185a8e18780"],
- ["ec8f95", "ec8ebce18780"],
- ["ec8f96", "e1848ae185a8e18781"],
- ["ec8f96", "ec8ebce18781"],
- ["ec8f97", "e1848ae185a8e18782"],
- ["ec8f97", "ec8ebce18782"],
- ["ec8f98", "e1848ae185a9"],
- ["ec8f99", "e1848ae185a9e186a8"],
- ["ec8f99", "ec8f98e186a8"],
- ["ec8f9a", "e1848ae185a9e186a9"],
- ["ec8f9a", "ec8f98e186a9"],
- ["ec8f9b", "e1848ae185a9e186aa"],
- ["ec8f9b", "ec8f98e186aa"],
- ["ec8f9c", "e1848ae185a9e186ab"],
- ["ec8f9c", "ec8f98e186ab"],
- ["ec8f9d", "e1848ae185a9e186ac"],
- ["ec8f9d", "ec8f98e186ac"],
- ["ec8f9e", "e1848ae185a9e186ad"],
- ["ec8f9e", "ec8f98e186ad"],
- ["ec8f9f", "e1848ae185a9e186ae"],
- ["ec8f9f", "ec8f98e186ae"],
- ["ec8fa0", "e1848ae185a9e186af"],
- ["ec8fa0", "ec8f98e186af"],
- ["ec8fa1", "e1848ae185a9e186b0"],
- ["ec8fa1", "ec8f98e186b0"],
- ["ec8fa2", "e1848ae185a9e186b1"],
- ["ec8fa2", "ec8f98e186b1"],
- ["ec8fa3", "e1848ae185a9e186b2"],
- ["ec8fa3", "ec8f98e186b2"],
- ["ec8fa4", "e1848ae185a9e186b3"],
- ["ec8fa4", "ec8f98e186b3"],
- ["ec8fa5", "e1848ae185a9e186b4"],
- ["ec8fa5", "ec8f98e186b4"],
- ["ec8fa6", "e1848ae185a9e186b5"],
- ["ec8fa6", "ec8f98e186b5"],
- ["ec8fa7", "e1848ae185a9e186b6"],
- ["ec8fa7", "ec8f98e186b6"],
- ["ec8fa8", "e1848ae185a9e186b7"],
- ["ec8fa8", "ec8f98e186b7"],
- ["ec8fa9", "e1848ae185a9e186b8"],
- ["ec8fa9", "ec8f98e186b8"],
- ["ec8faa", "e1848ae185a9e186b9"],
- ["ec8faa", "ec8f98e186b9"],
- ["ec8fab", "e1848ae185a9e186ba"],
- ["ec8fab", "ec8f98e186ba"],
- ["ec8fac", "e1848ae185a9e186bb"],
- ["ec8fac", "ec8f98e186bb"],
- ["ec8fad", "e1848ae185a9e186bc"],
- ["ec8fad", "ec8f98e186bc"],
- ["ec8fae", "e1848ae185a9e186bd"],
- ["ec8fae", "ec8f98e186bd"],
- ["ec8faf", "e1848ae185a9e186be"],
- ["ec8faf", "ec8f98e186be"],
- ["ec8fb0", "e1848ae185a9e186bf"],
- ["ec8fb0", "ec8f98e186bf"],
- ["ec8fb1", "e1848ae185a9e18780"],
- ["ec8fb1", "ec8f98e18780"],
- ["ec8fb2", "e1848ae185a9e18781"],
- ["ec8fb2", "ec8f98e18781"],
- ["ec8fb3", "e1848ae185a9e18782"],
- ["ec8fb3", "ec8f98e18782"],
- ["ec8fb4", "e1848ae185aa"],
- ["ec8fb5", "e1848ae185aae186a8"],
- ["ec8fb5", "ec8fb4e186a8"],
- ["ec8fb6", "e1848ae185aae186a9"],
- ["ec8fb6", "ec8fb4e186a9"],
- ["ec8fb7", "e1848ae185aae186aa"],
- ["ec8fb7", "ec8fb4e186aa"],
- ["ec8fb8", "e1848ae185aae186ab"],
- ["ec8fb8", "ec8fb4e186ab"],
- ["ec8fb9", "e1848ae185aae186ac"],
- ["ec8fb9", "ec8fb4e186ac"],
- ["ec8fba", "e1848ae185aae186ad"],
- ["ec8fba", "ec8fb4e186ad"],
- ["ec8fbb", "e1848ae185aae186ae"],
- ["ec8fbb", "ec8fb4e186ae"],
- ["ec8fbc", "e1848ae185aae186af"],
- ["ec8fbc", "ec8fb4e186af"],
- ["ec8fbd", "e1848ae185aae186b0"],
- ["ec8fbd", "ec8fb4e186b0"],
- ["ec8fbe", "e1848ae185aae186b1"],
- ["ec8fbe", "ec8fb4e186b1"],
- ["ec8fbf", "e1848ae185aae186b2"],
- ["ec8fbf", "ec8fb4e186b2"],
- ["ec9080", "e1848ae185aae186b3"],
- ["ec9080", "ec8fb4e186b3"],
- ["ec9081", "e1848ae185aae186b4"],
- ["ec9081", "ec8fb4e186b4"],
- ["ec9082", "e1848ae185aae186b5"],
- ["ec9082", "ec8fb4e186b5"],
- ["ec9083", "e1848ae185aae186b6"],
- ["ec9083", "ec8fb4e186b6"],
- ["ec9084", "e1848ae185aae186b7"],
- ["ec9084", "ec8fb4e186b7"],
- ["ec9085", "e1848ae185aae186b8"],
- ["ec9085", "ec8fb4e186b8"],
- ["ec9086", "e1848ae185aae186b9"],
- ["ec9086", "ec8fb4e186b9"],
- ["ec9087", "e1848ae185aae186ba"],
- ["ec9087", "ec8fb4e186ba"],
- ["ec9088", "e1848ae185aae186bb"],
- ["ec9088", "ec8fb4e186bb"],
- ["ec9089", "e1848ae185aae186bc"],
- ["ec9089", "ec8fb4e186bc"],
- ["ec908a", "e1848ae185aae186bd"],
- ["ec908a", "ec8fb4e186bd"],
- ["ec908b", "e1848ae185aae186be"],
- ["ec908b", "ec8fb4e186be"],
- ["ec908c", "e1848ae185aae186bf"],
- ["ec908c", "ec8fb4e186bf"],
- ["ec908d", "e1848ae185aae18780"],
- ["ec908d", "ec8fb4e18780"],
- ["ec908e", "e1848ae185aae18781"],
- ["ec908e", "ec8fb4e18781"],
- ["ec908f", "e1848ae185aae18782"],
- ["ec908f", "ec8fb4e18782"],
- ["ec9090", "e1848ae185ab"],
- ["ec9091", "e1848ae185abe186a8"],
- ["ec9091", "ec9090e186a8"],
- ["ec9092", "e1848ae185abe186a9"],
- ["ec9092", "ec9090e186a9"],
- ["ec9093", "e1848ae185abe186aa"],
- ["ec9093", "ec9090e186aa"],
- ["ec9094", "e1848ae185abe186ab"],
- ["ec9094", "ec9090e186ab"],
- ["ec9095", "e1848ae185abe186ac"],
- ["ec9095", "ec9090e186ac"],
- ["ec9096", "e1848ae185abe186ad"],
- ["ec9096", "ec9090e186ad"],
- ["ec9097", "e1848ae185abe186ae"],
- ["ec9097", "ec9090e186ae"],
- ["ec9098", "e1848ae185abe186af"],
- ["ec9098", "ec9090e186af"],
- ["ec9099", "e1848ae185abe186b0"],
- ["ec9099", "ec9090e186b0"],
- ["ec909a", "e1848ae185abe186b1"],
- ["ec909a", "ec9090e186b1"],
- ["ec909b", "e1848ae185abe186b2"],
- ["ec909b", "ec9090e186b2"],
- ["ec909c", "e1848ae185abe186b3"],
- ["ec909c", "ec9090e186b3"],
- ["ec909d", "e1848ae185abe186b4"],
- ["ec909d", "ec9090e186b4"],
- ["ec909e", "e1848ae185abe186b5"],
- ["ec909e", "ec9090e186b5"],
- ["ec909f", "e1848ae185abe186b6"],
- ["ec909f", "ec9090e186b6"],
- ["ec90a0", "e1848ae185abe186b7"],
- ["ec90a0", "ec9090e186b7"],
- ["ec90a1", "e1848ae185abe186b8"],
- ["ec90a1", "ec9090e186b8"],
- ["ec90a2", "e1848ae185abe186b9"],
- ["ec90a2", "ec9090e186b9"],
- ["ec90a3", "e1848ae185abe186ba"],
- ["ec90a3", "ec9090e186ba"],
- ["ec90a4", "e1848ae185abe186bb"],
- ["ec90a4", "ec9090e186bb"],
- ["ec90a5", "e1848ae185abe186bc"],
- ["ec90a5", "ec9090e186bc"],
- ["ec90a6", "e1848ae185abe186bd"],
- ["ec90a6", "ec9090e186bd"],
- ["ec90a7", "e1848ae185abe186be"],
- ["ec90a7", "ec9090e186be"],
- ["ec90a8", "e1848ae185abe186bf"],
- ["ec90a8", "ec9090e186bf"],
- ["ec90a9", "e1848ae185abe18780"],
- ["ec90a9", "ec9090e18780"],
- ["ec90aa", "e1848ae185abe18781"],
- ["ec90aa", "ec9090e18781"],
- ["ec90ab", "e1848ae185abe18782"],
- ["ec90ab", "ec9090e18782"],
- ["ec90ac", "e1848ae185ac"],
- ["ec90ad", "e1848ae185ace186a8"],
- ["ec90ad", "ec90ace186a8"],
- ["ec90ae", "e1848ae185ace186a9"],
- ["ec90ae", "ec90ace186a9"],
- ["ec90af", "e1848ae185ace186aa"],
- ["ec90af", "ec90ace186aa"],
- ["ec90b0", "e1848ae185ace186ab"],
- ["ec90b0", "ec90ace186ab"],
- ["ec90b1", "e1848ae185ace186ac"],
- ["ec90b1", "ec90ace186ac"],
- ["ec90b2", "e1848ae185ace186ad"],
- ["ec90b2", "ec90ace186ad"],
- ["ec90b3", "e1848ae185ace186ae"],
- ["ec90b3", "ec90ace186ae"],
- ["ec90b4", "e1848ae185ace186af"],
- ["ec90b4", "ec90ace186af"],
- ["ec90b5", "e1848ae185ace186b0"],
- ["ec90b5", "ec90ace186b0"],
- ["ec90b6", "e1848ae185ace186b1"],
- ["ec90b6", "ec90ace186b1"],
- ["ec90b7", "e1848ae185ace186b2"],
- ["ec90b7", "ec90ace186b2"],
- ["ec90b8", "e1848ae185ace186b3"],
- ["ec90b8", "ec90ace186b3"],
- ["ec90b9", "e1848ae185ace186b4"],
- ["ec90b9", "ec90ace186b4"],
- ["ec90ba", "e1848ae185ace186b5"],
- ["ec90ba", "ec90ace186b5"],
- ["ec90bb", "e1848ae185ace186b6"],
- ["ec90bb", "ec90ace186b6"],
- ["ec90bc", "e1848ae185ace186b7"],
- ["ec90bc", "ec90ace186b7"],
- ["ec90bd", "e1848ae185ace186b8"],
- ["ec90bd", "ec90ace186b8"],
- ["ec90be", "e1848ae185ace186b9"],
- ["ec90be", "ec90ace186b9"],
- ["ec90bf", "e1848ae185ace186ba"],
- ["ec90bf", "ec90ace186ba"],
- ["ec9180", "e1848ae185ace186bb"],
- ["ec9180", "ec90ace186bb"],
- ["ec9181", "e1848ae185ace186bc"],
- ["ec9181", "ec90ace186bc"],
- ["ec9182", "e1848ae185ace186bd"],
- ["ec9182", "ec90ace186bd"],
- ["ec9183", "e1848ae185ace186be"],
- ["ec9183", "ec90ace186be"],
- ["ec9184", "e1848ae185ace186bf"],
- ["ec9184", "ec90ace186bf"],
- ["ec9185", "e1848ae185ace18780"],
- ["ec9185", "ec90ace18780"],
- ["ec9186", "e1848ae185ace18781"],
- ["ec9186", "ec90ace18781"],
- ["ec9187", "e1848ae185ace18782"],
- ["ec9187", "ec90ace18782"],
- ["ec9188", "e1848ae185ad"],
- ["ec9189", "e1848ae185ade186a8"],
- ["ec9189", "ec9188e186a8"],
- ["ec918a", "e1848ae185ade186a9"],
- ["ec918a", "ec9188e186a9"],
- ["ec918b", "e1848ae185ade186aa"],
- ["ec918b", "ec9188e186aa"],
- ["ec918c", "e1848ae185ade186ab"],
- ["ec918c", "ec9188e186ab"],
- ["ec918d", "e1848ae185ade186ac"],
- ["ec918d", "ec9188e186ac"],
- ["ec918e", "e1848ae185ade186ad"],
- ["ec918e", "ec9188e186ad"],
- ["ec918f", "e1848ae185ade186ae"],
- ["ec918f", "ec9188e186ae"],
- ["ec9190", "e1848ae185ade186af"],
- ["ec9190", "ec9188e186af"],
- ["ec9191", "e1848ae185ade186b0"],
- ["ec9191", "ec9188e186b0"],
- ["ec9192", "e1848ae185ade186b1"],
- ["ec9192", "ec9188e186b1"],
- ["ec9193", "e1848ae185ade186b2"],
- ["ec9193", "ec9188e186b2"],
- ["ec9194", "e1848ae185ade186b3"],
- ["ec9194", "ec9188e186b3"],
- ["ec9195", "e1848ae185ade186b4"],
- ["ec9195", "ec9188e186b4"],
- ["ec9196", "e1848ae185ade186b5"],
- ["ec9196", "ec9188e186b5"],
- ["ec9197", "e1848ae185ade186b6"],
- ["ec9197", "ec9188e186b6"],
- ["ec9198", "e1848ae185ade186b7"],
- ["ec9198", "ec9188e186b7"],
- ["ec9199", "e1848ae185ade186b8"],
- ["ec9199", "ec9188e186b8"],
- ["ec919a", "e1848ae185ade186b9"],
- ["ec919a", "ec9188e186b9"],
- ["ec919b", "e1848ae185ade186ba"],
- ["ec919b", "ec9188e186ba"],
- ["ec919c", "e1848ae185ade186bb"],
- ["ec919c", "ec9188e186bb"],
- ["ec919d", "e1848ae185ade186bc"],
- ["ec919d", "ec9188e186bc"],
- ["ec919e", "e1848ae185ade186bd"],
- ["ec919e", "ec9188e186bd"],
- ["ec919f", "e1848ae185ade186be"],
- ["ec919f", "ec9188e186be"],
- ["ec91a0", "e1848ae185ade186bf"],
- ["ec91a0", "ec9188e186bf"],
- ["ec91a1", "e1848ae185ade18780"],
- ["ec91a1", "ec9188e18780"],
- ["ec91a2", "e1848ae185ade18781"],
- ["ec91a2", "ec9188e18781"],
- ["ec91a3", "e1848ae185ade18782"],
- ["ec91a3", "ec9188e18782"],
- ["ec91a4", "e1848ae185ae"],
- ["ec91a5", "e1848ae185aee186a8"],
- ["ec91a5", "ec91a4e186a8"],
- ["ec91a6", "e1848ae185aee186a9"],
- ["ec91a6", "ec91a4e186a9"],
- ["ec91a7", "e1848ae185aee186aa"],
- ["ec91a7", "ec91a4e186aa"],
- ["ec91a8", "e1848ae185aee186ab"],
- ["ec91a8", "ec91a4e186ab"],
- ["ec91a9", "e1848ae185aee186ac"],
- ["ec91a9", "ec91a4e186ac"],
- ["ec91aa", "e1848ae185aee186ad"],
- ["ec91aa", "ec91a4e186ad"],
- ["ec91ab", "e1848ae185aee186ae"],
- ["ec91ab", "ec91a4e186ae"],
- ["ec91ac", "e1848ae185aee186af"],
- ["ec91ac", "ec91a4e186af"],
- ["ec91ad", "e1848ae185aee186b0"],
- ["ec91ad", "ec91a4e186b0"],
- ["ec91ae", "e1848ae185aee186b1"],
- ["ec91ae", "ec91a4e186b1"],
- ["ec91af", "e1848ae185aee186b2"],
- ["ec91af", "ec91a4e186b2"],
- ["ec91b0", "e1848ae185aee186b3"],
- ["ec91b0", "ec91a4e186b3"],
- ["ec91b1", "e1848ae185aee186b4"],
- ["ec91b1", "ec91a4e186b4"],
- ["ec91b2", "e1848ae185aee186b5"],
- ["ec91b2", "ec91a4e186b5"],
- ["ec91b3", "e1848ae185aee186b6"],
- ["ec91b3", "ec91a4e186b6"],
- ["ec91b4", "e1848ae185aee186b7"],
- ["ec91b4", "ec91a4e186b7"],
- ["ec91b5", "e1848ae185aee186b8"],
- ["ec91b5", "ec91a4e186b8"],
- ["ec91b6", "e1848ae185aee186b9"],
- ["ec91b6", "ec91a4e186b9"],
- ["ec91b7", "e1848ae185aee186ba"],
- ["ec91b7", "ec91a4e186ba"],
- ["ec91b8", "e1848ae185aee186bb"],
- ["ec91b8", "ec91a4e186bb"],
- ["ec91b9", "e1848ae185aee186bc"],
- ["ec91b9", "ec91a4e186bc"],
- ["ec91ba", "e1848ae185aee186bd"],
- ["ec91ba", "ec91a4e186bd"],
- ["ec91bb", "e1848ae185aee186be"],
- ["ec91bb", "ec91a4e186be"],
- ["ec91bc", "e1848ae185aee186bf"],
- ["ec91bc", "ec91a4e186bf"],
- ["ec91bd", "e1848ae185aee18780"],
- ["ec91bd", "ec91a4e18780"],
- ["ec91be", "e1848ae185aee18781"],
- ["ec91be", "ec91a4e18781"],
- ["ec91bf", "e1848ae185aee18782"],
- ["ec91bf", "ec91a4e18782"],
- ["ec9280", "e1848ae185af"],
- ["ec9281", "e1848ae185afe186a8"],
- ["ec9281", "ec9280e186a8"],
- ["ec9282", "e1848ae185afe186a9"],
- ["ec9282", "ec9280e186a9"],
- ["ec9283", "e1848ae185afe186aa"],
- ["ec9283", "ec9280e186aa"],
- ["ec9284", "e1848ae185afe186ab"],
- ["ec9284", "ec9280e186ab"],
- ["ec9285", "e1848ae185afe186ac"],
- ["ec9285", "ec9280e186ac"],
- ["ec9286", "e1848ae185afe186ad"],
- ["ec9286", "ec9280e186ad"],
- ["ec9287", "e1848ae185afe186ae"],
- ["ec9287", "ec9280e186ae"],
- ["ec9288", "e1848ae185afe186af"],
- ["ec9288", "ec9280e186af"],
- ["ec9289", "e1848ae185afe186b0"],
- ["ec9289", "ec9280e186b0"],
- ["ec928a", "e1848ae185afe186b1"],
- ["ec928a", "ec9280e186b1"],
- ["ec928b", "e1848ae185afe186b2"],
- ["ec928b", "ec9280e186b2"],
- ["ec928c", "e1848ae185afe186b3"],
- ["ec928c", "ec9280e186b3"],
- ["ec928d", "e1848ae185afe186b4"],
- ["ec928d", "ec9280e186b4"],
- ["ec928e", "e1848ae185afe186b5"],
- ["ec928e", "ec9280e186b5"],
- ["ec928f", "e1848ae185afe186b6"],
- ["ec928f", "ec9280e186b6"],
- ["ec9290", "e1848ae185afe186b7"],
- ["ec9290", "ec9280e186b7"],
- ["ec9291", "e1848ae185afe186b8"],
- ["ec9291", "ec9280e186b8"],
- ["ec9292", "e1848ae185afe186b9"],
- ["ec9292", "ec9280e186b9"],
- ["ec9293", "e1848ae185afe186ba"],
- ["ec9293", "ec9280e186ba"],
- ["ec9294", "e1848ae185afe186bb"],
- ["ec9294", "ec9280e186bb"],
- ["ec9295", "e1848ae185afe186bc"],
- ["ec9295", "ec9280e186bc"],
- ["ec9296", "e1848ae185afe186bd"],
- ["ec9296", "ec9280e186bd"],
- ["ec9297", "e1848ae185afe186be"],
- ["ec9297", "ec9280e186be"],
- ["ec9298", "e1848ae185afe186bf"],
- ["ec9298", "ec9280e186bf"],
- ["ec9299", "e1848ae185afe18780"],
- ["ec9299", "ec9280e18780"],
- ["ec929a", "e1848ae185afe18781"],
- ["ec929a", "ec9280e18781"],
- ["ec929b", "e1848ae185afe18782"],
- ["ec929b", "ec9280e18782"],
- ["ec929c", "e1848ae185b0"],
- ["ec929d", "e1848ae185b0e186a8"],
- ["ec929d", "ec929ce186a8"],
- ["ec929e", "e1848ae185b0e186a9"],
- ["ec929e", "ec929ce186a9"],
- ["ec929f", "e1848ae185b0e186aa"],
- ["ec929f", "ec929ce186aa"],
- ["ec92a0", "e1848ae185b0e186ab"],
- ["ec92a0", "ec929ce186ab"],
- ["ec92a1", "e1848ae185b0e186ac"],
- ["ec92a1", "ec929ce186ac"],
- ["ec92a2", "e1848ae185b0e186ad"],
- ["ec92a2", "ec929ce186ad"],
- ["ec92a3", "e1848ae185b0e186ae"],
- ["ec92a3", "ec929ce186ae"],
- ["ec92a4", "e1848ae185b0e186af"],
- ["ec92a4", "ec929ce186af"],
- ["ec92a5", "e1848ae185b0e186b0"],
- ["ec92a5", "ec929ce186b0"],
- ["ec92a6", "e1848ae185b0e186b1"],
- ["ec92a6", "ec929ce186b1"],
- ["ec92a7", "e1848ae185b0e186b2"],
- ["ec92a7", "ec929ce186b2"],
- ["ec92a8", "e1848ae185b0e186b3"],
- ["ec92a8", "ec929ce186b3"],
- ["ec92a9", "e1848ae185b0e186b4"],
- ["ec92a9", "ec929ce186b4"],
- ["ec92aa", "e1848ae185b0e186b5"],
- ["ec92aa", "ec929ce186b5"],
- ["ec92ab", "e1848ae185b0e186b6"],
- ["ec92ab", "ec929ce186b6"],
- ["ec92ac", "e1848ae185b0e186b7"],
- ["ec92ac", "ec929ce186b7"],
- ["ec92ad", "e1848ae185b0e186b8"],
- ["ec92ad", "ec929ce186b8"],
- ["ec92ae", "e1848ae185b0e186b9"],
- ["ec92ae", "ec929ce186b9"],
- ["ec92af", "e1848ae185b0e186ba"],
- ["ec92af", "ec929ce186ba"],
- ["ec92b0", "e1848ae185b0e186bb"],
- ["ec92b0", "ec929ce186bb"],
- ["ec92b1", "e1848ae185b0e186bc"],
- ["ec92b1", "ec929ce186bc"],
- ["ec92b2", "e1848ae185b0e186bd"],
- ["ec92b2", "ec929ce186bd"],
- ["ec92b3", "e1848ae185b0e186be"],
- ["ec92b3", "ec929ce186be"],
- ["ec92b4", "e1848ae185b0e186bf"],
- ["ec92b4", "ec929ce186bf"],
- ["ec92b5", "e1848ae185b0e18780"],
- ["ec92b5", "ec929ce18780"],
- ["ec92b6", "e1848ae185b0e18781"],
- ["ec92b6", "ec929ce18781"],
- ["ec92b7", "e1848ae185b0e18782"],
- ["ec92b7", "ec929ce18782"],
- ["ec92b8", "e1848ae185b1"],
- ["ec92b9", "e1848ae185b1e186a8"],
- ["ec92b9", "ec92b8e186a8"],
- ["ec92ba", "e1848ae185b1e186a9"],
- ["ec92ba", "ec92b8e186a9"],
- ["ec92bb", "e1848ae185b1e186aa"],
- ["ec92bb", "ec92b8e186aa"],
- ["ec92bc", "e1848ae185b1e186ab"],
- ["ec92bc", "ec92b8e186ab"],
- ["ec92bd", "e1848ae185b1e186ac"],
- ["ec92bd", "ec92b8e186ac"],
- ["ec92be", "e1848ae185b1e186ad"],
- ["ec92be", "ec92b8e186ad"],
- ["ec92bf", "e1848ae185b1e186ae"],
- ["ec92bf", "ec92b8e186ae"],
- ["ec9380", "e1848ae185b1e186af"],
- ["ec9380", "ec92b8e186af"],
- ["ec9381", "e1848ae185b1e186b0"],
- ["ec9381", "ec92b8e186b0"],
- ["ec9382", "e1848ae185b1e186b1"],
- ["ec9382", "ec92b8e186b1"],
- ["ec9383", "e1848ae185b1e186b2"],
- ["ec9383", "ec92b8e186b2"],
- ["ec9384", "e1848ae185b1e186b3"],
- ["ec9384", "ec92b8e186b3"],
- ["ec9385", "e1848ae185b1e186b4"],
- ["ec9385", "ec92b8e186b4"],
- ["ec9386", "e1848ae185b1e186b5"],
- ["ec9386", "ec92b8e186b5"],
- ["ec9387", "e1848ae185b1e186b6"],
- ["ec9387", "ec92b8e186b6"],
- ["ec9388", "e1848ae185b1e186b7"],
- ["ec9388", "ec92b8e186b7"],
- ["ec9389", "e1848ae185b1e186b8"],
- ["ec9389", "ec92b8e186b8"],
- ["ec938a", "e1848ae185b1e186b9"],
- ["ec938a", "ec92b8e186b9"],
- ["ec938b", "e1848ae185b1e186ba"],
- ["ec938b", "ec92b8e186ba"],
- ["ec938c", "e1848ae185b1e186bb"],
- ["ec938c", "ec92b8e186bb"],
- ["ec938d", "e1848ae185b1e186bc"],
- ["ec938d", "ec92b8e186bc"],
- ["ec938e", "e1848ae185b1e186bd"],
- ["ec938e", "ec92b8e186bd"],
- ["ec938f", "e1848ae185b1e186be"],
- ["ec938f", "ec92b8e186be"],
- ["ec9390", "e1848ae185b1e186bf"],
- ["ec9390", "ec92b8e186bf"],
- ["ec9391", "e1848ae185b1e18780"],
- ["ec9391", "ec92b8e18780"],
- ["ec9392", "e1848ae185b1e18781"],
- ["ec9392", "ec92b8e18781"],
- ["ec9393", "e1848ae185b1e18782"],
- ["ec9393", "ec92b8e18782"],
- ["ec9394", "e1848ae185b2"],
- ["ec9395", "e1848ae185b2e186a8"],
- ["ec9395", "ec9394e186a8"],
- ["ec9396", "e1848ae185b2e186a9"],
- ["ec9396", "ec9394e186a9"],
- ["ec9397", "e1848ae185b2e186aa"],
- ["ec9397", "ec9394e186aa"],
- ["ec9398", "e1848ae185b2e186ab"],
- ["ec9398", "ec9394e186ab"],
- ["ec9399", "e1848ae185b2e186ac"],
- ["ec9399", "ec9394e186ac"],
- ["ec939a", "e1848ae185b2e186ad"],
- ["ec939a", "ec9394e186ad"],
- ["ec939b", "e1848ae185b2e186ae"],
- ["ec939b", "ec9394e186ae"],
- ["ec939c", "e1848ae185b2e186af"],
- ["ec939c", "ec9394e186af"],
- ["ec939d", "e1848ae185b2e186b0"],
- ["ec939d", "ec9394e186b0"],
- ["ec939e", "e1848ae185b2e186b1"],
- ["ec939e", "ec9394e186b1"],
- ["ec939f", "e1848ae185b2e186b2"],
- ["ec939f", "ec9394e186b2"],
- ["ec93a0", "e1848ae185b2e186b3"],
- ["ec93a0", "ec9394e186b3"],
- ["ec93a1", "e1848ae185b2e186b4"],
- ["ec93a1", "ec9394e186b4"],
- ["ec93a2", "e1848ae185b2e186b5"],
- ["ec93a2", "ec9394e186b5"],
- ["ec93a3", "e1848ae185b2e186b6"],
- ["ec93a3", "ec9394e186b6"],
- ["ec93a4", "e1848ae185b2e186b7"],
- ["ec93a4", "ec9394e186b7"],
- ["ec93a5", "e1848ae185b2e186b8"],
- ["ec93a5", "ec9394e186b8"],
- ["ec93a6", "e1848ae185b2e186b9"],
- ["ec93a6", "ec9394e186b9"],
- ["ec93a7", "e1848ae185b2e186ba"],
- ["ec93a7", "ec9394e186ba"],
- ["ec93a8", "e1848ae185b2e186bb"],
- ["ec93a8", "ec9394e186bb"],
- ["ec93a9", "e1848ae185b2e186bc"],
- ["ec93a9", "ec9394e186bc"],
- ["ec93aa", "e1848ae185b2e186bd"],
- ["ec93aa", "ec9394e186bd"],
- ["ec93ab", "e1848ae185b2e186be"],
- ["ec93ab", "ec9394e186be"],
- ["ec93ac", "e1848ae185b2e186bf"],
- ["ec93ac", "ec9394e186bf"],
- ["ec93ad", "e1848ae185b2e18780"],
- ["ec93ad", "ec9394e18780"],
- ["ec93ae", "e1848ae185b2e18781"],
- ["ec93ae", "ec9394e18781"],
- ["ec93af", "e1848ae185b2e18782"],
- ["ec93af", "ec9394e18782"],
- ["ec93b0", "e1848ae185b3"],
- ["ec93b1", "e1848ae185b3e186a8"],
- ["ec93b1", "ec93b0e186a8"],
- ["ec93b2", "e1848ae185b3e186a9"],
- ["ec93b2", "ec93b0e186a9"],
- ["ec93b3", "e1848ae185b3e186aa"],
- ["ec93b3", "ec93b0e186aa"],
- ["ec93b4", "e1848ae185b3e186ab"],
- ["ec93b4", "ec93b0e186ab"],
- ["ec93b5", "e1848ae185b3e186ac"],
- ["ec93b5", "ec93b0e186ac"],
- ["ec93b6", "e1848ae185b3e186ad"],
- ["ec93b6", "ec93b0e186ad"],
- ["ec93b7", "e1848ae185b3e186ae"],
- ["ec93b7", "ec93b0e186ae"],
- ["ec93b8", "e1848ae185b3e186af"],
- ["ec93b8", "ec93b0e186af"],
- ["ec93b9", "e1848ae185b3e186b0"],
- ["ec93b9", "ec93b0e186b0"],
- ["ec93ba", "e1848ae185b3e186b1"],
- ["ec93ba", "ec93b0e186b1"],
- ["ec93bb", "e1848ae185b3e186b2"],
- ["ec93bb", "ec93b0e186b2"],
- ["ec93bc", "e1848ae185b3e186b3"],
- ["ec93bc", "ec93b0e186b3"],
- ["ec93bd", "e1848ae185b3e186b4"],
- ["ec93bd", "ec93b0e186b4"],
- ["ec93be", "e1848ae185b3e186b5"],
- ["ec93be", "ec93b0e186b5"],
- ["ec93bf", "e1848ae185b3e186b6"],
- ["ec93bf", "ec93b0e186b6"],
- ["ec9480", "e1848ae185b3e186b7"],
- ["ec9480", "ec93b0e186b7"],
- ["ec9481", "e1848ae185b3e186b8"],
- ["ec9481", "ec93b0e186b8"],
- ["ec9482", "e1848ae185b3e186b9"],
- ["ec9482", "ec93b0e186b9"],
- ["ec9483", "e1848ae185b3e186ba"],
- ["ec9483", "ec93b0e186ba"],
- ["ec9484", "e1848ae185b3e186bb"],
- ["ec9484", "ec93b0e186bb"],
- ["ec9485", "e1848ae185b3e186bc"],
- ["ec9485", "ec93b0e186bc"],
- ["ec9486", "e1848ae185b3e186bd"],
- ["ec9486", "ec93b0e186bd"],
- ["ec9487", "e1848ae185b3e186be"],
- ["ec9487", "ec93b0e186be"],
- ["ec9488", "e1848ae185b3e186bf"],
- ["ec9488", "ec93b0e186bf"],
- ["ec9489", "e1848ae185b3e18780"],
- ["ec9489", "ec93b0e18780"],
- ["ec948a", "e1848ae185b3e18781"],
- ["ec948a", "ec93b0e18781"],
- ["ec948b", "e1848ae185b3e18782"],
- ["ec948b", "ec93b0e18782"],
- ["ec948c", "e1848ae185b4"],
- ["ec948d", "e1848ae185b4e186a8"],
- ["ec948d", "ec948ce186a8"],
- ["ec948e", "e1848ae185b4e186a9"],
- ["ec948e", "ec948ce186a9"],
- ["ec948f", "e1848ae185b4e186aa"],
- ["ec948f", "ec948ce186aa"],
- ["ec9490", "e1848ae185b4e186ab"],
- ["ec9490", "ec948ce186ab"],
- ["ec9491", "e1848ae185b4e186ac"],
- ["ec9491", "ec948ce186ac"],
- ["ec9492", "e1848ae185b4e186ad"],
- ["ec9492", "ec948ce186ad"],
- ["ec9493", "e1848ae185b4e186ae"],
- ["ec9493", "ec948ce186ae"],
- ["ec9494", "e1848ae185b4e186af"],
- ["ec9494", "ec948ce186af"],
- ["ec9495", "e1848ae185b4e186b0"],
- ["ec9495", "ec948ce186b0"],
- ["ec9496", "e1848ae185b4e186b1"],
- ["ec9496", "ec948ce186b1"],
- ["ec9497", "e1848ae185b4e186b2"],
- ["ec9497", "ec948ce186b2"],
- ["ec9498", "e1848ae185b4e186b3"],
- ["ec9498", "ec948ce186b3"],
- ["ec9499", "e1848ae185b4e186b4"],
- ["ec9499", "ec948ce186b4"],
- ["ec949a", "e1848ae185b4e186b5"],
- ["ec949a", "ec948ce186b5"],
- ["ec949b", "e1848ae185b4e186b6"],
- ["ec949b", "ec948ce186b6"],
- ["ec949c", "e1848ae185b4e186b7"],
- ["ec949c", "ec948ce186b7"],
- ["ec949d", "e1848ae185b4e186b8"],
- ["ec949d", "ec948ce186b8"],
- ["ec949e", "e1848ae185b4e186b9"],
- ["ec949e", "ec948ce186b9"],
- ["ec949f", "e1848ae185b4e186ba"],
- ["ec949f", "ec948ce186ba"],
- ["ec94a0", "e1848ae185b4e186bb"],
- ["ec94a0", "ec948ce186bb"],
- ["ec94a1", "e1848ae185b4e186bc"],
- ["ec94a1", "ec948ce186bc"],
- ["ec94a2", "e1848ae185b4e186bd"],
- ["ec94a2", "ec948ce186bd"],
- ["ec94a3", "e1848ae185b4e186be"],
- ["ec94a3", "ec948ce186be"],
- ["ec94a4", "e1848ae185b4e186bf"],
- ["ec94a4", "ec948ce186bf"],
- ["ec94a5", "e1848ae185b4e18780"],
- ["ec94a5", "ec948ce18780"],
- ["ec94a6", "e1848ae185b4e18781"],
- ["ec94a6", "ec948ce18781"],
- ["ec94a7", "e1848ae185b4e18782"],
- ["ec94a7", "ec948ce18782"],
- ["ec94a8", "e1848ae185b5"],
- ["ec94a9", "e1848ae185b5e186a8"],
- ["ec94a9", "ec94a8e186a8"],
- ["ec94aa", "e1848ae185b5e186a9"],
- ["ec94aa", "ec94a8e186a9"],
- ["ec94ab", "e1848ae185b5e186aa"],
- ["ec94ab", "ec94a8e186aa"],
- ["ec94ac", "e1848ae185b5e186ab"],
- ["ec94ac", "ec94a8e186ab"],
- ["ec94ad", "e1848ae185b5e186ac"],
- ["ec94ad", "ec94a8e186ac"],
- ["ec94ae", "e1848ae185b5e186ad"],
- ["ec94ae", "ec94a8e186ad"],
- ["ec94af", "e1848ae185b5e186ae"],
- ["ec94af", "ec94a8e186ae"],
- ["ec94b0", "e1848ae185b5e186af"],
- ["ec94b0", "ec94a8e186af"],
- ["ec94b1", "e1848ae185b5e186b0"],
- ["ec94b1", "ec94a8e186b0"],
- ["ec94b2", "e1848ae185b5e186b1"],
- ["ec94b2", "ec94a8e186b1"],
- ["ec94b3", "e1848ae185b5e186b2"],
- ["ec94b3", "ec94a8e186b2"],
- ["ec94b4", "e1848ae185b5e186b3"],
- ["ec94b4", "ec94a8e186b3"],
- ["ec94b5", "e1848ae185b5e186b4"],
- ["ec94b5", "ec94a8e186b4"],
- ["ec94b6", "e1848ae185b5e186b5"],
- ["ec94b6", "ec94a8e186b5"],
- ["ec94b7", "e1848ae185b5e186b6"],
- ["ec94b7", "ec94a8e186b6"],
- ["ec94b8", "e1848ae185b5e186b7"],
- ["ec94b8", "ec94a8e186b7"],
- ["ec94b9", "e1848ae185b5e186b8"],
- ["ec94b9", "ec94a8e186b8"],
- ["ec94ba", "e1848ae185b5e186b9"],
- ["ec94ba", "ec94a8e186b9"],
- ["ec94bb", "e1848ae185b5e186ba"],
- ["ec94bb", "ec94a8e186ba"],
- ["ec94bc", "e1848ae185b5e186bb"],
- ["ec94bc", "ec94a8e186bb"],
- ["ec94bd", "e1848ae185b5e186bc"],
- ["ec94bd", "ec94a8e186bc"],
- ["ec94be", "e1848ae185b5e186bd"],
- ["ec94be", "ec94a8e186bd"],
- ["ec94bf", "e1848ae185b5e186be"],
- ["ec94bf", "ec94a8e186be"],
- ["ec9580", "e1848ae185b5e186bf"],
- ["ec9580", "ec94a8e186bf"],
- ["ec9581", "e1848ae185b5e18780"],
- ["ec9581", "ec94a8e18780"],
- ["ec9582", "e1848ae185b5e18781"],
- ["ec9582", "ec94a8e18781"],
- ["ec9583", "e1848ae185b5e18782"],
- ["ec9583", "ec94a8e18782"],
- ["ec9584", "e1848be185a1"],
- ["ec9585", "e1848be185a1e186a8"],
- ["ec9585", "ec9584e186a8"],
- ["ec9586", "e1848be185a1e186a9"],
- ["ec9586", "ec9584e186a9"],
- ["ec9587", "e1848be185a1e186aa"],
- ["ec9587", "ec9584e186aa"],
- ["ec9588", "e1848be185a1e186ab"],
- ["ec9588", "ec9584e186ab"],
- ["ec9589", "e1848be185a1e186ac"],
- ["ec9589", "ec9584e186ac"],
- ["ec958a", "e1848be185a1e186ad"],
- ["ec958a", "ec9584e186ad"],
- ["ec958b", "e1848be185a1e186ae"],
- ["ec958b", "ec9584e186ae"],
- ["ec958c", "e1848be185a1e186af"],
- ["ec958c", "ec9584e186af"],
- ["ec958d", "e1848be185a1e186b0"],
- ["ec958d", "ec9584e186b0"],
- ["ec958e", "e1848be185a1e186b1"],
- ["ec958e", "ec9584e186b1"],
- ["ec958f", "e1848be185a1e186b2"],
- ["ec958f", "ec9584e186b2"],
- ["ec9590", "e1848be185a1e186b3"],
- ["ec9590", "ec9584e186b3"],
- ["ec9591", "e1848be185a1e186b4"],
- ["ec9591", "ec9584e186b4"],
- ["ec9592", "e1848be185a1e186b5"],
- ["ec9592", "ec9584e186b5"],
- ["ec9593", "e1848be185a1e186b6"],
- ["ec9593", "ec9584e186b6"],
- ["ec9594", "e1848be185a1e186b7"],
- ["ec9594", "ec9584e186b7"],
- ["ec9595", "e1848be185a1e186b8"],
- ["ec9595", "ec9584e186b8"],
- ["ec9596", "e1848be185a1e186b9"],
- ["ec9596", "ec9584e186b9"],
- ["ec9597", "e1848be185a1e186ba"],
- ["ec9597", "ec9584e186ba"],
- ["ec9598", "e1848be185a1e186bb"],
- ["ec9598", "ec9584e186bb"],
- ["ec9599", "e1848be185a1e186bc"],
- ["ec9599", "ec9584e186bc"],
- ["ec959a", "e1848be185a1e186bd"],
- ["ec959a", "ec9584e186bd"],
- ["ec959b", "e1848be185a1e186be"],
- ["ec959b", "ec9584e186be"],
- ["ec959c", "e1848be185a1e186bf"],
- ["ec959c", "ec9584e186bf"],
- ["ec959d", "e1848be185a1e18780"],
- ["ec959d", "ec9584e18780"],
- ["ec959e", "e1848be185a1e18781"],
- ["ec959e", "ec9584e18781"],
- ["ec959f", "e1848be185a1e18782"],
- ["ec959f", "ec9584e18782"],
- ["ec95a0", "e1848be185a2"],
- ["ec95a1", "e1848be185a2e186a8"],
- ["ec95a1", "ec95a0e186a8"],
- ["ec95a2", "e1848be185a2e186a9"],
- ["ec95a2", "ec95a0e186a9"],
- ["ec95a3", "e1848be185a2e186aa"],
- ["ec95a3", "ec95a0e186aa"],
- ["ec95a4", "e1848be185a2e186ab"],
- ["ec95a4", "ec95a0e186ab"],
- ["ec95a5", "e1848be185a2e186ac"],
- ["ec95a5", "ec95a0e186ac"],
- ["ec95a6", "e1848be185a2e186ad"],
- ["ec95a6", "ec95a0e186ad"],
- ["ec95a7", "e1848be185a2e186ae"],
- ["ec95a7", "ec95a0e186ae"],
- ["ec95a8", "e1848be185a2e186af"],
- ["ec95a8", "ec95a0e186af"],
- ["ec95a9", "e1848be185a2e186b0"],
- ["ec95a9", "ec95a0e186b0"],
- ["ec95aa", "e1848be185a2e186b1"],
- ["ec95aa", "ec95a0e186b1"],
- ["ec95ab", "e1848be185a2e186b2"],
- ["ec95ab", "ec95a0e186b2"],
- ["ec95ac", "e1848be185a2e186b3"],
- ["ec95ac", "ec95a0e186b3"],
- ["ec95ad", "e1848be185a2e186b4"],
- ["ec95ad", "ec95a0e186b4"],
- ["ec95ae", "e1848be185a2e186b5"],
- ["ec95ae", "ec95a0e186b5"],
- ["ec95af", "e1848be185a2e186b6"],
- ["ec95af", "ec95a0e186b6"],
- ["ec95b0", "e1848be185a2e186b7"],
- ["ec95b0", "ec95a0e186b7"],
- ["ec95b1", "e1848be185a2e186b8"],
- ["ec95b1", "ec95a0e186b8"],
- ["ec95b2", "e1848be185a2e186b9"],
- ["ec95b2", "ec95a0e186b9"],
- ["ec95b3", "e1848be185a2e186ba"],
- ["ec95b3", "ec95a0e186ba"],
- ["ec95b4", "e1848be185a2e186bb"],
- ["ec95b4", "ec95a0e186bb"],
- ["ec95b5", "e1848be185a2e186bc"],
- ["ec95b5", "ec95a0e186bc"],
- ["ec95b6", "e1848be185a2e186bd"],
- ["ec95b6", "ec95a0e186bd"],
- ["ec95b7", "e1848be185a2e186be"],
- ["ec95b7", "ec95a0e186be"],
- ["ec95b8", "e1848be185a2e186bf"],
- ["ec95b8", "ec95a0e186bf"],
- ["ec95b9", "e1848be185a2e18780"],
- ["ec95b9", "ec95a0e18780"],
- ["ec95ba", "e1848be185a2e18781"],
- ["ec95ba", "ec95a0e18781"],
- ["ec95bb", "e1848be185a2e18782"],
- ["ec95bb", "ec95a0e18782"],
- ["ec95bc", "e1848be185a3"],
- ["ec95bd", "e1848be185a3e186a8"],
- ["ec95bd", "ec95bce186a8"],
- ["ec95be", "e1848be185a3e186a9"],
- ["ec95be", "ec95bce186a9"],
- ["ec95bf", "e1848be185a3e186aa"],
- ["ec95bf", "ec95bce186aa"],
- ["ec9680", "e1848be185a3e186ab"],
- ["ec9680", "ec95bce186ab"],
- ["ec9681", "e1848be185a3e186ac"],
- ["ec9681", "ec95bce186ac"],
- ["ec9682", "e1848be185a3e186ad"],
- ["ec9682", "ec95bce186ad"],
- ["ec9683", "e1848be185a3e186ae"],
- ["ec9683", "ec95bce186ae"],
- ["ec9684", "e1848be185a3e186af"],
- ["ec9684", "ec95bce186af"],
- ["ec9685", "e1848be185a3e186b0"],
- ["ec9685", "ec95bce186b0"],
- ["ec9686", "e1848be185a3e186b1"],
- ["ec9686", "ec95bce186b1"],
- ["ec9687", "e1848be185a3e186b2"],
- ["ec9687", "ec95bce186b2"],
- ["ec9688", "e1848be185a3e186b3"],
- ["ec9688", "ec95bce186b3"],
- ["ec9689", "e1848be185a3e186b4"],
- ["ec9689", "ec95bce186b4"],
- ["ec968a", "e1848be185a3e186b5"],
- ["ec968a", "ec95bce186b5"],
- ["ec968b", "e1848be185a3e186b6"],
- ["ec968b", "ec95bce186b6"],
- ["ec968c", "e1848be185a3e186b7"],
- ["ec968c", "ec95bce186b7"],
- ["ec968d", "e1848be185a3e186b8"],
- ["ec968d", "ec95bce186b8"],
- ["ec968e", "e1848be185a3e186b9"],
- ["ec968e", "ec95bce186b9"],
- ["ec968f", "e1848be185a3e186ba"],
- ["ec968f", "ec95bce186ba"],
- ["ec9690", "e1848be185a3e186bb"],
- ["ec9690", "ec95bce186bb"],
- ["ec9691", "e1848be185a3e186bc"],
- ["ec9691", "ec95bce186bc"],
- ["ec9692", "e1848be185a3e186bd"],
- ["ec9692", "ec95bce186bd"],
- ["ec9693", "e1848be185a3e186be"],
- ["ec9693", "ec95bce186be"],
- ["ec9694", "e1848be185a3e186bf"],
- ["ec9694", "ec95bce186bf"],
- ["ec9695", "e1848be185a3e18780"],
- ["ec9695", "ec95bce18780"],
- ["ec9696", "e1848be185a3e18781"],
- ["ec9696", "ec95bce18781"],
- ["ec9697", "e1848be185a3e18782"],
- ["ec9697", "ec95bce18782"],
- ["ec9698", "e1848be185a4"],
- ["ec9699", "e1848be185a4e186a8"],
- ["ec9699", "ec9698e186a8"],
- ["ec969a", "e1848be185a4e186a9"],
- ["ec969a", "ec9698e186a9"],
- ["ec969b", "e1848be185a4e186aa"],
- ["ec969b", "ec9698e186aa"],
- ["ec969c", "e1848be185a4e186ab"],
- ["ec969c", "ec9698e186ab"],
- ["ec969d", "e1848be185a4e186ac"],
- ["ec969d", "ec9698e186ac"],
- ["ec969e", "e1848be185a4e186ad"],
- ["ec969e", "ec9698e186ad"],
- ["ec969f", "e1848be185a4e186ae"],
- ["ec969f", "ec9698e186ae"],
- ["ec96a0", "e1848be185a4e186af"],
- ["ec96a0", "ec9698e186af"],
- ["ec96a1", "e1848be185a4e186b0"],
- ["ec96a1", "ec9698e186b0"],
- ["ec96a2", "e1848be185a4e186b1"],
- ["ec96a2", "ec9698e186b1"],
- ["ec96a3", "e1848be185a4e186b2"],
- ["ec96a3", "ec9698e186b2"],
- ["ec96a4", "e1848be185a4e186b3"],
- ["ec96a4", "ec9698e186b3"],
- ["ec96a5", "e1848be185a4e186b4"],
- ["ec96a5", "ec9698e186b4"],
- ["ec96a6", "e1848be185a4e186b5"],
- ["ec96a6", "ec9698e186b5"],
- ["ec96a7", "e1848be185a4e186b6"],
- ["ec96a7", "ec9698e186b6"],
- ["ec96a8", "e1848be185a4e186b7"],
- ["ec96a8", "ec9698e186b7"],
- ["ec96a9", "e1848be185a4e186b8"],
- ["ec96a9", "ec9698e186b8"],
- ["ec96aa", "e1848be185a4e186b9"],
- ["ec96aa", "ec9698e186b9"],
- ["ec96ab", "e1848be185a4e186ba"],
- ["ec96ab", "ec9698e186ba"],
- ["ec96ac", "e1848be185a4e186bb"],
- ["ec96ac", "ec9698e186bb"],
- ["ec96ad", "e1848be185a4e186bc"],
- ["ec96ad", "ec9698e186bc"],
- ["ec96ae", "e1848be185a4e186bd"],
- ["ec96ae", "ec9698e186bd"],
- ["ec96af", "e1848be185a4e186be"],
- ["ec96af", "ec9698e186be"],
- ["ec96b0", "e1848be185a4e186bf"],
- ["ec96b0", "ec9698e186bf"],
- ["ec96b1", "e1848be185a4e18780"],
- ["ec96b1", "ec9698e18780"],
- ["ec96b2", "e1848be185a4e18781"],
- ["ec96b2", "ec9698e18781"],
- ["ec96b3", "e1848be185a4e18782"],
- ["ec96b3", "ec9698e18782"],
- ["ec96b4", "e1848be185a5"],
- ["ec96b5", "e1848be185a5e186a8"],
- ["ec96b5", "ec96b4e186a8"],
- ["ec96b6", "e1848be185a5e186a9"],
- ["ec96b6", "ec96b4e186a9"],
- ["ec96b7", "e1848be185a5e186aa"],
- ["ec96b7", "ec96b4e186aa"],
- ["ec96b8", "e1848be185a5e186ab"],
- ["ec96b8", "ec96b4e186ab"],
- ["ec96b9", "e1848be185a5e186ac"],
- ["ec96b9", "ec96b4e186ac"],
- ["ec96ba", "e1848be185a5e186ad"],
- ["ec96ba", "ec96b4e186ad"],
- ["ec96bb", "e1848be185a5e186ae"],
- ["ec96bb", "ec96b4e186ae"],
- ["ec96bc", "e1848be185a5e186af"],
- ["ec96bc", "ec96b4e186af"],
- ["ec96bd", "e1848be185a5e186b0"],
- ["ec96bd", "ec96b4e186b0"],
- ["ec96be", "e1848be185a5e186b1"],
- ["ec96be", "ec96b4e186b1"],
- ["ec96bf", "e1848be185a5e186b2"],
- ["ec96bf", "ec96b4e186b2"],
- ["ec9780", "e1848be185a5e186b3"],
- ["ec9780", "ec96b4e186b3"],
- ["ec9781", "e1848be185a5e186b4"],
- ["ec9781", "ec96b4e186b4"],
- ["ec9782", "e1848be185a5e186b5"],
- ["ec9782", "ec96b4e186b5"],
- ["ec9783", "e1848be185a5e186b6"],
- ["ec9783", "ec96b4e186b6"],
- ["ec9784", "e1848be185a5e186b7"],
- ["ec9784", "ec96b4e186b7"],
- ["ec9785", "e1848be185a5e186b8"],
- ["ec9785", "ec96b4e186b8"],
- ["ec9786", "e1848be185a5e186b9"],
- ["ec9786", "ec96b4e186b9"],
- ["ec9787", "e1848be185a5e186ba"],
- ["ec9787", "ec96b4e186ba"],
- ["ec9788", "e1848be185a5e186bb"],
- ["ec9788", "ec96b4e186bb"],
- ["ec9789", "e1848be185a5e186bc"],
- ["ec9789", "ec96b4e186bc"],
- ["ec978a", "e1848be185a5e186bd"],
- ["ec978a", "ec96b4e186bd"],
- ["ec978b", "e1848be185a5e186be"],
- ["ec978b", "ec96b4e186be"],
- ["ec978c", "e1848be185a5e186bf"],
- ["ec978c", "ec96b4e186bf"],
- ["ec978d", "e1848be185a5e18780"],
- ["ec978d", "ec96b4e18780"],
- ["ec978e", "e1848be185a5e18781"],
- ["ec978e", "ec96b4e18781"],
- ["ec978f", "e1848be185a5e18782"],
- ["ec978f", "ec96b4e18782"],
- ["ec9790", "e1848be185a6"],
- ["ec9791", "e1848be185a6e186a8"],
- ["ec9791", "ec9790e186a8"],
- ["ec9792", "e1848be185a6e186a9"],
- ["ec9792", "ec9790e186a9"],
- ["ec9793", "e1848be185a6e186aa"],
- ["ec9793", "ec9790e186aa"],
- ["ec9794", "e1848be185a6e186ab"],
- ["ec9794", "ec9790e186ab"],
- ["ec9795", "e1848be185a6e186ac"],
- ["ec9795", "ec9790e186ac"],
- ["ec9796", "e1848be185a6e186ad"],
- ["ec9796", "ec9790e186ad"],
- ["ec9797", "e1848be185a6e186ae"],
- ["ec9797", "ec9790e186ae"],
- ["ec9798", "e1848be185a6e186af"],
- ["ec9798", "ec9790e186af"],
- ["ec9799", "e1848be185a6e186b0"],
- ["ec9799", "ec9790e186b0"],
- ["ec979a", "e1848be185a6e186b1"],
- ["ec979a", "ec9790e186b1"],
- ["ec979b", "e1848be185a6e186b2"],
- ["ec979b", "ec9790e186b2"],
- ["ec979c", "e1848be185a6e186b3"],
- ["ec979c", "ec9790e186b3"],
- ["ec979d", "e1848be185a6e186b4"],
- ["ec979d", "ec9790e186b4"],
- ["ec979e", "e1848be185a6e186b5"],
- ["ec979e", "ec9790e186b5"],
- ["ec979f", "e1848be185a6e186b6"],
- ["ec979f", "ec9790e186b6"],
- ["ec97a0", "e1848be185a6e186b7"],
- ["ec97a0", "ec9790e186b7"],
- ["ec97a1", "e1848be185a6e186b8"],
- ["ec97a1", "ec9790e186b8"],
- ["ec97a2", "e1848be185a6e186b9"],
- ["ec97a2", "ec9790e186b9"],
- ["ec97a3", "e1848be185a6e186ba"],
- ["ec97a3", "ec9790e186ba"],
- ["ec97a4", "e1848be185a6e186bb"],
- ["ec97a4", "ec9790e186bb"],
- ["ec97a5", "e1848be185a6e186bc"],
- ["ec97a5", "ec9790e186bc"],
- ["ec97a6", "e1848be185a6e186bd"],
- ["ec97a6", "ec9790e186bd"],
- ["ec97a7", "e1848be185a6e186be"],
- ["ec97a7", "ec9790e186be"],
- ["ec97a8", "e1848be185a6e186bf"],
- ["ec97a8", "ec9790e186bf"],
- ["ec97a9", "e1848be185a6e18780"],
- ["ec97a9", "ec9790e18780"],
- ["ec97aa", "e1848be185a6e18781"],
- ["ec97aa", "ec9790e18781"],
- ["ec97ab", "e1848be185a6e18782"],
- ["ec97ab", "ec9790e18782"],
- ["ec97ac", "e1848be185a7"],
- ["ec97ad", "e1848be185a7e186a8"],
- ["ec97ad", "ec97ace186a8"],
- ["ec97ae", "e1848be185a7e186a9"],
- ["ec97ae", "ec97ace186a9"],
- ["ec97af", "e1848be185a7e186aa"],
- ["ec97af", "ec97ace186aa"],
- ["ec97b0", "e1848be185a7e186ab"],
- ["ec97b0", "ec97ace186ab"],
- ["ec97b1", "e1848be185a7e186ac"],
- ["ec97b1", "ec97ace186ac"],
- ["ec97b2", "e1848be185a7e186ad"],
- ["ec97b2", "ec97ace186ad"],
- ["ec97b3", "e1848be185a7e186ae"],
- ["ec97b3", "ec97ace186ae"],
- ["ec97b4", "e1848be185a7e186af"],
- ["ec97b4", "ec97ace186af"],
- ["ec97b5", "e1848be185a7e186b0"],
- ["ec97b5", "ec97ace186b0"],
- ["ec97b6", "e1848be185a7e186b1"],
- ["ec97b6", "ec97ace186b1"],
- ["ec97b7", "e1848be185a7e186b2"],
- ["ec97b7", "ec97ace186b2"],
- ["ec97b8", "e1848be185a7e186b3"],
- ["ec97b8", "ec97ace186b3"],
- ["ec97b9", "e1848be185a7e186b4"],
- ["ec97b9", "ec97ace186b4"],
- ["ec97ba", "e1848be185a7e186b5"],
- ["ec97ba", "ec97ace186b5"],
- ["ec97bb", "e1848be185a7e186b6"],
- ["ec97bb", "ec97ace186b6"],
- ["ec97bc", "e1848be185a7e186b7"],
- ["ec97bc", "ec97ace186b7"],
- ["ec97bd", "e1848be185a7e186b8"],
- ["ec97bd", "ec97ace186b8"],
- ["ec97be", "e1848be185a7e186b9"],
- ["ec97be", "ec97ace186b9"],
- ["ec97bf", "e1848be185a7e186ba"],
- ["ec97bf", "ec97ace186ba"],
- ["ec9880", "e1848be185a7e186bb"],
- ["ec9880", "ec97ace186bb"],
- ["ec9881", "e1848be185a7e186bc"],
- ["ec9881", "ec97ace186bc"],
- ["ec9882", "e1848be185a7e186bd"],
- ["ec9882", "ec97ace186bd"],
- ["ec9883", "e1848be185a7e186be"],
- ["ec9883", "ec97ace186be"],
- ["ec9884", "e1848be185a7e186bf"],
- ["ec9884", "ec97ace186bf"],
- ["ec9885", "e1848be185a7e18780"],
- ["ec9885", "ec97ace18780"],
- ["ec9886", "e1848be185a7e18781"],
- ["ec9886", "ec97ace18781"],
- ["ec9887", "e1848be185a7e18782"],
- ["ec9887", "ec97ace18782"],
- ["ec9888", "e1848be185a8"],
- ["ec9889", "e1848be185a8e186a8"],
- ["ec9889", "ec9888e186a8"],
- ["ec988a", "e1848be185a8e186a9"],
- ["ec988a", "ec9888e186a9"],
- ["ec988b", "e1848be185a8e186aa"],
- ["ec988b", "ec9888e186aa"],
- ["ec988c", "e1848be185a8e186ab"],
- ["ec988c", "ec9888e186ab"],
- ["ec988d", "e1848be185a8e186ac"],
- ["ec988d", "ec9888e186ac"],
- ["ec988e", "e1848be185a8e186ad"],
- ["ec988e", "ec9888e186ad"],
- ["ec988f", "e1848be185a8e186ae"],
- ["ec988f", "ec9888e186ae"],
- ["ec9890", "e1848be185a8e186af"],
- ["ec9890", "ec9888e186af"],
- ["ec9891", "e1848be185a8e186b0"],
- ["ec9891", "ec9888e186b0"],
- ["ec9892", "e1848be185a8e186b1"],
- ["ec9892", "ec9888e186b1"],
- ["ec9893", "e1848be185a8e186b2"],
- ["ec9893", "ec9888e186b2"],
- ["ec9894", "e1848be185a8e186b3"],
- ["ec9894", "ec9888e186b3"],
- ["ec9895", "e1848be185a8e186b4"],
- ["ec9895", "ec9888e186b4"],
- ["ec9896", "e1848be185a8e186b5"],
- ["ec9896", "ec9888e186b5"],
- ["ec9897", "e1848be185a8e186b6"],
- ["ec9897", "ec9888e186b6"],
- ["ec9898", "e1848be185a8e186b7"],
- ["ec9898", "ec9888e186b7"],
- ["ec9899", "e1848be185a8e186b8"],
- ["ec9899", "ec9888e186b8"],
- ["ec989a", "e1848be185a8e186b9"],
- ["ec989a", "ec9888e186b9"],
- ["ec989b", "e1848be185a8e186ba"],
- ["ec989b", "ec9888e186ba"],
- ["ec989c", "e1848be185a8e186bb"],
- ["ec989c", "ec9888e186bb"],
- ["ec989d", "e1848be185a8e186bc"],
- ["ec989d", "ec9888e186bc"],
- ["ec989e", "e1848be185a8e186bd"],
- ["ec989e", "ec9888e186bd"],
- ["ec989f", "e1848be185a8e186be"],
- ["ec989f", "ec9888e186be"],
- ["ec98a0", "e1848be185a8e186bf"],
- ["ec98a0", "ec9888e186bf"],
- ["ec98a1", "e1848be185a8e18780"],
- ["ec98a1", "ec9888e18780"],
- ["ec98a2", "e1848be185a8e18781"],
- ["ec98a2", "ec9888e18781"],
- ["ec98a3", "e1848be185a8e18782"],
- ["ec98a3", "ec9888e18782"],
- ["ec98a4", "e1848be185a9"],
- ["ec98a5", "e1848be185a9e186a8"],
- ["ec98a5", "ec98a4e186a8"],
- ["ec98a6", "e1848be185a9e186a9"],
- ["ec98a6", "ec98a4e186a9"],
- ["ec98a7", "e1848be185a9e186aa"],
- ["ec98a7", "ec98a4e186aa"],
- ["ec98a8", "e1848be185a9e186ab"],
- ["ec98a8", "ec98a4e186ab"],
- ["ec98a9", "e1848be185a9e186ac"],
- ["ec98a9", "ec98a4e186ac"],
- ["ec98aa", "e1848be185a9e186ad"],
- ["ec98aa", "ec98a4e186ad"],
- ["ec98ab", "e1848be185a9e186ae"],
- ["ec98ab", "ec98a4e186ae"],
- ["ec98ac", "e1848be185a9e186af"],
- ["ec98ac", "ec98a4e186af"],
- ["ec98ad", "e1848be185a9e186b0"],
- ["ec98ad", "ec98a4e186b0"],
- ["ec98ae", "e1848be185a9e186b1"],
- ["ec98ae", "ec98a4e186b1"],
- ["ec98af", "e1848be185a9e186b2"],
- ["ec98af", "ec98a4e186b2"],
- ["ec98b0", "e1848be185a9e186b3"],
- ["ec98b0", "ec98a4e186b3"],
- ["ec98b1", "e1848be185a9e186b4"],
- ["ec98b1", "ec98a4e186b4"],
- ["ec98b2", "e1848be185a9e186b5"],
- ["ec98b2", "ec98a4e186b5"],
- ["ec98b3", "e1848be185a9e186b6"],
- ["ec98b3", "ec98a4e186b6"],
- ["ec98b4", "e1848be185a9e186b7"],
- ["ec98b4", "ec98a4e186b7"],
- ["ec98b5", "e1848be185a9e186b8"],
- ["ec98b5", "ec98a4e186b8"],
- ["ec98b6", "e1848be185a9e186b9"],
- ["ec98b6", "ec98a4e186b9"],
- ["ec98b7", "e1848be185a9e186ba"],
- ["ec98b7", "ec98a4e186ba"],
- ["ec98b8", "e1848be185a9e186bb"],
- ["ec98b8", "ec98a4e186bb"],
- ["ec98b9", "e1848be185a9e186bc"],
- ["ec98b9", "ec98a4e186bc"],
- ["ec98ba", "e1848be185a9e186bd"],
- ["ec98ba", "ec98a4e186bd"],
- ["ec98bb", "e1848be185a9e186be"],
- ["ec98bb", "ec98a4e186be"],
- ["ec98bc", "e1848be185a9e186bf"],
- ["ec98bc", "ec98a4e186bf"],
- ["ec98bd", "e1848be185a9e18780"],
- ["ec98bd", "ec98a4e18780"],
- ["ec98be", "e1848be185a9e18781"],
- ["ec98be", "ec98a4e18781"],
- ["ec98bf", "e1848be185a9e18782"],
- ["ec98bf", "ec98a4e18782"],
- ["ec9980", "e1848be185aa"],
- ["ec9981", "e1848be185aae186a8"],
- ["ec9981", "ec9980e186a8"],
- ["ec9982", "e1848be185aae186a9"],
- ["ec9982", "ec9980e186a9"],
- ["ec9983", "e1848be185aae186aa"],
- ["ec9983", "ec9980e186aa"],
- ["ec9984", "e1848be185aae186ab"],
- ["ec9984", "ec9980e186ab"],
- ["ec9985", "e1848be185aae186ac"],
- ["ec9985", "ec9980e186ac"],
- ["ec9986", "e1848be185aae186ad"],
- ["ec9986", "ec9980e186ad"],
- ["ec9987", "e1848be185aae186ae"],
- ["ec9987", "ec9980e186ae"],
- ["ec9988", "e1848be185aae186af"],
- ["ec9988", "ec9980e186af"],
- ["ec9989", "e1848be185aae186b0"],
- ["ec9989", "ec9980e186b0"],
- ["ec998a", "e1848be185aae186b1"],
- ["ec998a", "ec9980e186b1"],
- ["ec998b", "e1848be185aae186b2"],
- ["ec998b", "ec9980e186b2"],
- ["ec998c", "e1848be185aae186b3"],
- ["ec998c", "ec9980e186b3"],
- ["ec998d", "e1848be185aae186b4"],
- ["ec998d", "ec9980e186b4"],
- ["ec998e", "e1848be185aae186b5"],
- ["ec998e", "ec9980e186b5"],
- ["ec998f", "e1848be185aae186b6"],
- ["ec998f", "ec9980e186b6"],
- ["ec9990", "e1848be185aae186b7"],
- ["ec9990", "ec9980e186b7"],
- ["ec9991", "e1848be185aae186b8"],
- ["ec9991", "ec9980e186b8"],
- ["ec9992", "e1848be185aae186b9"],
- ["ec9992", "ec9980e186b9"],
- ["ec9993", "e1848be185aae186ba"],
- ["ec9993", "ec9980e186ba"],
- ["ec9994", "e1848be185aae186bb"],
- ["ec9994", "ec9980e186bb"],
- ["ec9995", "e1848be185aae186bc"],
- ["ec9995", "ec9980e186bc"],
- ["ec9996", "e1848be185aae186bd"],
- ["ec9996", "ec9980e186bd"],
- ["ec9997", "e1848be185aae186be"],
- ["ec9997", "ec9980e186be"],
- ["ec9998", "e1848be185aae186bf"],
- ["ec9998", "ec9980e186bf"],
- ["ec9999", "e1848be185aae18780"],
- ["ec9999", "ec9980e18780"],
- ["ec999a", "e1848be185aae18781"],
- ["ec999a", "ec9980e18781"],
- ["ec999b", "e1848be185aae18782"],
- ["ec999b", "ec9980e18782"],
- ["ec999c", "e1848be185ab"],
- ["ec999d", "e1848be185abe186a8"],
- ["ec999d", "ec999ce186a8"],
- ["ec999e", "e1848be185abe186a9"],
- ["ec999e", "ec999ce186a9"],
- ["ec999f", "e1848be185abe186aa"],
- ["ec999f", "ec999ce186aa"],
- ["ec99a0", "e1848be185abe186ab"],
- ["ec99a0", "ec999ce186ab"],
- ["ec99a1", "e1848be185abe186ac"],
- ["ec99a1", "ec999ce186ac"],
- ["ec99a2", "e1848be185abe186ad"],
- ["ec99a2", "ec999ce186ad"],
- ["ec99a3", "e1848be185abe186ae"],
- ["ec99a3", "ec999ce186ae"],
- ["ec99a4", "e1848be185abe186af"],
- ["ec99a4", "ec999ce186af"],
- ["ec99a5", "e1848be185abe186b0"],
- ["ec99a5", "ec999ce186b0"],
- ["ec99a6", "e1848be185abe186b1"],
- ["ec99a6", "ec999ce186b1"],
- ["ec99a7", "e1848be185abe186b2"],
- ["ec99a7", "ec999ce186b2"],
- ["ec99a8", "e1848be185abe186b3"],
- ["ec99a8", "ec999ce186b3"],
- ["ec99a9", "e1848be185abe186b4"],
- ["ec99a9", "ec999ce186b4"],
- ["ec99aa", "e1848be185abe186b5"],
- ["ec99aa", "ec999ce186b5"],
- ["ec99ab", "e1848be185abe186b6"],
- ["ec99ab", "ec999ce186b6"],
- ["ec99ac", "e1848be185abe186b7"],
- ["ec99ac", "ec999ce186b7"],
- ["ec99ad", "e1848be185abe186b8"],
- ["ec99ad", "ec999ce186b8"],
- ["ec99ae", "e1848be185abe186b9"],
- ["ec99ae", "ec999ce186b9"],
- ["ec99af", "e1848be185abe186ba"],
- ["ec99af", "ec999ce186ba"],
- ["ec99b0", "e1848be185abe186bb"],
- ["ec99b0", "ec999ce186bb"],
- ["ec99b1", "e1848be185abe186bc"],
- ["ec99b1", "ec999ce186bc"],
- ["ec99b2", "e1848be185abe186bd"],
- ["ec99b2", "ec999ce186bd"],
- ["ec99b3", "e1848be185abe186be"],
- ["ec99b3", "ec999ce186be"],
- ["ec99b4", "e1848be185abe186bf"],
- ["ec99b4", "ec999ce186bf"],
- ["ec99b5", "e1848be185abe18780"],
- ["ec99b5", "ec999ce18780"],
- ["ec99b6", "e1848be185abe18781"],
- ["ec99b6", "ec999ce18781"],
- ["ec99b7", "e1848be185abe18782"],
- ["ec99b7", "ec999ce18782"],
- ["ec99b8", "e1848be185ac"],
- ["ec99b9", "e1848be185ace186a8"],
- ["ec99b9", "ec99b8e186a8"],
- ["ec99ba", "e1848be185ace186a9"],
- ["ec99ba", "ec99b8e186a9"],
- ["ec99bb", "e1848be185ace186aa"],
- ["ec99bb", "ec99b8e186aa"],
- ["ec99bc", "e1848be185ace186ab"],
- ["ec99bc", "ec99b8e186ab"],
- ["ec99bd", "e1848be185ace186ac"],
- ["ec99bd", "ec99b8e186ac"],
- ["ec99be", "e1848be185ace186ad"],
- ["ec99be", "ec99b8e186ad"],
- ["ec99bf", "e1848be185ace186ae"],
- ["ec99bf", "ec99b8e186ae"],
- ["ec9a80", "e1848be185ace186af"],
- ["ec9a80", "ec99b8e186af"],
- ["ec9a81", "e1848be185ace186b0"],
- ["ec9a81", "ec99b8e186b0"],
- ["ec9a82", "e1848be185ace186b1"],
- ["ec9a82", "ec99b8e186b1"],
- ["ec9a83", "e1848be185ace186b2"],
- ["ec9a83", "ec99b8e186b2"],
- ["ec9a84", "e1848be185ace186b3"],
- ["ec9a84", "ec99b8e186b3"],
- ["ec9a85", "e1848be185ace186b4"],
- ["ec9a85", "ec99b8e186b4"],
- ["ec9a86", "e1848be185ace186b5"],
- ["ec9a86", "ec99b8e186b5"],
- ["ec9a87", "e1848be185ace186b6"],
- ["ec9a87", "ec99b8e186b6"],
- ["ec9a88", "e1848be185ace186b7"],
- ["ec9a88", "ec99b8e186b7"],
- ["ec9a89", "e1848be185ace186b8"],
- ["ec9a89", "ec99b8e186b8"],
- ["ec9a8a", "e1848be185ace186b9"],
- ["ec9a8a", "ec99b8e186b9"],
- ["ec9a8b", "e1848be185ace186ba"],
- ["ec9a8b", "ec99b8e186ba"],
- ["ec9a8c", "e1848be185ace186bb"],
- ["ec9a8c", "ec99b8e186bb"],
- ["ec9a8d", "e1848be185ace186bc"],
- ["ec9a8d", "ec99b8e186bc"],
- ["ec9a8e", "e1848be185ace186bd"],
- ["ec9a8e", "ec99b8e186bd"],
- ["ec9a8f", "e1848be185ace186be"],
- ["ec9a8f", "ec99b8e186be"],
- ["ec9a90", "e1848be185ace186bf"],
- ["ec9a90", "ec99b8e186bf"],
- ["ec9a91", "e1848be185ace18780"],
- ["ec9a91", "ec99b8e18780"],
- ["ec9a92", "e1848be185ace18781"],
- ["ec9a92", "ec99b8e18781"],
- ["ec9a93", "e1848be185ace18782"],
- ["ec9a93", "ec99b8e18782"],
- ["ec9a94", "e1848be185ad"],
- ["ec9a95", "e1848be185ade186a8"],
- ["ec9a95", "ec9a94e186a8"],
- ["ec9a96", "e1848be185ade186a9"],
- ["ec9a96", "ec9a94e186a9"],
- ["ec9a97", "e1848be185ade186aa"],
- ["ec9a97", "ec9a94e186aa"],
- ["ec9a98", "e1848be185ade186ab"],
- ["ec9a98", "ec9a94e186ab"],
- ["ec9a99", "e1848be185ade186ac"],
- ["ec9a99", "ec9a94e186ac"],
- ["ec9a9a", "e1848be185ade186ad"],
- ["ec9a9a", "ec9a94e186ad"],
- ["ec9a9b", "e1848be185ade186ae"],
- ["ec9a9b", "ec9a94e186ae"],
- ["ec9a9c", "e1848be185ade186af"],
- ["ec9a9c", "ec9a94e186af"],
- ["ec9a9d", "e1848be185ade186b0"],
- ["ec9a9d", "ec9a94e186b0"],
- ["ec9a9e", "e1848be185ade186b1"],
- ["ec9a9e", "ec9a94e186b1"],
- ["ec9a9f", "e1848be185ade186b2"],
- ["ec9a9f", "ec9a94e186b2"],
- ["ec9aa0", "e1848be185ade186b3"],
- ["ec9aa0", "ec9a94e186b3"],
- ["ec9aa1", "e1848be185ade186b4"],
- ["ec9aa1", "ec9a94e186b4"],
- ["ec9aa2", "e1848be185ade186b5"],
- ["ec9aa2", "ec9a94e186b5"],
- ["ec9aa3", "e1848be185ade186b6"],
- ["ec9aa3", "ec9a94e186b6"],
- ["ec9aa4", "e1848be185ade186b7"],
- ["ec9aa4", "ec9a94e186b7"],
- ["ec9aa5", "e1848be185ade186b8"],
- ["ec9aa5", "ec9a94e186b8"],
- ["ec9aa6", "e1848be185ade186b9"],
- ["ec9aa6", "ec9a94e186b9"],
- ["ec9aa7", "e1848be185ade186ba"],
- ["ec9aa7", "ec9a94e186ba"],
- ["ec9aa8", "e1848be185ade186bb"],
- ["ec9aa8", "ec9a94e186bb"],
- ["ec9aa9", "e1848be185ade186bc"],
- ["ec9aa9", "ec9a94e186bc"],
- ["ec9aaa", "e1848be185ade186bd"],
- ["ec9aaa", "ec9a94e186bd"],
- ["ec9aab", "e1848be185ade186be"],
- ["ec9aab", "ec9a94e186be"],
- ["ec9aac", "e1848be185ade186bf"],
- ["ec9aac", "ec9a94e186bf"],
- ["ec9aad", "e1848be185ade18780"],
- ["ec9aad", "ec9a94e18780"],
- ["ec9aae", "e1848be185ade18781"],
- ["ec9aae", "ec9a94e18781"],
- ["ec9aaf", "e1848be185ade18782"],
- ["ec9aaf", "ec9a94e18782"],
- ["ec9ab0", "e1848be185ae"],
- ["ec9ab1", "e1848be185aee186a8"],
- ["ec9ab1", "ec9ab0e186a8"],
- ["ec9ab2", "e1848be185aee186a9"],
- ["ec9ab2", "ec9ab0e186a9"],
- ["ec9ab3", "e1848be185aee186aa"],
- ["ec9ab3", "ec9ab0e186aa"],
- ["ec9ab4", "e1848be185aee186ab"],
- ["ec9ab4", "ec9ab0e186ab"],
- ["ec9ab5", "e1848be185aee186ac"],
- ["ec9ab5", "ec9ab0e186ac"],
- ["ec9ab6", "e1848be185aee186ad"],
- ["ec9ab6", "ec9ab0e186ad"],
- ["ec9ab7", "e1848be185aee186ae"],
- ["ec9ab7", "ec9ab0e186ae"],
- ["ec9ab8", "e1848be185aee186af"],
- ["ec9ab8", "ec9ab0e186af"],
- ["ec9ab9", "e1848be185aee186b0"],
- ["ec9ab9", "ec9ab0e186b0"],
- ["ec9aba", "e1848be185aee186b1"],
- ["ec9aba", "ec9ab0e186b1"],
- ["ec9abb", "e1848be185aee186b2"],
- ["ec9abb", "ec9ab0e186b2"],
- ["ec9abc", "e1848be185aee186b3"],
- ["ec9abc", "ec9ab0e186b3"],
- ["ec9abd", "e1848be185aee186b4"],
- ["ec9abd", "ec9ab0e186b4"],
- ["ec9abe", "e1848be185aee186b5"],
- ["ec9abe", "ec9ab0e186b5"],
- ["ec9abf", "e1848be185aee186b6"],
- ["ec9abf", "ec9ab0e186b6"],
- ["ec9b80", "e1848be185aee186b7"],
- ["ec9b80", "ec9ab0e186b7"],
- ["ec9b81", "e1848be185aee186b8"],
- ["ec9b81", "ec9ab0e186b8"],
- ["ec9b82", "e1848be185aee186b9"],
- ["ec9b82", "ec9ab0e186b9"],
- ["ec9b83", "e1848be185aee186ba"],
- ["ec9b83", "ec9ab0e186ba"],
- ["ec9b84", "e1848be185aee186bb"],
- ["ec9b84", "ec9ab0e186bb"],
- ["ec9b85", "e1848be185aee186bc"],
- ["ec9b85", "ec9ab0e186bc"],
- ["ec9b86", "e1848be185aee186bd"],
- ["ec9b86", "ec9ab0e186bd"],
- ["ec9b87", "e1848be185aee186be"],
- ["ec9b87", "ec9ab0e186be"],
- ["ec9b88", "e1848be185aee186bf"],
- ["ec9b88", "ec9ab0e186bf"],
- ["ec9b89", "e1848be185aee18780"],
- ["ec9b89", "ec9ab0e18780"],
- ["ec9b8a", "e1848be185aee18781"],
- ["ec9b8a", "ec9ab0e18781"],
- ["ec9b8b", "e1848be185aee18782"],
- ["ec9b8b", "ec9ab0e18782"],
- ["ec9b8c", "e1848be185af"],
- ["ec9b8d", "e1848be185afe186a8"],
- ["ec9b8d", "ec9b8ce186a8"],
- ["ec9b8e", "e1848be185afe186a9"],
- ["ec9b8e", "ec9b8ce186a9"],
- ["ec9b8f", "e1848be185afe186aa"],
- ["ec9b8f", "ec9b8ce186aa"],
- ["ec9b90", "e1848be185afe186ab"],
- ["ec9b90", "ec9b8ce186ab"],
- ["ec9b91", "e1848be185afe186ac"],
- ["ec9b91", "ec9b8ce186ac"],
- ["ec9b92", "e1848be185afe186ad"],
- ["ec9b92", "ec9b8ce186ad"],
- ["ec9b93", "e1848be185afe186ae"],
- ["ec9b93", "ec9b8ce186ae"],
- ["ec9b94", "e1848be185afe186af"],
- ["ec9b94", "ec9b8ce186af"],
- ["ec9b95", "e1848be185afe186b0"],
- ["ec9b95", "ec9b8ce186b0"],
- ["ec9b96", "e1848be185afe186b1"],
- ["ec9b96", "ec9b8ce186b1"],
- ["ec9b97", "e1848be185afe186b2"],
- ["ec9b97", "ec9b8ce186b2"],
- ["ec9b98", "e1848be185afe186b3"],
- ["ec9b98", "ec9b8ce186b3"],
- ["ec9b99", "e1848be185afe186b4"],
- ["ec9b99", "ec9b8ce186b4"],
- ["ec9b9a", "e1848be185afe186b5"],
- ["ec9b9a", "ec9b8ce186b5"],
- ["ec9b9b", "e1848be185afe186b6"],
- ["ec9b9b", "ec9b8ce186b6"],
- ["ec9b9c", "e1848be185afe186b7"],
- ["ec9b9c", "ec9b8ce186b7"],
- ["ec9b9d", "e1848be185afe186b8"],
- ["ec9b9d", "ec9b8ce186b8"],
- ["ec9b9e", "e1848be185afe186b9"],
- ["ec9b9e", "ec9b8ce186b9"],
- ["ec9b9f", "e1848be185afe186ba"],
- ["ec9b9f", "ec9b8ce186ba"],
- ["ec9ba0", "e1848be185afe186bb"],
- ["ec9ba0", "ec9b8ce186bb"],
- ["ec9ba1", "e1848be185afe186bc"],
- ["ec9ba1", "ec9b8ce186bc"],
- ["ec9ba2", "e1848be185afe186bd"],
- ["ec9ba2", "ec9b8ce186bd"],
- ["ec9ba3", "e1848be185afe186be"],
- ["ec9ba3", "ec9b8ce186be"],
- ["ec9ba4", "e1848be185afe186bf"],
- ["ec9ba4", "ec9b8ce186bf"],
- ["ec9ba5", "e1848be185afe18780"],
- ["ec9ba5", "ec9b8ce18780"],
- ["ec9ba6", "e1848be185afe18781"],
- ["ec9ba6", "ec9b8ce18781"],
- ["ec9ba7", "e1848be185afe18782"],
- ["ec9ba7", "ec9b8ce18782"],
- ["ec9ba8", "e1848be185b0"],
- ["ec9ba9", "e1848be185b0e186a8"],
- ["ec9ba9", "ec9ba8e186a8"],
- ["ec9baa", "e1848be185b0e186a9"],
- ["ec9baa", "ec9ba8e186a9"],
- ["ec9bab", "e1848be185b0e186aa"],
- ["ec9bab", "ec9ba8e186aa"],
- ["ec9bac", "e1848be185b0e186ab"],
- ["ec9bac", "ec9ba8e186ab"],
- ["ec9bad", "e1848be185b0e186ac"],
- ["ec9bad", "ec9ba8e186ac"],
- ["ec9bae", "e1848be185b0e186ad"],
- ["ec9bae", "ec9ba8e186ad"],
- ["ec9baf", "e1848be185b0e186ae"],
- ["ec9baf", "ec9ba8e186ae"],
- ["ec9bb0", "e1848be185b0e186af"],
- ["ec9bb0", "ec9ba8e186af"],
- ["ec9bb1", "e1848be185b0e186b0"],
- ["ec9bb1", "ec9ba8e186b0"],
- ["ec9bb2", "e1848be185b0e186b1"],
- ["ec9bb2", "ec9ba8e186b1"],
- ["ec9bb3", "e1848be185b0e186b2"],
- ["ec9bb3", "ec9ba8e186b2"],
- ["ec9bb4", "e1848be185b0e186b3"],
- ["ec9bb4", "ec9ba8e186b3"],
- ["ec9bb5", "e1848be185b0e186b4"],
- ["ec9bb5", "ec9ba8e186b4"],
- ["ec9bb6", "e1848be185b0e186b5"],
- ["ec9bb6", "ec9ba8e186b5"],
- ["ec9bb7", "e1848be185b0e186b6"],
- ["ec9bb7", "ec9ba8e186b6"],
- ["ec9bb8", "e1848be185b0e186b7"],
- ["ec9bb8", "ec9ba8e186b7"],
- ["ec9bb9", "e1848be185b0e186b8"],
- ["ec9bb9", "ec9ba8e186b8"],
- ["ec9bba", "e1848be185b0e186b9"],
- ["ec9bba", "ec9ba8e186b9"],
- ["ec9bbb", "e1848be185b0e186ba"],
- ["ec9bbb", "ec9ba8e186ba"],
- ["ec9bbc", "e1848be185b0e186bb"],
- ["ec9bbc", "ec9ba8e186bb"],
- ["ec9bbd", "e1848be185b0e186bc"],
- ["ec9bbd", "ec9ba8e186bc"],
- ["ec9bbe", "e1848be185b0e186bd"],
- ["ec9bbe", "ec9ba8e186bd"],
- ["ec9bbf", "e1848be185b0e186be"],
- ["ec9bbf", "ec9ba8e186be"],
- ["ec9c80", "e1848be185b0e186bf"],
- ["ec9c80", "ec9ba8e186bf"],
- ["ec9c81", "e1848be185b0e18780"],
- ["ec9c81", "ec9ba8e18780"],
- ["ec9c82", "e1848be185b0e18781"],
- ["ec9c82", "ec9ba8e18781"],
- ["ec9c83", "e1848be185b0e18782"],
- ["ec9c83", "ec9ba8e18782"],
- ["ec9c84", "e1848be185b1"],
- ["ec9c85", "e1848be185b1e186a8"],
- ["ec9c85", "ec9c84e186a8"],
- ["ec9c86", "e1848be185b1e186a9"],
- ["ec9c86", "ec9c84e186a9"],
- ["ec9c87", "e1848be185b1e186aa"],
- ["ec9c87", "ec9c84e186aa"],
- ["ec9c88", "e1848be185b1e186ab"],
- ["ec9c88", "ec9c84e186ab"],
- ["ec9c89", "e1848be185b1e186ac"],
- ["ec9c89", "ec9c84e186ac"],
- ["ec9c8a", "e1848be185b1e186ad"],
- ["ec9c8a", "ec9c84e186ad"],
- ["ec9c8b", "e1848be185b1e186ae"],
- ["ec9c8b", "ec9c84e186ae"],
- ["ec9c8c", "e1848be185b1e186af"],
- ["ec9c8c", "ec9c84e186af"],
- ["ec9c8d", "e1848be185b1e186b0"],
- ["ec9c8d", "ec9c84e186b0"],
- ["ec9c8e", "e1848be185b1e186b1"],
- ["ec9c8e", "ec9c84e186b1"],
- ["ec9c8f", "e1848be185b1e186b2"],
- ["ec9c8f", "ec9c84e186b2"],
- ["ec9c90", "e1848be185b1e186b3"],
- ["ec9c90", "ec9c84e186b3"],
- ["ec9c91", "e1848be185b1e186b4"],
- ["ec9c91", "ec9c84e186b4"],
- ["ec9c92", "e1848be185b1e186b5"],
- ["ec9c92", "ec9c84e186b5"],
- ["ec9c93", "e1848be185b1e186b6"],
- ["ec9c93", "ec9c84e186b6"],
- ["ec9c94", "e1848be185b1e186b7"],
- ["ec9c94", "ec9c84e186b7"],
- ["ec9c95", "e1848be185b1e186b8"],
- ["ec9c95", "ec9c84e186b8"],
- ["ec9c96", "e1848be185b1e186b9"],
- ["ec9c96", "ec9c84e186b9"],
- ["ec9c97", "e1848be185b1e186ba"],
- ["ec9c97", "ec9c84e186ba"],
- ["ec9c98", "e1848be185b1e186bb"],
- ["ec9c98", "ec9c84e186bb"],
- ["ec9c99", "e1848be185b1e186bc"],
- ["ec9c99", "ec9c84e186bc"],
- ["ec9c9a", "e1848be185b1e186bd"],
- ["ec9c9a", "ec9c84e186bd"],
- ["ec9c9b", "e1848be185b1e186be"],
- ["ec9c9b", "ec9c84e186be"],
- ["ec9c9c", "e1848be185b1e186bf"],
- ["ec9c9c", "ec9c84e186bf"],
- ["ec9c9d", "e1848be185b1e18780"],
- ["ec9c9d", "ec9c84e18780"],
- ["ec9c9e", "e1848be185b1e18781"],
- ["ec9c9e", "ec9c84e18781"],
- ["ec9c9f", "e1848be185b1e18782"],
- ["ec9c9f", "ec9c84e18782"],
- ["ec9ca0", "e1848be185b2"],
- ["ec9ca1", "e1848be185b2e186a8"],
- ["ec9ca1", "ec9ca0e186a8"],
- ["ec9ca2", "e1848be185b2e186a9"],
- ["ec9ca2", "ec9ca0e186a9"],
- ["ec9ca3", "e1848be185b2e186aa"],
- ["ec9ca3", "ec9ca0e186aa"],
- ["ec9ca4", "e1848be185b2e186ab"],
- ["ec9ca4", "ec9ca0e186ab"],
- ["ec9ca5", "e1848be185b2e186ac"],
- ["ec9ca5", "ec9ca0e186ac"],
- ["ec9ca6", "e1848be185b2e186ad"],
- ["ec9ca6", "ec9ca0e186ad"],
- ["ec9ca7", "e1848be185b2e186ae"],
- ["ec9ca7", "ec9ca0e186ae"],
- ["ec9ca8", "e1848be185b2e186af"],
- ["ec9ca8", "ec9ca0e186af"],
- ["ec9ca9", "e1848be185b2e186b0"],
- ["ec9ca9", "ec9ca0e186b0"],
- ["ec9caa", "e1848be185b2e186b1"],
- ["ec9caa", "ec9ca0e186b1"],
- ["ec9cab", "e1848be185b2e186b2"],
- ["ec9cab", "ec9ca0e186b2"],
- ["ec9cac", "e1848be185b2e186b3"],
- ["ec9cac", "ec9ca0e186b3"],
- ["ec9cad", "e1848be185b2e186b4"],
- ["ec9cad", "ec9ca0e186b4"],
- ["ec9cae", "e1848be185b2e186b5"],
- ["ec9cae", "ec9ca0e186b5"],
- ["ec9caf", "e1848be185b2e186b6"],
- ["ec9caf", "ec9ca0e186b6"],
- ["ec9cb0", "e1848be185b2e186b7"],
- ["ec9cb0", "ec9ca0e186b7"],
- ["ec9cb1", "e1848be185b2e186b8"],
- ["ec9cb1", "ec9ca0e186b8"],
- ["ec9cb2", "e1848be185b2e186b9"],
- ["ec9cb2", "ec9ca0e186b9"],
- ["ec9cb3", "e1848be185b2e186ba"],
- ["ec9cb3", "ec9ca0e186ba"],
- ["ec9cb4", "e1848be185b2e186bb"],
- ["ec9cb4", "ec9ca0e186bb"],
- ["ec9cb5", "e1848be185b2e186bc"],
- ["ec9cb5", "ec9ca0e186bc"],
- ["ec9cb6", "e1848be185b2e186bd"],
- ["ec9cb6", "ec9ca0e186bd"],
- ["ec9cb7", "e1848be185b2e186be"],
- ["ec9cb7", "ec9ca0e186be"],
- ["ec9cb8", "e1848be185b2e186bf"],
- ["ec9cb8", "ec9ca0e186bf"],
- ["ec9cb9", "e1848be185b2e18780"],
- ["ec9cb9", "ec9ca0e18780"],
- ["ec9cba", "e1848be185b2e18781"],
- ["ec9cba", "ec9ca0e18781"],
- ["ec9cbb", "e1848be185b2e18782"],
- ["ec9cbb", "ec9ca0e18782"],
- ["ec9cbc", "e1848be185b3"],
- ["ec9cbd", "e1848be185b3e186a8"],
- ["ec9cbd", "ec9cbce186a8"],
- ["ec9cbe", "e1848be185b3e186a9"],
- ["ec9cbe", "ec9cbce186a9"],
- ["ec9cbf", "e1848be185b3e186aa"],
- ["ec9cbf", "ec9cbce186aa"],
- ["ec9d80", "e1848be185b3e186ab"],
- ["ec9d80", "ec9cbce186ab"],
- ["ec9d81", "e1848be185b3e186ac"],
- ["ec9d81", "ec9cbce186ac"],
- ["ec9d82", "e1848be185b3e186ad"],
- ["ec9d82", "ec9cbce186ad"],
- ["ec9d83", "e1848be185b3e186ae"],
- ["ec9d83", "ec9cbce186ae"],
- ["ec9d84", "e1848be185b3e186af"],
- ["ec9d84", "ec9cbce186af"],
- ["ec9d85", "e1848be185b3e186b0"],
- ["ec9d85", "ec9cbce186b0"],
- ["ec9d86", "e1848be185b3e186b1"],
- ["ec9d86", "ec9cbce186b1"],
- ["ec9d87", "e1848be185b3e186b2"],
- ["ec9d87", "ec9cbce186b2"],
- ["ec9d88", "e1848be185b3e186b3"],
- ["ec9d88", "ec9cbce186b3"],
- ["ec9d89", "e1848be185b3e186b4"],
- ["ec9d89", "ec9cbce186b4"],
- ["ec9d8a", "e1848be185b3e186b5"],
- ["ec9d8a", "ec9cbce186b5"],
- ["ec9d8b", "e1848be185b3e186b6"],
- ["ec9d8b", "ec9cbce186b6"],
- ["ec9d8c", "e1848be185b3e186b7"],
- ["ec9d8c", "ec9cbce186b7"],
- ["ec9d8d", "e1848be185b3e186b8"],
- ["ec9d8d", "ec9cbce186b8"],
- ["ec9d8e", "e1848be185b3e186b9"],
- ["ec9d8e", "ec9cbce186b9"],
- ["ec9d8f", "e1848be185b3e186ba"],
- ["ec9d8f", "ec9cbce186ba"],
- ["ec9d90", "e1848be185b3e186bb"],
- ["ec9d90", "ec9cbce186bb"],
- ["ec9d91", "e1848be185b3e186bc"],
- ["ec9d91", "ec9cbce186bc"],
- ["ec9d92", "e1848be185b3e186bd"],
- ["ec9d92", "ec9cbce186bd"],
- ["ec9d93", "e1848be185b3e186be"],
- ["ec9d93", "ec9cbce186be"],
- ["ec9d94", "e1848be185b3e186bf"],
- ["ec9d94", "ec9cbce186bf"],
- ["ec9d95", "e1848be185b3e18780"],
- ["ec9d95", "ec9cbce18780"],
- ["ec9d96", "e1848be185b3e18781"],
- ["ec9d96", "ec9cbce18781"],
- ["ec9d97", "e1848be185b3e18782"],
- ["ec9d97", "ec9cbce18782"],
- ["ec9d98", "e1848be185b4"],
- ["ec9d99", "e1848be185b4e186a8"],
- ["ec9d99", "ec9d98e186a8"],
- ["ec9d9a", "e1848be185b4e186a9"],
- ["ec9d9a", "ec9d98e186a9"],
- ["ec9d9b", "e1848be185b4e186aa"],
- ["ec9d9b", "ec9d98e186aa"],
- ["ec9d9c", "e1848be185b4e186ab"],
- ["ec9d9c", "ec9d98e186ab"],
- ["ec9d9d", "e1848be185b4e186ac"],
- ["ec9d9d", "ec9d98e186ac"],
- ["ec9d9e", "e1848be185b4e186ad"],
- ["ec9d9e", "ec9d98e186ad"],
- ["ec9d9f", "e1848be185b4e186ae"],
- ["ec9d9f", "ec9d98e186ae"],
- ["ec9da0", "e1848be185b4e186af"],
- ["ec9da0", "ec9d98e186af"],
- ["ec9da1", "e1848be185b4e186b0"],
- ["ec9da1", "ec9d98e186b0"],
- ["ec9da2", "e1848be185b4e186b1"],
- ["ec9da2", "ec9d98e186b1"],
- ["ec9da3", "e1848be185b4e186b2"],
- ["ec9da3", "ec9d98e186b2"],
- ["ec9da4", "e1848be185b4e186b3"],
- ["ec9da4", "ec9d98e186b3"],
- ["ec9da5", "e1848be185b4e186b4"],
- ["ec9da5", "ec9d98e186b4"],
- ["ec9da6", "e1848be185b4e186b5"],
- ["ec9da6", "ec9d98e186b5"],
- ["ec9da7", "e1848be185b4e186b6"],
- ["ec9da7", "ec9d98e186b6"],
- ["ec9da8", "e1848be185b4e186b7"],
- ["ec9da8", "ec9d98e186b7"],
- ["ec9da9", "e1848be185b4e186b8"],
- ["ec9da9", "ec9d98e186b8"],
- ["ec9daa", "e1848be185b4e186b9"],
- ["ec9daa", "ec9d98e186b9"],
- ["ec9dab", "e1848be185b4e186ba"],
- ["ec9dab", "ec9d98e186ba"],
- ["ec9dac", "e1848be185b4e186bb"],
- ["ec9dac", "ec9d98e186bb"],
- ["ec9dad", "e1848be185b4e186bc"],
- ["ec9dad", "ec9d98e186bc"],
- ["ec9dae", "e1848be185b4e186bd"],
- ["ec9dae", "ec9d98e186bd"],
- ["ec9daf", "e1848be185b4e186be"],
- ["ec9daf", "ec9d98e186be"],
- ["ec9db0", "e1848be185b4e186bf"],
- ["ec9db0", "ec9d98e186bf"],
- ["ec9db1", "e1848be185b4e18780"],
- ["ec9db1", "ec9d98e18780"],
- ["ec9db2", "e1848be185b4e18781"],
- ["ec9db2", "ec9d98e18781"],
- ["ec9db3", "e1848be185b4e18782"],
- ["ec9db3", "ec9d98e18782"],
- ["ec9db4", "e1848be185b5"],
- ["ec9db5", "e1848be185b5e186a8"],
- ["ec9db5", "ec9db4e186a8"],
- ["ec9db6", "e1848be185b5e186a9"],
- ["ec9db6", "ec9db4e186a9"],
- ["ec9db7", "e1848be185b5e186aa"],
- ["ec9db7", "ec9db4e186aa"],
- ["ec9db8", "e1848be185b5e186ab"],
- ["ec9db8", "ec9db4e186ab"],
- ["ec9db9", "e1848be185b5e186ac"],
- ["ec9db9", "ec9db4e186ac"],
- ["ec9dba", "e1848be185b5e186ad"],
- ["ec9dba", "ec9db4e186ad"],
- ["ec9dbb", "e1848be185b5e186ae"],
- ["ec9dbb", "ec9db4e186ae"],
- ["ec9dbc", "e1848be185b5e186af"],
- ["ec9dbc", "ec9db4e186af"],
- ["ec9dbd", "e1848be185b5e186b0"],
- ["ec9dbd", "ec9db4e186b0"],
- ["ec9dbe", "e1848be185b5e186b1"],
- ["ec9dbe", "ec9db4e186b1"],
- ["ec9dbf", "e1848be185b5e186b2"],
- ["ec9dbf", "ec9db4e186b2"],
- ["ec9e80", "e1848be185b5e186b3"],
- ["ec9e80", "ec9db4e186b3"],
- ["ec9e81", "e1848be185b5e186b4"],
- ["ec9e81", "ec9db4e186b4"],
- ["ec9e82", "e1848be185b5e186b5"],
- ["ec9e82", "ec9db4e186b5"],
- ["ec9e83", "e1848be185b5e186b6"],
- ["ec9e83", "ec9db4e186b6"],
- ["ec9e84", "e1848be185b5e186b7"],
- ["ec9e84", "ec9db4e186b7"],
- ["ec9e85", "e1848be185b5e186b8"],
- ["ec9e85", "ec9db4e186b8"],
- ["ec9e86", "e1848be185b5e186b9"],
- ["ec9e86", "ec9db4e186b9"],
- ["ec9e87", "e1848be185b5e186ba"],
- ["ec9e87", "ec9db4e186ba"],
- ["ec9e88", "e1848be185b5e186bb"],
- ["ec9e88", "ec9db4e186bb"],
- ["ec9e89", "e1848be185b5e186bc"],
- ["ec9e89", "ec9db4e186bc"],
- ["ec9e8a", "e1848be185b5e186bd"],
- ["ec9e8a", "ec9db4e186bd"],
- ["ec9e8b", "e1848be185b5e186be"],
- ["ec9e8b", "ec9db4e186be"],
- ["ec9e8c", "e1848be185b5e186bf"],
- ["ec9e8c", "ec9db4e186bf"],
- ["ec9e8d", "e1848be185b5e18780"],
- ["ec9e8d", "ec9db4e18780"],
- ["ec9e8e", "e1848be185b5e18781"],
- ["ec9e8e", "ec9db4e18781"],
- ["ec9e8f", "e1848be185b5e18782"],
- ["ec9e8f", "ec9db4e18782"],
- ["ec9e90", "e1848ce185a1"],
- ["ec9e91", "e1848ce185a1e186a8"],
- ["ec9e91", "ec9e90e186a8"],
- ["ec9e92", "e1848ce185a1e186a9"],
- ["ec9e92", "ec9e90e186a9"],
- ["ec9e93", "e1848ce185a1e186aa"],
- ["ec9e93", "ec9e90e186aa"],
- ["ec9e94", "e1848ce185a1e186ab"],
- ["ec9e94", "ec9e90e186ab"],
- ["ec9e95", "e1848ce185a1e186ac"],
- ["ec9e95", "ec9e90e186ac"],
- ["ec9e96", "e1848ce185a1e186ad"],
- ["ec9e96", "ec9e90e186ad"],
- ["ec9e97", "e1848ce185a1e186ae"],
- ["ec9e97", "ec9e90e186ae"],
- ["ec9e98", "e1848ce185a1e186af"],
- ["ec9e98", "ec9e90e186af"],
- ["ec9e99", "e1848ce185a1e186b0"],
- ["ec9e99", "ec9e90e186b0"],
- ["ec9e9a", "e1848ce185a1e186b1"],
- ["ec9e9a", "ec9e90e186b1"],
- ["ec9e9b", "e1848ce185a1e186b2"],
- ["ec9e9b", "ec9e90e186b2"],
- ["ec9e9c", "e1848ce185a1e186b3"],
- ["ec9e9c", "ec9e90e186b3"],
- ["ec9e9d", "e1848ce185a1e186b4"],
- ["ec9e9d", "ec9e90e186b4"],
- ["ec9e9e", "e1848ce185a1e186b5"],
- ["ec9e9e", "ec9e90e186b5"],
- ["ec9e9f", "e1848ce185a1e186b6"],
- ["ec9e9f", "ec9e90e186b6"],
- ["ec9ea0", "e1848ce185a1e186b7"],
- ["ec9ea0", "ec9e90e186b7"],
- ["ec9ea1", "e1848ce185a1e186b8"],
- ["ec9ea1", "ec9e90e186b8"],
- ["ec9ea2", "e1848ce185a1e186b9"],
- ["ec9ea2", "ec9e90e186b9"],
- ["ec9ea3", "e1848ce185a1e186ba"],
- ["ec9ea3", "ec9e90e186ba"],
- ["ec9ea4", "e1848ce185a1e186bb"],
- ["ec9ea4", "ec9e90e186bb"],
- ["ec9ea5", "e1848ce185a1e186bc"],
- ["ec9ea5", "ec9e90e186bc"],
- ["ec9ea6", "e1848ce185a1e186bd"],
- ["ec9ea6", "ec9e90e186bd"],
- ["ec9ea7", "e1848ce185a1e186be"],
- ["ec9ea7", "ec9e90e186be"],
- ["ec9ea8", "e1848ce185a1e186bf"],
- ["ec9ea8", "ec9e90e186bf"],
- ["ec9ea9", "e1848ce185a1e18780"],
- ["ec9ea9", "ec9e90e18780"],
- ["ec9eaa", "e1848ce185a1e18781"],
- ["ec9eaa", "ec9e90e18781"],
- ["ec9eab", "e1848ce185a1e18782"],
- ["ec9eab", "ec9e90e18782"],
- ["ec9eac", "e1848ce185a2"],
- ["ec9ead", "e1848ce185a2e186a8"],
- ["ec9ead", "ec9eace186a8"],
- ["ec9eae", "e1848ce185a2e186a9"],
- ["ec9eae", "ec9eace186a9"],
- ["ec9eaf", "e1848ce185a2e186aa"],
- ["ec9eaf", "ec9eace186aa"],
- ["ec9eb0", "e1848ce185a2e186ab"],
- ["ec9eb0", "ec9eace186ab"],
- ["ec9eb1", "e1848ce185a2e186ac"],
- ["ec9eb1", "ec9eace186ac"],
- ["ec9eb2", "e1848ce185a2e186ad"],
- ["ec9eb2", "ec9eace186ad"],
- ["ec9eb3", "e1848ce185a2e186ae"],
- ["ec9eb3", "ec9eace186ae"],
- ["ec9eb4", "e1848ce185a2e186af"],
- ["ec9eb4", "ec9eace186af"],
- ["ec9eb5", "e1848ce185a2e186b0"],
- ["ec9eb5", "ec9eace186b0"],
- ["ec9eb6", "e1848ce185a2e186b1"],
- ["ec9eb6", "ec9eace186b1"],
- ["ec9eb7", "e1848ce185a2e186b2"],
- ["ec9eb7", "ec9eace186b2"],
- ["ec9eb8", "e1848ce185a2e186b3"],
- ["ec9eb8", "ec9eace186b3"],
- ["ec9eb9", "e1848ce185a2e186b4"],
- ["ec9eb9", "ec9eace186b4"],
- ["ec9eba", "e1848ce185a2e186b5"],
- ["ec9eba", "ec9eace186b5"],
- ["ec9ebb", "e1848ce185a2e186b6"],
- ["ec9ebb", "ec9eace186b6"],
- ["ec9ebc", "e1848ce185a2e186b7"],
- ["ec9ebc", "ec9eace186b7"],
- ["ec9ebd", "e1848ce185a2e186b8"],
- ["ec9ebd", "ec9eace186b8"],
- ["ec9ebe", "e1848ce185a2e186b9"],
- ["ec9ebe", "ec9eace186b9"],
- ["ec9ebf", "e1848ce185a2e186ba"],
- ["ec9ebf", "ec9eace186ba"],
- ["ec9f80", "e1848ce185a2e186bb"],
- ["ec9f80", "ec9eace186bb"],
- ["ec9f81", "e1848ce185a2e186bc"],
- ["ec9f81", "ec9eace186bc"],
- ["ec9f82", "e1848ce185a2e186bd"],
- ["ec9f82", "ec9eace186bd"],
- ["ec9f83", "e1848ce185a2e186be"],
- ["ec9f83", "ec9eace186be"],
- ["ec9f84", "e1848ce185a2e186bf"],
- ["ec9f84", "ec9eace186bf"],
- ["ec9f85", "e1848ce185a2e18780"],
- ["ec9f85", "ec9eace18780"],
- ["ec9f86", "e1848ce185a2e18781"],
- ["ec9f86", "ec9eace18781"],
- ["ec9f87", "e1848ce185a2e18782"],
- ["ec9f87", "ec9eace18782"],
- ["ec9f88", "e1848ce185a3"],
- ["ec9f89", "e1848ce185a3e186a8"],
- ["ec9f89", "ec9f88e186a8"],
- ["ec9f8a", "e1848ce185a3e186a9"],
- ["ec9f8a", "ec9f88e186a9"],
- ["ec9f8b", "e1848ce185a3e186aa"],
- ["ec9f8b", "ec9f88e186aa"],
- ["ec9f8c", "e1848ce185a3e186ab"],
- ["ec9f8c", "ec9f88e186ab"],
- ["ec9f8d", "e1848ce185a3e186ac"],
- ["ec9f8d", "ec9f88e186ac"],
- ["ec9f8e", "e1848ce185a3e186ad"],
- ["ec9f8e", "ec9f88e186ad"],
- ["ec9f8f", "e1848ce185a3e186ae"],
- ["ec9f8f", "ec9f88e186ae"],
- ["ec9f90", "e1848ce185a3e186af"],
- ["ec9f90", "ec9f88e186af"],
- ["ec9f91", "e1848ce185a3e186b0"],
- ["ec9f91", "ec9f88e186b0"],
- ["ec9f92", "e1848ce185a3e186b1"],
- ["ec9f92", "ec9f88e186b1"],
- ["ec9f93", "e1848ce185a3e186b2"],
- ["ec9f93", "ec9f88e186b2"],
- ["ec9f94", "e1848ce185a3e186b3"],
- ["ec9f94", "ec9f88e186b3"],
- ["ec9f95", "e1848ce185a3e186b4"],
- ["ec9f95", "ec9f88e186b4"],
- ["ec9f96", "e1848ce185a3e186b5"],
- ["ec9f96", "ec9f88e186b5"],
- ["ec9f97", "e1848ce185a3e186b6"],
- ["ec9f97", "ec9f88e186b6"],
- ["ec9f98", "e1848ce185a3e186b7"],
- ["ec9f98", "ec9f88e186b7"],
- ["ec9f99", "e1848ce185a3e186b8"],
- ["ec9f99", "ec9f88e186b8"],
- ["ec9f9a", "e1848ce185a3e186b9"],
- ["ec9f9a", "ec9f88e186b9"],
- ["ec9f9b", "e1848ce185a3e186ba"],
- ["ec9f9b", "ec9f88e186ba"],
- ["ec9f9c", "e1848ce185a3e186bb"],
- ["ec9f9c", "ec9f88e186bb"],
- ["ec9f9d", "e1848ce185a3e186bc"],
- ["ec9f9d", "ec9f88e186bc"],
- ["ec9f9e", "e1848ce185a3e186bd"],
- ["ec9f9e", "ec9f88e186bd"],
- ["ec9f9f", "e1848ce185a3e186be"],
- ["ec9f9f", "ec9f88e186be"],
- ["ec9fa0", "e1848ce185a3e186bf"],
- ["ec9fa0", "ec9f88e186bf"],
- ["ec9fa1", "e1848ce185a3e18780"],
- ["ec9fa1", "ec9f88e18780"],
- ["ec9fa2", "e1848ce185a3e18781"],
- ["ec9fa2", "ec9f88e18781"],
- ["ec9fa3", "e1848ce185a3e18782"],
- ["ec9fa3", "ec9f88e18782"],
- ["ec9fa4", "e1848ce185a4"],
- ["ec9fa5", "e1848ce185a4e186a8"],
- ["ec9fa5", "ec9fa4e186a8"],
- ["ec9fa6", "e1848ce185a4e186a9"],
- ["ec9fa6", "ec9fa4e186a9"],
- ["ec9fa7", "e1848ce185a4e186aa"],
- ["ec9fa7", "ec9fa4e186aa"],
- ["ec9fa8", "e1848ce185a4e186ab"],
- ["ec9fa8", "ec9fa4e186ab"],
- ["ec9fa9", "e1848ce185a4e186ac"],
- ["ec9fa9", "ec9fa4e186ac"],
- ["ec9faa", "e1848ce185a4e186ad"],
- ["ec9faa", "ec9fa4e186ad"],
- ["ec9fab", "e1848ce185a4e186ae"],
- ["ec9fab", "ec9fa4e186ae"],
- ["ec9fac", "e1848ce185a4e186af"],
- ["ec9fac", "ec9fa4e186af"],
- ["ec9fad", "e1848ce185a4e186b0"],
- ["ec9fad", "ec9fa4e186b0"],
- ["ec9fae", "e1848ce185a4e186b1"],
- ["ec9fae", "ec9fa4e186b1"],
- ["ec9faf", "e1848ce185a4e186b2"],
- ["ec9faf", "ec9fa4e186b2"],
- ["ec9fb0", "e1848ce185a4e186b3"],
- ["ec9fb0", "ec9fa4e186b3"],
- ["ec9fb1", "e1848ce185a4e186b4"],
- ["ec9fb1", "ec9fa4e186b4"],
- ["ec9fb2", "e1848ce185a4e186b5"],
- ["ec9fb2", "ec9fa4e186b5"],
- ["ec9fb3", "e1848ce185a4e186b6"],
- ["ec9fb3", "ec9fa4e186b6"],
- ["ec9fb4", "e1848ce185a4e186b7"],
- ["ec9fb4", "ec9fa4e186b7"],
- ["ec9fb5", "e1848ce185a4e186b8"],
- ["ec9fb5", "ec9fa4e186b8"],
- ["ec9fb6", "e1848ce185a4e186b9"],
- ["ec9fb6", "ec9fa4e186b9"],
- ["ec9fb7", "e1848ce185a4e186ba"],
- ["ec9fb7", "ec9fa4e186ba"],
- ["ec9fb8", "e1848ce185a4e186bb"],
- ["ec9fb8", "ec9fa4e186bb"],
- ["ec9fb9", "e1848ce185a4e186bc"],
- ["ec9fb9", "ec9fa4e186bc"],
- ["ec9fba", "e1848ce185a4e186bd"],
- ["ec9fba", "ec9fa4e186bd"],
- ["ec9fbb", "e1848ce185a4e186be"],
- ["ec9fbb", "ec9fa4e186be"],
- ["ec9fbc", "e1848ce185a4e186bf"],
- ["ec9fbc", "ec9fa4e186bf"],
- ["ec9fbd", "e1848ce185a4e18780"],
- ["ec9fbd", "ec9fa4e18780"],
- ["ec9fbe", "e1848ce185a4e18781"],
- ["ec9fbe", "ec9fa4e18781"],
- ["ec9fbf", "e1848ce185a4e18782"],
- ["ec9fbf", "ec9fa4e18782"],
- ["eca080", "e1848ce185a5"],
- ["eca081", "e1848ce185a5e186a8"],
- ["eca081", "eca080e186a8"],
- ["eca082", "e1848ce185a5e186a9"],
- ["eca082", "eca080e186a9"],
- ["eca083", "e1848ce185a5e186aa"],
- ["eca083", "eca080e186aa"],
- ["eca084", "e1848ce185a5e186ab"],
- ["eca084", "eca080e186ab"],
- ["eca085", "e1848ce185a5e186ac"],
- ["eca085", "eca080e186ac"],
- ["eca086", "e1848ce185a5e186ad"],
- ["eca086", "eca080e186ad"],
- ["eca087", "e1848ce185a5e186ae"],
- ["eca087", "eca080e186ae"],
- ["eca088", "e1848ce185a5e186af"],
- ["eca088", "eca080e186af"],
- ["eca089", "e1848ce185a5e186b0"],
- ["eca089", "eca080e186b0"],
- ["eca08a", "e1848ce185a5e186b1"],
- ["eca08a", "eca080e186b1"],
- ["eca08b", "e1848ce185a5e186b2"],
- ["eca08b", "eca080e186b2"],
- ["eca08c", "e1848ce185a5e186b3"],
- ["eca08c", "eca080e186b3"],
- ["eca08d", "e1848ce185a5e186b4"],
- ["eca08d", "eca080e186b4"],
- ["eca08e", "e1848ce185a5e186b5"],
- ["eca08e", "eca080e186b5"],
- ["eca08f", "e1848ce185a5e186b6"],
- ["eca08f", "eca080e186b6"],
- ["eca090", "e1848ce185a5e186b7"],
- ["eca090", "eca080e186b7"],
- ["eca091", "e1848ce185a5e186b8"],
- ["eca091", "eca080e186b8"],
- ["eca092", "e1848ce185a5e186b9"],
- ["eca092", "eca080e186b9"],
- ["eca093", "e1848ce185a5e186ba"],
- ["eca093", "eca080e186ba"],
- ["eca094", "e1848ce185a5e186bb"],
- ["eca094", "eca080e186bb"],
- ["eca095", "e1848ce185a5e186bc"],
- ["eca095", "eca080e186bc"],
- ["eca096", "e1848ce185a5e186bd"],
- ["eca096", "eca080e186bd"],
- ["eca097", "e1848ce185a5e186be"],
- ["eca097", "eca080e186be"],
- ["eca098", "e1848ce185a5e186bf"],
- ["eca098", "eca080e186bf"],
- ["eca099", "e1848ce185a5e18780"],
- ["eca099", "eca080e18780"],
- ["eca09a", "e1848ce185a5e18781"],
- ["eca09a", "eca080e18781"],
- ["eca09b", "e1848ce185a5e18782"],
- ["eca09b", "eca080e18782"],
- ["eca09c", "e1848ce185a6"],
- ["eca09d", "e1848ce185a6e186a8"],
- ["eca09d", "eca09ce186a8"],
- ["eca09e", "e1848ce185a6e186a9"],
- ["eca09e", "eca09ce186a9"],
- ["eca09f", "e1848ce185a6e186aa"],
- ["eca09f", "eca09ce186aa"],
- ["eca0a0", "e1848ce185a6e186ab"],
- ["eca0a0", "eca09ce186ab"],
- ["eca0a1", "e1848ce185a6e186ac"],
- ["eca0a1", "eca09ce186ac"],
- ["eca0a2", "e1848ce185a6e186ad"],
- ["eca0a2", "eca09ce186ad"],
- ["eca0a3", "e1848ce185a6e186ae"],
- ["eca0a3", "eca09ce186ae"],
- ["eca0a4", "e1848ce185a6e186af"],
- ["eca0a4", "eca09ce186af"],
- ["eca0a5", "e1848ce185a6e186b0"],
- ["eca0a5", "eca09ce186b0"],
- ["eca0a6", "e1848ce185a6e186b1"],
- ["eca0a6", "eca09ce186b1"],
- ["eca0a7", "e1848ce185a6e186b2"],
- ["eca0a7", "eca09ce186b2"],
- ["eca0a8", "e1848ce185a6e186b3"],
- ["eca0a8", "eca09ce186b3"],
- ["eca0a9", "e1848ce185a6e186b4"],
- ["eca0a9", "eca09ce186b4"],
- ["eca0aa", "e1848ce185a6e186b5"],
- ["eca0aa", "eca09ce186b5"],
- ["eca0ab", "e1848ce185a6e186b6"],
- ["eca0ab", "eca09ce186b6"],
- ["eca0ac", "e1848ce185a6e186b7"],
- ["eca0ac", "eca09ce186b7"],
- ["eca0ad", "e1848ce185a6e186b8"],
- ["eca0ad", "eca09ce186b8"],
- ["eca0ae", "e1848ce185a6e186b9"],
- ["eca0ae", "eca09ce186b9"],
- ["eca0af", "e1848ce185a6e186ba"],
- ["eca0af", "eca09ce186ba"],
- ["eca0b0", "e1848ce185a6e186bb"],
- ["eca0b0", "eca09ce186bb"],
- ["eca0b1", "e1848ce185a6e186bc"],
- ["eca0b1", "eca09ce186bc"],
- ["eca0b2", "e1848ce185a6e186bd"],
- ["eca0b2", "eca09ce186bd"],
- ["eca0b3", "e1848ce185a6e186be"],
- ["eca0b3", "eca09ce186be"],
- ["eca0b4", "e1848ce185a6e186bf"],
- ["eca0b4", "eca09ce186bf"],
- ["eca0b5", "e1848ce185a6e18780"],
- ["eca0b5", "eca09ce18780"],
- ["eca0b6", "e1848ce185a6e18781"],
- ["eca0b6", "eca09ce18781"],
- ["eca0b7", "e1848ce185a6e18782"],
- ["eca0b7", "eca09ce18782"],
- ["eca0b8", "e1848ce185a7"],
- ["eca0b9", "e1848ce185a7e186a8"],
- ["eca0b9", "eca0b8e186a8"],
- ["eca0ba", "e1848ce185a7e186a9"],
- ["eca0ba", "eca0b8e186a9"],
- ["eca0bb", "e1848ce185a7e186aa"],
- ["eca0bb", "eca0b8e186aa"],
- ["eca0bc", "e1848ce185a7e186ab"],
- ["eca0bc", "eca0b8e186ab"],
- ["eca0bd", "e1848ce185a7e186ac"],
- ["eca0bd", "eca0b8e186ac"],
- ["eca0be", "e1848ce185a7e186ad"],
- ["eca0be", "eca0b8e186ad"],
- ["eca0bf", "e1848ce185a7e186ae"],
- ["eca0bf", "eca0b8e186ae"],
- ["eca180", "e1848ce185a7e186af"],
- ["eca180", "eca0b8e186af"],
- ["eca181", "e1848ce185a7e186b0"],
- ["eca181", "eca0b8e186b0"],
- ["eca182", "e1848ce185a7e186b1"],
- ["eca182", "eca0b8e186b1"],
- ["eca183", "e1848ce185a7e186b2"],
- ["eca183", "eca0b8e186b2"],
- ["eca184", "e1848ce185a7e186b3"],
- ["eca184", "eca0b8e186b3"],
- ["eca185", "e1848ce185a7e186b4"],
- ["eca185", "eca0b8e186b4"],
- ["eca186", "e1848ce185a7e186b5"],
- ["eca186", "eca0b8e186b5"],
- ["eca187", "e1848ce185a7e186b6"],
- ["eca187", "eca0b8e186b6"],
- ["eca188", "e1848ce185a7e186b7"],
- ["eca188", "eca0b8e186b7"],
- ["eca189", "e1848ce185a7e186b8"],
- ["eca189", "eca0b8e186b8"],
- ["eca18a", "e1848ce185a7e186b9"],
- ["eca18a", "eca0b8e186b9"],
- ["eca18b", "e1848ce185a7e186ba"],
- ["eca18b", "eca0b8e186ba"],
- ["eca18c", "e1848ce185a7e186bb"],
- ["eca18c", "eca0b8e186bb"],
- ["eca18d", "e1848ce185a7e186bc"],
- ["eca18d", "eca0b8e186bc"],
- ["eca18e", "e1848ce185a7e186bd"],
- ["eca18e", "eca0b8e186bd"],
- ["eca18f", "e1848ce185a7e186be"],
- ["eca18f", "eca0b8e186be"],
- ["eca190", "e1848ce185a7e186bf"],
- ["eca190", "eca0b8e186bf"],
- ["eca191", "e1848ce185a7e18780"],
- ["eca191", "eca0b8e18780"],
- ["eca192", "e1848ce185a7e18781"],
- ["eca192", "eca0b8e18781"],
- ["eca193", "e1848ce185a7e18782"],
- ["eca193", "eca0b8e18782"],
- ["eca194", "e1848ce185a8"],
- ["eca195", "e1848ce185a8e186a8"],
- ["eca195", "eca194e186a8"],
- ["eca196", "e1848ce185a8e186a9"],
- ["eca196", "eca194e186a9"],
- ["eca197", "e1848ce185a8e186aa"],
- ["eca197", "eca194e186aa"],
- ["eca198", "e1848ce185a8e186ab"],
- ["eca198", "eca194e186ab"],
- ["eca199", "e1848ce185a8e186ac"],
- ["eca199", "eca194e186ac"],
- ["eca19a", "e1848ce185a8e186ad"],
- ["eca19a", "eca194e186ad"],
- ["eca19b", "e1848ce185a8e186ae"],
- ["eca19b", "eca194e186ae"],
- ["eca19c", "e1848ce185a8e186af"],
- ["eca19c", "eca194e186af"],
- ["eca19d", "e1848ce185a8e186b0"],
- ["eca19d", "eca194e186b0"],
- ["eca19e", "e1848ce185a8e186b1"],
- ["eca19e", "eca194e186b1"],
- ["eca19f", "e1848ce185a8e186b2"],
- ["eca19f", "eca194e186b2"],
- ["eca1a0", "e1848ce185a8e186b3"],
- ["eca1a0", "eca194e186b3"],
- ["eca1a1", "e1848ce185a8e186b4"],
- ["eca1a1", "eca194e186b4"],
- ["eca1a2", "e1848ce185a8e186b5"],
- ["eca1a2", "eca194e186b5"],
- ["eca1a3", "e1848ce185a8e186b6"],
- ["eca1a3", "eca194e186b6"],
- ["eca1a4", "e1848ce185a8e186b7"],
- ["eca1a4", "eca194e186b7"],
- ["eca1a5", "e1848ce185a8e186b8"],
- ["eca1a5", "eca194e186b8"],
- ["eca1a6", "e1848ce185a8e186b9"],
- ["eca1a6", "eca194e186b9"],
- ["eca1a7", "e1848ce185a8e186ba"],
- ["eca1a7", "eca194e186ba"],
- ["eca1a8", "e1848ce185a8e186bb"],
- ["eca1a8", "eca194e186bb"],
- ["eca1a9", "e1848ce185a8e186bc"],
- ["eca1a9", "eca194e186bc"],
- ["eca1aa", "e1848ce185a8e186bd"],
- ["eca1aa", "eca194e186bd"],
- ["eca1ab", "e1848ce185a8e186be"],
- ["eca1ab", "eca194e186be"],
- ["eca1ac", "e1848ce185a8e186bf"],
- ["eca1ac", "eca194e186bf"],
- ["eca1ad", "e1848ce185a8e18780"],
- ["eca1ad", "eca194e18780"],
- ["eca1ae", "e1848ce185a8e18781"],
- ["eca1ae", "eca194e18781"],
- ["eca1af", "e1848ce185a8e18782"],
- ["eca1af", "eca194e18782"],
- ["eca1b0", "e1848ce185a9"],
- ["eca1b1", "e1848ce185a9e186a8"],
- ["eca1b1", "eca1b0e186a8"],
- ["eca1b2", "e1848ce185a9e186a9"],
- ["eca1b2", "eca1b0e186a9"],
- ["eca1b3", "e1848ce185a9e186aa"],
- ["eca1b3", "eca1b0e186aa"],
- ["eca1b4", "e1848ce185a9e186ab"],
- ["eca1b4", "eca1b0e186ab"],
- ["eca1b5", "e1848ce185a9e186ac"],
- ["eca1b5", "eca1b0e186ac"],
- ["eca1b6", "e1848ce185a9e186ad"],
- ["eca1b6", "eca1b0e186ad"],
- ["eca1b7", "e1848ce185a9e186ae"],
- ["eca1b7", "eca1b0e186ae"],
- ["eca1b8", "e1848ce185a9e186af"],
- ["eca1b8", "eca1b0e186af"],
- ["eca1b9", "e1848ce185a9e186b0"],
- ["eca1b9", "eca1b0e186b0"],
- ["eca1ba", "e1848ce185a9e186b1"],
- ["eca1ba", "eca1b0e186b1"],
- ["eca1bb", "e1848ce185a9e186b2"],
- ["eca1bb", "eca1b0e186b2"],
- ["eca1bc", "e1848ce185a9e186b3"],
- ["eca1bc", "eca1b0e186b3"],
- ["eca1bd", "e1848ce185a9e186b4"],
- ["eca1bd", "eca1b0e186b4"],
- ["eca1be", "e1848ce185a9e186b5"],
- ["eca1be", "eca1b0e186b5"],
- ["eca1bf", "e1848ce185a9e186b6"],
- ["eca1bf", "eca1b0e186b6"],
- ["eca280", "e1848ce185a9e186b7"],
- ["eca280", "eca1b0e186b7"],
- ["eca281", "e1848ce185a9e186b8"],
- ["eca281", "eca1b0e186b8"],
- ["eca282", "e1848ce185a9e186b9"],
- ["eca282", "eca1b0e186b9"],
- ["eca283", "e1848ce185a9e186ba"],
- ["eca283", "eca1b0e186ba"],
- ["eca284", "e1848ce185a9e186bb"],
- ["eca284", "eca1b0e186bb"],
- ["eca285", "e1848ce185a9e186bc"],
- ["eca285", "eca1b0e186bc"],
- ["eca286", "e1848ce185a9e186bd"],
- ["eca286", "eca1b0e186bd"],
- ["eca287", "e1848ce185a9e186be"],
- ["eca287", "eca1b0e186be"],
- ["eca288", "e1848ce185a9e186bf"],
- ["eca288", "eca1b0e186bf"],
- ["eca289", "e1848ce185a9e18780"],
- ["eca289", "eca1b0e18780"],
- ["eca28a", "e1848ce185a9e18781"],
- ["eca28a", "eca1b0e18781"],
- ["eca28b", "e1848ce185a9e18782"],
- ["eca28b", "eca1b0e18782"],
- ["eca28c", "e1848ce185aa"],
- ["eca28d", "e1848ce185aae186a8"],
- ["eca28d", "eca28ce186a8"],
- ["eca28e", "e1848ce185aae186a9"],
- ["eca28e", "eca28ce186a9"],
- ["eca28f", "e1848ce185aae186aa"],
- ["eca28f", "eca28ce186aa"],
- ["eca290", "e1848ce185aae186ab"],
- ["eca290", "eca28ce186ab"],
- ["eca291", "e1848ce185aae186ac"],
- ["eca291", "eca28ce186ac"],
- ["eca292", "e1848ce185aae186ad"],
- ["eca292", "eca28ce186ad"],
- ["eca293", "e1848ce185aae186ae"],
- ["eca293", "eca28ce186ae"],
- ["eca294", "e1848ce185aae186af"],
- ["eca294", "eca28ce186af"],
- ["eca295", "e1848ce185aae186b0"],
- ["eca295", "eca28ce186b0"],
- ["eca296", "e1848ce185aae186b1"],
- ["eca296", "eca28ce186b1"],
- ["eca297", "e1848ce185aae186b2"],
- ["eca297", "eca28ce186b2"],
- ["eca298", "e1848ce185aae186b3"],
- ["eca298", "eca28ce186b3"],
- ["eca299", "e1848ce185aae186b4"],
- ["eca299", "eca28ce186b4"],
- ["eca29a", "e1848ce185aae186b5"],
- ["eca29a", "eca28ce186b5"],
- ["eca29b", "e1848ce185aae186b6"],
- ["eca29b", "eca28ce186b6"],
- ["eca29c", "e1848ce185aae186b7"],
- ["eca29c", "eca28ce186b7"],
- ["eca29d", "e1848ce185aae186b8"],
- ["eca29d", "eca28ce186b8"],
- ["eca29e", "e1848ce185aae186b9"],
- ["eca29e", "eca28ce186b9"],
- ["eca29f", "e1848ce185aae186ba"],
- ["eca29f", "eca28ce186ba"],
- ["eca2a0", "e1848ce185aae186bb"],
- ["eca2a0", "eca28ce186bb"],
- ["eca2a1", "e1848ce185aae186bc"],
- ["eca2a1", "eca28ce186bc"],
- ["eca2a2", "e1848ce185aae186bd"],
- ["eca2a2", "eca28ce186bd"],
- ["eca2a3", "e1848ce185aae186be"],
- ["eca2a3", "eca28ce186be"],
- ["eca2a4", "e1848ce185aae186bf"],
- ["eca2a4", "eca28ce186bf"],
- ["eca2a5", "e1848ce185aae18780"],
- ["eca2a5", "eca28ce18780"],
- ["eca2a6", "e1848ce185aae18781"],
- ["eca2a6", "eca28ce18781"],
- ["eca2a7", "e1848ce185aae18782"],
- ["eca2a7", "eca28ce18782"],
- ["eca2a8", "e1848ce185ab"],
- ["eca2a9", "e1848ce185abe186a8"],
- ["eca2a9", "eca2a8e186a8"],
- ["eca2aa", "e1848ce185abe186a9"],
- ["eca2aa", "eca2a8e186a9"],
- ["eca2ab", "e1848ce185abe186aa"],
- ["eca2ab", "eca2a8e186aa"],
- ["eca2ac", "e1848ce185abe186ab"],
- ["eca2ac", "eca2a8e186ab"],
- ["eca2ad", "e1848ce185abe186ac"],
- ["eca2ad", "eca2a8e186ac"],
- ["eca2ae", "e1848ce185abe186ad"],
- ["eca2ae", "eca2a8e186ad"],
- ["eca2af", "e1848ce185abe186ae"],
- ["eca2af", "eca2a8e186ae"],
- ["eca2b0", "e1848ce185abe186af"],
- ["eca2b0", "eca2a8e186af"],
- ["eca2b1", "e1848ce185abe186b0"],
- ["eca2b1", "eca2a8e186b0"],
- ["eca2b2", "e1848ce185abe186b1"],
- ["eca2b2", "eca2a8e186b1"],
- ["eca2b3", "e1848ce185abe186b2"],
- ["eca2b3", "eca2a8e186b2"],
- ["eca2b4", "e1848ce185abe186b3"],
- ["eca2b4", "eca2a8e186b3"],
- ["eca2b5", "e1848ce185abe186b4"],
- ["eca2b5", "eca2a8e186b4"],
- ["eca2b6", "e1848ce185abe186b5"],
- ["eca2b6", "eca2a8e186b5"],
- ["eca2b7", "e1848ce185abe186b6"],
- ["eca2b7", "eca2a8e186b6"],
- ["eca2b8", "e1848ce185abe186b7"],
- ["eca2b8", "eca2a8e186b7"],
- ["eca2b9", "e1848ce185abe186b8"],
- ["eca2b9", "eca2a8e186b8"],
- ["eca2ba", "e1848ce185abe186b9"],
- ["eca2ba", "eca2a8e186b9"],
- ["eca2bb", "e1848ce185abe186ba"],
- ["eca2bb", "eca2a8e186ba"],
- ["eca2bc", "e1848ce185abe186bb"],
- ["eca2bc", "eca2a8e186bb"],
- ["eca2bd", "e1848ce185abe186bc"],
- ["eca2bd", "eca2a8e186bc"],
- ["eca2be", "e1848ce185abe186bd"],
- ["eca2be", "eca2a8e186bd"],
- ["eca2bf", "e1848ce185abe186be"],
- ["eca2bf", "eca2a8e186be"],
- ["eca380", "e1848ce185abe186bf"],
- ["eca380", "eca2a8e186bf"],
- ["eca381", "e1848ce185abe18780"],
- ["eca381", "eca2a8e18780"],
- ["eca382", "e1848ce185abe18781"],
- ["eca382", "eca2a8e18781"],
- ["eca383", "e1848ce185abe18782"],
- ["eca383", "eca2a8e18782"],
- ["eca384", "e1848ce185ac"],
- ["eca385", "e1848ce185ace186a8"],
- ["eca385", "eca384e186a8"],
- ["eca386", "e1848ce185ace186a9"],
- ["eca386", "eca384e186a9"],
- ["eca387", "e1848ce185ace186aa"],
- ["eca387", "eca384e186aa"],
- ["eca388", "e1848ce185ace186ab"],
- ["eca388", "eca384e186ab"],
- ["eca389", "e1848ce185ace186ac"],
- ["eca389", "eca384e186ac"],
- ["eca38a", "e1848ce185ace186ad"],
- ["eca38a", "eca384e186ad"],
- ["eca38b", "e1848ce185ace186ae"],
- ["eca38b", "eca384e186ae"],
- ["eca38c", "e1848ce185ace186af"],
- ["eca38c", "eca384e186af"],
- ["eca38d", "e1848ce185ace186b0"],
- ["eca38d", "eca384e186b0"],
- ["eca38e", "e1848ce185ace186b1"],
- ["eca38e", "eca384e186b1"],
- ["eca38f", "e1848ce185ace186b2"],
- ["eca38f", "eca384e186b2"],
- ["eca390", "e1848ce185ace186b3"],
- ["eca390", "eca384e186b3"],
- ["eca391", "e1848ce185ace186b4"],
- ["eca391", "eca384e186b4"],
- ["eca392", "e1848ce185ace186b5"],
- ["eca392", "eca384e186b5"],
- ["eca393", "e1848ce185ace186b6"],
- ["eca393", "eca384e186b6"],
- ["eca394", "e1848ce185ace186b7"],
- ["eca394", "eca384e186b7"],
- ["eca395", "e1848ce185ace186b8"],
- ["eca395", "eca384e186b8"],
- ["eca396", "e1848ce185ace186b9"],
- ["eca396", "eca384e186b9"],
- ["eca397", "e1848ce185ace186ba"],
- ["eca397", "eca384e186ba"],
- ["eca398", "e1848ce185ace186bb"],
- ["eca398", "eca384e186bb"],
- ["eca399", "e1848ce185ace186bc"],
- ["eca399", "eca384e186bc"],
- ["eca39a", "e1848ce185ace186bd"],
- ["eca39a", "eca384e186bd"],
- ["eca39b", "e1848ce185ace186be"],
- ["eca39b", "eca384e186be"],
- ["eca39c", "e1848ce185ace186bf"],
- ["eca39c", "eca384e186bf"],
- ["eca39d", "e1848ce185ace18780"],
- ["eca39d", "eca384e18780"],
- ["eca39e", "e1848ce185ace18781"],
- ["eca39e", "eca384e18781"],
- ["eca39f", "e1848ce185ace18782"],
- ["eca39f", "eca384e18782"],
- ["eca3a0", "e1848ce185ad"],
- ["eca3a1", "e1848ce185ade186a8"],
- ["eca3a1", "eca3a0e186a8"],
- ["eca3a2", "e1848ce185ade186a9"],
- ["eca3a2", "eca3a0e186a9"],
- ["eca3a3", "e1848ce185ade186aa"],
- ["eca3a3", "eca3a0e186aa"],
- ["eca3a4", "e1848ce185ade186ab"],
- ["eca3a4", "eca3a0e186ab"],
- ["eca3a5", "e1848ce185ade186ac"],
- ["eca3a5", "eca3a0e186ac"],
- ["eca3a6", "e1848ce185ade186ad"],
- ["eca3a6", "eca3a0e186ad"],
- ["eca3a7", "e1848ce185ade186ae"],
- ["eca3a7", "eca3a0e186ae"],
- ["eca3a8", "e1848ce185ade186af"],
- ["eca3a8", "eca3a0e186af"],
- ["eca3a9", "e1848ce185ade186b0"],
- ["eca3a9", "eca3a0e186b0"],
- ["eca3aa", "e1848ce185ade186b1"],
- ["eca3aa", "eca3a0e186b1"],
- ["eca3ab", "e1848ce185ade186b2"],
- ["eca3ab", "eca3a0e186b2"],
- ["eca3ac", "e1848ce185ade186b3"],
- ["eca3ac", "eca3a0e186b3"],
- ["eca3ad", "e1848ce185ade186b4"],
- ["eca3ad", "eca3a0e186b4"],
- ["eca3ae", "e1848ce185ade186b5"],
- ["eca3ae", "eca3a0e186b5"],
- ["eca3af", "e1848ce185ade186b6"],
- ["eca3af", "eca3a0e186b6"],
- ["eca3b0", "e1848ce185ade186b7"],
- ["eca3b0", "eca3a0e186b7"],
- ["eca3b1", "e1848ce185ade186b8"],
- ["eca3b1", "eca3a0e186b8"],
- ["eca3b2", "e1848ce185ade186b9"],
- ["eca3b2", "eca3a0e186b9"],
- ["eca3b3", "e1848ce185ade186ba"],
- ["eca3b3", "eca3a0e186ba"],
- ["eca3b4", "e1848ce185ade186bb"],
- ["eca3b4", "eca3a0e186bb"],
- ["eca3b5", "e1848ce185ade186bc"],
- ["eca3b5", "eca3a0e186bc"],
- ["eca3b6", "e1848ce185ade186bd"],
- ["eca3b6", "eca3a0e186bd"],
- ["eca3b7", "e1848ce185ade186be"],
- ["eca3b7", "eca3a0e186be"],
- ["eca3b8", "e1848ce185ade186bf"],
- ["eca3b8", "eca3a0e186bf"],
- ["eca3b9", "e1848ce185ade18780"],
- ["eca3b9", "eca3a0e18780"],
- ["eca3ba", "e1848ce185ade18781"],
- ["eca3ba", "eca3a0e18781"],
- ["eca3bb", "e1848ce185ade18782"],
- ["eca3bb", "eca3a0e18782"],
- ["eca3bc", "e1848ce185ae"],
- ["eca3bd", "e1848ce185aee186a8"],
- ["eca3bd", "eca3bce186a8"],
- ["eca3be", "e1848ce185aee186a9"],
- ["eca3be", "eca3bce186a9"],
- ["eca3bf", "e1848ce185aee186aa"],
- ["eca3bf", "eca3bce186aa"],
- ["eca480", "e1848ce185aee186ab"],
- ["eca480", "eca3bce186ab"],
- ["eca481", "e1848ce185aee186ac"],
- ["eca481", "eca3bce186ac"],
- ["eca482", "e1848ce185aee186ad"],
- ["eca482", "eca3bce186ad"],
- ["eca483", "e1848ce185aee186ae"],
- ["eca483", "eca3bce186ae"],
- ["eca484", "e1848ce185aee186af"],
- ["eca484", "eca3bce186af"],
- ["eca485", "e1848ce185aee186b0"],
- ["eca485", "eca3bce186b0"],
- ["eca486", "e1848ce185aee186b1"],
- ["eca486", "eca3bce186b1"],
- ["eca487", "e1848ce185aee186b2"],
- ["eca487", "eca3bce186b2"],
- ["eca488", "e1848ce185aee186b3"],
- ["eca488", "eca3bce186b3"],
- ["eca489", "e1848ce185aee186b4"],
- ["eca489", "eca3bce186b4"],
- ["eca48a", "e1848ce185aee186b5"],
- ["eca48a", "eca3bce186b5"],
- ["eca48b", "e1848ce185aee186b6"],
- ["eca48b", "eca3bce186b6"],
- ["eca48c", "e1848ce185aee186b7"],
- ["eca48c", "eca3bce186b7"],
- ["eca48d", "e1848ce185aee186b8"],
- ["eca48d", "eca3bce186b8"],
- ["eca48e", "e1848ce185aee186b9"],
- ["eca48e", "eca3bce186b9"],
- ["eca48f", "e1848ce185aee186ba"],
- ["eca48f", "eca3bce186ba"],
- ["eca490", "e1848ce185aee186bb"],
- ["eca490", "eca3bce186bb"],
- ["eca491", "e1848ce185aee186bc"],
- ["eca491", "eca3bce186bc"],
- ["eca492", "e1848ce185aee186bd"],
- ["eca492", "eca3bce186bd"],
- ["eca493", "e1848ce185aee186be"],
- ["eca493", "eca3bce186be"],
- ["eca494", "e1848ce185aee186bf"],
- ["eca494", "eca3bce186bf"],
- ["eca495", "e1848ce185aee18780"],
- ["eca495", "eca3bce18780"],
- ["eca496", "e1848ce185aee18781"],
- ["eca496", "eca3bce18781"],
- ["eca497", "e1848ce185aee18782"],
- ["eca497", "eca3bce18782"],
- ["eca498", "e1848ce185af"],
- ["eca499", "e1848ce185afe186a8"],
- ["eca499", "eca498e186a8"],
- ["eca49a", "e1848ce185afe186a9"],
- ["eca49a", "eca498e186a9"],
- ["eca49b", "e1848ce185afe186aa"],
- ["eca49b", "eca498e186aa"],
- ["eca49c", "e1848ce185afe186ab"],
- ["eca49c", "eca498e186ab"],
- ["eca49d", "e1848ce185afe186ac"],
- ["eca49d", "eca498e186ac"],
- ["eca49e", "e1848ce185afe186ad"],
- ["eca49e", "eca498e186ad"],
- ["eca49f", "e1848ce185afe186ae"],
- ["eca49f", "eca498e186ae"],
- ["eca4a0", "e1848ce185afe186af"],
- ["eca4a0", "eca498e186af"],
- ["eca4a1", "e1848ce185afe186b0"],
- ["eca4a1", "eca498e186b0"],
- ["eca4a2", "e1848ce185afe186b1"],
- ["eca4a2", "eca498e186b1"],
- ["eca4a3", "e1848ce185afe186b2"],
- ["eca4a3", "eca498e186b2"],
- ["eca4a4", "e1848ce185afe186b3"],
- ["eca4a4", "eca498e186b3"],
- ["eca4a5", "e1848ce185afe186b4"],
- ["eca4a5", "eca498e186b4"],
- ["eca4a6", "e1848ce185afe186b5"],
- ["eca4a6", "eca498e186b5"],
- ["eca4a7", "e1848ce185afe186b6"],
- ["eca4a7", "eca498e186b6"],
- ["eca4a8", "e1848ce185afe186b7"],
- ["eca4a8", "eca498e186b7"],
- ["eca4a9", "e1848ce185afe186b8"],
- ["eca4a9", "eca498e186b8"],
- ["eca4aa", "e1848ce185afe186b9"],
- ["eca4aa", "eca498e186b9"],
- ["eca4ab", "e1848ce185afe186ba"],
- ["eca4ab", "eca498e186ba"],
- ["eca4ac", "e1848ce185afe186bb"],
- ["eca4ac", "eca498e186bb"],
- ["eca4ad", "e1848ce185afe186bc"],
- ["eca4ad", "eca498e186bc"],
- ["eca4ae", "e1848ce185afe186bd"],
- ["eca4ae", "eca498e186bd"],
- ["eca4af", "e1848ce185afe186be"],
- ["eca4af", "eca498e186be"],
- ["eca4b0", "e1848ce185afe186bf"],
- ["eca4b0", "eca498e186bf"],
- ["eca4b1", "e1848ce185afe18780"],
- ["eca4b1", "eca498e18780"],
- ["eca4b2", "e1848ce185afe18781"],
- ["eca4b2", "eca498e18781"],
- ["eca4b3", "e1848ce185afe18782"],
- ["eca4b3", "eca498e18782"],
- ["eca4b4", "e1848ce185b0"],
- ["eca4b5", "e1848ce185b0e186a8"],
- ["eca4b5", "eca4b4e186a8"],
- ["eca4b6", "e1848ce185b0e186a9"],
- ["eca4b6", "eca4b4e186a9"],
- ["eca4b7", "e1848ce185b0e186aa"],
- ["eca4b7", "eca4b4e186aa"],
- ["eca4b8", "e1848ce185b0e186ab"],
- ["eca4b8", "eca4b4e186ab"],
- ["eca4b9", "e1848ce185b0e186ac"],
- ["eca4b9", "eca4b4e186ac"],
- ["eca4ba", "e1848ce185b0e186ad"],
- ["eca4ba", "eca4b4e186ad"],
- ["eca4bb", "e1848ce185b0e186ae"],
- ["eca4bb", "eca4b4e186ae"],
- ["eca4bc", "e1848ce185b0e186af"],
- ["eca4bc", "eca4b4e186af"],
- ["eca4bd", "e1848ce185b0e186b0"],
- ["eca4bd", "eca4b4e186b0"],
- ["eca4be", "e1848ce185b0e186b1"],
- ["eca4be", "eca4b4e186b1"],
- ["eca4bf", "e1848ce185b0e186b2"],
- ["eca4bf", "eca4b4e186b2"],
- ["eca580", "e1848ce185b0e186b3"],
- ["eca580", "eca4b4e186b3"],
- ["eca581", "e1848ce185b0e186b4"],
- ["eca581", "eca4b4e186b4"],
- ["eca582", "e1848ce185b0e186b5"],
- ["eca582", "eca4b4e186b5"],
- ["eca583", "e1848ce185b0e186b6"],
- ["eca583", "eca4b4e186b6"],
- ["eca584", "e1848ce185b0e186b7"],
- ["eca584", "eca4b4e186b7"],
- ["eca585", "e1848ce185b0e186b8"],
- ["eca585", "eca4b4e186b8"],
- ["eca586", "e1848ce185b0e186b9"],
- ["eca586", "eca4b4e186b9"],
- ["eca587", "e1848ce185b0e186ba"],
- ["eca587", "eca4b4e186ba"],
- ["eca588", "e1848ce185b0e186bb"],
- ["eca588", "eca4b4e186bb"],
- ["eca589", "e1848ce185b0e186bc"],
- ["eca589", "eca4b4e186bc"],
- ["eca58a", "e1848ce185b0e186bd"],
- ["eca58a", "eca4b4e186bd"],
- ["eca58b", "e1848ce185b0e186be"],
- ["eca58b", "eca4b4e186be"],
- ["eca58c", "e1848ce185b0e186bf"],
- ["eca58c", "eca4b4e186bf"],
- ["eca58d", "e1848ce185b0e18780"],
- ["eca58d", "eca4b4e18780"],
- ["eca58e", "e1848ce185b0e18781"],
- ["eca58e", "eca4b4e18781"],
- ["eca58f", "e1848ce185b0e18782"],
- ["eca58f", "eca4b4e18782"],
- ["eca590", "e1848ce185b1"],
- ["eca591", "e1848ce185b1e186a8"],
- ["eca591", "eca590e186a8"],
- ["eca592", "e1848ce185b1e186a9"],
- ["eca592", "eca590e186a9"],
- ["eca593", "e1848ce185b1e186aa"],
- ["eca593", "eca590e186aa"],
- ["eca594", "e1848ce185b1e186ab"],
- ["eca594", "eca590e186ab"],
- ["eca595", "e1848ce185b1e186ac"],
- ["eca595", "eca590e186ac"],
- ["eca596", "e1848ce185b1e186ad"],
- ["eca596", "eca590e186ad"],
- ["eca597", "e1848ce185b1e186ae"],
- ["eca597", "eca590e186ae"],
- ["eca598", "e1848ce185b1e186af"],
- ["eca598", "eca590e186af"],
- ["eca599", "e1848ce185b1e186b0"],
- ["eca599", "eca590e186b0"],
- ["eca59a", "e1848ce185b1e186b1"],
- ["eca59a", "eca590e186b1"],
- ["eca59b", "e1848ce185b1e186b2"],
- ["eca59b", "eca590e186b2"],
- ["eca59c", "e1848ce185b1e186b3"],
- ["eca59c", "eca590e186b3"],
- ["eca59d", "e1848ce185b1e186b4"],
- ["eca59d", "eca590e186b4"],
- ["eca59e", "e1848ce185b1e186b5"],
- ["eca59e", "eca590e186b5"],
- ["eca59f", "e1848ce185b1e186b6"],
- ["eca59f", "eca590e186b6"],
- ["eca5a0", "e1848ce185b1e186b7"],
- ["eca5a0", "eca590e186b7"],
- ["eca5a1", "e1848ce185b1e186b8"],
- ["eca5a1", "eca590e186b8"],
- ["eca5a2", "e1848ce185b1e186b9"],
- ["eca5a2", "eca590e186b9"],
- ["eca5a3", "e1848ce185b1e186ba"],
- ["eca5a3", "eca590e186ba"],
- ["eca5a4", "e1848ce185b1e186bb"],
- ["eca5a4", "eca590e186bb"],
- ["eca5a5", "e1848ce185b1e186bc"],
- ["eca5a5", "eca590e186bc"],
- ["eca5a6", "e1848ce185b1e186bd"],
- ["eca5a6", "eca590e186bd"],
- ["eca5a7", "e1848ce185b1e186be"],
- ["eca5a7", "eca590e186be"],
- ["eca5a8", "e1848ce185b1e186bf"],
- ["eca5a8", "eca590e186bf"],
- ["eca5a9", "e1848ce185b1e18780"],
- ["eca5a9", "eca590e18780"],
- ["eca5aa", "e1848ce185b1e18781"],
- ["eca5aa", "eca590e18781"],
- ["eca5ab", "e1848ce185b1e18782"],
- ["eca5ab", "eca590e18782"],
- ["eca5ac", "e1848ce185b2"],
- ["eca5ad", "e1848ce185b2e186a8"],
- ["eca5ad", "eca5ace186a8"],
- ["eca5ae", "e1848ce185b2e186a9"],
- ["eca5ae", "eca5ace186a9"],
- ["eca5af", "e1848ce185b2e186aa"],
- ["eca5af", "eca5ace186aa"],
- ["eca5b0", "e1848ce185b2e186ab"],
- ["eca5b0", "eca5ace186ab"],
- ["eca5b1", "e1848ce185b2e186ac"],
- ["eca5b1", "eca5ace186ac"],
- ["eca5b2", "e1848ce185b2e186ad"],
- ["eca5b2", "eca5ace186ad"],
- ["eca5b3", "e1848ce185b2e186ae"],
- ["eca5b3", "eca5ace186ae"],
- ["eca5b4", "e1848ce185b2e186af"],
- ["eca5b4", "eca5ace186af"],
- ["eca5b5", "e1848ce185b2e186b0"],
- ["eca5b5", "eca5ace186b0"],
- ["eca5b6", "e1848ce185b2e186b1"],
- ["eca5b6", "eca5ace186b1"],
- ["eca5b7", "e1848ce185b2e186b2"],
- ["eca5b7", "eca5ace186b2"],
- ["eca5b8", "e1848ce185b2e186b3"],
- ["eca5b8", "eca5ace186b3"],
- ["eca5b9", "e1848ce185b2e186b4"],
- ["eca5b9", "eca5ace186b4"],
- ["eca5ba", "e1848ce185b2e186b5"],
- ["eca5ba", "eca5ace186b5"],
- ["eca5bb", "e1848ce185b2e186b6"],
- ["eca5bb", "eca5ace186b6"],
- ["eca5bc", "e1848ce185b2e186b7"],
- ["eca5bc", "eca5ace186b7"],
- ["eca5bd", "e1848ce185b2e186b8"],
- ["eca5bd", "eca5ace186b8"],
- ["eca5be", "e1848ce185b2e186b9"],
- ["eca5be", "eca5ace186b9"],
- ["eca5bf", "e1848ce185b2e186ba"],
- ["eca5bf", "eca5ace186ba"],
- ["eca680", "e1848ce185b2e186bb"],
- ["eca680", "eca5ace186bb"],
- ["eca681", "e1848ce185b2e186bc"],
- ["eca681", "eca5ace186bc"],
- ["eca682", "e1848ce185b2e186bd"],
- ["eca682", "eca5ace186bd"],
- ["eca683", "e1848ce185b2e186be"],
- ["eca683", "eca5ace186be"],
- ["eca684", "e1848ce185b2e186bf"],
- ["eca684", "eca5ace186bf"],
- ["eca685", "e1848ce185b2e18780"],
- ["eca685", "eca5ace18780"],
- ["eca686", "e1848ce185b2e18781"],
- ["eca686", "eca5ace18781"],
- ["eca687", "e1848ce185b2e18782"],
- ["eca687", "eca5ace18782"],
- ["eca688", "e1848ce185b3"],
- ["eca689", "e1848ce185b3e186a8"],
- ["eca689", "eca688e186a8"],
- ["eca68a", "e1848ce185b3e186a9"],
- ["eca68a", "eca688e186a9"],
- ["eca68b", "e1848ce185b3e186aa"],
- ["eca68b", "eca688e186aa"],
- ["eca68c", "e1848ce185b3e186ab"],
- ["eca68c", "eca688e186ab"],
- ["eca68d", "e1848ce185b3e186ac"],
- ["eca68d", "eca688e186ac"],
- ["eca68e", "e1848ce185b3e186ad"],
- ["eca68e", "eca688e186ad"],
- ["eca68f", "e1848ce185b3e186ae"],
- ["eca68f", "eca688e186ae"],
- ["eca690", "e1848ce185b3e186af"],
- ["eca690", "eca688e186af"],
- ["eca691", "e1848ce185b3e186b0"],
- ["eca691", "eca688e186b0"],
- ["eca692", "e1848ce185b3e186b1"],
- ["eca692", "eca688e186b1"],
- ["eca693", "e1848ce185b3e186b2"],
- ["eca693", "eca688e186b2"],
- ["eca694", "e1848ce185b3e186b3"],
- ["eca694", "eca688e186b3"],
- ["eca695", "e1848ce185b3e186b4"],
- ["eca695", "eca688e186b4"],
- ["eca696", "e1848ce185b3e186b5"],
- ["eca696", "eca688e186b5"],
- ["eca697", "e1848ce185b3e186b6"],
- ["eca697", "eca688e186b6"],
- ["eca698", "e1848ce185b3e186b7"],
- ["eca698", "eca688e186b7"],
- ["eca699", "e1848ce185b3e186b8"],
- ["eca699", "eca688e186b8"],
- ["eca69a", "e1848ce185b3e186b9"],
- ["eca69a", "eca688e186b9"],
- ["eca69b", "e1848ce185b3e186ba"],
- ["eca69b", "eca688e186ba"],
- ["eca69c", "e1848ce185b3e186bb"],
- ["eca69c", "eca688e186bb"],
- ["eca69d", "e1848ce185b3e186bc"],
- ["eca69d", "eca688e186bc"],
- ["eca69e", "e1848ce185b3e186bd"],
- ["eca69e", "eca688e186bd"],
- ["eca69f", "e1848ce185b3e186be"],
- ["eca69f", "eca688e186be"],
- ["eca6a0", "e1848ce185b3e186bf"],
- ["eca6a0", "eca688e186bf"],
- ["eca6a1", "e1848ce185b3e18780"],
- ["eca6a1", "eca688e18780"],
- ["eca6a2", "e1848ce185b3e18781"],
- ["eca6a2", "eca688e18781"],
- ["eca6a3", "e1848ce185b3e18782"],
- ["eca6a3", "eca688e18782"],
- ["eca6a4", "e1848ce185b4"],
- ["eca6a5", "e1848ce185b4e186a8"],
- ["eca6a5", "eca6a4e186a8"],
- ["eca6a6", "e1848ce185b4e186a9"],
- ["eca6a6", "eca6a4e186a9"],
- ["eca6a7", "e1848ce185b4e186aa"],
- ["eca6a7", "eca6a4e186aa"],
- ["eca6a8", "e1848ce185b4e186ab"],
- ["eca6a8", "eca6a4e186ab"],
- ["eca6a9", "e1848ce185b4e186ac"],
- ["eca6a9", "eca6a4e186ac"],
- ["eca6aa", "e1848ce185b4e186ad"],
- ["eca6aa", "eca6a4e186ad"],
- ["eca6ab", "e1848ce185b4e186ae"],
- ["eca6ab", "eca6a4e186ae"],
- ["eca6ac", "e1848ce185b4e186af"],
- ["eca6ac", "eca6a4e186af"],
- ["eca6ad", "e1848ce185b4e186b0"],
- ["eca6ad", "eca6a4e186b0"],
- ["eca6ae", "e1848ce185b4e186b1"],
- ["eca6ae", "eca6a4e186b1"],
- ["eca6af", "e1848ce185b4e186b2"],
- ["eca6af", "eca6a4e186b2"],
- ["eca6b0", "e1848ce185b4e186b3"],
- ["eca6b0", "eca6a4e186b3"],
- ["eca6b1", "e1848ce185b4e186b4"],
- ["eca6b1", "eca6a4e186b4"],
- ["eca6b2", "e1848ce185b4e186b5"],
- ["eca6b2", "eca6a4e186b5"],
- ["eca6b3", "e1848ce185b4e186b6"],
- ["eca6b3", "eca6a4e186b6"],
- ["eca6b4", "e1848ce185b4e186b7"],
- ["eca6b4", "eca6a4e186b7"],
- ["eca6b5", "e1848ce185b4e186b8"],
- ["eca6b5", "eca6a4e186b8"],
- ["eca6b6", "e1848ce185b4e186b9"],
- ["eca6b6", "eca6a4e186b9"],
- ["eca6b7", "e1848ce185b4e186ba"],
- ["eca6b7", "eca6a4e186ba"],
- ["eca6b8", "e1848ce185b4e186bb"],
- ["eca6b8", "eca6a4e186bb"],
- ["eca6b9", "e1848ce185b4e186bc"],
- ["eca6b9", "eca6a4e186bc"],
- ["eca6ba", "e1848ce185b4e186bd"],
- ["eca6ba", "eca6a4e186bd"],
- ["eca6bb", "e1848ce185b4e186be"],
- ["eca6bb", "eca6a4e186be"],
- ["eca6bc", "e1848ce185b4e186bf"],
- ["eca6bc", "eca6a4e186bf"],
- ["eca6bd", "e1848ce185b4e18780"],
- ["eca6bd", "eca6a4e18780"],
- ["eca6be", "e1848ce185b4e18781"],
- ["eca6be", "eca6a4e18781"],
- ["eca6bf", "e1848ce185b4e18782"],
- ["eca6bf", "eca6a4e18782"],
- ["eca780", "e1848ce185b5"],
- ["eca781", "e1848ce185b5e186a8"],
- ["eca781", "eca780e186a8"],
- ["eca782", "e1848ce185b5e186a9"],
- ["eca782", "eca780e186a9"],
- ["eca783", "e1848ce185b5e186aa"],
- ["eca783", "eca780e186aa"],
- ["eca784", "e1848ce185b5e186ab"],
- ["eca784", "eca780e186ab"],
- ["eca785", "e1848ce185b5e186ac"],
- ["eca785", "eca780e186ac"],
- ["eca786", "e1848ce185b5e186ad"],
- ["eca786", "eca780e186ad"],
- ["eca787", "e1848ce185b5e186ae"],
- ["eca787", "eca780e186ae"],
- ["eca788", "e1848ce185b5e186af"],
- ["eca788", "eca780e186af"],
- ["eca789", "e1848ce185b5e186b0"],
- ["eca789", "eca780e186b0"],
- ["eca78a", "e1848ce185b5e186b1"],
- ["eca78a", "eca780e186b1"],
- ["eca78b", "e1848ce185b5e186b2"],
- ["eca78b", "eca780e186b2"],
- ["eca78c", "e1848ce185b5e186b3"],
- ["eca78c", "eca780e186b3"],
- ["eca78d", "e1848ce185b5e186b4"],
- ["eca78d", "eca780e186b4"],
- ["eca78e", "e1848ce185b5e186b5"],
- ["eca78e", "eca780e186b5"],
- ["eca78f", "e1848ce185b5e186b6"],
- ["eca78f", "eca780e186b6"],
- ["eca790", "e1848ce185b5e186b7"],
- ["eca790", "eca780e186b7"],
- ["eca791", "e1848ce185b5e186b8"],
- ["eca791", "eca780e186b8"],
- ["eca792", "e1848ce185b5e186b9"],
- ["eca792", "eca780e186b9"],
- ["eca793", "e1848ce185b5e186ba"],
- ["eca793", "eca780e186ba"],
- ["eca794", "e1848ce185b5e186bb"],
- ["eca794", "eca780e186bb"],
- ["eca795", "e1848ce185b5e186bc"],
- ["eca795", "eca780e186bc"],
- ["eca796", "e1848ce185b5e186bd"],
- ["eca796", "eca780e186bd"],
- ["eca797", "e1848ce185b5e186be"],
- ["eca797", "eca780e186be"],
- ["eca798", "e1848ce185b5e186bf"],
- ["eca798", "eca780e186bf"],
- ["eca799", "e1848ce185b5e18780"],
- ["eca799", "eca780e18780"],
- ["eca79a", "e1848ce185b5e18781"],
- ["eca79a", "eca780e18781"],
- ["eca79b", "e1848ce185b5e18782"],
- ["eca79b", "eca780e18782"],
- ["eca79c", "e1848de185a1"],
- ["eca79d", "e1848de185a1e186a8"],
- ["eca79d", "eca79ce186a8"],
- ["eca79e", "e1848de185a1e186a9"],
- ["eca79e", "eca79ce186a9"],
- ["eca79f", "e1848de185a1e186aa"],
- ["eca79f", "eca79ce186aa"],
- ["eca7a0", "e1848de185a1e186ab"],
- ["eca7a0", "eca79ce186ab"],
- ["eca7a1", "e1848de185a1e186ac"],
- ["eca7a1", "eca79ce186ac"],
- ["eca7a2", "e1848de185a1e186ad"],
- ["eca7a2", "eca79ce186ad"],
- ["eca7a3", "e1848de185a1e186ae"],
- ["eca7a3", "eca79ce186ae"],
- ["eca7a4", "e1848de185a1e186af"],
- ["eca7a4", "eca79ce186af"],
- ["eca7a5", "e1848de185a1e186b0"],
- ["eca7a5", "eca79ce186b0"],
- ["eca7a6", "e1848de185a1e186b1"],
- ["eca7a6", "eca79ce186b1"],
- ["eca7a7", "e1848de185a1e186b2"],
- ["eca7a7", "eca79ce186b2"],
- ["eca7a8", "e1848de185a1e186b3"],
- ["eca7a8", "eca79ce186b3"],
- ["eca7a9", "e1848de185a1e186b4"],
- ["eca7a9", "eca79ce186b4"],
- ["eca7aa", "e1848de185a1e186b5"],
- ["eca7aa", "eca79ce186b5"],
- ["eca7ab", "e1848de185a1e186b6"],
- ["eca7ab", "eca79ce186b6"],
- ["eca7ac", "e1848de185a1e186b7"],
- ["eca7ac", "eca79ce186b7"],
- ["eca7ad", "e1848de185a1e186b8"],
- ["eca7ad", "eca79ce186b8"],
- ["eca7ae", "e1848de185a1e186b9"],
- ["eca7ae", "eca79ce186b9"],
- ["eca7af", "e1848de185a1e186ba"],
- ["eca7af", "eca79ce186ba"],
- ["eca7b0", "e1848de185a1e186bb"],
- ["eca7b0", "eca79ce186bb"],
- ["eca7b1", "e1848de185a1e186bc"],
- ["eca7b1", "eca79ce186bc"],
- ["eca7b2", "e1848de185a1e186bd"],
- ["eca7b2", "eca79ce186bd"],
- ["eca7b3", "e1848de185a1e186be"],
- ["eca7b3", "eca79ce186be"],
- ["eca7b4", "e1848de185a1e186bf"],
- ["eca7b4", "eca79ce186bf"],
- ["eca7b5", "e1848de185a1e18780"],
- ["eca7b5", "eca79ce18780"],
- ["eca7b6", "e1848de185a1e18781"],
- ["eca7b6", "eca79ce18781"],
- ["eca7b7", "e1848de185a1e18782"],
- ["eca7b7", "eca79ce18782"],
- ["eca7b8", "e1848de185a2"],
- ["eca7b9", "e1848de185a2e186a8"],
- ["eca7b9", "eca7b8e186a8"],
- ["eca7ba", "e1848de185a2e186a9"],
- ["eca7ba", "eca7b8e186a9"],
- ["eca7bb", "e1848de185a2e186aa"],
- ["eca7bb", "eca7b8e186aa"],
- ["eca7bc", "e1848de185a2e186ab"],
- ["eca7bc", "eca7b8e186ab"],
- ["eca7bd", "e1848de185a2e186ac"],
- ["eca7bd", "eca7b8e186ac"],
- ["eca7be", "e1848de185a2e186ad"],
- ["eca7be", "eca7b8e186ad"],
- ["eca7bf", "e1848de185a2e186ae"],
- ["eca7bf", "eca7b8e186ae"],
- ["eca880", "e1848de185a2e186af"],
- ["eca880", "eca7b8e186af"],
- ["eca881", "e1848de185a2e186b0"],
- ["eca881", "eca7b8e186b0"],
- ["eca882", "e1848de185a2e186b1"],
- ["eca882", "eca7b8e186b1"],
- ["eca883", "e1848de185a2e186b2"],
- ["eca883", "eca7b8e186b2"],
- ["eca884", "e1848de185a2e186b3"],
- ["eca884", "eca7b8e186b3"],
- ["eca885", "e1848de185a2e186b4"],
- ["eca885", "eca7b8e186b4"],
- ["eca886", "e1848de185a2e186b5"],
- ["eca886", "eca7b8e186b5"],
- ["eca887", "e1848de185a2e186b6"],
- ["eca887", "eca7b8e186b6"],
- ["eca888", "e1848de185a2e186b7"],
- ["eca888", "eca7b8e186b7"],
- ["eca889", "e1848de185a2e186b8"],
- ["eca889", "eca7b8e186b8"],
- ["eca88a", "e1848de185a2e186b9"],
- ["eca88a", "eca7b8e186b9"],
- ["eca88b", "e1848de185a2e186ba"],
- ["eca88b", "eca7b8e186ba"],
- ["eca88c", "e1848de185a2e186bb"],
- ["eca88c", "eca7b8e186bb"],
- ["eca88d", "e1848de185a2e186bc"],
- ["eca88d", "eca7b8e186bc"],
- ["eca88e", "e1848de185a2e186bd"],
- ["eca88e", "eca7b8e186bd"],
- ["eca88f", "e1848de185a2e186be"],
- ["eca88f", "eca7b8e186be"],
- ["eca890", "e1848de185a2e186bf"],
- ["eca890", "eca7b8e186bf"],
- ["eca891", "e1848de185a2e18780"],
- ["eca891", "eca7b8e18780"],
- ["eca892", "e1848de185a2e18781"],
- ["eca892", "eca7b8e18781"],
- ["eca893", "e1848de185a2e18782"],
- ["eca893", "eca7b8e18782"],
- ["eca894", "e1848de185a3"],
- ["eca895", "e1848de185a3e186a8"],
- ["eca895", "eca894e186a8"],
- ["eca896", "e1848de185a3e186a9"],
- ["eca896", "eca894e186a9"],
- ["eca897", "e1848de185a3e186aa"],
- ["eca897", "eca894e186aa"],
- ["eca898", "e1848de185a3e186ab"],
- ["eca898", "eca894e186ab"],
- ["eca899", "e1848de185a3e186ac"],
- ["eca899", "eca894e186ac"],
- ["eca89a", "e1848de185a3e186ad"],
- ["eca89a", "eca894e186ad"],
- ["eca89b", "e1848de185a3e186ae"],
- ["eca89b", "eca894e186ae"],
- ["eca89c", "e1848de185a3e186af"],
- ["eca89c", "eca894e186af"],
- ["eca89d", "e1848de185a3e186b0"],
- ["eca89d", "eca894e186b0"],
- ["eca89e", "e1848de185a3e186b1"],
- ["eca89e", "eca894e186b1"],
- ["eca89f", "e1848de185a3e186b2"],
- ["eca89f", "eca894e186b2"],
- ["eca8a0", "e1848de185a3e186b3"],
- ["eca8a0", "eca894e186b3"],
- ["eca8a1", "e1848de185a3e186b4"],
- ["eca8a1", "eca894e186b4"],
- ["eca8a2", "e1848de185a3e186b5"],
- ["eca8a2", "eca894e186b5"],
- ["eca8a3", "e1848de185a3e186b6"],
- ["eca8a3", "eca894e186b6"],
- ["eca8a4", "e1848de185a3e186b7"],
- ["eca8a4", "eca894e186b7"],
- ["eca8a5", "e1848de185a3e186b8"],
- ["eca8a5", "eca894e186b8"],
- ["eca8a6", "e1848de185a3e186b9"],
- ["eca8a6", "eca894e186b9"],
- ["eca8a7", "e1848de185a3e186ba"],
- ["eca8a7", "eca894e186ba"],
- ["eca8a8", "e1848de185a3e186bb"],
- ["eca8a8", "eca894e186bb"],
- ["eca8a9", "e1848de185a3e186bc"],
- ["eca8a9", "eca894e186bc"],
- ["eca8aa", "e1848de185a3e186bd"],
- ["eca8aa", "eca894e186bd"],
- ["eca8ab", "e1848de185a3e186be"],
- ["eca8ab", "eca894e186be"],
- ["eca8ac", "e1848de185a3e186bf"],
- ["eca8ac", "eca894e186bf"],
- ["eca8ad", "e1848de185a3e18780"],
- ["eca8ad", "eca894e18780"],
- ["eca8ae", "e1848de185a3e18781"],
- ["eca8ae", "eca894e18781"],
- ["eca8af", "e1848de185a3e18782"],
- ["eca8af", "eca894e18782"],
- ["eca8b0", "e1848de185a4"],
- ["eca8b1", "e1848de185a4e186a8"],
- ["eca8b1", "eca8b0e186a8"],
- ["eca8b2", "e1848de185a4e186a9"],
- ["eca8b2", "eca8b0e186a9"],
- ["eca8b3", "e1848de185a4e186aa"],
- ["eca8b3", "eca8b0e186aa"],
- ["eca8b4", "e1848de185a4e186ab"],
- ["eca8b4", "eca8b0e186ab"],
- ["eca8b5", "e1848de185a4e186ac"],
- ["eca8b5", "eca8b0e186ac"],
- ["eca8b6", "e1848de185a4e186ad"],
- ["eca8b6", "eca8b0e186ad"],
- ["eca8b7", "e1848de185a4e186ae"],
- ["eca8b7", "eca8b0e186ae"],
- ["eca8b8", "e1848de185a4e186af"],
- ["eca8b8", "eca8b0e186af"],
- ["eca8b9", "e1848de185a4e186b0"],
- ["eca8b9", "eca8b0e186b0"],
- ["eca8ba", "e1848de185a4e186b1"],
- ["eca8ba", "eca8b0e186b1"],
- ["eca8bb", "e1848de185a4e186b2"],
- ["eca8bb", "eca8b0e186b2"],
- ["eca8bc", "e1848de185a4e186b3"],
- ["eca8bc", "eca8b0e186b3"],
- ["eca8bd", "e1848de185a4e186b4"],
- ["eca8bd", "eca8b0e186b4"],
- ["eca8be", "e1848de185a4e186b5"],
- ["eca8be", "eca8b0e186b5"],
- ["eca8bf", "e1848de185a4e186b6"],
- ["eca8bf", "eca8b0e186b6"],
- ["eca980", "e1848de185a4e186b7"],
- ["eca980", "eca8b0e186b7"],
- ["eca981", "e1848de185a4e186b8"],
- ["eca981", "eca8b0e186b8"],
- ["eca982", "e1848de185a4e186b9"],
- ["eca982", "eca8b0e186b9"],
- ["eca983", "e1848de185a4e186ba"],
- ["eca983", "eca8b0e186ba"],
- ["eca984", "e1848de185a4e186bb"],
- ["eca984", "eca8b0e186bb"],
- ["eca985", "e1848de185a4e186bc"],
- ["eca985", "eca8b0e186bc"],
- ["eca986", "e1848de185a4e186bd"],
- ["eca986", "eca8b0e186bd"],
- ["eca987", "e1848de185a4e186be"],
- ["eca987", "eca8b0e186be"],
- ["eca988", "e1848de185a4e186bf"],
- ["eca988", "eca8b0e186bf"],
- ["eca989", "e1848de185a4e18780"],
- ["eca989", "eca8b0e18780"],
- ["eca98a", "e1848de185a4e18781"],
- ["eca98a", "eca8b0e18781"],
- ["eca98b", "e1848de185a4e18782"],
- ["eca98b", "eca8b0e18782"],
- ["eca98c", "e1848de185a5"],
- ["eca98d", "e1848de185a5e186a8"],
- ["eca98d", "eca98ce186a8"],
- ["eca98e", "e1848de185a5e186a9"],
- ["eca98e", "eca98ce186a9"],
- ["eca98f", "e1848de185a5e186aa"],
- ["eca98f", "eca98ce186aa"],
- ["eca990", "e1848de185a5e186ab"],
- ["eca990", "eca98ce186ab"],
- ["eca991", "e1848de185a5e186ac"],
- ["eca991", "eca98ce186ac"],
- ["eca992", "e1848de185a5e186ad"],
- ["eca992", "eca98ce186ad"],
- ["eca993", "e1848de185a5e186ae"],
- ["eca993", "eca98ce186ae"],
- ["eca994", "e1848de185a5e186af"],
- ["eca994", "eca98ce186af"],
- ["eca995", "e1848de185a5e186b0"],
- ["eca995", "eca98ce186b0"],
- ["eca996", "e1848de185a5e186b1"],
- ["eca996", "eca98ce186b1"],
- ["eca997", "e1848de185a5e186b2"],
- ["eca997", "eca98ce186b2"],
- ["eca998", "e1848de185a5e186b3"],
- ["eca998", "eca98ce186b3"],
- ["eca999", "e1848de185a5e186b4"],
- ["eca999", "eca98ce186b4"],
- ["eca99a", "e1848de185a5e186b5"],
- ["eca99a", "eca98ce186b5"],
- ["eca99b", "e1848de185a5e186b6"],
- ["eca99b", "eca98ce186b6"],
- ["eca99c", "e1848de185a5e186b7"],
- ["eca99c", "eca98ce186b7"],
- ["eca99d", "e1848de185a5e186b8"],
- ["eca99d", "eca98ce186b8"],
- ["eca99e", "e1848de185a5e186b9"],
- ["eca99e", "eca98ce186b9"],
- ["eca99f", "e1848de185a5e186ba"],
- ["eca99f", "eca98ce186ba"],
- ["eca9a0", "e1848de185a5e186bb"],
- ["eca9a0", "eca98ce186bb"],
- ["eca9a1", "e1848de185a5e186bc"],
- ["eca9a1", "eca98ce186bc"],
- ["eca9a2", "e1848de185a5e186bd"],
- ["eca9a2", "eca98ce186bd"],
- ["eca9a3", "e1848de185a5e186be"],
- ["eca9a3", "eca98ce186be"],
- ["eca9a4", "e1848de185a5e186bf"],
- ["eca9a4", "eca98ce186bf"],
- ["eca9a5", "e1848de185a5e18780"],
- ["eca9a5", "eca98ce18780"],
- ["eca9a6", "e1848de185a5e18781"],
- ["eca9a6", "eca98ce18781"],
- ["eca9a7", "e1848de185a5e18782"],
- ["eca9a7", "eca98ce18782"],
- ["eca9a8", "e1848de185a6"],
- ["eca9a9", "e1848de185a6e186a8"],
- ["eca9a9", "eca9a8e186a8"],
- ["eca9aa", "e1848de185a6e186a9"],
- ["eca9aa", "eca9a8e186a9"],
- ["eca9ab", "e1848de185a6e186aa"],
- ["eca9ab", "eca9a8e186aa"],
- ["eca9ac", "e1848de185a6e186ab"],
- ["eca9ac", "eca9a8e186ab"],
- ["eca9ad", "e1848de185a6e186ac"],
- ["eca9ad", "eca9a8e186ac"],
- ["eca9ae", "e1848de185a6e186ad"],
- ["eca9ae", "eca9a8e186ad"],
- ["eca9af", "e1848de185a6e186ae"],
- ["eca9af", "eca9a8e186ae"],
- ["eca9b0", "e1848de185a6e186af"],
- ["eca9b0", "eca9a8e186af"],
- ["eca9b1", "e1848de185a6e186b0"],
- ["eca9b1", "eca9a8e186b0"],
- ["eca9b2", "e1848de185a6e186b1"],
- ["eca9b2", "eca9a8e186b1"],
- ["eca9b3", "e1848de185a6e186b2"],
- ["eca9b3", "eca9a8e186b2"],
- ["eca9b4", "e1848de185a6e186b3"],
- ["eca9b4", "eca9a8e186b3"],
- ["eca9b5", "e1848de185a6e186b4"],
- ["eca9b5", "eca9a8e186b4"],
- ["eca9b6", "e1848de185a6e186b5"],
- ["eca9b6", "eca9a8e186b5"],
- ["eca9b7", "e1848de185a6e186b6"],
- ["eca9b7", "eca9a8e186b6"],
- ["eca9b8", "e1848de185a6e186b7"],
- ["eca9b8", "eca9a8e186b7"],
- ["eca9b9", "e1848de185a6e186b8"],
- ["eca9b9", "eca9a8e186b8"],
- ["eca9ba", "e1848de185a6e186b9"],
- ["eca9ba", "eca9a8e186b9"],
- ["eca9bb", "e1848de185a6e186ba"],
- ["eca9bb", "eca9a8e186ba"],
- ["eca9bc", "e1848de185a6e186bb"],
- ["eca9bc", "eca9a8e186bb"],
- ["eca9bd", "e1848de185a6e186bc"],
- ["eca9bd", "eca9a8e186bc"],
- ["eca9be", "e1848de185a6e186bd"],
- ["eca9be", "eca9a8e186bd"],
- ["eca9bf", "e1848de185a6e186be"],
- ["eca9bf", "eca9a8e186be"],
- ["ecaa80", "e1848de185a6e186bf"],
- ["ecaa80", "eca9a8e186bf"],
- ["ecaa81", "e1848de185a6e18780"],
- ["ecaa81", "eca9a8e18780"],
- ["ecaa82", "e1848de185a6e18781"],
- ["ecaa82", "eca9a8e18781"],
- ["ecaa83", "e1848de185a6e18782"],
- ["ecaa83", "eca9a8e18782"],
- ["ecaa84", "e1848de185a7"],
- ["ecaa85", "e1848de185a7e186a8"],
- ["ecaa85", "ecaa84e186a8"],
- ["ecaa86", "e1848de185a7e186a9"],
- ["ecaa86", "ecaa84e186a9"],
- ["ecaa87", "e1848de185a7e186aa"],
- ["ecaa87", "ecaa84e186aa"],
- ["ecaa88", "e1848de185a7e186ab"],
- ["ecaa88", "ecaa84e186ab"],
- ["ecaa89", "e1848de185a7e186ac"],
- ["ecaa89", "ecaa84e186ac"],
- ["ecaa8a", "e1848de185a7e186ad"],
- ["ecaa8a", "ecaa84e186ad"],
- ["ecaa8b", "e1848de185a7e186ae"],
- ["ecaa8b", "ecaa84e186ae"],
- ["ecaa8c", "e1848de185a7e186af"],
- ["ecaa8c", "ecaa84e186af"],
- ["ecaa8d", "e1848de185a7e186b0"],
- ["ecaa8d", "ecaa84e186b0"],
- ["ecaa8e", "e1848de185a7e186b1"],
- ["ecaa8e", "ecaa84e186b1"],
- ["ecaa8f", "e1848de185a7e186b2"],
- ["ecaa8f", "ecaa84e186b2"],
- ["ecaa90", "e1848de185a7e186b3"],
- ["ecaa90", "ecaa84e186b3"],
- ["ecaa91", "e1848de185a7e186b4"],
- ["ecaa91", "ecaa84e186b4"],
- ["ecaa92", "e1848de185a7e186b5"],
- ["ecaa92", "ecaa84e186b5"],
- ["ecaa93", "e1848de185a7e186b6"],
- ["ecaa93", "ecaa84e186b6"],
- ["ecaa94", "e1848de185a7e186b7"],
- ["ecaa94", "ecaa84e186b7"],
- ["ecaa95", "e1848de185a7e186b8"],
- ["ecaa95", "ecaa84e186b8"],
- ["ecaa96", "e1848de185a7e186b9"],
- ["ecaa96", "ecaa84e186b9"],
- ["ecaa97", "e1848de185a7e186ba"],
- ["ecaa97", "ecaa84e186ba"],
- ["ecaa98", "e1848de185a7e186bb"],
- ["ecaa98", "ecaa84e186bb"],
- ["ecaa99", "e1848de185a7e186bc"],
- ["ecaa99", "ecaa84e186bc"],
- ["ecaa9a", "e1848de185a7e186bd"],
- ["ecaa9a", "ecaa84e186bd"],
- ["ecaa9b", "e1848de185a7e186be"],
- ["ecaa9b", "ecaa84e186be"],
- ["ecaa9c", "e1848de185a7e186bf"],
- ["ecaa9c", "ecaa84e186bf"],
- ["ecaa9d", "e1848de185a7e18780"],
- ["ecaa9d", "ecaa84e18780"],
- ["ecaa9e", "e1848de185a7e18781"],
- ["ecaa9e", "ecaa84e18781"],
- ["ecaa9f", "e1848de185a7e18782"],
- ["ecaa9f", "ecaa84e18782"],
- ["ecaaa0", "e1848de185a8"],
- ["ecaaa1", "e1848de185a8e186a8"],
- ["ecaaa1", "ecaaa0e186a8"],
- ["ecaaa2", "e1848de185a8e186a9"],
- ["ecaaa2", "ecaaa0e186a9"],
- ["ecaaa3", "e1848de185a8e186aa"],
- ["ecaaa3", "ecaaa0e186aa"],
- ["ecaaa4", "e1848de185a8e186ab"],
- ["ecaaa4", "ecaaa0e186ab"],
- ["ecaaa5", "e1848de185a8e186ac"],
- ["ecaaa5", "ecaaa0e186ac"],
- ["ecaaa6", "e1848de185a8e186ad"],
- ["ecaaa6", "ecaaa0e186ad"],
- ["ecaaa7", "e1848de185a8e186ae"],
- ["ecaaa7", "ecaaa0e186ae"],
- ["ecaaa8", "e1848de185a8e186af"],
- ["ecaaa8", "ecaaa0e186af"],
- ["ecaaa9", "e1848de185a8e186b0"],
- ["ecaaa9", "ecaaa0e186b0"],
- ["ecaaaa", "e1848de185a8e186b1"],
- ["ecaaaa", "ecaaa0e186b1"],
- ["ecaaab", "e1848de185a8e186b2"],
- ["ecaaab", "ecaaa0e186b2"],
- ["ecaaac", "e1848de185a8e186b3"],
- ["ecaaac", "ecaaa0e186b3"],
- ["ecaaad", "e1848de185a8e186b4"],
- ["ecaaad", "ecaaa0e186b4"],
- ["ecaaae", "e1848de185a8e186b5"],
- ["ecaaae", "ecaaa0e186b5"],
- ["ecaaaf", "e1848de185a8e186b6"],
- ["ecaaaf", "ecaaa0e186b6"],
- ["ecaab0", "e1848de185a8e186b7"],
- ["ecaab0", "ecaaa0e186b7"],
- ["ecaab1", "e1848de185a8e186b8"],
- ["ecaab1", "ecaaa0e186b8"],
- ["ecaab2", "e1848de185a8e186b9"],
- ["ecaab2", "ecaaa0e186b9"],
- ["ecaab3", "e1848de185a8e186ba"],
- ["ecaab3", "ecaaa0e186ba"],
- ["ecaab4", "e1848de185a8e186bb"],
- ["ecaab4", "ecaaa0e186bb"],
- ["ecaab5", "e1848de185a8e186bc"],
- ["ecaab5", "ecaaa0e186bc"],
- ["ecaab6", "e1848de185a8e186bd"],
- ["ecaab6", "ecaaa0e186bd"],
- ["ecaab7", "e1848de185a8e186be"],
- ["ecaab7", "ecaaa0e186be"],
- ["ecaab8", "e1848de185a8e186bf"],
- ["ecaab8", "ecaaa0e186bf"],
- ["ecaab9", "e1848de185a8e18780"],
- ["ecaab9", "ecaaa0e18780"],
- ["ecaaba", "e1848de185a8e18781"],
- ["ecaaba", "ecaaa0e18781"],
- ["ecaabb", "e1848de185a8e18782"],
- ["ecaabb", "ecaaa0e18782"],
- ["ecaabc", "e1848de185a9"],
- ["ecaabd", "e1848de185a9e186a8"],
- ["ecaabd", "ecaabce186a8"],
- ["ecaabe", "e1848de185a9e186a9"],
- ["ecaabe", "ecaabce186a9"],
- ["ecaabf", "e1848de185a9e186aa"],
- ["ecaabf", "ecaabce186aa"],
- ["ecab80", "e1848de185a9e186ab"],
- ["ecab80", "ecaabce186ab"],
- ["ecab81", "e1848de185a9e186ac"],
- ["ecab81", "ecaabce186ac"],
- ["ecab82", "e1848de185a9e186ad"],
- ["ecab82", "ecaabce186ad"],
- ["ecab83", "e1848de185a9e186ae"],
- ["ecab83", "ecaabce186ae"],
- ["ecab84", "e1848de185a9e186af"],
- ["ecab84", "ecaabce186af"],
- ["ecab85", "e1848de185a9e186b0"],
- ["ecab85", "ecaabce186b0"],
- ["ecab86", "e1848de185a9e186b1"],
- ["ecab86", "ecaabce186b1"],
- ["ecab87", "e1848de185a9e186b2"],
- ["ecab87", "ecaabce186b2"],
- ["ecab88", "e1848de185a9e186b3"],
- ["ecab88", "ecaabce186b3"],
- ["ecab89", "e1848de185a9e186b4"],
- ["ecab89", "ecaabce186b4"],
- ["ecab8a", "e1848de185a9e186b5"],
- ["ecab8a", "ecaabce186b5"],
- ["ecab8b", "e1848de185a9e186b6"],
- ["ecab8b", "ecaabce186b6"],
- ["ecab8c", "e1848de185a9e186b7"],
- ["ecab8c", "ecaabce186b7"],
- ["ecab8d", "e1848de185a9e186b8"],
- ["ecab8d", "ecaabce186b8"],
- ["ecab8e", "e1848de185a9e186b9"],
- ["ecab8e", "ecaabce186b9"],
- ["ecab8f", "e1848de185a9e186ba"],
- ["ecab8f", "ecaabce186ba"],
- ["ecab90", "e1848de185a9e186bb"],
- ["ecab90", "ecaabce186bb"],
- ["ecab91", "e1848de185a9e186bc"],
- ["ecab91", "ecaabce186bc"],
- ["ecab92", "e1848de185a9e186bd"],
- ["ecab92", "ecaabce186bd"],
- ["ecab93", "e1848de185a9e186be"],
- ["ecab93", "ecaabce186be"],
- ["ecab94", "e1848de185a9e186bf"],
- ["ecab94", "ecaabce186bf"],
- ["ecab95", "e1848de185a9e18780"],
- ["ecab95", "ecaabce18780"],
- ["ecab96", "e1848de185a9e18781"],
- ["ecab96", "ecaabce18781"],
- ["ecab97", "e1848de185a9e18782"],
- ["ecab97", "ecaabce18782"],
- ["ecab98", "e1848de185aa"],
- ["ecab99", "e1848de185aae186a8"],
- ["ecab99", "ecab98e186a8"],
- ["ecab9a", "e1848de185aae186a9"],
- ["ecab9a", "ecab98e186a9"],
- ["ecab9b", "e1848de185aae186aa"],
- ["ecab9b", "ecab98e186aa"],
- ["ecab9c", "e1848de185aae186ab"],
- ["ecab9c", "ecab98e186ab"],
- ["ecab9d", "e1848de185aae186ac"],
- ["ecab9d", "ecab98e186ac"],
- ["ecab9e", "e1848de185aae186ad"],
- ["ecab9e", "ecab98e186ad"],
- ["ecab9f", "e1848de185aae186ae"],
- ["ecab9f", "ecab98e186ae"],
- ["ecaba0", "e1848de185aae186af"],
- ["ecaba0", "ecab98e186af"],
- ["ecaba1", "e1848de185aae186b0"],
- ["ecaba1", "ecab98e186b0"],
- ["ecaba2", "e1848de185aae186b1"],
- ["ecaba2", "ecab98e186b1"],
- ["ecaba3", "e1848de185aae186b2"],
- ["ecaba3", "ecab98e186b2"],
- ["ecaba4", "e1848de185aae186b3"],
- ["ecaba4", "ecab98e186b3"],
- ["ecaba5", "e1848de185aae186b4"],
- ["ecaba5", "ecab98e186b4"],
- ["ecaba6", "e1848de185aae186b5"],
- ["ecaba6", "ecab98e186b5"],
- ["ecaba7", "e1848de185aae186b6"],
- ["ecaba7", "ecab98e186b6"],
- ["ecaba8", "e1848de185aae186b7"],
- ["ecaba8", "ecab98e186b7"],
- ["ecaba9", "e1848de185aae186b8"],
- ["ecaba9", "ecab98e186b8"],
- ["ecabaa", "e1848de185aae186b9"],
- ["ecabaa", "ecab98e186b9"],
- ["ecabab", "e1848de185aae186ba"],
- ["ecabab", "ecab98e186ba"],
- ["ecabac", "e1848de185aae186bb"],
- ["ecabac", "ecab98e186bb"],
- ["ecabad", "e1848de185aae186bc"],
- ["ecabad", "ecab98e186bc"],
- ["ecabae", "e1848de185aae186bd"],
- ["ecabae", "ecab98e186bd"],
- ["ecabaf", "e1848de185aae186be"],
- ["ecabaf", "ecab98e186be"],
- ["ecabb0", "e1848de185aae186bf"],
- ["ecabb0", "ecab98e186bf"],
- ["ecabb1", "e1848de185aae18780"],
- ["ecabb1", "ecab98e18780"],
- ["ecabb2", "e1848de185aae18781"],
- ["ecabb2", "ecab98e18781"],
- ["ecabb3", "e1848de185aae18782"],
- ["ecabb3", "ecab98e18782"],
- ["ecabb4", "e1848de185ab"],
- ["ecabb5", "e1848de185abe186a8"],
- ["ecabb5", "ecabb4e186a8"],
- ["ecabb6", "e1848de185abe186a9"],
- ["ecabb6", "ecabb4e186a9"],
- ["ecabb7", "e1848de185abe186aa"],
- ["ecabb7", "ecabb4e186aa"],
- ["ecabb8", "e1848de185abe186ab"],
- ["ecabb8", "ecabb4e186ab"],
- ["ecabb9", "e1848de185abe186ac"],
- ["ecabb9", "ecabb4e186ac"],
- ["ecabba", "e1848de185abe186ad"],
- ["ecabba", "ecabb4e186ad"],
- ["ecabbb", "e1848de185abe186ae"],
- ["ecabbb", "ecabb4e186ae"],
- ["ecabbc", "e1848de185abe186af"],
- ["ecabbc", "ecabb4e186af"],
- ["ecabbd", "e1848de185abe186b0"],
- ["ecabbd", "ecabb4e186b0"],
- ["ecabbe", "e1848de185abe186b1"],
- ["ecabbe", "ecabb4e186b1"],
- ["ecabbf", "e1848de185abe186b2"],
- ["ecabbf", "ecabb4e186b2"],
- ["ecac80", "e1848de185abe186b3"],
- ["ecac80", "ecabb4e186b3"],
- ["ecac81", "e1848de185abe186b4"],
- ["ecac81", "ecabb4e186b4"],
- ["ecac82", "e1848de185abe186b5"],
- ["ecac82", "ecabb4e186b5"],
- ["ecac83", "e1848de185abe186b6"],
- ["ecac83", "ecabb4e186b6"],
- ["ecac84", "e1848de185abe186b7"],
- ["ecac84", "ecabb4e186b7"],
- ["ecac85", "e1848de185abe186b8"],
- ["ecac85", "ecabb4e186b8"],
- ["ecac86", "e1848de185abe186b9"],
- ["ecac86", "ecabb4e186b9"],
- ["ecac87", "e1848de185abe186ba"],
- ["ecac87", "ecabb4e186ba"],
- ["ecac88", "e1848de185abe186bb"],
- ["ecac88", "ecabb4e186bb"],
- ["ecac89", "e1848de185abe186bc"],
- ["ecac89", "ecabb4e186bc"],
- ["ecac8a", "e1848de185abe186bd"],
- ["ecac8a", "ecabb4e186bd"],
- ["ecac8b", "e1848de185abe186be"],
- ["ecac8b", "ecabb4e186be"],
- ["ecac8c", "e1848de185abe186bf"],
- ["ecac8c", "ecabb4e186bf"],
- ["ecac8d", "e1848de185abe18780"],
- ["ecac8d", "ecabb4e18780"],
- ["ecac8e", "e1848de185abe18781"],
- ["ecac8e", "ecabb4e18781"],
- ["ecac8f", "e1848de185abe18782"],
- ["ecac8f", "ecabb4e18782"],
- ["ecac90", "e1848de185ac"],
- ["ecac91", "e1848de185ace186a8"],
- ["ecac91", "ecac90e186a8"],
- ["ecac92", "e1848de185ace186a9"],
- ["ecac92", "ecac90e186a9"],
- ["ecac93", "e1848de185ace186aa"],
- ["ecac93", "ecac90e186aa"],
- ["ecac94", "e1848de185ace186ab"],
- ["ecac94", "ecac90e186ab"],
- ["ecac95", "e1848de185ace186ac"],
- ["ecac95", "ecac90e186ac"],
- ["ecac96", "e1848de185ace186ad"],
- ["ecac96", "ecac90e186ad"],
- ["ecac97", "e1848de185ace186ae"],
- ["ecac97", "ecac90e186ae"],
- ["ecac98", "e1848de185ace186af"],
- ["ecac98", "ecac90e186af"],
- ["ecac99", "e1848de185ace186b0"],
- ["ecac99", "ecac90e186b0"],
- ["ecac9a", "e1848de185ace186b1"],
- ["ecac9a", "ecac90e186b1"],
- ["ecac9b", "e1848de185ace186b2"],
- ["ecac9b", "ecac90e186b2"],
- ["ecac9c", "e1848de185ace186b3"],
- ["ecac9c", "ecac90e186b3"],
- ["ecac9d", "e1848de185ace186b4"],
- ["ecac9d", "ecac90e186b4"],
- ["ecac9e", "e1848de185ace186b5"],
- ["ecac9e", "ecac90e186b5"],
- ["ecac9f", "e1848de185ace186b6"],
- ["ecac9f", "ecac90e186b6"],
- ["ecaca0", "e1848de185ace186b7"],
- ["ecaca0", "ecac90e186b7"],
- ["ecaca1", "e1848de185ace186b8"],
- ["ecaca1", "ecac90e186b8"],
- ["ecaca2", "e1848de185ace186b9"],
- ["ecaca2", "ecac90e186b9"],
- ["ecaca3", "e1848de185ace186ba"],
- ["ecaca3", "ecac90e186ba"],
- ["ecaca4", "e1848de185ace186bb"],
- ["ecaca4", "ecac90e186bb"],
- ["ecaca5", "e1848de185ace186bc"],
- ["ecaca5", "ecac90e186bc"],
- ["ecaca6", "e1848de185ace186bd"],
- ["ecaca6", "ecac90e186bd"],
- ["ecaca7", "e1848de185ace186be"],
- ["ecaca7", "ecac90e186be"],
- ["ecaca8", "e1848de185ace186bf"],
- ["ecaca8", "ecac90e186bf"],
- ["ecaca9", "e1848de185ace18780"],
- ["ecaca9", "ecac90e18780"],
- ["ecacaa", "e1848de185ace18781"],
- ["ecacaa", "ecac90e18781"],
- ["ecacab", "e1848de185ace18782"],
- ["ecacab", "ecac90e18782"],
- ["ecacac", "e1848de185ad"],
- ["ecacad", "e1848de185ade186a8"],
- ["ecacad", "ecacace186a8"],
- ["ecacae", "e1848de185ade186a9"],
- ["ecacae", "ecacace186a9"],
- ["ecacaf", "e1848de185ade186aa"],
- ["ecacaf", "ecacace186aa"],
- ["ecacb0", "e1848de185ade186ab"],
- ["ecacb0", "ecacace186ab"],
- ["ecacb1", "e1848de185ade186ac"],
- ["ecacb1", "ecacace186ac"],
- ["ecacb2", "e1848de185ade186ad"],
- ["ecacb2", "ecacace186ad"],
- ["ecacb3", "e1848de185ade186ae"],
- ["ecacb3", "ecacace186ae"],
- ["ecacb4", "e1848de185ade186af"],
- ["ecacb4", "ecacace186af"],
- ["ecacb5", "e1848de185ade186b0"],
- ["ecacb5", "ecacace186b0"],
- ["ecacb6", "e1848de185ade186b1"],
- ["ecacb6", "ecacace186b1"],
- ["ecacb7", "e1848de185ade186b2"],
- ["ecacb7", "ecacace186b2"],
- ["ecacb8", "e1848de185ade186b3"],
- ["ecacb8", "ecacace186b3"],
- ["ecacb9", "e1848de185ade186b4"],
- ["ecacb9", "ecacace186b4"],
- ["ecacba", "e1848de185ade186b5"],
- ["ecacba", "ecacace186b5"],
- ["ecacbb", "e1848de185ade186b6"],
- ["ecacbb", "ecacace186b6"],
- ["ecacbc", "e1848de185ade186b7"],
- ["ecacbc", "ecacace186b7"],
- ["ecacbd", "e1848de185ade186b8"],
- ["ecacbd", "ecacace186b8"],
- ["ecacbe", "e1848de185ade186b9"],
- ["ecacbe", "ecacace186b9"],
- ["ecacbf", "e1848de185ade186ba"],
- ["ecacbf", "ecacace186ba"],
- ["ecad80", "e1848de185ade186bb"],
- ["ecad80", "ecacace186bb"],
- ["ecad81", "e1848de185ade186bc"],
- ["ecad81", "ecacace186bc"],
- ["ecad82", "e1848de185ade186bd"],
- ["ecad82", "ecacace186bd"],
- ["ecad83", "e1848de185ade186be"],
- ["ecad83", "ecacace186be"],
- ["ecad84", "e1848de185ade186bf"],
- ["ecad84", "ecacace186bf"],
- ["ecad85", "e1848de185ade18780"],
- ["ecad85", "ecacace18780"],
- ["ecad86", "e1848de185ade18781"],
- ["ecad86", "ecacace18781"],
- ["ecad87", "e1848de185ade18782"],
- ["ecad87", "ecacace18782"],
- ["ecad88", "e1848de185ae"],
- ["ecad89", "e1848de185aee186a8"],
- ["ecad89", "ecad88e186a8"],
- ["ecad8a", "e1848de185aee186a9"],
- ["ecad8a", "ecad88e186a9"],
- ["ecad8b", "e1848de185aee186aa"],
- ["ecad8b", "ecad88e186aa"],
- ["ecad8c", "e1848de185aee186ab"],
- ["ecad8c", "ecad88e186ab"],
- ["ecad8d", "e1848de185aee186ac"],
- ["ecad8d", "ecad88e186ac"],
- ["ecad8e", "e1848de185aee186ad"],
- ["ecad8e", "ecad88e186ad"],
- ["ecad8f", "e1848de185aee186ae"],
- ["ecad8f", "ecad88e186ae"],
- ["ecad90", "e1848de185aee186af"],
- ["ecad90", "ecad88e186af"],
- ["ecad91", "e1848de185aee186b0"],
- ["ecad91", "ecad88e186b0"],
- ["ecad92", "e1848de185aee186b1"],
- ["ecad92", "ecad88e186b1"],
- ["ecad93", "e1848de185aee186b2"],
- ["ecad93", "ecad88e186b2"],
- ["ecad94", "e1848de185aee186b3"],
- ["ecad94", "ecad88e186b3"],
- ["ecad95", "e1848de185aee186b4"],
- ["ecad95", "ecad88e186b4"],
- ["ecad96", "e1848de185aee186b5"],
- ["ecad96", "ecad88e186b5"],
- ["ecad97", "e1848de185aee186b6"],
- ["ecad97", "ecad88e186b6"],
- ["ecad98", "e1848de185aee186b7"],
- ["ecad98", "ecad88e186b7"],
- ["ecad99", "e1848de185aee186b8"],
- ["ecad99", "ecad88e186b8"],
- ["ecad9a", "e1848de185aee186b9"],
- ["ecad9a", "ecad88e186b9"],
- ["ecad9b", "e1848de185aee186ba"],
- ["ecad9b", "ecad88e186ba"],
- ["ecad9c", "e1848de185aee186bb"],
- ["ecad9c", "ecad88e186bb"],
- ["ecad9d", "e1848de185aee186bc"],
- ["ecad9d", "ecad88e186bc"],
- ["ecad9e", "e1848de185aee186bd"],
- ["ecad9e", "ecad88e186bd"],
- ["ecad9f", "e1848de185aee186be"],
- ["ecad9f", "ecad88e186be"],
- ["ecada0", "e1848de185aee186bf"],
- ["ecada0", "ecad88e186bf"],
- ["ecada1", "e1848de185aee18780"],
- ["ecada1", "ecad88e18780"],
- ["ecada2", "e1848de185aee18781"],
- ["ecada2", "ecad88e18781"],
- ["ecada3", "e1848de185aee18782"],
- ["ecada3", "ecad88e18782"],
- ["ecada4", "e1848de185af"],
- ["ecada5", "e1848de185afe186a8"],
- ["ecada5", "ecada4e186a8"],
- ["ecada6", "e1848de185afe186a9"],
- ["ecada6", "ecada4e186a9"],
- ["ecada7", "e1848de185afe186aa"],
- ["ecada7", "ecada4e186aa"],
- ["ecada8", "e1848de185afe186ab"],
- ["ecada8", "ecada4e186ab"],
- ["ecada9", "e1848de185afe186ac"],
- ["ecada9", "ecada4e186ac"],
- ["ecadaa", "e1848de185afe186ad"],
- ["ecadaa", "ecada4e186ad"],
- ["ecadab", "e1848de185afe186ae"],
- ["ecadab", "ecada4e186ae"],
- ["ecadac", "e1848de185afe186af"],
- ["ecadac", "ecada4e186af"],
- ["ecadad", "e1848de185afe186b0"],
- ["ecadad", "ecada4e186b0"],
- ["ecadae", "e1848de185afe186b1"],
- ["ecadae", "ecada4e186b1"],
- ["ecadaf", "e1848de185afe186b2"],
- ["ecadaf", "ecada4e186b2"],
- ["ecadb0", "e1848de185afe186b3"],
- ["ecadb0", "ecada4e186b3"],
- ["ecadb1", "e1848de185afe186b4"],
- ["ecadb1", "ecada4e186b4"],
- ["ecadb2", "e1848de185afe186b5"],
- ["ecadb2", "ecada4e186b5"],
- ["ecadb3", "e1848de185afe186b6"],
- ["ecadb3", "ecada4e186b6"],
- ["ecadb4", "e1848de185afe186b7"],
- ["ecadb4", "ecada4e186b7"],
- ["ecadb5", "e1848de185afe186b8"],
- ["ecadb5", "ecada4e186b8"],
- ["ecadb6", "e1848de185afe186b9"],
- ["ecadb6", "ecada4e186b9"],
- ["ecadb7", "e1848de185afe186ba"],
- ["ecadb7", "ecada4e186ba"],
- ["ecadb8", "e1848de185afe186bb"],
- ["ecadb8", "ecada4e186bb"],
- ["ecadb9", "e1848de185afe186bc"],
- ["ecadb9", "ecada4e186bc"],
- ["ecadba", "e1848de185afe186bd"],
- ["ecadba", "ecada4e186bd"],
- ["ecadbb", "e1848de185afe186be"],
- ["ecadbb", "ecada4e186be"],
- ["ecadbc", "e1848de185afe186bf"],
- ["ecadbc", "ecada4e186bf"],
- ["ecadbd", "e1848de185afe18780"],
- ["ecadbd", "ecada4e18780"],
- ["ecadbe", "e1848de185afe18781"],
- ["ecadbe", "ecada4e18781"],
- ["ecadbf", "e1848de185afe18782"],
- ["ecadbf", "ecada4e18782"],
- ["ecae80", "e1848de185b0"],
- ["ecae81", "e1848de185b0e186a8"],
- ["ecae81", "ecae80e186a8"],
- ["ecae82", "e1848de185b0e186a9"],
- ["ecae82", "ecae80e186a9"],
- ["ecae83", "e1848de185b0e186aa"],
- ["ecae83", "ecae80e186aa"],
- ["ecae84", "e1848de185b0e186ab"],
- ["ecae84", "ecae80e186ab"],
- ["ecae85", "e1848de185b0e186ac"],
- ["ecae85", "ecae80e186ac"],
- ["ecae86", "e1848de185b0e186ad"],
- ["ecae86", "ecae80e186ad"],
- ["ecae87", "e1848de185b0e186ae"],
- ["ecae87", "ecae80e186ae"],
- ["ecae88", "e1848de185b0e186af"],
- ["ecae88", "ecae80e186af"],
- ["ecae89", "e1848de185b0e186b0"],
- ["ecae89", "ecae80e186b0"],
- ["ecae8a", "e1848de185b0e186b1"],
- ["ecae8a", "ecae80e186b1"],
- ["ecae8b", "e1848de185b0e186b2"],
- ["ecae8b", "ecae80e186b2"],
- ["ecae8c", "e1848de185b0e186b3"],
- ["ecae8c", "ecae80e186b3"],
- ["ecae8d", "e1848de185b0e186b4"],
- ["ecae8d", "ecae80e186b4"],
- ["ecae8e", "e1848de185b0e186b5"],
- ["ecae8e", "ecae80e186b5"],
- ["ecae8f", "e1848de185b0e186b6"],
- ["ecae8f", "ecae80e186b6"],
- ["ecae90", "e1848de185b0e186b7"],
- ["ecae90", "ecae80e186b7"],
- ["ecae91", "e1848de185b0e186b8"],
- ["ecae91", "ecae80e186b8"],
- ["ecae92", "e1848de185b0e186b9"],
- ["ecae92", "ecae80e186b9"],
- ["ecae93", "e1848de185b0e186ba"],
- ["ecae93", "ecae80e186ba"],
- ["ecae94", "e1848de185b0e186bb"],
- ["ecae94", "ecae80e186bb"],
- ["ecae95", "e1848de185b0e186bc"],
- ["ecae95", "ecae80e186bc"],
- ["ecae96", "e1848de185b0e186bd"],
- ["ecae96", "ecae80e186bd"],
- ["ecae97", "e1848de185b0e186be"],
- ["ecae97", "ecae80e186be"],
- ["ecae98", "e1848de185b0e186bf"],
- ["ecae98", "ecae80e186bf"],
- ["ecae99", "e1848de185b0e18780"],
- ["ecae99", "ecae80e18780"],
- ["ecae9a", "e1848de185b0e18781"],
- ["ecae9a", "ecae80e18781"],
- ["ecae9b", "e1848de185b0e18782"],
- ["ecae9b", "ecae80e18782"],
- ["ecae9c", "e1848de185b1"],
- ["ecae9d", "e1848de185b1e186a8"],
- ["ecae9d", "ecae9ce186a8"],
- ["ecae9e", "e1848de185b1e186a9"],
- ["ecae9e", "ecae9ce186a9"],
- ["ecae9f", "e1848de185b1e186aa"],
- ["ecae9f", "ecae9ce186aa"],
- ["ecaea0", "e1848de185b1e186ab"],
- ["ecaea0", "ecae9ce186ab"],
- ["ecaea1", "e1848de185b1e186ac"],
- ["ecaea1", "ecae9ce186ac"],
- ["ecaea2", "e1848de185b1e186ad"],
- ["ecaea2", "ecae9ce186ad"],
- ["ecaea3", "e1848de185b1e186ae"],
- ["ecaea3", "ecae9ce186ae"],
- ["ecaea4", "e1848de185b1e186af"],
- ["ecaea4", "ecae9ce186af"],
- ["ecaea5", "e1848de185b1e186b0"],
- ["ecaea5", "ecae9ce186b0"],
- ["ecaea6", "e1848de185b1e186b1"],
- ["ecaea6", "ecae9ce186b1"],
- ["ecaea7", "e1848de185b1e186b2"],
- ["ecaea7", "ecae9ce186b2"],
- ["ecaea8", "e1848de185b1e186b3"],
- ["ecaea8", "ecae9ce186b3"],
- ["ecaea9", "e1848de185b1e186b4"],
- ["ecaea9", "ecae9ce186b4"],
- ["ecaeaa", "e1848de185b1e186b5"],
- ["ecaeaa", "ecae9ce186b5"],
- ["ecaeab", "e1848de185b1e186b6"],
- ["ecaeab", "ecae9ce186b6"],
- ["ecaeac", "e1848de185b1e186b7"],
- ["ecaeac", "ecae9ce186b7"],
- ["ecaead", "e1848de185b1e186b8"],
- ["ecaead", "ecae9ce186b8"],
- ["ecaeae", "e1848de185b1e186b9"],
- ["ecaeae", "ecae9ce186b9"],
- ["ecaeaf", "e1848de185b1e186ba"],
- ["ecaeaf", "ecae9ce186ba"],
- ["ecaeb0", "e1848de185b1e186bb"],
- ["ecaeb0", "ecae9ce186bb"],
- ["ecaeb1", "e1848de185b1e186bc"],
- ["ecaeb1", "ecae9ce186bc"],
- ["ecaeb2", "e1848de185b1e186bd"],
- ["ecaeb2", "ecae9ce186bd"],
- ["ecaeb3", "e1848de185b1e186be"],
- ["ecaeb3", "ecae9ce186be"],
- ["ecaeb4", "e1848de185b1e186bf"],
- ["ecaeb4", "ecae9ce186bf"],
- ["ecaeb5", "e1848de185b1e18780"],
- ["ecaeb5", "ecae9ce18780"],
- ["ecaeb6", "e1848de185b1e18781"],
- ["ecaeb6", "ecae9ce18781"],
- ["ecaeb7", "e1848de185b1e18782"],
- ["ecaeb7", "ecae9ce18782"],
- ["ecaeb8", "e1848de185b2"],
- ["ecaeb9", "e1848de185b2e186a8"],
- ["ecaeb9", "ecaeb8e186a8"],
- ["ecaeba", "e1848de185b2e186a9"],
- ["ecaeba", "ecaeb8e186a9"],
- ["ecaebb", "e1848de185b2e186aa"],
- ["ecaebb", "ecaeb8e186aa"],
- ["ecaebc", "e1848de185b2e186ab"],
- ["ecaebc", "ecaeb8e186ab"],
- ["ecaebd", "e1848de185b2e186ac"],
- ["ecaebd", "ecaeb8e186ac"],
- ["ecaebe", "e1848de185b2e186ad"],
- ["ecaebe", "ecaeb8e186ad"],
- ["ecaebf", "e1848de185b2e186ae"],
- ["ecaebf", "ecaeb8e186ae"],
- ["ecaf80", "e1848de185b2e186af"],
- ["ecaf80", "ecaeb8e186af"],
- ["ecaf81", "e1848de185b2e186b0"],
- ["ecaf81", "ecaeb8e186b0"],
- ["ecaf82", "e1848de185b2e186b1"],
- ["ecaf82", "ecaeb8e186b1"],
- ["ecaf83", "e1848de185b2e186b2"],
- ["ecaf83", "ecaeb8e186b2"],
- ["ecaf84", "e1848de185b2e186b3"],
- ["ecaf84", "ecaeb8e186b3"],
- ["ecaf85", "e1848de185b2e186b4"],
- ["ecaf85", "ecaeb8e186b4"],
- ["ecaf86", "e1848de185b2e186b5"],
- ["ecaf86", "ecaeb8e186b5"],
- ["ecaf87", "e1848de185b2e186b6"],
- ["ecaf87", "ecaeb8e186b6"],
- ["ecaf88", "e1848de185b2e186b7"],
- ["ecaf88", "ecaeb8e186b7"],
- ["ecaf89", "e1848de185b2e186b8"],
- ["ecaf89", "ecaeb8e186b8"],
- ["ecaf8a", "e1848de185b2e186b9"],
- ["ecaf8a", "ecaeb8e186b9"],
- ["ecaf8b", "e1848de185b2e186ba"],
- ["ecaf8b", "ecaeb8e186ba"],
- ["ecaf8c", "e1848de185b2e186bb"],
- ["ecaf8c", "ecaeb8e186bb"],
- ["ecaf8d", "e1848de185b2e186bc"],
- ["ecaf8d", "ecaeb8e186bc"],
- ["ecaf8e", "e1848de185b2e186bd"],
- ["ecaf8e", "ecaeb8e186bd"],
- ["ecaf8f", "e1848de185b2e186be"],
- ["ecaf8f", "ecaeb8e186be"],
- ["ecaf90", "e1848de185b2e186bf"],
- ["ecaf90", "ecaeb8e186bf"],
- ["ecaf91", "e1848de185b2e18780"],
- ["ecaf91", "ecaeb8e18780"],
- ["ecaf92", "e1848de185b2e18781"],
- ["ecaf92", "ecaeb8e18781"],
- ["ecaf93", "e1848de185b2e18782"],
- ["ecaf93", "ecaeb8e18782"],
- ["ecaf94", "e1848de185b3"],
- ["ecaf95", "e1848de185b3e186a8"],
- ["ecaf95", "ecaf94e186a8"],
- ["ecaf96", "e1848de185b3e186a9"],
- ["ecaf96", "ecaf94e186a9"],
- ["ecaf97", "e1848de185b3e186aa"],
- ["ecaf97", "ecaf94e186aa"],
- ["ecaf98", "e1848de185b3e186ab"],
- ["ecaf98", "ecaf94e186ab"],
- ["ecaf99", "e1848de185b3e186ac"],
- ["ecaf99", "ecaf94e186ac"],
- ["ecaf9a", "e1848de185b3e186ad"],
- ["ecaf9a", "ecaf94e186ad"],
- ["ecaf9b", "e1848de185b3e186ae"],
- ["ecaf9b", "ecaf94e186ae"],
- ["ecaf9c", "e1848de185b3e186af"],
- ["ecaf9c", "ecaf94e186af"],
- ["ecaf9d", "e1848de185b3e186b0"],
- ["ecaf9d", "ecaf94e186b0"],
- ["ecaf9e", "e1848de185b3e186b1"],
- ["ecaf9e", "ecaf94e186b1"],
- ["ecaf9f", "e1848de185b3e186b2"],
- ["ecaf9f", "ecaf94e186b2"],
- ["ecafa0", "e1848de185b3e186b3"],
- ["ecafa0", "ecaf94e186b3"],
- ["ecafa1", "e1848de185b3e186b4"],
- ["ecafa1", "ecaf94e186b4"],
- ["ecafa2", "e1848de185b3e186b5"],
- ["ecafa2", "ecaf94e186b5"],
- ["ecafa3", "e1848de185b3e186b6"],
- ["ecafa3", "ecaf94e186b6"],
- ["ecafa4", "e1848de185b3e186b7"],
- ["ecafa4", "ecaf94e186b7"],
- ["ecafa5", "e1848de185b3e186b8"],
- ["ecafa5", "ecaf94e186b8"],
- ["ecafa6", "e1848de185b3e186b9"],
- ["ecafa6", "ecaf94e186b9"],
- ["ecafa7", "e1848de185b3e186ba"],
- ["ecafa7", "ecaf94e186ba"],
- ["ecafa8", "e1848de185b3e186bb"],
- ["ecafa8", "ecaf94e186bb"],
- ["ecafa9", "e1848de185b3e186bc"],
- ["ecafa9", "ecaf94e186bc"],
- ["ecafaa", "e1848de185b3e186bd"],
- ["ecafaa", "ecaf94e186bd"],
- ["ecafab", "e1848de185b3e186be"],
- ["ecafab", "ecaf94e186be"],
- ["ecafac", "e1848de185b3e186bf"],
- ["ecafac", "ecaf94e186bf"],
- ["ecafad", "e1848de185b3e18780"],
- ["ecafad", "ecaf94e18780"],
- ["ecafae", "e1848de185b3e18781"],
- ["ecafae", "ecaf94e18781"],
- ["ecafaf", "e1848de185b3e18782"],
- ["ecafaf", "ecaf94e18782"],
- ["ecafb0", "e1848de185b4"],
- ["ecafb1", "e1848de185b4e186a8"],
- ["ecafb1", "ecafb0e186a8"],
- ["ecafb2", "e1848de185b4e186a9"],
- ["ecafb2", "ecafb0e186a9"],
- ["ecafb3", "e1848de185b4e186aa"],
- ["ecafb3", "ecafb0e186aa"],
- ["ecafb4", "e1848de185b4e186ab"],
- ["ecafb4", "ecafb0e186ab"],
- ["ecafb5", "e1848de185b4e186ac"],
- ["ecafb5", "ecafb0e186ac"],
- ["ecafb6", "e1848de185b4e186ad"],
- ["ecafb6", "ecafb0e186ad"],
- ["ecafb7", "e1848de185b4e186ae"],
- ["ecafb7", "ecafb0e186ae"],
- ["ecafb8", "e1848de185b4e186af"],
- ["ecafb8", "ecafb0e186af"],
- ["ecafb9", "e1848de185b4e186b0"],
- ["ecafb9", "ecafb0e186b0"],
- ["ecafba", "e1848de185b4e186b1"],
- ["ecafba", "ecafb0e186b1"],
- ["ecafbb", "e1848de185b4e186b2"],
- ["ecafbb", "ecafb0e186b2"],
- ["ecafbc", "e1848de185b4e186b3"],
- ["ecafbc", "ecafb0e186b3"],
- ["ecafbd", "e1848de185b4e186b4"],
- ["ecafbd", "ecafb0e186b4"],
- ["ecafbe", "e1848de185b4e186b5"],
- ["ecafbe", "ecafb0e186b5"],
- ["ecafbf", "e1848de185b4e186b6"],
- ["ecafbf", "ecafb0e186b6"],
- ["ecb080", "e1848de185b4e186b7"],
- ["ecb080", "ecafb0e186b7"],
- ["ecb081", "e1848de185b4e186b8"],
- ["ecb081", "ecafb0e186b8"],
- ["ecb082", "e1848de185b4e186b9"],
- ["ecb082", "ecafb0e186b9"],
- ["ecb083", "e1848de185b4e186ba"],
- ["ecb083", "ecafb0e186ba"],
- ["ecb084", "e1848de185b4e186bb"],
- ["ecb084", "ecafb0e186bb"],
- ["ecb085", "e1848de185b4e186bc"],
- ["ecb085", "ecafb0e186bc"],
- ["ecb086", "e1848de185b4e186bd"],
- ["ecb086", "ecafb0e186bd"],
- ["ecb087", "e1848de185b4e186be"],
- ["ecb087", "ecafb0e186be"],
- ["ecb088", "e1848de185b4e186bf"],
- ["ecb088", "ecafb0e186bf"],
- ["ecb089", "e1848de185b4e18780"],
- ["ecb089", "ecafb0e18780"],
- ["ecb08a", "e1848de185b4e18781"],
- ["ecb08a", "ecafb0e18781"],
- ["ecb08b", "e1848de185b4e18782"],
- ["ecb08b", "ecafb0e18782"],
- ["ecb08c", "e1848de185b5"],
- ["ecb08d", "e1848de185b5e186a8"],
- ["ecb08d", "ecb08ce186a8"],
- ["ecb08e", "e1848de185b5e186a9"],
- ["ecb08e", "ecb08ce186a9"],
- ["ecb08f", "e1848de185b5e186aa"],
- ["ecb08f", "ecb08ce186aa"],
- ["ecb090", "e1848de185b5e186ab"],
- ["ecb090", "ecb08ce186ab"],
- ["ecb091", "e1848de185b5e186ac"],
- ["ecb091", "ecb08ce186ac"],
- ["ecb092", "e1848de185b5e186ad"],
- ["ecb092", "ecb08ce186ad"],
- ["ecb093", "e1848de185b5e186ae"],
- ["ecb093", "ecb08ce186ae"],
- ["ecb094", "e1848de185b5e186af"],
- ["ecb094", "ecb08ce186af"],
- ["ecb095", "e1848de185b5e186b0"],
- ["ecb095", "ecb08ce186b0"],
- ["ecb096", "e1848de185b5e186b1"],
- ["ecb096", "ecb08ce186b1"],
- ["ecb097", "e1848de185b5e186b2"],
- ["ecb097", "ecb08ce186b2"],
- ["ecb098", "e1848de185b5e186b3"],
- ["ecb098", "ecb08ce186b3"],
- ["ecb099", "e1848de185b5e186b4"],
- ["ecb099", "ecb08ce186b4"],
- ["ecb09a", "e1848de185b5e186b5"],
- ["ecb09a", "ecb08ce186b5"],
- ["ecb09b", "e1848de185b5e186b6"],
- ["ecb09b", "ecb08ce186b6"],
- ["ecb09c", "e1848de185b5e186b7"],
- ["ecb09c", "ecb08ce186b7"],
- ["ecb09d", "e1848de185b5e186b8"],
- ["ecb09d", "ecb08ce186b8"],
- ["ecb09e", "e1848de185b5e186b9"],
- ["ecb09e", "ecb08ce186b9"],
- ["ecb09f", "e1848de185b5e186ba"],
- ["ecb09f", "ecb08ce186ba"],
- ["ecb0a0", "e1848de185b5e186bb"],
- ["ecb0a0", "ecb08ce186bb"],
- ["ecb0a1", "e1848de185b5e186bc"],
- ["ecb0a1", "ecb08ce186bc"],
- ["ecb0a2", "e1848de185b5e186bd"],
- ["ecb0a2", "ecb08ce186bd"],
- ["ecb0a3", "e1848de185b5e186be"],
- ["ecb0a3", "ecb08ce186be"],
- ["ecb0a4", "e1848de185b5e186bf"],
- ["ecb0a4", "ecb08ce186bf"],
- ["ecb0a5", "e1848de185b5e18780"],
- ["ecb0a5", "ecb08ce18780"],
- ["ecb0a6", "e1848de185b5e18781"],
- ["ecb0a6", "ecb08ce18781"],
- ["ecb0a7", "e1848de185b5e18782"],
- ["ecb0a7", "ecb08ce18782"],
- ["ecb0a8", "e1848ee185a1"],
- ["ecb0a9", "e1848ee185a1e186a8"],
- ["ecb0a9", "ecb0a8e186a8"],
- ["ecb0aa", "e1848ee185a1e186a9"],
- ["ecb0aa", "ecb0a8e186a9"],
- ["ecb0ab", "e1848ee185a1e186aa"],
- ["ecb0ab", "ecb0a8e186aa"],
- ["ecb0ac", "e1848ee185a1e186ab"],
- ["ecb0ac", "ecb0a8e186ab"],
- ["ecb0ad", "e1848ee185a1e186ac"],
- ["ecb0ad", "ecb0a8e186ac"],
- ["ecb0ae", "e1848ee185a1e186ad"],
- ["ecb0ae", "ecb0a8e186ad"],
- ["ecb0af", "e1848ee185a1e186ae"],
- ["ecb0af", "ecb0a8e186ae"],
- ["ecb0b0", "e1848ee185a1e186af"],
- ["ecb0b0", "ecb0a8e186af"],
- ["ecb0b1", "e1848ee185a1e186b0"],
- ["ecb0b1", "ecb0a8e186b0"],
- ["ecb0b2", "e1848ee185a1e186b1"],
- ["ecb0b2", "ecb0a8e186b1"],
- ["ecb0b3", "e1848ee185a1e186b2"],
- ["ecb0b3", "ecb0a8e186b2"],
- ["ecb0b4", "e1848ee185a1e186b3"],
- ["ecb0b4", "ecb0a8e186b3"],
- ["ecb0b5", "e1848ee185a1e186b4"],
- ["ecb0b5", "ecb0a8e186b4"],
- ["ecb0b6", "e1848ee185a1e186b5"],
- ["ecb0b6", "ecb0a8e186b5"],
- ["ecb0b7", "e1848ee185a1e186b6"],
- ["ecb0b7", "ecb0a8e186b6"],
- ["ecb0b8", "e1848ee185a1e186b7"],
- ["ecb0b8", "ecb0a8e186b7"],
- ["ecb0b9", "e1848ee185a1e186b8"],
- ["ecb0b9", "ecb0a8e186b8"],
- ["ecb0ba", "e1848ee185a1e186b9"],
- ["ecb0ba", "ecb0a8e186b9"],
- ["ecb0bb", "e1848ee185a1e186ba"],
- ["ecb0bb", "ecb0a8e186ba"],
- ["ecb0bc", "e1848ee185a1e186bb"],
- ["ecb0bc", "ecb0a8e186bb"],
- ["ecb0bd", "e1848ee185a1e186bc"],
- ["ecb0bd", "ecb0a8e186bc"],
- ["ecb0be", "e1848ee185a1e186bd"],
- ["ecb0be", "ecb0a8e186bd"],
- ["ecb0bf", "e1848ee185a1e186be"],
- ["ecb0bf", "ecb0a8e186be"],
- ["ecb180", "e1848ee185a1e186bf"],
- ["ecb180", "ecb0a8e186bf"],
- ["ecb181", "e1848ee185a1e18780"],
- ["ecb181", "ecb0a8e18780"],
- ["ecb182", "e1848ee185a1e18781"],
- ["ecb182", "ecb0a8e18781"],
- ["ecb183", "e1848ee185a1e18782"],
- ["ecb183", "ecb0a8e18782"],
- ["ecb184", "e1848ee185a2"],
- ["ecb185", "e1848ee185a2e186a8"],
- ["ecb185", "ecb184e186a8"],
- ["ecb186", "e1848ee185a2e186a9"],
- ["ecb186", "ecb184e186a9"],
- ["ecb187", "e1848ee185a2e186aa"],
- ["ecb187", "ecb184e186aa"],
- ["ecb188", "e1848ee185a2e186ab"],
- ["ecb188", "ecb184e186ab"],
- ["ecb189", "e1848ee185a2e186ac"],
- ["ecb189", "ecb184e186ac"],
- ["ecb18a", "e1848ee185a2e186ad"],
- ["ecb18a", "ecb184e186ad"],
- ["ecb18b", "e1848ee185a2e186ae"],
- ["ecb18b", "ecb184e186ae"],
- ["ecb18c", "e1848ee185a2e186af"],
- ["ecb18c", "ecb184e186af"],
- ["ecb18d", "e1848ee185a2e186b0"],
- ["ecb18d", "ecb184e186b0"],
- ["ecb18e", "e1848ee185a2e186b1"],
- ["ecb18e", "ecb184e186b1"],
- ["ecb18f", "e1848ee185a2e186b2"],
- ["ecb18f", "ecb184e186b2"],
- ["ecb190", "e1848ee185a2e186b3"],
- ["ecb190", "ecb184e186b3"],
- ["ecb191", "e1848ee185a2e186b4"],
- ["ecb191", "ecb184e186b4"],
- ["ecb192", "e1848ee185a2e186b5"],
- ["ecb192", "ecb184e186b5"],
- ["ecb193", "e1848ee185a2e186b6"],
- ["ecb193", "ecb184e186b6"],
- ["ecb194", "e1848ee185a2e186b7"],
- ["ecb194", "ecb184e186b7"],
- ["ecb195", "e1848ee185a2e186b8"],
- ["ecb195", "ecb184e186b8"],
- ["ecb196", "e1848ee185a2e186b9"],
- ["ecb196", "ecb184e186b9"],
- ["ecb197", "e1848ee185a2e186ba"],
- ["ecb197", "ecb184e186ba"],
- ["ecb198", "e1848ee185a2e186bb"],
- ["ecb198", "ecb184e186bb"],
- ["ecb199", "e1848ee185a2e186bc"],
- ["ecb199", "ecb184e186bc"],
- ["ecb19a", "e1848ee185a2e186bd"],
- ["ecb19a", "ecb184e186bd"],
- ["ecb19b", "e1848ee185a2e186be"],
- ["ecb19b", "ecb184e186be"],
- ["ecb19c", "e1848ee185a2e186bf"],
- ["ecb19c", "ecb184e186bf"],
- ["ecb19d", "e1848ee185a2e18780"],
- ["ecb19d", "ecb184e18780"],
- ["ecb19e", "e1848ee185a2e18781"],
- ["ecb19e", "ecb184e18781"],
- ["ecb19f", "e1848ee185a2e18782"],
- ["ecb19f", "ecb184e18782"],
- ["ecb1a0", "e1848ee185a3"],
- ["ecb1a1", "e1848ee185a3e186a8"],
- ["ecb1a1", "ecb1a0e186a8"],
- ["ecb1a2", "e1848ee185a3e186a9"],
- ["ecb1a2", "ecb1a0e186a9"],
- ["ecb1a3", "e1848ee185a3e186aa"],
- ["ecb1a3", "ecb1a0e186aa"],
- ["ecb1a4", "e1848ee185a3e186ab"],
- ["ecb1a4", "ecb1a0e186ab"],
- ["ecb1a5", "e1848ee185a3e186ac"],
- ["ecb1a5", "ecb1a0e186ac"],
- ["ecb1a6", "e1848ee185a3e186ad"],
- ["ecb1a6", "ecb1a0e186ad"],
- ["ecb1a7", "e1848ee185a3e186ae"],
- ["ecb1a7", "ecb1a0e186ae"],
- ["ecb1a8", "e1848ee185a3e186af"],
- ["ecb1a8", "ecb1a0e186af"],
- ["ecb1a9", "e1848ee185a3e186b0"],
- ["ecb1a9", "ecb1a0e186b0"],
- ["ecb1aa", "e1848ee185a3e186b1"],
- ["ecb1aa", "ecb1a0e186b1"],
- ["ecb1ab", "e1848ee185a3e186b2"],
- ["ecb1ab", "ecb1a0e186b2"],
- ["ecb1ac", "e1848ee185a3e186b3"],
- ["ecb1ac", "ecb1a0e186b3"],
- ["ecb1ad", "e1848ee185a3e186b4"],
- ["ecb1ad", "ecb1a0e186b4"],
- ["ecb1ae", "e1848ee185a3e186b5"],
- ["ecb1ae", "ecb1a0e186b5"],
- ["ecb1af", "e1848ee185a3e186b6"],
- ["ecb1af", "ecb1a0e186b6"],
- ["ecb1b0", "e1848ee185a3e186b7"],
- ["ecb1b0", "ecb1a0e186b7"],
- ["ecb1b1", "e1848ee185a3e186b8"],
- ["ecb1b1", "ecb1a0e186b8"],
- ["ecb1b2", "e1848ee185a3e186b9"],
- ["ecb1b2", "ecb1a0e186b9"],
- ["ecb1b3", "e1848ee185a3e186ba"],
- ["ecb1b3", "ecb1a0e186ba"],
- ["ecb1b4", "e1848ee185a3e186bb"],
- ["ecb1b4", "ecb1a0e186bb"],
- ["ecb1b5", "e1848ee185a3e186bc"],
- ["ecb1b5", "ecb1a0e186bc"],
- ["ecb1b6", "e1848ee185a3e186bd"],
- ["ecb1b6", "ecb1a0e186bd"],
- ["ecb1b7", "e1848ee185a3e186be"],
- ["ecb1b7", "ecb1a0e186be"],
- ["ecb1b8", "e1848ee185a3e186bf"],
- ["ecb1b8", "ecb1a0e186bf"],
- ["ecb1b9", "e1848ee185a3e18780"],
- ["ecb1b9", "ecb1a0e18780"],
- ["ecb1ba", "e1848ee185a3e18781"],
- ["ecb1ba", "ecb1a0e18781"],
- ["ecb1bb", "e1848ee185a3e18782"],
- ["ecb1bb", "ecb1a0e18782"],
- ["ecb1bc", "e1848ee185a4"],
- ["ecb1bd", "e1848ee185a4e186a8"],
- ["ecb1bd", "ecb1bce186a8"],
- ["ecb1be", "e1848ee185a4e186a9"],
- ["ecb1be", "ecb1bce186a9"],
- ["ecb1bf", "e1848ee185a4e186aa"],
- ["ecb1bf", "ecb1bce186aa"],
- ["ecb280", "e1848ee185a4e186ab"],
- ["ecb280", "ecb1bce186ab"],
- ["ecb281", "e1848ee185a4e186ac"],
- ["ecb281", "ecb1bce186ac"],
- ["ecb282", "e1848ee185a4e186ad"],
- ["ecb282", "ecb1bce186ad"],
- ["ecb283", "e1848ee185a4e186ae"],
- ["ecb283", "ecb1bce186ae"],
- ["ecb284", "e1848ee185a4e186af"],
- ["ecb284", "ecb1bce186af"],
- ["ecb285", "e1848ee185a4e186b0"],
- ["ecb285", "ecb1bce186b0"],
- ["ecb286", "e1848ee185a4e186b1"],
- ["ecb286", "ecb1bce186b1"],
- ["ecb287", "e1848ee185a4e186b2"],
- ["ecb287", "ecb1bce186b2"],
- ["ecb288", "e1848ee185a4e186b3"],
- ["ecb288", "ecb1bce186b3"],
- ["ecb289", "e1848ee185a4e186b4"],
- ["ecb289", "ecb1bce186b4"],
- ["ecb28a", "e1848ee185a4e186b5"],
- ["ecb28a", "ecb1bce186b5"],
- ["ecb28b", "e1848ee185a4e186b6"],
- ["ecb28b", "ecb1bce186b6"],
- ["ecb28c", "e1848ee185a4e186b7"],
- ["ecb28c", "ecb1bce186b7"],
- ["ecb28d", "e1848ee185a4e186b8"],
- ["ecb28d", "ecb1bce186b8"],
- ["ecb28e", "e1848ee185a4e186b9"],
- ["ecb28e", "ecb1bce186b9"],
- ["ecb28f", "e1848ee185a4e186ba"],
- ["ecb28f", "ecb1bce186ba"],
- ["ecb290", "e1848ee185a4e186bb"],
- ["ecb290", "ecb1bce186bb"],
- ["ecb291", "e1848ee185a4e186bc"],
- ["ecb291", "ecb1bce186bc"],
- ["ecb292", "e1848ee185a4e186bd"],
- ["ecb292", "ecb1bce186bd"],
- ["ecb293", "e1848ee185a4e186be"],
- ["ecb293", "ecb1bce186be"],
- ["ecb294", "e1848ee185a4e186bf"],
- ["ecb294", "ecb1bce186bf"],
- ["ecb295", "e1848ee185a4e18780"],
- ["ecb295", "ecb1bce18780"],
- ["ecb296", "e1848ee185a4e18781"],
- ["ecb296", "ecb1bce18781"],
- ["ecb297", "e1848ee185a4e18782"],
- ["ecb297", "ecb1bce18782"],
- ["ecb298", "e1848ee185a5"],
- ["ecb299", "e1848ee185a5e186a8"],
- ["ecb299", "ecb298e186a8"],
- ["ecb29a", "e1848ee185a5e186a9"],
- ["ecb29a", "ecb298e186a9"],
- ["ecb29b", "e1848ee185a5e186aa"],
- ["ecb29b", "ecb298e186aa"],
- ["ecb29c", "e1848ee185a5e186ab"],
- ["ecb29c", "ecb298e186ab"],
- ["ecb29d", "e1848ee185a5e186ac"],
- ["ecb29d", "ecb298e186ac"],
- ["ecb29e", "e1848ee185a5e186ad"],
- ["ecb29e", "ecb298e186ad"],
- ["ecb29f", "e1848ee185a5e186ae"],
- ["ecb29f", "ecb298e186ae"],
- ["ecb2a0", "e1848ee185a5e186af"],
- ["ecb2a0", "ecb298e186af"],
- ["ecb2a1", "e1848ee185a5e186b0"],
- ["ecb2a1", "ecb298e186b0"],
- ["ecb2a2", "e1848ee185a5e186b1"],
- ["ecb2a2", "ecb298e186b1"],
- ["ecb2a3", "e1848ee185a5e186b2"],
- ["ecb2a3", "ecb298e186b2"],
- ["ecb2a4", "e1848ee185a5e186b3"],
- ["ecb2a4", "ecb298e186b3"],
- ["ecb2a5", "e1848ee185a5e186b4"],
- ["ecb2a5", "ecb298e186b4"],
- ["ecb2a6", "e1848ee185a5e186b5"],
- ["ecb2a6", "ecb298e186b5"],
- ["ecb2a7", "e1848ee185a5e186b6"],
- ["ecb2a7", "ecb298e186b6"],
- ["ecb2a8", "e1848ee185a5e186b7"],
- ["ecb2a8", "ecb298e186b7"],
- ["ecb2a9", "e1848ee185a5e186b8"],
- ["ecb2a9", "ecb298e186b8"],
- ["ecb2aa", "e1848ee185a5e186b9"],
- ["ecb2aa", "ecb298e186b9"],
- ["ecb2ab", "e1848ee185a5e186ba"],
- ["ecb2ab", "ecb298e186ba"],
- ["ecb2ac", "e1848ee185a5e186bb"],
- ["ecb2ac", "ecb298e186bb"],
- ["ecb2ad", "e1848ee185a5e186bc"],
- ["ecb2ad", "ecb298e186bc"],
- ["ecb2ae", "e1848ee185a5e186bd"],
- ["ecb2ae", "ecb298e186bd"],
- ["ecb2af", "e1848ee185a5e186be"],
- ["ecb2af", "ecb298e186be"],
- ["ecb2b0", "e1848ee185a5e186bf"],
- ["ecb2b0", "ecb298e186bf"],
- ["ecb2b1", "e1848ee185a5e18780"],
- ["ecb2b1", "ecb298e18780"],
- ["ecb2b2", "e1848ee185a5e18781"],
- ["ecb2b2", "ecb298e18781"],
- ["ecb2b3", "e1848ee185a5e18782"],
- ["ecb2b3", "ecb298e18782"],
- ["ecb2b4", "e1848ee185a6"],
- ["ecb2b5", "e1848ee185a6e186a8"],
- ["ecb2b5", "ecb2b4e186a8"],
- ["ecb2b6", "e1848ee185a6e186a9"],
- ["ecb2b6", "ecb2b4e186a9"],
- ["ecb2b7", "e1848ee185a6e186aa"],
- ["ecb2b7", "ecb2b4e186aa"],
- ["ecb2b8", "e1848ee185a6e186ab"],
- ["ecb2b8", "ecb2b4e186ab"],
- ["ecb2b9", "e1848ee185a6e186ac"],
- ["ecb2b9", "ecb2b4e186ac"],
- ["ecb2ba", "e1848ee185a6e186ad"],
- ["ecb2ba", "ecb2b4e186ad"],
- ["ecb2bb", "e1848ee185a6e186ae"],
- ["ecb2bb", "ecb2b4e186ae"],
- ["ecb2bc", "e1848ee185a6e186af"],
- ["ecb2bc", "ecb2b4e186af"],
- ["ecb2bd", "e1848ee185a6e186b0"],
- ["ecb2bd", "ecb2b4e186b0"],
- ["ecb2be", "e1848ee185a6e186b1"],
- ["ecb2be", "ecb2b4e186b1"],
- ["ecb2bf", "e1848ee185a6e186b2"],
- ["ecb2bf", "ecb2b4e186b2"],
- ["ecb380", "e1848ee185a6e186b3"],
- ["ecb380", "ecb2b4e186b3"],
- ["ecb381", "e1848ee185a6e186b4"],
- ["ecb381", "ecb2b4e186b4"],
- ["ecb382", "e1848ee185a6e186b5"],
- ["ecb382", "ecb2b4e186b5"],
- ["ecb383", "e1848ee185a6e186b6"],
- ["ecb383", "ecb2b4e186b6"],
- ["ecb384", "e1848ee185a6e186b7"],
- ["ecb384", "ecb2b4e186b7"],
- ["ecb385", "e1848ee185a6e186b8"],
- ["ecb385", "ecb2b4e186b8"],
- ["ecb386", "e1848ee185a6e186b9"],
- ["ecb386", "ecb2b4e186b9"],
- ["ecb387", "e1848ee185a6e186ba"],
- ["ecb387", "ecb2b4e186ba"],
- ["ecb388", "e1848ee185a6e186bb"],
- ["ecb388", "ecb2b4e186bb"],
- ["ecb389", "e1848ee185a6e186bc"],
- ["ecb389", "ecb2b4e186bc"],
- ["ecb38a", "e1848ee185a6e186bd"],
- ["ecb38a", "ecb2b4e186bd"],
- ["ecb38b", "e1848ee185a6e186be"],
- ["ecb38b", "ecb2b4e186be"],
- ["ecb38c", "e1848ee185a6e186bf"],
- ["ecb38c", "ecb2b4e186bf"],
- ["ecb38d", "e1848ee185a6e18780"],
- ["ecb38d", "ecb2b4e18780"],
- ["ecb38e", "e1848ee185a6e18781"],
- ["ecb38e", "ecb2b4e18781"],
- ["ecb38f", "e1848ee185a6e18782"],
- ["ecb38f", "ecb2b4e18782"],
- ["ecb390", "e1848ee185a7"],
- ["ecb391", "e1848ee185a7e186a8"],
- ["ecb391", "ecb390e186a8"],
- ["ecb392", "e1848ee185a7e186a9"],
- ["ecb392", "ecb390e186a9"],
- ["ecb393", "e1848ee185a7e186aa"],
- ["ecb393", "ecb390e186aa"],
- ["ecb394", "e1848ee185a7e186ab"],
- ["ecb394", "ecb390e186ab"],
- ["ecb395", "e1848ee185a7e186ac"],
- ["ecb395", "ecb390e186ac"],
- ["ecb396", "e1848ee185a7e186ad"],
- ["ecb396", "ecb390e186ad"],
- ["ecb397", "e1848ee185a7e186ae"],
- ["ecb397", "ecb390e186ae"],
- ["ecb398", "e1848ee185a7e186af"],
- ["ecb398", "ecb390e186af"],
- ["ecb399", "e1848ee185a7e186b0"],
- ["ecb399", "ecb390e186b0"],
- ["ecb39a", "e1848ee185a7e186b1"],
- ["ecb39a", "ecb390e186b1"],
- ["ecb39b", "e1848ee185a7e186b2"],
- ["ecb39b", "ecb390e186b2"],
- ["ecb39c", "e1848ee185a7e186b3"],
- ["ecb39c", "ecb390e186b3"],
- ["ecb39d", "e1848ee185a7e186b4"],
- ["ecb39d", "ecb390e186b4"],
- ["ecb39e", "e1848ee185a7e186b5"],
- ["ecb39e", "ecb390e186b5"],
- ["ecb39f", "e1848ee185a7e186b6"],
- ["ecb39f", "ecb390e186b6"],
- ["ecb3a0", "e1848ee185a7e186b7"],
- ["ecb3a0", "ecb390e186b7"],
- ["ecb3a1", "e1848ee185a7e186b8"],
- ["ecb3a1", "ecb390e186b8"],
- ["ecb3a2", "e1848ee185a7e186b9"],
- ["ecb3a2", "ecb390e186b9"],
- ["ecb3a3", "e1848ee185a7e186ba"],
- ["ecb3a3", "ecb390e186ba"],
- ["ecb3a4", "e1848ee185a7e186bb"],
- ["ecb3a4", "ecb390e186bb"],
- ["ecb3a5", "e1848ee185a7e186bc"],
- ["ecb3a5", "ecb390e186bc"],
- ["ecb3a6", "e1848ee185a7e186bd"],
- ["ecb3a6", "ecb390e186bd"],
- ["ecb3a7", "e1848ee185a7e186be"],
- ["ecb3a7", "ecb390e186be"],
- ["ecb3a8", "e1848ee185a7e186bf"],
- ["ecb3a8", "ecb390e186bf"],
- ["ecb3a9", "e1848ee185a7e18780"],
- ["ecb3a9", "ecb390e18780"],
- ["ecb3aa", "e1848ee185a7e18781"],
- ["ecb3aa", "ecb390e18781"],
- ["ecb3ab", "e1848ee185a7e18782"],
- ["ecb3ab", "ecb390e18782"],
- ["ecb3ac", "e1848ee185a8"],
- ["ecb3ad", "e1848ee185a8e186a8"],
- ["ecb3ad", "ecb3ace186a8"],
- ["ecb3ae", "e1848ee185a8e186a9"],
- ["ecb3ae", "ecb3ace186a9"],
- ["ecb3af", "e1848ee185a8e186aa"],
- ["ecb3af", "ecb3ace186aa"],
- ["ecb3b0", "e1848ee185a8e186ab"],
- ["ecb3b0", "ecb3ace186ab"],
- ["ecb3b1", "e1848ee185a8e186ac"],
- ["ecb3b1", "ecb3ace186ac"],
- ["ecb3b2", "e1848ee185a8e186ad"],
- ["ecb3b2", "ecb3ace186ad"],
- ["ecb3b3", "e1848ee185a8e186ae"],
- ["ecb3b3", "ecb3ace186ae"],
- ["ecb3b4", "e1848ee185a8e186af"],
- ["ecb3b4", "ecb3ace186af"],
- ["ecb3b5", "e1848ee185a8e186b0"],
- ["ecb3b5", "ecb3ace186b0"],
- ["ecb3b6", "e1848ee185a8e186b1"],
- ["ecb3b6", "ecb3ace186b1"],
- ["ecb3b7", "e1848ee185a8e186b2"],
- ["ecb3b7", "ecb3ace186b2"],
- ["ecb3b8", "e1848ee185a8e186b3"],
- ["ecb3b8", "ecb3ace186b3"],
- ["ecb3b9", "e1848ee185a8e186b4"],
- ["ecb3b9", "ecb3ace186b4"],
- ["ecb3ba", "e1848ee185a8e186b5"],
- ["ecb3ba", "ecb3ace186b5"],
- ["ecb3bb", "e1848ee185a8e186b6"],
- ["ecb3bb", "ecb3ace186b6"],
- ["ecb3bc", "e1848ee185a8e186b7"],
- ["ecb3bc", "ecb3ace186b7"],
- ["ecb3bd", "e1848ee185a8e186b8"],
- ["ecb3bd", "ecb3ace186b8"],
- ["ecb3be", "e1848ee185a8e186b9"],
- ["ecb3be", "ecb3ace186b9"],
- ["ecb3bf", "e1848ee185a8e186ba"],
- ["ecb3bf", "ecb3ace186ba"],
- ["ecb480", "e1848ee185a8e186bb"],
- ["ecb480", "ecb3ace186bb"],
- ["ecb481", "e1848ee185a8e186bc"],
- ["ecb481", "ecb3ace186bc"],
- ["ecb482", "e1848ee185a8e186bd"],
- ["ecb482", "ecb3ace186bd"],
- ["ecb483", "e1848ee185a8e186be"],
- ["ecb483", "ecb3ace186be"],
- ["ecb484", "e1848ee185a8e186bf"],
- ["ecb484", "ecb3ace186bf"],
- ["ecb485", "e1848ee185a8e18780"],
- ["ecb485", "ecb3ace18780"],
- ["ecb486", "e1848ee185a8e18781"],
- ["ecb486", "ecb3ace18781"],
- ["ecb487", "e1848ee185a8e18782"],
- ["ecb487", "ecb3ace18782"],
- ["ecb488", "e1848ee185a9"],
- ["ecb489", "e1848ee185a9e186a8"],
- ["ecb489", "ecb488e186a8"],
- ["ecb48a", "e1848ee185a9e186a9"],
- ["ecb48a", "ecb488e186a9"],
- ["ecb48b", "e1848ee185a9e186aa"],
- ["ecb48b", "ecb488e186aa"],
- ["ecb48c", "e1848ee185a9e186ab"],
- ["ecb48c", "ecb488e186ab"],
- ["ecb48d", "e1848ee185a9e186ac"],
- ["ecb48d", "ecb488e186ac"],
- ["ecb48e", "e1848ee185a9e186ad"],
- ["ecb48e", "ecb488e186ad"],
- ["ecb48f", "e1848ee185a9e186ae"],
- ["ecb48f", "ecb488e186ae"],
- ["ecb490", "e1848ee185a9e186af"],
- ["ecb490", "ecb488e186af"],
- ["ecb491", "e1848ee185a9e186b0"],
- ["ecb491", "ecb488e186b0"],
- ["ecb492", "e1848ee185a9e186b1"],
- ["ecb492", "ecb488e186b1"],
- ["ecb493", "e1848ee185a9e186b2"],
- ["ecb493", "ecb488e186b2"],
- ["ecb494", "e1848ee185a9e186b3"],
- ["ecb494", "ecb488e186b3"],
- ["ecb495", "e1848ee185a9e186b4"],
- ["ecb495", "ecb488e186b4"],
- ["ecb496", "e1848ee185a9e186b5"],
- ["ecb496", "ecb488e186b5"],
- ["ecb497", "e1848ee185a9e186b6"],
- ["ecb497", "ecb488e186b6"],
- ["ecb498", "e1848ee185a9e186b7"],
- ["ecb498", "ecb488e186b7"],
- ["ecb499", "e1848ee185a9e186b8"],
- ["ecb499", "ecb488e186b8"],
- ["ecb49a", "e1848ee185a9e186b9"],
- ["ecb49a", "ecb488e186b9"],
- ["ecb49b", "e1848ee185a9e186ba"],
- ["ecb49b", "ecb488e186ba"],
- ["ecb49c", "e1848ee185a9e186bb"],
- ["ecb49c", "ecb488e186bb"],
- ["ecb49d", "e1848ee185a9e186bc"],
- ["ecb49d", "ecb488e186bc"],
- ["ecb49e", "e1848ee185a9e186bd"],
- ["ecb49e", "ecb488e186bd"],
- ["ecb49f", "e1848ee185a9e186be"],
- ["ecb49f", "ecb488e186be"],
- ["ecb4a0", "e1848ee185a9e186bf"],
- ["ecb4a0", "ecb488e186bf"],
- ["ecb4a1", "e1848ee185a9e18780"],
- ["ecb4a1", "ecb488e18780"],
- ["ecb4a2", "e1848ee185a9e18781"],
- ["ecb4a2", "ecb488e18781"],
- ["ecb4a3", "e1848ee185a9e18782"],
- ["ecb4a3", "ecb488e18782"],
- ["ecb4a4", "e1848ee185aa"],
- ["ecb4a5", "e1848ee185aae186a8"],
- ["ecb4a5", "ecb4a4e186a8"],
- ["ecb4a6", "e1848ee185aae186a9"],
- ["ecb4a6", "ecb4a4e186a9"],
- ["ecb4a7", "e1848ee185aae186aa"],
- ["ecb4a7", "ecb4a4e186aa"],
- ["ecb4a8", "e1848ee185aae186ab"],
- ["ecb4a8", "ecb4a4e186ab"],
- ["ecb4a9", "e1848ee185aae186ac"],
- ["ecb4a9", "ecb4a4e186ac"],
- ["ecb4aa", "e1848ee185aae186ad"],
- ["ecb4aa", "ecb4a4e186ad"],
- ["ecb4ab", "e1848ee185aae186ae"],
- ["ecb4ab", "ecb4a4e186ae"],
- ["ecb4ac", "e1848ee185aae186af"],
- ["ecb4ac", "ecb4a4e186af"],
- ["ecb4ad", "e1848ee185aae186b0"],
- ["ecb4ad", "ecb4a4e186b0"],
- ["ecb4ae", "e1848ee185aae186b1"],
- ["ecb4ae", "ecb4a4e186b1"],
- ["ecb4af", "e1848ee185aae186b2"],
- ["ecb4af", "ecb4a4e186b2"],
- ["ecb4b0", "e1848ee185aae186b3"],
- ["ecb4b0", "ecb4a4e186b3"],
- ["ecb4b1", "e1848ee185aae186b4"],
- ["ecb4b1", "ecb4a4e186b4"],
- ["ecb4b2", "e1848ee185aae186b5"],
- ["ecb4b2", "ecb4a4e186b5"],
- ["ecb4b3", "e1848ee185aae186b6"],
- ["ecb4b3", "ecb4a4e186b6"],
- ["ecb4b4", "e1848ee185aae186b7"],
- ["ecb4b4", "ecb4a4e186b7"],
- ["ecb4b5", "e1848ee185aae186b8"],
- ["ecb4b5", "ecb4a4e186b8"],
- ["ecb4b6", "e1848ee185aae186b9"],
- ["ecb4b6", "ecb4a4e186b9"],
- ["ecb4b7", "e1848ee185aae186ba"],
- ["ecb4b7", "ecb4a4e186ba"],
- ["ecb4b8", "e1848ee185aae186bb"],
- ["ecb4b8", "ecb4a4e186bb"],
- ["ecb4b9", "e1848ee185aae186bc"],
- ["ecb4b9", "ecb4a4e186bc"],
- ["ecb4ba", "e1848ee185aae186bd"],
- ["ecb4ba", "ecb4a4e186bd"],
- ["ecb4bb", "e1848ee185aae186be"],
- ["ecb4bb", "ecb4a4e186be"],
- ["ecb4bc", "e1848ee185aae186bf"],
- ["ecb4bc", "ecb4a4e186bf"],
- ["ecb4bd", "e1848ee185aae18780"],
- ["ecb4bd", "ecb4a4e18780"],
- ["ecb4be", "e1848ee185aae18781"],
- ["ecb4be", "ecb4a4e18781"],
- ["ecb4bf", "e1848ee185aae18782"],
- ["ecb4bf", "ecb4a4e18782"],
- ["ecb580", "e1848ee185ab"],
- ["ecb581", "e1848ee185abe186a8"],
- ["ecb581", "ecb580e186a8"],
- ["ecb582", "e1848ee185abe186a9"],
- ["ecb582", "ecb580e186a9"],
- ["ecb583", "e1848ee185abe186aa"],
- ["ecb583", "ecb580e186aa"],
- ["ecb584", "e1848ee185abe186ab"],
- ["ecb584", "ecb580e186ab"],
- ["ecb585", "e1848ee185abe186ac"],
- ["ecb585", "ecb580e186ac"],
- ["ecb586", "e1848ee185abe186ad"],
- ["ecb586", "ecb580e186ad"],
- ["ecb587", "e1848ee185abe186ae"],
- ["ecb587", "ecb580e186ae"],
- ["ecb588", "e1848ee185abe186af"],
- ["ecb588", "ecb580e186af"],
- ["ecb589", "e1848ee185abe186b0"],
- ["ecb589", "ecb580e186b0"],
- ["ecb58a", "e1848ee185abe186b1"],
- ["ecb58a", "ecb580e186b1"],
- ["ecb58b", "e1848ee185abe186b2"],
- ["ecb58b", "ecb580e186b2"],
- ["ecb58c", "e1848ee185abe186b3"],
- ["ecb58c", "ecb580e186b3"],
- ["ecb58d", "e1848ee185abe186b4"],
- ["ecb58d", "ecb580e186b4"],
- ["ecb58e", "e1848ee185abe186b5"],
- ["ecb58e", "ecb580e186b5"],
- ["ecb58f", "e1848ee185abe186b6"],
- ["ecb58f", "ecb580e186b6"],
- ["ecb590", "e1848ee185abe186b7"],
- ["ecb590", "ecb580e186b7"],
- ["ecb591", "e1848ee185abe186b8"],
- ["ecb591", "ecb580e186b8"],
- ["ecb592", "e1848ee185abe186b9"],
- ["ecb592", "ecb580e186b9"],
- ["ecb593", "e1848ee185abe186ba"],
- ["ecb593", "ecb580e186ba"],
- ["ecb594", "e1848ee185abe186bb"],
- ["ecb594", "ecb580e186bb"],
- ["ecb595", "e1848ee185abe186bc"],
- ["ecb595", "ecb580e186bc"],
- ["ecb596", "e1848ee185abe186bd"],
- ["ecb596", "ecb580e186bd"],
- ["ecb597", "e1848ee185abe186be"],
- ["ecb597", "ecb580e186be"],
- ["ecb598", "e1848ee185abe186bf"],
- ["ecb598", "ecb580e186bf"],
- ["ecb599", "e1848ee185abe18780"],
- ["ecb599", "ecb580e18780"],
- ["ecb59a", "e1848ee185abe18781"],
- ["ecb59a", "ecb580e18781"],
- ["ecb59b", "e1848ee185abe18782"],
- ["ecb59b", "ecb580e18782"],
- ["ecb59c", "e1848ee185ac"],
- ["ecb59d", "e1848ee185ace186a8"],
- ["ecb59d", "ecb59ce186a8"],
- ["ecb59e", "e1848ee185ace186a9"],
- ["ecb59e", "ecb59ce186a9"],
- ["ecb59f", "e1848ee185ace186aa"],
- ["ecb59f", "ecb59ce186aa"],
- ["ecb5a0", "e1848ee185ace186ab"],
- ["ecb5a0", "ecb59ce186ab"],
- ["ecb5a1", "e1848ee185ace186ac"],
- ["ecb5a1", "ecb59ce186ac"],
- ["ecb5a2", "e1848ee185ace186ad"],
- ["ecb5a2", "ecb59ce186ad"],
- ["ecb5a3", "e1848ee185ace186ae"],
- ["ecb5a3", "ecb59ce186ae"],
- ["ecb5a4", "e1848ee185ace186af"],
- ["ecb5a4", "ecb59ce186af"],
- ["ecb5a5", "e1848ee185ace186b0"],
- ["ecb5a5", "ecb59ce186b0"],
- ["ecb5a6", "e1848ee185ace186b1"],
- ["ecb5a6", "ecb59ce186b1"],
- ["ecb5a7", "e1848ee185ace186b2"],
- ["ecb5a7", "ecb59ce186b2"],
- ["ecb5a8", "e1848ee185ace186b3"],
- ["ecb5a8", "ecb59ce186b3"],
- ["ecb5a9", "e1848ee185ace186b4"],
- ["ecb5a9", "ecb59ce186b4"],
- ["ecb5aa", "e1848ee185ace186b5"],
- ["ecb5aa", "ecb59ce186b5"],
- ["ecb5ab", "e1848ee185ace186b6"],
- ["ecb5ab", "ecb59ce186b6"],
- ["ecb5ac", "e1848ee185ace186b7"],
- ["ecb5ac", "ecb59ce186b7"],
- ["ecb5ad", "e1848ee185ace186b8"],
- ["ecb5ad", "ecb59ce186b8"],
- ["ecb5ae", "e1848ee185ace186b9"],
- ["ecb5ae", "ecb59ce186b9"],
- ["ecb5af", "e1848ee185ace186ba"],
- ["ecb5af", "ecb59ce186ba"],
- ["ecb5b0", "e1848ee185ace186bb"],
- ["ecb5b0", "ecb59ce186bb"],
- ["ecb5b1", "e1848ee185ace186bc"],
- ["ecb5b1", "ecb59ce186bc"],
- ["ecb5b2", "e1848ee185ace186bd"],
- ["ecb5b2", "ecb59ce186bd"],
- ["ecb5b3", "e1848ee185ace186be"],
- ["ecb5b3", "ecb59ce186be"],
- ["ecb5b4", "e1848ee185ace186bf"],
- ["ecb5b4", "ecb59ce186bf"],
- ["ecb5b5", "e1848ee185ace18780"],
- ["ecb5b5", "ecb59ce18780"],
- ["ecb5b6", "e1848ee185ace18781"],
- ["ecb5b6", "ecb59ce18781"],
- ["ecb5b7", "e1848ee185ace18782"],
- ["ecb5b7", "ecb59ce18782"],
- ["ecb5b8", "e1848ee185ad"],
- ["ecb5b9", "e1848ee185ade186a8"],
- ["ecb5b9", "ecb5b8e186a8"],
- ["ecb5ba", "e1848ee185ade186a9"],
- ["ecb5ba", "ecb5b8e186a9"],
- ["ecb5bb", "e1848ee185ade186aa"],
- ["ecb5bb", "ecb5b8e186aa"],
- ["ecb5bc", "e1848ee185ade186ab"],
- ["ecb5bc", "ecb5b8e186ab"],
- ["ecb5bd", "e1848ee185ade186ac"],
- ["ecb5bd", "ecb5b8e186ac"],
- ["ecb5be", "e1848ee185ade186ad"],
- ["ecb5be", "ecb5b8e186ad"],
- ["ecb5bf", "e1848ee185ade186ae"],
- ["ecb5bf", "ecb5b8e186ae"],
- ["ecb680", "e1848ee185ade186af"],
- ["ecb680", "ecb5b8e186af"],
- ["ecb681", "e1848ee185ade186b0"],
- ["ecb681", "ecb5b8e186b0"],
- ["ecb682", "e1848ee185ade186b1"],
- ["ecb682", "ecb5b8e186b1"],
- ["ecb683", "e1848ee185ade186b2"],
- ["ecb683", "ecb5b8e186b2"],
- ["ecb684", "e1848ee185ade186b3"],
- ["ecb684", "ecb5b8e186b3"],
- ["ecb685", "e1848ee185ade186b4"],
- ["ecb685", "ecb5b8e186b4"],
- ["ecb686", "e1848ee185ade186b5"],
- ["ecb686", "ecb5b8e186b5"],
- ["ecb687", "e1848ee185ade186b6"],
- ["ecb687", "ecb5b8e186b6"],
- ["ecb688", "e1848ee185ade186b7"],
- ["ecb688", "ecb5b8e186b7"],
- ["ecb689", "e1848ee185ade186b8"],
- ["ecb689", "ecb5b8e186b8"],
- ["ecb68a", "e1848ee185ade186b9"],
- ["ecb68a", "ecb5b8e186b9"],
- ["ecb68b", "e1848ee185ade186ba"],
- ["ecb68b", "ecb5b8e186ba"],
- ["ecb68c", "e1848ee185ade186bb"],
- ["ecb68c", "ecb5b8e186bb"],
- ["ecb68d", "e1848ee185ade186bc"],
- ["ecb68d", "ecb5b8e186bc"],
- ["ecb68e", "e1848ee185ade186bd"],
- ["ecb68e", "ecb5b8e186bd"],
- ["ecb68f", "e1848ee185ade186be"],
- ["ecb68f", "ecb5b8e186be"],
- ["ecb690", "e1848ee185ade186bf"],
- ["ecb690", "ecb5b8e186bf"],
- ["ecb691", "e1848ee185ade18780"],
- ["ecb691", "ecb5b8e18780"],
- ["ecb692", "e1848ee185ade18781"],
- ["ecb692", "ecb5b8e18781"],
- ["ecb693", "e1848ee185ade18782"],
- ["ecb693", "ecb5b8e18782"],
- ["ecb694", "e1848ee185ae"],
- ["ecb695", "e1848ee185aee186a8"],
- ["ecb695", "ecb694e186a8"],
- ["ecb696", "e1848ee185aee186a9"],
- ["ecb696", "ecb694e186a9"],
- ["ecb697", "e1848ee185aee186aa"],
- ["ecb697", "ecb694e186aa"],
- ["ecb698", "e1848ee185aee186ab"],
- ["ecb698", "ecb694e186ab"],
- ["ecb699", "e1848ee185aee186ac"],
- ["ecb699", "ecb694e186ac"],
- ["ecb69a", "e1848ee185aee186ad"],
- ["ecb69a", "ecb694e186ad"],
- ["ecb69b", "e1848ee185aee186ae"],
- ["ecb69b", "ecb694e186ae"],
- ["ecb69c", "e1848ee185aee186af"],
- ["ecb69c", "ecb694e186af"],
- ["ecb69d", "e1848ee185aee186b0"],
- ["ecb69d", "ecb694e186b0"],
- ["ecb69e", "e1848ee185aee186b1"],
- ["ecb69e", "ecb694e186b1"],
- ["ecb69f", "e1848ee185aee186b2"],
- ["ecb69f", "ecb694e186b2"],
- ["ecb6a0", "e1848ee185aee186b3"],
- ["ecb6a0", "ecb694e186b3"],
- ["ecb6a1", "e1848ee185aee186b4"],
- ["ecb6a1", "ecb694e186b4"],
- ["ecb6a2", "e1848ee185aee186b5"],
- ["ecb6a2", "ecb694e186b5"],
- ["ecb6a3", "e1848ee185aee186b6"],
- ["ecb6a3", "ecb694e186b6"],
- ["ecb6a4", "e1848ee185aee186b7"],
- ["ecb6a4", "ecb694e186b7"],
- ["ecb6a5", "e1848ee185aee186b8"],
- ["ecb6a5", "ecb694e186b8"],
- ["ecb6a6", "e1848ee185aee186b9"],
- ["ecb6a6", "ecb694e186b9"],
- ["ecb6a7", "e1848ee185aee186ba"],
- ["ecb6a7", "ecb694e186ba"],
- ["ecb6a8", "e1848ee185aee186bb"],
- ["ecb6a8", "ecb694e186bb"],
- ["ecb6a9", "e1848ee185aee186bc"],
- ["ecb6a9", "ecb694e186bc"],
- ["ecb6aa", "e1848ee185aee186bd"],
- ["ecb6aa", "ecb694e186bd"],
- ["ecb6ab", "e1848ee185aee186be"],
- ["ecb6ab", "ecb694e186be"],
- ["ecb6ac", "e1848ee185aee186bf"],
- ["ecb6ac", "ecb694e186bf"],
- ["ecb6ad", "e1848ee185aee18780"],
- ["ecb6ad", "ecb694e18780"],
- ["ecb6ae", "e1848ee185aee18781"],
- ["ecb6ae", "ecb694e18781"],
- ["ecb6af", "e1848ee185aee18782"],
- ["ecb6af", "ecb694e18782"],
- ["ecb6b0", "e1848ee185af"],
- ["ecb6b1", "e1848ee185afe186a8"],
- ["ecb6b1", "ecb6b0e186a8"],
- ["ecb6b2", "e1848ee185afe186a9"],
- ["ecb6b2", "ecb6b0e186a9"],
- ["ecb6b3", "e1848ee185afe186aa"],
- ["ecb6b3", "ecb6b0e186aa"],
- ["ecb6b4", "e1848ee185afe186ab"],
- ["ecb6b4", "ecb6b0e186ab"],
- ["ecb6b5", "e1848ee185afe186ac"],
- ["ecb6b5", "ecb6b0e186ac"],
- ["ecb6b6", "e1848ee185afe186ad"],
- ["ecb6b6", "ecb6b0e186ad"],
- ["ecb6b7", "e1848ee185afe186ae"],
- ["ecb6b7", "ecb6b0e186ae"],
- ["ecb6b8", "e1848ee185afe186af"],
- ["ecb6b8", "ecb6b0e186af"],
- ["ecb6b9", "e1848ee185afe186b0"],
- ["ecb6b9", "ecb6b0e186b0"],
- ["ecb6ba", "e1848ee185afe186b1"],
- ["ecb6ba", "ecb6b0e186b1"],
- ["ecb6bb", "e1848ee185afe186b2"],
- ["ecb6bb", "ecb6b0e186b2"],
- ["ecb6bc", "e1848ee185afe186b3"],
- ["ecb6bc", "ecb6b0e186b3"],
- ["ecb6bd", "e1848ee185afe186b4"],
- ["ecb6bd", "ecb6b0e186b4"],
- ["ecb6be", "e1848ee185afe186b5"],
- ["ecb6be", "ecb6b0e186b5"],
- ["ecb6bf", "e1848ee185afe186b6"],
- ["ecb6bf", "ecb6b0e186b6"],
- ["ecb780", "e1848ee185afe186b7"],
- ["ecb780", "ecb6b0e186b7"],
- ["ecb781", "e1848ee185afe186b8"],
- ["ecb781", "ecb6b0e186b8"],
- ["ecb782", "e1848ee185afe186b9"],
- ["ecb782", "ecb6b0e186b9"],
- ["ecb783", "e1848ee185afe186ba"],
- ["ecb783", "ecb6b0e186ba"],
- ["ecb784", "e1848ee185afe186bb"],
- ["ecb784", "ecb6b0e186bb"],
- ["ecb785", "e1848ee185afe186bc"],
- ["ecb785", "ecb6b0e186bc"],
- ["ecb786", "e1848ee185afe186bd"],
- ["ecb786", "ecb6b0e186bd"],
- ["ecb787", "e1848ee185afe186be"],
- ["ecb787", "ecb6b0e186be"],
- ["ecb788", "e1848ee185afe186bf"],
- ["ecb788", "ecb6b0e186bf"],
- ["ecb789", "e1848ee185afe18780"],
- ["ecb789", "ecb6b0e18780"],
- ["ecb78a", "e1848ee185afe18781"],
- ["ecb78a", "ecb6b0e18781"],
- ["ecb78b", "e1848ee185afe18782"],
- ["ecb78b", "ecb6b0e18782"],
- ["ecb78c", "e1848ee185b0"],
- ["ecb78d", "e1848ee185b0e186a8"],
- ["ecb78d", "ecb78ce186a8"],
- ["ecb78e", "e1848ee185b0e186a9"],
- ["ecb78e", "ecb78ce186a9"],
- ["ecb78f", "e1848ee185b0e186aa"],
- ["ecb78f", "ecb78ce186aa"],
- ["ecb790", "e1848ee185b0e186ab"],
- ["ecb790", "ecb78ce186ab"],
- ["ecb791", "e1848ee185b0e186ac"],
- ["ecb791", "ecb78ce186ac"],
- ["ecb792", "e1848ee185b0e186ad"],
- ["ecb792", "ecb78ce186ad"],
- ["ecb793", "e1848ee185b0e186ae"],
- ["ecb793", "ecb78ce186ae"],
- ["ecb794", "e1848ee185b0e186af"],
- ["ecb794", "ecb78ce186af"],
- ["ecb795", "e1848ee185b0e186b0"],
- ["ecb795", "ecb78ce186b0"],
- ["ecb796", "e1848ee185b0e186b1"],
- ["ecb796", "ecb78ce186b1"],
- ["ecb797", "e1848ee185b0e186b2"],
- ["ecb797", "ecb78ce186b2"],
- ["ecb798", "e1848ee185b0e186b3"],
- ["ecb798", "ecb78ce186b3"],
- ["ecb799", "e1848ee185b0e186b4"],
- ["ecb799", "ecb78ce186b4"],
- ["ecb79a", "e1848ee185b0e186b5"],
- ["ecb79a", "ecb78ce186b5"],
- ["ecb79b", "e1848ee185b0e186b6"],
- ["ecb79b", "ecb78ce186b6"],
- ["ecb79c", "e1848ee185b0e186b7"],
- ["ecb79c", "ecb78ce186b7"],
- ["ecb79d", "e1848ee185b0e186b8"],
- ["ecb79d", "ecb78ce186b8"],
- ["ecb79e", "e1848ee185b0e186b9"],
- ["ecb79e", "ecb78ce186b9"],
- ["ecb79f", "e1848ee185b0e186ba"],
- ["ecb79f", "ecb78ce186ba"],
- ["ecb7a0", "e1848ee185b0e186bb"],
- ["ecb7a0", "ecb78ce186bb"],
- ["ecb7a1", "e1848ee185b0e186bc"],
- ["ecb7a1", "ecb78ce186bc"],
- ["ecb7a2", "e1848ee185b0e186bd"],
- ["ecb7a2", "ecb78ce186bd"],
- ["ecb7a3", "e1848ee185b0e186be"],
- ["ecb7a3", "ecb78ce186be"],
- ["ecb7a4", "e1848ee185b0e186bf"],
- ["ecb7a4", "ecb78ce186bf"],
- ["ecb7a5", "e1848ee185b0e18780"],
- ["ecb7a5", "ecb78ce18780"],
- ["ecb7a6", "e1848ee185b0e18781"],
- ["ecb7a6", "ecb78ce18781"],
- ["ecb7a7", "e1848ee185b0e18782"],
- ["ecb7a7", "ecb78ce18782"],
- ["ecb7a8", "e1848ee185b1"],
- ["ecb7a9", "e1848ee185b1e186a8"],
- ["ecb7a9", "ecb7a8e186a8"],
- ["ecb7aa", "e1848ee185b1e186a9"],
- ["ecb7aa", "ecb7a8e186a9"],
- ["ecb7ab", "e1848ee185b1e186aa"],
- ["ecb7ab", "ecb7a8e186aa"],
- ["ecb7ac", "e1848ee185b1e186ab"],
- ["ecb7ac", "ecb7a8e186ab"],
- ["ecb7ad", "e1848ee185b1e186ac"],
- ["ecb7ad", "ecb7a8e186ac"],
- ["ecb7ae", "e1848ee185b1e186ad"],
- ["ecb7ae", "ecb7a8e186ad"],
- ["ecb7af", "e1848ee185b1e186ae"],
- ["ecb7af", "ecb7a8e186ae"],
- ["ecb7b0", "e1848ee185b1e186af"],
- ["ecb7b0", "ecb7a8e186af"],
- ["ecb7b1", "e1848ee185b1e186b0"],
- ["ecb7b1", "ecb7a8e186b0"],
- ["ecb7b2", "e1848ee185b1e186b1"],
- ["ecb7b2", "ecb7a8e186b1"],
- ["ecb7b3", "e1848ee185b1e186b2"],
- ["ecb7b3", "ecb7a8e186b2"],
- ["ecb7b4", "e1848ee185b1e186b3"],
- ["ecb7b4", "ecb7a8e186b3"],
- ["ecb7b5", "e1848ee185b1e186b4"],
- ["ecb7b5", "ecb7a8e186b4"],
- ["ecb7b6", "e1848ee185b1e186b5"],
- ["ecb7b6", "ecb7a8e186b5"],
- ["ecb7b7", "e1848ee185b1e186b6"],
- ["ecb7b7", "ecb7a8e186b6"],
- ["ecb7b8", "e1848ee185b1e186b7"],
- ["ecb7b8", "ecb7a8e186b7"],
- ["ecb7b9", "e1848ee185b1e186b8"],
- ["ecb7b9", "ecb7a8e186b8"],
- ["ecb7ba", "e1848ee185b1e186b9"],
- ["ecb7ba", "ecb7a8e186b9"],
- ["ecb7bb", "e1848ee185b1e186ba"],
- ["ecb7bb", "ecb7a8e186ba"],
- ["ecb7bc", "e1848ee185b1e186bb"],
- ["ecb7bc", "ecb7a8e186bb"],
- ["ecb7bd", "e1848ee185b1e186bc"],
- ["ecb7bd", "ecb7a8e186bc"],
- ["ecb7be", "e1848ee185b1e186bd"],
- ["ecb7be", "ecb7a8e186bd"],
- ["ecb7bf", "e1848ee185b1e186be"],
- ["ecb7bf", "ecb7a8e186be"],
- ["ecb880", "e1848ee185b1e186bf"],
- ["ecb880", "ecb7a8e186bf"],
- ["ecb881", "e1848ee185b1e18780"],
- ["ecb881", "ecb7a8e18780"],
- ["ecb882", "e1848ee185b1e18781"],
- ["ecb882", "ecb7a8e18781"],
- ["ecb883", "e1848ee185b1e18782"],
- ["ecb883", "ecb7a8e18782"],
- ["ecb884", "e1848ee185b2"],
- ["ecb885", "e1848ee185b2e186a8"],
- ["ecb885", "ecb884e186a8"],
- ["ecb886", "e1848ee185b2e186a9"],
- ["ecb886", "ecb884e186a9"],
- ["ecb887", "e1848ee185b2e186aa"],
- ["ecb887", "ecb884e186aa"],
- ["ecb888", "e1848ee185b2e186ab"],
- ["ecb888", "ecb884e186ab"],
- ["ecb889", "e1848ee185b2e186ac"],
- ["ecb889", "ecb884e186ac"],
- ["ecb88a", "e1848ee185b2e186ad"],
- ["ecb88a", "ecb884e186ad"],
- ["ecb88b", "e1848ee185b2e186ae"],
- ["ecb88b", "ecb884e186ae"],
- ["ecb88c", "e1848ee185b2e186af"],
- ["ecb88c", "ecb884e186af"],
- ["ecb88d", "e1848ee185b2e186b0"],
- ["ecb88d", "ecb884e186b0"],
- ["ecb88e", "e1848ee185b2e186b1"],
- ["ecb88e", "ecb884e186b1"],
- ["ecb88f", "e1848ee185b2e186b2"],
- ["ecb88f", "ecb884e186b2"],
- ["ecb890", "e1848ee185b2e186b3"],
- ["ecb890", "ecb884e186b3"],
- ["ecb891", "e1848ee185b2e186b4"],
- ["ecb891", "ecb884e186b4"],
- ["ecb892", "e1848ee185b2e186b5"],
- ["ecb892", "ecb884e186b5"],
- ["ecb893", "e1848ee185b2e186b6"],
- ["ecb893", "ecb884e186b6"],
- ["ecb894", "e1848ee185b2e186b7"],
- ["ecb894", "ecb884e186b7"],
- ["ecb895", "e1848ee185b2e186b8"],
- ["ecb895", "ecb884e186b8"],
- ["ecb896", "e1848ee185b2e186b9"],
- ["ecb896", "ecb884e186b9"],
- ["ecb897", "e1848ee185b2e186ba"],
- ["ecb897", "ecb884e186ba"],
- ["ecb898", "e1848ee185b2e186bb"],
- ["ecb898", "ecb884e186bb"],
- ["ecb899", "e1848ee185b2e186bc"],
- ["ecb899", "ecb884e186bc"],
- ["ecb89a", "e1848ee185b2e186bd"],
- ["ecb89a", "ecb884e186bd"],
- ["ecb89b", "e1848ee185b2e186be"],
- ["ecb89b", "ecb884e186be"],
- ["ecb89c", "e1848ee185b2e186bf"],
- ["ecb89c", "ecb884e186bf"],
- ["ecb89d", "e1848ee185b2e18780"],
- ["ecb89d", "ecb884e18780"],
- ["ecb89e", "e1848ee185b2e18781"],
- ["ecb89e", "ecb884e18781"],
- ["ecb89f", "e1848ee185b2e18782"],
- ["ecb89f", "ecb884e18782"],
- ["ecb8a0", "e1848ee185b3"],
- ["ecb8a1", "e1848ee185b3e186a8"],
- ["ecb8a1", "ecb8a0e186a8"],
- ["ecb8a2", "e1848ee185b3e186a9"],
- ["ecb8a2", "ecb8a0e186a9"],
- ["ecb8a3", "e1848ee185b3e186aa"],
- ["ecb8a3", "ecb8a0e186aa"],
- ["ecb8a4", "e1848ee185b3e186ab"],
- ["ecb8a4", "ecb8a0e186ab"],
- ["ecb8a5", "e1848ee185b3e186ac"],
- ["ecb8a5", "ecb8a0e186ac"],
- ["ecb8a6", "e1848ee185b3e186ad"],
- ["ecb8a6", "ecb8a0e186ad"],
- ["ecb8a7", "e1848ee185b3e186ae"],
- ["ecb8a7", "ecb8a0e186ae"],
- ["ecb8a8", "e1848ee185b3e186af"],
- ["ecb8a8", "ecb8a0e186af"],
- ["ecb8a9", "e1848ee185b3e186b0"],
- ["ecb8a9", "ecb8a0e186b0"],
- ["ecb8aa", "e1848ee185b3e186b1"],
- ["ecb8aa", "ecb8a0e186b1"],
- ["ecb8ab", "e1848ee185b3e186b2"],
- ["ecb8ab", "ecb8a0e186b2"],
- ["ecb8ac", "e1848ee185b3e186b3"],
- ["ecb8ac", "ecb8a0e186b3"],
- ["ecb8ad", "e1848ee185b3e186b4"],
- ["ecb8ad", "ecb8a0e186b4"],
- ["ecb8ae", "e1848ee185b3e186b5"],
- ["ecb8ae", "ecb8a0e186b5"],
- ["ecb8af", "e1848ee185b3e186b6"],
- ["ecb8af", "ecb8a0e186b6"],
- ["ecb8b0", "e1848ee185b3e186b7"],
- ["ecb8b0", "ecb8a0e186b7"],
- ["ecb8b1", "e1848ee185b3e186b8"],
- ["ecb8b1", "ecb8a0e186b8"],
- ["ecb8b2", "e1848ee185b3e186b9"],
- ["ecb8b2", "ecb8a0e186b9"],
- ["ecb8b3", "e1848ee185b3e186ba"],
- ["ecb8b3", "ecb8a0e186ba"],
- ["ecb8b4", "e1848ee185b3e186bb"],
- ["ecb8b4", "ecb8a0e186bb"],
- ["ecb8b5", "e1848ee185b3e186bc"],
- ["ecb8b5", "ecb8a0e186bc"],
- ["ecb8b6", "e1848ee185b3e186bd"],
- ["ecb8b6", "ecb8a0e186bd"],
- ["ecb8b7", "e1848ee185b3e186be"],
- ["ecb8b7", "ecb8a0e186be"],
- ["ecb8b8", "e1848ee185b3e186bf"],
- ["ecb8b8", "ecb8a0e186bf"],
- ["ecb8b9", "e1848ee185b3e18780"],
- ["ecb8b9", "ecb8a0e18780"],
- ["ecb8ba", "e1848ee185b3e18781"],
- ["ecb8ba", "ecb8a0e18781"],
- ["ecb8bb", "e1848ee185b3e18782"],
- ["ecb8bb", "ecb8a0e18782"],
- ["ecb8bc", "e1848ee185b4"],
- ["ecb8bd", "e1848ee185b4e186a8"],
- ["ecb8bd", "ecb8bce186a8"],
- ["ecb8be", "e1848ee185b4e186a9"],
- ["ecb8be", "ecb8bce186a9"],
- ["ecb8bf", "e1848ee185b4e186aa"],
- ["ecb8bf", "ecb8bce186aa"],
- ["ecb980", "e1848ee185b4e186ab"],
- ["ecb980", "ecb8bce186ab"],
- ["ecb981", "e1848ee185b4e186ac"],
- ["ecb981", "ecb8bce186ac"],
- ["ecb982", "e1848ee185b4e186ad"],
- ["ecb982", "ecb8bce186ad"],
- ["ecb983", "e1848ee185b4e186ae"],
- ["ecb983", "ecb8bce186ae"],
- ["ecb984", "e1848ee185b4e186af"],
- ["ecb984", "ecb8bce186af"],
- ["ecb985", "e1848ee185b4e186b0"],
- ["ecb985", "ecb8bce186b0"],
- ["ecb986", "e1848ee185b4e186b1"],
- ["ecb986", "ecb8bce186b1"],
- ["ecb987", "e1848ee185b4e186b2"],
- ["ecb987", "ecb8bce186b2"],
- ["ecb988", "e1848ee185b4e186b3"],
- ["ecb988", "ecb8bce186b3"],
- ["ecb989", "e1848ee185b4e186b4"],
- ["ecb989", "ecb8bce186b4"],
- ["ecb98a", "e1848ee185b4e186b5"],
- ["ecb98a", "ecb8bce186b5"],
- ["ecb98b", "e1848ee185b4e186b6"],
- ["ecb98b", "ecb8bce186b6"],
- ["ecb98c", "e1848ee185b4e186b7"],
- ["ecb98c", "ecb8bce186b7"],
- ["ecb98d", "e1848ee185b4e186b8"],
- ["ecb98d", "ecb8bce186b8"],
- ["ecb98e", "e1848ee185b4e186b9"],
- ["ecb98e", "ecb8bce186b9"],
- ["ecb98f", "e1848ee185b4e186ba"],
- ["ecb98f", "ecb8bce186ba"],
- ["ecb990", "e1848ee185b4e186bb"],
- ["ecb990", "ecb8bce186bb"],
- ["ecb991", "e1848ee185b4e186bc"],
- ["ecb991", "ecb8bce186bc"],
- ["ecb992", "e1848ee185b4e186bd"],
- ["ecb992", "ecb8bce186bd"],
- ["ecb993", "e1848ee185b4e186be"],
- ["ecb993", "ecb8bce186be"],
- ["ecb994", "e1848ee185b4e186bf"],
- ["ecb994", "ecb8bce186bf"],
- ["ecb995", "e1848ee185b4e18780"],
- ["ecb995", "ecb8bce18780"],
- ["ecb996", "e1848ee185b4e18781"],
- ["ecb996", "ecb8bce18781"],
- ["ecb997", "e1848ee185b4e18782"],
- ["ecb997", "ecb8bce18782"],
- ["ecb998", "e1848ee185b5"],
- ["ecb999", "e1848ee185b5e186a8"],
- ["ecb999", "ecb998e186a8"],
- ["ecb99a", "e1848ee185b5e186a9"],
- ["ecb99a", "ecb998e186a9"],
- ["ecb99b", "e1848ee185b5e186aa"],
- ["ecb99b", "ecb998e186aa"],
- ["ecb99c", "e1848ee185b5e186ab"],
- ["ecb99c", "ecb998e186ab"],
- ["ecb99d", "e1848ee185b5e186ac"],
- ["ecb99d", "ecb998e186ac"],
- ["ecb99e", "e1848ee185b5e186ad"],
- ["ecb99e", "ecb998e186ad"],
- ["ecb99f", "e1848ee185b5e186ae"],
- ["ecb99f", "ecb998e186ae"],
- ["ecb9a0", "e1848ee185b5e186af"],
- ["ecb9a0", "ecb998e186af"],
- ["ecb9a1", "e1848ee185b5e186b0"],
- ["ecb9a1", "ecb998e186b0"],
- ["ecb9a2", "e1848ee185b5e186b1"],
- ["ecb9a2", "ecb998e186b1"],
- ["ecb9a3", "e1848ee185b5e186b2"],
- ["ecb9a3", "ecb998e186b2"],
- ["ecb9a4", "e1848ee185b5e186b3"],
- ["ecb9a4", "ecb998e186b3"],
- ["ecb9a5", "e1848ee185b5e186b4"],
- ["ecb9a5", "ecb998e186b4"],
- ["ecb9a6", "e1848ee185b5e186b5"],
- ["ecb9a6", "ecb998e186b5"],
- ["ecb9a7", "e1848ee185b5e186b6"],
- ["ecb9a7", "ecb998e186b6"],
- ["ecb9a8", "e1848ee185b5e186b7"],
- ["ecb9a8", "ecb998e186b7"],
- ["ecb9a9", "e1848ee185b5e186b8"],
- ["ecb9a9", "ecb998e186b8"],
- ["ecb9aa", "e1848ee185b5e186b9"],
- ["ecb9aa", "ecb998e186b9"],
- ["ecb9ab", "e1848ee185b5e186ba"],
- ["ecb9ab", "ecb998e186ba"],
- ["ecb9ac", "e1848ee185b5e186bb"],
- ["ecb9ac", "ecb998e186bb"],
- ["ecb9ad", "e1848ee185b5e186bc"],
- ["ecb9ad", "ecb998e186bc"],
- ["ecb9ae", "e1848ee185b5e186bd"],
- ["ecb9ae", "ecb998e186bd"],
- ["ecb9af", "e1848ee185b5e186be"],
- ["ecb9af", "ecb998e186be"],
- ["ecb9b0", "e1848ee185b5e186bf"],
- ["ecb9b0", "ecb998e186bf"],
- ["ecb9b1", "e1848ee185b5e18780"],
- ["ecb9b1", "ecb998e18780"],
- ["ecb9b2", "e1848ee185b5e18781"],
- ["ecb9b2", "ecb998e18781"],
- ["ecb9b3", "e1848ee185b5e18782"],
- ["ecb9b3", "ecb998e18782"],
- ["ecb9b4", "e1848fe185a1"],
- ["ecb9b5", "e1848fe185a1e186a8"],
- ["ecb9b5", "ecb9b4e186a8"],
- ["ecb9b6", "e1848fe185a1e186a9"],
- ["ecb9b6", "ecb9b4e186a9"],
- ["ecb9b7", "e1848fe185a1e186aa"],
- ["ecb9b7", "ecb9b4e186aa"],
- ["ecb9b8", "e1848fe185a1e186ab"],
- ["ecb9b8", "ecb9b4e186ab"],
- ["ecb9b9", "e1848fe185a1e186ac"],
- ["ecb9b9", "ecb9b4e186ac"],
- ["ecb9ba", "e1848fe185a1e186ad"],
- ["ecb9ba", "ecb9b4e186ad"],
- ["ecb9bb", "e1848fe185a1e186ae"],
- ["ecb9bb", "ecb9b4e186ae"],
- ["ecb9bc", "e1848fe185a1e186af"],
- ["ecb9bc", "ecb9b4e186af"],
- ["ecb9bd", "e1848fe185a1e186b0"],
- ["ecb9bd", "ecb9b4e186b0"],
- ["ecb9be", "e1848fe185a1e186b1"],
- ["ecb9be", "ecb9b4e186b1"],
- ["ecb9bf", "e1848fe185a1e186b2"],
- ["ecb9bf", "ecb9b4e186b2"],
- ["ecba80", "e1848fe185a1e186b3"],
- ["ecba80", "ecb9b4e186b3"],
- ["ecba81", "e1848fe185a1e186b4"],
- ["ecba81", "ecb9b4e186b4"],
- ["ecba82", "e1848fe185a1e186b5"],
- ["ecba82", "ecb9b4e186b5"],
- ["ecba83", "e1848fe185a1e186b6"],
- ["ecba83", "ecb9b4e186b6"],
- ["ecba84", "e1848fe185a1e186b7"],
- ["ecba84", "ecb9b4e186b7"],
- ["ecba85", "e1848fe185a1e186b8"],
- ["ecba85", "ecb9b4e186b8"],
- ["ecba86", "e1848fe185a1e186b9"],
- ["ecba86", "ecb9b4e186b9"],
- ["ecba87", "e1848fe185a1e186ba"],
- ["ecba87", "ecb9b4e186ba"],
- ["ecba88", "e1848fe185a1e186bb"],
- ["ecba88", "ecb9b4e186bb"],
- ["ecba89", "e1848fe185a1e186bc"],
- ["ecba89", "ecb9b4e186bc"],
- ["ecba8a", "e1848fe185a1e186bd"],
- ["ecba8a", "ecb9b4e186bd"],
- ["ecba8b", "e1848fe185a1e186be"],
- ["ecba8b", "ecb9b4e186be"],
- ["ecba8c", "e1848fe185a1e186bf"],
- ["ecba8c", "ecb9b4e186bf"],
- ["ecba8d", "e1848fe185a1e18780"],
- ["ecba8d", "ecb9b4e18780"],
- ["ecba8e", "e1848fe185a1e18781"],
- ["ecba8e", "ecb9b4e18781"],
- ["ecba8f", "e1848fe185a1e18782"],
- ["ecba8f", "ecb9b4e18782"],
- ["ecba90", "e1848fe185a2"],
- ["ecba91", "e1848fe185a2e186a8"],
- ["ecba91", "ecba90e186a8"],
- ["ecba92", "e1848fe185a2e186a9"],
- ["ecba92", "ecba90e186a9"],
- ["ecba93", "e1848fe185a2e186aa"],
- ["ecba93", "ecba90e186aa"],
- ["ecba94", "e1848fe185a2e186ab"],
- ["ecba94", "ecba90e186ab"],
- ["ecba95", "e1848fe185a2e186ac"],
- ["ecba95", "ecba90e186ac"],
- ["ecba96", "e1848fe185a2e186ad"],
- ["ecba96", "ecba90e186ad"],
- ["ecba97", "e1848fe185a2e186ae"],
- ["ecba97", "ecba90e186ae"],
- ["ecba98", "e1848fe185a2e186af"],
- ["ecba98", "ecba90e186af"],
- ["ecba99", "e1848fe185a2e186b0"],
- ["ecba99", "ecba90e186b0"],
- ["ecba9a", "e1848fe185a2e186b1"],
- ["ecba9a", "ecba90e186b1"],
- ["ecba9b", "e1848fe185a2e186b2"],
- ["ecba9b", "ecba90e186b2"],
- ["ecba9c", "e1848fe185a2e186b3"],
- ["ecba9c", "ecba90e186b3"],
- ["ecba9d", "e1848fe185a2e186b4"],
- ["ecba9d", "ecba90e186b4"],
- ["ecba9e", "e1848fe185a2e186b5"],
- ["ecba9e", "ecba90e186b5"],
- ["ecba9f", "e1848fe185a2e186b6"],
- ["ecba9f", "ecba90e186b6"],
- ["ecbaa0", "e1848fe185a2e186b7"],
- ["ecbaa0", "ecba90e186b7"],
- ["ecbaa1", "e1848fe185a2e186b8"],
- ["ecbaa1", "ecba90e186b8"],
- ["ecbaa2", "e1848fe185a2e186b9"],
- ["ecbaa2", "ecba90e186b9"],
- ["ecbaa3", "e1848fe185a2e186ba"],
- ["ecbaa3", "ecba90e186ba"],
- ["ecbaa4", "e1848fe185a2e186bb"],
- ["ecbaa4", "ecba90e186bb"],
- ["ecbaa5", "e1848fe185a2e186bc"],
- ["ecbaa5", "ecba90e186bc"],
- ["ecbaa6", "e1848fe185a2e186bd"],
- ["ecbaa6", "ecba90e186bd"],
- ["ecbaa7", "e1848fe185a2e186be"],
- ["ecbaa7", "ecba90e186be"],
- ["ecbaa8", "e1848fe185a2e186bf"],
- ["ecbaa8", "ecba90e186bf"],
- ["ecbaa9", "e1848fe185a2e18780"],
- ["ecbaa9", "ecba90e18780"],
- ["ecbaaa", "e1848fe185a2e18781"],
- ["ecbaaa", "ecba90e18781"],
- ["ecbaab", "e1848fe185a2e18782"],
- ["ecbaab", "ecba90e18782"],
- ["ecbaac", "e1848fe185a3"],
- ["ecbaad", "e1848fe185a3e186a8"],
- ["ecbaad", "ecbaace186a8"],
- ["ecbaae", "e1848fe185a3e186a9"],
- ["ecbaae", "ecbaace186a9"],
- ["ecbaaf", "e1848fe185a3e186aa"],
- ["ecbaaf", "ecbaace186aa"],
- ["ecbab0", "e1848fe185a3e186ab"],
- ["ecbab0", "ecbaace186ab"],
- ["ecbab1", "e1848fe185a3e186ac"],
- ["ecbab1", "ecbaace186ac"],
- ["ecbab2", "e1848fe185a3e186ad"],
- ["ecbab2", "ecbaace186ad"],
- ["ecbab3", "e1848fe185a3e186ae"],
- ["ecbab3", "ecbaace186ae"],
- ["ecbab4", "e1848fe185a3e186af"],
- ["ecbab4", "ecbaace186af"],
- ["ecbab5", "e1848fe185a3e186b0"],
- ["ecbab5", "ecbaace186b0"],
- ["ecbab6", "e1848fe185a3e186b1"],
- ["ecbab6", "ecbaace186b1"],
- ["ecbab7", "e1848fe185a3e186b2"],
- ["ecbab7", "ecbaace186b2"],
- ["ecbab8", "e1848fe185a3e186b3"],
- ["ecbab8", "ecbaace186b3"],
- ["ecbab9", "e1848fe185a3e186b4"],
- ["ecbab9", "ecbaace186b4"],
- ["ecbaba", "e1848fe185a3e186b5"],
- ["ecbaba", "ecbaace186b5"],
- ["ecbabb", "e1848fe185a3e186b6"],
- ["ecbabb", "ecbaace186b6"],
- ["ecbabc", "e1848fe185a3e186b7"],
- ["ecbabc", "ecbaace186b7"],
- ["ecbabd", "e1848fe185a3e186b8"],
- ["ecbabd", "ecbaace186b8"],
- ["ecbabe", "e1848fe185a3e186b9"],
- ["ecbabe", "ecbaace186b9"],
- ["ecbabf", "e1848fe185a3e186ba"],
- ["ecbabf", "ecbaace186ba"],
- ["ecbb80", "e1848fe185a3e186bb"],
- ["ecbb80", "ecbaace186bb"],
- ["ecbb81", "e1848fe185a3e186bc"],
- ["ecbb81", "ecbaace186bc"],
- ["ecbb82", "e1848fe185a3e186bd"],
- ["ecbb82", "ecbaace186bd"],
- ["ecbb83", "e1848fe185a3e186be"],
- ["ecbb83", "ecbaace186be"],
- ["ecbb84", "e1848fe185a3e186bf"],
- ["ecbb84", "ecbaace186bf"],
- ["ecbb85", "e1848fe185a3e18780"],
- ["ecbb85", "ecbaace18780"],
- ["ecbb86", "e1848fe185a3e18781"],
- ["ecbb86", "ecbaace18781"],
- ["ecbb87", "e1848fe185a3e18782"],
- ["ecbb87", "ecbaace18782"],
- ["ecbb88", "e1848fe185a4"],
- ["ecbb89", "e1848fe185a4e186a8"],
- ["ecbb89", "ecbb88e186a8"],
- ["ecbb8a", "e1848fe185a4e186a9"],
- ["ecbb8a", "ecbb88e186a9"],
- ["ecbb8b", "e1848fe185a4e186aa"],
- ["ecbb8b", "ecbb88e186aa"],
- ["ecbb8c", "e1848fe185a4e186ab"],
- ["ecbb8c", "ecbb88e186ab"],
- ["ecbb8d", "e1848fe185a4e186ac"],
- ["ecbb8d", "ecbb88e186ac"],
- ["ecbb8e", "e1848fe185a4e186ad"],
- ["ecbb8e", "ecbb88e186ad"],
- ["ecbb8f", "e1848fe185a4e186ae"],
- ["ecbb8f", "ecbb88e186ae"],
- ["ecbb90", "e1848fe185a4e186af"],
- ["ecbb90", "ecbb88e186af"],
- ["ecbb91", "e1848fe185a4e186b0"],
- ["ecbb91", "ecbb88e186b0"],
- ["ecbb92", "e1848fe185a4e186b1"],
- ["ecbb92", "ecbb88e186b1"],
- ["ecbb93", "e1848fe185a4e186b2"],
- ["ecbb93", "ecbb88e186b2"],
- ["ecbb94", "e1848fe185a4e186b3"],
- ["ecbb94", "ecbb88e186b3"],
- ["ecbb95", "e1848fe185a4e186b4"],
- ["ecbb95", "ecbb88e186b4"],
- ["ecbb96", "e1848fe185a4e186b5"],
- ["ecbb96", "ecbb88e186b5"],
- ["ecbb97", "e1848fe185a4e186b6"],
- ["ecbb97", "ecbb88e186b6"],
- ["ecbb98", "e1848fe185a4e186b7"],
- ["ecbb98", "ecbb88e186b7"],
- ["ecbb99", "e1848fe185a4e186b8"],
- ["ecbb99", "ecbb88e186b8"],
- ["ecbb9a", "e1848fe185a4e186b9"],
- ["ecbb9a", "ecbb88e186b9"],
- ["ecbb9b", "e1848fe185a4e186ba"],
- ["ecbb9b", "ecbb88e186ba"],
- ["ecbb9c", "e1848fe185a4e186bb"],
- ["ecbb9c", "ecbb88e186bb"],
- ["ecbb9d", "e1848fe185a4e186bc"],
- ["ecbb9d", "ecbb88e186bc"],
- ["ecbb9e", "e1848fe185a4e186bd"],
- ["ecbb9e", "ecbb88e186bd"],
- ["ecbb9f", "e1848fe185a4e186be"],
- ["ecbb9f", "ecbb88e186be"],
- ["ecbba0", "e1848fe185a4e186bf"],
- ["ecbba0", "ecbb88e186bf"],
- ["ecbba1", "e1848fe185a4e18780"],
- ["ecbba1", "ecbb88e18780"],
- ["ecbba2", "e1848fe185a4e18781"],
- ["ecbba2", "ecbb88e18781"],
- ["ecbba3", "e1848fe185a4e18782"],
- ["ecbba3", "ecbb88e18782"],
- ["ecbba4", "e1848fe185a5"],
- ["ecbba5", "e1848fe185a5e186a8"],
- ["ecbba5", "ecbba4e186a8"],
- ["ecbba6", "e1848fe185a5e186a9"],
- ["ecbba6", "ecbba4e186a9"],
- ["ecbba7", "e1848fe185a5e186aa"],
- ["ecbba7", "ecbba4e186aa"],
- ["ecbba8", "e1848fe185a5e186ab"],
- ["ecbba8", "ecbba4e186ab"],
- ["ecbba9", "e1848fe185a5e186ac"],
- ["ecbba9", "ecbba4e186ac"],
- ["ecbbaa", "e1848fe185a5e186ad"],
- ["ecbbaa", "ecbba4e186ad"],
- ["ecbbab", "e1848fe185a5e186ae"],
- ["ecbbab", "ecbba4e186ae"],
- ["ecbbac", "e1848fe185a5e186af"],
- ["ecbbac", "ecbba4e186af"],
- ["ecbbad", "e1848fe185a5e186b0"],
- ["ecbbad", "ecbba4e186b0"],
- ["ecbbae", "e1848fe185a5e186b1"],
- ["ecbbae", "ecbba4e186b1"],
- ["ecbbaf", "e1848fe185a5e186b2"],
- ["ecbbaf", "ecbba4e186b2"],
- ["ecbbb0", "e1848fe185a5e186b3"],
- ["ecbbb0", "ecbba4e186b3"],
- ["ecbbb1", "e1848fe185a5e186b4"],
- ["ecbbb1", "ecbba4e186b4"],
- ["ecbbb2", "e1848fe185a5e186b5"],
- ["ecbbb2", "ecbba4e186b5"],
- ["ecbbb3", "e1848fe185a5e186b6"],
- ["ecbbb3", "ecbba4e186b6"],
- ["ecbbb4", "e1848fe185a5e186b7"],
- ["ecbbb4", "ecbba4e186b7"],
- ["ecbbb5", "e1848fe185a5e186b8"],
- ["ecbbb5", "ecbba4e186b8"],
- ["ecbbb6", "e1848fe185a5e186b9"],
- ["ecbbb6", "ecbba4e186b9"],
- ["ecbbb7", "e1848fe185a5e186ba"],
- ["ecbbb7", "ecbba4e186ba"],
- ["ecbbb8", "e1848fe185a5e186bb"],
- ["ecbbb8", "ecbba4e186bb"],
- ["ecbbb9", "e1848fe185a5e186bc"],
- ["ecbbb9", "ecbba4e186bc"],
- ["ecbbba", "e1848fe185a5e186bd"],
- ["ecbbba", "ecbba4e186bd"],
- ["ecbbbb", "e1848fe185a5e186be"],
- ["ecbbbb", "ecbba4e186be"],
- ["ecbbbc", "e1848fe185a5e186bf"],
- ["ecbbbc", "ecbba4e186bf"],
- ["ecbbbd", "e1848fe185a5e18780"],
- ["ecbbbd", "ecbba4e18780"],
- ["ecbbbe", "e1848fe185a5e18781"],
- ["ecbbbe", "ecbba4e18781"],
- ["ecbbbf", "e1848fe185a5e18782"],
- ["ecbbbf", "ecbba4e18782"],
- ["ecbc80", "e1848fe185a6"],
- ["ecbc81", "e1848fe185a6e186a8"],
- ["ecbc81", "ecbc80e186a8"],
- ["ecbc82", "e1848fe185a6e186a9"],
- ["ecbc82", "ecbc80e186a9"],
- ["ecbc83", "e1848fe185a6e186aa"],
- ["ecbc83", "ecbc80e186aa"],
- ["ecbc84", "e1848fe185a6e186ab"],
- ["ecbc84", "ecbc80e186ab"],
- ["ecbc85", "e1848fe185a6e186ac"],
- ["ecbc85", "ecbc80e186ac"],
- ["ecbc86", "e1848fe185a6e186ad"],
- ["ecbc86", "ecbc80e186ad"],
- ["ecbc87", "e1848fe185a6e186ae"],
- ["ecbc87", "ecbc80e186ae"],
- ["ecbc88", "e1848fe185a6e186af"],
- ["ecbc88", "ecbc80e186af"],
- ["ecbc89", "e1848fe185a6e186b0"],
- ["ecbc89", "ecbc80e186b0"],
- ["ecbc8a", "e1848fe185a6e186b1"],
- ["ecbc8a", "ecbc80e186b1"],
- ["ecbc8b", "e1848fe185a6e186b2"],
- ["ecbc8b", "ecbc80e186b2"],
- ["ecbc8c", "e1848fe185a6e186b3"],
- ["ecbc8c", "ecbc80e186b3"],
- ["ecbc8d", "e1848fe185a6e186b4"],
- ["ecbc8d", "ecbc80e186b4"],
- ["ecbc8e", "e1848fe185a6e186b5"],
- ["ecbc8e", "ecbc80e186b5"],
- ["ecbc8f", "e1848fe185a6e186b6"],
- ["ecbc8f", "ecbc80e186b6"],
- ["ecbc90", "e1848fe185a6e186b7"],
- ["ecbc90", "ecbc80e186b7"],
- ["ecbc91", "e1848fe185a6e186b8"],
- ["ecbc91", "ecbc80e186b8"],
- ["ecbc92", "e1848fe185a6e186b9"],
- ["ecbc92", "ecbc80e186b9"],
- ["ecbc93", "e1848fe185a6e186ba"],
- ["ecbc93", "ecbc80e186ba"],
- ["ecbc94", "e1848fe185a6e186bb"],
- ["ecbc94", "ecbc80e186bb"],
- ["ecbc95", "e1848fe185a6e186bc"],
- ["ecbc95", "ecbc80e186bc"],
- ["ecbc96", "e1848fe185a6e186bd"],
- ["ecbc96", "ecbc80e186bd"],
- ["ecbc97", "e1848fe185a6e186be"],
- ["ecbc97", "ecbc80e186be"],
- ["ecbc98", "e1848fe185a6e186bf"],
- ["ecbc98", "ecbc80e186bf"],
- ["ecbc99", "e1848fe185a6e18780"],
- ["ecbc99", "ecbc80e18780"],
- ["ecbc9a", "e1848fe185a6e18781"],
- ["ecbc9a", "ecbc80e18781"],
- ["ecbc9b", "e1848fe185a6e18782"],
- ["ecbc9b", "ecbc80e18782"],
- ["ecbc9c", "e1848fe185a7"],
- ["ecbc9d", "e1848fe185a7e186a8"],
- ["ecbc9d", "ecbc9ce186a8"],
- ["ecbc9e", "e1848fe185a7e186a9"],
- ["ecbc9e", "ecbc9ce186a9"],
- ["ecbc9f", "e1848fe185a7e186aa"],
- ["ecbc9f", "ecbc9ce186aa"],
- ["ecbca0", "e1848fe185a7e186ab"],
- ["ecbca0", "ecbc9ce186ab"],
- ["ecbca1", "e1848fe185a7e186ac"],
- ["ecbca1", "ecbc9ce186ac"],
- ["ecbca2", "e1848fe185a7e186ad"],
- ["ecbca2", "ecbc9ce186ad"],
- ["ecbca3", "e1848fe185a7e186ae"],
- ["ecbca3", "ecbc9ce186ae"],
- ["ecbca4", "e1848fe185a7e186af"],
- ["ecbca4", "ecbc9ce186af"],
- ["ecbca5", "e1848fe185a7e186b0"],
- ["ecbca5", "ecbc9ce186b0"],
- ["ecbca6", "e1848fe185a7e186b1"],
- ["ecbca6", "ecbc9ce186b1"],
- ["ecbca7", "e1848fe185a7e186b2"],
- ["ecbca7", "ecbc9ce186b2"],
- ["ecbca8", "e1848fe185a7e186b3"],
- ["ecbca8", "ecbc9ce186b3"],
- ["ecbca9", "e1848fe185a7e186b4"],
- ["ecbca9", "ecbc9ce186b4"],
- ["ecbcaa", "e1848fe185a7e186b5"],
- ["ecbcaa", "ecbc9ce186b5"],
- ["ecbcab", "e1848fe185a7e186b6"],
- ["ecbcab", "ecbc9ce186b6"],
- ["ecbcac", "e1848fe185a7e186b7"],
- ["ecbcac", "ecbc9ce186b7"],
- ["ecbcad", "e1848fe185a7e186b8"],
- ["ecbcad", "ecbc9ce186b8"],
- ["ecbcae", "e1848fe185a7e186b9"],
- ["ecbcae", "ecbc9ce186b9"],
- ["ecbcaf", "e1848fe185a7e186ba"],
- ["ecbcaf", "ecbc9ce186ba"],
- ["ecbcb0", "e1848fe185a7e186bb"],
- ["ecbcb0", "ecbc9ce186bb"],
- ["ecbcb1", "e1848fe185a7e186bc"],
- ["ecbcb1", "ecbc9ce186bc"],
- ["ecbcb2", "e1848fe185a7e186bd"],
- ["ecbcb2", "ecbc9ce186bd"],
- ["ecbcb3", "e1848fe185a7e186be"],
- ["ecbcb3", "ecbc9ce186be"],
- ["ecbcb4", "e1848fe185a7e186bf"],
- ["ecbcb4", "ecbc9ce186bf"],
- ["ecbcb5", "e1848fe185a7e18780"],
- ["ecbcb5", "ecbc9ce18780"],
- ["ecbcb6", "e1848fe185a7e18781"],
- ["ecbcb6", "ecbc9ce18781"],
- ["ecbcb7", "e1848fe185a7e18782"],
- ["ecbcb7", "ecbc9ce18782"],
- ["ecbcb8", "e1848fe185a8"],
- ["ecbcb9", "e1848fe185a8e186a8"],
- ["ecbcb9", "ecbcb8e186a8"],
- ["ecbcba", "e1848fe185a8e186a9"],
- ["ecbcba", "ecbcb8e186a9"],
- ["ecbcbb", "e1848fe185a8e186aa"],
- ["ecbcbb", "ecbcb8e186aa"],
- ["ecbcbc", "e1848fe185a8e186ab"],
- ["ecbcbc", "ecbcb8e186ab"],
- ["ecbcbd", "e1848fe185a8e186ac"],
- ["ecbcbd", "ecbcb8e186ac"],
- ["ecbcbe", "e1848fe185a8e186ad"],
- ["ecbcbe", "ecbcb8e186ad"],
- ["ecbcbf", "e1848fe185a8e186ae"],
- ["ecbcbf", "ecbcb8e186ae"],
- ["ecbd80", "e1848fe185a8e186af"],
- ["ecbd80", "ecbcb8e186af"],
- ["ecbd81", "e1848fe185a8e186b0"],
- ["ecbd81", "ecbcb8e186b0"],
- ["ecbd82", "e1848fe185a8e186b1"],
- ["ecbd82", "ecbcb8e186b1"],
- ["ecbd83", "e1848fe185a8e186b2"],
- ["ecbd83", "ecbcb8e186b2"],
- ["ecbd84", "e1848fe185a8e186b3"],
- ["ecbd84", "ecbcb8e186b3"],
- ["ecbd85", "e1848fe185a8e186b4"],
- ["ecbd85", "ecbcb8e186b4"],
- ["ecbd86", "e1848fe185a8e186b5"],
- ["ecbd86", "ecbcb8e186b5"],
- ["ecbd87", "e1848fe185a8e186b6"],
- ["ecbd87", "ecbcb8e186b6"],
- ["ecbd88", "e1848fe185a8e186b7"],
- ["ecbd88", "ecbcb8e186b7"],
- ["ecbd89", "e1848fe185a8e186b8"],
- ["ecbd89", "ecbcb8e186b8"],
- ["ecbd8a", "e1848fe185a8e186b9"],
- ["ecbd8a", "ecbcb8e186b9"],
- ["ecbd8b", "e1848fe185a8e186ba"],
- ["ecbd8b", "ecbcb8e186ba"],
- ["ecbd8c", "e1848fe185a8e186bb"],
- ["ecbd8c", "ecbcb8e186bb"],
- ["ecbd8d", "e1848fe185a8e186bc"],
- ["ecbd8d", "ecbcb8e186bc"],
- ["ecbd8e", "e1848fe185a8e186bd"],
- ["ecbd8e", "ecbcb8e186bd"],
- ["ecbd8f", "e1848fe185a8e186be"],
- ["ecbd8f", "ecbcb8e186be"],
- ["ecbd90", "e1848fe185a8e186bf"],
- ["ecbd90", "ecbcb8e186bf"],
- ["ecbd91", "e1848fe185a8e18780"],
- ["ecbd91", "ecbcb8e18780"],
- ["ecbd92", "e1848fe185a8e18781"],
- ["ecbd92", "ecbcb8e18781"],
- ["ecbd93", "e1848fe185a8e18782"],
- ["ecbd93", "ecbcb8e18782"],
- ["ecbd94", "e1848fe185a9"],
- ["ecbd95", "e1848fe185a9e186a8"],
- ["ecbd95", "ecbd94e186a8"],
- ["ecbd96", "e1848fe185a9e186a9"],
- ["ecbd96", "ecbd94e186a9"],
- ["ecbd97", "e1848fe185a9e186aa"],
- ["ecbd97", "ecbd94e186aa"],
- ["ecbd98", "e1848fe185a9e186ab"],
- ["ecbd98", "ecbd94e186ab"],
- ["ecbd99", "e1848fe185a9e186ac"],
- ["ecbd99", "ecbd94e186ac"],
- ["ecbd9a", "e1848fe185a9e186ad"],
- ["ecbd9a", "ecbd94e186ad"],
- ["ecbd9b", "e1848fe185a9e186ae"],
- ["ecbd9b", "ecbd94e186ae"],
- ["ecbd9c", "e1848fe185a9e186af"],
- ["ecbd9c", "ecbd94e186af"],
- ["ecbd9d", "e1848fe185a9e186b0"],
- ["ecbd9d", "ecbd94e186b0"],
- ["ecbd9e", "e1848fe185a9e186b1"],
- ["ecbd9e", "ecbd94e186b1"],
- ["ecbd9f", "e1848fe185a9e186b2"],
- ["ecbd9f", "ecbd94e186b2"],
- ["ecbda0", "e1848fe185a9e186b3"],
- ["ecbda0", "ecbd94e186b3"],
- ["ecbda1", "e1848fe185a9e186b4"],
- ["ecbda1", "ecbd94e186b4"],
- ["ecbda2", "e1848fe185a9e186b5"],
- ["ecbda2", "ecbd94e186b5"],
- ["ecbda3", "e1848fe185a9e186b6"],
- ["ecbda3", "ecbd94e186b6"],
- ["ecbda4", "e1848fe185a9e186b7"],
- ["ecbda4", "ecbd94e186b7"],
- ["ecbda5", "e1848fe185a9e186b8"],
- ["ecbda5", "ecbd94e186b8"],
- ["ecbda6", "e1848fe185a9e186b9"],
- ["ecbda6", "ecbd94e186b9"],
- ["ecbda7", "e1848fe185a9e186ba"],
- ["ecbda7", "ecbd94e186ba"],
- ["ecbda8", "e1848fe185a9e186bb"],
- ["ecbda8", "ecbd94e186bb"],
- ["ecbda9", "e1848fe185a9e186bc"],
- ["ecbda9", "ecbd94e186bc"],
- ["ecbdaa", "e1848fe185a9e186bd"],
- ["ecbdaa", "ecbd94e186bd"],
- ["ecbdab", "e1848fe185a9e186be"],
- ["ecbdab", "ecbd94e186be"],
- ["ecbdac", "e1848fe185a9e186bf"],
- ["ecbdac", "ecbd94e186bf"],
- ["ecbdad", "e1848fe185a9e18780"],
- ["ecbdad", "ecbd94e18780"],
- ["ecbdae", "e1848fe185a9e18781"],
- ["ecbdae", "ecbd94e18781"],
- ["ecbdaf", "e1848fe185a9e18782"],
- ["ecbdaf", "ecbd94e18782"],
- ["ecbdb0", "e1848fe185aa"],
- ["ecbdb1", "e1848fe185aae186a8"],
- ["ecbdb1", "ecbdb0e186a8"],
- ["ecbdb2", "e1848fe185aae186a9"],
- ["ecbdb2", "ecbdb0e186a9"],
- ["ecbdb3", "e1848fe185aae186aa"],
- ["ecbdb3", "ecbdb0e186aa"],
- ["ecbdb4", "e1848fe185aae186ab"],
- ["ecbdb4", "ecbdb0e186ab"],
- ["ecbdb5", "e1848fe185aae186ac"],
- ["ecbdb5", "ecbdb0e186ac"],
- ["ecbdb6", "e1848fe185aae186ad"],
- ["ecbdb6", "ecbdb0e186ad"],
- ["ecbdb7", "e1848fe185aae186ae"],
- ["ecbdb7", "ecbdb0e186ae"],
- ["ecbdb8", "e1848fe185aae186af"],
- ["ecbdb8", "ecbdb0e186af"],
- ["ecbdb9", "e1848fe185aae186b0"],
- ["ecbdb9", "ecbdb0e186b0"],
- ["ecbdba", "e1848fe185aae186b1"],
- ["ecbdba", "ecbdb0e186b1"],
- ["ecbdbb", "e1848fe185aae186b2"],
- ["ecbdbb", "ecbdb0e186b2"],
- ["ecbdbc", "e1848fe185aae186b3"],
- ["ecbdbc", "ecbdb0e186b3"],
- ["ecbdbd", "e1848fe185aae186b4"],
- ["ecbdbd", "ecbdb0e186b4"],
- ["ecbdbe", "e1848fe185aae186b5"],
- ["ecbdbe", "ecbdb0e186b5"],
- ["ecbdbf", "e1848fe185aae186b6"],
- ["ecbdbf", "ecbdb0e186b6"],
- ["ecbe80", "e1848fe185aae186b7"],
- ["ecbe80", "ecbdb0e186b7"],
- ["ecbe81", "e1848fe185aae186b8"],
- ["ecbe81", "ecbdb0e186b8"],
- ["ecbe82", "e1848fe185aae186b9"],
- ["ecbe82", "ecbdb0e186b9"],
- ["ecbe83", "e1848fe185aae186ba"],
- ["ecbe83", "ecbdb0e186ba"],
- ["ecbe84", "e1848fe185aae186bb"],
- ["ecbe84", "ecbdb0e186bb"],
- ["ecbe85", "e1848fe185aae186bc"],
- ["ecbe85", "ecbdb0e186bc"],
- ["ecbe86", "e1848fe185aae186bd"],
- ["ecbe86", "ecbdb0e186bd"],
- ["ecbe87", "e1848fe185aae186be"],
- ["ecbe87", "ecbdb0e186be"],
- ["ecbe88", "e1848fe185aae186bf"],
- ["ecbe88", "ecbdb0e186bf"],
- ["ecbe89", "e1848fe185aae18780"],
- ["ecbe89", "ecbdb0e18780"],
- ["ecbe8a", "e1848fe185aae18781"],
- ["ecbe8a", "ecbdb0e18781"],
- ["ecbe8b", "e1848fe185aae18782"],
- ["ecbe8b", "ecbdb0e18782"],
- ["ecbe8c", "e1848fe185ab"],
- ["ecbe8d", "e1848fe185abe186a8"],
- ["ecbe8d", "ecbe8ce186a8"],
- ["ecbe8e", "e1848fe185abe186a9"],
- ["ecbe8e", "ecbe8ce186a9"],
- ["ecbe8f", "e1848fe185abe186aa"],
- ["ecbe8f", "ecbe8ce186aa"],
- ["ecbe90", "e1848fe185abe186ab"],
- ["ecbe90", "ecbe8ce186ab"],
- ["ecbe91", "e1848fe185abe186ac"],
- ["ecbe91", "ecbe8ce186ac"],
- ["ecbe92", "e1848fe185abe186ad"],
- ["ecbe92", "ecbe8ce186ad"],
- ["ecbe93", "e1848fe185abe186ae"],
- ["ecbe93", "ecbe8ce186ae"],
- ["ecbe94", "e1848fe185abe186af"],
- ["ecbe94", "ecbe8ce186af"],
- ["ecbe95", "e1848fe185abe186b0"],
- ["ecbe95", "ecbe8ce186b0"],
- ["ecbe96", "e1848fe185abe186b1"],
- ["ecbe96", "ecbe8ce186b1"],
- ["ecbe97", "e1848fe185abe186b2"],
- ["ecbe97", "ecbe8ce186b2"],
- ["ecbe98", "e1848fe185abe186b3"],
- ["ecbe98", "ecbe8ce186b3"],
- ["ecbe99", "e1848fe185abe186b4"],
- ["ecbe99", "ecbe8ce186b4"],
- ["ecbe9a", "e1848fe185abe186b5"],
- ["ecbe9a", "ecbe8ce186b5"],
- ["ecbe9b", "e1848fe185abe186b6"],
- ["ecbe9b", "ecbe8ce186b6"],
- ["ecbe9c", "e1848fe185abe186b7"],
- ["ecbe9c", "ecbe8ce186b7"],
- ["ecbe9d", "e1848fe185abe186b8"],
- ["ecbe9d", "ecbe8ce186b8"],
- ["ecbe9e", "e1848fe185abe186b9"],
- ["ecbe9e", "ecbe8ce186b9"],
- ["ecbe9f", "e1848fe185abe186ba"],
- ["ecbe9f", "ecbe8ce186ba"],
- ["ecbea0", "e1848fe185abe186bb"],
- ["ecbea0", "ecbe8ce186bb"],
- ["ecbea1", "e1848fe185abe186bc"],
- ["ecbea1", "ecbe8ce186bc"],
- ["ecbea2", "e1848fe185abe186bd"],
- ["ecbea2", "ecbe8ce186bd"],
- ["ecbea3", "e1848fe185abe186be"],
- ["ecbea3", "ecbe8ce186be"],
- ["ecbea4", "e1848fe185abe186bf"],
- ["ecbea4", "ecbe8ce186bf"],
- ["ecbea5", "e1848fe185abe18780"],
- ["ecbea5", "ecbe8ce18780"],
- ["ecbea6", "e1848fe185abe18781"],
- ["ecbea6", "ecbe8ce18781"],
- ["ecbea7", "e1848fe185abe18782"],
- ["ecbea7", "ecbe8ce18782"],
- ["ecbea8", "e1848fe185ac"],
- ["ecbea9", "e1848fe185ace186a8"],
- ["ecbea9", "ecbea8e186a8"],
- ["ecbeaa", "e1848fe185ace186a9"],
- ["ecbeaa", "ecbea8e186a9"],
- ["ecbeab", "e1848fe185ace186aa"],
- ["ecbeab", "ecbea8e186aa"],
- ["ecbeac", "e1848fe185ace186ab"],
- ["ecbeac", "ecbea8e186ab"],
- ["ecbead", "e1848fe185ace186ac"],
- ["ecbead", "ecbea8e186ac"],
- ["ecbeae", "e1848fe185ace186ad"],
- ["ecbeae", "ecbea8e186ad"],
- ["ecbeaf", "e1848fe185ace186ae"],
- ["ecbeaf", "ecbea8e186ae"],
- ["ecbeb0", "e1848fe185ace186af"],
- ["ecbeb0", "ecbea8e186af"],
- ["ecbeb1", "e1848fe185ace186b0"],
- ["ecbeb1", "ecbea8e186b0"],
- ["ecbeb2", "e1848fe185ace186b1"],
- ["ecbeb2", "ecbea8e186b1"],
- ["ecbeb3", "e1848fe185ace186b2"],
- ["ecbeb3", "ecbea8e186b2"],
- ["ecbeb4", "e1848fe185ace186b3"],
- ["ecbeb4", "ecbea8e186b3"],
- ["ecbeb5", "e1848fe185ace186b4"],
- ["ecbeb5", "ecbea8e186b4"],
- ["ecbeb6", "e1848fe185ace186b5"],
- ["ecbeb6", "ecbea8e186b5"],
- ["ecbeb7", "e1848fe185ace186b6"],
- ["ecbeb7", "ecbea8e186b6"],
- ["ecbeb8", "e1848fe185ace186b7"],
- ["ecbeb8", "ecbea8e186b7"],
- ["ecbeb9", "e1848fe185ace186b8"],
- ["ecbeb9", "ecbea8e186b8"],
- ["ecbeba", "e1848fe185ace186b9"],
- ["ecbeba", "ecbea8e186b9"],
- ["ecbebb", "e1848fe185ace186ba"],
- ["ecbebb", "ecbea8e186ba"],
- ["ecbebc", "e1848fe185ace186bb"],
- ["ecbebc", "ecbea8e186bb"],
- ["ecbebd", "e1848fe185ace186bc"],
- ["ecbebd", "ecbea8e186bc"],
- ["ecbebe", "e1848fe185ace186bd"],
- ["ecbebe", "ecbea8e186bd"],
- ["ecbebf", "e1848fe185ace186be"],
- ["ecbebf", "ecbea8e186be"],
- ["ecbf80", "e1848fe185ace186bf"],
- ["ecbf80", "ecbea8e186bf"],
- ["ecbf81", "e1848fe185ace18780"],
- ["ecbf81", "ecbea8e18780"],
- ["ecbf82", "e1848fe185ace18781"],
- ["ecbf82", "ecbea8e18781"],
- ["ecbf83", "e1848fe185ace18782"],
- ["ecbf83", "ecbea8e18782"],
- ["ecbf84", "e1848fe185ad"],
- ["ecbf85", "e1848fe185ade186a8"],
- ["ecbf85", "ecbf84e186a8"],
- ["ecbf86", "e1848fe185ade186a9"],
- ["ecbf86", "ecbf84e186a9"],
- ["ecbf87", "e1848fe185ade186aa"],
- ["ecbf87", "ecbf84e186aa"],
- ["ecbf88", "e1848fe185ade186ab"],
- ["ecbf88", "ecbf84e186ab"],
- ["ecbf89", "e1848fe185ade186ac"],
- ["ecbf89", "ecbf84e186ac"],
- ["ecbf8a", "e1848fe185ade186ad"],
- ["ecbf8a", "ecbf84e186ad"],
- ["ecbf8b", "e1848fe185ade186ae"],
- ["ecbf8b", "ecbf84e186ae"],
- ["ecbf8c", "e1848fe185ade186af"],
- ["ecbf8c", "ecbf84e186af"],
- ["ecbf8d", "e1848fe185ade186b0"],
- ["ecbf8d", "ecbf84e186b0"],
- ["ecbf8e", "e1848fe185ade186b1"],
- ["ecbf8e", "ecbf84e186b1"],
- ["ecbf8f", "e1848fe185ade186b2"],
- ["ecbf8f", "ecbf84e186b2"],
- ["ecbf90", "e1848fe185ade186b3"],
- ["ecbf90", "ecbf84e186b3"],
- ["ecbf91", "e1848fe185ade186b4"],
- ["ecbf91", "ecbf84e186b4"],
- ["ecbf92", "e1848fe185ade186b5"],
- ["ecbf92", "ecbf84e186b5"],
- ["ecbf93", "e1848fe185ade186b6"],
- ["ecbf93", "ecbf84e186b6"],
- ["ecbf94", "e1848fe185ade186b7"],
- ["ecbf94", "ecbf84e186b7"],
- ["ecbf95", "e1848fe185ade186b8"],
- ["ecbf95", "ecbf84e186b8"],
- ["ecbf96", "e1848fe185ade186b9"],
- ["ecbf96", "ecbf84e186b9"],
- ["ecbf97", "e1848fe185ade186ba"],
- ["ecbf97", "ecbf84e186ba"],
- ["ecbf98", "e1848fe185ade186bb"],
- ["ecbf98", "ecbf84e186bb"],
- ["ecbf99", "e1848fe185ade186bc"],
- ["ecbf99", "ecbf84e186bc"],
- ["ecbf9a", "e1848fe185ade186bd"],
- ["ecbf9a", "ecbf84e186bd"],
- ["ecbf9b", "e1848fe185ade186be"],
- ["ecbf9b", "ecbf84e186be"],
- ["ecbf9c", "e1848fe185ade186bf"],
- ["ecbf9c", "ecbf84e186bf"],
- ["ecbf9d", "e1848fe185ade18780"],
- ["ecbf9d", "ecbf84e18780"],
- ["ecbf9e", "e1848fe185ade18781"],
- ["ecbf9e", "ecbf84e18781"],
- ["ecbf9f", "e1848fe185ade18782"],
- ["ecbf9f", "ecbf84e18782"],
- ["ecbfa0", "e1848fe185ae"],
- ["ecbfa1", "e1848fe185aee186a8"],
- ["ecbfa1", "ecbfa0e186a8"],
- ["ecbfa2", "e1848fe185aee186a9"],
- ["ecbfa2", "ecbfa0e186a9"],
- ["ecbfa3", "e1848fe185aee186aa"],
- ["ecbfa3", "ecbfa0e186aa"],
- ["ecbfa4", "e1848fe185aee186ab"],
- ["ecbfa4", "ecbfa0e186ab"],
- ["ecbfa5", "e1848fe185aee186ac"],
- ["ecbfa5", "ecbfa0e186ac"],
- ["ecbfa6", "e1848fe185aee186ad"],
- ["ecbfa6", "ecbfa0e186ad"],
- ["ecbfa7", "e1848fe185aee186ae"],
- ["ecbfa7", "ecbfa0e186ae"],
- ["ecbfa8", "e1848fe185aee186af"],
- ["ecbfa8", "ecbfa0e186af"],
- ["ecbfa9", "e1848fe185aee186b0"],
- ["ecbfa9", "ecbfa0e186b0"],
- ["ecbfaa", "e1848fe185aee186b1"],
- ["ecbfaa", "ecbfa0e186b1"],
- ["ecbfab", "e1848fe185aee186b2"],
- ["ecbfab", "ecbfa0e186b2"],
- ["ecbfac", "e1848fe185aee186b3"],
- ["ecbfac", "ecbfa0e186b3"],
- ["ecbfad", "e1848fe185aee186b4"],
- ["ecbfad", "ecbfa0e186b4"],
- ["ecbfae", "e1848fe185aee186b5"],
- ["ecbfae", "ecbfa0e186b5"],
- ["ecbfaf", "e1848fe185aee186b6"],
- ["ecbfaf", "ecbfa0e186b6"],
- ["ecbfb0", "e1848fe185aee186b7"],
- ["ecbfb0", "ecbfa0e186b7"],
- ["ecbfb1", "e1848fe185aee186b8"],
- ["ecbfb1", "ecbfa0e186b8"],
- ["ecbfb2", "e1848fe185aee186b9"],
- ["ecbfb2", "ecbfa0e186b9"],
- ["ecbfb3", "e1848fe185aee186ba"],
- ["ecbfb3", "ecbfa0e186ba"],
- ["ecbfb4", "e1848fe185aee186bb"],
- ["ecbfb4", "ecbfa0e186bb"],
- ["ecbfb5", "e1848fe185aee186bc"],
- ["ecbfb5", "ecbfa0e186bc"],
- ["ecbfb6", "e1848fe185aee186bd"],
- ["ecbfb6", "ecbfa0e186bd"],
- ["ecbfb7", "e1848fe185aee186be"],
- ["ecbfb7", "ecbfa0e186be"],
- ["ecbfb8", "e1848fe185aee186bf"],
- ["ecbfb8", "ecbfa0e186bf"],
- ["ecbfb9", "e1848fe185aee18780"],
- ["ecbfb9", "ecbfa0e18780"],
- ["ecbfba", "e1848fe185aee18781"],
- ["ecbfba", "ecbfa0e18781"],
- ["ecbfbb", "e1848fe185aee18782"],
- ["ecbfbb", "ecbfa0e18782"],
- ["ecbfbc", "e1848fe185af"],
- ["ecbfbd", "e1848fe185afe186a8"],
- ["ecbfbd", "ecbfbce186a8"],
- ["ecbfbe", "e1848fe185afe186a9"],
- ["ecbfbe", "ecbfbce186a9"],
- ["ecbfbf", "e1848fe185afe186aa"],
- ["ecbfbf", "ecbfbce186aa"],
- ["ed8080", "e1848fe185afe186ab"],
- ["ed8080", "ecbfbce186ab"],
- ["ed8081", "e1848fe185afe186ac"],
- ["ed8081", "ecbfbce186ac"],
- ["ed8082", "e1848fe185afe186ad"],
- ["ed8082", "ecbfbce186ad"],
- ["ed8083", "e1848fe185afe186ae"],
- ["ed8083", "ecbfbce186ae"],
- ["ed8084", "e1848fe185afe186af"],
- ["ed8084", "ecbfbce186af"],
- ["ed8085", "e1848fe185afe186b0"],
- ["ed8085", "ecbfbce186b0"],
- ["ed8086", "e1848fe185afe186b1"],
- ["ed8086", "ecbfbce186b1"],
- ["ed8087", "e1848fe185afe186b2"],
- ["ed8087", "ecbfbce186b2"],
- ["ed8088", "e1848fe185afe186b3"],
- ["ed8088", "ecbfbce186b3"],
- ["ed8089", "e1848fe185afe186b4"],
- ["ed8089", "ecbfbce186b4"],
- ["ed808a", "e1848fe185afe186b5"],
- ["ed808a", "ecbfbce186b5"],
- ["ed808b", "e1848fe185afe186b6"],
- ["ed808b", "ecbfbce186b6"],
- ["ed808c", "e1848fe185afe186b7"],
- ["ed808c", "ecbfbce186b7"],
- ["ed808d", "e1848fe185afe186b8"],
- ["ed808d", "ecbfbce186b8"],
- ["ed808e", "e1848fe185afe186b9"],
- ["ed808e", "ecbfbce186b9"],
- ["ed808f", "e1848fe185afe186ba"],
- ["ed808f", "ecbfbce186ba"],
- ["ed8090", "e1848fe185afe186bb"],
- ["ed8090", "ecbfbce186bb"],
- ["ed8091", "e1848fe185afe186bc"],
- ["ed8091", "ecbfbce186bc"],
- ["ed8092", "e1848fe185afe186bd"],
- ["ed8092", "ecbfbce186bd"],
- ["ed8093", "e1848fe185afe186be"],
- ["ed8093", "ecbfbce186be"],
- ["ed8094", "e1848fe185afe186bf"],
- ["ed8094", "ecbfbce186bf"],
- ["ed8095", "e1848fe185afe18780"],
- ["ed8095", "ecbfbce18780"],
- ["ed8096", "e1848fe185afe18781"],
- ["ed8096", "ecbfbce18781"],
- ["ed8097", "e1848fe185afe18782"],
- ["ed8097", "ecbfbce18782"],
- ["ed8098", "e1848fe185b0"],
- ["ed8099", "e1848fe185b0e186a8"],
- ["ed8099", "ed8098e186a8"],
- ["ed809a", "e1848fe185b0e186a9"],
- ["ed809a", "ed8098e186a9"],
- ["ed809b", "e1848fe185b0e186aa"],
- ["ed809b", "ed8098e186aa"],
- ["ed809c", "e1848fe185b0e186ab"],
- ["ed809c", "ed8098e186ab"],
- ["ed809d", "e1848fe185b0e186ac"],
- ["ed809d", "ed8098e186ac"],
- ["ed809e", "e1848fe185b0e186ad"],
- ["ed809e", "ed8098e186ad"],
- ["ed809f", "e1848fe185b0e186ae"],
- ["ed809f", "ed8098e186ae"],
- ["ed80a0", "e1848fe185b0e186af"],
- ["ed80a0", "ed8098e186af"],
- ["ed80a1", "e1848fe185b0e186b0"],
- ["ed80a1", "ed8098e186b0"],
- ["ed80a2", "e1848fe185b0e186b1"],
- ["ed80a2", "ed8098e186b1"],
- ["ed80a3", "e1848fe185b0e186b2"],
- ["ed80a3", "ed8098e186b2"],
- ["ed80a4", "e1848fe185b0e186b3"],
- ["ed80a4", "ed8098e186b3"],
- ["ed80a5", "e1848fe185b0e186b4"],
- ["ed80a5", "ed8098e186b4"],
- ["ed80a6", "e1848fe185b0e186b5"],
- ["ed80a6", "ed8098e186b5"],
- ["ed80a7", "e1848fe185b0e186b6"],
- ["ed80a7", "ed8098e186b6"],
- ["ed80a8", "e1848fe185b0e186b7"],
- ["ed80a8", "ed8098e186b7"],
- ["ed80a9", "e1848fe185b0e186b8"],
- ["ed80a9", "ed8098e186b8"],
- ["ed80aa", "e1848fe185b0e186b9"],
- ["ed80aa", "ed8098e186b9"],
- ["ed80ab", "e1848fe185b0e186ba"],
- ["ed80ab", "ed8098e186ba"],
- ["ed80ac", "e1848fe185b0e186bb"],
- ["ed80ac", "ed8098e186bb"],
- ["ed80ad", "e1848fe185b0e186bc"],
- ["ed80ad", "ed8098e186bc"],
- ["ed80ae", "e1848fe185b0e186bd"],
- ["ed80ae", "ed8098e186bd"],
- ["ed80af", "e1848fe185b0e186be"],
- ["ed80af", "ed8098e186be"],
- ["ed80b0", "e1848fe185b0e186bf"],
- ["ed80b0", "ed8098e186bf"],
- ["ed80b1", "e1848fe185b0e18780"],
- ["ed80b1", "ed8098e18780"],
- ["ed80b2", "e1848fe185b0e18781"],
- ["ed80b2", "ed8098e18781"],
- ["ed80b3", "e1848fe185b0e18782"],
- ["ed80b3", "ed8098e18782"],
- ["ed80b4", "e1848fe185b1"],
- ["ed80b5", "e1848fe185b1e186a8"],
- ["ed80b5", "ed80b4e186a8"],
- ["ed80b6", "e1848fe185b1e186a9"],
- ["ed80b6", "ed80b4e186a9"],
- ["ed80b7", "e1848fe185b1e186aa"],
- ["ed80b7", "ed80b4e186aa"],
- ["ed80b8", "e1848fe185b1e186ab"],
- ["ed80b8", "ed80b4e186ab"],
- ["ed80b9", "e1848fe185b1e186ac"],
- ["ed80b9", "ed80b4e186ac"],
- ["ed80ba", "e1848fe185b1e186ad"],
- ["ed80ba", "ed80b4e186ad"],
- ["ed80bb", "e1848fe185b1e186ae"],
- ["ed80bb", "ed80b4e186ae"],
- ["ed80bc", "e1848fe185b1e186af"],
- ["ed80bc", "ed80b4e186af"],
- ["ed80bd", "e1848fe185b1e186b0"],
- ["ed80bd", "ed80b4e186b0"],
- ["ed80be", "e1848fe185b1e186b1"],
- ["ed80be", "ed80b4e186b1"],
- ["ed80bf", "e1848fe185b1e186b2"],
- ["ed80bf", "ed80b4e186b2"],
- ["ed8180", "e1848fe185b1e186b3"],
- ["ed8180", "ed80b4e186b3"],
- ["ed8181", "e1848fe185b1e186b4"],
- ["ed8181", "ed80b4e186b4"],
- ["ed8182", "e1848fe185b1e186b5"],
- ["ed8182", "ed80b4e186b5"],
- ["ed8183", "e1848fe185b1e186b6"],
- ["ed8183", "ed80b4e186b6"],
- ["ed8184", "e1848fe185b1e186b7"],
- ["ed8184", "ed80b4e186b7"],
- ["ed8185", "e1848fe185b1e186b8"],
- ["ed8185", "ed80b4e186b8"],
- ["ed8186", "e1848fe185b1e186b9"],
- ["ed8186", "ed80b4e186b9"],
- ["ed8187", "e1848fe185b1e186ba"],
- ["ed8187", "ed80b4e186ba"],
- ["ed8188", "e1848fe185b1e186bb"],
- ["ed8188", "ed80b4e186bb"],
- ["ed8189", "e1848fe185b1e186bc"],
- ["ed8189", "ed80b4e186bc"],
- ["ed818a", "e1848fe185b1e186bd"],
- ["ed818a", "ed80b4e186bd"],
- ["ed818b", "e1848fe185b1e186be"],
- ["ed818b", "ed80b4e186be"],
- ["ed818c", "e1848fe185b1e186bf"],
- ["ed818c", "ed80b4e186bf"],
- ["ed818d", "e1848fe185b1e18780"],
- ["ed818d", "ed80b4e18780"],
- ["ed818e", "e1848fe185b1e18781"],
- ["ed818e", "ed80b4e18781"],
- ["ed818f", "e1848fe185b1e18782"],
- ["ed818f", "ed80b4e18782"],
- ["ed8190", "e1848fe185b2"],
- ["ed8191", "e1848fe185b2e186a8"],
- ["ed8191", "ed8190e186a8"],
- ["ed8192", "e1848fe185b2e186a9"],
- ["ed8192", "ed8190e186a9"],
- ["ed8193", "e1848fe185b2e186aa"],
- ["ed8193", "ed8190e186aa"],
- ["ed8194", "e1848fe185b2e186ab"],
- ["ed8194", "ed8190e186ab"],
- ["ed8195", "e1848fe185b2e186ac"],
- ["ed8195", "ed8190e186ac"],
- ["ed8196", "e1848fe185b2e186ad"],
- ["ed8196", "ed8190e186ad"],
- ["ed8197", "e1848fe185b2e186ae"],
- ["ed8197", "ed8190e186ae"],
- ["ed8198", "e1848fe185b2e186af"],
- ["ed8198", "ed8190e186af"],
- ["ed8199", "e1848fe185b2e186b0"],
- ["ed8199", "ed8190e186b0"],
- ["ed819a", "e1848fe185b2e186b1"],
- ["ed819a", "ed8190e186b1"],
- ["ed819b", "e1848fe185b2e186b2"],
- ["ed819b", "ed8190e186b2"],
- ["ed819c", "e1848fe185b2e186b3"],
- ["ed819c", "ed8190e186b3"],
- ["ed819d", "e1848fe185b2e186b4"],
- ["ed819d", "ed8190e186b4"],
- ["ed819e", "e1848fe185b2e186b5"],
- ["ed819e", "ed8190e186b5"],
- ["ed819f", "e1848fe185b2e186b6"],
- ["ed819f", "ed8190e186b6"],
- ["ed81a0", "e1848fe185b2e186b7"],
- ["ed81a0", "ed8190e186b7"],
- ["ed81a1", "e1848fe185b2e186b8"],
- ["ed81a1", "ed8190e186b8"],
- ["ed81a2", "e1848fe185b2e186b9"],
- ["ed81a2", "ed8190e186b9"],
- ["ed81a3", "e1848fe185b2e186ba"],
- ["ed81a3", "ed8190e186ba"],
- ["ed81a4", "e1848fe185b2e186bb"],
- ["ed81a4", "ed8190e186bb"],
- ["ed81a5", "e1848fe185b2e186bc"],
- ["ed81a5", "ed8190e186bc"],
- ["ed81a6", "e1848fe185b2e186bd"],
- ["ed81a6", "ed8190e186bd"],
- ["ed81a7", "e1848fe185b2e186be"],
- ["ed81a7", "ed8190e186be"],
- ["ed81a8", "e1848fe185b2e186bf"],
- ["ed81a8", "ed8190e186bf"],
- ["ed81a9", "e1848fe185b2e18780"],
- ["ed81a9", "ed8190e18780"],
- ["ed81aa", "e1848fe185b2e18781"],
- ["ed81aa", "ed8190e18781"],
- ["ed81ab", "e1848fe185b2e18782"],
- ["ed81ab", "ed8190e18782"],
- ["ed81ac", "e1848fe185b3"],
- ["ed81ad", "e1848fe185b3e186a8"],
- ["ed81ad", "ed81ace186a8"],
- ["ed81ae", "e1848fe185b3e186a9"],
- ["ed81ae", "ed81ace186a9"],
- ["ed81af", "e1848fe185b3e186aa"],
- ["ed81af", "ed81ace186aa"],
- ["ed81b0", "e1848fe185b3e186ab"],
- ["ed81b0", "ed81ace186ab"],
- ["ed81b1", "e1848fe185b3e186ac"],
- ["ed81b1", "ed81ace186ac"],
- ["ed81b2", "e1848fe185b3e186ad"],
- ["ed81b2", "ed81ace186ad"],
- ["ed81b3", "e1848fe185b3e186ae"],
- ["ed81b3", "ed81ace186ae"],
- ["ed81b4", "e1848fe185b3e186af"],
- ["ed81b4", "ed81ace186af"],
- ["ed81b5", "e1848fe185b3e186b0"],
- ["ed81b5", "ed81ace186b0"],
- ["ed81b6", "e1848fe185b3e186b1"],
- ["ed81b6", "ed81ace186b1"],
- ["ed81b7", "e1848fe185b3e186b2"],
- ["ed81b7", "ed81ace186b2"],
- ["ed81b8", "e1848fe185b3e186b3"],
- ["ed81b8", "ed81ace186b3"],
- ["ed81b9", "e1848fe185b3e186b4"],
- ["ed81b9", "ed81ace186b4"],
- ["ed81ba", "e1848fe185b3e186b5"],
- ["ed81ba", "ed81ace186b5"],
- ["ed81bb", "e1848fe185b3e186b6"],
- ["ed81bb", "ed81ace186b6"],
- ["ed81bc", "e1848fe185b3e186b7"],
- ["ed81bc", "ed81ace186b7"],
- ["ed81bd", "e1848fe185b3e186b8"],
- ["ed81bd", "ed81ace186b8"],
- ["ed81be", "e1848fe185b3e186b9"],
- ["ed81be", "ed81ace186b9"],
- ["ed81bf", "e1848fe185b3e186ba"],
- ["ed81bf", "ed81ace186ba"],
- ["ed8280", "e1848fe185b3e186bb"],
- ["ed8280", "ed81ace186bb"],
- ["ed8281", "e1848fe185b3e186bc"],
- ["ed8281", "ed81ace186bc"],
- ["ed8282", "e1848fe185b3e186bd"],
- ["ed8282", "ed81ace186bd"],
- ["ed8283", "e1848fe185b3e186be"],
- ["ed8283", "ed81ace186be"],
- ["ed8284", "e1848fe185b3e186bf"],
- ["ed8284", "ed81ace186bf"],
- ["ed8285", "e1848fe185b3e18780"],
- ["ed8285", "ed81ace18780"],
- ["ed8286", "e1848fe185b3e18781"],
- ["ed8286", "ed81ace18781"],
- ["ed8287", "e1848fe185b3e18782"],
- ["ed8287", "ed81ace18782"],
- ["ed8288", "e1848fe185b4"],
- ["ed8289", "e1848fe185b4e186a8"],
- ["ed8289", "ed8288e186a8"],
- ["ed828a", "e1848fe185b4e186a9"],
- ["ed828a", "ed8288e186a9"],
- ["ed828b", "e1848fe185b4e186aa"],
- ["ed828b", "ed8288e186aa"],
- ["ed828c", "e1848fe185b4e186ab"],
- ["ed828c", "ed8288e186ab"],
- ["ed828d", "e1848fe185b4e186ac"],
- ["ed828d", "ed8288e186ac"],
- ["ed828e", "e1848fe185b4e186ad"],
- ["ed828e", "ed8288e186ad"],
- ["ed828f", "e1848fe185b4e186ae"],
- ["ed828f", "ed8288e186ae"],
- ["ed8290", "e1848fe185b4e186af"],
- ["ed8290", "ed8288e186af"],
- ["ed8291", "e1848fe185b4e186b0"],
- ["ed8291", "ed8288e186b0"],
- ["ed8292", "e1848fe185b4e186b1"],
- ["ed8292", "ed8288e186b1"],
- ["ed8293", "e1848fe185b4e186b2"],
- ["ed8293", "ed8288e186b2"],
- ["ed8294", "e1848fe185b4e186b3"],
- ["ed8294", "ed8288e186b3"],
- ["ed8295", "e1848fe185b4e186b4"],
- ["ed8295", "ed8288e186b4"],
- ["ed8296", "e1848fe185b4e186b5"],
- ["ed8296", "ed8288e186b5"],
- ["ed8297", "e1848fe185b4e186b6"],
- ["ed8297", "ed8288e186b6"],
- ["ed8298", "e1848fe185b4e186b7"],
- ["ed8298", "ed8288e186b7"],
- ["ed8299", "e1848fe185b4e186b8"],
- ["ed8299", "ed8288e186b8"],
- ["ed829a", "e1848fe185b4e186b9"],
- ["ed829a", "ed8288e186b9"],
- ["ed829b", "e1848fe185b4e186ba"],
- ["ed829b", "ed8288e186ba"],
- ["ed829c", "e1848fe185b4e186bb"],
- ["ed829c", "ed8288e186bb"],
- ["ed829d", "e1848fe185b4e186bc"],
- ["ed829d", "ed8288e186bc"],
- ["ed829e", "e1848fe185b4e186bd"],
- ["ed829e", "ed8288e186bd"],
- ["ed829f", "e1848fe185b4e186be"],
- ["ed829f", "ed8288e186be"],
- ["ed82a0", "e1848fe185b4e186bf"],
- ["ed82a0", "ed8288e186bf"],
- ["ed82a1", "e1848fe185b4e18780"],
- ["ed82a1", "ed8288e18780"],
- ["ed82a2", "e1848fe185b4e18781"],
- ["ed82a2", "ed8288e18781"],
- ["ed82a3", "e1848fe185b4e18782"],
- ["ed82a3", "ed8288e18782"],
- ["ed82a4", "e1848fe185b5"],
- ["ed82a5", "e1848fe185b5e186a8"],
- ["ed82a5", "ed82a4e186a8"],
- ["ed82a6", "e1848fe185b5e186a9"],
- ["ed82a6", "ed82a4e186a9"],
- ["ed82a7", "e1848fe185b5e186aa"],
- ["ed82a7", "ed82a4e186aa"],
- ["ed82a8", "e1848fe185b5e186ab"],
- ["ed82a8", "ed82a4e186ab"],
- ["ed82a9", "e1848fe185b5e186ac"],
- ["ed82a9", "ed82a4e186ac"],
- ["ed82aa", "e1848fe185b5e186ad"],
- ["ed82aa", "ed82a4e186ad"],
- ["ed82ab", "e1848fe185b5e186ae"],
- ["ed82ab", "ed82a4e186ae"],
- ["ed82ac", "e1848fe185b5e186af"],
- ["ed82ac", "ed82a4e186af"],
- ["ed82ad", "e1848fe185b5e186b0"],
- ["ed82ad", "ed82a4e186b0"],
- ["ed82ae", "e1848fe185b5e186b1"],
- ["ed82ae", "ed82a4e186b1"],
- ["ed82af", "e1848fe185b5e186b2"],
- ["ed82af", "ed82a4e186b2"],
- ["ed82b0", "e1848fe185b5e186b3"],
- ["ed82b0", "ed82a4e186b3"],
- ["ed82b1", "e1848fe185b5e186b4"],
- ["ed82b1", "ed82a4e186b4"],
- ["ed82b2", "e1848fe185b5e186b5"],
- ["ed82b2", "ed82a4e186b5"],
- ["ed82b3", "e1848fe185b5e186b6"],
- ["ed82b3", "ed82a4e186b6"],
- ["ed82b4", "e1848fe185b5e186b7"],
- ["ed82b4", "ed82a4e186b7"],
- ["ed82b5", "e1848fe185b5e186b8"],
- ["ed82b5", "ed82a4e186b8"],
- ["ed82b6", "e1848fe185b5e186b9"],
- ["ed82b6", "ed82a4e186b9"],
- ["ed82b7", "e1848fe185b5e186ba"],
- ["ed82b7", "ed82a4e186ba"],
- ["ed82b8", "e1848fe185b5e186bb"],
- ["ed82b8", "ed82a4e186bb"],
- ["ed82b9", "e1848fe185b5e186bc"],
- ["ed82b9", "ed82a4e186bc"],
- ["ed82ba", "e1848fe185b5e186bd"],
- ["ed82ba", "ed82a4e186bd"],
- ["ed82bb", "e1848fe185b5e186be"],
- ["ed82bb", "ed82a4e186be"],
- ["ed82bc", "e1848fe185b5e186bf"],
- ["ed82bc", "ed82a4e186bf"],
- ["ed82bd", "e1848fe185b5e18780"],
- ["ed82bd", "ed82a4e18780"],
- ["ed82be", "e1848fe185b5e18781"],
- ["ed82be", "ed82a4e18781"],
- ["ed82bf", "e1848fe185b5e18782"],
- ["ed82bf", "ed82a4e18782"],
- ["ed8380", "e18490e185a1"],
- ["ed8381", "e18490e185a1e186a8"],
- ["ed8381", "ed8380e186a8"],
- ["ed8382", "e18490e185a1e186a9"],
- ["ed8382", "ed8380e186a9"],
- ["ed8383", "e18490e185a1e186aa"],
- ["ed8383", "ed8380e186aa"],
- ["ed8384", "e18490e185a1e186ab"],
- ["ed8384", "ed8380e186ab"],
- ["ed8385", "e18490e185a1e186ac"],
- ["ed8385", "ed8380e186ac"],
- ["ed8386", "e18490e185a1e186ad"],
- ["ed8386", "ed8380e186ad"],
- ["ed8387", "e18490e185a1e186ae"],
- ["ed8387", "ed8380e186ae"],
- ["ed8388", "e18490e185a1e186af"],
- ["ed8388", "ed8380e186af"],
- ["ed8389", "e18490e185a1e186b0"],
- ["ed8389", "ed8380e186b0"],
- ["ed838a", "e18490e185a1e186b1"],
- ["ed838a", "ed8380e186b1"],
- ["ed838b", "e18490e185a1e186b2"],
- ["ed838b", "ed8380e186b2"],
- ["ed838c", "e18490e185a1e186b3"],
- ["ed838c", "ed8380e186b3"],
- ["ed838d", "e18490e185a1e186b4"],
- ["ed838d", "ed8380e186b4"],
- ["ed838e", "e18490e185a1e186b5"],
- ["ed838e", "ed8380e186b5"],
- ["ed838f", "e18490e185a1e186b6"],
- ["ed838f", "ed8380e186b6"],
- ["ed8390", "e18490e185a1e186b7"],
- ["ed8390", "ed8380e186b7"],
- ["ed8391", "e18490e185a1e186b8"],
- ["ed8391", "ed8380e186b8"],
- ["ed8392", "e18490e185a1e186b9"],
- ["ed8392", "ed8380e186b9"],
- ["ed8393", "e18490e185a1e186ba"],
- ["ed8393", "ed8380e186ba"],
- ["ed8394", "e18490e185a1e186bb"],
- ["ed8394", "ed8380e186bb"],
- ["ed8395", "e18490e185a1e186bc"],
- ["ed8395", "ed8380e186bc"],
- ["ed8396", "e18490e185a1e186bd"],
- ["ed8396", "ed8380e186bd"],
- ["ed8397", "e18490e185a1e186be"],
- ["ed8397", "ed8380e186be"],
- ["ed8398", "e18490e185a1e186bf"],
- ["ed8398", "ed8380e186bf"],
- ["ed8399", "e18490e185a1e18780"],
- ["ed8399", "ed8380e18780"],
- ["ed839a", "e18490e185a1e18781"],
- ["ed839a", "ed8380e18781"],
- ["ed839b", "e18490e185a1e18782"],
- ["ed839b", "ed8380e18782"],
- ["ed839c", "e18490e185a2"],
- ["ed839d", "e18490e185a2e186a8"],
- ["ed839d", "ed839ce186a8"],
- ["ed839e", "e18490e185a2e186a9"],
- ["ed839e", "ed839ce186a9"],
- ["ed839f", "e18490e185a2e186aa"],
- ["ed839f", "ed839ce186aa"],
- ["ed83a0", "e18490e185a2e186ab"],
- ["ed83a0", "ed839ce186ab"],
- ["ed83a1", "e18490e185a2e186ac"],
- ["ed83a1", "ed839ce186ac"],
- ["ed83a2", "e18490e185a2e186ad"],
- ["ed83a2", "ed839ce186ad"],
- ["ed83a3", "e18490e185a2e186ae"],
- ["ed83a3", "ed839ce186ae"],
- ["ed83a4", "e18490e185a2e186af"],
- ["ed83a4", "ed839ce186af"],
- ["ed83a5", "e18490e185a2e186b0"],
- ["ed83a5", "ed839ce186b0"],
- ["ed83a6", "e18490e185a2e186b1"],
- ["ed83a6", "ed839ce186b1"],
- ["ed83a7", "e18490e185a2e186b2"],
- ["ed83a7", "ed839ce186b2"],
- ["ed83a8", "e18490e185a2e186b3"],
- ["ed83a8", "ed839ce186b3"],
- ["ed83a9", "e18490e185a2e186b4"],
- ["ed83a9", "ed839ce186b4"],
- ["ed83aa", "e18490e185a2e186b5"],
- ["ed83aa", "ed839ce186b5"],
- ["ed83ab", "e18490e185a2e186b6"],
- ["ed83ab", "ed839ce186b6"],
- ["ed83ac", "e18490e185a2e186b7"],
- ["ed83ac", "ed839ce186b7"],
- ["ed83ad", "e18490e185a2e186b8"],
- ["ed83ad", "ed839ce186b8"],
- ["ed83ae", "e18490e185a2e186b9"],
- ["ed83ae", "ed839ce186b9"],
- ["ed83af", "e18490e185a2e186ba"],
- ["ed83af", "ed839ce186ba"],
- ["ed83b0", "e18490e185a2e186bb"],
- ["ed83b0", "ed839ce186bb"],
- ["ed83b1", "e18490e185a2e186bc"],
- ["ed83b1", "ed839ce186bc"],
- ["ed83b2", "e18490e185a2e186bd"],
- ["ed83b2", "ed839ce186bd"],
- ["ed83b3", "e18490e185a2e186be"],
- ["ed83b3", "ed839ce186be"],
- ["ed83b4", "e18490e185a2e186bf"],
- ["ed83b4", "ed839ce186bf"],
- ["ed83b5", "e18490e185a2e18780"],
- ["ed83b5", "ed839ce18780"],
- ["ed83b6", "e18490e185a2e18781"],
- ["ed83b6", "ed839ce18781"],
- ["ed83b7", "e18490e185a2e18782"],
- ["ed83b7", "ed839ce18782"],
- ["ed83b8", "e18490e185a3"],
- ["ed83b9", "e18490e185a3e186a8"],
- ["ed83b9", "ed83b8e186a8"],
- ["ed83ba", "e18490e185a3e186a9"],
- ["ed83ba", "ed83b8e186a9"],
- ["ed83bb", "e18490e185a3e186aa"],
- ["ed83bb", "ed83b8e186aa"],
- ["ed83bc", "e18490e185a3e186ab"],
- ["ed83bc", "ed83b8e186ab"],
- ["ed83bd", "e18490e185a3e186ac"],
- ["ed83bd", "ed83b8e186ac"],
- ["ed83be", "e18490e185a3e186ad"],
- ["ed83be", "ed83b8e186ad"],
- ["ed83bf", "e18490e185a3e186ae"],
- ["ed83bf", "ed83b8e186ae"],
- ["ed8480", "e18490e185a3e186af"],
- ["ed8480", "ed83b8e186af"],
- ["ed8481", "e18490e185a3e186b0"],
- ["ed8481", "ed83b8e186b0"],
- ["ed8482", "e18490e185a3e186b1"],
- ["ed8482", "ed83b8e186b1"],
- ["ed8483", "e18490e185a3e186b2"],
- ["ed8483", "ed83b8e186b2"],
- ["ed8484", "e18490e185a3e186b3"],
- ["ed8484", "ed83b8e186b3"],
- ["ed8485", "e18490e185a3e186b4"],
- ["ed8485", "ed83b8e186b4"],
- ["ed8486", "e18490e185a3e186b5"],
- ["ed8486", "ed83b8e186b5"],
- ["ed8487", "e18490e185a3e186b6"],
- ["ed8487", "ed83b8e186b6"],
- ["ed8488", "e18490e185a3e186b7"],
- ["ed8488", "ed83b8e186b7"],
- ["ed8489", "e18490e185a3e186b8"],
- ["ed8489", "ed83b8e186b8"],
- ["ed848a", "e18490e185a3e186b9"],
- ["ed848a", "ed83b8e186b9"],
- ["ed848b", "e18490e185a3e186ba"],
- ["ed848b", "ed83b8e186ba"],
- ["ed848c", "e18490e185a3e186bb"],
- ["ed848c", "ed83b8e186bb"],
- ["ed848d", "e18490e185a3e186bc"],
- ["ed848d", "ed83b8e186bc"],
- ["ed848e", "e18490e185a3e186bd"],
- ["ed848e", "ed83b8e186bd"],
- ["ed848f", "e18490e185a3e186be"],
- ["ed848f", "ed83b8e186be"],
- ["ed8490", "e18490e185a3e186bf"],
- ["ed8490", "ed83b8e186bf"],
- ["ed8491", "e18490e185a3e18780"],
- ["ed8491", "ed83b8e18780"],
- ["ed8492", "e18490e185a3e18781"],
- ["ed8492", "ed83b8e18781"],
- ["ed8493", "e18490e185a3e18782"],
- ["ed8493", "ed83b8e18782"],
- ["ed8494", "e18490e185a4"],
- ["ed8495", "e18490e185a4e186a8"],
- ["ed8495", "ed8494e186a8"],
- ["ed8496", "e18490e185a4e186a9"],
- ["ed8496", "ed8494e186a9"],
- ["ed8497", "e18490e185a4e186aa"],
- ["ed8497", "ed8494e186aa"],
- ["ed8498", "e18490e185a4e186ab"],
- ["ed8498", "ed8494e186ab"],
- ["ed8499", "e18490e185a4e186ac"],
- ["ed8499", "ed8494e186ac"],
- ["ed849a", "e18490e185a4e186ad"],
- ["ed849a", "ed8494e186ad"],
- ["ed849b", "e18490e185a4e186ae"],
- ["ed849b", "ed8494e186ae"],
- ["ed849c", "e18490e185a4e186af"],
- ["ed849c", "ed8494e186af"],
- ["ed849d", "e18490e185a4e186b0"],
- ["ed849d", "ed8494e186b0"],
- ["ed849e", "e18490e185a4e186b1"],
- ["ed849e", "ed8494e186b1"],
- ["ed849f", "e18490e185a4e186b2"],
- ["ed849f", "ed8494e186b2"],
- ["ed84a0", "e18490e185a4e186b3"],
- ["ed84a0", "ed8494e186b3"],
- ["ed84a1", "e18490e185a4e186b4"],
- ["ed84a1", "ed8494e186b4"],
- ["ed84a2", "e18490e185a4e186b5"],
- ["ed84a2", "ed8494e186b5"],
- ["ed84a3", "e18490e185a4e186b6"],
- ["ed84a3", "ed8494e186b6"],
- ["ed84a4", "e18490e185a4e186b7"],
- ["ed84a4", "ed8494e186b7"],
- ["ed84a5", "e18490e185a4e186b8"],
- ["ed84a5", "ed8494e186b8"],
- ["ed84a6", "e18490e185a4e186b9"],
- ["ed84a6", "ed8494e186b9"],
- ["ed84a7", "e18490e185a4e186ba"],
- ["ed84a7", "ed8494e186ba"],
- ["ed84a8", "e18490e185a4e186bb"],
- ["ed84a8", "ed8494e186bb"],
- ["ed84a9", "e18490e185a4e186bc"],
- ["ed84a9", "ed8494e186bc"],
- ["ed84aa", "e18490e185a4e186bd"],
- ["ed84aa", "ed8494e186bd"],
- ["ed84ab", "e18490e185a4e186be"],
- ["ed84ab", "ed8494e186be"],
- ["ed84ac", "e18490e185a4e186bf"],
- ["ed84ac", "ed8494e186bf"],
- ["ed84ad", "e18490e185a4e18780"],
- ["ed84ad", "ed8494e18780"],
- ["ed84ae", "e18490e185a4e18781"],
- ["ed84ae", "ed8494e18781"],
- ["ed84af", "e18490e185a4e18782"],
- ["ed84af", "ed8494e18782"],
- ["ed84b0", "e18490e185a5"],
- ["ed84b1", "e18490e185a5e186a8"],
- ["ed84b1", "ed84b0e186a8"],
- ["ed84b2", "e18490e185a5e186a9"],
- ["ed84b2", "ed84b0e186a9"],
- ["ed84b3", "e18490e185a5e186aa"],
- ["ed84b3", "ed84b0e186aa"],
- ["ed84b4", "e18490e185a5e186ab"],
- ["ed84b4", "ed84b0e186ab"],
- ["ed84b5", "e18490e185a5e186ac"],
- ["ed84b5", "ed84b0e186ac"],
- ["ed84b6", "e18490e185a5e186ad"],
- ["ed84b6", "ed84b0e186ad"],
- ["ed84b7", "e18490e185a5e186ae"],
- ["ed84b7", "ed84b0e186ae"],
- ["ed84b8", "e18490e185a5e186af"],
- ["ed84b8", "ed84b0e186af"],
- ["ed84b9", "e18490e185a5e186b0"],
- ["ed84b9", "ed84b0e186b0"],
- ["ed84ba", "e18490e185a5e186b1"],
- ["ed84ba", "ed84b0e186b1"],
- ["ed84bb", "e18490e185a5e186b2"],
- ["ed84bb", "ed84b0e186b2"],
- ["ed84bc", "e18490e185a5e186b3"],
- ["ed84bc", "ed84b0e186b3"],
- ["ed84bd", "e18490e185a5e186b4"],
- ["ed84bd", "ed84b0e186b4"],
- ["ed84be", "e18490e185a5e186b5"],
- ["ed84be", "ed84b0e186b5"],
- ["ed84bf", "e18490e185a5e186b6"],
- ["ed84bf", "ed84b0e186b6"],
- ["ed8580", "e18490e185a5e186b7"],
- ["ed8580", "ed84b0e186b7"],
- ["ed8581", "e18490e185a5e186b8"],
- ["ed8581", "ed84b0e186b8"],
- ["ed8582", "e18490e185a5e186b9"],
- ["ed8582", "ed84b0e186b9"],
- ["ed8583", "e18490e185a5e186ba"],
- ["ed8583", "ed84b0e186ba"],
- ["ed8584", "e18490e185a5e186bb"],
- ["ed8584", "ed84b0e186bb"],
- ["ed8585", "e18490e185a5e186bc"],
- ["ed8585", "ed84b0e186bc"],
- ["ed8586", "e18490e185a5e186bd"],
- ["ed8586", "ed84b0e186bd"],
- ["ed8587", "e18490e185a5e186be"],
- ["ed8587", "ed84b0e186be"],
- ["ed8588", "e18490e185a5e186bf"],
- ["ed8588", "ed84b0e186bf"],
- ["ed8589", "e18490e185a5e18780"],
- ["ed8589", "ed84b0e18780"],
- ["ed858a", "e18490e185a5e18781"],
- ["ed858a", "ed84b0e18781"],
- ["ed858b", "e18490e185a5e18782"],
- ["ed858b", "ed84b0e18782"],
- ["ed858c", "e18490e185a6"],
- ["ed858d", "e18490e185a6e186a8"],
- ["ed858d", "ed858ce186a8"],
- ["ed858e", "e18490e185a6e186a9"],
- ["ed858e", "ed858ce186a9"],
- ["ed858f", "e18490e185a6e186aa"],
- ["ed858f", "ed858ce186aa"],
- ["ed8590", "e18490e185a6e186ab"],
- ["ed8590", "ed858ce186ab"],
- ["ed8591", "e18490e185a6e186ac"],
- ["ed8591", "ed858ce186ac"],
- ["ed8592", "e18490e185a6e186ad"],
- ["ed8592", "ed858ce186ad"],
- ["ed8593", "e18490e185a6e186ae"],
- ["ed8593", "ed858ce186ae"],
- ["ed8594", "e18490e185a6e186af"],
- ["ed8594", "ed858ce186af"],
- ["ed8595", "e18490e185a6e186b0"],
- ["ed8595", "ed858ce186b0"],
- ["ed8596", "e18490e185a6e186b1"],
- ["ed8596", "ed858ce186b1"],
- ["ed8597", "e18490e185a6e186b2"],
- ["ed8597", "ed858ce186b2"],
- ["ed8598", "e18490e185a6e186b3"],
- ["ed8598", "ed858ce186b3"],
- ["ed8599", "e18490e185a6e186b4"],
- ["ed8599", "ed858ce186b4"],
- ["ed859a", "e18490e185a6e186b5"],
- ["ed859a", "ed858ce186b5"],
- ["ed859b", "e18490e185a6e186b6"],
- ["ed859b", "ed858ce186b6"],
- ["ed859c", "e18490e185a6e186b7"],
- ["ed859c", "ed858ce186b7"],
- ["ed859d", "e18490e185a6e186b8"],
- ["ed859d", "ed858ce186b8"],
- ["ed859e", "e18490e185a6e186b9"],
- ["ed859e", "ed858ce186b9"],
- ["ed859f", "e18490e185a6e186ba"],
- ["ed859f", "ed858ce186ba"],
- ["ed85a0", "e18490e185a6e186bb"],
- ["ed85a0", "ed858ce186bb"],
- ["ed85a1", "e18490e185a6e186bc"],
- ["ed85a1", "ed858ce186bc"],
- ["ed85a2", "e18490e185a6e186bd"],
- ["ed85a2", "ed858ce186bd"],
- ["ed85a3", "e18490e185a6e186be"],
- ["ed85a3", "ed858ce186be"],
- ["ed85a4", "e18490e185a6e186bf"],
- ["ed85a4", "ed858ce186bf"],
- ["ed85a5", "e18490e185a6e18780"],
- ["ed85a5", "ed858ce18780"],
- ["ed85a6", "e18490e185a6e18781"],
- ["ed85a6", "ed858ce18781"],
- ["ed85a7", "e18490e185a6e18782"],
- ["ed85a7", "ed858ce18782"],
- ["ed85a8", "e18490e185a7"],
- ["ed85a9", "e18490e185a7e186a8"],
- ["ed85a9", "ed85a8e186a8"],
- ["ed85aa", "e18490e185a7e186a9"],
- ["ed85aa", "ed85a8e186a9"],
- ["ed85ab", "e18490e185a7e186aa"],
- ["ed85ab", "ed85a8e186aa"],
- ["ed85ac", "e18490e185a7e186ab"],
- ["ed85ac", "ed85a8e186ab"],
- ["ed85ad", "e18490e185a7e186ac"],
- ["ed85ad", "ed85a8e186ac"],
- ["ed85ae", "e18490e185a7e186ad"],
- ["ed85ae", "ed85a8e186ad"],
- ["ed85af", "e18490e185a7e186ae"],
- ["ed85af", "ed85a8e186ae"],
- ["ed85b0", "e18490e185a7e186af"],
- ["ed85b0", "ed85a8e186af"],
- ["ed85b1", "e18490e185a7e186b0"],
- ["ed85b1", "ed85a8e186b0"],
- ["ed85b2", "e18490e185a7e186b1"],
- ["ed85b2", "ed85a8e186b1"],
- ["ed85b3", "e18490e185a7e186b2"],
- ["ed85b3", "ed85a8e186b2"],
- ["ed85b4", "e18490e185a7e186b3"],
- ["ed85b4", "ed85a8e186b3"],
- ["ed85b5", "e18490e185a7e186b4"],
- ["ed85b5", "ed85a8e186b4"],
- ["ed85b6", "e18490e185a7e186b5"],
- ["ed85b6", "ed85a8e186b5"],
- ["ed85b7", "e18490e185a7e186b6"],
- ["ed85b7", "ed85a8e186b6"],
- ["ed85b8", "e18490e185a7e186b7"],
- ["ed85b8", "ed85a8e186b7"],
- ["ed85b9", "e18490e185a7e186b8"],
- ["ed85b9", "ed85a8e186b8"],
- ["ed85ba", "e18490e185a7e186b9"],
- ["ed85ba", "ed85a8e186b9"],
- ["ed85bb", "e18490e185a7e186ba"],
- ["ed85bb", "ed85a8e186ba"],
- ["ed85bc", "e18490e185a7e186bb"],
- ["ed85bc", "ed85a8e186bb"],
- ["ed85bd", "e18490e185a7e186bc"],
- ["ed85bd", "ed85a8e186bc"],
- ["ed85be", "e18490e185a7e186bd"],
- ["ed85be", "ed85a8e186bd"],
- ["ed85bf", "e18490e185a7e186be"],
- ["ed85bf", "ed85a8e186be"],
- ["ed8680", "e18490e185a7e186bf"],
- ["ed8680", "ed85a8e186bf"],
- ["ed8681", "e18490e185a7e18780"],
- ["ed8681", "ed85a8e18780"],
- ["ed8682", "e18490e185a7e18781"],
- ["ed8682", "ed85a8e18781"],
- ["ed8683", "e18490e185a7e18782"],
- ["ed8683", "ed85a8e18782"],
- ["ed8684", "e18490e185a8"],
- ["ed8685", "e18490e185a8e186a8"],
- ["ed8685", "ed8684e186a8"],
- ["ed8686", "e18490e185a8e186a9"],
- ["ed8686", "ed8684e186a9"],
- ["ed8687", "e18490e185a8e186aa"],
- ["ed8687", "ed8684e186aa"],
- ["ed8688", "e18490e185a8e186ab"],
- ["ed8688", "ed8684e186ab"],
- ["ed8689", "e18490e185a8e186ac"],
- ["ed8689", "ed8684e186ac"],
- ["ed868a", "e18490e185a8e186ad"],
- ["ed868a", "ed8684e186ad"],
- ["ed868b", "e18490e185a8e186ae"],
- ["ed868b", "ed8684e186ae"],
- ["ed868c", "e18490e185a8e186af"],
- ["ed868c", "ed8684e186af"],
- ["ed868d", "e18490e185a8e186b0"],
- ["ed868d", "ed8684e186b0"],
- ["ed868e", "e18490e185a8e186b1"],
- ["ed868e", "ed8684e186b1"],
- ["ed868f", "e18490e185a8e186b2"],
- ["ed868f", "ed8684e186b2"],
- ["ed8690", "e18490e185a8e186b3"],
- ["ed8690", "ed8684e186b3"],
- ["ed8691", "e18490e185a8e186b4"],
- ["ed8691", "ed8684e186b4"],
- ["ed8692", "e18490e185a8e186b5"],
- ["ed8692", "ed8684e186b5"],
- ["ed8693", "e18490e185a8e186b6"],
- ["ed8693", "ed8684e186b6"],
- ["ed8694", "e18490e185a8e186b7"],
- ["ed8694", "ed8684e186b7"],
- ["ed8695", "e18490e185a8e186b8"],
- ["ed8695", "ed8684e186b8"],
- ["ed8696", "e18490e185a8e186b9"],
- ["ed8696", "ed8684e186b9"],
- ["ed8697", "e18490e185a8e186ba"],
- ["ed8697", "ed8684e186ba"],
- ["ed8698", "e18490e185a8e186bb"],
- ["ed8698", "ed8684e186bb"],
- ["ed8699", "e18490e185a8e186bc"],
- ["ed8699", "ed8684e186bc"],
- ["ed869a", "e18490e185a8e186bd"],
- ["ed869a", "ed8684e186bd"],
- ["ed869b", "e18490e185a8e186be"],
- ["ed869b", "ed8684e186be"],
- ["ed869c", "e18490e185a8e186bf"],
- ["ed869c", "ed8684e186bf"],
- ["ed869d", "e18490e185a8e18780"],
- ["ed869d", "ed8684e18780"],
- ["ed869e", "e18490e185a8e18781"],
- ["ed869e", "ed8684e18781"],
- ["ed869f", "e18490e185a8e18782"],
- ["ed869f", "ed8684e18782"],
- ["ed86a0", "e18490e185a9"],
- ["ed86a1", "e18490e185a9e186a8"],
- ["ed86a1", "ed86a0e186a8"],
- ["ed86a2", "e18490e185a9e186a9"],
- ["ed86a2", "ed86a0e186a9"],
- ["ed86a3", "e18490e185a9e186aa"],
- ["ed86a3", "ed86a0e186aa"],
- ["ed86a4", "e18490e185a9e186ab"],
- ["ed86a4", "ed86a0e186ab"],
- ["ed86a5", "e18490e185a9e186ac"],
- ["ed86a5", "ed86a0e186ac"],
- ["ed86a6", "e18490e185a9e186ad"],
- ["ed86a6", "ed86a0e186ad"],
- ["ed86a7", "e18490e185a9e186ae"],
- ["ed86a7", "ed86a0e186ae"],
- ["ed86a8", "e18490e185a9e186af"],
- ["ed86a8", "ed86a0e186af"],
- ["ed86a9", "e18490e185a9e186b0"],
- ["ed86a9", "ed86a0e186b0"],
- ["ed86aa", "e18490e185a9e186b1"],
- ["ed86aa", "ed86a0e186b1"],
- ["ed86ab", "e18490e185a9e186b2"],
- ["ed86ab", "ed86a0e186b2"],
- ["ed86ac", "e18490e185a9e186b3"],
- ["ed86ac", "ed86a0e186b3"],
- ["ed86ad", "e18490e185a9e186b4"],
- ["ed86ad", "ed86a0e186b4"],
- ["ed86ae", "e18490e185a9e186b5"],
- ["ed86ae", "ed86a0e186b5"],
- ["ed86af", "e18490e185a9e186b6"],
- ["ed86af", "ed86a0e186b6"],
- ["ed86b0", "e18490e185a9e186b7"],
- ["ed86b0", "ed86a0e186b7"],
- ["ed86b1", "e18490e185a9e186b8"],
- ["ed86b1", "ed86a0e186b8"],
- ["ed86b2", "e18490e185a9e186b9"],
- ["ed86b2", "ed86a0e186b9"],
- ["ed86b3", "e18490e185a9e186ba"],
- ["ed86b3", "ed86a0e186ba"],
- ["ed86b4", "e18490e185a9e186bb"],
- ["ed86b4", "ed86a0e186bb"],
- ["ed86b5", "e18490e185a9e186bc"],
- ["ed86b5", "ed86a0e186bc"],
- ["ed86b6", "e18490e185a9e186bd"],
- ["ed86b6", "ed86a0e186bd"],
- ["ed86b7", "e18490e185a9e186be"],
- ["ed86b7", "ed86a0e186be"],
- ["ed86b8", "e18490e185a9e186bf"],
- ["ed86b8", "ed86a0e186bf"],
- ["ed86b9", "e18490e185a9e18780"],
- ["ed86b9", "ed86a0e18780"],
- ["ed86ba", "e18490e185a9e18781"],
- ["ed86ba", "ed86a0e18781"],
- ["ed86bb", "e18490e185a9e18782"],
- ["ed86bb", "ed86a0e18782"],
- ["ed86bc", "e18490e185aa"],
- ["ed86bd", "e18490e185aae186a8"],
- ["ed86bd", "ed86bce186a8"],
- ["ed86be", "e18490e185aae186a9"],
- ["ed86be", "ed86bce186a9"],
- ["ed86bf", "e18490e185aae186aa"],
- ["ed86bf", "ed86bce186aa"],
- ["ed8780", "e18490e185aae186ab"],
- ["ed8780", "ed86bce186ab"],
- ["ed8781", "e18490e185aae186ac"],
- ["ed8781", "ed86bce186ac"],
- ["ed8782", "e18490e185aae186ad"],
- ["ed8782", "ed86bce186ad"],
- ["ed8783", "e18490e185aae186ae"],
- ["ed8783", "ed86bce186ae"],
- ["ed8784", "e18490e185aae186af"],
- ["ed8784", "ed86bce186af"],
- ["ed8785", "e18490e185aae186b0"],
- ["ed8785", "ed86bce186b0"],
- ["ed8786", "e18490e185aae186b1"],
- ["ed8786", "ed86bce186b1"],
- ["ed8787", "e18490e185aae186b2"],
- ["ed8787", "ed86bce186b2"],
- ["ed8788", "e18490e185aae186b3"],
- ["ed8788", "ed86bce186b3"],
- ["ed8789", "e18490e185aae186b4"],
- ["ed8789", "ed86bce186b4"],
- ["ed878a", "e18490e185aae186b5"],
- ["ed878a", "ed86bce186b5"],
- ["ed878b", "e18490e185aae186b6"],
- ["ed878b", "ed86bce186b6"],
- ["ed878c", "e18490e185aae186b7"],
- ["ed878c", "ed86bce186b7"],
- ["ed878d", "e18490e185aae186b8"],
- ["ed878d", "ed86bce186b8"],
- ["ed878e", "e18490e185aae186b9"],
- ["ed878e", "ed86bce186b9"],
- ["ed878f", "e18490e185aae186ba"],
- ["ed878f", "ed86bce186ba"],
- ["ed8790", "e18490e185aae186bb"],
- ["ed8790", "ed86bce186bb"],
- ["ed8791", "e18490e185aae186bc"],
- ["ed8791", "ed86bce186bc"],
- ["ed8792", "e18490e185aae186bd"],
- ["ed8792", "ed86bce186bd"],
- ["ed8793", "e18490e185aae186be"],
- ["ed8793", "ed86bce186be"],
- ["ed8794", "e18490e185aae186bf"],
- ["ed8794", "ed86bce186bf"],
- ["ed8795", "e18490e185aae18780"],
- ["ed8795", "ed86bce18780"],
- ["ed8796", "e18490e185aae18781"],
- ["ed8796", "ed86bce18781"],
- ["ed8797", "e18490e185aae18782"],
- ["ed8797", "ed86bce18782"],
- ["ed8798", "e18490e185ab"],
- ["ed8799", "e18490e185abe186a8"],
- ["ed8799", "ed8798e186a8"],
- ["ed879a", "e18490e185abe186a9"],
- ["ed879a", "ed8798e186a9"],
- ["ed879b", "e18490e185abe186aa"],
- ["ed879b", "ed8798e186aa"],
- ["ed879c", "e18490e185abe186ab"],
- ["ed879c", "ed8798e186ab"],
- ["ed879d", "e18490e185abe186ac"],
- ["ed879d", "ed8798e186ac"],
- ["ed879e", "e18490e185abe186ad"],
- ["ed879e", "ed8798e186ad"],
- ["ed879f", "e18490e185abe186ae"],
- ["ed879f", "ed8798e186ae"],
- ["ed87a0", "e18490e185abe186af"],
- ["ed87a0", "ed8798e186af"],
- ["ed87a1", "e18490e185abe186b0"],
- ["ed87a1", "ed8798e186b0"],
- ["ed87a2", "e18490e185abe186b1"],
- ["ed87a2", "ed8798e186b1"],
- ["ed87a3", "e18490e185abe186b2"],
- ["ed87a3", "ed8798e186b2"],
- ["ed87a4", "e18490e185abe186b3"],
- ["ed87a4", "ed8798e186b3"],
- ["ed87a5", "e18490e185abe186b4"],
- ["ed87a5", "ed8798e186b4"],
- ["ed87a6", "e18490e185abe186b5"],
- ["ed87a6", "ed8798e186b5"],
- ["ed87a7", "e18490e185abe186b6"],
- ["ed87a7", "ed8798e186b6"],
- ["ed87a8", "e18490e185abe186b7"],
- ["ed87a8", "ed8798e186b7"],
- ["ed87a9", "e18490e185abe186b8"],
- ["ed87a9", "ed8798e186b8"],
- ["ed87aa", "e18490e185abe186b9"],
- ["ed87aa", "ed8798e186b9"],
- ["ed87ab", "e18490e185abe186ba"],
- ["ed87ab", "ed8798e186ba"],
- ["ed87ac", "e18490e185abe186bb"],
- ["ed87ac", "ed8798e186bb"],
- ["ed87ad", "e18490e185abe186bc"],
- ["ed87ad", "ed8798e186bc"],
- ["ed87ae", "e18490e185abe186bd"],
- ["ed87ae", "ed8798e186bd"],
- ["ed87af", "e18490e185abe186be"],
- ["ed87af", "ed8798e186be"],
- ["ed87b0", "e18490e185abe186bf"],
- ["ed87b0", "ed8798e186bf"],
- ["ed87b1", "e18490e185abe18780"],
- ["ed87b1", "ed8798e18780"],
- ["ed87b2", "e18490e185abe18781"],
- ["ed87b2", "ed8798e18781"],
- ["ed87b3", "e18490e185abe18782"],
- ["ed87b3", "ed8798e18782"],
- ["ed87b4", "e18490e185ac"],
- ["ed87b5", "e18490e185ace186a8"],
- ["ed87b5", "ed87b4e186a8"],
- ["ed87b6", "e18490e185ace186a9"],
- ["ed87b6", "ed87b4e186a9"],
- ["ed87b7", "e18490e185ace186aa"],
- ["ed87b7", "ed87b4e186aa"],
- ["ed87b8", "e18490e185ace186ab"],
- ["ed87b8", "ed87b4e186ab"],
- ["ed87b9", "e18490e185ace186ac"],
- ["ed87b9", "ed87b4e186ac"],
- ["ed87ba", "e18490e185ace186ad"],
- ["ed87ba", "ed87b4e186ad"],
- ["ed87bb", "e18490e185ace186ae"],
- ["ed87bb", "ed87b4e186ae"],
- ["ed87bc", "e18490e185ace186af"],
- ["ed87bc", "ed87b4e186af"],
- ["ed87bd", "e18490e185ace186b0"],
- ["ed87bd", "ed87b4e186b0"],
- ["ed87be", "e18490e185ace186b1"],
- ["ed87be", "ed87b4e186b1"],
- ["ed87bf", "e18490e185ace186b2"],
- ["ed87bf", "ed87b4e186b2"],
- ["ed8880", "e18490e185ace186b3"],
- ["ed8880", "ed87b4e186b3"],
- ["ed8881", "e18490e185ace186b4"],
- ["ed8881", "ed87b4e186b4"],
- ["ed8882", "e18490e185ace186b5"],
- ["ed8882", "ed87b4e186b5"],
- ["ed8883", "e18490e185ace186b6"],
- ["ed8883", "ed87b4e186b6"],
- ["ed8884", "e18490e185ace186b7"],
- ["ed8884", "ed87b4e186b7"],
- ["ed8885", "e18490e185ace186b8"],
- ["ed8885", "ed87b4e186b8"],
- ["ed8886", "e18490e185ace186b9"],
- ["ed8886", "ed87b4e186b9"],
- ["ed8887", "e18490e185ace186ba"],
- ["ed8887", "ed87b4e186ba"],
- ["ed8888", "e18490e185ace186bb"],
- ["ed8888", "ed87b4e186bb"],
- ["ed8889", "e18490e185ace186bc"],
- ["ed8889", "ed87b4e186bc"],
- ["ed888a", "e18490e185ace186bd"],
- ["ed888a", "ed87b4e186bd"],
- ["ed888b", "e18490e185ace186be"],
- ["ed888b", "ed87b4e186be"],
- ["ed888c", "e18490e185ace186bf"],
- ["ed888c", "ed87b4e186bf"],
- ["ed888d", "e18490e185ace18780"],
- ["ed888d", "ed87b4e18780"],
- ["ed888e", "e18490e185ace18781"],
- ["ed888e", "ed87b4e18781"],
- ["ed888f", "e18490e185ace18782"],
- ["ed888f", "ed87b4e18782"],
- ["ed8890", "e18490e185ad"],
- ["ed8891", "e18490e185ade186a8"],
- ["ed8891", "ed8890e186a8"],
- ["ed8892", "e18490e185ade186a9"],
- ["ed8892", "ed8890e186a9"],
- ["ed8893", "e18490e185ade186aa"],
- ["ed8893", "ed8890e186aa"],
- ["ed8894", "e18490e185ade186ab"],
- ["ed8894", "ed8890e186ab"],
- ["ed8895", "e18490e185ade186ac"],
- ["ed8895", "ed8890e186ac"],
- ["ed8896", "e18490e185ade186ad"],
- ["ed8896", "ed8890e186ad"],
- ["ed8897", "e18490e185ade186ae"],
- ["ed8897", "ed8890e186ae"],
- ["ed8898", "e18490e185ade186af"],
- ["ed8898", "ed8890e186af"],
- ["ed8899", "e18490e185ade186b0"],
- ["ed8899", "ed8890e186b0"],
- ["ed889a", "e18490e185ade186b1"],
- ["ed889a", "ed8890e186b1"],
- ["ed889b", "e18490e185ade186b2"],
- ["ed889b", "ed8890e186b2"],
- ["ed889c", "e18490e185ade186b3"],
- ["ed889c", "ed8890e186b3"],
- ["ed889d", "e18490e185ade186b4"],
- ["ed889d", "ed8890e186b4"],
- ["ed889e", "e18490e185ade186b5"],
- ["ed889e", "ed8890e186b5"],
- ["ed889f", "e18490e185ade186b6"],
- ["ed889f", "ed8890e186b6"],
- ["ed88a0", "e18490e185ade186b7"],
- ["ed88a0", "ed8890e186b7"],
- ["ed88a1", "e18490e185ade186b8"],
- ["ed88a1", "ed8890e186b8"],
- ["ed88a2", "e18490e185ade186b9"],
- ["ed88a2", "ed8890e186b9"],
- ["ed88a3", "e18490e185ade186ba"],
- ["ed88a3", "ed8890e186ba"],
- ["ed88a4", "e18490e185ade186bb"],
- ["ed88a4", "ed8890e186bb"],
- ["ed88a5", "e18490e185ade186bc"],
- ["ed88a5", "ed8890e186bc"],
- ["ed88a6", "e18490e185ade186bd"],
- ["ed88a6", "ed8890e186bd"],
- ["ed88a7", "e18490e185ade186be"],
- ["ed88a7", "ed8890e186be"],
- ["ed88a8", "e18490e185ade186bf"],
- ["ed88a8", "ed8890e186bf"],
- ["ed88a9", "e18490e185ade18780"],
- ["ed88a9", "ed8890e18780"],
- ["ed88aa", "e18490e185ade18781"],
- ["ed88aa", "ed8890e18781"],
- ["ed88ab", "e18490e185ade18782"],
- ["ed88ab", "ed8890e18782"],
- ["ed88ac", "e18490e185ae"],
- ["ed88ad", "e18490e185aee186a8"],
- ["ed88ad", "ed88ace186a8"],
- ["ed88ae", "e18490e185aee186a9"],
- ["ed88ae", "ed88ace186a9"],
- ["ed88af", "e18490e185aee186aa"],
- ["ed88af", "ed88ace186aa"],
- ["ed88b0", "e18490e185aee186ab"],
- ["ed88b0", "ed88ace186ab"],
- ["ed88b1", "e18490e185aee186ac"],
- ["ed88b1", "ed88ace186ac"],
- ["ed88b2", "e18490e185aee186ad"],
- ["ed88b2", "ed88ace186ad"],
- ["ed88b3", "e18490e185aee186ae"],
- ["ed88b3", "ed88ace186ae"],
- ["ed88b4", "e18490e185aee186af"],
- ["ed88b4", "ed88ace186af"],
- ["ed88b5", "e18490e185aee186b0"],
- ["ed88b5", "ed88ace186b0"],
- ["ed88b6", "e18490e185aee186b1"],
- ["ed88b6", "ed88ace186b1"],
- ["ed88b7", "e18490e185aee186b2"],
- ["ed88b7", "ed88ace186b2"],
- ["ed88b8", "e18490e185aee186b3"],
- ["ed88b8", "ed88ace186b3"],
- ["ed88b9", "e18490e185aee186b4"],
- ["ed88b9", "ed88ace186b4"],
- ["ed88ba", "e18490e185aee186b5"],
- ["ed88ba", "ed88ace186b5"],
- ["ed88bb", "e18490e185aee186b6"],
- ["ed88bb", "ed88ace186b6"],
- ["ed88bc", "e18490e185aee186b7"],
- ["ed88bc", "ed88ace186b7"],
- ["ed88bd", "e18490e185aee186b8"],
- ["ed88bd", "ed88ace186b8"],
- ["ed88be", "e18490e185aee186b9"],
- ["ed88be", "ed88ace186b9"],
- ["ed88bf", "e18490e185aee186ba"],
- ["ed88bf", "ed88ace186ba"],
- ["ed8980", "e18490e185aee186bb"],
- ["ed8980", "ed88ace186bb"],
- ["ed8981", "e18490e185aee186bc"],
- ["ed8981", "ed88ace186bc"],
- ["ed8982", "e18490e185aee186bd"],
- ["ed8982", "ed88ace186bd"],
- ["ed8983", "e18490e185aee186be"],
- ["ed8983", "ed88ace186be"],
- ["ed8984", "e18490e185aee186bf"],
- ["ed8984", "ed88ace186bf"],
- ["ed8985", "e18490e185aee18780"],
- ["ed8985", "ed88ace18780"],
- ["ed8986", "e18490e185aee18781"],
- ["ed8986", "ed88ace18781"],
- ["ed8987", "e18490e185aee18782"],
- ["ed8987", "ed88ace18782"],
- ["ed8988", "e18490e185af"],
- ["ed8989", "e18490e185afe186a8"],
- ["ed8989", "ed8988e186a8"],
- ["ed898a", "e18490e185afe186a9"],
- ["ed898a", "ed8988e186a9"],
- ["ed898b", "e18490e185afe186aa"],
- ["ed898b", "ed8988e186aa"],
- ["ed898c", "e18490e185afe186ab"],
- ["ed898c", "ed8988e186ab"],
- ["ed898d", "e18490e185afe186ac"],
- ["ed898d", "ed8988e186ac"],
- ["ed898e", "e18490e185afe186ad"],
- ["ed898e", "ed8988e186ad"],
- ["ed898f", "e18490e185afe186ae"],
- ["ed898f", "ed8988e186ae"],
- ["ed8990", "e18490e185afe186af"],
- ["ed8990", "ed8988e186af"],
- ["ed8991", "e18490e185afe186b0"],
- ["ed8991", "ed8988e186b0"],
- ["ed8992", "e18490e185afe186b1"],
- ["ed8992", "ed8988e186b1"],
- ["ed8993", "e18490e185afe186b2"],
- ["ed8993", "ed8988e186b2"],
- ["ed8994", "e18490e185afe186b3"],
- ["ed8994", "ed8988e186b3"],
- ["ed8995", "e18490e185afe186b4"],
- ["ed8995", "ed8988e186b4"],
- ["ed8996", "e18490e185afe186b5"],
- ["ed8996", "ed8988e186b5"],
- ["ed8997", "e18490e185afe186b6"],
- ["ed8997", "ed8988e186b6"],
- ["ed8998", "e18490e185afe186b7"],
- ["ed8998", "ed8988e186b7"],
- ["ed8999", "e18490e185afe186b8"],
- ["ed8999", "ed8988e186b8"],
- ["ed899a", "e18490e185afe186b9"],
- ["ed899a", "ed8988e186b9"],
- ["ed899b", "e18490e185afe186ba"],
- ["ed899b", "ed8988e186ba"],
- ["ed899c", "e18490e185afe186bb"],
- ["ed899c", "ed8988e186bb"],
- ["ed899d", "e18490e185afe186bc"],
- ["ed899d", "ed8988e186bc"],
- ["ed899e", "e18490e185afe186bd"],
- ["ed899e", "ed8988e186bd"],
- ["ed899f", "e18490e185afe186be"],
- ["ed899f", "ed8988e186be"],
- ["ed89a0", "e18490e185afe186bf"],
- ["ed89a0", "ed8988e186bf"],
- ["ed89a1", "e18490e185afe18780"],
- ["ed89a1", "ed8988e18780"],
- ["ed89a2", "e18490e185afe18781"],
- ["ed89a2", "ed8988e18781"],
- ["ed89a3", "e18490e185afe18782"],
- ["ed89a3", "ed8988e18782"],
- ["ed89a4", "e18490e185b0"],
- ["ed89a5", "e18490e185b0e186a8"],
- ["ed89a5", "ed89a4e186a8"],
- ["ed89a6", "e18490e185b0e186a9"],
- ["ed89a6", "ed89a4e186a9"],
- ["ed89a7", "e18490e185b0e186aa"],
- ["ed89a7", "ed89a4e186aa"],
- ["ed89a8", "e18490e185b0e186ab"],
- ["ed89a8", "ed89a4e186ab"],
- ["ed89a9", "e18490e185b0e186ac"],
- ["ed89a9", "ed89a4e186ac"],
- ["ed89aa", "e18490e185b0e186ad"],
- ["ed89aa", "ed89a4e186ad"],
- ["ed89ab", "e18490e185b0e186ae"],
- ["ed89ab", "ed89a4e186ae"],
- ["ed89ac", "e18490e185b0e186af"],
- ["ed89ac", "ed89a4e186af"],
- ["ed89ad", "e18490e185b0e186b0"],
- ["ed89ad", "ed89a4e186b0"],
- ["ed89ae", "e18490e185b0e186b1"],
- ["ed89ae", "ed89a4e186b1"],
- ["ed89af", "e18490e185b0e186b2"],
- ["ed89af", "ed89a4e186b2"],
- ["ed89b0", "e18490e185b0e186b3"],
- ["ed89b0", "ed89a4e186b3"],
- ["ed89b1", "e18490e185b0e186b4"],
- ["ed89b1", "ed89a4e186b4"],
- ["ed89b2", "e18490e185b0e186b5"],
- ["ed89b2", "ed89a4e186b5"],
- ["ed89b3", "e18490e185b0e186b6"],
- ["ed89b3", "ed89a4e186b6"],
- ["ed89b4", "e18490e185b0e186b7"],
- ["ed89b4", "ed89a4e186b7"],
- ["ed89b5", "e18490e185b0e186b8"],
- ["ed89b5", "ed89a4e186b8"],
- ["ed89b6", "e18490e185b0e186b9"],
- ["ed89b6", "ed89a4e186b9"],
- ["ed89b7", "e18490e185b0e186ba"],
- ["ed89b7", "ed89a4e186ba"],
- ["ed89b8", "e18490e185b0e186bb"],
- ["ed89b8", "ed89a4e186bb"],
- ["ed89b9", "e18490e185b0e186bc"],
- ["ed89b9", "ed89a4e186bc"],
- ["ed89ba", "e18490e185b0e186bd"],
- ["ed89ba", "ed89a4e186bd"],
- ["ed89bb", "e18490e185b0e186be"],
- ["ed89bb", "ed89a4e186be"],
- ["ed89bc", "e18490e185b0e186bf"],
- ["ed89bc", "ed89a4e186bf"],
- ["ed89bd", "e18490e185b0e18780"],
- ["ed89bd", "ed89a4e18780"],
- ["ed89be", "e18490e185b0e18781"],
- ["ed89be", "ed89a4e18781"],
- ["ed89bf", "e18490e185b0e18782"],
- ["ed89bf", "ed89a4e18782"],
- ["ed8a80", "e18490e185b1"],
- ["ed8a81", "e18490e185b1e186a8"],
- ["ed8a81", "ed8a80e186a8"],
- ["ed8a82", "e18490e185b1e186a9"],
- ["ed8a82", "ed8a80e186a9"],
- ["ed8a83", "e18490e185b1e186aa"],
- ["ed8a83", "ed8a80e186aa"],
- ["ed8a84", "e18490e185b1e186ab"],
- ["ed8a84", "ed8a80e186ab"],
- ["ed8a85", "e18490e185b1e186ac"],
- ["ed8a85", "ed8a80e186ac"],
- ["ed8a86", "e18490e185b1e186ad"],
- ["ed8a86", "ed8a80e186ad"],
- ["ed8a87", "e18490e185b1e186ae"],
- ["ed8a87", "ed8a80e186ae"],
- ["ed8a88", "e18490e185b1e186af"],
- ["ed8a88", "ed8a80e186af"],
- ["ed8a89", "e18490e185b1e186b0"],
- ["ed8a89", "ed8a80e186b0"],
- ["ed8a8a", "e18490e185b1e186b1"],
- ["ed8a8a", "ed8a80e186b1"],
- ["ed8a8b", "e18490e185b1e186b2"],
- ["ed8a8b", "ed8a80e186b2"],
- ["ed8a8c", "e18490e185b1e186b3"],
- ["ed8a8c", "ed8a80e186b3"],
- ["ed8a8d", "e18490e185b1e186b4"],
- ["ed8a8d", "ed8a80e186b4"],
- ["ed8a8e", "e18490e185b1e186b5"],
- ["ed8a8e", "ed8a80e186b5"],
- ["ed8a8f", "e18490e185b1e186b6"],
- ["ed8a8f", "ed8a80e186b6"],
- ["ed8a90", "e18490e185b1e186b7"],
- ["ed8a90", "ed8a80e186b7"],
- ["ed8a91", "e18490e185b1e186b8"],
- ["ed8a91", "ed8a80e186b8"],
- ["ed8a92", "e18490e185b1e186b9"],
- ["ed8a92", "ed8a80e186b9"],
- ["ed8a93", "e18490e185b1e186ba"],
- ["ed8a93", "ed8a80e186ba"],
- ["ed8a94", "e18490e185b1e186bb"],
- ["ed8a94", "ed8a80e186bb"],
- ["ed8a95", "e18490e185b1e186bc"],
- ["ed8a95", "ed8a80e186bc"],
- ["ed8a96", "e18490e185b1e186bd"],
- ["ed8a96", "ed8a80e186bd"],
- ["ed8a97", "e18490e185b1e186be"],
- ["ed8a97", "ed8a80e186be"],
- ["ed8a98", "e18490e185b1e186bf"],
- ["ed8a98", "ed8a80e186bf"],
- ["ed8a99", "e18490e185b1e18780"],
- ["ed8a99", "ed8a80e18780"],
- ["ed8a9a", "e18490e185b1e18781"],
- ["ed8a9a", "ed8a80e18781"],
- ["ed8a9b", "e18490e185b1e18782"],
- ["ed8a9b", "ed8a80e18782"],
- ["ed8a9c", "e18490e185b2"],
- ["ed8a9d", "e18490e185b2e186a8"],
- ["ed8a9d", "ed8a9ce186a8"],
- ["ed8a9e", "e18490e185b2e186a9"],
- ["ed8a9e", "ed8a9ce186a9"],
- ["ed8a9f", "e18490e185b2e186aa"],
- ["ed8a9f", "ed8a9ce186aa"],
- ["ed8aa0", "e18490e185b2e186ab"],
- ["ed8aa0", "ed8a9ce186ab"],
- ["ed8aa1", "e18490e185b2e186ac"],
- ["ed8aa1", "ed8a9ce186ac"],
- ["ed8aa2", "e18490e185b2e186ad"],
- ["ed8aa2", "ed8a9ce186ad"],
- ["ed8aa3", "e18490e185b2e186ae"],
- ["ed8aa3", "ed8a9ce186ae"],
- ["ed8aa4", "e18490e185b2e186af"],
- ["ed8aa4", "ed8a9ce186af"],
- ["ed8aa5", "e18490e185b2e186b0"],
- ["ed8aa5", "ed8a9ce186b0"],
- ["ed8aa6", "e18490e185b2e186b1"],
- ["ed8aa6", "ed8a9ce186b1"],
- ["ed8aa7", "e18490e185b2e186b2"],
- ["ed8aa7", "ed8a9ce186b2"],
- ["ed8aa8", "e18490e185b2e186b3"],
- ["ed8aa8", "ed8a9ce186b3"],
- ["ed8aa9", "e18490e185b2e186b4"],
- ["ed8aa9", "ed8a9ce186b4"],
- ["ed8aaa", "e18490e185b2e186b5"],
- ["ed8aaa", "ed8a9ce186b5"],
- ["ed8aab", "e18490e185b2e186b6"],
- ["ed8aab", "ed8a9ce186b6"],
- ["ed8aac", "e18490e185b2e186b7"],
- ["ed8aac", "ed8a9ce186b7"],
- ["ed8aad", "e18490e185b2e186b8"],
- ["ed8aad", "ed8a9ce186b8"],
- ["ed8aae", "e18490e185b2e186b9"],
- ["ed8aae", "ed8a9ce186b9"],
- ["ed8aaf", "e18490e185b2e186ba"],
- ["ed8aaf", "ed8a9ce186ba"],
- ["ed8ab0", "e18490e185b2e186bb"],
- ["ed8ab0", "ed8a9ce186bb"],
- ["ed8ab1", "e18490e185b2e186bc"],
- ["ed8ab1", "ed8a9ce186bc"],
- ["ed8ab2", "e18490e185b2e186bd"],
- ["ed8ab2", "ed8a9ce186bd"],
- ["ed8ab3", "e18490e185b2e186be"],
- ["ed8ab3", "ed8a9ce186be"],
- ["ed8ab4", "e18490e185b2e186bf"],
- ["ed8ab4", "ed8a9ce186bf"],
- ["ed8ab5", "e18490e185b2e18780"],
- ["ed8ab5", "ed8a9ce18780"],
- ["ed8ab6", "e18490e185b2e18781"],
- ["ed8ab6", "ed8a9ce18781"],
- ["ed8ab7", "e18490e185b2e18782"],
- ["ed8ab7", "ed8a9ce18782"],
- ["ed8ab8", "e18490e185b3"],
- ["ed8ab9", "e18490e185b3e186a8"],
- ["ed8ab9", "ed8ab8e186a8"],
- ["ed8aba", "e18490e185b3e186a9"],
- ["ed8aba", "ed8ab8e186a9"],
- ["ed8abb", "e18490e185b3e186aa"],
- ["ed8abb", "ed8ab8e186aa"],
- ["ed8abc", "e18490e185b3e186ab"],
- ["ed8abc", "ed8ab8e186ab"],
- ["ed8abd", "e18490e185b3e186ac"],
- ["ed8abd", "ed8ab8e186ac"],
- ["ed8abe", "e18490e185b3e186ad"],
- ["ed8abe", "ed8ab8e186ad"],
- ["ed8abf", "e18490e185b3e186ae"],
- ["ed8abf", "ed8ab8e186ae"],
- ["ed8b80", "e18490e185b3e186af"],
- ["ed8b80", "ed8ab8e186af"],
- ["ed8b81", "e18490e185b3e186b0"],
- ["ed8b81", "ed8ab8e186b0"],
- ["ed8b82", "e18490e185b3e186b1"],
- ["ed8b82", "ed8ab8e186b1"],
- ["ed8b83", "e18490e185b3e186b2"],
- ["ed8b83", "ed8ab8e186b2"],
- ["ed8b84", "e18490e185b3e186b3"],
- ["ed8b84", "ed8ab8e186b3"],
- ["ed8b85", "e18490e185b3e186b4"],
- ["ed8b85", "ed8ab8e186b4"],
- ["ed8b86", "e18490e185b3e186b5"],
- ["ed8b86", "ed8ab8e186b5"],
- ["ed8b87", "e18490e185b3e186b6"],
- ["ed8b87", "ed8ab8e186b6"],
- ["ed8b88", "e18490e185b3e186b7"],
- ["ed8b88", "ed8ab8e186b7"],
- ["ed8b89", "e18490e185b3e186b8"],
- ["ed8b89", "ed8ab8e186b8"],
- ["ed8b8a", "e18490e185b3e186b9"],
- ["ed8b8a", "ed8ab8e186b9"],
- ["ed8b8b", "e18490e185b3e186ba"],
- ["ed8b8b", "ed8ab8e186ba"],
- ["ed8b8c", "e18490e185b3e186bb"],
- ["ed8b8c", "ed8ab8e186bb"],
- ["ed8b8d", "e18490e185b3e186bc"],
- ["ed8b8d", "ed8ab8e186bc"],
- ["ed8b8e", "e18490e185b3e186bd"],
- ["ed8b8e", "ed8ab8e186bd"],
- ["ed8b8f", "e18490e185b3e186be"],
- ["ed8b8f", "ed8ab8e186be"],
- ["ed8b90", "e18490e185b3e186bf"],
- ["ed8b90", "ed8ab8e186bf"],
- ["ed8b91", "e18490e185b3e18780"],
- ["ed8b91", "ed8ab8e18780"],
- ["ed8b92", "e18490e185b3e18781"],
- ["ed8b92", "ed8ab8e18781"],
- ["ed8b93", "e18490e185b3e18782"],
- ["ed8b93", "ed8ab8e18782"],
- ["ed8b94", "e18490e185b4"],
- ["ed8b95", "e18490e185b4e186a8"],
- ["ed8b95", "ed8b94e186a8"],
- ["ed8b96", "e18490e185b4e186a9"],
- ["ed8b96", "ed8b94e186a9"],
- ["ed8b97", "e18490e185b4e186aa"],
- ["ed8b97", "ed8b94e186aa"],
- ["ed8b98", "e18490e185b4e186ab"],
- ["ed8b98", "ed8b94e186ab"],
- ["ed8b99", "e18490e185b4e186ac"],
- ["ed8b99", "ed8b94e186ac"],
- ["ed8b9a", "e18490e185b4e186ad"],
- ["ed8b9a", "ed8b94e186ad"],
- ["ed8b9b", "e18490e185b4e186ae"],
- ["ed8b9b", "ed8b94e186ae"],
- ["ed8b9c", "e18490e185b4e186af"],
- ["ed8b9c", "ed8b94e186af"],
- ["ed8b9d", "e18490e185b4e186b0"],
- ["ed8b9d", "ed8b94e186b0"],
- ["ed8b9e", "e18490e185b4e186b1"],
- ["ed8b9e", "ed8b94e186b1"],
- ["ed8b9f", "e18490e185b4e186b2"],
- ["ed8b9f", "ed8b94e186b2"],
- ["ed8ba0", "e18490e185b4e186b3"],
- ["ed8ba0", "ed8b94e186b3"],
- ["ed8ba1", "e18490e185b4e186b4"],
- ["ed8ba1", "ed8b94e186b4"],
- ["ed8ba2", "e18490e185b4e186b5"],
- ["ed8ba2", "ed8b94e186b5"],
- ["ed8ba3", "e18490e185b4e186b6"],
- ["ed8ba3", "ed8b94e186b6"],
- ["ed8ba4", "e18490e185b4e186b7"],
- ["ed8ba4", "ed8b94e186b7"],
- ["ed8ba5", "e18490e185b4e186b8"],
- ["ed8ba5", "ed8b94e186b8"],
- ["ed8ba6", "e18490e185b4e186b9"],
- ["ed8ba6", "ed8b94e186b9"],
- ["ed8ba7", "e18490e185b4e186ba"],
- ["ed8ba7", "ed8b94e186ba"],
- ["ed8ba8", "e18490e185b4e186bb"],
- ["ed8ba8", "ed8b94e186bb"],
- ["ed8ba9", "e18490e185b4e186bc"],
- ["ed8ba9", "ed8b94e186bc"],
- ["ed8baa", "e18490e185b4e186bd"],
- ["ed8baa", "ed8b94e186bd"],
- ["ed8bab", "e18490e185b4e186be"],
- ["ed8bab", "ed8b94e186be"],
- ["ed8bac", "e18490e185b4e186bf"],
- ["ed8bac", "ed8b94e186bf"],
- ["ed8bad", "e18490e185b4e18780"],
- ["ed8bad", "ed8b94e18780"],
- ["ed8bae", "e18490e185b4e18781"],
- ["ed8bae", "ed8b94e18781"],
- ["ed8baf", "e18490e185b4e18782"],
- ["ed8baf", "ed8b94e18782"],
- ["ed8bb0", "e18490e185b5"],
- ["ed8bb1", "e18490e185b5e186a8"],
- ["ed8bb1", "ed8bb0e186a8"],
- ["ed8bb2", "e18490e185b5e186a9"],
- ["ed8bb2", "ed8bb0e186a9"],
- ["ed8bb3", "e18490e185b5e186aa"],
- ["ed8bb3", "ed8bb0e186aa"],
- ["ed8bb4", "e18490e185b5e186ab"],
- ["ed8bb4", "ed8bb0e186ab"],
- ["ed8bb5", "e18490e185b5e186ac"],
- ["ed8bb5", "ed8bb0e186ac"],
- ["ed8bb6", "e18490e185b5e186ad"],
- ["ed8bb6", "ed8bb0e186ad"],
- ["ed8bb7", "e18490e185b5e186ae"],
- ["ed8bb7", "ed8bb0e186ae"],
- ["ed8bb8", "e18490e185b5e186af"],
- ["ed8bb8", "ed8bb0e186af"],
- ["ed8bb9", "e18490e185b5e186b0"],
- ["ed8bb9", "ed8bb0e186b0"],
- ["ed8bba", "e18490e185b5e186b1"],
- ["ed8bba", "ed8bb0e186b1"],
- ["ed8bbb", "e18490e185b5e186b2"],
- ["ed8bbb", "ed8bb0e186b2"],
- ["ed8bbc", "e18490e185b5e186b3"],
- ["ed8bbc", "ed8bb0e186b3"],
- ["ed8bbd", "e18490e185b5e186b4"],
- ["ed8bbd", "ed8bb0e186b4"],
- ["ed8bbe", "e18490e185b5e186b5"],
- ["ed8bbe", "ed8bb0e186b5"],
- ["ed8bbf", "e18490e185b5e186b6"],
- ["ed8bbf", "ed8bb0e186b6"],
- ["ed8c80", "e18490e185b5e186b7"],
- ["ed8c80", "ed8bb0e186b7"],
- ["ed8c81", "e18490e185b5e186b8"],
- ["ed8c81", "ed8bb0e186b8"],
- ["ed8c82", "e18490e185b5e186b9"],
- ["ed8c82", "ed8bb0e186b9"],
- ["ed8c83", "e18490e185b5e186ba"],
- ["ed8c83", "ed8bb0e186ba"],
- ["ed8c84", "e18490e185b5e186bb"],
- ["ed8c84", "ed8bb0e186bb"],
- ["ed8c85", "e18490e185b5e186bc"],
- ["ed8c85", "ed8bb0e186bc"],
- ["ed8c86", "e18490e185b5e186bd"],
- ["ed8c86", "ed8bb0e186bd"],
- ["ed8c87", "e18490e185b5e186be"],
- ["ed8c87", "ed8bb0e186be"],
- ["ed8c88", "e18490e185b5e186bf"],
- ["ed8c88", "ed8bb0e186bf"],
- ["ed8c89", "e18490e185b5e18780"],
- ["ed8c89", "ed8bb0e18780"],
- ["ed8c8a", "e18490e185b5e18781"],
- ["ed8c8a", "ed8bb0e18781"],
- ["ed8c8b", "e18490e185b5e18782"],
- ["ed8c8b", "ed8bb0e18782"],
- ["ed8c8c", "e18491e185a1"],
- ["ed8c8d", "e18491e185a1e186a8"],
- ["ed8c8d", "ed8c8ce186a8"],
- ["ed8c8e", "e18491e185a1e186a9"],
- ["ed8c8e", "ed8c8ce186a9"],
- ["ed8c8f", "e18491e185a1e186aa"],
- ["ed8c8f", "ed8c8ce186aa"],
- ["ed8c90", "e18491e185a1e186ab"],
- ["ed8c90", "ed8c8ce186ab"],
- ["ed8c91", "e18491e185a1e186ac"],
- ["ed8c91", "ed8c8ce186ac"],
- ["ed8c92", "e18491e185a1e186ad"],
- ["ed8c92", "ed8c8ce186ad"],
- ["ed8c93", "e18491e185a1e186ae"],
- ["ed8c93", "ed8c8ce186ae"],
- ["ed8c94", "e18491e185a1e186af"],
- ["ed8c94", "ed8c8ce186af"],
- ["ed8c95", "e18491e185a1e186b0"],
- ["ed8c95", "ed8c8ce186b0"],
- ["ed8c96", "e18491e185a1e186b1"],
- ["ed8c96", "ed8c8ce186b1"],
- ["ed8c97", "e18491e185a1e186b2"],
- ["ed8c97", "ed8c8ce186b2"],
- ["ed8c98", "e18491e185a1e186b3"],
- ["ed8c98", "ed8c8ce186b3"],
- ["ed8c99", "e18491e185a1e186b4"],
- ["ed8c99", "ed8c8ce186b4"],
- ["ed8c9a", "e18491e185a1e186b5"],
- ["ed8c9a", "ed8c8ce186b5"],
- ["ed8c9b", "e18491e185a1e186b6"],
- ["ed8c9b", "ed8c8ce186b6"],
- ["ed8c9c", "e18491e185a1e186b7"],
- ["ed8c9c", "ed8c8ce186b7"],
- ["ed8c9d", "e18491e185a1e186b8"],
- ["ed8c9d", "ed8c8ce186b8"],
- ["ed8c9e", "e18491e185a1e186b9"],
- ["ed8c9e", "ed8c8ce186b9"],
- ["ed8c9f", "e18491e185a1e186ba"],
- ["ed8c9f", "ed8c8ce186ba"],
- ["ed8ca0", "e18491e185a1e186bb"],
- ["ed8ca0", "ed8c8ce186bb"],
- ["ed8ca1", "e18491e185a1e186bc"],
- ["ed8ca1", "ed8c8ce186bc"],
- ["ed8ca2", "e18491e185a1e186bd"],
- ["ed8ca2", "ed8c8ce186bd"],
- ["ed8ca3", "e18491e185a1e186be"],
- ["ed8ca3", "ed8c8ce186be"],
- ["ed8ca4", "e18491e185a1e186bf"],
- ["ed8ca4", "ed8c8ce186bf"],
- ["ed8ca5", "e18491e185a1e18780"],
- ["ed8ca5", "ed8c8ce18780"],
- ["ed8ca6", "e18491e185a1e18781"],
- ["ed8ca6", "ed8c8ce18781"],
- ["ed8ca7", "e18491e185a1e18782"],
- ["ed8ca7", "ed8c8ce18782"],
- ["ed8ca8", "e18491e185a2"],
- ["ed8ca9", "e18491e185a2e186a8"],
- ["ed8ca9", "ed8ca8e186a8"],
- ["ed8caa", "e18491e185a2e186a9"],
- ["ed8caa", "ed8ca8e186a9"],
- ["ed8cab", "e18491e185a2e186aa"],
- ["ed8cab", "ed8ca8e186aa"],
- ["ed8cac", "e18491e185a2e186ab"],
- ["ed8cac", "ed8ca8e186ab"],
- ["ed8cad", "e18491e185a2e186ac"],
- ["ed8cad", "ed8ca8e186ac"],
- ["ed8cae", "e18491e185a2e186ad"],
- ["ed8cae", "ed8ca8e186ad"],
- ["ed8caf", "e18491e185a2e186ae"],
- ["ed8caf", "ed8ca8e186ae"],
- ["ed8cb0", "e18491e185a2e186af"],
- ["ed8cb0", "ed8ca8e186af"],
- ["ed8cb1", "e18491e185a2e186b0"],
- ["ed8cb1", "ed8ca8e186b0"],
- ["ed8cb2", "e18491e185a2e186b1"],
- ["ed8cb2", "ed8ca8e186b1"],
- ["ed8cb3", "e18491e185a2e186b2"],
- ["ed8cb3", "ed8ca8e186b2"],
- ["ed8cb4", "e18491e185a2e186b3"],
- ["ed8cb4", "ed8ca8e186b3"],
- ["ed8cb5", "e18491e185a2e186b4"],
- ["ed8cb5", "ed8ca8e186b4"],
- ["ed8cb6", "e18491e185a2e186b5"],
- ["ed8cb6", "ed8ca8e186b5"],
- ["ed8cb7", "e18491e185a2e186b6"],
- ["ed8cb7", "ed8ca8e186b6"],
- ["ed8cb8", "e18491e185a2e186b7"],
- ["ed8cb8", "ed8ca8e186b7"],
- ["ed8cb9", "e18491e185a2e186b8"],
- ["ed8cb9", "ed8ca8e186b8"],
- ["ed8cba", "e18491e185a2e186b9"],
- ["ed8cba", "ed8ca8e186b9"],
- ["ed8cbb", "e18491e185a2e186ba"],
- ["ed8cbb", "ed8ca8e186ba"],
- ["ed8cbc", "e18491e185a2e186bb"],
- ["ed8cbc", "ed8ca8e186bb"],
- ["ed8cbd", "e18491e185a2e186bc"],
- ["ed8cbd", "ed8ca8e186bc"],
- ["ed8cbe", "e18491e185a2e186bd"],
- ["ed8cbe", "ed8ca8e186bd"],
- ["ed8cbf", "e18491e185a2e186be"],
- ["ed8cbf", "ed8ca8e186be"],
- ["ed8d80", "e18491e185a2e186bf"],
- ["ed8d80", "ed8ca8e186bf"],
- ["ed8d81", "e18491e185a2e18780"],
- ["ed8d81", "ed8ca8e18780"],
- ["ed8d82", "e18491e185a2e18781"],
- ["ed8d82", "ed8ca8e18781"],
- ["ed8d83", "e18491e185a2e18782"],
- ["ed8d83", "ed8ca8e18782"],
- ["ed8d84", "e18491e185a3"],
- ["ed8d85", "e18491e185a3e186a8"],
- ["ed8d85", "ed8d84e186a8"],
- ["ed8d86", "e18491e185a3e186a9"],
- ["ed8d86", "ed8d84e186a9"],
- ["ed8d87", "e18491e185a3e186aa"],
- ["ed8d87", "ed8d84e186aa"],
- ["ed8d88", "e18491e185a3e186ab"],
- ["ed8d88", "ed8d84e186ab"],
- ["ed8d89", "e18491e185a3e186ac"],
- ["ed8d89", "ed8d84e186ac"],
- ["ed8d8a", "e18491e185a3e186ad"],
- ["ed8d8a", "ed8d84e186ad"],
- ["ed8d8b", "e18491e185a3e186ae"],
- ["ed8d8b", "ed8d84e186ae"],
- ["ed8d8c", "e18491e185a3e186af"],
- ["ed8d8c", "ed8d84e186af"],
- ["ed8d8d", "e18491e185a3e186b0"],
- ["ed8d8d", "ed8d84e186b0"],
- ["ed8d8e", "e18491e185a3e186b1"],
- ["ed8d8e", "ed8d84e186b1"],
- ["ed8d8f", "e18491e185a3e186b2"],
- ["ed8d8f", "ed8d84e186b2"],
- ["ed8d90", "e18491e185a3e186b3"],
- ["ed8d90", "ed8d84e186b3"],
- ["ed8d91", "e18491e185a3e186b4"],
- ["ed8d91", "ed8d84e186b4"],
- ["ed8d92", "e18491e185a3e186b5"],
- ["ed8d92", "ed8d84e186b5"],
- ["ed8d93", "e18491e185a3e186b6"],
- ["ed8d93", "ed8d84e186b6"],
- ["ed8d94", "e18491e185a3e186b7"],
- ["ed8d94", "ed8d84e186b7"],
- ["ed8d95", "e18491e185a3e186b8"],
- ["ed8d95", "ed8d84e186b8"],
- ["ed8d96", "e18491e185a3e186b9"],
- ["ed8d96", "ed8d84e186b9"],
- ["ed8d97", "e18491e185a3e186ba"],
- ["ed8d97", "ed8d84e186ba"],
- ["ed8d98", "e18491e185a3e186bb"],
- ["ed8d98", "ed8d84e186bb"],
- ["ed8d99", "e18491e185a3e186bc"],
- ["ed8d99", "ed8d84e186bc"],
- ["ed8d9a", "e18491e185a3e186bd"],
- ["ed8d9a", "ed8d84e186bd"],
- ["ed8d9b", "e18491e185a3e186be"],
- ["ed8d9b", "ed8d84e186be"],
- ["ed8d9c", "e18491e185a3e186bf"],
- ["ed8d9c", "ed8d84e186bf"],
- ["ed8d9d", "e18491e185a3e18780"],
- ["ed8d9d", "ed8d84e18780"],
- ["ed8d9e", "e18491e185a3e18781"],
- ["ed8d9e", "ed8d84e18781"],
- ["ed8d9f", "e18491e185a3e18782"],
- ["ed8d9f", "ed8d84e18782"],
- ["ed8da0", "e18491e185a4"],
- ["ed8da1", "e18491e185a4e186a8"],
- ["ed8da1", "ed8da0e186a8"],
- ["ed8da2", "e18491e185a4e186a9"],
- ["ed8da2", "ed8da0e186a9"],
- ["ed8da3", "e18491e185a4e186aa"],
- ["ed8da3", "ed8da0e186aa"],
- ["ed8da4", "e18491e185a4e186ab"],
- ["ed8da4", "ed8da0e186ab"],
- ["ed8da5", "e18491e185a4e186ac"],
- ["ed8da5", "ed8da0e186ac"],
- ["ed8da6", "e18491e185a4e186ad"],
- ["ed8da6", "ed8da0e186ad"],
- ["ed8da7", "e18491e185a4e186ae"],
- ["ed8da7", "ed8da0e186ae"],
- ["ed8da8", "e18491e185a4e186af"],
- ["ed8da8", "ed8da0e186af"],
- ["ed8da9", "e18491e185a4e186b0"],
- ["ed8da9", "ed8da0e186b0"],
- ["ed8daa", "e18491e185a4e186b1"],
- ["ed8daa", "ed8da0e186b1"],
- ["ed8dab", "e18491e185a4e186b2"],
- ["ed8dab", "ed8da0e186b2"],
- ["ed8dac", "e18491e185a4e186b3"],
- ["ed8dac", "ed8da0e186b3"],
- ["ed8dad", "e18491e185a4e186b4"],
- ["ed8dad", "ed8da0e186b4"],
- ["ed8dae", "e18491e185a4e186b5"],
- ["ed8dae", "ed8da0e186b5"],
- ["ed8daf", "e18491e185a4e186b6"],
- ["ed8daf", "ed8da0e186b6"],
- ["ed8db0", "e18491e185a4e186b7"],
- ["ed8db0", "ed8da0e186b7"],
- ["ed8db1", "e18491e185a4e186b8"],
- ["ed8db1", "ed8da0e186b8"],
- ["ed8db2", "e18491e185a4e186b9"],
- ["ed8db2", "ed8da0e186b9"],
- ["ed8db3", "e18491e185a4e186ba"],
- ["ed8db3", "ed8da0e186ba"],
- ["ed8db4", "e18491e185a4e186bb"],
- ["ed8db4", "ed8da0e186bb"],
- ["ed8db5", "e18491e185a4e186bc"],
- ["ed8db5", "ed8da0e186bc"],
- ["ed8db6", "e18491e185a4e186bd"],
- ["ed8db6", "ed8da0e186bd"],
- ["ed8db7", "e18491e185a4e186be"],
- ["ed8db7", "ed8da0e186be"],
- ["ed8db8", "e18491e185a4e186bf"],
- ["ed8db8", "ed8da0e186bf"],
- ["ed8db9", "e18491e185a4e18780"],
- ["ed8db9", "ed8da0e18780"],
- ["ed8dba", "e18491e185a4e18781"],
- ["ed8dba", "ed8da0e18781"],
- ["ed8dbb", "e18491e185a4e18782"],
- ["ed8dbb", "ed8da0e18782"],
- ["ed8dbc", "e18491e185a5"],
- ["ed8dbd", "e18491e185a5e186a8"],
- ["ed8dbd", "ed8dbce186a8"],
- ["ed8dbe", "e18491e185a5e186a9"],
- ["ed8dbe", "ed8dbce186a9"],
- ["ed8dbf", "e18491e185a5e186aa"],
- ["ed8dbf", "ed8dbce186aa"],
- ["ed8e80", "e18491e185a5e186ab"],
- ["ed8e80", "ed8dbce186ab"],
- ["ed8e81", "e18491e185a5e186ac"],
- ["ed8e81", "ed8dbce186ac"],
- ["ed8e82", "e18491e185a5e186ad"],
- ["ed8e82", "ed8dbce186ad"],
- ["ed8e83", "e18491e185a5e186ae"],
- ["ed8e83", "ed8dbce186ae"],
- ["ed8e84", "e18491e185a5e186af"],
- ["ed8e84", "ed8dbce186af"],
- ["ed8e85", "e18491e185a5e186b0"],
- ["ed8e85", "ed8dbce186b0"],
- ["ed8e86", "e18491e185a5e186b1"],
- ["ed8e86", "ed8dbce186b1"],
- ["ed8e87", "e18491e185a5e186b2"],
- ["ed8e87", "ed8dbce186b2"],
- ["ed8e88", "e18491e185a5e186b3"],
- ["ed8e88", "ed8dbce186b3"],
- ["ed8e89", "e18491e185a5e186b4"],
- ["ed8e89", "ed8dbce186b4"],
- ["ed8e8a", "e18491e185a5e186b5"],
- ["ed8e8a", "ed8dbce186b5"],
- ["ed8e8b", "e18491e185a5e186b6"],
- ["ed8e8b", "ed8dbce186b6"],
- ["ed8e8c", "e18491e185a5e186b7"],
- ["ed8e8c", "ed8dbce186b7"],
- ["ed8e8d", "e18491e185a5e186b8"],
- ["ed8e8d", "ed8dbce186b8"],
- ["ed8e8e", "e18491e185a5e186b9"],
- ["ed8e8e", "ed8dbce186b9"],
- ["ed8e8f", "e18491e185a5e186ba"],
- ["ed8e8f", "ed8dbce186ba"],
- ["ed8e90", "e18491e185a5e186bb"],
- ["ed8e90", "ed8dbce186bb"],
- ["ed8e91", "e18491e185a5e186bc"],
- ["ed8e91", "ed8dbce186bc"],
- ["ed8e92", "e18491e185a5e186bd"],
- ["ed8e92", "ed8dbce186bd"],
- ["ed8e93", "e18491e185a5e186be"],
- ["ed8e93", "ed8dbce186be"],
- ["ed8e94", "e18491e185a5e186bf"],
- ["ed8e94", "ed8dbce186bf"],
- ["ed8e95", "e18491e185a5e18780"],
- ["ed8e95", "ed8dbce18780"],
- ["ed8e96", "e18491e185a5e18781"],
- ["ed8e96", "ed8dbce18781"],
- ["ed8e97", "e18491e185a5e18782"],
- ["ed8e97", "ed8dbce18782"],
- ["ed8e98", "e18491e185a6"],
- ["ed8e99", "e18491e185a6e186a8"],
- ["ed8e99", "ed8e98e186a8"],
- ["ed8e9a", "e18491e185a6e186a9"],
- ["ed8e9a", "ed8e98e186a9"],
- ["ed8e9b", "e18491e185a6e186aa"],
- ["ed8e9b", "ed8e98e186aa"],
- ["ed8e9c", "e18491e185a6e186ab"],
- ["ed8e9c", "ed8e98e186ab"],
- ["ed8e9d", "e18491e185a6e186ac"],
- ["ed8e9d", "ed8e98e186ac"],
- ["ed8e9e", "e18491e185a6e186ad"],
- ["ed8e9e", "ed8e98e186ad"],
- ["ed8e9f", "e18491e185a6e186ae"],
- ["ed8e9f", "ed8e98e186ae"],
- ["ed8ea0", "e18491e185a6e186af"],
- ["ed8ea0", "ed8e98e186af"],
- ["ed8ea1", "e18491e185a6e186b0"],
- ["ed8ea1", "ed8e98e186b0"],
- ["ed8ea2", "e18491e185a6e186b1"],
- ["ed8ea2", "ed8e98e186b1"],
- ["ed8ea3", "e18491e185a6e186b2"],
- ["ed8ea3", "ed8e98e186b2"],
- ["ed8ea4", "e18491e185a6e186b3"],
- ["ed8ea4", "ed8e98e186b3"],
- ["ed8ea5", "e18491e185a6e186b4"],
- ["ed8ea5", "ed8e98e186b4"],
- ["ed8ea6", "e18491e185a6e186b5"],
- ["ed8ea6", "ed8e98e186b5"],
- ["ed8ea7", "e18491e185a6e186b6"],
- ["ed8ea7", "ed8e98e186b6"],
- ["ed8ea8", "e18491e185a6e186b7"],
- ["ed8ea8", "ed8e98e186b7"],
- ["ed8ea9", "e18491e185a6e186b8"],
- ["ed8ea9", "ed8e98e186b8"],
- ["ed8eaa", "e18491e185a6e186b9"],
- ["ed8eaa", "ed8e98e186b9"],
- ["ed8eab", "e18491e185a6e186ba"],
- ["ed8eab", "ed8e98e186ba"],
- ["ed8eac", "e18491e185a6e186bb"],
- ["ed8eac", "ed8e98e186bb"],
- ["ed8ead", "e18491e185a6e186bc"],
- ["ed8ead", "ed8e98e186bc"],
- ["ed8eae", "e18491e185a6e186bd"],
- ["ed8eae", "ed8e98e186bd"],
- ["ed8eaf", "e18491e185a6e186be"],
- ["ed8eaf", "ed8e98e186be"],
- ["ed8eb0", "e18491e185a6e186bf"],
- ["ed8eb0", "ed8e98e186bf"],
- ["ed8eb1", "e18491e185a6e18780"],
- ["ed8eb1", "ed8e98e18780"],
- ["ed8eb2", "e18491e185a6e18781"],
- ["ed8eb2", "ed8e98e18781"],
- ["ed8eb3", "e18491e185a6e18782"],
- ["ed8eb3", "ed8e98e18782"],
- ["ed8eb4", "e18491e185a7"],
- ["ed8eb5", "e18491e185a7e186a8"],
- ["ed8eb5", "ed8eb4e186a8"],
- ["ed8eb6", "e18491e185a7e186a9"],
- ["ed8eb6", "ed8eb4e186a9"],
- ["ed8eb7", "e18491e185a7e186aa"],
- ["ed8eb7", "ed8eb4e186aa"],
- ["ed8eb8", "e18491e185a7e186ab"],
- ["ed8eb8", "ed8eb4e186ab"],
- ["ed8eb9", "e18491e185a7e186ac"],
- ["ed8eb9", "ed8eb4e186ac"],
- ["ed8eba", "e18491e185a7e186ad"],
- ["ed8eba", "ed8eb4e186ad"],
- ["ed8ebb", "e18491e185a7e186ae"],
- ["ed8ebb", "ed8eb4e186ae"],
- ["ed8ebc", "e18491e185a7e186af"],
- ["ed8ebc", "ed8eb4e186af"],
- ["ed8ebd", "e18491e185a7e186b0"],
- ["ed8ebd", "ed8eb4e186b0"],
- ["ed8ebe", "e18491e185a7e186b1"],
- ["ed8ebe", "ed8eb4e186b1"],
- ["ed8ebf", "e18491e185a7e186b2"],
- ["ed8ebf", "ed8eb4e186b2"],
- ["ed8f80", "e18491e185a7e186b3"],
- ["ed8f80", "ed8eb4e186b3"],
- ["ed8f81", "e18491e185a7e186b4"],
- ["ed8f81", "ed8eb4e186b4"],
- ["ed8f82", "e18491e185a7e186b5"],
- ["ed8f82", "ed8eb4e186b5"],
- ["ed8f83", "e18491e185a7e186b6"],
- ["ed8f83", "ed8eb4e186b6"],
- ["ed8f84", "e18491e185a7e186b7"],
- ["ed8f84", "ed8eb4e186b7"],
- ["ed8f85", "e18491e185a7e186b8"],
- ["ed8f85", "ed8eb4e186b8"],
- ["ed8f86", "e18491e185a7e186b9"],
- ["ed8f86", "ed8eb4e186b9"],
- ["ed8f87", "e18491e185a7e186ba"],
- ["ed8f87", "ed8eb4e186ba"],
- ["ed8f88", "e18491e185a7e186bb"],
- ["ed8f88", "ed8eb4e186bb"],
- ["ed8f89", "e18491e185a7e186bc"],
- ["ed8f89", "ed8eb4e186bc"],
- ["ed8f8a", "e18491e185a7e186bd"],
- ["ed8f8a", "ed8eb4e186bd"],
- ["ed8f8b", "e18491e185a7e186be"],
- ["ed8f8b", "ed8eb4e186be"],
- ["ed8f8c", "e18491e185a7e186bf"],
- ["ed8f8c", "ed8eb4e186bf"],
- ["ed8f8d", "e18491e185a7e18780"],
- ["ed8f8d", "ed8eb4e18780"],
- ["ed8f8e", "e18491e185a7e18781"],
- ["ed8f8e", "ed8eb4e18781"],
- ["ed8f8f", "e18491e185a7e18782"],
- ["ed8f8f", "ed8eb4e18782"],
- ["ed8f90", "e18491e185a8"],
- ["ed8f91", "e18491e185a8e186a8"],
- ["ed8f91", "ed8f90e186a8"],
- ["ed8f92", "e18491e185a8e186a9"],
- ["ed8f92", "ed8f90e186a9"],
- ["ed8f93", "e18491e185a8e186aa"],
- ["ed8f93", "ed8f90e186aa"],
- ["ed8f94", "e18491e185a8e186ab"],
- ["ed8f94", "ed8f90e186ab"],
- ["ed8f95", "e18491e185a8e186ac"],
- ["ed8f95", "ed8f90e186ac"],
- ["ed8f96", "e18491e185a8e186ad"],
- ["ed8f96", "ed8f90e186ad"],
- ["ed8f97", "e18491e185a8e186ae"],
- ["ed8f97", "ed8f90e186ae"],
- ["ed8f98", "e18491e185a8e186af"],
- ["ed8f98", "ed8f90e186af"],
- ["ed8f99", "e18491e185a8e186b0"],
- ["ed8f99", "ed8f90e186b0"],
- ["ed8f9a", "e18491e185a8e186b1"],
- ["ed8f9a", "ed8f90e186b1"],
- ["ed8f9b", "e18491e185a8e186b2"],
- ["ed8f9b", "ed8f90e186b2"],
- ["ed8f9c", "e18491e185a8e186b3"],
- ["ed8f9c", "ed8f90e186b3"],
- ["ed8f9d", "e18491e185a8e186b4"],
- ["ed8f9d", "ed8f90e186b4"],
- ["ed8f9e", "e18491e185a8e186b5"],
- ["ed8f9e", "ed8f90e186b5"],
- ["ed8f9f", "e18491e185a8e186b6"],
- ["ed8f9f", "ed8f90e186b6"],
- ["ed8fa0", "e18491e185a8e186b7"],
- ["ed8fa0", "ed8f90e186b7"],
- ["ed8fa1", "e18491e185a8e186b8"],
- ["ed8fa1", "ed8f90e186b8"],
- ["ed8fa2", "e18491e185a8e186b9"],
- ["ed8fa2", "ed8f90e186b9"],
- ["ed8fa3", "e18491e185a8e186ba"],
- ["ed8fa3", "ed8f90e186ba"],
- ["ed8fa4", "e18491e185a8e186bb"],
- ["ed8fa4", "ed8f90e186bb"],
- ["ed8fa5", "e18491e185a8e186bc"],
- ["ed8fa5", "ed8f90e186bc"],
- ["ed8fa6", "e18491e185a8e186bd"],
- ["ed8fa6", "ed8f90e186bd"],
- ["ed8fa7", "e18491e185a8e186be"],
- ["ed8fa7", "ed8f90e186be"],
- ["ed8fa8", "e18491e185a8e186bf"],
- ["ed8fa8", "ed8f90e186bf"],
- ["ed8fa9", "e18491e185a8e18780"],
- ["ed8fa9", "ed8f90e18780"],
- ["ed8faa", "e18491e185a8e18781"],
- ["ed8faa", "ed8f90e18781"],
- ["ed8fab", "e18491e185a8e18782"],
- ["ed8fab", "ed8f90e18782"],
- ["ed8fac", "e18491e185a9"],
- ["ed8fad", "e18491e185a9e186a8"],
- ["ed8fad", "ed8face186a8"],
- ["ed8fae", "e18491e185a9e186a9"],
- ["ed8fae", "ed8face186a9"],
- ["ed8faf", "e18491e185a9e186aa"],
- ["ed8faf", "ed8face186aa"],
- ["ed8fb0", "e18491e185a9e186ab"],
- ["ed8fb0", "ed8face186ab"],
- ["ed8fb1", "e18491e185a9e186ac"],
- ["ed8fb1", "ed8face186ac"],
- ["ed8fb2", "e18491e185a9e186ad"],
- ["ed8fb2", "ed8face186ad"],
- ["ed8fb3", "e18491e185a9e186ae"],
- ["ed8fb3", "ed8face186ae"],
- ["ed8fb4", "e18491e185a9e186af"],
- ["ed8fb4", "ed8face186af"],
- ["ed8fb5", "e18491e185a9e186b0"],
- ["ed8fb5", "ed8face186b0"],
- ["ed8fb6", "e18491e185a9e186b1"],
- ["ed8fb6", "ed8face186b1"],
- ["ed8fb7", "e18491e185a9e186b2"],
- ["ed8fb7", "ed8face186b2"],
- ["ed8fb8", "e18491e185a9e186b3"],
- ["ed8fb8", "ed8face186b3"],
- ["ed8fb9", "e18491e185a9e186b4"],
- ["ed8fb9", "ed8face186b4"],
- ["ed8fba", "e18491e185a9e186b5"],
- ["ed8fba", "ed8face186b5"],
- ["ed8fbb", "e18491e185a9e186b6"],
- ["ed8fbb", "ed8face186b6"],
- ["ed8fbc", "e18491e185a9e186b7"],
- ["ed8fbc", "ed8face186b7"],
- ["ed8fbd", "e18491e185a9e186b8"],
- ["ed8fbd", "ed8face186b8"],
- ["ed8fbe", "e18491e185a9e186b9"],
- ["ed8fbe", "ed8face186b9"],
- ["ed8fbf", "e18491e185a9e186ba"],
- ["ed8fbf", "ed8face186ba"],
- ["ed9080", "e18491e185a9e186bb"],
- ["ed9080", "ed8face186bb"],
- ["ed9081", "e18491e185a9e186bc"],
- ["ed9081", "ed8face186bc"],
- ["ed9082", "e18491e185a9e186bd"],
- ["ed9082", "ed8face186bd"],
- ["ed9083", "e18491e185a9e186be"],
- ["ed9083", "ed8face186be"],
- ["ed9084", "e18491e185a9e186bf"],
- ["ed9084", "ed8face186bf"],
- ["ed9085", "e18491e185a9e18780"],
- ["ed9085", "ed8face18780"],
- ["ed9086", "e18491e185a9e18781"],
- ["ed9086", "ed8face18781"],
- ["ed9087", "e18491e185a9e18782"],
- ["ed9087", "ed8face18782"],
- ["ed9088", "e18491e185aa"],
- ["ed9089", "e18491e185aae186a8"],
- ["ed9089", "ed9088e186a8"],
- ["ed908a", "e18491e185aae186a9"],
- ["ed908a", "ed9088e186a9"],
- ["ed908b", "e18491e185aae186aa"],
- ["ed908b", "ed9088e186aa"],
- ["ed908c", "e18491e185aae186ab"],
- ["ed908c", "ed9088e186ab"],
- ["ed908d", "e18491e185aae186ac"],
- ["ed908d", "ed9088e186ac"],
- ["ed908e", "e18491e185aae186ad"],
- ["ed908e", "ed9088e186ad"],
- ["ed908f", "e18491e185aae186ae"],
- ["ed908f", "ed9088e186ae"],
- ["ed9090", "e18491e185aae186af"],
- ["ed9090", "ed9088e186af"],
- ["ed9091", "e18491e185aae186b0"],
- ["ed9091", "ed9088e186b0"],
- ["ed9092", "e18491e185aae186b1"],
- ["ed9092", "ed9088e186b1"],
- ["ed9093", "e18491e185aae186b2"],
- ["ed9093", "ed9088e186b2"],
- ["ed9094", "e18491e185aae186b3"],
- ["ed9094", "ed9088e186b3"],
- ["ed9095", "e18491e185aae186b4"],
- ["ed9095", "ed9088e186b4"],
- ["ed9096", "e18491e185aae186b5"],
- ["ed9096", "ed9088e186b5"],
- ["ed9097", "e18491e185aae186b6"],
- ["ed9097", "ed9088e186b6"],
- ["ed9098", "e18491e185aae186b7"],
- ["ed9098", "ed9088e186b7"],
- ["ed9099", "e18491e185aae186b8"],
- ["ed9099", "ed9088e186b8"],
- ["ed909a", "e18491e185aae186b9"],
- ["ed909a", "ed9088e186b9"],
- ["ed909b", "e18491e185aae186ba"],
- ["ed909b", "ed9088e186ba"],
- ["ed909c", "e18491e185aae186bb"],
- ["ed909c", "ed9088e186bb"],
- ["ed909d", "e18491e185aae186bc"],
- ["ed909d", "ed9088e186bc"],
- ["ed909e", "e18491e185aae186bd"],
- ["ed909e", "ed9088e186bd"],
- ["ed909f", "e18491e185aae186be"],
- ["ed909f", "ed9088e186be"],
- ["ed90a0", "e18491e185aae186bf"],
- ["ed90a0", "ed9088e186bf"],
- ["ed90a1", "e18491e185aae18780"],
- ["ed90a1", "ed9088e18780"],
- ["ed90a2", "e18491e185aae18781"],
- ["ed90a2", "ed9088e18781"],
- ["ed90a3", "e18491e185aae18782"],
- ["ed90a3", "ed9088e18782"],
- ["ed90a4", "e18491e185ab"],
- ["ed90a5", "e18491e185abe186a8"],
- ["ed90a5", "ed90a4e186a8"],
- ["ed90a6", "e18491e185abe186a9"],
- ["ed90a6", "ed90a4e186a9"],
- ["ed90a7", "e18491e185abe186aa"],
- ["ed90a7", "ed90a4e186aa"],
- ["ed90a8", "e18491e185abe186ab"],
- ["ed90a8", "ed90a4e186ab"],
- ["ed90a9", "e18491e185abe186ac"],
- ["ed90a9", "ed90a4e186ac"],
- ["ed90aa", "e18491e185abe186ad"],
- ["ed90aa", "ed90a4e186ad"],
- ["ed90ab", "e18491e185abe186ae"],
- ["ed90ab", "ed90a4e186ae"],
- ["ed90ac", "e18491e185abe186af"],
- ["ed90ac", "ed90a4e186af"],
- ["ed90ad", "e18491e185abe186b0"],
- ["ed90ad", "ed90a4e186b0"],
- ["ed90ae", "e18491e185abe186b1"],
- ["ed90ae", "ed90a4e186b1"],
- ["ed90af", "e18491e185abe186b2"],
- ["ed90af", "ed90a4e186b2"],
- ["ed90b0", "e18491e185abe186b3"],
- ["ed90b0", "ed90a4e186b3"],
- ["ed90b1", "e18491e185abe186b4"],
- ["ed90b1", "ed90a4e186b4"],
- ["ed90b2", "e18491e185abe186b5"],
- ["ed90b2", "ed90a4e186b5"],
- ["ed90b3", "e18491e185abe186b6"],
- ["ed90b3", "ed90a4e186b6"],
- ["ed90b4", "e18491e185abe186b7"],
- ["ed90b4", "ed90a4e186b7"],
- ["ed90b5", "e18491e185abe186b8"],
- ["ed90b5", "ed90a4e186b8"],
- ["ed90b6", "e18491e185abe186b9"],
- ["ed90b6", "ed90a4e186b9"],
- ["ed90b7", "e18491e185abe186ba"],
- ["ed90b7", "ed90a4e186ba"],
- ["ed90b8", "e18491e185abe186bb"],
- ["ed90b8", "ed90a4e186bb"],
- ["ed90b9", "e18491e185abe186bc"],
- ["ed90b9", "ed90a4e186bc"],
- ["ed90ba", "e18491e185abe186bd"],
- ["ed90ba", "ed90a4e186bd"],
- ["ed90bb", "e18491e185abe186be"],
- ["ed90bb", "ed90a4e186be"],
- ["ed90bc", "e18491e185abe186bf"],
- ["ed90bc", "ed90a4e186bf"],
- ["ed90bd", "e18491e185abe18780"],
- ["ed90bd", "ed90a4e18780"],
- ["ed90be", "e18491e185abe18781"],
- ["ed90be", "ed90a4e18781"],
- ["ed90bf", "e18491e185abe18782"],
- ["ed90bf", "ed90a4e18782"],
- ["ed9180", "e18491e185ac"],
- ["ed9181", "e18491e185ace186a8"],
- ["ed9181", "ed9180e186a8"],
- ["ed9182", "e18491e185ace186a9"],
- ["ed9182", "ed9180e186a9"],
- ["ed9183", "e18491e185ace186aa"],
- ["ed9183", "ed9180e186aa"],
- ["ed9184", "e18491e185ace186ab"],
- ["ed9184", "ed9180e186ab"],
- ["ed9185", "e18491e185ace186ac"],
- ["ed9185", "ed9180e186ac"],
- ["ed9186", "e18491e185ace186ad"],
- ["ed9186", "ed9180e186ad"],
- ["ed9187", "e18491e185ace186ae"],
- ["ed9187", "ed9180e186ae"],
- ["ed9188", "e18491e185ace186af"],
- ["ed9188", "ed9180e186af"],
- ["ed9189", "e18491e185ace186b0"],
- ["ed9189", "ed9180e186b0"],
- ["ed918a", "e18491e185ace186b1"],
- ["ed918a", "ed9180e186b1"],
- ["ed918b", "e18491e185ace186b2"],
- ["ed918b", "ed9180e186b2"],
- ["ed918c", "e18491e185ace186b3"],
- ["ed918c", "ed9180e186b3"],
- ["ed918d", "e18491e185ace186b4"],
- ["ed918d", "ed9180e186b4"],
- ["ed918e", "e18491e185ace186b5"],
- ["ed918e", "ed9180e186b5"],
- ["ed918f", "e18491e185ace186b6"],
- ["ed918f", "ed9180e186b6"],
- ["ed9190", "e18491e185ace186b7"],
- ["ed9190", "ed9180e186b7"],
- ["ed9191", "e18491e185ace186b8"],
- ["ed9191", "ed9180e186b8"],
- ["ed9192", "e18491e185ace186b9"],
- ["ed9192", "ed9180e186b9"],
- ["ed9193", "e18491e185ace186ba"],
- ["ed9193", "ed9180e186ba"],
- ["ed9194", "e18491e185ace186bb"],
- ["ed9194", "ed9180e186bb"],
- ["ed9195", "e18491e185ace186bc"],
- ["ed9195", "ed9180e186bc"],
- ["ed9196", "e18491e185ace186bd"],
- ["ed9196", "ed9180e186bd"],
- ["ed9197", "e18491e185ace186be"],
- ["ed9197", "ed9180e186be"],
- ["ed9198", "e18491e185ace186bf"],
- ["ed9198", "ed9180e186bf"],
- ["ed9199", "e18491e185ace18780"],
- ["ed9199", "ed9180e18780"],
- ["ed919a", "e18491e185ace18781"],
- ["ed919a", "ed9180e18781"],
- ["ed919b", "e18491e185ace18782"],
- ["ed919b", "ed9180e18782"],
- ["ed919c", "e18491e185ad"],
- ["ed919d", "e18491e185ade186a8"],
- ["ed919d", "ed919ce186a8"],
- ["ed919e", "e18491e185ade186a9"],
- ["ed919e", "ed919ce186a9"],
- ["ed919f", "e18491e185ade186aa"],
- ["ed919f", "ed919ce186aa"],
- ["ed91a0", "e18491e185ade186ab"],
- ["ed91a0", "ed919ce186ab"],
- ["ed91a1", "e18491e185ade186ac"],
- ["ed91a1", "ed919ce186ac"],
- ["ed91a2", "e18491e185ade186ad"],
- ["ed91a2", "ed919ce186ad"],
- ["ed91a3", "e18491e185ade186ae"],
- ["ed91a3", "ed919ce186ae"],
- ["ed91a4", "e18491e185ade186af"],
- ["ed91a4", "ed919ce186af"],
- ["ed91a5", "e18491e185ade186b0"],
- ["ed91a5", "ed919ce186b0"],
- ["ed91a6", "e18491e185ade186b1"],
- ["ed91a6", "ed919ce186b1"],
- ["ed91a7", "e18491e185ade186b2"],
- ["ed91a7", "ed919ce186b2"],
- ["ed91a8", "e18491e185ade186b3"],
- ["ed91a8", "ed919ce186b3"],
- ["ed91a9", "e18491e185ade186b4"],
- ["ed91a9", "ed919ce186b4"],
- ["ed91aa", "e18491e185ade186b5"],
- ["ed91aa", "ed919ce186b5"],
- ["ed91ab", "e18491e185ade186b6"],
- ["ed91ab", "ed919ce186b6"],
- ["ed91ac", "e18491e185ade186b7"],
- ["ed91ac", "ed919ce186b7"],
- ["ed91ad", "e18491e185ade186b8"],
- ["ed91ad", "ed919ce186b8"],
- ["ed91ae", "e18491e185ade186b9"],
- ["ed91ae", "ed919ce186b9"],
- ["ed91af", "e18491e185ade186ba"],
- ["ed91af", "ed919ce186ba"],
- ["ed91b0", "e18491e185ade186bb"],
- ["ed91b0", "ed919ce186bb"],
- ["ed91b1", "e18491e185ade186bc"],
- ["ed91b1", "ed919ce186bc"],
- ["ed91b2", "e18491e185ade186bd"],
- ["ed91b2", "ed919ce186bd"],
- ["ed91b3", "e18491e185ade186be"],
- ["ed91b3", "ed919ce186be"],
- ["ed91b4", "e18491e185ade186bf"],
- ["ed91b4", "ed919ce186bf"],
- ["ed91b5", "e18491e185ade18780"],
- ["ed91b5", "ed919ce18780"],
- ["ed91b6", "e18491e185ade18781"],
- ["ed91b6", "ed919ce18781"],
- ["ed91b7", "e18491e185ade18782"],
- ["ed91b7", "ed919ce18782"],
- ["ed91b8", "e18491e185ae"],
- ["ed91b9", "e18491e185aee186a8"],
- ["ed91b9", "ed91b8e186a8"],
- ["ed91ba", "e18491e185aee186a9"],
- ["ed91ba", "ed91b8e186a9"],
- ["ed91bb", "e18491e185aee186aa"],
- ["ed91bb", "ed91b8e186aa"],
- ["ed91bc", "e18491e185aee186ab"],
- ["ed91bc", "ed91b8e186ab"],
- ["ed91bd", "e18491e185aee186ac"],
- ["ed91bd", "ed91b8e186ac"],
- ["ed91be", "e18491e185aee186ad"],
- ["ed91be", "ed91b8e186ad"],
- ["ed91bf", "e18491e185aee186ae"],
- ["ed91bf", "ed91b8e186ae"],
- ["ed9280", "e18491e185aee186af"],
- ["ed9280", "ed91b8e186af"],
- ["ed9281", "e18491e185aee186b0"],
- ["ed9281", "ed91b8e186b0"],
- ["ed9282", "e18491e185aee186b1"],
- ["ed9282", "ed91b8e186b1"],
- ["ed9283", "e18491e185aee186b2"],
- ["ed9283", "ed91b8e186b2"],
- ["ed9284", "e18491e185aee186b3"],
- ["ed9284", "ed91b8e186b3"],
- ["ed9285", "e18491e185aee186b4"],
- ["ed9285", "ed91b8e186b4"],
- ["ed9286", "e18491e185aee186b5"],
- ["ed9286", "ed91b8e186b5"],
- ["ed9287", "e18491e185aee186b6"],
- ["ed9287", "ed91b8e186b6"],
- ["ed9288", "e18491e185aee186b7"],
- ["ed9288", "ed91b8e186b7"],
- ["ed9289", "e18491e185aee186b8"],
- ["ed9289", "ed91b8e186b8"],
- ["ed928a", "e18491e185aee186b9"],
- ["ed928a", "ed91b8e186b9"],
- ["ed928b", "e18491e185aee186ba"],
- ["ed928b", "ed91b8e186ba"],
- ["ed928c", "e18491e185aee186bb"],
- ["ed928c", "ed91b8e186bb"],
- ["ed928d", "e18491e185aee186bc"],
- ["ed928d", "ed91b8e186bc"],
- ["ed928e", "e18491e185aee186bd"],
- ["ed928e", "ed91b8e186bd"],
- ["ed928f", "e18491e185aee186be"],
- ["ed928f", "ed91b8e186be"],
- ["ed9290", "e18491e185aee186bf"],
- ["ed9290", "ed91b8e186bf"],
- ["ed9291", "e18491e185aee18780"],
- ["ed9291", "ed91b8e18780"],
- ["ed9292", "e18491e185aee18781"],
- ["ed9292", "ed91b8e18781"],
- ["ed9293", "e18491e185aee18782"],
- ["ed9293", "ed91b8e18782"],
- ["ed9294", "e18491e185af"],
- ["ed9295", "e18491e185afe186a8"],
- ["ed9295", "ed9294e186a8"],
- ["ed9296", "e18491e185afe186a9"],
- ["ed9296", "ed9294e186a9"],
- ["ed9297", "e18491e185afe186aa"],
- ["ed9297", "ed9294e186aa"],
- ["ed9298", "e18491e185afe186ab"],
- ["ed9298", "ed9294e186ab"],
- ["ed9299", "e18491e185afe186ac"],
- ["ed9299", "ed9294e186ac"],
- ["ed929a", "e18491e185afe186ad"],
- ["ed929a", "ed9294e186ad"],
- ["ed929b", "e18491e185afe186ae"],
- ["ed929b", "ed9294e186ae"],
- ["ed929c", "e18491e185afe186af"],
- ["ed929c", "ed9294e186af"],
- ["ed929d", "e18491e185afe186b0"],
- ["ed929d", "ed9294e186b0"],
- ["ed929e", "e18491e185afe186b1"],
- ["ed929e", "ed9294e186b1"],
- ["ed929f", "e18491e185afe186b2"],
- ["ed929f", "ed9294e186b2"],
- ["ed92a0", "e18491e185afe186b3"],
- ["ed92a0", "ed9294e186b3"],
- ["ed92a1", "e18491e185afe186b4"],
- ["ed92a1", "ed9294e186b4"],
- ["ed92a2", "e18491e185afe186b5"],
- ["ed92a2", "ed9294e186b5"],
- ["ed92a3", "e18491e185afe186b6"],
- ["ed92a3", "ed9294e186b6"],
- ["ed92a4", "e18491e185afe186b7"],
- ["ed92a4", "ed9294e186b7"],
- ["ed92a5", "e18491e185afe186b8"],
- ["ed92a5", "ed9294e186b8"],
- ["ed92a6", "e18491e185afe186b9"],
- ["ed92a6", "ed9294e186b9"],
- ["ed92a7", "e18491e185afe186ba"],
- ["ed92a7", "ed9294e186ba"],
- ["ed92a8", "e18491e185afe186bb"],
- ["ed92a8", "ed9294e186bb"],
- ["ed92a9", "e18491e185afe186bc"],
- ["ed92a9", "ed9294e186bc"],
- ["ed92aa", "e18491e185afe186bd"],
- ["ed92aa", "ed9294e186bd"],
- ["ed92ab", "e18491e185afe186be"],
- ["ed92ab", "ed9294e186be"],
- ["ed92ac", "e18491e185afe186bf"],
- ["ed92ac", "ed9294e186bf"],
- ["ed92ad", "e18491e185afe18780"],
- ["ed92ad", "ed9294e18780"],
- ["ed92ae", "e18491e185afe18781"],
- ["ed92ae", "ed9294e18781"],
- ["ed92af", "e18491e185afe18782"],
- ["ed92af", "ed9294e18782"],
- ["ed92b0", "e18491e185b0"],
- ["ed92b1", "e18491e185b0e186a8"],
- ["ed92b1", "ed92b0e186a8"],
- ["ed92b2", "e18491e185b0e186a9"],
- ["ed92b2", "ed92b0e186a9"],
- ["ed92b3", "e18491e185b0e186aa"],
- ["ed92b3", "ed92b0e186aa"],
- ["ed92b4", "e18491e185b0e186ab"],
- ["ed92b4", "ed92b0e186ab"],
- ["ed92b5", "e18491e185b0e186ac"],
- ["ed92b5", "ed92b0e186ac"],
- ["ed92b6", "e18491e185b0e186ad"],
- ["ed92b6", "ed92b0e186ad"],
- ["ed92b7", "e18491e185b0e186ae"],
- ["ed92b7", "ed92b0e186ae"],
- ["ed92b8", "e18491e185b0e186af"],
- ["ed92b8", "ed92b0e186af"],
- ["ed92b9", "e18491e185b0e186b0"],
- ["ed92b9", "ed92b0e186b0"],
- ["ed92ba", "e18491e185b0e186b1"],
- ["ed92ba", "ed92b0e186b1"],
- ["ed92bb", "e18491e185b0e186b2"],
- ["ed92bb", "ed92b0e186b2"],
- ["ed92bc", "e18491e185b0e186b3"],
- ["ed92bc", "ed92b0e186b3"],
- ["ed92bd", "e18491e185b0e186b4"],
- ["ed92bd", "ed92b0e186b4"],
- ["ed92be", "e18491e185b0e186b5"],
- ["ed92be", "ed92b0e186b5"],
- ["ed92bf", "e18491e185b0e186b6"],
- ["ed92bf", "ed92b0e186b6"],
- ["ed9380", "e18491e185b0e186b7"],
- ["ed9380", "ed92b0e186b7"],
- ["ed9381", "e18491e185b0e186b8"],
- ["ed9381", "ed92b0e186b8"],
- ["ed9382", "e18491e185b0e186b9"],
- ["ed9382", "ed92b0e186b9"],
- ["ed9383", "e18491e185b0e186ba"],
- ["ed9383", "ed92b0e186ba"],
- ["ed9384", "e18491e185b0e186bb"],
- ["ed9384", "ed92b0e186bb"],
- ["ed9385", "e18491e185b0e186bc"],
- ["ed9385", "ed92b0e186bc"],
- ["ed9386", "e18491e185b0e186bd"],
- ["ed9386", "ed92b0e186bd"],
- ["ed9387", "e18491e185b0e186be"],
- ["ed9387", "ed92b0e186be"],
- ["ed9388", "e18491e185b0e186bf"],
- ["ed9388", "ed92b0e186bf"],
- ["ed9389", "e18491e185b0e18780"],
- ["ed9389", "ed92b0e18780"],
- ["ed938a", "e18491e185b0e18781"],
- ["ed938a", "ed92b0e18781"],
- ["ed938b", "e18491e185b0e18782"],
- ["ed938b", "ed92b0e18782"],
- ["ed938c", "e18491e185b1"],
- ["ed938d", "e18491e185b1e186a8"],
- ["ed938d", "ed938ce186a8"],
- ["ed938e", "e18491e185b1e186a9"],
- ["ed938e", "ed938ce186a9"],
- ["ed938f", "e18491e185b1e186aa"],
- ["ed938f", "ed938ce186aa"],
- ["ed9390", "e18491e185b1e186ab"],
- ["ed9390", "ed938ce186ab"],
- ["ed9391", "e18491e185b1e186ac"],
- ["ed9391", "ed938ce186ac"],
- ["ed9392", "e18491e185b1e186ad"],
- ["ed9392", "ed938ce186ad"],
- ["ed9393", "e18491e185b1e186ae"],
- ["ed9393", "ed938ce186ae"],
- ["ed9394", "e18491e185b1e186af"],
- ["ed9394", "ed938ce186af"],
- ["ed9395", "e18491e185b1e186b0"],
- ["ed9395", "ed938ce186b0"],
- ["ed9396", "e18491e185b1e186b1"],
- ["ed9396", "ed938ce186b1"],
- ["ed9397", "e18491e185b1e186b2"],
- ["ed9397", "ed938ce186b2"],
- ["ed9398", "e18491e185b1e186b3"],
- ["ed9398", "ed938ce186b3"],
- ["ed9399", "e18491e185b1e186b4"],
- ["ed9399", "ed938ce186b4"],
- ["ed939a", "e18491e185b1e186b5"],
- ["ed939a", "ed938ce186b5"],
- ["ed939b", "e18491e185b1e186b6"],
- ["ed939b", "ed938ce186b6"],
- ["ed939c", "e18491e185b1e186b7"],
- ["ed939c", "ed938ce186b7"],
- ["ed939d", "e18491e185b1e186b8"],
- ["ed939d", "ed938ce186b8"],
- ["ed939e", "e18491e185b1e186b9"],
- ["ed939e", "ed938ce186b9"],
- ["ed939f", "e18491e185b1e186ba"],
- ["ed939f", "ed938ce186ba"],
- ["ed93a0", "e18491e185b1e186bb"],
- ["ed93a0", "ed938ce186bb"],
- ["ed93a1", "e18491e185b1e186bc"],
- ["ed93a1", "ed938ce186bc"],
- ["ed93a2", "e18491e185b1e186bd"],
- ["ed93a2", "ed938ce186bd"],
- ["ed93a3", "e18491e185b1e186be"],
- ["ed93a3", "ed938ce186be"],
- ["ed93a4", "e18491e185b1e186bf"],
- ["ed93a4", "ed938ce186bf"],
- ["ed93a5", "e18491e185b1e18780"],
- ["ed93a5", "ed938ce18780"],
- ["ed93a6", "e18491e185b1e18781"],
- ["ed93a6", "ed938ce18781"],
- ["ed93a7", "e18491e185b1e18782"],
- ["ed93a7", "ed938ce18782"],
- ["ed93a8", "e18491e185b2"],
- ["ed93a9", "e18491e185b2e186a8"],
- ["ed93a9", "ed93a8e186a8"],
- ["ed93aa", "e18491e185b2e186a9"],
- ["ed93aa", "ed93a8e186a9"],
- ["ed93ab", "e18491e185b2e186aa"],
- ["ed93ab", "ed93a8e186aa"],
- ["ed93ac", "e18491e185b2e186ab"],
- ["ed93ac", "ed93a8e186ab"],
- ["ed93ad", "e18491e185b2e186ac"],
- ["ed93ad", "ed93a8e186ac"],
- ["ed93ae", "e18491e185b2e186ad"],
- ["ed93ae", "ed93a8e186ad"],
- ["ed93af", "e18491e185b2e186ae"],
- ["ed93af", "ed93a8e186ae"],
- ["ed93b0", "e18491e185b2e186af"],
- ["ed93b0", "ed93a8e186af"],
- ["ed93b1", "e18491e185b2e186b0"],
- ["ed93b1", "ed93a8e186b0"],
- ["ed93b2", "e18491e185b2e186b1"],
- ["ed93b2", "ed93a8e186b1"],
- ["ed93b3", "e18491e185b2e186b2"],
- ["ed93b3", "ed93a8e186b2"],
- ["ed93b4", "e18491e185b2e186b3"],
- ["ed93b4", "ed93a8e186b3"],
- ["ed93b5", "e18491e185b2e186b4"],
- ["ed93b5", "ed93a8e186b4"],
- ["ed93b6", "e18491e185b2e186b5"],
- ["ed93b6", "ed93a8e186b5"],
- ["ed93b7", "e18491e185b2e186b6"],
- ["ed93b7", "ed93a8e186b6"],
- ["ed93b8", "e18491e185b2e186b7"],
- ["ed93b8", "ed93a8e186b7"],
- ["ed93b9", "e18491e185b2e186b8"],
- ["ed93b9", "ed93a8e186b8"],
- ["ed93ba", "e18491e185b2e186b9"],
- ["ed93ba", "ed93a8e186b9"],
- ["ed93bb", "e18491e185b2e186ba"],
- ["ed93bb", "ed93a8e186ba"],
- ["ed93bc", "e18491e185b2e186bb"],
- ["ed93bc", "ed93a8e186bb"],
- ["ed93bd", "e18491e185b2e186bc"],
- ["ed93bd", "ed93a8e186bc"],
- ["ed93be", "e18491e185b2e186bd"],
- ["ed93be", "ed93a8e186bd"],
- ["ed93bf", "e18491e185b2e186be"],
- ["ed93bf", "ed93a8e186be"],
- ["ed9480", "e18491e185b2e186bf"],
- ["ed9480", "ed93a8e186bf"],
- ["ed9481", "e18491e185b2e18780"],
- ["ed9481", "ed93a8e18780"],
- ["ed9482", "e18491e185b2e18781"],
- ["ed9482", "ed93a8e18781"],
- ["ed9483", "e18491e185b2e18782"],
- ["ed9483", "ed93a8e18782"],
- ["ed9484", "e18491e185b3"],
- ["ed9485", "e18491e185b3e186a8"],
- ["ed9485", "ed9484e186a8"],
- ["ed9486", "e18491e185b3e186a9"],
- ["ed9486", "ed9484e186a9"],
- ["ed9487", "e18491e185b3e186aa"],
- ["ed9487", "ed9484e186aa"],
- ["ed9488", "e18491e185b3e186ab"],
- ["ed9488", "ed9484e186ab"],
- ["ed9489", "e18491e185b3e186ac"],
- ["ed9489", "ed9484e186ac"],
- ["ed948a", "e18491e185b3e186ad"],
- ["ed948a", "ed9484e186ad"],
- ["ed948b", "e18491e185b3e186ae"],
- ["ed948b", "ed9484e186ae"],
- ["ed948c", "e18491e185b3e186af"],
- ["ed948c", "ed9484e186af"],
- ["ed948d", "e18491e185b3e186b0"],
- ["ed948d", "ed9484e186b0"],
- ["ed948e", "e18491e185b3e186b1"],
- ["ed948e", "ed9484e186b1"],
- ["ed948f", "e18491e185b3e186b2"],
- ["ed948f", "ed9484e186b2"],
- ["ed9490", "e18491e185b3e186b3"],
- ["ed9490", "ed9484e186b3"],
- ["ed9491", "e18491e185b3e186b4"],
- ["ed9491", "ed9484e186b4"],
- ["ed9492", "e18491e185b3e186b5"],
- ["ed9492", "ed9484e186b5"],
- ["ed9493", "e18491e185b3e186b6"],
- ["ed9493", "ed9484e186b6"],
- ["ed9494", "e18491e185b3e186b7"],
- ["ed9494", "ed9484e186b7"],
- ["ed9495", "e18491e185b3e186b8"],
- ["ed9495", "ed9484e186b8"],
- ["ed9496", "e18491e185b3e186b9"],
- ["ed9496", "ed9484e186b9"],
- ["ed9497", "e18491e185b3e186ba"],
- ["ed9497", "ed9484e186ba"],
- ["ed9498", "e18491e185b3e186bb"],
- ["ed9498", "ed9484e186bb"],
- ["ed9499", "e18491e185b3e186bc"],
- ["ed9499", "ed9484e186bc"],
- ["ed949a", "e18491e185b3e186bd"],
- ["ed949a", "ed9484e186bd"],
- ["ed949b", "e18491e185b3e186be"],
- ["ed949b", "ed9484e186be"],
- ["ed949c", "e18491e185b3e186bf"],
- ["ed949c", "ed9484e186bf"],
- ["ed949d", "e18491e185b3e18780"],
- ["ed949d", "ed9484e18780"],
- ["ed949e", "e18491e185b3e18781"],
- ["ed949e", "ed9484e18781"],
- ["ed949f", "e18491e185b3e18782"],
- ["ed949f", "ed9484e18782"],
- ["ed94a0", "e18491e185b4"],
- ["ed94a1", "e18491e185b4e186a8"],
- ["ed94a1", "ed94a0e186a8"],
- ["ed94a2", "e18491e185b4e186a9"],
- ["ed94a2", "ed94a0e186a9"],
- ["ed94a3", "e18491e185b4e186aa"],
- ["ed94a3", "ed94a0e186aa"],
- ["ed94a4", "e18491e185b4e186ab"],
- ["ed94a4", "ed94a0e186ab"],
- ["ed94a5", "e18491e185b4e186ac"],
- ["ed94a5", "ed94a0e186ac"],
- ["ed94a6", "e18491e185b4e186ad"],
- ["ed94a6", "ed94a0e186ad"],
- ["ed94a7", "e18491e185b4e186ae"],
- ["ed94a7", "ed94a0e186ae"],
- ["ed94a8", "e18491e185b4e186af"],
- ["ed94a8", "ed94a0e186af"],
- ["ed94a9", "e18491e185b4e186b0"],
- ["ed94a9", "ed94a0e186b0"],
- ["ed94aa", "e18491e185b4e186b1"],
- ["ed94aa", "ed94a0e186b1"],
- ["ed94ab", "e18491e185b4e186b2"],
- ["ed94ab", "ed94a0e186b2"],
- ["ed94ac", "e18491e185b4e186b3"],
- ["ed94ac", "ed94a0e186b3"],
- ["ed94ad", "e18491e185b4e186b4"],
- ["ed94ad", "ed94a0e186b4"],
- ["ed94ae", "e18491e185b4e186b5"],
- ["ed94ae", "ed94a0e186b5"],
- ["ed94af", "e18491e185b4e186b6"],
- ["ed94af", "ed94a0e186b6"],
- ["ed94b0", "e18491e185b4e186b7"],
- ["ed94b0", "ed94a0e186b7"],
- ["ed94b1", "e18491e185b4e186b8"],
- ["ed94b1", "ed94a0e186b8"],
- ["ed94b2", "e18491e185b4e186b9"],
- ["ed94b2", "ed94a0e186b9"],
- ["ed94b3", "e18491e185b4e186ba"],
- ["ed94b3", "ed94a0e186ba"],
- ["ed94b4", "e18491e185b4e186bb"],
- ["ed94b4", "ed94a0e186bb"],
- ["ed94b5", "e18491e185b4e186bc"],
- ["ed94b5", "ed94a0e186bc"],
- ["ed94b6", "e18491e185b4e186bd"],
- ["ed94b6", "ed94a0e186bd"],
- ["ed94b7", "e18491e185b4e186be"],
- ["ed94b7", "ed94a0e186be"],
- ["ed94b8", "e18491e185b4e186bf"],
- ["ed94b8", "ed94a0e186bf"],
- ["ed94b9", "e18491e185b4e18780"],
- ["ed94b9", "ed94a0e18780"],
- ["ed94ba", "e18491e185b4e18781"],
- ["ed94ba", "ed94a0e18781"],
- ["ed94bb", "e18491e185b4e18782"],
- ["ed94bb", "ed94a0e18782"],
- ["ed94bc", "e18491e185b5"],
- ["ed94bd", "e18491e185b5e186a8"],
- ["ed94bd", "ed94bce186a8"],
- ["ed94be", "e18491e185b5e186a9"],
- ["ed94be", "ed94bce186a9"],
- ["ed94bf", "e18491e185b5e186aa"],
- ["ed94bf", "ed94bce186aa"],
- ["ed9580", "e18491e185b5e186ab"],
- ["ed9580", "ed94bce186ab"],
- ["ed9581", "e18491e185b5e186ac"],
- ["ed9581", "ed94bce186ac"],
- ["ed9582", "e18491e185b5e186ad"],
- ["ed9582", "ed94bce186ad"],
- ["ed9583", "e18491e185b5e186ae"],
- ["ed9583", "ed94bce186ae"],
- ["ed9584", "e18491e185b5e186af"],
- ["ed9584", "ed94bce186af"],
- ["ed9585", "e18491e185b5e186b0"],
- ["ed9585", "ed94bce186b0"],
- ["ed9586", "e18491e185b5e186b1"],
- ["ed9586", "ed94bce186b1"],
- ["ed9587", "e18491e185b5e186b2"],
- ["ed9587", "ed94bce186b2"],
- ["ed9588", "e18491e185b5e186b3"],
- ["ed9588", "ed94bce186b3"],
- ["ed9589", "e18491e185b5e186b4"],
- ["ed9589", "ed94bce186b4"],
- ["ed958a", "e18491e185b5e186b5"],
- ["ed958a", "ed94bce186b5"],
- ["ed958b", "e18491e185b5e186b6"],
- ["ed958b", "ed94bce186b6"],
- ["ed958c", "e18491e185b5e186b7"],
- ["ed958c", "ed94bce186b7"],
- ["ed958d", "e18491e185b5e186b8"],
- ["ed958d", "ed94bce186b8"],
- ["ed958e", "e18491e185b5e186b9"],
- ["ed958e", "ed94bce186b9"],
- ["ed958f", "e18491e185b5e186ba"],
- ["ed958f", "ed94bce186ba"],
- ["ed9590", "e18491e185b5e186bb"],
- ["ed9590", "ed94bce186bb"],
- ["ed9591", "e18491e185b5e186bc"],
- ["ed9591", "ed94bce186bc"],
- ["ed9592", "e18491e185b5e186bd"],
- ["ed9592", "ed94bce186bd"],
- ["ed9593", "e18491e185b5e186be"],
- ["ed9593", "ed94bce186be"],
- ["ed9594", "e18491e185b5e186bf"],
- ["ed9594", "ed94bce186bf"],
- ["ed9595", "e18491e185b5e18780"],
- ["ed9595", "ed94bce18780"],
- ["ed9596", "e18491e185b5e18781"],
- ["ed9596", "ed94bce18781"],
- ["ed9597", "e18491e185b5e18782"],
- ["ed9597", "ed94bce18782"],
- ["ed9598", "e18492e185a1"],
- ["ed9599", "e18492e185a1e186a8"],
- ["ed9599", "ed9598e186a8"],
- ["ed959a", "e18492e185a1e186a9"],
- ["ed959a", "ed9598e186a9"],
- ["ed959b", "e18492e185a1e186aa"],
- ["ed959b", "ed9598e186aa"],
- ["ed959c", "e18492e185a1e186ab"],
- ["ed959c", "ed9598e186ab"],
- ["ed959d", "e18492e185a1e186ac"],
- ["ed959d", "ed9598e186ac"],
- ["ed959e", "e18492e185a1e186ad"],
- ["ed959e", "ed9598e186ad"],
- ["ed959f", "e18492e185a1e186ae"],
- ["ed959f", "ed9598e186ae"],
- ["ed95a0", "e18492e185a1e186af"],
- ["ed95a0", "ed9598e186af"],
- ["ed95a1", "e18492e185a1e186b0"],
- ["ed95a1", "ed9598e186b0"],
- ["ed95a2", "e18492e185a1e186b1"],
- ["ed95a2", "ed9598e186b1"],
- ["ed95a3", "e18492e185a1e186b2"],
- ["ed95a3", "ed9598e186b2"],
- ["ed95a4", "e18492e185a1e186b3"],
- ["ed95a4", "ed9598e186b3"],
- ["ed95a5", "e18492e185a1e186b4"],
- ["ed95a5", "ed9598e186b4"],
- ["ed95a6", "e18492e185a1e186b5"],
- ["ed95a6", "ed9598e186b5"],
- ["ed95a7", "e18492e185a1e186b6"],
- ["ed95a7", "ed9598e186b6"],
- ["ed95a8", "e18492e185a1e186b7"],
- ["ed95a8", "ed9598e186b7"],
- ["ed95a9", "e18492e185a1e186b8"],
- ["ed95a9", "ed9598e186b8"],
- ["ed95aa", "e18492e185a1e186b9"],
- ["ed95aa", "ed9598e186b9"],
- ["ed95ab", "e18492e185a1e186ba"],
- ["ed95ab", "ed9598e186ba"],
- ["ed95ac", "e18492e185a1e186bb"],
- ["ed95ac", "ed9598e186bb"],
- ["ed95ad", "e18492e185a1e186bc"],
- ["ed95ad", "ed9598e186bc"],
- ["ed95ae", "e18492e185a1e186bd"],
- ["ed95ae", "ed9598e186bd"],
- ["ed95af", "e18492e185a1e186be"],
- ["ed95af", "ed9598e186be"],
- ["ed95b0", "e18492e185a1e186bf"],
- ["ed95b0", "ed9598e186bf"],
- ["ed95b1", "e18492e185a1e18780"],
- ["ed95b1", "ed9598e18780"],
- ["ed95b2", "e18492e185a1e18781"],
- ["ed95b2", "ed9598e18781"],
- ["ed95b3", "e18492e185a1e18782"],
- ["ed95b3", "ed9598e18782"],
- ["ed95b4", "e18492e185a2"],
- ["ed95b5", "e18492e185a2e186a8"],
- ["ed95b5", "ed95b4e186a8"],
- ["ed95b6", "e18492e185a2e186a9"],
- ["ed95b6", "ed95b4e186a9"],
- ["ed95b7", "e18492e185a2e186aa"],
- ["ed95b7", "ed95b4e186aa"],
- ["ed95b8", "e18492e185a2e186ab"],
- ["ed95b8", "ed95b4e186ab"],
- ["ed95b9", "e18492e185a2e186ac"],
- ["ed95b9", "ed95b4e186ac"],
- ["ed95ba", "e18492e185a2e186ad"],
- ["ed95ba", "ed95b4e186ad"],
- ["ed95bb", "e18492e185a2e186ae"],
- ["ed95bb", "ed95b4e186ae"],
- ["ed95bc", "e18492e185a2e186af"],
- ["ed95bc", "ed95b4e186af"],
- ["ed95bd", "e18492e185a2e186b0"],
- ["ed95bd", "ed95b4e186b0"],
- ["ed95be", "e18492e185a2e186b1"],
- ["ed95be", "ed95b4e186b1"],
- ["ed95bf", "e18492e185a2e186b2"],
- ["ed95bf", "ed95b4e186b2"],
- ["ed9680", "e18492e185a2e186b3"],
- ["ed9680", "ed95b4e186b3"],
- ["ed9681", "e18492e185a2e186b4"],
- ["ed9681", "ed95b4e186b4"],
- ["ed9682", "e18492e185a2e186b5"],
- ["ed9682", "ed95b4e186b5"],
- ["ed9683", "e18492e185a2e186b6"],
- ["ed9683", "ed95b4e186b6"],
- ["ed9684", "e18492e185a2e186b7"],
- ["ed9684", "ed95b4e186b7"],
- ["ed9685", "e18492e185a2e186b8"],
- ["ed9685", "ed95b4e186b8"],
- ["ed9686", "e18492e185a2e186b9"],
- ["ed9686", "ed95b4e186b9"],
- ["ed9687", "e18492e185a2e186ba"],
- ["ed9687", "ed95b4e186ba"],
- ["ed9688", "e18492e185a2e186bb"],
- ["ed9688", "ed95b4e186bb"],
- ["ed9689", "e18492e185a2e186bc"],
- ["ed9689", "ed95b4e186bc"],
- ["ed968a", "e18492e185a2e186bd"],
- ["ed968a", "ed95b4e186bd"],
- ["ed968b", "e18492e185a2e186be"],
- ["ed968b", "ed95b4e186be"],
- ["ed968c", "e18492e185a2e186bf"],
- ["ed968c", "ed95b4e186bf"],
- ["ed968d", "e18492e185a2e18780"],
- ["ed968d", "ed95b4e18780"],
- ["ed968e", "e18492e185a2e18781"],
- ["ed968e", "ed95b4e18781"],
- ["ed968f", "e18492e185a2e18782"],
- ["ed968f", "ed95b4e18782"],
- ["ed9690", "e18492e185a3"],
- ["ed9691", "e18492e185a3e186a8"],
- ["ed9691", "ed9690e186a8"],
- ["ed9692", "e18492e185a3e186a9"],
- ["ed9692", "ed9690e186a9"],
- ["ed9693", "e18492e185a3e186aa"],
- ["ed9693", "ed9690e186aa"],
- ["ed9694", "e18492e185a3e186ab"],
- ["ed9694", "ed9690e186ab"],
- ["ed9695", "e18492e185a3e186ac"],
- ["ed9695", "ed9690e186ac"],
- ["ed9696", "e18492e185a3e186ad"],
- ["ed9696", "ed9690e186ad"],
- ["ed9697", "e18492e185a3e186ae"],
- ["ed9697", "ed9690e186ae"],
- ["ed9698", "e18492e185a3e186af"],
- ["ed9698", "ed9690e186af"],
- ["ed9699", "e18492e185a3e186b0"],
- ["ed9699", "ed9690e186b0"],
- ["ed969a", "e18492e185a3e186b1"],
- ["ed969a", "ed9690e186b1"],
- ["ed969b", "e18492e185a3e186b2"],
- ["ed969b", "ed9690e186b2"],
- ["ed969c", "e18492e185a3e186b3"],
- ["ed969c", "ed9690e186b3"],
- ["ed969d", "e18492e185a3e186b4"],
- ["ed969d", "ed9690e186b4"],
- ["ed969e", "e18492e185a3e186b5"],
- ["ed969e", "ed9690e186b5"],
- ["ed969f", "e18492e185a3e186b6"],
- ["ed969f", "ed9690e186b6"],
- ["ed96a0", "e18492e185a3e186b7"],
- ["ed96a0", "ed9690e186b7"],
- ["ed96a1", "e18492e185a3e186b8"],
- ["ed96a1", "ed9690e186b8"],
- ["ed96a2", "e18492e185a3e186b9"],
- ["ed96a2", "ed9690e186b9"],
- ["ed96a3", "e18492e185a3e186ba"],
- ["ed96a3", "ed9690e186ba"],
- ["ed96a4", "e18492e185a3e186bb"],
- ["ed96a4", "ed9690e186bb"],
- ["ed96a5", "e18492e185a3e186bc"],
- ["ed96a5", "ed9690e186bc"],
- ["ed96a6", "e18492e185a3e186bd"],
- ["ed96a6", "ed9690e186bd"],
- ["ed96a7", "e18492e185a3e186be"],
- ["ed96a7", "ed9690e186be"],
- ["ed96a8", "e18492e185a3e186bf"],
- ["ed96a8", "ed9690e186bf"],
- ["ed96a9", "e18492e185a3e18780"],
- ["ed96a9", "ed9690e18780"],
- ["ed96aa", "e18492e185a3e18781"],
- ["ed96aa", "ed9690e18781"],
- ["ed96ab", "e18492e185a3e18782"],
- ["ed96ab", "ed9690e18782"],
- ["ed96ac", "e18492e185a4"],
- ["ed96ad", "e18492e185a4e186a8"],
- ["ed96ad", "ed96ace186a8"],
- ["ed96ae", "e18492e185a4e186a9"],
- ["ed96ae", "ed96ace186a9"],
- ["ed96af", "e18492e185a4e186aa"],
- ["ed96af", "ed96ace186aa"],
- ["ed96b0", "e18492e185a4e186ab"],
- ["ed96b0", "ed96ace186ab"],
- ["ed96b1", "e18492e185a4e186ac"],
- ["ed96b1", "ed96ace186ac"],
- ["ed96b2", "e18492e185a4e186ad"],
- ["ed96b2", "ed96ace186ad"],
- ["ed96b3", "e18492e185a4e186ae"],
- ["ed96b3", "ed96ace186ae"],
- ["ed96b4", "e18492e185a4e186af"],
- ["ed96b4", "ed96ace186af"],
- ["ed96b5", "e18492e185a4e186b0"],
- ["ed96b5", "ed96ace186b0"],
- ["ed96b6", "e18492e185a4e186b1"],
- ["ed96b6", "ed96ace186b1"],
- ["ed96b7", "e18492e185a4e186b2"],
- ["ed96b7", "ed96ace186b2"],
- ["ed96b8", "e18492e185a4e186b3"],
- ["ed96b8", "ed96ace186b3"],
- ["ed96b9", "e18492e185a4e186b4"],
- ["ed96b9", "ed96ace186b4"],
- ["ed96ba", "e18492e185a4e186b5"],
- ["ed96ba", "ed96ace186b5"],
- ["ed96bb", "e18492e185a4e186b6"],
- ["ed96bb", "ed96ace186b6"],
- ["ed96bc", "e18492e185a4e186b7"],
- ["ed96bc", "ed96ace186b7"],
- ["ed96bd", "e18492e185a4e186b8"],
- ["ed96bd", "ed96ace186b8"],
- ["ed96be", "e18492e185a4e186b9"],
- ["ed96be", "ed96ace186b9"],
- ["ed96bf", "e18492e185a4e186ba"],
- ["ed96bf", "ed96ace186ba"],
- ["ed9780", "e18492e185a4e186bb"],
- ["ed9780", "ed96ace186bb"],
- ["ed9781", "e18492e185a4e186bc"],
- ["ed9781", "ed96ace186bc"],
- ["ed9782", "e18492e185a4e186bd"],
- ["ed9782", "ed96ace186bd"],
- ["ed9783", "e18492e185a4e186be"],
- ["ed9783", "ed96ace186be"],
- ["ed9784", "e18492e185a4e186bf"],
- ["ed9784", "ed96ace186bf"],
- ["ed9785", "e18492e185a4e18780"],
- ["ed9785", "ed96ace18780"],
- ["ed9786", "e18492e185a4e18781"],
- ["ed9786", "ed96ace18781"],
- ["ed9787", "e18492e185a4e18782"],
- ["ed9787", "ed96ace18782"],
- ["ed9788", "e18492e185a5"],
- ["ed9789", "e18492e185a5e186a8"],
- ["ed9789", "ed9788e186a8"],
- ["ed978a", "e18492e185a5e186a9"],
- ["ed978a", "ed9788e186a9"],
- ["ed978b", "e18492e185a5e186aa"],
- ["ed978b", "ed9788e186aa"],
- ["ed978c", "e18492e185a5e186ab"],
- ["ed978c", "ed9788e186ab"],
- ["ed978d", "e18492e185a5e186ac"],
- ["ed978d", "ed9788e186ac"],
- ["ed978e", "e18492e185a5e186ad"],
- ["ed978e", "ed9788e186ad"],
- ["ed978f", "e18492e185a5e186ae"],
- ["ed978f", "ed9788e186ae"],
- ["ed9790", "e18492e185a5e186af"],
- ["ed9790", "ed9788e186af"],
- ["ed9791", "e18492e185a5e186b0"],
- ["ed9791", "ed9788e186b0"],
- ["ed9792", "e18492e185a5e186b1"],
- ["ed9792", "ed9788e186b1"],
- ["ed9793", "e18492e185a5e186b2"],
- ["ed9793", "ed9788e186b2"],
- ["ed9794", "e18492e185a5e186b3"],
- ["ed9794", "ed9788e186b3"],
- ["ed9795", "e18492e185a5e186b4"],
- ["ed9795", "ed9788e186b4"],
- ["ed9796", "e18492e185a5e186b5"],
- ["ed9796", "ed9788e186b5"],
- ["ed9797", "e18492e185a5e186b6"],
- ["ed9797", "ed9788e186b6"],
- ["ed9798", "e18492e185a5e186b7"],
- ["ed9798", "ed9788e186b7"],
- ["ed9799", "e18492e185a5e186b8"],
- ["ed9799", "ed9788e186b8"],
- ["ed979a", "e18492e185a5e186b9"],
- ["ed979a", "ed9788e186b9"],
- ["ed979b", "e18492e185a5e186ba"],
- ["ed979b", "ed9788e186ba"],
- ["ed979c", "e18492e185a5e186bb"],
- ["ed979c", "ed9788e186bb"],
- ["ed979d", "e18492e185a5e186bc"],
- ["ed979d", "ed9788e186bc"],
- ["ed979e", "e18492e185a5e186bd"],
- ["ed979e", "ed9788e186bd"],
- ["ed979f", "e18492e185a5e186be"],
- ["ed979f", "ed9788e186be"],
- ["ed97a0", "e18492e185a5e186bf"],
- ["ed97a0", "ed9788e186bf"],
- ["ed97a1", "e18492e185a5e18780"],
- ["ed97a1", "ed9788e18780"],
- ["ed97a2", "e18492e185a5e18781"],
- ["ed97a2", "ed9788e18781"],
- ["ed97a3", "e18492e185a5e18782"],
- ["ed97a3", "ed9788e18782"],
- ["ed97a4", "e18492e185a6"],
- ["ed97a5", "e18492e185a6e186a8"],
- ["ed97a5", "ed97a4e186a8"],
- ["ed97a6", "e18492e185a6e186a9"],
- ["ed97a6", "ed97a4e186a9"],
- ["ed97a7", "e18492e185a6e186aa"],
- ["ed97a7", "ed97a4e186aa"],
- ["ed97a8", "e18492e185a6e186ab"],
- ["ed97a8", "ed97a4e186ab"],
- ["ed97a9", "e18492e185a6e186ac"],
- ["ed97a9", "ed97a4e186ac"],
- ["ed97aa", "e18492e185a6e186ad"],
- ["ed97aa", "ed97a4e186ad"],
- ["ed97ab", "e18492e185a6e186ae"],
- ["ed97ab", "ed97a4e186ae"],
- ["ed97ac", "e18492e185a6e186af"],
- ["ed97ac", "ed97a4e186af"],
- ["ed97ad", "e18492e185a6e186b0"],
- ["ed97ad", "ed97a4e186b0"],
- ["ed97ae", "e18492e185a6e186b1"],
- ["ed97ae", "ed97a4e186b1"],
- ["ed97af", "e18492e185a6e186b2"],
- ["ed97af", "ed97a4e186b2"],
- ["ed97b0", "e18492e185a6e186b3"],
- ["ed97b0", "ed97a4e186b3"],
- ["ed97b1", "e18492e185a6e186b4"],
- ["ed97b1", "ed97a4e186b4"],
- ["ed97b2", "e18492e185a6e186b5"],
- ["ed97b2", "ed97a4e186b5"],
- ["ed97b3", "e18492e185a6e186b6"],
- ["ed97b3", "ed97a4e186b6"],
- ["ed97b4", "e18492e185a6e186b7"],
- ["ed97b4", "ed97a4e186b7"],
- ["ed97b5", "e18492e185a6e186b8"],
- ["ed97b5", "ed97a4e186b8"],
- ["ed97b6", "e18492e185a6e186b9"],
- ["ed97b6", "ed97a4e186b9"],
- ["ed97b7", "e18492e185a6e186ba"],
- ["ed97b7", "ed97a4e186ba"],
- ["ed97b8", "e18492e185a6e186bb"],
- ["ed97b8", "ed97a4e186bb"],
- ["ed97b9", "e18492e185a6e186bc"],
- ["ed97b9", "ed97a4e186bc"],
- ["ed97ba", "e18492e185a6e186bd"],
- ["ed97ba", "ed97a4e186bd"],
- ["ed97bb", "e18492e185a6e186be"],
- ["ed97bb", "ed97a4e186be"],
- ["ed97bc", "e18492e185a6e186bf"],
- ["ed97bc", "ed97a4e186bf"],
- ["ed97bd", "e18492e185a6e18780"],
- ["ed97bd", "ed97a4e18780"],
- ["ed97be", "e18492e185a6e18781"],
- ["ed97be", "ed97a4e18781"],
- ["ed97bf", "e18492e185a6e18782"],
- ["ed97bf", "ed97a4e18782"],
- ["ed9880", "e18492e185a7"],
- ["ed9881", "e18492e185a7e186a8"],
- ["ed9881", "ed9880e186a8"],
- ["ed9882", "e18492e185a7e186a9"],
- ["ed9882", "ed9880e186a9"],
- ["ed9883", "e18492e185a7e186aa"],
- ["ed9883", "ed9880e186aa"],
- ["ed9884", "e18492e185a7e186ab"],
- ["ed9884", "ed9880e186ab"],
- ["ed9885", "e18492e185a7e186ac"],
- ["ed9885", "ed9880e186ac"],
- ["ed9886", "e18492e185a7e186ad"],
- ["ed9886", "ed9880e186ad"],
- ["ed9887", "e18492e185a7e186ae"],
- ["ed9887", "ed9880e186ae"],
- ["ed9888", "e18492e185a7e186af"],
- ["ed9888", "ed9880e186af"],
- ["ed9889", "e18492e185a7e186b0"],
- ["ed9889", "ed9880e186b0"],
- ["ed988a", "e18492e185a7e186b1"],
- ["ed988a", "ed9880e186b1"],
- ["ed988b", "e18492e185a7e186b2"],
- ["ed988b", "ed9880e186b2"],
- ["ed988c", "e18492e185a7e186b3"],
- ["ed988c", "ed9880e186b3"],
- ["ed988d", "e18492e185a7e186b4"],
- ["ed988d", "ed9880e186b4"],
- ["ed988e", "e18492e185a7e186b5"],
- ["ed988e", "ed9880e186b5"],
- ["ed988f", "e18492e185a7e186b6"],
- ["ed988f", "ed9880e186b6"],
- ["ed9890", "e18492e185a7e186b7"],
- ["ed9890", "ed9880e186b7"],
- ["ed9891", "e18492e185a7e186b8"],
- ["ed9891", "ed9880e186b8"],
- ["ed9892", "e18492e185a7e186b9"],
- ["ed9892", "ed9880e186b9"],
- ["ed9893", "e18492e185a7e186ba"],
- ["ed9893", "ed9880e186ba"],
- ["ed9894", "e18492e185a7e186bb"],
- ["ed9894", "ed9880e186bb"],
- ["ed9895", "e18492e185a7e186bc"],
- ["ed9895", "ed9880e186bc"],
- ["ed9896", "e18492e185a7e186bd"],
- ["ed9896", "ed9880e186bd"],
- ["ed9897", "e18492e185a7e186be"],
- ["ed9897", "ed9880e186be"],
- ["ed9898", "e18492e185a7e186bf"],
- ["ed9898", "ed9880e186bf"],
- ["ed9899", "e18492e185a7e18780"],
- ["ed9899", "ed9880e18780"],
- ["ed989a", "e18492e185a7e18781"],
- ["ed989a", "ed9880e18781"],
- ["ed989b", "e18492e185a7e18782"],
- ["ed989b", "ed9880e18782"],
- ["ed989c", "e18492e185a8"],
- ["ed989d", "e18492e185a8e186a8"],
- ["ed989d", "ed989ce186a8"],
- ["ed989e", "e18492e185a8e186a9"],
- ["ed989e", "ed989ce186a9"],
- ["ed989f", "e18492e185a8e186aa"],
- ["ed989f", "ed989ce186aa"],
- ["ed98a0", "e18492e185a8e186ab"],
- ["ed98a0", "ed989ce186ab"],
- ["ed98a1", "e18492e185a8e186ac"],
- ["ed98a1", "ed989ce186ac"],
- ["ed98a2", "e18492e185a8e186ad"],
- ["ed98a2", "ed989ce186ad"],
- ["ed98a3", "e18492e185a8e186ae"],
- ["ed98a3", "ed989ce186ae"],
- ["ed98a4", "e18492e185a8e186af"],
- ["ed98a4", "ed989ce186af"],
- ["ed98a5", "e18492e185a8e186b0"],
- ["ed98a5", "ed989ce186b0"],
- ["ed98a6", "e18492e185a8e186b1"],
- ["ed98a6", "ed989ce186b1"],
- ["ed98a7", "e18492e185a8e186b2"],
- ["ed98a7", "ed989ce186b2"],
- ["ed98a8", "e18492e185a8e186b3"],
- ["ed98a8", "ed989ce186b3"],
- ["ed98a9", "e18492e185a8e186b4"],
- ["ed98a9", "ed989ce186b4"],
- ["ed98aa", "e18492e185a8e186b5"],
- ["ed98aa", "ed989ce186b5"],
- ["ed98ab", "e18492e185a8e186b6"],
- ["ed98ab", "ed989ce186b6"],
- ["ed98ac", "e18492e185a8e186b7"],
- ["ed98ac", "ed989ce186b7"],
- ["ed98ad", "e18492e185a8e186b8"],
- ["ed98ad", "ed989ce186b8"],
- ["ed98ae", "e18492e185a8e186b9"],
- ["ed98ae", "ed989ce186b9"],
- ["ed98af", "e18492e185a8e186ba"],
- ["ed98af", "ed989ce186ba"],
- ["ed98b0", "e18492e185a8e186bb"],
- ["ed98b0", "ed989ce186bb"],
- ["ed98b1", "e18492e185a8e186bc"],
- ["ed98b1", "ed989ce186bc"],
- ["ed98b2", "e18492e185a8e186bd"],
- ["ed98b2", "ed989ce186bd"],
- ["ed98b3", "e18492e185a8e186be"],
- ["ed98b3", "ed989ce186be"],
- ["ed98b4", "e18492e185a8e186bf"],
- ["ed98b4", "ed989ce186bf"],
- ["ed98b5", "e18492e185a8e18780"],
- ["ed98b5", "ed989ce18780"],
- ["ed98b6", "e18492e185a8e18781"],
- ["ed98b6", "ed989ce18781"],
- ["ed98b7", "e18492e185a8e18782"],
- ["ed98b7", "ed989ce18782"],
- ["ed98b8", "e18492e185a9"],
- ["ed98b9", "e18492e185a9e186a8"],
- ["ed98b9", "ed98b8e186a8"],
- ["ed98ba", "e18492e185a9e186a9"],
- ["ed98ba", "ed98b8e186a9"],
- ["ed98bb", "e18492e185a9e186aa"],
- ["ed98bb", "ed98b8e186aa"],
- ["ed98bc", "e18492e185a9e186ab"],
- ["ed98bc", "ed98b8e186ab"],
- ["ed98bd", "e18492e185a9e186ac"],
- ["ed98bd", "ed98b8e186ac"],
- ["ed98be", "e18492e185a9e186ad"],
- ["ed98be", "ed98b8e186ad"],
- ["ed98bf", "e18492e185a9e186ae"],
- ["ed98bf", "ed98b8e186ae"],
- ["ed9980", "e18492e185a9e186af"],
- ["ed9980", "ed98b8e186af"],
- ["ed9981", "e18492e185a9e186b0"],
- ["ed9981", "ed98b8e186b0"],
- ["ed9982", "e18492e185a9e186b1"],
- ["ed9982", "ed98b8e186b1"],
- ["ed9983", "e18492e185a9e186b2"],
- ["ed9983", "ed98b8e186b2"],
- ["ed9984", "e18492e185a9e186b3"],
- ["ed9984", "ed98b8e186b3"],
- ["ed9985", "e18492e185a9e186b4"],
- ["ed9985", "ed98b8e186b4"],
- ["ed9986", "e18492e185a9e186b5"],
- ["ed9986", "ed98b8e186b5"],
- ["ed9987", "e18492e185a9e186b6"],
- ["ed9987", "ed98b8e186b6"],
- ["ed9988", "e18492e185a9e186b7"],
- ["ed9988", "ed98b8e186b7"],
- ["ed9989", "e18492e185a9e186b8"],
- ["ed9989", "ed98b8e186b8"],
- ["ed998a", "e18492e185a9e186b9"],
- ["ed998a", "ed98b8e186b9"],
- ["ed998b", "e18492e185a9e186ba"],
- ["ed998b", "ed98b8e186ba"],
- ["ed998c", "e18492e185a9e186bb"],
- ["ed998c", "ed98b8e186bb"],
- ["ed998d", "e18492e185a9e186bc"],
- ["ed998d", "ed98b8e186bc"],
- ["ed998e", "e18492e185a9e186bd"],
- ["ed998e", "ed98b8e186bd"],
- ["ed998f", "e18492e185a9e186be"],
- ["ed998f", "ed98b8e186be"],
- ["ed9990", "e18492e185a9e186bf"],
- ["ed9990", "ed98b8e186bf"],
- ["ed9991", "e18492e185a9e18780"],
- ["ed9991", "ed98b8e18780"],
- ["ed9992", "e18492e185a9e18781"],
- ["ed9992", "ed98b8e18781"],
- ["ed9993", "e18492e185a9e18782"],
- ["ed9993", "ed98b8e18782"],
- ["ed9994", "e18492e185aa"],
- ["ed9995", "e18492e185aae186a8"],
- ["ed9995", "ed9994e186a8"],
- ["ed9996", "e18492e185aae186a9"],
- ["ed9996", "ed9994e186a9"],
- ["ed9997", "e18492e185aae186aa"],
- ["ed9997", "ed9994e186aa"],
- ["ed9998", "e18492e185aae186ab"],
- ["ed9998", "ed9994e186ab"],
- ["ed9999", "e18492e185aae186ac"],
- ["ed9999", "ed9994e186ac"],
- ["ed999a", "e18492e185aae186ad"],
- ["ed999a", "ed9994e186ad"],
- ["ed999b", "e18492e185aae186ae"],
- ["ed999b", "ed9994e186ae"],
- ["ed999c", "e18492e185aae186af"],
- ["ed999c", "ed9994e186af"],
- ["ed999d", "e18492e185aae186b0"],
- ["ed999d", "ed9994e186b0"],
- ["ed999e", "e18492e185aae186b1"],
- ["ed999e", "ed9994e186b1"],
- ["ed999f", "e18492e185aae186b2"],
- ["ed999f", "ed9994e186b2"],
- ["ed99a0", "e18492e185aae186b3"],
- ["ed99a0", "ed9994e186b3"],
- ["ed99a1", "e18492e185aae186b4"],
- ["ed99a1", "ed9994e186b4"],
- ["ed99a2", "e18492e185aae186b5"],
- ["ed99a2", "ed9994e186b5"],
- ["ed99a3", "e18492e185aae186b6"],
- ["ed99a3", "ed9994e186b6"],
- ["ed99a4", "e18492e185aae186b7"],
- ["ed99a4", "ed9994e186b7"],
- ["ed99a5", "e18492e185aae186b8"],
- ["ed99a5", "ed9994e186b8"],
- ["ed99a6", "e18492e185aae186b9"],
- ["ed99a6", "ed9994e186b9"],
- ["ed99a7", "e18492e185aae186ba"],
- ["ed99a7", "ed9994e186ba"],
- ["ed99a8", "e18492e185aae186bb"],
- ["ed99a8", "ed9994e186bb"],
- ["ed99a9", "e18492e185aae186bc"],
- ["ed99a9", "ed9994e186bc"],
- ["ed99aa", "e18492e185aae186bd"],
- ["ed99aa", "ed9994e186bd"],
- ["ed99ab", "e18492e185aae186be"],
- ["ed99ab", "ed9994e186be"],
- ["ed99ac", "e18492e185aae186bf"],
- ["ed99ac", "ed9994e186bf"],
- ["ed99ad", "e18492e185aae18780"],
- ["ed99ad", "ed9994e18780"],
- ["ed99ae", "e18492e185aae18781"],
- ["ed99ae", "ed9994e18781"],
- ["ed99af", "e18492e185aae18782"],
- ["ed99af", "ed9994e18782"],
- ["ed99b0", "e18492e185ab"],
- ["ed99b1", "e18492e185abe186a8"],
- ["ed99b1", "ed99b0e186a8"],
- ["ed99b2", "e18492e185abe186a9"],
- ["ed99b2", "ed99b0e186a9"],
- ["ed99b3", "e18492e185abe186aa"],
- ["ed99b3", "ed99b0e186aa"],
- ["ed99b4", "e18492e185abe186ab"],
- ["ed99b4", "ed99b0e186ab"],
- ["ed99b5", "e18492e185abe186ac"],
- ["ed99b5", "ed99b0e186ac"],
- ["ed99b6", "e18492e185abe186ad"],
- ["ed99b6", "ed99b0e186ad"],
- ["ed99b7", "e18492e185abe186ae"],
- ["ed99b7", "ed99b0e186ae"],
- ["ed99b8", "e18492e185abe186af"],
- ["ed99b8", "ed99b0e186af"],
- ["ed99b9", "e18492e185abe186b0"],
- ["ed99b9", "ed99b0e186b0"],
- ["ed99ba", "e18492e185abe186b1"],
- ["ed99ba", "ed99b0e186b1"],
- ["ed99bb", "e18492e185abe186b2"],
- ["ed99bb", "ed99b0e186b2"],
- ["ed99bc", "e18492e185abe186b3"],
- ["ed99bc", "ed99b0e186b3"],
- ["ed99bd", "e18492e185abe186b4"],
- ["ed99bd", "ed99b0e186b4"],
- ["ed99be", "e18492e185abe186b5"],
- ["ed99be", "ed99b0e186b5"],
- ["ed99bf", "e18492e185abe186b6"],
- ["ed99bf", "ed99b0e186b6"],
- ["ed9a80", "e18492e185abe186b7"],
- ["ed9a80", "ed99b0e186b7"],
- ["ed9a81", "e18492e185abe186b8"],
- ["ed9a81", "ed99b0e186b8"],
- ["ed9a82", "e18492e185abe186b9"],
- ["ed9a82", "ed99b0e186b9"],
- ["ed9a83", "e18492e185abe186ba"],
- ["ed9a83", "ed99b0e186ba"],
- ["ed9a84", "e18492e185abe186bb"],
- ["ed9a84", "ed99b0e186bb"],
- ["ed9a85", "e18492e185abe186bc"],
- ["ed9a85", "ed99b0e186bc"],
- ["ed9a86", "e18492e185abe186bd"],
- ["ed9a86", "ed99b0e186bd"],
- ["ed9a87", "e18492e185abe186be"],
- ["ed9a87", "ed99b0e186be"],
- ["ed9a88", "e18492e185abe186bf"],
- ["ed9a88", "ed99b0e186bf"],
- ["ed9a89", "e18492e185abe18780"],
- ["ed9a89", "ed99b0e18780"],
- ["ed9a8a", "e18492e185abe18781"],
- ["ed9a8a", "ed99b0e18781"],
- ["ed9a8b", "e18492e185abe18782"],
- ["ed9a8b", "ed99b0e18782"],
- ["ed9a8c", "e18492e185ac"],
- ["ed9a8d", "e18492e185ace186a8"],
- ["ed9a8d", "ed9a8ce186a8"],
- ["ed9a8e", "e18492e185ace186a9"],
- ["ed9a8e", "ed9a8ce186a9"],
- ["ed9a8f", "e18492e185ace186aa"],
- ["ed9a8f", "ed9a8ce186aa"],
- ["ed9a90", "e18492e185ace186ab"],
- ["ed9a90", "ed9a8ce186ab"],
- ["ed9a91", "e18492e185ace186ac"],
- ["ed9a91", "ed9a8ce186ac"],
- ["ed9a92", "e18492e185ace186ad"],
- ["ed9a92", "ed9a8ce186ad"],
- ["ed9a93", "e18492e185ace186ae"],
- ["ed9a93", "ed9a8ce186ae"],
- ["ed9a94", "e18492e185ace186af"],
- ["ed9a94", "ed9a8ce186af"],
- ["ed9a95", "e18492e185ace186b0"],
- ["ed9a95", "ed9a8ce186b0"],
- ["ed9a96", "e18492e185ace186b1"],
- ["ed9a96", "ed9a8ce186b1"],
- ["ed9a97", "e18492e185ace186b2"],
- ["ed9a97", "ed9a8ce186b2"],
- ["ed9a98", "e18492e185ace186b3"],
- ["ed9a98", "ed9a8ce186b3"],
- ["ed9a99", "e18492e185ace186b4"],
- ["ed9a99", "ed9a8ce186b4"],
- ["ed9a9a", "e18492e185ace186b5"],
- ["ed9a9a", "ed9a8ce186b5"],
- ["ed9a9b", "e18492e185ace186b6"],
- ["ed9a9b", "ed9a8ce186b6"],
- ["ed9a9c", "e18492e185ace186b7"],
- ["ed9a9c", "ed9a8ce186b7"],
- ["ed9a9d", "e18492e185ace186b8"],
- ["ed9a9d", "ed9a8ce186b8"],
- ["ed9a9e", "e18492e185ace186b9"],
- ["ed9a9e", "ed9a8ce186b9"],
- ["ed9a9f", "e18492e185ace186ba"],
- ["ed9a9f", "ed9a8ce186ba"],
- ["ed9aa0", "e18492e185ace186bb"],
- ["ed9aa0", "ed9a8ce186bb"],
- ["ed9aa1", "e18492e185ace186bc"],
- ["ed9aa1", "ed9a8ce186bc"],
- ["ed9aa2", "e18492e185ace186bd"],
- ["ed9aa2", "ed9a8ce186bd"],
- ["ed9aa3", "e18492e185ace186be"],
- ["ed9aa3", "ed9a8ce186be"],
- ["ed9aa4", "e18492e185ace186bf"],
- ["ed9aa4", "ed9a8ce186bf"],
- ["ed9aa5", "e18492e185ace18780"],
- ["ed9aa5", "ed9a8ce18780"],
- ["ed9aa6", "e18492e185ace18781"],
- ["ed9aa6", "ed9a8ce18781"],
- ["ed9aa7", "e18492e185ace18782"],
- ["ed9aa7", "ed9a8ce18782"],
- ["ed9aa8", "e18492e185ad"],
- ["ed9aa9", "e18492e185ade186a8"],
- ["ed9aa9", "ed9aa8e186a8"],
- ["ed9aaa", "e18492e185ade186a9"],
- ["ed9aaa", "ed9aa8e186a9"],
- ["ed9aab", "e18492e185ade186aa"],
- ["ed9aab", "ed9aa8e186aa"],
- ["ed9aac", "e18492e185ade186ab"],
- ["ed9aac", "ed9aa8e186ab"],
- ["ed9aad", "e18492e185ade186ac"],
- ["ed9aad", "ed9aa8e186ac"],
- ["ed9aae", "e18492e185ade186ad"],
- ["ed9aae", "ed9aa8e186ad"],
- ["ed9aaf", "e18492e185ade186ae"],
- ["ed9aaf", "ed9aa8e186ae"],
- ["ed9ab0", "e18492e185ade186af"],
- ["ed9ab0", "ed9aa8e186af"],
- ["ed9ab1", "e18492e185ade186b0"],
- ["ed9ab1", "ed9aa8e186b0"],
- ["ed9ab2", "e18492e185ade186b1"],
- ["ed9ab2", "ed9aa8e186b1"],
- ["ed9ab3", "e18492e185ade186b2"],
- ["ed9ab3", "ed9aa8e186b2"],
- ["ed9ab4", "e18492e185ade186b3"],
- ["ed9ab4", "ed9aa8e186b3"],
- ["ed9ab5", "e18492e185ade186b4"],
- ["ed9ab5", "ed9aa8e186b4"],
- ["ed9ab6", "e18492e185ade186b5"],
- ["ed9ab6", "ed9aa8e186b5"],
- ["ed9ab7", "e18492e185ade186b6"],
- ["ed9ab7", "ed9aa8e186b6"],
- ["ed9ab8", "e18492e185ade186b7"],
- ["ed9ab8", "ed9aa8e186b7"],
- ["ed9ab9", "e18492e185ade186b8"],
- ["ed9ab9", "ed9aa8e186b8"],
- ["ed9aba", "e18492e185ade186b9"],
- ["ed9aba", "ed9aa8e186b9"],
- ["ed9abb", "e18492e185ade186ba"],
- ["ed9abb", "ed9aa8e186ba"],
- ["ed9abc", "e18492e185ade186bb"],
- ["ed9abc", "ed9aa8e186bb"],
- ["ed9abd", "e18492e185ade186bc"],
- ["ed9abd", "ed9aa8e186bc"],
- ["ed9abe", "e18492e185ade186bd"],
- ["ed9abe", "ed9aa8e186bd"],
- ["ed9abf", "e18492e185ade186be"],
- ["ed9abf", "ed9aa8e186be"],
- ["ed9b80", "e18492e185ade186bf"],
- ["ed9b80", "ed9aa8e186bf"],
- ["ed9b81", "e18492e185ade18780"],
- ["ed9b81", "ed9aa8e18780"],
- ["ed9b82", "e18492e185ade18781"],
- ["ed9b82", "ed9aa8e18781"],
- ["ed9b83", "e18492e185ade18782"],
- ["ed9b83", "ed9aa8e18782"],
- ["ed9b84", "e18492e185ae"],
- ["ed9b85", "e18492e185aee186a8"],
- ["ed9b85", "ed9b84e186a8"],
- ["ed9b86", "e18492e185aee186a9"],
- ["ed9b86", "ed9b84e186a9"],
- ["ed9b87", "e18492e185aee186aa"],
- ["ed9b87", "ed9b84e186aa"],
- ["ed9b88", "e18492e185aee186ab"],
- ["ed9b88", "ed9b84e186ab"],
- ["ed9b89", "e18492e185aee186ac"],
- ["ed9b89", "ed9b84e186ac"],
- ["ed9b8a", "e18492e185aee186ad"],
- ["ed9b8a", "ed9b84e186ad"],
- ["ed9b8b", "e18492e185aee186ae"],
- ["ed9b8b", "ed9b84e186ae"],
- ["ed9b8c", "e18492e185aee186af"],
- ["ed9b8c", "ed9b84e186af"],
- ["ed9b8d", "e18492e185aee186b0"],
- ["ed9b8d", "ed9b84e186b0"],
- ["ed9b8e", "e18492e185aee186b1"],
- ["ed9b8e", "ed9b84e186b1"],
- ["ed9b8f", "e18492e185aee186b2"],
- ["ed9b8f", "ed9b84e186b2"],
- ["ed9b90", "e18492e185aee186b3"],
- ["ed9b90", "ed9b84e186b3"],
- ["ed9b91", "e18492e185aee186b4"],
- ["ed9b91", "ed9b84e186b4"],
- ["ed9b92", "e18492e185aee186b5"],
- ["ed9b92", "ed9b84e186b5"],
- ["ed9b93", "e18492e185aee186b6"],
- ["ed9b93", "ed9b84e186b6"],
- ["ed9b94", "e18492e185aee186b7"],
- ["ed9b94", "ed9b84e186b7"],
- ["ed9b95", "e18492e185aee186b8"],
- ["ed9b95", "ed9b84e186b8"],
- ["ed9b96", "e18492e185aee186b9"],
- ["ed9b96", "ed9b84e186b9"],
- ["ed9b97", "e18492e185aee186ba"],
- ["ed9b97", "ed9b84e186ba"],
- ["ed9b98", "e18492e185aee186bb"],
- ["ed9b98", "ed9b84e186bb"],
- ["ed9b99", "e18492e185aee186bc"],
- ["ed9b99", "ed9b84e186bc"],
- ["ed9b9a", "e18492e185aee186bd"],
- ["ed9b9a", "ed9b84e186bd"],
- ["ed9b9b", "e18492e185aee186be"],
- ["ed9b9b", "ed9b84e186be"],
- ["ed9b9c", "e18492e185aee186bf"],
- ["ed9b9c", "ed9b84e186bf"],
- ["ed9b9d", "e18492e185aee18780"],
- ["ed9b9d", "ed9b84e18780"],
- ["ed9b9e", "e18492e185aee18781"],
- ["ed9b9e", "ed9b84e18781"],
- ["ed9b9f", "e18492e185aee18782"],
- ["ed9b9f", "ed9b84e18782"],
- ["ed9ba0", "e18492e185af"],
- ["ed9ba1", "e18492e185afe186a8"],
- ["ed9ba1", "ed9ba0e186a8"],
- ["ed9ba2", "e18492e185afe186a9"],
- ["ed9ba2", "ed9ba0e186a9"],
- ["ed9ba3", "e18492e185afe186aa"],
- ["ed9ba3", "ed9ba0e186aa"],
- ["ed9ba4", "e18492e185afe186ab"],
- ["ed9ba4", "ed9ba0e186ab"],
- ["ed9ba5", "e18492e185afe186ac"],
- ["ed9ba5", "ed9ba0e186ac"],
- ["ed9ba6", "e18492e185afe186ad"],
- ["ed9ba6", "ed9ba0e186ad"],
- ["ed9ba7", "e18492e185afe186ae"],
- ["ed9ba7", "ed9ba0e186ae"],
- ["ed9ba8", "e18492e185afe186af"],
- ["ed9ba8", "ed9ba0e186af"],
- ["ed9ba9", "e18492e185afe186b0"],
- ["ed9ba9", "ed9ba0e186b0"],
- ["ed9baa", "e18492e185afe186b1"],
- ["ed9baa", "ed9ba0e186b1"],
- ["ed9bab", "e18492e185afe186b2"],
- ["ed9bab", "ed9ba0e186b2"],
- ["ed9bac", "e18492e185afe186b3"],
- ["ed9bac", "ed9ba0e186b3"],
- ["ed9bad", "e18492e185afe186b4"],
- ["ed9bad", "ed9ba0e186b4"],
- ["ed9bae", "e18492e185afe186b5"],
- ["ed9bae", "ed9ba0e186b5"],
- ["ed9baf", "e18492e185afe186b6"],
- ["ed9baf", "ed9ba0e186b6"],
- ["ed9bb0", "e18492e185afe186b7"],
- ["ed9bb0", "ed9ba0e186b7"],
- ["ed9bb1", "e18492e185afe186b8"],
- ["ed9bb1", "ed9ba0e186b8"],
- ["ed9bb2", "e18492e185afe186b9"],
- ["ed9bb2", "ed9ba0e186b9"],
- ["ed9bb3", "e18492e185afe186ba"],
- ["ed9bb3", "ed9ba0e186ba"],
- ["ed9bb4", "e18492e185afe186bb"],
- ["ed9bb4", "ed9ba0e186bb"],
- ["ed9bb5", "e18492e185afe186bc"],
- ["ed9bb5", "ed9ba0e186bc"],
- ["ed9bb6", "e18492e185afe186bd"],
- ["ed9bb6", "ed9ba0e186bd"],
- ["ed9bb7", "e18492e185afe186be"],
- ["ed9bb7", "ed9ba0e186be"],
- ["ed9bb8", "e18492e185afe186bf"],
- ["ed9bb8", "ed9ba0e186bf"],
- ["ed9bb9", "e18492e185afe18780"],
- ["ed9bb9", "ed9ba0e18780"],
- ["ed9bba", "e18492e185afe18781"],
- ["ed9bba", "ed9ba0e18781"],
- ["ed9bbb", "e18492e185afe18782"],
- ["ed9bbb", "ed9ba0e18782"],
- ["ed9bbc", "e18492e185b0"],
- ["ed9bbd", "e18492e185b0e186a8"],
- ["ed9bbd", "ed9bbce186a8"],
- ["ed9bbe", "e18492e185b0e186a9"],
- ["ed9bbe", "ed9bbce186a9"],
- ["ed9bbf", "e18492e185b0e186aa"],
- ["ed9bbf", "ed9bbce186aa"],
- ["ed9c80", "e18492e185b0e186ab"],
- ["ed9c80", "ed9bbce186ab"],
- ["ed9c81", "e18492e185b0e186ac"],
- ["ed9c81", "ed9bbce186ac"],
- ["ed9c82", "e18492e185b0e186ad"],
- ["ed9c82", "ed9bbce186ad"],
- ["ed9c83", "e18492e185b0e186ae"],
- ["ed9c83", "ed9bbce186ae"],
- ["ed9c84", "e18492e185b0e186af"],
- ["ed9c84", "ed9bbce186af"],
- ["ed9c85", "e18492e185b0e186b0"],
- ["ed9c85", "ed9bbce186b0"],
- ["ed9c86", "e18492e185b0e186b1"],
- ["ed9c86", "ed9bbce186b1"],
- ["ed9c87", "e18492e185b0e186b2"],
- ["ed9c87", "ed9bbce186b2"],
- ["ed9c88", "e18492e185b0e186b3"],
- ["ed9c88", "ed9bbce186b3"],
- ["ed9c89", "e18492e185b0e186b4"],
- ["ed9c89", "ed9bbce186b4"],
- ["ed9c8a", "e18492e185b0e186b5"],
- ["ed9c8a", "ed9bbce186b5"],
- ["ed9c8b", "e18492e185b0e186b6"],
- ["ed9c8b", "ed9bbce186b6"],
- ["ed9c8c", "e18492e185b0e186b7"],
- ["ed9c8c", "ed9bbce186b7"],
- ["ed9c8d", "e18492e185b0e186b8"],
- ["ed9c8d", "ed9bbce186b8"],
- ["ed9c8e", "e18492e185b0e186b9"],
- ["ed9c8e", "ed9bbce186b9"],
- ["ed9c8f", "e18492e185b0e186ba"],
- ["ed9c8f", "ed9bbce186ba"],
- ["ed9c90", "e18492e185b0e186bb"],
- ["ed9c90", "ed9bbce186bb"],
- ["ed9c91", "e18492e185b0e186bc"],
- ["ed9c91", "ed9bbce186bc"],
- ["ed9c92", "e18492e185b0e186bd"],
- ["ed9c92", "ed9bbce186bd"],
- ["ed9c93", "e18492e185b0e186be"],
- ["ed9c93", "ed9bbce186be"],
- ["ed9c94", "e18492e185b0e186bf"],
- ["ed9c94", "ed9bbce186bf"],
- ["ed9c95", "e18492e185b0e18780"],
- ["ed9c95", "ed9bbce18780"],
- ["ed9c96", "e18492e185b0e18781"],
- ["ed9c96", "ed9bbce18781"],
- ["ed9c97", "e18492e185b0e18782"],
- ["ed9c97", "ed9bbce18782"],
- ["ed9c98", "e18492e185b1"],
- ["ed9c99", "e18492e185b1e186a8"],
- ["ed9c99", "ed9c98e186a8"],
- ["ed9c9a", "e18492e185b1e186a9"],
- ["ed9c9a", "ed9c98e186a9"],
- ["ed9c9b", "e18492e185b1e186aa"],
- ["ed9c9b", "ed9c98e186aa"],
- ["ed9c9c", "e18492e185b1e186ab"],
- ["ed9c9c", "ed9c98e186ab"],
- ["ed9c9d", "e18492e185b1e186ac"],
- ["ed9c9d", "ed9c98e186ac"],
- ["ed9c9e", "e18492e185b1e186ad"],
- ["ed9c9e", "ed9c98e186ad"],
- ["ed9c9f", "e18492e185b1e186ae"],
- ["ed9c9f", "ed9c98e186ae"],
- ["ed9ca0", "e18492e185b1e186af"],
- ["ed9ca0", "ed9c98e186af"],
- ["ed9ca1", "e18492e185b1e186b0"],
- ["ed9ca1", "ed9c98e186b0"],
- ["ed9ca2", "e18492e185b1e186b1"],
- ["ed9ca2", "ed9c98e186b1"],
- ["ed9ca3", "e18492e185b1e186b2"],
- ["ed9ca3", "ed9c98e186b2"],
- ["ed9ca4", "e18492e185b1e186b3"],
- ["ed9ca4", "ed9c98e186b3"],
- ["ed9ca5", "e18492e185b1e186b4"],
- ["ed9ca5", "ed9c98e186b4"],
- ["ed9ca6", "e18492e185b1e186b5"],
- ["ed9ca6", "ed9c98e186b5"],
- ["ed9ca7", "e18492e185b1e186b6"],
- ["ed9ca7", "ed9c98e186b6"],
- ["ed9ca8", "e18492e185b1e186b7"],
- ["ed9ca8", "ed9c98e186b7"],
- ["ed9ca9", "e18492e185b1e186b8"],
- ["ed9ca9", "ed9c98e186b8"],
- ["ed9caa", "e18492e185b1e186b9"],
- ["ed9caa", "ed9c98e186b9"],
- ["ed9cab", "e18492e185b1e186ba"],
- ["ed9cab", "ed9c98e186ba"],
- ["ed9cac", "e18492e185b1e186bb"],
- ["ed9cac", "ed9c98e186bb"],
- ["ed9cad", "e18492e185b1e186bc"],
- ["ed9cad", "ed9c98e186bc"],
- ["ed9cae", "e18492e185b1e186bd"],
- ["ed9cae", "ed9c98e186bd"],
- ["ed9caf", "e18492e185b1e186be"],
- ["ed9caf", "ed9c98e186be"],
- ["ed9cb0", "e18492e185b1e186bf"],
- ["ed9cb0", "ed9c98e186bf"],
- ["ed9cb1", "e18492e185b1e18780"],
- ["ed9cb1", "ed9c98e18780"],
- ["ed9cb2", "e18492e185b1e18781"],
- ["ed9cb2", "ed9c98e18781"],
- ["ed9cb3", "e18492e185b1e18782"],
- ["ed9cb3", "ed9c98e18782"],
- ["ed9cb4", "e18492e185b2"],
- ["ed9cb5", "e18492e185b2e186a8"],
- ["ed9cb5", "ed9cb4e186a8"],
- ["ed9cb6", "e18492e185b2e186a9"],
- ["ed9cb6", "ed9cb4e186a9"],
- ["ed9cb7", "e18492e185b2e186aa"],
- ["ed9cb7", "ed9cb4e186aa"],
- ["ed9cb8", "e18492e185b2e186ab"],
- ["ed9cb8", "ed9cb4e186ab"],
- ["ed9cb9", "e18492e185b2e186ac"],
- ["ed9cb9", "ed9cb4e186ac"],
- ["ed9cba", "e18492e185b2e186ad"],
- ["ed9cba", "ed9cb4e186ad"],
- ["ed9cbb", "e18492e185b2e186ae"],
- ["ed9cbb", "ed9cb4e186ae"],
- ["ed9cbc", "e18492e185b2e186af"],
- ["ed9cbc", "ed9cb4e186af"],
- ["ed9cbd", "e18492e185b2e186b0"],
- ["ed9cbd", "ed9cb4e186b0"],
- ["ed9cbe", "e18492e185b2e186b1"],
- ["ed9cbe", "ed9cb4e186b1"],
- ["ed9cbf", "e18492e185b2e186b2"],
- ["ed9cbf", "ed9cb4e186b2"],
- ["ed9d80", "e18492e185b2e186b3"],
- ["ed9d80", "ed9cb4e186b3"],
- ["ed9d81", "e18492e185b2e186b4"],
- ["ed9d81", "ed9cb4e186b4"],
- ["ed9d82", "e18492e185b2e186b5"],
- ["ed9d82", "ed9cb4e186b5"],
- ["ed9d83", "e18492e185b2e186b6"],
- ["ed9d83", "ed9cb4e186b6"],
- ["ed9d84", "e18492e185b2e186b7"],
- ["ed9d84", "ed9cb4e186b7"],
- ["ed9d85", "e18492e185b2e186b8"],
- ["ed9d85", "ed9cb4e186b8"],
- ["ed9d86", "e18492e185b2e186b9"],
- ["ed9d86", "ed9cb4e186b9"],
- ["ed9d87", "e18492e185b2e186ba"],
- ["ed9d87", "ed9cb4e186ba"],
- ["ed9d88", "e18492e185b2e186bb"],
- ["ed9d88", "ed9cb4e186bb"],
- ["ed9d89", "e18492e185b2e186bc"],
- ["ed9d89", "ed9cb4e186bc"],
- ["ed9d8a", "e18492e185b2e186bd"],
- ["ed9d8a", "ed9cb4e186bd"],
- ["ed9d8b", "e18492e185b2e186be"],
- ["ed9d8b", "ed9cb4e186be"],
- ["ed9d8c", "e18492e185b2e186bf"],
- ["ed9d8c", "ed9cb4e186bf"],
- ["ed9d8d", "e18492e185b2e18780"],
- ["ed9d8d", "ed9cb4e18780"],
- ["ed9d8e", "e18492e185b2e18781"],
- ["ed9d8e", "ed9cb4e18781"],
- ["ed9d8f", "e18492e185b2e18782"],
- ["ed9d8f", "ed9cb4e18782"],
- ["ed9d90", "e18492e185b3"],
- ["ed9d91", "e18492e185b3e186a8"],
- ["ed9d91", "ed9d90e186a8"],
- ["ed9d92", "e18492e185b3e186a9"],
- ["ed9d92", "ed9d90e186a9"],
- ["ed9d93", "e18492e185b3e186aa"],
- ["ed9d93", "ed9d90e186aa"],
- ["ed9d94", "e18492e185b3e186ab"],
- ["ed9d94", "ed9d90e186ab"],
- ["ed9d95", "e18492e185b3e186ac"],
- ["ed9d95", "ed9d90e186ac"],
- ["ed9d96", "e18492e185b3e186ad"],
- ["ed9d96", "ed9d90e186ad"],
- ["ed9d97", "e18492e185b3e186ae"],
- ["ed9d97", "ed9d90e186ae"],
- ["ed9d98", "e18492e185b3e186af"],
- ["ed9d98", "ed9d90e186af"],
- ["ed9d99", "e18492e185b3e186b0"],
- ["ed9d99", "ed9d90e186b0"],
- ["ed9d9a", "e18492e185b3e186b1"],
- ["ed9d9a", "ed9d90e186b1"],
- ["ed9d9b", "e18492e185b3e186b2"],
- ["ed9d9b", "ed9d90e186b2"],
- ["ed9d9c", "e18492e185b3e186b3"],
- ["ed9d9c", "ed9d90e186b3"],
- ["ed9d9d", "e18492e185b3e186b4"],
- ["ed9d9d", "ed9d90e186b4"],
- ["ed9d9e", "e18492e185b3e186b5"],
- ["ed9d9e", "ed9d90e186b5"],
- ["ed9d9f", "e18492e185b3e186b6"],
- ["ed9d9f", "ed9d90e186b6"],
- ["ed9da0", "e18492e185b3e186b7"],
- ["ed9da0", "ed9d90e186b7"],
- ["ed9da1", "e18492e185b3e186b8"],
- ["ed9da1", "ed9d90e186b8"],
- ["ed9da2", "e18492e185b3e186b9"],
- ["ed9da2", "ed9d90e186b9"],
- ["ed9da3", "e18492e185b3e186ba"],
- ["ed9da3", "ed9d90e186ba"],
- ["ed9da4", "e18492e185b3e186bb"],
- ["ed9da4", "ed9d90e186bb"],
- ["ed9da5", "e18492e185b3e186bc"],
- ["ed9da5", "ed9d90e186bc"],
- ["ed9da6", "e18492e185b3e186bd"],
- ["ed9da6", "ed9d90e186bd"],
- ["ed9da7", "e18492e185b3e186be"],
- ["ed9da7", "ed9d90e186be"],
- ["ed9da8", "e18492e185b3e186bf"],
- ["ed9da8", "ed9d90e186bf"],
- ["ed9da9", "e18492e185b3e18780"],
- ["ed9da9", "ed9d90e18780"],
- ["ed9daa", "e18492e185b3e18781"],
- ["ed9daa", "ed9d90e18781"],
- ["ed9dab", "e18492e185b3e18782"],
- ["ed9dab", "ed9d90e18782"],
- ["ed9dac", "e18492e185b4"],
- ["ed9dad", "e18492e185b4e186a8"],
- ["ed9dad", "ed9dace186a8"],
- ["ed9dae", "e18492e185b4e186a9"],
- ["ed9dae", "ed9dace186a9"],
- ["ed9daf", "e18492e185b4e186aa"],
- ["ed9daf", "ed9dace186aa"],
- ["ed9db0", "e18492e185b4e186ab"],
- ["ed9db0", "ed9dace186ab"],
- ["ed9db1", "e18492e185b4e186ac"],
- ["ed9db1", "ed9dace186ac"],
- ["ed9db2", "e18492e185b4e186ad"],
- ["ed9db2", "ed9dace186ad"],
- ["ed9db3", "e18492e185b4e186ae"],
- ["ed9db3", "ed9dace186ae"],
- ["ed9db4", "e18492e185b4e186af"],
- ["ed9db4", "ed9dace186af"],
- ["ed9db5", "e18492e185b4e186b0"],
- ["ed9db5", "ed9dace186b0"],
- ["ed9db6", "e18492e185b4e186b1"],
- ["ed9db6", "ed9dace186b1"],
- ["ed9db7", "e18492e185b4e186b2"],
- ["ed9db7", "ed9dace186b2"],
- ["ed9db8", "e18492e185b4e186b3"],
- ["ed9db8", "ed9dace186b3"],
- ["ed9db9", "e18492e185b4e186b4"],
- ["ed9db9", "ed9dace186b4"],
- ["ed9dba", "e18492e185b4e186b5"],
- ["ed9dba", "ed9dace186b5"],
- ["ed9dbb", "e18492e185b4e186b6"],
- ["ed9dbb", "ed9dace186b6"],
- ["ed9dbc", "e18492e185b4e186b7"],
- ["ed9dbc", "ed9dace186b7"],
- ["ed9dbd", "e18492e185b4e186b8"],
- ["ed9dbd", "ed9dace186b8"],
- ["ed9dbe", "e18492e185b4e186b9"],
- ["ed9dbe", "ed9dace186b9"],
- ["ed9dbf", "e18492e185b4e186ba"],
- ["ed9dbf", "ed9dace186ba"],
- ["ed9e80", "e18492e185b4e186bb"],
- ["ed9e80", "ed9dace186bb"],
- ["ed9e81", "e18492e185b4e186bc"],
- ["ed9e81", "ed9dace186bc"],
- ["ed9e82", "e18492e185b4e186bd"],
- ["ed9e82", "ed9dace186bd"],
- ["ed9e83", "e18492e185b4e186be"],
- ["ed9e83", "ed9dace186be"],
- ["ed9e84", "e18492e185b4e186bf"],
- ["ed9e84", "ed9dace186bf"],
- ["ed9e85", "e18492e185b4e18780"],
- ["ed9e85", "ed9dace18780"],
- ["ed9e86", "e18492e185b4e18781"],
- ["ed9e86", "ed9dace18781"],
- ["ed9e87", "e18492e185b4e18782"],
- ["ed9e87", "ed9dace18782"],
- ["ed9e88", "e18492e185b5"],
- ["ed9e89", "e18492e185b5e186a8"],
- ["ed9e89", "ed9e88e186a8"],
- ["ed9e8a", "e18492e185b5e186a9"],
- ["ed9e8a", "ed9e88e186a9"],
- ["ed9e8b", "e18492e185b5e186aa"],
- ["ed9e8b", "ed9e88e186aa"],
- ["ed9e8c", "e18492e185b5e186ab"],
- ["ed9e8c", "ed9e88e186ab"],
- ["ed9e8d", "e18492e185b5e186ac"],
- ["ed9e8d", "ed9e88e186ac"],
- ["ed9e8e", "e18492e185b5e186ad"],
- ["ed9e8e", "ed9e88e186ad"],
- ["ed9e8f", "e18492e185b5e186ae"],
- ["ed9e8f", "ed9e88e186ae"],
- ["ed9e90", "e18492e185b5e186af"],
- ["ed9e90", "ed9e88e186af"],
- ["ed9e91", "e18492e185b5e186b0"],
- ["ed9e91", "ed9e88e186b0"],
- ["ed9e92", "e18492e185b5e186b1"],
- ["ed9e92", "ed9e88e186b1"],
- ["ed9e93", "e18492e185b5e186b2"],
- ["ed9e93", "ed9e88e186b2"],
- ["ed9e94", "e18492e185b5e186b3"],
- ["ed9e94", "ed9e88e186b3"],
- ["ed9e95", "e18492e185b5e186b4"],
- ["ed9e95", "ed9e88e186b4"],
- ["ed9e96", "e18492e185b5e186b5"],
- ["ed9e96", "ed9e88e186b5"],
- ["ed9e97", "e18492e185b5e186b6"],
- ["ed9e97", "ed9e88e186b6"],
- ["ed9e98", "e18492e185b5e186b7"],
- ["ed9e98", "ed9e88e186b7"],
- ["ed9e99", "e18492e185b5e186b8"],
- ["ed9e99", "ed9e88e186b8"],
- ["ed9e9a", "e18492e185b5e186b9"],
- ["ed9e9a", "ed9e88e186b9"],
- ["ed9e9b", "e18492e185b5e186ba"],
- ["ed9e9b", "ed9e88e186ba"],
- ["ed9e9c", "e18492e185b5e186bb"],
- ["ed9e9c", "ed9e88e186bb"],
- ["ed9e9d", "e18492e185b5e186bc"],
- ["ed9e9d", "ed9e88e186bc"],
- ["ed9e9e", "e18492e185b5e186bd"],
- ["ed9e9e", "ed9e88e186bd"],
- ["ed9e9f", "e18492e185b5e186be"],
- ["ed9e9f", "ed9e88e186be"],
- ["ed9ea0", "e18492e185b5e186bf"],
- ["ed9ea0", "ed9e88e186bf"],
- ["ed9ea1", "e18492e185b5e18780"],
- ["ed9ea1", "ed9e88e18780"],
- ["ed9ea2", "e18492e185b5e18781"],
- ["ed9ea2", "ed9e88e18781"],
- ["ed9ea3", "e18492e185b5e18782"],
- ["ed9ea3", "ed9e88e18782"],
+ ["e1bdbd", "cf89cc81"],
+ ["e1be80", "ceb1cd85cc93"],
+ ["e1be81", "ceb1cd85cc94"],
+ ["e1be82", "ceb1cd85cc93cc80"],
+ ["e1be83", "ceb1cd85cc94cc80"],
+ ["e1be84", "ceb1cd85cc93cc81"],
+ ["e1be85", "ceb1cd85cc94cc81"],
+ ["e1be86", "ceb1cd85cc93cd82"],
+ ["e1be87", "ceb1cd85cc94cd82"],
+ ["e1be88", "ce91cd85cc93"],
+ ["e1be89", "ce91cd85cc94"],
+ ["e1be8a", "ce91cd85cc93cc80"],
+ ["e1be8b", "ce91cd85cc94cc80"],
+ ["e1be8c", "ce91cd85cc93cc81"],
+ ["e1be8d", "ce91cd85cc94cc81"],
+ ["e1be8e", "ce91cd85cc93cd82"],
+ ["e1be8f", "ce91cd85cc94cd82"],
+ ["e1be90", "ceb7cd85cc93"],
+ ["e1be91", "ceb7cd85cc94"],
+ ["e1be92", "ceb7cd85cc93cc80"],
+ ["e1be93", "ceb7cd85cc94cc80"],
+ ["e1be94", "ceb7cd85cc93cc81"],
+ ["e1be95", "ceb7cd85cc94cc81"],
+ ["e1be96", "ceb7cd85cc93cd82"],
+ ["e1be97", "ceb7cd85cc94cd82"],
+ ["e1be98", "ce97cd85cc93"],
+ ["e1be99", "ce97cd85cc94"],
+ ["e1be9a", "ce97cd85cc93cc80"],
+ ["e1be9b", "ce97cd85cc94cc80"],
+ ["e1be9c", "ce97cd85cc93cc81"],
+ ["e1be9d", "ce97cd85cc94cc81"],
+ ["e1be9e", "ce97cd85cc93cd82"],
+ ["e1be9f", "ce97cd85cc94cd82"],
+ ["e1bea0", "cf89cd85cc93"],
+ ["e1bea1", "cf89cd85cc94"],
+ ["e1bea2", "cf89cd85cc93cc80"],
+ ["e1bea3", "cf89cd85cc94cc80"],
+ ["e1bea4", "cf89cd85cc93cc81"],
+ ["e1bea5", "cf89cd85cc94cc81"],
+ ["e1bea6", "cf89cd85cc93cd82"],
+ ["e1bea7", "cf89cd85cc94cd82"],
+ ["e1bea8", "cea9cd85cc93"],
+ ["e1bea9", "cea9cd85cc94"],
+ ["e1beaa", "cea9cd85cc93cc80"],
+ ["e1beab", "cea9cd85cc94cc80"],
+ ["e1beac", "cea9cd85cc93cc81"],
+ ["e1bead", "cea9cd85cc94cc81"],
+ ["e1beae", "cea9cd85cc93cd82"],
+ ["e1beaf", "cea9cd85cc94cd82"],
+ ["e1beb0", "ceb1cc86"],
+ ["e1beb1", "ceb1cc84"],
+ ["e1beb2", "ceb1cd85cc80"],
+ ["e1beb3", "ceb1cd85"],
+ ["e1beb4", "ceb1cd85cc81"],
+ ["e1beb6", "ceb1cd82"],
+ ["e1beb7", "ceb1cd85cd82"],
+ ["e1beb8", "ce91cc86"],
+ ["e1beb9", "ce91cc84"],
+ ["e1beba", "ce91cc80"],
+ ["e1bebb", "ce91cc81"],
+ ["e1bebc", "ce91cd85"],
+ ["e1bebe", "ceb9"],
+ ["e1bf81", "c2a8cd82"],
+ ["e1bf82", "ceb7cd85cc80"],
+ ["e1bf83", "ceb7cd85"],
+ ["e1bf84", "ceb7cd85cc81"],
+ ["e1bf86", "ceb7cd82"],
+ ["e1bf87", "ceb7cd85cd82"],
+ ["e1bf88", "ce95cc80"],
+ ["e1bf89", "ce95cc81"],
+ ["e1bf8a", "ce97cc80"],
+ ["e1bf8b", "ce97cc81"],
+ ["e1bf8c", "ce97cd85"],
["e1bf8d", "e1bebfcc80"],
["e1bf8e", "e1bebfcc81"],
["e1bf8f", "e1bebfcd82"],
+ ["e1bf90", "ceb9cc86"],
+ ["e1bf91", "ceb9cc84"],
+ ["e1bf92", "ceb9cc88cc80"],
+ ["e1bf93", "ceb9cc88cc81"],
+ ["e1bf96", "ceb9cd82"],
+ ["e1bf97", "ceb9cc88cd82"],
+ ["e1bf98", "ce99cc86"],
+ ["e1bf99", "ce99cc84"],
+ ["e1bf9a", "ce99cc80"],
+ ["e1bf9b", "ce99cc81"],
["e1bf9d", "e1bfbecc80"],
["e1bf9e", "e1bfbecc81"],
["e1bf9f", "e1bfbecd82"],
- ["e38294", "e38186e38299"],
+ ["e1bfa0", "cf85cc86"],
+ ["e1bfa1", "cf85cc84"],
+ ["e1bfa2", "cf85cc88cc80"],
+ ["e1bfa3", "cf85cc88cc81"],
+ ["e1bfa4", "cf81cc93"],
+ ["e1bfa5", "cf81cc94"],
+ ["e1bfa6", "cf85cd82"],
+ ["e1bfa7", "cf85cc88cd82"],
+ ["e1bfa8", "cea5cc86"],
+ ["e1bfa9", "cea5cc84"],
+ ["e1bfaa", "cea5cc80"],
+ ["e1bfab", "cea5cc81"],
+ ["e1bfac", "cea1cc94"],
+ ["e1bfad", "c2a8cc80"],
+ ["e1bfae", "c2a8cc81"],
+ ["e1bfaf", "60"],
+ ["e1bfb2", "cf89cd85cc80"],
+ ["e1bfb3", "cf89cd85"],
+ ["e1bfb4", "cebfcd85cc81"],
+ ["e1bfb6", "cf89cd82"],
+ ["e1bfb7", "cf89cd85cd82"],
+ ["e1bfb8", "ce9fcc80"],
+ ["e1bfb9", "ce9fcc81"],
+ ["e1bfba", "cea9cc80"],
+ ["e1bfbb", "cea9cc81"],
+ ["e1bfbc", "cea9cd85"],
+ ["e1bfbd", "c2b4"],
["e3818c", "e3818be38299"],
["e3818e", "e3818de38299"],
["e38190", "e3818fe38299"],
@@ -23119,8 +876,8 @@ MAC_DECOMPOSE_TBL = [
["e381ba", "e381b8e3829a"],
["e381bc", "e381bbe38299"],
["e381bd", "e381bbe3829a"],
+ ["e38294", "e38186e38299"],
["e3829e", "e3829de38299"],
- ["e383b4", "e382a6e38299"],
["e382ac", "e382abe38299"],
["e382ae", "e382ade38299"],
["e382b0", "e382afe38299"],
@@ -23146,9 +903,43 @@ MAC_DECOMPOSE_TBL = [
["e3839a", "e38398e3829a"],
["e3839c", "e3839be38299"],
["e3839d", "e3839be3829a"],
+ ["e383b4", "e382a6e38299"],
["e383b7", "e383afe38299"],
["e383b8", "e383b0e38299"],
["e383b9", "e383b1e38299"],
["e383ba", "e383b2e38299"],
["e383be", "e383bde38299"],
+ ["efac9f", "d7b2d6b7"],
+ ["efacaa", "d7a9d781"],
+ ["efacab", "d7a9d782"],
+ ["efacac", "d7a9d6bcd781"],
+ ["efacad", "d7a9d6bcd782"],
+ ["efacae", "d790d6b7"],
+ ["efacaf", "d790d6b8"],
+ ["efacb0", "d790d6bc"],
+ ["efacb1", "d791d6bc"],
+ ["efacb2", "d792d6bc"],
+ ["efacb3", "d793d6bc"],
+ ["efacb4", "d794d6bc"],
+ ["efacb5", "d795d6bc"],
+ ["efacb6", "d796d6bc"],
+ ["efacb8", "d798d6bc"],
+ ["efacb9", "d799d6bc"],
+ ["efacba", "d79ad6bc"],
+ ["efacbb", "d79bd6bc"],
+ ["efacbc", "d79cd6bc"],
+ ["efacbe", "d79ed6bc"],
+ ["efad80", "d7a0d6bc"],
+ ["efad81", "d7a1d6bc"],
+ ["efad83", "d7a3d6bc"],
+ ["efad84", "d7a4d6bc"],
+ ["efad86", "d7a6d6bc"],
+ ["efad87", "d7a7d6bc"],
+ ["efad88", "d7a8d6bc"],
+ ["efad89", "d7a9d6bc"],
+ ["efad8a", "d7aad6bc"],
+ ["efad8b", "d795d6b9"],
+ ["efad8c", "d791d6bf"],
+ ["efad8d", "d79bd6bf"],
+ ["efad8e", "d7a4d6bf"],
]
diff --git a/enc/trans/utf8_mac.trans b/enc/trans/utf8_mac.trans
index bcaa785ead..11ce35e212 100644
--- a/enc/trans/utf8_mac.trans
+++ b/enc/trans/utf8_mac.trans
@@ -3,18 +3,8 @@
<%
require 'utf8_mac-tbl'
- def charlen(v)
- v.gsub(/[0-7].|[c-d].{3}|e.{5}/, '.').size
- end
-
- map = {}
- MAC_DECOMPOSE_TBL.each do |c, d|
- v = map[c]
- next if v && charlen(v) > charlen(d)
- map[c] = d
- end
transcode_tblgen("UTF-8", "UTF8-MAC",
- map.to_a + [
+ MAC_DECOMPOSE_TBL + [
["{00-7F}", :nomap],
["{c2-df}{80-bf}", :nomap0],
["e0{a0-bf}{80-bf}", :nomap0],
@@ -37,41 +27,11 @@
map["f4{80-8f}{80-bf}{80-bf}"] = :func_so
transcode_generate_node(ActionMap.parse(map), "from_UTF8_MAC")
- # http://www.unicode.org/Public/UNIDATA/CompositionExclusions.txt
- composition_exclusions = [
- 0x0958,0x0959,0x095A,0x095B,0x095C,0x095D,0x095E,0x095F,
- 0x09DC,0x09DD,0x09DF,0x0A33,0x0A36,0x0A59,0x0A5A,0x0A5B,
- 0x0A5E,0x0B5C,0x0B5D,0x0F43,0x0F4D,0x0F52,0x0F57,0x0F5C,
- 0x0F69,0x0F76,0x0F78,0x0F93,0x0F9D,0x0FA2,0x0FA7,0x0FAC,
- 0x0FB9,0xFB1D,0xFB1F,0xFB2A,0xFB2B,0xFB2C,0xFB2D,0xFB2E,
- 0xFB2F,0xFB30,0xFB31,0xFB32,0xFB33,0xFB34,0xFB35,0xFB36,
- 0xFB38,0xFB39,0xFB3A,0xFB3B,0xFB3C,0xFB3E,0xFB40,0xFB41,
- 0xFB43,0xFB44,0xFB46,0xFB47,0xFB48,0xFB49,0xFB4A,0xFB4B,
- 0xFB4C,0xFB4D,0xFB4E,0x2ADC,
-# 0x1D15E,0x1D15F,0x1D160,0x1D161,0x1D162,0x1D163,0x1D164,
-# 0x1D1BB,0x1D1BC,0x1D1BD,0x1D1BE,0x1D1BF,0x1D1C0,
- 0x0340..0x0341,0x0343,0x0374,0x037E,0x0387,
- 0x1F71,0x1F73,0x1F75,0x1F77,0x1F79,0x1F7B,0x1F7D,0x1FBB,
- 0x1FBE,0x1FC9,0x1FCB,0x1FD3,0x1FDB,0x1FE3,0x1FEB,0x1FEE..0x1FEF,
- 0x1FF9,0x1FFB,0x1FFD,0x2000..0x2001,0x2126,0x212A..0x212B,0x2329,0x232A,
- 0xF900..0xFA0D,0xFA10,0xFA12,0xFA15..0xFA1E,0xFA20,0xFA22,0xFA25..0xFA26,
- 0xFA2A..0xFA6D,0xFA70..0xFAD9,
-# 0x2F800..0x2FA1D,
- 0x0344,0x0F73,0x0F75,0x0F81
- ]
- extbl = {}
- composition_exclusions.each do |x|
- case x
- when Range
- x.each do |n|
- extbl[[n].pack("U").unpack("H*")[0]] = true
- end
- when Integer
- extbl[[x].pack("U").unpack("H*")[0]] = true
- end
- end
- ary = MAC_DECOMPOSE_TBL.reject{|k,v|charlen(v)!=2||extbl[k]}.map{|k,v|[v,k]}
- transcode_generate_node(ActionMap.parse(ary), "from_utf8_mac_nfc2")
+ ary = MAC_DECOMPOSE_TBL.select{|k,v|v.scan(/[0-7C-F].(?:[89AB].)*/i).length == 3}
+ transcode_generate_node(ActionMap.parse(ary.map{|k,v|[v,k]}), "from_utf8_mac_nfc3")
+
+ ary = MAC_DECOMPOSE_TBL.select{|k,v|v.scan(/[0-7C-F].(?:[89AB].)*/i).length == 2}
+ transcode_generate_node(ActionMap.parse(ary.map{|k,v|[v,k]}), "from_utf8_mac_nfc2")
%>
<%= transcode_generated_code %>
@@ -90,38 +50,54 @@ struct from_utf8_mac_status {
unsigned char buf[STATUS_BUF_SIZE];
int beg;
int end;
+ int len;
};
-#define buf_empty_p(p) ((p)->beg == (p)->end)
-#define buf_bytesize(p) (((p)->end - (p)->beg + STATUS_BUF_SIZE) % STATUS_BUF_SIZE)
-#define utf8_trailbyte(c) (((c) & 0xC0) == 0x80)
+#define buf_length(sp) ((sp)->len)
+
+int
+buf_bytesize(struct from_utf8_mac_status *sp)
+{
+ int size = sp->end - sp->beg + STATUS_BUF_SIZE;
+ size %= STATUS_BUF_SIZE;
+ return size;
+}
-static void
+void
buf_push(struct from_utf8_mac_status *sp, const unsigned char *p, ssize_t l)
{
const unsigned char *pend = p + l;
while (p < pend) {
- /* if (sp->beg == sp->end) */
sp->buf[sp->end++] = *p++;
sp->end %= STATUS_BUF_SIZE;
}
+ sp->len++;
}
-static unsigned char
+unsigned char
buf_shift(struct from_utf8_mac_status *sp)
{
- /* if (sp->beg == sp->end) */
unsigned char c = sp->buf[sp->beg++];
sp->beg %= STATUS_BUF_SIZE;
+ if ((c & 0xC0) != 0x80) sp->len--;
return c;
}
-static void
+void
+buf_shift_char(struct from_utf8_mac_status *sp)
+{
+ if (sp->beg == sp->end) return;
+ do {
+ buf_shift(sp);
+ } while (sp->beg != sp->end && (sp->buf[sp->beg] & 0xC0) == 0x80);
+}
+
+void
buf_clear(struct from_utf8_mac_status *sp)
{
- sp->beg = sp->end = 0;
+ sp->beg = sp->end = sp->len = 0;
}
-static unsigned char
+unsigned char
buf_at(struct from_utf8_mac_status *sp, int pos)
{
pos += sp->beg;
@@ -129,28 +105,28 @@ buf_at(struct from_utf8_mac_status *sp, int pos)
return sp->buf[pos];
}
-static size_t
+int
buf_output_char(struct from_utf8_mac_status *sp, unsigned char *o)
{
- size_t n = 0;
- while (!buf_empty_p(sp)) {
+ int n = 0;
+ while (sp->beg != sp->end) {
o[n++] = buf_shift(sp);
- if (!utf8_trailbyte(sp->buf[sp->beg])) break;
+ if ((sp->buf[sp->beg] & 0xC0) != 0x80) break;
}
return n;
}
-static size_t
+int
buf_output_all(struct from_utf8_mac_status *sp, unsigned char *o)
{
- size_t n = 0;
- while (!buf_empty_p(sp)) {
+ int n = 0;
+ while (sp->beg != sp->end) {
o[n++] = buf_shift(sp);
}
return n;
}
-static VALUE
+VALUE
get_info(VALUE next_info, struct from_utf8_mac_status *sp) {
int pos = 0;
while (pos < buf_bytesize(sp)) {
@@ -166,32 +142,30 @@ get_info(VALUE next_info, struct from_utf8_mac_status *sp) {
return next_info;
}
-static size_t
-buf_apply(struct from_utf8_mac_status *sp, unsigned char *o)
+int
+buf_apply(int mode, struct from_utf8_mac_status *sp, unsigned char *o)
{
- size_t n = 0;
- VALUE next_info;
- unsigned char buf[3];
- if (buf_bytesize(sp) < 3 || (buf_bytesize(sp) == 3 && buf_at(sp, 0) >= 0xE0)) {
- /* char length is less than 2 */
- return 0;
- }
- next_info = get_info(from_utf8_mac_nfc2, sp);
+ int n = 0;
+ VALUE next_info = mode == 3 ? from_utf8_mac_nfc3 : from_utf8_mac_nfc2;
+ next_info = get_info(next_info, sp);
switch (next_info & 0x1F) {
case THREEbt:
case TWObt:
- buf[n++] = getBT1(next_info);
- buf[n++] = getBT2(next_info);
- if (THREEbt == (next_info & 0x1F))
- buf[n++] = getBT3(next_info);
- buf_clear(sp);
- buf_push(sp, buf, n);
- return 0;
+ o[n++] = getBT1(next_info);
+ o[n++] = getBT2(next_info);
+ if (THREEbt == (next_info & 0x1F)) o[n++] = getBT3(next_info);
+ if (mode == 3) {
+ buf_clear(sp);
+ }
+ else {
+ buf_shift_char(sp);
+ buf_shift_char(sp);
+ }
break;
default:
- return buf_output_char(sp, o);
- break;
+ return 0;
}
+ return n;
}
static int
@@ -207,7 +181,10 @@ from_utf8_mac_finish(void *statep,
unsigned char *o, size_t osize)
{
struct from_utf8_mac_status *sp = statep;
- return buf_output_all(sp, o);
+ int n;
+ if (buf_length(sp) == 0) return 0;
+ n = buf_apply(2, sp, o) + buf_output_all(sp, o);
+ return n;
}
static ssize_t
@@ -232,8 +209,15 @@ fun_so_from_utf8_mac(void *statep,
}
buf_push(sp, s, l);
- n += buf_apply(sp, o);
- return n;
+ if (buf_length(sp) < 3) return n;
+
+ n = buf_apply(3, sp, o);
+ if (n > 0) return n;
+
+ n = buf_apply(2, sp, o);
+ if (n > 0) return n;
+
+ return buf_output_char(sp, o);
}
static const rb_transcoder
@@ -254,3 +238,4 @@ TRANS_INIT(utf8_mac)
<%= transcode_register_code %>
rb_register_transcoder(&rb_from_UTF8_MAC);
}
+
diff --git a/enc/utf_16_32.h b/enc/utf_16_32.h
index da58d1b23c..b232767ee3 100644
--- a/enc/utf_16_32.h
+++ b/enc/utf_16_32.h
@@ -1,5 +1,5 @@
#include "regenc.h"
/* dummy for unsupported, statefull encoding */
-#define ENC_DUMMY_UNICODE(name) ENC_REPLICATE(name, name "BE")
+#define ENC_DUMMY_UNICODE(name) ENC_DUMMY(name)
ENC_DUMMY_UNICODE("UTF-16");
ENC_DUMMY_UNICODE("UTF-32");
diff --git a/encoding.c b/encoding.c
index aede0fb08a..c94dc90a7e 100644
--- a/encoding.c
+++ b/encoding.c
@@ -14,17 +14,20 @@
#include "internal.h"
#include "regenc.h"
#include <ctype.h>
+#ifndef NO_LOCALE_CHARMAP
+#ifdef __CYGWIN__
+#include <windows.h>
+#endif
+#ifdef HAVE_LANGINFO_H
+#include <langinfo.h>
+#endif
+#endif
#include "ruby/util.h"
-#undef rb_ascii8bit_encindex
-#undef rb_utf8_encindex
-#undef rb_usascii_encindex
-
#if defined __GNUC__ && __GNUC__ >= 4
#pragma GCC visibility push(default)
int rb_enc_register(const char *name, rb_encoding *encoding);
void rb_enc_set_base(const char *name, const char *orig);
-int rb_enc_set_dummy(int index);
void rb_encdb_declare(const char *name);
int rb_encdb_replicate(const char *name, const char *orig);
int rb_encdb_dummy(const char *name);
@@ -71,11 +74,9 @@ enc_memsize(const void *p)
static const rb_data_type_t encoding_data_type = {
"encoding",
{0, 0, enc_memsize,},
- NULL, NULL, RUBY_TYPED_FREE_IMMEDIATELY
};
#define is_data_encoding(obj) (RTYPEDDATA_P(obj) && RTYPEDDATA_TYPE(obj) == &encoding_data_type)
-#define is_obj_encoding(obj) (RB_TYPE_P((obj), T_DATA) && is_data_encoding(obj))
static VALUE
enc_new(rb_encoding *encoding)
@@ -124,47 +125,21 @@ check_encoding(rb_encoding *enc)
static int
enc_check_encoding(VALUE obj)
{
- if (!is_obj_encoding(obj)) {
+ if (SPECIAL_CONST_P(obj) || !rb_typeddata_is_kind_of(obj, &encoding_data_type)) {
return -1;
}
return check_encoding(RDATA(obj)->data);
}
-NORETURN(static void not_encoding(VALUE enc));
-static void
-not_encoding(VALUE enc)
-{
- rb_raise(rb_eTypeError, "wrong argument type %"PRIsVALUE" (expected Encoding)",
- rb_obj_class(enc));
-}
-
-static rb_encoding *
+static int
must_encoding(VALUE enc)
{
int index = enc_check_encoding(enc);
if (index < 0) {
- not_encoding(enc);
- }
- return DATA_PTR(enc);
-}
-
-static rb_encoding *
-must_encindex(int index)
-{
- rb_encoding *enc = rb_enc_from_index(index);
- if (!enc) {
- rb_raise(rb_eEncodingError, "encoding index out of bound: %d",
- index);
+ rb_raise(rb_eTypeError, "wrong argument type %s (expected Encoding)",
+ rb_obj_classname(enc));
}
- if (ENC_TO_ENCINDEX(enc) != index) {
- rb_raise(rb_eEncodingError, "wrong encoding index %d for %s (expected %d)",
- index, rb_enc_name(enc), ENC_TO_ENCINDEX(enc));
- }
- if (enc_autoload_p(enc) && enc_autoload(enc) == -1) {
- rb_loaderror("failed to load encoding (%s)",
- rb_enc_name(enc));
- }
- return enc;
+ return index;
}
int
@@ -204,7 +179,7 @@ str_to_encindex(VALUE enc)
{
int idx = str_find_encindex(enc);
if (idx < 0) {
- rb_raise(rb_eArgError, "unknown encoding name - %"PRIsVALUE, enc);
+ rb_raise(rb_eArgError, "unknown encoding name - %s", RSTRING_PTR(enc));
}
return idx;
}
@@ -364,18 +339,6 @@ rb_enc_set_base(const char *name, const char *orig)
set_base_encoding(idx, rb_enc_from_index(origidx));
}
-/* for encdb.h
- * Set encoding dummy.
- */
-int
-rb_enc_set_dummy(int index)
-{
- rb_encoding *enc = enc_table.list[index].enc;
-
- ENC_SET_DUMMY(enc);
- return index;
-}
-
int
rb_enc_replicate(const char *name, rb_encoding *encoding)
{
@@ -470,7 +433,7 @@ rb_encdb_dummy(const char *name)
static VALUE
enc_dummy_p(VALUE enc)
{
- return ENC_DUMMY_P(must_encoding(enc)) ? Qtrue : Qfalse;
+ return ENC_DUMMY_P(enc_table.list[must_encoding(enc)].enc) ? Qtrue : Qfalse;
}
/*
@@ -486,7 +449,7 @@ enc_dummy_p(VALUE enc)
static VALUE
enc_ascii_compatible_p(VALUE enc)
{
- return rb_enc_asciicompat(must_encoding(enc)) ? Qtrue : Qfalse;
+ return rb_enc_asciicompat(enc_table.list[must_encoding(enc)].enc) ? Qtrue : Qfalse;
}
/*
@@ -556,6 +519,13 @@ rb_encdb_set_unicode(int index)
rb_enc_from_index(index)->flags |= ONIGENC_FLAG_UNICODE;
}
+enum {
+ ENCINDEX_ASCII,
+ ENCINDEX_UTF_8,
+ ENCINDEX_US_ASCII,
+ ENCINDEX_BUILTIN_MAX
+};
+
extern rb_encoding OnigEncodingUTF_8;
extern rb_encoding OnigEncodingUS_ASCII;
@@ -571,18 +541,6 @@ rb_enc_init(void)
ENC_REGISTER(UTF_8);
ENC_REGISTER(US_ASCII);
#undef ENC_REGISTER
-#define ENCDB_REGISTER(name, enc) enc_register_at(ENCINDEX_##enc, name, NULL)
- ENCDB_REGISTER("UTF-16BE", UTF_16BE);
- ENCDB_REGISTER("UTF-16LE", UTF_16LE);
- ENCDB_REGISTER("UTF-32BE", UTF_32BE);
- ENCDB_REGISTER("UTF-32LE", UTF_32LE);
- ENCDB_REGISTER("UTF-16", UTF_16);
- ENCDB_REGISTER("UTF-32", UTF_32);
- ENCDB_REGISTER("UTF8-MAC", UTF8_MAC);
-
- ENCDB_REGISTER("EUC-JP", EUC_JP);
- ENCDB_REGISTER("Windows-31J", Windows_31J);
-#undef ENCDB_REGISTER
enc_table.count = ENCINDEX_BUILTIN_MAX;
}
@@ -624,7 +582,6 @@ load_encoding(const char *name)
VALUE enclib = rb_sprintf("enc/%s.so", name);
VALUE verbose = ruby_verbose;
VALUE debug = ruby_debug;
- VALUE errinfo;
VALUE loaded;
char *s = RSTRING_PTR(enclib) + 4, *e = RSTRING_END(enclib) - 3;
int idx;
@@ -634,15 +591,14 @@ load_encoding(const char *name)
else if (ISUPPER(*s)) *s = (char)TOLOWER(*s);
++s;
}
- FL_UNSET(enclib, FL_TAINT);
+ FL_UNSET(enclib, FL_TAINT|FL_UNTRUSTED);
OBJ_FREEZE(enclib);
ruby_verbose = Qfalse;
ruby_debug = Qfalse;
- errinfo = rb_errinfo();
loaded = rb_protect(require_enc, enclib, 0);
ruby_verbose = verbose;
ruby_debug = debug;
- rb_set_errinfo(errinfo);
+ rb_set_errinfo(Qnil);
if (NIL_P(loaded)) return -1;
if ((idx = rb_enc_registered(name)) < 0) return -1;
if (enc_autoload_p(enc_table.list[idx].enc)) return -1;
@@ -663,9 +619,8 @@ enc_autoload(rb_encoding *enc)
if (enc_autoload_p(base)) {
if (enc_autoload(base) < 0) return -1;
}
- i = enc->ruby_encoding_index;
- enc_register_at(i & ENC_INDEX_MASK, rb_enc_name(enc), base);
- enc->ruby_encoding_index = i;
+ i = ENC_TO_ENCINDEX(enc);
+ enc_register_at(i, rb_enc_name(enc), base);
}
else {
i = load_encoding(rb_enc_name(enc));
@@ -784,34 +739,23 @@ void
rb_enc_set_index(VALUE obj, int idx)
{
rb_check_frozen(obj);
- must_encindex(idx);
enc_set_index(obj, idx);
}
VALUE
rb_enc_associate_index(VALUE obj, int idx)
{
- rb_encoding *enc;
- int oldidx, oldtermlen, termlen;
-
/* enc_check_capable(obj);*/
rb_check_frozen(obj);
- oldidx = rb_enc_get_index(obj);
- if (oldidx == idx)
+ if (rb_enc_get_index(obj) == idx)
return obj;
if (SPECIAL_CONST_P(obj)) {
rb_raise(rb_eArgError, "cannot set encoding");
}
- enc = must_encindex(idx);
if (!ENC_CODERANGE_ASCIIONLY(obj) ||
- !rb_enc_asciicompat(enc)) {
+ !rb_enc_asciicompat(rb_enc_from_index(idx))) {
ENC_CODERANGE_CLEAR(obj);
}
- termlen = rb_enc_mbminlen(enc);
- oldtermlen = rb_enc_mbminlen(rb_enc_from_index(oldidx));
- if (oldtermlen < termlen && RB_TYPE_P(obj, T_STRING)) {
- rb_str_fill_terminator(obj, termlen);
- }
enc_set_index(obj, idx);
return obj;
}
@@ -1014,13 +958,6 @@ rb_enc_codelen(int c, rb_encoding *enc)
return n;
}
-#undef rb_enc_code_to_mbclen
-int
-rb_enc_code_to_mbclen(int code, rb_encoding *enc)
-{
- return ONIGENC_CODE_TO_MBCLEN(enc, code);
-}
-
int
rb_enc_toupper(int c, rb_encoding *enc)
{
@@ -1045,25 +982,16 @@ rb_enc_tolower(int c, rb_encoding *enc)
static VALUE
enc_inspect(VALUE self)
{
- rb_encoding *enc;
-
- if (!is_data_encoding(self)) {
- not_encoding(self);
- }
- if (!(enc = DATA_PTR(self)) || rb_enc_from_index(rb_enc_to_index(enc)) != enc) {
- rb_raise(rb_eTypeError, "broken Encoding");
- }
- return rb_enc_sprintf(rb_usascii_encoding(),
- "#<%"PRIsVALUE":%s%s%s>", rb_obj_class(self),
- rb_enc_name(enc),
- (ENC_DUMMY_P(enc) ? " (dummy)" : ""),
- enc_autoload_p(enc) ? " (autoload)" : "");
+ VALUE str = rb_sprintf("#<%s:%s%s>", rb_obj_classname(self),
+ rb_enc_name((rb_encoding*)DATA_PTR(self)),
+ (enc_dummy_p(self) ? " (dummy)" : ""));
+ ENCODING_CODERANGE_SET(str, rb_usascii_encindex(), ENC_CODERANGE_7BIT);
+ return str;
}
/*
* call-seq:
* enc.name -> string
- * enc.to_s -> string
*
* Returns the name of the encoding.
*
@@ -1161,7 +1089,7 @@ static VALUE
enc_find(VALUE klass, VALUE enc)
{
int idx;
- if (is_obj_encoding(enc))
+ if (RB_TYPE_P(enc, T_DATA) && is_data_encoding(enc))
return enc;
idx = str_to_encindex(enc);
if (idx == UNSPECIFIED_ENCODING) return Qnil;
@@ -1271,17 +1199,11 @@ rb_locale_encindex(void)
int idx;
if (NIL_P(charmap))
- idx = ENCINDEX_US_ASCII;
+ idx = rb_usascii_encindex();
else if ((idx = rb_enc_find_index(StringValueCStr(charmap))) < 0)
- idx = ENCINDEX_ASCII;
+ idx = rb_ascii8bit_encindex();
- if (rb_enc_registered("locale") < 0) {
-# if defined _WIN32
- void Init_w32_codepage(void);
- Init_w32_codepage();
-# endif
- enc_alias_internal("locale", idx);
- }
+ if (rb_enc_registered("locale") < 0) enc_alias_internal("locale", idx);
return idx;
}
@@ -1292,12 +1214,31 @@ rb_locale_encoding(void)
return rb_enc_from_index(rb_locale_encindex());
}
+static int
+enc_set_filesystem_encoding(void)
+{
+ int idx;
+#if defined NO_LOCALE_CHARMAP
+ idx = rb_enc_to_index(rb_default_external_encoding());
+#elif defined _WIN32 || defined __CYGWIN__
+ char cp[sizeof(int) * 8 / 3 + 4];
+ snprintf(cp, sizeof cp, "CP%d", AreFileApisANSI() ? GetACP() : GetOEMCP());
+ idx = rb_enc_find_index(cp);
+ if (idx < 0) idx = rb_ascii8bit_encindex();
+#else
+ idx = rb_enc_to_index(rb_default_external_encoding());
+#endif
+
+ enc_alias_internal("filesystem", idx);
+ return idx;
+}
+
int
rb_filesystem_encindex(void)
{
int idx = rb_enc_registered("filesystem");
if (idx < 0)
- idx = ENCINDEX_ASCII;
+ idx = rb_ascii8bit_encindex();
return idx;
}
@@ -1314,8 +1255,6 @@ struct default_encoding {
static struct default_encoding default_external = {0};
-extern int Init_enc_set_filesystem_encoding(void);
-
static int
enc_set_default_encoding(struct default_encoding *def, VALUE encoding, const char *name)
{
@@ -1338,7 +1277,7 @@ enc_set_default_encoding(struct default_encoding *def, VALUE encoding, const cha
}
if (def == &default_external)
- enc_alias_internal("filesystem", Init_enc_set_filesystem_encoding());
+ enc_set_filesystem_encoding();
return overridden;
}
@@ -1458,6 +1397,7 @@ rb_enc_default_internal(void)
* * File names from Dir
* * Integer#chr
* * String#inspect and Regexp#inspect
+ * * Strings returned from Curses
* * Strings returned from Readline
* * Strings returned from SDBM
* * Time#zone
@@ -1534,7 +1474,32 @@ set_default_internal(VALUE klass, VALUE encoding)
*
*/
VALUE
-rb_locale_charmap(VALUE klass);
+rb_locale_charmap(VALUE klass)
+{
+#if defined NO_LOCALE_CHARMAP
+ return rb_usascii_str_new2("ASCII-8BIT");
+#elif defined _WIN32 || defined __CYGWIN__
+ const char *codeset = 0;
+ char cp[sizeof(int) * 3 + 4];
+# ifdef __CYGWIN__
+ const char *nl_langinfo_codeset(void);
+ codeset = nl_langinfo_codeset();
+# endif
+ if (!codeset) {
+ UINT codepage = GetConsoleCP();
+ if (!codepage) codepage = GetACP();
+ snprintf(cp, sizeof(cp), "CP%d", codepage);
+ codeset = cp;
+ }
+ return rb_usascii_str_new2(codeset);
+#elif defined HAVE_LANGINFO_H
+ char *codeset;
+ codeset = nl_langinfo(CODESET);
+ return rb_usascii_str_new2(codeset);
+#else
+ return Qnil;
+#endif
+}
static void
set_encoding_const(const char *name, rb_encoding *enc)
@@ -1711,7 +1676,7 @@ rb_enc_aliases(VALUE klass)
* #=> "R\xC3\xA9sum\xC3\xA9"
* string.encoding
* #=> #<Encoding:ISO-8859-1>
- * string.force_encoding(Encoding::UTF_8)
+ * string.force_encoding(Encoding::UTF-8)
* #=> "R\u00E9sum\u00E9"
*
* Second, it is possible to transcode a string, i.e. translate its internal
@@ -1734,7 +1699,7 @@ rb_enc_aliases(VALUE klass)
* All Ruby script code has an associated Encoding which any String literal
* created in the source code will be associated to.
*
- * The default script encoding is <code>Encoding::UTF-8</code> after v2.0, but it can
+ * The default script encoding is <code>Encoding::US-ASCII</code>, but it can
* be changed by a magic comment on the first line of the source code file (or
* second line, if there is a shebang line on the first). The comment must
* contain the word <code>coding</code> or <code>encoding</code>, followed
@@ -1900,7 +1865,7 @@ Init_Encoding(void)
rb_define_singleton_method(rb_cEncoding, "locale_charmap", rb_locale_charmap, 0);
list = rb_ary_new2(enc_table.count);
- RBASIC_CLEAR_CLASS(list);
+ RBASIC(list)->klass = 0;
rb_encoding_list = list;
rb_gc_register_mark_object(list);
@@ -1939,8 +1904,3 @@ rb_toupper(int c)
return rb_isascii(c) ? ONIGENC_ASCII_CODE_TO_UPPER_CASE(c) : c;
}
-void
-rb_enc_foreach_name(int (*func)(st_data_t name, st_data_t idx, st_data_t arg), st_data_t arg)
-{
- st_foreach(enc_table.names, func, arg);
-}
diff --git a/enum.c b/enum.c
index e37ff16c5d..6da937085a 100644
--- a/enum.c
+++ b/enum.c
@@ -15,7 +15,7 @@
#include "id.h"
#include "internal.h"
-VALUE rb_f_send(int argc, VALUE *argv, VALUE recv);
+#define STATIC_ASSERT(name, expr) typedef int static_assert_##name##_check[1 - 2*!(expr)]
VALUE rb_mEnumerable;
@@ -30,7 +30,7 @@ static ID id_size;
#define id_lshift idLTLT
VALUE
-rb_enum_values_pack(int argc, const VALUE *argv)
+rb_enum_values_pack(int argc, VALUE *argv)
{
if (argc == 0) return Qnil;
if (argc == 1) return argv[0];
@@ -44,7 +44,7 @@ rb_enum_values_pack(int argc, const VALUE *argv)
#define enum_yield rb_yield_values2
static VALUE
-grep_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, args))
+grep_i(VALUE i, VALUE args, int argc, VALUE *argv)
{
NODE *memo = RNODE(args);
ENUM_WANT_SVALUE();
@@ -56,7 +56,7 @@ grep_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, args))
}
static VALUE
-grep_iter_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, args))
+grep_iter_i(VALUE i, VALUE args, int argc, VALUE *argv)
{
NODE *memo = RNODE(args);
ENUM_WANT_SVALUE();
@@ -97,7 +97,7 @@ enum_grep(VALUE obj, VALUE pat)
}
static VALUE
-count_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, memop))
+count_i(VALUE i, VALUE memop, int argc, VALUE *argv)
{
NODE *memo = RNODE(memop);
@@ -110,7 +110,7 @@ count_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, memop))
}
static VALUE
-count_iter_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, memop))
+count_iter_i(VALUE i, VALUE memop, int argc, VALUE *argv)
{
NODE *memo = RNODE(memop);
@@ -121,7 +121,7 @@ count_iter_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, memop))
}
static VALUE
-count_all_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, memop))
+count_all_i(VALUE i, VALUE memop, int argc, VALUE *argv)
{
NODE *memo = RNODE(memop);
@@ -176,7 +176,7 @@ enum_count(int argc, VALUE *argv, VALUE obj)
}
static VALUE
-find_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, memop))
+find_i(VALUE i, VALUE memop, int argc, VALUE *argv)
{
ENUM_WANT_SVALUE();
@@ -228,7 +228,7 @@ enum_find(int argc, VALUE *argv, VALUE obj)
}
static VALUE
-find_index_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, memop))
+find_index_i(VALUE i, VALUE memop, int argc, VALUE *argv)
{
NODE *memo = RNODE(memop);
@@ -243,7 +243,7 @@ find_index_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, memop))
}
static VALUE
-find_index_iter_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, memop))
+find_index_iter_i(VALUE i, VALUE memop, int argc, VALUE *argv)
{
NODE *memo = RNODE(memop);
@@ -299,7 +299,7 @@ enum_find_index(int argc, VALUE *argv, VALUE obj)
}
static VALUE
-find_all_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, ary))
+find_all_i(VALUE i, VALUE ary, int argc, VALUE *argv)
{
ENUM_WANT_SVALUE();
@@ -310,7 +310,7 @@ find_all_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, ary))
}
static VALUE
-enum_size(VALUE self, VALUE args, VALUE eobj)
+enum_size(VALUE self, VALUE args)
{
VALUE r;
r = rb_check_funcall(self, id_size, 0, 0);
@@ -351,7 +351,7 @@ enum_find_all(VALUE obj)
}
static VALUE
-reject_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, ary))
+reject_i(VALUE i, VALUE ary, int argc, VALUE *argv)
{
ENUM_WANT_SVALUE();
@@ -392,7 +392,7 @@ enum_reject(VALUE obj)
}
static VALUE
-collect_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, ary))
+collect_i(VALUE i, VALUE ary, int argc, VALUE *argv)
{
rb_ary_push(ary, enum_yield(argc, argv));
@@ -400,7 +400,7 @@ collect_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, ary))
}
static VALUE
-collect_all(RB_BLOCK_CALL_FUNC_ARGLIST(i, ary))
+collect_all(VALUE i, VALUE ary, int argc, VALUE *argv)
{
rb_thread_check_ints();
rb_ary_push(ary, rb_enum_values_pack(argc, argv));
@@ -420,7 +420,7 @@ collect_all(RB_BLOCK_CALL_FUNC_ARGLIST(i, ary))
*
* If no block is given, an enumerator is returned instead.
*
- * (1..4).map { |i| i*i } #=> [1, 4, 9, 16]
+ * (1..4).collect { |i| i*i } #=> [1, 4, 9, 16]
* (1..4).collect { "cat" } #=> ["cat", "cat", "cat", "cat"]
*
*/
@@ -439,7 +439,7 @@ enum_collect(VALUE obj)
}
static VALUE
-flat_map_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, ary))
+flat_map_i(VALUE i, VALUE ary, int argc, VALUE *argv)
{
VALUE tmp;
@@ -487,16 +487,13 @@ enum_flat_map(VALUE obj)
/*
* call-seq:
- * enum.to_a(*args) -> array
- * enum.entries(*args) -> array
+ * enum.to_a -> array
+ * enum.entries -> array
*
* Returns an array containing the items in <i>enum</i>.
*
* (1..7).to_a #=> [1, 2, 3, 4, 5, 6, 7]
* { 'a'=>1, 'b'=>2, 'c'=>3 }.to_a #=> [["a", 1], ["b", 2], ["c", 3]]
- *
- * require 'prime'
- * Prime.entries 10 #=> [2, 3, 5, 7]
*/
static VALUE
enum_to_a(int argc, VALUE *argv, VALUE obj)
@@ -510,46 +507,7 @@ enum_to_a(int argc, VALUE *argv, VALUE obj)
}
static VALUE
-enum_to_h_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, hash))
-{
- VALUE key_value_pair;
- ENUM_WANT_SVALUE();
- rb_thread_check_ints();
- key_value_pair = rb_check_array_type(i);
- if (NIL_P(key_value_pair)) {
- rb_raise(rb_eTypeError, "wrong element type %s (expected array)",
- rb_builtin_class_name(i));
- }
- if (RARRAY_LEN(key_value_pair) != 2) {
- rb_raise(rb_eArgError, "element has wrong array length (expected 2, was %ld)",
- RARRAY_LEN(key_value_pair));
- }
- rb_hash_aset(hash, RARRAY_AREF(key_value_pair, 0), RARRAY_AREF(key_value_pair, 1));
- return Qnil;
-}
-
-/*
- * call-seq:
- * enum.to_h(*args) -> hash
- *
- * Returns the result of interpreting <i>enum</i> as a list of
- * <tt>[key, value]</tt> pairs.
- *
- * %i[hello world].each_with_index.to_h
- * # => {:hello => 0, :world => 1}
- */
-
-static VALUE
-enum_to_h(int argc, VALUE *argv, VALUE obj)
-{
- VALUE hash = rb_hash_new();
- rb_block_call(obj, id_each, argc, argv, enum_to_h_i, hash);
- OBJ_INFECT(hash, obj);
- return hash;
-}
-
-static VALUE
-inject_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, p))
+inject_i(VALUE i, VALUE p, int argc, VALUE *argv)
{
NODE *memo = RNODE(p);
@@ -566,10 +524,9 @@ inject_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, p))
}
static VALUE
-inject_op_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, p))
+inject_op_i(VALUE i, VALUE p, int argc, VALUE *argv)
{
NODE *memo = RNODE(p);
- VALUE name;
ENUM_WANT_SVALUE();
@@ -577,14 +534,8 @@ inject_op_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, p))
memo->u2.argc = 1;
memo->u1.value = i;
}
- else if (SYMBOL_P(name = memo->u3.value)) {
- memo->u1.value = rb_funcall(memo->u1.value, SYM2ID(name), 1, i);
- }
else {
- VALUE args[2];
- args[0] = name;
- args[1] = i;
- memo->u1.value = rb_f_send(numberof(args), args, memo->u1.value);
+ memo->u1.value = rb_funcall(memo->u1.value, memo->u3.id, 1, i);
}
return Qnil;
}
@@ -637,8 +588,7 @@ enum_inject(int argc, VALUE *argv, VALUE obj)
{
NODE *memo;
VALUE init, op;
- rb_block_call_func *iter = inject_i;
- ID id;
+ VALUE (*iter)(VALUE, VALUE, int, VALUE*) = inject_i;
switch (rb_scan_args(argc, argv, "02", &init, &op)) {
case 0:
@@ -647,8 +597,7 @@ enum_inject(int argc, VALUE *argv, VALUE obj)
if (rb_block_given_p()) {
break;
}
- id = rb_check_id(&init);
- op = id ? ID2SYM(id) : init;
+ op = (VALUE)rb_to_id(init);
argc = 0;
init = Qnil;
iter = inject_op_i;
@@ -657,8 +606,7 @@ enum_inject(int argc, VALUE *argv, VALUE obj)
if (rb_block_given_p()) {
rb_warning("given block not used");
}
- id = rb_check_id(&op);
- if (id) op = ID2SYM(id);
+ op = (VALUE)rb_to_id(op);
iter = inject_op_i;
break;
}
@@ -668,7 +616,7 @@ enum_inject(int argc, VALUE *argv, VALUE obj)
}
static VALUE
-partition_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, arys))
+partition_i(VALUE i, VALUE arys, int argc, VALUE *argv)
{
NODE *memo = RNODE(arys);
VALUE ary;
@@ -713,7 +661,7 @@ enum_partition(VALUE obj)
}
static VALUE
-group_by_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, hash))
+group_by_i(VALUE i, VALUE hash, int argc, VALUE *argv)
{
VALUE group;
VALUE values;
@@ -762,7 +710,7 @@ enum_group_by(VALUE obj)
}
static VALUE
-first_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, params))
+first_i(VALUE i, VALUE params, int argc, VALUE *argv)
{
NODE *memo = RNODE(params);
ENUM_WANT_SVALUE();
@@ -838,7 +786,7 @@ struct sort_by_data {
};
static VALUE
-sort_by_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, _data))
+sort_by_i(VALUE i, VALUE _data, int argc, VALUE *argv)
{
struct sort_by_data *data = (struct sort_by_data *)&RNODE(_data)->u1;
VALUE ary = data->ary;
@@ -855,8 +803,8 @@ sort_by_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, _data))
rb_raise(rb_eRuntimeError, "sort_by reentered");
}
- RARRAY_ASET(data->buf, data->n*2, v);
- RARRAY_ASET(data->buf, data->n*2+1, i);
+ RARRAY_PTR(data->buf)[data->n*2] = v;
+ RARRAY_PTR(data->buf)[data->n*2+1] = i;
data->n++;
if (data->n == SORT_BY_BUFSIZE) {
rb_ary_concat(ary, data->buf);
@@ -969,7 +917,7 @@ enum_sort_by(VALUE obj)
else {
ary = rb_ary_new();
}
- RBASIC_CLEAR_CLASS(ary);
+ RBASIC(ary)->klass = 0;
buf = rb_ary_tmp_new(SORT_BY_BUFSIZE*2);
rb_ary_store(buf, SORT_BY_BUFSIZE*2-1, Qnil);
memo = NEW_MEMO(0, 0, 0);
@@ -986,18 +934,17 @@ enum_sort_by(VALUE obj)
rb_ary_concat(ary, buf);
}
if (RARRAY_LEN(ary) > 2) {
- RARRAY_PTR_USE(ary, ptr,
- ruby_qsort(ptr, RARRAY_LEN(ary)/2, 2*sizeof(VALUE),
- sort_by_cmp, (void *)ary));
+ ruby_qsort(RARRAY_PTR(ary), RARRAY_LEN(ary)/2, 2*sizeof(VALUE),
+ sort_by_cmp, (void *)ary);
}
if (RBASIC(ary)->klass) {
rb_raise(rb_eRuntimeError, "sort_by reentered");
}
for (i=1; i<RARRAY_LEN(ary); i+=2) {
- RARRAY_ASET(ary, i/2, RARRAY_AREF(ary, i));
+ RARRAY_PTR(ary)[i/2] = RARRAY_PTR(ary)[i];
}
rb_ary_resize(ary, RARRAY_LEN(ary)/2);
- RBASIC_SET_CLASS_RAW(ary, rb_cArray);
+ RBASIC(ary)->klass = rb_cArray;
OBJ_INFECT(ary, memo);
return ary;
@@ -1009,13 +956,13 @@ enum_sort_by(VALUE obj)
static VALUE enum_##name##_func(VALUE result, NODE *memo); \
\
static VALUE \
-name##_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, memo)) \
+name##_i(VALUE i, VALUE memo, int argc, VALUE *argv) \
{ \
return enum_##name##_func(rb_enum_values_pack(argc, argv), RNODE(memo)); \
} \
\
static VALUE \
-name##_iter_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, memo)) \
+name##_iter_i(VALUE i, VALUE memo, int argc, VALUE *argv) \
{ \
return enum_##name##_func(enum_yield(argc, argv), RNODE(memo)); \
} \
@@ -1168,7 +1115,7 @@ enum_none(VALUE obj)
}
static VALUE
-min_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, args))
+min_i(VALUE i, VALUE args, int argc, VALUE *argv)
{
VALUE cmp;
NODE *memo = RNODE(args);
@@ -1188,7 +1135,7 @@ min_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, args))
}
static VALUE
-min_ii(RB_BLOCK_CALL_FUNC_ARGLIST(i, args))
+min_ii(VALUE i, VALUE args, int argc, VALUE *argv)
{
VALUE cmp;
NODE *memo = RNODE(args);
@@ -1240,7 +1187,7 @@ enum_min(VALUE obj)
}
static VALUE
-max_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, args))
+max_i(VALUE i, VALUE args, int argc, VALUE *argv)
{
NODE *memo = RNODE(args);
VALUE cmp;
@@ -1260,7 +1207,7 @@ max_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, args))
}
static VALUE
-max_ii(RB_BLOCK_CALL_FUNC_ARGLIST(i, args))
+max_ii(VALUE i, VALUE args, int argc, VALUE *argv)
{
NODE *memo = RNODE(args);
VALUE cmp;
@@ -1340,7 +1287,7 @@ minmax_i_update(VALUE i, VALUE j, struct minmax_t *memo)
}
static VALUE
-minmax_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, _memo))
+minmax_i(VALUE i, VALUE _memo, int argc, VALUE *argv)
{
struct minmax_t *memo = (struct minmax_t *)&RNODE(_memo)->u1.value;
int n;
@@ -1392,7 +1339,7 @@ minmax_ii_update(VALUE i, VALUE j, struct minmax_t *memo)
}
static VALUE
-minmax_ii(RB_BLOCK_CALL_FUNC_ARGLIST(i, _memo))
+minmax_ii(VALUE i, VALUE _memo, int argc, VALUE *argv)
{
struct minmax_t *memo = (struct minmax_t *)&RNODE(_memo)->u1.value;
int n;
@@ -1464,7 +1411,7 @@ enum_minmax(VALUE obj)
}
static VALUE
-min_by_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, args))
+min_by_i(VALUE i, VALUE args, int argc, VALUE *argv)
{
NODE *memo = RNODE(args);
VALUE v;
@@ -1510,7 +1457,7 @@ enum_min_by(VALUE obj)
}
static VALUE
-max_by_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, args))
+max_by_i(VALUE i, VALUE args, int argc, VALUE *argv)
{
NODE *memo = RNODE(args);
VALUE v;
@@ -1586,7 +1533,7 @@ minmax_by_i_update(VALUE v1, VALUE v2, VALUE i1, VALUE i2, struct minmax_by_t *m
}
static VALUE
-minmax_by_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, _memo))
+minmax_by_i(VALUE i, VALUE _memo, int argc, VALUE *argv)
{
struct minmax_by_t *memo = MEMO_FOR(struct minmax_by_t, _memo);
VALUE vi, vj, j;
@@ -1662,7 +1609,7 @@ enum_minmax_by(VALUE obj)
}
static VALUE
-member_i(RB_BLOCK_CALL_FUNC_ARGLIST(iter, args))
+member_i(VALUE iter, VALUE args, int argc, VALUE *argv)
{
NODE *memo = RNODE(args);
@@ -1696,7 +1643,7 @@ enum_member(VALUE obj, VALUE val)
}
static VALUE
-each_with_index_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, memo))
+each_with_index_i(VALUE i, VALUE memo, int argc, VALUE *argv)
{
long n = RNODE(memo)->u3.cnt++;
@@ -1764,7 +1711,7 @@ enum_reverse_each(int argc, VALUE *argv, VALUE obj)
ary = enum_to_a(argc, argv, obj);
for (i = RARRAY_LEN(ary); --i >= 0; ) {
- rb_yield(RARRAY_AREF(ary, i));
+ rb_yield(RARRAY_PTR(ary)[i]);
}
return obj;
@@ -1772,7 +1719,7 @@ enum_reverse_each(int argc, VALUE *argv, VALUE obj)
static VALUE
-each_val_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, p))
+each_val_i(VALUE i, VALUE p, int argc, VALUE *argv)
{
ENUM_WANT_SVALUE();
rb_yield(i);
@@ -1817,7 +1764,7 @@ enum_each_entry(int argc, VALUE *argv, VALUE obj)
}
static VALUE
-each_slice_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, m))
+each_slice_i(VALUE i, VALUE m, int argc, VALUE *argv)
{
NODE *memo = RNODE(m);
VALUE ary = memo->u1.value;
@@ -1836,13 +1783,13 @@ each_slice_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, m))
}
static VALUE
-enum_each_slice_size(VALUE obj, VALUE args, VALUE eobj)
+enum_each_slice_size(VALUE obj, VALUE args)
{
VALUE n, size;
- long slice_size = NUM2LONG(RARRAY_AREF(args, 0));
+ long slice_size = NUM2LONG(RARRAY_PTR(args)[0]);
if (slice_size <= 0) rb_raise(rb_eArgError, "invalid slice size");
- size = enum_size(obj, 0, 0);
+ size = enum_size(obj, 0);
if (size == Qnil) return Qnil;
n = rb_funcall(size, '+', 1, LONG2NUM(slice_size-1));
@@ -1884,7 +1831,7 @@ enum_each_slice(VALUE obj, VALUE n)
}
static VALUE
-each_cons_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, args))
+each_cons_i(VALUE i, VALUE args, int argc, VALUE *argv)
{
NODE *memo = RNODE(args);
VALUE ary = memo->u1.value;
@@ -1903,13 +1850,13 @@ each_cons_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, args))
}
static VALUE
-enum_each_cons_size(VALUE obj, VALUE args, VALUE eobj)
+enum_each_cons_size(VALUE obj, VALUE args)
{
VALUE n, size;
- long cons_size = NUM2LONG(RARRAY_AREF(args, 0));
+ long cons_size = NUM2LONG(RARRAY_PTR(args)[0]);
if (cons_size <= 0) rb_raise(rb_eArgError, "invalid size");
- size = enum_size(obj, 0, 0);
+ size = enum_size(obj, 0);
if (size == Qnil) return Qnil;
n = rb_funcall(size, '+', 1, LONG2NUM(1 - cons_size));
@@ -1952,7 +1899,7 @@ enum_each_cons(VALUE obj, VALUE n)
}
static VALUE
-each_with_object_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, memo))
+each_with_object_i(VALUE i, VALUE memo, int argc, VALUE *argv)
{
ENUM_WANT_SVALUE();
return rb_yield_values(2, i, memo);
@@ -1983,9 +1930,8 @@ enum_each_with_object(VALUE obj, VALUE memo)
}
static VALUE
-zip_ary(RB_BLOCK_CALL_FUNC_ARGLIST(val, memoval))
+zip_ary(VALUE val, NODE *memo, int argc, VALUE *argv)
{
- NODE *memo = (NODE *)memoval;
volatile VALUE result = memo->u1.value;
volatile VALUE args = memo->u2.value;
long n = memo->u3.cnt++;
@@ -1995,13 +1941,13 @@ zip_ary(RB_BLOCK_CALL_FUNC_ARGLIST(val, memoval))
tmp = rb_ary_new2(RARRAY_LEN(args) + 1);
rb_ary_store(tmp, 0, rb_enum_values_pack(argc, argv));
for (i=0; i<RARRAY_LEN(args); i++) {
- VALUE e = RARRAY_AREF(args, i);
+ VALUE e = RARRAY_PTR(args)[i];
if (RARRAY_LEN(e) <= n) {
rb_ary_push(tmp, Qnil);
}
else {
- rb_ary_push(tmp, RARRAY_AREF(e, n));
+ rb_ary_push(tmp, RARRAY_PTR(e)[n]);
}
}
if (NIL_P(result)) {
@@ -2026,9 +1972,8 @@ call_stop(VALUE *v)
}
static VALUE
-zip_i(RB_BLOCK_CALL_FUNC_ARGLIST(val, memoval))
+zip_i(VALUE val, NODE *memo, int argc, VALUE *argv)
{
- NODE *memo = (NODE *)memoval;
volatile VALUE result = memo->u1.value;
volatile VALUE args = memo->u2.value;
volatile VALUE tmp;
@@ -2037,16 +1982,16 @@ zip_i(RB_BLOCK_CALL_FUNC_ARGLIST(val, memoval))
tmp = rb_ary_new2(RARRAY_LEN(args) + 1);
rb_ary_store(tmp, 0, rb_enum_values_pack(argc, argv));
for (i=0; i<RARRAY_LEN(args); i++) {
- if (NIL_P(RARRAY_AREF(args, i))) {
+ if (NIL_P(RARRAY_PTR(args)[i])) {
rb_ary_push(tmp, Qnil);
}
else {
VALUE v[2];
- v[1] = RARRAY_AREF(args, i);
+ v[1] = RARRAY_PTR(args)[i];
rb_rescue2(call_next, (VALUE)v, call_stop, (VALUE)v, rb_eStopIteration, (VALUE)0);
if (v[0] == Qundef) {
- RARRAY_ASET(args, i, Qnil);
+ RARRAY_PTR(args)[i] = Qnil;
v[0] = Qnil;
}
rb_ary_push(tmp, v[0]);
@@ -2106,10 +2051,7 @@ enum_zip(int argc, VALUE *argv, VALUE obj)
if (!allary) {
CONST_ID(conv, "to_enum");
for (i=0; i<argc; i++) {
- if (!rb_respond_to(argv[i], id_each)) {
- rb_raise(rb_eTypeError, "wrong argument type %s (must respond to :each)",
- rb_obj_classname(argv[i]));
- }
+ if (!rb_respond_to(argv[i], id_each)) Check_Type(argv[i], T_ARRAY);
argv[i] = rb_funcall(argv[i], conv, 1, ID2SYM(id_each));
}
}
@@ -2124,7 +2066,7 @@ enum_zip(int argc, VALUE *argv, VALUE obj)
}
static VALUE
-take_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, args))
+take_i(VALUE i, VALUE args, int argc, VALUE *argv)
{
NODE *memo = RNODE(args);
rb_ary_push(memo->u1.value, rb_enum_values_pack(argc, argv));
@@ -2163,7 +2105,7 @@ enum_take(VALUE obj, VALUE n)
static VALUE
-take_while_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, ary))
+take_while_i(VALUE i, VALUE ary, int argc, VALUE *argv)
{
if (!RTEST(enum_yield(argc, argv))) rb_iter_break();
rb_ary_push(ary, rb_enum_values_pack(argc, argv));
@@ -2197,7 +2139,7 @@ enum_take_while(VALUE obj)
}
static VALUE
-drop_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, args))
+drop_i(VALUE i, VALUE args, int argc, VALUE *argv)
{
NODE *memo = RNODE(args);
if (memo->u3.cnt == 0) {
@@ -2240,7 +2182,7 @@ enum_drop(VALUE obj, VALUE n)
static VALUE
-drop_while_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, args))
+drop_while_i(VALUE i, VALUE args, int argc, VALUE *argv)
{
NODE *memo = RNODE(args);
ENUM_WANT_SVALUE();
@@ -2284,7 +2226,7 @@ enum_drop_while(VALUE obj)
}
static VALUE
-cycle_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, ary))
+cycle_i(VALUE i, VALUE ary, int argc, VALUE *argv)
{
ENUM_WANT_SVALUE();
@@ -2293,17 +2235,18 @@ cycle_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, ary))
return Qnil;
}
-static VALUE
-enum_cycle_size(VALUE self, VALUE args, VALUE eobj)
+#define enum_cycle_size rb_enum_cycle_size
+VALUE
+rb_enum_cycle_size(VALUE self, VALUE args)
{
long mul;
VALUE n = Qnil;
- VALUE size = enum_size(self, args, 0);
+ VALUE size = enum_size(self, args);
if (size == Qnil) return Qnil;
if (args && (RARRAY_LEN(args) > 0)) {
- n = RARRAY_AREF(args, 0);
+ n = RARRAY_PTR(args)[0];
}
if (n == Qnil) return DBL2NUM(INFINITY);
mul = NUM2LONG(n);
@@ -2350,13 +2293,13 @@ enum_cycle(int argc, VALUE *argv, VALUE obj)
if (n <= 0) return Qnil;
}
ary = rb_ary_new();
- RBASIC_CLEAR_CLASS(ary);
+ RBASIC(ary)->klass = 0;
rb_block_call(obj, id_each, 0, 0, cycle_i, ary);
len = RARRAY_LEN(ary);
if (len == 0) return Qnil;
while (n < 0 || 0 < --n) {
for (i=0; i<len; i++) {
- rb_yield(RARRAY_AREF(ary, i));
+ rb_yield(RARRAY_PTR(ary)[i]);
}
}
return Qnil;
@@ -2371,7 +2314,7 @@ struct chunk_arg {
};
static VALUE
-chunk_ii(RB_BLOCK_CALL_FUNC_ARGLIST(i, _argp))
+chunk_ii(VALUE i, VALUE _argp, int argc, VALUE *argv)
{
struct chunk_arg *argp = MEMO_FOR(struct chunk_arg, _argp);
VALUE v;
@@ -2399,7 +2342,7 @@ chunk_ii(RB_BLOCK_CALL_FUNC_ARGLIST(i, _argp))
}
}
else if (SYMBOL_P(v) && rb_id2name(SYM2ID(v))[0] == '_') {
- rb_raise(rb_eRuntimeError, "symbols beginning with an underscore are reserved");
+ rb_raise(rb_eRuntimeError, "symbol begins with an underscore is reserved");
}
else {
if (NIL_P(argp->prev_value)) {
@@ -2421,7 +2364,7 @@ chunk_ii(RB_BLOCK_CALL_FUNC_ARGLIST(i, _argp))
}
static VALUE
-chunk_i(RB_BLOCK_CALL_FUNC_ARGLIST(yielder, enumerator))
+chunk_i(VALUE yielder, VALUE enumerator, int argc, VALUE *argv)
{
VALUE enumerable;
VALUE arg;
@@ -2449,13 +2392,17 @@ chunk_i(RB_BLOCK_CALL_FUNC_ARGLIST(yielder, enumerator))
* enum.chunk { |elt| ... } -> an_enumerator
* enum.chunk(initial_state) { |elt, state| ... } -> an_enumerator
*
- * Enumerates over the items, chunking them together based on the return
- * value of the block.
+ * Creates an enumerator for each chunked elements.
+ * The consecutive elements which have same block value are chunked.
+ *
+ * The result enumerator yields the block value and an array of chunked elements.
+ * So "each" method can be called as follows.
*
- * Consecutive elements which return the same block value are chunked together.
+ * enum.chunk { |elt| key }.each { |key, ary| ... }
+ * enum.chunk(initial_state) { |elt, state| key }.each { |key, ary| ... }
*
* For example, consecutive even numbers and odd numbers can be
- * chunked as follows.
+ * splitted as follows.
*
* [3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5].chunk { |n|
* n.even?
@@ -2481,18 +2428,13 @@ chunk_i(RB_BLOCK_CALL_FUNC_ARGLIST(yielder, enumerator))
* # ["D", 791]
* # ...
*
- * The following key values have special meaning:
- * - +nil+ and +:_separator+ specifies that the elements should be dropped.
- * - +:_alone+ specifies that the element should be chunked by itself.
- *
- * Any other symbols that begin with an underscore will raise an error:
- *
- * items.chunk { |item| :_underscore }
- * #=> RuntimeError: symbols beginning with an underscore are reserved
+ * The following key values has special meaning:
+ * - nil and :_separator specifies that the elements are dropped.
+ * - :_alone specifies that the element should be chunked as a singleton.
+ * Other symbols which begins an underscore are reserved.
*
- * +nil+ and +:_separator+ can be used to ignore some elements.
- *
- * For example, the sequence of hyphens in svn log can be eliminated as follows:
+ * nil and :_separator can be used to ignore some elements.
+ * For example, the sequence of hyphens in svn log can be eliminated as follows.
*
* sep = "-"*72 + "\n"
* IO.popen("svn log README") { |f|
@@ -2512,7 +2454,7 @@ chunk_i(RB_BLOCK_CALL_FUNC_ARGLIST(yielder, enumerator))
* # "\n"]
* # ...
*
- * Paragraphs separated by empty lines can be parsed as follows:
+ * paragraphs separated by empty lines can be parsed as follows.
*
* File.foreach("README").chunk { |line|
* /\A\s*\z/ !~ line || nil
@@ -2520,22 +2462,26 @@ chunk_i(RB_BLOCK_CALL_FUNC_ARGLIST(yielder, enumerator))
* pp lines
* }
*
- * +:_alone+ can be used to force items into their own chunk.
- * For example, you can put lines that contain a URL by themselves,
- * and chunk the rest of the lines together, like this:
+ * :_alone can be used to pass through bunch of elements.
+ * For example, sort consecutive lines formed as Foo#bar and
+ * pass other lines, chunk can be used as follows.
*
- * pattern = /http/
+ * pat = /\A[A-Z][A-Za-z0-9_]+\#/
* open(filename) { |f|
- * f.chunk { |line| line =~ pattern ? :_alone : true }.each { |key, lines|
- * pp lines
+ * f.chunk { |line| pat =~ line ? $& : :_alone }.each { |key, lines|
+ * if key != :_alone
+ * print lines.sort.join('')
+ * else
+ * print lines.join('')
+ * end
* }
* }
*
* If the block needs to maintain state over multiple elements,
- * an +initial_state+ argument can be used.
- * If a non-nil value is given,
- * a reference to it is passed as the 2nd argument of the block for the
- * +chunk+ method, so state-changes to it persist across block calls.
+ * _initial_state_ argument can be used.
+ * If non-nil value is given,
+ * it is duplicated for each "each" method invocation of the enumerator.
+ * The duplicated object is passed to 2nd argument of the block for "chunk" method.
*
*/
static VALUE
@@ -2566,7 +2512,7 @@ struct slicebefore_arg {
};
static VALUE
-slicebefore_ii(RB_BLOCK_CALL_FUNC_ARGLIST(i, _argp))
+slicebefore_ii(VALUE i, VALUE _argp, int argc, VALUE *argv)
{
struct slicebefore_arg *argp = MEMO_FOR(struct slicebefore_arg, _argp);
VALUE header_p;
@@ -2595,7 +2541,7 @@ slicebefore_ii(RB_BLOCK_CALL_FUNC_ARGLIST(i, _argp))
}
static VALUE
-slicebefore_i(RB_BLOCK_CALL_FUNC_ARGLIST(yielder, enumerator))
+slicebefore_i(VALUE yielder, VALUE enumerator, int argc, VALUE *argv)
{
VALUE enumerable;
VALUE arg;
@@ -2799,7 +2745,6 @@ Init_Enumerable(void)
rb_define_method(rb_mEnumerable, "to_a", enum_to_a, -1);
rb_define_method(rb_mEnumerable, "entries", enum_to_a, -1);
- rb_define_method(rb_mEnumerable, "to_h", enum_to_h, -1);
rb_define_method(rb_mEnumerable, "sort", enum_sort, 0);
rb_define_method(rb_mEnumerable, "sort_by", enum_sort_by, 0);
diff --git a/enumerator.c b/enumerator.c
index 2e80580dea..c563fa41bb 100644
--- a/enumerator.c
+++ b/enumerator.c
@@ -104,8 +104,8 @@
*/
VALUE rb_cEnumerator;
VALUE rb_cLazy;
-static ID id_rewind, id_each, id_new, id_initialize, id_yield, id_call, id_size, id_to_enum;
-static ID id_eqq, id_next, id_result, id_lazy, id_receiver, id_arguments, id_memo, id_method, id_force;
+static ID id_rewind, id_each, id_new, id_initialize, id_yield, id_call, id_size;
+static ID id_eqq, id_next, id_result, id_lazy, id_receiver, id_arguments, id_method;
static VALUE sym_each, sym_cycle;
VALUE rb_eStopIteration;
@@ -120,7 +120,7 @@ struct enumerator {
VALUE feedvalue;
VALUE stop_exc;
VALUE size;
- rb_enumerator_size_func *size_fn;
+ VALUE (*size_fn)(ANYARGS);
};
static VALUE rb_cGenerator, rb_cYielder;
@@ -168,7 +168,6 @@ static const rb_data_type_t enumerator_data_type = {
enumerator_free,
enumerator_memsize,
},
- NULL, NULL, RUBY_TYPED_FREE_IMMEDIATELY
};
static struct enumerator *
@@ -185,18 +184,23 @@ enumerator_ptr(VALUE obj)
/*
* call-seq:
- * obj.to_enum(method = :each, *args) -> enum
- * obj.enum_for(method = :each, *args) -> enum
- * obj.to_enum(method = :each, *args) {|*args| block} -> enum
- * obj.enum_for(method = :each, *args){|*args| block} -> enum
+ * obj.to_enum(method = :each, *args)
+ * obj.enum_for(method = :each, *args)
+ * obj.to_enum(method = :each, *args) {|obj, *args| block}
+ * obj.enum_for(method = :each, *args){|obj, *args| block}
*
- * Creates a new Enumerator which will enumerate by calling +method+ on
- * +obj+, passing +args+ if any.
+ * Creates a new Enumerator which will enumerate by on calling +method+ on
+ * +obj+.
*
- * If a block is given, it will be used to calculate the size of
- * the enumerator without the need to iterate it (see Enumerator#size).
+ * +method+:: the method to call on +obj+ to generate the enumeration
+ * +args+:: arguments that will be passed in +method+ <i>in addition</i>
+ * to the item itself. Note that the number of args
+ * must not exceed the number expected by +method+
*
- * === Examples
+ * If a block is given, it will be used to calculate the size of
+ * the enumerator (see Enumerator#size=).
+ *
+ * === Example
*
* str = "xyz"
*
@@ -210,33 +214,6 @@ enumerator_ptr(VALUE obj)
* a = [1, 2, 3]
* some_method(a.to_enum)
*
- * It is typical to call to_enum when defining methods for
- * a generic Enumerable, in case no block is passed.
- *
- * Here is such an example, with parameter passing and a sizing block:
- *
- * module Enumerable
- * # a generic method to repeat the values of any enumerable
- * def repeat(n)
- * raise ArgumentError, "#{n} is negative!" if n < 0
- * unless block_given?
- * return to_enum(__method__, n) do # __method__ is :repeat here
- * sz = size # Call size and multiply by n...
- * sz * n if sz # but return nil if size itself is nil
- * end
- * end
- * each do |*val|
- * n.times { yield *val }
- * end
- * end
- * end
- *
- * %i[hello world].repeat(2) { |w| puts w }
- * # => Prints 'hello', 'hello', 'world', 'world'
- * enum = (1..14).repeat(3)
- * # => returns an Enumerator when called without a block
- * enum.first(4) # => [1, 1, 1, 2]
- * enum.size # => 42
*/
static VALUE
obj_to_enum(int argc, VALUE *argv, VALUE obj)
@@ -267,11 +244,10 @@ enumerator_allocate(VALUE klass)
}
static VALUE
-enumerator_init(VALUE enum_obj, VALUE obj, VALUE meth, int argc, VALUE *argv, rb_enumerator_size_func *size_fn, VALUE size)
+enumerator_init(VALUE enum_obj, VALUE obj, VALUE meth, int argc, VALUE *argv, VALUE (*size_fn)(ANYARGS), VALUE size)
{
struct enumerator *ptr;
- rb_check_frozen(enum_obj);
TypedData_Get_Struct(enum_obj, struct enumerator, &enumerator_data_type, ptr);
if (!ptr) {
@@ -315,9 +291,66 @@ enumerator_init(VALUE enum_obj, VALUE obj, VALUE meth, int argc, VALUE *argv, rb
* p fib.take(10) # => [1, 1, 2, 3, 5, 8, 13, 21, 34, 55]
*
* The optional parameter can be used to specify how to calculate the size
- * in a lazy fashion (see Enumerator#size). It can either be a value or
+ * in a lazy fashion (see Enumerable#size). It can either be a value or
* a callable object.
*
+ * The block form can be used to create a lazy enumeration that only processes
+ * elements as-needed. The generic pattern for this is:
+ *
+ * Enumerator.new do |yielder|
+ * source.each do |source_item|
+ * # process source_item and append the yielder
+ * end
+ * end
+ *
+ * This can be used with infinite streams to support multiple chains:
+ *
+ * class Fib
+ * def initialize(a = 1, b = 1)
+ * @a, @b = a, b
+ * end
+ *
+ * def each
+ * a, b = @a, @b
+ * yield a
+ * while true
+ * yield b
+ * a, b = b, a+b
+ * end
+ * end
+ * end
+ *
+ * def lazy_select enum
+ * Enumerator.new do |y|
+ * enum.each do |e|
+ * y << e if yield e
+ * end
+ * end
+ * end
+ *
+ * def lazy_map enum
+ * Enumerator.new do |y|
+ * enum.each do |e|
+ * y << yield(e)
+ * end
+ * end
+ * end
+ *
+ * even_fibs = lazy_select(Fibs.new) { |x| x % 2 == 0 }
+ * string_fibs = lazy_map(even_fibs) { |x| "<#{x}>" }
+ * string_fibs.each_with_index do |fib, i|
+ * puts "#{i}: #{fib}"
+ * break if i >= 3
+ * end
+ *
+ * This allows output even though the Fib produces an infinite sequence of
+ * Fibonacci numbers:
+ *
+ * 0: <2>
+ * 1: <8>
+ * 2: <34>
+ * 3: <144>
+ *
* In the second, deprecated, form, a generated Enumerator iterates over the
* given object using the given method with the given arguments passed.
*
@@ -340,11 +373,10 @@ enumerator_initialize(int argc, VALUE *argv, VALUE obj)
rb_check_arity(argc, 0, 1);
recv = generator_init(generator_allocate(rb_cGenerator), rb_block_proc());
if (argc) {
- if (NIL_P(argv[0]) || rb_respond_to(argv[0], id_call) ||
+ if (NIL_P(argv[0]) || rb_obj_is_proc(argv[0]) ||
(RB_TYPE_P(argv[0], T_FLOAT) && RFLOAT_VALUE(argv[0]) == INFINITY)) {
size = argv[0];
- }
- else {
+ } else {
size = rb_to_int(argv[0]);
}
argc = 0;
@@ -403,19 +435,10 @@ rb_enumeratorize(VALUE obj, VALUE meth, int argc, VALUE *argv)
return rb_enumeratorize_with_size(obj, meth, argc, argv, 0);
}
-static VALUE
-lazy_to_enum_i(VALUE self, VALUE meth, int argc, VALUE *argv, rb_enumerator_size_func *size_fn);
-
VALUE
-rb_enumeratorize_with_size(VALUE obj, VALUE meth, int argc, VALUE *argv, rb_enumerator_size_func *size_fn)
+rb_enumeratorize_with_size(VALUE obj, VALUE meth, int argc, VALUE *argv, VALUE (*size_fn)(ANYARGS))
{
- /* Similar effect as calling obj.to_enum, i.e. dispatching to either
- Kernel#to_enum vs Lazy#to_enum */
- if (RTEST(rb_obj_is_kind_of(obj, rb_cLazy)))
- return lazy_to_enum_i(obj, meth, argc, argv, size_fn);
- else
- return enumerator_init(enumerator_allocate(rb_cEnumerator),
- obj, meth, argc, argv, size_fn, Qnil);
+ return enumerator_init(enumerator_allocate(rb_cEnumerator), obj, meth, argc, argv, size_fn, Qnil);
}
static VALUE
@@ -435,38 +458,10 @@ enumerator_block_call(VALUE obj, rb_block_call_func *func, VALUE arg)
/*
* call-seq:
- * enum.each { |elm| block } -> obj
- * enum.each -> enum
- * enum.each(*appending_args) { |elm| block } -> obj
- * enum.each(*appending_args) -> an_enumerator
- *
- * Iterates over the block according to how this Enumerator was constructed.
- * If no block and no arguments are given, returns self.
- *
- * === Examples
- *
- * "Hello, world!".scan(/\w+/) #=> ["Hello", "world"]
- * "Hello, world!".to_enum(:scan, /\w+/).to_a #=> ["Hello", "world"]
- * "Hello, world!".to_enum(:scan).each(/\w+/).to_a #=> ["Hello", "world"]
- *
- * obj = Object.new
+ * enum.each {...}
*
- * def obj.each_arg(a, b=:b, *rest)
- * yield a
- * yield b
- * yield rest
- * :method_returned
- * end
- *
- * enum = obj.to_enum :each_arg, :a, :x
- *
- * enum.each.to_a #=> [:a, :x, []]
- * enum.each.equal?(enum) #=> true
- * enum.each { |elm| elm } #=> :method_returned
- *
- * enum.each(:y, :z).to_a #=> [:a, :x, [:y, :z]]
- * enum.each(:y, :z).equal?(enum) #=> false
- * enum.each(:y, :z) { |elm| elm } #=> :method_returned
+ * Iterates over the block according to how this Enumerable was constructed.
+ * If no block is given, returns self.
*
*/
static VALUE
@@ -476,10 +471,6 @@ enumerator_each(int argc, VALUE *argv, VALUE obj)
struct enumerator *e = enumerator_ptr(obj = rb_obj_dup(obj));
VALUE args = e->args;
if (args) {
-#if SIZEOF_INT < SIZEOF_LONG
- /* check int range overflow */
- rb_long2int(RARRAY_LEN(args) + argc);
-#endif
args = rb_ary_dup(args);
rb_ary_cat(args, argv, argc);
}
@@ -493,11 +484,13 @@ enumerator_each(int argc, VALUE *argv, VALUE obj)
}
static VALUE
-enumerator_with_index_i(RB_BLOCK_CALL_FUNC_ARGLIST(val, m))
+enumerator_with_index_i(VALUE val, VALUE m, int argc, VALUE *argv)
{
- NODE *memo = (NODE *)m;
- VALUE idx = memo->u1.value;
- memo->u1.value = rb_int_succ(idx);
+ VALUE idx;
+ VALUE *memo = (VALUE *)m;
+
+ idx = INT2FIX(*memo);
+ ++*memo;
if (argc <= 1)
return rb_yield_values(2, val, idx);
@@ -508,12 +501,6 @@ enumerator_with_index_i(RB_BLOCK_CALL_FUNC_ARGLIST(val, m))
static VALUE
enumerator_size(VALUE obj);
-static VALUE
-enumerator_enum_size(VALUE obj, VALUE args, VALUE eobj)
-{
- return enumerator_size(obj);
-}
-
/*
* call-seq:
* e.with_index(offset = 0) {|(*args), idx| ... }
@@ -532,12 +519,9 @@ enumerator_with_index(int argc, VALUE *argv, VALUE obj)
VALUE memo;
rb_scan_args(argc, argv, "01", &memo);
- RETURN_SIZED_ENUMERATOR(obj, argc, argv, enumerator_enum_size);
- if (NIL_P(memo))
- memo = INT2FIX(0);
- else
- memo = rb_to_int(memo);
- return enumerator_block_call(obj, enumerator_with_index_i, (VALUE)NEW_MEMO(memo, 0, 0));
+ RETURN_SIZED_ENUMERATOR(obj, argc, argv, enumerator_size);
+ memo = NIL_P(memo) ? 0 : (VALUE)NUM2LONG(memo);
+ return enumerator_block_call(obj, enumerator_with_index_i, (VALUE)&memo);
}
/*
@@ -557,7 +541,7 @@ enumerator_each_with_index(VALUE obj)
}
static VALUE
-enumerator_with_object_i(RB_BLOCK_CALL_FUNC_ARGLIST(val, memo))
+enumerator_with_object_i(VALUE val, VALUE memo, int argc, VALUE *argv)
{
if (argc <= 1)
return rb_yield_values(2, val, memo);
@@ -567,8 +551,6 @@ enumerator_with_object_i(RB_BLOCK_CALL_FUNC_ARGLIST(val, memo))
/*
* call-seq:
- * e.each_with_object(obj) {|(*args), obj| ... }
- * e.each_with_object(obj)
* e.with_object(obj) {|(*args), obj| ... }
* e.with_object(obj)
*
@@ -597,14 +579,14 @@ enumerator_with_object_i(RB_BLOCK_CALL_FUNC_ARGLIST(val, memo))
static VALUE
enumerator_with_object(VALUE obj, VALUE memo)
{
- RETURN_SIZED_ENUMERATOR(obj, 1, &memo, enumerator_enum_size);
+ RETURN_SIZED_ENUMERATOR(obj, 1, &memo, enumerator_size);
enumerator_block_call(obj, enumerator_with_object_i, memo);
return memo;
}
static VALUE
-next_ii(RB_BLOCK_CALL_FUNC_ARGLIST(i, obj))
+next_ii(VALUE i, VALUE obj, int argc, VALUE *argv)
{
struct enumerator *e = enumerator_ptr(obj);
VALUE feedvalue = Qnil;
@@ -737,7 +719,7 @@ ary2sv(VALUE args, int dup)
return Qnil;
case 1:
- return RARRAY_AREF(args, 0);
+ return RARRAY_PTR(args)[0];
default:
if (dup)
@@ -859,24 +841,6 @@ enumerator_peek(VALUE obj)
*
* This value is cleared after being yielded.
*
- * # Array#map passes the array's elements to "yield" and collects the
- * # results of "yield" as an array.
- * # Following example shows that "next" returns the passed elements and
- * # values passed to "feed" are collected as an array which can be
- * # obtained by StopIteration#result.
- * e = [1,2,3].map
- * p e.next #=> 1
- * e.feed "a"
- * p e.next #=> 2
- * e.feed "b"
- * p e.next #=> 3
- * e.feed "c"
- * begin
- * e.next
- * rescue StopIteration
- * p $!.result #=> ["a", "b", "c"]
- * end
- *
* o = Object.new
* def o.each
* x = yield # (2) blocks
@@ -932,24 +896,24 @@ enumerator_rewind(VALUE obj)
return obj;
}
-static VALUE append_method(VALUE obj, VALUE str, ID default_method, VALUE default_args);
-
static VALUE
inspect_enumerator(VALUE obj, VALUE dummy, int recur)
{
struct enumerator *e;
- VALUE eobj, str, cname;
+ const char *cname;
+ VALUE eobj, eargs, str, method;
+ int tainted, untrusted;
TypedData_Get_Struct(obj, struct enumerator, &enumerator_data_type, e);
- cname = rb_obj_class(obj);
+ cname = rb_obj_classname(obj);
if (!e || e->obj == Qundef) {
- return rb_sprintf("#<%"PRIsVALUE": uninitialized>", rb_class_path(cname));
+ return rb_sprintf("#<%s: uninitialized>", cname);
}
if (recur) {
- str = rb_sprintf("#<%"PRIsVALUE": ...>", rb_class_path(cname));
+ str = rb_sprintf("#<%s: ...>", cname);
OBJ_TAINT(str);
return str;
}
@@ -959,38 +923,30 @@ inspect_enumerator(VALUE obj, VALUE dummy, int recur)
eobj = e->obj;
}
- /* (1..100).each_cons(2) => "#<Enumerator: 1..100:each_cons(2)>" */
- str = rb_sprintf("#<%"PRIsVALUE": %+"PRIsVALUE, rb_class_path(cname), eobj);
- append_method(obj, str, e->meth, e->args);
-
- rb_str_buf_cat2(str, ">");
-
- return str;
-}
-
-static VALUE
-append_method(VALUE obj, VALUE str, ID default_method, VALUE default_args)
-{
- VALUE method, eargs;
+ tainted = OBJ_TAINTED(eobj);
+ untrusted = OBJ_UNTRUSTED(eobj);
+ /* (1..100).each_cons(2) => "#<Enumerator: 1..100:each_cons(2)>" */
+ str = rb_sprintf("#<%s: ", cname);
+ rb_str_concat(str, rb_inspect(eobj));
method = rb_attr_get(obj, id_method);
- if (method != Qfalse) {
- ID mid = default_method;
- if (!NIL_P(method)) {
- Check_Type(method, T_SYMBOL);
- mid = SYM2ID(method);
- }
+ if (NIL_P(method)) {
+ rb_str_buf_cat2(str, ":");
+ rb_str_buf_cat2(str, rb_id2name(e->meth));
+ }
+ else if (method != Qfalse) {
+ Check_Type(method, T_SYMBOL);
rb_str_buf_cat2(str, ":");
- rb_str_buf_append(str, rb_id2str(mid));
+ rb_str_buf_cat2(str, rb_id2name(SYM2ID(method)));
}
eargs = rb_attr_get(obj, id_arguments);
if (NIL_P(eargs)) {
- eargs = default_args;
+ eargs = e->args;
}
if (eargs != Qfalse) {
long argc = RARRAY_LEN(eargs);
- const VALUE *argv = RARRAY_CONST_PTR(eargs); /* WB: no new reference */
+ VALUE *argv = RARRAY_PTR(eargs);
if (argc > 0) {
rb_str_buf_cat2(str, "(");
@@ -998,13 +954,19 @@ append_method(VALUE obj, VALUE str, ID default_method, VALUE default_args)
while (argc--) {
VALUE arg = *argv++;
- rb_str_append(str, rb_inspect(arg));
+ rb_str_concat(str, rb_inspect(arg));
rb_str_buf_cat2(str, argc > 0 ? ", " : ")");
- OBJ_INFECT(str, arg);
+
+ if (OBJ_TAINTED(arg)) tainted = TRUE;
+ if (OBJ_UNTRUSTED(arg)) untrusted = TRUE;
}
}
}
+ rb_str_buf_cat2(str, ">");
+
+ if (tainted) OBJ_TAINT(str);
+ if (untrusted) OBJ_UNTRUST(str);
return str;
}
@@ -1036,19 +998,16 @@ static VALUE
enumerator_size(VALUE obj)
{
struct enumerator *e = enumerator_ptr(obj);
- int argc = 0;
- const VALUE *argv = NULL;
- VALUE size;
if (e->size_fn) {
- return (*e->size_fn)(e->obj, e->args, obj);
+ return (*e->size_fn)(e->obj, e->args);
}
- if (e->args) {
- argc = (int)RARRAY_LEN(e->args);
- argv = RARRAY_CONST_PTR(e->args);
+ if (rb_obj_is_proc(e->size)) {
+ if (e->args)
+ return rb_proc_call(e->size, e->args);
+ else
+ return rb_proc_call_with_block(e->size, 0, 0, Qnil);
}
- size = rb_check_funcall(e->size, id_call, argc, argv);
- if (size != Qundef) return size;
return e->size;
}
@@ -1077,7 +1036,6 @@ static const rb_data_type_t yielder_data_type = {
yielder_free,
yielder_memsize,
},
- NULL, NULL, RUBY_TYPED_FREE_IMMEDIATELY
};
static struct yielder *
@@ -1147,7 +1105,7 @@ static VALUE yielder_yield_push(VALUE obj, VALUE args)
}
static VALUE
-yielder_yield_i(RB_BLOCK_CALL_FUNC_ARGLIST(obj, memo))
+yielder_yield_i(VALUE obj, VALUE memo, int argc, VALUE *argv)
{
return rb_yield_values2(argc, argv);
}
@@ -1183,7 +1141,6 @@ static const rb_data_type_t generator_data_type = {
generator_free,
generator_memsize,
},
- NULL, NULL, RUBY_TYPED_FREE_IMMEDIATELY
};
static struct generator *
@@ -1216,7 +1173,6 @@ generator_init(VALUE obj, VALUE proc)
{
struct generator *ptr;
- rb_check_frozen(obj);
TypedData_Get_Struct(obj, struct generator, &generator_data_type, ptr);
if (!ptr) {
@@ -1293,32 +1249,24 @@ generator_each(int argc, VALUE *argv, VALUE obj)
/* Lazy Enumerator methods */
static VALUE
-enum_size(VALUE self)
+lazy_receiver_size(VALUE self)
{
- VALUE r = rb_check_funcall(self, id_size, 0, 0);
+ VALUE r = rb_check_funcall(rb_ivar_get(self, id_receiver), id_size, 0, 0);
return (r == Qundef) ? Qnil : r;
}
static VALUE
-lazyenum_size(VALUE self, VALUE args, VALUE eobj)
-{
- return enum_size(self);
-}
-
-static VALUE
lazy_size(VALUE self)
{
- return enum_size(rb_ivar_get(self, id_receiver));
-}
-
-static VALUE
-lazy_receiver_size(VALUE generator, VALUE args, VALUE lazy)
-{
- return lazy_size(lazy);
+ struct enumerator *e = enumerator_ptr(self);
+ if (e->size_fn) {
+ return (*e->size_fn)(self);
+ }
+ return Qnil;
}
static VALUE
-lazy_init_iterator(RB_BLOCK_CALL_FUNC_ARGLIST(val, m))
+lazy_init_iterator(VALUE val, VALUE m, int argc, VALUE *argv)
{
VALUE result;
if (argc == 1) {
@@ -1336,7 +1284,7 @@ lazy_init_iterator(RB_BLOCK_CALL_FUNC_ARGLIST(val, m))
if (argc > 0) {
rb_ary_cat(args, argv, argc);
}
- result = rb_yield_values2(len, RARRAY_CONST_PTR(args));
+ result = rb_yield_values2(len, RARRAY_PTR(args));
RB_GC_GUARD(args);
}
if (result == Qundef) rb_iter_break();
@@ -1344,64 +1292,61 @@ lazy_init_iterator(RB_BLOCK_CALL_FUNC_ARGLIST(val, m))
}
static VALUE
-lazy_init_block_i(RB_BLOCK_CALL_FUNC_ARGLIST(val, m))
+lazy_init_yielder(VALUE val, VALUE m, int argc, VALUE *argv)
+{
+ VALUE result;
+ result = rb_funcall2(m, id_yield, argc, argv);
+ if (result == Qundef) rb_iter_break();
+ return Qnil;
+}
+
+static VALUE
+lazy_init_block_i(VALUE val, VALUE m, int argc, VALUE *argv)
{
rb_block_call(m, id_each, argc-1, argv+1, lazy_init_iterator, val);
return Qnil;
}
-/*
- * call-seq:
- * Lazy.new(obj, size=nil) { |yielder, *values| ... }
- *
- * Creates a new Lazy enumerator. When the enumerator is actually enumerated
- * (e.g. by calling #force), +obj+ will be enumerated and each value passed
- * to the given block. The block can yield values back using +yielder+.
- * For example, to create a method +filter_map+ in both lazy and
- * non-lazy fashions:
- *
- * module Enumerable
- * def filter_map(&block)
- * map(&block).compact
- * end
- * end
- *
- * class Enumerator::Lazy
- * def filter_map
- * Lazy.new(self) do |yielder, *values|
- * result = yield *values
- * yielder << result if result
- * end
- * end
- * end
- *
- * (1..Float::INFINITY).lazy.filter_map{|i| i*i if i.even?}.first(5)
- * # => [4, 16, 36, 64, 100]
- */
+static VALUE
+lazy_init_block(VALUE val, VALUE m, int argc, VALUE *argv)
+{
+ rb_block_call(m, id_each, argc-1, argv+1, lazy_init_yielder, val);
+ return Qnil;
+}
+
static VALUE
lazy_initialize(int argc, VALUE *argv, VALUE self)
{
- VALUE obj, size = Qnil;
+ VALUE obj, meth;
VALUE generator;
+ int offset;
- rb_check_arity(argc, 1, 2);
- if (!rb_block_given_p()) {
- rb_raise(rb_eArgError, "tried to call lazy new without a block");
+ if (argc < 1) {
+ rb_raise(rb_eArgError, "wrong number of arguments (%d for 1..)", argc);
}
- obj = argv[0];
- if (argc > 1) {
- size = argv[1];
+ else {
+ obj = argv[0];
+ if (argc == 1) {
+ meth = sym_each;
+ offset = 1;
+ }
+ else {
+ meth = argv[1];
+ offset = 2;
+ }
}
generator = generator_allocate(rb_cGenerator);
- rb_block_call(generator, id_initialize, 0, 0, lazy_init_block_i, obj);
- enumerator_init(self, generator, sym_each, 0, 0, 0, size);
+ rb_block_call(generator, id_initialize, 0, 0,
+ (rb_block_given_p() ? lazy_init_block_i : lazy_init_block),
+ obj);
+ enumerator_init(self, generator, meth, argc - offset, argv + offset, lazy_receiver_size, Qnil);
rb_ivar_set(self, id_receiver, obj);
return self;
}
static VALUE
-lazy_set_method(VALUE lazy, VALUE args, rb_enumerator_size_func *size_fn)
+lazy_set_method(VALUE lazy, VALUE args, VALUE (*size_fn)(ANYARGS))
{
ID id = rb_frame_this_func();
struct enumerator *e = enumerator_ptr(lazy);
@@ -1423,8 +1368,8 @@ lazy_set_method(VALUE lazy, VALUE args, rb_enumerator_size_func *size_fn)
*
* Returns a lazy enumerator, whose methods map/collect,
* flat_map/collect_concat, select/find_all, reject, grep, zip, take,
- * take_while, drop, and drop_while enumerate values only on an
- * as-needed basis. However, if a block is given to zip, values
+ * take_while, drop, drop_while, and cycle enumerate values only on an
+ * as-needed basis. However, if a block is given to zip or cycle, values
* are enumerated immediately.
*
* === Example
@@ -1451,60 +1396,16 @@ lazy_set_method(VALUE lazy, VALUE args, rb_enumerator_size_func *size_fn)
static VALUE
enumerable_lazy(VALUE obj)
{
- VALUE result = lazy_to_enum_i(obj, sym_each, 0, 0, lazyenum_size);
+ VALUE result;
+
+ result = rb_class_new_instance(1, &obj, rb_cLazy);
/* Qfalse indicates that the Enumerator::Lazy has no method name */
rb_ivar_set(result, id_method, Qfalse);
return result;
}
static VALUE
-lazy_to_enum_i(VALUE obj, VALUE meth, int argc, VALUE *argv, rb_enumerator_size_func *size_fn)
-{
- return enumerator_init(enumerator_allocate(rb_cLazy),
- obj, meth, argc, argv, size_fn, Qnil);
-}
-
-/*
- * call-seq:
- * lzy.to_enum(method = :each, *args) -> lazy_enum
- * lzy.enum_for(method = :each, *args) -> lazy_enum
- * lzy.to_enum(method = :each, *args) {|*args| block} -> lazy_enum
- * lzy.enum_for(method = :each, *args){|*args| block} -> lazy_enum
- *
- * Similar to Kernel#to_enum, except it returns a lazy enumerator.
- * This makes it easy to define Enumerable methods that will
- * naturally remain lazy if called from a lazy enumerator.
- *
- * For example, continuing from the example in Kernel#to_enum:
- *
- * # See Kernel#to_enum for the definition of repeat
- * r = 1..Float::INFINITY
- * r.repeat(2).first(5) # => [1, 1, 2, 2, 3]
- * r.repeat(2).class # => Enumerator
- * r.repeat(2).map{|n| n ** 2}.first(5) # => endless loop!
- * # works naturally on lazy enumerator:
- * r.lazy.repeat(2).class # => Enumerator::Lazy
- * r.lazy.repeat(2).map{|n| n ** 2}.first(5) # => [1, 1, 4, 4, 9]
- */
-
-static VALUE
-lazy_to_enum(int argc, VALUE *argv, VALUE self)
-{
- VALUE lazy, meth = sym_each;
-
- if (argc > 0) {
- --argc;
- meth = *argv++;
- }
- lazy = lazy_to_enum_i(self, meth, argc, argv, 0);
- if (rb_block_given_p()) {
- enumerator_ptr(lazy)->size = rb_block_proc();
- }
- return lazy;
-}
-
-static VALUE
-lazy_map_func(RB_BLOCK_CALL_FUNC_ARGLIST(val, m))
+lazy_map_func(VALUE val, VALUE m, int argc, VALUE *argv)
{
VALUE result = rb_yield_values2(argc - 1, &argv[1]);
@@ -1525,78 +1426,57 @@ lazy_map(VALUE obj)
}
static VALUE
-lazy_flat_map_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, yielder))
+lazy_flat_map_i(VALUE i, VALUE yielder, int argc, VALUE *argv)
{
return rb_funcall2(yielder, id_yield, argc, argv);
}
static VALUE
-lazy_flat_map_each(VALUE obj, VALUE yielder)
+lazy_flat_map_each(VALUE obj)
{
- rb_block_call(obj, id_each, 0, 0, lazy_flat_map_i, yielder);
+ NODE *memo = RNODE(obj);
+ rb_block_call(memo->u1.value, id_each, 0, 0, lazy_flat_map_i,
+ memo->u2.value);
return Qnil;
}
static VALUE
-lazy_flat_map_to_ary(VALUE obj, VALUE yielder)
+lazy_flat_map_to_ary(VALUE obj)
{
- VALUE ary = rb_check_array_type(obj);
+ NODE *memo = RNODE(obj);
+ VALUE ary = rb_check_array_type(memo->u1.value);
if (NIL_P(ary)) {
- rb_funcall(yielder, id_yield, 1, obj);
+ rb_funcall(memo->u2.value, id_yield, 1, memo->u1.value);
}
else {
long i;
for (i = 0; i < RARRAY_LEN(ary); i++) {
- rb_funcall(yielder, id_yield, 1, RARRAY_AREF(ary, i));
+ rb_funcall(memo->u2.value, id_yield, 1, RARRAY_PTR(ary)[i]);
}
}
return Qnil;
}
static VALUE
-lazy_flat_map_func(RB_BLOCK_CALL_FUNC_ARGLIST(val, m))
+lazy_flat_map_func(VALUE val, VALUE m, int argc, VALUE *argv)
{
VALUE result = rb_yield_values2(argc - 1, &argv[1]);
if (RB_TYPE_P(result, T_ARRAY)) {
long i;
for (i = 0; i < RARRAY_LEN(result); i++) {
- rb_funcall(argv[0], id_yield, 1, RARRAY_AREF(result, i));
+ rb_funcall(argv[0], id_yield, 1, RARRAY_PTR(result)[i]);
}
}
else {
- if (rb_respond_to(result, id_force) && rb_respond_to(result, id_each)) {
- lazy_flat_map_each(result, argv[0]);
- }
- else {
- lazy_flat_map_to_ary(result, argv[0]);
- }
+ NODE *memo;
+ memo = NEW_MEMO(result, argv[0], 0);
+ rb_rescue2(lazy_flat_map_each, (VALUE) memo,
+ lazy_flat_map_to_ary, (VALUE) memo,
+ rb_eNoMethodError, (VALUE)0);
}
return Qnil;
}
-/*
- * call-seq:
- * lazy.collect_concat { |obj| block } -> a_lazy_enumerator
- * lazy.flat_map { |obj| block } -> a_lazy_enumerator
- *
- * Returns a new lazy enumerator with the concatenated results of running
- * <i>block</i> once for every element in <i>lazy</i>.
- *
- * ["foo", "bar"].lazy.flat_map {|i| i.each_char.lazy}.force
- * #=> ["f", "o", "o", "b", "a", "r"]
- *
- * A value <i>x</i> returned by <i>block</i> is decomposed if either of
- * the following conditions is true:
- *
- * a) <i>x</i> responds to both each and force, which means that
- * <i>x</i> is a lazy enumerator.
- * b) <i>x</i> is an array or responds to to_ary.
- *
- * Otherwise, <i>x</i> is contained as-is in the return value.
- *
- * [{a:1}, {b:2}].lazy.flat_map {|i| i}.force
- * #=> [{:a=>1}, {:b=>2}]
- */
static VALUE
lazy_flat_map(VALUE obj)
{
@@ -1606,11 +1486,11 @@ lazy_flat_map(VALUE obj)
return lazy_set_method(rb_block_call(rb_cLazy, id_new, 1, &obj,
lazy_flat_map_func, 0),
- Qnil, 0);
+ Qnil, lazy_receiver_size);
}
static VALUE
-lazy_select_func(RB_BLOCK_CALL_FUNC_ARGLIST(val, m))
+lazy_select_func(VALUE val, VALUE m, int argc, VALUE *argv)
{
VALUE element = rb_enum_values_pack(argc - 1, argv + 1);
@@ -1633,7 +1513,7 @@ lazy_select(VALUE obj)
}
static VALUE
-lazy_reject_func(RB_BLOCK_CALL_FUNC_ARGLIST(val, m))
+lazy_reject_func(VALUE val, VALUE m, int argc, VALUE *argv)
{
VALUE element = rb_enum_values_pack(argc - 1, argv + 1);
@@ -1656,7 +1536,7 @@ lazy_reject(VALUE obj)
}
static VALUE
-lazy_grep_func(RB_BLOCK_CALL_FUNC_ARGLIST(val, m))
+lazy_grep_func(VALUE val, VALUE m, int argc, VALUE *argv)
{
VALUE i = rb_enum_values_pack(argc - 1, argv + 1);
VALUE result = rb_funcall(m, id_eqq, 1, i);
@@ -1668,7 +1548,7 @@ lazy_grep_func(RB_BLOCK_CALL_FUNC_ARGLIST(val, m))
}
static VALUE
-lazy_grep_iter(RB_BLOCK_CALL_FUNC_ARGLIST(val, m))
+lazy_grep_iter(VALUE val, VALUE m, int argc, VALUE *argv)
{
VALUE i = rb_enum_values_pack(argc - 1, argv + 1);
VALUE result = rb_funcall(m, id_eqq, 1, i);
@@ -1702,50 +1582,16 @@ next_stopped(VALUE obj)
}
static VALUE
-lazy_zip_arrays_func(RB_BLOCK_CALL_FUNC_ARGLIST(val, arrays))
+lazy_zip_func(VALUE val, VALUE arg, int argc, VALUE *argv)
{
- VALUE yielder, ary, memo;
- long i, count;
-
- yielder = argv[0];
- memo = rb_attr_get(yielder, id_memo);
- count = NIL_P(memo) ? 0 : NUM2LONG(memo);
-
- ary = rb_ary_new2(RARRAY_LEN(arrays) + 1);
- rb_ary_push(ary, argv[1]);
- for (i = 0; i < RARRAY_LEN(arrays); i++) {
- rb_ary_push(ary, rb_ary_entry(RARRAY_AREF(arrays, i), count));
- }
- rb_funcall(yielder, id_yield, 1, ary);
- rb_ivar_set(yielder, id_memo, LONG2NUM(++count));
- return Qnil;
-}
-
-static VALUE
-lazy_zip_func(RB_BLOCK_CALL_FUNC_ARGLIST(val, zip_args))
-{
- VALUE yielder, ary, arg, v;
+ VALUE yielder, ary, v;
long i;
yielder = argv[0];
- arg = rb_attr_get(yielder, id_memo);
- if (NIL_P(arg)) {
- arg = rb_ary_new2(RARRAY_LEN(zip_args));
- for (i = 0; i < RARRAY_LEN(zip_args); i++) {
- rb_ary_push(arg, rb_funcall(RARRAY_AREF(zip_args, i), id_to_enum, 0));
- }
- rb_ivar_set(yielder, id_memo, arg);
- }
-
ary = rb_ary_new2(RARRAY_LEN(arg) + 1);
- v = Qnil;
- if (--argc > 0) {
- ++argv;
- v = argc > 1 ? rb_ary_new_from_values(argc, argv) : *argv;
- }
- rb_ary_push(ary, v);
+ rb_ary_push(ary, argv[1]);
for (i = 0; i < RARRAY_LEN(arg); i++) {
- v = rb_rescue2(call_next, RARRAY_AREF(arg, i), next_stopped, 0,
+ v = rb_rescue2(call_next, RARRAY_PTR(arg)[i], next_stopped, 0,
rb_eStopIteration, (VALUE)0);
rb_ary_push(ary, v);
}
@@ -1756,60 +1602,42 @@ lazy_zip_func(RB_BLOCK_CALL_FUNC_ARGLIST(val, zip_args))
static VALUE
lazy_zip(int argc, VALUE *argv, VALUE obj)
{
- VALUE ary, v;
- long i;
- rb_block_call_func *func = lazy_zip_arrays_func;
+ VALUE ary;
+ int i;
if (rb_block_given_p()) {
return rb_call_super(argc, argv);
}
-
ary = rb_ary_new2(argc);
for (i = 0; i < argc; i++) {
- v = rb_check_array_type(argv[i]);
- if (NIL_P(v)) {
- for (; i < argc; i++) {
- if (!rb_respond_to(argv[i], id_each)) {
- rb_raise(rb_eTypeError, "wrong argument type %s (must respond to :each)",
- rb_obj_classname(argv[i]));
- }
- }
- ary = rb_ary_new4(argc, argv);
- func = lazy_zip_func;
- break;
- }
- rb_ary_push(ary, v);
+ rb_ary_push(ary, rb_funcall(argv[i], id_lazy, 0));
}
return lazy_set_method(rb_block_call(rb_cLazy, id_new, 1, &obj,
- func, ary),
- ary, lazy_receiver_size);
+ lazy_zip_func, ary),
+ rb_ary_new4(argc, argv), lazy_receiver_size);
}
static VALUE
-lazy_take_func(RB_BLOCK_CALL_FUNC_ARGLIST(val, args))
+lazy_take_func(VALUE val, VALUE args, int argc, VALUE *argv)
{
- long remain;
- VALUE memo = rb_attr_get(argv[0], id_memo);
- if (NIL_P(memo)) {
- memo = args;
- }
+ NODE *memo = RNODE(args);
rb_funcall2(argv[0], id_yield, argc - 1, argv + 1);
- if ((remain = NUM2LONG(memo)-1) == 0) {
+ if (--memo->u3.cnt == 0) {
+ memo->u3.cnt = memo->u2.argc;
return Qundef;
}
else {
- rb_ivar_set(argv[0], id_memo, LONG2NUM(remain));
return Qnil;
}
}
static VALUE
-lazy_take_size(VALUE generator, VALUE args, VALUE lazy)
+lazy_take_size(VALUE lazy)
{
- VALUE receiver = lazy_size(lazy);
- long len = NUM2LONG(RARRAY_AREF(rb_ivar_get(lazy, id_arguments), 0));
+ long len = NUM2LONG(RARRAY_PTR(rb_ivar_get(lazy, id_arguments))[0]);
+ VALUE receiver = lazy_receiver_size(lazy);
if (NIL_P(receiver) || (FIXNUM_P(receiver) && FIX2LONG(receiver) < len))
return receiver;
return LONG2NUM(len);
@@ -1818,25 +1646,28 @@ lazy_take_size(VALUE generator, VALUE args, VALUE lazy)
static VALUE
lazy_take(VALUE obj, VALUE n)
{
+ NODE *memo;
long len = NUM2LONG(n);
- VALUE lazy;
+ int argc = 1;
+ VALUE argv[3];
if (len < 0) {
rb_raise(rb_eArgError, "attempt to take negative size");
}
+ argv[0] = obj;
if (len == 0) {
- VALUE len = INT2FIX(0);
- lazy = lazy_to_enum_i(obj, sym_cycle, 1, &len, 0);
- }
- else {
- lazy = rb_block_call(rb_cLazy, id_new, 1, &obj,
- lazy_take_func, n);
+ argv[1] = sym_cycle;
+ argv[2] = INT2NUM(0);
+ argc = 3;
}
- return lazy_set_method(lazy, rb_ary_new3(1, n), lazy_take_size);
+ memo = NEW_MEMO(0, len, len);
+ return lazy_set_method(rb_block_call(rb_cLazy, id_new, argc, argv,
+ lazy_take_func, (VALUE) memo),
+ rb_ary_new3(1, n), lazy_take_size);
}
static VALUE
-lazy_take_while_func(RB_BLOCK_CALL_FUNC_ARGLIST(val, args))
+lazy_take_while_func(VALUE val, VALUE args, int argc, VALUE *argv)
{
VALUE result = rb_yield_values2(argc - 1, &argv[1]);
if (!RTEST(result)) return Qundef;
@@ -1847,19 +1678,16 @@ lazy_take_while_func(RB_BLOCK_CALL_FUNC_ARGLIST(val, args))
static VALUE
lazy_take_while(VALUE obj)
{
- if (!rb_block_given_p()) {
- rb_raise(rb_eArgError, "tried to call lazy take_while without a block");
- }
return lazy_set_method(rb_block_call(rb_cLazy, id_new, 1, &obj,
lazy_take_while_func, 0),
Qnil, 0);
}
static VALUE
-lazy_drop_size(VALUE generator, VALUE args, VALUE lazy)
+lazy_drop_size(VALUE lazy)
{
- long len = NUM2LONG(RARRAY_AREF(rb_ivar_get(lazy, id_arguments), 0));
- VALUE receiver = lazy_size(lazy);
+ long len = NUM2LONG(RARRAY_PTR(rb_ivar_get(lazy, id_arguments))[0]);
+ VALUE receiver = lazy_receiver_size(lazy);
if (NIL_P(receiver))
return receiver;
if (FIXNUM_P(receiver)) {
@@ -1870,18 +1698,15 @@ lazy_drop_size(VALUE generator, VALUE args, VALUE lazy)
}
static VALUE
-lazy_drop_func(RB_BLOCK_CALL_FUNC_ARGLIST(val, args))
+lazy_drop_func(VALUE val, VALUE args, int argc, VALUE *argv)
{
- long remain;
- VALUE memo = rb_attr_get(argv[0], id_memo);
- if (NIL_P(memo)) {
- memo = args;
- }
- if ((remain = NUM2LONG(memo)) == 0) {
+ NODE *memo = RNODE(args);
+
+ if (memo->u3.cnt == 0) {
rb_funcall2(argv[0], id_yield, argc - 1, argv + 1);
}
else {
- rb_ivar_set(argv[0], id_memo, LONG2NUM(--remain));
+ memo->u3.cnt--;
}
return Qnil;
}
@@ -1889,24 +1714,27 @@ lazy_drop_func(RB_BLOCK_CALL_FUNC_ARGLIST(val, args))
static VALUE
lazy_drop(VALUE obj, VALUE n)
{
+ NODE *memo;
long len = NUM2LONG(n);
if (len < 0) {
rb_raise(rb_eArgError, "attempt to drop negative size");
}
+ memo = NEW_MEMO(0, 0, len);
return lazy_set_method(rb_block_call(rb_cLazy, id_new, 1, &obj,
- lazy_drop_func, n),
+ lazy_drop_func, (VALUE) memo),
rb_ary_new3(1, n), lazy_drop_size);
}
static VALUE
-lazy_drop_while_func(RB_BLOCK_CALL_FUNC_ARGLIST(val, args))
+lazy_drop_while_func(VALUE val, VALUE args, int argc, VALUE *argv)
{
- VALUE memo = rb_attr_get(argv[0], id_memo);
- if (NIL_P(memo) && !RTEST(rb_yield_values2(argc - 1, &argv[1]))) {
- rb_ivar_set(argv[0], id_memo, memo = Qtrue);
+ NODE *memo = RNODE(args);
+
+ if (!memo->u3.state && !RTEST(rb_yield_values2(argc - 1, &argv[1]))) {
+ memo->u3.state = TRUE;
}
- if (memo == Qtrue) {
+ if (memo->u3.state) {
rb_funcall2(argv[0], id_yield, argc - 1, argv + 1);
}
return Qnil;
@@ -1915,18 +1743,45 @@ lazy_drop_while_func(RB_BLOCK_CALL_FUNC_ARGLIST(val, args))
static VALUE
lazy_drop_while(VALUE obj)
{
- if (!rb_block_given_p()) {
- rb_raise(rb_eArgError, "tried to call lazy drop_while without a block");
- }
+ NODE *memo;
+
+ memo = NEW_MEMO(0, 0, FALSE);
return lazy_set_method(rb_block_call(rb_cLazy, id_new, 1, &obj,
- lazy_drop_while_func, 0),
+ lazy_drop_while_func, (VALUE) memo),
Qnil, 0);
}
static VALUE
-lazy_super(int argc, VALUE *argv, VALUE lazy)
+lazy_cycle_size(VALUE lazy)
+{
+ return rb_enum_cycle_size(rb_ivar_get(lazy, id_receiver), rb_ivar_get(lazy, id_arguments));
+}
+
+static VALUE
+lazy_cycle_func(VALUE val, VALUE m, int argc, VALUE *argv)
{
- return enumerable_lazy(rb_call_super(argc, argv));
+ return rb_funcall2(argv[0], id_yield, argc - 1, argv + 1);
+}
+
+static VALUE
+lazy_cycle(int argc, VALUE *argv, VALUE obj)
+{
+ VALUE args;
+ int len = rb_long2int((long)argc + 2);
+
+ if (rb_block_given_p()) {
+ return rb_call_super(argc, argv);
+ }
+ args = rb_ary_tmp_new(len);
+ rb_ary_push(args, obj);
+ rb_ary_push(args, sym_cycle);
+ if (argc > 0) {
+ rb_ary_cat(args, argv, argc);
+ }
+ return lazy_set_method(rb_block_call(rb_cLazy, id_new, len,
+ RARRAY_PTR(args), lazy_cycle_func,
+ args /* prevent from GC */),
+ rb_ary_new4(argc, argv), lazy_cycle_size);
}
static VALUE
@@ -2018,13 +1873,12 @@ InitVM_Enumerator(void)
rb_cLazy = rb_define_class_under(rb_cEnumerator, "Lazy", rb_cEnumerator);
rb_define_method(rb_mEnumerable, "lazy", enumerable_lazy, 0);
rb_define_method(rb_cLazy, "initialize", lazy_initialize, -1);
- rb_define_method(rb_cLazy, "to_enum", lazy_to_enum, -1);
- rb_define_method(rb_cLazy, "enum_for", lazy_to_enum, -1);
rb_define_method(rb_cLazy, "map", lazy_map, 0);
rb_define_method(rb_cLazy, "collect", lazy_map, 0);
rb_define_method(rb_cLazy, "flat_map", lazy_flat_map, 0);
rb_define_method(rb_cLazy, "collect_concat", lazy_flat_map, 0);
rb_define_method(rb_cLazy, "select", lazy_select, 0);
+ rb_define_method(rb_cLazy, "size", lazy_size, 0);
rb_define_method(rb_cLazy, "find_all", lazy_select, 0);
rb_define_method(rb_cLazy, "reject", lazy_reject, 0);
rb_define_method(rb_cLazy, "grep", lazy_grep, 1);
@@ -2033,9 +1887,8 @@ InitVM_Enumerator(void)
rb_define_method(rb_cLazy, "take_while", lazy_take_while, 0);
rb_define_method(rb_cLazy, "drop", lazy_drop, 1);
rb_define_method(rb_cLazy, "drop_while", lazy_drop_while, 0);
+ rb_define_method(rb_cLazy, "cycle", lazy_cycle, -1);
rb_define_method(rb_cLazy, "lazy", lazy_lazy, 0);
- rb_define_method(rb_cLazy, "chunk", lazy_super, -1);
- rb_define_method(rb_cLazy, "slice_before", lazy_super, -1);
rb_define_alias(rb_cLazy, "force", "to_a");
@@ -2076,10 +1929,7 @@ Init_Enumerator(void)
id_eqq = rb_intern("===");
id_receiver = rb_intern("receiver");
id_arguments = rb_intern("arguments");
- id_memo = rb_intern("memo");
id_method = rb_intern("method");
- id_force = rb_intern("force");
- id_to_enum = rb_intern("to_enum");
sym_each = ID2SYM(id_each);
sym_cycle = ID2SYM(rb_intern("cycle"));
diff --git a/error.c b/error.c
index b9d8d52809..da24505eb0 100644
--- a/error.c
+++ b/error.c
@@ -25,6 +25,8 @@
#include <unistd.h>
#endif
+#define numberof(array) (int)(sizeof(array) / sizeof((array)[0]))
+
#ifndef EXIT_SUCCESS
#define EXIT_SUCCESS 0
#endif
@@ -37,10 +39,6 @@
#define WEXITSTATUS(status) (status)
#endif
-VALUE rb_eEAGAIN;
-VALUE rb_eEWOULDBLOCK;
-VALUE rb_eEINPROGRESS;
-
extern const char ruby_description[];
#define REPORTBUG_MSG \
@@ -264,29 +262,6 @@ rb_warn_m(int argc, VALUE *argv, VALUE exc)
return Qnil;
}
-#define MAX_BUG_REPORTERS 0x100
-
-static struct bug_reporters {
- void (*func)(FILE *out, void *data);
- void *data;
-} bug_reporters[MAX_BUG_REPORTERS];
-
-static int bug_reporters_size;
-
-int
-rb_bug_reporter_add(void (*func)(FILE *, void *), void *data)
-{
- struct bug_reporters *reporter;
- if (bug_reporters_size >= MAX_BUG_REPORTERS) {
- return 0; /* failed to register */
- }
- reporter = &bug_reporters[bug_reporters_size++];
- reporter->func = func;
- reporter->data = data;
-
- return 1;
-}
-
static void
report_bug(const char *file, int line, const char *fmt, va_list args)
{
@@ -304,16 +279,9 @@ report_bug(const char *file, int line, const char *fmt, va_list args)
snprintf(buf, 256, "\n%s\n\n", ruby_description);
fputs(buf, out);
+
rb_vm_bugreport();
- /* call additional bug reporters */
- {
- int i;
- for (i=0; i<bug_reporters_size; i++) {
- struct bug_reporters *reporter = &bug_reporters[i];
- (*reporter->func)(out, reporter->data);
- }
- }
fprintf(out, REPORTBUG_MSG);
}
}
@@ -562,7 +530,7 @@ VALUE rb_eSystemCallError;
VALUE rb_mErrno;
static VALUE rb_eNOERROR;
-#undef rb_exc_new_cstr
+#undef rb_exc_new2
VALUE
rb_exc_new(VALUE etype, const char *ptr, long len)
@@ -571,13 +539,13 @@ rb_exc_new(VALUE etype, const char *ptr, long len)
}
VALUE
-rb_exc_new_cstr(VALUE etype, const char *s)
+rb_exc_new2(VALUE etype, const char *s)
{
return rb_exc_new(etype, s, strlen(s));
}
VALUE
-rb_exc_new_str(VALUE etype, VALUE str)
+rb_exc_new3(VALUE etype, VALUE str)
{
StringValue(str);
return rb_funcall(etype, rb_intern("new"), 1, str);
@@ -641,9 +609,11 @@ static VALUE
exc_to_s(VALUE exc)
{
VALUE mesg = rb_attr_get(exc, rb_intern("mesg"));
+ VALUE r = Qnil;
if (NIL_P(mesg)) return rb_class_name(CLASS_OF(exc));
- return rb_String(mesg);
+ r = rb_String(mesg);
+ return r;
}
/*
@@ -736,30 +706,6 @@ exc_backtrace(VALUE exc)
return obj;
}
-/*
- * call-seq:
- * exception.backtrace_locations -> array
- *
- * Returns any backtrace associated with the exception. This method is
- * similar to Exception#backtrace, but the backtrace is an array of
- * Thread::Backtrace::Location.
- *
- * Now, this method is not affected by Exception#set_backtrace().
- */
-static VALUE
-exc_backtrace_locations(VALUE exc)
-{
- ID bt_locations;
- VALUE obj;
-
- CONST_ID(bt_locations, "bt_locations");
- obj = rb_attr_get(exc, bt_locations);
- if (!NIL_P(obj)) {
- obj = rb_backtrace_to_location_ary(obj);
- }
- return obj;
-}
-
VALUE
rb_check_backtrace(VALUE bt)
{
@@ -773,8 +719,7 @@ rb_check_backtrace(VALUE bt)
rb_raise(rb_eTypeError, err);
}
for (i=0;i<RARRAY_LEN(bt);i++) {
- VALUE e = RARRAY_AREF(bt, i);
- if (!RB_TYPE_P(e, T_STRING)) {
+ if (!RB_TYPE_P(RARRAY_PTR(bt)[i], T_STRING)) {
rb_raise(rb_eTypeError, err);
}
}
@@ -804,14 +749,6 @@ rb_exc_set_backtrace(VALUE exc, VALUE bt)
return exc_set_backtrace(exc, bt);
}
-VALUE
-exc_cause(VALUE exc)
-{
- ID id_cause;
- CONST_ID(id_cause, "cause");
- return rb_attr_get(exc, id_cause);
-}
-
static VALUE
try_convert_to_exception(VALUE obj)
{
@@ -1023,6 +960,24 @@ name_err_name(VALUE self)
/*
* call-seq:
+ * name_error.to_s -> string
+ *
+ * Produce a nicely-formatted string representing the +NameError+.
+ */
+
+static VALUE
+name_err_to_s(VALUE exc)
+{
+ VALUE mesg = rb_attr_get(exc, rb_intern("mesg"));
+ VALUE str = mesg;
+
+ if (NIL_P(mesg)) return rb_class_name(CLASS_OF(exc));
+ StringValue(str);
+ return str;
+}
+
+/*
+ * call-seq:
* NoMethodError.new(msg, name [, args]) -> no_method_error
*
* Construct a NoMethodError exception for a method of the given name
@@ -1065,7 +1020,6 @@ static const rb_data_type_t name_err_mesg_data_type = {
name_err_mesg_free,
name_err_mesg_memsize,
},
- NULL, NULL, RUBY_TYPED_FREE_IMMEDIATELY
};
/* :nodoc: */
@@ -1229,24 +1183,6 @@ set_syserr(int n, const char *name)
if (!st_lookup(syserr_tbl, n, &error)) {
error = rb_define_class_under(rb_mErrno, name, rb_eSystemCallError);
-
- /* capture nonblock errnos for WaitReadable/WaitWritable subclasses */
- switch (n) {
- case EAGAIN:
- rb_eEAGAIN = error;
-
-#if EAGAIN != EWOULDBLOCK
- break;
- case EWOULDBLOCK:
-#endif
-
- rb_eEWOULDBLOCK = error;
- break;
- case EINPROGRESS:
- rb_eEINPROGRESS = error;
- break;
- }
-
rb_define_const(error, "Errno", INT2NUM(n));
st_add_direct(syserr_tbl, n, error);
}
@@ -1288,12 +1224,12 @@ syserr_initialize(int argc, VALUE *argv, VALUE self)
char *strerror();
#endif
const char *err;
- VALUE mesg, error, func;
+ VALUE mesg, error;
VALUE klass = rb_obj_class(self);
if (klass == rb_eSystemCallError) {
st_data_t data = (st_data_t)klass;
- rb_scan_args(argc, argv, "12", &mesg, &error, &func);
+ rb_scan_args(argc, argv, "11", &mesg, &error);
if (argc == 1 && FIXNUM_P(mesg)) {
error = mesg; mesg = Qnil;
}
@@ -1303,11 +1239,11 @@ syserr_initialize(int argc, VALUE *argv, VALUE self)
if (!RB_TYPE_P(self, T_OBJECT)) { /* insurance to avoid type crash */
rb_raise(rb_eTypeError, "invalid instance type");
}
- RBASIC_SET_CLASS(self, klass);
+ RBASIC(self)->klass = klass;
}
}
else {
- rb_scan_args(argc, argv, "02", &mesg, &func);
+ rb_scan_args(argc, argv, "01", &mesg);
error = rb_const_get(klass, rb_intern("Errno"));
}
if (!NIL_P(error)) err = strerror(NUM2INT(error));
@@ -1317,10 +1253,7 @@ syserr_initialize(int argc, VALUE *argv, VALUE self)
VALUE str = StringValue(mesg);
rb_encoding *me = rb_enc_get(mesg);
- if (NIL_P(func))
- mesg = rb_sprintf("%s - %"PRIsVALUE, err, mesg);
- else
- mesg = rb_sprintf("%s @ %"PRIsVALUE" - %"PRIsVALUE, err, func, mesg);
+ mesg = rb_sprintf("%s - %"PRIsVALUE, err, mesg);
if (le != me && rb_enc_asciicompat(me)) {
le = me;
}/* else assume err is non ASCII string. */
@@ -1416,7 +1349,6 @@ syserr_eqq(VALUE self, VALUE exc)
*
* begin
* Process.kill('HUP',Process.pid)
- * sleep # wait for receiver to handle signal sent by Process.kill
* rescue SignalException => e
* puts "received Exception #{e}"
* end
@@ -1458,7 +1390,7 @@ syserr_eqq(VALUE self, VALUE exc)
*
* <em>raises the exception:</em>
*
- * TypeError: no implicit conversion of String into Integer
+ * TypeError: can't convert String into Integer
*
*/
@@ -1631,14 +1563,14 @@ syserr_eqq(VALUE self, VALUE exc)
*
* foo = "bar"
* proc = Proc.new do
- * $SAFE = 3
- * foo.untaint
+ * $SAFE = 4
+ * foo.gsub! "a", "*"
* end
* proc.call
*
* <em>raises the exception:</em>
*
- * SecurityError: Insecure: Insecure operation `untaint' at level 3
+ * SecurityError: Insecure: can't modify string
*/
/*
@@ -1773,9 +1705,7 @@ Init_Exception(void)
rb_define_method(rb_eException, "message", exc_message, 0);
rb_define_method(rb_eException, "inspect", exc_inspect, 0);
rb_define_method(rb_eException, "backtrace", exc_backtrace, 0);
- rb_define_method(rb_eException, "backtrace_locations", exc_backtrace_locations, 0);
rb_define_method(rb_eException, "set_backtrace", exc_set_backtrace, 1);
- rb_define_method(rb_eException, "cause", exc_cause, 0);
rb_eSystemExit = rb_define_class("SystemExit", rb_eException);
rb_define_method(rb_eSystemExit, "initialize", exit_initialize, -1);
@@ -1797,7 +1727,6 @@ Init_Exception(void)
rb_eSyntaxError = rb_define_class("SyntaxError", rb_eScriptError);
rb_eLoadError = rb_define_class("LoadError", rb_eScriptError);
- /* the path failed to load */
rb_attr(rb_eLoadError, rb_intern("path"), 1, 0, Qfalse);
rb_eNotImpError = rb_define_class("NotImplementedError", rb_eScriptError);
@@ -1805,6 +1734,7 @@ Init_Exception(void)
rb_eNameError = rb_define_class("NameError", rb_eStandardError);
rb_define_method(rb_eNameError, "initialize", name_err_initialize, -1);
rb_define_method(rb_eNameError, "name", name_err_name, 0);
+ rb_define_method(rb_eNameError, "to_s", name_err_to_s, 0);
rb_cNameErrorMesg = rb_define_class_under(rb_eNameError, "message", rb_cData);
rb_define_singleton_method(rb_cNameErrorMesg, "!", rb_name_err_mesg_new, NAME_ERR_MESG_COUNT);
rb_define_method(rb_cNameErrorMesg, "==", name_err_mesg_equal, 1);
@@ -1976,34 +1906,6 @@ rb_sys_fail_str(VALUE mesg)
rb_exc_raise(make_errno_exc_str(mesg));
}
-#ifdef RUBY_FUNCTION_NAME_STRING
-void
-rb_sys_fail_path_in(const char *func_name, VALUE path)
-{
- int n = errno;
-
- errno = 0;
- rb_syserr_fail_path_in(func_name, n, path);
-}
-
-void
-rb_syserr_fail_path_in(const char *func_name, int n, VALUE path)
-{
- VALUE args[2];
-
- if (!path) path = Qnil;
- if (n == 0) {
- const char *s = !NIL_P(path) ? RSTRING_PTR(path) : "";
- if (!func_name) func_name = "(null)";
- rb_bug("rb_sys_fail_path_in(%s, %s) - errno == 0",
- func_name, s);
- }
- args[0] = path;
- args[1] = rb_str_new_cstr(func_name);
- rb_exc_raise(rb_class_new_instance(2, args, get_syserr(n)));
-}
-#endif
-
void
rb_mod_sys_fail(VALUE mod, const char *mesg)
{
@@ -2081,12 +1983,17 @@ rb_check_frozen(VALUE obj)
void
rb_error_untrusted(VALUE obj)
{
+ if (rb_safe_level() >= 4) {
+ rb_raise(rb_eSecurityError, "Insecure: can't modify %s",
+ rb_obj_classname(obj));
+ }
}
#undef rb_check_trusted
void
rb_check_trusted(VALUE obj)
{
+ rb_check_trusted_internal(obj);
}
void
@@ -2094,8 +2001,9 @@ rb_check_copyable(VALUE obj, VALUE orig)
{
if (!FL_ABLE(obj)) return;
rb_check_frozen_internal(obj);
+ rb_check_trusted_internal(obj);
if (!FL_ABLE(orig)) return;
- if ((~RBASIC(obj)->flags & RBASIC(orig)->flags) & FL_TAINT) {
+ if ((~RBASIC(obj)->flags & RBASIC(orig)->flags) & (FL_UNTRUSTED|FL_TAINT)) {
if (rb_safe_level() > 0) {
rb_raise(rb_eSecurityError, "Insecure: can't modify %"PRIsVALUE,
RBASIC(obj)->klass);
diff --git a/eval.c b/eval.c
index 3a0206f24a..2c24474d3f 100644
--- a/eval.c
+++ b/eval.c
@@ -20,6 +20,8 @@
#include "vm_core.h"
#include "probes_helper.h"
+#define numberof(array) (int)(sizeof(array) / sizeof((array)[0]))
+
NORETURN(void rb_raise_jump(VALUE));
NODE *rb_vm_get_cref(const rb_iseq_t *, const VALUE *);
@@ -32,13 +34,9 @@ VALUE rb_eSysStackError;
#include "eval_error.c"
#include "eval_jump.c"
-#define CLASS_OR_MODULE_P(obj) \
- (!SPECIAL_CONST_P(obj) && \
- (BUILTIN_TYPE(obj) == T_CLASS || BUILTIN_TYPE(obj) == T_MODULE))
-
/* Initializes the Ruby VM and builtin libraries.
* @retval 0 if succeeded.
- * @retval non-zero an error occurred.
+ * @retval non-zero an error occured.
*/
int
ruby_setup(void)
@@ -67,7 +65,7 @@ ruby_setup(void)
/* Calls ruby_setup() and check error.
*
- * Prints errors and calls exit(3) if an error occurred.
+ * Prints errors and calls exit(3) if an error occured.
*/
void
ruby_init(void)
@@ -82,7 +80,7 @@ ruby_init(void)
/*! Processes command line arguments and compiles the Ruby source to execute.
*
* This function does:
- * \li Processes the given command line flags and arguments for ruby(1)
+ * \li Processses the given command line flags and arguments for ruby(1)
* \li compiles the source code from the given argument, -e or stdin, and
* \li returns the compiled source as an opaque pointer to an internal data structure
*
@@ -131,7 +129,7 @@ ruby_finalize_1(void)
/** Runs the VM finalization processes.
*
- * <code>END{}</code> and procs registered by <code>Kernel.#at_exit</code> are
+ * <code>END{}</code> and procs registered by <code>Kernel.#at_ext</code> are
* executed here. See the Ruby language spec for more details.
*
* @note This function is allowed to raise an exception if an error occurred.
@@ -149,7 +147,7 @@ ruby_finalize(void)
* resources used by the VM.
*
* @param ex Default value to the return value.
- * @return If an error occurred returns a non-zero. If otherwise, returns the
+ * @return If an error occured returns a non-zero. If otherwise, returns the
* given ex.
* @note This function does not raise any exception.
*/
@@ -192,6 +190,12 @@ ruby_cleanup(volatile int ex)
}
th->errinfo = errs[1];
ex = error_handle(ex);
+ ruby_finalize_1();
+
+ /* unlock again if finalizer took mutexes. */
+ rb_threadptr_unlock_all_locking_mutexes(GET_THREAD());
+ POP_TAG();
+ rb_thread_stop_timer_thread(1);
#if EXIT_SUCCESS != 0 || EXIT_FAILURE != 1
switch (ex) {
@@ -226,13 +230,6 @@ ruby_cleanup(volatile int ex)
ex = EXIT_FAILURE;
}
}
-
- ruby_finalize_1();
-
- /* unlock again if finalizer took mutexes. */
- rb_threadptr_unlock_all_locking_mutexes(GET_THREAD());
- POP_TAG();
- rb_thread_stop_timer_thread(1);
ruby_vm_destruct(GET_VM());
if (state) ruby_default_signal(state);
@@ -296,7 +293,7 @@ ruby_executable_node(void *n, int *status)
}
/*! Runs the given compiled source and exits this process.
- * @retval 0 if successfully run the source
+ * @retval 0 if successfully run thhe source
* @retval non-zero if an error occurred.
*/
int
@@ -405,17 +402,13 @@ rb_mod_s_constants(int argc, VALUE *argv, VALUE mod)
void
rb_frozen_class_p(VALUE klass)
{
- if (SPECIAL_CONST_P(klass)) {
- noclass:
- Check_Type(klass, T_CLASS);
- }
- if (OBJ_FROZEN(klass)) {
- const char *desc;
+ const char *desc = "something(?!)";
+ if (OBJ_FROZEN(klass)) {
if (FL_TEST(klass, FL_SINGLETON))
desc = "object";
else {
- switch (BUILTIN_TYPE(klass)) {
+ switch (TYPE(klass)) {
case T_MODULE:
case T_ICLASS:
desc = "module";
@@ -423,8 +416,6 @@ rb_frozen_class_p(VALUE klass)
case T_CLASS:
desc = "class";
break;
- default:
- goto noclass;
}
}
rb_error_frozen(desc);
@@ -432,34 +423,6 @@ rb_frozen_class_p(VALUE klass)
}
NORETURN(static void rb_longjmp(int, volatile VALUE));
-static VALUE get_errinfo(void);
-static VALUE get_thread_errinfo(rb_thread_t *th);
-
-static VALUE
-exc_setup_cause(VALUE exc, VALUE cause)
-{
- ID id_cause;
- CONST_ID(id_cause, "cause");
-
-#if SUPPORT_JOKE
- if (NIL_P(cause)) {
- ID id_true_cause;
- CONST_ID(id_true_cause, "true_cause");
-
- cause = rb_attr_get(rb_eFatal, id_true_cause);
- if (NIL_P(cause)) {
- cause = rb_exc_new_cstr(rb_eFatal, "because using such Ruby");
- rb_ivar_set(cause, id_cause, INT2FIX(42)); /* the answer */
- OBJ_FREEZE(cause);
- rb_ivar_set(rb_eFatal, id_true_cause, cause);
- }
- }
-#endif
- if (!NIL_P(cause) && cause != exc) {
- rb_ivar_set(exc, id_cause, cause);
- }
- return exc;
-}
static void
setup_exception(rb_thread_t *th, int tag, volatile VALUE mesg)
@@ -476,7 +439,6 @@ setup_exception(rb_thread_t *th, int tag, volatile VALUE mesg)
if (NIL_P(mesg)) {
mesg = rb_exc_new(rb_eRuntimeError, 0, 0);
}
- exc_setup_cause(mesg, get_thread_errinfo(th));
file = rb_sourcefile();
if (file) line = rb_sourceline();
@@ -493,12 +455,10 @@ setup_exception(rb_thread_t *th, int tag, volatile VALUE mesg)
if (OBJ_FROZEN(mesg)) {
mesg = rb_obj_dup(mesg);
}
- rb_iv_set(mesg, "bt_locations", at);
set_backtrace(mesg, at);
}
}
}
-
if (!NIL_P(mesg)) {
th->errinfo = mesg;
}
@@ -511,16 +471,19 @@ setup_exception(rb_thread_t *th, int tag, volatile VALUE mesg)
if ((status = EXEC_TAG()) == 0) {
RB_GC_GUARD(e) = rb_obj_as_string(e);
if (file && line) {
- warn_printf("Exception `%s' at %s:%d - %"PRIsVALUE"\n",
- rb_obj_classname(th->errinfo), file, line, e);
+ warn_printf("Exception `%s' at %s:%d - %s\n",
+ rb_obj_classname(th->errinfo),
+ file, line, RSTRING_PTR(e));
}
else if (file) {
- warn_printf("Exception `%s' at %s - %"PRIsVALUE"\n",
- rb_obj_classname(th->errinfo), file, e);
+ warn_printf("Exception `%s' at %s - %s\n",
+ rb_obj_classname(th->errinfo),
+ file, RSTRING_PTR(e));
}
else {
- warn_printf("Exception `%s' - %"PRIsVALUE"\n",
- rb_obj_classname(th->errinfo), e);
+ warn_printf("Exception `%s' - %s\n",
+ rb_obj_classname(th->errinfo),
+ RSTRING_PTR(e));
}
}
POP_TAG();
@@ -584,6 +547,8 @@ rb_interrupt(void)
rb_raise(rb_eInterrupt, "%s", "");
}
+static VALUE get_errinfo(void);
+
/*
* call-seq:
* raise
@@ -627,7 +592,7 @@ rb_f_raise(int argc, VALUE *argv)
static VALUE
make_exception(int argc, VALUE *argv, int isstr)
{
- VALUE mesg, exc;
+ VALUE mesg;
ID exception;
int n;
@@ -636,11 +601,10 @@ make_exception(int argc, VALUE *argv, int isstr)
case 0:
break;
case 1:
- exc = argv[0];
- if (NIL_P(exc))
+ if (NIL_P(argv[0]))
break;
if (isstr) {
- mesg = rb_check_string_type(exc);
+ mesg = rb_check_string_type(argv[0]);
if (!NIL_P(mesg)) {
mesg = rb_exc_new3(rb_eRuntimeError, mesg);
break;
@@ -651,12 +615,11 @@ make_exception(int argc, VALUE *argv, int isstr)
case 2:
case 3:
- exc = argv[0];
n = 1;
exception_call:
- if (exc == sysstack_error) return exc;
+ if (argv[0] == sysstack_error) return argv[0];
CONST_ID(exception, "exception");
- mesg = rb_check_funcall(exc, exception, n, argv+1);
+ mesg = rb_check_funcall(argv[0], exception, n, argv+1);
if (mesg == Qundef) {
rb_raise(rb_eTypeError, "exception class/object expected");
}
@@ -691,10 +654,10 @@ rb_raise_jump(VALUE mesg)
ID mid = cfp->me->called_id;
th->cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(th->cfp);
- EXEC_EVENT_HOOK(th, RUBY_EVENT_C_RETURN, self, mid, klass, Qnil);
setup_exception(th, TAG_RAISE, mesg);
+ EXEC_EVENT_HOOK(th, RUBY_EVENT_C_RETURN, self, mid, klass, Qnil);
rb_thread_raised_clear(th);
JUMP_TAG(TAG_RAISE);
}
@@ -741,7 +704,7 @@ rb_rescue2(VALUE (* b_proc) (ANYARGS), VALUE data1,
int state;
rb_thread_t *th = GET_THREAD();
rb_control_frame_t *cfp = th->cfp;
- volatile VALUE result = Qfalse;
+ volatile VALUE result;
volatile VALUE e_info = th->errinfo;
va_list args;
@@ -750,15 +713,6 @@ rb_rescue2(VALUE (* b_proc) (ANYARGS), VALUE data1,
retry_entry:
result = (*b_proc) (data1);
}
- else if (result) {
- /* escape from r_proc */
- if (state == TAG_RETRY) {
- state = 0;
- th->errinfo = Qnil;
- result = Qfalse;
- goto retry_entry;
- }
- }
else {
th->cfp = cfp; /* restore */
@@ -776,12 +730,25 @@ rb_rescue2(VALUE (* b_proc) (ANYARGS), VALUE data1,
va_end(args);
if (handle) {
- result = Qnil;
- state = 0;
if (r_proc) {
- result = (*r_proc) (data2, th->errinfo);
+ PUSH_TAG();
+ if ((state = EXEC_TAG()) == 0) {
+ result = (*r_proc) (data2, th->errinfo);
+ }
+ POP_TAG();
+ if (state == TAG_RETRY) {
+ state = 0;
+ th->errinfo = Qnil;
+ goto retry_entry;
+ }
+ }
+ else {
+ result = Qnil;
+ state = 0;
+ }
+ if (state == 0) {
+ th->errinfo = e_info;
}
- th->errinfo = e_info;
}
}
}
@@ -804,7 +771,7 @@ VALUE
rb_protect(VALUE (* proc) (VALUE), VALUE data, int * state)
{
volatile VALUE result = Qnil;
- volatile int status;
+ int status;
rb_thread_t *th = GET_THREAD();
rb_control_frame_t *cfp = th->cfp;
struct rb_vm_protect_tag protect_tag;
@@ -818,9 +785,6 @@ rb_protect(VALUE (* proc) (VALUE), VALUE data, int * state)
if ((status = TH_EXEC_TAG()) == 0) {
SAVE_ROOT_JMPBUF(th, result = (*proc) (data));
}
- else {
- th->cfp = cfp;
- }
MEMCPY(&(th)->root_jmpbuf, &org_jmpbuf, rb_jmpbuf_t, 1);
th->protect_tag = protect_tag.prev;
TH_POP_TAG();
@@ -828,6 +792,10 @@ rb_protect(VALUE (* proc) (VALUE), VALUE data, int * state)
if (state) {
*state = status;
}
+ if (status != 0) {
+ th->cfp = cfp;
+ return Qnil;
+ }
return result;
}
@@ -837,14 +805,7 @@ rb_ensure(VALUE (*b_proc)(ANYARGS), VALUE data1, VALUE (*e_proc)(ANYARGS), VALUE
{
int state;
volatile VALUE result = Qnil;
- volatile VALUE errinfo;
- rb_thread_t *const th = GET_THREAD();
- rb_ensure_list_t ensure_list;
- ensure_list.entry.marker = 0;
- ensure_list.entry.e_proc = e_proc;
- ensure_list.entry.data2 = data2;
- ensure_list.next = th->ensure_list;
- th->ensure_list = &ensure_list;
+
PUSH_TAG();
if ((state = EXEC_TAG()) == 0) {
result = (*b_proc) (data1);
@@ -852,10 +813,7 @@ rb_ensure(VALUE (*b_proc)(ANYARGS), VALUE data1, VALUE (*e_proc)(ANYARGS), VALUE
POP_TAG();
/* TODO: fix me */
/* retval = prot_tag ? prot_tag->retval : Qnil; */ /* save retval */
- errinfo = th->errinfo;
- th->ensure_list=ensure_list.next;
- (*ensure_list.entry.e_proc)(ensure_list.entry.data2);
- th->errinfo = errinfo;
+ (*e_proc) (data2);
if (state)
JUMP_TAG(state);
return result;
@@ -888,7 +846,7 @@ frame_func_id(rb_control_frame_t *cfp)
if (RUBY_VM_IFUNC_P(iseq)) {
NODE *ifunc = (NODE *)iseq;
if (ifunc->nd_aid) return ifunc->nd_aid;
- return idIFUNC;
+ return rb_intern("<ifunc>");
}
me_local = method_entry_of_iseq(cfp, iseq);
if (me_local) {
@@ -918,7 +876,7 @@ frame_called_id(rb_control_frame_t *cfp)
if (RUBY_VM_IFUNC_P(iseq)) {
NODE *ifunc = (NODE *)iseq;
if (ifunc->nd_aid) return ifunc->nd_aid;
- return idIFUNC;
+ return rb_intern("<ifunc>");
}
me_local = method_entry_of_iseq(cfp, iseq);
if (me_local) {
@@ -942,12 +900,6 @@ rb_frame_this_func(void)
return frame_func_id(GET_THREAD()->cfp);
}
-ID
-rb_frame_callee(void)
-{
- return frame_called_id(GET_THREAD()->cfp);
-}
-
static rb_control_frame_t *
previous_frame(rb_thread_t *th)
{
@@ -959,8 +911,8 @@ previous_frame(rb_thread_t *th)
return prev_cfp;
}
-static ID
-prev_frame_callee(void)
+ID
+rb_frame_callee(void)
{
rb_control_frame_t *prev_cfp = previous_frame(GET_THREAD());
if (!prev_cfp) return 0;
@@ -968,7 +920,7 @@ prev_frame_callee(void)
}
static ID
-prev_frame_func(void)
+rb_frame_caller(void)
{
rb_control_frame_t *prev_cfp = previous_frame(GET_THREAD());
if (!prev_cfp) return 0;
@@ -997,8 +949,13 @@ rb_frame_pop(void)
static VALUE
rb_mod_append_features(VALUE module, VALUE include)
{
- if (!CLASS_OR_MODULE_P(include)) {
+ switch (TYPE(include)) {
+ case T_CLASS:
+ case T_MODULE:
+ break;
+ default:
Check_Type(include, T_CLASS);
+ break;
}
rb_include_module(include, module);
@@ -1045,8 +1002,13 @@ rb_mod_include(int argc, VALUE *argv, VALUE module)
static VALUE
rb_mod_prepend_features(VALUE module, VALUE prepend)
{
- if (!CLASS_OR_MODULE_P(prepend)) {
+ switch (TYPE(prepend)) {
+ case T_CLASS:
+ case T_MODULE:
+ break;
+ default:
Check_Type(prepend, T_CLASS);
+ break;
}
rb_prepend_module(prepend, module);
@@ -1077,13 +1039,24 @@ rb_mod_prepend(int argc, VALUE *argv, VALUE module)
return module;
}
+static void
+warn_refinements_once()
+{
+ static int warned = 0;
+
+ if (warned)
+ return;
+ rb_warn("Refinements are experimental, and the behavior may change in future versions of Ruby!");
+ warned = 1;
+}
+
static VALUE
hidden_identity_hash_new()
{
VALUE hash = rb_hash_new();
rb_funcall(hash, rb_intern("compare_by_identity"), 0);
- RBASIC_CLEAR_CLASS(hash); /* hide from ObjectSpace */
+ RBASIC(hash)->klass = 0; /* hide from ObjectSpace */
return hash;
}
@@ -1116,14 +1089,11 @@ rb_using_refinement(NODE *cref, VALUE klass, VALUE module)
FL_SET(module, RMODULE_IS_OVERLAID);
c = iclass = rb_include_class_new(module, superclass);
RCLASS_REFINED_CLASS(c) = klass;
-
- RCLASS_M_TBL_WRAPPER(OBJ_WB_UNPROTECT(c)) =
- RCLASS_M_TBL_WRAPPER(OBJ_WB_UNPROTECT(module));
-
+ RCLASS_M_TBL(c) = RCLASS_M_TBL(module);
module = RCLASS_SUPER(module);
while (module && module != klass) {
FL_SET(module, RMODULE_IS_OVERLAID);
- c = RCLASS_SET_SUPER(c, rb_include_class_new(module, RCLASS_SUPER(c)));
+ c = RCLASS_SUPER(c) = rb_include_class_new(module, RCLASS_SUPER(c));
RCLASS_REFINED_CLASS(c) = klass;
module = RCLASS_SUPER(module);
}
@@ -1139,46 +1109,20 @@ using_refinement(VALUE klass, VALUE module, VALUE arg)
return ST_CONTINUE;
}
-static void
-using_module_recursive(NODE *cref, VALUE klass)
+void
+rb_using_module(NODE *cref, VALUE module)
{
ID id_refinements;
- VALUE super, module, refinements;
+ VALUE refinements;
- super = RCLASS_SUPER(klass);
- if (super) {
- using_module_recursive(cref, super);
- }
- switch (BUILTIN_TYPE(klass)) {
- case T_MODULE:
- module = klass;
- break;
-
- case T_ICLASS:
- module = RBASIC(klass)->klass;
- break;
-
- default:
- rb_raise(rb_eTypeError, "wrong argument type %s (expected Module)",
- rb_obj_classname(klass));
- break;
- }
+ Check_Type(module, T_MODULE);
CONST_ID(id_refinements, "__refinements__");
refinements = rb_attr_get(module, id_refinements);
if (NIL_P(refinements)) return;
rb_hash_foreach(refinements, using_refinement, (VALUE) cref);
}
-void
-rb_using_module(NODE *cref, VALUE module)
-{
- Check_Type(module, T_MODULE);
- using_module_recursive(cref, module);
- rb_clear_method_cache_by_class(rb_cObject);
-}
-
-VALUE
-rb_refinement_module_get_refined_class(VALUE module)
+VALUE rb_refinement_module_get_refined_class(VALUE module)
{
ID id_refined_class;
@@ -1208,7 +1152,8 @@ add_activated_refinement(VALUE activated_refinements,
refinement = RCLASS_SUPER(refinement);
while (refinement) {
FL_SET(refinement, RMODULE_IS_OVERLAID);
- c = RCLASS_SET_SUPER(c, rb_include_class_new(refinement, RCLASS_SUPER(c)));
+ c = RCLASS_SUPER(c) =
+ rb_include_class_new(refinement, RCLASS_SUPER(c));
RCLASS_REFINED_CLASS(c) = klass;
refinement = RCLASS_SUPER(refinement);
}
@@ -1236,6 +1181,7 @@ rb_mod_refine(VALUE module, VALUE klass)
rb_thread_t *th = GET_THREAD();
rb_block_t *block = rb_vm_control_frame_block_ptr(th->cfp);
+ warn_refinements_once();
if (!block) {
rb_raise(rb_eArgError, "no block given");
}
@@ -1260,7 +1206,7 @@ rb_mod_refine(VALUE module, VALUE klass)
refinement = rb_hash_lookup(refinements, klass);
if (NIL_P(refinement)) {
refinement = rb_module_new();
- RCLASS_SET_SUPER(refinement, klass);
+ RCLASS_SUPER(refinement) = klass;
FL_SET(refinement, RMODULE_IS_REFINEMENT);
CONST_ID(id_refined_class, "__refined_class__");
rb_ivar_set(refinement, id_refined_class, klass);
@@ -1273,31 +1219,6 @@ rb_mod_refine(VALUE module, VALUE klass)
return refinement;
}
-/*
- * call-seq:
- * using(module) -> self
- *
- * Import class refinements from <i>module</i> into the current class or
- * module definition.
- */
-
-static VALUE
-mod_using(VALUE self, VALUE module)
-{
- NODE *cref = rb_vm_cref();
- rb_control_frame_t *prev_cfp = previous_frame(GET_THREAD());
-
- if (prev_frame_func()) {
- rb_raise(rb_eRuntimeError,
- "Module#using is not permitted in methods");
- }
- if (prev_cfp && prev_cfp->self != self) {
- rb_raise(rb_eRuntimeError, "Module#using is not called on self");
- }
- rb_using_module(cref, module);
- return self;
-}
-
void
rb_obj_call_init(VALUE obj, int argc, VALUE *argv)
{
@@ -1403,6 +1324,7 @@ top_include(int argc, VALUE *argv, VALUE self)
{
rb_thread_t *th = GET_THREAD();
+ rb_secure(4);
if (th->top_wrapper) {
rb_warning("main.include in the wrapped load is effective only in wrapper module");
return rb_mod_include(argc, argv, th->top_wrapper);
@@ -1424,11 +1346,13 @@ top_using(VALUE self, VALUE module)
NODE *cref = rb_vm_cref();
rb_control_frame_t *prev_cfp = previous_frame(GET_THREAD());
+ warn_refinements_once();
if (cref->nd_next || (prev_cfp && prev_cfp->me)) {
- rb_raise(rb_eRuntimeError,
- "main.using is permitted only at toplevel");
+ rb_raise(rb_eRuntimeError, "using is permitted only at toplevel");
}
+ Check_Type(module, T_MODULE);
rb_using_module(cref, module);
+ rb_clear_cache();
return self;
}
@@ -1544,9 +1468,9 @@ errat_setter(VALUE val, ID id, VALUE *var)
/*
* call-seq:
* __method__ -> symbol
+ * __callee__ -> symbol
*
- * Returns the name at the definition of the current method as a
- * Symbol.
+ * Returns the name of the current method as a Symbol.
* If called outside of a method, it returns <code>nil</code>.
*
*/
@@ -1554,7 +1478,7 @@ errat_setter(VALUE val, ID id, VALUE *var)
static VALUE
rb_f_method_name(void)
{
- ID fname = prev_frame_func(); /* need *method* ID */
+ ID fname = rb_frame_caller(); /* need *caller* ID */
if (fname) {
return ID2SYM(fname);
@@ -1564,19 +1488,10 @@ rb_f_method_name(void)
}
}
-/*
- * call-seq:
- * __callee__ -> symbol
- *
- * Returns the called name of the current method as a Symbol.
- * If called outside of a method, it returns <code>nil</code>.
- *
- */
-
static VALUE
rb_f_callee_name(void)
{
- ID fname = prev_frame_callee(); /* need *callee* ID */
+ ID fname = rb_frame_callee(); /* need *callee* ID */
if (fname) {
return ID2SYM(fname);
@@ -1590,10 +1505,8 @@ rb_f_callee_name(void)
* call-seq:
* __dir__ -> string
*
- * Returns the canonicalized absolute path of the directory of the file from
- * which this method is called. It means symlinks in the path is resolved.
+ * Returns the value of <code>File.dirname(__FILE__)</code>
* If <code>__FILE__</code> is <code>nil</code>, it returns <code>nil</code>.
- * The return value equals to <code>File.dirname(File.realpath(__FILE__))</code>.
*
*/
static VALUE
@@ -1622,14 +1535,12 @@ Init_eval(void)
rb_define_global_function("__callee__", rb_f_callee_name, 0);
rb_define_global_function("__dir__", f_current_dirname, 0);
- rb_define_method(rb_cModule, "include", rb_mod_include, -1);
- rb_define_method(rb_cModule, "prepend", rb_mod_prepend, -1);
-
rb_define_private_method(rb_cModule, "append_features", rb_mod_append_features, 1);
rb_define_private_method(rb_cModule, "extend_object", rb_mod_extend_object, 1);
+ rb_define_private_method(rb_cModule, "include", rb_mod_include, -1);
rb_define_private_method(rb_cModule, "prepend_features", rb_mod_prepend_features, 1);
+ rb_define_private_method(rb_cModule, "prepend", rb_mod_prepend, -1);
rb_define_private_method(rb_cModule, "refine", rb_mod_refine, 1);
- rb_define_private_method(rb_cModule, "using", mod_using, 1);
rb_undef_method(rb_cClass, "refine");
rb_undef_method(rb_cClass, "module_function");
diff --git a/eval_error.c b/eval_error.c
index 2ce661204c..c7ccf82a0a 100644
--- a/eval_error.c
+++ b/eval_error.c
@@ -6,18 +6,17 @@
static void
warn_printf(const char *fmt, ...)
{
- VALUE str;
+ char buf[BUFSIZ];
va_list args;
va_init_list(args, fmt);
- str = rb_vsprintf(fmt, args);
+ vsnprintf(buf, BUFSIZ, fmt, args);
va_end(args);
- rb_write_error_str(str);
+ rb_write_error(buf);
}
#define warn_print(x) rb_write_error(x)
#define warn_print2(x,l) rb_write_error2((x),(l))
-#define warn_print_str(x) rb_write_error_str(x)
static void
error_pos(void)
@@ -26,13 +25,12 @@ error_pos(void)
int sourceline = rb_sourceline();
if (sourcefile) {
- ID caller_name;
if (sourceline == 0) {
warn_printf("%s", sourcefile);
}
- else if ((caller_name = rb_frame_callee()) != 0) {
+ else if (rb_frame_callee()) {
warn_printf("%s:%d:in `%s'", sourcefile, sourceline,
- rb_id2name(caller_name));
+ rb_id2name(rb_frame_callee()));
}
else {
warn_printf("%s:%d", sourcefile, sourceline);
@@ -79,11 +77,11 @@ set_backtrace(VALUE info, VALUE bt)
static void
error_print(void)
{
- volatile VALUE errat = Qundef;
+ volatile VALUE errat = Qnil; /* OK */
rb_thread_t *th = GET_THREAD();
VALUE errinfo = th->errinfo;
int raised_flag = th->raised_flag;
- volatile VALUE eclass = Qundef, e = Qundef;
+ volatile VALUE eclass, e;
const char *volatile einfo;
volatile long elen;
@@ -95,15 +93,11 @@ error_print(void)
if (TH_EXEC_TAG() == 0) {
errat = get_backtrace(errinfo);
}
- else if (errat == Qundef) {
+ else {
errat = Qnil;
}
- else if (eclass == Qundef || e != Qundef) {
+ if (TH_EXEC_TAG())
goto error;
- }
- else {
- goto no_message;
- }
if (NIL_P(errat)) {
const char *file = rb_sourcefile();
int line = rb_sourceline();
@@ -118,27 +112,28 @@ error_print(void)
error_pos();
}
else {
- VALUE mesg = RARRAY_AREF(errat, 0);
+ VALUE mesg = RARRAY_PTR(errat)[0];
if (NIL_P(mesg))
error_pos();
else {
- warn_print_str(mesg);
+ warn_print2(RSTRING_PTR(mesg), RSTRING_LEN(mesg));
}
}
eclass = CLASS_OF(errinfo);
- if (eclass != Qundef &&
- (e = rb_check_funcall(errinfo, rb_intern("message"), 0, 0)) != Qundef &&
- (RB_TYPE_P(e, T_STRING) || !NIL_P(e = rb_check_string_type(e)))) {
+ if (TH_EXEC_TAG() == 0) {
+ e = rb_funcall(errinfo, rb_intern("message"), 0, 0);
+ StringValue(e);
einfo = RSTRING_PTR(e);
elen = RSTRING_LEN(e);
}
else {
- no_message:
einfo = "";
elen = 0;
}
+ if (TH_EXEC_TAG())
+ goto error;
if (eclass == rb_eRuntimeError && elen == 0) {
warn_print(": unhandled exception\n");
}
@@ -148,7 +143,7 @@ error_print(void)
epath = rb_class_name(eclass);
if (elen == 0) {
warn_print(": ");
- warn_print_str(epath);
+ warn_print2(RSTRING_PTR(epath), RSTRING_LEN(epath));
warn_print("\n");
}
else {
@@ -165,7 +160,7 @@ error_print(void)
warn_print2(einfo, len);
if (epath) {
warn_print(" (");
- warn_print_str(epath);
+ warn_print2(RSTRING_PTR(epath), RSTRING_LEN(epath));
warn_print(")\n");
}
if (tail) {
@@ -178,6 +173,7 @@ error_print(void)
if (!NIL_P(errat)) {
long i;
long len = RARRAY_LEN(errat);
+ VALUE *ptr = RARRAY_PTR(errat);
int skip = eclass == rb_eSysStackError;
#define TRACE_MAX (TRACE_HEAD+TRACE_TAIL+5)
@@ -185,9 +181,8 @@ error_print(void)
#define TRACE_TAIL 5
for (i = 1; i < len; i++) {
- VALUE line = RARRAY_AREF(errat, i);
- if (RB_TYPE_P(line, T_STRING)) {
- warn_printf("\tfrom %"PRIsVALUE"\n", line);
+ if (RB_TYPE_P(ptr[i], T_STRING)) {
+ warn_printf("\tfrom %s\n", RSTRING_PTR(ptr[i]));
}
if (skip && i == TRACE_HEAD && len > TRACE_MAX) {
warn_printf("\t ... %ld levels...\n",
@@ -198,7 +193,6 @@ error_print(void)
}
error:
TH_POP_TAG();
- th->errinfo = errinfo;
rb_thread_raised_set(th, raised_flag);
}
diff --git a/eval_intern.h b/eval_intern.h
index a0ecb5086b..334b8d439a 100644
--- a/eval_intern.h
+++ b/eval_intern.h
@@ -83,28 +83,9 @@ extern int select_large_fdset(int, fd_set *, fd_set *, fd_set *, struct timeval
#include <sys/stat.h>
-#ifdef _MSC_VER
-#define SAVE_ROOT_JMPBUF_BEFORE_STMT \
- __try {
-#define SAVE_ROOT_JMPBUF_AFTER_STMT \
- } \
- __except (GetExceptionCode() == EXCEPTION_STACK_OVERFLOW ? \
- (rb_thread_raised_set(GET_THREAD(), RAISED_STACKOVERFLOW), \
- raise(SIGSEGV), \
- EXCEPTION_EXECUTE_HANDLER) : \
- EXCEPTION_CONTINUE_SEARCH) { \
- /* never reaches here */ \
- }
-#else
-#define SAVE_ROOT_JMPBUF_BEFORE_STMT
-#define SAVE_ROOT_JMPBUF_AFTER_STMT
-#endif
-
#define SAVE_ROOT_JMPBUF(th, stmt) do \
if (ruby_setjmp((th)->root_jmpbuf) == 0) { \
- SAVE_ROOT_JMPBUF_BEFORE_STMT \
stmt; \
- SAVE_ROOT_JMPBUF_AFTER_STMT \
} \
else { \
rb_fiber_start(); \
@@ -114,7 +95,8 @@ extern int select_large_fdset(int, fd_set *, fd_set *, fd_set *, struct timeval
rb_thread_t * const _th = (th); \
struct rb_vm_tag _tag; \
_tag.tag = 0; \
- _tag.prev = _th->tag;
+ _tag.prev = _th->tag; \
+ _th->tag = &_tag;
#define TH_POP_TAG() \
_th->tag = _tag.prev; \
@@ -123,42 +105,17 @@ extern int select_large_fdset(int, fd_set *, fd_set *, fd_set *, struct timeval
#define TH_POP_TAG2() \
_th->tag = _tag.prev
-#define TH_PUSH_TAG2() (_th->tag = &_tag, 0)
-
-#define TH_TMPPOP_TAG() TH_POP_TAG2()
-
-#define TH_REPUSH_TAG() TH_PUSH_TAG2()
-
#define PUSH_TAG() TH_PUSH_TAG(GET_THREAD())
#define POP_TAG() TH_POP_TAG()
-/* clear th->state, and return the value */
-static inline int
-rb_threadptr_tag_state(rb_thread_t *th)
-{
- int state = th->state;
- th->state = 0;
- return state;
-}
-
-NORETURN(static inline void rb_threadptr_tag_jump(rb_thread_t *, int));
-static inline void
-rb_threadptr_tag_jump(rb_thread_t *th, int st)
-{
- ruby_longjmp(th->tag->buf, (th->state = st));
-}
-
-/*
- setjmp() in assignment expression rhs is undefined behavior
- [ISO/IEC 9899:1999] 7.13.1.1
-*/
-#define TH_EXEC_TAG() \
- (ruby_setjmp(_tag.buf) ? rb_threadptr_tag_state(_th) : TH_PUSH_TAG2())
+#define TH_EXEC_TAG() ruby_setjmp(_th->tag->buf)
#define EXEC_TAG() \
TH_EXEC_TAG()
-#define TH_JUMP_TAG(th, st) rb_threadptr_tag_jump(th, st)
+#define TH_JUMP_TAG(th, st) do { \
+ ruby_longjmp((th)->tag->buf,(st)); \
+} while (0)
#define JUMP_TAG(st) TH_JUMP_TAG(GET_THREAD(), (st))
@@ -238,11 +195,7 @@ VALUE rb_vm_top_self();
VALUE rb_vm_cbase(void);
#ifndef CharNext /* defined as CharNext[AW] on Windows. */
-# ifdef HAVE_MBLEN
-# define CharNext(p) ((p) + mblen((p), RUBY_MBCHAR_MAXSIZE))
-# else
-# define CharNext(p) ((p) + 1)
-# endif
+#define CharNext(p) ((p) + mblen((p), RUBY_MBCHAR_MAXSIZE))
#endif
#if defined DOSISH || defined __CYGWIN__
diff --git a/eval_jump.c b/eval_jump.c
index 30094e9176..092ab8766a 100644
--- a/eval_jump.c
+++ b/eval_jump.c
@@ -93,44 +93,48 @@ rb_mark_end_proc(void)
}
}
-static void
-exec_end_procs_chain(struct end_proc_data *volatile *procs)
-{
- struct end_proc_data volatile endproc;
- struct end_proc_data *link;
-
- while ((link = *procs) != 0) {
- *procs = link->next;
- endproc = *link;
- xfree(link);
- rb_set_safe_level_force(endproc.safe);
- (*endproc.func) (endproc.data);
- }
-}
-
void
rb_exec_end_proc(void)
{
+ struct end_proc_data *volatile link;
int status;
volatile int safe = rb_safe_level();
rb_thread_t *th = GET_THREAD();
volatile VALUE errinfo = th->errinfo;
- PUSH_TAG();
- if ((status = EXEC_TAG()) == 0) {
- again:
- exec_end_procs_chain(&ephemeral_end_procs);
- exec_end_procs_chain(&end_procs);
- }
- else {
- TH_TMPPOP_TAG();
- error_handle(status);
- if (!NIL_P(th->errinfo)) errinfo = th->errinfo;
- TH_REPUSH_TAG();
- goto again;
+ while (ephemeral_end_procs) {
+ link = ephemeral_end_procs;
+ ephemeral_end_procs = link->next;
+
+ PUSH_TAG();
+ if ((status = EXEC_TAG()) == 0) {
+ rb_set_safe_level_force(link->safe);
+ (*link->func) (link->data);
+ }
+ POP_TAG();
+ if (status) {
+ error_handle(status);
+ if (!NIL_P(th->errinfo)) errinfo = th->errinfo;
+ }
+ xfree(link);
}
- POP_TAG();
+ while (end_procs) {
+ link = end_procs;
+ end_procs = link->next;
+
+ PUSH_TAG();
+ if ((status = EXEC_TAG()) == 0) {
+ rb_set_safe_level_force(link->safe);
+ (*link->func) (link->data);
+ }
+ POP_TAG();
+ if (status) {
+ error_handle(status);
+ if (!NIL_P(th->errinfo)) errinfo = th->errinfo;
+ }
+ xfree(link);
+ }
rb_set_safe_level_force(safe);
th->errinfo = errinfo;
}
diff --git a/ext/-test-/bignum/big2str.c b/ext/-test-/bignum/big2str.c
deleted file mode 100644
index ce71fe37e2..0000000000
--- a/ext/-test-/bignum/big2str.c
+++ /dev/null
@@ -1,54 +0,0 @@
-#include "ruby.h"
-#include "internal.h"
-
-static VALUE
-big(VALUE x)
-{
- if (FIXNUM_P(x))
- return rb_int2big(FIX2LONG(x));
- if (RB_TYPE_P(x, T_BIGNUM))
- return x;
- rb_raise(rb_eTypeError, "can't convert %s to Bignum",
- rb_obj_classname(x));
-}
-
-static VALUE
-big2str_generic(VALUE x, VALUE vbase)
-{
- int base = NUM2INT(vbase);
- if (base < 2 || 36 < base)
- rb_raise(rb_eArgError, "invalid radix %d", base);
- return rb_big2str_generic(big(x), base);
-}
-
-#define POW2_P(x) (((x)&((x)-1))==0)
-
-static VALUE
-big2str_poweroftwo(VALUE x, VALUE vbase)
-{
- int base = NUM2INT(vbase);
- if (base < 2 || 36 < base || !POW2_P(base))
- rb_raise(rb_eArgError, "invalid radix %d", base);
- return rb_big2str_poweroftwo(big(x), base);
-}
-
-#if defined(HAVE_LIBGMP) && defined(HAVE_GMP_H)
-static VALUE
-big2str_gmp(VALUE x, VALUE vbase)
-{
- int base = NUM2INT(vbase);
- if (base < 2 || 36 < base)
- rb_raise(rb_eArgError, "invalid radix %d", base);
- return rb_big2str_gmp(big(x), base);
-}
-#else
-#define big2str_gmp rb_f_notimplement
-#endif
-
-void
-Init_big2str(VALUE klass)
-{
- rb_define_method(rb_cInteger, "big2str_generic", big2str_generic, 1);
- rb_define_method(rb_cInteger, "big2str_poweroftwo", big2str_poweroftwo, 1);
- rb_define_method(rb_cInteger, "big2str_gmp", big2str_gmp, 1);
-}
diff --git a/ext/-test-/bignum/bigzero.c b/ext/-test-/bignum/bigzero.c
deleted file mode 100644
index 2f7c272744..0000000000
--- a/ext/-test-/bignum/bigzero.c
+++ /dev/null
@@ -1,26 +0,0 @@
-#include "ruby.h"
-
-static VALUE
-bug_big_zero(VALUE self, VALUE length)
-{
- long len = NUM2ULONG(length);
- VALUE z = rb_big_new(len, 1);
- MEMZERO(RBIGNUM_DIGITS(z), BDIGIT, len);
- return z;
-}
-
-static VALUE
-bug_big_negzero(VALUE self, VALUE length)
-{
- long len = NUM2ULONG(length);
- VALUE z = rb_big_new(len, 0);
- MEMZERO(RBIGNUM_DIGITS(z), BDIGIT, len);
- return z;
-}
-
-void
-Init_bigzero(VALUE klass)
-{
- rb_define_singleton_method(klass, "zero", bug_big_zero, 1);
- rb_define_singleton_method(klass, "negzero", bug_big_negzero, 1);
-}
diff --git a/ext/-test-/bignum/depend b/ext/-test-/bignum/depend
deleted file mode 100644
index c65482236a..0000000000
--- a/ext/-test-/bignum/depend
+++ /dev/null
@@ -1,7 +0,0 @@
-$(OBJS): $(HDRS) $(ruby_headers)
-
-intpack.o: intpack.c $(top_srcdir)/internal.h
-mul.o: mul.c $(top_srcdir)/internal.h
-div.o: div.c $(top_srcdir)/internal.h
-big2str.o: big2str.c $(top_srcdir)/internal.h
-str2big.o: big2str.c $(top_srcdir)/internal.h
diff --git a/ext/-test-/bignum/div.c b/ext/-test-/bignum/div.c
deleted file mode 100644
index 2853ebef1c..0000000000
--- a/ext/-test-/bignum/div.c
+++ /dev/null
@@ -1,36 +0,0 @@
-#include "ruby.h"
-#include "internal.h"
-
-static VALUE
-big(VALUE x)
-{
- if (FIXNUM_P(x))
- return rb_int2big(FIX2LONG(x));
- if (RB_TYPE_P(x, T_BIGNUM))
- return x;
- rb_raise(rb_eTypeError, "can't convert %s to Bignum",
- rb_obj_classname(x));
-}
-
-static VALUE
-divrem_normal(VALUE x, VALUE y)
-{
- return rb_big_norm(rb_big_divrem_normal(big(x), big(y)));
-}
-
-#if defined(HAVE_LIBGMP) && defined(HAVE_GMP_H)
-static VALUE
-divrem_gmp(VALUE x, VALUE y)
-{
- return rb_big_norm(rb_big_divrem_gmp(big(x), big(y)));
-}
-#else
-#define divrem_gmp rb_f_notimplement
-#endif
-
-void
-Init_div(VALUE klass)
-{
- rb_define_method(rb_cInteger, "big_divrem_normal", divrem_normal, 1);
- rb_define_method(rb_cInteger, "big_divrem_gmp", divrem_gmp, 1);
-}
diff --git a/ext/-test-/bignum/extconf.rb b/ext/-test-/bignum/extconf.rb
deleted file mode 100644
index e8c1febc82..0000000000
--- a/ext/-test-/bignum/extconf.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-$INCFLAGS << " -I$(topdir) -I$(top_srcdir)"
-$srcs = Dir[File.join($srcdir, "*.{#{SRC_EXT.join(%q{,})}}")]
-inits = $srcs.map {|s| File.basename(s, ".*")}
-inits.delete("init")
-inits.map! {|s|"X(#{s})"}
-$defs << "-DTEST_INIT_FUNCS(X)=\"#{inits.join(' ')}\""
-create_makefile("-test-/bignum")
diff --git a/ext/-test-/bignum/init.c b/ext/-test-/bignum/init.c
deleted file mode 100644
index 82a159bf1d..0000000000
--- a/ext/-test-/bignum/init.c
+++ /dev/null
@@ -1,11 +0,0 @@
-#include "ruby.h"
-
-#define init(n) {void Init_##n(VALUE klass); Init_##n(klass);}
-
-void
-Init_bignum(void)
-{
- VALUE mBug = rb_define_module("Bug");
- VALUE klass = rb_define_class_under(mBug, "Bignum", rb_cString);
- TEST_INIT_FUNCS(init);
-}
diff --git a/ext/-test-/bignum/intpack.c b/ext/-test-/bignum/intpack.c
deleted file mode 100644
index 03023196e6..0000000000
--- a/ext/-test-/bignum/intpack.c
+++ /dev/null
@@ -1,88 +0,0 @@
-#include "ruby.h"
-#include "internal.h"
-
-static VALUE
-rb_integer_pack_raw_m(VALUE val, VALUE buf, VALUE numwords_arg, VALUE wordsize_arg, VALUE nails, VALUE flags)
-{
- int sign;
- size_t numwords = 0;
- size_t wordsize = NUM2SIZET(wordsize_arg);
-
- StringValue(buf);
- rb_str_modify(buf);
- sign = rb_integer_pack(val,
- RSTRING_PTR(buf), NUM2SIZET(numwords_arg),
- NUM2SIZET(wordsize_arg), NUM2SIZET(nails), NUM2INT(flags));
-
- return rb_ary_new_from_args(2, INT2NUM(sign), rb_str_new(RSTRING_PTR(buf), wordsize * numwords));
-}
-
-static VALUE
-rb_integer_pack_m(VALUE val, VALUE numwords_arg, VALUE wordsize_arg, VALUE nails, VALUE flags)
-{
- int sign;
- size_t numwords = NUM2SIZET(numwords_arg);
- size_t wordsize = NUM2SIZET(wordsize_arg);
- VALUE buf;
-
- if (numwords != 0 && wordsize != 0 && LONG_MAX / wordsize < numwords)
- rb_raise(rb_eArgError, "too big numwords * wordsize");
- buf = rb_str_new(NULL, numwords * wordsize);
- sign = rb_integer_pack(val,
- RSTRING_PTR(buf), numwords,
- wordsize, NUM2SIZET(nails), NUM2INT(flags));
-
- return rb_assoc_new(INT2NUM(sign), buf);
-}
-
-static VALUE
-rb_integer_unpack_m(VALUE klass, VALUE buf, VALUE numwords, VALUE wordsize, VALUE nails, VALUE flags)
-{
- StringValue(buf);
-
- return rb_integer_unpack(RSTRING_PTR(buf),
- NUM2SIZET(numwords), NUM2SIZET(wordsize),
- NUM2SIZET(nails), NUM2INT(flags));
-}
-
-static VALUE
-rb_integer_test_numbits_2comp_without_sign(VALUE val)
-{
- size_t size;
- int neg = FIXNUM_P(val) ? FIX2LONG(val) < 0 : RBIGNUM_NEGATIVE_P(val);
- size = rb_absint_numwords(val, 1, NULL) - (neg && rb_absint_singlebit_p(val));
- return SIZET2NUM(size);
-}
-
-static VALUE
-rb_integer_test_numbytes_2comp_with_sign(VALUE val)
-{
- int neg = FIXNUM_P(val) ? FIX2LONG(val) < 0 : RBIGNUM_NEGATIVE_P(val);
- int nlz_bits;
- size_t size = rb_absint_size(val, &nlz_bits);
- if (nlz_bits == 0 && !(neg && rb_absint_singlebit_p(val)))
- size++;
- return SIZET2NUM(size);
-}
-
-void
-Init_intpack(VALUE klass)
-{
- rb_define_method(rb_cInteger, "test_pack_raw", rb_integer_pack_raw_m, 5);
- rb_define_method(rb_cInteger, "test_pack", rb_integer_pack_m, 4);
- rb_define_singleton_method(rb_cInteger, "test_unpack", rb_integer_unpack_m, 5);
- rb_define_const(rb_cInteger, "INTEGER_PACK_MSWORD_FIRST", INT2NUM(INTEGER_PACK_MSWORD_FIRST));
- rb_define_const(rb_cInteger, "INTEGER_PACK_LSWORD_FIRST", INT2NUM(INTEGER_PACK_LSWORD_FIRST));
- rb_define_const(rb_cInteger, "INTEGER_PACK_MSBYTE_FIRST", INT2NUM(INTEGER_PACK_MSBYTE_FIRST));
- rb_define_const(rb_cInteger, "INTEGER_PACK_LSBYTE_FIRST", INT2NUM(INTEGER_PACK_LSBYTE_FIRST));
- rb_define_const(rb_cInteger, "INTEGER_PACK_NATIVE_BYTE_ORDER", INT2NUM(INTEGER_PACK_NATIVE_BYTE_ORDER));
- rb_define_const(rb_cInteger, "INTEGER_PACK_2COMP", INT2NUM(INTEGER_PACK_2COMP));
- rb_define_const(rb_cInteger, "INTEGER_PACK_LITTLE_ENDIAN", INT2NUM(INTEGER_PACK_LITTLE_ENDIAN));
- rb_define_const(rb_cInteger, "INTEGER_PACK_BIG_ENDIAN", INT2NUM(INTEGER_PACK_BIG_ENDIAN));
- rb_define_const(rb_cInteger, "INTEGER_PACK_FORCE_BIGNUM", INT2NUM(INTEGER_PACK_FORCE_BIGNUM));
- rb_define_const(rb_cInteger, "INTEGER_PACK_NEGATIVE", INT2NUM(INTEGER_PACK_NEGATIVE));
- rb_define_const(rb_cInteger, "INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION", INT2NUM(INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION));
-
- rb_define_method(rb_cInteger, "test_numbits_2comp_without_sign", rb_integer_test_numbits_2comp_without_sign, 0);
- rb_define_method(rb_cInteger, "test_numbytes_2comp_with_sign", rb_integer_test_numbytes_2comp_with_sign, 0);
-}
diff --git a/ext/-test-/bignum/mul.c b/ext/-test-/bignum/mul.c
deleted file mode 100644
index 758465b567..0000000000
--- a/ext/-test-/bignum/mul.c
+++ /dev/null
@@ -1,66 +0,0 @@
-#include "ruby.h"
-#include "internal.h"
-
-static VALUE
-big(VALUE x)
-{
- if (FIXNUM_P(x))
- return rb_int2big(FIX2LONG(x));
- if (RB_TYPE_P(x, T_BIGNUM))
- return x;
- rb_raise(rb_eTypeError, "can't convert %s to Bignum",
- rb_obj_classname(x));
-}
-
-static VALUE
-mul_normal(VALUE x, VALUE y)
-{
- return rb_big_norm(rb_big_mul_normal(big(x), big(y)));
-}
-
-static VALUE
-sq_fast(VALUE x)
-{
- return rb_big_norm(rb_big_sq_fast(big(x)));
-}
-
-static VALUE
-mul_balance(VALUE x, VALUE y)
-{
- return rb_big_norm(rb_big_mul_balance(big(x), big(y)));
-}
-
-static VALUE
-mul_karatsuba(VALUE x, VALUE y)
-{
- return rb_big_norm(rb_big_mul_karatsuba(big(x), big(y)));
-}
-
-static VALUE
-mul_toom3(VALUE x, VALUE y)
-{
- return rb_big_norm(rb_big_mul_toom3(big(x), big(y)));
-}
-
-#if defined(HAVE_LIBGMP) && defined(HAVE_GMP_H)
-static VALUE
-mul_gmp(VALUE x, VALUE y)
-{
- return rb_big_norm(rb_big_mul_gmp(big(x), big(y)));
-}
-#else
-#define mul_gmp rb_f_notimplement
-#endif
-
-void
-Init_mul(VALUE klass)
-{
- rb_define_const(rb_cBignum, "SIZEOF_BDIGITS", INT2NUM(SIZEOF_BDIGITS));
- rb_define_const(rb_cBignum, "BITSPERDIG", INT2NUM(SIZEOF_BDIGITS * CHAR_BIT));
- rb_define_method(rb_cInteger, "big_mul_normal", mul_normal, 1);
- rb_define_method(rb_cInteger, "big_sq_fast", sq_fast, 0);
- rb_define_method(rb_cInteger, "big_mul_balance", mul_balance, 1);
- rb_define_method(rb_cInteger, "big_mul_karatsuba", mul_karatsuba, 1);
- rb_define_method(rb_cInteger, "big_mul_toom3", mul_toom3, 1);
- rb_define_method(rb_cInteger, "big_mul_gmp", mul_gmp, 1);
-}
diff --git a/ext/-test-/bignum/str2big.c b/ext/-test-/bignum/str2big.c
deleted file mode 100644
index 0fdcb53290..0000000000
--- a/ext/-test-/bignum/str2big.c
+++ /dev/null
@@ -1,39 +0,0 @@
-#include "ruby.h"
-#include "internal.h"
-
-static VALUE
-str2big_poweroftwo(VALUE str, VALUE vbase, VALUE badcheck)
-{
- return rb_str2big_poweroftwo(str, NUM2INT(vbase), RTEST(badcheck));
-}
-
-static VALUE
-str2big_normal(VALUE str, VALUE vbase, VALUE badcheck)
-{
- return rb_str2big_normal(str, NUM2INT(vbase), RTEST(badcheck));
-}
-
-static VALUE
-str2big_karatsuba(VALUE str, VALUE vbase, VALUE badcheck)
-{
- return rb_str2big_karatsuba(str, NUM2INT(vbase), RTEST(badcheck));
-}
-
-#if defined(HAVE_LIBGMP) && defined(HAVE_GMP_H)
-static VALUE
-str2big_gmp(VALUE str, VALUE vbase, VALUE badcheck)
-{
- return rb_str2big_gmp(str, NUM2INT(vbase), RTEST(badcheck));
-}
-#else
-#define str2big_gmp rb_f_notimplement
-#endif
-
-void
-Init_str2big(VALUE klass)
-{
- rb_define_method(rb_cString, "str2big_poweroftwo", str2big_poweroftwo, 2);
- rb_define_method(rb_cString, "str2big_normal", str2big_normal, 2);
- rb_define_method(rb_cString, "str2big_karatsuba", str2big_karatsuba, 2);
- rb_define_method(rb_cString, "str2big_gmp", str2big_gmp, 2);
-}
diff --git a/ext/-test-/bug-3571/bug.c b/ext/-test-/bug-3571/bug.c
index 87a5df0588..72d6bd1021 100644
--- a/ext/-test-/bug-3571/bug.c
+++ b/ext/-test-/bug-3571/bug.c
@@ -1,7 +1,7 @@
#include <ruby.h>
static VALUE
-bug_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, arg))
+bug_i(VALUE i, VALUE arg)
{
rb_notimplement();
return ID2SYM(rb_frame_this_func());
diff --git a/ext/-test-/bug_reporter/bug_reporter.c b/ext/-test-/bug_reporter/bug_reporter.c
deleted file mode 100644
index e9ea9e3db0..0000000000
--- a/ext/-test-/bug_reporter/bug_reporter.c
+++ /dev/null
@@ -1,24 +0,0 @@
-#include <ruby.h>
-#include <stdio.h>
-
-int rb_bug_reporter_add(void (*func)(FILE *, void *), void *data);
-
-static void
-sample_bug_reporter(FILE *out, void *ptr)
-{
- int n = (int)(uintptr_t)ptr;
- fprintf(out, "Sample bug reporter: %d\n", n);
-}
-
-static VALUE
-register_sample_bug_reporter(VALUE self, VALUE obj)
-{
- rb_bug_reporter_add(sample_bug_reporter, (void *)(uintptr_t)NUM2INT(obj));
- return Qnil;
-}
-
-void
-Init_bug_reporter(void)
-{
- rb_define_global_function("register_sample_bug_reporter", register_sample_bug_reporter, 1);
-}
diff --git a/ext/-test-/bug_reporter/extconf.rb b/ext/-test-/bug_reporter/extconf.rb
deleted file mode 100644
index 0fccd81a41..0000000000
--- a/ext/-test-/bug_reporter/extconf.rb
+++ /dev/null
@@ -1 +0,0 @@
-create_makefile("-test-/bug_reporter/bug_reporter")
diff --git a/ext/-test-/class/class2name.c b/ext/-test-/class/class2name.c
deleted file mode 100644
index c48df6fb2a..0000000000
--- a/ext/-test-/class/class2name.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include <ruby/ruby.h>
-
-static VALUE
-class2name(VALUE self, VALUE klass)
-{
- const char *name = rb_class2name(klass);
- return name ? rb_str_new_cstr(name) : Qnil;
-}
-
-void
-Init_class2name(VALUE klass)
-{
- rb_define_singleton_method(klass, "class2name", class2name, 1);
-}
diff --git a/ext/-test-/class/extconf.rb b/ext/-test-/class/extconf.rb
deleted file mode 100644
index a07d660b87..0000000000
--- a/ext/-test-/class/extconf.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-$INCFLAGS << " -I$(topdir) -I$(top_srcdir)"
-$srcs = Dir[File.join($srcdir, "*.{#{SRC_EXT.join(%q{,})}}")]
-inits = $srcs.map {|s| File.basename(s, ".*")}
-inits.delete("init")
-inits.map! {|s|"X(#{s})"}
-$defs << "-DTEST_INIT_FUNCS(X)=\"#{inits.join(' ')}\""
-create_makefile("-test-/class")
diff --git a/ext/-test-/class/init.c b/ext/-test-/class/init.c
deleted file mode 100644
index ed715c1942..0000000000
--- a/ext/-test-/class/init.c
+++ /dev/null
@@ -1,11 +0,0 @@
-#include "ruby.h"
-
-#define init(n) {void Init_##n(VALUE mod); Init_##n(mod);}
-
-void
-Init_class(void)
-{
- VALUE mBug = rb_define_module("Bug");
- VALUE mod = rb_define_module_under(mBug, "Class");
- TEST_INIT_FUNCS(init);
-}
diff --git a/ext/-test-/debug/depend b/ext/-test-/debug/depend
deleted file mode 100644
index d5a2ef9a52..0000000000
--- a/ext/-test-/debug/depend
+++ /dev/null
@@ -1,3 +0,0 @@
-init.o: $(HDRS) $(ruby_headers)
-inspector.o: $(HDRS) $(ruby_headers) $(hdrdir)/ruby/debug.h
-profile_frames.o: $(HDRS) $(ruby_headers) $(hdrdir)/ruby/debug.h
diff --git a/ext/-test-/debug/extconf.rb b/ext/-test-/debug/extconf.rb
deleted file mode 100644
index 8f7922e1a6..0000000000
--- a/ext/-test-/debug/extconf.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-$srcs = Dir[File.join($srcdir, "*.{#{SRC_EXT.join(%q{,})}}")]
-inits = $srcs.map {|s| File.basename(s, ".*")}
-inits.delete("init")
-inits.map! {|s|"X(#{s})"}
-$defs << "-DTEST_INIT_FUNCS(X)=\"#{inits.join(' ')}\""
-create_makefile("-test-/debug")
diff --git a/ext/-test-/debug/init.c b/ext/-test-/debug/init.c
deleted file mode 100644
index fe3979cbc5..0000000000
--- a/ext/-test-/debug/init.c
+++ /dev/null
@@ -1,11 +0,0 @@
-#include "ruby.h"
-
-#define init(n) {void Init_##n(VALUE klass); Init_##n(klass);}
-
-void
-Init_debug(void)
-{
- VALUE mBug = rb_define_module("Bug");
- VALUE klass = rb_define_module_under(mBug, "Debug");
- TEST_INIT_FUNCS(init);
-}
diff --git a/ext/-test-/debug/inspector.c b/ext/-test-/debug/inspector.c
deleted file mode 100644
index f0c58e59f9..0000000000
--- a/ext/-test-/debug/inspector.c
+++ /dev/null
@@ -1,32 +0,0 @@
-#include "ruby/ruby.h"
-#include "ruby/debug.h"
-
-static VALUE
-callback(const rb_debug_inspector_t *dbg_context, void *data)
-{
- VALUE locs = rb_debug_inspector_backtrace_locations(dbg_context);
- long i, len = RARRAY_LEN(locs);
- VALUE binds = rb_ary_new();
- for (i = 0; i < len; ++i) {
- VALUE entry = rb_ary_new();
- rb_ary_push(binds, entry);
- rb_ary_push(entry, rb_debug_inspector_frame_self_get(dbg_context, i));
- rb_ary_push(entry, rb_debug_inspector_frame_binding_get(dbg_context, i));
- rb_ary_push(entry, rb_debug_inspector_frame_class_get(dbg_context, i));
- rb_ary_push(entry, rb_debug_inspector_frame_iseq_get(dbg_context, i));
- rb_ary_push(entry, rb_ary_entry(locs, i));
- }
- return binds;
-}
-
-static VALUE
-debug_inspector(VALUE self)
-{
- return rb_debug_inspector_open(callback, NULL);
-}
-
-void
-Init_inspector(VALUE klass)
-{
- rb_define_module_function(klass, "inspector", debug_inspector, 0);
-}
diff --git a/ext/-test-/debug/profile_frames.c b/ext/-test-/debug/profile_frames.c
deleted file mode 100644
index 1656ff7d4b..0000000000
--- a/ext/-test-/debug/profile_frames.c
+++ /dev/null
@@ -1,43 +0,0 @@
-#include "ruby/ruby.h"
-#include "ruby/debug.h"
-
-#define MAX_BUF_SIZE 0x100
-
-static VALUE
-profile_frames(VALUE self, VALUE start_v, VALUE num_v)
-{
- int i, collected_size;
- int start = NUM2INT(start_v);
- int buff_size = NUM2INT(num_v);
- VALUE buff[MAX_BUF_SIZE];
- int lines[MAX_BUF_SIZE];
- VALUE result = rb_ary_new();
-
- if (buff_size > MAX_BUF_SIZE) rb_raise(rb_eRuntimeError, "too long buff_size");
-
- collected_size = rb_profile_frames(start, buff_size, buff, lines);
-
- for (i=0; i<collected_size; i++) {
- VALUE ary = rb_ary_new();
- rb_ary_push(ary, rb_profile_frame_path(buff[i]));
- rb_ary_push(ary, rb_profile_frame_absolute_path(buff[i]));
- rb_ary_push(ary, rb_profile_frame_label(buff[i]));
- rb_ary_push(ary, rb_profile_frame_base_label(buff[i]));
- rb_ary_push(ary, rb_profile_frame_full_label(buff[i]));
- rb_ary_push(ary, rb_profile_frame_first_lineno(buff[i]));
- rb_ary_push(ary, rb_profile_frame_classpath(buff[i]));
- rb_ary_push(ary, rb_profile_frame_singleton_method_p(buff[i]));
- rb_ary_push(ary, rb_profile_frame_method_name(buff[i]));
- rb_ary_push(ary, rb_profile_frame_qualified_method_name(buff[i]));
-
- rb_ary_push(result, ary);
- }
-
- return result;
-}
-
-void
-Init_profile_frames(VALUE klass)
-{
- rb_define_module_function(klass, "profile_frames", profile_frames, 2);
-}
diff --git a/ext/-test-/exception/dataerror.c b/ext/-test-/exception/dataerror.c
deleted file mode 100644
index d8beba8aa4..0000000000
--- a/ext/-test-/exception/dataerror.c
+++ /dev/null
@@ -1,31 +0,0 @@
-#include <ruby/ruby.h>
-
-static void
-dataerror_mark(void *ptr)
-{
- rb_gc_mark((VALUE)ptr);
-}
-
-static void
-dataerror_free(void *ptr)
-{
-}
-
-static const rb_data_type_t dataerror_type = {
- "Bug #9167",
- {dataerror_mark, dataerror_free},
-};
-
-static VALUE
-dataerror_alloc(VALUE klass)
-{
- VALUE n = rb_str_new_cstr("[Bug #9167] error");
- return TypedData_Wrap_Struct(klass, &dataerror_type, (void *)n);
-}
-
-void
-Init_dataerror(VALUE klass)
-{
- VALUE rb_eDataErr = rb_define_class_under(klass, "DataError", rb_eStandardError);
- rb_define_alloc_func(rb_eDataErr, dataerror_alloc);
-}
diff --git a/ext/-test-/exception/depend b/ext/-test-/exception/depend
deleted file mode 100644
index 79b6c53f50..0000000000
--- a/ext/-test-/exception/depend
+++ /dev/null
@@ -1,3 +0,0 @@
-$(OBJS): $(HDRS) $(ruby_headers) \
- $(hdrdir)/ruby/encoding.h \
- $(hdrdir)/ruby/oniguruma.h
diff --git a/ext/-test-/exception/ensured.c b/ext/-test-/exception/ensured.c
deleted file mode 100644
index 365e1f4f79..0000000000
--- a/ext/-test-/exception/ensured.c
+++ /dev/null
@@ -1,25 +0,0 @@
-#include <ruby.h>
-
-static VALUE
-begin(VALUE object)
-{
- return rb_funcall(object, rb_intern("try_method"), 0);
-}
-
-static VALUE
-ensure(VALUE object)
-{
- return rb_funcall(object, rb_intern("ensured_method"), 0);
-}
-
-static VALUE
-ensured(VALUE module, VALUE object)
-{
- return rb_ensure(begin, object, ensure, object);
-}
-
-void
-Init_ensured(VALUE klass)
-{
- rb_define_module_function(klass, "ensured", ensured, 1);
-}
diff --git a/ext/-test-/file/depend b/ext/-test-/file/depend
deleted file mode 100644
index 7555a235b5..0000000000
--- a/ext/-test-/file/depend
+++ /dev/null
@@ -1,2 +0,0 @@
-init.o: $(HDRS) $(ruby_headers)
-stat.o: $(HDRS) $(ruby_headers) $(hdrdir)/ruby/io.h $(hdrdir)/ruby/encoding.h $(hdrdir)/oniguruma.h
diff --git a/ext/-test-/file/extconf.rb b/ext/-test-/file/extconf.rb
deleted file mode 100644
index 4e134dd1bf..0000000000
--- a/ext/-test-/file/extconf.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-$INCFLAGS << " -I$(topdir) -I$(top_srcdir)"
-$srcs = Dir[File.join($srcdir, "*.{#{SRC_EXT.join(%q{,})}}")]
-inits = $srcs.map {|s| File.basename(s, ".*")}
-inits.delete("init")
-inits.map! {|s|"X(#{s})"}
-$defs << "-DTEST_INIT_FUNCS(X)=\"#{inits.join(' ')}\""
-create_makefile("-test-/file")
diff --git a/ext/-test-/file/init.c b/ext/-test-/file/init.c
deleted file mode 100644
index 1117993d6c..0000000000
--- a/ext/-test-/file/init.c
+++ /dev/null
@@ -1,11 +0,0 @@
-#include "ruby.h"
-
-#define init(n) {void Init_##n(VALUE klass); Init_##n(module);}
-
-void
-Init_file(void)
-{
- VALUE mBug = rb_define_module("Bug");
- VALUE module = rb_define_module_under(mBug, "File");
- TEST_INIT_FUNCS(init);
-}
diff --git a/ext/-test-/file/stat.c b/ext/-test-/file/stat.c
deleted file mode 100644
index fed5d389eb..0000000000
--- a/ext/-test-/file/stat.c
+++ /dev/null
@@ -1,27 +0,0 @@
-#include "ruby/ruby.h"
-#include "ruby/io.h"
-
-static VALUE
-stat_for_fd(VALUE self, VALUE fileno)
-{
- struct stat st;
- if (fstat(NUM2INT(fileno), &st)) rb_sys_fail(0);
- return rb_stat_new(&st);
-}
-
-static VALUE
-stat_for_path(VALUE self, VALUE path)
-{
- struct stat st;
- FilePathValue(path);
- if (stat(RSTRING_PTR(path), &st)) rb_sys_fail(0);
- return rb_stat_new(&st);
-}
-
-void
-Init_stat(VALUE module)
-{
- VALUE st = rb_define_module_under(module, "Stat");
- rb_define_module_function(st, "for_fd", stat_for_fd, 1);
- rb_define_module_function(st, "for_path", stat_for_path, 1);
-}
diff --git a/ext/-test-/iter/break.c b/ext/-test-/iter/break.c
index 66ed26a9b8..b72440f838 100644
--- a/ext/-test-/iter/break.c
+++ b/ext/-test-/iter/break.c
@@ -1,14 +1,6 @@
#include <ruby.h>
static VALUE
-iter_break(VALUE self)
-{
- rb_iter_break();
-
- UNREACHABLE;
-}
-
-static VALUE
iter_break_value(VALUE self, VALUE val)
{
rb_iter_break_value(val);
@@ -17,9 +9,8 @@ iter_break_value(VALUE self, VALUE val)
}
void
-Init_break(VALUE klass)
+Init_break(void)
{
- VALUE breakable = rb_define_module_under(klass, "Breakable");
- rb_define_module_function(breakable, "iter_break", iter_break, 0);
- rb_define_module_function(breakable, "iter_break_value", iter_break_value, 1);
+ VALUE breakable = rb_define_module_under(rb_define_module("Bug"), "Breakable");
+ rb_define_module_function(breakable, "iter_break", iter_break_value, 1);
}
diff --git a/ext/-test-/iter/extconf.rb b/ext/-test-/iter/extconf.rb
index 0ba99691bd..695b5e9f6d 100644
--- a/ext/-test-/iter/extconf.rb
+++ b/ext/-test-/iter/extconf.rb
@@ -1,7 +1 @@
-$INCFLAGS << " -I$(topdir) -I$(top_srcdir)"
-$srcs = Dir[File.join($srcdir, "*.{#{SRC_EXT.join(%q{,})}}")]
-inits = $srcs.map {|s| File.basename(s, ".*")}
-inits.delete("init")
-inits.map! {|s|"X(#{s})"}
-$defs << "-DTEST_INIT_FUNCS(X)=\"#{inits.join(' ')}\""
-create_makefile("-test-/iter")
+create_makefile("-test-/iter/break")
diff --git a/ext/-test-/iter/init.c b/ext/-test-/iter/init.c
deleted file mode 100644
index a074ec46a9..0000000000
--- a/ext/-test-/iter/init.c
+++ /dev/null
@@ -1,11 +0,0 @@
-#include "ruby.h"
-
-#define init(n) {void Init_##n(VALUE klass); Init_##n(klass);}
-
-void
-Init_iter(void)
-{
- VALUE mBug = rb_define_module("Bug");
- VALUE klass = rb_define_module_under(mBug, "Iter");
- TEST_INIT_FUNCS(init);
-}
diff --git a/ext/-test-/iter/yield.c b/ext/-test-/iter/yield.c
deleted file mode 100644
index 3cd408a928..0000000000
--- a/ext/-test-/iter/yield.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <ruby.h>
-
-static VALUE
-yield_block(int argc, VALUE *argv, VALUE self)
-{
- rb_check_arity(argc, 1, UNLIMITED_ARGUMENTS);
- return rb_block_call(self, rb_to_id(argv[0]), argc-1, argv+1, rb_yield_block, 0);
-}
-
-void
-Init_yield(VALUE klass)
-{
- VALUE yield = rb_define_module_under(klass, "Yield");
-
- rb_define_method(yield, "yield_block", yield_block, -1);
-}
diff --git a/ext/-test-/method/arity.c b/ext/-test-/method/arity.c
deleted file mode 100644
index 239b9f7f10..0000000000
--- a/ext/-test-/method/arity.c
+++ /dev/null
@@ -1,22 +0,0 @@
-#include "ruby.h"
-
-static VALUE
-obj_method_arity(VALUE self, VALUE obj, VALUE mid)
-{
- int arity = rb_obj_method_arity(obj, rb_check_id(&mid));
- return INT2FIX(arity);
-}
-
-static VALUE
-mod_method_arity(VALUE self, VALUE mod, VALUE mid)
-{
- int arity = rb_mod_method_arity(mod, rb_check_id(&mid));
- return INT2FIX(arity);
-}
-
-void
-Init_arity(VALUE mod)
-{
- rb_define_module_function(mod, "obj_method_arity", obj_method_arity, 2);
- rb_define_module_function(mod, "mod_method_arity", mod_method_arity, 2);
-}
diff --git a/ext/-test-/method/extconf.rb b/ext/-test-/method/extconf.rb
deleted file mode 100644
index 658b7af1f1..0000000000
--- a/ext/-test-/method/extconf.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-$srcs = Dir[File.join($srcdir, "*.{#{SRC_EXT.join(%q{,})}}")]
-inits = $srcs.map {|s| File.basename(s, ".*")}
-inits.delete("init")
-inits.map! {|s|"X(#{s})"}
-$defs << "-DTEST_INIT_FUNCS(X)=\"#{inits.join(' ')}\""
-create_makefile("-test-/method")
diff --git a/ext/-test-/method/init.c b/ext/-test-/method/init.c
deleted file mode 100644
index cea2346240..0000000000
--- a/ext/-test-/method/init.c
+++ /dev/null
@@ -1,11 +0,0 @@
-#include "ruby.h"
-
-#define init(n) {void Init_##n(VALUE klass); Init_##n(klass);}
-
-void
-Init_method(void)
-{
- VALUE mBug = rb_define_module("Bug");
- VALUE klass = rb_define_module_under(mBug, "Method");
- TEST_INIT_FUNCS(init);
-}
diff --git a/ext/-test-/num2int/depend b/ext/-test-/num2int/depend
new file mode 100644
index 0000000000..7a85cdb6c0
--- /dev/null
+++ b/ext/-test-/num2int/depend
@@ -0,0 +1 @@
+num2int.o: $(top_srcdir)/numeric.c $(hdrdir)/ruby/ruby.h
diff --git a/ext/-test-/num2int/num2int.c b/ext/-test-/num2int/num2int.c
index 3aec3ccf3b..fb1ea9678d 100644
--- a/ext/-test-/num2int/num2int.c
+++ b/ext/-test-/num2int/num2int.c
@@ -1,136 +1,120 @@
#include <ruby.h>
static VALUE
-test_num2short(VALUE obj, VALUE num)
+print_num2short(VALUE obj, VALUE num)
{
char buf[128];
+ VALUE str;
+
sprintf(buf, "%d", NUM2SHORT(num));
- return rb_str_new_cstr(buf);
+ str = rb_str_new_cstr(buf);
+ rb_io_write(rb_stdout, str);
+ return Qnil;
}
static VALUE
-test_num2ushort(VALUE obj, VALUE num)
+print_num2ushort(VALUE obj, VALUE num)
{
char buf[128];
+ VALUE str;
+
sprintf(buf, "%u", NUM2USHORT(num));
- return rb_str_new_cstr(buf);
+ str = rb_str_new_cstr(buf);
+ rb_io_write(rb_stdout, str);
+ return Qnil;
}
static VALUE
-test_num2int(VALUE obj, VALUE num)
+print_num2int(VALUE obj, VALUE num)
{
char buf[128];
+ VALUE str;
+
sprintf(buf, "%d", NUM2INT(num));
- return rb_str_new_cstr(buf);
+ str = rb_str_new_cstr(buf);
+ rb_io_write(rb_stdout, str);
+ return Qnil;
}
static VALUE
-test_num2uint(VALUE obj, VALUE num)
+print_num2uint(VALUE obj, VALUE num)
{
char buf[128];
+ VALUE str;
+
sprintf(buf, "%u", NUM2UINT(num));
- return rb_str_new_cstr(buf);
+ str = rb_str_new_cstr(buf);
+ rb_io_write(rb_stdout, str);
+ return Qnil;
}
static VALUE
-test_num2long(VALUE obj, VALUE num)
+print_num2long(VALUE obj, VALUE num)
{
char buf[128];
+ VALUE str;
+
sprintf(buf, "%ld", NUM2LONG(num));
- return rb_str_new_cstr(buf);
+ str = rb_str_new_cstr(buf);
+ rb_io_write(rb_stdout, str);
+ return Qnil;
}
static VALUE
-test_num2ulong(VALUE obj, VALUE num)
+print_num2ulong(VALUE obj, VALUE num)
{
char buf[128];
+ VALUE str;
+
sprintf(buf, "%lu", NUM2ULONG(num));
- return rb_str_new_cstr(buf);
+ str = rb_str_new_cstr(buf);
+ rb_io_write(rb_stdout, str);
+ return Qnil;
}
#ifdef HAVE_LONG_LONG
static VALUE
-test_num2ll(VALUE obj, VALUE num)
+print_num2ll(VALUE obj, VALUE num)
{
char buf[128];
+ VALUE str;
+
sprintf(buf, "%"PRI_LL_PREFIX"d", NUM2LL(num));
- return rb_str_new_cstr(buf);
+ str = rb_str_new_cstr(buf);
+ rb_io_write(rb_stdout, str);
+ return Qnil;
}
static VALUE
-test_num2ull(VALUE obj, VALUE num)
+print_num2ull(VALUE obj, VALUE num)
{
char buf[128];
+ VALUE str;
+
sprintf(buf, "%"PRI_LL_PREFIX"u", NUM2ULL(num));
- return rb_str_new_cstr(buf);
+ str = rb_str_new_cstr(buf);
+ rb_io_write(rb_stdout, str);
+ return Qnil;
}
#endif
-static VALUE
-test_fix2short(VALUE obj, VALUE num)
-{
- char buf[128];
- sprintf(buf, "%d", FIX2SHORT(num));
- return rb_str_new_cstr(buf);
-}
-
-static VALUE
-test_fix2int(VALUE obj, VALUE num)
-{
- char buf[128];
- sprintf(buf, "%d", FIX2INT(num));
- return rb_str_new_cstr(buf);
-}
-
-static VALUE
-test_fix2uint(VALUE obj, VALUE num)
-{
- char buf[128];
- sprintf(buf, "%u", FIX2UINT(num));
- return rb_str_new_cstr(buf);
-}
-
-static VALUE
-test_fix2long(VALUE obj, VALUE num)
-{
- char buf[128];
- sprintf(buf, "%ld", FIX2LONG(num));
- return rb_str_new_cstr(buf);
-}
-
-static VALUE
-test_fix2ulong(VALUE obj, VALUE num)
-{
- char buf[128];
- sprintf(buf, "%lu", FIX2ULONG(num));
- return rb_str_new_cstr(buf);
-}
-
void
Init_num2int(void)
{
- VALUE mNum2int = rb_define_module("Num2int");
+ VALUE cNum2int = rb_path2class("TestNum2int::Num2int");
- rb_define_module_function(mNum2int, "NUM2SHORT", test_num2short, 1);
- rb_define_module_function(mNum2int, "NUM2USHORT", test_num2ushort, 1);
+ rb_define_singleton_method(cNum2int, "print_num2short", print_num2short, 1);
+ rb_define_singleton_method(cNum2int, "print_num2ushort", print_num2ushort, 1);
- rb_define_module_function(mNum2int, "NUM2INT", test_num2int, 1);
- rb_define_module_function(mNum2int, "NUM2UINT", test_num2uint, 1);
+ rb_define_singleton_method(cNum2int, "print_num2int", print_num2int, 1);
+ rb_define_singleton_method(cNum2int, "print_num2uint", print_num2uint, 1);
- rb_define_module_function(mNum2int, "NUM2LONG", test_num2long, 1);
- rb_define_module_function(mNum2int, "NUM2ULONG", test_num2ulong, 1);
+ rb_define_singleton_method(cNum2int, "print_num2long", print_num2long, 1);
+ rb_define_singleton_method(cNum2int, "print_num2ulong", print_num2ulong, 1);
#ifdef HAVE_LONG_LONG
- rb_define_module_function(mNum2int, "NUM2LL", test_num2ll, 1);
- rb_define_module_function(mNum2int, "NUM2ULL", test_num2ull, 1);
+ rb_define_singleton_method(cNum2int, "print_num2ll", print_num2ll, 1);
+ rb_define_singleton_method(cNum2int, "print_num2ull", print_num2ull, 1);
#endif
-
- rb_define_module_function(mNum2int, "FIX2SHORT", test_fix2short, 1);
-
- rb_define_module_function(mNum2int, "FIX2INT", test_fix2int, 1);
- rb_define_module_function(mNum2int, "FIX2UINT", test_fix2uint, 1);
-
- rb_define_module_function(mNum2int, "FIX2LONG", test_fix2long, 1);
- rb_define_module_function(mNum2int, "FIX2ULONG", test_fix2ulong, 1);
}
diff --git a/ext/-test-/old_thread_select/depend b/ext/-test-/old_thread_select/depend
index e786dc71d2..a2bc836e1f 100644
--- a/ext/-test-/old_thread_select/depend
+++ b/ext/-test-/old_thread_select/depend
@@ -1,4 +1,2 @@
-$(OBJS): $(HDRS) $(ruby_headers) \
- $(hdrdir)/ruby/io.h \
- $(hdrdir)/ruby/encoding.h \
- $(hdrdir)/ruby/oniguruma.h
+old_thread_select.o: $(top_srcdir)/thread.c \
+ $(hdrdir)/ruby/ruby.h $(hdrdir)/ruby/io.h
diff --git a/ext/-test-/postponed_job/depend b/ext/-test-/postponed_job/depend
deleted file mode 100644
index d672e53f00..0000000000
--- a/ext/-test-/postponed_job/depend
+++ /dev/null
@@ -1 +0,0 @@
-postponed_job.o: $(HDRS) $(ruby_headers) $(hdrdir)/ruby/debug.h
diff --git a/ext/-test-/postponed_job/extconf.rb b/ext/-test-/postponed_job/extconf.rb
deleted file mode 100644
index aa29b593f4..0000000000
--- a/ext/-test-/postponed_job/extconf.rb
+++ /dev/null
@@ -1 +0,0 @@
-create_makefile('-test-/postponed_job')
diff --git a/ext/-test-/postponed_job/postponed_job.c b/ext/-test-/postponed_job/postponed_job.c
deleted file mode 100644
index 157230e33b..0000000000
--- a/ext/-test-/postponed_job/postponed_job.c
+++ /dev/null
@@ -1,53 +0,0 @@
-#include "ruby.h"
-#include "ruby/debug.h"
-
-static void
-pjob_callback(void *data)
-{
- VALUE ary = (VALUE)data;
- Check_Type(ary, T_ARRAY);
-
- rb_ary_replace(ary, rb_funcall(Qnil, rb_intern("caller"), 0));
-}
-
-static VALUE
-pjob_register(VALUE self, VALUE obj)
-{
- rb_postponed_job_register(0, pjob_callback, (void *)obj);
- return self;
-}
-
-static void
-pjob_one_callback(void *data)
-{
- VALUE ary = (VALUE)data;
- Check_Type(ary, T_ARRAY);
-
- rb_ary_push(ary, INT2FIX(1));
-}
-
-static VALUE
-pjob_register_one(VALUE self, VALUE obj)
-{
- rb_postponed_job_register_one(0, pjob_one_callback, (void *)obj);
- rb_postponed_job_register_one(0, pjob_one_callback, (void *)obj);
- rb_postponed_job_register_one(0, pjob_one_callback, (void *)obj);
- return self;
-}
-
-static VALUE
-pjob_call_direct(VALUE self, VALUE obj)
-{
- pjob_callback((void *)obj);
- return self;
-}
-
-void
-Init_postponed_job(VALUE self)
-{
- VALUE mBug = rb_define_module("Bug");
- rb_define_module_function(mBug, "postponed_job_register", pjob_register, 1);
- rb_define_module_function(mBug, "postponed_job_register_one", pjob_register_one, 1);
- rb_define_module_function(mBug, "postponed_job_call_direct", pjob_call_direct, 1);
-}
-
diff --git a/ext/-test-/printf/depend b/ext/-test-/printf/depend
deleted file mode 100644
index 79b6c53f50..0000000000
--- a/ext/-test-/printf/depend
+++ /dev/null
@@ -1,3 +0,0 @@
-$(OBJS): $(HDRS) $(ruby_headers) \
- $(hdrdir)/ruby/encoding.h \
- $(hdrdir)/ruby/oniguruma.h
diff --git a/ext/-test-/printf/printf.c b/ext/-test-/printf/printf.c
index fd60b0f593..775eb33dc7 100644
--- a/ext/-test-/printf/printf.c
+++ b/ext/-test-/printf/printf.c
@@ -21,73 +21,6 @@ printf_test_v(VALUE self, VALUE obj)
return rb_enc_sprintf(rb_usascii_encoding(), "{%+"PRIsVALUE"}", obj);
}
-static VALUE
-printf_test_q(VALUE self, VALUE obj)
-{
- return rb_enc_sprintf(rb_usascii_encoding(), "[% "PRIsVALUE"]", obj);
-}
-
-static char *
-utoa(char *p, char *e, unsigned int x)
-{
- char *e0 = e;
- if (e <= p) return p;
- do {
- *--e = x % 10 + '0';
- } while ((x /= 10) != 0 && e > p);
- memmove(p, e, e0 - e);
- return p + (e0 - e);
-}
-
-static VALUE
-printf_test_call(int argc, VALUE *argv, VALUE self)
-{
- VALUE opt, type, num;
- char format[sizeof(int) * 6 + 8], *p = format, cnv;
- int n;
-
- rb_scan_args(argc, argv, "2:", &type, &num, &opt);
- Check_Type(type, T_STRING);
- if (RSTRING_LEN(type) != 1) rb_raise(rb_eArgError, "wrong length(%ld)", RSTRING_LEN(type));
- switch (cnv = RSTRING_PTR(type)[0]) {
- case 'd': case 'x': case 'o': case 'X': break;
- default: rb_raise(rb_eArgError, "wrong conversion(%c)", cnv);
- }
- n = NUM2INT(num);
- *p++ = '%';
- if (!NIL_P(opt)) {
- VALUE v;
- Check_Type(opt, T_HASH);
- if (RTEST(rb_hash_aref(opt, ID2SYM(rb_intern("space"))))) {
- *p++ = ' ';
- }
- if (RTEST(rb_hash_aref(opt, ID2SYM(rb_intern("hash"))))) {
- *p++ = '#';
- }
- if (RTEST(rb_hash_aref(opt, ID2SYM(rb_intern("plus"))))) {
- *p++ = '+';
- }
- if (RTEST(rb_hash_aref(opt, ID2SYM(rb_intern("minus"))))) {
- *p++ = '-';
- }
- if (RTEST(rb_hash_aref(opt, ID2SYM(rb_intern("zero"))))) {
- *p++ = '0';
- }
- if (!NIL_P(v = rb_hash_aref(opt, ID2SYM(rb_intern("width"))))) {
- p = utoa(p, format + sizeof(format), NUM2UINT(v));
- }
- if (!NIL_P(v = rb_hash_aref(opt, ID2SYM(rb_intern("prec"))))) {
- *p++ = '.';
- if (FIXNUM_P(v))
- p = utoa(p, format + sizeof(format), NUM2UINT(v));
- }
- }
- *p++ = cnv;
- *p++ = '\0';
- return rb_assoc_new(rb_enc_sprintf(rb_usascii_encoding(), format, n),
- rb_usascii_str_new_cstr(format));
-}
-
void
Init_printf(void)
{
@@ -95,6 +28,4 @@ Init_printf(void)
rb_define_singleton_method(m, "i", printf_test_i, 1);
rb_define_singleton_method(m, "s", printf_test_s, 1);
rb_define_singleton_method(m, "v", printf_test_v, 1);
- rb_define_singleton_method(m, "q", printf_test_q, 1);
- rb_define_singleton_method(m, "call", printf_test_call, -1);
}
diff --git a/ext/-test-/rational/depend b/ext/-test-/rational/depend
deleted file mode 100644
index a43589042b..0000000000
--- a/ext/-test-/rational/depend
+++ /dev/null
@@ -1,3 +0,0 @@
-$(OBJS): $(HDRS) $(ruby_headers)
-
-rat.o: rat.c $(top_srcdir)/internal.h
diff --git a/ext/-test-/rational/extconf.rb b/ext/-test-/rational/extconf.rb
deleted file mode 100644
index bd658def46..0000000000
--- a/ext/-test-/rational/extconf.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-$INCFLAGS << " -I$(topdir) -I$(top_srcdir)"
-$srcs = Dir[File.join($srcdir, "*.{#{SRC_EXT.join(%q{,})}}")]
-inits = $srcs.map {|s| File.basename(s, ".*")}
-inits.delete("init")
-inits.map! {|s|"X(#{s})"}
-$defs << "-DTEST_INIT_FUNCS(X)=\"#{inits.join(' ')}\""
-create_makefile("-test-/rational")
diff --git a/ext/-test-/rational/rat.c b/ext/-test-/rational/rat.c
deleted file mode 100644
index 63ca849816..0000000000
--- a/ext/-test-/rational/rat.c
+++ /dev/null
@@ -1,38 +0,0 @@
-#include "ruby.h"
-#include "internal.h"
-
-#if defined(HAVE_LIBGMP) && defined(HAVE_GMP_H)
-static VALUE
-big(VALUE x)
-{
- if (FIXNUM_P(x))
- return rb_int2big(FIX2LONG(x));
- if (RB_TYPE_P(x, T_BIGNUM))
- return x;
- rb_raise(rb_eTypeError, "can't convert %s to Bignum",
- rb_obj_classname(x));
-}
-#endif
-
-static VALUE
-gcd_normal(VALUE x, VALUE y)
-{
- return rb_big_norm(rb_gcd_normal(rb_to_int(x), rb_to_int(y)));
-}
-
-#if defined(HAVE_LIBGMP) && defined(HAVE_GMP_H)
-static VALUE
-gcd_gmp(VALUE x, VALUE y)
-{
- return rb_big_norm(rb_gcd_gmp(big(x), big(y)));
-}
-#else
-#define gcd_gmp rb_f_notimplement
-#endif
-
-void
-Init_rational(VALUE klass)
-{
- rb_define_method(rb_cInteger, "gcd_normal", gcd_normal, 1);
- rb_define_method(rb_cInteger, "gcd_gmp", gcd_gmp, 1);
-}
diff --git a/ext/-test-/recursion/extconf.rb b/ext/-test-/recursion/extconf.rb
deleted file mode 100644
index 92b28657f0..0000000000
--- a/ext/-test-/recursion/extconf.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-require 'mkmf'
-create_makefile("-test-/recursion")
diff --git a/ext/-test-/recursion/recursion.c b/ext/-test-/recursion/recursion.c
deleted file mode 100644
index 13d41f0ba8..0000000000
--- a/ext/-test-/recursion/recursion.c
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <ruby.h>
-
-static VALUE
-recursive_i(VALUE obj, VALUE mid, int recur)
-{
- if (recur) return Qnil;
- return rb_funcallv(obj, rb_to_id(mid), 0, 0);
-}
-
-static VALUE
-exec_recursive(VALUE self, VALUE mid)
-{
- return rb_exec_recursive(recursive_i, self, mid);
-}
-
-static VALUE
-exec_recursive_outer(VALUE self, VALUE mid)
-{
- return rb_exec_recursive_outer(recursive_i, self, mid);
-}
-
-void
-Init_recursion(void)
-{
- VALUE m = rb_define_module_under(rb_define_module("Bug"), "Recursive");
- rb_define_method(m, "exec_recursive", exec_recursive, 1);
- rb_define_method(m, "exec_recursive_outer", exec_recursive_outer, 1);
-}
diff --git a/ext/-test-/string/cstr.c b/ext/-test-/string/cstr.c
index c2ed410b41..d4ff360575 100644
--- a/ext/-test-/string/cstr.c
+++ b/ext/-test-/string/cstr.c
@@ -1,22 +1,16 @@
#include "ruby.h"
-#include "ruby/encoding.h"
static VALUE
bug_str_cstr_term(VALUE str)
{
long len;
char *s;
- int c;
- rb_encoding *enc;
-
rb_str_modify(str);
len = RSTRING_LEN(str);
RSTRING_PTR(str)[len] = 'x';
s = StringValueCStr(str);
rb_gc();
- enc = rb_enc_get(str);
- c = rb_enc_codepoint(&s[len], &s[len+rb_enc_mbminlen(enc)], enc);
- return INT2NUM(c);
+ return INT2NUM(s[len]);
}
void
diff --git a/ext/-test-/string/depend b/ext/-test-/string/depend
deleted file mode 100644
index 86617ff289..0000000000
--- a/ext/-test-/string/depend
+++ /dev/null
@@ -1,5 +0,0 @@
-$(OBJS): $(HDRS) $(ruby_headers) \
- $(hdrdir)/ruby/encoding.h \
- $(hdrdir)/ruby/oniguruma.h
-qsort.o: $(hdrdir)/ruby/util.h
-normalize.o: $(top_srcdir)/internal.h
diff --git a/ext/-test-/string/extconf.rb b/ext/-test-/string/extconf.rb
index 10d33cbab9..42c10b994b 100644
--- a/ext/-test-/string/extconf.rb
+++ b/ext/-test-/string/extconf.rb
@@ -1,4 +1,3 @@
-$INCFLAGS << " -I$(topdir) -I$(top_srcdir)"
$srcs = Dir[File.join($srcdir, "*.{#{SRC_EXT.join(%q{,})}}")]
inits = $srcs.map {|s| File.basename(s, ".*")}
inits.delete("init")
diff --git a/ext/-test-/string/normalize.c b/ext/-test-/string/normalize.c
deleted file mode 100644
index 22bb6d7887..0000000000
--- a/ext/-test-/string/normalize.c
+++ /dev/null
@@ -1,18 +0,0 @@
-#include "ruby.h"
-#include "internal.h"
-
-#ifdef __APPLE__
-static VALUE
-normalize_ospath(VALUE str)
-{
- return rb_str_normalize_ospath(RSTRING_PTR(str), RSTRING_LEN(str));
-}
-#else
-#define normalize_ospath rb_f_notimplement
-#endif
-
-void
-Init_normalize(VALUE klass)
-{
- rb_define_method(klass, "normalize_ospath", normalize_ospath, 0);
-}
diff --git a/ext/-test-/symbol/extconf.rb b/ext/-test-/symbol/extconf.rb
index 0b7c3876fa..d093ff682a 100644
--- a/ext/-test-/symbol/extconf.rb
+++ b/ext/-test-/symbol/extconf.rb
@@ -3,4 +3,4 @@ inits = $srcs.map {|s| File.basename(s, ".*")}
inits.delete("init")
inits.map! {|s|"X(#{s})"}
$defs << "-DTEST_INIT_FUNCS(X)=\"#{inits.join(' ')}\""
-create_makefile("-test-/symbol")
+create_makefile("-test-/symbol/symbol")
diff --git a/ext/-test-/symbol/type.c b/ext/-test-/symbol/type.c
deleted file mode 100644
index 17f2d6824b..0000000000
--- a/ext/-test-/symbol/type.c
+++ /dev/null
@@ -1,50 +0,0 @@
-#include "ruby.h"
-
-#ifdef HAVE_RB_IS_CONST_NAME
-# define get_symbol_type(type, t, name) do { \
- ID id = rb_check_id(&name); \
- t = (id ? rb_is_##type##_id(id) : rb_is_##type##_name(name)); \
- } while (0)
-#else
-# define get_symbol_type(type, t, name) do { \
- t = rb_is_##type##_id(rb_to_id(name)); \
- } while (0)
-#endif
-
-#define define_symbol_type_p(type) \
-static VALUE \
-bug_sym_##type##_p(VALUE self, VALUE name) \
-{ \
- int t; \
- get_symbol_type(type, t, name); \
- return (t ? Qtrue : Qfalse); \
-}
-
-#define declare_symbol_type_p(type) \
- rb_define_singleton_method(klass, #type"?", bug_sym_##type##_p, 1);
-
-#define FOREACH_ID_TYPES(x) x(const) x(class) x(global) x(instance) x(attrset) x(local) x(junk)
-
-FOREACH_ID_TYPES(define_symbol_type_p)
-
-static VALUE
-bug_sym_attrset(VALUE self, VALUE name)
-{
- ID id = rb_to_id(name);
- id = rb_id_attrset(id);
- return ID2SYM(id);
-}
-
-static VALUE
-bug_id2str(VALUE self, VALUE sym)
-{
- return rb_id2str(SYM2ID(sym));
-}
-
-void
-Init_type(VALUE klass)
-{
- FOREACH_ID_TYPES(declare_symbol_type_p);
- rb_define_singleton_method(klass, "attrset", bug_sym_attrset, 1);
- rb_define_singleton_method(klass, "id2str", bug_id2str, 1);
-}
diff --git a/ext/-test-/tracepoint/depend b/ext/-test-/tracepoint/depend
deleted file mode 100644
index 8d4e5ab343..0000000000
--- a/ext/-test-/tracepoint/depend
+++ /dev/null
@@ -1 +0,0 @@
-tracepoint.o: $(HDRS) $(ruby_headers) $(hdrdir)/ruby/debug.h
diff --git a/ext/-test-/tracepoint/extconf.rb b/ext/-test-/tracepoint/extconf.rb
deleted file mode 100644
index c0c2399eb4..0000000000
--- a/ext/-test-/tracepoint/extconf.rb
+++ /dev/null
@@ -1 +0,0 @@
-create_makefile("-test-/tracepoint")
diff --git a/ext/-test-/tracepoint/gc_hook.c b/ext/-test-/tracepoint/gc_hook.c
deleted file mode 100644
index 6d8485ecb1..0000000000
--- a/ext/-test-/tracepoint/gc_hook.c
+++ /dev/null
@@ -1,80 +0,0 @@
-#include "ruby/ruby.h"
-#include "ruby/debug.h"
-
-static int invoking; /* TODO: should not be global variable */
-
-static VALUE
-invoke_proc_ensure(void *dmy)
-{
- invoking = 0;
- return Qnil;
-}
-
-static VALUE
-invoke_proc_begin(VALUE proc)
-{
- return rb_proc_call(proc, rb_ary_new());
-}
-
-static void
-invoke_proc(void *data)
-{
- VALUE proc = (VALUE)data;
- invoking += 1;
- rb_ensure(invoke_proc_begin, proc, invoke_proc_ensure, 0);
-}
-
-static void
-gc_start_end_i(VALUE tpval, void *data)
-{
- if (0) {
- rb_trace_arg_t *tparg = rb_tracearg_from_tracepoint(tpval);
- fprintf(stderr, "trace: %s\n", rb_tracearg_event_flag(tparg) == RUBY_INTERNAL_EVENT_GC_START ? "gc_start" : "gc_end");
- }
-
- if (invoking == 0) {
- rb_postponed_job_register(0, invoke_proc, data);
- }
-}
-
-static VALUE
-set_gc_hook(VALUE module, VALUE proc, rb_event_flag_t event, const char *tp_str, const char *proc_str)
-{
- VALUE tpval;
- ID tp_key = rb_intern(tp_str);
- ID proc_key = rb_intern(proc_str);
-
- /* disable previous keys */
- if (rb_ivar_defined(module, tp_key) != 0 &&
- RTEST(tpval = rb_ivar_get(module, tp_key))) {
- rb_tracepoint_disable(tpval);
- rb_ivar_set(module, tp_key, Qnil);
- rb_ivar_set(module, proc_key, Qnil);
- }
-
- if (RTEST(proc)) {
- if (!rb_obj_is_proc(proc)) {
- rb_raise(rb_eTypeError, "trace_func needs to be Proc");
- }
-
- tpval = rb_tracepoint_new(0, event, gc_start_end_i, (void *)proc);
- rb_ivar_set(module, tp_key, tpval);
- rb_ivar_set(module, proc_key, proc); /* GC guard */
- rb_tracepoint_enable(tpval);
- }
-
- return proc;
-}
-
-static VALUE
-set_after_gc_start(VALUE module, VALUE proc)
-{
- return set_gc_hook(module, proc, RUBY_INTERNAL_EVENT_GC_START,
- "__set_after_gc_start_tpval__", "__set_after_gc_start_proc__");
-}
-
-void
-Init_gc_hook(VALUE module)
-{
- rb_define_module_function(module, "after_gc_start_hook=", set_after_gc_start, 1);
-}
diff --git a/ext/-test-/tracepoint/tracepoint.c b/ext/-test-/tracepoint/tracepoint.c
deleted file mode 100644
index 245dbd6191..0000000000
--- a/ext/-test-/tracepoint/tracepoint.c
+++ /dev/null
@@ -1,97 +0,0 @@
-#include "ruby/ruby.h"
-#include "ruby/debug.h"
-
-struct tracepoint_track {
- size_t newobj_count;
- size_t free_count;
- size_t gc_start_count;
- size_t gc_end_mark_count;
- size_t gc_end_sweep_count;
- size_t objects_count;
- VALUE objects[10];
-};
-
-#define objects_max (sizeof(((struct tracepoint_track *)NULL)->objects)/sizeof(VALUE))
-
-static void
-tracepoint_track_objspace_events_i(VALUE tpval, void *data)
-{
- rb_trace_arg_t *tparg = rb_tracearg_from_tracepoint(tpval);
- struct tracepoint_track *track = data;
-
- switch (rb_tracearg_event_flag(tparg)) {
- case RUBY_INTERNAL_EVENT_NEWOBJ:
- {
- VALUE obj = rb_tracearg_object(tparg);
- if (track->objects_count < objects_max)
- track->objects[track->objects_count++] = obj;
- track->newobj_count++;
- break;
- }
- case RUBY_INTERNAL_EVENT_FREEOBJ:
- {
- track->free_count++;
- break;
- }
- case RUBY_INTERNAL_EVENT_GC_START:
- {
- track->gc_start_count++;
- break;
- }
- case RUBY_INTERNAL_EVENT_GC_END_MARK:
- {
- track->gc_end_mark_count++;
- break;
- }
- case RUBY_INTERNAL_EVENT_GC_END_SWEEP:
- {
- track->gc_end_sweep_count++;
- break;
- }
- default:
- rb_raise(rb_eRuntimeError, "unknown event");
- }
-}
-
-static VALUE
-tracepoint_track_objspace_events(VALUE self)
-{
- struct tracepoint_track track = {0, 0, 0, 0, 0,};
- VALUE tpval = rb_tracepoint_new(0, 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,
- tracepoint_track_objspace_events_i, &track);
- VALUE result = rb_ary_new();
-
- rb_tracepoint_enable(tpval);
- rb_yield(Qundef);
- rb_tracepoint_disable(tpval);
-
- rb_ary_push(result, SIZET2NUM(track.newobj_count));
- rb_ary_push(result, SIZET2NUM(track.free_count));
- rb_ary_push(result, SIZET2NUM(track.gc_start_count));
- rb_ary_push(result, SIZET2NUM(track.gc_end_mark_count));
- rb_ary_push(result, SIZET2NUM(track.gc_end_sweep_count));
- rb_ary_cat(result, track.objects, track.objects_count);
-
- return result;
-}
-
-static VALUE
-tracepoint_specify_normal_and_internal_events(VALUE self)
-{
- VALUE tpval = rb_tracepoint_new(0, RUBY_INTERNAL_EVENT_NEWOBJ | RUBY_EVENT_CALL, 0, 0);
- rb_tracepoint_enable(tpval);
- return Qnil; /* should not be reached */
-}
-
-void Init_gc_hook(VALUE);
-
-void
-Init_tracepoint(void)
-{
- VALUE mBug = rb_define_module("Bug");
- Init_gc_hook(mBug);
- rb_define_module_function(mBug, "tracepoint_track_objspace_events", tracepoint_track_objspace_events, 0);
- rb_define_module_function(mBug, "tracepoint_specify_normal_and_internal_events", tracepoint_specify_normal_and_internal_events, 0);
-}
diff --git a/ext/-test-/wait_for_single_fd/depend b/ext/-test-/wait_for_single_fd/depend
index b94e507631..d9cd50a542 100644
--- a/ext/-test-/wait_for_single_fd/depend
+++ b/ext/-test-/wait_for_single_fd/depend
@@ -1,4 +1,2 @@
-$(OBJS): $(HDRS) $(ruby_headers) \
- $(hdrdir)/ruby/encoding.h \
- $(hdrdir)/ruby/oniguruma.h \
- $(hdrdir)/ruby/io.h
+wait_for_single_fd.o: $(top_srcdir)/thread.c \
+ $(hdrdir)/ruby/ruby.h $(hdrdir)/ruby/io.h
diff --git a/ext/-test-/win32/dln/extconf.rb b/ext/-test-/win32/dln/extconf.rb
index 57cee23b40..0b5089af14 100644
--- a/ext/-test-/win32/dln/extconf.rb
+++ b/ext/-test-/win32/dln/extconf.rb
@@ -2,7 +2,6 @@ if $mingw or $mswin
$objs = ["dlntest.o"]
testdll = "$(topdir)/dlntest.dll"
$cleanfiles << testdll
- $cleanfiles << "dlntest.#{$LIBEXT}"
config_string('cleanobjs') {|t| $cleanfiles.concat(t.gsub(/\$\*/, 'dlntest').split)}
create_makefile("-test-/win32/dln")
diff --git a/ext/.document b/ext/.document
index 1de3ab739b..6997dbe356 100644
--- a/ext/.document
+++ b/ext/.document
@@ -4,6 +4,7 @@ bigdecimal/bigdecimal.c
bigdecimal/lib
continuation/continuation.c
coverage/coverage.c
+curses/curses.c
date/date_core.c
dbm/dbm.c
digest/bubblebabble/bubblebabble.c
@@ -43,7 +44,6 @@ mathn/rational/rational.c
nkf/lib
nkf/nkf.c
objspace/objspace.c
-objspace/object_tracing.c
openssl/lib
openssl/ossl.c
openssl/ossl_asn1.c
@@ -96,8 +96,6 @@ socket
stringio/stringio.c
strscan/strscan.c
syslog/syslog.c
-syslog/lib
-thread/thread.c
win32ole/lib
win32ole/win32ole.c
zlib/zlib.c
diff --git a/ext/Setup b/ext/Setup
index 5deb604151..6870035e45 100644
--- a/ext/Setup
+++ b/ext/Setup
@@ -2,6 +2,7 @@
#Win32API
#bigdecimal
+#curses
#dbm
#digest
#digest/md5
diff --git a/ext/Setup.atheos b/ext/Setup.atheos
index 662ca57af1..c4028ef1f2 100644
--- a/ext/Setup.atheos
+++ b/ext/Setup.atheos
@@ -2,6 +2,7 @@ option nodynamic
#Win32API
bigdecimal
+curses
dbm
digest
digest/md5
diff --git a/ext/Setup.emx b/ext/Setup.emx
index 6c80812ac0..bf9e2e32f9 100644
--- a/ext/Setup.emx
+++ b/ext/Setup.emx
@@ -1,9 +1,8 @@
-# OS/2 environment w/ Autoconf 2.1x for EMX
-option platform os2-emx
option nodynamic
#Win32API
bigdecimal
+curses
#dbm
digest
digest/md5
diff --git a/ext/Setup.nacl b/ext/Setup.nacl
index d5c1e20777..3e7f469f92 100644
--- a/ext/Setup.nacl
+++ b/ext/Setup.nacl
@@ -4,6 +4,7 @@
# bigdecimal
# continuation
# coverage
+# #curses
# date
# #dbm
# digest/bubblebabble
diff --git a/ext/Setup.nt b/ext/Setup.nt
index 3936d2ed29..8aec238152 100644
--- a/ext/Setup.nt
+++ b/ext/Setup.nt
@@ -1,8 +1,8 @@
-#option platform cygwin|mingw|mswin
#option nodynamic
Win32API
bigdecimal
+#curses
#dbm
digest
digest/md5
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c
index e0b7c01e08..b161bc95ca 100644
--- a/ext/bigdecimal/bigdecimal.c
+++ b/ext/bigdecimal/bigdecimal.c
@@ -38,16 +38,6 @@
/* #define ENABLE_NUMERIC_STRING */
-#define MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, min, max) ( \
- (a) == 0 ? 0 : \
- (a) == -1 ? (b) < -(max) : \
- (a) > 0 ? \
- ((b) > 0 ? (max) / (a) < (b) : (min) / (a) > (b)) : \
- ((b) > 0 ? (min) / (a) < (b) : (max) / (a) > (b)))
-#define SIGNED_VALUE_MAX INTPTR_MAX
-#define SIGNED_VALUE_MIN INTPTR_MIN
-#define MUL_OVERFLOW_SIGNED_VALUE_P(a, b) MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, SIGNED_VALUE_MIN, SIGNED_VALUE_MAX)
-
VALUE rb_cBigDecimal;
VALUE rb_mBigMath;
@@ -86,9 +76,23 @@ static ID id_eq;
#endif
#ifndef RBIGNUM_ZERO_P
-# define RBIGNUM_ZERO_P(x) rb_bigzero_p(x)
+# define RBIGNUM_ZERO_P(x) (RBIGNUM_LEN(x) == 0 || \
+ (RBIGNUM_DIGITS(x)[0] == 0 && \
+ (RBIGNUM_LEN(x) == 1 || bigzero_p(x))))
#endif
+static inline int
+bigzero_p(VALUE x)
+{
+ long i;
+ BDIGIT *ds = RBIGNUM_DIGITS(x);
+
+ for (i = RBIGNUM_LEN(x) - 1; 0 <= i; i--) {
+ if (ds[i]) return 0;
+ }
+ return 1;
+}
+
#ifndef RRATIONAL_ZERO_P
# define RRATIONAL_ZERO_P(x) (FIXNUM_P(RRATIONAL(x)->num) && \
FIX2LONG(RRATIONAL(x)->num) == 0)
@@ -126,10 +130,6 @@ static void VpInternalRound(Real *c, size_t ixDigit, BDIGIT vPrev, BDIGIT v);
static int VpLimitRound(Real *c, size_t ixDigit);
static Real *VpCopy(Real *pv, Real const* const x);
-#ifdef BIGDECIMAL_ENABLE_VPRINT
-static int VPrint(FILE *fp,const char *cntl_chr,Real *a);
-#endif
-
/*
* **** BigDecimal part ****
*/
@@ -149,10 +149,7 @@ BigDecimal_memsize(const void *ptr)
static const rb_data_type_t BigDecimal_data_type = {
"BigDecimal",
- { 0, BigDecimal_delete, BigDecimal_memsize, },
-#ifdef RUBY_TYPED_FREE_IMMEDIATELY
- NULL, NULL, RUBY_TYPED_FREE_IMMEDIATELY
-#endif
+ {0, BigDecimal_delete, BigDecimal_memsize,},
};
static inline int
@@ -164,14 +161,12 @@ is_kind_of_BigDecimal(VALUE const v)
static VALUE
ToValue(Real *p)
{
- if (VpIsNaN(p)) {
- VpException(VP_EXCEPTION_NaN, "Computation results to 'NaN'(Not a Number)", 0);
- }
- else if (VpIsPosInf(p)) {
- VpException(VP_EXCEPTION_INFINITY, "Computation results to 'Infinity'", 0);
- }
- else if (VpIsNegInf(p)) {
- VpException(VP_EXCEPTION_INFINITY, "Computation results to '-Infinity'", 0);
+ if(VpIsNaN(p)) {
+ VpException(VP_EXCEPTION_NaN,"Computation results to 'NaN'(Not a Number)",0);
+ } else if(VpIsPosInf(p)) {
+ VpException(VP_EXCEPTION_INFINITY,"Computation results to 'Infinity'",0);
+ } else if(VpIsNegInf(p)) {
+ VpException(VP_EXCEPTION_INFINITY,"Computation results to '-Infinity'",0);
}
return p->obj;
}
@@ -194,32 +189,24 @@ cannot_be_coerced_into_BigDecimal(VALUE exc_class, VALUE v)
rb_exc_raise(rb_exc_new3(exc_class, str));
}
-static inline VALUE BigDecimal_div2(VALUE, VALUE, VALUE);
+static VALUE BigDecimal_div2(int, VALUE*, VALUE);
static Real*
GetVpValueWithPrec(VALUE v, long prec, int must)
{
Real *pv;
- VALUE num, bg;
+ VALUE num, bg, args[2];
char szD[128];
VALUE orig = Qundef;
- double d;
again:
- switch(TYPE(v)) {
+ switch(TYPE(v))
+ {
case T_FLOAT:
if (prec < 0) goto unable_to_coerce_without_prec;
- if (prec > DBL_DIG+1) goto SomeOneMayDoIt;
- d = RFLOAT_VALUE(v);
- if (d != 0.0) {
- v = rb_funcall(v, id_to_r, 0);
- goto again;
- }
- if (1/d < 0.0) {
- return VpCreateRbObject(prec, "-0");
- }
- return VpCreateRbObject(prec, "0");
-
+ if (prec > DBL_DIG+1)goto SomeOneMayDoIt;
+ v = rb_funcall(v, id_to_r, 0);
+ goto again;
case T_RATIONAL:
if (prec < 0) goto unable_to_coerce_without_prec;
@@ -228,7 +215,9 @@ again:
pv = GetVpValueWithPrec(num, -1, must);
if (pv == NULL) goto SomeOneMayDoIt;
- v = BigDecimal_div2(ToValue(pv), RRATIONAL(v)->den, LONG2NUM(prec));
+ args[0] = RRATIONAL(v)->den;
+ args[1] = LONG2NUM(prec);
+ v = BigDecimal_div2(2, args, ToValue(pv));
goto again;
}
@@ -314,7 +303,7 @@ BigDecimal_prec(VALUE self)
Real *p;
VALUE obj;
- GUARD_OBJ(p, GetVpValue(self, 1));
+ GUARD_OBJ(p,GetVpValue(self,1));
obj = rb_assoc_new(INT2NUM(p->Prec*VpBaseFig()),
INT2NUM(p->MaxPrec*VpBaseFig()));
return obj;
@@ -335,7 +324,7 @@ BigDecimal_hash(VALUE self)
Real *p;
st_index_t hash;
- GUARD_OBJ(p, GetVpValue(self, 1));
+ GUARD_OBJ(p,GetVpValue(self,1));
hash = (st_index_t)p->sign;
/* hash!=2: the case for 0(1),NaN(0) or +-Infinity(3) is sign itself */
if(hash == 2 || hash == (st_index_t)-2) {
@@ -367,8 +356,8 @@ BigDecimal_dump(int argc, VALUE *argv, VALUE self)
volatile VALUE dump;
rb_scan_args(argc, argv, "01", &dummy);
- GUARD_OBJ(vp,GetVpValue(self, 1));
- dump = rb_str_new(0, VpNumOfChars(vp, "E")+50);
+ GUARD_OBJ(vp,GetVpValue(self,1));
+ dump = rb_str_new(0,VpNumOfChars(vp,"E")+50);
psz = RSTRING_PTR(dump);
sprintf(psz, "%"PRIuSIZE":", VpMaxPrec(vp)*VpBaseFig());
VpToString(vp, psz+strlen(psz), 0, 0);
@@ -391,18 +380,16 @@ BigDecimal_load(VALUE self, VALUE str)
SafeStringValue(str);
pch = (unsigned char *)RSTRING_PTR(str);
/* First get max prec */
- while((*pch) != (unsigned char)'\0' && (ch = *pch++) != (unsigned char)':') {
+ while((*pch)!=(unsigned char)'\0' && (ch=*pch++)!=(unsigned char)':') {
if(!ISDIGIT(ch)) {
rb_raise(rb_eTypeError, "load failed: invalid character in the marshaled string");
}
m = m*10 + (unsigned long)(ch-'0');
}
- if (m > VpBaseFig()) m -= VpBaseFig();
- GUARD_OBJ(pv, VpNewRbClass(m, (char *)pch, self));
+ if(m>VpBaseFig()) m -= VpBaseFig();
+ GUARD_OBJ(pv,VpNewRbClass(m,(char *)pch,self));
m /= VpBaseFig();
- if (m && pv->MaxPrec > m) {
- pv->MaxPrec = m+1;
- }
+ if(m && pv->MaxPrec>m) pv->MaxPrec = m+1;
return ToValue(pv);
}
@@ -463,10 +450,10 @@ check_rounding_mode(VALUE const v)
* When computation continues, results are as follows:
*
* EXCEPTION_NaN:: NaN
- * EXCEPTION_INFINITY:: +Infinity or -Infinity
+ * EXCEPTION_INFINITY:: +infinity or -infinity
* EXCEPTION_UNDERFLOW:: 0
- * EXCEPTION_OVERFLOW:: +Infinity or -Infinity
- * EXCEPTION_ZERODIVIDE:: +Infinity or -Infinity
+ * EXCEPTION_OVERFLOW:: +infinity or -infinity
+ * EXCEPTION_ZERODIVIDE:: +infinity or -infinity
*
* One value of the mode parameter controls the rounding of numeric values:
* BigDecimal::ROUND_MODE. The values it can take are:
@@ -487,39 +474,40 @@ BigDecimal_mode(int argc, VALUE *argv, VALUE self)
VALUE val;
unsigned long f,fo;
- rb_scan_args(argc, argv, "11", &which, &val);
+ if(rb_scan_args(argc,argv,"11",&which,&val)==1) val = Qnil;
+
Check_Type(which, T_FIXNUM);
f = (unsigned long)FIX2INT(which);
- if (f & VP_EXCEPTION_ALL) {
- /* Exception mode setting */
- fo = VpGetException();
- if (val == Qnil) return INT2FIX(fo);
- if (val != Qfalse && val!=Qtrue) {
- rb_raise(rb_eArgError, "second argument must be true or false");
- return Qnil; /* Not reached */
- }
- if (f & VP_EXCEPTION_INFINITY) {
- VpSetException((unsigned short)((val == Qtrue) ? (fo | VP_EXCEPTION_INFINITY) :
- (fo & (~VP_EXCEPTION_INFINITY))));
- }
- fo = VpGetException();
- if (f & VP_EXCEPTION_NaN) {
- VpSetException((unsigned short)((val == Qtrue) ? (fo | VP_EXCEPTION_NaN) :
- (fo & (~VP_EXCEPTION_NaN))));
- }
- fo = VpGetException();
- if (f & VP_EXCEPTION_UNDERFLOW) {
- VpSetException((unsigned short)((val == Qtrue) ? (fo | VP_EXCEPTION_UNDERFLOW) :
- (fo & (~VP_EXCEPTION_UNDERFLOW))));
- }
- fo = VpGetException();
- if(f & VP_EXCEPTION_ZERODIVIDE) {
- VpSetException((unsigned short)((val == Qtrue) ? (fo | VP_EXCEPTION_ZERODIVIDE) :
- (fo & (~VP_EXCEPTION_ZERODIVIDE))));
- }
- fo = VpGetException();
- return INT2FIX(fo);
+ if(f&VP_EXCEPTION_ALL) {
+ /* Exception mode setting */
+ fo = VpGetException();
+ if(val==Qnil) return INT2FIX(fo);
+ if(val!=Qfalse && val!=Qtrue) {
+ rb_raise(rb_eArgError, "second argument must be true or false");
+ return Qnil; /* Not reached */
+ }
+ if(f&VP_EXCEPTION_INFINITY) {
+ VpSetException((unsigned short)((val==Qtrue)?(fo|VP_EXCEPTION_INFINITY):
+ (fo&(~VP_EXCEPTION_INFINITY))));
+ }
+ fo = VpGetException();
+ if(f&VP_EXCEPTION_NaN) {
+ VpSetException((unsigned short)((val==Qtrue)?(fo|VP_EXCEPTION_NaN):
+ (fo&(~VP_EXCEPTION_NaN))));
+ }
+ fo = VpGetException();
+ if(f&VP_EXCEPTION_UNDERFLOW) {
+ VpSetException((unsigned short)((val==Qtrue)?(fo|VP_EXCEPTION_UNDERFLOW):
+ (fo&(~VP_EXCEPTION_UNDERFLOW))));
+ }
+ fo = VpGetException();
+ if(f&VP_EXCEPTION_ZERODIVIDE) {
+ VpSetException((unsigned short)((val==Qtrue)?(fo|VP_EXCEPTION_ZERODIVIDE):
+ (fo&(~VP_EXCEPTION_ZERODIVIDE))));
+ }
+ fo = VpGetException();
+ return INT2FIX(fo);
}
if (VP_ROUND_MODE == f) {
/* Rounding mode setting */
@@ -541,16 +529,16 @@ GetAddSubPrec(Real *a, Real *b)
size_t mx = a->Prec;
SIGNED_VALUE d;
- if (!VpIsDef(a) || !VpIsDef(b)) return (size_t)-1L;
- if (mx < b->Prec) mx = b->Prec;
- if (a->exponent != b->exponent) {
- mxs = mx;
- d = a->exponent - b->exponent;
- if (d < 0) d = -d;
- mx = mx + (size_t)d;
- if (mx < mxs) {
- return VpException(VP_EXCEPTION_INFINITY, "Exponent overflow", 0);
- }
+ if(!VpIsDef(a) || !VpIsDef(b)) return (size_t)-1L;
+ if(mx < b->Prec) mx = b->Prec;
+ if(a->exponent!=b->exponent) {
+ mxs = mx;
+ d = a->exponent - b->exponent;
+ if (d < 0) d = -d;
+ mx = mx + (size_t)d;
+ if (mx<mxs) {
+ return VpException(VP_EXCEPTION_INFINITY,"Exponent overflow",0);
+ }
}
return mx;
}
@@ -562,7 +550,7 @@ GetPositiveInt(VALUE v)
Check_Type(v, T_FIXNUM);
n = FIX2INT(v);
if (n < 0) {
- rb_raise(rb_eArgError, "argument must be positive");
+ rb_raise(rb_eArgError, "argument must be positive");
}
return n;
}
@@ -606,20 +594,20 @@ VpCopy(Real *pv, Real const* const x)
static VALUE
BigDecimal_IsNaN(VALUE self)
{
- Real *p = GetVpValue(self, 1);
- if (VpIsNaN(p)) return Qtrue;
+ Real *p = GetVpValue(self,1);
+ if(VpIsNaN(p)) return Qtrue;
return Qfalse;
}
/* Returns nil, -1, or +1 depending on whether the value is finite,
- * -Infinity, or +Infinity.
+ * -infinity, or +infinity.
*/
static VALUE
BigDecimal_IsInfinite(VALUE self)
{
- Real *p = GetVpValue(self, 1);
- if (VpIsPosInf(p)) return INT2FIX(1);
- if (VpIsNegInf(p)) return INT2FIX(-1);
+ Real *p = GetVpValue(self,1);
+ if(VpIsPosInf(p)) return INT2FIX(1);
+ if(VpIsNegInf(p)) return INT2FIX(-1);
return Qnil;
}
@@ -627,23 +615,21 @@ BigDecimal_IsInfinite(VALUE self)
static VALUE
BigDecimal_IsFinite(VALUE self)
{
- Real *p = GetVpValue(self, 1);
- if (VpIsNaN(p)) return Qfalse;
- if (VpIsInf(p)) return Qfalse;
+ Real *p = GetVpValue(self,1);
+ if(VpIsNaN(p)) return Qfalse;
+ if(VpIsInf(p)) return Qfalse;
return Qtrue;
}
static void
BigDecimal_check_num(Real *p)
{
- if (VpIsNaN(p)) {
- VpException(VP_EXCEPTION_NaN, "Computation results to 'NaN'(Not a Number)", 1);
- }
- else if (VpIsPosInf(p)) {
- VpException(VP_EXCEPTION_INFINITY, "Computation results to 'Infinity'", 1);
- }
- else if (VpIsNegInf(p)) {
- VpException(VP_EXCEPTION_INFINITY, "Computation results to '-Infinity'", 1);
+ if(VpIsNaN(p)) {
+ VpException(VP_EXCEPTION_NaN,"Computation results to 'NaN'(Not a Number)",1);
+ } else if(VpIsPosInf(p)) {
+ VpException(VP_EXCEPTION_INFINITY,"Computation results to 'Infinity'",1);
+ } else if(VpIsNegInf(p)) {
+ VpException(VP_EXCEPTION_INFINITY,"Computation results to '-Infinity'",1);
}
}
@@ -660,14 +646,14 @@ BigDecimal_to_i(VALUE self)
ssize_t e, nf;
Real *p;
- GUARD_OBJ(p, GetVpValue(self, 1));
+ GUARD_OBJ(p,GetVpValue(self,1));
BigDecimal_check_num(p);
e = VpExponent10(p);
- if (e <= 0) return INT2FIX(0);
+ if(e<=0) return INT2FIX(0);
nf = VpBaseFig();
- if (e <= nf) {
- return LONG2NUM((long)(VpGetSign(p) * (BDIGIT_DBL_SIGNED)p->frac[0]));
+ if(e<=nf) {
+ return LONG2NUM((long)(VpGetSign(p)*(BDIGIT_DBL_SIGNED)p->frac[0]));
}
else {
VALUE a = BigDecimal_split(self);
@@ -684,14 +670,12 @@ BigDecimal_to_i(VALUE self)
rb_funcall(INT2FIX(10), rb_intern("**"), 1,
INT2FIX(-dpower)));
}
- else {
+ else
ret = rb_funcall(numerator, '*', 1,
rb_funcall(INT2FIX(10), rb_intern("**"), 1,
INT2FIX(dpower)));
- }
- if (RB_TYPE_P(ret, T_FLOAT)) {
+ if (TYPE(ret) == T_FLOAT)
rb_raise(rb_eFloatDomainError, "Infinity");
- }
return ret;
}
}
@@ -718,7 +702,7 @@ BigDecimal_to_f(VALUE self)
if (e < (SIGNED_VALUE)(DBL_MIN_10_EXP-BASE_FIG))
goto underflow;
- str = rb_str_new(0, VpNumOfChars(p, "E"));
+ str = rb_str_new(0, VpNumOfChars(p,"E"));
buf = RSTRING_PTR(str);
VpToString(p, buf, 0, 0);
errno = 0;
@@ -754,7 +738,7 @@ BigDecimal_to_r(VALUE self)
ssize_t sign, power, denomi_power;
VALUE a, digits, numerator;
- p = GetVpValue(self, 1);
+ p = GetVpValue(self,1);
BigDecimal_check_num(p);
sign = VpGetSign(p);
@@ -773,7 +757,7 @@ BigDecimal_to_r(VALUE self)
INT2FIX(-denomi_power)));
}
else {
- return rb_Rational1(rb_funcall(numerator, '*', 1,
+ return rb_Rational1(rb_funcall(numerator, '*', 1,
rb_funcall(INT2FIX(10), rb_intern("**"), 1,
INT2FIX(denomi_power))));
}
@@ -800,12 +784,11 @@ BigDecimal_coerce(VALUE self, VALUE other)
VALUE obj;
Real *b;
- if (RB_TYPE_P(other, T_FLOAT)) {
- GUARD_OBJ(b, GetVpValueWithPrec(other, DBL_DIG+1, 1));
- obj = rb_assoc_new(ToValue(b), self);
+ if (TYPE(other) == T_FLOAT) {
+ obj = rb_assoc_new(other, BigDecimal_to_f(self));
}
else {
- if (RB_TYPE_P(other, T_RATIONAL)) {
+ if (TYPE(other) == T_RATIONAL) {
Real* pv = DATA_PTR(self);
GUARD_OBJ(b, GetVpValueWithPrec(other, pv->Prec*VpBaseFig(), 1));
}
@@ -857,14 +840,14 @@ BigDecimal_add(VALUE self, VALUE r)
size_t mx;
GUARD_OBJ(a, GetVpValue(self, 1));
- if (RB_TYPE_P(r, T_FLOAT)) {
+ if (TYPE(r) == T_FLOAT) {
b = GetVpValueWithPrec(r, DBL_DIG+1, 1);
}
- else if (RB_TYPE_P(r, T_RATIONAL)) {
+ else if (TYPE(r) == T_RATIONAL) {
b = GetVpValueWithPrec(r, a->Prec*VpBaseFig(), 1);
}
else {
- b = GetVpValue(r, 0);
+ b = GetVpValue(r,0);
}
if (!b) return DoSomeOne(self,r,'+');
@@ -891,21 +874,17 @@ BigDecimal_add(VALUE self, VALUE r)
}
/* call-seq:
- * value - digits -> bigdecimal
+ * sub(value, digits)
*
* Subtract the specified value.
*
* e.g.
+ * c = a.sub(b,n)
* c = a - b
*
- * The precision of the result value depends on the type of +b+.
- *
- * If +b+ is a Float, the precision of the result is Float::DIG+1.
- *
- * If +b+ is a BigDecimal, the precision of the result is +b+'s precision of
- * internal representation from platform. So, it's return value is platform
- * dependent.
- *
+ * digits:: If specified and less than the number of significant digits of the
+ * result, the result is rounded to that number of digits, according to
+ * BigDecimal.mode.
*/
static VALUE
BigDecimal_sub(VALUE self, VALUE r)
@@ -914,36 +893,25 @@ BigDecimal_sub(VALUE self, VALUE r)
Real *c, *a, *b;
size_t mx;
- GUARD_OBJ(a, GetVpValue(self,1));
- if (RB_TYPE_P(r, T_FLOAT)) {
- b = GetVpValueWithPrec(r, DBL_DIG+1, 1);
- }
- else if (RB_TYPE_P(r, T_RATIONAL)) {
- b = GetVpValueWithPrec(r, a->Prec*VpBaseFig(), 1);
- }
- else {
- b = GetVpValue(r,0);
- }
-
- if (!b) return DoSomeOne(self,r,'-');
+ GUARD_OBJ(a,GetVpValue(self,1));
+ b = GetVpValue(r,0);
+ if(!b) return DoSomeOne(self,r,'-');
SAVE(b);
- if (VpIsNaN(b)) return b->obj;
- if (VpIsNaN(a)) return a->obj;
+ if(VpIsNaN(b)) return b->obj;
+ if(VpIsNaN(a)) return a->obj;
mx = GetAddSubPrec(a,b);
if (mx == (size_t)-1L) {
- GUARD_OBJ(c,VpCreateRbObject(VpBaseFig() + 1, "0"));
- VpAddSub(c, a, b, -1);
- }
- else {
- GUARD_OBJ(c,VpCreateRbObject(mx *(VpBaseFig() + 1), "0"));
- if (!mx) {
- VpSetInf(c,VpGetSign(a));
- }
- else {
- VpAddSub(c, a, b, -1);
- }
+ GUARD_OBJ(c,VpCreateRbObject(VpBaseFig() + 1, "0"));
+ VpAddSub(c, a, b, -1);
+ } else {
+ GUARD_OBJ(c,VpCreateRbObject(mx *(VpBaseFig() + 1), "0"));
+ if(!mx) {
+ VpSetInf(c,VpGetSign(a));
+ } else {
+ VpAddSub(c, a, b, -1);
+ }
}
return ToValue(c);
}
@@ -954,7 +922,7 @@ BigDecimalCmp(VALUE self, VALUE r,char op)
ENTER(5);
SIGNED_VALUE e;
Real *a, *b=0;
- GUARD_OBJ(a, GetVpValue(self, 1));
+ GUARD_OBJ(a,GetVpValue(self,1));
switch (TYPE(r)) {
case T_DATA:
if (!is_kind_of_BigDecimal(r)) break;
@@ -962,7 +930,7 @@ BigDecimalCmp(VALUE self, VALUE r,char op)
case T_FIXNUM:
/* fall through */
case T_BIGNUM:
- GUARD_OBJ(b, GetVpValue(r, 0));
+ GUARD_OBJ(b, GetVpValue(r,0));
break;
case T_FLOAT:
@@ -1014,23 +982,23 @@ BigDecimalCmp(VALUE self, VALUE r,char op)
return INT2FIX(e); /* any op */
case '=':
- if (e == 0) return Qtrue;
+ if(e==0) return Qtrue;
return Qfalse;
case 'G':
- if (e >= 0) return Qtrue;
+ if(e>=0) return Qtrue;
return Qfalse;
case '>':
- if (e > 0) return Qtrue;
+ if(e> 0) return Qtrue;
return Qfalse;
case 'L':
- if (e <= 0) return Qtrue;
+ if(e<=0) return Qtrue;
return Qfalse;
case '<':
- if (e < 0) return Qtrue;
+ if(e< 0) return Qtrue;
return Qfalse;
default:
@@ -1046,7 +1014,7 @@ BigDecimalCmp(VALUE self, VALUE r,char op)
static VALUE
BigDecimal_zero(VALUE self)
{
- Real *a = GetVpValue(self, 1);
+ Real *a = GetVpValue(self,1);
return VpIsZero(a) ? Qtrue : Qfalse;
}
@@ -1054,7 +1022,7 @@ BigDecimal_zero(VALUE self)
static VALUE
BigDecimal_nonzero(VALUE self)
{
- Real *a = GetVpValue(self, 1);
+ Real *a = GetVpValue(self,1);
return VpIsZero(a) ? Qnil : self;
}
@@ -1149,8 +1117,8 @@ BigDecimal_neg(VALUE self)
{
ENTER(5);
Real *c, *a;
- GUARD_OBJ(a, GetVpValue(self, 1));
- GUARD_OBJ(c, VpCreateRbObject(a->Prec *(VpBaseFig() + 1), "0"));
+ GUARD_OBJ(a,GetVpValue(self,1));
+ GUARD_OBJ(c,VpCreateRbObject(a->Prec *(VpBaseFig() + 1), "0"));
VpAsgn(c, a, -1);
return ToValue(c);
}
@@ -1177,22 +1145,13 @@ BigDecimal_mult(VALUE self, VALUE r)
Real *c, *a, *b;
size_t mx;
- GUARD_OBJ(a, GetVpValue(self, 1));
- if (RB_TYPE_P(r, T_FLOAT)) {
- b = GetVpValueWithPrec(r, DBL_DIG+1, 1);
- }
- else if (RB_TYPE_P(r, T_RATIONAL)) {
- b = GetVpValueWithPrec(r, a->Prec*VpBaseFig(), 1);
- }
- else {
- b = GetVpValue(r,0);
- }
-
- if (!b) return DoSomeOne(self, r, '*');
+ GUARD_OBJ(a,GetVpValue(self,1));
+ b = GetVpValue(r,0);
+ if(!b) return DoSomeOne(self,r,'*');
SAVE(b);
mx = a->Prec + b->Prec;
- GUARD_OBJ(c, VpCreateRbObject(mx *(VpBaseFig() + 1), "0"));
+ GUARD_OBJ(c,VpCreateRbObject(mx *(VpBaseFig() + 1), "0"));
VpMult(c, a, b);
return ToValue(c);
}
@@ -1205,28 +1164,18 @@ BigDecimal_divide(Real **c, Real **res, Real **div, VALUE self, VALUE r)
Real *a, *b;
size_t mx;
- GUARD_OBJ(a, GetVpValue(self, 1));
- if (RB_TYPE_P(r, T_FLOAT)) {
- b = GetVpValueWithPrec(r, DBL_DIG+1, 1);
- }
- else if (RB_TYPE_P(r, T_RATIONAL)) {
- b = GetVpValueWithPrec(r, a->Prec*VpBaseFig(), 1);
- }
- else {
- b = GetVpValue(r, 0);
- }
-
- if (!b) return DoSomeOne(self, r, '/');
+ GUARD_OBJ(a,GetVpValue(self,1));
+ b = GetVpValue(r,0);
+ if(!b) return DoSomeOne(self,r,'/');
SAVE(b);
-
*div = b;
mx = a->Prec + vabs(a->exponent);
- if (mx<b->Prec + vabs(b->exponent)) mx = b->Prec + vabs(b->exponent);
+ if(mx<b->Prec + vabs(b->exponent)) mx = b->Prec + vabs(b->exponent);
mx =(mx + 1) * VpBaseFig();
- GUARD_OBJ((*c), VpCreateRbObject(mx, "#0"));
- GUARD_OBJ((*res), VpCreateRbObject((mx+1) * 2 +(VpBaseFig() + 1), "#0"));
+ GUARD_OBJ((*c),VpCreateRbObject(mx, "#0"));
+ GUARD_OBJ((*res),VpCreateRbObject((mx+1) * 2 +(VpBaseFig() + 1), "#0"));
VpDivd(*c, *res, a, b);
- return Qnil;
+ return (VALUE)0;
}
/* call-seq:
@@ -1255,15 +1204,15 @@ BigDecimal_div(VALUE self, VALUE r)
ENTER(5);
Real *c=NULL, *res=NULL, *div = NULL;
r = BigDecimal_divide(&c, &res, &div, self, r);
- if (!NIL_P(r)) return r; /* coerced by other */
- SAVE(c); SAVE(res); SAVE(div);
+ if(r!=(VALUE)0) return r; /* coerced by other */
+ SAVE(c);SAVE(res);SAVE(div);
/* a/b = c + r/b */
/* c xxxxx
r 00000yyyyy ==> (y/b)*BASE >= HALF_BASE
*/
/* Round */
- if (VpHasVal(div)) { /* frac[0] must be zero for NaN,INF,Zero */
- VpInternalRound(c, 0, c->frac[c->Prec-1], (BDIGIT)(VpBaseVal() * (BDIGIT_DBL)res->frac[0] / div->frac[0]));
+ if(VpHasVal(div)) { /* frac[0] must be zero for NaN,INF,Zero */
+ VpInternalRound(c, 0, c->frac[c->Prec-1], (BDIGIT)(VpBaseVal()*(BDIGIT_DBL)res->frac[0]/div->frac[0]));
}
return ToValue(c);
}
@@ -1280,73 +1229,64 @@ BigDecimal_DoDivmod(VALUE self, VALUE r, Real **div, Real **mod)
Real *a, *b;
size_t mx;
- GUARD_OBJ(a, GetVpValue(self, 1));
- if (RB_TYPE_P(r, T_FLOAT)) {
- b = GetVpValueWithPrec(r, DBL_DIG+1, 1);
- }
- else if (RB_TYPE_P(r, T_RATIONAL)) {
- b = GetVpValueWithPrec(r, a->Prec*VpBaseFig(), 1);
- }
- else {
- b = GetVpValue(r, 0);
- }
-
- if (!b) return Qfalse;
+ GUARD_OBJ(a,GetVpValue(self,1));
+ b = GetVpValue(r,0);
+ if(!b) return Qfalse;
SAVE(b);
- if (VpIsNaN(a) || VpIsNaN(b)) goto NaN;
- if (VpIsInf(a) && VpIsInf(b)) goto NaN;
- if (VpIsZero(b)) {
+ if(VpIsNaN(a) || VpIsNaN(b)) goto NaN;
+ if(VpIsInf(a) && VpIsInf(b)) goto NaN;
+ if(VpIsZero(b)) {
rb_raise(rb_eZeroDivError, "divided by 0");
}
- if (VpIsInf(a)) {
- GUARD_OBJ(d, VpCreateRbObject(1, "0"));
- VpSetInf(d, (SIGNED_VALUE)(VpGetSign(a) == VpGetSign(b) ? 1 : -1));
- GUARD_OBJ(c, VpCreateRbObject(1, "NaN"));
- *div = d;
- *mod = c;
- return Qtrue;
+ if(VpIsInf(a)) {
+ GUARD_OBJ(d,VpCreateRbObject(1, "0"));
+ VpSetInf(d, (SIGNED_VALUE)(VpGetSign(a) == VpGetSign(b) ? 1 : -1));
+ GUARD_OBJ(c,VpCreateRbObject(1, "NaN"));
+ *div = d;
+ *mod = c;
+ return Qtrue;
}
- if (VpIsInf(b)) {
- GUARD_OBJ(d, VpCreateRbObject(1, "0"));
- *div = d;
- *mod = a;
- return Qtrue;
+ if(VpIsInf(b)) {
+ GUARD_OBJ(d,VpCreateRbObject(1, "0"));
+ *div = d;
+ *mod = a;
+ return Qtrue;
}
- if (VpIsZero(a)) {
- GUARD_OBJ(c, VpCreateRbObject(1, "0"));
- GUARD_OBJ(d, VpCreateRbObject(1, "0"));
- *div = d;
- *mod = c;
- return Qtrue;
+ if(VpIsZero(a)) {
+ GUARD_OBJ(c,VpCreateRbObject(1, "0"));
+ GUARD_OBJ(d,VpCreateRbObject(1, "0"));
+ *div = d;
+ *mod = c;
+ return Qtrue;
}
mx = a->Prec + vabs(a->exponent);
- if (mx<b->Prec + vabs(b->exponent)) mx = b->Prec + vabs(b->exponent);
- mx = (mx + 1) * VpBaseFig();
- GUARD_OBJ(c, VpCreateRbObject(mx, "0"));
- GUARD_OBJ(res, VpCreateRbObject((mx+1) * 2 +(VpBaseFig() + 1), "#0"));
+ if(mx<b->Prec + vabs(b->exponent)) mx = b->Prec + vabs(b->exponent);
+ mx =(mx + 1) * VpBaseFig();
+ GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
+ GUARD_OBJ(res,VpCreateRbObject((mx+1) * 2 +(VpBaseFig() + 1), "#0"));
VpDivd(c, res, a, b);
- mx = c->Prec * (VpBaseFig() + 1);
- GUARD_OBJ(d, VpCreateRbObject(mx, "0"));
- VpActiveRound(d, c, VP_ROUND_DOWN, 0);
- VpMult(res, d, b);
- VpAddSub(c, a, res, -1);
- if (!VpIsZero(c) && (VpGetSign(a) * VpGetSign(b) < 0)) {
- VpAddSub(res, d, VpOne(), -1);
- GUARD_OBJ(d, VpCreateRbObject(GetAddSubPrec(c, b)*(VpBaseFig() + 1), "0"));
- VpAddSub(d, c, b, 1);
- *div = res;
- *mod = d;
+ mx = c->Prec *(VpBaseFig() + 1);
+ GUARD_OBJ(d,VpCreateRbObject(mx, "0"));
+ VpActiveRound(d,c,VP_ROUND_DOWN,0);
+ VpMult(res,d,b);
+ VpAddSub(c,a,res,-1);
+ if(!VpIsZero(c) && (VpGetSign(a)*VpGetSign(b)<0)) {
+ VpAddSub(res,d,VpOne(),-1);
+ GUARD_OBJ(d,VpCreateRbObject(GetAddSubPrec(c, b)*(VpBaseFig() + 1), "0"));
+ VpAddSub(d ,c,b, 1);
+ *div = res;
+ *mod = d;
} else {
- *div = d;
- *mod = c;
+ *div = d;
+ *mod = c;
}
return Qtrue;
NaN:
- GUARD_OBJ(c, VpCreateRbObject(1, "NaN"));
- GUARD_OBJ(d, VpCreateRbObject(1, "NaN"));
+ GUARD_OBJ(c,VpCreateRbObject(1, "NaN"));
+ GUARD_OBJ(d,VpCreateRbObject(1, "NaN"));
*div = d;
*mod = c;
return Qtrue;
@@ -1364,13 +1304,13 @@ static VALUE
BigDecimal_mod(VALUE self, VALUE r) /* %: a%b = a - (a.to_f/b).floor * b */
{
ENTER(3);
- Real *div = NULL, *mod = NULL;
+ Real *div=NULL, *mod=NULL;
- if (BigDecimal_DoDivmod(self, r, &div, &mod)) {
+ if(BigDecimal_DoDivmod(self,r,&div,&mod)) {
SAVE(div); SAVE(mod);
return ToValue(mod);
}
- return DoSomeOne(self, r, '%');
+ return DoSomeOne(self,r,'%');
}
static VALUE
@@ -1378,45 +1318,36 @@ BigDecimal_divremain(VALUE self, VALUE r, Real **dv, Real **rv)
{
ENTER(10);
size_t mx;
- Real *a = NULL, *b = NULL, *c = NULL, *res = NULL, *d = NULL, *rr = NULL, *ff = NULL;
- Real *f = NULL;
-
- GUARD_OBJ(a, GetVpValue(self, 1));
- if (RB_TYPE_P(r, T_FLOAT)) {
- b = GetVpValueWithPrec(r, DBL_DIG+1, 1);
- }
- else if (RB_TYPE_P(r, T_RATIONAL)) {
- b = GetVpValueWithPrec(r, a->Prec*VpBaseFig(), 1);
- }
- else {
- b = GetVpValue(r, 0);
- }
+ Real *a=NULL, *b=NULL, *c=NULL, *res=NULL, *d=NULL, *rr=NULL, *ff=NULL;
+ Real *f=NULL;
- if (!b) return DoSomeOne(self, r, rb_intern("remainder"));
+ GUARD_OBJ(a,GetVpValue(self,1));
+ b = GetVpValue(r,0);
+ if(!b) return DoSomeOne(self,r,rb_intern("remainder"));
SAVE(b);
- mx = (a->MaxPrec + b->MaxPrec) *VpBaseFig();
- GUARD_OBJ(c, VpCreateRbObject(mx, "0"));
- GUARD_OBJ(res, VpCreateRbObject((mx+1) * 2 + (VpBaseFig() + 1), "#0"));
- GUARD_OBJ(rr, VpCreateRbObject((mx+1) * 2 + (VpBaseFig() + 1), "#0"));
- GUARD_OBJ(ff, VpCreateRbObject((mx+1) * 2 + (VpBaseFig() + 1), "#0"));
+ mx =(a->MaxPrec + b->MaxPrec) *VpBaseFig();
+ GUARD_OBJ(c ,VpCreateRbObject(mx, "0"));
+ GUARD_OBJ(res,VpCreateRbObject((mx+1) * 2 +(VpBaseFig() + 1), "#0"));
+ GUARD_OBJ(rr ,VpCreateRbObject((mx+1) * 2 +(VpBaseFig() + 1), "#0"));
+ GUARD_OBJ(ff ,VpCreateRbObject((mx+1) * 2 +(VpBaseFig() + 1), "#0"));
VpDivd(c, res, a, b);
mx = c->Prec *(VpBaseFig() + 1);
- GUARD_OBJ(d, VpCreateRbObject(mx, "0"));
- GUARD_OBJ(f, VpCreateRbObject(mx, "0"));
+ GUARD_OBJ(d,VpCreateRbObject(mx, "0"));
+ GUARD_OBJ(f,VpCreateRbObject(mx, "0"));
- VpActiveRound(d, c, VP_ROUND_DOWN, 0); /* 0: round off */
+ VpActiveRound(d,c,VP_ROUND_DOWN,0); /* 0: round off */
VpFrac(f, c);
- VpMult(rr, f, b);
- VpAddSub(ff, res, rr, 1);
+ VpMult(rr,f,b);
+ VpAddSub(ff,res,rr,1);
*dv = d;
*rv = ff;
- return Qnil;
+ return (VALUE)0;
}
/* Returns the remainder from dividing by the value.
@@ -1427,9 +1358,9 @@ static VALUE
BigDecimal_remainder(VALUE self, VALUE r) /* remainder */
{
VALUE f;
- Real *d, *rv = 0;
- f = BigDecimal_divremain(self, r, &d, &rv);
- if (!NIL_P(f)) return f;
+ Real *d,*rv=0;
+ f = BigDecimal_divremain(self,r,&d,&rv);
+ if(f!=(VALUE)0) return f;
return ToValue(rv);
}
@@ -1456,9 +1387,9 @@ static VALUE
BigDecimal_divmod(VALUE self, VALUE r)
{
ENTER(5);
- Real *div = NULL, *mod = NULL;
+ Real *div=NULL, *mod=NULL;
- if (BigDecimal_DoDivmod(self, r, &div, &mod)) {
+ if(BigDecimal_DoDivmod(self,r,&div,&mod)) {
SAVE(div); SAVE(mod);
return rb_assoc_new(ToValue(div), ToValue(mod));
}
@@ -1468,85 +1399,59 @@ BigDecimal_divmod(VALUE self, VALUE r)
/*
* See BigDecimal#quo
*/
-static inline VALUE
-BigDecimal_div2(VALUE self, VALUE b, VALUE n)
-{
- ENTER(5);
- SIGNED_VALUE ix;
-
- if (NIL_P(n)) { /* div in Float sense */
- Real *div = NULL;
- Real *mod;
- if (BigDecimal_DoDivmod(self, b, &div, &mod)) {
- return BigDecimal_to_i(ToValue(div));
- }
- return DoSomeOne(self, b, rb_intern("div"));
- }
-
- /* div in BigDecimal sense */
- ix = GetPositiveInt(n);
- if (ix == 0) {
- return BigDecimal_div(self, b);
- }
- else {
- Real *res = NULL;
- Real *av = NULL, *bv = NULL, *cv = NULL;
- size_t mx = ix + VpBaseFig()*2;
- size_t pl = VpSetPrecLimit(0);
-
- GUARD_OBJ(cv, VpCreateRbObject(mx, "0"));
- GUARD_OBJ(av, GetVpValue(self, 1));
- GUARD_OBJ(bv, GetVpValue(b, 1));
- mx = av->Prec + bv->Prec + 2;
- if (mx <= cv->MaxPrec) mx = cv->MaxPrec + 1;
- GUARD_OBJ(res, VpCreateRbObject((mx * 2 + 2)*VpBaseFig(), "#0"));
- VpDivd(cv, res, av, bv);
- VpSetPrecLimit(pl);
- VpLeftRound(cv, VpGetRoundMode(), ix);
- return ToValue(cv);
- }
-}
-
static VALUE
-BigDecimal_div3(int argc, VALUE *argv, VALUE self)
+BigDecimal_div2(int argc, VALUE *argv, VALUE self)
{
+ ENTER(5);
VALUE b,n;
-
- rb_scan_args(argc, argv, "11", &b, &n);
-
- return BigDecimal_div2(self, b, n);
+ int na = rb_scan_args(argc,argv,"11",&b,&n);
+ if(na==1) { /* div in Float sense */
+ Real *div=NULL;
+ Real *mod;
+ if(BigDecimal_DoDivmod(self,b,&div,&mod)) {
+ return BigDecimal_to_i(ToValue(div));
+ }
+ return DoSomeOne(self,b,rb_intern("div"));
+ } else { /* div in BigDecimal sense */
+ SIGNED_VALUE ix = GetPositiveInt(n);
+ if (ix == 0) return BigDecimal_div(self, b);
+ else {
+ Real *res=NULL;
+ Real *av=NULL, *bv=NULL, *cv=NULL;
+ size_t mx = (ix+VpBaseFig()*2);
+ size_t pl = VpSetPrecLimit(0);
+
+ GUARD_OBJ(cv,VpCreateRbObject(mx,"0"));
+ GUARD_OBJ(av,GetVpValue(self,1));
+ GUARD_OBJ(bv,GetVpValue(b,1));
+ mx = av->Prec + bv->Prec + 2;
+ if(mx <= cv->MaxPrec) mx = cv->MaxPrec+1;
+ GUARD_OBJ(res,VpCreateRbObject((mx * 2 + 2)*VpBaseFig(), "#0"));
+ VpDivd(cv,res,av,bv);
+ VpSetPrecLimit(pl);
+ VpLeftRound(cv,VpGetRoundMode(),ix);
+ return ToValue(cv);
+ }
+ }
}
static VALUE
BigDecimal_add2(VALUE self, VALUE b, VALUE n)
{
ENTER(2);
- Real *cv;
+ Real *cv;
SIGNED_VALUE mx = GetPositiveInt(n);
if (mx == 0) return BigDecimal_add(self, b);
else {
- size_t pl = VpSetPrecLimit(0);
- VALUE c = BigDecimal_add(self, b);
- VpSetPrecLimit(pl);
- GUARD_OBJ(cv, GetVpValue(c, 1));
- VpLeftRound(cv, VpGetRoundMode(), mx);
- return ToValue(cv);
+ size_t pl = VpSetPrecLimit(0);
+ VALUE c = BigDecimal_add(self,b);
+ VpSetPrecLimit(pl);
+ GUARD_OBJ(cv,GetVpValue(c,1));
+ VpLeftRound(cv,VpGetRoundMode(),mx);
+ return ToValue(cv);
}
}
-/*
- * sub(value, digits) -> bigdecimal
- *
- * Subtract the specified value.
- *
- * e.g.
- * c = a.sub(b,n)
- *
- * digits:: If specified and less than the number of significant digits of the
- * result, the result is rounded to that number of digits, according to
- * BigDecimal.mode.
- *
- */
static VALUE
BigDecimal_sub2(VALUE self, VALUE b, VALUE n)
{
@@ -1555,16 +1460,15 @@ BigDecimal_sub2(VALUE self, VALUE b, VALUE n)
SIGNED_VALUE mx = GetPositiveInt(n);
if (mx == 0) return BigDecimal_sub(self, b);
else {
- size_t pl = VpSetPrecLimit(0);
- VALUE c = BigDecimal_sub(self, b);
- VpSetPrecLimit(pl);
- GUARD_OBJ(cv, GetVpValue(c, 1));
- VpLeftRound(cv, VpGetRoundMode(), mx);
- return ToValue(cv);
+ size_t pl = VpSetPrecLimit(0);
+ VALUE c = BigDecimal_sub(self,b);
+ VpSetPrecLimit(pl);
+ GUARD_OBJ(cv,GetVpValue(c,1));
+ VpLeftRound(cv,VpGetRoundMode(),mx);
+ return ToValue(cv);
}
}
-
static VALUE
BigDecimal_mult2(VALUE self, VALUE b, VALUE n)
{
@@ -1573,12 +1477,12 @@ BigDecimal_mult2(VALUE self, VALUE b, VALUE n)
SIGNED_VALUE mx = GetPositiveInt(n);
if (mx == 0) return BigDecimal_mult(self, b);
else {
- size_t pl = VpSetPrecLimit(0);
- VALUE c = BigDecimal_mult(self, b);
- VpSetPrecLimit(pl);
- GUARD_OBJ(cv, GetVpValue(c, 1));
- VpLeftRound(cv, VpGetRoundMode(), mx);
- return ToValue(cv);
+ size_t pl = VpSetPrecLimit(0);
+ VALUE c = BigDecimal_mult(self,b);
+ VpSetPrecLimit(pl);
+ GUARD_OBJ(cv,GetVpValue(c,1));
+ VpLeftRound(cv,VpGetRoundMode(),mx);
+ return ToValue(cv);
}
}
@@ -1595,9 +1499,9 @@ BigDecimal_abs(VALUE self)
Real *c, *a;
size_t mx;
- GUARD_OBJ(a, GetVpValue(self, 1));
+ GUARD_OBJ(a,GetVpValue(self,1));
mx = a->Prec *(VpBaseFig() + 1);
- GUARD_OBJ(c, VpCreateRbObject(mx, "0"));
+ GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
VpAsgn(c, a, 1);
VpChangeSign(c, 1);
return ToValue(c);
@@ -1617,12 +1521,12 @@ BigDecimal_sqrt(VALUE self, VALUE nFig)
Real *c, *a;
size_t mx, n;
- GUARD_OBJ(a, GetVpValue(self, 1));
- mx = a->Prec * (VpBaseFig() + 1);
+ GUARD_OBJ(a,GetVpValue(self,1));
+ mx = a->Prec *(VpBaseFig() + 1);
- n = GetPositiveInt(nFig) + VpDblFig() + BASE_FIG;
- if (mx <= n) mx = n;
- GUARD_OBJ(c, VpCreateRbObject(mx, "0"));
+ n = GetPositiveInt(nFig) + VpDblFig() + 1;
+ if(mx <= n) mx = n;
+ GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
VpSqrt(c, a);
return ToValue(c);
}
@@ -1636,10 +1540,10 @@ BigDecimal_fix(VALUE self)
Real *c, *a;
size_t mx;
- GUARD_OBJ(a, GetVpValue(self, 1));
+ GUARD_OBJ(a,GetVpValue(self,1));
mx = a->Prec *(VpBaseFig() + 1);
- GUARD_OBJ(c, VpCreateRbObject(mx, "0"));
- VpActiveRound(c, a, VP_ROUND_DOWN, 0); /* 0: round off */
+ GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
+ VpActiveRound(c,a,VP_ROUND_DOWN,0); /* 0: round off */
return ToValue(c);
}
@@ -1676,28 +1580,26 @@ BigDecimal_round(int argc, VALUE *argv, VALUE self)
unsigned short sw = VpGetRoundMode();
switch (rb_scan_args(argc, argv, "02", &vLoc, &vRound)) {
- case 0:
- iLoc = 0;
- break;
- case 1:
- Check_Type(vLoc, T_FIXNUM);
- iLoc = FIX2INT(vLoc);
- break;
- case 2:
+ case 0:
+ iLoc = 0;
+ break;
+ case 1:
+ Check_Type(vLoc, T_FIXNUM);
+ iLoc = FIX2INT(vLoc);
+ break;
+ case 2:
Check_Type(vLoc, T_FIXNUM);
iLoc = FIX2INT(vLoc);
sw = check_rounding_mode(vRound);
break;
- default:
- break;
}
pl = VpSetPrecLimit(0);
- GUARD_OBJ(a, GetVpValue(self, 1));
- mx = a->Prec * (VpBaseFig() + 1);
- GUARD_OBJ(c, VpCreateRbObject(mx, "0"));
+ GUARD_OBJ(a,GetVpValue(self,1));
+ mx = a->Prec *(VpBaseFig() + 1);
+ GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
VpSetPrecLimit(pl);
- VpActiveRound(c, a, sw, iLoc);
+ VpActiveRound(c,a,sw,iLoc);
if (argc == 0) {
return BigDecimal_to_i(ToValue(c));
}
@@ -1730,19 +1632,18 @@ BigDecimal_truncate(int argc, VALUE *argv, VALUE self)
VALUE vLoc;
size_t mx, pl = VpSetPrecLimit(0);
- if (rb_scan_args(argc, argv, "01", &vLoc) == 0) {
- iLoc = 0;
- }
- else {
- Check_Type(vLoc, T_FIXNUM);
- iLoc = FIX2INT(vLoc);
+ if(rb_scan_args(argc,argv,"01",&vLoc)==0) {
+ iLoc = 0;
+ } else {
+ Check_Type(vLoc, T_FIXNUM);
+ iLoc = FIX2INT(vLoc);
}
- GUARD_OBJ(a, GetVpValue(self, 1));
- mx = a->Prec * (VpBaseFig() + 1);
- GUARD_OBJ(c, VpCreateRbObject(mx, "0"));
+ GUARD_OBJ(a,GetVpValue(self,1));
+ mx = a->Prec *(VpBaseFig() + 1);
+ GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
VpSetPrecLimit(pl);
- VpActiveRound(c, a, VP_ROUND_DOWN, iLoc); /* 0: truncate */
+ VpActiveRound(c,a,VP_ROUND_DOWN,iLoc); /* 0: truncate */
if (argc == 0) {
return BigDecimal_to_i(ToValue(c));
}
@@ -1758,9 +1659,9 @@ BigDecimal_frac(VALUE self)
Real *c, *a;
size_t mx;
- GUARD_OBJ(a, GetVpValue(self, 1));
- mx = a->Prec * (VpBaseFig() + 1);
- GUARD_OBJ(c, VpCreateRbObject(mx, "0"));
+ GUARD_OBJ(a,GetVpValue(self,1));
+ mx = a->Prec *(VpBaseFig() + 1);
+ GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
VpFrac(c, a);
return ToValue(c);
}
@@ -1791,19 +1692,18 @@ BigDecimal_floor(int argc, VALUE *argv, VALUE self)
VALUE vLoc;
size_t mx, pl = VpSetPrecLimit(0);
- if (rb_scan_args(argc, argv, "01", &vLoc)==0) {
- iLoc = 0;
- }
- else {
- Check_Type(vLoc, T_FIXNUM);
- iLoc = FIX2INT(vLoc);
+ if(rb_scan_args(argc,argv,"01",&vLoc)==0) {
+ iLoc = 0;
+ } else {
+ Check_Type(vLoc, T_FIXNUM);
+ iLoc = FIX2INT(vLoc);
}
- GUARD_OBJ(a, GetVpValue(self, 1));
- mx = a->Prec * (VpBaseFig() + 1);
- GUARD_OBJ(c, VpCreateRbObject(mx, "0"));
+ GUARD_OBJ(a,GetVpValue(self,1));
+ mx = a->Prec *(VpBaseFig() + 1);
+ GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
VpSetPrecLimit(pl);
- VpActiveRound(c, a, VP_ROUND_FLOOR, iLoc);
+ VpActiveRound(c,a,VP_ROUND_FLOOR,iLoc);
#ifdef BIGDECIMAL_DEBUG
VPrint(stderr, "floor: c=%\n", c);
#endif
@@ -1839,18 +1739,18 @@ BigDecimal_ceil(int argc, VALUE *argv, VALUE self)
VALUE vLoc;
size_t mx, pl = VpSetPrecLimit(0);
- if (rb_scan_args(argc, argv, "01", &vLoc) == 0) {
- iLoc = 0;
+ if(rb_scan_args(argc,argv,"01",&vLoc)==0) {
+ iLoc = 0;
} else {
- Check_Type(vLoc, T_FIXNUM);
- iLoc = FIX2INT(vLoc);
+ Check_Type(vLoc, T_FIXNUM);
+ iLoc = FIX2INT(vLoc);
}
- GUARD_OBJ(a, GetVpValue(self, 1));
- mx = a->Prec * (VpBaseFig() + 1);
- GUARD_OBJ(c, VpCreateRbObject(mx, "0"));
+ GUARD_OBJ(a,GetVpValue(self,1));
+ mx = a->Prec *(VpBaseFig() + 1);
+ GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
VpSetPrecLimit(pl);
- VpActiveRound(c, a, VP_ROUND_CEIL, iLoc);
+ VpActiveRound(c,a,VP_ROUND_CEIL,iLoc);
if (argc == 0) {
return BigDecimal_to_i(ToValue(c));
}
@@ -1894,8 +1794,8 @@ static VALUE
BigDecimal_to_s(int argc, VALUE *argv, VALUE self)
{
ENTER(5);
- int fmt = 0; /* 0:E format */
- int fPlus = 0; /* =0:default,=1: set ' ' before digits ,set '+' before digits. */
+ int fmt=0; /* 0:E format */
+ int fPlus=0; /* =0:default,=1: set ' ' before digits ,set '+' before digits. */
Real *vp;
volatile VALUE str;
char *psz;
@@ -1903,55 +1803,44 @@ BigDecimal_to_s(int argc, VALUE *argv, VALUE self)
size_t nc, mc = 0;
VALUE f;
- GUARD_OBJ(vp, GetVpValue(self, 1));
+ GUARD_OBJ(vp,GetVpValue(self,1));
- if (rb_scan_args(argc, argv, "01", &f) == 1) {
- if (RB_TYPE_P(f, T_STRING)) {
- SafeStringValue(f);
- psz = RSTRING_PTR(f);
- if (*psz == ' ') {
- fPlus = 1;
- psz++;
- }
- else if (*psz == '+') {
- fPlus = 2;
- psz++;
- }
- while ((ch = *psz++) != 0) {
- if (ISSPACE(ch)) {
- continue;
- }
- if (!ISDIGIT(ch)) {
- if (ch == 'F' || ch == 'f') {
- fmt = 1; /* F format */
- }
- break;
- }
- mc = mc*10 + ch - '0';
- }
- }
+ if(rb_scan_args(argc,argv,"01",&f)==1) {
+ if(TYPE(f)==T_STRING) {
+ SafeStringValue(f);
+ psz = RSTRING_PTR(f);
+ if(*psz==' ') {
+ fPlus = 1; psz++;
+ } else if(*psz=='+') {
+ fPlus = 2; psz++;
+ }
+ while((ch=*psz++)!=0) {
+ if(ISSPACE(ch)) continue;
+ if(!ISDIGIT(ch)) {
+ if(ch=='F' || ch=='f') fmt = 1; /* F format */
+ break;
+ }
+ mc = mc * 10 + ch - '0';
+ }
+ }
else {
- mc = (size_t)GetPositiveInt(f);
- }
- }
- if (fmt) {
- nc = VpNumOfChars(vp, "F");
- }
- else {
- nc = VpNumOfChars(vp, "E");
+ mc = (size_t)GetPositiveInt(f);
+ }
}
- if (mc > 0) {
- nc += (nc + mc - 1) / mc + 1;
+ if(fmt) {
+ nc = VpNumOfChars(vp,"F");
+ } else {
+ nc = VpNumOfChars(vp,"E");
}
+ if(mc>0) nc += (nc + mc - 1) / mc + 1;
str = rb_str_new(0, nc);
psz = RSTRING_PTR(str);
- if (fmt) {
- VpToFString(vp, psz, mc, fPlus);
- }
- else {
- VpToString (vp, psz, mc, fPlus);
+ if(fmt) {
+ VpToFString(vp, psz, mc, fPlus);
+ } else {
+ VpToString (vp, psz, mc, fPlus);
}
rb_str_resize(str, strlen(psz));
return str;
@@ -1990,21 +1879,21 @@ BigDecimal_split(VALUE self)
ssize_t e, s;
char *psz1;
- GUARD_OBJ(vp, GetVpValue(self, 1));
- str = rb_str_new(0, VpNumOfChars(vp, "E"));
+ GUARD_OBJ(vp,GetVpValue(self,1));
+ str = rb_str_new(0, VpNumOfChars(vp,"E"));
psz1 = RSTRING_PTR(str);
- VpSzMantissa(vp, psz1);
+ VpSzMantissa(vp,psz1);
s = 1;
- if(psz1[0] == '-') {
- size_t len = strlen(psz1 + 1);
+ if(psz1[0]=='-') {
+ size_t len = strlen(psz1+1);
- memmove(psz1, psz1 + 1, len);
+ memmove(psz1, psz1+1, len);
psz1[len] = '\0';
s = -1;
}
- if (psz1[0] == 'N') s = 0; /* NaN */
+ if(psz1[0]=='N') s=0; /* NaN */
e = VpExponent10(vp);
- obj = rb_ary_new2(4);
+ obj = rb_ary_new2(4);
rb_ary_push(obj, INT2FIX(s));
rb_ary_push(obj, str);
rb_str_resize(str, strlen(psz1));
@@ -2044,13 +1933,13 @@ BigDecimal_inspect(VALUE self)
size_t nc;
char *psz, *tmp;
- GUARD_OBJ(vp, GetVpValue(self, 1));
- nc = VpNumOfChars(vp, "E");
- nc += (nc + 9) / 10;
+ GUARD_OBJ(vp,GetVpValue(self,1));
+ nc = VpNumOfChars(vp,"E");
+ nc +=(nc + 9) / 10;
obj = rb_str_new(0, nc+256);
psz = RSTRING_PTR(obj);
- sprintf(psz, "#<BigDecimal:%"PRIxVALUE",'", self);
+ sprintf(psz,"#<BigDecimal:%"PRIxVALUE",'",self);
tmp = psz + strlen(psz);
VpToString(vp, tmp, 10, 0);
tmp += strlen(tmp);
@@ -2068,7 +1957,7 @@ static VALUE BigMath_s_log(VALUE, VALUE, VALUE);
inline static int
is_integer(VALUE x)
{
- return (RB_TYPE_P(x, T_FIXNUM) || RB_TYPE_P(x, T_BIGNUM));
+ return (TYPE(x) == T_FIXNUM || TYPE(x) == T_BIGNUM);
}
inline static int
@@ -2077,10 +1966,10 @@ is_negative(VALUE x)
if (FIXNUM_P(x)) {
return FIX2LONG(x) < 0;
}
- else if (RB_TYPE_P(x, T_BIGNUM)) {
+ else if (TYPE(x) == T_BIGNUM) {
return RBIGNUM_NEGATIVE_P(x);
}
- else if (RB_TYPE_P(x, T_FLOAT)) {
+ else if (TYPE(x) == T_FLOAT) {
return RFLOAT_VALUE(x) < 0.0;
}
return RTEST(rb_funcall(x, '<', 1, INT2FIX(0)));
@@ -2144,11 +2033,7 @@ is_even(VALUE x)
return (FIX2LONG(x) % 2) == 0;
case T_BIGNUM:
- {
- unsigned long l;
- rb_big_pack(x, &l, 1);
- return l % 2 == 0;
- }
+ return (RBIGNUM_DIGITS(x)[0] % 2) == 0;
default:
break;
@@ -2161,7 +2046,6 @@ static VALUE
rmpd_power_by_big_decimal(Real const* x, Real const* exp, ssize_t const n)
{
VALUE log_x, multiplied, y;
- volatile VALUE obj = exp->obj;
if (VpIsZero(exp)) {
return ToValue(VpCreateRbObject(n, "1"));
@@ -2170,7 +2054,6 @@ rmpd_power_by_big_decimal(Real const* x, Real const* exp, ssize_t const n)
log_x = BigMath_log(x->obj, SSIZET2NUM(n+1));
multiplied = BigDecimal_mult2(exp->obj, log_x, SSIZET2NUM(n+1));
y = BigMath_exp(multiplied, SSIZET2NUM(n));
- RB_GC_GUARD(obj);
return y;
}
@@ -2208,7 +2091,7 @@ BigDecimal_power(int argc, VALUE*argv, VALUE self)
return ToValue(y);
}
- retry:
+retry:
switch (TYPE(vexp)) {
case T_FIXNUM:
break;
@@ -2219,12 +2102,7 @@ BigDecimal_power(int argc, VALUE*argv, VALUE self)
case T_FLOAT:
d = RFLOAT_VALUE(vexp);
if (d == round(d)) {
- if (FIXABLE(d)) {
- vexp = LONG2FIX((long)d);
- }
- else {
- vexp = rb_dbl2big(d);
- }
+ vexp = LL2NUM((LONG_LONG)round(d));
goto retry;
}
exp = GetVpValueWithPrec(vexp, DBL_DIG+1, 1);
@@ -2352,7 +2230,7 @@ BigDecimal_power(int argc, VALUE*argv, VALUE self)
if (exp != NULL) {
return rmpd_power_by_big_decimal(x, exp, n);
}
- else if (RB_TYPE_P(vexp, T_BIGNUM)) {
+ else if (TYPE(vexp) == T_BIGNUM) {
VALUE abs_value = BigDecimal_abs(self);
if (is_one(abs_value)) {
return ToValue(VpCreateRbObject(n, "1"));
@@ -2395,22 +2273,19 @@ BigDecimal_power(int argc, VALUE*argv, VALUE self)
}
}
- int_exp = FIX2LONG(vexp);
+ int_exp = FIX2INT(vexp);
ma = int_exp;
- if (ma < 0) ma = -ma;
+ if (ma < 0) ma = -ma;
if (ma == 0) ma = 1;
if (VpIsDef(x)) {
- mp = x->Prec * (VpBaseFig() + 1);
- GUARD_OBJ(y, VpCreateRbObject(mp * (ma + 1), "0"));
+ mp = x->Prec * (VpBaseFig() + 1);
+ GUARD_OBJ(y, VpCreateRbObject(mp * (ma + 1), "0"));
}
else {
- GUARD_OBJ(y, VpCreateRbObject(1, "0"));
+ GUARD_OBJ(y, VpCreateRbObject(1, "0"));
}
VpPower(y, x, int_exp);
- if (!NIL_P(prec) && VpIsDef(y)) {
- VpMidRound(y, VpGetRoundMode(), n);
- }
return ToValue(y);
}
@@ -2531,7 +2406,6 @@ BigDecimal_new(int argc, VALUE *argv)
return VpAlloc(mf, RSTRING_PTR(iniValue));
}
-/* See also BigDecimal::new */
static VALUE
BigDecimal_global_new(int argc, VALUE *argv, VALUE self)
{
@@ -2559,15 +2433,15 @@ BigDecimal_limit(int argc, VALUE *argv, VALUE self)
VALUE nFig;
VALUE nCur = INT2NUM(VpGetPrecLimit());
- if (rb_scan_args(argc, argv, "01", &nFig) == 1) {
- int nf;
- if (NIL_P(nFig)) return nCur;
- Check_Type(nFig, T_FIXNUM);
- nf = FIX2INT(nFig);
- if (nf < 0) {
- rb_raise(rb_eArgError, "argument must be positive");
- }
- VpSetPrecLimit(nf);
+ if(rb_scan_args(argc,argv,"01",&nFig)==1) {
+ int nf;
+ if(nFig==Qnil) return nCur;
+ Check_Type(nFig, T_FIXNUM);
+ nf = FIX2INT(nFig);
+ if(nf<0) {
+ rb_raise(rb_eArgError, "argument must be positive");
+ }
+ VpSetPrecLimit(nf);
}
return nCur;
}
@@ -2583,22 +2457,22 @@ BigDecimal_limit(int argc, VALUE *argv, VALUE self)
* BigDecimal::SIGN_NaN:: value is Not a Number
* BigDecimal::SIGN_POSITIVE_ZERO:: value is +0
* BigDecimal::SIGN_NEGATIVE_ZERO:: value is -0
- * BigDecimal::SIGN_POSITIVE_INFINITE:: value is +Infinity
- * BigDecimal::SIGN_NEGATIVE_INFINITE:: value is -Infinity
+ * BigDecimal::SIGN_POSITIVE_INFINITE:: value is +infinity
+ * BigDecimal::SIGN_NEGATIVE_INFINITE:: value is -infinity
* BigDecimal::SIGN_POSITIVE_FINITE:: value is positive
* BigDecimal::SIGN_NEGATIVE_FINITE:: value is negative
*/
static VALUE
BigDecimal_sign(VALUE self)
{ /* sign */
- int s = GetVpValue(self, 1)->sign;
+ int s = GetVpValue(self,1)->sign;
return INT2FIX(s);
}
/*
* call-seq: BigDecimal.save_exception_mode { ... }
*
- * Execute the provided block, but preserve the exception mode
+ * Excecute the provided block, but preserve the exception mode
*
* BigDecimal.save_exception_mode do
* BigDecimal.mode(BigDecimal::EXCEPTION_OVERFLOW, false)
@@ -2627,9 +2501,9 @@ BigDecimal_save_exception_mode(VALUE self)
/*
* call-seq: BigDecimal.save_rounding_mode { ... }
*
- * Execute the provided block, but preserve the rounding mode
+ * Excecute the provided block, but preserve the rounding mode
*
- * BigDecimal.save_rounding_mode do
+ * BigDecimal.save_exception_mode do
* BigDecimal.mode(BigDecimal::ROUND_MODE, :up)
* puts BigDecimal.mode(BigDecimal::ROUND_MODE)
* end
@@ -2652,7 +2526,7 @@ BigDecimal_save_rounding_mode(VALUE self)
/*
* call-seq: BigDecimal.save_limit { ... }
*
- * Execute the provided block, but preserve the precision limit
+ * Excecute the provided block, but preserve the precision limit
*
* BigDecimal.limit(100)
* puts BigDecimal.limit
@@ -2675,21 +2549,21 @@ BigDecimal_save_limit(VALUE self)
}
/* call-seq:
- * BigMath.exp(decimal, numeric) -> BigDecimal
+ * BigMath.exp(x, prec)
*
* Computes the value of e (the base of natural logarithms) raised to the
- * power of +decimal+, to the specified number of digits of precision.
+ * power of x, to the specified number of digits of precision.
*
- * If +decimal+ is infinity, returns Infinity.
+ * If x is infinity, returns Infinity.
*
- * If +decimal+ is NaN, returns NaN.
+ * If x is NaN, returns NaN.
*/
static VALUE
BigMath_s_exp(VALUE klass, VALUE x, VALUE vprec)
{
ssize_t prec, n, i;
Real* vx = NULL;
- VALUE one, d, y;
+ VALUE one, d, x1, y, z;
int negative = 0;
int infinite = 0;
int nan = 0;
@@ -2704,18 +2578,18 @@ BigMath_s_exp(VALUE klass, VALUE x, VALUE vprec)
* BigDecimalCmp function. */
switch (TYPE(x)) {
case T_DATA:
- if (!is_kind_of_BigDecimal(x)) break;
- vx = DATA_PTR(x);
- negative = VpGetSign(vx) < 0;
- infinite = VpIsPosInf(vx) || VpIsNegInf(vx);
- nan = VpIsNaN(vx);
- break;
+ if (!is_kind_of_BigDecimal(x)) break;
+ vx = DATA_PTR(x);
+ negative = VpGetSign(vx) < 0;
+ infinite = VpIsPosInf(vx) || VpIsNegInf(vx);
+ nan = VpIsNaN(vx);
+ break;
case T_FIXNUM:
- /* fall through */
+ /* fall through */
case T_BIGNUM:
- vx = GetVpValue(x, 0);
- break;
+ vx = GetVpValue(x, 0);
+ break;
case T_FLOAT:
flo = RFLOAT_VALUE(x);
@@ -2736,27 +2610,27 @@ BigMath_s_exp(VALUE klass, VALUE x, VALUE vprec)
}
if (infinite) {
if (negative) {
- return ToValue(GetVpValueWithPrec(INT2FIX(0), prec, 1));
+ return ToValue(GetVpValueWithPrec(INT2NUM(0), prec, 1));
}
else {
Real* vy;
vy = VpCreateRbObject(prec, "#0");
- VpSetInf(vy, VP_SIGN_POSITIVE_INFINITE);
RB_GC_GUARD(vy->obj);
+ VpSetInf(vy, VP_SIGN_POSITIVE_INFINITE);
return ToValue(vy);
}
}
else if (nan) {
Real* vy;
vy = VpCreateRbObject(prec, "#0");
- VpSetNaN(vy);
RB_GC_GUARD(vy->obj);
+ VpSetNaN(vy);
return ToValue(vy);
}
else if (vx == NULL) {
cannot_be_coerced_into_BigDecimal(rb_eArgError, x);
}
- x = vx->obj;
+ RB_GC_GUARD(vx->obj);
n = prec + rmpd_double_figures();
negative = VpGetSign(vx) < 0;
@@ -2764,18 +2638,18 @@ BigMath_s_exp(VALUE klass, VALUE x, VALUE vprec)
VpSetSign(vx, 1);
}
- one = ToValue(VpCreateRbObject(1, "1"));
- y = one;
- d = y;
- i = 1;
+ RB_GC_GUARD(one) = ToValue(VpCreateRbObject(1, "1"));
+ RB_GC_GUARD(x1) = one;
+ RB_GC_GUARD(y) = one;
+ RB_GC_GUARD(d) = y;
+ RB_GC_GUARD(z) = one;
+ i = 0;
while (!VpIsZero((Real*)DATA_PTR(d))) {
+ VALUE argv[2];
SIGNED_VALUE const ey = VpExponent10(DATA_PTR(y));
SIGNED_VALUE const ed = VpExponent10(DATA_PTR(d));
ssize_t m = n - vabs(ey - ed);
-
- rb_thread_check_ints();
-
if (m <= 0) {
break;
}
@@ -2783,37 +2657,38 @@ BigMath_s_exp(VALUE klass, VALUE x, VALUE vprec)
m = rmpd_double_figures();
}
- d = BigDecimal_mult(d, x); /* d <- d * x */
- d = BigDecimal_div2(d, SSIZET2NUM(i), SSIZET2NUM(m)); /* d <- d / i */
- y = BigDecimal_add(y, d); /* y <- y + d */
- ++i; /* i <- i + 1 */
+ x1 = BigDecimal_mult2(x1, x, SSIZET2NUM(n));
+ ++i;
+ z = BigDecimal_mult(z, SSIZET2NUM(i));
+ argv[0] = z;
+ argv[1] = SSIZET2NUM(m);
+ d = BigDecimal_div2(2, argv, x1);
+ y = BigDecimal_add(y, d);
}
if (negative) {
- return BigDecimal_div2(one, y, vprec);
+ VALUE argv[2];
+ argv[0] = y;
+ argv[1] = vprec;
+ return BigDecimal_div2(2, argv, one);
}
else {
vprec = SSIZET2NUM(prec - VpExponent10(DATA_PTR(y)));
return BigDecimal_round(1, &vprec, y);
}
-
- RB_GC_GUARD(one);
- RB_GC_GUARD(x);
- RB_GC_GUARD(y);
- RB_GC_GUARD(d);
}
/* call-seq:
- * BigMath.log(decimal, numeric) -> BigDecimal
+ * BigMath.log(x, prec)
*
- * Computes the natural logarithm of +decimal+ to the specified number of
- * digits of precision, +numeric+.
+ * Computes the natural logarithm of x to the specified number of digits of
+ * precision.
*
- * If +decimal+ is zero or negative, raises Math::DomainError.
+ * If x is zero or negative, raises Math::DomainError.
*
- * If +decimal+ is positive infinity, returns Infinity.
+ * If x is positive infinity, returns Infinity.
*
- * If +decimal+ is NaN, returns NaN.
+ * If x is NaN, returns NaN.
*/
static VALUE
BigMath_s_log(VALUE klass, VALUE x, VALUE vprec)
@@ -2821,7 +2696,7 @@ BigMath_s_log(VALUE klass, VALUE x, VALUE vprec)
ssize_t prec, n, i;
SIGNED_VALUE expo;
Real* vx = NULL;
- VALUE vn, one, two, w, x2, y, d;
+ VALUE argv[2], vn, one, two, w, x2, y, d;
int zero = 0;
int negative = 0;
int infinite = 0;
@@ -2829,7 +2704,7 @@ BigMath_s_log(VALUE klass, VALUE x, VALUE vprec)
double flo;
long fix;
- if (!is_integer(vprec)) {
+ if (TYPE(vprec) != T_FIXNUM && TYPE(vprec) != T_BIGNUM) {
rb_raise(rb_eArgError, "precision must be an Integer");
}
@@ -2927,7 +2802,9 @@ get_vp_value:
expo = 0;
}
w = BigDecimal_sub(x, one);
- x = BigDecimal_div2(w, BigDecimal_add(x, one), vn);
+ argv[0] = BigDecimal_add(x, one);
+ argv[1] = vn;
+ x = BigDecimal_div2(2, argv, w);
RB_GC_GUARD(x2) = BigDecimal_mult2(x, x, vn);
RB_GC_GUARD(y) = x;
RB_GC_GUARD(d) = y;
@@ -2945,7 +2822,9 @@ get_vp_value:
x = BigDecimal_mult2(x2, x, vn);
i += 2;
- d = BigDecimal_div2(x, SSIZET2NUM(i), SSIZET2NUM(m));
+ argv[0] = SSIZET2NUM(i);
+ argv[1] = SSIZET2NUM(m);
+ d = BigDecimal_div2(2, argv, x);
y = BigDecimal_add(y, d);
}
@@ -2964,7 +2843,15 @@ get_vp_value:
/* Document-class: BigDecimal
* BigDecimal provides arbitrary-precision floating point decimal arithmetic.
*
- * == Introduction
+ * Copyright (C) 2002 by Shigeo Kobayashi <shigeo@tinyforest.gr.jp>.
+ *
+ * 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 BigDecimal distribution.
+ *
+ * Documented by mathew <meta@pobox.com>.
+ *
+ * = Introduction
*
* Ruby provides built-in support for arbitrary precision integer arithmetic.
*
@@ -2983,7 +2870,7 @@ get_vp_value:
* For example, try:
*
* sum = 0
- * 10_000.times do
+ * for i in (1..10000)
* sum = sum + 0.0001
* end
* print sum #=> 0.9999999999999062
@@ -2993,7 +2880,7 @@ get_vp_value:
* require 'bigdecimal'
*
* sum = BigDecimal.new("0")
- * 10_000.times do
+ * for i in (1..10000)
* sum = sum + BigDecimal.new("0.0001")
* end
* print sum #=> 0.1E1
@@ -3004,24 +2891,24 @@ get_vp_value:
*
* (1.2 - 1.0) == 0.2 #=> false
*
- * == Special features of accurate decimal arithmetic
+ * = Special features of accurate decimal arithmetic
*
* Because BigDecimal is more accurate than normal binary floating point
* arithmetic, it requires some special values.
*
- * === Infinity
+ * == Infinity
*
* BigDecimal sometimes needs to return infinity, for example if you divide
* a value by zero.
*
- * BigDecimal.new("1.0") / BigDecimal.new("0.0") #=> Infinity
- * BigDecimal.new("-1.0") / BigDecimal.new("0.0") #=> -Infinity
+ * BigDecimal.new("1.0") / BigDecimal.new("0.0") #=> infinity
+ * BigDecimal.new("-1.0") / BigDecimal.new("0.0") #=> -infinity
*
* You can represent infinite numbers to BigDecimal using the strings
* <code>'Infinity'</code>, <code>'+Infinity'</code> and
* <code>'-Infinity'</code> (case-sensitive)
*
- * === Not a Number
+ * == Not a Number
*
* When a computation results in an undefined value, the special value +NaN+
* (for 'not a number') is returned.
@@ -3035,10 +2922,10 @@ get_vp_value:
* NaN is never considered to be the same as any other value, even NaN itself:
*
* n = BigDecimal.new('NaN')
- * n == 0.0 #=> false
- * n == n #=> false
+ * n == 0.0 #=> nil
+ * n == n #=> nil
*
- * === Positive and negative zero
+ * == Positive and negative zero
*
* If a computation results in a value which is too small to be represented as
* a BigDecimal within the currently specified limits of precision, zero must
@@ -3060,19 +2947,6 @@ get_vp_value:
*
* Note also that in mathematics, there is no particular concept of negative
* or positive zero; true mathematical zero has no sign.
- *
- * == License
- *
- * Copyright (C) 2002 by Shigeo Kobayashi <shigeo@tinyforest.gr.jp>.
- *
- * 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 BigDecimal distribution.
- *
- * Maintained by mrkn <mrkn@mrkn.jp> and ruby-core members.
- *
- * Documented by zzak <zachary@zacharyscott.net>, mathew <meta@pobox.com>, and
- * many other contributors.
*/
void
Init_bigdecimal(void)
@@ -3087,7 +2961,7 @@ Init_bigdecimal(void)
VpInit(0UL);
/* Class and method registration */
- rb_cBigDecimal = rb_define_class("BigDecimal", rb_cNumeric);
+ rb_cBigDecimal = rb_define_class("BigDecimal",rb_cNumeric);
rb_define_alloc_func(rb_cBigDecimal, BigDecimal_s_allocate);
/* Global function */
@@ -3121,92 +2995,92 @@ Init_bigdecimal(void)
* 0xff: Determines whether overflow, underflow or zero divide result in
* an exception being thrown. See BigDecimal.mode.
*/
- rb_define_const(rb_cBigDecimal, "EXCEPTION_ALL", INT2FIX(VP_EXCEPTION_ALL));
+ rb_define_const(rb_cBigDecimal, "EXCEPTION_ALL",INT2FIX(VP_EXCEPTION_ALL));
/*
* 0x02: Determines what happens when the result of a computation is not a
* number (NaN). See BigDecimal.mode.
*/
- rb_define_const(rb_cBigDecimal, "EXCEPTION_NaN", INT2FIX(VP_EXCEPTION_NaN));
+ rb_define_const(rb_cBigDecimal, "EXCEPTION_NaN",INT2FIX(VP_EXCEPTION_NaN));
/*
* 0x01: Determines what happens when the result of a computation is
* infinity. See BigDecimal.mode.
*/
- rb_define_const(rb_cBigDecimal, "EXCEPTION_INFINITY", INT2FIX(VP_EXCEPTION_INFINITY));
+ rb_define_const(rb_cBigDecimal, "EXCEPTION_INFINITY",INT2FIX(VP_EXCEPTION_INFINITY));
/*
* 0x04: Determines what happens when the result of a computation is an
* underflow (a result too small to be represented). See BigDecimal.mode.
*/
- rb_define_const(rb_cBigDecimal, "EXCEPTION_UNDERFLOW", INT2FIX(VP_EXCEPTION_UNDERFLOW));
+ rb_define_const(rb_cBigDecimal, "EXCEPTION_UNDERFLOW",INT2FIX(VP_EXCEPTION_UNDERFLOW));
/*
* 0x01: Determines what happens when the result of a computation is an
* overflow (a result too large to be represented). See BigDecimal.mode.
*/
- rb_define_const(rb_cBigDecimal, "EXCEPTION_OVERFLOW", INT2FIX(VP_EXCEPTION_OVERFLOW));
+ rb_define_const(rb_cBigDecimal, "EXCEPTION_OVERFLOW",INT2FIX(VP_EXCEPTION_OVERFLOW));
/*
* 0x01: Determines what happens when a division by zero is performed.
* See BigDecimal.mode.
*/
- rb_define_const(rb_cBigDecimal, "EXCEPTION_ZERODIVIDE", INT2FIX(VP_EXCEPTION_ZERODIVIDE));
+ rb_define_const(rb_cBigDecimal, "EXCEPTION_ZERODIVIDE",INT2FIX(VP_EXCEPTION_ZERODIVIDE));
/*
* 0x100: Determines what happens when a result must be rounded in order to
* fit in the appropriate number of significant digits. See
* BigDecimal.mode.
*/
- rb_define_const(rb_cBigDecimal, "ROUND_MODE", INT2FIX(VP_ROUND_MODE));
+ rb_define_const(rb_cBigDecimal, "ROUND_MODE",INT2FIX(VP_ROUND_MODE));
/* 1: Indicates that values should be rounded away from zero. See
* BigDecimal.mode.
*/
- rb_define_const(rb_cBigDecimal, "ROUND_UP", INT2FIX(VP_ROUND_UP));
+ rb_define_const(rb_cBigDecimal, "ROUND_UP",INT2FIX(VP_ROUND_UP));
/* 2: Indicates that values should be rounded towards zero. See
* BigDecimal.mode.
*/
- rb_define_const(rb_cBigDecimal, "ROUND_DOWN", INT2FIX(VP_ROUND_DOWN));
+ rb_define_const(rb_cBigDecimal, "ROUND_DOWN",INT2FIX(VP_ROUND_DOWN));
/* 3: Indicates that digits >= 5 should be rounded up, others rounded down.
* See BigDecimal.mode. */
- rb_define_const(rb_cBigDecimal, "ROUND_HALF_UP", INT2FIX(VP_ROUND_HALF_UP));
+ rb_define_const(rb_cBigDecimal, "ROUND_HALF_UP",INT2FIX(VP_ROUND_HALF_UP));
/* 4: Indicates that digits >= 6 should be rounded up, others rounded down.
* See BigDecimal.mode.
*/
- rb_define_const(rb_cBigDecimal, "ROUND_HALF_DOWN", INT2FIX(VP_ROUND_HALF_DOWN));
- /* 5: Round towards +Infinity. See BigDecimal.mode. */
- rb_define_const(rb_cBigDecimal, "ROUND_CEILING", INT2FIX(VP_ROUND_CEIL));
+ rb_define_const(rb_cBigDecimal, "ROUND_HALF_DOWN",INT2FIX(VP_ROUND_HALF_DOWN));
+ /* 5: Round towards +infinity. See BigDecimal.mode. */
+ rb_define_const(rb_cBigDecimal, "ROUND_CEILING",INT2FIX(VP_ROUND_CEIL));
- /* 6: Round towards -Infinity. See BigDecimal.mode. */
- rb_define_const(rb_cBigDecimal, "ROUND_FLOOR", INT2FIX(VP_ROUND_FLOOR));
+ /* 6: Round towards -infinity. See BigDecimal.mode. */
+ rb_define_const(rb_cBigDecimal, "ROUND_FLOOR",INT2FIX(VP_ROUND_FLOOR));
/* 7: Round towards the even neighbor. See BigDecimal.mode. */
- rb_define_const(rb_cBigDecimal, "ROUND_HALF_EVEN", INT2FIX(VP_ROUND_HALF_EVEN));
+ rb_define_const(rb_cBigDecimal, "ROUND_HALF_EVEN",INT2FIX(VP_ROUND_HALF_EVEN));
/* 0: Indicates that a value is not a number. See BigDecimal.sign. */
- rb_define_const(rb_cBigDecimal, "SIGN_NaN", INT2FIX(VP_SIGN_NaN));
+ rb_define_const(rb_cBigDecimal, "SIGN_NaN",INT2FIX(VP_SIGN_NaN));
/* 1: Indicates that a value is +0. See BigDecimal.sign. */
- rb_define_const(rb_cBigDecimal, "SIGN_POSITIVE_ZERO", INT2FIX(VP_SIGN_POSITIVE_ZERO));
+ rb_define_const(rb_cBigDecimal, "SIGN_POSITIVE_ZERO",INT2FIX(VP_SIGN_POSITIVE_ZERO));
/* -1: Indicates that a value is -0. See BigDecimal.sign. */
- rb_define_const(rb_cBigDecimal, "SIGN_NEGATIVE_ZERO", INT2FIX(VP_SIGN_NEGATIVE_ZERO));
+ rb_define_const(rb_cBigDecimal, "SIGN_NEGATIVE_ZERO",INT2FIX(VP_SIGN_NEGATIVE_ZERO));
/* 2: Indicates that a value is positive and finite. See BigDecimal.sign. */
- rb_define_const(rb_cBigDecimal, "SIGN_POSITIVE_FINITE", INT2FIX(VP_SIGN_POSITIVE_FINITE));
+ rb_define_const(rb_cBigDecimal, "SIGN_POSITIVE_FINITE",INT2FIX(VP_SIGN_POSITIVE_FINITE));
/* -2: Indicates that a value is negative and finite. See BigDecimal.sign. */
- rb_define_const(rb_cBigDecimal, "SIGN_NEGATIVE_FINITE", INT2FIX(VP_SIGN_NEGATIVE_FINITE));
+ rb_define_const(rb_cBigDecimal, "SIGN_NEGATIVE_FINITE",INT2FIX(VP_SIGN_NEGATIVE_FINITE));
/* 3: Indicates that a value is positive and infinite. See BigDecimal.sign. */
- rb_define_const(rb_cBigDecimal, "SIGN_POSITIVE_INFINITE", INT2FIX(VP_SIGN_POSITIVE_INFINITE));
+ rb_define_const(rb_cBigDecimal, "SIGN_POSITIVE_INFINITE",INT2FIX(VP_SIGN_POSITIVE_INFINITE));
/* -3: Indicates that a value is negative and infinite. See BigDecimal.sign. */
- rb_define_const(rb_cBigDecimal, "SIGN_NEGATIVE_INFINITE", INT2FIX(VP_SIGN_NEGATIVE_INFINITE));
+ rb_define_const(rb_cBigDecimal, "SIGN_NEGATIVE_INFINITE",INT2FIX(VP_SIGN_NEGATIVE_INFINITE));
arg = rb_str_new2("+Infinity");
/* Positive infinity value. */
@@ -3224,7 +3098,7 @@ Init_bigdecimal(void)
rb_define_method(rb_cBigDecimal, "add", BigDecimal_add2, 2);
rb_define_method(rb_cBigDecimal, "sub", BigDecimal_sub2, 2);
rb_define_method(rb_cBigDecimal, "mult", BigDecimal_mult2, 2);
- rb_define_method(rb_cBigDecimal, "div", BigDecimal_div3, -1);
+ rb_define_method(rb_cBigDecimal, "div", BigDecimal_div2, -1);
rb_define_method(rb_cBigDecimal, "hash", BigDecimal_hash, 0);
rb_define_method(rb_cBigDecimal, "to_s", BigDecimal_to_s, -1);
rb_define_method(rb_cBigDecimal, "to_i", BigDecimal_to_i, 0);
@@ -3273,6 +3147,7 @@ Init_bigdecimal(void)
rb_define_method(rb_cBigDecimal, "truncate", BigDecimal_truncate, -1);
rb_define_method(rb_cBigDecimal, "_dump", BigDecimal_dump, -1);
+ /* mathematical functions */
rb_mBigMath = rb_define_module("BigMath");
rb_define_singleton_method(rb_mBigMath, "exp", BigMath_s_exp, 2);
rb_define_singleton_method(rb_mBigMath, "log", BigMath_s_log, 2);
@@ -3310,7 +3185,7 @@ static int gfCheckVal = 1; /* Value checking flag in VpNmlz() */
static Real *VpConstOne; /* constant 1.0 */
static Real *VpPt5; /* constant 0.5 */
-#define maxnr 100UL /* Maximum iterations for calculating sqrt. */
+#define maxnr 100UL /* Maximum iterations for calcurating sqrt. */
/* used in VpSqrt() */
/* ETC */
@@ -3327,7 +3202,7 @@ static void VpFormatSt(char *psz, size_t fFmt);
static int VpRdup(Real *m, size_t ind_m);
#ifdef BIGDECIMAL_DEBUG
-static int gnAlloc = 0; /* Memory allocation counter */
+static int gnAlloc=0; /* Memory allocation counter */
#endif /* BIGDECIMAL_DEBUG */
VP_EXPORT void *
@@ -3335,7 +3210,7 @@ VpMemAlloc(size_t mb)
{
void *p = xmalloc(mb);
if (!p) {
- VpException(VP_EXCEPTION_MEMORY, "failed to allocate memory", 1);
+ VpException(VP_EXCEPTION_MEMORY, "failed to allocate memory", 1);
}
memset(p, 0, mb);
#ifdef BIGDECIMAL_DEBUG
@@ -3344,12 +3219,12 @@ VpMemAlloc(size_t mb)
return p;
}
- VP_EXPORT void *
+VP_EXPORT void *
VpMemRealloc(void *ptr, size_t mb)
{
void *p = xrealloc(ptr, mb);
if (!p) {
- VpException(VP_EXCEPTION_MEMORY, "failed to allocate memory", 1);
+ VpException(VP_EXCEPTION_MEMORY, "failed to allocate memory", 1);
}
return p;
}
@@ -3357,18 +3232,18 @@ VpMemRealloc(void *ptr, size_t mb)
VP_EXPORT void
VpFree(Real *pv)
{
- if (pv != NULL) {
- xfree(pv);
+ if(pv != NULL) {
+ xfree(pv);
#ifdef BIGDECIMAL_DEBUG
- gnAlloc--; /* Decrement allocation count */
- if (gnAlloc == 0) {
- printf(" *************** All memories allocated freed ****************");
- getchar();
- }
- if (gnAlloc < 0) {
- printf(" ??????????? Too many memory free calls(%d) ?????????????\n", gnAlloc);
- getchar();
- }
+ gnAlloc--; /* Decrement allocation count */
+ if(gnAlloc==0) {
+ printf(" *************** All memories allocated freed ****************");
+ getchar();
+ }
+ if(gnAlloc<0) {
+ printf(" ??????????? Too many memory free calls(%d) ?????????????\n",gnAlloc);
+ getchar();
+ }
#endif /* BIGDECIMAL_DEBUG */
}
}
@@ -3539,7 +3414,7 @@ VP_EXPORT double
VpGetDoubleNaN(void) /* Returns the value of NaN */
{
static double fNaN = 0.0;
- if (fNaN == 0.0) fNaN = Zero()/Zero();
+ if(fNaN==0.0) fNaN = Zero()/Zero();
return fNaN;
}
@@ -3547,7 +3422,7 @@ VP_EXPORT double
VpGetDoublePosInf(void) /* Returns the value of +Infinity */
{
static double fInf = 0.0;
- if (fInf == 0.0) fInf = One()/Zero();
+ if(fInf==0.0) fInf = One()/Zero();
return fInf;
}
@@ -3555,7 +3430,7 @@ VP_EXPORT double
VpGetDoubleNegInf(void) /* Returns the value of -Infinity */
{
static double fInf = 0.0;
- if (fInf == 0.0) fInf = -(One()/Zero());
+ if(fInf==0.0) fInf = -(One()/Zero());
return fInf;
}
@@ -3563,7 +3438,7 @@ VP_EXPORT double
VpGetDoubleNegZero(void) /* Returns the value of -0 */
{
static double nzero = 1000.0;
- if (nzero != 0.0) nzero = (One()/VpGetDoubleNegInf());
+ if(nzero!=0.0) nzero = (One()/VpGetDoubleNegInf());
return nzero;
}
@@ -3579,26 +3454,39 @@ VpIsNegDoubleZero(double v)
VP_EXPORT int
VpException(unsigned short f, const char *str,int always)
{
+ VALUE exc;
+ int fatal=0;
unsigned short const exception_mode = VpGetException();
- if (f == VP_EXCEPTION_OP || f == VP_EXCEPTION_MEMORY) always = 1;
+ if(f==VP_EXCEPTION_OP || f==VP_EXCEPTION_MEMORY) always = 1;
if (always || (exception_mode & f)) {
- switch(f) {
- /* case VP_EXCEPTION_OVERFLOW: */
- case VP_EXCEPTION_ZERODIVIDE:
- case VP_EXCEPTION_INFINITY:
- case VP_EXCEPTION_NaN:
- case VP_EXCEPTION_UNDERFLOW:
- case VP_EXCEPTION_OP:
- rb_raise(rb_eFloatDomainError, "%s", str);
- break;
- case VP_EXCEPTION_MEMORY:
- default:
- rb_fatal("%s", str);
- }
+ switch(f)
+ {
+ /*
+ case VP_EXCEPTION_OVERFLOW:
+ */
+ case VP_EXCEPTION_ZERODIVIDE:
+ case VP_EXCEPTION_INFINITY:
+ case VP_EXCEPTION_NaN:
+ case VP_EXCEPTION_UNDERFLOW:
+ case VP_EXCEPTION_OP:
+ exc = rb_eFloatDomainError;
+ goto raise;
+ case VP_EXCEPTION_MEMORY:
+ fatal = 1;
+ goto raise;
+ default:
+ fatal = 1;
+ goto raise;
+ }
}
return 0; /* 0 Means VpException() raised no exception */
+
+raise:
+ if(fatal) rb_fatal("%s", str);
+ else rb_raise(exc, "%s", str);
+ return 0;
}
/* Throw exception or returns 0,when resulting c is Inf or NaN */
@@ -3606,90 +3494,91 @@ VpException(unsigned short f, const char *str,int always)
static int
VpIsDefOP(Real *c,Real *a,Real *b,int sw)
{
- if (VpIsNaN(a) || VpIsNaN(b)) {
- /* at least a or b is NaN */
- VpSetNaN(c);
- goto NaN;
- }
-
- if (VpIsInf(a)) {
- if (VpIsInf(b)) {
- switch(sw) {
- case 1: /* + */
- if (VpGetSign(a) == VpGetSign(b)) {
- VpSetInf(c, VpGetSign(a));
- goto Inf;
- }
- else {
- VpSetNaN(c);
- goto NaN;
- }
- case 2: /* - */
- if (VpGetSign(a) != VpGetSign(b)) {
- VpSetInf(c, VpGetSign(a));
- goto Inf;
- }
- else {
- VpSetNaN(c);
- goto NaN;
- }
- break;
- case 3: /* * */
- VpSetInf(c, VpGetSign(a)*VpGetSign(b));
- goto Inf;
- break;
- case 4: /* / */
- VpSetNaN(c);
- goto NaN;
- }
- VpSetNaN(c);
- goto NaN;
- }
- /* Inf op Finite */
- switch(sw) {
- case 1: /* + */
- case 2: /* - */
- VpSetInf(c, VpGetSign(a));
- break;
- case 3: /* * */
- if (VpIsZero(b)) {
- VpSetNaN(c);
- goto NaN;
- }
- VpSetInf(c, VpGetSign(a)*VpGetSign(b));
- break;
- case 4: /* / */
- VpSetInf(c, VpGetSign(a)*VpGetSign(b));
- }
- goto Inf;
+ if(VpIsNaN(a) || VpIsNaN(b)) {
+ /* at least a or b is NaN */
+ VpSetNaN(c);
+ goto NaN;
+ }
+
+ if(VpIsInf(a)) {
+ if(VpIsInf(b)) {
+ switch(sw)
+ {
+ case 1: /* + */
+ if(VpGetSign(a)==VpGetSign(b)) {
+ VpSetInf(c,VpGetSign(a));
+ goto Inf;
+ } else {
+ VpSetNaN(c);
+ goto NaN;
+ }
+ case 2: /* - */
+ if(VpGetSign(a)!=VpGetSign(b)) {
+ VpSetInf(c,VpGetSign(a));
+ goto Inf;
+ } else {
+ VpSetNaN(c);
+ goto NaN;
+ }
+ break;
+ case 3: /* * */
+ VpSetInf(c,VpGetSign(a)*VpGetSign(b));
+ goto Inf;
+ break;
+ case 4: /* / */
+ VpSetNaN(c);
+ goto NaN;
+ }
+ VpSetNaN(c);
+ goto NaN;
+ }
+ /* Inf op Finite */
+ switch(sw)
+ {
+ case 1: /* + */
+ case 2: /* - */
+ VpSetInf(c,VpGetSign(a));
+ break;
+ case 3: /* * */
+ if(VpIsZero(b)) {
+ VpSetNaN(c);
+ goto NaN;
+ }
+ VpSetInf(c,VpGetSign(a)*VpGetSign(b));
+ break;
+ case 4: /* / */
+ VpSetInf(c,VpGetSign(a)*VpGetSign(b));
+ }
+ goto Inf;
}
- if (VpIsInf(b)) {
- switch(sw) {
- case 1: /* + */
- VpSetInf(c, VpGetSign(b));
- break;
- case 2: /* - */
- VpSetInf(c, -VpGetSign(b));
- break;
- case 3: /* * */
- if (VpIsZero(a)) {
- VpSetNaN(c);
- goto NaN;
- }
- VpSetInf(c, VpGetSign(a)*VpGetSign(b));
- break;
- case 4: /* / */
- VpSetZero(c, VpGetSign(a)*VpGetSign(b));
- }
- goto Inf;
+ if(VpIsInf(b)) {
+ switch(sw)
+ {
+ case 1: /* + */
+ VpSetInf(c,VpGetSign(b));
+ break;
+ case 2: /* - */
+ VpSetInf(c,-VpGetSign(b));
+ break;
+ case 3: /* * */
+ if(VpIsZero(a)) {
+ VpSetNaN(c);
+ goto NaN;
+ }
+ VpSetInf(c,VpGetSign(a)*VpGetSign(b));
+ break;
+ case 4: /* / */
+ VpSetZero(c,VpGetSign(a)*VpGetSign(b));
+ }
+ goto Inf;
}
return 1; /* Results OK */
Inf:
- return VpException(VP_EXCEPTION_INFINITY, "Computation results to 'Infinity'", 0);
+ return VpException(VP_EXCEPTION_INFINITY,"Computation results to 'Infinity'",0);
NaN:
- return VpException(VP_EXCEPTION_NaN, "Computation results to 'NaN'", 0);
+ return VpException(VP_EXCEPTION_NaN,"Computation results to 'NaN'",0);
}
/*
@@ -3705,26 +3594,26 @@ VpNumOfChars(Real *vp,const char *pszFmt)
SIGNED_VALUE ex;
size_t nc;
- if (vp == NULL) return BASE_FIG*2+6;
- if (!VpIsDef(vp)) return 32; /* not sure,may be OK */
-
- switch(*pszFmt) {
- case 'F':
- nc = BASE_FIG*(vp->Prec + 1)+2;
- ex = vp->exponent;
- if (ex < 0) {
- nc += BASE_FIG*(size_t)(-ex);
- }
- else {
- if ((size_t)ex > vp->Prec) {
- nc += BASE_FIG*((size_t)ex - vp->Prec);
- }
- }
- break;
- case 'E':
- /* fall through */
- default:
- nc = BASE_FIG*(vp->Prec + 2)+6; /* 3: sign + exponent chars */
+ if(vp == NULL) return BASE_FIG*2+6;
+ if(!VpIsDef(vp)) return 32; /* not sure,may be OK */
+
+ switch(*pszFmt)
+ {
+ case 'F':
+ nc = BASE_FIG*(vp->Prec + 1)+2;
+ ex = vp->exponent;
+ if(ex < 0) {
+ nc += BASE_FIG*(size_t)(-ex);
+ }
+ else {
+ if((size_t)ex > vp->Prec) {
+ nc += BASE_FIG*((size_t)ex - vp->Prec);
+ }
+ }
+ break;
+ case 'E':
+ default:
+ nc = BASE_FIG*(vp->Prec + 2)+6; /* 3: sign + exponent chars */
}
return nc;
}
@@ -3734,7 +3623,7 @@ VpNumOfChars(Real *vp,const char *pszFmt)
* [Input]
* BaseVal: Base value(assigned to BASE) for Vp calculation.
* It must be the form BaseVal=10**n.(n=1,2,3,...)
- * If Base <= 0L,then the BASE will be calculated so
+ * If Base <= 0L,then the BASE will be calcurated so
* that BASE is as large as possible satisfying the
* relation MaxVal <= BASE*(BASE+1). Where the value
* MaxVal is the largest value which can be represented
@@ -3761,13 +3650,13 @@ VpInit(BDIGIT BaseVal)
#endif /* BIGDECIMAL_DEBUG */
#ifdef BIGDECIMAL_DEBUG
- if (gfDebug) {
- printf("VpInit: BaseVal = %lu\n", BaseVal);
- printf(" BASE = %lu\n", BASE);
- printf(" HALF_BASE = %lu\n", HALF_BASE);
- printf(" BASE1 = %lu\n", BASE1);
- printf(" BASE_FIG = %u\n", BASE_FIG);
- printf(" DBLE_FIG = %d\n", DBLE_FIG);
+ if(gfDebug) {
+ printf("VpInit: BaseVal = %lu\n", BaseVal);
+ printf(" BASE = %lu\n", BASE);
+ printf(" HALF_BASE = %lu\n", HALF_BASE);
+ printf(" BASE1 = %lu\n", BASE1);
+ printf(" BASE_FIG = %u\n", BASE_FIG);
+ printf(" DBLE_FIG = %d\n", DBLE_FIG);
}
#endif /* BIGDECIMAL_DEBUG */
@@ -3787,35 +3676,28 @@ AddExponent(Real *a, SIGNED_VALUE n)
SIGNED_VALUE e = a->exponent;
SIGNED_VALUE m = e+n;
SIGNED_VALUE eb, mb;
- if (e > 0) {
- if (n > 0) {
- if (MUL_OVERFLOW_SIGNED_VALUE_P(m, (SIGNED_VALUE)BASE_FIG) ||
- MUL_OVERFLOW_SIGNED_VALUE_P(e, (SIGNED_VALUE)BASE_FIG))
- goto overflow;
- mb = m*(SIGNED_VALUE)BASE_FIG;
- eb = e*(SIGNED_VALUE)BASE_FIG;
- if (mb < eb) goto overflow;
- }
- }
- else if (n < 0) {
- if (MUL_OVERFLOW_SIGNED_VALUE_P(m, (SIGNED_VALUE)BASE_FIG) ||
- MUL_OVERFLOW_SIGNED_VALUE_P(e, (SIGNED_VALUE)BASE_FIG))
- goto underflow;
- mb = m*(SIGNED_VALUE)BASE_FIG;
- eb = e*(SIGNED_VALUE)BASE_FIG;
- if (mb > eb) goto underflow;
+ if(e>0) {
+ if(n>0) {
+ mb = m*(SIGNED_VALUE)BASE_FIG;
+ eb = e*(SIGNED_VALUE)BASE_FIG;
+ if(mb<eb) goto overflow;
+ }
+ } else if(n<0) {
+ mb = m*(SIGNED_VALUE)BASE_FIG;
+ eb = e*(SIGNED_VALUE)BASE_FIG;
+ if(mb>eb) goto underflow;
}
a->exponent = m;
return 1;
/* Overflow/Underflow ==> Raise exception or returns 0 */
underflow:
- VpSetZero(a, VpGetSign(a));
- return VpException(VP_EXCEPTION_UNDERFLOW, "Exponent underflow", 0);
+ VpSetZero(a,VpGetSign(a));
+ return VpException(VP_EXCEPTION_UNDERFLOW,"Exponent underflow",0);
overflow:
- VpSetInf(a, VpGetSign(a));
- return VpException(VP_EXCEPTION_OVERFLOW, "Exponent overflow", 0);
+ VpSetInf(a,VpGetSign(a));
+ return VpException(VP_EXCEPTION_OVERFLOW,"Exponent overflow",0);
}
/*
@@ -3835,84 +3717,80 @@ VP_EXPORT Real *
VpAlloc(size_t mx, const char *szVal)
{
size_t i, ni, ipn, ipf, nf, ipe, ne, nalloc;
- char v, *psz;
+ char v,*psz;
int sign=1;
Real *vp = NULL;
size_t mf = VpGetPrecLimit();
VALUE buf;
- mx = (mx + BASE_FIG - 1) / BASE_FIG; /* Determine allocation unit. */
- if (mx == 0) ++mx;
-
+ mx = (mx + BASE_FIG - 1) / BASE_FIG + 1; /* Determine allocation unit. */
if (szVal) {
- while (ISSPACE(*szVal)) szVal++;
- if (*szVal != '#') {
- if (mf) {
- mf = (mf + BASE_FIG - 1) / BASE_FIG + 2; /* Needs 1 more for div */
- if (mx > mf) {
- mx = mf;
- }
- }
- }
+ while (ISSPACE(*szVal)) szVal++;
+ if (*szVal != '#') {
+ if (mf) {
+ mf = (mf + BASE_FIG - 1) / BASE_FIG + 2; /* Needs 1 more for div */
+ if (mx > mf) {
+ mx = mf;
+ }
+ }
+ }
else {
- ++szVal;
- }
+ ++szVal;
+ }
}
else {
- /* necessary to be able to store */
- /* at least mx digits. */
- /* szVal==NULL ==> allocate zero value. */
- vp = VpAllocReal(mx);
- /* xmalloc() alway returns(or throw interruption) */
- vp->MaxPrec = mx; /* set max precision */
- VpSetZero(vp, 1); /* initialize vp to zero. */
- return vp;
+ /* necessary to be able to store */
+ /* at least mx digits. */
+ /* szVal==NULL ==> allocate zero value. */
+ vp = VpAllocReal(mx);
+ /* xmalloc() alway returns(or throw interruption) */
+ vp->MaxPrec = mx; /* set max precision */
+ VpSetZero(vp,1); /* initialize vp to zero. */
+ return vp;
}
/* Skip all '_' after digit: 2006-6-30 */
ni = 0;
- buf = rb_str_tmp_new(strlen(szVal) + 1);
+ buf = rb_str_tmp_new(strlen(szVal)+1);
psz = RSTRING_PTR(buf);
i = 0;
ipn = 0;
- while ((psz[i] = szVal[ipn]) != 0) {
- if (ISDIGIT(psz[i])) ++ni;
- if (psz[i] == '_') {
- if (ni > 0) {
- ipn++;
- continue;
- }
- psz[i] = 0;
- break;
- }
- ++i;
+ while ((psz[i]=szVal[ipn]) != 0) {
+ if (ISDIGIT(psz[i])) ++ni;
+ if (psz[i] == '_') {
+ if (ni > 0) { ipn++; continue; }
+ psz[i] = 0;
+ break;
+ }
+ ++i;
++ipn;
}
/* Skip trailing spaces */
while (--i > 0) {
- if (ISSPACE(psz[i])) psz[i] = 0;
- else break;
+ if (ISSPACE(psz[i])) psz[i] = 0;
+ else break;
}
szVal = psz;
/* Check on Inf & NaN */
- if (StrCmp(szVal, SZ_PINF) == 0 || StrCmp(szVal, SZ_INF) == 0 ) {
- vp = VpAllocReal(1);
- vp->MaxPrec = 1; /* set max precision */
- VpSetPosInf(vp);
- return vp;
+ if (StrCmp(szVal, SZ_PINF) == 0 ||
+ StrCmp(szVal, SZ_INF) == 0 ) {
+ vp = VpAllocReal(1);
+ vp->MaxPrec = 1; /* set max precision */
+ VpSetPosInf(vp);
+ return vp;
}
if (StrCmp(szVal, SZ_NINF) == 0) {
- vp = VpAllocReal(1);
- vp->MaxPrec = 1; /* set max precision */
- VpSetNegInf(vp);
- return vp;
+ vp = VpAllocReal(1);
+ vp->MaxPrec = 1; /* set max precision */
+ VpSetNegInf(vp);
+ return vp;
}
if (StrCmp(szVal, SZ_NaN) == 0) {
- vp = VpAllocReal(1);
- vp->MaxPrec = 1; /* set max precision */
- VpSetNaN(vp);
- return vp;
+ vp = VpAllocReal(1);
+ vp->MaxPrec = 1; /* set max precision */
+ VpSetNaN(vp);
+ return vp;
}
/* check on number szVal[] */
@@ -3922,49 +3800,49 @@ VpAlloc(size_t mx, const char *szVal)
/* Skip digits */
ni = 0; /* digits in mantissa */
while ((v = szVal[i]) != 0) {
- if (!ISDIGIT(v)) break;
- ++i;
- ++ni;
+ if (!ISDIGIT(v)) break;
+ ++i;
+ ++ni;
}
nf = 0;
ipf = 0;
ipe = 0;
ne = 0;
if (v) {
- /* other than digit nor \0 */
- if (szVal[i] == '.') { /* xxx. */
- ++i;
- ipf = i;
- while ((v = szVal[i]) != 0) { /* get fraction part. */
- if (!ISDIGIT(v)) break;
- ++i;
- ++nf;
- }
- }
- ipe = 0; /* Exponent */
+ /* other than digit nor \0 */
+ if (szVal[i] == '.') { /* xxx. */
+ ++i;
+ ipf = i;
+ while ((v = szVal[i]) != 0) { /* get fraction part. */
+ if (!ISDIGIT(v)) break;
+ ++i;
+ ++nf;
+ }
+ }
+ ipe = 0; /* Exponent */
- switch (szVal[i]) {
- case '\0':
- break;
- case 'e': case 'E':
- case 'd': case 'D':
- ++i;
- ipe = i;
- v = szVal[i];
- if ((v == '-') || (v == '+')) ++i;
- while ((v=szVal[i]) != 0) {
- if (!ISDIGIT(v)) break;
- ++i;
- ++ne;
- }
+ switch (szVal[i]) {
+ case '\0':
break;
- default:
- break;
- }
+ case 'e': case 'E':
+ case 'd': case 'D':
+ ++i;
+ ipe = i;
+ v = szVal[i];
+ if ((v == '-') || (v == '+')) ++i;
+ while ((v=szVal[i]) != 0) {
+ if (!ISDIGIT(v)) break;
+ ++i;
+ ++ne;
+ }
+ break;
+ default:
+ break;
+ }
}
nalloc = (ni + nf + BASE_FIG - 1) / BASE_FIG + 1; /* set effective allocation */
/* units for szVal[] */
- if (mx == 0) mx = 1;
+ if (mx <= 0) mx = 1;
nalloc = Max(nalloc, mx);
mx = nalloc;
vp = VpAllocReal(mx);
@@ -3992,39 +3870,37 @@ VP_EXPORT size_t
VpAsgn(Real *c, Real *a, int isw)
{
size_t n;
- if (VpIsNaN(a)) {
- VpSetNaN(c);
- return 0;
+ if(VpIsNaN(a)) {
+ VpSetNaN(c);
+ return 0;
}
- if (VpIsInf(a)) {
- VpSetInf(c, isw * VpGetSign(a));
- return 0;
+ if(VpIsInf(a)) {
+ VpSetInf(c,isw*VpGetSign(a));
+ return 0;
}
/* check if the RHS is zero */
- if (!VpIsZero(a)) {
- c->exponent = a->exponent; /* store exponent */
- VpSetSign(c, isw * VpGetSign(a)); /* set sign */
- n = (a->Prec < c->MaxPrec) ? (a->Prec) : (c->MaxPrec);
- c->Prec = n;
- memcpy(c->frac, a->frac, n * sizeof(BDIGIT));
- /* Needs round ? */
- if (isw != 10) {
- /* Not in ActiveRound */
- if(c->Prec < a->Prec) {
- VpInternalRound(c, n, (n>0) ? a->frac[n-1] : 0, a->frac[n]);
- }
- else {
+ if(!VpIsZero(a)) {
+ c->exponent = a->exponent; /* store exponent */
+ VpSetSign(c,(isw*VpGetSign(a))); /* set sign */
+ n =(a->Prec < c->MaxPrec) ?(a->Prec) :(c->MaxPrec);
+ c->Prec = n;
+ memcpy(c->frac, a->frac, n * sizeof(BDIGIT));
+ /* Needs round ? */
+ if(isw!=10) {
+ /* Not in ActiveRound */
+ if(c->Prec < a->Prec) {
+ VpInternalRound(c,n,(n>0)?a->frac[n-1]:0,a->frac[n]);
+ } else {
VpLimitRound(c,0);
- }
- }
- }
- else {
- /* The value of 'a' is zero. */
- VpSetZero(c, isw * VpGetSign(a));
- return 1;
+ }
+ }
+ } else {
+ /* The value of 'a' is zero. */
+ VpSetZero(c,isw*VpGetSign(a));
+ return 1;
}
- return c->Prec * BASE_FIG;
+ return c->Prec*BASE_FIG;
}
/*
@@ -4041,87 +3917,83 @@ VpAddSub(Real *c, Real *a, Real *b, int operation)
BDIGIT mrv;
#ifdef BIGDECIMAL_DEBUG
- if (gfDebug) {
- VPrint(stdout, "VpAddSub(enter) a=% \n", a);
- VPrint(stdout, " b=% \n", b);
- printf(" operation=%d\n", operation);
+ if(gfDebug) {
+ VPrint(stdout, "VpAddSub(enter) a=% \n", a);
+ VPrint(stdout, " b=% \n", b);
+ printf(" operation=%d\n", operation);
}
#endif /* BIGDECIMAL_DEBUG */
- if (!VpIsDefOP(c, a, b, (operation > 0) ? 1 : 2)) return 0; /* No significant digits */
+ if(!VpIsDefOP(c,a,b,(operation>0)?1:2)) return 0; /* No significant digits */
/* check if a or b is zero */
- if (VpIsZero(a)) {
- /* a is zero,then assign b to c */
- if (!VpIsZero(b)) {
- VpAsgn(c, b, operation);
- }
- else {
- /* Both a and b are zero. */
- if (VpGetSign(a) < 0 && operation * VpGetSign(b) < 0) {
- /* -0 -0 */
- VpSetZero(c, -1);
- }
- else {
- VpSetZero(c, 1);
- }
- return 1; /* 0: 1 significant digits */
- }
- return c->Prec * BASE_FIG;
+ if(VpIsZero(a)) {
+ /* a is zero,then assign b to c */
+ if(!VpIsZero(b)) {
+ VpAsgn(c, b, operation);
+ } else {
+ /* Both a and b are zero. */
+ if(VpGetSign(a)<0 && operation*VpGetSign(b)<0) {
+ /* -0 -0 */
+ VpSetZero(c,-1);
+ } else {
+ VpSetZero(c,1);
+ }
+ return 1; /* 0: 1 significant digits */
+ }
+ return c->Prec*BASE_FIG;
}
- if (VpIsZero(b)) {
- /* b is zero,then assign a to c. */
- VpAsgn(c, a, 1);
- return c->Prec*BASE_FIG;
+ if(VpIsZero(b)) {
+ /* b is zero,then assign a to c. */
+ VpAsgn(c, a, 1);
+ return c->Prec*BASE_FIG;
}
- if (operation < 0) sw = -1;
- else sw = 1;
+ if(operation < 0) sw = -1;
+ else sw = 1;
/* compare absolute value. As a result,|a_ptr|>=|b_ptr| */
- if (a->exponent > b->exponent) {
- a_ptr = a;
- b_ptr = b;
+ if(a->exponent > b->exponent) {
+ a_ptr = a;
+ b_ptr = b;
} /* |a|>|b| */
- else if (a->exponent < b->exponent) {
- a_ptr = b;
- b_ptr = a;
+ else if(a->exponent < b->exponent) {
+ a_ptr = b;
+ b_ptr = a;
} /* |a|<|b| */
else {
- /* Exponent part of a and b is the same,then compare fraction */
- /* part */
- na = a->Prec;
- nb = b->Prec;
- n = Min(na, nb);
- for (i=0; i < n; ++i) {
- if (a->frac[i] > b->frac[i]) {
- a_ptr = a;
- b_ptr = b;
- goto end_if;
- }
- else if (a->frac[i] < b->frac[i]) {
- a_ptr = b;
- b_ptr = a;
- goto end_if;
- }
- }
- if (na > nb) {
- a_ptr = a;
- b_ptr = b;
- goto end_if;
- }
- else if (na < nb) {
- a_ptr = b;
- b_ptr = a;
- goto end_if;
- }
- /* |a| == |b| */
- if (VpGetSign(a) + sw *VpGetSign(b) == 0) {
- VpSetZero(c, 1); /* abs(a)=abs(b) and operation = '-' */
- return c->Prec * BASE_FIG;
- }
- a_ptr = a;
- b_ptr = b;
+ /* Exponent part of a and b is the same,then compare fraction */
+ /* part */
+ na = a->Prec;
+ nb = b->Prec;
+ n = Min(na, nb);
+ for(i=0;i < n; ++i) {
+ if(a->frac[i] > b->frac[i]) {
+ a_ptr = a;
+ b_ptr = b;
+ goto end_if;
+ } else if(a->frac[i] < b->frac[i]) {
+ a_ptr = b;
+ b_ptr = a;
+ goto end_if;
+ }
+ }
+ if(na > nb) {
+ a_ptr = a;
+ b_ptr = b;
+ goto end_if;
+ } else if(na < nb) {
+ a_ptr = b;
+ b_ptr = a;
+ goto end_if;
+ }
+ /* |a| == |b| */
+ if(VpGetSign(a) + sw *VpGetSign(b) == 0) {
+ VpSetZero(c,1); /* abs(a)=abs(b) and operation = '-' */
+ return c->Prec*BASE_FIG;
+ }
+ a_ptr = a;
+ b_ptr = b;
}
end_if:
@@ -4132,33 +4004,31 @@ end_if:
* =-2 ...(-1)+(-1),(-1)-( 1)
* If isw==0, then c =(Sign a_ptr)(|a_ptr|-|b_ptr|)
* else c =(Sign ofisw)(|a_ptr|+|b_ptr|)
- */
- if (isw) { /* addition */
- VpSetSign(c, 1);
- mrv = VpAddAbs(a_ptr, b_ptr, c);
- VpSetSign(c, isw / 2);
- }
- else { /* subtraction */
- VpSetSign(c, 1);
- mrv = VpSubAbs(a_ptr, b_ptr, c);
- if (a_ptr == a) {
- VpSetSign(c,VpGetSign(a));
- }
- else {
- VpSetSign(c, VpGetSign(a_ptr) * sw);
- }
+ */
+ if(isw) { /* addition */
+ VpSetSign(c, 1);
+ mrv = VpAddAbs(a_ptr, b_ptr, c);
+ VpSetSign(c, isw / 2);
+ } else { /* subtraction */
+ VpSetSign(c, 1);
+ mrv = VpSubAbs(a_ptr, b_ptr, c);
+ if(a_ptr == a) {
+ VpSetSign(c,VpGetSign(a));
+ } else {
+ VpSetSign(c,VpGetSign(a_ptr) * sw);
+ }
}
- VpInternalRound(c, 0, (c->Prec > 0) ? c->frac[c->Prec-1] : 0, mrv);
+ VpInternalRound(c,0,(c->Prec>0)?c->frac[c->Prec-1]:0,mrv);
#ifdef BIGDECIMAL_DEBUG
- if (gfDebug) {
- VPrint(stdout, "VpAddSub(result) c=% \n", c);
- VPrint(stdout, " a=% \n", a);
- VPrint(stdout, " b=% \n", b);
- printf(" operation=%d\n", operation);
+ if(gfDebug) {
+ VPrint(stdout, "VpAddSub(result) c=% \n", c);
+ VPrint(stdout, " a=% \n", a);
+ VPrint(stdout, " b=% \n", b);
+ printf(" operation=%d\n", operation);
}
#endif /* BIGDECIMAL_DEBUG */
- return c->Prec * BASE_FIG;
+ return c->Prec*BASE_FIG;
}
/*
@@ -4179,9 +4049,9 @@ VpAddAbs(Real *a, Real *b, Real *c)
BDIGIT av, bv, carry, mrv;
#ifdef BIGDECIMAL_DEBUG
- if (gfDebug) {
- VPrint(stdout, "VpAddAbs called: a = %\n", a);
- VPrint(stdout, " b = %\n", b);
+ if(gfDebug) {
+ VPrint(stdout, "VpAddAbs called: a = %\n", a);
+ VPrint(stdout, " b = %\n", b);
}
#endif /* BIGDECIMAL_DEBUG */
@@ -4189,59 +4059,55 @@ VpAddAbs(Real *a, Real *b, Real *c)
a_pos = ap;
b_pos = bp;
c_pos = cp;
-
- if (word_shift == (size_t)-1L) return 0; /* Overflow */
- if (b_pos == (size_t)-1L) goto Assign_a;
+ if(word_shift==(size_t)-1L) return 0; /* Overflow */
+ if(b_pos == (size_t)-1L) goto Assign_a;
mrv = av + bv; /* Most right val. Used for round. */
/* Just assign the last few digits of b to c because a has no */
/* corresponding digits to be added. */
- if (b_pos > 0) {
- while (b_pos > 0 && b_pos + word_shift > a_pos) {
- c->frac[--c_pos] = b->frac[--b_pos];
- }
- }
- if (b_pos == 0 && word_shift > a_pos) {
- while (word_shift-- > a_pos) {
- c->frac[--c_pos] = 0;
- }
+ while(b_pos + word_shift > a_pos) {
+ --c_pos;
+ if(b_pos > 0) {
+ c->frac[c_pos] = b->frac[--b_pos];
+ } else {
+ --word_shift;
+ c->frac[c_pos] = 0;
+ }
}
/* Just assign the last few digits of a to c because b has no */
/* corresponding digits to be added. */
b_pos_with_word_shift = b_pos + word_shift;
- while (a_pos > b_pos_with_word_shift) {
- c->frac[--c_pos] = a->frac[--a_pos];
+ while(a_pos > b_pos_with_word_shift) {
+ c->frac[--c_pos] = a->frac[--a_pos];
}
carry = 0; /* set first carry be zero */
/* Now perform addition until every digits of b will be */
/* exhausted. */
- while (b_pos > 0) {
- c->frac[--c_pos] = a->frac[--a_pos] + b->frac[--b_pos] + carry;
- if (c->frac[c_pos] >= BASE) {
- c->frac[c_pos] -= BASE;
- carry = 1;
- }
- else {
- carry = 0;
- }
+ while(b_pos > 0) {
+ c->frac[--c_pos] = a->frac[--a_pos] + b->frac[--b_pos] + carry;
+ if(c->frac[c_pos] >= BASE) {
+ c->frac[c_pos] -= BASE;
+ carry = 1;
+ } else {
+ carry = 0;
+ }
}
/* Just assign the first few digits of a with considering */
/* the carry obtained so far because b has been exhausted. */
- while (a_pos > 0) {
- c->frac[--c_pos] = a->frac[--a_pos] + carry;
- if (c->frac[c_pos] >= BASE) {
- c->frac[c_pos] -= BASE;
- carry = 1;
- }
- else {
- carry = 0;
- }
+ while(a_pos > 0) {
+ c->frac[--c_pos] = a->frac[--a_pos] + carry;
+ if(c->frac[c_pos] >= BASE) {
+ c->frac[c_pos] -= BASE;
+ carry = 1;
+ } else {
+ carry = 0;
+ }
}
- if (c_pos) c->frac[c_pos - 1] += carry;
+ if(c_pos) c->frac[c_pos - 1] += carry;
goto Exit;
Assign_a:
@@ -4251,8 +4117,8 @@ Assign_a:
Exit:
#ifdef BIGDECIMAL_DEBUG
- if (gfDebug) {
- VPrint(stdout, "VpAddAbs exit: c=% \n", c);
+ if(gfDebug) {
+ VPrint(stdout, "VpAddAbs exit: c=% \n", c);
}
#endif /* BIGDECIMAL_DEBUG */
return mrv;
@@ -4274,9 +4140,9 @@ VpSubAbs(Real *a, Real *b, Real *c)
BDIGIT av, bv, borrow, mrv;
#ifdef BIGDECIMAL_DEBUG
- if (gfDebug) {
- VPrint(stdout, "VpSubAbs called: a = %\n", a);
- VPrint(stdout, " b = %\n", b);
+ if(gfDebug) {
+ VPrint(stdout, "VpSubAbs called: a = %\n", a);
+ VPrint(stdout, " b = %\n", b);
}
#endif /* BIGDECIMAL_DEBUG */
@@ -4284,70 +4150,66 @@ VpSubAbs(Real *a, Real *b, Real *c)
a_pos = ap;
b_pos = bp;
c_pos = cp;
- if (word_shift == (size_t)-1L) return 0; /* Overflow */
- if (b_pos == (size_t)-1L) goto Assign_a;
+ if(word_shift==(size_t)-1L) return 0; /* Overflow */
+ if(b_pos == (size_t)-1L) goto Assign_a;
- if (av >= bv) {
- mrv = av - bv;
- borrow = 0;
- }
- else {
- mrv = 0;
- borrow = 1;
+ if(av >= bv) {
+ mrv = av - bv;
+ borrow = 0;
+ } else {
+ mrv = 0;
+ borrow = 1;
}
/* Just assign the values which are the BASE subtracted by */
/* each of the last few digits of the b because the a has no */
/* corresponding digits to be subtracted. */
- if (b_pos + word_shift > a_pos) {
- while (b_pos > 0 && b_pos + word_shift > a_pos) {
- c->frac[--c_pos] = BASE - b->frac[--b_pos] - borrow;
- borrow = 1;
- }
- if (b_pos == 0) {
- while (word_shift > a_pos) {
- --word_shift;
- c->frac[--c_pos] = BASE - borrow;
- borrow = 1;
- }
- }
+ if(b_pos + word_shift > a_pos) {
+ while(b_pos + word_shift > a_pos) {
+ --c_pos;
+ if(b_pos > 0) {
+ c->frac[c_pos] = BASE - b->frac[--b_pos] - borrow;
+ } else {
+ --word_shift;
+ c->frac[c_pos] = BASE - borrow;
+ }
+ borrow = 1;
+ }
}
/* Just assign the last few digits of a to c because b has no */
/* corresponding digits to subtract. */
b_pos_with_word_shift = b_pos + word_shift;
- while (a_pos > b_pos_with_word_shift) {
- c->frac[--c_pos] = a->frac[--a_pos];
+ while(a_pos > b_pos_with_word_shift) {
+ c->frac[--c_pos] = a->frac[--a_pos];
}
/* Now perform subtraction until every digits of b will be */
/* exhausted. */
- while (b_pos > 0) {
- --c_pos;
- if (a->frac[--a_pos] < b->frac[--b_pos] + borrow) {
- c->frac[c_pos] = BASE + a->frac[a_pos] - b->frac[b_pos] - borrow;
- borrow = 1;
- }
- else {
- c->frac[c_pos] = a->frac[a_pos] - b->frac[b_pos] - borrow;
- borrow = 0;
- }
+ while(b_pos > 0) {
+ --c_pos;
+ if(a->frac[--a_pos] < b->frac[--b_pos] + borrow) {
+ c->frac[c_pos] = BASE + a->frac[a_pos] - b->frac[b_pos] - borrow;
+ borrow = 1;
+ } else {
+ c->frac[c_pos] = a->frac[a_pos] - b->frac[b_pos] - borrow;
+ borrow = 0;
+ }
}
/* Just assign the first few digits of a with considering */
/* the borrow obtained so far because b has been exhausted. */
- while (a_pos > 0) {
- --c_pos;
- if (a->frac[--a_pos] < borrow) {
- c->frac[c_pos] = BASE + a->frac[a_pos] - borrow;
- borrow = 1;
- }
- else {
- c->frac[c_pos] = a->frac[a_pos] - borrow;
- borrow = 0;
- }
+ while(a_pos > 0) {
+ --c_pos;
+ if(a->frac[--a_pos] < borrow) {
+ c->frac[c_pos] = BASE + a->frac[a_pos] - borrow;
+ borrow = 1;
+ } else {
+ c->frac[c_pos] = a->frac[a_pos] - borrow;
+ borrow = 0;
+ }
}
- if (c_pos) c->frac[c_pos - 1] -= borrow;
+ if(c_pos) c->frac[c_pos - 1] -= borrow;
goto Exit;
Assign_a:
@@ -4356,8 +4218,8 @@ Assign_a:
Exit:
#ifdef BIGDECIMAL_DEBUG
- if (gfDebug) {
- VPrint(stdout, "VpSubAbs exit: c=% \n", c);
+ if(gfDebug) {
+ VPrint(stdout, "VpSubAbs exit: c=% \n", c);
}
#endif /* BIGDECIMAL_DEBUG */
return mrv;
@@ -4381,99 +4243,84 @@ static size_t
VpSetPTR(Real *a, Real *b, Real *c, size_t *a_pos, size_t *b_pos, size_t *c_pos, BDIGIT *av, BDIGIT *bv)
{
size_t left_word, right_word, word_shift;
-
- size_t const round_limit = (VpGetPrecLimit() + BASE_FIG - 1) / BASE_FIG;
-
- assert(a->exponent >= b->expoennt);
-
c->frac[0] = 0;
*av = *bv = 0;
-
- word_shift = (a->exponent - b->exponent);
+ word_shift =((a->exponent) -(b->exponent));
left_word = b->Prec + word_shift;
- right_word = Max(a->Prec, left_word);
- left_word = c->MaxPrec - 1; /* -1 ... prepare for round up */
-
+ right_word = Max((a->Prec),left_word);
+ left_word =(c->MaxPrec) - 1; /* -1 ... prepare for round up */
/*
* check if 'round' is needed.
*/
- if (right_word > left_word) { /* round ? */
- /*---------------------------------
- * Actual size of a = xxxxxxAxx
- * Actual size of b = xxxBxxxxx
- * Max. size of c = xxxxxx
- * Round off = |-----|
- * c_pos = |
- * right_word = |
- * a_pos = |
- */
- *c_pos = right_word = left_word + 1; /* Set resulting precision */
- /* be equal to that of c */
- if (a->Prec >= c->MaxPrec) {
- /*
- * a = xxxxxxAxxx
- * c = xxxxxx
- * a_pos = |
- */
- *a_pos = left_word;
- if (*a_pos <= round_limit) {
- *av = a->frac[*a_pos]; /* av is 'A' shown in above. */
- }
- }
- else {
- /*
- * a = xxxxxxx
- * c = xxxxxxxxxx
- * a_pos = |
- */
- *a_pos = a->Prec;
- }
- if (b->Prec + word_shift >= c->MaxPrec) {
- /*
- * a = xxxxxxxxx
- * b = xxxxxxxBxxx
- * c = xxxxxxxxxxx
- * b_pos = |
- */
- if (c->MaxPrec >= word_shift + 1) {
- *b_pos = c->MaxPrec - word_shift - 1;
- if (*b_pos + word_shift <= round_limit) {
- *bv = b->frac[*b_pos];
- }
- }
- else {
- *b_pos = -1L;
- }
- }
- else {
- /*
- * a = xxxxxxxxxxxxxxxx
- * b = xxxxxx
- * c = xxxxxxxxxxxxx
- * b_pos = |
- */
- *b_pos = b->Prec;
- }
- }
- else { /* The MaxPrec of c - 1 > The Prec of a + b */
- /*
- * a = xxxxxxx
- * b = xxxxxx
- * c = xxxxxxxxxxx
- * c_pos = |
- */
- *b_pos = b->Prec;
- *a_pos = a->Prec;
- *c_pos = right_word + 1;
+ if(right_word > left_word) { /* round ? */
+ /*---------------------------------
+ * Actual size of a = xxxxxxAxx
+ * Actual size of b = xxxBxxxxx
+ * Max. size of c = xxxxxx
+ * Round off = |-----|
+ * c_pos = |
+ * right_word = |
+ * a_pos = |
+ */
+ *c_pos = right_word = left_word + 1; /* Set resulting precision */
+ /* be equal to that of c */
+ if((a->Prec) >=(c->MaxPrec)) {
+ /*
+ * a = xxxxxxAxxx
+ * c = xxxxxx
+ * a_pos = |
+ */
+ *a_pos = left_word;
+ *av = a->frac[*a_pos]; /* av is 'A' shown in above. */
+ } else {
+ /*
+ * a = xxxxxxx
+ * c = xxxxxxxxxx
+ * a_pos = |
+ */
+ *a_pos = a->Prec;
+ }
+ if((b->Prec + word_shift) >= c->MaxPrec) {
+ /*
+ * a = xxxxxxxxx
+ * b = xxxxxxxBxxx
+ * c = xxxxxxxxxxx
+ * b_pos = |
+ */
+ if(c->MaxPrec >=(word_shift + 1)) {
+ *b_pos = c->MaxPrec - word_shift - 1;
+ *bv = b->frac[*b_pos];
+ } else {
+ *b_pos = -1L;
+ }
+ } else {
+ /*
+ * a = xxxxxxxxxxxxxxxx
+ * b = xxxxxx
+ * c = xxxxxxxxxxxxx
+ * b_pos = |
+ */
+ *b_pos = b->Prec;
+ }
+ } else { /* The MaxPrec of c - 1 > The Prec of a + b */
+ /*
+ * a = xxxxxxx
+ * b = xxxxxx
+ * c = xxxxxxxxxxx
+ * c_pos = |
+ */
+ *b_pos = b->Prec;
+ *a_pos = a->Prec;
+ *c_pos = right_word + 1;
}
c->Prec = *c_pos;
c->exponent = a->exponent;
- if (!AddExponent(c, 1)) return (size_t)-1L;
+ if(!AddExponent(c,1)) return (size_t)-1L;
return word_shift;
}
/*
- * Return number of significant digits
+ * Return number og significant digits
* c = a * b , Where a = a0a1a2 ... an
* b = b0b1b2 ... bm
* c = c0c1c2 ... cl
@@ -4498,33 +4345,33 @@ VpMult(Real *c, Real *a, Real *b)
Real *w;
#ifdef BIGDECIMAL_DEBUG
- if (gfDebug) {
- VPrint(stdout, "VpMult(Enter): a=% \n", a);
- VPrint(stdout, " b=% \n", b);
+ if(gfDebug) {
+ VPrint(stdout, "VpMult(Enter): a=% \n", a);
+ VPrint(stdout, " b=% \n", b);
}
#endif /* BIGDECIMAL_DEBUG */
- if (!VpIsDefOP(c, a, b, 3)) return 0; /* No significant digit */
+ if(!VpIsDefOP(c,a,b,3)) return 0; /* No significant digit */
- if (VpIsZero(a) || VpIsZero(b)) {
- /* at least a or b is zero */
- VpSetZero(c, VpGetSign(a) * VpGetSign(b));
- return 1; /* 0: 1 significant digit */
+ if(VpIsZero(a) || VpIsZero(b)) {
+ /* at least a or b is zero */
+ VpSetZero(c,VpGetSign(a)*VpGetSign(b));
+ return 1; /* 0: 1 significant digit */
}
- if (VpIsOne(a)) {
- VpAsgn(c, b, VpGetSign(a));
- goto Exit;
+ if(VpIsOne(a)) {
+ VpAsgn(c, b, VpGetSign(a));
+ goto Exit;
}
- if (VpIsOne(b)) {
- VpAsgn(c, a, VpGetSign(b));
- goto Exit;
+ if(VpIsOne(b)) {
+ VpAsgn(c, a, VpGetSign(b));
+ goto Exit;
}
- if (b->Prec > a->Prec) {
- /* Adjust so that digits(a)>digits(b) */
- w = a;
- a = b;
- b = w;
+ if((b->Prec) >(a->Prec)) {
+ /* Adjust so that digits(a)>digits(b) */
+ w = a;
+ a = b;
+ b = w;
}
w = NULL;
MxIndA = a->Prec - 1;
@@ -4532,82 +4379,78 @@ VpMult(Real *c, Real *a, Real *b)
MxIndC = c->MaxPrec - 1;
MxIndAB = a->Prec + b->Prec - 1;
- if (MxIndC < MxIndAB) { /* The Max. prec. of c < Prec(a)+Prec(b) */
- w = c;
- c = VpAlloc((size_t)((MxIndAB + 1) * BASE_FIG), "#0");
- MxIndC = MxIndAB;
+ if(MxIndC < MxIndAB) { /* The Max. prec. of c < Prec(a)+Prec(b) */
+ w = c;
+ c = VpAlloc((size_t)((MxIndAB + 1) * BASE_FIG), "#0");
+ MxIndC = MxIndAB;
}
/* set LHSV c info */
c->exponent = a->exponent; /* set exponent */
- if (!AddExponent(c, b->exponent)) {
- if (w) VpFree(c);
+ if(!AddExponent(c,b->exponent)) {
+ if(w) VpFree(c);
return 0;
}
- VpSetSign(c, VpGetSign(a) * VpGetSign(b)); /* set sign */
+ VpSetSign(c,VpGetSign(a)*VpGetSign(b)); /* set sign */
carry = 0;
nc = ind_c = MxIndAB;
memset(c->frac, 0, (nc + 1) * sizeof(BDIGIT)); /* Initialize c */
c->Prec = nc + 1; /* set precision */
- for (nc = 0; nc < MxIndAB; ++nc, --ind_c) {
- if (nc < MxIndB) { /* The left triangle of the Fig. */
- ind_as = MxIndA - nc;
- ind_ae = MxIndA;
- ind_bs = MxIndB;
- }
- else if (nc <= MxIndA) { /* The middle rectangular of the Fig. */
- ind_as = MxIndA - nc;
- ind_ae = MxIndA - (nc - MxIndB);
- ind_bs = MxIndB;
- }
- else /* if (nc > MxIndA) */ { /* The right triangle of the Fig. */
- ind_as = 0;
- ind_ae = MxIndAB - nc - 1;
- ind_bs = MxIndB - (nc - MxIndA);
- }
+ for(nc = 0; nc < MxIndAB; ++nc, --ind_c) {
+ if(nc < MxIndB) { /* The left triangle of the Fig. */
+ ind_as = MxIndA - nc;
+ ind_ae = MxIndA;
+ ind_bs = MxIndB;
+ } else if(nc <= MxIndA) { /* The middle rectangular of the Fig. */
+ ind_as = MxIndA - nc;
+ ind_ae = MxIndA -(nc - MxIndB);
+ ind_bs = MxIndB;
+ } else if(nc > MxIndA) { /* The right triangle of the Fig. */
+ ind_as = 0;
+ ind_ae = MxIndAB - nc - 1;
+ ind_bs = MxIndB -(nc - MxIndA);
+ }
- for (i = ind_as; i <= ind_ae; ++i) {
- s = (BDIGIT_DBL)a->frac[i] * b->frac[ind_bs--];
- carry = (BDIGIT)(s / BASE);
- s -= (BDIGIT_DBL)carry * BASE;
- c->frac[ind_c] += (BDIGIT)s;
- if (c->frac[ind_c] >= BASE) {
- s = c->frac[ind_c] / BASE;
- carry += (BDIGIT)s;
- c->frac[ind_c] -= (BDIGIT)(s * BASE);
- }
- if (carry) {
- ii = ind_c;
- while (ii-- > 0) {
- c->frac[ii] += carry;
- if (c->frac[ii] >= BASE) {
- carry = c->frac[ii] / BASE;
- c->frac[ii] -= (carry * BASE);
- }
- else {
- break;
- }
- }
- }
- }
- }
- if (w != NULL) { /* free work variable */
- VpNmlz(c);
- VpAsgn(w, c, 1);
- VpFree(c);
- c = w;
+ for(i = ind_as; i <= ind_ae; ++i) {
+ s = (BDIGIT_DBL)a->frac[i] * b->frac[ind_bs--];
+ carry = (BDIGIT)(s / BASE);
+ s -= (BDIGIT_DBL)carry * BASE;
+ c->frac[ind_c] += (BDIGIT)s;
+ if(c->frac[ind_c] >= BASE) {
+ s = c->frac[ind_c] / BASE;
+ carry += (BDIGIT)s;
+ c->frac[ind_c] -= (BDIGIT)(s * BASE);
+ }
+ if(carry) {
+ ii = ind_c;
+ while(ii-- > 0) {
+ c->frac[ii] += carry;
+ if(c->frac[ii] >= BASE) {
+ carry = c->frac[ii] / BASE;
+ c->frac[ii] -= (carry * BASE);
+ } else {
+ break;
+ }
+ }
+ }
+ }
}
- else {
- VpLimitRound(c,0);
+ if(w != NULL) { /* free work variable */
+ VpNmlz(c);
+ VpAsgn(w, c, 1);
+ VpFree(c);
+ c = w;
+ } else {
+ VpLimitRound(c,0);
}
Exit:
#ifdef BIGDECIMAL_DEBUG
- if (gfDebug) {
- VPrint(stdout, "VpMult(c=a*b): c=% \n", c);
- VPrint(stdout, " a=% \n", a);
- VPrint(stdout, " b=% \n", b);
+ if(gfDebug) {
+ VPrint(stdout, "VpMult(c=a*b): c=% \n", c);
+ VPrint(stdout, " a=% \n", a);
+ VPrint(stdout, " b=% \n", b);
}
#endif /*BIGDECIMAL_DEBUG */
return c->Prec*BASE_FIG;
@@ -4616,7 +4459,7 @@ Exit:
/*
* c = a / b, remainder = r
*/
- VP_EXPORT size_t
+VP_EXPORT size_t
VpDivd(Real *c, Real *r, Real *a, Real *b)
{
size_t word_a, word_b, word_c, word_r;
@@ -4627,33 +4470,33 @@ VpDivd(Real *c, Real *r, Real *a, Real *b)
BDIGIT_DBL qb;
#ifdef BIGDECIMAL_DEBUG
- if (gfDebug) {
- VPrint(stdout, " VpDivd(c=a/b) a=% \n", a);
- VPrint(stdout, " b=% \n", b);
+ if(gfDebug) {
+ VPrint(stdout, " VpDivd(c=a/b) a=% \n", a);
+ VPrint(stdout, " b=% \n", b);
}
#endif /*BIGDECIMAL_DEBUG */
VpSetNaN(r);
- if (!VpIsDefOP(c, a, b, 4)) goto Exit;
- if (VpIsZero(a) && VpIsZero(b)) {
- VpSetNaN(c);
- return VpException(VP_EXCEPTION_NaN, "(VpDivd) 0/0 not defined(NaN)", 0);
+ if(!VpIsDefOP(c,a,b,4)) goto Exit;
+ if(VpIsZero(a)&&VpIsZero(b)) {
+ VpSetNaN(c);
+ return VpException(VP_EXCEPTION_NaN,"(VpDivd) 0/0 not defined(NaN)",0);
}
- if (VpIsZero(b)) {
- VpSetInf(c, VpGetSign(a) * VpGetSign(b));
- return VpException(VP_EXCEPTION_ZERODIVIDE, "(VpDivd) Divide by zero", 0);
+ if(VpIsZero(b)) {
+ VpSetInf(c,VpGetSign(a)*VpGetSign(b));
+ return VpException(VP_EXCEPTION_ZERODIVIDE,"(VpDivd) Divide by zero",0);
}
- if (VpIsZero(a)) {
- /* numerator a is zero */
- VpSetZero(c, VpGetSign(a) * VpGetSign(b));
- VpSetZero(r, VpGetSign(a) * VpGetSign(b));
- goto Exit;
+ if(VpIsZero(a)) {
+ /* numerator a is zero */
+ VpSetZero(c,VpGetSign(a)*VpGetSign(b));
+ VpSetZero(r,VpGetSign(a)*VpGetSign(b));
+ goto Exit;
}
- if (VpIsOne(b)) {
- /* divide by one */
- VpAsgn(c, a, VpGetSign(b));
- VpSetZero(r, VpGetSign(a));
- goto Exit;
+ if(VpIsOne(b)) {
+ /* divide by one */
+ VpAsgn(c, a, VpGetSign(b));
+ VpSetZero(r,VpGetSign(a));
+ goto Exit;
}
word_a = a->Prec;
@@ -4664,26 +4507,25 @@ VpDivd(Real *c, Real *r, Real *a, Real *b)
ind_c = 0;
ind_r = 1;
- if (word_a >= word_r) goto space_error;
+ if(word_a >= word_r) goto space_error;
r->frac[0] = 0;
- while (ind_r <= word_a) {
- r->frac[ind_r] = a->frac[ind_r - 1];
- ++ind_r;
+ while(ind_r <= word_a) {
+ r->frac[ind_r] = a->frac[ind_r - 1];
+ ++ind_r;
}
- while (ind_r < word_r) r->frac[ind_r++] = 0;
- while (ind_c < word_c) c->frac[ind_c++] = 0;
+ while(ind_r < word_r) r->frac[ind_r++] = 0;
+ while(ind_c < word_c) c->frac[ind_c++] = 0;
/* initial procedure */
b1 = b1p1 = b->frac[0];
- if (b->Prec <= 1) {
- b1b2p1 = b1b2 = b1p1 * BASE;
- }
- else {
- b1p1 = b1 + 1;
- b1b2p1 = b1b2 = b1 * BASE + b->frac[1];
- if (b->Prec > 2) ++b1b2p1;
+ if(b->Prec <= 1) {
+ b1b2p1 = b1b2 = b1p1 * BASE;
+ } else {
+ b1p1 = b1 + 1;
+ b1b2p1 = b1b2 = b1 * BASE + b->frac[1];
+ if(b->Prec > 2) ++b1b2p1;
}
/* */
@@ -4691,144 +4533,141 @@ VpDivd(Real *c, Real *r, Real *a, Real *b)
ind_c = word_r - 1;
nLoop = Min(word_c,ind_c);
ind_c = 1;
- while (ind_c < nLoop) {
- if (r->frac[ind_c] == 0) {
- ++ind_c;
- continue;
- }
- r1r2 = (BDIGIT_DBL)r->frac[ind_c] * BASE + r->frac[ind_c + 1];
- if (r1r2 == b1b2) {
- /* The first two word digits is the same */
- ind_b = 2;
- ind_a = ind_c + 2;
- while (ind_b < word_b) {
- if (r->frac[ind_a] < b->frac[ind_b]) goto div_b1p1;
- if (r->frac[ind_a] > b->frac[ind_b]) break;
- ++ind_a;
- ++ind_b;
- }
- /* The first few word digits of r and b is the same and */
- /* the first different word digit of w is greater than that */
- /* of b, so quotient is 1 and just subtract b from r. */
- borrow = 0; /* quotient=1, then just r-b */
- ind_b = b->Prec - 1;
- ind_r = ind_c + ind_b;
- if (ind_r >= word_r) goto space_error;
- n = ind_b;
- for (i = 0; i <= n; ++i) {
- if (r->frac[ind_r] < b->frac[ind_b] + borrow) {
- r->frac[ind_r] += (BASE - (b->frac[ind_b] + borrow));
- borrow = 1;
- }
- else {
- r->frac[ind_r] = r->frac[ind_r] - b->frac[ind_b] - borrow;
- borrow = 0;
- }
- --ind_r;
- --ind_b;
- }
- ++c->frac[ind_c];
- goto carry;
- }
- /* The first two word digits is not the same, */
- /* then compare magnitude, and divide actually. */
- if (r1r2 >= b1b2p1) {
- q = r1r2 / b1b2p1; /* q == (BDIGIT)q */
- c->frac[ind_c] += (BDIGIT)q;
- ind_r = b->Prec + ind_c - 1;
- goto sub_mult;
- }
+ while(ind_c < nLoop) {
+ if(r->frac[ind_c] == 0) {
+ ++ind_c;
+ continue;
+ }
+ r1r2 = (BDIGIT_DBL)r->frac[ind_c] * BASE + r->frac[ind_c + 1];
+ if(r1r2 == b1b2) {
+ /* The first two word digits is the same */
+ ind_b = 2;
+ ind_a = ind_c + 2;
+ while(ind_b < word_b) {
+ if(r->frac[ind_a] < b->frac[ind_b]) goto div_b1p1;
+ if(r->frac[ind_a] > b->frac[ind_b]) break;
+ ++ind_a;
+ ++ind_b;
+ }
+ /* The first few word digits of r and b is the same and */
+ /* the first different word digit of w is greater than that */
+ /* of b, so quotinet is 1 and just subtract b from r. */
+ borrow = 0; /* quotient=1, then just r-b */
+ ind_b = b->Prec - 1;
+ ind_r = ind_c + ind_b;
+ if(ind_r >= word_r) goto space_error;
+ n = ind_b;
+ for(i = 0; i <= n; ++i) {
+ if(r->frac[ind_r] < b->frac[ind_b] + borrow) {
+ r->frac[ind_r] += (BASE - (b->frac[ind_b] + borrow));
+ borrow = 1;
+ } else {
+ r->frac[ind_r] = r->frac[ind_r] - b->frac[ind_b] - borrow;
+ borrow = 0;
+ }
+ --ind_r;
+ --ind_b;
+ }
+ ++c->frac[ind_c];
+ goto carry;
+ }
+ /* The first two word digits is not the same, */
+ /* then compare magnitude, and divide actually. */
+ if(r1r2 >= b1b2p1) {
+ q = r1r2 / b1b2p1; /* q == (BDIGIT)q */
+ c->frac[ind_c] += (BDIGIT)q;
+ ind_r = b->Prec + ind_c - 1;
+ goto sub_mult;
+ }
div_b1p1:
- if (ind_c + 1 >= word_c) goto out_side;
- q = r1r2 / b1p1; /* q == (BDIGIT)q */
- c->frac[ind_c + 1] += (BDIGIT)q;
- ind_r = b->Prec + ind_c;
+ if(ind_c + 1 >= word_c) goto out_side;
+ q = r1r2 / b1p1; /* q == (BDIGIT)q */
+ c->frac[ind_c + 1] += (BDIGIT)q;
+ ind_r = b->Prec + ind_c;
sub_mult:
- borrow1 = borrow2 = 0;
- ind_b = word_b - 1;
- if (ind_r >= word_r) goto space_error;
- n = ind_b;
- for (i = 0; i <= n; ++i) {
- /* now, perform r = r - q * b */
- qb = q * b->frac[ind_b];
- if (qb < BASE) borrow1 = 0;
- else {
- borrow1 = (BDIGIT)(qb / BASE);
- qb -= (BDIGIT_DBL)borrow1 * BASE; /* get qb < BASE */
- }
- if(r->frac[ind_r] < qb) {
- r->frac[ind_r] += (BDIGIT)(BASE - qb);
- borrow2 = borrow2 + borrow1 + 1;
- }
- else {
- r->frac[ind_r] -= (BDIGIT)qb;
- borrow2 += borrow1;
- }
- if (borrow2) {
- if(r->frac[ind_r - 1] < borrow2) {
- r->frac[ind_r - 1] += (BASE - borrow2);
- borrow2 = 1;
- }
- else {
- r->frac[ind_r - 1] -= borrow2;
- borrow2 = 0;
- }
- }
- --ind_r;
- --ind_b;
- }
+ borrow1 = borrow2 = 0;
+ ind_b = word_b - 1;
+ if(ind_r >= word_r) goto space_error;
+ n = ind_b;
+ for(i = 0; i <= n; ++i) {
+ /* now, perform r = r - q * b */
+ qb = q * b->frac[ind_b];
+ if (qb < BASE) borrow1 = 0;
+ else {
+ borrow1 = (BDIGIT)(qb / BASE);
+ qb -= (BDIGIT_DBL)borrow1 * BASE; /* get qb < BASE */
+ }
+ if(r->frac[ind_r] < qb) {
+ r->frac[ind_r] += (BDIGIT)(BASE - qb);
+ borrow2 = borrow2 + borrow1 + 1;
+ } else {
+ r->frac[ind_r] -= (BDIGIT)qb;
+ borrow2 += borrow1;
+ }
+ if(borrow2) {
+ if(r->frac[ind_r - 1] < borrow2) {
+ r->frac[ind_r - 1] += (BASE - borrow2);
+ borrow2 = 1;
+ } else {
+ r->frac[ind_r - 1] -= borrow2;
+ borrow2 = 0;
+ }
+ }
+ --ind_r;
+ --ind_b;
+ }
- r->frac[ind_r] -= borrow2;
+ r->frac[ind_r] -= borrow2;
carry:
- ind_r = ind_c;
- while (c->frac[ind_r] >= BASE) {
- c->frac[ind_r] -= BASE;
- --ind_r;
- ++c->frac[ind_r];
- }
+ ind_r = ind_c;
+ while(c->frac[ind_r] >= BASE) {
+ c->frac[ind_r] -= BASE;
+ --ind_r;
+ ++c->frac[ind_r];
+ }
}
/* End of operation, now final arrangement */
out_side:
c->Prec = word_c;
c->exponent = a->exponent;
- if (!AddExponent(c, 2)) return 0;
- if (!AddExponent(c, -(b->exponent))) return 0;
+ if(!AddExponent(c,2)) return 0;
+ if(!AddExponent(c,-(b->exponent))) return 0;
- VpSetSign(c, VpGetSign(a) * VpGetSign(b));
+ VpSetSign(c,VpGetSign(a)*VpGetSign(b));
VpNmlz(c); /* normalize c */
r->Prec = word_r;
r->exponent = a->exponent;
- if (!AddExponent(r, 1)) return 0;
- VpSetSign(r, VpGetSign(a));
+ if(!AddExponent(r,1)) return 0;
+ VpSetSign(r,VpGetSign(a));
VpNmlz(r); /* normalize r(remainder) */
goto Exit;
space_error:
#ifdef BIGDECIMAL_DEBUG
- if (gfDebug) {
- printf(" word_a=%lu\n", word_a);
- printf(" word_b=%lu\n", word_b);
- printf(" word_c=%lu\n", word_c);
- printf(" word_r=%lu\n", word_r);
- printf(" ind_r =%lu\n", ind_r);
+ if(gfDebug) {
+ printf(" word_a=%lu\n", word_a);
+ printf(" word_b=%lu\n", word_b);
+ printf(" word_c=%lu\n", word_c);
+ printf(" word_r=%lu\n", word_r);
+ printf(" ind_r =%lu\n", ind_r);
}
#endif /* BIGDECIMAL_DEBUG */
rb_bug("ERROR(VpDivd): space for remainder too small.");
Exit:
#ifdef BIGDECIMAL_DEBUG
- if (gfDebug) {
- VPrint(stdout, " VpDivd(c=a/b), c=% \n", c);
- VPrint(stdout, " r=% \n", r);
+ if(gfDebug) {
+ VPrint(stdout, " VpDivd(c=a/b), c=% \n", c);
+ VPrint(stdout, " r=% \n", r);
}
#endif /* BIGDECIMAL_DEBUG */
- return c->Prec * BASE_FIG;
+ return c->Prec*BASE_FIG;
}
/*
- * Input a = 00000xxxxxxxx En(5 preceding zeros)
+ * Input a = 00000xxxxxxxx En(5 preceeding zeros)
* Output a = xxxxxxxx En-5
*/
static int
@@ -4841,17 +4680,17 @@ VpNmlz(Real *a)
ind_a = a->Prec;
while (ind_a--) {
- if (a->frac[ind_a]) {
- a->Prec = ind_a + 1;
- i = 0;
- while (a->frac[i] == 0) ++i; /* skip the first few zeros */
- if (i) {
- a->Prec -= i;
- if (!AddExponent(a, -(SIGNED_VALUE)i)) return 0;
- memmove(&a->frac[0], &a->frac[i], a->Prec*sizeof(BDIGIT));
- }
- return 1;
- }
+ if (a->frac[ind_a]) {
+ a->Prec = ind_a + 1;
+ i = 0;
+ while (a->frac[i] == 0) ++i; /* skip the first few zeros */
+ if (i) {
+ a->Prec -= i;
+ if (!AddExponent(a, -(SIGNED_VALUE)i)) return 0;
+ memmove(&a->frac[0], &a->frac[i], a->Prec*sizeof(BDIGIT));
+ }
+ return 1;
+ }
}
/* a is zero(no non-zero digit) */
VpSetZero(a, VpGetSign(a));
@@ -4876,86 +4715,85 @@ VpComp(Real *a, Real *b)
size_t mx, ind;
int e;
val = 0;
- if (VpIsNaN(a) || VpIsNaN(b)) return 999;
- if (!VpIsDef(a)) {
- if (!VpIsDef(b)) e = a->sign - b->sign;
- else e = a->sign;
-
- if (e > 0) return 1;
- else if (e < 0) return -1;
- else return 0;
- }
- if (!VpIsDef(b)) {
- e = -b->sign;
- if (e > 0) return 1;
- else return -1;
+ if(VpIsNaN(a)||VpIsNaN(b)) return 999;
+ if(!VpIsDef(a)) {
+ if(!VpIsDef(b)) e = a->sign - b->sign;
+ else e = a->sign;
+ if(e>0) return 1;
+ else if(e<0) return -1;
+ else return 0;
+ }
+ if(!VpIsDef(b)) {
+ e = -b->sign;
+ if(e>0) return 1;
+ else return -1;
}
/* Zero check */
- if (VpIsZero(a)) {
- if (VpIsZero(b)) return 0; /* both zero */
- val = -VpGetSign(b);
- goto Exit;
+ if(VpIsZero(a)) {
+ if(VpIsZero(b)) return 0; /* both zero */
+ val = -VpGetSign(b);
+ goto Exit;
}
- if (VpIsZero(b)) {
- val = VpGetSign(a);
- goto Exit;
+ if(VpIsZero(b)) {
+ val = VpGetSign(a);
+ goto Exit;
}
/* compare sign */
- if (VpGetSign(a) > VpGetSign(b)) {
- val = 1; /* a>b */
- goto Exit;
+ if(VpGetSign(a) > VpGetSign(b)) {
+ val = 1; /* a>b */
+ goto Exit;
}
- if (VpGetSign(a) < VpGetSign(b)) {
- val = -1; /* a<b */
- goto Exit;
+ if(VpGetSign(a) < VpGetSign(b)) {
+ val = -1; /* a<b */
+ goto Exit;
}
- /* a and b have same sign, && sign!=0,then compare exponent */
- if (a->exponent > b->exponent) {
- val = VpGetSign(a);
- goto Exit;
+ /* a and b have same sign, && signe!=0,then compare exponent */
+ if((a->exponent) >(b->exponent)) {
+ val = VpGetSign(a);
+ goto Exit;
}
- if (a->exponent < b->exponent) {
- val = -VpGetSign(b);
- goto Exit;
+ if((a->exponent) <(b->exponent)) {
+ val = -VpGetSign(b);
+ goto Exit;
}
/* a and b have same exponent, then compare significand. */
- mx = (a->Prec < b->Prec) ? a->Prec : b->Prec;
+ mx =((a->Prec) <(b->Prec)) ?(a->Prec) :(b->Prec);
ind = 0;
- while (ind < mx) {
- if (a->frac[ind] > b->frac[ind]) {
- val = VpGetSign(a);
- goto Exit;
- }
- if (a->frac[ind] < b->frac[ind]) {
- val = -VpGetSign(b);
- goto Exit;
- }
- ++ind;
- }
- if (a->Prec > b->Prec) {
- val = VpGetSign(a);
+ while(ind < mx) {
+ if((a->frac[ind]) >(b->frac[ind])) {
+ val = VpGetSign(a);
+ goto Exit;
+ }
+ if((a->frac[ind]) <(b->frac[ind])) {
+ val = -VpGetSign(b);
+ goto Exit;
+ }
+ ++ind;
}
- else if (a->Prec < b->Prec) {
- val = -VpGetSign(b);
+ if((a->Prec) >(b->Prec)) {
+ val = VpGetSign(a);
+ } else if((a->Prec) <(b->Prec)) {
+ val = -VpGetSign(b);
}
Exit:
- if (val > 1) val = 1;
- else if (val < -1) val = -1;
+ if (val> 1) val = 1;
+ else if(val<-1) val = -1;
#ifdef BIGDECIMAL_DEBUG
- if (gfDebug) {
- VPrint(stdout, " VpComp a=%\n", a);
- VPrint(stdout, " b=%\n", b);
- printf(" ans=%d\n", val);
+ if(gfDebug) {
+ VPrint(stdout, " VpComp a=%\n", a);
+ VPrint(stdout, " b=%\n", b);
+ printf(" ans=%d\n", val);
}
#endif /* BIGDECIMAL_DEBUG */
return (int)val;
}
+#ifdef BIGDECIMAL_ENABLE_VPRINT
/*
* cntl_chr ... ASCIIZ Character, print control characters
* Available control codes:
@@ -4966,114 +4804,98 @@ Exit:
* Note: % must must not appear more than once
* a ... VP variable to be printed
*/
-#ifdef BIGDECIMAL_ENABLE_VPRINT
-static int
+VP_EXPORT int
VPrint(FILE *fp, const char *cntl_chr, Real *a)
{
- size_t i, j, nc, nd, ZeroSup, sep = 10;
+ size_t i, j, nc, nd, ZeroSup;
BDIGIT m, e, nn;
/* Check if NaN & Inf. */
- if (VpIsNaN(a)) {
- fprintf(fp, SZ_NaN);
- return 8;
+ if(VpIsNaN(a)) {
+ fprintf(fp,SZ_NaN);
+ return 8;
}
- if (VpIsPosInf(a)) {
- fprintf(fp, SZ_INF);
- return 8;
+ if(VpIsPosInf(a)) {
+ fprintf(fp,SZ_INF);
+ return 8;
}
- if (VpIsNegInf(a)) {
- fprintf(fp, SZ_NINF);
- return 9;
+ if(VpIsNegInf(a)) {
+ fprintf(fp,SZ_NINF);
+ return 9;
}
- if (VpIsZero(a)) {
- fprintf(fp, "0.0");
- return 3;
+ if(VpIsZero(a)) {
+ fprintf(fp,"0.0");
+ return 3;
}
j = 0;
nd = nc = 0; /* nd : number of digits in fraction part(every 10 digits, */
/* nd<=10). */
- /* nc : number of characters printed */
+ /* nc : number of caracters printed */
ZeroSup = 1; /* Flag not to print the leading zeros as 0.00xxxxEnn */
- while (*(cntl_chr + j)) {
- if (*(cntl_chr + j) == '%' && *(cntl_chr + j + 1) != '%') {
- nc = 0;
- if (!VpIsZero(a)) {
- if (VpGetSign(a) < 0) {
- fprintf(fp, "-");
- ++nc;
- }
- nc += fprintf(fp, "0.");
- switch (*(cntl_chr + j + 1)) {
- default:
- break;
-
- case '0': case 'z':
- ZeroSup = 0;
- ++j;
- sep = cntl_chr[j] == 'z' ? RMPD_COMPONENT_FIGURES : 10;
- break;
- }
- for (i = 0; i < a->Prec; ++i) {
+ while(*(cntl_chr + j)) {
+ if((*(cntl_chr + j) == '%') &&(*(cntl_chr + j + 1) != '%')) {
+ nc = 0;
+ if(!VpIsZero(a)) {
+ if(VpGetSign(a) < 0) {
+ fprintf(fp, "-");
+ ++nc;
+ }
+ nc += fprintf(fp, "0.");
+ for(i=0; i < a->Prec; ++i) {
m = BASE1;
- e = a->frac[i];
- while (m) {
- nn = e / m;
- if (!ZeroSup || nn) {
- nc += fprintf(fp, "%lu", (unsigned long)nn); /* The leading zero(s) */
- /* as 0.00xx will not */
- /* be printed. */
- ++nd;
- ZeroSup = 0; /* Set to print succeeding zeros */
- }
- if (nd >= sep) { /* print ' ' after every 10 digits */
- nd = 0;
- nc += fprintf(fp, " ");
- }
- e = e - nn * m;
- m /= 10;
- }
- }
- nc += fprintf(fp, "E%"PRIdSIZE, VpExponent10(a));
- nc += fprintf(fp, " (%"PRIdVALUE", %lu, %lu)", a->exponent, a->Prec, a->MaxPrec);
- }
- else {
- nc += fprintf(fp, "0.0");
- }
- }
- else {
- ++nc;
- if (*(cntl_chr + j) == '\\') {
- switch (*(cntl_chr + j + 1)) {
- case 'n':
- fprintf(fp, "\n");
- ++j;
- break;
- case 't':
- fprintf(fp, "\t");
- ++j;
- break;
- case 'b':
- fprintf(fp, "\n");
- ++j;
- break;
- default:
- fprintf(fp, "%c", *(cntl_chr + j));
- break;
- }
- }
- else {
- fprintf(fp, "%c", *(cntl_chr + j));
- if (*(cntl_chr + j) == '%') ++j;
- }
- }
- j++;
+ e = a->frac[i];
+ while(m) {
+ nn = e / m;
+ if((!ZeroSup) || nn) {
+ nc += fprintf(fp, "%lu", (unsigned long)nn); /* The leading zero(s) */
+ /* as 0.00xx will not */
+ /* be printed. */
+ ++nd;
+ ZeroSup = 0; /* Set to print succeeding zeros */
+ }
+ if(nd >= 10) { /* print ' ' after every 10 digits */
+ nd = 0;
+ nc += fprintf(fp, " ");
+ }
+ e = e - nn * m;
+ m /= 10;
+ }
+ }
+ nc += fprintf(fp, "E%"PRIdSIZE, VpExponent10(a));
+ } else {
+ nc += fprintf(fp, "0.0");
+ }
+ } else {
+ ++nc;
+ if(*(cntl_chr + j) == '\\') {
+ switch(*(cntl_chr + j + 1)) {
+ case 'n':
+ fprintf(fp, "\n");
+ ++j;
+ break;
+ case 't':
+ fprintf(fp, "\t");
+ ++j;
+ break;
+ case 'b':
+ fprintf(fp, "\n");
+ ++j;
+ break;
+ default:
+ fprintf(fp, "%c", *(cntl_chr + j));
+ break;
+ }
+ } else {
+ fprintf(fp, "%c", *(cntl_chr + j));
+ if(*(cntl_chr + j) == '%') ++j;
+ }
+ }
+ j++;
}
-
return (int)nc;
}
-#endif
+#endif /* BIGDECIMAL_ENABLE_VPRINT */
static void
VpFormatSt(char *psz, size_t fFmt)
@@ -5081,22 +4903,22 @@ VpFormatSt(char *psz, size_t fFmt)
size_t ie, i, nf = 0;
char ch;
- if (fFmt == 0) return;
+ if(fFmt<=0) return;
ie = strlen(psz);
- for (i = 0; i < ie; ++i) {
- ch = psz[i];
- if (!ch) break;
- if (ISSPACE(ch) || ch=='-' || ch=='+') continue;
- if (ch == '.') { nf = 0; continue; }
- if (ch == 'E') break;
-
- if (++nf > fFmt) {
- memmove(psz + i + 1, psz + i, ie - i + 1);
- ++ie;
- nf = 0;
- psz[i] = ' ';
- }
+ for(i = 0; i < ie; ++i) {
+ ch = psz[i];
+ if(!ch) break;
+ if(ISSPACE(ch) || ch=='-' || ch=='+') continue;
+ if(ch == '.') { nf = 0;continue;}
+ if(ch == 'E') break;
+ nf++;
+ if(nf > fFmt) {
+ memmove(psz + i + 1, psz + i, ie - i + 1);
+ ++ie;
+ nf = 0;
+ psz[i] = ' ';
+ }
}
}
@@ -5111,8 +4933,8 @@ VpExponent10(Real *a)
ex = a->exponent * (ssize_t)BASE_FIG;
n = BASE1;
while ((a->frac[0] / n) == 0) {
- --ex;
- n /= 10;
+ --ex;
+ n /= 10;
}
return ex;
}
@@ -5123,78 +4945,75 @@ VpSzMantissa(Real *a,char *psz)
size_t i, n, ZeroSup;
BDIGIT_DBL m, e, nn;
- if (VpIsNaN(a)) {
- sprintf(psz, SZ_NaN);
- return;
+ if(VpIsNaN(a)) {
+ sprintf(psz,SZ_NaN);
+ return;
}
- if (VpIsPosInf(a)) {
- sprintf(psz, SZ_INF);
- return;
+ if(VpIsPosInf(a)) {
+ sprintf(psz,SZ_INF);
+ return;
}
- if (VpIsNegInf(a)) {
- sprintf(psz, SZ_NINF);
- return;
+ if(VpIsNegInf(a)) {
+ sprintf(psz,SZ_NINF);
+ return;
}
ZeroSup = 1; /* Flag not to print the leading zeros as 0.00xxxxEnn */
- if (!VpIsZero(a)) {
- if (VpGetSign(a) < 0) *psz++ = '-';
- n = a->Prec;
- for (i = 0; i < n; ++i) {
- m = BASE1;
- e = a->frac[i];
- while (m) {
- nn = e / m;
- if (!ZeroSup || nn) {
- sprintf(psz, "%lu", (unsigned long)nn); /* The leading zero(s) */
- psz += strlen(psz);
- /* as 0.00xx will be ignored. */
- ZeroSup = 0; /* Set to print succeeding zeros */
- }
- e = e - nn * m;
- m /= 10;
- }
- }
- *psz = 0;
- while (psz[-1] == '0') *(--psz) = 0;
- }
- else {
- if (VpIsPosZero(a)) sprintf(psz, "0");
- else sprintf(psz, "-0");
+ if(!VpIsZero(a)) {
+ if(VpGetSign(a) < 0) *psz++ = '-';
+ n = a->Prec;
+ for (i=0; i < n; ++i) {
+ m = BASE1;
+ e = a->frac[i];
+ while (m) {
+ nn = e / m;
+ if((!ZeroSup) || nn) {
+ sprintf(psz, "%lu", (unsigned long)nn); /* The leading zero(s) */
+ psz += strlen(psz);
+ /* as 0.00xx will be ignored. */
+ ZeroSup = 0; /* Set to print succeeding zeros */
+ }
+ e = e - nn * m;
+ m /= 10;
+ }
+ }
+ *psz = 0;
+ while(psz[-1]=='0') *(--psz) = 0;
+ } else {
+ if(VpIsPosZero(a)) sprintf(psz, "0");
+ else sprintf(psz, "-0");
}
}
VP_EXPORT int
VpToSpecialString(Real *a,char *psz,int fPlus)
- /* fPlus =0:default, =1: set ' ' before digits , =2: set '+' before digits. */
+/* fPlus =0:default, =1: set ' ' before digits , =2: set '+' before digits. */
{
- if (VpIsNaN(a)) {
- sprintf(psz,SZ_NaN);
- return 1;
+ if(VpIsNaN(a)) {
+ sprintf(psz,SZ_NaN);
+ return 1;
}
- if (VpIsPosInf(a)) {
- if (fPlus == 1) {
- *psz++ = ' ';
- }
- else if (fPlus == 2) {
- *psz++ = '+';
- }
- sprintf(psz, SZ_INF);
- return 1;
+ if(VpIsPosInf(a)) {
+ if(fPlus==1) {
+ *psz++ = ' ';
+ } else if(fPlus==2) {
+ *psz++ = '+';
+ }
+ sprintf(psz,SZ_INF);
+ return 1;
}
- if (VpIsNegInf(a)) {
- sprintf(psz, SZ_NINF);
- return 1;
+ if(VpIsNegInf(a)) {
+ sprintf(psz,SZ_NINF);
+ return 1;
}
- if (VpIsZero(a)) {
- if (VpIsPosZero(a)) {
- if (fPlus == 1) sprintf(psz, " 0.0");
- else if (fPlus == 2) sprintf(psz, "+0.0");
- else sprintf(psz, "0.0");
- }
- else sprintf(psz, "-0.0");
- return 1;
+ if(VpIsZero(a)) {
+ if(VpIsPosZero(a)) {
+ if(fPlus==1) sprintf(psz, " 0.0");
+ else if(fPlus==2) sprintf(psz, "+0.0");
+ else sprintf(psz, "0.0");
+ } else sprintf(psz, "-0.0");
+ return 1;
}
return 0;
}
@@ -5219,32 +5038,30 @@ VpToString(Real *a, char *psz, size_t fFmt, int fPlus)
*psz++ = '0';
*psz++ = '.';
n = a->Prec;
- for (i = 0; i < n; ++i) {
- m = BASE1;
- e = a->frac[i];
- while (m) {
- nn = e / m;
- if (!ZeroSup || nn) {
- sprintf(psz, "%lu", (unsigned long)nn); /* The reading zero(s) */
- psz += strlen(psz);
- /* as 0.00xx will be ignored. */
- ZeroSup = 0; /* Set to print succeeding zeros */
- }
- e = e - nn * m;
- m /= 10;
- }
+ for(i=0;i < n;++i) {
+ m = BASE1;
+ e = a->frac[i];
+ while(m) {
+ nn = e / m;
+ if((!ZeroSup) || nn) {
+ sprintf(psz, "%lu", (unsigned long)nn); /* The reading zero(s) */
+ psz += strlen(psz);
+ /* as 0.00xx will be ignored. */
+ ZeroSup = 0; /* Set to print succeeding zeros */
+ }
+ e = e - nn * m;
+ m /= 10;
+ }
}
ex = a->exponent * (ssize_t)BASE_FIG;
shift = BASE1;
- while (a->frac[0] / shift == 0) {
- --ex;
- shift /= 10;
- }
- while (psz[-1] == '0') {
- *(--psz) = 0;
+ while(a->frac[0] / shift == 0) {
+ --ex;
+ shift /= 10;
}
+ while(psz[-1]=='0') *(--psz) = 0;
sprintf(psz, "E%"PRIdSIZE, ex);
- if (fFmt) VpFormatSt(pszSav, fFmt);
+ if(fFmt) VpFormatSt(pszSav, fFmt);
}
VP_EXPORT void
@@ -5256,50 +5073,49 @@ VpToFString(Real *a, char *psz, size_t fFmt, int fPlus)
char *pszSav = psz;
ssize_t ex;
- if (VpToSpecialString(a, psz, fPlus)) return;
+ if(VpToSpecialString(a,psz,fPlus)) return;
- if (VpGetSign(a) < 0) *psz++ = '-';
- else if (fPlus == 1) *psz++ = ' ';
- else if (fPlus == 2) *psz++ = '+';
+ if(VpGetSign(a) < 0) *psz++ = '-';
+ else if(fPlus==1) *psz++ = ' ';
+ else if(fPlus==2) *psz++ = '+';
n = a->Prec;
ex = a->exponent;
- if (ex <= 0) {
- *psz++ = '0';*psz++ = '.';
- while (ex < 0) {
- for (i=0; i < BASE_FIG; ++i) *psz++ = '0';
- ++ex;
- }
- ex = -1;
- }
-
- for (i = 0; i < n; ++i) {
- --ex;
- if (i == 0 && ex >= 0) {
- sprintf(psz, "%lu", (unsigned long)a->frac[i]);
- psz += strlen(psz);
- }
- else {
- m = BASE1;
- e = a->frac[i];
- while (m) {
- nn = e / m;
- *psz++ = (char)(nn + '0');
- e = e - nn * m;
- m /= 10;
- }
- }
- if (ex == 0) *psz++ = '.';
- }
- while (--ex>=0) {
- m = BASE;
- while (m /= 10) *psz++ = '0';
- if (ex == 0) *psz++ = '.';
+ if(ex<=0) {
+ *psz++ = '0';*psz++ = '.';
+ while(ex<0) {
+ for(i=0;i<BASE_FIG;++i) *psz++ = '0';
+ ++ex;
+ }
+ ex = -1;
+ }
+
+ for(i=0;i < n;++i) {
+ --ex;
+ if(i==0 && ex >= 0) {
+ sprintf(psz, "%lu", (unsigned long)a->frac[i]);
+ psz += strlen(psz);
+ } else {
+ m = BASE1;
+ e = a->frac[i];
+ while(m) {
+ nn = e / m;
+ *psz++ = (char)(nn + '0');
+ e = e - nn * m;
+ m /= 10;
+ }
+ }
+ if(ex == 0) *psz++ = '.';
+ }
+ while(--ex>=0) {
+ m = BASE;
+ while(m/=10) *psz++ = '0';
+ if(ex == 0) *psz++ = '.';
}
*psz = 0;
- while (psz[-1] == '0') *(--psz) = 0;
- if (psz[-1] == '.') sprintf(psz, "0");
- if (fFmt) VpFormatSt(pszSav, fFmt);
+ while(psz[-1]=='0') *(--psz) = 0;
+ if(psz[-1]=='.') sprintf(psz, "0");
+ if(fFmt) VpFormatSt(pszSav, fFmt);
}
/*
@@ -5329,51 +5145,40 @@ VpCtoV(Real *a, const char *int_chr, size_t ni, const char *frac, size_t nf, con
exponent_overflow = 0;
memset(a->frac, 0, ma * sizeof(BDIGIT));
if (ne > 0) {
- i = 0;
- if (exp_chr[0] == '-') {
- signe = -1;
- ++i;
- ++me;
- }
+ i = 0;
+ if (exp_chr[0] == '-') {
+ signe = -1;
+ ++i;
+ ++me;
+ }
else if (exp_chr[0] == '+') {
- ++i;
- ++me;
- }
- while (i < me) {
- if (MUL_OVERFLOW_SIGNED_VALUE_P(e, (SIGNED_VALUE)BASE_FIG)) {
- es = e;
- goto exp_overflow;
- }
- es = e * (SIGNED_VALUE)BASE_FIG;
- if (MUL_OVERFLOW_SIGNED_VALUE_P(e, 10) ||
- SIGNED_VALUE_MAX - (exp_chr[i] - '0') < e * 10)
- goto exp_overflow;
- e = e * 10 + exp_chr[i] - '0';
- if (MUL_OVERFLOW_SIGNED_VALUE_P(e, (SIGNED_VALUE)BASE_FIG))
- goto exp_overflow;
- if (es > (SIGNED_VALUE)(e * BASE_FIG)) {
- exp_overflow:
+ ++i;
+ ++me;
+ }
+ while (i < me) {
+ es = e * (SIGNED_VALUE)BASE_FIG;
+ e = e * 10 + exp_chr[i] - '0';
+ if (es > (SIGNED_VALUE)(e*BASE_FIG)) {
exponent_overflow = 1;
e = es; /* keep sign */
break;
- }
- ++i;
- }
+ }
+ ++i;
+ }
}
/* get integer part */
i = 0;
sign = 1;
- if (1 /*ni >= 0*/) {
- if (int_chr[0] == '-') {
- sign = -1;
- ++i;
- ++mi;
- }
- else if (int_chr[0] == '+') {
- ++i;
- ++mi;
- }
+ if(1 /*ni >= 0*/) {
+ if(int_chr[0] == '-') {
+ sign = -1;
+ ++i;
+ ++mi;
+ } else if(int_chr[0] == '+') {
+ ++i;
+ ++mi;
+ }
}
e = signe * e; /* e: The value of exponent part. */
@@ -5386,14 +5191,14 @@ VpCtoV(Real *a, const char *int_chr, size_t ni, const char *frac, size_t nf, con
j = 0;
ef = 1;
while (ef) {
- if (e >= 0) eb = e;
- else eb = -e;
- ef = eb / (SIGNED_VALUE)BASE_FIG;
- ef = eb - ef * (SIGNED_VALUE)BASE_FIG;
- if (ef) {
- ++j; /* Means to add one more preceding zero */
- ++e;
- }
+ if (e >= 0) eb = e;
+ else eb = -e;
+ ef = eb / (SIGNED_VALUE)BASE_FIG;
+ ef = eb - ef * (SIGNED_VALUE)BASE_FIG;
+ if (ef) {
+ ++j; /* Means to add one more preceeding zero */
+ ++e;
+ }
}
eb = e / (SIGNED_VALUE)BASE_FIG;
@@ -5412,33 +5217,33 @@ VpCtoV(Real *a, const char *int_chr, size_t ni, const char *frac, size_t nf, con
ind_a = 0;
while (i < mi) {
- a->frac[ind_a] = 0;
- while (j < BASE_FIG && i < mi) {
- a->frac[ind_a] = a->frac[ind_a] * 10 + int_chr[i] - '0';
- ++j;
- ++i;
- }
- if (i < mi) {
- ++ind_a;
- if (ind_a >= ma) goto over_flow;
- j = 0;
- }
+ a->frac[ind_a] = 0;
+ while ((j < BASE_FIG) && (i < mi)) {
+ a->frac[ind_a] = a->frac[ind_a] * 10 + int_chr[i] - '0';
+ ++j;
+ ++i;
+ }
+ if (i < mi) {
+ ++ind_a;
+ if (ind_a >= ma) goto over_flow;
+ j = 0;
+ }
}
/* get fraction part */
i = 0;
- while (i < nf) {
- while (j < BASE_FIG && i < nf) {
- a->frac[ind_a] = a->frac[ind_a] * 10 + frac[i] - '0';
- ++j;
- ++i;
- }
- if (i < nf) {
- ++ind_a;
- if (ind_a >= ma) goto over_flow;
- j = 0;
- }
+ while(i < nf) {
+ while((j < BASE_FIG) && (i < nf)) {
+ a->frac[ind_a] = a->frac[ind_a] * 10 + frac[i] - '0';
+ ++j;
+ ++i;
+ }
+ if(i < nf) {
+ ++ind_a;
+ if(ind_a >= ma) goto over_flow;
+ j = 0;
+ }
}
goto Final;
@@ -5448,12 +5253,12 @@ over_flow:
Final:
if (ind_a >= ma) ind_a = ma - 1;
while (j < BASE_FIG) {
- a->frac[ind_a] = a->frac[ind_a] * 10;
- ++j;
+ a->frac[ind_a] = a->frac[ind_a] * 10;
+ ++j;
}
a->Prec = ind_a + 1;
a->exponent = eb;
- VpSetSign(a, sign);
+ VpSetSign(a,sign);
VpNmlz(a);
return 1;
}
@@ -5480,55 +5285,55 @@ VpVtoD(double *d, SIGNED_VALUE *e, Real *m)
double div;
int f = 1;
- if (VpIsNaN(m)) {
- *d = VpGetDoubleNaN();
- *e = 0;
- f = -1; /* NaN */
- goto Exit;
- }
- else if (VpIsPosZero(m)) {
- *d = 0.0;
- *e = 0;
- f = 0;
- goto Exit;
- }
- else if (VpIsNegZero(m)) {
- *d = VpGetDoubleNegZero();
- *e = 0;
- f = 0;
- goto Exit;
- }
- else if (VpIsPosInf(m)) {
- *d = VpGetDoublePosInf();
- *e = 0;
- f = 2;
- goto Exit;
- }
- else if (VpIsNegInf(m)) {
- *d = VpGetDoubleNegInf();
- *e = 0;
- f = 2;
- goto Exit;
+ if(VpIsNaN(m)) {
+ *d = VpGetDoubleNaN();
+ *e = 0;
+ f = -1; /* NaN */
+ goto Exit;
+ } else
+ if(VpIsPosZero(m)) {
+ *d = 0.0;
+ *e = 0;
+ f = 0;
+ goto Exit;
+ } else
+ if(VpIsNegZero(m)) {
+ *d = VpGetDoubleNegZero();
+ *e = 0;
+ f = 0;
+ goto Exit;
+ } else
+ if(VpIsPosInf(m)) {
+ *d = VpGetDoublePosInf();
+ *e = 0;
+ f = 2;
+ goto Exit;
+ } else
+ if(VpIsNegInf(m)) {
+ *d = VpGetDoubleNegInf();
+ *e = 0;
+ f = 2;
+ goto Exit;
}
/* Normal number */
- fig = (DBLE_FIG + BASE_FIG - 1) / BASE_FIG;
+ fig =(DBLE_FIG + BASE_FIG - 1) / BASE_FIG;
ind_m = 0;
- mm = Min(fig, m->Prec);
+ mm = Min(fig,(m->Prec));
*d = 0.0;
div = 1.;
- while (ind_m < mm) {
- div /= (double)BASE;
- *d = *d + (double)m->frac[ind_m++] * div;
+ while(ind_m < mm) {
+ div /= (double)BASE;
+ *d = *d + (double)m->frac[ind_m++] * div;
}
*e = m->exponent * (SIGNED_VALUE)BASE_FIG;
*d *= VpGetSign(m);
Exit:
#ifdef BIGDECIMAL_DEBUG
- if (gfDebug) {
- VPrint(stdout, " VpVtoD: m=%\n", m);
- printf(" d=%e * 10 **%ld\n", *d, *e);
- printf(" DBLE_FIG = %d\n", DBLE_FIG);
+ if(gfDebug) {
+ VPrint(stdout, " VpVtoD: m=%\n", m);
+ printf(" d=%e * 10 **%ld\n", *d, *e);
+ printf(" DBLE_FIG = %d\n", DBLE_FIG);
}
#endif /*BIGDECIMAL_DEBUG */
return f;
@@ -5545,58 +5350,57 @@ VpDtoV(Real *m, double d)
BDIGIT i;
double val, val2;
- if (isnan(d)) {
- VpSetNaN(m);
- goto Exit;
+ if(isnan(d)) {
+ VpSetNaN(m);
+ goto Exit;
}
- if (isinf(d)) {
- if (d > 0.0) VpSetPosInf(m);
- else VpSetNegInf(m);
- goto Exit;
+ if(isinf(d)) {
+ if(d>0.0) VpSetPosInf(m);
+ else VpSetNegInf(m);
+ goto Exit;
}
- if (d == 0.0) {
- VpSetZero(m, 1);
- goto Exit;
+ if(d == 0.0) {
+ VpSetZero(m,1);
+ goto Exit;
}
- val = (d > 0.) ? d : -d;
+ val =(d > 0.) ? d :(-d);
ne = 0;
- if (val >= 1.0) {
- while (val >= 1.0) {
- val /= (double)BASE;
- ++ne;
- }
- }
- else {
- val2 = 1.0 / (double)BASE;
- while (val < val2) {
- val *= (double)BASE;
- --ne;
- }
+ if(val >= 1.0) {
+ while(val >= 1.0) {
+ val /= (double)BASE;
+ ++ne;
+ }
+ } else {
+ val2 = 1.0 /(double)BASE;
+ while(val < val2) {
+ val *= (double)BASE;
+ --ne;
+ }
}
/* Now val = 0.xxxxx*BASE**ne */
mm = m->MaxPrec;
memset(m->frac, 0, mm * sizeof(BDIGIT));
- for (ind_m = 0; val > 0.0 && ind_m < mm; ind_m++) {
- val *= (double)BASE;
- i = (BDIGIT)val;
- val -= (double)i;
- m->frac[ind_m] = i;
+ for(ind_m = 0;val > 0.0 && ind_m < mm;ind_m++) {
+ val *= (double)BASE;
+ i = (BDIGIT)val;
+ val -= (double)i;
+ m->frac[ind_m] = i;
}
- if (ind_m >= mm) ind_m = mm - 1;
+ if(ind_m >= mm) ind_m = mm - 1;
VpSetSign(m, (d > 0.0) ? 1 : -1);
m->Prec = ind_m + 1;
m->exponent = ne;
VpInternalRound(m, 0, (m->Prec > 0) ? m->frac[m->Prec-1] : 0,
- (BDIGIT)(val*(double)BASE));
+ (BDIGIT)(val*(double)BASE));
Exit:
#ifdef BIGDECIMAL_DEBUG
- if (gfDebug) {
- printf("VpDtoV d=%30.30e\n", d);
- VPrint(stdout, " m=%\n", m);
+ if(gfDebug) {
+ printf("VpDtoV d=%30.30e\n", d);
+ VPrint(stdout, " m=%\n", m);
}
#endif /* BIGDECIMAL_DEBUG */
return;
@@ -5614,52 +5418,51 @@ VpItoV(Real *m, SIGNED_VALUE ival)
int isign;
SIGNED_VALUE ne;
- if (ival == 0) {
- VpSetZero(m, 1);
- goto Exit;
+ if(ival == 0) {
+ VpSetZero(m,1);
+ goto Exit;
}
isign = 1;
val = ival;
- if (ival < 0) {
- isign = -1;
- val =(size_t)(-ival);
+ if(ival < 0) {
+ isign = -1;
+ val =(size_t)(-ival);
}
ne = 0;
ind_m = 0;
mm = m->MaxPrec;
- while (ind_m < mm) {
- m->frac[ind_m] = 0;
- ++ind_m;
+ while(ind_m < mm) {
+ m->frac[ind_m] = 0;
+ ++ind_m;
}
ind_m = 0;
- while (val > 0) {
- if (val) {
- v1 = val;
- v2 = 1;
- while (v1 >= BASE) {
- v1 /= BASE;
- v2 *= BASE;
- }
- val = val - v2 * v1;
- v = v1;
- }
- else {
- v = 0;
- }
- m->frac[ind_m] = v;
- ++ind_m;
- ++ne;
+ while(val > 0) {
+ if(val) {
+ v1 = val;
+ v2 = 1;
+ while(v1 >= BASE) {
+ v1 /= BASE;
+ v2 *= BASE;
+ }
+ val = val - v2 * v1;
+ v = v1;
+ } else {
+ v = 0;
+ }
+ m->frac[ind_m] = v;
+ ++ind_m;
+ ++ne;
}
m->Prec = ind_m - 1;
m->exponent = ne;
- VpSetSign(m, isign);
+ VpSetSign(m,isign);
VpNmlz(m);
Exit:
#ifdef BIGDECIMAL_DEBUG
- if (gfDebug) {
- printf(" VpItoV i=%d\n", ival);
- VPrint(stdout, " m=%\n", m);
+ if(gfDebug) {
+ printf(" VpItoV i=%d\n", ival);
+ VPrint(stdout, " m=%\n", m);
}
#endif /* BIGDECIMAL_DEBUG */
return;
@@ -5681,31 +5484,30 @@ VpSqrt(Real *y, Real *x)
double val;
/* Zero, NaN or Infinity ? */
- if (!VpHasVal(x)) {
- if (VpIsZero(x) || VpGetSign(x) > 0) {
- VpAsgn(y,x,1);
- goto Exit;
- }
- VpSetNaN(y);
- return VpException(VP_EXCEPTION_OP, "(VpSqrt) SQRT(NaN or negative value)", 0);
- goto Exit;
+ if(!VpHasVal(x)) {
+ if(VpIsZero(x)||VpGetSign(x)>0) {
+ VpAsgn(y,x,1);
+ goto Exit;
+ }
+ VpSetNaN(y);
+ return VpException(VP_EXCEPTION_OP,"(VpSqrt) SQRT(NaN or negative value)",0);
+ goto Exit;
}
- /* Negative ? */
- if (VpGetSign(x) < 0) {
- VpSetNaN(y);
- return VpException(VP_EXCEPTION_OP, "(VpSqrt) SQRT(negative value)", 0);
+ /* Negative ? */
+ if(VpGetSign(x) < 0) {
+ VpSetNaN(y);
+ return VpException(VP_EXCEPTION_OP,"(VpSqrt) SQRT(negative value)",0);
}
/* One ? */
- if (VpIsOne(x)) {
- VpSetOne(y);
- goto Exit;
+ if(VpIsOne(x)) {
+ VpSetOne(y);
+ goto Exit;
}
n = (SIGNED_VALUE)y->MaxPrec;
if (x->MaxPrec > (size_t)n) n = (ssize_t)x->MaxPrec;
-
/* allocate temporally variables */
f = VpAlloc(y->MaxPrec * (BASE_FIG + 2), "#1");
r = VpAlloc((n + n) * (BASE_FIG + 2), "#1");
@@ -5723,8 +5525,8 @@ VpSqrt(Real *y, Real *x)
e /= (SIGNED_VALUE)BASE_FIG;
n = e / 2;
if (e - n * 2 != 0) {
- val /= BASE;
- n = (e + 1) / 2;
+ val /= BASE;
+ n = (e + 1) / 2;
}
VpDtoV(y, sqrt(val)); /* y <- sqrt(val) */
y->exponent += n;
@@ -5734,20 +5536,22 @@ VpSqrt(Real *y, Real *x)
n = (SIGNED_VALUE)(y_prec * BASE_FIG);
if (n < (SIGNED_VALUE)maxnr) n = (SIGNED_VALUE)maxnr;
do {
- y->MaxPrec *= 2;
- if (y->MaxPrec > y_prec) y->MaxPrec = y_prec;
- f->MaxPrec = y->MaxPrec;
- VpDivd(f, r, x, y); /* f = x/y */
- VpAddSub(r, f, y, -1); /* r = f - y */
- VpMult(f, VpPt5, r); /* f = 0.5*r */
- if (VpIsZero(f)) goto converge;
- VpAddSub(r, f, y, 1); /* r = y + f */
- VpAsgn(y, r, 1); /* y = r */
- } while (++nr < n);
-
+ y->MaxPrec *= 2;
+ if (y->MaxPrec > y_prec) y->MaxPrec = y_prec;
+ f->MaxPrec = y->MaxPrec;
+ VpDivd(f, r, x, y); /* f = x/y */
+ VpAddSub(r, f, y, -1); /* r = f - y */
+ VpMult(f, VpPt5, r); /* f = 0.5*r */
+ if(VpIsZero(f)) goto converge;
+ VpAddSub(r, f, y, 1); /* r = y + f */
+ VpAsgn(y, r, 1); /* y = r */
+ if(f->exponent <= prec) goto converge;
+ } while(++nr < n);
+ /* */
#ifdef BIGDECIMAL_DEBUG
- if (gfDebug) {
- printf("ERROR(VpSqrt): did not converge within %ld iterations.\n", nr);
+ if(gfDebug) {
+ printf("ERROR(VpSqrt): did not converge within %ld iterations.\n",
+ nr);
}
#endif /* BIGDECIMAL_DEBUG */
y->MaxPrec = y_prec;
@@ -5755,13 +5559,13 @@ VpSqrt(Real *y, Real *x)
converge:
VpChangeSign(y, 1);
#ifdef BIGDECIMAL_DEBUG
- if (gfDebug) {
- VpMult(r, y, y);
- VpAddSub(f, x, r, -1);
- printf("VpSqrt: iterations = %"PRIdSIZE"\n", nr);
- VPrint(stdout, " y =% \n", y);
- VPrint(stdout, " x =% \n", x);
- VPrint(stdout, " x-y*y = % \n", f);
+ if(gfDebug) {
+ VpMult(r, y, y);
+ VpAddSub(f, x, r, -1);
+ printf("VpSqrt: iterations = %"PRIdSIZE"\n", nr);
+ VPrint(stdout, " y =% \n", y);
+ VPrint(stdout, " x =% \n", x);
+ VPrint(stdout, " x-y*y = % \n", f);
}
#endif /* BIGDECIMAL_DEBUG */
y->MaxPrec = y_prec;
@@ -5780,9 +5584,9 @@ Exit:
VP_EXPORT int
VpMidRound(Real *y, unsigned short f, ssize_t nf)
/*
- * Round relatively from the decimal point.
+ * Round reletively from the decimal point.
* f: rounding mode
- * nf: digit location to round from the decimal point.
+ * nf: digit location to round from the the decimal point.
*/
{
/* fracf: any positive digit under rounding position? */
@@ -5797,8 +5601,8 @@ VpMidRound(Real *y, unsigned short f, ssize_t nf)
exptoadd=0;
if (nf < 0) {
/* rounding position too left(large). */
- if (f != VP_ROUND_CEIL && f != VP_ROUND_FLOOR) {
- VpSetZero(y, VpGetSign(y)); /* truncate everything */
+ if((f!=VP_ROUND_CEIL) && (f!=VP_ROUND_FLOOR)) {
+ VpSetZero(y,VpGetSign(y)); /* truncate everything */
return 0;
}
exptoadd = -nf;
@@ -5811,7 +5615,7 @@ VpMidRound(Real *y, unsigned short f, ssize_t nf)
ioffset = nf - ix*(ssize_t)BASE_FIG;
n = (ssize_t)BASE_FIG - ioffset - 1;
- for (shifter = 1, i = 0; i < n; ++i) shifter *= 10;
+ for (shifter=1,i=0; i<n; ++i) shifter *= 10;
/* so the representation used (in y->frac) is an array of BDIGIT, where
each BDIGIT contains a value between 0 and BASE-1, consisting of BASE_FIG
@@ -5820,25 +5624,20 @@ VpMidRound(Real *y, unsigned short f, ssize_t nf)
(that numbers of decimal places are typed as ssize_t is somewhat confusing)
nf is now position (in decimal places) of the digit from the start of
- the array.
-
+ the array.
ix is the position (in BDIGITS) of the BDIGIT containing the decimal digit,
- from the start of the array.
-
+ from the start of the array.
v is the value of this BDIGIT
-
ioffset is the number of extra decimal places along of this decimal digit
- within v.
-
+ within v.
n is the number of decimal digits remaining within v after this decimal digit
shifter is 10**n,
-
v % shifter are the remaining digits within v
v % (shifter * 10) are the digit together with the remaining digits within v
v / shifter are the digit's predecessors together with the digit
div = v / shifter / 10 is just the digit's precessors
(v / shifter) - div*10 is just the digit, which is what v ends up being reassigned to.
- */
+ */
fracf = (v % (shifter * 10) > 0);
fracf_1further = ((v % shifter) > 0);
@@ -5849,15 +5648,15 @@ VpMidRound(Real *y, unsigned short f, ssize_t nf)
/* now v is just the digit required.
now fracf is whether the digit or any of the remaining digits within v are non-zero
now fracf_1further is whether any of the remaining digits within v are non-zero
- */
+ */
/* now check all the remaining BDIGITS for zero-ness a whole BDIGIT at a time.
- if we spot any non-zeroness, that means that we found a positive digit under
+ if we spot any non-zeroness, that means that we foudn a positive digit under
rounding position, and we also found a positive digit under one further than
the rounding position, so both searches (to see if any such non-zero digit exists)
can stop */
- for (i = ix + 1; (size_t)i < y->Prec; i++) {
+ for (i=ix+1; (size_t)i < y->Prec; i++) {
if (y->frac[i] % BASE) {
fracf = fracf_1further = 1;
break;
@@ -5870,31 +5669,31 @@ VpMidRound(Real *y, unsigned short f, ssize_t nf)
now v = the first digit under the rounding position */
/* drop digits after pointed digit */
- memset(y->frac + ix + 1, 0, (y->Prec - (ix + 1)) * sizeof(BDIGIT));
+ memset(y->frac+ix+1, 0, (y->Prec - (ix+1)) * sizeof(BDIGIT));
- switch (f) {
- case VP_ROUND_DOWN: /* Truncate */
+ switch(f) {
+ case VP_ROUND_DOWN: /* Truncate */
+ break;
+ case VP_ROUND_UP: /* Roundup */
+ if (fracf) ++div;
break;
- case VP_ROUND_UP: /* Roundup */
- if (fracf) ++div;
- break;
- case VP_ROUND_HALF_UP:
- if (v>=5) ++div;
- break;
- case VP_ROUND_HALF_DOWN:
+ case VP_ROUND_HALF_UP:
+ if (v>=5) ++div;
+ break;
+ case VP_ROUND_HALF_DOWN:
if (v > 5 || (v == 5 && fracf_1further)) ++div;
- break;
- case VP_ROUND_CEIL:
- if (fracf && (VpGetSign(y) > 0)) ++div;
- break;
- case VP_ROUND_FLOOR:
- if (fracf && (VpGetSign(y) < 0)) ++div;
- break;
- case VP_ROUND_HALF_EVEN: /* Banker's rounding */
+ break;
+ case VP_ROUND_CEIL:
+ if (fracf && (VpGetSign(y)>0)) ++div;
+ break;
+ case VP_ROUND_FLOOR:
+ if (fracf && (VpGetSign(y)<0)) ++div;
+ break;
+ case VP_ROUND_HALF_EVEN: /* Banker's rounding */
if (v > 5) ++div;
else if (v == 5) {
if (fracf_1further) {
- ++div;
+ ++div;
}
else {
if (ioffset == 0) {
@@ -5912,34 +5711,32 @@ VpMidRound(Real *y, unsigned short f, ssize_t nf)
}
break;
}
- for (i = 0; i <= n; ++i) div *= 10;
- if (div >= BASE) {
- if (ix) {
- y->frac[ix] = 0;
- VpRdup(y, ix);
- }
- else {
- short s = VpGetSign(y);
- SIGNED_VALUE e = y->exponent;
- VpSetOne(y);
- VpSetSign(y, s);
- y->exponent = e + 1;
- }
- }
- else {
- y->frac[ix] = div;
- VpNmlz(y);
+ for (i=0; i<=n; ++i) div *= 10;
+ if (div>=BASE) {
+ if(ix) {
+ y->frac[ix] = 0;
+ VpRdup(y,ix);
+ } else {
+ short s = VpGetSign(y);
+ SIGNED_VALUE e = y->exponent;
+ VpSetOne(y);
+ VpSetSign(y, s);
+ y->exponent = e+1;
+ }
+ } else {
+ y->frac[ix] = div;
+ VpNmlz(y);
}
if (exptoadd > 0) {
- y->exponent += (SIGNED_VALUE)(exptoadd / BASE_FIG);
- exptoadd %= (ssize_t)BASE_FIG;
- for (i = 0; i < exptoadd; i++) {
- y->frac[0] *= 10;
- if (y->frac[0] >= BASE) {
- y->frac[0] /= BASE;
- y->exponent++;
- }
- }
+ y->exponent += (SIGNED_VALUE)(exptoadd/BASE_FIG);
+ exptoadd %= (ssize_t)BASE_FIG;
+ for(i=0;i<exptoadd;i++) {
+ y->frac[0] *= 10;
+ if (y->frac[0] >= BASE) {
+ y->frac[0] /= BASE;
+ y->exponent++;
+ }
+ }
}
return 1;
}
@@ -5953,10 +5750,10 @@ VpLeftRound(Real *y, unsigned short f, ssize_t nf)
BDIGIT v;
if (!VpHasVal(y)) return 0; /* Unable to round */
v = y->frac[0];
- nf -= VpExponent(y) * (ssize_t)BASE_FIG;
+ nf -= VpExponent(y)*(ssize_t)BASE_FIG;
while ((v /= 10) != 0) nf--;
nf += (ssize_t)BASE_FIG-1;
- return VpMidRound(y, f, nf);
+ return VpMidRound(y,f,nf);
}
VP_EXPORT int
@@ -5964,17 +5761,17 @@ VpActiveRound(Real *y, Real *x, unsigned short f, ssize_t nf)
{
/* First,assign whole value in truncation mode */
if (VpAsgn(y, x, 10) <= 1) return 0; /* Zero,NaN,or Infinity */
- return VpMidRound(y, f, nf);
+ return VpMidRound(y,f,nf);
}
static int
VpLimitRound(Real *c, size_t ixDigit)
{
size_t ix = VpGetPrecLimit();
- if (!VpNmlz(c)) return -1;
- if (!ix) return 0;
- if (!ixDigit) ixDigit = c->Prec-1;
- if ((ix + BASE_FIG - 1) / BASE_FIG > ixDigit + 1) return 0;
+ if(!VpNmlz(c)) return -1;
+ if(!ix) return 0;
+ if(!ixDigit) ixDigit = c->Prec-1;
+ if((ix+BASE_FIG-1)/BASE_FIG > ixDigit+1) return 0;
return VpLeftRound(c, VpGetRoundMode(), (ssize_t)ix);
}
@@ -5992,27 +5789,27 @@ VpInternalRound(Real *c, size_t ixDigit, BDIGIT vPrev, BDIGIT v)
v /= BASE1;
switch (rounding_mode) {
- case VP_ROUND_DOWN:
+ case VP_ROUND_DOWN:
break;
- case VP_ROUND_UP:
+ case VP_ROUND_UP:
if (v) f = 1;
break;
- case VP_ROUND_HALF_UP:
+ case VP_ROUND_HALF_UP:
if (v >= 5) f = 1;
break;
- case VP_ROUND_HALF_DOWN:
+ case VP_ROUND_HALF_DOWN:
/* this is ok - because this is the last digit of precision,
the case where v == 5 and some further digits are nonzero
will never occur */
if (v >= 6) f = 1;
break;
- case VP_ROUND_CEIL:
+ case VP_ROUND_CEIL:
if (v && (VpGetSign(c) > 0)) f = 1;
break;
- case VP_ROUND_FLOOR:
+ case VP_ROUND_FLOOR:
if (v && (VpGetSign(c) < 0)) f = 1;
break;
- case VP_ROUND_HALF_EVEN: /* Banker's rounding */
+ case VP_ROUND_HALF_EVEN: /* Banker's rounding */
/* as per VP_ROUND_HALF_DOWN, because this is the last digit of precision,
there is no case to worry about where v == 5 and some further digits are nonzero */
if (v > 5) f = 1;
@@ -6036,17 +5833,16 @@ VpRdup(Real *m, size_t ind_m)
if (!ind_m) ind_m = m->Prec;
carry = 1;
- while (carry > 0 && ind_m--) {
- m->frac[ind_m] += carry;
- if (m->frac[ind_m] >= BASE) m->frac[ind_m] -= BASE;
- else carry = 0;
- }
- if (carry > 0) { /* Overflow,count exponent and set fraction part be 1 */
- if (!AddExponent(m, 1)) return 0;
- m->Prec = m->frac[0] = 1;
- }
- else {
- VpNmlz(m);
+ while (carry > 0 && (ind_m--)) {
+ m->frac[ind_m] += carry;
+ if (m->frac[ind_m] >= BASE) m->frac[ind_m] -= BASE;
+ else carry = 0;
+ }
+ if(carry > 0) { /* Overflow,count exponent and set fraction part be 1 */
+ if (!AddExponent(m, 1)) return 0;
+ m->Prec = m->frac[0] = 1;
+ } else {
+ VpNmlz(m);
}
return 1;
}
@@ -6059,18 +5855,18 @@ VpFrac(Real *y, Real *x)
{
size_t my, ind_y, ind_x;
- if (!VpHasVal(x)) {
- VpAsgn(y, x, 1);
- goto Exit;
+ if(!VpHasVal(x)) {
+ VpAsgn(y,x,1);
+ goto Exit;
}
if (x->exponent > 0 && (size_t)x->exponent >= x->Prec) {
- VpSetZero(y, VpGetSign(x));
- goto Exit;
+ VpSetZero(y,VpGetSign(x));
+ goto Exit;
}
- else if (x->exponent <= 0) {
- VpAsgn(y, x, 1);
- goto Exit;
+ else if(x->exponent <= 0) {
+ VpAsgn(y, x, 1);
+ goto Exit;
}
/* satisfy: x->exponent > 0 */
@@ -6078,22 +5874,22 @@ VpFrac(Real *y, Real *x)
y->Prec = x->Prec - (size_t)x->exponent;
y->Prec = Min(y->Prec, y->MaxPrec);
y->exponent = 0;
- VpSetSign(y, VpGetSign(x));
+ VpSetSign(y,VpGetSign(x));
ind_y = 0;
my = y->Prec;
ind_x = x->exponent;
- while (ind_y < my) {
- y->frac[ind_y] = x->frac[ind_x];
- ++ind_y;
- ++ind_x;
+ while(ind_y < my) {
+ y->frac[ind_y] = x->frac[ind_x];
+ ++ind_y;
+ ++ind_x;
}
VpNmlz(y);
Exit:
#ifdef BIGDECIMAL_DEBUG
- if (gfDebug) {
- VPrint(stdout, "VpFrac y=%\n", y);
- VPrint(stdout, " x=%\n", x);
+ if(gfDebug) {
+ VPrint(stdout, "VpFrac y=%\n", y);
+ VPrint(stdout, " x=%\n", x);
}
#endif /* BIGDECIMAL_DEBUG */
return;
@@ -6110,57 +5906,55 @@ VpPower(Real *y, Real *x, SIGNED_VALUE n)
Real *w1 = NULL;
Real *w2 = NULL;
- if (VpIsZero(x)) {
- if (n == 0) {
- VpSetOne(y);
- goto Exit;
- }
- sign = VpGetSign(x);
- if (n < 0) {
- n = -n;
- if (sign < 0) sign = (n % 2) ? -1 : 1;
- VpSetInf(y, sign);
- }
- else {
- if (sign < 0) sign = (n % 2) ? -1 : 1;
- VpSetZero(y,sign);
- }
- goto Exit;
+ if(VpIsZero(x)) {
+ if(n==0) {
+ VpSetOne(y);
+ goto Exit;
+ }
+ sign = VpGetSign(x);
+ if(n<0) {
+ n = -n;
+ if(sign<0) sign = (n%2)?(-1):(1);
+ VpSetInf (y,sign);
+ } else {
+ if(sign<0) sign = (n%2)?(-1):(1);
+ VpSetZero(y,sign);
+ }
+ goto Exit;
}
- if (VpIsNaN(x)) {
- VpSetNaN(y);
- goto Exit;
+ if(VpIsNaN(x)) {
+ VpSetNaN(y);
+ goto Exit;
}
- if (VpIsInf(x)) {
- if (n == 0) {
- VpSetOne(y);
- goto Exit;
- }
- if (n > 0) {
- VpSetInf(y, (n % 2 == 0 || VpIsPosInf(x)) ? 1 : -1);
- goto Exit;
- }
- VpSetZero(y, (n % 2 == 0 || VpIsPosInf(x)) ? 1 : -1);
- goto Exit;
+ if(VpIsInf(x)) {
+ if(n==0) {
+ VpSetOne(y);
+ goto Exit;
+ }
+ if(n>0) {
+ VpSetInf(y, (n%2==0 || VpIsPosInf(x)) ? 1 : -1);
+ goto Exit;
+ }
+ VpSetZero(y, (n%2==0 || VpIsPosInf(x)) ? 1 : -1);
+ goto Exit;
}
- if (x->exponent == 1 && x->Prec == 1 && x->frac[0] == 1) {
- /* abs(x) = 1 */
- VpSetOne(y);
- if (VpGetSign(x) > 0) goto Exit;
- if ((n % 2) == 0) goto Exit;
- VpSetSign(y, -1);
- goto Exit;
+ if((x->exponent == 1) &&(x->Prec == 1) &&(x->frac[0] == 1)) {
+ /* abs(x) = 1 */
+ VpSetOne(y);
+ if(VpGetSign(x) > 0) goto Exit;
+ if((n % 2) == 0) goto Exit;
+ VpSetSign(y, -1);
+ goto Exit;
}
- if (n > 0) sign = 1;
- else if (n < 0) {
- sign = -1;
- n = -n;
- }
- else {
- VpSetOne(y);
- goto Exit;
+ if(n > 0) sign = 1;
+ else if(n < 0) {
+ sign = -1;
+ n = -n;
+ } else {
+ VpSetOne(y);
+ goto Exit;
}
/* Allocate working variables */
@@ -6171,28 +5965,28 @@ VpPower(Real *y, Real *x, SIGNED_VALUE n)
VpAsgn(y, x, 1);
--n;
- while (n > 0) {
- VpAsgn(w1, x, 1);
- s = 1;
+ while(n > 0) {
+ VpAsgn(w1, x, 1);
+ s = 1;
while (ss = s, (s += s) <= (size_t)n) {
VpMult(w2, w1, w1);
VpAsgn(w1, w2, 1);
}
- n -= (SIGNED_VALUE)ss;
- VpMult(w2, y, w1);
- VpAsgn(y, w2, 1);
+ n -= (SIGNED_VALUE)ss;
+ VpMult(w2, y, w1);
+ VpAsgn(y, w2, 1);
}
- if (sign < 0) {
- VpDivd(w1, w2, VpConstOne, y);
- VpAsgn(y, w1, 1);
+ if(sign < 0) {
+ VpDivd(w1, w2, VpConstOne, y);
+ VpAsgn(y, w1, 1);
}
Exit:
#ifdef BIGDECIMAL_DEBUG
- if (gfDebug) {
- VPrint(stdout, "VpPower y=%\n", y);
- VPrint(stdout, "VpPower x=%\n", x);
- printf(" n=%d\n", n);
+ if(gfDebug) {
+ VPrint(stdout, "VpPower y=%\n", y);
+ VPrint(stdout, "VpPower x=%\n", x);
+ printf(" n=%d\n", n);
}
#endif /* BIGDECIMAL_DEBUG */
VpFree(w2);
@@ -6214,25 +6008,25 @@ VpVarCheck(Real * v)
{
size_t i;
- if (v->MaxPrec == 0) {
- printf("ERROR(VpVarCheck): Illegal Max. Precision(=%"PRIuSIZE")\n",
- v->MaxPrec);
- return 1;
- }
- if (v->Prec == 0 || v->Prec > v->MaxPrec) {
- printf("ERROR(VpVarCheck): Illegal Precision(=%"PRIuSIZE")\n", v->Prec);
- printf(" Max. Prec.=%"PRIuSIZE"\n", v->MaxPrec);
- return 2;
- }
- for (i = 0; i < v->Prec; ++i) {
- if (v->frac[i] >= BASE) {
- printf("ERROR(VpVarCheck): Illegal fraction\n");
- printf(" Frac[%"PRIuSIZE"]=%lu\n", i, v->frac[i]);
- printf(" Prec. =%"PRIuSIZE"\n", v->Prec);
- printf(" Exp. =%"PRIdVALUE"\n", v->exponent);
- printf(" BASE =%lu\n", BASE);
- return 3;
- }
+ if(v->MaxPrec <= 0) {
+ printf("ERROR(VpVarCheck): Illegal Max. Precision(=%"PRIuSIZE")\n",
+ v->MaxPrec);
+ return 1;
+ }
+ if((v->Prec <= 0) ||((v->Prec) >(v->MaxPrec))) {
+ printf("ERROR(VpVarCheck): Illegal Precision(=%"PRIuSIZE")\n", v->Prec);
+ printf(" Max. Prec.=%"PRIuSIZE"\n", v->MaxPrec);
+ return 2;
+ }
+ for(i = 0; i < v->Prec; ++i) {
+ if((v->frac[i] >= BASE)) {
+ printf("ERROR(VpVarCheck): Illegal fraction\n");
+ printf(" Frac[%"PRIuSIZE"]=%lu\n", i, v->frac[i]);
+ printf(" Prec. =%"PRIuSIZE"\n", v->Prec);
+ printf(" Exp. =%"PRIdVALUE"\n", v->exponent);
+ printf(" BASE =%lu\n", BASE);
+ return 3;
+ }
}
return 0;
}
diff --git a/ext/bigdecimal/bigdecimal.gemspec b/ext/bigdecimal/bigdecimal.gemspec
index 676e05bacb..362808c4e3 100644
--- a/ext/bigdecimal/bigdecimal.gemspec
+++ b/ext/bigdecimal/bigdecimal.gemspec
@@ -1,16 +1,15 @@
# -*- ruby -*-
-_VERSION = "1.2.3"
-date = %w$Date:: $[1]
+_VERSION = "1.1.0"
Gem::Specification.new do |s|
s.name = "bigdecimal"
s.version = _VERSION
- s.date = date
+ s.date = "2011-07-30"
s.summary = "Arbitrary-precision decimal floating-point number library."
s.homepage = "http://www.ruby-lang.org"
s.email = "mrkn@mrkn.jp"
s.description = "This library provides arbitrary-precision decimal floating-point number class."
- s.authors = ["Kenta Murata", "Zachary Scott", "Shigeo Kobayashi"]
+ s.authors = ["Kenta Murata", "Shigeo Kobayashi"]
s.require_path = %[.]
s.files = %w[
bigdecimal.gemspec
diff --git a/ext/bigdecimal/bigdecimal.h b/ext/bigdecimal/bigdecimal.h
index 805990d99c..a04d1bbfea 100644
--- a/ext/bigdecimal/bigdecimal.h
+++ b/ext/bigdecimal/bigdecimal.h
@@ -19,37 +19,6 @@
#include "ruby/ruby.h"
#include <float.h>
-#ifndef RB_UNUSED_VAR
-# ifdef __GNUC__
-# define RB_UNUSED_VAR(x) x __attribute__ ((unused))
-# else
-# define RB_UNUSED_VAR(x) x
-# endif
-#endif
-
-#ifndef UNREACHABLE
-# define UNREACHABLE /* unreachable */
-#endif
-
-#undef BDIGIT
-#undef SIZEOF_BDIGITS
-#undef BDIGIT_DBL
-#undef BDIGIT_DBL_SIGNED
-#undef PRI_BDIGIT_PREFIX
-#undef PRI_BDIGIT_DBL_PREFIX
-
-#ifdef HAVE_INT64_T
-# define BDIGIT uint32_t
-# define BDIGIT_DBL uint64_t
-# define BDIGIT_DBL_SIGNED int64_t
-# define SIZEOF_BDIGITS 4
-#else
-# define BDIGIT uint16_t
-# define BDIGIT_DBL uint32_t
-# define BDIGIT_DBL_SIGNED int32_t
-# define SIZEOF_BDIGITS 2
-#endif
-
#if defined(__cplusplus)
extern "C" {
#if 0
@@ -128,7 +97,7 @@ extern VALUE rb_cBigDecimal;
#define VP_EXCEPTION_OVERFLOW ((unsigned short)0x0001) /* 0x0008) */
#define VP_EXCEPTION_ZERODIVIDE ((unsigned short)0x0010)
-/* Following 2 exceptions can't controlled by user */
+/* Following 2 exceptions cann't controlled by user */
#define VP_EXCEPTION_OP ((unsigned short)0x0020)
#define VP_EXCEPTION_MEMORY ((unsigned short)0x0040)
@@ -310,6 +279,7 @@ VP_EXPORT Real *VpOne(void);
#define VpExponent(a) (a->exponent)
#ifdef BIGDECIMAL_DEBUG
int VpVarCheck(Real * v);
+VP_EXPORT int VPrint(FILE *fp,const char *cntl_chr,Real *a);
#endif /* BIGDECIMAL_DEBUG */
#if defined(__cplusplus)
diff --git a/ext/bigdecimal/depend b/ext/bigdecimal/depend
index a68128478c..402cae95dd 100644
--- a/ext/bigdecimal/depend
+++ b/ext/bigdecimal/depend
@@ -1 +1 @@
-bigdecimal.o: bigdecimal.c bigdecimal.h $(HDRS) $(ruby_headers)
+bigdecimal.o: bigdecimal.c bigdecimal.h $(hdrdir)/ruby.h
diff --git a/ext/bigdecimal/lib/bigdecimal/jacobian.rb b/ext/bigdecimal/lib/bigdecimal/jacobian.rb
index eb9b1c9fc5..a416e06832 100644
--- a/ext/bigdecimal/lib/bigdecimal/jacobian.rb
+++ b/ext/bigdecimal/lib/bigdecimal/jacobian.rb
@@ -51,6 +51,7 @@ module Jacobian
dx = fx[i].abs/ratio if isEqual(dx,f.zero,f.zero,f.eps)
dx = f.one/f.ten if isEqual(dx,f.zero,f.zero,f.eps)
until ok>0 do
+ s = f.zero
deriv = []
nRetry += 1
if nRetry > 100
diff --git a/ext/bigdecimal/lib/bigdecimal/math.rb b/ext/bigdecimal/lib/bigdecimal/math.rb
index 907d3b3829..16cf9c8731 100644
--- a/ext/bigdecimal/lib/bigdecimal/math.rb
+++ b/ext/bigdecimal/lib/bigdecimal/math.rb
@@ -20,40 +20,30 @@ require 'bigdecimal'
#
# Example:
#
+# require "bigdecimal"
# require "bigdecimal/math"
#
# include BigMath
#
# a = BigDecimal((PI(100)/2).to_s)
-# puts sin(a,100) # => 0.10000000000000000000......E1
+# puts sin(a,100) # -> 0.10000000000000000000......E1
#
module BigMath
module_function
- # call-seq:
- # sqrt(decimal, numeric) -> BigDecimal
+ # Computes the square root of x to the specified number of digits of
+ # precision.
#
- # Computes the square root of +decimal+ to the specified number of digits of
- # precision, +numeric+.
+ # BigDecimal.new('2').sqrt(16).to_s
+ # -> "0.14142135623730950488016887242096975E1"
#
- # BigMath::sqrt(BigDecimal.new('2'), 16).to_s
- # #=> "0.14142135623730950488016887242096975E1"
- #
- def sqrt(x, prec)
+ def sqrt(x,prec)
x.sqrt(prec)
end
- # call-seq:
- # sin(decimal, numeric) -> BigDecimal
- #
- # Computes the sine of +decimal+ to the specified number of digits of
- # precision, +numeric+.
- #
- # If +decimal+ is Infinity or NaN, returns NaN.
- #
- # BigMath::sin(BigMath::PI(5)/4, 5).to_s
- # #=> "0.70710678118654752440082036563292800375E0"
+ # Computes the sine of x to the specified number of digits of precision.
#
+ # If x is infinite or NaN, returns NaN.
def sin(x, prec)
raise ArgumentError, "Zero or negative precision for sin" if prec <= 0
return BigDecimal("NaN") if x.infinite? || x.nan?
@@ -87,17 +77,9 @@ module BigMath
neg ? -y : y
end
- # call-seq:
- # cos(decimal, numeric) -> BigDecimal
- #
- # Computes the cosine of +decimal+ to the specified number of digits of
- # precision, +numeric+.
- #
- # If +decimal+ is Infinity or NaN, returns NaN.
- #
- # BigMath::cos(BigMath::PI(4), 16).to_s
- # #=> "-0.999999999999999999999999999999856613163740061349E0"
+ # Computes the cosine of x to the specified number of digits of precision.
#
+ # If x is infinite or NaN, returns NaN.
def cos(x, prec)
raise ArgumentError, "Zero or negative precision for cos" if prec <= 0
return BigDecimal("NaN") if x.infinite? || x.nan?
@@ -131,17 +113,9 @@ module BigMath
y
end
- # call-seq:
- # atan(decimal, numeric) -> BigDecimal
- #
- # Computes the arctangent of +decimal+ to the specified number of digits of
- # precision, +numeric+.
- #
- # If +decimal+ is NaN, returns NaN.
- #
- # BigMath::atan(BigDecimal.new('-1'), 16).to_s
- # #=> "-0.785398163397448309615660845819878471907514682065E0"
+ # Computes the arctangent of x to the specified number of digits of precision.
#
+ # If x is NaN, returns NaN.
def atan(x, prec)
raise ArgumentError, "Zero or negative precision for atan" if prec <= 0
return BigDecimal("NaN") if x.nan?
@@ -170,15 +144,7 @@ module BigMath
y
end
- # call-seq:
- # PI(numeric) -> BigDecimal
- #
- # Computes the value of pi to the specified number of digits of precision,
- # +numeric+.
- #
- # BigMath::PI(10).to_s
- # #=> "0.3141592653589793238462643388813853786957412E1"
- #
+ # Computes the value of pi to the specified number of digits of precision.
def PI(prec)
raise ArgumentError, "Zero or negative argument for PI" if prec <= 0
n = prec + BigDecimal.double_fig
@@ -193,6 +159,7 @@ module BigMath
d = one
k = one
+ w = one
t = BigDecimal("-80")
while d.nonzero? && ((m = n - (pi.exponent - d.exponent).abs) > 0)
m = BigDecimal.double_fig if m < BigDecimal.double_fig
@@ -204,6 +171,7 @@ module BigMath
d = one
k = one
+ w = one
t = BigDecimal("956")
while d.nonzero? && ((m = n - (pi.exponent - d.exponent).abs) > 0)
m = BigDecimal.double_fig if m < BigDecimal.double_fig
@@ -215,17 +183,23 @@ module BigMath
pi
end
- # call-seq:
- # E(numeric) -> BigDecimal
- #
# Computes e (the base of natural logarithms) to the specified number of
- # digits of precision, +numeric+.
- #
- # BigMath::E(10).to_s
- # #=> "0.271828182845904523536028752390026306410273E1"
- #
+ # digits of precision.
def E(prec)
raise ArgumentError, "Zero or negative precision for E" if prec <= 0
- BigMath.exp(1, prec)
+ n = prec + BigDecimal.double_fig
+ one = BigDecimal("1")
+ y = one
+ d = y
+ z = one
+ i = 0
+ while d.nonzero? && ((m = n - (y.exponent - d.exponent).abs) > 0)
+ m = BigDecimal.double_fig if m < BigDecimal.double_fig
+ i += 1
+ z *= i
+ d = one.div(z,m)
+ y += d
+ end
+ y
end
end
diff --git a/ext/bigdecimal/lib/bigdecimal/newton.rb b/ext/bigdecimal/lib/bigdecimal/newton.rb
index db1a5ad99e..1110652801 100644
--- a/ext/bigdecimal/lib/bigdecimal/newton.rb
+++ b/ext/bigdecimal/lib/bigdecimal/newton.rb
@@ -30,7 +30,7 @@ module Newton
include Jacobian
module_function
- def norm(fv,zero=0.0) # :nodoc:
+ def norm(fv,zero=0.0)
s = zero
n = fv.size
for i in 0...n do
@@ -39,7 +39,6 @@ module Newton
s
end
- # See also Newton
def nlsolve(f,x)
nRetry = 0
n = x.size
diff --git a/ext/bigdecimal/lib/bigdecimal/util.rb b/ext/bigdecimal/lib/bigdecimal/util.rb
index 82c82c8e1e..b27e64c511 100644
--- a/ext/bigdecimal/lib/bigdecimal/util.rb
+++ b/ext/bigdecimal/lib/bigdecimal/util.rb
@@ -1,7 +1,3 @@
-# BigDecimal extends the native Integer class to provide the #to_d method.
-#
-# When you require the BigDecimal library in your application, this methodwill
-# be available on Integer objects.
class Integer < Numeric
# call-seq:
# int.to_d -> bigdecimal
@@ -19,10 +15,6 @@ class Integer < Numeric
end
end
-# BigDecimal extends the native Float class to provide the #to_d method.
-#
-# When you require BigDecimal in your application, this method will be
-# available on Float objects.
class Float < Numeric
# call-seq:
# flt.to_d -> bigdecimal
@@ -36,14 +28,10 @@ class Float < Numeric
# # => #<BigDecimal:1dc69e0,'0.5E0',9(18)>
#
def to_d(precision=nil)
- BigDecimal(self, precision || Float::DIG)
+ BigDecimal(self, precision || Float::DIG+1)
end
end
-# BigDecimal extends the native String class to provide the #to_d method.
-#
-# When you require BigDecimal in your application, this method will be
-# available on String objects.
class String
# call-seq:
# string.to_d -> bigdecimal
@@ -61,11 +49,6 @@ class String
end
end
-# BigDecimal extends the native Numeric class to provide the #to_digits and
-# #to_d methods.
-#
-# When you require BigDecimal in your application, this method will be
-# available on BigDecimal objects.
class BigDecimal < Numeric
# call-seq:
# a.to_digits -> string
@@ -98,23 +81,18 @@ class BigDecimal < Numeric
end
end
-# BigDecimal extends the native Rational class to provide the #to_d method.
-#
-# When you require BigDecimal in your application, this method will be
-# available on Rational objects.
class Rational < Numeric
# call-seq:
- # r.to_d(precision) -> bigdecimal
+ # r.to_d -> bigdecimal
+ # r.to_d(sig) -> bigdecimal
#
- # Converts a Rational to a BigDecimal.
- #
- # The required +precision+ parameter is used to determine the amount of
- # significant digits for the result. See BigDecimal#div for more information,
- # as it is used along with the #denominator and the +precision+ for
- # parameters.
+ # Converts a Rational to a BigDecimal. Takes an optional parameter +sig+ to
+ # limit the amount of significant digits.
#
# r = (22/7.0).to_r
# # => (7077085128725065/2251799813685248)
+ # r.to_d
+ # # => #<BigDecimal:1a52bd8,'0.3142857142 8571427937 0154144999 105E1',45(63)>
# r.to_d(3)
# # => #<BigDecimal:1a44d08,'0.314E1',18(36)>
def to_d(precision)
diff --git a/ext/bigdecimal/sample/linear.rb b/ext/bigdecimal/sample/linear.rb
index 93d558b539..88a62ffa71 100644
--- a/ext/bigdecimal/sample/linear.rb
+++ b/ext/bigdecimal/sample/linear.rb
@@ -10,7 +10,6 @@
# ruby linear.rb [input file solved]
#
-# :stopdoc:
require "bigdecimal"
require "bigdecimal/ludcmp"
diff --git a/ext/bigdecimal/sample/nlsolve.rb b/ext/bigdecimal/sample/nlsolve.rb
index 692a5023cc..7f729e6aaa 100644
--- a/ext/bigdecimal/sample/nlsolve.rb
+++ b/ext/bigdecimal/sample/nlsolve.rb
@@ -9,7 +9,7 @@ require "bigdecimal"
require "bigdecimal/newton"
include Newton
-class Function # :nodoc: all
+class Function
def initialize()
@zero = BigDecimal::new("0.0")
@one = BigDecimal::new("1.0")
diff --git a/ext/coverage/coverage.c b/ext/coverage/coverage.c
index 93cb2a5c9e..d2cdb357e0 100644
--- a/ext/coverage/coverage.c
+++ b/ext/coverage/coverage.c
@@ -25,7 +25,7 @@ rb_coverage_start(VALUE klass)
if (!RTEST(rb_get_coverages())) {
if (rb_coverages == Qundef) {
rb_coverages = rb_hash_new();
- rb_obj_hide(rb_coverages);
+ RBASIC(rb_coverages)->klass = 0;
}
rb_set_coverages(rb_coverages);
}
diff --git a/ext/coverage/depend b/ext/coverage/depend
deleted file mode 100644
index 1227a5c9ae..0000000000
--- a/ext/coverage/depend
+++ /dev/null
@@ -1,11 +0,0 @@
-$(OBJS): $(HDRS) $(ruby_headers) \
- $(top_srcdir)/vm_core.h \
- $(top_srcdir)/node.h \
- $(top_srcdir)/vm_debug.h \
- $(top_srcdir)/vm_opts.h \
- {$(VPATH)}id.h \
- $(top_srcdir)/method.h \
- $(top_srcdir)/ruby_atomic.h \
- $(top_srcdir)/thread_pthread.h \
- $(top_srcdir)/internal.h \
- $(top_srcdir)/thread_native.h
diff --git a/ext/coverage/extconf.rb b/ext/coverage/extconf.rb
index 769f85b6ef..cf10ca89c5 100644
--- a/ext/coverage/extconf.rb
+++ b/ext/coverage/extconf.rb
@@ -1,4 +1,3 @@
require 'mkmf'
-$VPATH << '$(topdir)' << '$(top_srcdir)'
$INCFLAGS << " -I$(topdir) -I$(top_srcdir)"
create_makefile('coverage')
diff --git a/ext/curses/curses.c b/ext/curses/curses.c
new file mode 100644
index 0000000000..175e32cff9
--- /dev/null
+++ b/ext/curses/curses.c
@@ -0,0 +1,4329 @@
+/* -*- C -*-
+ * $Id$
+ *
+ * ext/curses/curses.c
+ *
+ * by MAEDA Shugo (ender@pic-internet.or.jp)
+ * modified by Yukihiro Matsumoto (matz@netlab.co.jp),
+ * Toki Yoshinori,
+ * Hitoshi Takahashi,
+ * and Takaaki Tateishi (ttate@kt.jaist.ac.jp)
+ *
+ * maintainers:
+ * - Takaaki Tateishi (ttate@kt.jaist.ac.jp)
+ *
+ * doumentation:
+ * - Vincent Batts (vbatts@hashbangbash.com)
+ */
+
+#include "ruby.h"
+#include "ruby/io.h"
+#include "ruby/thread.h"
+
+#if defined(HAVE_NCURSES_H)
+# include <ncurses.h>
+#elif defined(HAVE_NCURSES_CURSES_H)
+# include <ncurses/curses.h>
+#elif defined(HAVE_CURSES_COLR_CURSES_H)
+# ifdef HAVE_STDARG_PROTOTYPES
+# include <stdarg.h>
+# else
+# include <varargs.h>
+# endif
+# include <curses_colr/curses.h>
+#else
+# include <curses.h>
+# if defined(__bsdi__) || defined(__NetBSD__) || defined(__APPLE__)
+# if !defined(_maxx)
+# define _maxx maxx
+# endif
+# if !defined(_maxy)
+# define _maxy maxy
+# endif
+# if !defined(_begx)
+# define _begx begx
+# endif
+# if !defined(_begy)
+# define _begy begy
+# endif
+# endif
+#endif
+
+#ifdef HAVE_INIT_COLOR
+# define USE_COLOR 1
+#endif
+
+/* supports only ncurses mouse routines */
+#ifdef NCURSES_MOUSE_VERSION
+# define USE_MOUSE 1
+#endif
+
+#define NUM2CH NUM2CHR
+#define CH2FIX CHR2FIX
+
+static VALUE mCurses;
+static VALUE mKey;
+static VALUE cWindow;
+static VALUE cPad;
+#ifdef USE_MOUSE
+static VALUE cMouseEvent;
+#endif
+
+static VALUE rb_stdscr;
+
+struct windata {
+ WINDOW *window;
+};
+
+static VALUE window_attroff(VALUE obj, VALUE attrs);
+static VALUE window_attron(VALUE obj, VALUE attrs);
+static VALUE window_attrset(VALUE obj, VALUE attrs);
+
+static void
+no_window(void)
+{
+ rb_raise(rb_eRuntimeError, "already closed window");
+}
+
+#define GetWINDOW(obj, winp) do {\
+ if (!OBJ_TAINTED(obj) && rb_safe_level() >= 4)\
+ rb_raise(rb_eSecurityError, "Insecure: operation on untainted window");\
+ TypedData_Get_Struct((obj), struct windata, &windata_type, (winp));\
+ if ((winp)->window == 0) no_window();\
+} while (0)
+
+static void
+window_free(void *p)
+{
+ struct windata *winp = p;
+ if (winp->window && winp->window != stdscr) delwin(winp->window);
+ winp->window = 0;
+ xfree(winp);
+}
+
+static size_t
+window_memsize(const void *p)
+{
+ const struct windata *winp = p;
+ size_t size = sizeof(*winp);
+ if (!winp) return 0;
+ if (winp->window && winp->window != stdscr) size += sizeof(winp->window);
+ return size;
+}
+
+static const rb_data_type_t windata_type = {
+ "windata",
+ {0, window_free, window_memsize,}
+};
+
+static VALUE
+prep_window(VALUE class, WINDOW *window)
+{
+ VALUE obj;
+ struct windata *winp;
+
+ if (window == NULL) {
+ rb_raise(rb_eRuntimeError, "failed to create window");
+ }
+
+ obj = rb_obj_alloc(class);
+ TypedData_Get_Struct(obj, struct windata, &windata_type, winp);
+ winp->window = window;
+
+ return obj;
+}
+
+/*-------------------------- module Curses --------------------------*/
+
+/*
+ * Document-method: Curses.init_screen
+ *
+ * Initialize a standard screen
+ *
+ * see also Curses.stdscr
+ */
+static VALUE
+curses_init_screen(void)
+{
+ rb_secure(4);
+ if (rb_stdscr) return rb_stdscr;
+ initscr();
+ if (stdscr == 0) {
+ rb_raise(rb_eRuntimeError, "can't initialize curses");
+ }
+ clear();
+ rb_stdscr = prep_window(cWindow, stdscr);
+ return rb_stdscr;
+}
+
+/*
+ * Document-method: Curses.stdscr
+ *
+ * The Standard Screen.
+ *
+ * Upon initializing curses, a default window called stdscr,
+ * which is the size of the terminal screen, is created.
+ *
+ * Many curses functions use this window.
+ */
+#define curses_stdscr curses_init_screen
+
+/*
+ * Document-method: Curses.close_screen
+ *
+ * A program should always call Curses.close_screen before exiting or
+ * escaping from curses mode temporarily. This routine
+ * restores tty modes, moves the cursor to the lower
+ * left-hand corner of the screen and resets the terminal
+ * into the proper non-visual mode.
+ *
+ * Calling Curses.refresh or Curses.doupdate after a temporary
+ * escape causes the program to resume visual mode.
+ *
+ */
+static VALUE
+curses_close_screen(void)
+{
+ curses_stdscr();
+#ifdef HAVE_ISENDWIN
+ if (!isendwin())
+#endif
+ endwin();
+ rb_stdscr = 0;
+ return Qnil;
+}
+
+/*
+ * This is no runtime method,
+ * but a function called before the proc ends
+ *
+ * Similar to Curses.close_screen, except that it also
+ * garbage collects/unregisters the Curses.stdscr
+ */
+static void
+curses_finalize(VALUE dummy)
+{
+ if (stdscr
+#ifdef HAVE_ISENDWIN
+ && !isendwin()
+#endif
+ )
+ endwin();
+ rb_stdscr = 0;
+ rb_gc_unregister_address(&rb_stdscr);
+}
+
+#ifdef HAVE_ISENDWIN
+/*
+ * Document-method: Curses.closed?
+ *
+ * Returns +true+ if the window/screen has been closed,
+ * without any subsequent Curses.refresh calls,
+ * returns +false+ otherwise.
+ */
+static VALUE
+curses_closed(void)
+{
+ curses_stdscr();
+ if (isendwin()) {
+ return Qtrue;
+ }
+ return Qfalse;
+}
+#else
+#define curses_closed rb_f_notimplement
+#endif
+
+/*
+ * Document-method: Curses.clear
+ *
+ * Clears every position on the screen completely,
+ * so that a subsequent call by Curses.refresh for the screen/window
+ * will be repainted from scratch.
+ */
+static VALUE
+curses_clear(VALUE obj)
+{
+ curses_stdscr();
+ wclear(stdscr);
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses.clrtoeol
+ *
+ * Clears to the end of line, that the cursor is currently on.
+ */
+static VALUE
+curses_clrtoeol(void)
+{
+ curses_stdscr();
+ clrtoeol();
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses.refresh
+ *
+ * Refreshes the windows and lines.
+ *
+ */
+static VALUE
+curses_refresh(VALUE obj)
+{
+ curses_stdscr();
+ refresh();
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses.doupdate
+ *
+ * Refreshes the windows and lines.
+ *
+ * Curses.doupdate allows multiple updates with
+ * more efficiency than Curses.refresh alone.
+ */
+static VALUE
+curses_doupdate(VALUE obj)
+{
+ curses_stdscr();
+#ifdef HAVE_DOUPDATE
+ doupdate();
+#else
+ refresh();
+#endif
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses.echo
+ *
+ * Enables characters typed by the user
+ * to be echoed by Curses.getch as they are typed.
+ */
+static VALUE
+curses_echo(VALUE obj)
+{
+ curses_stdscr();
+ echo();
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses.noecho
+ *
+ * Disables characters typed by the user
+ * to be echoed by Curses.getch as they are typed.
+ */
+static VALUE
+curses_noecho(VALUE obj)
+{
+ curses_stdscr();
+ noecho();
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses.raw
+ *
+ * Put the terminal into raw mode.
+ *
+ * Raw mode is similar to Curses.cbreak mode, in that characters typed
+ * are immediately passed through to the user program.
+ *
+ * The differences are that in raw mode, the interrupt, quit,
+ * suspend, and flow control characters are all passed through
+ * uninterpreted, instead of generating a signal. The behavior
+ * of the BREAK key depends on other bits in the tty driver
+ * that are not set by curses.
+ */
+static VALUE
+curses_raw(VALUE obj)
+{
+ curses_stdscr();
+ raw();
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses.noraw
+ *
+ * Put the terminal out of raw mode.
+ *
+ * see Curses.raw for more detail
+ */
+static VALUE
+curses_noraw(VALUE obj)
+{
+ curses_stdscr();
+ noraw();
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses.cbreak
+ *
+ * Put the terminal into cbreak mode.
+ *
+ * Normally, the tty driver buffers typed characters until
+ * a newline or carriage return is typed. The Curses.cbreak
+ * routine disables line buffering and erase/kill
+ * character-processing (interrupt and flow control characters
+ * are unaffected), making characters typed by the user
+ * immediately available to the program.
+ *
+ * The Curses.nocbreak routine returns the terminal to normal (cooked) mode.
+ *
+ * Initially the terminal may or may not be in cbreak mode,
+ * as the mode is inherited; therefore, a program should
+ * call Curses.cbreak or Curses.nocbreak explicitly.
+ * Most interactive programs using curses set the cbreak mode.
+ * Note that Curses.cbreak overrides Curses.raw.
+ *
+ * see also Curses.raw
+ */
+static VALUE
+curses_cbreak(VALUE obj)
+{
+ curses_stdscr();
+ cbreak();
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses.nocbreak
+ *
+ * Put the terminal into normal mode (out of cbreak mode).
+ *
+ * See Curses.cbreak for more detail.
+ */
+static VALUE
+curses_nocbreak(VALUE obj)
+{
+ curses_stdscr();
+ nocbreak();
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses.nl
+ *
+ * Enable the underlying display device to translate
+ * the return key into newline on input, and whether it
+ * translates newline into return and line-feed on output
+ * (in either case, the call Curses.addch('\n') does the
+ * equivalent of return and line feed on the virtual screen).
+ *
+ * Initially, these translations do occur. If you disable
+ * them using Curses.nonl, curses will be able to make better use
+ * of the line-feed capability, resulting in faster cursor
+ * motion. Also, curses will then be able to detect the return key.
+ */
+static VALUE
+curses_nl(VALUE obj)
+{
+ curses_stdscr();
+ nl();
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses.nl
+ *
+ * Disable the underlying display device to translate
+ * the return key into newline on input
+ *
+ * See Curses.nl for more detail
+ */
+static VALUE
+curses_nonl(VALUE obj)
+{
+ curses_stdscr();
+ nonl();
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses.beep
+ *
+ * Sounds an audible alarm on the terminal, if possible;
+ * otherwise it flashes the screen (visual bell).
+ *
+ * see also Curses.flash
+ */
+static VALUE
+curses_beep(VALUE obj)
+{
+#ifdef HAVE_BEEP
+ curses_stdscr();
+ beep();
+#endif
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses.flash
+ *
+ * Flashs the screen, for visual alarm on the terminal, if possible;
+ * otherwise it sounds the alert.
+ *
+ * see also Curses.beep
+ */
+static VALUE
+curses_flash(VALUE obj)
+{
+#ifdef HAVE_FLASH
+ curses_stdscr();
+ flash();
+#endif
+ return Qnil;
+}
+
+static int
+curses_char(VALUE c)
+{
+ if (FIXNUM_P(c)) {
+ return NUM2INT(c);
+ }
+ else {
+ int cc;
+
+ StringValue(c);
+ if (RSTRING_LEN(c) == 0 || RSTRING_LEN(c) > 1) {
+ rb_raise(rb_eArgError, "string not corresponding a character");
+ }
+ cc = RSTRING_PTR(c)[0];
+ if (cc > 0x7f) {
+ rb_raise(rb_eArgError, "no multibyte string supported (yet)");
+ }
+ return cc;
+ }
+}
+
+#ifdef HAVE_UNGETCH
+/*
+ * Document-method: Curses.ungetch
+ * call-seq: ungetch(ch)
+ *
+ * Places +ch+ back onto the input queue to be returned by
+ * the next call to Curses.getch.
+ *
+ * There is just one input queue for all windows.
+ */
+static VALUE
+curses_ungetch(VALUE obj, VALUE ch)
+{
+ int c = curses_char(ch);
+ curses_stdscr();
+ ungetch(c);
+ return Qnil;
+}
+#else
+#define curses_ungetch rb_f_notimplement
+#endif
+
+/*
+ * Document-method: Curses.setpos
+ * call-seq: setpos(y, x)
+ *
+ * A setter for the position of the cursor,
+ * using coordinates +x+ and +y+
+ *
+ */
+static VALUE
+curses_setpos(VALUE obj, VALUE y, VALUE x)
+{
+ curses_stdscr();
+ move(NUM2INT(y), NUM2INT(x));
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses.standout
+ *
+ * Enables the best highlighting mode of the terminal.
+ *
+ * This is equivalent to Curses:Window.attron(A_STANDOUT)
+ *
+ * see also Curses::Window.attrset additional information
+ */
+static VALUE
+curses_standout(VALUE obj)
+{
+ curses_stdscr();
+ standout();
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses.standend
+ *
+ * Enables the Normal display (no highlight)
+ *
+ * This is equivalent to Curses.attron(A_NORMAL)
+ *
+ * see also Curses::Window.attrset for additional information.
+ */
+static VALUE
+curses_standend(VALUE obj)
+{
+ curses_stdscr();
+ standend();
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses.inch
+ *
+ * Returns the character at the current position.
+ */
+static VALUE
+curses_inch(VALUE obj)
+{
+ curses_stdscr();
+ return CH2FIX(inch());
+}
+
+/*
+ * Document-method: Curses.addch
+ * call-seq: addch(ch)
+ *
+ * Add a character +ch+, with attributes, then advance the cursor.
+ *
+ * see also the system manual for curs_addch(3)
+ */
+static VALUE
+curses_addch(VALUE obj, VALUE ch)
+{
+ curses_stdscr();
+ addch(NUM2CH(ch));
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses.insch
+ * call-seq: insch(ch)
+ *
+ * Insert a character +ch+, before the cursor.
+ *
+ */
+static VALUE
+curses_insch(VALUE obj, VALUE ch)
+{
+ curses_stdscr();
+ insch(NUM2CH(ch));
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses.addstr
+ * call-seq: addstr(str)
+ *
+ * add a string of characters +str+, to the window and advance cursor
+ *
+ */
+static VALUE
+curses_addstr(VALUE obj, VALUE str)
+{
+ StringValue(str);
+ str = rb_str_export_locale(str);
+ curses_stdscr();
+ if (!NIL_P(str)) {
+ addstr(StringValueCStr(str));
+ }
+ return Qnil;
+}
+
+static void *
+getch_func(void *arg)
+{
+ int *ip = (int *)arg;
+ *ip = getch();
+ return 0;
+}
+
+/*
+ * Document-method: Curses.getch
+ *
+ * Read and returns a character from the window.
+ *
+ * See Curses::Key to all the function KEY_* available
+ *
+ */
+static VALUE
+curses_getch(VALUE obj)
+{
+ int c;
+
+ curses_stdscr();
+ rb_thread_call_without_gvl(getch_func, &c, RUBY_UBF_IO, 0);
+ if (c == EOF) return Qnil;
+ if (rb_isprint(c)) {
+ char ch = (char)c;
+
+ return rb_locale_str_new(&ch, 1);
+ }
+ return UINT2NUM(c);
+}
+
+/* This should be big enough.. I hope */
+#define GETSTR_BUF_SIZE 1024
+
+static void *
+getstr_func(void *arg)
+{
+ char *rtn = (char *)arg;
+#if defined(HAVE_GETNSTR)
+ getnstr(rtn,GETSTR_BUF_SIZE-1);
+#else
+ getstr(rtn);
+#endif
+ return 0;
+}
+
+/*
+ * Document-method: Curses.getstr
+ *
+ * This is equivalent to a series f Curses::Window.getch calls
+ *
+ */
+static VALUE
+curses_getstr(VALUE obj)
+{
+ char rtn[GETSTR_BUF_SIZE];
+
+ curses_stdscr();
+ rb_thread_call_without_gvl(getstr_func, rtn, RUBY_UBF_IO, 0);
+ return rb_locale_str_new_cstr(rtn);
+}
+
+/*
+ * Document-method: Curses.delch
+ *
+ * Delete the character under the cursor
+ *
+ */
+static VALUE
+curses_delch(VALUE obj)
+{
+ curses_stdscr();
+ delch();
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses.deleteln
+ *
+ * Delete the line under the cursor.
+ *
+ */
+static VALUE
+curses_deleteln(VALUE obj)
+{
+ curses_stdscr();
+#if defined(HAVE_DELETELN) || defined(deleteln)
+ deleteln();
+#endif
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses.insertln
+ *
+ * Inserts a line above the cursor, and the bottom line is lost
+ *
+ */
+static VALUE
+curses_insertln(VALUE obj)
+{
+ curses_stdscr();
+#if defined(HAVE_INSERTLN) || defined(insertln)
+ insertln();
+#endif
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses.keyname
+ * call-seq: keyname(c)
+ *
+ * Returns the character string corresponding to key +c+
+ */
+static VALUE
+curses_keyname(VALUE obj, VALUE c)
+{
+#ifdef HAVE_KEYNAME
+ int cc = curses_char(c);
+ const char *name;
+
+ curses_stdscr();
+ name = keyname(cc);
+ if (name) {
+ return rb_str_new_cstr(name);
+ }
+ else {
+ return Qnil;
+ }
+#else
+ return Qnil;
+#endif
+}
+
+/*
+ * Document-method: Curses.lines
+ *
+ * Returns the number of lines on the screen
+ */
+static VALUE
+curses_lines(void)
+{
+ return INT2FIX(LINES);
+}
+
+/*
+ * Document-method: Curses.cols
+ *
+ * Returns the number of columns on the screen
+ */
+static VALUE
+curses_cols(void)
+{
+ return INT2FIX(COLS);
+}
+
+/*
+ * Document-method: Curses.curs_set
+ * call-seq: curs_set(visibility)
+ *
+ * Sets Cursor Visibility.
+ * 0: invisible
+ * 1: visible
+ * 2: very visible
+ */
+static VALUE
+curses_curs_set(VALUE obj, VALUE visibility)
+{
+#ifdef HAVE_CURS_SET
+ int n;
+ curses_stdscr();
+ return (n = curs_set(NUM2INT(visibility)) != ERR) ? INT2FIX(n) : Qnil;
+#else
+ return Qnil;
+#endif
+}
+
+/*
+ * Document-method: Curses.scrl
+ * call-seq: scrl(num)
+ *
+ * Scrolls the current window Fixnum +num+ lines.
+ * The current cursor position is not changed.
+ *
+ * For positive +num+, it scrolls up.
+ *
+ * For negative +num+, it scrolls down.
+ *
+ */
+static VALUE
+curses_scrl(VALUE obj, VALUE n)
+{
+ /* may have to raise exception on ERR */
+#ifdef HAVE_SCRL
+ curses_stdscr();
+ return (scrl(NUM2INT(n)) == OK) ? Qtrue : Qfalse;
+#else
+ return Qfalse;
+#endif
+}
+
+/*
+ * Document-method: Curses.setscrreg
+ *
+ * call-seq:
+ * setscrreg(top, bottom)
+ *
+ * Set a software scrolling region in a window.
+ * +top+ and +bottom+ are lines numbers of the margin.
+ *
+ * If this option and Curses.scrollok are enabled, an attempt to move off
+ * the bottom margin line causes all lines in the scrolling region
+ * to scroll one line in the direction of the first line.
+ * Only the text of the window is scrolled.
+ *
+ */
+static VALUE
+curses_setscrreg(VALUE obj, VALUE top, VALUE bottom)
+{
+ /* may have to raise exception on ERR */
+#ifdef HAVE_SETSCRREG
+ curses_stdscr();
+ return (setscrreg(NUM2INT(top), NUM2INT(bottom)) == OK) ? Qtrue : Qfalse;
+#else
+ return Qfalse;
+#endif
+}
+
+/*
+ * Document-method: Curses.attroff
+ * call-seq: attroff(attrs)
+ *
+ * Turns on the named attributes +attrs+ without affecting any others.
+ *
+ * See also Curses::Window.attrset for additional information.
+ */
+static VALUE
+curses_attroff(VALUE obj, VALUE attrs)
+{
+ curses_stdscr();
+ return window_attroff(rb_stdscr,attrs);
+ /* return INT2FIX(attroff(NUM2INT(attrs))); */
+}
+
+/*
+ * Document-method: Curses.attron
+ * call-seq: attron(attrs)
+ *
+ * Turns off the named attributes +attrs+
+ * without turning any other attributes on or off.
+ *
+ * See also Curses::Window.attrset for additional information.
+ */
+static VALUE
+curses_attron(VALUE obj, VALUE attrs)
+{
+ curses_stdscr();
+ return window_attron(rb_stdscr,attrs);
+ /* return INT2FIX(attroff(NUM2INT(attrs))); */
+}
+
+/*
+ * Document-method: Curses.attrset
+ * call-seq: attrset(attrs)
+ *
+ * Sets the current attributes of the given window to +attrs+.
+ *
+ * see also Curses::Window.attrset
+ *
+ */
+static VALUE
+curses_attrset(VALUE obj, VALUE attrs)
+{
+ curses_stdscr();
+ return window_attrset(rb_stdscr,attrs);
+ /* return INT2FIX(attroff(NUM2INT(attrs))); */
+}
+
+/*
+ * Document-method: Curses.bkgdset
+ * call-seq: bkgdset(ch)
+ *
+ * Manipulate the background of the named window
+ * with character Integer +ch+
+ *
+ * The background becomes a property of the character
+ * and moves with the character through any scrolling
+ * and insert/delete line/character operations.
+ *
+ * see also the system manual for curs_bkgd(3)
+ */
+static VALUE
+curses_bkgdset(VALUE obj, VALUE ch)
+{
+#ifdef HAVE_BKGDSET
+ curses_stdscr();
+ bkgdset(NUM2CH(ch));
+#endif
+ return Qnil;
+}
+
+/*
+ * call-seq: bkgd(ch)
+ *
+ * Window background manipulation routines.
+ *
+ * Set the background property of the current
+ * and then apply the character Integer +ch+ setting
+ * to every character position in that window.
+ *
+ * see also the system manual for curs_bkgd(3)
+ */
+static VALUE
+curses_bkgd(VALUE obj, VALUE ch)
+{
+#ifdef HAVE_BKGD
+ curses_stdscr();
+ return (bkgd(NUM2CH(ch)) == OK) ? Qtrue : Qfalse;
+#else
+ return Qfalse;
+#endif
+}
+
+#if defined(HAVE_USE_DEFAULT_COLORS)
+/*
+ * tells the curses library to use terminal's default colors.
+ *
+ * see also the system manual for default_colors(3)
+ */
+static VALUE
+curses_use_default_colors(VALUE obj)
+{
+ curses_stdscr();
+ use_default_colors();
+ return Qnil;
+}
+#else
+#define curses_use_default_colors rb_f_notimplement
+#endif
+
+#if defined(HAVE_TABSIZE)
+/*
+ * Document-method: Curses.TABSIZE=
+ * call-seq: TABSIZE=(value)
+ *
+ * Sets the TABSIZE to Integer +value+
+ */
+static VALUE
+curses_tabsize_set(VALUE obj, VALUE val)
+{
+ TABSIZE = NUM2INT(val);
+ return INT2NUM(TABSIZE);
+}
+#else
+#define curses_tabsize_set rb_f_notimplement
+#endif
+
+#if defined(HAVE_TABSIZE)
+/*
+ * Returns the number of positions in a tab.
+ */
+static VALUE
+curses_tabsize_get(VALUE ojb)
+{
+ return INT2NUM(TABSIZE);
+}
+#else
+#define curses_tabsize_get rb_f_notimplement
+#endif
+
+#if defined(HAVE_ESCDELAY)
+/*
+ * call-seq: Curses.ESCDELAY=(value)
+ *
+ * Sets the ESCDELAY to Integer +value+
+ */
+static VALUE
+curses_escdelay_set(VALUE obj, VALUE val)
+{
+ ESCDELAY = NUM2INT(val);
+ return INT2NUM(ESCDELAY);
+}
+#else
+#define curses_escdelay_set rb_f_notimplement
+#endif
+
+#if defined(HAVE_ESCDELAY)
+/*
+ * Returns the total time, in milliseconds, for which
+ * curses will await a character sequence, e.g., a function key
+ */
+static VALUE
+curses_escdelay_get(VALUE obj)
+{
+ return INT2NUM(ESCDELAY);
+}
+#else
+#define curses_escdelay_get rb_f_notimplement
+#endif
+
+/*
+ * Document-method: Curses.resize
+ * call-seq: resize(lines, cols)
+ *
+ * alias for Curses.resizeterm
+ *
+ */
+
+/*
+ * Document-method: Curses.resizeterm
+ * call-seq: resizeterm(lines, cols)
+ *
+ * Resize the current term to Fixnum +lines+ and Fixnum +cols+
+ *
+ */
+static VALUE
+curses_resizeterm(VALUE obj, VALUE lin, VALUE col)
+{
+#if defined(HAVE_RESIZETERM)
+ curses_stdscr();
+ return (resizeterm(NUM2INT(lin),NUM2INT(col)) == OK) ? Qtrue : Qfalse;
+#else
+ return Qnil;
+#endif
+}
+
+#ifdef USE_COLOR
+/*
+ * Document-method: Curses.start_color
+ *
+ * Initializes the color attributes, for terminals that support it.
+ *
+ * This must be called, in order to use color attributes.
+ * It is good practice to call it just after Curses.init_screen
+ */
+static VALUE
+curses_start_color(VALUE obj)
+{
+ /* may have to raise exception on ERR */
+ curses_stdscr();
+ return (start_color() == OK) ? Qtrue : Qfalse;
+}
+
+/*
+ * Document-method: Curses.init_pair
+ * call-seq: init_pair(pair, f, b)
+ *
+ * Changes the definition of a color-pair.
+ *
+ * It takes three arguments: the number of the color-pair to be changed +pair+,
+ * the foreground color number +f+, and the background color number +b+.
+ *
+ * If the color-pair was previously initialized, the screen is
+ * refreshed and all occurrences of that color-pair are changed
+ * to the new definition.
+ *
+ */
+static VALUE
+curses_init_pair(VALUE obj, VALUE pair, VALUE f, VALUE b)
+{
+ /* may have to raise exception on ERR */
+ curses_stdscr();
+ return (init_pair(NUM2INT(pair),NUM2INT(f),NUM2INT(b)) == OK) ? Qtrue : Qfalse;
+}
+
+/*
+ * Document-method: Curses.init_color
+ * call-seq: init_color(color, r, g, b)
+ *
+ * Changes the definition of a color. It takes four arguments:
+ * * the number of the color to be changed, +color+
+ * * the amount of red, +r+
+ * * the amount of green, +g+
+ * * the amount of blue, +b+
+ *
+ * The value of the first argument must be between 0 and COLORS.
+ * (See the section Colors for the default color index.) Each
+ * of the last three arguments must be a value between 0 and 1000.
+ * When Curses.init_color is used, all occurrences of that color
+ * on the screen immediately change to the new definition.
+ */
+static VALUE
+curses_init_color(VALUE obj, VALUE color, VALUE r, VALUE g, VALUE b)
+{
+ /* may have to raise exception on ERR */
+ curses_stdscr();
+ return (init_color(NUM2INT(color),NUM2INT(r),
+ NUM2INT(g),NUM2INT(b)) == OK) ? Qtrue : Qfalse;
+}
+
+/*
+ * Document-method: Curses.has_colors?
+ *
+ * Returns +true+ or +false+ depending on whether the terminal has color capbilities.
+ */
+static VALUE
+curses_has_colors(VALUE obj)
+{
+ curses_stdscr();
+ return has_colors() ? Qtrue : Qfalse;
+}
+
+/*
+ * Document-method: Curses.can_change_color?
+ *
+ * Returns +true+ or +false+ depending on whether the terminal can change color attributes
+ */
+static VALUE
+curses_can_change_color(VALUE obj)
+{
+ curses_stdscr();
+ return can_change_color() ? Qtrue : Qfalse;
+}
+
+#if defined(HAVE_COLORS)
+/*
+ * Document-method: Curses.color
+ *
+ * returns COLORS
+ */
+static VALUE
+curses_colors(VALUE obj)
+{
+ return INT2FIX(COLORS);
+}
+#else
+#define curses_colors rb_f_notimplement
+#endif
+
+/*
+ * Document-method: Curses.color_content
+ * call-seq: color_content(color)
+ *
+ * Returns an 3 item Array of the RGB values in +color+
+ */
+static VALUE
+curses_color_content(VALUE obj, VALUE color)
+{
+ short r,g,b;
+
+ curses_stdscr();
+ color_content(NUM2INT(color),&r,&g,&b);
+ return rb_ary_new3(3,INT2FIX(r),INT2FIX(g),INT2FIX(b));
+}
+
+
+#if defined(HAVE_COLOR_PAIRS)
+/*
+ * Document-method: Curses.color_pairs
+ *
+ * Returns the COLOR_PAIRS available, if the curses library supports it.
+ */
+static VALUE
+curses_color_pairs(VALUE obj)
+{
+ return INT2FIX(COLOR_PAIRS);
+}
+#else
+#define curses_color_pairs rb_f_notimplement
+#endif
+
+/*
+ * Document-method: Curses.pair_content
+ * call-seq: pair_content(pair)
+ *
+ * Returns a 2 item Array, with the foreground and
+ * background color, in +pair+
+ */
+static VALUE
+curses_pair_content(VALUE obj, VALUE pair)
+{
+ short f,b;
+
+ curses_stdscr();
+ pair_content(NUM2INT(pair),&f,&b);
+ return rb_ary_new3(2,INT2FIX(f),INT2FIX(b));
+}
+
+/*
+ * Document-method: Curses.color_pair
+ * call-seq: color_pair(attrs)
+ *
+ * Sets the color pair attributes to +attrs+.
+ *
+ * This should be equivalent to Curses.attrset(COLOR_PAIR(+attrs+))
+ *
+ * TODO: validate that equivalency
+ */
+static VALUE
+curses_color_pair(VALUE obj, VALUE attrs)
+{
+ return INT2FIX(COLOR_PAIR(NUM2INT(attrs)));
+}
+
+/*
+ * Document-method: Curses.pair_number
+ * call-seq: pair_number(attrs)
+ *
+ * Returns the Fixnum color pair number of attributes +attrs+.
+ */
+static VALUE
+curses_pair_number(VALUE obj, VALUE attrs)
+{
+ curses_stdscr();
+ return INT2FIX(PAIR_NUMBER(NUM2LONG(attrs)));
+}
+#endif /* USE_COLOR */
+
+#ifdef USE_MOUSE
+struct mousedata {
+ MEVENT *mevent;
+};
+
+static void
+no_mevent(void)
+{
+ rb_raise(rb_eRuntimeError, "no such mouse event");
+}
+
+#define GetMOUSE(obj, data) do {\
+ if (!OBJ_TAINTED(obj) && rb_safe_level() >= 4)\
+ rb_raise(rb_eSecurityError, "Insecure: operation on untainted mouse");\
+ TypedData_Get_Struct((obj), struct mousedata, &mousedata_type, (data));\
+ if ((data)->mevent == 0) no_mevent();\
+} while (0)
+
+static void
+curses_mousedata_free(void *p)
+{
+ struct mousedata *mdata = p;
+ if (mdata->mevent)
+ xfree(mdata->mevent);
+}
+
+static size_t
+curses_mousedata_memsize(const void *p)
+{
+ const struct mousedata *mdata = p;
+ size_t size = sizeof(*mdata);
+ if (!mdata) return 0;
+ if (mdata->mevent) size += sizeof(mdata->mevent);
+ return size;
+}
+
+static const rb_data_type_t mousedata_type = {
+ "mousedata",
+ {0, curses_mousedata_free, curses_mousedata_memsize,}
+};
+
+/*
+ * Document-method: Curses.getmouse
+ *
+ * Returns coordinates of the mouse.
+ *
+ * This will read and pop the mouse event data off the queue
+ *
+ * See the BUTTON*, ALL_MOUSE_EVENTS and REPORT_MOUSE_POSITION constants, to examine the mask of the event
+ */
+static VALUE
+curses_getmouse(VALUE obj)
+{
+ struct mousedata *mdata;
+ VALUE val;
+
+ curses_stdscr();
+ val = TypedData_Make_Struct(cMouseEvent,struct mousedata,
+ &mousedata_type,mdata);
+ mdata->mevent = (MEVENT*)xmalloc(sizeof(MEVENT));
+ return (getmouse(mdata->mevent) == OK) ? val : Qnil;
+}
+
+/*
+ * Document-method: Curses.ungetmouse
+ *
+ * It pushes a KEY_MOUSE event onto the input queue, and associates with that
+ * event the given state data and screen-relative character-cell coordinates.
+ *
+ * The Curses.ungetmouse function behaves analogously to Curses.ungetch.
+ */
+static VALUE
+curses_ungetmouse(VALUE obj, VALUE mevent)
+{
+ struct mousedata *mdata;
+
+ curses_stdscr();
+ GetMOUSE(mevent,mdata);
+ return (ungetmouse(mdata->mevent) == OK) ? Qtrue : Qfalse;
+}
+
+/*
+ * Document-method: Curses.mouseinterval
+ * call-seq: mouseinterval(interval)
+ *
+ * The Curses.mouseinterval function sets the maximum time
+ * (in thousands of a second) that can elapse between press
+ * and release events for them to be recognized as a click.
+ *
+ * Use Curses.mouseinterval(0) to disable click resolution.
+ * This function returns the previous interval value.
+ *
+ * Use Curses.mouseinterval(-1) to obtain the interval without
+ * altering it.
+ *
+ * The default is one sixth of a second.
+ */
+static VALUE
+curses_mouseinterval(VALUE obj, VALUE interval)
+{
+ curses_stdscr();
+ return mouseinterval(NUM2INT(interval)) ? Qtrue : Qfalse;
+}
+
+/*
+ * Document-method: Curses.mousemask
+ * call-seq: mousemask(mask)
+ *
+ * Returns the +mask+ of the reportable events
+ */
+static VALUE
+curses_mousemask(VALUE obj, VALUE mask)
+{
+ curses_stdscr();
+ return INT2NUM(mousemask(NUM2UINT(mask),NULL));
+}
+
+#define DEFINE_MOUSE_GET_MEMBER(func_name,mem) \
+static VALUE func_name (VALUE mouse) \
+{ \
+ struct mousedata *mdata; \
+ GetMOUSE(mouse, mdata); \
+ return (UINT2NUM(mdata->mevent -> mem)); \
+}
+
+/*
+ * Document-method: Curses::MouseEvent.eid
+ *
+ * Returns the current mouse id
+ */
+DEFINE_MOUSE_GET_MEMBER(curs_mouse_id, id)
+/*
+ * Document-method: Curses::MouseEvent.x
+ *
+ * Returns the current mouse's X coordinate
+ */
+DEFINE_MOUSE_GET_MEMBER(curs_mouse_x, x)
+/*
+ * Document-method: Curses::MouseEvent.y
+ *
+ * Returns the current mouse's Y coordinate
+ */
+DEFINE_MOUSE_GET_MEMBER(curs_mouse_y, y)
+/*
+ * Document-method: Curses::MouseEvent.z
+ *
+ * Returns the current mouse's Z coordinate
+ */
+DEFINE_MOUSE_GET_MEMBER(curs_mouse_z, z)
+/*
+ * Document-method: Curses::MouseEvent.bstate
+ *
+ * Returns the current mouse's button state. Use this with the button state
+ * constants to determine which buttons were pressed.
+ */
+DEFINE_MOUSE_GET_MEMBER(curs_mouse_bstate, bstate)
+#undef define_curs_mouse_member
+#endif /* USE_MOUSE */
+
+#ifdef HAVE_TIMEOUT
+/*
+ * Document-method: Curses.timeout=
+ * call-seq: timeout=(delay)
+ *
+ * Sets block and non-blocking reads for the window.
+ * - If delay is negative, blocking read is used (i.e., waits indefinitely for input).
+ * - If delay is zero, then non-blocking read is used (i.e., read returns ERR if no input is waiting).
+ * - If delay is positive, then read blocks for delay milliseconds, and returns ERR if there is still no input.
+ *
+ */
+static VALUE
+curses_timeout(VALUE obj, VALUE delay)
+{
+ curses_stdscr();
+ timeout(NUM2INT(delay));
+ return Qnil;
+}
+#else
+#define curses_timeout rb_f_notimplement
+#endif
+
+#ifdef HAVE_DEF_PROG_MODE
+/*
+ * Document-method: Curses.def_prog_mode
+ *
+ * Save the current terminal modes as the "program"
+ * state for use by the Curses.reset_prog_mode
+ *
+ * This is done automatically by Curses.init_screen
+ */
+static VALUE
+curses_def_prog_mode(VALUE obj)
+{
+ curses_stdscr();
+ return def_prog_mode() == OK ? Qtrue : Qfalse;
+}
+#else
+#define curses_def_prog_mode rb_f_notimplement
+#endif
+
+#ifdef HAVE_RESET_PROG_MODE
+/*
+ * Document-method: Curses.reset_prog_mode
+ *
+ * Reset the current terminal modes to the saved state
+ * by the Curses.def_prog_mode
+ *
+ * This is done automatically by Curses.close_screen
+ */
+static VALUE
+curses_reset_prog_mode(VALUE obj)
+{
+ curses_stdscr();
+ return reset_prog_mode() == OK ? Qtrue : Qfalse;
+}
+#else
+#define curses_reset_prog_mode rb_f_notimplement
+#endif
+
+/*-------------------------- class Window --------------------------*/
+
+/* returns a Curses::Window object */
+static VALUE
+window_s_allocate(VALUE class)
+{
+ struct windata *winp;
+
+ return TypedData_Make_Struct(class, struct windata, &windata_type, winp);
+}
+
+/*
+ * Document-method: Curses::Window.new
+ * call-seq: new(height, width, top, left)
+ *
+ * Contruct a new Curses::Window with constraints of
+ * +height+ lines, +width+ columns, begin at +top+ line, and begin +left+ most column.
+ *
+ * A new window using full screen is called as
+ * Curses::Window.new(0,0,0,0)
+ *
+ */
+static VALUE
+window_initialize(VALUE obj, VALUE h, VALUE w, VALUE top, VALUE left)
+{
+ struct windata *winp;
+ WINDOW *window;
+
+ rb_secure(4);
+ curses_init_screen();
+ TypedData_Get_Struct(obj, struct windata, &windata_type, winp);
+ if (winp->window) delwin(winp->window);
+ window = newwin(NUM2INT(h), NUM2INT(w), NUM2INT(top), NUM2INT(left));
+ wclear(window);
+ winp->window = window;
+
+ return obj;
+}
+
+/*
+ * Document-method: Curses::Window.subwin
+ * call-seq: subwin(height, width, top, left)
+ *
+ * Contruct a new subwindow with constraints of
+ * +height+ lines, +width+ columns, begin at +top+ line, and begin +left+ most column.
+ *
+ */
+static VALUE
+window_subwin(VALUE obj, VALUE height, VALUE width, VALUE top, VALUE left)
+{
+ struct windata *winp;
+ WINDOW *window;
+ VALUE win;
+ int h, w, t, l;
+
+ h = NUM2INT(height);
+ w = NUM2INT(width);
+ t = NUM2INT(top);
+ l = NUM2INT(left);
+ GetWINDOW(obj, winp);
+ window = subwin(winp->window, h, w, t, l);
+ win = prep_window(rb_obj_class(obj), window);
+
+ return win;
+}
+
+/*
+ * Document-method: Curses::Window.close
+ *
+ * Deletes the window, and frees the memory
+ */
+static VALUE
+window_close(VALUE obj)
+{
+ struct windata *winp;
+
+ GetWINDOW(obj, winp);
+ delwin(winp->window);
+ winp->window = 0;
+
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses::Window.clear
+ *
+ * Clear the window.
+ */
+static VALUE
+window_clear(VALUE obj)
+{
+ struct windata *winp;
+
+ GetWINDOW(obj, winp);
+ wclear(winp->window);
+
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses::Window.clrtoeol
+ *
+ * Clear the window to the end of line, that the cursor is currently on.
+ */
+static VALUE
+window_clrtoeol(VALUE obj)
+{
+ struct windata *winp;
+
+ GetWINDOW(obj, winp);
+ wclrtoeol(winp->window);
+
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses::Window.refresh
+ *
+ * Refreshes the windows and lines.
+ *
+ */
+static VALUE
+window_refresh(VALUE obj)
+{
+ struct windata *winp;
+
+ GetWINDOW(obj, winp);
+ wrefresh(winp->window);
+
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses::Window.noutrefresh
+ *
+ * Refreshes the windows and lines.
+ *
+ * Curses::Window.noutrefresh allows multiple updates with
+ * more efficiency than Curses::Window.refresh alone.
+ */
+static VALUE
+window_noutrefresh(VALUE obj)
+{
+ struct windata *winp;
+
+ GetWINDOW(obj, winp);
+#ifdef HAVE_DOUPDATE
+ wnoutrefresh(winp->window);
+#else
+ wrefresh(winp->window);
+#endif
+
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses::Window.move
+ * call-seq: move(y,x)
+ *
+ * Moves the window so that the upper left-hand corner is at position (+y+, +x+)
+ */
+static VALUE
+window_move(VALUE obj, VALUE y, VALUE x)
+{
+ struct windata *winp;
+
+ GetWINDOW(obj, winp);
+ mvwin(winp->window, NUM2INT(y), NUM2INT(x));
+
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses::Window.setpos
+ * call-seq: setpos(y, x)
+ *
+ * A setter for the position of the cursor
+ * in the current window,
+ * using coordinates +x+ and +y+
+ *
+ */
+static VALUE
+window_setpos(VALUE obj, VALUE y, VALUE x)
+{
+ struct windata *winp;
+
+ GetWINDOW(obj, winp);
+ wmove(winp->window, NUM2INT(y), NUM2INT(x));
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses::Window.cury
+ *
+ * A getter for the current line (Y coord) of the window
+ */
+static VALUE
+window_cury(VALUE obj)
+{
+ struct windata *winp;
+ int RB_UNUSED_VAR(x), y;
+
+ GetWINDOW(obj, winp);
+ getyx(winp->window, y, x);
+ return INT2FIX(y);
+}
+
+/*
+ * Document-method: Curses::Window.curx
+ *
+ * A getter for the current column (X coord) of the window
+ */
+static VALUE
+window_curx(VALUE obj)
+{
+ struct windata *winp;
+ int x, RB_UNUSED_VAR(y);
+
+ GetWINDOW(obj, winp);
+ getyx(winp->window, y, x);
+ return INT2FIX(x);
+}
+
+/*
+ * Document-method: Curses::Window.maxy
+ *
+ * A getter for the maximum lines for the window
+ */
+static VALUE
+window_maxy(VALUE obj)
+{
+ struct windata *winp;
+
+ GetWINDOW(obj, winp);
+#if defined(getmaxy)
+ return INT2FIX(getmaxy(winp->window));
+#elif defined(getmaxyx)
+ {
+ int x, y;
+ getmaxyx(winp->window, y, x);
+ return INT2FIX(y);
+ }
+#else
+ return INT2FIX(winp->window->_maxy+1);
+#endif
+}
+
+/*
+ * Document-method: Curses::Window.maxx
+ *
+ * A getter for the maximum columns for the window
+ */
+static VALUE
+window_maxx(VALUE obj)
+{
+ struct windata *winp;
+
+ GetWINDOW(obj, winp);
+#if defined(getmaxx)
+ return INT2FIX(getmaxx(winp->window));
+#elif defined(getmaxyx)
+ {
+ int x, y;
+ getmaxyx(winp->window, y, x);
+ return INT2FIX(x);
+ }
+#else
+ return INT2FIX(winp->window->_maxx+1);
+#endif
+}
+
+/*
+ * Document-method: Curses::Window.begy
+ *
+ * A getter for the beginning line (Y coord) of the window
+ */
+static VALUE
+window_begy(VALUE obj)
+{
+ struct windata *winp;
+ int RB_UNUSED_VAR(x), y;
+
+ GetWINDOW(obj, winp);
+#ifdef getbegyx
+ getbegyx(winp->window, y, x);
+#else
+ y = winp->window->_begy;
+#endif
+ return INT2FIX(y);
+}
+
+/*
+ * Document-method: Curses::Window.begx
+ *
+ * A getter for the beginning column (X coord) of the window
+ */
+static VALUE
+window_begx(VALUE obj)
+{
+ struct windata *winp;
+ int x, RB_UNUSED_VAR(y);
+
+ GetWINDOW(obj, winp);
+#ifdef getbegyx
+ getbegyx(winp->window, y, x);
+#else
+ x = winp->window->_begx;
+#endif
+ return INT2FIX(x);
+}
+
+/*
+ * Document-method: Curses::Window.box
+ * call-seq: box(vert, hor)
+ *
+ * set the characters to frame the window in.
+ * The vertical +vert+ and horizontal +hor+ character.
+ *
+ * win = Curses::Window.new(5,5,5,5)
+ * win.box(?|, ?-)
+ *
+ */
+static VALUE
+window_box(int argc, VALUE *argv, VALUE self)
+{
+ struct windata *winp;
+ VALUE vert, hor, corn;
+
+ rb_scan_args(argc, argv, "21", &vert, &hor, &corn);
+
+ GetWINDOW(self, winp);
+ box(winp->window, NUM2CH(vert), NUM2CH(hor));
+
+ if (!NIL_P(corn)) {
+ int cur_x, cur_y, x, y;
+ chtype c;
+
+ c = NUM2CH(corn);
+ getyx(winp->window, cur_y, cur_x);
+ x = NUM2INT(window_maxx(self)) - 1;
+ y = NUM2INT(window_maxy(self)) - 1;
+ wmove(winp->window, 0, 0);
+ waddch(winp->window, c);
+ wmove(winp->window, y, 0);
+ waddch(winp->window, c);
+ wmove(winp->window, y, x);
+ waddch(winp->window, c);
+ wmove(winp->window, 0, x);
+ waddch(winp->window, c);
+ wmove(winp->window, cur_y, cur_x);
+ }
+
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses::Window.standout
+ *
+ * Enables the best highlighting mode of the terminal.
+ *
+ * This is equivalent to Curses::Window.attron(A_STANDOUT)
+ *
+ * see also Curses::Window.attrset
+ */
+static VALUE
+window_standout(VALUE obj)
+{
+ struct windata *winp;
+
+ GetWINDOW(obj, winp);
+ wstandout(winp->window);
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses::Window.standend
+ *
+ * Enables the Normal display (no highlight)
+ *
+ * This is equivalent to Curses::Window.attron(A_NORMAL)
+ *
+ * see also Curses::Window.attrset
+ */
+static VALUE
+window_standend(VALUE obj)
+{
+ struct windata *winp;
+
+ GetWINDOW(obj, winp);
+ wstandend(winp->window);
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses::Window.inch
+ *
+ * Returns the character at the current position of the window.
+ */
+static VALUE
+window_inch(VALUE obj)
+{
+ struct windata *winp;
+
+ GetWINDOW(obj, winp);
+ return CH2FIX(winch(winp->window));
+}
+
+/*
+ * Document-method: Curses::Window.addch
+ * call-seq: addch(ch)
+ *
+ * Add a character +ch+, with attributes, to the window, then advance the cursor.
+ *
+ * see also the system manual for curs_addch(3)
+ */
+static VALUE
+window_addch(VALUE obj, VALUE ch)
+{
+ struct windata *winp;
+
+ GetWINDOW(obj, winp);
+ waddch(winp->window, NUM2CH(ch));
+
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses::Window.insch
+ * call-seq: insch(ch)
+ *
+ * Insert a character +ch+, before the cursor, in the current window
+ *
+ */
+static VALUE
+window_insch(VALUE obj, VALUE ch)
+{
+ struct windata *winp;
+
+ GetWINDOW(obj, winp);
+ winsch(winp->window, NUM2CH(ch));
+
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses::Window.addstr
+ * call-seq: addstr(str)
+ *
+ * add a string of characters +str+, to the window and advance cursor
+ *
+ */
+static VALUE
+window_addstr(VALUE obj, VALUE str)
+{
+ if (!NIL_P(str)) {
+ struct windata *winp;
+
+ StringValue(str);
+ str = rb_str_export_locale(str);
+ GetWINDOW(obj, winp);
+ waddstr(winp->window, StringValueCStr(str));
+ }
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses::Window.<<
+ *
+ * call-seq:
+ * <<(str)
+ *
+ * Add String +str+ to the current string.
+ *
+ * See also Curses::Window.addstr
+ */
+static VALUE
+window_addstr2(VALUE obj, VALUE str)
+{
+ window_addstr(obj, str);
+ return obj;
+}
+
+struct wgetch_arg {
+ WINDOW *win;
+ int c;
+};
+
+static void *
+wgetch_func(void *_arg)
+{
+ struct wgetch_arg *arg = (struct wgetch_arg *)_arg;
+ arg->c = wgetch(arg->win);
+ return 0;
+}
+
+/*
+ * Document-method: Curses::Window.getch
+ *
+ * Read and returns a character from the window.
+ *
+ * See Curses::Key to all the function KEY_* available
+ *
+ */
+static VALUE
+window_getch(VALUE obj)
+{
+ struct windata *winp;
+ struct wgetch_arg arg;
+ int c;
+
+ GetWINDOW(obj, winp);
+ arg.win = winp->window;
+ rb_thread_call_without_gvl(wgetch_func, (void *)&arg, RUBY_UBF_IO, 0);
+ c = arg.c;
+ if (c == EOF) return Qnil;
+ if (rb_isprint(c)) {
+ char ch = (char)c;
+
+ return rb_locale_str_new(&ch, 1);
+ }
+ return UINT2NUM(c);
+}
+
+struct wgetstr_arg {
+ WINDOW *win;
+ char rtn[GETSTR_BUF_SIZE];
+};
+
+static void *
+wgetstr_func(void *_arg)
+{
+ struct wgetstr_arg *arg = (struct wgetstr_arg *)_arg;
+#if defined(HAVE_WGETNSTR)
+ wgetnstr(arg->win, arg->rtn, GETSTR_BUF_SIZE-1);
+#else
+ wgetstr(arg->win, arg->rtn);
+#endif
+ return 0;
+}
+
+/*
+ * Document-method: Curses::Window.getstr
+ *
+ * This is equivalent to a series f Curses::Window.getch calls
+ *
+ */
+static VALUE
+window_getstr(VALUE obj)
+{
+ struct windata *winp;
+ struct wgetstr_arg arg;
+
+ GetWINDOW(obj, winp);
+ arg.win = winp->window;
+ rb_thread_call_without_gvl(wgetstr_func, (void *)&arg, RUBY_UBF_IO, 0);
+ return rb_locale_str_new_cstr(arg.rtn);
+}
+
+/*
+ * Document-method: Curses::Window.delch
+ *
+ * Delete the character under the cursor
+ *
+ */
+static VALUE
+window_delch(VALUE obj)
+{
+ struct windata *winp;
+
+ GetWINDOW(obj, winp);
+ wdelch(winp->window);
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses::Window.deleteln
+ *
+ * Delete the line under the cursor.
+ *
+ */
+static VALUE
+window_deleteln(VALUE obj)
+{
+#if defined(HAVE_WDELETELN) || defined(wdeleteln)
+ struct windata *winp;
+
+ GetWINDOW(obj, winp);
+ wdeleteln(winp->window);
+#endif
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses::Window.insertln
+ *
+ * Inserts a line above the cursor, and the bottom line is lost
+ *
+ */
+static VALUE
+window_insertln(VALUE obj)
+{
+#if defined(HAVE_WINSERTLN) || defined(winsertln)
+ struct windata *winp;
+
+ GetWINDOW(obj, winp);
+ winsertln(winp->window);
+#endif
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses::Window.scrollok
+ * call-seq: scrollok(bool)
+ *
+ * Controls what happens when the cursor of a window
+ * is moved off the edge of the window or scrolling region,
+ * either as a result of a newline action on the bottom line,
+ * or typing the last character of the last line.
+ *
+ * If disabled, (+bool+ is false), the cursor is left on the bottom line.
+ *
+ * If enabled, (+bool+ is true), the window is scrolled up one line
+ * (Note that to get the physical scrolling effect on the terminal,
+ * it is also necessary to call Curses::Window.idlok)
+ */
+static VALUE
+window_scrollok(VALUE obj, VALUE bf)
+{
+ struct windata *winp;
+
+ GetWINDOW(obj, winp);
+ scrollok(winp->window, RTEST(bf) ? TRUE : FALSE);
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses::Window.idlok
+ * call-seq: idlok(bool)
+ *
+ * If +bool+ is +true+ curses considers using the hardware insert/delete
+ * line feature of terminals so equipped.
+ *
+ * If +bool+ is +false+, disables use of line insertion and deletion.
+ * This option should be enabled only if the application needs insert/delete
+ * line, for example, for a screen editor.
+ *
+ * It is disabled by default because insert/delete line tends to be visually
+ * annoying when used in applications where it is not really needed.
+ * If insert/delete line cannot be used, curses redraws the changed portions of all lines.
+ *
+ */
+static VALUE
+window_idlok(VALUE obj, VALUE bf)
+{
+ struct windata *winp;
+
+ GetWINDOW(obj, winp);
+ idlok(winp->window, RTEST(bf) ? TRUE : FALSE);
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses::Window.setscrreg
+ * call-seq:
+ * setscrreg(top, bottom)
+ *
+ * Set a software scrolling region in a window.
+ * +top+ and +bottom+ are lines numbers of the margin.
+ *
+ * If this option and Curses::Window.scrollok are enabled, an attempt to move
+ * off the bottom margin line causes all lines in the scrolling region to
+ * scroll one line in the direction of the first line. Only the text of the
+ * window is scrolled.
+ *
+ */
+static VALUE
+window_setscrreg(VALUE obj, VALUE top, VALUE bottom)
+{
+#ifdef HAVE_WSETSCRREG
+ struct windata *winp;
+ int res;
+
+ GetWINDOW(obj, winp);
+ res = wsetscrreg(winp->window, NUM2INT(top), NUM2INT(bottom));
+ /* may have to raise exception on ERR */
+ return (res == OK) ? Qtrue : Qfalse;
+#else
+ return Qfalse;
+#endif
+}
+
+#if defined(USE_COLOR) && defined(HAVE_WCOLOR_SET)
+/*
+ * Document-method: Curses::Window.color_set
+ * call-seq: color_set(col)
+ *
+ * Sets the current color of the given window to the
+ * foreground/background combination described by the Fixnum +col+.
+ */
+static VALUE
+window_color_set(VALUE obj, VALUE col)
+{
+ struct windata *winp;
+ int res;
+
+ GetWINDOW(obj, winp);
+ res = wcolor_set(winp->window, NUM2INT(col), NULL);
+ return (res == OK) ? Qtrue : Qfalse;
+}
+#endif /* defined(USE_COLOR) && defined(HAVE_WCOLOR_SET) */
+
+/*
+ * Document-method: Curses::Window.scroll
+ *
+ * Scrolls the current window up one line.
+ */
+static VALUE
+window_scroll(VALUE obj)
+{
+ struct windata *winp;
+
+ GetWINDOW(obj, winp);
+ /* may have to raise exception on ERR */
+ return (scroll(winp->window) == OK) ? Qtrue : Qfalse;
+}
+
+/*
+ * Document-method: Curses::Window.scrl
+ * call-seq: scrl(num)
+ *
+ * Scrolls the current window Fixnum +num+ lines.
+ * The current cursor position is not changed.
+ *
+ * For positive +num+, it scrolls up.
+ *
+ * For negative +num+, it scrolls down.
+ *
+ */
+static VALUE
+window_scrl(VALUE obj, VALUE n)
+{
+#ifdef HAVE_WSCRL
+ struct windata *winp;
+
+ GetWINDOW(obj, winp);
+ /* may have to raise exception on ERR */
+ return (wscrl(winp->window,NUM2INT(n)) == OK) ? Qtrue : Qfalse;
+#else
+ return Qfalse;
+#endif
+}
+
+/*
+ * Document-method: Curses::Window.attroff
+ * call-seq: attroff(attrs)
+ *
+ * Turns on the named attributes +attrs+ without affecting any others.
+ *
+ * See also Curses::Window.attrset
+ */
+static VALUE
+window_attroff(VALUE obj, VALUE attrs)
+{
+#ifdef HAVE_WATTROFF
+ struct windata *winp;
+
+ GetWINDOW(obj,winp);
+ return INT2FIX(wattroff(winp->window,NUM2INT(attrs)));
+#else
+ return Qtrue;
+#endif
+}
+
+/*
+ * Document-method: Curses::Window.attron
+ * call-seq: attron(attrs)
+ *
+ * Turns off the named attributes +attrs+
+ * without turning any other attributes on or off.
+ *
+ * See also Curses::Window.attrset
+ */
+static VALUE
+window_attron(VALUE obj, VALUE attrs)
+{
+#ifdef HAVE_WATTRON
+ struct windata *winp;
+ VALUE val;
+
+ GetWINDOW(obj,winp);
+ val = INT2FIX(wattron(winp->window,NUM2INT(attrs)));
+ if (rb_block_given_p()) {
+ rb_yield(val);
+ wattroff(winp->window,NUM2INT(attrs));
+ return val;
+ }
+ else{
+ return val;
+ }
+#else
+ return Qtrue;
+#endif
+}
+
+/*
+ * Document-method: Curses::Window.attrset
+ * call-seq: attrset(attrs)
+ *
+ * Sets the current attributes of the given window to +attrs+.
+ *
+ * The following video attributes, defined in <curses.h>, can
+ * be passed to the routines Curses::Window.attron, Curses::Window.attroff,
+ * and Curses::Window.attrset, or OR'd with the characters passed to addch.
+ * A_NORMAL Normal display (no highlight)
+ * A_STANDOUT Best highlighting mode of the terminal.
+ * A_UNDERLINE Underlining
+ * A_REVERSE Reverse video
+ * A_BLINK Blinking
+ * A_DIM Half bright
+ * A_BOLD Extra bright or bold
+ * A_PROTECT Protected mode
+ * A_INVIS Invisible or blank mode
+ * A_ALTCHARSET Alternate character set
+ * A_CHARTEXT Bit-mask to extract a character
+ * COLOR_PAIR(n) Color-pair number n
+ *
+ * TODO: provide some examples here.
+ *
+ * see also system manual curs_attr(3)
+ */
+static VALUE
+window_attrset(VALUE obj, VALUE attrs)
+{
+#ifdef HAVE_WATTRSET
+ struct windata *winp;
+
+ GetWINDOW(obj,winp);
+ return INT2FIX(wattrset(winp->window,NUM2INT(attrs)));
+#else
+ return Qtrue;
+#endif
+}
+
+/*
+ * Document-method: Curses::Window.bkgdset
+ * call-seq: bkgdset(ch)
+ *
+ * Manipulate the background of the current window
+ * with character Integer +ch+
+ *
+ * see also Curses.bkgdset
+ */
+static VALUE
+window_bkgdset(VALUE obj, VALUE ch)
+{
+#ifdef HAVE_WBKGDSET
+ struct windata *winp;
+
+ GetWINDOW(obj,winp);
+ wbkgdset(winp->window, NUM2CH(ch));
+#endif
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses::Window.bkgd
+ * call-seq: bkgd(ch)
+ *
+ * Set the background of the current window
+ * and apply character Integer +ch+ to every character.
+ *
+ * see also Curses.bkgd
+ */
+static VALUE
+window_bkgd(VALUE obj, VALUE ch)
+{
+#ifdef HAVE_WBKGD
+ struct windata *winp;
+
+ GetWINDOW(obj,winp);
+ return (wbkgd(winp->window, NUM2CH(ch)) == OK) ? Qtrue : Qfalse;
+#else
+ return Qfalse;
+#endif
+}
+
+/*
+ * Document-method: Curses::Window.getbkgd
+ *
+ * Returns an Interer (+ch+) for the character property in the current window.
+ */
+static VALUE
+window_getbkgd(VALUE obj)
+{
+#ifdef HAVE_WGETBKGD
+ chtype c;
+ struct windata *winp;
+
+ GetWINDOW(obj,winp);
+ return (c = getbkgd(winp->window) != ERR) ? CH2FIX(c) : Qnil;
+#else
+ return Qnil;
+#endif
+}
+
+/*
+ * Document-method: Curses::Window.resize
+ * call-seq: resize(lines, cols)
+ *
+ * Resize the current window to Fixnum +lines+ and Fixnum +cols+
+ *
+ */
+static VALUE
+window_resize(VALUE obj, VALUE lin, VALUE col)
+{
+#if defined(HAVE_WRESIZE)
+ struct windata *winp;
+
+ GetWINDOW(obj,winp);
+ return wresize(winp->window, NUM2INT(lin), NUM2INT(col)) == OK ? Qtrue : Qfalse;
+#else
+ return Qnil;
+#endif
+}
+
+
+#ifdef HAVE_KEYPAD
+/*
+ * Document-method: Curses::Window.keypad=
+ * call-seq:
+ * keypad=(bool)
+ *
+ * See Curses::Window.keypad
+ */
+
+/*
+ * Document-method: Curses::Window.keypad
+ * call-seq:
+ * keypad(bool)
+ *
+ * Enables the keypad of the user's terminal.
+ *
+ * If enabled (+bool+ is +true+), the user can press a function key
+ * (such as an arrow key) and wgetch returns a single value representing
+ * the function key, as in KEY_LEFT. If disabled (+bool+ is +false+),
+ * curses does not treat function keys specially and the program has to
+ * interpret the escape sequences itself. If the keypad in the terminal
+ * can be turned on (made to transmit) and off (made to work locally),
+ * turning on this option causes the terminal keypad to be turned on when
+ * Curses::Window.getch is called.
+ *
+ * The default value for keypad is false.
+ *
+ */
+static VALUE
+window_keypad(VALUE obj, VALUE val)
+{
+ struct windata *winp;
+
+ GetWINDOW(obj,winp);
+ /* keypad() of NetBSD's libcurses returns no value */
+#if defined(__NetBSD__) && !defined(NCURSES_VERSION)
+ keypad(winp->window,(RTEST(val) ? TRUE : FALSE));
+ return Qnil;
+#else
+ /* may have to raise exception on ERR */
+ return (keypad(winp->window,RTEST(val) ? TRUE : FALSE)) == OK ?
+ Qtrue : Qfalse;
+#endif
+}
+#else
+#define window_keypad rb_f_notimplement
+#endif
+
+#ifdef HAVE_NODELAY
+/*
+ * Document-method: Curses::Window.nodelay
+ * call-seq:
+ * window.nodelay = bool
+ *
+ * When in no-delay mode Curses::Window#getch is a non-blocking call. If no
+ * input is ready #getch returns ERR.
+ *
+ * When in delay mode (+bool+ is +false+ which is the default),
+ * Curses::Window#getch blocks until a key is pressed.
+ *
+ */
+static VALUE
+window_nodelay(VALUE obj, VALUE val)
+{
+ struct windata *winp;
+ GetWINDOW(obj,winp);
+
+ /* nodelay() of NetBSD's libcurses returns no value */
+#if defined(__NetBSD__) && !defined(NCURSES_VERSION)
+ nodelay(winp->window, RTEST(val) ? TRUE : FALSE);
+ return Qnil;
+#else
+ return nodelay(winp->window,RTEST(val) ? TRUE : FALSE) == OK ? Qtrue : Qfalse;
+#endif
+}
+#else
+#define window_nodelay rb_f_notimplement
+#endif
+
+#ifdef HAVE_WTIMEOUT
+/*
+ * Document-method: Curses::Window.timeout=
+ * call-seq: timeout=(delay)
+ *
+ * Sets block and non-blocking reads for the window.
+ * - If delay is negative, blocking read is used (i.e., waits indefinitely for input).
+ * - If delay is zero, then non-blocking read is used (i.e., read returns ERR if no input is waiting).
+ * - If delay is positive, then read blocks for delay milliseconds, and returns ERR if there is still no input.
+ *
+ */
+static VALUE
+window_timeout(VALUE obj, VALUE delay)
+{
+ struct windata *winp;
+ GetWINDOW(obj,winp);
+
+ wtimeout(winp->window,NUM2INT(delay));
+ return Qnil;
+}
+#else
+#define window_timeout rb_f_notimplement
+#endif
+
+/*--------------------------- class Pad ----------------------------*/
+
+#ifdef HAVE_NEWPAD
+/*
+ * Document-method: Curses::Pad.new
+ *
+ * call-seq:
+ * new(height, width)
+ *
+ * Contruct a new Curses::Pad with constraints of +height+ lines, +width+
+ * columns
+ *
+ */
+static VALUE
+pad_initialize(VALUE obj, VALUE h, VALUE w)
+{
+ struct windata *padp;
+ WINDOW *window;
+
+ rb_secure(4);
+ curses_init_screen();
+ TypedData_Get_Struct(obj, struct windata, &windata_type, padp);
+ if (padp->window) delwin(padp->window);
+ window = newpad(NUM2INT(h), NUM2INT(w));
+ wclear(window);
+ padp->window = window;
+
+ return obj;
+}
+
+#if 1
+#define pad_subpad window_subwin
+#else
+/*
+ * Document-method: Curses::Pad.subpad
+ * call-seq:
+ * subpad(height, width, begin_x, begin_y)
+ *
+ * Contruct a new subpad with constraints of +height+ lines, +width+ columns,
+ * begin at +begin_x+ line, and +begin_y+ columns on the pad.
+ *
+ */
+static VALUE
+pad_subpad(VALUE obj, VALUE height, VALUE width, VALUE begin_x, VALUE begin_y)
+{
+ struct windata *padp;
+ WINDOW *subpad;
+ VALUE pad;
+ int h, w, x, y;
+
+ h = NUM2INT(height);
+ w = NUM2INT(width);
+ x = NUM2INT(begin_x);
+ y = NUM2INT(begin_y);
+ GetWINDOW(obj, padp);
+ subpad = subwin(padp->window, h, w, x, y);
+ pad = prep_window(rb_obj_class(obj), subpad);
+
+ return pad;
+}
+#endif
+
+/*
+ * Document-method: Curses::Pad.refresh
+ *
+ * call-seq:
+ * pad.refresh(pad_minrow, pad_mincol, screen_minrow, screen_mincol, screen_maxrow, screen_maxcol)
+ *
+ * Refreshes the pad. +pad_minrow+ and pad_mincol+ define the upper-left
+ * corner of the rectangle to be displayed. +screen_minrow+, +screen_mincol+,
+ * +screen_maxrow+, +screen_maxcol+ define the edges of the rectangle to be
+ * displayed on the screen.
+ *
+ */
+static VALUE
+pad_refresh(VALUE obj, VALUE pminrow, VALUE pmincol, VALUE sminrow,
+ VALUE smincol, VALUE smaxrow, VALUE smaxcol)
+{
+ struct windata *padp;
+ int pmr, pmc, smr, smc, sxr, sxc;
+
+ pmr = NUM2INT(pminrow);
+ pmc = NUM2INT(pmincol);
+ smr = NUM2INT(sminrow);
+ smc = NUM2INT(smincol);
+ sxr = NUM2INT(smaxrow);
+ sxc = NUM2INT(smaxcol);
+
+ GetWINDOW(obj, padp);
+ prefresh(padp->window, pmr, pmc, smr, smc, sxr, sxc);
+
+ return Qnil;
+}
+
+/*
+ * Document-method: Curses::Pad.noutrefresh
+ *
+ * call-seq:
+ * pad.noutrefresh(pad_minrow, pad_mincol, screen_minrow, screen_mincol, screen_maxrow, screen_maxcol)
+ *
+ * Refreshes the pad. +pad_minrow+ and pad_mincol+ define the upper-left
+ * corner of the rectangle to be displayed. +screen_minrow+, +screen_mincol+,
+ * +screen_maxrow+, +screen_maxcol+ define the edges of the rectangle to be
+ * displayed on the screen.
+ *
+ */
+static VALUE
+pad_noutrefresh(VALUE obj, VALUE pminrow, VALUE pmincol, VALUE sminrow,
+ VALUE smincol, VALUE smaxrow, VALUE smaxcol)
+{
+ struct windata *padp;
+ int pmr, pmc, smr, smc, sxr, sxc;
+
+ pmr = NUM2INT(pminrow);
+ pmc = NUM2INT(pmincol);
+ smr = NUM2INT(sminrow);
+ smc = NUM2INT(smincol);
+ sxr = NUM2INT(smaxrow);
+ sxc = NUM2INT(smaxcol);
+
+ GetWINDOW(obj, padp);
+#ifdef HAVE_DOUPDATE
+ pnoutrefresh(padp->window, pmr, pmc, smr, smc, sxr, sxc);
+#else
+ prefresh(padp->window, pmr, pmc, smr, smc, sxr, sxc);
+#endif
+
+ return Qnil;
+}
+#endif /* HAVE_NEWPAD */
+
+/*------------------------- Initialization -------------------------*/
+
+/*
+ * Document-module: Curses
+ *
+ * == Description
+ * An implementation of the CRT screen handling and optimization library.
+ *
+ * == Structures and such
+ *
+ * === Classes
+ *
+ * * Curses::Window - class with the means to draw a window or box
+ * * Curses::MouseEvent - class for collecting mouse events
+ *
+ * === Modules
+ *
+ * Curses:: The curses implementation
+ * Curses::Key:: Collection of constants for keypress events
+ *
+ * == Examples
+ *
+ * * hello.rb
+ * :include: hello.rb
+ *
+ *
+ * * rain.rb
+ * :include: rain.rb
+ *
+ *
+ */
+void
+Init_curses(void)
+{
+ mCurses = rb_define_module("Curses");
+
+ /*
+ * Document-module: Curses::Key
+ *
+ *
+ * a container for the KEY_* values.
+ *
+ * See also system manual for getch(3)
+ *
+ */
+ mKey = rb_define_module_under(mCurses, "Key");
+
+ rb_gc_register_address(&rb_stdscr);
+
+#ifdef USE_MOUSE
+ /*
+ * Document-class: Curses::MouseEvent
+ *
+ * == Description
+ *
+ * Curses::MouseEvent
+ *
+ * == Example
+ *
+ * * mouse.rb
+ * :include: mouse.rb
+ *
+ */
+ cMouseEvent = rb_define_class_under(mCurses,"MouseEvent",rb_cObject);
+ rb_undef_method(CLASS_OF(cMouseEvent),"new");
+ rb_define_method(cMouseEvent, "eid", curs_mouse_id, 0);
+ rb_define_method(cMouseEvent, "x", curs_mouse_x, 0);
+ rb_define_method(cMouseEvent, "y", curs_mouse_y, 0);
+ rb_define_method(cMouseEvent, "z", curs_mouse_z, 0);
+ rb_define_method(cMouseEvent, "bstate", curs_mouse_bstate, 0);
+#endif /* USE_MOUSE */
+
+ rb_define_module_function(mCurses, "ESCDELAY=", curses_escdelay_set, 1);
+ rb_define_module_function(mCurses, "ESCDELAY", curses_escdelay_get, 0);
+ rb_define_module_function(mCurses, "TABSIZE", curses_tabsize_get, 0);
+ rb_define_module_function(mCurses, "TABSIZE=", curses_tabsize_set, 1);
+
+ rb_define_module_function(mCurses, "use_default_colors", curses_use_default_colors, 0);
+ rb_define_module_function(mCurses, "init_screen", curses_init_screen, 0);
+ rb_define_module_function(mCurses, "close_screen", curses_close_screen, 0);
+ rb_define_module_function(mCurses, "closed?", curses_closed, 0);
+ rb_define_module_function(mCurses, "stdscr", curses_stdscr, 0);
+ rb_define_module_function(mCurses, "refresh", curses_refresh, 0);
+ rb_define_module_function(mCurses, "doupdate", curses_doupdate, 0);
+ rb_define_module_function(mCurses, "clear", curses_clear, 0);
+ rb_define_module_function(mCurses, "clrtoeol", curses_clrtoeol, 0);
+ rb_define_module_function(mCurses, "echo", curses_echo, 0);
+ rb_define_module_function(mCurses, "noecho", curses_noecho, 0);
+ rb_define_module_function(mCurses, "raw", curses_raw, 0);
+ rb_define_module_function(mCurses, "noraw", curses_noraw, 0);
+ rb_define_module_function(mCurses, "cbreak", curses_cbreak, 0);
+ rb_define_module_function(mCurses, "nocbreak", curses_nocbreak, 0);
+ rb_define_module_function(mCurses, "crmode", curses_nocbreak, 0);
+ rb_define_module_function(mCurses, "nocrmode", curses_nocbreak, 0);
+ rb_define_module_function(mCurses, "nl", curses_nl, 0);
+ rb_define_module_function(mCurses, "nonl", curses_nonl, 0);
+ rb_define_module_function(mCurses, "beep", curses_beep, 0);
+ rb_define_module_function(mCurses, "flash", curses_flash, 0);
+ rb_define_module_function(mCurses, "ungetch", curses_ungetch, 1);
+ rb_define_module_function(mCurses, "setpos", curses_setpos, 2);
+ rb_define_module_function(mCurses, "standout", curses_standout, 0);
+ rb_define_module_function(mCurses, "standend", curses_standend, 0);
+ rb_define_module_function(mCurses, "inch", curses_inch, 0);
+ rb_define_module_function(mCurses, "addch", curses_addch, 1);
+ rb_define_module_function(mCurses, "insch", curses_insch, 1);
+ rb_define_module_function(mCurses, "addstr", curses_addstr, 1);
+ rb_define_module_function(mCurses, "getch", curses_getch, 0);
+ rb_define_module_function(mCurses, "getstr", curses_getstr, 0);
+ rb_define_module_function(mCurses, "delch", curses_delch, 0);
+ rb_define_module_function(mCurses, "deleteln", curses_deleteln, 0);
+ rb_define_module_function(mCurses, "insertln", curses_insertln, 0);
+ rb_define_module_function(mCurses, "keyname", curses_keyname, 1);
+ rb_define_module_function(mCurses, "lines", curses_lines, 0);
+ rb_define_module_function(mCurses, "cols", curses_cols, 0);
+ rb_define_module_function(mCurses, "curs_set", curses_curs_set, 1);
+ rb_define_module_function(mCurses, "scrl", curses_scrl, 1);
+ rb_define_module_function(mCurses, "setscrreg", curses_setscrreg, 2);
+ rb_define_module_function(mCurses, "attroff", curses_attroff, 1);
+ rb_define_module_function(mCurses, "attron", curses_attron, 1);
+ rb_define_module_function(mCurses, "attrset", curses_attrset, 1);
+ rb_define_module_function(mCurses, "bkgdset", curses_bkgdset, 1);
+ rb_define_module_function(mCurses, "bkgd", curses_bkgd, 1);
+ rb_define_module_function(mCurses, "resizeterm", curses_resizeterm, 2);
+ rb_define_module_function(mCurses, "resize", curses_resizeterm, 2);
+#ifdef USE_COLOR
+ rb_define_module_function(mCurses, "start_color", curses_start_color, 0);
+ rb_define_module_function(mCurses, "init_pair", curses_init_pair, 3);
+ rb_define_module_function(mCurses, "init_color", curses_init_color, 4);
+ rb_define_module_function(mCurses, "has_colors?", curses_has_colors, 0);
+ rb_define_module_function(mCurses, "can_change_color?",
+ curses_can_change_color, 0);
+ rb_define_module_function(mCurses, "colors", curses_colors, 0);
+ rb_define_module_function(mCurses, "color_content", curses_color_content, 1);
+ rb_define_module_function(mCurses, "color_pairs", curses_color_pairs, 0);
+ rb_define_module_function(mCurses, "pair_content", curses_pair_content, 1);
+ rb_define_module_function(mCurses, "color_pair", curses_color_pair, 1);
+ rb_define_module_function(mCurses, "pair_number", curses_pair_number, 1);
+#endif /* USE_COLOR */
+#ifdef USE_MOUSE
+ rb_define_module_function(mCurses, "getmouse", curses_getmouse, 0);
+ rb_define_module_function(mCurses, "ungetmouse", curses_ungetmouse, 1);
+ rb_define_module_function(mCurses, "mouseinterval", curses_mouseinterval, 1);
+ rb_define_module_function(mCurses, "mousemask", curses_mousemask, 1);
+#endif /* USE_MOUSE */
+
+ rb_define_module_function(mCurses, "timeout=", curses_timeout, 1);
+ rb_define_module_function(mCurses, "def_prog_mode", curses_def_prog_mode, 0);
+ rb_define_module_function(mCurses, "reset_prog_mode", curses_reset_prog_mode, 0);
+
+ {
+ VALUE version;
+#if defined(HAVE_FUNC_CURSES_VERSION)
+ /* ncurses and PDcurses */
+ version = rb_str_new2(curses_version());
+#elif defined(HAVE_VAR_CURSES_VERSION)
+ /* SVR4 curses has an undocumented and undeclared variable, curses_version.
+ * It contains a string, "SVR4". */
+ RUBY_EXTERN char *curses_version;
+ version = rb_sprintf("curses (%s)", curses_version);
+#else
+ /* BSD curses, perhaps. NetBSD 5 still use it. */
+ version = rb_str_new2("curses (unknown)");
+#endif
+ /*
+ * Identifies curses library version.
+ *
+ * - "ncurses 5.9.20110404"
+ * - "PDCurses 3.4 - Public Domain 2008"
+ * - "curses (SVR4)" (System V curses)
+ * - "curses (unknown)" (The original BSD curses? NetBSD maybe.)
+ *
+ */
+ rb_define_const(mCurses, "VERSION", version);
+ }
+
+ /*
+ * Document-class: Curses::Window
+ *
+ * == Description
+ *
+ * The means by which to create and manage frames or windows.
+ * While there may be more than one window at a time, only one window
+ * will receive input.
+ *
+ * == Usage
+ *
+ * require 'curses'
+ *
+ * Curses.init_screen()
+ *
+ * my_str = "LOOK! PONIES!"
+ * win = Curses::Window.new( 8, (my_str.length + 10),
+ * (Curses.lines - 8) / 2,
+ * (Curses.cols - (my_str.length + 10)) / 2 )
+ * win.box("|", "-")
+ * win.setpos(2,3)
+ * win.addstr(my_str)
+ * # or even
+ * win << "\nORLY"
+ * win << "\nYES!! " + my_str
+ * win.refresh
+ * win.getch
+ * win.close
+ *
+ */
+ cWindow = rb_define_class_under(mCurses, "Window", rb_cData);
+ rb_define_alloc_func(cWindow, window_s_allocate);
+ rb_define_method(cWindow, "initialize", window_initialize, 4);
+ rb_define_method(cWindow, "subwin", window_subwin, 4);
+ rb_define_method(cWindow, "close", window_close, 0);
+ rb_define_method(cWindow, "clear", window_clear, 0);
+ rb_define_method(cWindow, "clrtoeol", window_clrtoeol, 0);
+ rb_define_method(cWindow, "refresh", window_refresh, 0);
+ rb_define_method(cWindow, "noutrefresh", window_noutrefresh, 0);
+ rb_define_method(cWindow, "box", window_box, -1);
+ rb_define_method(cWindow, "move", window_move, 2);
+ rb_define_method(cWindow, "setpos", window_setpos, 2);
+#if defined(USE_COLOR) && defined(HAVE_WCOLOR_SET)
+ rb_define_method(cWindow, "color_set", window_color_set, 1);
+#endif /* USE_COLOR && HAVE_WCOLOR_SET */
+ rb_define_method(cWindow, "cury", window_cury, 0);
+ rb_define_method(cWindow, "curx", window_curx, 0);
+ rb_define_method(cWindow, "maxy", window_maxy, 0);
+ rb_define_method(cWindow, "maxx", window_maxx, 0);
+ rb_define_method(cWindow, "begy", window_begy, 0);
+ rb_define_method(cWindow, "begx", window_begx, 0);
+ rb_define_method(cWindow, "standout", window_standout, 0);
+ rb_define_method(cWindow, "standend", window_standend, 0);
+ rb_define_method(cWindow, "inch", window_inch, 0);
+ rb_define_method(cWindow, "addch", window_addch, 1);
+ rb_define_method(cWindow, "insch", window_insch, 1);
+ rb_define_method(cWindow, "addstr", window_addstr, 1);
+ rb_define_method(cWindow, "<<", window_addstr2, 1);
+ rb_define_method(cWindow, "getch", window_getch, 0);
+ rb_define_method(cWindow, "getstr", window_getstr, 0);
+ rb_define_method(cWindow, "delch", window_delch, 0);
+ rb_define_method(cWindow, "deleteln", window_deleteln, 0);
+ rb_define_method(cWindow, "insertln", window_insertln, 0);
+ rb_define_method(cWindow, "scroll", window_scroll, 0);
+ rb_define_method(cWindow, "scrollok", window_scrollok, 1);
+ rb_define_method(cWindow, "idlok", window_idlok, 1);
+ rb_define_method(cWindow, "setscrreg", window_setscrreg, 2);
+ rb_define_method(cWindow, "scrl", window_scrl, 1);
+ rb_define_method(cWindow, "resize", window_resize, 2);
+ rb_define_method(cWindow, "keypad", window_keypad, 1);
+ rb_define_method(cWindow, "keypad=", window_keypad, 1);
+
+ rb_define_method(cWindow, "attroff", window_attroff, 1);
+ rb_define_method(cWindow, "attron", window_attron, 1);
+ rb_define_method(cWindow, "attrset", window_attrset, 1);
+ rb_define_method(cWindow, "bkgdset", window_bkgdset, 1);
+ rb_define_method(cWindow, "bkgd", window_bkgd, 1);
+ rb_define_method(cWindow, "getbkgd", window_getbkgd, 0);
+
+ rb_define_method(cWindow, "nodelay=", window_nodelay, 1);
+ rb_define_method(cWindow, "timeout=", window_timeout, 1);
+
+#ifdef HAVE_NEWPAD
+ /*
+ * Document-class: Curses::Pad
+ *
+ * == Description
+ *
+ * A Pad is like a Window but allows for scrolling of contents that cannot
+ * fit on the screen. Pads do not refresh automatically, use Pad#refresh
+ * or Pad#noutrefresh instead.
+ *
+ */
+ cPad = rb_define_class_under(mCurses, "Pad", cWindow);
+ /* inherits alloc_func from cWindow */
+ rb_define_method(cPad, "initialize", pad_initialize, 2);
+ rb_define_method(cPad, "subpad", pad_subpad, 4);
+ rb_define_method(cPad, "refresh", pad_refresh, 6);
+ rb_define_method(cPad, "noutrefresh", pad_noutrefresh, 6);
+ rb_undef_method(cPad, "subwin");
+#endif
+
+#define rb_curses_define_const(c) rb_define_const(mCurses,#c,UINT2NUM(c))
+
+#ifdef USE_COLOR
+ /* Document-const: A_ATTRIBUTES
+ *
+ * Character attribute mask:
+ * Bit-mask to extract attributes
+ *
+ * See Curses.inch or Curses::Window.inch
+ */
+ rb_curses_define_const(A_ATTRIBUTES);
+#ifdef A_NORMAL
+ /* Document-const: A_NORMAL
+ *
+ * Attribute mask:
+ * Normal display (no highlight)
+ *
+ * See Curses.attrset
+ */
+ rb_curses_define_const(A_NORMAL);
+#endif
+ /* Document-const: A_STANDOUT
+ *
+ * Attribute mask:
+ * Best highlighting mode of the terminal.
+ *
+ * See Curses.attrset
+ */
+ rb_curses_define_const(A_STANDOUT);
+ /* Document-const: A_UNDERLINE
+ *
+ * Attribute mask:
+ * Underlining
+ *
+ * See Curses.attrset
+ */
+ rb_curses_define_const(A_UNDERLINE);
+ /* Document-const: A_REVERSE
+ *
+ * Attribute mask:
+ * Reverse video
+ *
+ * See Curses.attrset
+ */
+ rb_curses_define_const(A_REVERSE);
+ /* Document-const: A_BLINK
+ *
+ * Attribute mask:
+ * Blinking
+ *
+ * See Curses.attrset
+ */
+ rb_curses_define_const(A_BLINK);
+ /* Document-const: A_DIM
+ *
+ * Attribute mask:
+ * Half bright
+ *
+ * See Curses.attrset
+ */
+ rb_curses_define_const(A_DIM);
+ /* Document-const: A_BOLD
+ *
+ * Attribute mask:
+ * Extra bright or bold
+ *
+ * See Curses.attrset
+ */
+ rb_curses_define_const(A_BOLD);
+ /* Document-const: A_PROTECT
+ *
+ * Attribute mask:
+ * Protected mode
+ *
+ * See Curses.attrset
+ */
+ rb_curses_define_const(A_PROTECT);
+#ifdef A_INVIS /* for NetBSD */
+ /* Document-const: A_INVIS
+ *
+ * Attribute mask:
+ * Invisible or blank mode
+ *
+ * See Curses.attrset
+ */
+ rb_curses_define_const(A_INVIS);
+#endif
+ /* Document-const: A_ALTCHARSET
+ *
+ * Attribute mask:
+ * Alternate character set
+ *
+ * See Curses.attrset
+ */
+ rb_curses_define_const(A_ALTCHARSET);
+ /* Document-const: A_CHARTEXT
+ *
+ * Attribute mask:
+ * Bit-mask to extract a character
+ *
+ * See Curses.attrset
+ */
+ rb_curses_define_const(A_CHARTEXT);
+#ifdef A_HORIZONTAL
+ /* Document-const: A_HORIZONTAL
+ *
+ * Attribute mask:
+ * horizontal highlight
+ *
+ * Check system curs_attr(3x) for support
+ */
+ rb_curses_define_const(A_HORIZONTAL);
+#endif
+#ifdef A_LEFT
+ /* Document-const: A_LEFT
+ *
+ * Attribute mask:
+ * left highlight
+ *
+ * Check system curs_attr(3x) for support
+ */
+ rb_curses_define_const(A_LEFT);
+#endif
+#ifdef A_LOW
+ /* Document-const: A_LOW
+ *
+ * Attribute mask:
+ * low highlight
+ *
+ * Check system curs_attr(3x) for support
+ */
+ rb_curses_define_const(A_LOW);
+#endif
+#ifdef A_RIGHT
+ /* Document-const: A_RIGHT
+ *
+ * Attribute mask:
+ * right highlight
+ *
+ * Check system curs_attr(3x) for support
+ */
+ rb_curses_define_const(A_RIGHT);
+#endif
+#ifdef A_TOP
+ /* Document-const: A_TOP
+ *
+ * Attribute mask:
+ * top highlight
+ *
+ * Check system curs_attr(3x) for support
+ */
+ rb_curses_define_const(A_TOP);
+#endif
+#ifdef A_VERTICAL
+ /* Document-const: A_VERTICAL
+ *
+ * Attribute mask:
+ * vertical highlight
+ *
+ * Check system curs_attr(3x) for support
+ */
+ rb_curses_define_const(A_VERTICAL);
+#endif
+ /* Document-const: A_COLOR
+ *
+ * Character attribute mask:
+ * Bit-mask to extract color-pair field information
+ *
+ * See Curses.inch or Curses::Window.inch
+ */
+ rb_curses_define_const(A_COLOR);
+
+#ifdef COLORS
+ /*
+ * Document-const: Curses::COLORS
+ *
+ * Number of the colors available
+ */
+ rb_curses_define_const(COLORS);
+#endif
+ /*
+ * Document-const: Curses::COLOR_BLACK
+ *
+ * Value of the color black
+ */
+ rb_curses_define_const(COLOR_BLACK);
+ /*
+ * Document-const: COLOR_RED
+ *
+ * Value of the color red
+ */
+ rb_curses_define_const(COLOR_RED);
+ /*
+ * Document-const: COLOR_GREEN
+ *
+ * Value of the color green
+ */
+ rb_curses_define_const(COLOR_GREEN);
+ /*
+ * Document-const: COLOR_YELLOW
+ *
+ * Value of the color yellow
+ */
+ rb_curses_define_const(COLOR_YELLOW);
+ /*
+ * Document-const: COLOR_BLUE
+ *
+ * Value of the color blue
+ */
+ rb_curses_define_const(COLOR_BLUE);
+ /*
+ * Document-const: COLOR_MAGENTA
+ *
+ * Value of the color magenta
+ */
+ rb_curses_define_const(COLOR_MAGENTA);
+ /*
+ * Document-const: COLOR_CYAN
+ *
+ * Value of the color cyan
+ */
+ rb_curses_define_const(COLOR_CYAN);
+ /*
+ * Document-const: COLOR_WHITE
+ *
+ * Value of the color white
+ */
+ rb_curses_define_const(COLOR_WHITE);
+#endif /* USE_COLOR */
+#ifdef USE_MOUSE
+#ifdef BUTTON1_PRESSED
+ /* Document-const: BUTTON1_PRESSED
+ *
+ * Mouse event mask:
+ * mouse button 1 down
+ *
+ * See Curses.getmouse
+ */
+ rb_curses_define_const(BUTTON1_PRESSED);
+#endif
+#ifdef BUTTON1_RELEASED
+ /* Document-const: BUTTON1_RELEASED
+ *
+ * Mouse event mask:
+ * mouse button 1 up
+ *
+ * See Curses.getmouse
+ */
+ rb_curses_define_const(BUTTON1_RELEASED);
+#endif
+#ifdef BUTTON1_CLICKED
+ /* Document-const: BUTTON1_CLICKED
+ *
+ * Mouse event mask:
+ * mouse button 1 clicked
+ *
+ * See Curses.getmouse
+ */
+ rb_curses_define_const(BUTTON1_CLICKED);
+#endif
+#ifdef BUTTON1_DOUBLE_CLICKED
+ /* Document-const: BUTTON1_DOUBLE_CLICKED
+ *
+ * Mouse event mask:
+ * mouse button 1 double clicked
+ *
+ * See Curses.getmouse
+ */
+ rb_curses_define_const(BUTTON1_DOUBLE_CLICKED);
+#endif
+#ifdef BUTTON1_TRIPLE_CLICKED
+ /* Document-const: BUTTON1_TRIPLE_CLICKED
+ *
+ * Mouse event mask:
+ * mouse button 1 triple clicked
+ *
+ * See Curses.getmouse
+ */
+ rb_curses_define_const(BUTTON1_TRIPLE_CLICKED);
+#endif
+#ifdef BUTTON2_PRESSED
+ /* Document-const: BUTTON2_PRESSED
+ *
+ * Mouse event mask:
+ * mouse button 2 down
+ *
+ * See Curses.getmouse
+ */
+ rb_curses_define_const(BUTTON2_PRESSED);
+#endif
+#ifdef BUTTON2_RELEASED
+ /* Document-const: BUTTON2_RELEASED
+ *
+ * Mouse event mask:
+ * mouse button 2 up
+ *
+ * See Curses.getmouse
+ */
+ rb_curses_define_const(BUTTON2_RELEASED);
+#endif
+#ifdef BUTTON2_CLICKED
+ /* Document-const: BUTTON2_CLICKED
+ *
+ * Mouse event mask:
+ * mouse button 2 clicked
+ *
+ * See Curses.getmouse
+ */
+ rb_curses_define_const(BUTTON2_CLICKED);
+#endif
+#ifdef BUTTON2_DOUBLE_CLICKED
+ /* Document-const: BUTTON2_DOUBLE_CLICKED
+ *
+ * Mouse event mask:
+ * mouse button 2 double clicked
+ *
+ * See Curses.getmouse
+ */
+ rb_curses_define_const(BUTTON2_DOUBLE_CLICKED);
+#endif
+#ifdef BUTTON2_TRIPLE_CLICKED
+ /* Document-const: BUTTON2_TRIPLE_CLICKED
+ *
+ * Mouse event mask:
+ * mouse button 2 triple clicked
+ *
+ * See Curses.getmouse
+ */
+ rb_curses_define_const(BUTTON2_TRIPLE_CLICKED);
+#endif
+#ifdef BUTTON3_PRESSED
+ /* Document-const: BUTTON3_PRESSED
+ *
+ * Mouse event mask:
+ * mouse button 3 down
+ *
+ * See Curses.getmouse
+ */
+ rb_curses_define_const(BUTTON3_PRESSED);
+#endif
+#ifdef BUTTON3_RELEASED
+ /* Document-const: BUTTON3_RELEASED
+ *
+ * Mouse event mask:
+ * mouse button 3 up
+ *
+ * See Curses.getmouse
+ */
+ rb_curses_define_const(BUTTON3_RELEASED);
+#endif
+#ifdef BUTTON3_CLICKED
+ /* Document-const: BUTTON3_CLICKED
+ *
+ * Mouse event mask:
+ * mouse button 3 clicked
+ *
+ * See Curses.getmouse
+ */
+ rb_curses_define_const(BUTTON3_CLICKED);
+#endif
+#ifdef BUTTON3_DOUBLE_CLICKED
+ /* Document-const: BUTTON3_DOUBLE_CLICKED
+ *
+ * Mouse event mask:
+ * mouse button 3 double clicked
+ *
+ * See Curses.getmouse
+ */
+ rb_curses_define_const(BUTTON3_DOUBLE_CLICKED);
+#endif
+#ifdef BUTTON3_TRIPLE_CLICKED
+ /* Document-const: BUTTON3_TRIPLE_CLICKED
+ *
+ * Mouse event mask:
+ * mouse button 3 triple clicked
+ *
+ * See Curses.getmouse
+ */
+ rb_curses_define_const(BUTTON3_TRIPLE_CLICKED);
+#endif
+#ifdef BUTTON4_PRESSED
+ /* Document-const: BUTTON4_PRESSED
+ *
+ * Mouse event mask:
+ * mouse button 4 down
+ *
+ * See Curses.getmouse
+ */
+ rb_curses_define_const(BUTTON4_PRESSED);
+#endif
+#ifdef BUTTON4_RELEASED
+ /* Document-const: BUTTON4_RELEASED
+ *
+ * Mouse event mask:
+ * mouse button 4 up
+ *
+ * See Curses.getmouse
+ */
+ rb_curses_define_const(BUTTON4_RELEASED);
+#endif
+#ifdef BUTTON4_CLICKED
+ /* Document-const: BUTTON4_CLICKED
+ *
+ * Mouse event mask:
+ * mouse button 4 clicked
+ *
+ * See Curses.getmouse
+ */
+ rb_curses_define_const(BUTTON4_CLICKED);
+#endif
+#ifdef BUTTON4_DOUBLE_CLICKED
+ /* Document-const: BUTTON4_DOUBLE_CLICKED
+ *
+ * Mouse event mask:
+ * mouse button 4 double clicked
+ *
+ * See Curses.getmouse
+ */
+ rb_curses_define_const(BUTTON4_DOUBLE_CLICKED);
+#endif
+#ifdef BUTTON4_TRIPLE_CLICKED
+ /* Document-const: BUTTON4_TRIPLE_CLICKED
+ *
+ * Mouse event mask:
+ * mouse button 4 triple clicked
+ *
+ * See Curses.getmouse
+ */
+ rb_curses_define_const(BUTTON4_TRIPLE_CLICKED);
+#endif
+#ifdef BUTTON_SHIFT
+ /* Document-const: BUTTON_SHIFT
+ *
+ * Mouse event mask:
+ * shift was down during button state change
+ *
+ * See Curses.getmouse
+ */
+ rb_curses_define_const(BUTTON_SHIFT);
+#endif
+#ifdef BUTTON_CTRL
+ /* Document-const: BUTTON_CTRL
+ *
+ * Mouse event mask:
+ * control was down during button state change
+ *
+ * See Curses.getmouse
+ */
+ rb_curses_define_const(BUTTON_CTRL);
+#endif
+#ifdef BUTTON_ALT
+ /* Document-const: BUTTON_ALT
+ *
+ * Mouse event mask:
+ * alt was down during button state change
+ *
+ * See Curses.getmouse
+ */
+ rb_curses_define_const(BUTTON_ALT);
+#endif
+#ifdef ALL_MOUSE_EVENTS
+ /* Document-const: ALL_MOUSE_EVENTS
+ *
+ * Mouse event mask:
+ * report all button state changes
+ *
+ * See Curses.getmouse
+ */
+ rb_curses_define_const(ALL_MOUSE_EVENTS);
+#endif
+#ifdef REPORT_MOUSE_POSITION
+ /* Document-const: REPORT_MOUSE_POSITION
+ *
+ * Mouse event mask:
+ * report mouse movement
+ *
+ * See Curses.getmouse
+ */
+ rb_curses_define_const(REPORT_MOUSE_POSITION);
+#endif
+#endif /* USE_MOUSE */
+
+#if defined(KEY_MOUSE) && defined(USE_MOUSE)
+ /* Document-const: KEY_MOUSE
+ * Mouse event read
+ */
+ /* Document-const: MOUSE
+ * Mouse event read
+ */
+ rb_curses_define_const(KEY_MOUSE);
+ rb_define_const(mKey, "MOUSE", INT2NUM(KEY_MOUSE));
+#endif
+#ifdef KEY_MIN
+ /* Document-const: KEY_MIN
+ * The minimum allowed curses key value.
+ */
+ /* Document-const: MIN
+ * The minimum allowed curses key value.
+ */
+ rb_curses_define_const(KEY_MIN);
+ rb_define_const(mKey, "MIN", INT2NUM(KEY_MIN));
+#endif
+#ifdef KEY_BREAK
+ /* Document-const: KEY_BREAK
+ * Break key
+ */
+ /* Document-const: BREAK
+ * Break key
+ */
+ rb_curses_define_const(KEY_BREAK);
+ rb_define_const(mKey, "BREAK", INT2NUM(KEY_BREAK));
+#endif
+#ifdef KEY_DOWN
+ /* Document-const: KEY_DOWN
+ * the down arrow key
+ */
+ /* Document-const: DOWN
+ * the down arrow key
+ */
+ rb_curses_define_const(KEY_DOWN);
+ rb_define_const(mKey, "DOWN", INT2NUM(KEY_DOWN));
+#endif
+#ifdef KEY_UP
+ /* Document-const: KEY_UP
+ * the up arrow key
+ */
+ /* Document-const: UP
+ * the up arrow key
+ */
+ rb_curses_define_const(KEY_UP);
+ rb_define_const(mKey, "UP", INT2NUM(KEY_UP));
+#endif
+#ifdef KEY_LEFT
+ /* Document-const: KEY_LEFT
+ * the left arrow key
+ */
+ /* Document-const: LEFT
+ * the left arrow key
+ */
+ rb_curses_define_const(KEY_LEFT);
+ rb_define_const(mKey, "LEFT", INT2NUM(KEY_LEFT));
+#endif
+#ifdef KEY_RIGHT
+ /* Document-const: KEY_RIGHT
+ * the right arrow key
+ */
+ /* Document-const: RIGHT
+ * the right arrow key
+ */
+ rb_curses_define_const(KEY_RIGHT);
+ rb_define_const(mKey, "RIGHT", INT2NUM(KEY_RIGHT));
+#endif
+#ifdef KEY_HOME
+ /* Document-const: KEY_HOME
+ * Home key (upward+left arrow)
+ */
+ /* Document-const: HOME
+ * Home key (upward+left arrow)
+ */
+ rb_curses_define_const(KEY_HOME);
+ rb_define_const(mKey, "HOME", INT2NUM(KEY_HOME));
+#endif
+#ifdef KEY_BACKSPACE
+ /* Document-const: KEY_BACKSPACE
+ * Backspace
+ */
+ /* Document-const: BACKSPACE
+ * Backspace
+ */
+ rb_curses_define_const(KEY_BACKSPACE);
+ rb_define_const(mKey, "BACKSPACE", INT2NUM(KEY_BACKSPACE));
+#endif
+#ifdef KEY_F
+ /* KEY_F(n) : 0 <= n <= 63 */
+ {
+ int i;
+ char c[8];
+ for (i=0; i<64; i++) {
+ sprintf(c, "KEY_F%d", i);
+ rb_define_const(mCurses, c, INT2NUM(KEY_F(i)));
+ sprintf(c, "F%d", i);
+ rb_define_const(mKey, c, INT2NUM(KEY_F(i)));
+ }
+ }
+#endif
+#ifdef KEY_DL
+ /* Document-const: KEY_DL
+ * Delete line
+ */
+ /* Document-const: DL
+ * Delete line
+ */
+ rb_curses_define_const(KEY_DL);
+ rb_define_const(mKey, "DL", INT2NUM(KEY_DL));
+#endif
+#ifdef KEY_IL
+ /* Document-const: KEY_IL
+ * Insert line
+ */
+ /* Document-const: IL
+ * Insert line
+ */
+ rb_curses_define_const(KEY_IL);
+ rb_define_const(mKey, "IL", INT2NUM(KEY_IL));
+#endif
+#ifdef KEY_DC
+ /* Document-const: KEY_DC
+ * Delete character
+ */
+ /* Document-const: DC
+ * Delete character
+ */
+ rb_curses_define_const(KEY_DC);
+ rb_define_const(mKey, "DC", INT2NUM(KEY_DC));
+#endif
+#ifdef KEY_IC
+ /* Document-const: KEY_IC
+ * Insert char or enter insert mode
+ */
+ /* Document-const: IC
+ * Insert char or enter insert mode
+ */
+ rb_curses_define_const(KEY_IC);
+ rb_define_const(mKey, "IC", INT2NUM(KEY_IC));
+#endif
+#ifdef KEY_EIC
+ /* Document-const: KEY_EIC
+ * Enter insert char mode
+ */
+ /* Document-const: EIC
+ * Enter insert char mode
+ */
+ rb_curses_define_const(KEY_EIC);
+ rb_define_const(mKey, "EIC", INT2NUM(KEY_EIC));
+#endif
+#ifdef KEY_CLEAR
+ /* Document-const: KEY_CLEAR
+ * Clear Screen
+ */
+ /* Document-const: CLEAR
+ * Clear Screen
+ */
+ rb_curses_define_const(KEY_CLEAR);
+ rb_define_const(mKey, "CLEAR", INT2NUM(KEY_CLEAR));
+#endif
+#ifdef KEY_EOS
+ /* Document-const: KEY_EOS
+ * Clear to end of screen
+ */
+ /* Document-const: EOS
+ * Clear to end of screen
+ */
+ rb_curses_define_const(KEY_EOS);
+ rb_define_const(mKey, "EOS", INT2NUM(KEY_EOS));
+#endif
+#ifdef KEY_EOL
+ /* Document-const: KEY_EOL
+ * Clear to end of line
+ */
+ /* Document-const: EOL
+ * Clear to end of line
+ */
+ rb_curses_define_const(KEY_EOL);
+ rb_define_const(mKey, "EOL", INT2NUM(KEY_EOL));
+#endif
+#ifdef KEY_SF
+ /* Document-const: KEY_SF
+ * Scroll 1 line forward
+ */
+ /* Document-const: SF
+ * Scroll 1 line forward
+ */
+ rb_curses_define_const(KEY_SF);
+ rb_define_const(mKey, "SF", INT2NUM(KEY_SF));
+#endif
+#ifdef KEY_SR
+ /* Document-const: KEY_SR
+ * Scroll 1 line backware (reverse)
+ */
+ /* Document-const: SR
+ * Scroll 1 line backware (reverse)
+ */
+ rb_curses_define_const(KEY_SR);
+ rb_define_const(mKey, "SR", INT2NUM(KEY_SR));
+#endif
+#ifdef KEY_NPAGE
+ /* Document-const: KEY_NPAGE
+ * Next page
+ */
+ /* Document-const: NPAGE
+ * Next page
+ */
+ rb_curses_define_const(KEY_NPAGE);
+ rb_define_const(mKey, "NPAGE", INT2NUM(KEY_NPAGE));
+#endif
+#ifdef KEY_PPAGE
+ /* Document-const: KEY_PPAGE
+ * Previous page
+ */
+ /* Document-const: PPAGE
+ * Previous page
+ */
+ rb_curses_define_const(KEY_PPAGE);
+ rb_define_const(mKey, "PPAGE", INT2NUM(KEY_PPAGE));
+#endif
+#ifdef KEY_STAB
+ /* Document-const: KEY_STAB
+ * Set tab
+ */
+ /* Document-const: STAB
+ * Set tab
+ */
+ rb_curses_define_const(KEY_STAB);
+ rb_define_const(mKey, "STAB", INT2NUM(KEY_STAB));
+#endif
+#ifdef KEY_CTAB
+ /* Document-const: KEY_CTAB
+ * Clear tab
+ */
+ /* Document-const: CTAB
+ * Clear tab
+ */
+ rb_curses_define_const(KEY_CTAB);
+ rb_define_const(mKey, "CTAB", INT2NUM(KEY_CTAB));
+#endif
+#ifdef KEY_CATAB
+ /* Document-const: KEY_CATAB
+ * Clear all tabs
+ */
+ /* Document-const: CATAB
+ * Clear all tabs
+ */
+ rb_curses_define_const(KEY_CATAB);
+ rb_define_const(mKey, "CATAB", INT2NUM(KEY_CATAB));
+#endif
+#ifdef KEY_ENTER
+ /* Document-const: KEY_ENTER
+ * Enter or send
+ */
+ /* Document-const: ENTER
+ * Enter or send
+ */
+ rb_curses_define_const(KEY_ENTER);
+ rb_define_const(mKey, "ENTER", INT2NUM(KEY_ENTER));
+#endif
+#ifdef KEY_SRESET
+ /* Document-const: KEY_SRESET
+ * Soft (partial) reset
+ */
+ /* Document-const: SRESET
+ * Soft (partial) reset
+ */
+ rb_curses_define_const(KEY_SRESET);
+ rb_define_const(mKey, "SRESET", INT2NUM(KEY_SRESET));
+#endif
+#ifdef KEY_RESET
+ /* Document-const: KEY_RESET
+ * Reset or hard reset
+ */
+ /* Document-const: RESET
+ * Reset or hard reset
+ */
+ rb_curses_define_const(KEY_RESET);
+ rb_define_const(mKey, "RESET", INT2NUM(KEY_RESET));
+#endif
+#ifdef KEY_PRINT
+ /* Document-const: KEY_PRINT
+ * Print or copy
+ */
+ /* Document-const: PRINT
+ * Print or copy
+ */
+ rb_curses_define_const(KEY_PRINT);
+ rb_define_const(mKey, "PRINT", INT2NUM(KEY_PRINT));
+#endif
+#ifdef KEY_LL
+ /* Document-const: KEY_LL
+ * Home down or bottom (lower left)
+ */
+ /* Document-const: LL
+ * Home down or bottom (lower left)
+ */
+ rb_curses_define_const(KEY_LL);
+ rb_define_const(mKey, "LL", INT2NUM(KEY_LL));
+#endif
+#ifdef KEY_A1
+ /* Document-const: KEY_A1
+ * Upper left of keypad
+ */
+ /* Document-const: A1
+ * Upper left of keypad
+ */
+ rb_curses_define_const(KEY_A1);
+ rb_define_const(mKey, "A1", INT2NUM(KEY_A1));
+#endif
+#ifdef KEY_A3
+ /* Document-const: KEY_A3
+ * Upper right of keypad
+ */
+ /* Document-const: A3
+ * Upper right of keypad
+ */
+ rb_curses_define_const(KEY_A3);
+ rb_define_const(mKey, "A3", INT2NUM(KEY_A3));
+#endif
+#ifdef KEY_B2
+ /* Document-const: KEY_B2
+ * Center of keypad
+ */
+ /* Document-const: B2
+ * Center of keypad
+ */
+ rb_curses_define_const(KEY_B2);
+ rb_define_const(mKey, "B2", INT2NUM(KEY_B2));
+#endif
+#ifdef KEY_C1
+ /* Document-const: KEY_C1
+ * Lower left of keypad
+ */
+ /* Document-const: C1
+ * Lower left of keypad
+ */
+ rb_curses_define_const(KEY_C1);
+ rb_define_const(mKey, "C1", INT2NUM(KEY_C1));
+#endif
+#ifdef KEY_C3
+ /* Document-const: KEY_C3
+ * Lower right of keypad
+ */
+ /* Document-const: C3
+ * Lower right of keypad
+ */
+ rb_curses_define_const(KEY_C3);
+ rb_define_const(mKey, "C3", INT2NUM(KEY_C3));
+#endif
+#ifdef KEY_BTAB
+ /* Document-const: BTAB
+ * Back tab key
+ */
+ /* Document-const: KEY_BTAB
+ * Back tab key
+ */
+ rb_curses_define_const(KEY_BTAB);
+ rb_define_const(mKey, "BTAB", INT2NUM(KEY_BTAB));
+#endif
+#ifdef KEY_BEG
+ /* Document-const: KEY_BEG
+ * Beginning key
+ */
+ /* Document-const: BEG
+ * Beginning key
+ */
+ rb_curses_define_const(KEY_BEG);
+ rb_define_const(mKey, "BEG", INT2NUM(KEY_BEG));
+#endif
+#ifdef KEY_CANCEL
+ /* Document-const: KEY_CANCEL
+ * Cancel key
+ */
+ /* Document-const: CANCEL
+ * Cancel key
+ */
+ rb_curses_define_const(KEY_CANCEL);
+ rb_define_const(mKey, "CANCEL", INT2NUM(KEY_CANCEL));
+#endif
+#ifdef KEY_CLOSE
+ /* Document-const: KEY_CLOSE
+ * Close key
+ */
+ /* Document-const: CLOSE
+ * Close key
+ */
+ rb_curses_define_const(KEY_CLOSE);
+ rb_define_const(mKey, "CLOSE", INT2NUM(KEY_CLOSE));
+#endif
+#ifdef KEY_COMMAND
+ /* Document-const: KEY_COMMAND
+ * Cmd (command) key
+ */
+ /* Document-const: COMMAND
+ * Cmd (command) key
+ */
+ rb_curses_define_const(KEY_COMMAND);
+ rb_define_const(mKey, "COMMAND", INT2NUM(KEY_COMMAND));
+#endif
+#ifdef KEY_COPY
+ /* Document-const: KEY_COPY
+ * Copy key
+ */
+ /* Document-const: COPY
+ * Copy key
+ */
+ rb_curses_define_const(KEY_COPY);
+ rb_define_const(mKey, "COPY", INT2NUM(KEY_COPY));
+#endif
+#ifdef KEY_CREATE
+ /* Document-const: KEY_CREATE
+ * Create key
+ */
+ /* Document-const: CREATE
+ * Create key
+ */
+ rb_curses_define_const(KEY_CREATE);
+ rb_define_const(mKey, "CREATE", INT2NUM(KEY_CREATE));
+#endif
+#ifdef KEY_END
+ /* Document-const: KEY_END
+ * End key
+ */
+ /* Document-const: END
+ * End key
+ */
+ rb_curses_define_const(KEY_END);
+ rb_define_const(mKey, "END", INT2NUM(KEY_END));
+#endif
+#ifdef KEY_EXIT
+ /* Document-const: KEY_EXIT
+ * Exit key
+ */
+ /* Document-const: EXIT
+ * Exit key
+ */
+ rb_curses_define_const(KEY_EXIT);
+ rb_define_const(mKey, "EXIT", INT2NUM(KEY_EXIT));
+#endif
+#ifdef KEY_FIND
+ /* Document-const: KEY_FIND
+ * Find key
+ */
+ /* Document-const: FIND
+ * Find key
+ */
+ rb_curses_define_const(KEY_FIND);
+ rb_define_const(mKey, "FIND", INT2NUM(KEY_FIND));
+#endif
+#ifdef KEY_HELP
+ /* Document-const: KEY_HELP
+ * Help key
+ */
+ /* Document-const: HELP
+ * Help key
+ */
+ rb_curses_define_const(KEY_HELP);
+ rb_define_const(mKey, "HELP", INT2NUM(KEY_HELP));
+#endif
+#ifdef KEY_MARK
+ /* Document-const: KEY_MARK
+ * Mark key
+ */
+ /* Document-const: MARK
+ * Mark key
+ */
+ rb_curses_define_const(KEY_MARK);
+ rb_define_const(mKey, "MARK", INT2NUM(KEY_MARK));
+#endif
+#ifdef KEY_MESSAGE
+ /* Document-const: KEY_MESSAGE
+ * Message key
+ */
+ /* Document-const: MESSAGE
+ * Message key
+ */
+ rb_curses_define_const(KEY_MESSAGE);
+ rb_define_const(mKey, "MESSAGE", INT2NUM(KEY_MESSAGE));
+#endif
+#ifdef KEY_MOVE
+ /* Document-const: KEY_MOVE
+ * Move key
+ */
+ /* Document-const: MOVE
+ * Move key
+ */
+ rb_curses_define_const(KEY_MOVE);
+ rb_define_const(mKey, "MOVE", INT2NUM(KEY_MOVE));
+#endif
+#ifdef KEY_NEXT
+ /* Document-const: KEY_NEXT
+ * Next object key
+ */
+ /* Document-const: NEXT
+ * Next object key
+ */
+ rb_curses_define_const(KEY_NEXT);
+ rb_define_const(mKey, "NEXT", INT2NUM(KEY_NEXT));
+#endif
+#ifdef KEY_OPEN
+ /* Document-const: KEY_OPEN
+ * Open key
+ */
+ /* Document-const: OPEN
+ * Open key
+ */
+ rb_curses_define_const(KEY_OPEN);
+ rb_define_const(mKey, "OPEN", INT2NUM(KEY_OPEN));
+#endif
+#ifdef KEY_OPTIONS
+ /* Document-const: KEY_OPTIONS
+ * Options key
+ */
+ /* Document-const: OPTIONS
+ * Options key
+ */
+ rb_curses_define_const(KEY_OPTIONS);
+ rb_define_const(mKey, "OPTIONS", INT2NUM(KEY_OPTIONS));
+#endif
+#ifdef KEY_PREVIOUS
+ /* Document-const: KEY_PREVIOUS
+ * Previous object key
+ */
+ /* Document-const: PREVIOUS
+ * Previous object key
+ */
+ rb_curses_define_const(KEY_PREVIOUS);
+ rb_define_const(mKey, "PREVIOUS", INT2NUM(KEY_PREVIOUS));
+#endif
+#ifdef KEY_REDO
+ /* Document-const: KEY_REDO
+ * Redo key
+ */
+ /* Document-const: REDO
+ * Redo key
+ */
+ rb_curses_define_const(KEY_REDO);
+ rb_define_const(mKey, "REDO", INT2NUM(KEY_REDO));
+#endif
+#ifdef KEY_REFERENCE
+ /* Document-const: KEY_REFERENCE
+ * Reference key
+ */
+ /* Document-const: REFERENCE
+ * Reference key
+ */
+ rb_curses_define_const(KEY_REFERENCE);
+ rb_define_const(mKey, "REFERENCE", INT2NUM(KEY_REFERENCE));
+#endif
+#ifdef KEY_REFRESH
+ /* Document-const: KEY_REFRESH
+ * Refresh key
+ */
+ /* Document-const: REFRESH
+ * Refresh key
+ */
+ rb_curses_define_const(KEY_REFRESH);
+ rb_define_const(mKey, "REFRESH", INT2NUM(KEY_REFRESH));
+#endif
+#ifdef KEY_REPLACE
+ /* Document-const: KEY_REPLACE
+ * Replace key
+ */
+ /* Document-const: REPLACE
+ * Replace key
+ */
+ rb_curses_define_const(KEY_REPLACE);
+ rb_define_const(mKey, "REPLACE", INT2NUM(KEY_REPLACE));
+#endif
+#ifdef KEY_RESTART
+ /* Document-const: KEY_RESTART
+ * Restart key
+ */
+ /* Document-const: RESTART
+ * Restart key
+ */
+ rb_curses_define_const(KEY_RESTART);
+ rb_define_const(mKey, "RESTART", INT2NUM(KEY_RESTART));
+#endif
+#ifdef KEY_RESUME
+ /* Document-const: KEY_RESUME
+ * Resume key
+ */
+ /* Document-const: RESUME
+ * Resume key
+ */
+ rb_curses_define_const(KEY_RESUME);
+ rb_define_const(mKey, "RESUME", INT2NUM(KEY_RESUME));
+#endif
+#ifdef KEY_SAVE
+ /* Document-const: KEY_SAVE
+ * Save key
+ */
+ /* Document-const: SAVE
+ * Save key
+ */
+ rb_curses_define_const(KEY_SAVE);
+ rb_define_const(mKey, "SAVE", INT2NUM(KEY_SAVE));
+#endif
+#ifdef KEY_SBEG
+ /* Document-const: KEY_SBEG
+ * Shifted beginning key
+ */
+ /* Document-const: SBEG
+ * Shifted beginning key
+ */
+ rb_curses_define_const(KEY_SBEG);
+ rb_define_const(mKey, "SBEG", INT2NUM(KEY_SBEG));
+#endif
+#ifdef KEY_SCANCEL
+ /* Document-const: KEY_SCANCEL
+ * Shifted cancel key
+ */
+ /* Document-const: SCANCEL
+ * Shifted cancel key
+ */
+ rb_curses_define_const(KEY_SCANCEL);
+ rb_define_const(mKey, "SCANCEL", INT2NUM(KEY_SCANCEL));
+#endif
+#ifdef KEY_SCOMMAND
+ /* Document-const: KEY_SCOMMAND
+ * Shifted command key
+ */
+ /* Document-const: SCOMMAND
+ * Shifted command key
+ */
+ rb_curses_define_const(KEY_SCOMMAND);
+ rb_define_const(mKey, "SCOMMAND", INT2NUM(KEY_SCOMMAND));
+#endif
+#ifdef KEY_SCOPY
+ /* Document-const: KEY_SCOPY
+ * Shifted copy key
+ */
+ /* Document-const: SCOPY
+ * Shifted copy key
+ */
+ rb_curses_define_const(KEY_SCOPY);
+ rb_define_const(mKey, "SCOPY", INT2NUM(KEY_SCOPY));
+#endif
+#ifdef KEY_SCREATE
+ /* Document-const: KEY_SCREATE
+ * Shifted create key
+ */
+ /* Document-const: SCREATE
+ * Shifted create key
+ */
+ rb_curses_define_const(KEY_SCREATE);
+ rb_define_const(mKey, "SCREATE", INT2NUM(KEY_SCREATE));
+#endif
+#ifdef KEY_SDC
+ /* Document-const: KEY_SDC
+ * Shifted delete char key
+ */
+ /* Document-const: SDC
+ * Shifted delete char key
+ */
+ rb_curses_define_const(KEY_SDC);
+ rb_define_const(mKey, "SDC", INT2NUM(KEY_SDC));
+#endif
+#ifdef KEY_SDL
+ /* Document-const: KEY_SDL
+ * Shifted delete line key
+ */
+ /* Document-const: SDL
+ * Shifted delete line key
+ */
+ rb_curses_define_const(KEY_SDL);
+ rb_define_const(mKey, "SDL", INT2NUM(KEY_SDL));
+#endif
+#ifdef KEY_SELECT
+ /* Document-const: KEY_SELECT
+ * Select key
+ */
+ /* Document-const: SELECT
+ * Select key
+ */
+ rb_curses_define_const(KEY_SELECT);
+ rb_define_const(mKey, "SELECT", INT2NUM(KEY_SELECT));
+#endif
+#ifdef KEY_SEND
+ /* Document-const: KEY_SEND
+ * Shifted end key
+ */
+ /* Document-const: SEND
+ * Shifted end key
+ */
+ rb_curses_define_const(KEY_SEND);
+ rb_define_const(mKey, "SEND", INT2NUM(KEY_SEND));
+#endif
+#ifdef KEY_SEOL
+ /* Document-const: KEY_SEOL
+ * Shifted clear line key
+ */
+ /* Document-const: SEOL
+ * Shifted clear line key
+ */
+ rb_curses_define_const(KEY_SEOL);
+ rb_define_const(mKey, "SEOL", INT2NUM(KEY_SEOL));
+#endif
+#ifdef KEY_SEXIT
+ /* Document-const: KEY_SEXIT
+ * Shifted exit key
+ */
+ /* Document-const: SEXIT
+ * Shifted exit key
+ */
+ rb_curses_define_const(KEY_SEXIT);
+ rb_define_const(mKey, "SEXIT", INT2NUM(KEY_SEXIT));
+#endif
+#ifdef KEY_SFIND
+ /* Document-const: KEY_SFIND
+ * Shifted find key
+ */
+ /* Document-const: SFIND
+ * Shifted find key
+ */
+ rb_curses_define_const(KEY_SFIND);
+ rb_define_const(mKey, "SFIND", INT2NUM(KEY_SFIND));
+#endif
+#ifdef KEY_SHELP
+ /* Document-const: KEY_SHELP
+ * Shifted help key
+ */
+ /* Document-const: SHELP
+ * Shifted help key
+ */
+ rb_curses_define_const(KEY_SHELP);
+ rb_define_const(mKey, "SHELP", INT2NUM(KEY_SHELP));
+#endif
+#ifdef KEY_SHOME
+ /* Document-const: KEY_SHOME
+ * Shifted home key
+ */
+ /* Document-const: SHOME
+ * Shifted home key
+ */
+ rb_curses_define_const(KEY_SHOME);
+ rb_define_const(mKey, "SHOME", INT2NUM(KEY_SHOME));
+#endif
+#ifdef KEY_SIC
+ /* Document-const: KEY_SIC
+ * Shifted input key
+ */
+ /* Document-const: SIC
+ * Shifted input key
+ */
+ rb_curses_define_const(KEY_SIC);
+ rb_define_const(mKey, "SIC", INT2NUM(KEY_SIC));
+#endif
+#ifdef KEY_SLEFT
+ /* Document-const: KEY_SLEFT
+ * Shifted left arrow key
+ */
+ /* Document-const: SLEFT
+ * Shifted left arrow key
+ */
+ rb_curses_define_const(KEY_SLEFT);
+ rb_define_const(mKey, "SLEFT", INT2NUM(KEY_SLEFT));
+#endif
+#ifdef KEY_SMESSAGE
+ /* Document-const: KEY_SMESSAGE
+ * Shifted message key
+ */
+ /* Document-const: SMESSAGE
+ * Shifted message key
+ */
+ rb_curses_define_const(KEY_SMESSAGE);
+ rb_define_const(mKey, "SMESSAGE", INT2NUM(KEY_SMESSAGE));
+#endif
+#ifdef KEY_SMOVE
+ /* Document-const: KEY_SMOVE
+ * Shifted move key
+ */
+ /* Document-const: SMOVE
+ * Shifted move key
+ */
+ rb_curses_define_const(KEY_SMOVE);
+ rb_define_const(mKey, "SMOVE", INT2NUM(KEY_SMOVE));
+#endif
+#ifdef KEY_SNEXT
+ /* Document-const: KEY_SNEXT
+ * Shifted next key
+ */
+ /* Document-const: SNEXT
+ * Shifted next key
+ */
+ rb_curses_define_const(KEY_SNEXT);
+ rb_define_const(mKey, "SNEXT", INT2NUM(KEY_SNEXT));
+#endif
+#ifdef KEY_SOPTIONS
+ /* Document-const: KEY_SOPTIONS
+ * Shifted options key
+ */
+ /* Document-const: SOPTIONS
+ * Shifted options key
+ */
+ rb_curses_define_const(KEY_SOPTIONS);
+ rb_define_const(mKey, "SOPTIONS", INT2NUM(KEY_SOPTIONS));
+#endif
+#ifdef KEY_SPREVIOUS
+ /* Document-const: KEY_SPREVIOUS
+ * Shifted previous key
+ */
+ /* Document-const: SPREVIOUS
+ * Shifted previous key
+ */
+ rb_curses_define_const(KEY_SPREVIOUS);
+ rb_define_const(mKey, "SPREVIOUS", INT2NUM(KEY_SPREVIOUS));
+#endif
+#ifdef KEY_SPRINT
+ /* Document-const: KEY_SPRINT
+ * Shifted print key
+ */
+ /* Document-const: SPRINT
+ * Shifted print key
+ */
+ rb_curses_define_const(KEY_SPRINT);
+ rb_define_const(mKey, "SPRINT", INT2NUM(KEY_SPRINT));
+#endif
+#ifdef KEY_SREDO
+ /* Document-const: KEY_SREDO
+ * Shifted redo key
+ */
+ /* Document-const: SREDO
+ * Shifted redo key
+ */
+ rb_curses_define_const(KEY_SREDO);
+ rb_define_const(mKey, "SREDO", INT2NUM(KEY_SREDO));
+#endif
+#ifdef KEY_SREPLACE
+ /* Document-const: KEY_SREPLACE
+ * Shifted replace key
+ */
+ /* Document-const: SREPLACE
+ * Shifted replace key
+ */
+ rb_curses_define_const(KEY_SREPLACE);
+ rb_define_const(mKey, "SREPLACE", INT2NUM(KEY_SREPLACE));
+#endif
+#ifdef KEY_SRIGHT
+ /* Document-const: KEY_SRIGHT
+ * Shifted right arrow key
+ */
+ /* Document-const: SRIGHT
+ * Shifted right arrow key
+ */
+ rb_curses_define_const(KEY_SRIGHT);
+ rb_define_const(mKey, "SRIGHT", INT2NUM(KEY_SRIGHT));
+#endif
+#ifdef KEY_SRSUME
+ /* Document-const: KEY_SRSUME
+ * Shifted resume key
+ */
+ /* Document-const: SRSUME
+ * Shifted resume key
+ */
+ rb_curses_define_const(KEY_SRSUME);
+ rb_define_const(mKey, "SRSUME", INT2NUM(KEY_SRSUME));
+#endif
+#ifdef KEY_SSAVE
+ /* Document-const: KEY_SSAVE
+ * Shifted save key
+ */
+ /* Document-const: SSAVE
+ * Shifted save key
+ */
+ rb_curses_define_const(KEY_SSAVE);
+ rb_define_const(mKey, "SSAVE", INT2NUM(KEY_SSAVE));
+#endif
+#ifdef KEY_SSUSPEND
+ /* Document-const: KEY_SSUSPEND
+ * Shifted suspend key
+ */
+ /* Document-const: SSUSPEND
+ * Shifted suspend key
+ */
+ rb_curses_define_const(KEY_SSUSPEND);
+ rb_define_const(mKey, "SSUSPEND", INT2NUM(KEY_SSUSPEND));
+#endif
+#ifdef KEY_SUNDO
+ /* Document-const: KEY_SUNDO
+ * Shifted undo key
+ */
+ /* Document-const: SUNDO
+ * Shifted undo key
+ */
+ rb_curses_define_const(KEY_SUNDO);
+ rb_define_const(mKey, "SUNDO", INT2NUM(KEY_SUNDO));
+#endif
+#ifdef KEY_SUSPEND
+ /* Document-const: KEY_SUSPEND
+ * Suspend key
+ */
+ /* Document-const: SUSPEND
+ * Suspend key
+ */
+ rb_curses_define_const(KEY_SUSPEND);
+ rb_define_const(mKey, "SUSPEND", INT2NUM(KEY_SUSPEND));
+#endif
+#ifdef KEY_UNDO
+ /* Document-const: KEY_UNDO
+ * Undo key
+ */
+ /* Document-const: UNDO
+ * Undo key
+ */
+ rb_curses_define_const(KEY_UNDO);
+ rb_define_const(mKey, "UNDO", INT2NUM(KEY_UNDO));
+#endif
+#ifdef KEY_RESIZE
+ /* Document-const: KEY_RESIZE
+ * Screen Resized
+ */
+ /* Document-const: RESIZE
+ * Screen Resized
+ */
+ rb_curses_define_const(KEY_RESIZE);
+ rb_define_const(mKey, "RESIZE", INT2NUM(KEY_RESIZE));
+#endif
+#ifdef KEY_MAX
+ /* Document-const: KEY_MAX
+ * The maximum allowed curses key value.
+ */
+ /* Document-const: MAX
+ * The maximum allowed curses key value.
+ */
+ rb_curses_define_const(KEY_MAX);
+ rb_define_const(mKey, "MAX", INT2NUM(KEY_MAX));
+#endif
+ {
+ int c;
+ char name[] = "KEY_CTRL_x";
+ for (c = 'A'; c <= 'Z'; c++) {
+ name[sizeof(name) - 2] = c;
+ rb_define_const(mCurses, name, INT2FIX(c - 'A' + 1));
+ }
+ }
+#undef rb_curses_define_const
+
+ rb_set_end_proc(curses_finalize, 0);
+}
diff --git a/ext/curses/depend b/ext/curses/depend
new file mode 100644
index 0000000000..66742b7208
--- /dev/null
+++ b/ext/curses/depend
@@ -0,0 +1 @@
+curses.o: curses.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h $(hdrdir)/thread.h
diff --git a/ext/curses/extconf.rb b/ext/curses/extconf.rb
new file mode 100644
index 0000000000..f63de1cd6c
--- /dev/null
+++ b/ext/curses/extconf.rb
@@ -0,0 +1,116 @@
+require 'mkmf'
+
+def have_all(*args)
+ old_libs = $libs.dup
+ old_defs = $defs.dup
+ result = []
+ begin
+ args.each {|arg|
+ r = arg.call(*result)
+ if !r
+ return nil
+ end
+ result << r
+ }
+ result
+ ensure
+ if result.length != args.length
+ $libs = old_libs
+ $defs = old_defs
+ end
+ end
+end
+
+dir_config('curses')
+dir_config('ncurses')
+dir_config('termcap')
+
+have_library("mytinfo", "tgetent") if /bow/ =~ RUBY_PLATFORM
+have_library("tinfo", "tgetent") or have_library("termcap", "tgetent")
+
+header_library = nil
+[
+ ["ncurses.h", ["ncursesw", "ncurses"]],
+ ["ncurses/curses.h", ["ncurses"]],
+ ["curses_colr/curses.h", ["cur_colr"]],
+ ["curses.h", ["curses", "pdcurses"]],
+ # ["xcurses.h", ["XCurses"]], # XCurses (PDCurses for X11)
+].each {|hdr, libs|
+ header_library = have_all(
+ lambda { have_header(hdr) && hdr },
+ lambda {|h| libs.find {|lib| have_library(lib, "initscr", h) } })
+ if header_library
+ break;
+ end
+}
+
+if header_library
+ header, library = header_library
+ puts "header: #{header}"
+ puts "library: #{library}"
+
+ curses = [header]
+ if header == 'curses_colr/curses.h'
+ curses.unshift("varargs.h")
+ end
+
+ for f in %w(beep bkgd bkgdset curs_set deleteln doupdate flash
+ getbkgd getnstr init isendwin keyname keypad resizeterm
+ scrl set setscrreg ungetch
+ wattroff wattron wattrset wbkgd wbkgdset wdeleteln wgetnstr
+ wresize wscrl wsetscrreg
+ def_prog_mode reset_prog_mode timeout wtimeout nodelay
+ init_color wcolor_set use_default_colors newpad)
+ have_func(f) || (have_macro(f, curses) && $defs.push(format("-DHAVE_%s", f.upcase)))
+ end
+ flag = "-D_XOPEN_SOURCE_EXTENDED"
+ if try_static_assert("sizeof(char*)>sizeof(int)",
+ %w[stdio.h stdlib.h]+curses,
+ flag)
+ $defs << flag
+ end
+ have_var("ESCDELAY", curses)
+ have_var("TABSIZE", curses)
+ have_var("COLORS", curses)
+ have_var("COLOR_PAIRS", curses)
+
+ # SVR4 curses has a (undocumented) variable char *curses_version.
+ # ncurses and PDcurses has a function char *curses_version().
+ # Note that the original BSD curses doesn't provide version information.
+
+ prolog = cpp_include(curses)
+ if checking_for(checking_message('function curses_version', curses)) {
+ try_run(<<-"End")
+ #{prolog}
+ int main(int argc, char *argv[])
+ {
+ curses_version();
+ return EXIT_SUCCESS;
+ }
+ End
+ }
+ $defs << '-DHAVE_FUNC_CURSES_VERSION'
+ end
+
+ if checking_for(checking_message('variable curses_version', curses)) {
+ try_run(<<-"End")
+ #{prolog}
+ extern char *curses_version;
+ int main(int argc, char *argv[])
+ {
+ int i = 0;
+ for (i = 0; i < 100; i++) {
+ if (curses_version[i] == 0)
+ return 0 < i ? EXIT_SUCCESS : EXIT_FAILURE;
+ if (curses_version[i] & 0x80)
+ return EXIT_FAILURE;
+ }
+ return EXIT_FAILURE;
+ }
+ End
+ }
+ $defs << '-DHAVE_VAR_CURSES_VERSION'
+ end
+
+ create_makefile("curses")
+end
diff --git a/ext/curses/hello.rb b/ext/curses/hello.rb
new file mode 100644
index 0000000000..7f57d801a3
--- /dev/null
+++ b/ext/curses/hello.rb
@@ -0,0 +1,30 @@
+#!/usr/local/bin/ruby
+
+require "curses"
+include Curses
+
+def show_message(message)
+ width = message.length + 6
+ win = Window.new(5, width,
+ (lines - 5) / 2, (cols - width) / 2)
+ win.box(?|, ?-)
+ win.setpos(2, 3)
+ win.addstr(message)
+ win.refresh
+ win.getch
+ win.close
+end
+
+init_screen
+begin
+ crmode
+# show_message("Hit any key")
+ setpos((lines - 5) / 2, (cols - 10) / 2)
+ addstr("Hit any key")
+ refresh
+ getch
+ show_message("Hello, World!")
+ refresh
+ensure
+ close_screen
+end
diff --git a/ext/curses/mouse.rb b/ext/curses/mouse.rb
new file mode 100644
index 0000000000..c42bc31f33
--- /dev/null
+++ b/ext/curses/mouse.rb
@@ -0,0 +1,53 @@
+#!/usr/local/bin/ruby
+
+require "curses"
+include Curses
+
+def show_message(*msgs)
+ message = msgs.join
+ width = message.length + 6
+ win = Window.new(5, width,
+ (lines - 5) / 2, (cols - width) / 2)
+ win.keypad = true
+ win.attron(color_pair(COLOR_RED)){
+ win.box(?|, ?-, ?+)
+ }
+ win.setpos(2, 3)
+ win.addstr(message)
+ win.refresh
+ win.getch
+ win.close
+end
+
+init_screen
+start_color
+init_pair(COLOR_BLUE,COLOR_BLUE,COLOR_WHITE)
+init_pair(COLOR_RED,COLOR_RED,COLOR_WHITE)
+crmode
+noecho
+stdscr.keypad(true)
+
+begin
+ mousemask(BUTTON1_CLICKED|BUTTON2_CLICKED|BUTTON3_CLICKED|BUTTON4_CLICKED)
+ setpos((lines - 5) / 2, (cols - 10) / 2)
+ attron(color_pair(COLOR_BLUE)|A_BOLD){
+ addstr("click")
+ }
+ refresh
+ while( true )
+ c = getch
+ case c
+ when KEY_MOUSE
+ m = getmouse
+ if( m )
+ show_message("getch = #{c.inspect}, ",
+ "mouse event = #{'0x%x' % m.bstate}, ",
+ "axis = (#{m.x},#{m.y},#{m.z})")
+ end
+ break
+ end
+ end
+ refresh
+ensure
+ close_screen
+end
diff --git a/ext/curses/rain.rb b/ext/curses/rain.rb
new file mode 100644
index 0000000000..a6019b26e0
--- /dev/null
+++ b/ext/curses/rain.rb
@@ -0,0 +1,76 @@
+#!/usr/local/bin/ruby
+# rain for a curses test
+
+require "curses"
+include Curses
+
+def onsig(sig)
+ close_screen
+ exit sig
+end
+
+def ranf
+ rand(32767).to_f / 32767
+end
+
+# main #
+for i in %w[HUP INT QUIT TERM]
+ if trap(i, "SIG_IGN") != 0 then # 0 for SIG_IGN
+ trap(i) {|sig| onsig(sig) }
+ end
+end
+
+init_screen
+nl
+noecho
+srand
+
+xpos = {}
+ypos = {}
+r = lines - 4
+c = cols - 4
+for i in 0 .. 4
+ xpos[i] = (c * ranf).to_i + 2
+ ypos[i] = (r * ranf).to_i + 2
+end
+
+i = 0
+while TRUE
+ x = (c * ranf).to_i + 2
+ y = (r * ranf).to_i + 2
+
+
+ setpos(y, x); addstr(".")
+
+ setpos(ypos[i], xpos[i]); addstr("o")
+
+ i = if i == 0 then 4 else i - 1 end
+ setpos(ypos[i], xpos[i]); addstr("O")
+
+ i = if i == 0 then 4 else i - 1 end
+ setpos(ypos[i] - 1, xpos[i]); addstr("-")
+ setpos(ypos[i], xpos[i] - 1); addstr("|.|")
+ setpos(ypos[i] + 1, xpos[i]); addstr("-")
+
+ i = if i == 0 then 4 else i - 1 end
+ setpos(ypos[i] - 2, xpos[i]); addstr("-")
+ setpos(ypos[i] - 1, xpos[i] - 1); addstr("/ \\")
+ setpos(ypos[i], xpos[i] - 2); addstr("| O |")
+ setpos(ypos[i] + 1, xpos[i] - 1); addstr("\\ /")
+ setpos(ypos[i] + 2, xpos[i]); addstr("-")
+
+ i = if i == 0 then 4 else i - 1 end
+ setpos(ypos[i] - 2, xpos[i]); addstr(" ")
+ setpos(ypos[i] - 1, xpos[i] - 1); addstr(" ")
+ setpos(ypos[i], xpos[i] - 2); addstr(" ")
+ setpos(ypos[i] + 1, xpos[i] - 1); addstr(" ")
+ setpos(ypos[i] + 2, xpos[i]); addstr(" ")
+
+
+ xpos[i] = x
+ ypos[i] = y
+ refresh
+ sleep(0.5)
+end
+
+# end of main
diff --git a/ext/curses/view.rb b/ext/curses/view.rb
new file mode 100644
index 0000000000..bc54aeb9af
--- /dev/null
+++ b/ext/curses/view.rb
@@ -0,0 +1,91 @@
+#!/usr/local/bin/ruby
+
+require "curses"
+include Curses
+
+#
+# main
+#
+
+if ARGV.size != 1 then
+ printf("usage: view file\n");
+ exit
+end
+begin
+ fp = open(ARGV[0], "r")
+rescue
+ raise "cannot open file: #{ARGV[1]}"
+end
+
+# signal(SIGINT, finish)
+
+init_screen
+#keypad(stdscr, TRUE)
+nonl
+cbreak
+noecho
+#scrollok(stdscr, TRUE)
+
+# slurp the file
+data_lines = []
+fp.each_line { |l|
+ data_lines.push(l)
+}
+fp.close
+
+
+lptr = 0
+while TRUE
+ i = 0
+ while i < lines
+ setpos(i, 0)
+ #clrtoeol
+ addstr(data_lines[lptr + i] || '')
+ i += 1
+ end
+ refresh
+
+ explicit = FALSE
+ n = 0
+ while TRUE
+ c = getch
+ if c =~ /[0-9]/
+ n = 10 * n + c.to_i
+ else
+ break
+ end
+ end
+
+ n = 1 if !explicit && n == 0
+
+ case c
+ when "n" #when KEY_DOWN
+ i = 0
+ while i < n
+ if lptr + lines < data_lines.size then
+ lptr += 1
+ else
+ break
+ end
+ i += 1
+ end
+ #wscrl(i)
+
+ when "p" #when KEY_UP
+ i = 0
+ while i < n
+ if lptr > 0 then
+ lptr -= 1
+ else
+ break
+ end
+ i += 1
+ end
+ #wscrl(-i)
+
+ when "q"
+ break
+ end
+
+end
+close_screen
diff --git a/ext/curses/view2.rb b/ext/curses/view2.rb
new file mode 100644
index 0000000000..037771a226
--- /dev/null
+++ b/ext/curses/view2.rb
@@ -0,0 +1,149 @@
+#!/usr/local/bin/ruby
+
+require "curses"
+
+
+# A curses based file viewer
+class FileViewer
+
+ # Create a new fileviewer, and view the file.
+ def initialize(filename)
+ @data_lines = []
+ @screen = nil
+ @top = nil
+ init_curses
+ load_file(filename)
+ interact
+ end
+
+ # Perform the curses setup
+ def init_curses
+ # signal(SIGINT, finish)
+
+ Curses.init_screen
+ Curses.nonl
+ Curses.cbreak
+ Curses.noecho
+
+ @screen = Curses.stdscr
+
+ @screen.scrollok(true)
+ #$screen.keypad(true)
+ end
+
+ # Load the file into memory, and put
+ # the first part on the curses display.
+ def load_file(filename)
+ fp = open(filename, "r") do |fp|
+ # slurp the file
+ fp.each_line { |l|
+ @data_lines.push(l.chop)
+ }
+ end
+ @top = 0
+ @data_lines[0..@screen.maxy-1].each_with_index{|line, idx|
+ @screen.setpos(idx, 0)
+ @screen.addstr(line)
+ }
+ @screen.setpos(0,0)
+ @screen.refresh
+ rescue
+ raise "cannot open file '#{filename}' for reading"
+ end
+
+
+ # Scroll the display up by one line
+ def scroll_up
+ if( @top > 0 )
+ @screen.scrl(-1)
+ @top -= 1
+ str = @data_lines[@top]
+ if( str )
+ @screen.setpos(0, 0)
+ @screen.addstr(str)
+ end
+ return true
+ else
+ return false
+ end
+ end
+
+ # Scroll the display down by one line
+ def scroll_down
+ if( @top + @screen.maxy < @data_lines.length )
+ @screen.scrl(1)
+ @top += 1
+ str = @data_lines[@top + @screen.maxy - 1]
+ if( str )
+ @screen.setpos(@screen.maxy - 1, 0)
+ @screen.addstr(str)
+ end
+ return true
+ else
+ return false
+ end
+ end
+
+ # Allow the user to interact with the display.
+ # This uses EMACS-like keybindings, and also
+ # vi-like keybindings as well, except that left
+ # and right move to the beginning and end of the
+ # file, respectively.
+ def interact
+ while true
+ result = true
+ c = Curses.getch
+ case c
+ when Curses::KEY_DOWN, Curses::KEY_CTRL_N, ?j
+ result = scroll_down
+ when Curses::KEY_UP, Curses::KEY_CTRL_P, ?k
+ result = scroll_up
+ when Curses::KEY_NPAGE, ?\s # white space
+ for i in 0..(@screen.maxy - 2)
+ if( ! scroll_down )
+ if( i == 0 )
+ result = false
+ end
+ break
+ end
+ end
+ when Curses::KEY_PPAGE
+ for i in 0..(@screen.maxy - 2)
+ if( ! scroll_up )
+ if( i == 0 )
+ result = false
+ end
+ break
+ end
+ end
+ when Curses::KEY_LEFT, Curses::KEY_CTRL_T, ?h
+ while( scroll_up )
+ end
+ when Curses::KEY_RIGHT, Curses::KEY_CTRL_B, ?l
+ while( scroll_down )
+ end
+ when ?q
+ break
+ else
+ @screen.setpos(0,0)
+ @screen.addstr("[unknown key `#{Curses.keyname(c)}'=#{c}] ")
+ end
+ if( !result )
+ Curses.beep
+ end
+ @screen.setpos(0,0)
+ end
+ Curses.close_screen
+ end
+end
+
+
+# If we are being run as a main program...
+if __FILE__ == $0
+ if ARGV.size != 1 then
+ printf("usage: #{$0} file\n");
+ exit
+ end
+
+ viewer = FileViewer.new(ARGV[0])
+end
diff --git a/ext/date/date_core.c b/ext/date/date_core.c
index 176c76ef0c..37d00d177e 100644
--- a/ext/date/date_core.c
+++ b/ext/date/date_core.c
@@ -1,14 +1,11 @@
/*
- date_core.c: Coded by Tadayoshi Funaba 2010-2013
+ date_core.c: Coded by Tadayoshi Funaba 2010-2012
*/
#include "ruby.h"
#include "ruby/encoding.h"
#include <math.h>
#include <time.h>
-#if defined(HAVE_SYS_TIME_H)
-#include <sys/time.h>
-#endif
#define NDEBUG
#include <assert.h>
@@ -682,7 +679,7 @@ c_julian_leap_p(int y)
inline static int
c_gregorian_leap_p(int y)
{
- return (MOD(y, 4) == 0 && y % 100 != 0) || MOD(y, 400) == 0;
+ return MOD(y, 4) == 0 && y % 100 != 0 || MOD(y, 400) == 0;
}
static int
@@ -1107,28 +1104,6 @@ m_virtual_sg(union DateData *x)
return c_virtual_sg(x);
}
-#define canonicalize_jd(_nth, _jd) \
-{\
- if (_jd < 0) {\
- _nth = f_sub(_nth, INT2FIX(1));\
- _jd += CM_PERIOD;\
- }\
- if (_jd >= CM_PERIOD) {\
- _nth = f_add(_nth, INT2FIX(1));\
- _jd -= CM_PERIOD;\
- }\
-}
-
-inline static void
-canonicalize_s_jd(union DateData *x)
-{
- int j = x->s.jd;
- assert(have_jd_p(x));
- canonicalize_jd(x->s.nth, x->s.jd);
- if (x->s.jd != j)
- x->flags &= ~HAVE_CIVIL;
-}
-
inline static void
get_s_jd(union DateData *x)
{
@@ -1214,16 +1189,6 @@ get_c_time(union DateData *x)
}
inline static void
-canonicalize_c_jd(union DateData *x)
-{
- int j = x->c.jd;
- assert(have_jd_p(x));
- canonicalize_jd(x->c.nth, x->c.jd);
- if (x->c.jd != j)
- x->flags &= ~HAVE_CIVIL;
-}
-
-inline static void
get_c_jd(union DateData *x)
{
assert(complex_dat_p(x));
@@ -1396,19 +1361,6 @@ guess_style(VALUE y, double sg) /* -/+oo or zero */
return style;
}
-inline static void
-m_canonicalize_jd(union DateData *x)
-{
- if (simple_dat_p(x)) {
- get_s_jd(x);
- canonicalize_s_jd(x);
- }
- else {
- get_c_jd(x);
- canonicalize_c_jd(x);
- }
-}
-
inline static VALUE
m_nth(union DateData *x)
{
@@ -2015,7 +1967,7 @@ civil_to_jd(VALUE y, int m, int d, double sg,
*ry = FIX2INT(y);
else {
VALUE nth2;
- decode_year(y, *ns ? -1 : +1, &nth2, ry);
+ decode_year(y, ns ? -1 : +1, &nth2, ry);
}
}
else {
@@ -2050,7 +2002,7 @@ ordinal_to_jd(VALUE y, int d, double sg,
*ry = FIX2INT(y);
else {
VALUE nth2;
- decode_year(y, *ns ? -1 : +1, &nth2, ry);
+ decode_year(y, ns ? -1 : +1, &nth2, ry);
}
}
else {
@@ -2085,7 +2037,7 @@ commercial_to_jd(VALUE y, int w, int d, double sg,
*ry = FIX2INT(y);
else {
VALUE nth2;
- decode_year(y, *ns ? -1 : +1, &nth2, ry);
+ decode_year(y, ns ? -1 : +1, &nth2, ry);
}
}
else {
@@ -2120,7 +2072,7 @@ weeknum_to_jd(VALUE y, int w, int d, int f, double sg,
*ry = FIX2INT(y);
else {
VALUE nth2;
- decode_year(y, *ns ? -1 : +1, &nth2, ry);
+ decode_year(y, ns ? -1 : +1, &nth2, ry);
}
}
else {
@@ -2155,7 +2107,7 @@ nth_kday_to_jd(VALUE y, int m, int n, int k, double sg,
*ry = FIX2INT(y);
else {
VALUE nth2;
- decode_year(y, *ns ? -1 : +1, &nth2, ry);
+ decode_year(y, ns ? -1 : +1, &nth2, ry);
}
}
else {
@@ -2194,7 +2146,7 @@ valid_ordinal_p(VALUE y, int d, double sg,
*ry = FIX2INT(y);
else {
VALUE nth2;
- decode_year(y, *ns ? -1 : +1, &nth2, ry);
+ decode_year(y, ns ? -1 : +1, &nth2, ry);
}
}
else {
@@ -2233,7 +2185,7 @@ valid_civil_p(VALUE y, int m, int d, double sg,
*ry = FIX2INT(y);
else {
VALUE nth2;
- decode_year(y, *ns ? -1 : +1, &nth2, ry);
+ decode_year(y, ns ? -1 : +1, &nth2, ry);
}
}
else {
@@ -2269,7 +2221,7 @@ valid_commercial_p(VALUE y, int w, int d, double sg,
*ry = FIX2INT(y);
else {
VALUE nth2;
- decode_year(y, *ns ? -1 : +1, &nth2, ry);
+ decode_year(y, ns ? -1 : +1, &nth2, ry);
}
}
else {
@@ -2299,7 +2251,7 @@ valid_weeknum_p(VALUE y, int w, int d, int f, double sg,
*ry = FIX2INT(y);
else {
VALUE nth2;
- decode_year(y, *ns ? -1 : +1, &nth2, ry);
+ decode_year(y, ns ? -1 : +1, &nth2, ry);
}
}
else {
@@ -2330,7 +2282,7 @@ valid_nth_kday_p(VALUE y, int m, int n, int k, double sg,
*ry = FIX2INT(y);
else {
VALUE nth2;
- decode_year(y, *ns ? -1 : +1, &nth2, ry);
+ decode_year(y, ns ? -1 : +1, &nth2, ry);
}
}
else {
@@ -5524,7 +5476,15 @@ d_lite_plus(VALUE self, VALUE other)
jd = m_jd(dat);
else {
jd = m_jd(dat) + (int)t;
- canonicalize_jd(nth, jd);
+
+ if (jd < 0) {
+ nth = f_sub(nth, INT2FIX(1));
+ jd += CM_PERIOD;
+ }
+ else if (jd >= CM_PERIOD) {
+ nth = f_add(nth, INT2FIX(1));
+ jd -= CM_PERIOD;
+ }
}
if (simple_dat_p(dat))
@@ -5577,7 +5537,14 @@ d_lite_plus(VALUE self, VALUE other)
jd = m_jd(dat);
else {
jd = m_jd(dat) + jd;
- canonicalize_jd(nth, jd);
+ if (jd < 0) {
+ nth = f_sub(nth, INT2FIX(1));
+ jd += CM_PERIOD;
+ }
+ else if (jd >= CM_PERIOD) {
+ nth = f_add(nth, INT2FIX(1));
+ jd -= CM_PERIOD;
+ }
}
if (f_zero_p(nth))
@@ -5684,7 +5651,14 @@ d_lite_plus(VALUE self, VALUE other)
jd = m_jd(dat);
else {
jd = m_jd(dat) + jd;
- canonicalize_jd(nth, jd);
+ if (jd < 0) {
+ nth = f_sub(nth, INT2FIX(1));
+ jd += CM_PERIOD;
+ }
+ else if (jd >= CM_PERIOD) {
+ nth = f_add(nth, INT2FIX(1));
+ jd -= CM_PERIOD;
+ }
}
if (f_zero_p(nth))
@@ -5787,7 +5761,14 @@ d_lite_plus(VALUE self, VALUE other)
jd = m_jd(dat);
else {
jd = m_jd(dat) + jd;
- canonicalize_jd(nth, jd);
+ if (jd < 0) {
+ nth = f_sub(nth, INT2FIX(1));
+ jd += CM_PERIOD;
+ }
+ else if (jd >= CM_PERIOD) {
+ nth = f_add(nth, INT2FIX(1));
+ jd -= CM_PERIOD;
+ }
}
if (f_zero_p(nth))
@@ -5831,7 +5812,15 @@ minus_dd(VALUE self, VALUE other)
d = m_jd(adat) - m_jd(bdat);
df = m_df(adat) - m_df(bdat);
sf = f_sub(m_sf(adat), m_sf(bdat));
- canonicalize_jd(n, d);
+
+ if (d < 0) {
+ n = f_sub(n, INT2FIX(1));
+ d += CM_PERIOD;
+ }
+ else if (d >= CM_PERIOD) {
+ n = f_add(n, INT2FIX(1));
+ d -= CM_PERIOD;
+ }
if (df < 0) {
d -= 1;
@@ -5943,7 +5932,6 @@ d_lite_prev_day(int argc, VALUE *argv, VALUE self)
/*
* call-seq:
- * d.succ -> date
* d.next -> date
*
* Returns a date object denoting the following day.
@@ -6210,8 +6198,6 @@ cmp_dd(VALUE self, VALUE other)
int a_jd, b_jd,
a_df, b_df;
- m_canonicalize_jd(adat);
- m_canonicalize_jd(bdat);
a_nth = m_nth(adat);
b_nth = m_nth(bdat);
if (f_eqeq_p(a_nth, b_nth)) {
@@ -6285,12 +6271,11 @@ d_lite_cmp(VALUE self, VALUE other)
m_gregorian_p(adat) == m_gregorian_p(bdat)))
return cmp_dd(self, other);
- {
+ if (have_jd_p(adat) &&
+ have_jd_p(bdat)) {
VALUE a_nth, b_nth;
int a_jd, b_jd;
- m_canonicalize_jd(adat);
- m_canonicalize_jd(bdat);
a_nth = m_nth(adat);
b_nth = m_nth(bdat);
if (f_eqeq_p(a_nth, b_nth)) {
@@ -6313,6 +6298,74 @@ d_lite_cmp(VALUE self, VALUE other)
return INT2FIX(1);
}
}
+ else {
+#ifndef USE_PACK
+ VALUE a_nth, b_nth;
+ int a_year, b_year,
+ a_mon, b_mon,
+ a_mday, b_mday;
+#else
+ VALUE a_nth, b_nth;
+ int a_year, b_year,
+ a_pd, b_pd;
+#endif
+
+ a_nth = m_nth(adat);
+ b_nth = m_nth(bdat);
+ if (f_eqeq_p(a_nth, b_nth)) {
+ a_year = m_year(adat);
+ b_year = m_year(bdat);
+ if (a_year == b_year) {
+#ifndef USE_PACK
+ a_mon = m_mon(adat);
+ b_mon = m_mon(bdat);
+ if (a_mon == b_mon) {
+ a_mday = m_mday(adat);
+ b_mday = m_mday(bdat);
+ if (a_mday == b_mday) {
+ return INT2FIX(0);
+ }
+ else if (a_mday < b_mday) {
+ return INT2FIX(-1);
+ }
+ else {
+ return INT2FIX(1);
+ }
+ }
+ else if (a_mon < b_mon) {
+ return INT2FIX(-1);
+ }
+ else {
+ return INT2FIX(1);
+ }
+#else
+ a_pd = m_pc(adat);
+ b_pd = m_pc(bdat);
+ if (a_pd == b_pd) {
+ return INT2FIX(0);
+ }
+ else if (a_pd < b_pd) {
+ return INT2FIX(-1);
+ }
+ else {
+ return INT2FIX(1);
+ }
+#endif
+ }
+ else if (a_year < b_year) {
+ return INT2FIX(-1);
+ }
+ else {
+ return INT2FIX(1);
+ }
+ }
+ else if (f_lt_p(a_nth, b_nth)) {
+ return INT2FIX(-1);
+ }
+ else {
+ return INT2FIX(1);
+ }
+ }
}
}
@@ -6357,12 +6410,11 @@ d_lite_equal(VALUE self, VALUE other)
if (!(m_gregorian_p(adat) == m_gregorian_p(bdat)))
return equal_gen(self, other);
- {
+ if (have_jd_p(adat) &&
+ have_jd_p(bdat)) {
VALUE a_nth, b_nth;
int a_jd, b_jd;
- m_canonicalize_jd(adat);
- m_canonicalize_jd(bdat);
a_nth = m_nth(adat);
b_nth = m_nth(bdat);
a_jd = m_local_jd(adat);
@@ -6372,6 +6424,45 @@ d_lite_equal(VALUE self, VALUE other)
return Qtrue;
return Qfalse;
}
+ else {
+#ifndef USE_PACK
+ VALUE a_nth, b_nth;
+ int a_year, b_year,
+ a_mon, b_mon,
+ a_mday, b_mday;
+#else
+ VALUE a_nth, b_nth;
+ int a_year, b_year,
+ a_pd, b_pd;
+#endif
+
+ a_nth = m_nth(adat);
+ b_nth = m_nth(bdat);
+ if (f_eqeq_p(a_nth, b_nth)) {
+ a_year = m_year(adat);
+ b_year = m_year(bdat);
+ if (a_year == b_year) {
+#ifndef USE_PACK
+ a_mon = m_mon(adat);
+ b_mon = m_mon(bdat);
+ if (a_mon == b_mon) {
+ a_mday = m_mday(adat);
+ b_mday = m_mday(bdat);
+ if (a_mday == b_mday)
+ return Qtrue;
+ }
+#else
+ /* mon and mday only */
+ a_pd = (m_pc(adat) >> MDAY_SHIFT);
+ b_pd = (m_pc(bdat) >> MDAY_SHIFT);
+ if (a_pd == b_pd) {
+ return Qtrue;
+ }
+#endif
+ }
+ }
+ return Qfalse;
+ }
}
}
@@ -7674,7 +7765,7 @@ datetime_s_now(int argc, VALUE *argv, VALUE klass)
of = tm.tm_gmtoff;
#elif defined(HAVE_VAR_TIMEZONE)
#ifdef HAVE_VAR_ALTZONE
- of = (long)-((tm.tm_isdst > 0) ? altzone : timezone);
+ of = (long)((tm.tm_isdst > 0) ? altzone : timezone);
#else
of = (long)-timezone;
if (tm.tm_isdst) {
@@ -9221,23 +9312,23 @@ Init_date_core(void)
rb_include_module(cDate, rb_mComparable);
- /* An array of strings of full month names in English. The first
+ /* An array of stirng of full month name in English. The first
* element is nil.
*/
rb_define_const(cDate, "MONTHNAMES", mk_ary_of_str(13, monthnames));
- /* An array of strings of abbreviated month names in English. The
+ /* An array of string of abbreviated month name in English. The
* first element is nil.
*/
rb_define_const(cDate, "ABBR_MONTHNAMES",
mk_ary_of_str(13, abbr_monthnames));
- /* An array of strings of the full names of days of the week in English.
+ /* An array of string of full name of days of the week in English.
* The first is "Sunday".
*/
rb_define_const(cDate, "DAYNAMES", mk_ary_of_str(7, daynames));
- /* An array of strings of abbreviated day names in English. The
+ /* An array of string of abbreviated day name in English. The
* first is "Sun".
*/
rb_define_const(cDate, "ABBR_DAYNAMES", mk_ary_of_str(7, abbr_daynames));
diff --git a/ext/date/date_parse.c b/ext/date/date_parse.c
index 3003b45239..815c07f483 100644
--- a/ext/date/date_parse.c
+++ b/ext/date/date_parse.c
@@ -569,7 +569,7 @@ date_zone_to_diff(VALUE str)
if (cl >= 3)
min = rb_str_new(&cs[1], 2);
if (cl >= 5)
- sec = rb_str_new(&cs[3], 2);
+ min = rb_str_new(&cs[3], 2);
}
else {
if (cl >= 2)
@@ -765,9 +765,9 @@ parse_time(VALUE str, VALUE hash)
"("
"(?:gmt|utc?)?[-+]\\d+(?:[,.:]\\d+(?::\\d+)?)?"
"|"
- "(?-i:[[:alpha:].\\s]+)(?:standard|daylight)\\stime\\b"
+ "[[:alpha:].\\s]+(?:standard|daylight)\\stime\\b"
"|"
- "(?-i:[[:alpha:]]+)(?:\\sdst)?\\b"
+ "[[:alpha:]]+(?:\\sdst)?\\b"
")"
")?";
static VALUE pat = Qnil;
@@ -2848,9 +2848,7 @@ rfc2822_cb(VALUE m, VALUE hash)
s[i] = rb_reg_nth_match(i, m);
}
- if (!NIL_P(s[1])) {
- set_hash("wday", INT2FIX(day_num(s[1])));
- }
+ set_hash("wday", INT2FIX(day_num(s[1])));
set_hash("mday", str2num(s[2]));
set_hash("mon", INT2FIX(mon_num(s[3])));
y = str2num(s[4]);
diff --git a/ext/date/date_strftime.c b/ext/date/date_strftime.c
index 20931a3124..54324dad09 100644
--- a/ext/date/date_strftime.c
+++ b/ext/date/date_strftime.c
@@ -12,10 +12,6 @@
#include <ctype.h>
#include <errno.h>
-#if defined(HAVE_SYS_TIME_H)
-#include <sys/time.h>
-#endif
-
#undef strchr /* avoid AIX weirdness */
#define range(low, item, hi) (item)
diff --git a/ext/date/date_strptime.c b/ext/date/date_strptime.c
index 3e1b0f85ea..c6a5969172 100644
--- a/ext/date/date_strptime.c
+++ b/ext/date/date_strptime.c
@@ -567,8 +567,8 @@ date__strptime_internal(const char *str, size_t slen,
static const char pat_source[] =
"\\A("
"(?:gmt|utc?)?[-+]\\d+(?:[,.:]\\d+(?::\\d+)?)?"
- "|(?-i:[[:alpha:].\\s]+)(?:standard|daylight)\\s+time\\b"
- "|(?-i:[[:alpha:]]+)(?:\\s+dst)?\\b"
+ "|[[:alpha:].\\s]+(?:standard|daylight)\\s+time\\b"
+ "|[[:alpha:]]+(?:\\s+dst)?\\b"
")";
static VALUE pat = Qnil;
VALUE m, b;
diff --git a/ext/date/depend b/ext/date/depend
index 3a13fcc9a9..e6afa56162 100644
--- a/ext/date/depend
+++ b/ext/date/depend
@@ -1,7 +1,3 @@
$(OBJS): $(ruby_headers)
-date_core.o: date_tmx.h $(hdrdir)/ruby/encoding.h $(hdrdir)/ruby/oniguruma.h
+date_core.o: date_tmx.h
date_strftime.o: date_tmx.h
-date_parse.o: $(hdrdir)/ruby/encoding.h $(hdrdir)/ruby/oniguruma.h $(hdrdir)/ruby/re.h $(hdrdir)/ruby/regex.h
-date_strptime.o: $(hdrdir)/ruby/encoding.h $(hdrdir)/ruby/oniguruma.h $(hdrdir)/ruby/re.h $(hdrdir)/ruby/regex.h
-
-
diff --git a/ext/dbm/dbm.c b/ext/dbm/dbm.c
index 1fdbaa0aca..57d227e8ad 100644
--- a/ext/dbm/dbm.c
+++ b/ext/dbm/dbm.c
@@ -392,6 +392,7 @@ fdbm_values_at(int argc, VALUE *argv, VALUE obj)
static void
fdbm_modify(VALUE obj)
{
+ rb_secure(4);
if (OBJ_FROZEN(obj)) rb_error_frozen("DBM");
}
@@ -574,7 +575,7 @@ fdbm_invert(VALUE obj)
static VALUE fdbm_store(VALUE,VALUE,VALUE);
static VALUE
-update_i(RB_BLOCK_CALL_FUNC_ARGLIST(pair, dbm))
+update_i(VALUE pair, VALUE dbm)
{
Check_Type(pair, T_ARRAY);
if (RARRAY_LEN(pair) < 2) {
@@ -654,7 +655,6 @@ fdbm_store(VALUE obj, VALUE keystr, VALUE valstr)
/*
* call-seq:
* dbm.length -> integer
- * dbm.size -> integer
*
* Returns the number of entries in the database.
*/
@@ -832,10 +832,7 @@ fdbm_values(VALUE obj)
/*
* call-seq:
- * dbm.include?(key) -> boolean
* dbm.has_key?(key) -> boolean
- * dbm.member?(key) -> boolean
- * dbm.key?(key) -> boolean
*
* Returns true if the database contains the specified key, false otherwise.
*/
@@ -862,7 +859,6 @@ fdbm_has_key(VALUE obj, VALUE keystr)
/*
* call-seq:
* dbm.has_value?(value) -> boolean
- * dbm.value?(value) -> boolean
*
* Returns true if the database contains the specified string value, false
* otherwise.
@@ -957,7 +953,8 @@ fdbm_reject(VALUE obj)
}
/*
- * == Introduction
+ * Documented by mathew meta@pobox.com.
+ * = Introduction
*
* The DBM class provides a wrapper to a Unix-style
* {dbm}[http://en.wikipedia.org/wiki/Dbm] or Database Manager library.
@@ -983,7 +980,7 @@ fdbm_reject(VALUE obj)
* All of these dbm implementations have their own Ruby interfaces
* available, which provide richer (but varying) APIs.
*
- * == Cautions
+ * = Cautions
*
* Before you decide to use DBM, there are some issues you should consider:
*
@@ -1008,10 +1005,10 @@ fdbm_reject(VALUE obj)
* important data. It is probably best used as a fast and easy alternative
* to a Hash for processing large amounts of data.
*
- * == Example
+ * = Example
*
* require 'dbm'
- * db = DBM.open('rfcs', 666, DBM::WRCREAT)
+ * db = DBM.open('rfcs', 666, DBM::CREATRW)
* db['822'] = 'Standard for the Format of ARPA Internet Text Messages'
* db['1123'] = 'Requirements for Internet Hosts - Application and Support'
* db['3068'] = 'An Anycast Prefix for 6to4 Relay Routers'
diff --git a/ext/dbm/depend b/ext/dbm/depend
new file mode 100644
index 0000000000..5fae80b096
--- /dev/null
+++ b/ext/dbm/depend
@@ -0,0 +1 @@
+dbm.o: dbm.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h
diff --git a/ext/dbm/extconf.rb b/ext/dbm/extconf.rb
index 68070c9970..32a944634a 100644
--- a/ext/dbm/extconf.rb
+++ b/ext/dbm/extconf.rb
@@ -1,20 +1,3 @@
-# configure option:
-# --with-dbm-type=COMMA-SEPARATED-NDBM-TYPES
-#
-# ndbm type:
-# libc ndbm compatible library in libc.
-# db Berkeley DB (libdb)
-# db2 Berkeley DB (libdb2)
-# db1 Berkeley DB (libdb1)
-# db5 Berkeley DB (libdb5)
-# db4 Berkeley DB (libdb4)
-# db3 Berkeley DB (libdb3)
-# gdbm_compat GDBM since 1.8.1 (libgdbm_compat)
-# gdbm GDBM until 1.8.0 (libgdbm)
-# qdbm QDBM (libqdbm)
-# ndbm Some legacy OS may have libndbm.
-
-# :stopdoc:
require 'mkmf'
dir_config("dbm")
@@ -269,4 +252,3 @@ if dblib.any? {|db| headers.fetch(db, ["ndbm.h"]).any? {|hdr| headers.db_check(d
convertible_int("datum.dsize", headers.found, headers.defs)
create_makefile("dbm")
end
-# :startdoc:
diff --git a/ext/digest/bubblebabble/bubblebabble.c b/ext/digest/bubblebabble/bubblebabble.c
index 4bccd221b8..c92ae52cd9 100644
--- a/ext/digest/bubblebabble/bubblebabble.c
+++ b/ext/digest/bubblebabble/bubblebabble.c
@@ -78,8 +78,7 @@ bubblebabble_str_new(VALUE str_digest)
return str;
}
-/* Document-method: Digest::bubblebabble
- *
+/*
* call-seq:
* Digest.bubblebabble(string) -> bubblebabble_string
*
@@ -91,8 +90,7 @@ rb_digest_s_bubblebabble(VALUE klass, VALUE str)
return bubblebabble_str_new(str);
}
-/* Document-method: Digest::Class::bubblebabble
- *
+/*
* call-seq:
* Digest::Class.bubblebabble(string, ...) -> hash_string
*
@@ -104,8 +102,7 @@ rb_digest_class_s_bubblebabble(int argc, VALUE *argv, VALUE klass)
return bubblebabble_str_new(rb_funcall2(klass, id_digest, argc, argv));
}
-/* Document-method: Digest::Instance#bubblebabble
- *
+/*
* call-seq:
* digest_obj.bubblebabble -> hash_string
*
@@ -124,23 +121,22 @@ rb_digest_instance_bubblebabble(VALUE self)
void
Init_bubblebabble(void)
{
- VALUE rb_mDigest, rb_mDigest_Instance, rb_cDigest_Class;
+ VALUE mDigest, mDigest_Instance, cDigest_Class;
rb_require("digest");
- rb_mDigest = rb_path2class("Digest");
- rb_mDigest_Instance = rb_path2class("Digest::Instance");
- rb_cDigest_Class = rb_path2class("Digest::Class");
+ mDigest = rb_path2class("Digest");
+ mDigest_Instance = rb_path2class("Digest::Instance");
+ cDigest_Class = rb_path2class("Digest::Class");
+
+ /* Digest::bubblebabble() */
+ rb_define_module_function(mDigest, "bubblebabble", rb_digest_s_bubblebabble, 1);
-#if 0
- rb_mDigest = rb_define_module("Digest");
- rb_mDigest_Instance = rb_define_module_under(rb_mDigest, "Instance");
- rb_cDigest_Class = rb_define_class_under(rb_mDigest, "Class", rb_cObject);
-#endif
+ /* Digest::Class::bubblebabble() */
+ rb_define_singleton_method(cDigest_Class, "bubblebabble", rb_digest_class_s_bubblebabble, -1);
- rb_define_module_function(rb_mDigest, "bubblebabble", rb_digest_s_bubblebabble, 1);
- rb_define_singleton_method(rb_cDigest_Class, "bubblebabble", rb_digest_class_s_bubblebabble, -1);
- rb_define_method(rb_mDigest_Instance, "bubblebabble", rb_digest_instance_bubblebabble, 0);
+ /* Digest::Instance#bubblebabble() */
+ rb_define_method(mDigest_Instance, "bubblebabble", rb_digest_instance_bubblebabble, 0);
id_digest = rb_intern("digest");
}
diff --git a/ext/digest/bubblebabble/depend b/ext/digest/bubblebabble/depend
index d13a156ce1..b20148ded4 100644
--- a/ext/digest/bubblebabble/depend
+++ b/ext/digest/bubblebabble/depend
@@ -1 +1,3 @@
-bubblebabble.o: bubblebabble.c $(srcdir)/../digest.h $(srcdir)/../defs.h $(HDRS) $(ruby_headers)
+bubblebabble.o: bubblebabble.c $(srcdir)/../digest.h $(hdrdir)/ruby.h \
+ $(topdir)/config.h $(hdrdir)/defines.h $(hdrdir)/intern.h \
+ $(srcdir)/../defs.h
diff --git a/ext/digest/depend b/ext/digest/depend
index 2fbc6d9adf..43601a208f 100644
--- a/ext/digest/depend
+++ b/ext/digest/depend
@@ -1 +1,2 @@
-digest.o: digest.c digest.h $(HDRS) $(ruby_headers)
+digest.o: digest.c digest.h $(hdrdir)/ruby.h $(topdir)/config.h \
+ $(hdrdir)/defines.h $(hdrdir)/intern.h
diff --git a/ext/digest/digest.c b/ext/digest/digest.c
index 527d0ed1fe..c603441409 100644
--- a/ext/digest/digest.c
+++ b/ext/digest/digest.c
@@ -30,60 +30,40 @@ RUBY_EXTERN void Init_digest_base(void);
*
* This module provides a framework for message digest libraries.
*
- * You may want to look at OpenSSL::Digest as it supports more algorithms.
+ * You may want to look at OpenSSL::Digest as it supports support more
+ * algorithms.
*
- * A cryptographic hash function is a procedure that takes data and returns a
- * fixed bit string: the hash value, also known as _digest_. Hash functions
+ * A cryptographic hash function is a procedure that takes data and return a
+ * fixed bit string : the hash value, also known as _digest_. Hash functions
* are also called one-way functions, it is easy to compute a digest from
* a message, but it is infeasible to generate a message from a digest.
*
- * == Examples
+ * == Example
*
* require 'digest'
*
* # Compute a complete digest
- * Digest::SHA256.digest 'message' #=> "\xABS\n\x13\xE4Y..."
- *
* sha256 = Digest::SHA256.new
- * sha256.digest 'message' #=> "\xABS\n\x13\xE4Y..."
- *
- * # Other encoding formats
- * Digest::SHA256.hexdigest 'message' #=> "ab530a13e459..."
- * Digest::SHA256.base64digest 'message' #=> "q1MKE+RZFJgr..."
+ * digest = sha256.digest message
*
* # Compute digest by chunks
- * md5 = Digest::MD5.new
- * md5.update 'message1'
- * md5 << 'message2' # << is an alias for update
- *
- * md5.hexdigest #=> "94af09c09bb9..."
- *
- * # Compute digest for a file
- * sha256 = Digest::SHA256.file 'testfile'
- * sha256.hexdigest
- *
- * Additionally digests can be encoded in "bubble babble" format as a sequence
- * of consonants and vowels which is more recognizable and comparable than a
- * hexadecimal digest.
- *
- * require 'digest/bubblebabble'
- *
- * Digest::SHA256.bubblebabble 'message' #=> "xopoh-fedac-fenyh-..."
+ * sha256 = Digest::SHA256.new
+ * sha256.update message1
+ * sha256 << message2 # << is an alias for update
*
- * See the bubble babble specification at
- * http://web.mit.edu/kenta/www/one/bubblebabble/spec/jrtrjwzi/draft-huima-01.txt.
+ * digest = sha256.digest
*
* == Digest algorithms
*
- * Different digest algorithms (or hash functions) are available:
+ * Different digest algorithms (or hash functions) are available :
*
* HMAC::
- * See FIPS PUB 198 The Keyed-Hash Message Authentication Code (HMAC).
+ * See FIPS PUB 198 The Keyed-Hash Message Authentication Code (HMAC)
* RIPEMD-160::
- * As Digest::RMD160.
- * See http://homes.esat.kuleuven.be/~bosselae/ripemd160.html.
+ * (as Digest::RMD160) see
+ * http://homes.esat.kuleuven.be/~bosselae/ripemd160.html
* SHA1::
- * See FIPS 180 Secure Hash Standard.
+ * See FIPS 180 Secure Hash Standard
* SHA2 family::
* See FIPS 180 Secure Hash Standard which defines the following algorithms:
* * SHA512
@@ -91,7 +71,11 @@ RUBY_EXTERN void Init_digest_base(void);
* * SHA256
*
* The latest versions of the FIPS publications can be found here:
- * http://csrc.nist.gov/publications/PubsFIPS.html.
+ * http://csrc.nist.gov/publications/PubsFIPS.html
+ *
+ * Additionally Digest::BubbleBabble encodes a digest as a sequence of
+ * consonants and vowels which is more recognizable and comparable than a
+ * hexadecimal digest. See http://en.wikipedia.org/wiki/Bubblebabble
*/
static VALUE
diff --git a/ext/digest/lib/digest.rb b/ext/digest/lib/digest.rb
index 5f7ebc2237..4a98af2eae 100644
--- a/ext/digest/lib/digest.rb
+++ b/ext/digest/lib/digest.rb
@@ -21,14 +21,12 @@ module Digest
end
class ::Digest::Class
- # Creates a digest object and reads a given file, _name_.
- # Optional arguments are passed to the constructor of the digest
- # class.
+ # creates a digest object and reads a given file, _name_.
#
# p Digest::SHA256.file("X11R6.8.2-src.tar.bz2").hexdigest
# # => "f02e3c85572dc9ad7cb77c2a638e3be24cc1b5bea9fdbb0b0299c9668475c534"
- def self.file(name, *args)
- new(*args).file(name)
+ def self.file(name)
+ new.file(name)
end
# Returns the base64 encoded hash value of a given _string_. The
@@ -40,7 +38,7 @@ module Digest
end
module Instance
- # Updates the digest with the contents of a given file _name_ and
+ # updates the digest with the contents of a given file _name_ and
# returns self.
def file(name)
File.open(name, "rb") {|f|
diff --git a/ext/digest/lib/digest/hmac.rb b/ext/digest/lib/digest/hmac.rb
index 3883badc45..470b0226d4 100644
--- a/ext/digest/lib/digest/hmac.rb
+++ b/ext/digest/lib/digest/hmac.rb
@@ -41,7 +41,7 @@ module Digest
# hmac.update(buf)
# end
#
- # puts hmac.hexdigest
+ # puts hmac.bubblebabble
#
class HMAC < Digest::Class
diff --git a/ext/digest/md5/depend b/ext/digest/md5/depend
index ca30d310e9..8eaec20b4b 100644
--- a/ext/digest/md5/depend
+++ b/ext/digest/md5/depend
@@ -1,3 +1,6 @@
-md5.o: md5.c md5.h $(srcdir)/../defs.h
-md5init.o: md5init.c md5.h $(srcdir)/../digest.h $(srcdir)/../defs.h $(HDRS) $(ruby_headers)
+md5.o: md5.c md5.h $(srcdir)/../defs.h $(hdrdir)/ruby.h $(topdir)/config.h \
+ $(hdrdir)/defines.h $(hdrdir)/intern.h
+md5init.o: md5init.c $(srcdir)/../digest.h $(hdrdir)/ruby.h \
+ $(topdir)/config.h $(hdrdir)/defines.h $(hdrdir)/intern.h md5.h \
+ $(srcdir)/../defs.h
md5ossl.o: md5ossl.h
diff --git a/ext/digest/md5/md5.c b/ext/digest/md5/md5.c
index 8d7d33c5a6..518f8239ed 100644
--- a/ext/digest/md5/md5.c
+++ b/ext/digest/md5/md5.c
@@ -368,7 +368,7 @@ MD5_Update(MD5_CTX *pms, const uint8_t *data, size_t nbytes)
size_t offset = (pms->count[0] >> 3) & 63;
uint32_t nbits = (uint32_t)(nbytes << 3);
- if (nbytes == 0)
+ if (nbytes <= 0)
return;
/* Update the message length. */
diff --git a/ext/digest/rmd160/depend b/ext/digest/rmd160/depend
index c5524be459..a21d7188dc 100644
--- a/ext/digest/rmd160/depend
+++ b/ext/digest/rmd160/depend
@@ -1,3 +1,6 @@
-rmd160.o: rmd160.c rmd160.h $(srcdir)/../defs.h $(HDRS) $(ruby_headers)
-rmd160init.o: rmd160init.c rmd160.h $(srcdir)/../digest.h $(srcdir)/../defs.h $(HDRS) $(ruby_headers)
+rmd160.o: rmd160.c rmd160.h $(srcdir)/../defs.h $(hdrdir)/ruby.h \
+ $(topdir)/config.h $(hdrdir)/defines.h $(hdrdir)/intern.h
+rmd160init.o: rmd160init.c $(srcdir)/../digest.h $(hdrdir)/ruby.h \
+ $(topdir)/config.h $(hdrdir)/defines.h $(hdrdir)/intern.h \
+ rmd160.h $(srcdir)/../defs.h
rmd160ossl.o: rmd160ossl.h $(srcdir)/../defs.h
diff --git a/ext/digest/sha1/depend b/ext/digest/sha1/depend
index 6b6ee6a0bf..61607844d0 100644
--- a/ext/digest/sha1/depend
+++ b/ext/digest/sha1/depend
@@ -1,3 +1,6 @@
-sha1.o: sha1.c sha1.h $(srcdir)/../defs.h
-sha1init.o: sha1init.c sha1.h $(srcdir)/../digest.h sha1.h $(srcdir)/../defs.h $(HDRS) $(ruby_headers)
-sha1ossl.o: sha1ossl.h $(srcdir)/../defs.h $(HDRS) $(ruby_headers)
+sha1.o: sha1.c sha1.h $(srcdir)/../defs.h $(hdrdir)/ruby.h \
+ $(topdir)/config.h $(hdrdir)/defines.h $(hdrdir)/intern.h
+sha1init.o: sha1init.c $(srcdir)/../digest.h $(hdrdir)/ruby.h \
+ $(topdir)/config.h $(hdrdir)/defines.h $(hdrdir)/intern.h \
+ sha1.h $(srcdir)/../defs.h
+sha1ossl.o: sha1ossl.h $(srcdir)/../defs.h
diff --git a/ext/digest/sha2/depend b/ext/digest/sha2/depend
index 7373f46fc2..00e18e158d 100644
--- a/ext/digest/sha2/depend
+++ b/ext/digest/sha2/depend
@@ -1,3 +1,6 @@
-sha2.o: sha2.c sha2.h $(srcdir)/../defs.h $(HDRS) $(ruby_headers)
-sha2init.o: sha2init.c sha2.h $(srcdir)/../digest.h $(srcdir)/../defs.h $(HDRS) $(ruby_headers)
-sha2ossl.o: sha2ossl.h $(srcdir)/../defs.h $(HDRS) $(ruby_headers)
+sha2.o: sha2.c sha2.h $(srcdir)/../defs.h $(hdrdir)/ruby.h \
+ $(topdir)/config.h $(hdrdir)/defines.h $(hdrdir)/intern.h
+sha2init.o: sha2init.c $(srcdir)/../digest.h $(hdrdir)/ruby.h \
+ $(topdir)/config.h $(hdrdir)/defines.h $(hdrdir)/intern.h \
+ sha2.h $(srcdir)/../defs.h
+sha2ossl.o: sha2ossl.h $(srcdir)/../defs.h
diff --git a/ext/digest/sha2/sha2.c b/ext/digest/sha2/sha2.c
index 3457790eea..0fe64489ab 100644
--- a/ext/digest/sha2/sha2.c
+++ b/ext/digest/sha2/sha2.c
@@ -613,8 +613,7 @@ void SHA256_Final(sha2_byte digest[], SHA256_CTX* context) {
*context->buffer = 0x80;
}
/* Set the bit count: */
- MEMCPY_BCOPY(&context->buffer[SHA256_SHORT_BLOCK_LENGTH], &context->bitcount,
- sizeof(sha2_word64));
+ *(sha2_word64*)&context->buffer[SHA256_SHORT_BLOCK_LENGTH] = context->bitcount;
/* Final transform: */
SHA256_Transform(context, (sha2_word32*)context->buffer);
@@ -931,10 +930,8 @@ void SHA512_Last(SHA512_CTX* context) {
*context->buffer = 0x80;
}
/* Store the length of input data (in bits): */
- MEMCPY_BCOPY(&context->buffer[SHA512_SHORT_BLOCK_LENGTH], &context->bitcount[1],
- sizeof(sha2_word64));
- MEMCPY_BCOPY(&context->buffer[SHA512_SHORT_BLOCK_LENGTH+8], &context->bitcount[0],
- sizeof(sha2_word64));
+ *(sha2_word64*)&context->buffer[SHA512_SHORT_BLOCK_LENGTH] = context->bitcount[1];
+ *(sha2_word64*)&context->buffer[SHA512_SHORT_BLOCK_LENGTH+8] = context->bitcount[0];
/* Final transform: */
SHA512_Transform(context, (sha2_word64*)context->buffer);
diff --git a/ext/dl/callback/depend b/ext/dl/callback/depend
index c3b4fef1db..7a1dc1ee62 100644
--- a/ext/dl/callback/depend
+++ b/ext/dl/callback/depend
@@ -3,7 +3,7 @@ src: callback.c \
callback-3.c callback-4.c callback-5.c \
callback-6.c callback-7.c callback-8.c
-$(OBJS): $(srcdir)/../dl.h $(HDRS) $(ruby_headers)
+$(OBJS): $(hdrdir)/ruby.h
callback-0.c callback-1.c callback-2.c \
callback-3.c callback-4.c callback-5.c \
diff --git a/ext/dl/cfunc.c b/ext/dl/cfunc.c
index 1f4958bbdc..2a96b30bed 100644
--- a/ext/dl/cfunc.c
+++ b/ext/dl/cfunc.c
@@ -86,6 +86,7 @@ rb_dlcfunc_new(void (*func)(), int type, const char *name, ID calltype)
VALUE val;
struct cfunc_data *data;
+ rb_secure(4);
if( func ){
val = TypedData_Make_Struct(rb_cDLCFunc, struct cfunc_data, &dlcfunc_data_type, data);
data->ptr = (void *)(VALUE)func;
@@ -284,9 +285,7 @@ rb_dlcfunc_set_ptr(VALUE self, VALUE addr)
}
/*
- * call-seq:
- * inspect
- * to_s
+ * call-seq: inspect
*
* Returns a string formatted with an easily readable representation of the
* internal state of the DL::CFunc
@@ -345,6 +344,8 @@ rb_dlcfunc_call(VALUE self, VALUE ary)
DLSTACK_TYPE stack[DLSTACK_SIZE];
VALUE result = Qnil;
+ rb_secure_update(self);
+
memset(stack, 0, sizeof(DLSTACK_TYPE) * DLSTACK_SIZE);
Check_Type(ary, T_ARRAY);
@@ -366,14 +367,11 @@ rb_dlcfunc_call(VALUE self, VALUE ary)
stack[i] = (DLSTACK_TYPE)FIX2LONG(arg);
}
else if (RB_TYPE_P(arg, T_BIGNUM)) {
- unsigned long ls[(sizeof(DLSTACK_TYPE) + sizeof(long) - 1)/sizeof(long)];
- DLSTACK_TYPE d;
- int j;
- rb_big_pack(arg, ls, sizeof(ls)/sizeof(*ls));
- d = 0;
- for (j = 0; j < (int)(sizeof(ls)/sizeof(*ls)); j++)
- d |= (DLSTACK_TYPE)ls[j] << (j * sizeof(long) * CHAR_BIT);
- stack[i] = d;
+#if SIZEOF_VOIDP == SIZEOF_LONG
+ stack[i] = (DLSTACK_TYPE)rb_big2ulong_pack(arg);
+#else
+ stack[i] = (DLSTACK_TYPE)rb_big2ull(arg);
+#endif
}
else {
Check_Type(arg, T_FIXNUM);
@@ -639,7 +637,7 @@ Init_dlcfunc(void)
* => "/lib64/libc.so.6"
* libc = DL::dlopen(libc_so)
* => #<DL::Handle:0x00000000e05b00>
- * @cfunc = DL::CFunc.new(libc['strcpy'], DL::TYPE_VOIDP, 'strcpy')
+ * @cfunc = DL::CFunc.new(libc,['strcpy'], DL::TYPE_VOIDP, 'strcpy')
* => #<DL::CFunc:0x000000012daec0 ptr=0x007f62ca5a8300 type=1 name='strcpy'>
*
*/
diff --git a/ext/dl/cptr.c b/ext/dl/cptr.c
index 9e59139fc9..636099d1fd 100644
--- a/ext/dl/cptr.c
+++ b/ext/dl/cptr.c
@@ -69,6 +69,7 @@ rb_dlptr_new2(VALUE klass, void *ptr, long size, freefunc_t func)
struct ptr_data *data;
VALUE val;
+ rb_secure(4);
val = TypedData_Make_Struct(klass, struct ptr_data, &dlptr_data_type, data);
data->ptr = ptr;
data->free = func;
@@ -89,6 +90,7 @@ rb_dlptr_malloc(long size, freefunc_t func)
{
void *ptr;
+ rb_secure(4);
ptr = ruby_xmalloc((size_t)size);
memset(ptr,0,(size_t)size);
return rb_dlptr_new(ptr, size, func);
@@ -120,6 +122,7 @@ rb_dlptr_s_allocate(VALUE klass)
VALUE obj;
struct ptr_data *data;
+ rb_secure(4);
obj = TypedData_Make_Struct(klass, struct ptr_data, &dlptr_data_type, data);
data->ptr = 0;
data->size = 0;
diff --git a/ext/dl/depend b/ext/dl/depend
index d0a3ab8ef0..992c17c1b8 100644
--- a/ext/dl/depend
+++ b/ext/dl/depend
@@ -1,14 +1,7 @@
-cfunc.o: cfunc.c dl.h $(HDRS) $(ruby_headers) \
- $(hdrdir)/ruby/util.h
+cfunc.o: cfunc.c dl.h $(hdrdir)/ruby.h
-cptr.o: cptr.c dl.h $(HDRS) $(ruby_headers) \
- $(hdrdir)/ruby/io.h \
- $(hdrdir)/ruby/encoding.h \
- $(hdrdir)/ruby/oniguruma.h
+cptr.o: cptr.c dl.h $(hdrdir)/ruby.h $(hdrdir)/io.h
-handle.o: handle.c dl.h $(HDRS) $(ruby_headers)
+handle.o: handle.c dl.h $(hdrdir)/ruby.h
-dl.o: dl.c dl.h $(HDRS) $(ruby_headers) \
- $(hdrdir)/ruby/io.h \
- $(hdrdir)/ruby/encoding.h \
- $(hdrdir)/ruby/oniguruma.h
+dl.o: dl.c dl.h $(hdrdir)/ruby.h $(hdrdir)/io.h
diff --git a/ext/dl/dl.c b/ext/dl/dl.c
index 23f5d7fe6e..49fa7c81ac 100644
--- a/ext/dl/dl.c
+++ b/ext/dl/dl.c
@@ -1,7 +1,7 @@
/*
* ext/dl/dl.c
*
- * documentation:
+ * doumentation:
* - Vincent Batts (vbatts@hashbangbash.com)
*
*/
@@ -81,6 +81,7 @@ rb_dl_malloc(VALUE self, VALUE size)
{
void *ptr;
+ rb_secure(4);
ptr = (void*)ruby_xmalloc(NUM2INT(size));
return PTR2NUM(ptr);
}
@@ -97,6 +98,7 @@ rb_dl_realloc(VALUE self, VALUE addr, VALUE size)
{
void *ptr = NUM2PTR(addr);
+ rb_secure(4);
ptr = (void*)ruby_xrealloc(ptr, NUM2INT(size));
return PTR2NUM(ptr);
}
@@ -111,6 +113,7 @@ rb_dl_free(VALUE self, VALUE addr)
{
void *ptr = NUM2PTR(addr);
+ rb_secure(4);
ruby_xfree(ptr);
return Qnil;
}
@@ -134,6 +137,7 @@ rb_dl_free(VALUE self, VALUE addr)
VALUE
rb_dl_ptr2value(VALUE self, VALUE addr)
{
+ rb_secure(4);
return (VALUE)NUM2PTR(addr);
}
diff --git a/ext/dl/dl.h b/ext/dl/dl.h
index f8380a8471..07adbbf680 100644
--- a/ext/dl/dl.h
+++ b/ext/dl/dl.h
@@ -22,7 +22,7 @@
#else
# if defined(_WIN32)
# include <windows.h>
-# define dlopen(name,flag) ((void)(flag),(void*)LoadLibrary(name))
+# define dlopen(name,flag) ((void*)LoadLibrary(name))
# define dlerror() strerror(rb_w32_map_errno(GetLastError()))
# define dlsym(handle,name) ((void*)GetProcAddress((handle),(name)))
# define RTLD_LAZY -1
diff --git a/ext/dl/lib/dl/func.rb b/ext/dl/lib/dl/func.rb
index 543711f651..a2e503835f 100644
--- a/ext/dl/lib/dl/func.rb
+++ b/ext/dl/lib/dl/func.rb
@@ -92,9 +92,6 @@ module DL
super
else
funcs = []
- if $SAFE >= 1 && args.any? { |x| x.tainted? }
- raise SecurityError, "tainted parameter not allowed"
- end
_args = wrap_args(args, @stack.types, funcs, &block)
r = @cfunc.call(@stack.pack(_args))
funcs.each{|f| f.unbind_at_call()}
diff --git a/ext/dl/win32/extconf.rb b/ext/dl/win32/extconf.rb
new file mode 100644
index 0000000000..03590f24fa
--- /dev/null
+++ b/ext/dl/win32/extconf.rb
@@ -0,0 +1,3 @@
+if compiled?('dl') and !compiled?('fiddle') and $mswin||$bccwin||$mingw||$cygwin
+ create_makefile('win32')
+end
diff --git a/ext/win32/lib/Win32API.rb b/ext/dl/win32/lib/Win32API.rb
index 4d7d4887a5..4d7d4887a5 100644
--- a/ext/win32/lib/Win32API.rb
+++ b/ext/dl/win32/lib/Win32API.rb
diff --git a/ext/win32/lib/win32/registry.rb b/ext/dl/win32/lib/win32/registry.rb
index 74cc77dc9f..6edd85b8fb 100644
--- a/ext/win32/lib/win32/registry.rb
+++ b/ext/dl/win32/lib/win32/registry.rb
@@ -1,12 +1,11 @@
-require 'win32/importer'
-
+require 'dl/import'
module Win32
=begin rdoc
= Win32 Registry
win32/registry is registry accessor library for Win32 platform.
-It uses importer to call Win32 Registry APIs.
+It uses dl/import to call Win32 Registry APIs.
== example
Win32::Registry::HKEY_CURRENT_USER.open('SOFTWARE\foo') do |reg|
@@ -64,11 +63,6 @@ For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/pr
=end rdoc
- WCHAR = Encoding::UTF_16LE
- WCHAR_NUL = "\0".encode(WCHAR).freeze
- WCHAR_SIZE = WCHAR_NUL.bytesize
- LOCALE = Encoding.find(Encoding.locale_charmap)
-
class Registry
#
@@ -167,16 +161,16 @@ For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/pr
#
class Error < ::StandardError
module Kernel32
- extend Importer
+ extend DL::Importer
dlload "kernel32.dll"
end
- FormatMessageW = Kernel32.extern "int FormatMessageW(int, void *, int, int, void *, int, void *)", :stdcall
+ FormatMessageA = Kernel32.extern "int FormatMessageA(int, void *, int, int, void *, int, void *)", :stdcall
def initialize(code)
@code = code
- msg = WCHAR_NUL * 1024
- len = FormatMessageW.call(0x1200, 0, code, 0, msg, 1024, 0)
- msg = msg[0, len].encode(LOCALE)
- super msg.tr("\r".encode(msg.encoding), '').chomp
+ msg = "\0".force_encoding(Encoding::ASCII_8BIT) * 1024
+ len = FormatMessageA.call(0x1200, 0, code, 0, msg, 1024, 0)
+ msg = msg[0, len].force_encoding(Encoding.find(Encoding.locale_charmap))
+ super msg.tr("\r", '').chomp
end
attr_reader :code
end
@@ -212,16 +206,15 @@ For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/pr
# Win32 APIs
#
module API
- include Constants
- extend Importer
+ extend DL::Importer
dlload "advapi32.dll"
[
- "long RegOpenKeyExW(void *, void *, long, long, void *)",
- "long RegCreateKeyExW(void *, void *, long, long, long, long, void *, void *, void *)",
- "long RegEnumValueW(void *, long, void *, void *, void *, void *, void *, void *)",
- "long RegEnumKeyExW(void *, long, void *, void *, void *, void *, void *, void *)",
- "long RegQueryValueExW(void *, void *, void *, void *, void *, void *)",
- "long RegSetValueExW(void *, void *, long, long, void *, long)",
+ "long RegOpenKeyExA(void *, void *, long, long, void *)",
+ "long RegCreateKeyExA(void *, void *, long, long, long, long, void *, void *, void *)",
+ "long RegEnumValueA(void *, long, void *, void *, void *, void *, void *, void *)",
+ "long RegEnumKeyExA(void *, long, void *, void *, void *, void *, void *, void *)",
+ "long RegQueryValueExA(void *, void *, void *, void *, void *, void *)",
+ "long RegSetValueExA(void *, void *, long, long, void *, long)",
"long RegDeleteValue(void *, void *)",
"long RegDeleteKey(void *, void *)",
"long RegFlushKey(void *)",
@@ -235,19 +228,7 @@ For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/pr
module_function
def check(result)
- raise Error, result, caller(1) if result != 0
- end
-
- def win64?
- /^(?:x64|x86_64)/ =~ RUBY_PLATFORM
- end
-
- def packhandle(h)
- win64? ? packqw(h) : packdw(h)
- end
-
- def unpackhandle(h)
- win64? ? unpackqw(h) : unpackdw(h)
+ raise Error, result, caller(2) if result != 0
end
def packdw(dw)
@@ -268,64 +249,54 @@ For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/pr
(qw[1] << 32) | qw[0]
end
- def make_wstr(str)
- str.encode(WCHAR)
- end
-
def OpenKey(hkey, name, opt, desired)
- result = packhandle(0)
- check RegOpenKeyExW.call(hkey, make_wstr(name), opt, desired, result)
- unpackhandle(result)
+ result = packdw(0)
+ check RegOpenKeyExA.call(hkey, name, opt, desired, result)
+ unpackdw(result)
end
def CreateKey(hkey, name, opt, desired)
- result = packhandle(0)
+ result = packdw(0)
disp = packdw(0)
- check RegCreateKeyExW.call(hkey, make_wstr(name), 0, 0, opt, desired,
+ check RegCreateKeyExA.call(hkey, name, 0, 0, opt, desired,
0, result, disp)
- [ unpackhandle(result), unpackdw(disp) ]
+ [ unpackdw(result), unpackdw(disp) ]
end
def EnumValue(hkey, index)
- name = WCHAR_NUL * Constants::MAX_KEY_LENGTH
+ name = ' ' * Constants::MAX_KEY_LENGTH
size = packdw(Constants::MAX_KEY_LENGTH)
- check RegEnumValueW.call(hkey, index, name, size, 0, 0, 0, 0)
+ check RegEnumValueA.call(hkey, index, name, size, 0, 0, 0, 0)
name[0, unpackdw(size)]
end
def EnumKey(hkey, index)
- name = WCHAR_NUL * Constants::MAX_KEY_LENGTH
+ name = ' ' * Constants::MAX_KEY_LENGTH
size = packdw(Constants::MAX_KEY_LENGTH)
wtime = ' ' * 8
- check RegEnumKeyExW.call(hkey, index, name, size, 0, 0, 0, wtime)
+ check RegEnumKeyExA.call(hkey, index, name, size, 0, 0, 0, wtime)
[ name[0, unpackdw(size)], unpackqw(wtime) ]
end
def QueryValue(hkey, name)
type = packdw(0)
size = packdw(0)
- name = make_wstr(name)
- check RegQueryValueExW.call(hkey, name, 0, type, 0, size)
- data = "\0".force_encoding('ASCII-8BIT') * unpackdw(size)
- check RegQueryValueExW.call(hkey, name, 0, type, data, size)
+ check RegQueryValueExA.call(hkey, name, 0, type, 0, size)
+ data = ' ' * unpackdw(size)
+ check RegQueryValueExA.call(hkey, name, 0, type, data, size)
[ unpackdw(type), data[0, unpackdw(size)] ]
end
def SetValue(hkey, name, type, data, size)
- case type
- when REG_SZ, REG_EXPAND_SZ, REG_MULTI_SZ
- data = data.encode(WCHAR)
- size ||= data.size + 1
- end
- check RegSetValueExW.call(hkey, make_wstr(name), 0, type, data, size)
+ check RegSetValueExA.call(hkey, name, 0, type, data, size)
end
def DeleteValue(hkey, name)
- check RegDeleteValue.call(hkey, make_wstr(name))
+ check RegDeleteValue.call(hkey, name)
end
def DeleteKey(hkey, name)
- check RegDeleteKey.call(hkey, make_wstr(name))
+ check RegDeleteKey.call(hkey, name)
end
def FlushKey(hkey)
@@ -359,11 +330,7 @@ For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/pr
# For detail, see expandEnvironmentStrings[http://msdn.microsoft.com/library/en-us/sysinfo/base/expandenvironmentstrings.asp] \Win32 \API.
#
def self.expand_environ(str)
- str.gsub(Regexp.compile("%([^%]+)%".encode(str.encoding))) {
- v = $1.encode(LOCALE)
- (e = ENV[v] || ENV[v.upcase]; e.encode(str.encoding) if e) ||
- $&
- }
+ str.gsub(/%([^%]+)%/) { ENV[$1] || ENV[$1.upcase] || $& }
end
@@type2name = { }
@@ -558,7 +525,6 @@ For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/pr
rescue Error
break
end
- subkey = export_string(subkey)
begin
type, data = read(subkey)
rescue Error
@@ -572,15 +538,6 @@ For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/pr
alias each each_value
#
- # return values as an array
- #
- def values
- vals_ary = []
- each_value { |*, val| vals_ary << val }
- vals_ary
- end
-
- #
# Enumerate subkeys.
#
# subkey is String which contains name of subkey.
@@ -595,7 +552,6 @@ For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/pr
rescue Error
break
end
- subkey = export_string(subkey)
yield subkey, wtime
index += 1
end
@@ -634,9 +590,9 @@ For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/pr
end
case type
when REG_SZ, REG_EXPAND_SZ
- [ type, data.encode(name.encoding, WCHAR).chop ]
+ [ type, data.chop ]
when REG_MULTI_SZ
- [ type, data.encode(name.encoding, WCHAR).split(/\0/) ]
+ [ type, data.split(/\0/) ]
when REG_BINARY
[ type, data ]
when REG_DWORD
@@ -725,14 +681,11 @@ For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/pr
# method returns.
#
def write(name, type, data)
- termsize = 0
case type
when REG_SZ, REG_EXPAND_SZ
- data = data.encode(WCHAR)
- termsize = WCHAR_SIZE
+ data = data.to_s + "\0"
when REG_MULTI_SZ
- data = data.to_a.map {|s| s.encode(WCHAR)}.join(WCHAR_NUL) << WCHAR_NUL
- termsize = WCHAR_SIZE
+ data = data.to_a.join("\0") + "\0\0"
when REG_BINARY
data = data.to_s
when REG_DWORD
@@ -744,7 +697,7 @@ For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/pr
else
raise TypeError, "Unsupported type #{type}"
end
- API.SetValue(@hkey, name, type, data, data.bytesize + termsize)
+ API.SetValue(@hkey, name, type, data, data.length)
end
#
@@ -888,11 +841,5 @@ For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/pr
end
__END__
end
-
- private
-
- def export_string(str, enc = Encoding.default_internal || LOCALE) # :nodoc:
- str.encode(enc)
- end
end
end
diff --git a/ext/win32/lib/win32/resolv.rb b/ext/dl/win32/lib/win32/resolv.rb
index b5c11bf878..8a65472877 100644
--- a/ext/win32/lib/win32/resolv.rb
+++ b/ext/dl/win32/lib/win32/resolv.rb
@@ -3,6 +3,7 @@
=end
+require "dl/import"
require 'win32/registry'
module Win32
@@ -34,7 +35,7 @@ module Win32
end
module Kernel32
- extend Importer
+ extend DL::Importer
dlload "kernel32"
end
getv = Kernel32.extern "int GetVersionExA(void *)", :stdcall
@@ -260,7 +261,7 @@ else
module WsControl
module WSock32
- extend Importer
+ extend DL::Importer
dlload "wsock32.dll"
end
WsControl = WSock32.extern "int WsControl(int, int, void *, void *, void *, void *", :stdcall
diff --git a/ext/win32/lib/win32/sspi.rb b/ext/dl/win32/lib/win32/sspi.rb
index 4645e1b306..6022df96c3 100644
--- a/ext/win32/lib/win32/sspi.rb
+++ b/ext/dl/win32/lib/win32/sspi.rb
@@ -327,4 +327,4 @@ module Win32
end
end
end
-end
+end \ No newline at end of file
diff --git a/ext/etc/depend b/ext/etc/depend
index 2db89d969c..f2c04f5879 100644
--- a/ext/etc/depend
+++ b/ext/etc/depend
@@ -1,3 +1 @@
-etc.o : etc.c $(HDRS) $(ruby_headers) \
- $(hdrdir)/ruby/encoding.h \
- $(hdrdir)/ruby/oniguruma.h
+etc.o : etc.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h
diff --git a/ext/etc/etc.c b/ext/etc/etc.c
index 18d425a8bf..a511baf1a5 100644
--- a/ext/etc/etc.c
+++ b/ext/etc/etc.c
@@ -60,6 +60,7 @@ etc_getlogin(VALUE obj)
{
char *login;
+ rb_secure(4);
#ifdef HAVE_GETLOGIN
login = getlogin();
if (!login) login = getenv("USER");
@@ -79,20 +80,6 @@ safe_setup_str(const char *str)
if (str == 0) str = "";
return rb_tainted_str_new2(str);
}
-
-static VALUE
-safe_setup_locale_str(const char *str)
-{
- if (str == 0) str = "";
- return rb_locale_str_new_cstr(str);
-}
-
-static VALUE
-safe_setup_filesystem_str(const char *str)
-{
- if (str == 0) str = "";
- return rb_filesystem_str_new_cstr(str);
-}
#endif
#ifdef HAVE_GETPWENT
@@ -101,33 +88,33 @@ setup_passwd(struct passwd *pwd)
{
if (pwd == 0) rb_sys_fail("/etc/passwd");
return rb_struct_new(sPasswd,
- safe_setup_locale_str(pwd->pw_name),
-#ifdef HAVE_STRUCT_PASSWD_PW_PASSWD
+ safe_setup_str(pwd->pw_name),
+#ifdef HAVE_ST_PW_PASSWD
safe_setup_str(pwd->pw_passwd),
#endif
UIDT2NUM(pwd->pw_uid),
GIDT2NUM(pwd->pw_gid),
-#ifdef HAVE_STRUCT_PASSWD_PW_GECOS
- safe_setup_locale_str(pwd->pw_gecos),
+#ifdef HAVE_ST_PW_GECOS
+ safe_setup_str(pwd->pw_gecos),
#endif
- safe_setup_filesystem_str(pwd->pw_dir),
- safe_setup_filesystem_str(pwd->pw_shell),
-#ifdef HAVE_STRUCT_PASSWD_PW_CHANGE
+ safe_setup_str(pwd->pw_dir),
+ safe_setup_str(pwd->pw_shell),
+#ifdef HAVE_ST_PW_CHANGE
INT2NUM(pwd->pw_change),
#endif
-#ifdef HAVE_STRUCT_PASSWD_PW_QUOTA
+#ifdef HAVE_ST_PW_QUOTA
INT2NUM(pwd->pw_quota),
#endif
-#ifdef HAVE_STRUCT_PASSWD_PW_AGE
+#ifdef HAVE_ST_PW_AGE
PW_AGE2VAL(pwd->pw_age),
#endif
-#ifdef HAVE_STRUCT_PASSWD_PW_CLASS
- safe_setup_locale_str(pwd->pw_class),
+#ifdef HAVE_ST_PW_CLASS
+ safe_setup_str(pwd->pw_class),
#endif
-#ifdef HAVE_STRUCT_PASSWD_PW_COMMENT
- safe_setup_locale_str(pwd->pw_comment),
+#ifdef HAVE_ST_PW_COMMENT
+ safe_setup_str(pwd->pw_comment),
#endif
-#ifdef HAVE_STRUCT_PASSWD_PW_EXPIRE
+#ifdef HAVE_ST_PW_EXPIRE
INT2NUM(pwd->pw_expire),
#endif
0 /*dummy*/
@@ -150,7 +137,7 @@ setup_passwd(struct passwd *pwd)
* === Example:
*
* Etc.getpwuid(0)
- * #=> #<struct Etc::Passwd name="root", passwd="x", uid=0, gid=0, gecos="root",dir="/root", shell="/bin/bash">
+ * #=> #<struct Struct::Passwd name="root", passwd="x", uid=0, gid=0, gecos="root",dir="/root", shell="/bin/bash">
*/
static VALUE
etc_getpwuid(int argc, VALUE *argv, VALUE obj)
@@ -160,6 +147,7 @@ etc_getpwuid(int argc, VALUE *argv, VALUE obj)
rb_uid_t uid;
struct passwd *pwd;
+ rb_secure(4);
if (rb_scan_args(argc, argv, "01", &id) == 1) {
uid = NUM2UIDT(id);
}
@@ -187,7 +175,7 @@ etc_getpwuid(int argc, VALUE *argv, VALUE obj)
* === Example:
*
* Etc.getpwnam('root')
- * #=> #<struct Etc::Passwd name="root", passwd="x", uid=0, gid=0, gecos="root",dir="/root", shell="/bin/bash">
+ * #=> #<struct Struct::Passwd name="root", passwd="x", uid=0, gid=0, gecos="root",dir="/root", shell="/bin/bash">
*/
static VALUE
etc_getpwnam(VALUE obj, VALUE nam)
@@ -197,7 +185,7 @@ etc_getpwnam(VALUE obj, VALUE nam)
SafeStringValue(nam);
pwd = getpwnam(RSTRING_PTR(nam));
- if (pwd == 0) rb_raise(rb_eArgError, "can't find user for %"PRIsVALUE, nam);
+ if (pwd == 0) rb_raise(rb_eArgError, "can't find user for %s", RSTRING_PTR(nam));
return setup_passwd(pwd);
#else
return Qnil;
@@ -263,6 +251,7 @@ etc_passwd(VALUE obj)
#ifdef HAVE_GETPWENT
struct passwd *pw;
+ rb_secure(4);
if (rb_block_given_p()) {
each_passwd();
}
@@ -365,12 +354,12 @@ setup_group(struct group *grp)
mem = rb_ary_new();
tbl = grp->gr_mem;
while (*tbl) {
- rb_ary_push(mem, safe_setup_locale_str(*tbl));
+ rb_ary_push(mem, safe_setup_str(*tbl));
tbl++;
}
return rb_struct_new(sGroup,
- safe_setup_locale_str(grp->gr_name),
-#ifdef HAVE_STRUCT_GROUP_GR_PASSWD
+ safe_setup_str(grp->gr_name),
+#ifdef HAVE_ST_GR_PASSWD
safe_setup_str(grp->gr_passwd),
#endif
GIDT2NUM(grp->gr_gid),
@@ -391,7 +380,7 @@ setup_group(struct group *grp)
* === Example:
*
* Etc.getgrgid(100)
- * #=> #<struct Etc::Group name="users", passwd="x", gid=100, mem=["meta", "root"]>
+ * #=> #<struct Struct::Group name="users", passwd="x", gid=100, mem=["meta", "root"]>
*
*/
static VALUE
@@ -402,6 +391,7 @@ etc_getgrgid(int argc, VALUE *argv, VALUE obj)
gid_t gid;
struct group *grp;
+ rb_secure(4);
if (rb_scan_args(argc, argv, "01", &id) == 1) {
gid = NUM2GIDT(id);
}
@@ -429,7 +419,7 @@ etc_getgrgid(int argc, VALUE *argv, VALUE obj)
* === Example:
*
* Etc.getgrnam('users')
- * #=> #<struct Etc::Group name="users", passwd="x", gid=100, mem=["meta", "root"]>
+ * #=> #<struct Struct::Group name="users", passwd="x", gid=100, mem=["meta", "root"]>
*
*/
static VALUE
@@ -438,9 +428,10 @@ etc_getgrnam(VALUE obj, VALUE nam)
#ifdef HAVE_GETGRENT
struct group *grp;
+ rb_secure(4);
SafeStringValue(nam);
grp = getgrnam(RSTRING_PTR(nam));
- if (grp == 0) rb_raise(rb_eArgError, "can't find group for %"PRIsVALUE, nam);
+ if (grp == 0) rb_raise(rb_eArgError, "can't find group for %s", RSTRING_PTR(nam));
return setup_group(grp);
#else
return Qnil;
@@ -503,6 +494,7 @@ etc_group(VALUE obj)
#ifdef HAVE_GETGRENT
struct group *grp;
+ rb_secure(4);
if (rb_block_given_p()) {
each_group();
}
@@ -632,7 +624,7 @@ etc_systmpdir(void)
#else
tmpdir = rb_filesystem_str_new_cstr("/tmp");
#endif
- FL_UNSET(tmpdir, FL_TAINT);
+ FL_UNSET(tmpdir, FL_TAINT|FL_UNTRUSTED);
return tmpdir;
}
@@ -686,38 +678,31 @@ Init_etc(void)
rb_define_module_function(mEtc, "sysconfdir", etc_sysconfdir, 0);
rb_define_module_function(mEtc, "systmpdir", etc_systmpdir, 0);
- sPasswd = rb_struct_define_under(mEtc, "Passwd",
- "name",
-#ifdef HAVE_STRUCT_PASSWD_PW_PASSWD
- "passwd",
+ sPasswd = rb_struct_define("Passwd",
+ "name", "passwd", "uid", "gid",
+#ifdef HAVE_ST_PW_GECOS
+ "gecos",
#endif
- "uid",
- "gid",
-#ifdef HAVE_STRUCT_PASSWD_PW_GECOS
- "gecos",
+ "dir", "shell",
+#ifdef HAVE_ST_PW_CHANGE
+ "change",
#endif
- "dir",
- "shell",
-#ifdef HAVE_STRUCT_PASSWD_PW_CHANGE
- "change",
+#ifdef HAVE_ST_PW_QUOTA
+ "quota",
#endif
-#ifdef HAVE_STRUCT_PASSWD_PW_QUOTA
- "quota",
+#ifdef HAVE_ST_PW_AGE
+ "age",
#endif
-#ifdef HAVE_STRUCT_PASSWD_PW_AGE
- "age",
+#ifdef HAVE_ST_PW_CLASS
+ "uclass",
#endif
-#ifdef HAVE_STRUCT_PASSWD_PW_CLASS
- "uclass",
+#ifdef HAVE_ST_PW_COMMENT
+ "comment",
#endif
-#ifdef HAVE_STRUCT_PASSWD_PW_COMMENT
- "comment",
+#ifdef HAVE_ST_PW_EXPIRE
+ "expire",
#endif
-#ifdef HAVE_STRUCT_PASSWD_PW_EXPIRE
- "expire",
-#endif
- NULL);
-#if 0
+ NULL);
/* Define-const: Passwd
*
* Passwd is a Struct that contains the following members:
@@ -743,34 +728,31 @@ Init_etc(void)
* contains a longer String description of the user, such as
* a full name. Some Unix systems provide structured information in the
* gecos field, but this is system-dependent.
- * must be compiled with +HAVE_STRUCT_PASSWD_PW_GECOS+
+ * must be compiled with +HAVE_ST_PW_GECOS+
* change::
- * password change time(integer) must be compiled with +HAVE_STRUCT_PASSWD_PW_CHANGE+
+ * password change time(integer) must be compiled with +HAVE_ST_PW_CHANGE+
* quota::
- * quota value(integer) must be compiled with +HAVE_STRUCT_PASSWD_PW_QUOTA+
+ * quota value(integer) must be compiled with +HAVE_ST_PW_QUOTA+
* age::
- * password age(integer) must be compiled with +HAVE_STRUCT_PASSWD_PW_AGE+
+ * password age(integer) must be compiled with +HAVE_ST_PW_AGE+
* class::
- * user access class(string) must be compiled with +HAVE_STRUCT_PASSWD_PW_CLASS+
+ * user access class(string) must be compiled with +HAVE_ST_PW_CLASS+
* comment::
- * comment(string) must be compiled with +HAVE_STRUCT_PASSWD_PW_COMMENT+
+ * comment(string) must be compiled with +HAVE_ST_PW_COMMENT+
* expire::
- * account expiration time(integer) must be compiled with +HAVE_STRUCT_PASSWD_PW_EXPIRE+
+ * account expiration time(integer) must be compiled with +HAVE_ST_PW_EXPIRE+
*/
rb_define_const(mEtc, "Passwd", sPasswd);
-#endif
- rb_define_const(rb_cStruct, "Passwd", sPasswd); /* deprecated name */
rb_extend_object(sPasswd, rb_mEnumerable);
rb_define_singleton_method(sPasswd, "each", etc_each_passwd, 0);
#ifdef HAVE_GETGRENT
- sGroup = rb_struct_define_under(mEtc, "Group", "name",
-#ifdef HAVE_STRUCT_GROUP_GR_PASSWD
- "passwd",
+ sGroup = rb_struct_define("Group", "name",
+#ifdef HAVE_ST_GR_PASSWD
+ "passwd",
#endif
- "gid", "mem", NULL);
+ "gid", "mem", NULL);
-#if 0
/* Define-const: Group
*
* Group is a Struct that is only available when compiled with +HAVE_GETGRENT+.
@@ -785,7 +767,7 @@ Init_etc(void)
* string is returned if no password is needed to obtain membership of
* the group.
*
- * Must be compiled with +HAVE_STRUCT_GROUP_GR_PASSWD+.
+ * Must be compiled with +HAVE_ST_GR_PASSWD+.
* gid::
* contains the group's numeric ID as an integer.
* mem::
@@ -793,8 +775,6 @@ Init_etc(void)
* members of the group.
*/
rb_define_const(mEtc, "Group", sGroup);
-#endif
- rb_define_const(rb_cStruct, "Group", sGroup); /* deprecated name */
rb_extend_object(sGroup, rb_mEnumerable);
rb_define_singleton_method(sGroup, "each", etc_each_group, 0);
#endif
diff --git a/ext/extmk.rb b/ext/extmk.rb
index ef9afa0676..4e5f64d4f6 100755
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -1,7 +1,6 @@
#! /usr/local/bin/ruby
# -*- mode: ruby; coding: us-ascii -*-
-# :stopdoc:
$extension = nil
$extstatic = nil
$force_static = nil
@@ -105,9 +104,7 @@ def extract_makefile(makefile, keep = true)
/^STATIC_LIB[ \t]*=[ \t]*\S+/ =~ m or $static = false
end
$preload = Shellwords.shellwords(m[/^preload[ \t]*=[ \t]*(.*)/, 1] || "")
- if dldflags = m[/^dldflags[ \t]*=[ \t]*(.*)/, 1] and !$DLDFLAGS.include?(dldflags)
- $DLDFLAGS += " " + dldflags
- end
+ $DLDFLAGS += " " + (m[/^dldflags[ \t]*=[ \t]*(.*)/, 1] || "")
if s = m[/^LIBS[ \t]*=[ \t]*(.*)/, 1]
s.sub!(/^#{Regexp.quote($LIBRUBYARG)} */, "")
s.sub!(/ *#{Regexp.quote($LIBS)}$/, "")
@@ -147,8 +144,6 @@ def extmake(target)
$srcs = []
$compiled[target] = false
makefile = "./Makefile"
- static = $static
- $static = nil if noinstall = File.fnmatch?("-*", target)
ok = File.exist?(makefile)
unless $ignore
rbconfig0 = RbConfig::CONFIG
@@ -198,11 +193,19 @@ def extmake(target)
Logging::logfile 'mkmf.log'
rm_f makefile
if conf
- Logging.open do
- unless verbose?
- $stderr.reopen($stdout.reopen(@null))
- end
+ stdout = $stdout.dup
+ stderr = $stderr.dup
+ unless verbose?
+ $stderr.reopen($stdout.reopen(@null))
+ end
+ begin
load $0 = conf
+ ensure
+ Logging::log_close
+ $stderr.reopen(stderr)
+ $stdout.reopen(stdout)
+ stdout.close
+ stderr.close
end
else
create_makefile(target)
@@ -221,15 +224,8 @@ def extmake(target)
end
ok &&= File.open(makefile){|f| !f.gets[DUMMY_SIGNATURE]}
ok = yield(ok) if block_given?
- if ok
- open(makefile, "r+b") do |f|
- s = f.read.sub!(/^(static:)\s(?!all\b).*/, '\1 all') or break
- f.rewind
- f.print(s)
- f.truncate(f.pos)
- end unless $static
- else
- open(makefile, "wb") do |f|
+ unless ok
+ open(makefile, "w") do |f|
f.puts "# " + DUMMY_SIGNATURE
f.print(*dummy_makefile(CONFIG["srcdir"]))
end
@@ -239,7 +235,7 @@ def extmake(target)
mess = "#{error}\n#{mess}"
end
- Logging::message(mess) if Logging.log_opened?
+ Logging::message(mess)
print(mess)
$stdout.flush
return true
@@ -248,7 +244,7 @@ def extmake(target)
unless $destdir.to_s.empty? or $mflags.defined?("DESTDIR")
args += [sysquote("DESTDIR=" + relative_from($destdir, "../"+prefix))]
end
- if $static and ok and !$objs.empty? and !noinstall
+ if $static and ok and !$objs.empty? and !File.fnmatch?("-*", target)
args += ["static"] unless $clean
$extlist.push [$static, target, $target, $preload]
end
@@ -275,7 +271,6 @@ def extmake(target)
$extpath |= $LIBPATH
end
ensure
- Logging::log_close
unless $ignore
RbConfig.module_eval {
remove_const(:CONFIG)
@@ -291,7 +286,6 @@ def extmake(target)
$top_srcdir = top_srcdir
$topdir = topdir
$hdrdir = hdrdir
- $static = static
Dir.chdir dir
end
begin
@@ -556,18 +550,17 @@ unless $extlist.empty?
list = $extlist.dup
built = []
while e = list.shift
- _, target, feature, required = e
- if required and !(required -= built).empty?
+ s,t,i,r,os = e
+ if r and !(r -= built).empty?
l = list.size
- if (while l > 0; break true if required.include?(list[l-=1][1]) end)
+ if (while l > 0; break true if r.include?(list[l-=1][1]) end)
list.insert(l + 1, e)
end
next
end
- base = File.basename(feature)
- $extinit << " init(Init_#{base}, \"#{feature}.so\");\n"
- $extobjs << format("ext/%s/%s.%s", target, base, $LIBEXT)
- built << target
+ $extinit << " init(Init_#{File.basename i}, \"#{i}.so\");\n"
+ $extobjs << format("ext/%s/%s.%s", t, File.basename(i), $LIBEXT)
+ built << t
end
src = %{\
@@ -664,17 +657,6 @@ if $configure_only and $command_output
mf.macro "EXTOBJS", $extlist.empty? ? ["dmyext.#{$OBJEXT}"] : ["ext/extinit.#{$OBJEXT}", *$extobjs]
mf.macro "EXTLIBS", $extlibs
mf.macro "EXTLDFLAGS", $extflags.split
- submakeopts = []
- if enable_config("shared", $enable_shared)
- submakeopts << 'DLDOBJS="$(EXTOBJS) $(ENCOBJS)"'
- submakeopts << 'EXTSOLIBS="$(EXTLIBS)"'
- submakeopts << 'LIBRUBY_SO_UPDATE=$(LIBRUBY_EXTS)'
- else
- submakeopts << 'EXTOBJS="$(EXTOBJS) $(ENCOBJS)"'
- submakeopts << 'EXTLIBS="$(EXTLIBS)"'
- end
- submakeopts << 'EXTLDFLAGS="$(EXTLDFLAGS)"'
- mf.macro "SUBMAKEOPTS", submakeopts
mf.puts
targets = %w[all install static install-so install-rb clean distclean realclean]
targets.each do |tgt|
@@ -685,10 +667,21 @@ if $configure_only and $command_output
mf.puts "distclean:\n\t-$(Q)$(RM) ext/extinit.c"
mf.puts
mf.puts "#{rubies.join(' ')}: $(extensions:/.=/#{$force_static ? 'static' : 'all'})"
- submake = "$(Q)$(MAKE) $(MFLAGS) $(SUBMAKEOPTS)"
- mf.puts "all static:\n\t#{submake} #{rubies.join(' ')}\n"
- rubies.each do |tgt|
- mf.puts "#{tgt}:\n\t#{submake} $@"
+ (["all static"] + rubies).each_with_index do |tgt, i|
+ mf.print "#{tgt}:\n\t$(Q)$(MAKE) "
+ mf.print "$(MFLAGS) "
+ if enable_config("shared", $enable_shared)
+ mf.print %[DLDOBJS="$(EXTOBJS) $(ENCOBJS)" EXTSOLIBS="$(EXTLIBS)" ]
+ mf.print 'LIBRUBY_SO_UPDATE=$(LIBRUBY_EXTS) '
+ else
+ mf.print %[EXTOBJS="$(EXTOBJS) $(ENCOBJS)" EXTLIBS="$(EXTLIBS)" ]
+ end
+ mf.print 'EXTLDFLAGS="$(EXTLDFLAGS)" '
+ if i == 0
+ mf.puts rubies.join(' ')
+ else
+ mf.puts '$@'
+ end
end
mf.puts
exec = config_string("exec") {|str| str + " "}
@@ -724,7 +717,6 @@ elsif !$configure_only
$mflags.concat(rubies)
system($make, *sysquote($mflags)) or exit($?.exitstatus)
end
-# :startdoc:
#Local variables:
# mode: ruby
diff --git a/ext/fcntl/depend b/ext/fcntl/depend
new file mode 100644
index 0000000000..10eab64a46
--- /dev/null
+++ b/ext/fcntl/depend
@@ -0,0 +1 @@
+fcntl.o: fcntl.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h
diff --git a/ext/fcntl/fcntl.c b/ext/fcntl/fcntl.c
index 3538d94948..b0992f30d8 100644
--- a/ext/fcntl/fcntl.c
+++ b/ext/fcntl/fcntl.c
@@ -14,6 +14,12 @@
fcntl - load the C fcntl.h defines
+= SYNOPSIS
+
+ require "fcntl"
+ m = s.fcntl(Fcntl::F_GETFL, 0)
+ f.fcntl(Fcntl::F_SETFL, Fcntl::O_NONBLOCK|m)
+
= DESCRIPTION
This module is just a translation of the C <fcntl.h> file.
@@ -31,34 +37,76 @@ pack up your own arguments to pass as args for locking functions, etc.
/* Fcntl loads the constants defined in the system's <fcntl.h> C header
* file, and used with both the fcntl(2) and open(2) POSIX system calls.
*
- * To perform a fcntl(2) operation, use IO::fcntl.
+ * Copyright (C) 1997-2001 Yukihiro Matsumoto
+ *
+ * Documented by mathew <meta@pobox.com>
+ *
+ * = Usage
+ *
+ * To perform a fcntl(2) operation, use IO::fcntl in the core classes.
*
* To perform an open(2) operation, use IO::sysopen.
*
- * The set of operations and constants available depends upon specific
- * operating system. Some values listed below may not be supported on your
- * system.
+ * The set of operations and constants available depends upon specific OS
+ * platform. Some values listed below may not be supported on your system.
*
- * See your fcntl(2) man page for complete details.
+ * The constants supported by Ruby for use with IO::fcntl are:
*
- * Open /tmp/tempfile as a write-only file that is created if it doesn't
- * exist:
+ * - F_DUPFD - duplicate a close-on-exec file handle to a non-close-on-exec
+ * file handle.
*
- * require 'fcntl'
+ * - F_GETFD - read the close-on-exec flag of a file handle.
*
- * fd = IO.sysopen('/tmp/tempfile',
- * Fcntl::O_WRONLY | Fcntl::O_EXCL | Fcntl::O_CREAT)
- * f = IO.open(fd)
- * f.syswrite("TEMP DATA")
- * f.close
+ * - F_SETFD - set the close-on-exec flag of a file handle.
+ *
+ * - FD_CLOEXEC - the value of the close-on-exec flag.
+ *
+ * - F_GETFL - get file descriptor flags.
+ *
+ * - F_SETFL - set file descriptor flags.
+ *
+ * - O_APPEND, O_NONBLOCK, etc (see below) - file descriptor flag
+ * values for the above.
+ *
+ * - F_GETLK - determine whether a given region of a file is locked.
+ *
+ * - F_SETLK - acquire a lock on a region of a file.
+ *
+ * - F_SETLKW - acquire a lock on a region of a file, waiting if necessary.
*
- * Get the flags on file +s+:
+ * - F_RDLCK, F_WRLCK, F_UNLCK - types of lock for the above.
*
- * m = s.fcntl(Fcntl::F_GETFL, 0)
+ * The constants supported by Ruby for use with IO::sysopen are:
*
- * Set the non-blocking flag on +f+ in addition to the existing flags in +m+.
+ * - O_APPEND - open file in append mode.
*
- * f.fcntl(Fcntl::F_SETFL, Fcntl::O_NONBLOCK|m)
+ * - O_NOCTTY - open tty without it becoming controlling tty.
+ *
+ * - O_CREAT - create file if it doesn't exist.
+ *
+ * - O_EXCL - used with O_CREAT, fail if file exists.
+ *
+ * - O_TRUNC - truncate file on open.
+ *
+ * - O_NONBLOCK / O_NDELAY - open in non-blocking mode.
+ *
+ * - O_RDONLY - open read-only.
+ *
+ * - O_WRONLY - open write-only.
+ *
+ * - O_RDWR - open read-write.
+ *
+ * - O_ACCMODE - mask to extract read/write flags.
+ *
+ * Example:
+ *
+ * require 'fcntl'
+ *
+ * fd = IO::sysopen('/tmp/tempfile',
+ * Fcntl::O_WRONLY | Fcntl::O_EXCL | Fcntl::O_CREAT)
+ * f = IO.open(fd)
+ * f.syswrite("TEMP DATA")
+ * f.close
*
*/
void
@@ -66,180 +114,74 @@ Init_fcntl()
{
VALUE mFcntl = rb_define_module("Fcntl");
#ifdef F_DUPFD
- /* Document-const: F_DUPFD
- *
- * Duplicate a file descriptor to the mimimum unused file descriptor
- * greater than or equal to the argument.
- *
- * The close-on-exec flag of the duplicated file descriptor is set.
- * (Ruby uses F_DUPFD_CLOEXEC internally if available to avoid race
- * condition. F_SETFD is used if F_DUPFD_CLOEXEC is not available.)
- */
rb_define_const(mFcntl, "F_DUPFD", INT2NUM(F_DUPFD));
#endif
#ifdef F_GETFD
- /* Document-const: F_GETFD
- *
- * Read the close-on-exec flag of a file descriptor.
- */
rb_define_const(mFcntl, "F_GETFD", INT2NUM(F_GETFD));
#endif
#ifdef F_GETLK
- /* Document-const: F_GETLK
- *
- * Determine whether a given region of a file is locked. This uses one of
- * the F_*LK flags.
- */
rb_define_const(mFcntl, "F_GETLK", INT2NUM(F_GETLK));
#endif
#ifdef F_SETFD
- /* Document-const: F_SETFD
- *
- * Set the close-on-exec flag of a file descriptor.
- */
rb_define_const(mFcntl, "F_SETFD", INT2NUM(F_SETFD));
#endif
#ifdef F_GETFL
- /* Document-const: F_GETFL
- *
- * Get the file descriptor flags. This will be one or more of the O_*
- * flags.
- */
rb_define_const(mFcntl, "F_GETFL", INT2NUM(F_GETFL));
#endif
#ifdef F_SETFL
- /* Document-const: F_SETFL
- *
- * Set the file descriptor flags. This will be one or more of the O_*
- * flags.
- */
rb_define_const(mFcntl, "F_SETFL", INT2NUM(F_SETFL));
#endif
#ifdef F_SETLK
- /* Document-const: F_SETLK
- *
- * Acquire a lock on a region of a file. This uses one of the F_*LCK
- * flags.
- */
rb_define_const(mFcntl, "F_SETLK", INT2NUM(F_SETLK));
#endif
#ifdef F_SETLKW
- /* Document-const: F_SETLKW
- *
- * Acquire a lock on a region of a file, waiting if necessary. This uses
- * one of the F_*LCK flags
- */
rb_define_const(mFcntl, "F_SETLKW", INT2NUM(F_SETLKW));
#endif
#ifdef FD_CLOEXEC
- /* Document-const: FD_CLOEXEC
- *
- * the value of the close-on-exec flag.
- */
rb_define_const(mFcntl, "FD_CLOEXEC", INT2NUM(FD_CLOEXEC));
#endif
#ifdef F_RDLCK
- /* Document-const: F_RDLCK
- *
- * Read lock for a region of a file
- */
rb_define_const(mFcntl, "F_RDLCK", INT2NUM(F_RDLCK));
#endif
#ifdef F_UNLCK
- /* Document-const: F_UNLCK
- *
- * Remove lock for a region of a file
- */
rb_define_const(mFcntl, "F_UNLCK", INT2NUM(F_UNLCK));
#endif
#ifdef F_WRLCK
- /* Document-const: F_WRLCK
- *
- * Write lock for a region of a file
- */
rb_define_const(mFcntl, "F_WRLCK", INT2NUM(F_WRLCK));
#endif
#ifdef O_CREAT
- /* Document-const: O_CREAT
- *
- * Create the file if it doesn't exist
- */
rb_define_const(mFcntl, "O_CREAT", INT2NUM(O_CREAT));
#endif
#ifdef O_EXCL
- /* Document-const: O_EXCL
- *
- * Used with O_CREAT, fail if the file exists
- */
rb_define_const(mFcntl, "O_EXCL", INT2NUM(O_EXCL));
#endif
#ifdef O_NOCTTY
- /* Document-const: O_NOCTTY
- *
- * Open TTY without it becoming the controlling TTY
- */
rb_define_const(mFcntl, "O_NOCTTY", INT2NUM(O_NOCTTY));
#endif
#ifdef O_TRUNC
- /* Document-const: O_TRUNC
- *
- * Truncate the file on open
- */
rb_define_const(mFcntl, "O_TRUNC", INT2NUM(O_TRUNC));
#endif
#ifdef O_APPEND
- /* Document-const: O_APPEND
- *
- * Open the file in append mode
- */
rb_define_const(mFcntl, "O_APPEND", INT2NUM(O_APPEND));
#endif
#ifdef O_NONBLOCK
- /* Document-const: O_NONBLOCK
- *
- * Open the file in non-blocking mode
- */
rb_define_const(mFcntl, "O_NONBLOCK", INT2NUM(O_NONBLOCK));
#endif
#ifdef O_NDELAY
- /* Document-const: O_NDELAY
- *
- * Open the file in non-blocking mode
- */
rb_define_const(mFcntl, "O_NDELAY", INT2NUM(O_NDELAY));
#endif
#ifdef O_RDONLY
- /* Document-const: O_RDONLY
- *
- * Open the file in read-only mode
- */
rb_define_const(mFcntl, "O_RDONLY", INT2NUM(O_RDONLY));
#endif
#ifdef O_RDWR
- /* Document-const: O_RDWR
- *
- * Open the file in read-write mode
- */
rb_define_const(mFcntl, "O_RDWR", INT2NUM(O_RDWR));
#endif
#ifdef O_WRONLY
- /* Document-const: O_WRONLY
- *
- * Open the file in write-only mode.
- */
rb_define_const(mFcntl, "O_WRONLY", INT2NUM(O_WRONLY));
#endif
#ifdef O_ACCMODE
- /* Document-const: O_ACCMODE
- *
- * Mask to extract the read/write flags
- */
rb_define_const(mFcntl, "O_ACCMODE", INT2FIX(O_ACCMODE));
#else
- /* Document-const: O_ACCMODE
- *
- * Mask to extract the read/write flags
- */
rb_define_const(mFcntl, "O_ACCMODE", INT2FIX(O_RDONLY | O_WRONLY | O_RDWR));
#endif
}
diff --git a/ext/fiddle/closure.c b/ext/fiddle/closure.c
index 121a08ea19..fdb2233b22 100644
--- a/ext/fiddle/closure.c
+++ b/ext/fiddle/closure.c
@@ -10,21 +10,15 @@ typedef struct {
ffi_type **argv;
} fiddle_closure;
-#if defined(USE_FFI_CLOSURE_ALLOC)
-#elif defined(__OpenBSD__) || defined(__APPLE__) || defined(__linux__)
-# define USE_FFI_CLOSURE_ALLOC 0
-#elif defined(RUBY_LIBFFI_MODVERSION) && RUBY_LIBFFI_MODVERSION < 3000005 && \
- (defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || defined(_M_AMD64))
-# define USE_FFI_CLOSURE_ALLOC 0
-#else
-# define USE_FFI_CLOSURE_ALLOC 1
+#if defined(MACOSX) || defined(__linux__) || defined(__OpenBSD__)
+#define DONT_USE_FFI_CLOSURE_ALLOC
#endif
static void
dealloc(void * ptr)
{
fiddle_closure * cls = (fiddle_closure *)ptr;
-#if USE_FFI_CLOSURE_ALLOC
+#ifndef DONT_USE_FFI_CLOSURE_ALLOC
ffi_closure_free(cls->pcl);
#else
munmap(cls->pcl, sizeof(cls->pcl));
@@ -176,7 +170,7 @@ allocate(VALUE klass)
VALUE i = TypedData_Make_Struct(klass, fiddle_closure,
&closure_data_type, closure);
-#if USE_FFI_CLOSURE_ALLOC
+#ifndef DONT_USE_FFI_CLOSURE_ALLOC
closure->pcl = ffi_closure_alloc(sizeof(ffi_closure), &closure->code);
#else
closure->pcl = mmap(NULL, sizeof(ffi_closure), PROT_READ | PROT_WRITE,
@@ -228,16 +222,13 @@ initialize(int rbargc, VALUE argv[], VALUE self)
if (FFI_OK != result)
rb_raise(rb_eRuntimeError, "error prepping CIF %d", result);
-#if USE_FFI_CLOSURE_ALLOC
+#ifndef DONT_USE_FFI_CLOSURE_ALLOC
result = ffi_prep_closure_loc(pcl, cif, callback,
(void *)self, cl->code);
#else
result = ffi_prep_closure(pcl, cif, callback, (void *)self);
cl->code = (void *)pcl;
- i = mprotect(pcl, sizeof(pcl), PROT_READ | PROT_EXEC);
- if (i) {
- rb_sys_fail("mprotect");
- }
+ mprotect(pcl, sizeof(pcl), PROT_READ | PROT_EXEC);
#endif
if (FFI_OK != result)
diff --git a/ext/fiddle/depend b/ext/fiddle/depend
deleted file mode 100644
index e786dc71d2..0000000000
--- a/ext/fiddle/depend
+++ /dev/null
@@ -1,4 +0,0 @@
-$(OBJS): $(HDRS) $(ruby_headers) \
- $(hdrdir)/ruby/io.h \
- $(hdrdir)/ruby/encoding.h \
- $(hdrdir)/ruby/oniguruma.h
diff --git a/ext/fiddle/extconf.rb b/ext/fiddle/extconf.rb
index 2190aa907f..2cb9ae0ace 100644
--- a/ext/fiddle/extconf.rb
+++ b/ext/fiddle/extconf.rb
@@ -5,11 +5,6 @@ require 'mkmf'
dir_config 'libffi'
pkg_config("libffi")
-if ver = pkg_config("libffi", "modversion")
- ver = ver.gsub(/-rc\d+/, '') # If ver contains rc version, just ignored.
- $defs.push(%{-DRUBY_LIBFFI_MODVERSION=#{ '%d%03d%03d' % ver.split('.') }})
-end
-
unless have_header('ffi.h')
if have_header('ffi/ffi.h')
$defs.push(format('-DUSE_HEADER_HACKS'))
diff --git a/ext/fiddle/fiddle.c b/ext/fiddle/fiddle.c
index 7a7c708245..89644301aa 100644
--- a/ext/fiddle/fiddle.c
+++ b/ext/fiddle/fiddle.c
@@ -48,6 +48,7 @@ rb_fiddle_malloc(VALUE self, VALUE size)
{
void *ptr;
+ rb_secure(4);
ptr = (void*)ruby_xmalloc(NUM2INT(size));
return PTR2NUM(ptr);
}
@@ -64,6 +65,7 @@ rb_fiddle_realloc(VALUE self, VALUE addr, VALUE size)
{
void *ptr = NUM2PTR(addr);
+ rb_secure(4);
ptr = (void*)ruby_xrealloc(ptr, NUM2INT(size));
return PTR2NUM(ptr);
}
@@ -78,6 +80,7 @@ rb_fiddle_free(VALUE self, VALUE addr)
{
void *ptr = NUM2PTR(addr);
+ rb_secure(4);
ruby_xfree(ptr);
return Qnil;
}
@@ -101,6 +104,7 @@ rb_fiddle_free(VALUE self, VALUE addr)
VALUE
rb_fiddle_ptr2value(VALUE self, VALUE addr)
{
+ rb_secure(4);
return (VALUE)NUM2PTR(addr);
}
@@ -140,7 +144,7 @@ Init_fiddle(void)
*
* It wraps {libffi}[http://sourceware.org/libffi/], a popular C library
* which provides a portable interface that allows code written in one
- * language to call code written in another language.
+ * language to clal code written in another language.
*
* == Example
*
diff --git a/ext/fiddle/function.c b/ext/fiddle/function.c
index 4a5a5892a6..c184c78663 100644
--- a/ext/fiddle/function.c
+++ b/ext/fiddle/function.c
@@ -126,15 +126,6 @@ function_call(int argc, VALUE argv[], VALUE self)
TypedData_Get_Struct(self, ffi_cif, &function_data_type, cif);
- if (rb_safe_level() >= 1) {
- for (i = 0; i < argc; i++) {
- VALUE src = argv[i];
- if (OBJ_TAINTED(src)) {
- rb_raise(rb_eSecurityError, "tainted parameter not allowed");
- }
- }
- }
-
values = xcalloc((size_t)argc + 1, (size_t)sizeof(void *));
generic_args = xcalloc((size_t)argc, (size_t)sizeof(fiddle_generic));
@@ -144,9 +135,9 @@ function_call(int argc, VALUE argv[], VALUE self)
if(NUM2INT(type) == TYPE_VOIDP) {
if(NIL_P(src)) {
- src = INT2FIX(0);
+ src = INT2NUM(0);
} else if(cPointer != CLASS_OF(src)) {
- src = rb_funcall(cPointer, rb_intern("[]"), 1, src);
+ src = rb_funcall(cPointer, rb_intern("[]"), 1, src);
}
src = rb_Integer(src);
}
diff --git a/ext/fiddle/handle.c b/ext/fiddle/handle.c
index 330dbafe67..832ff3319a 100644
--- a/ext/fiddle/handle.c
+++ b/ext/fiddle/handle.c
@@ -113,18 +113,10 @@ predefined_fiddle_handle(void *handle)
/*
* call-seq:
- * new(library = nil, flags = Fiddle::RTLD_LAZY | Fiddle::RTLD_GLOBAL)
+ * new(lib = nil, flags = Fiddle::RTLD_LAZY | Fiddle::RTLD_GLOBAL)
*
- * Create a new handler that opens +library+ with +flags+.
- *
- * If no +library+ is specified or +nil+ is given, DEFAULT is used, which is
- * the equivalent to RTLD_DEFAULT. See <code>man 3 dlopen</code> for more.
- *
- * lib = Fiddle::Handle.new
- *
- * The default is dependent on OS, and provide a handle for all libraries
- * already loaded. For example, in most cases you can use this to access +libc+
- * functions, or ruby functions like +rb_str_new+.
+ * Create a new handler that opens library named +lib+ with +flags+. If no
+ * library is specified, RTLD_DEFAULT is used.
*/
static VALUE
rb_fiddle_handle_initialize(int argc, VALUE argv[], VALUE self)
diff --git a/ext/fiddle/lib/fiddle.rb b/ext/fiddle/lib/fiddle.rb
index ae6e299637..c8a7ef1b05 100644
--- a/ext/fiddle/lib/fiddle.rb
+++ b/ext/fiddle/lib/fiddle.rb
@@ -32,15 +32,6 @@ module Fiddle
# Creates a new handler that opens +library+, and returns an instance of
# Fiddle::Handle.
#
- # If +nil+ is given for the +library+, Fiddle::Handle::DEFAULT is used, which
- # is the equivalent to RTLD_DEFAULT. See <code>man 3 dlopen</code> for more.
- #
- # lib = Fiddle.dlopen(nil)
- #
- # The default is dependent on OS, and provide a handle for all libraries
- # already loaded. For example, in most cases you can use this to access
- # +libc+ functions, or ruby functions like +rb_str_new+.
- #
# See Fiddle::Handle.new for more.
def dlopen library
Fiddle::Handle.new library
diff --git a/ext/fiddle/pointer.c b/ext/fiddle/pointer.c
index 4f4842fc33..fb9b31012f 100644
--- a/ext/fiddle/pointer.c
+++ b/ext/fiddle/pointer.c
@@ -76,6 +76,7 @@ rb_fiddle_ptr_new2(VALUE klass, void *ptr, long size, freefunc_t func)
struct ptr_data *data;
VALUE val;
+ rb_secure(4);
val = TypedData_Make_Struct(klass, struct ptr_data, &fiddle_ptr_data_type, data);
data->ptr = ptr;
data->free = func;
@@ -96,6 +97,7 @@ rb_fiddle_ptr_malloc(long size, freefunc_t func)
{
void *ptr;
+ rb_secure(4);
ptr = ruby_xmalloc((size_t)size);
memset(ptr,0,(size_t)size);
return rb_fiddle_ptr_new(ptr, size, func);
@@ -127,6 +129,7 @@ rb_fiddle_ptr_s_allocate(VALUE klass)
VALUE obj;
struct ptr_data *data;
+ rb_secure(4);
obj = TypedData_Make_Struct(klass, struct ptr_data, &fiddle_ptr_data_type, data);
data->ptr = 0;
data->size = 0;
diff --git a/ext/fiddle/win32/extconf.rb b/ext/fiddle/win32/extconf.rb
new file mode 100644
index 0000000000..c4efee8149
--- /dev/null
+++ b/ext/fiddle/win32/extconf.rb
@@ -0,0 +1,3 @@
+if compiled?('fiddle') and $mswin||$mingw||$cygwin
+ create_makefile('win32')
+end
diff --git a/ext/fiddle/win32/lib/win32/registry.rb b/ext/fiddle/win32/lib/win32/registry.rb
new file mode 100644
index 0000000000..f1aa3640a8
--- /dev/null
+++ b/ext/fiddle/win32/lib/win32/registry.rb
@@ -0,0 +1,845 @@
+require 'fiddle/import'
+module Win32
+
+=begin rdoc
+= Win32 Registry
+
+win32/registry is registry accessor library for Win32 platform.
+It uses fiddle/import to call Win32 Registry APIs.
+
+== example
+ Win32::Registry::HKEY_CURRENT_USER.open('SOFTWARE\foo') do |reg|
+ value = reg['foo'] # read a value
+ value = reg['foo', Win32::Registry::REG_SZ] # read a value with type
+ type, value = reg.read('foo') # read a value
+ reg['foo'] = 'bar' # write a value
+ reg['foo', Win32::Registry::REG_SZ] = 'bar' # write a value with type
+ reg.write('foo', Win32::Registry::REG_SZ, 'bar') # write a value
+
+ reg.each_value { |name, type, data| ... } # Enumerate values
+ reg.each_key { |key, wtime| ... } # Enumerate subkeys
+
+ reg.delete_value(name) # Delete a value
+ reg.delete_key(name) # Delete a subkey
+ reg.delete_key(name, true) # Delete a subkey recursively
+ end
+
+= Reference
+
+== Win32::Registry class
+
+--- info
+
+--- num_keys
+
+--- max_key_length
+
+--- num_values
+
+--- max_value_name_length
+
+--- max_value_length
+
+--- descriptor_length
+
+--- wtime
+ Returns an item of key information.
+
+=== constants
+--- HKEY_CLASSES_ROOT
+
+--- HKEY_CURRENT_USER
+
+--- HKEY_LOCAL_MACHINE
+
+--- HKEY_PERFORMANCE_DATA
+
+--- HKEY_CURRENT_CONFIG
+
+--- HKEY_DYN_DATA
+
+ Win32::Registry object whose key is predefined key.
+For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/predefined_keys.asp] article.
+
+=end rdoc
+
+ class Registry
+
+ #
+ # For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/registry.asp].
+ #
+ # --- HKEY_*
+ #
+ # Predefined key ((*handle*)).
+ # These are Integer, not Win32::Registry.
+ #
+ # --- REG_*
+ #
+ # Registry value type.
+ #
+ # --- KEY_*
+ #
+ # Security access mask.
+ #
+ # --- KEY_OPTIONS_*
+ #
+ # Key options.
+ #
+ # --- REG_CREATED_NEW_KEY
+ #
+ # --- REG_OPENED_EXISTING_KEY
+ #
+ # If the key is created newly or opened existing key.
+ # See also Registry#disposition method.
+ module Constants
+ HKEY_CLASSES_ROOT = 0x80000000
+ HKEY_CURRENT_USER = 0x80000001
+ HKEY_LOCAL_MACHINE = 0x80000002
+ HKEY_USERS = 0x80000003
+ HKEY_PERFORMANCE_DATA = 0x80000004
+ HKEY_PERFORMANCE_TEXT = 0x80000050
+ HKEY_PERFORMANCE_NLSTEXT = 0x80000060
+ HKEY_CURRENT_CONFIG = 0x80000005
+ HKEY_DYN_DATA = 0x80000006
+
+ REG_NONE = 0
+ REG_SZ = 1
+ REG_EXPAND_SZ = 2
+ REG_BINARY = 3
+ REG_DWORD = 4
+ REG_DWORD_LITTLE_ENDIAN = 4
+ REG_DWORD_BIG_ENDIAN = 5
+ REG_LINK = 6
+ REG_MULTI_SZ = 7
+ REG_RESOURCE_LIST = 8
+ REG_FULL_RESOURCE_DESCRIPTOR = 9
+ REG_RESOURCE_REQUIREMENTS_LIST = 10
+ REG_QWORD = 11
+ REG_QWORD_LITTLE_ENDIAN = 11
+
+ STANDARD_RIGHTS_READ = 0x00020000
+ STANDARD_RIGHTS_WRITE = 0x00020000
+ KEY_QUERY_VALUE = 0x0001
+ KEY_SET_VALUE = 0x0002
+ KEY_CREATE_SUB_KEY = 0x0004
+ KEY_ENUMERATE_SUB_KEYS = 0x0008
+ KEY_NOTIFY = 0x0010
+ KEY_CREATE_LINK = 0x0020
+ KEY_READ = STANDARD_RIGHTS_READ |
+ KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS | KEY_NOTIFY
+ KEY_WRITE = STANDARD_RIGHTS_WRITE |
+ KEY_SET_VALUE | KEY_CREATE_SUB_KEY
+ KEY_EXECUTE = KEY_READ
+ KEY_ALL_ACCESS = KEY_READ | KEY_WRITE | KEY_CREATE_LINK
+
+ REG_OPTION_RESERVED = 0x0000
+ REG_OPTION_NON_VOLATILE = 0x0000
+ REG_OPTION_VOLATILE = 0x0001
+ REG_OPTION_CREATE_LINK = 0x0002
+ REG_OPTION_BACKUP_RESTORE = 0x0004
+ REG_OPTION_OPEN_LINK = 0x0008
+ REG_LEGAL_OPTION = REG_OPTION_RESERVED |
+ REG_OPTION_NON_VOLATILE | REG_OPTION_CREATE_LINK |
+ REG_OPTION_BACKUP_RESTORE | REG_OPTION_OPEN_LINK
+
+ REG_CREATED_NEW_KEY = 1
+ REG_OPENED_EXISTING_KEY = 2
+
+ REG_WHOLE_HIVE_VOLATILE = 0x0001
+ REG_REFRESH_HIVE = 0x0002
+ REG_NO_LAZY_FLUSH = 0x0004
+ REG_FORCE_RESTORE = 0x0008
+
+ MAX_KEY_LENGTH = 514
+ MAX_VALUE_LENGTH = 32768
+ end
+ include Constants
+ include Enumerable
+
+ #
+ # Error
+ #
+ class Error < ::StandardError
+ module Kernel32
+ extend Fiddle::Importer
+ dlload "kernel32.dll"
+ end
+ FormatMessageA = Kernel32.extern "int FormatMessageA(int, void *, int, int, void *, int, void *)", :stdcall
+ def initialize(code)
+ @code = code
+ msg = "\0".force_encoding(Encoding::ASCII_8BIT) * 1024
+ len = FormatMessageA.call(0x1200, 0, code, 0, msg, 1024, 0)
+ msg = msg[0, len].force_encoding(Encoding.find(Encoding.locale_charmap))
+ super msg.tr("\r", '').chomp
+ end
+ attr_reader :code
+ end
+
+ #
+ # Predefined Keys
+ #
+ class PredefinedKey < Registry
+ def initialize(hkey, keyname)
+ @hkey = hkey
+ @parent = nil
+ @keyname = keyname
+ @disposition = REG_OPENED_EXISTING_KEY
+ end
+
+ # Predefined keys cannot be closed
+ def close
+ raise Error.new(5) ## ERROR_ACCESS_DENIED
+ end
+
+ # Fake #class method for Registry#open, Registry#create
+ def class
+ Registry
+ end
+
+ # Make all
+ Constants.constants.grep(/^HKEY_/) do |c|
+ Registry.const_set c, new(Constants.const_get(c), c.to_s)
+ end
+ end
+
+ #
+ # Win32 APIs
+ #
+ module API
+ extend Fiddle::Importer
+ dlload "advapi32.dll"
+ [
+ "long RegOpenKeyExA(void *, void *, long, long, void *)",
+ "long RegCreateKeyExA(void *, void *, long, long, long, long, void *, void *, void *)",
+ "long RegEnumValueA(void *, long, void *, void *, void *, void *, void *, void *)",
+ "long RegEnumKeyExA(void *, long, void *, void *, void *, void *, void *, void *)",
+ "long RegQueryValueExA(void *, void *, void *, void *, void *, void *)",
+ "long RegSetValueExA(void *, void *, long, long, void *, long)",
+ "long RegDeleteValue(void *, void *)",
+ "long RegDeleteKey(void *, void *)",
+ "long RegFlushKey(void *)",
+ "long RegCloseKey(void *)",
+ "long RegQueryInfoKey(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *)",
+ ].each do |fn|
+ cfunc = extern fn, :stdcall
+ const_set cfunc.name.intern, cfunc
+ end
+
+ module_function
+
+ def check(result)
+ raise Error, result, caller(2) if result != 0
+ end
+
+ def packdw(dw)
+ [dw].pack('V')
+ end
+
+ def unpackdw(dw)
+ dw += [0].pack('V')
+ dw.unpack('V')[0]
+ end
+
+ def packqw(qw)
+ [ qw & 0xFFFFFFFF, qw >> 32 ].pack('VV')
+ end
+
+ def unpackqw(qw)
+ qw = qw.unpack('VV')
+ (qw[1] << 32) | qw[0]
+ end
+
+ def OpenKey(hkey, name, opt, desired)
+ result = packdw(0)
+ check RegOpenKeyExA.call(hkey, name, opt, desired, result)
+ unpackdw(result)
+ end
+
+ def CreateKey(hkey, name, opt, desired)
+ result = packdw(0)
+ disp = packdw(0)
+ check RegCreateKeyExA.call(hkey, name, 0, 0, opt, desired,
+ 0, result, disp)
+ [ unpackdw(result), unpackdw(disp) ]
+ end
+
+ def EnumValue(hkey, index)
+ name = ' ' * Constants::MAX_KEY_LENGTH
+ size = packdw(Constants::MAX_KEY_LENGTH)
+ check RegEnumValueA.call(hkey, index, name, size, 0, 0, 0, 0)
+ name[0, unpackdw(size)]
+ end
+
+ def EnumKey(hkey, index)
+ name = ' ' * Constants::MAX_KEY_LENGTH
+ size = packdw(Constants::MAX_KEY_LENGTH)
+ wtime = ' ' * 8
+ check RegEnumKeyExA.call(hkey, index, name, size, 0, 0, 0, wtime)
+ [ name[0, unpackdw(size)], unpackqw(wtime) ]
+ end
+
+ def QueryValue(hkey, name)
+ type = packdw(0)
+ size = packdw(0)
+ check RegQueryValueExA.call(hkey, name, 0, type, 0, size)
+ data = ' ' * unpackdw(size)
+ check RegQueryValueExA.call(hkey, name, 0, type, data, size)
+ [ unpackdw(type), data[0, unpackdw(size)] ]
+ end
+
+ def SetValue(hkey, name, type, data, size)
+ check RegSetValueExA.call(hkey, name, 0, type, data, size)
+ end
+
+ def DeleteValue(hkey, name)
+ check RegDeleteValue.call(hkey, name)
+ end
+
+ def DeleteKey(hkey, name)
+ check RegDeleteKey.call(hkey, name)
+ end
+
+ def FlushKey(hkey)
+ check RegFlushKey.call(hkey)
+ end
+
+ def CloseKey(hkey)
+ check RegCloseKey.call(hkey)
+ end
+
+ def QueryInfoKey(hkey)
+ subkeys = packdw(0)
+ maxsubkeylen = packdw(0)
+ values = packdw(0)
+ maxvaluenamelen = packdw(0)
+ maxvaluelen = packdw(0)
+ secdescs = packdw(0)
+ wtime = ' ' * 8
+ check RegQueryInfoKey.call(hkey, 0, 0, 0, subkeys, maxsubkeylen, 0,
+ values, maxvaluenamelen, maxvaluelen, secdescs, wtime)
+ [ unpackdw(subkeys), unpackdw(maxsubkeylen), unpackdw(values),
+ unpackdw(maxvaluenamelen), unpackdw(maxvaluelen),
+ unpackdw(secdescs), unpackqw(wtime) ]
+ end
+ end
+
+ #
+ # Replace %\w+% into the environment value of what is contained between the %'s
+ # This method is used for REG_EXPAND_SZ.
+ #
+ # For detail, see expandEnvironmentStrings[http://msdn.microsoft.com/library/en-us/sysinfo/base/expandenvironmentstrings.asp] \Win32 \API.
+ #
+ def self.expand_environ(str)
+ str.gsub(/%([^%]+)%/) { ENV[$1] || ENV[$1.upcase] || $& }
+ end
+
+ @@type2name = { }
+ %w[
+ REG_NONE REG_SZ REG_EXPAND_SZ REG_BINARY REG_DWORD
+ REG_DWORD_BIG_ENDIAN REG_LINK REG_MULTI_SZ
+ REG_RESOURCE_LIST REG_FULL_RESOURCE_DESCRIPTOR
+ REG_RESOURCE_REQUIREMENTS_LIST REG_QWORD
+ ].each do |type|
+ @@type2name[Constants.const_get(type)] = type
+ end
+
+ #
+ # Convert registry type value to readable string.
+ #
+ def self.type2name(type)
+ @@type2name[type] || type.to_s
+ end
+
+ #
+ # Convert 64-bit FILETIME integer into Time object.
+ #
+ def self.wtime2time(wtime)
+ Time.at((wtime - 116444736000000000) / 10000000)
+ end
+
+ #
+ # Convert Time object or Integer object into 64-bit FILETIME.
+ #
+ def self.time2wtime(time)
+ time.to_i * 10000000 + 116444736000000000
+ end
+
+ #
+ # constructor
+ #
+ private_class_method :new
+
+ #
+ # --- Registry.open(key, subkey, desired = KEY_READ, opt = REG_OPTION_RESERVED)
+ #
+ # --- Registry.open(key, subkey, desired = KEY_READ, opt = REG_OPTION_RESERVED) { |reg| ... }
+ #
+ # Open the registry key subkey under key.
+ # key is Win32::Registry object of parent key.
+ # You can use predefined key HKEY_* (see Constants)
+ # desired and opt is access mask and key option.
+ # For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/regopenkeyex.asp].
+ # If block is given, the key is closed automatically.
+ def self.open(hkey, subkey, desired = KEY_READ, opt = REG_OPTION_RESERVED)
+ subkey = subkey.chomp('\\')
+ newkey = API.OpenKey(hkey.hkey, subkey, opt, desired)
+ obj = new(newkey, hkey, subkey, REG_OPENED_EXISTING_KEY)
+ if block_given?
+ begin
+ yield obj
+ ensure
+ obj.close
+ end
+ else
+ obj
+ end
+ end
+
+ #
+ # --- Registry.create(key, subkey, desired = KEY_ALL_ACCESS, opt = REG_OPTION_RESERVED)
+ #
+ # --- Registry.create(key, subkey, desired = KEY_ALL_ACCESS, opt = REG_OPTION_RESERVED) { |reg| ... }
+ #
+ # Create or open the registry key subkey under key.
+ # You can use predefined key HKEY_* (see Constants)
+ #
+ # If subkey is already exists, key is opened and Registry#created?
+ # method will return false.
+ #
+ # If block is given, the key is closed automatically.
+ #
+ def self.create(hkey, subkey, desired = KEY_ALL_ACCESS, opt = REG_OPTION_RESERVED)
+ newkey, disp = API.CreateKey(hkey.hkey, subkey, opt, desired)
+ obj = new(newkey, hkey, subkey, disp)
+ if block_given?
+ begin
+ yield obj
+ ensure
+ obj.close
+ end
+ else
+ obj
+ end
+ end
+
+ #
+ # finalizer
+ #
+ @@final = proc { |hkey| proc { API.CloseKey(hkey[0]) if hkey[0] } }
+
+ #
+ # initialize
+ #
+ def initialize(hkey, parent, keyname, disposition)
+ @hkey = hkey
+ @parent = parent
+ @keyname = keyname
+ @disposition = disposition
+ @hkeyfinal = [ hkey ]
+ ObjectSpace.define_finalizer self, @@final.call(@hkeyfinal)
+ end
+
+ # Returns key handle value.
+ attr_reader :hkey
+ # Win32::Registry object of parent key, or nil if predefeined key.
+ attr_reader :parent
+ # Same as subkey value of Registry.open or
+ # Registry.create method.
+ attr_reader :keyname
+ # Disposition value (REG_CREATED_NEW_KEY or REG_OPENED_EXISTING_KEY).
+ attr_reader :disposition
+
+ #
+ # Returns if key is created ((*newly*)).
+ # (see Registry.create) -- basically you call create
+ # then when you call created? on the instance returned
+ # it will tell if it was successful or not
+ #
+ def created?
+ @disposition == REG_CREATED_NEW_KEY
+ end
+
+ #
+ # Returns if key is not closed.
+ #
+ def open?
+ !@hkey.nil?
+ end
+
+ #
+ # Full path of key such as 'HKEY_CURRENT_USER\SOFTWARE\foo\bar'.
+ #
+ def name
+ parent = self
+ name = @keyname
+ while parent = parent.parent
+ name = parent.keyname + '\\' + name
+ end
+ name
+ end
+
+ def inspect
+ "\#<Win32::Registry key=#{name.inspect}>"
+ end
+
+ #
+ # marshalling is not allowed
+ #
+ def _dump(depth)
+ raise TypeError, "can't dump Win32::Registry"
+ end
+
+ #
+ # Same as Win32::Registry.open (self, subkey, desired, opt)
+ #
+ def open(subkey, desired = KEY_READ, opt = REG_OPTION_RESERVED, &blk)
+ self.class.open(self, subkey, desired, opt, &blk)
+ end
+
+ #
+ # Same as Win32::Registry.create (self, subkey, desired, opt)
+ #
+ def create(subkey, desired = KEY_ALL_ACCESS, opt = REG_OPTION_RESERVED, &blk)
+ self.class.create(self, subkey, desired, opt, &blk)
+ end
+
+ #
+ # Close key.
+ #
+ # After close, most method raise an error.
+ #
+ def close
+ API.CloseKey(@hkey)
+ @hkey = @parent = @keyname = nil
+ @hkeyfinal[0] = nil
+ end
+
+ #
+ # Enumerate values.
+ #
+ def each_value
+ index = 0
+ while true
+ begin
+ subkey = API.EnumValue(@hkey, index)
+ rescue Error
+ break
+ end
+ begin
+ type, data = read(subkey)
+ rescue Error
+ next
+ end
+ yield subkey, type, data
+ index += 1
+ end
+ index
+ end
+ alias each each_value
+
+ #
+ # Enumerate subkeys.
+ #
+ # subkey is String which contains name of subkey.
+ # wtime is last write time as FILETIME (64-bit integer).
+ # (see Registry.wtime2time)
+ #
+ def each_key
+ index = 0
+ while true
+ begin
+ subkey, wtime = API.EnumKey(@hkey, index)
+ rescue Error
+ break
+ end
+ yield subkey, wtime
+ index += 1
+ end
+ index
+ end
+
+ #
+ # return keys as an array
+ #
+ def keys
+ keys_ary = []
+ each_key { |key,| keys_ary << key }
+ keys_ary
+ end
+
+ # Read a registry value named name and return array of
+ # [ type, data ].
+ # When name is nil, the `default' value is read.
+ # type is value type. (see Win32::Registry::Constants module)
+ # data is value data, its class is:
+ # :REG_SZ, REG_EXPAND_SZ
+ # String
+ # :REG_MULTI_SZ
+ # Array of String
+ # :REG_DWORD, REG_DWORD_BIG_ENDIAN, REG_QWORD
+ # Integer
+ # :REG_BINARY
+ # String (contains binary data)
+ #
+ # When rtype is specified, the value type must be included by
+ # rtype array, or TypeError is raised.
+ def read(name, *rtype)
+ type, data = API.QueryValue(@hkey, name)
+ unless rtype.empty? or rtype.include?(type)
+ raise TypeError, "Type mismatch (expect #{rtype.inspect} but #{type} present)"
+ end
+ case type
+ when REG_SZ, REG_EXPAND_SZ
+ [ type, data.chop ]
+ when REG_MULTI_SZ
+ [ type, data.split(/\0/) ]
+ when REG_BINARY
+ [ type, data ]
+ when REG_DWORD
+ [ type, API.unpackdw(data) ]
+ when REG_DWORD_BIG_ENDIAN
+ [ type, data.unpack('N')[0] ]
+ when REG_QWORD
+ [ type, API.unpackqw(data) ]
+ else
+ raise TypeError, "Type #{type} is not supported."
+ end
+ end
+
+ #
+ # Read a registry value named name and return its value data.
+ # The class of value is same as #read method returns.
+ #
+ # If the value type is REG_EXPAND_SZ, returns value data whose environment
+ # variables are replaced.
+ # If the value type is neither REG_SZ, REG_MULTI_SZ, REG_DWORD,
+ # REG_DWORD_BIG_ENDIAN, nor REG_QWORD, TypeError is raised.
+ #
+ # The meaning of rtype is same as #read method.
+ #
+ def [](name, *rtype)
+ type, data = read(name, *rtype)
+ case type
+ when REG_SZ, REG_DWORD, REG_QWORD, REG_MULTI_SZ
+ data
+ when REG_EXPAND_SZ
+ Registry.expand_environ(data)
+ else
+ raise TypeError, "Type #{type} is not supported."
+ end
+ end
+
+ # Read a REG_SZ(read_s), REG_DWORD(read_i), or REG_BINARY(read_bin)
+ # registry value named name.
+ #
+ # If the values type does not match, TypeError is raised.
+ def read_s(name)
+ read(name, REG_SZ)[1]
+ end
+
+ #
+ # Read a REG_SZ or REG_EXPAND_SZ registry value named name.
+ #
+ # If the value type is REG_EXPAND_SZ, environment variables are replaced.
+ # Unless the value type is REG_SZ or REG_EXPAND_SZ, TypeError is raised.
+ #
+ def read_s_expand(name)
+ type, data = read(name, REG_SZ, REG_EXPAND_SZ)
+ if type == REG_EXPAND_SZ
+ Registry.expand_environ(data)
+ else
+ data
+ end
+ end
+
+ #
+ # Read a REG_SZ(read_s), REG_DWORD(read_i), or REG_BINARY(read_bin)
+ # registry value named name.
+ #
+ # If the values type does not match, TypeError is raised.
+ #
+ def read_i(name)
+ read(name, REG_DWORD, REG_DWORD_BIG_ENDIAN, REG_QWORD)[1]
+ end
+
+ #
+ # Read a REG_SZ(read_s), REG_DWORD(read_i), or REG_BINARY(read_bin)
+ # registry value named name.
+ #
+ # If the values type does not match, TypeError is raised.
+ #
+ def read_bin(name)
+ read(name, REG_BINARY)[1]
+ end
+
+ #
+ # Write data to a registry value named name.
+ # When name is nil, write to the `default' value.
+ #
+ # type is type value. (see Registry::Constants module)
+ # Class of data must be same as which #read
+ # method returns.
+ #
+ def write(name, type, data)
+ case type
+ when REG_SZ, REG_EXPAND_SZ
+ data = data.to_s + "\0"
+ when REG_MULTI_SZ
+ data = data.to_a.join("\0") + "\0\0"
+ when REG_BINARY
+ data = data.to_s
+ when REG_DWORD
+ data = API.packdw(data.to_i)
+ when REG_DWORD_BIG_ENDIAN
+ data = [data.to_i].pack('N')
+ when REG_QWORD
+ data = API.packqw(data.to_i)
+ else
+ raise TypeError, "Unsupported type #{type}"
+ end
+ API.SetValue(@hkey, name, type, data, data.length)
+ end
+
+ #
+ # Write value to a registry value named name.
+ #
+ # If wtype is specified, the value type is it.
+ # Otherwise, the value type is depend on class of value:
+ # :Integer
+ # REG_DWORD
+ # :String
+ # REG_SZ
+ # :Array
+ # REG_MULTI_SZ
+ #
+ def []=(name, rtype, value = nil)
+ if value
+ write name, rtype, value
+ else
+ case value = rtype
+ when Integer
+ write name, REG_DWORD, value
+ when String
+ write name, REG_SZ, value
+ when Array
+ write name, REG_MULTI_SZ, value
+ else
+ raise TypeError, "Unexpected type #{value.class}"
+ end
+ end
+ value
+ end
+
+ #
+ # Write value to a registry value named name.
+ #
+ # The value type is REG_SZ(write_s), REG_DWORD(write_i), or
+ # REG_BINARY(write_bin).
+ #
+ def write_s(name, value)
+ write name, REG_SZ, value.to_s
+ end
+
+ #
+ # Write value to a registry value named name.
+ #
+ # The value type is REG_SZ(write_s), REG_DWORD(write_i), or
+ # REG_BINARY(write_bin).
+ #
+ def write_i(name, value)
+ write name, REG_DWORD, value.to_i
+ end
+
+ #
+ # Write value to a registry value named name.
+ #
+ # The value type is REG_SZ(write_s), REG_DWORD(write_i), or
+ # REG_BINARY(write_bin).
+ #
+ def write_bin(name, value)
+ write name, REG_BINARY, value.to_s
+ end
+
+ #
+ # Delete a registry value named name.
+ # We can not delete the `default' value.
+ #
+ def delete_value(name)
+ API.DeleteValue(@hkey, name)
+ end
+ alias delete delete_value
+
+ #
+ # Delete a subkey named name and all its values.
+ #
+ # If recursive is false, the subkey must not have subkeys.
+ # Otherwise, this method deletes all subkeys and values recursively.
+ #
+ def delete_key(name, recursive = false)
+ if recursive
+ open(name, KEY_ALL_ACCESS) do |reg|
+ reg.keys.each do |key|
+ begin
+ reg.delete_key(key, true)
+ rescue Error
+ #
+ end
+ end
+ end
+ API.DeleteKey(@hkey, name)
+ else
+ begin
+ API.EnumKey @hkey, 0
+ rescue Error
+ return API.DeleteKey(@hkey, name)
+ end
+ raise Error.new(5) ## ERROR_ACCESS_DENIED
+ end
+ end
+
+ #
+ # Write all the attributes into the registry file.
+ #
+ def flush
+ API.FlushKey @hkey
+ end
+
+ #
+ # Returns key information as Array of:
+ # :num_keys
+ # The number of subkeys.
+ # :max_key_length
+ # Maximum length of name of subkeys.
+ # :num_values
+ # The number of values.
+ # :max_value_name_length
+ # Maximum length of name of values.
+ # :max_value_length
+ # Maximum length of value of values.
+ # :descriptor_length
+ # Length of security descriptor.
+ # :wtime
+ # Last write time as FILETIME(64-bit integer)
+ #
+ # For detail, see RegQueryInfoKey[http://msdn.microsoft.com/library/en-us/sysinfo/base/regqueryinfokey.asp] Win32 API.
+ #
+ def info
+ API.QueryInfoKey(@hkey)
+ end
+
+ #
+ # Returns an item of key information.
+ #
+ %w[
+ num_keys max_key_length
+ num_values max_value_name_length max_value_length
+ descriptor_length wtime
+ ].each_with_index do |s, i|
+ eval <<-__END__
+ def #{s}
+ info[#{i}]
+ end
+ __END__
+ end
+ end
+end
diff --git a/ext/fiddle/win32/lib/win32/resolv.rb b/ext/fiddle/win32/lib/win32/resolv.rb
new file mode 100644
index 0000000000..1315f32c61
--- /dev/null
+++ b/ext/fiddle/win32/lib/win32/resolv.rb
@@ -0,0 +1,379 @@
+=begin
+= Win32 DNS and DHCP I/F
+
+=end
+
+require "fiddle/import"
+require 'win32/registry'
+
+module Win32
+ module Resolv
+ API = Registry::API
+
+ def self.get_hosts_path
+ path = get_hosts_dir
+ path = File.expand_path('hosts', path)
+ File.exist?(path) ? path : nil
+ end
+
+ def self.get_resolv_info
+ search, nameserver = get_info
+ if search.empty?
+ search = nil
+ else
+ search.delete("")
+ search.uniq!
+ end
+ if nameserver.empty?
+ nameserver = nil
+ else
+ nameserver.delete("")
+ nameserver.delete("0.0.0.0")
+ nameserver.uniq!
+ end
+ [ search, nameserver ]
+ end
+
+module Kernel32
+ extend Fiddle::Importer
+ dlload "kernel32"
+end
+getv = Kernel32.extern "int GetVersionExA(void *)", :stdcall
+info = [ 148, 0, 0, 0, 0 ].pack('V5') + "\0" * 128
+getv.call(info)
+if info.unpack('V5')[4] == 2 # VER_PLATFORM_WIN32_NT
+#====================================================================
+# Windows NT
+#====================================================================
+ module_eval <<-'__EOS__', __FILE__, __LINE__+1
+ TCPIP_NT = 'SYSTEM\CurrentControlSet\Services\Tcpip\Parameters'
+
+ class << self
+ private
+ def get_hosts_dir
+ Registry::HKEY_LOCAL_MACHINE.open(TCPIP_NT) do |reg|
+ reg.read_s_expand('DataBasePath')
+ end
+ end
+
+ def get_info
+ search = nil
+ nameserver = []
+ Registry::HKEY_LOCAL_MACHINE.open(TCPIP_NT) do |reg|
+ begin
+ slist = reg.read_s('SearchList')
+ search = slist.split(/,\s*/) unless slist.empty?
+ rescue Registry::Error
+ end
+
+ if add_search = search.nil?
+ search = []
+ begin
+ nvdom = reg.read_s('NV Domain')
+ unless nvdom.empty?
+ @search = [ nvdom ]
+ if reg.read_i('UseDomainNameDevolution') != 0
+ if /^\w+\./ =~ nvdom
+ devo = $'
+ end
+ end
+ end
+ rescue Registry::Error
+ end
+ end
+
+ reg.open('Interfaces') do |h|
+ h.each_key do |iface,|
+ h.open(iface) do |regif|
+ begin
+ [ 'NameServer', 'DhcpNameServer' ].each do |key|
+ begin
+ ns = regif.read_s(key)
+ rescue
+ else
+ unless ns.empty?
+ nameserver.concat(ns.split(/[,\s]\s*/))
+ break
+ end
+ end
+ end
+ rescue Registry::Error
+ end
+
+ if add_search
+ begin
+ [ 'Domain', 'DhcpDomain' ].each do |key|
+ dom = regif.read_s(key)
+ unless dom.empty?
+ search.concat(dom.split(/,\s*/))
+ break
+ end
+ end
+ rescue Registry::Error
+ end
+ end
+ end
+ end
+ end
+ search << devo if add_search and devo
+ end
+ [ search.uniq, nameserver.uniq ]
+ end
+ end
+ __EOS__
+else
+#====================================================================
+# Windows 9x
+#====================================================================
+ module_eval <<-'__EOS__', __FILE__, __LINE__+1
+ TCPIP_9X = 'SYSTEM\CurrentControlSet\Services\VxD\MSTCP'
+ DHCP_9X = 'SYSTEM\CurrentControlSet\Services\VxD\DHCP'
+ WINDOWS = 'Software\Microsoft\Windows\CurrentVersion'
+
+ class << self
+ # private
+
+ def get_hosts_dir
+ Registry::HKEY_LOCAL_MACHINE.open(WINDOWS) do |reg|
+ reg.read_s_expand('SystemRoot')
+ end
+ end
+
+ def get_info
+ search = []
+ nameserver = []
+ begin
+ Registry::HKEY_LOCAL_MACHINE.open(TCPIP_9X) do |reg|
+ if reg.read_s("EnableDNS") == "1"
+ domain = reg.read_s("Domain")
+ ns = reg.read_s("NameServer")
+ slist = reg.read_s("SearchList")
+ search << domain unless domain.empty?
+ search.concat(slist.split(/,\s*/))
+ nameserver.concat(ns.split(/[,\s]\s*/))
+ end
+ end
+ rescue Registry::Error
+ end
+
+ dhcpinfo = get_dhcpinfo
+ search.concat(dhcpinfo[0])
+ nameserver.concat(dhcpinfo[1])
+ [ search, nameserver ]
+ end
+
+ def get_dhcpinfo
+ macaddrs = {}
+ ipaddrs = {}
+ WsControl.get_iflist.each do |index, macaddr, *ipaddr|
+ macaddrs[macaddr] = 1
+ ipaddr.each { |ipaddr| ipaddrs[ipaddr] = 1 }
+ end
+ iflist = [ macaddrs, ipaddrs ]
+
+ search = []
+ nameserver = []
+ version = -1
+ Registry::HKEY_LOCAL_MACHINE.open(DHCP_9X) do |reg|
+ begin
+ version = API.unpackdw(reg.read_bin("Version"))
+ rescue Registry::Error
+ end
+
+ reg.each_key do |key,|
+ catch(:not_used) do
+ reg.open(key) do |regdi|
+ dom, ns = get_dhcpinfo_key(version, regdi, iflist)
+ search << dom if dom
+ nameserver.concat(ns) if ns
+ end
+ end
+ end
+ end
+ [ search, nameserver ]
+ end
+
+ def get_dhcpinfo_95(reg)
+ dhcp = reg.read_bin("DhcpInfo")
+ [
+ API.unpackdw(dhcp[4..7]),
+ API.unpackdw(dhcp[8..11]),
+ 1,
+ dhcp[45..50],
+ reg.read_bin("OptionInfo"),
+ ]
+ end
+
+ def get_dhcpinfo_98(reg)
+ [
+ API.unpackdw(reg.read_bin("DhcpIPAddress")),
+ API.unpackdw(reg.read_bin("DhcpSubnetMask")),
+ API.unpackdw(reg.read_bin("HardwareType")),
+ reg.read_bin("HardwareAddress"),
+ reg.read_bin("OptionInfo"),
+ ]
+ end
+
+ def get_dhcpinfo_key(version, reg, iflist)
+ info = case version
+ when 1
+ get_dhcpinfo_95(reg)
+ when 2
+ get_dhcpinfo_98(reg)
+ else
+ begin
+ get_dhcpinfo_98(reg)
+ rescue Registry::Error
+ get_dhcpinfo_95(reg)
+ end
+ end
+ ipaddr, netmask, hwtype, macaddr, opt = info
+ throw :not_used unless
+ ipaddr and ipaddr != 0 and
+ netmask and netmask != 0 and
+ macaddr and macaddr.size == 6 and
+ hwtype == 1 and
+ iflist[0][macaddr] and iflist[1][ipaddr]
+
+ size = opt.size
+ idx = 0
+ while idx <= size
+ opttype = opt[idx]
+ optsize = opt[idx + 1]
+ optval = opt[idx + 2, optsize]
+ case opttype
+ when 0xFF ## term
+ break
+ when 0x0F ## domain
+ domain = optval.chomp("\0")
+ when 0x06 ## dns
+ nameserver = optval.scan(/..../).collect { |addr|
+ "%d.%d.%d.%d" % addr.unpack('C4')
+ }
+ end
+ idx += optsize + 2
+ end
+ [ domain, nameserver ]
+ rescue Registry::Error
+ throw :not_used
+ end
+ end
+
+ module WsControl
+ module WSock32
+ extend Fiddle::Importer
+ dlload "wsock32.dll"
+ end
+ WsControl = WSock32.extern "int WsControl(int, int, void *, void *, void *, void *", :stdcall
+ WSAGetLastError = WSock32.extern "int WSAGetLastError(void)", :stdcall
+
+ MAX_TDI_ENTITIES = 512
+ IPPROTO_TCP = 6
+ WSCTL_TCP_QUERY_INFORMATION = 0
+ INFO_CLASS_GENERIC = 0x100
+ INFO_CLASS_PROTOCOL = 0x200
+ INFO_TYPE_PROVIDER = 0x100
+ ENTITY_LIST_ID = 0
+ GENERIC_ENTITY = 0
+ CL_NL_ENTITY = 0x301
+ IF_ENTITY = 0x200
+ ENTITY_TYPE_ID = 1
+ CL_NL_IP = 0x303
+ IF_MIB = 0x202
+ IF_MIB_STATS_ID = 1
+ IP_MIB_ADDRTABLE_ENTRY_ID = 0x102
+
+ def self.wsctl(tei_entity, tei_instance,
+ toi_class, toi_type, toi_id,
+ buffsize)
+ reqinfo = [
+ ## TDIEntityID
+ tei_entity, tei_instance,
+ ## TDIObjectID
+ toi_class, toi_type, toi_id,
+ ## TCP_REQUEST_INFORMATION_EX
+ ""
+ ].pack('VVVVVa16')
+ reqsize = API.packdw(reqinfo.size)
+ buff = "\0" * buffsize
+ buffsize = API.packdw(buffsize)
+ result = WsControl.call(
+ IPPROTO_TCP,
+ WSCTL_TCP_QUERY_INFORMATION,
+ reqinfo, reqsize,
+ buff, buffsize)
+ if result != 0
+ raise RuntimeError, "WsControl failed.(#{result})"
+ end
+ [ buff, API.unpackdw(buffsize) ]
+ end
+ private_class_method :wsctl
+
+ def self.get_iflist
+ # Get TDI Entity List
+ entities, size =
+ wsctl(GENERIC_ENTITY, 0,
+ INFO_CLASS_GENERIC,
+ INFO_TYPE_PROVIDER,
+ ENTITY_LIST_ID,
+ MAX_TDI_ENTITIES * 8) # sizeof(TDIEntityID)
+ entities = entities[0, size].
+ scan(/.{8}/).
+ collect { |e| e.unpack('VV') }
+
+ # Get MIB Interface List
+ iflist = []
+ ifcount = 0
+ entities.each do |entity, instance|
+ if( (entity & IF_ENTITY)>0 )
+ ifcount += 1
+ etype, = wsctl(entity, instance,
+ INFO_CLASS_GENERIC,
+ INFO_TYPE_PROVIDER,
+ ENTITY_TYPE_ID,
+ 4)
+ if( (API.unpackdw(etype) & IF_MIB)==IF_MIB )
+ ifentry, = wsctl(entity, instance,
+ INFO_CLASS_PROTOCOL,
+ INFO_TYPE_PROVIDER,
+ IF_MIB_STATS_ID,
+ 21 * 4 + 8 + 130) # sizeof(IFEntry)
+ iflist << [
+ API.unpackdw(ifentry[0,4]),
+ ifentry[20, 6]
+ ]
+ end
+ end
+ end
+
+ # Get IP Addresses
+ entities.each do |entity, instance|
+ if entity == CL_NL_ENTITY
+ etype, = wsctl(entity, instance,
+ INFO_CLASS_GENERIC,
+ INFO_TYPE_PROVIDER,
+ ENTITY_TYPE_ID,
+ 4)
+ if API.unpackdw(etype) == CL_NL_IP
+ ipentries, = wsctl(entity, instance,
+ INFO_CLASS_PROTOCOL,
+ INFO_TYPE_PROVIDER,
+ IP_MIB_ADDRTABLE_ENTRY_ID,
+ 24 * (ifcount+1)) # sizeof(IPAddrEntry)
+ ipentries.scan(/.{24}/) do |ipentry|
+ ipaddr, index = ipentry.unpack('VV')
+ if ifitem = iflist.assoc(index)
+ ifitem << ipaddr
+ end
+ end
+ end
+ end
+ end
+ iflist
+ end
+ end
+ __EOS__
+end
+#====================================================================
+ end
+end
diff --git a/ext/gdbm/depend b/ext/gdbm/depend
new file mode 100644
index 0000000000..c080a81619
--- /dev/null
+++ b/ext/gdbm/depend
@@ -0,0 +1 @@
+gdbm.o: gdbm.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h
diff --git a/ext/gdbm/gdbm.c b/ext/gdbm/gdbm.c
index 888f95d91f..9d958d54a2 100644
--- a/ext/gdbm/gdbm.c
+++ b/ext/gdbm/gdbm.c
@@ -506,6 +506,7 @@ fgdbm_values_at(int argc, VALUE *argv, VALUE obj)
static void
rb_gdbm_modify(VALUE obj)
{
+ rb_secure(4);
if (OBJ_FROZEN(obj)) rb_error_frozen("GDBM");
}
@@ -724,7 +725,7 @@ fgdbm_store(VALUE obj, VALUE keystr, VALUE valstr)
}
static VALUE
-update_i(RB_BLOCK_CALL_FUNC_ARGLIST(pair, dbm))
+update_i(VALUE pair, VALUE dbm)
{
Check_Type(pair, T_ARRAY);
if (RARRAY_LEN(pair) < 2) {
@@ -952,9 +953,7 @@ fgdbm_values(VALUE obj)
/*
* call-seq:
- * gdbm.include?(k) -> true or false
* gdbm.has_key?(k) -> true or false
- * gdbm.member?(k) -> true or false
* gdbm.key?(k) -> true or false
*
* Returns true if the given key _k_ exists within the database.
diff --git a/ext/io/console/console.c b/ext/io/console/console.c
index f3379ffd8d..cedc057bb3 100644
--- a/ext/io/console/console.c
+++ b/ext/io/console/console.c
@@ -7,8 +7,6 @@
#include "ruby/io.h"
#else
#include "rubyio.h"
-/* assumes rb_io_t doesn't have pathv */
-#include "util.h" /* for ruby_strdup() */
#endif
#ifndef HAVE_RB_IO_T
@@ -25,10 +23,6 @@ typedef OpenFile rb_io_t;
#include <sys/ioctl.h>
#endif
-#ifndef RB_TYPE_P
-#define RB_TYPE_P(obj, type) (TYPE(obj) == type)
-#endif
-
#if defined HAVE_TERMIOS_H
# include <termios.h>
typedef struct termios conmode;
@@ -107,35 +101,17 @@ rawmode_opt(int argc, VALUE *argv, rawmode_arg_t *opts)
{
rawmode_arg_t *optp = NULL;
VALUE vopts;
-#ifdef HAVE_RB_SCAN_ARGS_OPTIONAL_HASH
rb_scan_args(argc, argv, "0:", &vopts);
-#else
- vopts = Qnil;
- if (argc > 0) {
- vopts = argv[--argc];
- if (!NIL_P(vopts)) {
-# ifdef HAVE_RB_CHECK_HASH_TYPE
- vopts = rb_check_hash_type(vopts);
- if (NIL_P(vopts)) ++argc;
-# else
- Check_Type(vopts, T_HASH);
-# endif
- }
- }
- rb_scan_args(argc, argv, "0");
-#endif
if (!NIL_P(vopts)) {
VALUE vmin = rb_hash_aref(vopts, ID2SYM(rb_intern("min")));
VALUE vtime = rb_hash_aref(vopts, ID2SYM(rb_intern("time")));
- /* default values by `stty raw` */
- opts->vmin = 1;
- opts->vtime = 0;
+ VALUE v10 = INT2FIX(10);
if (!NIL_P(vmin)) {
+ vmin = rb_funcall3(vmin, '*', 1, &v10);
opts->vmin = NUM2INT(vmin);
optp = opts;
}
if (!NIL_P(vtime)) {
- VALUE v10 = INT2FIX(10);
vtime = rb_funcall3(vtime, '*', 1, &v10);
opts->vtime = NUM2INT(vtime);
optp = opts;
@@ -610,7 +586,6 @@ console_iflush(VALUE io)
#if defined HAVE_TERMIOS_H || defined HAVE_TERMIO_H
if (tcflush(fd, TCIFLUSH)) rb_sys_fail(0);
#endif
- (void)fd;
return io;
}
@@ -633,7 +608,6 @@ console_oflush(VALUE io)
#if defined HAVE_TERMIOS_H || defined HAVE_TERMIO_H
if (tcflush(fd, TCOFLUSH)) rb_sys_fail(0);
#endif
- (void)fd;
return io;
}
@@ -729,11 +703,7 @@ console_dev(VALUE klass)
args[0] = INT2NUM(fd);
con = rb_class_new_instance(2, args, klass);
GetOpenFile(con, fptr);
-#ifdef HAVE_RUBY_IO_H
fptr->pathv = rb_obj_freeze(rb_str_new2(CONSOLE_DEVICE));
-#else
- fptr->path = ruby_strdup(CONSOLE_DEVICE);
-#endif
#ifdef CONSOLE_DEVICE_FOR_WRITING
GetOpenFile(out, ofptr);
# ifdef HAVE_RB_IO_GET_WRITE_IO
@@ -751,12 +721,6 @@ console_dev(VALUE klass)
return con;
}
-/*
- * call-seq:
- * io.getch(min: nil, time: nil) -> char
- *
- * See IO#getch.
- */
static VALUE
io_getch(int argc, VALUE *argv, VALUE io)
{
@@ -792,7 +756,7 @@ InitVM_console(void)
rb_define_method(rb_cIO, "ioflush", console_ioflush, 0);
rb_define_singleton_method(rb_cIO, "console", console_dev, 0);
{
- VALUE mReadable = rb_define_module_under(rb_cIO, "generic_readable");
+ VALUE mReadable = rb_define_module_under(rb_cIO, "readable");
rb_define_method(mReadable, "getch", io_getch, -1);
}
}
diff --git a/ext/io/console/depend b/ext/io/console/depend
deleted file mode 100644
index e786dc71d2..0000000000
--- a/ext/io/console/depend
+++ /dev/null
@@ -1,4 +0,0 @@
-$(OBJS): $(HDRS) $(ruby_headers) \
- $(hdrdir)/ruby/io.h \
- $(hdrdir)/ruby/encoding.h \
- $(hdrdir)/ruby/oniguruma.h
diff --git a/ext/io/console/extconf.rb b/ext/io/console/extconf.rb
index bbd1235986..57cd7ad87f 100644
--- a/ext/io/console/extconf.rb
+++ b/ext/io/console/extconf.rb
@@ -12,15 +12,9 @@ when have_header(hdr = "sgtty.h")
else
ok = false
end
-ok &&= enable_config("io-console-force-compatible-with-1.8") ||
- macro_defined?("HAVE_RUBY_IO_H", cpp_include("ruby.h"))
+have_header("sys/ioctl.h")
+have_func("rb_io_get_write_io", "ruby/io.h")
+have_func("dup3", "unistd.h")
if ok
- have_header("sys/ioctl.h")
- have_func("rb_check_hash_type", "ruby.h")
- have_func("rb_io_get_write_io", "ruby/io.h")
- have_func("rb_cloexec_open", "ruby/io.h")
- if enable_config("io-console-rb_scan_args-optional-hash", true)
- $defs << "-DHAVE_RB_SCAN_ARGS_OPTIONAL_HASH=1"
- end
create_makefile("io/console")
end
diff --git a/ext/io/console/io-console.gemspec b/ext/io/console/io-console.gemspec
index f71e1b9b8f..66b3165967 100644
--- a/ext/io/console/io-console.gemspec
+++ b/ext/io/console/io-console.gemspec
@@ -1,21 +1,16 @@
# -*- ruby -*-
-_VERSION = "0.4.2"
-date = %w$Date:: $[1]
+_VERSION = "0.3"
Gem::Specification.new do |s|
s.name = "io-console"
s.version = _VERSION
- s.date = date
+ s.date = "2011-06-24"
s.summary = "Console interface"
s.email = "nobu@ruby-lang.org"
s.description = "add console capabilities to IO instances."
- s.required_ruby_version = ">= 2.0.0"
s.homepage = "http://www.ruby-lang.org"
s.authors = ["Nobu Nakada"]
s.require_path = %[.]
s.files = %w[console.c extconf.rb lib/console/size.rb]
s.extensions = %w[extconf.rb]
- s.licenses = "ruby"
- s.cert_chain = %w[certs/nobu.pem]
- s.signing_key = File.expand_path("~/.ssh/gem-private_key.pem") if $0 =~ /gem\z/
end
diff --git a/ext/io/console/lib/console/size.rb b/ext/io/console/lib/console/size.rb
index 519bc3be6d..e9d8a1fbb6 100644
--- a/ext/io/console/lib/console/size.rb
+++ b/ext/io/console/lib/console/size.rb
@@ -1,4 +1,3 @@
-# fallback to console window size
def IO.default_console_size
[
ENV["LINES"].to_i.nonzero? || 25,
@@ -13,7 +12,6 @@ rescue LoadError
alias console_size default_console_size
end
else
- # returns console window size
def IO.console_size
console.winsize
rescue NoMethodError
diff --git a/ext/io/nonblock/depend b/ext/io/nonblock/depend
deleted file mode 100644
index e786dc71d2..0000000000
--- a/ext/io/nonblock/depend
+++ /dev/null
@@ -1,4 +0,0 @@
-$(OBJS): $(HDRS) $(ruby_headers) \
- $(hdrdir)/ruby/io.h \
- $(hdrdir)/ruby/encoding.h \
- $(hdrdir)/ruby/oniguruma.h
diff --git a/ext/io/nonblock/nonblock.c b/ext/io/nonblock/nonblock.c
index ccd8728a31..1d866ceb0f 100644
--- a/ext/io/nonblock/nonblock.c
+++ b/ext/io/nonblock/nonblock.c
@@ -30,12 +30,6 @@ io_nonblock_mode(int fd)
#endif
#ifdef F_GETFL
-/*
- * call-seq:
- * io.nonblock? -> boolean
- *
- * Returns +true+ if an IO object is in non-blocking mode.
- */
static VALUE
rb_io_nonblock_p(VALUE io)
{
@@ -67,13 +61,6 @@ io_nonblock_set(int fd, int f, int nb)
rb_sys_fail(0);
}
-/*
- * call-seq:
- * io.nonblock = boolean -> boolean
- *
- * Enables non-blocking mode on a stream when set to
- * +true+, and blocking mode when set to +false+.
- */
static VALUE
rb_io_nonblock_set(VALUE io, VALUE nb)
{
@@ -92,16 +79,6 @@ io_nonblock_restore(VALUE arg)
return Qnil;
}
-/*
- * call-seq:
- * io.nonblock {|io| } -> io
- * io.nonblock(boolean) {|io| } -> io
- *
- * Yields +self+ in non-blocking mode.
- *
- * When +false+ is given as an argument, +self+ is yielded in blocking mode.
- * The original mode is restored after the block is executed.
- */
static VALUE
rb_io_nonblock_block(int argc, VALUE *argv, VALUE io)
{
@@ -129,7 +106,9 @@ rb_io_nonblock_block(int argc, VALUE *argv, VALUE io)
void
Init_nonblock(void)
{
- rb_define_method(rb_cIO, "nonblock?", rb_io_nonblock_p, 0);
- rb_define_method(rb_cIO, "nonblock=", rb_io_nonblock_set, 1);
- rb_define_method(rb_cIO, "nonblock", rb_io_nonblock_block, -1);
+ VALUE io = rb_cIO;
+
+ rb_define_method(io, "nonblock?", rb_io_nonblock_p, 0);
+ rb_define_method(io, "nonblock=", rb_io_nonblock_set, 1);
+ rb_define_method(io, "nonblock", rb_io_nonblock_block, -1);
}
diff --git a/ext/io/wait/depend b/ext/io/wait/depend
deleted file mode 100644
index e786dc71d2..0000000000
--- a/ext/io/wait/depend
+++ /dev/null
@@ -1,4 +0,0 @@
-$(OBJS): $(HDRS) $(ruby_headers) \
- $(hdrdir)/ruby/io.h \
- $(hdrdir)/ruby/encoding.h \
- $(hdrdir)/ruby/oniguruma.h
diff --git a/ext/io/wait/wait.c b/ext/io/wait/wait.c
index d8bb55fc47..c7a290fd4f 100644
--- a/ext/io/wait/wait.c
+++ b/ext/io/wait/wait.c
@@ -96,8 +96,6 @@ io_ready_p(VALUE io)
* call-seq:
* io.wait -> IO, true, false or nil
* io.wait(timeout) -> IO, true, false or nil
- * io.wait_readable -> IO, true, false or nil
- * io.wait_readable(timeout) -> IO, true, false or nil
*
* Waits until input is available or times out and returns self or nil when
* EOF is reached.
diff --git a/ext/json/fbuffer/fbuffer.h b/ext/json/fbuffer/fbuffer.h
index af74187566..b5e47eec42 100644
--- a/ext/json/fbuffer/fbuffer.h
+++ b/ext/json/fbuffer/fbuffer.h
@@ -3,6 +3,7 @@
#define _FBUFFER_H_
#include "ruby.h"
+#include <assert.h>
#ifndef RHASH_SIZE
#define RHASH_SIZE(hsh) (RHASH(hsh)->tbl->num_entries)
@@ -165,8 +166,11 @@ static FBuffer *fbuffer_dup(FBuffer *fb)
unsigned long len = fb->len;
FBuffer *result;
- result = fbuffer_alloc(len);
- fbuffer_append(result, FBUFFER_PAIR(fb));
+ assert(len > 0);
+ if (len > 0) {
+ result = fbuffer_alloc(len);
+ fbuffer_append(result, FBUFFER_PAIR(fb));
+ }
return result;
}
diff --git a/ext/json/generator/generator.c b/ext/json/generator/generator.c
index ed7bb82887..3cff87d7d5 100644
--- a/ext/json/generator/generator.c
+++ b/ext/json/generator/generator.c
@@ -273,18 +273,7 @@ static void convert_UTF8_to_JSON(FBuffer *buffer, VALUE string)
escape_len = 2;
break;
default:
- {
- unsigned short clen = trailingBytesForUTF8[c] + 1;
- if (end + clen > len) {
- rb_raise(rb_path2class("JSON::GeneratorError"),
- "partial character in source, but hit end");
- }
- if (!isLegalUTF8((UTF8 *) p, clen)) {
- rb_raise(rb_path2class("JSON::GeneratorError"),
- "source sequence is illegal/malformed utf-8");
- }
- end += clen;
- }
+ end++;
continue;
break;
}
@@ -522,15 +511,18 @@ static VALUE cState_configure(VALUE self, VALUE opts)
{
VALUE tmp;
GET_STATE(self);
- tmp = rb_check_convert_type(opts, T_HASH, "Hash", "to_hash");
+ tmp = rb_convert_type(opts, T_HASH, "Hash", "to_hash");
if (NIL_P(tmp)) tmp = rb_convert_type(opts, T_HASH, "Hash", "to_h");
+ if (NIL_P(tmp)) {
+ rb_raise(rb_eArgError, "opts has to be hash like or convertable into a hash");
+ }
opts = tmp;
tmp = rb_hash_aref(opts, ID2SYM(i_indent));
if (RTEST(tmp)) {
unsigned long len;
Check_Type(tmp, T_STRING);
len = RSTRING_LEN(tmp);
- state->indent = fstrndup(RSTRING_PTR(tmp), len + 1);
+ state->indent = fstrndup(RSTRING_PTR(tmp), len);
state->indent_len = len;
}
tmp = rb_hash_aref(opts, ID2SYM(i_space));
@@ -538,7 +530,7 @@ static VALUE cState_configure(VALUE self, VALUE opts)
unsigned long len;
Check_Type(tmp, T_STRING);
len = RSTRING_LEN(tmp);
- state->space = fstrndup(RSTRING_PTR(tmp), len + 1);
+ state->space = fstrndup(RSTRING_PTR(tmp), len);
state->space_len = len;
}
tmp = rb_hash_aref(opts, ID2SYM(i_space_before));
@@ -546,7 +538,7 @@ static VALUE cState_configure(VALUE self, VALUE opts)
unsigned long len;
Check_Type(tmp, T_STRING);
len = RSTRING_LEN(tmp);
- state->space_before = fstrndup(RSTRING_PTR(tmp), len + 1);
+ state->space_before = fstrndup(RSTRING_PTR(tmp), len);
state->space_before_len = len;
}
tmp = rb_hash_aref(opts, ID2SYM(i_array_nl));
@@ -554,7 +546,7 @@ static VALUE cState_configure(VALUE self, VALUE opts)
unsigned long len;
Check_Type(tmp, T_STRING);
len = RSTRING_LEN(tmp);
- state->array_nl = fstrndup(RSTRING_PTR(tmp), len + 1);
+ state->array_nl = fstrndup(RSTRING_PTR(tmp), len);
state->array_nl_len = len;
}
tmp = rb_hash_aref(opts, ID2SYM(i_object_nl));
@@ -562,11 +554,11 @@ static VALUE cState_configure(VALUE self, VALUE opts)
unsigned long len;
Check_Type(tmp, T_STRING);
len = RSTRING_LEN(tmp);
- state->object_nl = fstrndup(RSTRING_PTR(tmp), len + 1);
+ state->object_nl = fstrndup(RSTRING_PTR(tmp), len);
state->object_nl_len = len;
}
tmp = ID2SYM(i_max_nesting);
- state->max_nesting = 100;
+ state->max_nesting = 19;
if (option_given_p(opts, tmp)) {
VALUE max_nesting = rb_hash_aref(opts, tmp);
if (RTEST(max_nesting)) {
@@ -606,18 +598,6 @@ static VALUE cState_configure(VALUE self, VALUE opts)
return self;
}
-static void set_state_ivars(VALUE hash, VALUE state)
-{
- VALUE ivars = rb_obj_instance_variables(state);
- int i = 0;
- for (i = 0; i < RARRAY_LEN(ivars); i++) {
- VALUE key = rb_funcall(rb_ary_entry(ivars, i), i_to_s, 0);
- long key_len = RSTRING_LEN(key);
- VALUE value = rb_iv_get(state, StringValueCStr(key));
- rb_hash_aset(hash, rb_str_intern(rb_str_substr(key, 1, key_len - 1)), value);
- }
-}
-
/*
* call-seq: to_h
*
@@ -628,7 +608,6 @@ static VALUE cState_to_h(VALUE self)
{
VALUE result = rb_hash_new();
GET_STATE(self);
- set_state_ivars(result, self);
rb_hash_aset(result, ID2SYM(i_indent), rb_str_new(state->indent, state->indent_len));
rb_hash_aset(result, ID2SYM(i_space), rb_str_new(state->space, state->space_len));
rb_hash_aset(result, ID2SYM(i_space_before), rb_str_new(state->space_before, state->space_before_len));
@@ -650,33 +629,14 @@ static VALUE cState_to_h(VALUE self)
*/
static VALUE cState_aref(VALUE self, VALUE name)
{
- name = rb_funcall(name, i_to_s, 0);
+ GET_STATE(self);
if (RTEST(rb_funcall(self, i_respond_to_p, 1, name))) {
return rb_funcall(self, i_send, 1, name);
} else {
- return rb_ivar_get(self, rb_intern_str(rb_str_concat(rb_str_new2("@"), name)));
+ return Qnil;
}
}
-/*
-* call-seq: []=(name, value)
-*
-* Set the attribute name to value.
-*/
-static VALUE cState_aset(VALUE self, VALUE name, VALUE value)
-{
- VALUE name_writer;
-
- name = rb_funcall(name, i_to_s, 0);
- name_writer = rb_str_cat2(rb_str_dup(name), "=");
- if (RTEST(rb_funcall(self, i_respond_to_p, 1, name_writer))) {
- return rb_funcall(self, i_send, 2, name_writer, value);
- } else {
- rb_ivar_set(self, rb_intern_str(rb_str_concat(rb_str_new2("@"), name)), value);
- }
- return Qnil;
-}
-
static void generate_json_object(FBuffer *buffer, VALUE Vstate, JSON_Generator_State *state, VALUE obj)
{
char *object_nl = state->object_nl;
@@ -902,8 +862,8 @@ static int isArrayOrObject(VALUE string)
long string_len = RSTRING_LEN(string);
char *p = RSTRING_PTR(string), *q = p + string_len - 1;
if (string_len < 2) return 0;
- for (; p < q && isspace((unsigned char)*p); p++);
- for (; q > p && isspace((unsigned char)*q); q--);
+ for (; p < q && isspace(*p); p++);
+ for (; q > p && isspace(*q); q--);
return (*p == '[' && *q == ']') || (*p == '{' && *q == '}');
}
@@ -948,7 +908,7 @@ static VALUE cState_initialize(int argc, VALUE *argv, VALUE self)
{
VALUE opts;
GET_STATE(self);
- state->max_nesting = 100;
+ state->max_nesting = 19;
state->buffer_initial_length = FBUFFER_INITIAL_LENGTH_DEFAULT;
rb_scan_args(argc, argv, "01", &opts);
if (!NIL_P(opts)) cState_configure(self, opts);
@@ -1010,7 +970,7 @@ static VALUE cState_from_state_s(VALUE self, VALUE opts)
static VALUE cState_indent(VALUE self)
{
GET_STATE(self);
- return state->indent ? rb_str_new(state->indent, state->indent_len) : rb_str_new2("");
+ return state->indent ? rb_str_new2(state->indent) : rb_str_new2("");
}
/*
@@ -1047,7 +1007,7 @@ static VALUE cState_indent_set(VALUE self, VALUE indent)
static VALUE cState_space(VALUE self)
{
GET_STATE(self);
- return state->space ? rb_str_new(state->space, state->space_len) : rb_str_new2("");
+ return state->space ? rb_str_new2(state->space) : rb_str_new2("");
}
/*
@@ -1084,7 +1044,7 @@ static VALUE cState_space_set(VALUE self, VALUE space)
static VALUE cState_space_before(VALUE self)
{
GET_STATE(self);
- return state->space_before ? rb_str_new(state->space_before, state->space_before_len) : rb_str_new2("");
+ return state->space_before ? rb_str_new2(state->space_before) : rb_str_new2("");
}
/*
@@ -1121,7 +1081,7 @@ static VALUE cState_space_before_set(VALUE self, VALUE space_before)
static VALUE cState_object_nl(VALUE self)
{
GET_STATE(self);
- return state->object_nl ? rb_str_new(state->object_nl, state->object_nl_len) : rb_str_new2("");
+ return state->object_nl ? rb_str_new2(state->object_nl) : rb_str_new2("");
}
/*
@@ -1157,7 +1117,7 @@ static VALUE cState_object_nl_set(VALUE self, VALUE object_nl)
static VALUE cState_array_nl(VALUE self)
{
GET_STATE(self);
- return state->array_nl ? rb_str_new(state->array_nl, state->array_nl_len) : rb_str_new2("");
+ return state->array_nl ? rb_str_new2(state->array_nl) : rb_str_new2("");
}
/*
@@ -1367,9 +1327,7 @@ void Init_generator()
rb_define_method(cState, "configure", cState_configure, 1);
rb_define_alias(cState, "merge", "configure");
rb_define_method(cState, "to_h", cState_to_h, 0);
- rb_define_alias(cState, "to_hash", "to_h");
rb_define_method(cState, "[]", cState_aref, 1);
- rb_define_method(cState, "[]=", cState_aset, 2);
rb_define_method(cState, "generate", cState_generate, 1);
mGeneratorMethods = rb_define_module_under(mGenerator, "GeneratorMethods");
diff --git a/ext/json/generator/generator.h b/ext/json/generator/generator.h
index b58cc4bc2f..7d429d512c 100644
--- a/ext/json/generator/generator.h
+++ b/ext/json/generator/generator.h
@@ -2,6 +2,7 @@
#define _GENERATOR_H_
#include <string.h>
+#include <assert.h>
#include <math.h>
#include <ctype.h>
@@ -13,14 +14,6 @@
#include "re.h"
#endif
-#ifndef rb_intern_str
-#define rb_intern_str(string) SYM2ID(rb_str_intern(string))
-#endif
-
-#ifndef rb_obj_instance_variables
-#define rb_obj_instance_variables(object) rb_funcall(object, rb_intern("instance_variables"), 0)
-#endif
-
#define option_given_p(opts, key) RTEST(rb_funcall(opts, i_key_p, 1, key))
/* unicode defintions */
diff --git a/ext/json/lib/json.rb b/ext/json/lib/json.rb
index 24aa385c91..00fe4cae84 100644
--- a/ext/json/lib/json.rb
+++ b/ext/json/lib/json.rb
@@ -1,5 +1,3 @@
-require 'json/common'
-
##
# = JavaScript Object Notation (JSON)
#
@@ -51,6 +49,8 @@ require 'json/common'
#
# 1.to_json => "1"
#
+
+require 'json/common'
module JSON
require 'json/version'
diff --git a/ext/json/lib/json/add/bigdecimal.rb b/ext/json/lib/json/add/bigdecimal.rb
index 0ef69f12e0..4aafe537ab 100644
--- a/ext/json/lib/json/add/bigdecimal.rb
+++ b/ext/json/lib/json/add/bigdecimal.rb
@@ -4,16 +4,10 @@ end
defined?(::BigDecimal) or require 'bigdecimal'
class BigDecimal
- # Import a JSON Marshalled object.
- #
- # method used for JSON marshalling support.
def self.json_create(object)
BigDecimal._load object['b']
end
- # Marshal the object to JSON.
- #
- # method used for JSON marshalling support.
def as_json(*)
{
JSON.create_id => self.class.name,
@@ -21,7 +15,6 @@ class BigDecimal
}
end
- # return the JSON value
def to_json(*)
as_json.to_json
end
diff --git a/ext/json/lib/json/common.rb b/ext/json/lib/json/common.rb
index 8fbaa2baad..3349501337 100644
--- a/ext/json/lib/json/common.rb
+++ b/ext/json/lib/json/common.rb
@@ -139,7 +139,7 @@ module JSON
# keys:
# * *max_nesting*: The maximum depth of nesting allowed in the parsed data
# structures. Disable depth checking with :max_nesting => false. It defaults
- # to 100.
+ # to 19.
# * *allow_nan*: If set to true, allow NaN, Infinity and -Infinity in
# defiance of RFC 4627 to be parsed by the Parser. This option defaults
# to false.
@@ -199,7 +199,7 @@ module JSON
# encountered. This options defaults to false.
# * *max_nesting*: The maximum depth of nesting allowed in the data
# structures from which JSON is to be generated. Disable depth checking
- # with :max_nesting => false, it defaults to 100.
+ # with :max_nesting => false, it defaults to 19.
#
# See also the fast_generate for the fastest creation method with the least
# amount of sanity checks, and the pretty_generate method for some
@@ -299,28 +299,21 @@ module JSON
attr_accessor :load_default_options
end
self.load_default_options = {
- :max_nesting => false,
- :allow_nan => true,
- :quirks_mode => true,
- :create_additions => true,
+ :max_nesting => false,
+ :allow_nan => true,
+ :quirks_mode => true,
}
# Load a ruby data structure from a JSON _source_ and return it. A source can
# either be a string-like object, an IO-like object, or an object responding
# to the read method. If _proc_ was given, it will be called with any nested
- # Ruby object as an argument recursively in depth first order. To modify the
- # default options pass in the optional _options_ argument as well.
- #
- # BEWARE: This method is meant to serialise data from trusted user input,
- # like from your own database server or clients under your control, it could
- # be dangerous to allow untrusted users to pass JSON sources into it. The
- # default options for the parser can be changed via the load_default_options
- # method.
+ # Ruby object as an argument recursively in depth first order. The default
+ # options for the parser can be changed via the load_default_options method.
#
# This method is part of the implementation of the load/dump interface of
# Marshal and YAML.
- def load(source, proc = nil, options = {})
- opts = load_default_options.merge options
+ def load(source, proc = nil)
+ opts = load_default_options
if source.respond_to? :to_str
source = source.to_str
elsif source.respond_to? :to_io
@@ -412,7 +405,10 @@ module JSON
end
# Shortuct for iconv.
- if ::String.method_defined?(:encode)
+ if ::String.method_defined?(:encode) &&
+ # XXX Rubinius doesn't support ruby 1.9 encoding yet
+ defined?(RUBY_ENGINE) && RUBY_ENGINE != 'rbx'
+ then
# Encodes string using Ruby's _String.encode_
def self.iconv(to, from, string)
string.encode(to, from)
@@ -448,7 +444,7 @@ module ::Kernel
nil
end
- # Outputs _objs_ to STDOUT as JSON strings in a pretty format, with
+ # Ouputs _objs_ to STDOUT as JSON strings in a pretty format, with
# indentation and over many lines.
def jj(*objs)
objs.each do |obj|
diff --git a/ext/json/lib/json/generic_object.rb b/ext/json/lib/json/generic_object.rb
index 8b8fd53bef..7f3dbbd78d 100644
--- a/ext/json/lib/json/generic_object.rb
+++ b/ext/json/lib/json/generic_object.rb
@@ -5,43 +5,12 @@ module JSON
class << self
alias [] new
- def json_creatable?
- @json_creatable
- end
-
- attr_writer :json_creatable
-
def json_create(data)
data = data.dup
data.delete JSON.create_id
self[data]
end
-
- def from_hash(object)
- case
- when object.respond_to?(:to_hash)
- result = new
- object.to_hash.each do |key, value|
- result[key] = from_hash(value)
- end
- result
- when object.respond_to?(:to_ary)
- object.to_ary.map { |a| from_hash(a) }
- else
- object
- end
- end
-
- def load(source, proc = nil, opts = {})
- result = ::JSON.load(source, proc, opts.merge(:object_class => self))
- result.nil? ? new : result
- end
-
- def dump(obj, *args)
- ::JSON.dump(obj, *args)
- end
end
- self.json_creatable = false
def to_hash
table
diff --git a/ext/json/lib/json/version.rb b/ext/json/lib/json/version.rb
index 47cdcd607c..45af03fd40 100644
--- a/ext/json/lib/json/version.rb
+++ b/ext/json/lib/json/version.rb
@@ -1,6 +1,6 @@
module JSON
# JSON version
- VERSION = '1.8.1'
+ VERSION = '1.7.5'
VERSION_ARRAY = VERSION.split(/\./).map { |x| x.to_i } # :nodoc:
VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
diff --git a/ext/json/parser/parser.c b/ext/json/parser/parser.c
index df89f2c58b..c140fdb2fe 100644
--- a/ext/json/parser/parser.c
+++ b/ext/json/parser/parser.c
@@ -1618,7 +1618,7 @@ static VALUE convert_encoding(VALUE source)
* _opts_ can have the following keys:
* * *max_nesting*: The maximum depth of nesting allowed in the parsed data
* structures. Disable depth checking with :max_nesting => false|nil|0, it
- * defaults to 100.
+ * defaults to 19.
* * *allow_nan*: If set to true, allow NaN, Infinity and -Infinity in
* defiance of RFC 4627 to be parsed by the Parser. This option defaults to
* false.
@@ -1655,7 +1655,7 @@ static VALUE cParser_initialize(int argc, VALUE *argv, VALUE self)
json->max_nesting = 0;
}
} else {
- json->max_nesting = 100;
+ json->max_nesting = 19;
}
tmp = ID2SYM(i_allow_nan);
if (option_given_p(opts, tmp)) {
@@ -1680,7 +1680,7 @@ static VALUE cParser_initialize(int argc, VALUE *argv, VALUE self)
if (option_given_p(opts, tmp)) {
json->create_additions = RTEST(rb_hash_aref(opts, tmp));
} else {
- json->create_additions = 0;
+ json->create_additions = 1;
}
tmp = ID2SYM(i_create_id);
if (option_given_p(opts, tmp)) {
@@ -1709,7 +1709,7 @@ static VALUE cParser_initialize(int argc, VALUE *argv, VALUE self)
}
}
} else {
- json->max_nesting = 100;
+ json->max_nesting = 19;
json->allow_nan = 0;
json->create_additions = 1;
json->create_id = rb_funcall(mJSON, i_create_id, 0);
diff --git a/ext/json/parser/parser.rl b/ext/json/parser/parser.rl
index ab8d318173..20ecc486e1 100644
--- a/ext/json/parser/parser.rl
+++ b/ext/json/parser/parser.rl
@@ -602,7 +602,7 @@ static VALUE convert_encoding(VALUE source)
* _opts_ can have the following keys:
* * *max_nesting*: The maximum depth of nesting allowed in the parsed data
* structures. Disable depth checking with :max_nesting => false|nil|0, it
- * defaults to 100.
+ * defaults to 19.
* * *allow_nan*: If set to true, allow NaN, Infinity and -Infinity in
* defiance of RFC 4627 to be parsed by the Parser. This option defaults to
* false.
@@ -639,7 +639,7 @@ static VALUE cParser_initialize(int argc, VALUE *argv, VALUE self)
json->max_nesting = 0;
}
} else {
- json->max_nesting = 100;
+ json->max_nesting = 19;
}
tmp = ID2SYM(i_allow_nan);
if (option_given_p(opts, tmp)) {
@@ -664,7 +664,7 @@ static VALUE cParser_initialize(int argc, VALUE *argv, VALUE self)
if (option_given_p(opts, tmp)) {
json->create_additions = RTEST(rb_hash_aref(opts, tmp));
} else {
- json->create_additions = 0;
+ json->create_additions = 1;
}
tmp = ID2SYM(i_create_id);
if (option_given_p(opts, tmp)) {
@@ -693,7 +693,7 @@ static VALUE cParser_initialize(int argc, VALUE *argv, VALUE self)
}
}
} else {
- json->max_nesting = 100;
+ json->max_nesting = 19;
json->allow_nan = 0;
json->create_additions = 1;
json->create_id = rb_funcall(mJSON, i_create_id, 0);
diff --git a/ext/nkf/depend b/ext/nkf/depend
index f368cd51d7..f028020a20 100644
--- a/ext/nkf/depend
+++ b/ext/nkf/depend
@@ -1,6 +1,4 @@
-nkf.o : nkf.c $(HDRS) $(ruby_headers) \
- $(hdrdir)/ruby/encoding.h \
- $(hdrdir)/ruby/oniguruma.h \
+nkf.o : nkf.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h \
$(srcdir)/nkf-utf8/nkf.c $(srcdir)/nkf-utf8/nkf.h \
$(srcdir)/nkf-utf8/utf8tbl.c $(srcdir)/nkf-utf8/utf8tbl.h \
$(srcdir)/nkf-utf8/config.h
diff --git a/ext/nkf/nkf-utf8/nkf.c b/ext/nkf/nkf-utf8/nkf.c
index ca3e438220..8e9d206471 100644
--- a/ext/nkf/nkf-utf8/nkf.c
+++ b/ext/nkf/nkf-utf8/nkf.c
@@ -1,6 +1,6 @@
/*
* Copyright (c) 1987, Fujitsu LTD. (Itaru ICHIKAWA).
- * Copyright (c) 1996-2013, The nkf Project.
+ * Copyright (c) 1996-2010, The nkf Project.
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -21,10 +21,10 @@
* 3. This notice may not be removed or altered from any source distribution.
*/
#define NKF_VERSION "2.1.3"
-#define NKF_RELEASE_DATE "2013-11-22"
+#define NKF_RELEASE_DATE "2012-11-22"
#define COPY_RIGHT \
"Copyright (C) 1987, FUJITSU LTD. (I.Ichikawa).\n" \
- "Copyright (C) 1996-2013, The nkf Project."
+ "Copyright (C) 1996-2012, The nkf Project."
#include "config.h"
#include "nkf.h"
@@ -6150,10 +6150,9 @@ kanji_convert(FILE *f)
}
}
else {
- i_ungetc(c1,f);
/* lonely ESC */
(*oconv)(0, ESC);
- SKIP;
+ SEND;
}
} else if (c1 == ESC && iconv == s_iconv) {
/* ESC in Shift_JIS */
@@ -6190,10 +6189,9 @@ kanji_convert(FILE *f)
}
}
else {
- i_ungetc(c1,f);
/* lonely ESC */
(*oconv)(0, ESC);
- SKIP;
+ SEND;
}
} else if (c1 == LF || c1 == CR) {
if (broken_f&4) {
diff --git a/ext/nkf/nkf-utf8/nkf.h b/ext/nkf/nkf-utf8/nkf.h
index cd3037601b..c174c9ac51 100644
--- a/ext/nkf/nkf-utf8/nkf.h
+++ b/ext/nkf/nkf-utf8/nkf.h
@@ -1,7 +1,8 @@
/*
*
* nkf.h - Header file for nkf
- *
+ *
+ * $Id$
*/
#ifndef NKF_H
@@ -152,7 +153,6 @@ void setbinmode(FILE *fp)
# ifndef HAVE_LOCALE_H
# define HAVE_LOCALE_H
# endif
-#elif defined(__BIONIC__) /* bionic doesn't have locale */
#else
# ifndef HAVE_LANGINFO_H
# define HAVE_LANGINFO_H
diff --git a/ext/nkf/nkf-utf8/utf8tbl.c b/ext/nkf/nkf-utf8/utf8tbl.c
index e493c6beb5..bbf5c5f109 100644
--- a/ext/nkf/nkf-utf8/utf8tbl.c
+++ b/ext/nkf/nkf-utf8/utf8tbl.c
@@ -1,6 +1,7 @@
/*
* utf8tbl.c - Convertion Table for nkf
*
+ * $Id$
*/
#include "config.h"
diff --git a/ext/nkf/nkf-utf8/utf8tbl.h b/ext/nkf/nkf-utf8/utf8tbl.h
index 96b61ed5a4..082fb01a5b 100644
--- a/ext/nkf/nkf-utf8/utf8tbl.h
+++ b/ext/nkf/nkf-utf8/utf8tbl.h
@@ -1,6 +1,7 @@
/*
* utf8tbl.h - Header file for Convertion Table
*
+ * $Id: utf8tbl.h,v 1.3 2008/01/23 09:10:25 naruse Exp $
*/
#ifndef _UTF8TBL_H_
diff --git a/ext/objspace/depend b/ext/objspace/depend
index 270bd911d3..83a08f7078 100644
--- a/ext/objspace/depend
+++ b/ext/objspace/depend
@@ -1,14 +1,3 @@
-objspace.o: $(HDRS) $(ruby_headers) \
- $(hdrdir)/ruby/io.h \
- $(hdrdir)/ruby/encoding.h \
- $(hdrdir)/ruby/oniguruma.h \
- $(hdrdir)/ruby/regex.h \
- $(top_srcdir)/regenc.h \
- $(top_srcdir)/node.h $(top_srcdir)/gc.h \
+objspace.o: $(hdrdir)/ruby/ruby.h $(hdrdir)/ruby/st.h $(hdrdir)/ruby/io.h \
$(hdrdir)/ruby/re.h $(top_srcdir)/node.h $(top_srcdir)/gc.h \
$(top_srcdir)/regint.h $(top_srcdir)/internal.h
-gc_hook.o: $(HDRS) $(ruby_headers) $(hdrdir)/ruby/debug.h
-object_tracing.o: $(HDRS) $(ruby_headers) $(hdrdir)/ruby/debug.h
-objspace_dump.o: $(HDRS) $(ruby_headers) $(hdrdir)/ruby/debug.h \
- $(hdrdir)/ruby/encoding.h $(hdrdir)/ruby/io.h \
- $(top_srcdir)/node.h $(top_srcdir)/vm_core.h $(top_srcdir)/gc.h
diff --git a/ext/objspace/object_tracing.c b/ext/objspace/object_tracing.c
deleted file mode 100644
index 45b06aef8c..0000000000
--- a/ext/objspace/object_tracing.c
+++ /dev/null
@@ -1,490 +0,0 @@
-/**********************************************************************
-
- object_tracing.c - Object Tracing mechanism/ObjectSpace extender for MRI.
-
- $Author$
- created at: Mon May 27 16:27:44 2013
-
- NOTE: This extension library is not expected to exist except C Ruby.
- NOTE: This feature is an example usage of internal event tracing APIs.
-
- All the files in this distribution are covered under the Ruby's
- license (see the file COPYING).
-
-**********************************************************************/
-
-#include "ruby/ruby.h"
-#include "ruby/debug.h"
-#include "objspace.h"
-#include "internal.h"
-
-struct traceobj_arg {
- int running;
- int keep_remains;
- VALUE newobj_trace;
- VALUE freeobj_trace;
- st_table *object_table; /* obj (VALUE) -> allocation_info */
- st_table *str_table; /* cstr -> refcount */
- struct traceobj_arg *prev_traceobj_arg;
-};
-
-static const char *
-make_unique_str(st_table *tbl, const char *str, long len)
-{
- if (!str) {
- return NULL;
- }
- else {
- st_data_t n;
- char *result;
-
- if (st_lookup(tbl, (st_data_t)str, &n)) {
- st_insert(tbl, (st_data_t)str, n+1);
- st_get_key(tbl, (st_data_t)str, (st_data_t *)&result);
- }
- else {
- result = (char *)ruby_xmalloc(len+1);
- strncpy(result, str, len);
- result[len] = 0;
- st_add_direct(tbl, (st_data_t)result, 1);
- }
- return result;
- }
-}
-
-static void
-delete_unique_str(st_table *tbl, const char *str)
-{
- if (str) {
- st_data_t n;
-
- st_lookup(tbl, (st_data_t)str, &n);
- if (n == 1) {
- st_delete(tbl, (st_data_t *)&str, 0);
- ruby_xfree((char *)str);
- }
- else {
- st_insert(tbl, (st_data_t)str, n-1);
- }
- }
-}
-
-static void
-newobj_i(VALUE tpval, void *data)
-{
- struct traceobj_arg *arg = (struct traceobj_arg *)data;
- rb_trace_arg_t *tparg = rb_tracearg_from_tracepoint(tpval);
- VALUE obj = rb_tracearg_object(tparg);
- VALUE path = rb_tracearg_path(tparg);
- VALUE line = rb_tracearg_lineno(tparg);
- VALUE mid = rb_tracearg_method_id(tparg);
- VALUE klass = rb_tracearg_defined_class(tparg);
- struct allocation_info *info;
- const char *path_cstr = RTEST(path) ? make_unique_str(arg->str_table, RSTRING_PTR(path), RSTRING_LEN(path)) : 0;
- VALUE class_path = (RTEST(klass) && !OBJ_FROZEN(klass)) ? rb_class_path_cached(klass) : Qnil;
- const char *class_path_cstr = RTEST(class_path) ? make_unique_str(arg->str_table, RSTRING_PTR(class_path), RSTRING_LEN(class_path)) : 0;
-
- if (st_lookup(arg->object_table, (st_data_t)obj, (st_data_t *)&info)) {
- if (arg->keep_remains) {
- if (info->living) {
- /* do nothing. there is possibility to keep living if FREEOBJ events while suppressing tracing */
- }
- }
- /* reuse info */
- delete_unique_str(arg->str_table, info->path);
- delete_unique_str(arg->str_table, info->class_path);
- }
- else {
- info = (struct allocation_info *)ruby_xmalloc(sizeof(struct allocation_info));
- }
- info->living = 1;
- info->flags = RBASIC(obj)->flags;
- info->klass = RBASIC_CLASS(obj);
-
- info->path = path_cstr;
- info->line = NUM2INT(line);
- info->mid = mid;
- info->class_path = class_path_cstr;
- info->generation = rb_gc_count();
- st_insert(arg->object_table, (st_data_t)obj, (st_data_t)info);
-}
-
-static void
-freeobj_i(VALUE tpval, void *data)
-{
- struct traceobj_arg *arg = (struct traceobj_arg *)data;
- rb_trace_arg_t *tparg = rb_tracearg_from_tracepoint(tpval);
- VALUE obj = rb_tracearg_object(tparg);
- struct allocation_info *info;
-
- if (st_lookup(arg->object_table, (st_data_t)obj, (st_data_t *)&info)) {
- if (arg->keep_remains) {
- info->living = 0;
- }
- else {
- st_delete(arg->object_table, (st_data_t *)&obj, (st_data_t *)&info);
- delete_unique_str(arg->str_table, info->path);
- delete_unique_str(arg->str_table, info->class_path);
- ruby_xfree(info);
- }
- }
-}
-
-static int
-free_keys_i(st_data_t key, st_data_t value, void *data)
-{
- ruby_xfree((void *)key);
- return ST_CONTINUE;
-}
-
-static int
-free_values_i(st_data_t key, st_data_t value, void *data)
-{
- ruby_xfree((void *)value);
- return ST_CONTINUE;
-}
-
-static struct traceobj_arg *tmp_trace_arg; /* TODO: Do not use global variables */
-static int tmp_keep_remains; /* TODO: Do not use global variables */
-
-static struct traceobj_arg *
-get_traceobj_arg(void)
-{
- if (tmp_trace_arg == 0) {
- tmp_trace_arg = ALLOC_N(struct traceobj_arg, 1);
- tmp_trace_arg->running = 0;
- tmp_trace_arg->keep_remains = tmp_keep_remains;
- tmp_trace_arg->newobj_trace = 0;
- tmp_trace_arg->freeobj_trace = 0;
- tmp_trace_arg->object_table = st_init_numtable();
- tmp_trace_arg->str_table = st_init_strtable();
- }
- return tmp_trace_arg;
-}
-
-/*
- * call-seq: trace_object_allocations_start
- *
- * Starts tracing object allocations.
- *
- */
-static VALUE
-trace_object_allocations_start(VALUE self)
-{
- struct traceobj_arg *arg = get_traceobj_arg();
-
- if (arg->running++ > 0) {
- /* do nothing */
- }
- else {
- if (arg->newobj_trace == 0) {
- arg->newobj_trace = rb_tracepoint_new(0, RUBY_INTERNAL_EVENT_NEWOBJ, newobj_i, arg);
- arg->freeobj_trace = rb_tracepoint_new(0, RUBY_INTERNAL_EVENT_FREEOBJ, freeobj_i, arg);
- }
- rb_tracepoint_enable(arg->newobj_trace);
- rb_tracepoint_enable(arg->freeobj_trace);
- }
-
- return Qnil;
-}
-
-/*
- * call-seq: trace_object_allocations_stop
- *
- * Stop tracing object allocations.
- *
- * Note that if ::trace_object_allocations_start is called n-times, then
- * tracing will stop after calling ::trace_object_allocations_stop n-times.
- *
- */
-static VALUE
-trace_object_allocations_stop(VALUE self)
-{
- struct traceobj_arg *arg = get_traceobj_arg();
-
- if (arg->running > 0) {
- arg->running--;
- }
-
- if (arg->running == 0) {
- rb_tracepoint_disable(arg->newobj_trace);
- rb_tracepoint_disable(arg->freeobj_trace);
- arg->newobj_trace = 0;
- arg->freeobj_trace = 0;
- }
-
- return Qnil;
-}
-
-/*
- * call-seq: trace_object_allocations_clear
- *
- * Clear recorded tracing information.
- *
- */
-static VALUE
-trace_object_allocations_clear(VALUE self)
-{
- struct traceobj_arg *arg = get_traceobj_arg();
-
- /* clear tables */
- st_foreach(arg->object_table, free_values_i, 0);
- st_clear(arg->object_table);
- st_foreach(arg->str_table, free_keys_i, 0);
- st_clear(arg->str_table);
-
- /* do not touch TracePoints */
-
- return Qnil;
-}
-
-/*
- * call-seq: trace_object_allocations { block }
- *
- * Starts tracing object allocations from the ObjectSpace extension module.
- *
- * For example:
- *
- * require 'objspace'
- *
- * class C
- * include ObjectSpace
- *
- * def foo
- * trace_object_allocations do
- * obj = Object.new
- * p "#{allocation_sourcefile(obj)}:#{allocation_sourceline(obj)}"
- * end
- * end
- * end
- *
- * C.new.foo #=> "objtrace.rb:8"
- *
- * This example has included the ObjectSpace module to make it easier to read,
- * but you can also use the ::trace_object_allocations notation (recommended).
- *
- * Note that this feature introduces a huge performance decrease and huge
- * memory consumption.
- */
-static VALUE
-trace_object_allocations(VALUE self)
-{
- trace_object_allocations_start(self);
- return rb_ensure(rb_yield, Qnil, trace_object_allocations_stop, self);
-}
-
-int rb_bug_reporter_add(void (*func)(FILE *, void *), void *data);
-static int object_allocations_reporter_registered = 0;
-
-static int
-object_allocations_reporter_i(st_data_t key, st_data_t val, st_data_t ptr)
-{
- FILE *out = (FILE *)ptr;
- VALUE obj = (VALUE)key;
- struct allocation_info *info = (struct allocation_info *)val;
-
- fprintf(out, "-- %p (%s F: %p, ", (void *)obj, info->living ? "live" : "dead", (void *)info->flags);
- if (info->class_path) fprintf(out, "C: %s", info->class_path);
- else fprintf(out, "C: %p", (void *)info->klass);
- fprintf(out, "@%s:%lu", info->path ? info->path : "", info->line);
- if (!NIL_P(info->mid)) fprintf(out, " (%s)", rb_id2name(SYM2ID(info->mid)));
- fprintf(out, ")\n");
-
- return ST_CONTINUE;
-}
-
-static void
-object_allocations_reporter(FILE *out, void *ptr)
-{
- fprintf(out, "== object_allocations_reporter: START\n");
- if (tmp_trace_arg) {
- st_foreach(tmp_trace_arg->object_table, object_allocations_reporter_i, (st_data_t)out);
- }
- fprintf(out, "== object_allocations_reporter: END\n");
-}
-
-static VALUE
-trace_object_allocations_debug_start(VALUE self)
-{
- tmp_keep_remains = 1;
- if (object_allocations_reporter_registered == 0) {
- object_allocations_reporter_registered = 1;
- rb_bug_reporter_add(object_allocations_reporter, 0);
- }
-
- return trace_object_allocations_start(self);
-}
-
-static struct allocation_info *
-lookup_allocation_info(VALUE obj)
-{
- if (tmp_trace_arg) {
- struct allocation_info *info;
- if (st_lookup(tmp_trace_arg->object_table, obj, (st_data_t *)&info)) {
- return info;
- }
- }
- return NULL;
-}
-
-struct allocation_info *
-objspace_lookup_allocation_info(VALUE obj)
-{
- return lookup_allocation_info(obj);
-}
-
-/*
- * call-seq: allocation_sourcefile(object) -> string
- *
- * Returns the source file origin from the given +object+.
- *
- * See ::trace_object_allocations for more information and examples.
- */
-static VALUE
-allocation_sourcefile(VALUE self, VALUE obj)
-{
- struct allocation_info *info = lookup_allocation_info(obj);
-
- if (info && info->path) {
- return rb_str_new2(info->path);
- }
- else {
- return Qnil;
- }
-}
-
-/*
- * call-seq: allocation_sourceline(object) -> string
- *
- * Returns the original line from source for from the given +object+.
- *
- * See ::trace_object_allocations for more information and examples.
- */
-static VALUE
-allocation_sourceline(VALUE self, VALUE obj)
-{
- struct allocation_info *info = lookup_allocation_info(obj);
-
- if (info) {
- return INT2FIX(info->line);
- }
- else {
- return Qnil;
- }
-}
-
-/*
- * call-seq: allocation_class_path(object) -> string
- *
- * Returns the class for the given +object+.
- *
- * class A
- * def foo
- * ObjectSpace::trace_object_allocations do
- * obj = Object.new
- * p "#{ObjectSpace::allocation_class_path(obj)}"
- * end
- * end
- * end
- *
- * A.new.foo #=> "Class"
- *
- * See ::trace_object_allocations for more information and examples.
- */
-static VALUE
-allocation_class_path(VALUE self, VALUE obj)
-{
- struct allocation_info *info = lookup_allocation_info(obj);
-
- if (info && info->class_path) {
- return rb_str_new2(info->class_path);
- }
- else {
- return Qnil;
- }
-}
-
-/*
- * call-seq: allocation_method_id(object) -> string
- *
- * Returns the method identifier for the given +object+.
- *
- * class A
- * include ObjectSpace
- *
- * def foo
- * trace_object_allocations do
- * obj = Object.new
- * p "#{allocation_class_path(obj)}##{allocation_method_id(obj)}"
- * end
- * end
- * end
- *
- * A.new.foo #=> "Class#new"
- *
- * See ::trace_object_allocations for more information and examples.
- */
-static VALUE
-allocation_method_id(VALUE self, VALUE obj)
-{
- struct allocation_info *info = lookup_allocation_info(obj);
- if (info) {
- return info->mid;
- }
- else {
- return Qnil;
- }
-}
-
-/*
- * call-seq: allocation_generation(object) -> Fixnum
- *
- * Returns garbage collector generation for the given +object+.
- *
- * class B
- * include ObjectSpace
- *
- * def foo
- * trace_object_allocations do
- * obj = Object.new
- * p "Generation is #{allocation_generation(obj)}"
- * end
- * end
- * end
- *
- * B.new.foo #=> "Generation is 3"
- *
- * See ::trace_object_allocations for more information and examples.
- */
-static VALUE
-allocation_generation(VALUE self, VALUE obj)
-{
- struct allocation_info *info = lookup_allocation_info(obj);
- if (info) {
- return SIZET2NUM(info->generation);
- }
- else {
- return Qnil;
- }
-}
-
-void
-Init_object_tracing(VALUE rb_mObjSpace)
-{
-#if 0
- rb_mObjSpace = rb_define_module("ObjectSpace"); /* let rdoc know */
-#endif
-
- rb_define_module_function(rb_mObjSpace, "trace_object_allocations", trace_object_allocations, 0);
- rb_define_module_function(rb_mObjSpace, "trace_object_allocations_start", trace_object_allocations_start, 0);
- rb_define_module_function(rb_mObjSpace, "trace_object_allocations_stop", trace_object_allocations_stop, 0);
- rb_define_module_function(rb_mObjSpace, "trace_object_allocations_clear", trace_object_allocations_clear, 0);
-
- rb_define_module_function(rb_mObjSpace, "trace_object_allocations_debug_start", trace_object_allocations_debug_start, 0);
-
- rb_define_module_function(rb_mObjSpace, "allocation_sourcefile", allocation_sourcefile, 1);
- rb_define_module_function(rb_mObjSpace, "allocation_sourceline", allocation_sourceline, 1);
- rb_define_module_function(rb_mObjSpace, "allocation_class_path", allocation_class_path, 1);
- rb_define_module_function(rb_mObjSpace, "allocation_method_id", allocation_method_id, 1);
- rb_define_module_function(rb_mObjSpace, "allocation_generation", allocation_generation, 1);
-}
diff --git a/ext/objspace/objspace.c b/ext/objspace/objspace.c
index b1f1358c01..5d585d69a1 100644
--- a/ext/objspace/objspace.c
+++ b/ext/objspace/objspace.c
@@ -5,38 +5,173 @@
$Author$
created at: Wed Jun 17 07:39:17 2009
- NOTE: This extension library is only expected to exist with C Ruby.
+ NOTE: This extension library is not expected to exist except C Ruby.
All the files in this distribution are covered under the Ruby's
license (see the file COPYING).
**********************************************************************/
+/* objspace library extends ObjectSpace module and add several
+ * methods to get internal statistic information about
+ * object/memory management.
+ *
+ * Generally, you *SHOULD NOT*use this library if you do not know
+ * about the MRI implementation. Mainly, this library is for (memory)
+ * profiler developers and MRI developers who need to know how MRI
+ * memory usage.
+ *
+ */
+
#include <ruby/ruby.h>
#include <ruby/st.h>
#include <ruby/io.h>
#include <ruby/re.h>
#include "node.h"
#include "gc.h"
+#include "regint.h"
#include "internal.h"
+size_t rb_str_memsize(VALUE);
+size_t rb_ary_memsize(VALUE);
+size_t rb_io_memsize(const rb_io_t *);
+size_t rb_generic_ivar_memsize(VALUE);
+size_t rb_objspace_data_type_memsize(VALUE obj);
+
+static size_t
+memsize_of(VALUE obj)
+{
+ size_t size = 0;
+
+ if (SPECIAL_CONST_P(obj)) {
+ return 0;
+ }
+
+ if (FL_TEST(obj, FL_EXIVAR)) {
+ size += rb_generic_ivar_memsize(obj);
+ }
+
+ switch (BUILTIN_TYPE(obj)) {
+ case T_OBJECT:
+ if (!(RBASIC(obj)->flags & ROBJECT_EMBED) &&
+ ROBJECT(obj)->as.heap.ivptr) {
+ size += ROBJECT(obj)->as.heap.numiv * sizeof(VALUE);
+ }
+ break;
+ case T_MODULE:
+ case T_CLASS:
+ if (RCLASS_M_TBL(obj)) {
+ size += st_memsize(RCLASS_M_TBL(obj));
+ }
+ if (RCLASS_IV_TBL(obj)) {
+ size += st_memsize(RCLASS_IV_TBL(obj));
+ }
+ if (RCLASS_IV_INDEX_TBL(obj)) {
+ size += st_memsize(RCLASS_IV_INDEX_TBL(obj));
+ }
+ if (RCLASS(obj)->ptr->iv_tbl) {
+ size += st_memsize(RCLASS(obj)->ptr->iv_tbl);
+ }
+ if (RCLASS(obj)->ptr->const_tbl) {
+ size += st_memsize(RCLASS(obj)->ptr->const_tbl);
+ }
+ size += sizeof(rb_classext_t);
+ break;
+ case T_STRING:
+ size += rb_str_memsize(obj);
+ break;
+ case T_ARRAY:
+ size += rb_ary_memsize(obj);
+ break;
+ case T_HASH:
+ if (RHASH(obj)->ntbl) {
+ size += st_memsize(RHASH(obj)->ntbl);
+ }
+ break;
+ case T_REGEXP:
+ if (RREGEXP(obj)->ptr) {
+ size += onig_memsize(RREGEXP(obj)->ptr);
+ }
+ break;
+ case T_DATA:
+ size += rb_objspace_data_type_memsize(obj);
+ break;
+ case T_MATCH:
+ if (RMATCH(obj)->rmatch) {
+ struct rmatch *rm = RMATCH(obj)->rmatch;
+ size += onig_region_memsize(&rm->regs);
+ size += sizeof(struct rmatch_offset) * rm->char_offset_num_allocated;
+ size += sizeof(struct rmatch);
+ }
+ break;
+ case T_FILE:
+ if (RFILE(obj)->fptr) {
+ size += rb_io_memsize(RFILE(obj)->fptr);
+ }
+ break;
+ case T_RATIONAL:
+ case T_COMPLEX:
+ break;
+ case T_ICLASS:
+ /* iClass shares table with the module */
+ break;
+
+ case T_FLOAT:
+ break;
+
+ case T_BIGNUM:
+ if (!(RBASIC(obj)->flags & RBIGNUM_EMBED_FLAG) && RBIGNUM_DIGITS(obj)) {
+ size += RBIGNUM_LEN(obj) * sizeof(BDIGIT);
+ }
+ break;
+ case T_NODE:
+ switch (nd_type(obj)) {
+ case NODE_SCOPE:
+ if (RNODE(obj)->u1.tbl) {
+ /* TODO: xfree(RANY(obj)->as.node.u1.tbl); */
+ }
+ break;
+ case NODE_ALLOCA:
+ /* TODO: xfree(RANY(obj)->as.node.u1.node); */
+ ;
+ }
+ break; /* no need to free iv_tbl */
+
+ case T_STRUCT:
+ if ((RBASIC(obj)->flags & RSTRUCT_EMBED_LEN_MASK) == 0 &&
+ RSTRUCT(obj)->as.heap.ptr) {
+ size += sizeof(VALUE) * RSTRUCT_LEN(obj);
+ }
+ break;
+
+ case T_ZOMBIE:
+ break;
+
+ default:
+ rb_bug("objspace/memsize_of(): unknown data type 0x%x(%p)",
+ BUILTIN_TYPE(obj), (void*)obj);
+ }
+
+ return size;
+}
+
/*
* call-seq:
* ObjectSpace.memsize_of(obj) -> Integer
*
* Return consuming memory size of obj.
*
- * Note that the return size is incomplete. You need to deal with this
- * information as only a *HINT*. Especially, the size of +T_DATA+ may not be
- * correct.
+ * Note that the return size is incomplete. You need to deal with
+ * this information as only a *HINT*. Especially, the size of
+ * T_DATA may not be correct.
*
- * This method is only expected to work with C Ruby.
+ * This method is not expected to work except C Ruby.
*/
static VALUE
memsize_of_m(VALUE self, VALUE obj)
{
- return SIZET2NUM(rb_obj_memsize_of(obj));
+ return SIZET2NUM(memsize_of(obj));
}
struct total_data {
@@ -63,7 +198,7 @@ total_i(void *vstart, void *vend, size_t stride, void *ptr)
continue;
default:
if (data->klass == 0 || rb_obj_is_kind_of(v, data->klass)) {
- data->total += rb_obj_memsize_of(v);
+ data->total += memsize_of(v);
}
}
}
@@ -77,27 +212,26 @@ total_i(void *vstart, void *vend, size_t stride, void *ptr)
* ObjectSpace.memsize_of_all([klass]) -> Integer
*
* Return consuming memory size of all living objects.
+ * If klass (should be Class object) is given, return the total
+ * memory size of instances of the given class.
*
- * If +klass+ (should be Class object) is given, return the total memory size
- * of instances of the given class.
- *
- * Note that the returned size is incomplete. You need to deal with this
- * information as only a *HINT*. Especially, the size of +T_DATA+ may not be
- * correct.
+ * Note that the returned size is incomplete. You need to deal with
+ * this information as only a *HINT*. Especially, the size of
+ * T_DATA may not be correct.
*
* Note that this method does *NOT* return total malloc'ed memory size.
*
* This method can be defined by the following Ruby code:
*
- * def memsize_of_all klass = false
- * total = 0
- * ObjectSpace.each_object{|e|
- * total += ObjectSpace.memsize_of(e) if klass == false || e.kind_of?(klass)
- * }
- * total
- * end
+ * def memsize_of_all klass = false
+ * total = 0
+ * ObjectSpace.each_objects{|e|
+ * total += ObjectSpace.memsize_of(e) if klass == false || e.kind_of?(klass)
+ * }
+ * total
+ * end
*
- * This method is only expected to work with C Ruby.
+ * This method is not expected to work except C Ruby.
*/
static VALUE
@@ -130,7 +264,7 @@ cos_i(void *vstart, void *vend, size_t stride, void *data)
for (;v != (VALUE)vend; v += stride) {
if (RBASIC(v)->flags) {
- counts[BUILTIN_TYPE(v)] += rb_obj_memsize_of(v);
+ counts[BUILTIN_TYPE(v)] += memsize_of(v);
}
}
return 0;
@@ -193,7 +327,7 @@ type2sym(enum ruby_value_type i)
* The contents of the returned hash is implementation defined.
* It may be changed in future.
*
- * This method is only expected to work with C Ruby.
+ * This method is not expected to work except C Ruby.
*/
static VALUE
@@ -255,21 +389,20 @@ cn_i(void *vstart, void *vend, size_t stride, void *n)
*
* Counts nodes for each node type.
*
- * This method is only for MRI developers interested in performance and memory
- * usage of Ruby programs.
+ * This method is not for ordinary Ruby programmers, but for MRI developers
+ * who have interest in MRI performance and memory usage.
*
* It returns a hash as:
+ * {:NODE_METHOD=>2027, :NODE_FBODY=>1927, :NODE_CFUNC=>1798, ...}
*
- * {:NODE_METHOD=>2027, :NODE_FBODY=>1927, :NODE_CFUNC=>1798, ...}
- *
- * If the optional argument, result_hash, is given, it is overwritten and
- * returned. This is intended to avoid probe effect.
+ * If the optional argument, result_hash, is given,
+ * it is overwritten and returned.
+ * This is intended to avoid probe effect.
*
- * Note:
* The contents of the returned hash is implementation defined.
* It may be changed in future.
*
- * This method is only expected to work with C Ruby.
+ * This method is not expected to work except C Ruby.
*/
static VALUE
@@ -336,7 +469,6 @@ count_nodes(int argc, VALUE *argv, VALUE os)
COUNT_NODE(NODE_OP_ASGN2);
COUNT_NODE(NODE_OP_ASGN_AND);
COUNT_NODE(NODE_OP_ASGN_OR);
- COUNT_NODE(NODE_OP_CDECL);
COUNT_NODE(NODE_CALL);
COUNT_NODE(NODE_FCALL);
COUNT_NODE(NODE_VCALL);
@@ -370,7 +502,6 @@ count_nodes(int argc, VALUE *argv, VALUE os)
COUNT_NODE(NODE_ARGS);
COUNT_NODE(NODE_ARGS_AUX);
COUNT_NODE(NODE_OPT_ARG);
- COUNT_NODE(NODE_KW_ARG);
COUNT_NODE(NODE_POSTARG);
COUNT_NODE(NODE_ARGSCAT);
COUNT_NODE(NODE_ARGSPUSH);
@@ -388,7 +519,6 @@ count_nodes(int argc, VALUE *argv, VALUE os)
COUNT_NODE(NODE_SCLASS);
COUNT_NODE(NODE_COLON2);
COUNT_NODE(NODE_COLON3);
- COUNT_NODE(NODE_CREF);
COUNT_NODE(NODE_DOT2);
COUNT_NODE(NODE_DOT3);
COUNT_NODE(NODE_FLIP2);
@@ -409,7 +539,7 @@ count_nodes(int argc, VALUE *argv, VALUE os)
COUNT_NODE(NODE_PRELUDE);
COUNT_NODE(NODE_LAMBDA);
#undef COUNT_NODE
- default: node = INT2FIX(i);
+ default: node = INT2FIX(nodes[i]);
}
rb_hash_aset(hash, node, SIZET2NUM(nodes[i]));
}
@@ -453,32 +583,32 @@ cto_i(void *vstart, void *vend, size_t stride, void *data)
* call-seq:
* ObjectSpace.count_tdata_objects([result_hash]) -> hash
*
- * Counts objects for each +T_DATA+ type.
+ * Counts objects for each T_DATA type.
*
- * This method is only for MRI developers interested in performance and memory
- * usage of Ruby programs.
+ * This method is not for ordinary Ruby programmers, but for MRI developers
+ * who interest on MRI performance.
*
* It returns a hash as:
+ * {RubyVM::InstructionSequence=>504, :parser=>5, :barrier=>6,
+ * :mutex=>6, Proc=>60, RubyVM::Env=>57, Mutex=>1, Encoding=>99,
+ * ThreadGroup=>1, Binding=>1, Thread=>1, RubyVM=>1, :iseq=>1,
+ * Random=>1, ARGF.class=>1, Data=>1, :autoload=>3, Time=>2}
+ * # T_DATA objects existing at startup on r32276.
*
- * {RubyVM::InstructionSequence=>504, :parser=>5, :barrier=>6,
- * :mutex=>6, Proc=>60, RubyVM::Env=>57, Mutex=>1, Encoding=>99,
- * ThreadGroup=>1, Binding=>1, Thread=>1, RubyVM=>1, :iseq=>1,
- * Random=>1, ARGF.class=>1, Data=>1, :autoload=>3, Time=>2}
- * # T_DATA objects existing at startup on r32276.
- *
- * If the optional argument, result_hash, is given, it is overwritten and
- * returned. This is intended to avoid probe effect.
+ * If the optional argument, result_hash, is given,
+ * it is overwritten and returned.
+ * This is intended to avoid probe effect.
*
- * The contents of the returned hash is implementation specific and may change
- * in the future.
+ * The contents of the returned hash is implementation defined.
+ * It may be changed in future.
*
* In this version, keys are Class object or Symbol object.
- *
* If object is kind of normal (accessible) object, the key is Class object.
* If object is not a kind of normal (internal) object, the key is symbol
* name, registered by rb_data_type_struct.
*
- * This method is only expected to work with C Ruby.
+ * This method is not expected to work except C Ruby.
+ *
*/
static VALUE
@@ -513,13 +643,12 @@ static size_t
iow_size(const void *ptr)
{
VALUE obj = (VALUE)ptr;
- return rb_obj_memsize_of(obj);
+ return memsize_of(obj);
}
static const rb_data_type_t iow_data_type = {
"ObjectSpace::InternalObjectWrapper",
{iow_mark, 0, iow_size,},
- NULL, NULL, RUBY_TYPED_FREE_IMMEDIATELY
};
static VALUE rb_mInternalObjectWrapper;
@@ -530,7 +659,6 @@ iow_newobj(VALUE obj)
return rb_data_typed_object_alloc(rb_mInternalObjectWrapper, (void *)obj, &iow_data_type);
}
-/* Returns the type of the internal object. */
static VALUE
iow_type(VALUE self)
{
@@ -538,7 +666,6 @@ iow_type(VALUE self)
return type2sym(BUILTIN_TYPE(obj));
}
-/* See Object#inspect. */
static VALUE
iow_inspect(VALUE self)
{
@@ -548,7 +675,6 @@ iow_inspect(VALUE self)
return rb_sprintf("#<InternalObject:%p %s>", (void *)obj, rb_id2name(SYM2ID(type)));
}
-/* Returns the Object#object_id of the internal object. */
static VALUE
iow_internal_object_id(VALUE self)
{
@@ -592,25 +718,24 @@ collect_values(st_data_t key, st_data_t value, st_data_t data)
* [MRI specific feature] Return all reachable objects from `obj'.
*
* This method returns all reachable objects from `obj'.
+ * If `obj' has references two or more references to same object `x',
+ * them returned array only include one `x' object.
+ * If `obj' is non-markable (non-heap management) object such as
+ * true, false, nil, symbols and Fixnums (and Flonum) them it simply
+ * returns nil.
*
- * If `obj' has two or more references to the same object `x', then returned
- * array only includes one `x' object.
- *
- * If `obj' is a non-markable (non-heap management) object such as true,
- * false, nil, symbols and Fixnums (and Flonum) then it simply returns nil.
+ * If `obj' has references to internal object, then it returns
+ * instances of `ObjectSpace::InternalObjectWrapper' class.
+ * This object contains a reference to an internal object and
+ * you can check the type of internal object with `type' method.
*
- * If `obj' has references to an internal object, then it returns instances of
- * ObjectSpace::InternalObjectWrapper class. This object contains a reference
- * to an internal object and you can check the type of internal object with
- * `type' method.
- *
- * If `obj' is instance of ObjectSpace::InternalObjectWrapper class, then this
- * method returns all reachable object from an internal object, which is
- * pointed by `obj'.
+ * If `obj' is instance of `ObjectSpace::InternalObjectWrapper'
+ * class, then this method retuns all reachalbe object from
+ * an interna object, which is pointed by `obj'.
*
* With this method, you can find memory leaks.
*
- * This method is only expected to work except with C Ruby.
+ * This method is not expected to work except C Ruby.
*
* Example:
* ObjectSpace.reachable_objects_from(['a', 'b', 'c'])
@@ -651,100 +776,20 @@ reachable_objects_from(VALUE self, VALUE obj)
}
}
-struct rofr_data {
- VALUE categories;
- const char *last_category;
- VALUE last_category_str;
- VALUE last_category_objects;
-};
-
-static void
-reachable_object_from_root_i(const char *category, VALUE obj, void *ptr)
-{
- struct rofr_data *data = (struct rofr_data *)ptr;
- VALUE category_str;
- VALUE category_objects;
-
- if (category == data->last_category) {
- category_str = data->last_category_str;
- category_objects = data->last_category_objects;
- }
- else {
- data->last_category = category;
- category_str = data->last_category_str = rb_str_new2(category);
- category_objects = data->last_category_objects = rb_hash_new();
- rb_funcall(category_objects, rb_intern("compare_by_identity"), 0);
- if (!NIL_P(rb_hash_lookup(data->categories, category_str))) {
- rb_bug("reachable_object_from_root_i: category should insert at once");
- }
- rb_hash_aset(data->categories, category_str, category_objects);
- }
-
- if (rb_objspace_markable_object_p(obj) &&
- obj != data->categories &&
- obj != data->last_category_objects) {
- if (rb_objspace_internal_object_p(obj)) {
- obj = iow_newobj(obj);
- }
- rb_hash_aset(category_objects, obj, obj);
- }
-}
-
-static int
-collect_values_of_values(VALUE category, VALUE category_objects, VALUE categories)
-{
- VALUE ary = rb_ary_new();
- st_foreach(rb_hash_tbl(category_objects), collect_values, ary);
- rb_hash_aset(categories, category, ary);
- return ST_CONTINUE;
-}
-
-/*
- * call-seq:
- * ObjectSpace.reachable_objects_from_root -> hash
- *
- * [MRI specific feature] Return all reachable objects from root.
- */
-static VALUE
-reachable_objects_from_root(VALUE self)
-{
- struct rofr_data data;
- VALUE hash = data.categories = rb_hash_new();
- data.last_category = 0;
-
- rb_funcall(hash, rb_intern("compare_by_identity"), 0);
- rb_objspace_reachable_objects_from_root(reachable_object_from_root_i, &data);
- rb_hash_foreach(hash, collect_values_of_values, hash);
-
- return hash;
-}
-
-void Init_object_tracing(VALUE rb_mObjSpace);
-void Init_objspace_dump(VALUE rb_mObjSpace);
-
-/*
- * Document-module: ObjectSpace
- *
- * The objspace library extends the ObjectSpace module and adds several
+/* objspace library extends ObjectSpace module and add several
* methods to get internal statistic information about
* object/memory management.
*
- * You need to <code>require 'objspace'</code> to use this extension module.
- *
- * Generally, you *SHOULD NOT* use this library if you do not know
+ * Generally, you *SHOULD NOT*use this library if you do not know
* about the MRI implementation. Mainly, this library is for (memory)
- * profiler developers and MRI developers who need to know about MRI
+ * profiler developers and MRI developers who need to know how MRI
* memory usage.
*/
void
Init_objspace(void)
{
- VALUE rb_mObjSpace;
-#if 0
- rb_mObjSpace = rb_define_module("ObjectSpace"); /* let rdoc know */
-#endif
- rb_mObjSpace = rb_const_get(rb_cObject, rb_intern("ObjectSpace"));
+ VALUE rb_mObjSpace = rb_const_get(rb_cObject, rb_intern("ObjectSpace"));
rb_define_module_function(rb_mObjSpace, "memsize_of", memsize_of_m, 1);
rb_define_module_function(rb_mObjSpace, "memsize_of_all", memsize_of_all_m, -1);
@@ -754,22 +799,9 @@ Init_objspace(void)
rb_define_module_function(rb_mObjSpace, "count_tdata_objects", count_tdata_objects, -1);
rb_define_module_function(rb_mObjSpace, "reachable_objects_from", reachable_objects_from, 1);
- rb_define_module_function(rb_mObjSpace, "reachable_objects_from_root", reachable_objects_from_root, 0);
-
- /*
- * This class is used as a return value from
- * ObjectSpace::reachable_objects_from.
- *
- * When ObjectSpace::reachable_objects_from returns an object with
- * references to an internal object, an instance of this class is returned.
- *
- * You can use the #type method to check the type of the internal object.
- */
+
rb_mInternalObjectWrapper = rb_define_class_under(rb_mObjSpace, "InternalObjectWrapper", rb_cObject);
rb_define_method(rb_mInternalObjectWrapper, "type", iow_type, 0);
rb_define_method(rb_mInternalObjectWrapper, "inspect", iow_inspect, 0);
rb_define_method(rb_mInternalObjectWrapper, "internal_object_id", iow_internal_object_id, 0);
-
- Init_object_tracing(rb_mObjSpace);
- Init_objspace_dump(rb_mObjSpace);
}
diff --git a/ext/objspace/objspace.h b/ext/objspace/objspace.h
deleted file mode 100644
index 95b84d6c1e..0000000000
--- a/ext/objspace/objspace.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef OBJSPACE_H
-#define OBJSPACE_H 1
-
-/* object_tracing.c */
-struct allocation_info {
- /* all of information don't need marking. */
- int living;
- VALUE flags;
- VALUE klass;
-
- /* allocation info */
- const char *path;
- unsigned long line;
- const char *class_path;
- VALUE mid;
- size_t generation;
-};
-struct allocation_info *objspace_lookup_allocation_info(VALUE obj);
-
-#endif
diff --git a/ext/objspace/objspace_dump.c b/ext/objspace/objspace_dump.c
deleted file mode 100644
index 9a694d33aa..0000000000
--- a/ext/objspace/objspace_dump.c
+++ /dev/null
@@ -1,431 +0,0 @@
-/**********************************************************************
-
- objspace_dump.c - Heap dumping ObjectSpace extender for MRI.
-
- $Author$
- created at: Sat Oct 11 10:11:00 2013
-
- NOTE: This extension library is not expected to exist except C Ruby.
-
- All the files in this distribution are covered under the Ruby's
- license (see the file COPYING).
-
-**********************************************************************/
-
-#include "ruby/ruby.h"
-#include "ruby/debug.h"
-#include "ruby/encoding.h"
-#include "ruby/io.h"
-#include "gc.h"
-#include "node.h"
-#include "vm_core.h"
-#include "objspace.h"
-#include "internal.h"
-
-static VALUE sym_output, sym_stdout, sym_string, sym_file;
-
-struct dump_config {
- VALUE type;
- FILE *stream;
- VALUE string;
- int roots;
- const char *root_category;
- VALUE cur_obj;
- VALUE cur_obj_klass;
- size_t cur_obj_references;
-};
-
-static void
-dump_append(struct dump_config *dc, const char *format, ...)
-{
- va_list vl;
- va_start(vl, format);
-
- if (dc->stream) {
- vfprintf(dc->stream, format, vl);
- fflush(dc->stream);
- }
- else if (dc->string)
- rb_str_vcatf(dc->string, format, vl);
-
- va_end(vl);
-}
-
-static void
-dump_append_string_value(struct dump_config *dc, VALUE obj)
-{
- int i;
- char c, *value;
-
- dump_append(dc, "\"");
- for (i = 0, value = RSTRING_PTR(obj); i < RSTRING_LEN(obj); i++) {
- switch ((c = value[i])) {
- case '\\':
- case '"':
- dump_append(dc, "\\%c", c);
- break;
- case '\0':
- dump_append(dc, "\\u0000");
- break;
- case '\b':
- dump_append(dc, "\\b");
- break;
- case '\t':
- dump_append(dc, "\\t");
- break;
- case '\f':
- dump_append(dc, "\\f");
- break;
- case '\n':
- dump_append(dc, "\\n");
- break;
- case '\r':
- dump_append(dc, "\\r");
- break;
- default:
- if (c <= 0x1f)
- dump_append(dc, "\\u%04d", c);
- else
- dump_append(dc, "%c", c);
- }
- }
- dump_append(dc, "\"");
-}
-
-static inline const char *
-obj_type(VALUE obj)
-{
- switch (BUILTIN_TYPE(obj)) {
-#define CASE_TYPE(type) case T_##type: return #type; break
- CASE_TYPE(NONE);
- CASE_TYPE(NIL);
- CASE_TYPE(OBJECT);
- CASE_TYPE(CLASS);
- CASE_TYPE(ICLASS);
- CASE_TYPE(MODULE);
- CASE_TYPE(FLOAT);
- CASE_TYPE(STRING);
- CASE_TYPE(REGEXP);
- CASE_TYPE(ARRAY);
- CASE_TYPE(HASH);
- CASE_TYPE(STRUCT);
- CASE_TYPE(BIGNUM);
- CASE_TYPE(FILE);
- CASE_TYPE(FIXNUM);
- CASE_TYPE(TRUE);
- CASE_TYPE(FALSE);
- CASE_TYPE(DATA);
- CASE_TYPE(MATCH);
- CASE_TYPE(SYMBOL);
- CASE_TYPE(RATIONAL);
- CASE_TYPE(COMPLEX);
- CASE_TYPE(UNDEF);
- CASE_TYPE(NODE);
- CASE_TYPE(ZOMBIE);
-#undef CASE_TYPE
- }
- return "UNKNOWN";
-}
-
-static void
-reachable_object_i(VALUE ref, void *data)
-{
- struct dump_config *dc = (struct dump_config *)data;
-
- if (dc->cur_obj_klass == ref)
- return;
-
- if (dc->cur_obj_references == 0)
- dump_append(dc, ", \"references\":[\"%p\"", (void *)ref);
- else
- dump_append(dc, ", \"%p\"", (void *)ref);
-
- dc->cur_obj_references++;
-}
-
-static void
-dump_object(VALUE obj, struct dump_config *dc)
-{
- size_t memsize;
- struct allocation_info *ainfo;
- rb_io_t *fptr;
- ID flags[RB_OBJ_GC_FLAGS_MAX];
- size_t n, i;
-
- dc->cur_obj = obj;
- dc->cur_obj_references = 0;
- dc->cur_obj_klass = BUILTIN_TYPE(obj) == T_NODE ? 0 : RBASIC_CLASS(obj);
-
- if (dc->cur_obj == dc->string)
- return;
-
- dump_append(dc, "{\"address\":\"%p\", \"type\":\"%s\"", (void *)obj, obj_type(obj));
-
- if (dc->cur_obj_klass)
- dump_append(dc, ", \"class\":\"%p\"", (void *)dc->cur_obj_klass);
- if (rb_obj_frozen_p(obj))
- dump_append(dc, ", \"frozen\":true");
-
- switch (BUILTIN_TYPE(obj)) {
- case T_NODE:
- dump_append(dc, ", \"node_type\":\"%s\"", ruby_node_name(nd_type(obj)));
- break;
-
- case T_STRING:
- if (STR_EMBED_P(obj))
- dump_append(dc, ", \"embedded\":true");
- if (STR_ASSOC_P(obj))
- dump_append(dc, ", \"associated\":true");
- if (is_broken_string(obj))
- dump_append(dc, ", \"broken\":true");
- if (FL_TEST(obj, RSTRING_FSTR))
- dump_append(dc, ", \"fstring\":true");
- if (STR_SHARED_P(obj))
- dump_append(dc, ", \"shared\":true");
- else {
- dump_append(dc, ", \"bytesize\":%ld", RSTRING_LEN(obj));
- if (!STR_EMBED_P(obj) && !STR_NOCAPA_P(obj) && (long)rb_str_capacity(obj) != RSTRING_LEN(obj))
- dump_append(dc, ", \"capacity\":%ld", rb_str_capacity(obj));
-
- if (is_ascii_string(obj)) {
- dump_append(dc, ", \"value\":");
- dump_append_string_value(dc, obj);
- }
- }
-
- if (!ENCODING_IS_ASCII8BIT(obj))
- dump_append(dc, ", \"encoding\":\"%s\"", rb_enc_name(rb_enc_from_index(ENCODING_GET(obj))));
- break;
-
- case T_HASH:
- dump_append(dc, ", \"size\":%ld", RHASH_SIZE(obj));
- if (FL_TEST(obj, HASH_PROC_DEFAULT))
- dump_append(dc, ", \"default\":\"%p\"", (void *)RHASH_IFNONE(obj));
- break;
-
- case T_ARRAY:
- dump_append(dc, ", \"length\":%ld", RARRAY_LEN(obj));
- if (RARRAY_LEN(obj) > 0 && FL_TEST(obj, ELTS_SHARED))
- dump_append(dc, ", \"shared\":true");
- if (RARRAY_LEN(obj) > 0 && FL_TEST(obj, RARRAY_EMBED_FLAG))
- dump_append(dc, ", \"embedded\":true");
- break;
-
- case T_CLASS:
- case T_MODULE:
- if (dc->cur_obj_klass)
- dump_append(dc, ", \"name\":\"%s\"", rb_class2name(obj));
- break;
-
- case T_DATA:
- if (RTYPEDDATA_P(obj))
- dump_append(dc, ", \"struct\":\"%s\"", RTYPEDDATA_TYPE(obj)->wrap_struct_name);
- break;
-
- case T_FLOAT:
- dump_append(dc, ", \"value\":\"%g\"", RFLOAT_VALUE(obj));
- break;
-
- case T_OBJECT:
- dump_append(dc, ", \"ivars\":%ld", ROBJECT_NUMIV(obj));
- break;
-
- case T_FILE:
- fptr = RFILE(obj)->fptr;
- dump_append(dc, ", \"fd\":%d", fptr->fd);
- break;
-
- case T_ZOMBIE:
- dump_append(dc, "}\n");
- return;
- }
-
- rb_objspace_reachable_objects_from(obj, reachable_object_i, dc);
- if (dc->cur_obj_references > 0)
- dump_append(dc, "]");
-
- if ((ainfo = objspace_lookup_allocation_info(obj))) {
- dump_append(dc, ", \"file\":\"%s\", \"line\":%lu", ainfo->path, ainfo->line);
- if (RTEST(ainfo->mid))
- dump_append(dc, ", \"method\":\"%s\"", rb_id2name(SYM2ID(ainfo->mid)));
- dump_append(dc, ", \"generation\":%"PRIuSIZE, ainfo->generation);
- }
-
- if ((memsize = rb_obj_memsize_of(obj)) > 0)
- dump_append(dc, ", \"memsize\":%"PRIuSIZE, memsize);
-
- if ((n = rb_obj_gc_flags(obj, flags, sizeof(flags))) > 0) {
- dump_append(dc, ", \"flags\":{");
- for (i=0; i<n; i++) {
- dump_append(dc, "\"%s\":true", rb_id2name(flags[i]));
- if (i != n-1) dump_append(dc, ", ");
- }
- dump_append(dc, "}");
- }
-
- dump_append(dc, "}\n");
-}
-
-static int
-heap_i(void *vstart, void *vend, size_t stride, void *data)
-{
- VALUE v = (VALUE)vstart;
- for (; v != (VALUE)vend; v += stride) {
- if (RBASIC(v)->flags)
- dump_object(v, data);
- }
- return 0;
-}
-
-static void
-root_obj_i(const char *category, VALUE obj, void *data)
-{
- struct dump_config *dc = (struct dump_config *)data;
-
- if (dc->root_category != NULL && category != dc->root_category)
- dump_append(dc, "]}\n");
- if (dc->root_category == NULL || category != dc->root_category)
- dump_append(dc, "{\"type\":\"ROOT\", \"root\":\"%s\", \"references\":[\"%p\"", category, (void *)obj);
- else
- dump_append(dc, ", \"%p\"", (void *)obj);
-
- dc->root_category = category;
- dc->roots++;
-}
-
-static VALUE
-dump_output(struct dump_config *dc, VALUE opts, VALUE output, const char *filename)
-{
- VALUE tmp;
-
- if (RTEST(opts))
- output = rb_hash_aref(opts, sym_output);
-
- if (output == sym_stdout) {
- dc->stream = stdout;
- dc->string = Qnil;
- }
- else if (output == sym_file) {
- rb_io_t *fptr;
- rb_require("tempfile");
- tmp = rb_assoc_new(rb_str_new_cstr(filename), rb_str_new_cstr(".json"));
- tmp = rb_funcallv(rb_path2class("Tempfile"), rb_intern("create"), 1, &tmp);
- io:
- dc->string = rb_io_get_write_io(tmp);
- rb_io_flush(dc->string);
- GetOpenFile(dc->string, fptr);
- dc->stream = rb_io_stdio_file(fptr);
- }
- else if (output == sym_string) {
- dc->string = rb_str_new_cstr("");
- }
- else if (!NIL_P(tmp = rb_io_check_io(output))) {
- output = sym_file;
- goto io;
- }
- else {
- rb_raise(rb_eArgError, "wrong output option: %"PRIsVALUE, output);
- }
- return output;
-}
-
-static VALUE
-dump_result(struct dump_config *dc, VALUE output)
-{
- if (output == sym_string) {
- return dc->string;
- }
- else if (output == sym_file) {
- rb_io_flush(dc->string);
- return dc->string;
- }
- else {
- return Qnil;
- }
-}
-
-/*
- * call-seq:
- * ObjectSpace.dump(obj[, output: :string]) # => "{ ... }"
- * ObjectSpace.dump(obj, output: :file) # => #<File:/tmp/rubyobj20131125-88733-1xkfmpv.json>
- * ObjectSpace.dump(obj, output: :stdout) # => nil
- *
- * Dump the contents of a ruby object as JSON.
- *
- * This method is only expected to work with C Ruby.
- * This is an experimental method and is subject to change.
- * In particular, the function signature and output format are
- * not guaranteed to be compatible in future versions of ruby.
- */
-
-static VALUE
-objspace_dump(int argc, VALUE *argv, VALUE os)
-{
- static const char filename[] = "rubyobj";
- VALUE obj = Qnil, opts = Qnil, output;
- struct dump_config dc = {0,};
-
- rb_scan_args(argc, argv, "1:", &obj, &opts);
-
- output = dump_output(&dc, opts, sym_string, filename);
-
- dump_object(obj, &dc);
-
- return dump_result(&dc, output);
-}
-
-/*
- * call-seq:
- * ObjectSpace.dump_all([output: :file]) # => #<File:/tmp/rubyheap20131125-88469-laoj3v.json>
- * ObjectSpace.dump_all(output: :stdout) # => nil
- * ObjectSpace.dump_all(output: :string) # => "{...}\n{...}\n..."
- * ObjectSpace.dump_all(output:
- * File.open('heap.json','w')) # => #<File:heap.json>
- *
- * Dump the contents of the ruby heap as JSON.
- *
- * This method is only expected to work with C Ruby.
- * This is an experimental method and is subject to change.
- * In particular, the function signature and output format are
- * not guaranteed to be compatible in future versions of ruby.
- */
-
-static VALUE
-objspace_dump_all(int argc, VALUE *argv, VALUE os)
-{
- static const char filename[] = "rubyheap";
- VALUE opts = Qnil, output;
- struct dump_config dc = {0,};
-
- rb_scan_args(argc, argv, "0:", &opts);
-
- output = dump_output(&dc, opts, sym_file, filename);
-
- /* dump roots */
- rb_objspace_reachable_objects_from_root(root_obj_i, &dc);
- if (dc.roots) dump_append(&dc, "]}\n");
-
- /* dump all objects */
- rb_objspace_each_objects(heap_i, &dc);
-
- return dump_result(&dc, output);
-}
-
-void
-Init_objspace_dump(VALUE rb_mObjSpace)
-{
-#if 0
- rb_mObjSpace = rb_define_module("ObjectSpace"); /* let rdoc know */
-#endif
-
- rb_define_module_function(rb_mObjSpace, "dump", objspace_dump, -1);
- rb_define_module_function(rb_mObjSpace, "dump_all", objspace_dump_all, -1);
-
- sym_output = ID2SYM(rb_intern("output"));
- sym_stdout = ID2SYM(rb_intern("stdout"));
- sym_string = ID2SYM(rb_intern("string"));
- sym_file = ID2SYM(rb_intern("file"));
-
- /* force create static IDs */
- rb_obj_gc_flags(rb_mObjSpace, 0, 0);
-}
diff --git a/ext/openssl/depend b/ext/openssl/depend
deleted file mode 100644
index 7991159f2e..0000000000
--- a/ext/openssl/depend
+++ /dev/null
@@ -1,6 +0,0 @@
-$(OBJS): $(HDRS) $(ruby_headers) \
- $(hdrdir)/ruby/io.h \
- $(hdrdir)/ruby/encoding.h \
- $(hdrdir)/ruby/oniguruma.h \
- $(hdrdir)/ruby/thread.h
-ossl.o: $(top_srcdir)/thread_native.h $(top_srcdir)/thread_$(THREAD_MODEL).h
diff --git a/ext/openssl/extconf.rb b/ext/openssl/extconf.rb
index e272cba092..848e1f2bdc 100644
--- a/ext/openssl/extconf.rb
+++ b/ext/openssl/extconf.rb
@@ -144,7 +144,6 @@ if checking_for('OpenSSL version is 0.9.7 or later') {
}
have_header("openssl/ocsp.h")
end
-have_struct_member("CRYPTO_THREADID", "ptr", "openssl/crypto.h")
have_struct_member("EVP_CIPHER_CTX", "flags", "openssl/evp.h")
have_struct_member("EVP_CIPHER_CTX", "engine", "openssl/evp.h")
have_struct_member("X509_ATTRIBUTE", "single", "openssl/x509.h")
@@ -154,7 +153,5 @@ have_macro("EVP_CTRL_GCM_GET_TAG", ['openssl/evp.h']) && $defs.push("-DHAVE_AUTH
Logging::message "=== Checking done. ===\n"
create_header
-create_makefile("openssl") {|conf|
- conf << "THREAD_MODEL = #{CONFIG["THREAD_MODEL"]}\n"
-}
+create_makefile("openssl")
Logging::message "Done.\n"
diff --git a/ext/openssl/lib/openssl/bn.rb b/ext/openssl/lib/openssl/bn.rb
index 0e19c20d34..180de18db1 100644
--- a/ext/openssl/lib/openssl/bn.rb
+++ b/ext/openssl/lib/openssl/bn.rb
@@ -28,11 +28,8 @@ end # OpenSSL
# Add double dispatch to Integer
#
class Integer
- # Casts an Integer as an OpenSSL::BN
- #
- # See `man bn` for more info.
def to_bn
- OpenSSL::BN::new(self)
+ OpenSSL::BN::new(self.to_s(16), 16)
end
end # Integer
diff --git a/ext/openssl/lib/openssl/buffering.rb b/ext/openssl/lib/openssl/buffering.rb
index 1223c5de15..51bc968e3a 100644
--- a/ext/openssl/lib/openssl/buffering.rb
+++ b/ext/openssl/lib/openssl/buffering.rb
@@ -1,27 +1,23 @@
-# coding: binary
-#--
-#= $RCSfile$ -- Buffering mix-in module.
-#
-#= Info
-# 'OpenSSL for Ruby 2' project
-# Copyright (C) 2001 GOTOU YUUZOU <gotoyuzo@notwork.org>
-# All rights reserved.
-#
-#= Licence
-# This program is licenced under the same licence as Ruby.
-# (See the file 'LICENCE'.)
-#
-#= Version
-# $Id$
-#++
+=begin
+= $RCSfile$ -- Buffering mix-in module.
+
+= Info
+ 'OpenSSL for Ruby 2' project
+ Copyright (C) 2001 GOTOU YUUZOU <gotoyuzo@notwork.org>
+ All rights reserved.
+
+= Licence
+ This program is licenced under the same licence as Ruby.
+ (See the file 'LICENCE'.)
+
+= Version
+ $Id$
+=end
##
# OpenSSL IO buffering mix-in module.
#
# This module allows an OpenSSL::SSL::SSLSocket to behave like an IO.
-#
-# You typically won't use this module directly, you can see it implemented in
-# OpenSSL::SSL::SSLSocket.
module OpenSSL::Buffering
include Enumerable
@@ -38,11 +34,7 @@ module OpenSSL::Buffering
BLOCK_SIZE = 1024*16
- ##
- # Creates an instance of OpenSSL's buffering IO module.
-
- def initialize(*)
- super
+ def initialize(*args)
@eof = false
@rbuffer = ""
@sync = @io.sync
@@ -169,7 +161,7 @@ module OpenSSL::Buffering
# when the peer requests a new TLS/SSL handshake. See openssl the FAQ for
# more details. http://www.openssl.org/support/faq.html
- def read_nonblock(maxlen, buf=nil, exception: true)
+ def read_nonblock(maxlen, buf=nil)
if maxlen == 0
if buf
buf.clear
@@ -179,7 +171,7 @@ module OpenSSL::Buffering
end
end
if @rbuffer.empty?
- return sysread_nonblock(maxlen, buf, exception: exception)
+ return sysread_nonblock(maxlen, buf)
end
ret = consume_rbuff(maxlen)
if buf
@@ -378,9 +370,9 @@ module OpenSSL::Buffering
# is when the peer requests a new TLS/SSL handshake. See the openssl FAQ
# for more details. http://www.openssl.org/support/faq.html
- def write_nonblock(s, exception: true)
+ def write_nonblock(s)
flush
- syswrite_nonblock(s, exception: exception)
+ syswrite_nonblock(s)
end
##
diff --git a/ext/openssl/lib/openssl/config.rb b/ext/openssl/lib/openssl/config.rb
index 5716d59fd6..24a54c91ec 100644
--- a/ext/openssl/lib/openssl/config.rb
+++ b/ext/openssl/lib/openssl/config.rb
@@ -13,41 +13,20 @@
require 'stringio'
module OpenSSL
- ##
- # = OpenSSL::Config
- #
- # Configuration for the openssl library.
- #
- # Many system's installation of openssl library will depend on your system
- # configuration. See the value of OpenSSL::Config::DEFAULT_CONFIG_FILE for
- # the location of the file for your host.
- #
- # See also http://www.openssl.org/docs/apps/config.html
class Config
include Enumerable
class << self
-
- ##
- # Parses a given +string+ as a blob that contains configuration for openssl.
- #
- # If the source of the IO is a file, then consider using #parse_config.
- def parse(string)
+ def parse(str)
c = new()
- parse_config(StringIO.new(string)).each do |section, hash|
+ parse_config(StringIO.new(str)).each do |section, hash|
c[section] = hash
end
c
end
- ##
- # load is an alias to ::new
alias load new
- ##
- # Parses the configuration data read from +io+, see also #parse.
- #
- # Raises a ConfigError on invalid configuration data.
def parse_config(io)
begin
parse_config_lines(io)
@@ -230,18 +209,6 @@ module OpenSSL
end
end
- ##
- # Creates an instance of OpenSSL's configuration class.
- #
- # This can be used in contexts like OpenSSL::X509::ExtensionFactory.config=
- #
- # If the optional +filename+ parameter is provided, then it is read in and
- # parsed via #parse_config.
- #
- # This can raise IO exceptions based on the access, or availability of the
- # file. A ConfigError exception may be raised depending on the validity of
- # the data being configured.
- #
def initialize(filename = nil)
@data = {}
if filename
@@ -253,23 +220,6 @@ module OpenSSL
end
end
- ##
- # Gets the value of +key+ from the given +section+
- #
- # Given the following configurating file being loaded:
- #
- # config = OpenSSL::Config.load('foo.cnf')
- # #=> #<OpenSSL::Config sections=["default"]>
- # puts config.to_s
- # #=> [ default ]
- # # foo=bar
- #
- # You can get a specific value from the config if you know the +section+
- # and +key+ like so:
- #
- # config.get_value('default','foo')
- # #=> "bar"
- #
def get_value(section, key)
if section.nil?
raise TypeError.new('nil not allowed')
@@ -278,12 +228,7 @@ module OpenSSL
get_key_string(section, key)
end
- ##
- #
- # *Deprecated*
- #
- # Use #get_value instead
- def value(arg1, arg2 = nil) # :nodoc:
+ def value(arg1, arg2 = nil)
warn('Config#value is deprecated; use Config#get_value')
if arg2.nil?
section, key = 'default', arg1
@@ -295,84 +240,20 @@ module OpenSSL
get_key_string(section, key)
end
- ##
- # Set the target +key+ with a given +value+ under a specific +section+.
- #
- # Given the following configurating file being loaded:
- #
- # config = OpenSSL::Config.load('foo.cnf')
- # #=> #<OpenSSL::Config sections=["default"]>
- # puts config.to_s
- # #=> [ default ]
- # # foo=bar
- #
- # You can set the value of +foo+ under the +default+ section to a new
- # value:
- #
- # config.add_value('default', 'foo', 'buzz')
- # #=> "buzz"
- # puts config.to_s
- # #=> [ default ]
- # # foo=buzz
- #
def add_value(section, key, value)
check_modify
(@data[section] ||= {})[key] = value
end
- ##
- # Get a specific +section+ from the current configuration
- #
- # Given the following configurating file being loaded:
- #
- # config = OpenSSL::Config.load('foo.cnf')
- # #=> #<OpenSSL::Config sections=["default"]>
- # puts config.to_s
- # #=> [ default ]
- # # foo=bar
- #
- # You can get a hash of the specific section like so:
- #
- # config['default']
- # #=> {"foo"=>"bar"}
- #
def [](section)
@data[section] || {}
end
- ##
- # Deprecated
- #
- # Use #[] instead
- def section(name) # :nodoc:
+ def section(name)
warn('Config#section is deprecated; use Config#[]')
@data[name] || {}
end
- ##
- # Sets a specific +section+ name with a Hash +pairs+
- #
- # Given the following configuration being created:
- #
- # config = OpenSSL::Config.new
- # #=> #<OpenSSL::Config sections=[]>
- # config['default'] = {"foo"=>"bar","baz"=>"buz"}
- # #=> {"foo"=>"bar", "baz"=>"buz"}
- # puts config.to_s
- # #=> [ default ]
- # # foo=bar
- # # baz=buz
- #
- # It's important to note that this will essentially merge any of the keys
- # in +pairs+ with the existing +section+. For example:
- #
- # config['default']
- # #=> {"foo"=>"bar", "baz"=>"buz"}
- # config['default'] = {"foo" => "changed"}
- # #=> {"foo"=>"changed"}
- # config['default']
- # #=> {"foo"=>"changed", "baz"=>"buz"}
- #
def []=(section, pairs)
check_modify
@data[section] ||= {}
@@ -381,38 +262,10 @@ module OpenSSL
end
end
- ##
- # Get the names of all sections in the current configuration
def sections
@data.keys
end
- ##
- # Get the parsable form of the current configuration
- #
- # Given the following configuration being created:
- #
- # config = OpenSSL::Config.new
- # #=> #<OpenSSL::Config sections=[]>
- # config['default'] = {"foo"=>"bar","baz"=>"buz"}
- # #=> {"foo"=>"bar", "baz"=>"buz"}
- # puts config.to_s
- # #=> [ default ]
- # # foo=bar
- # # baz=buz
- #
- # You can parse get the serialized configuration using #to_s and then parse
- # it later:
- #
- # serialized_config = config.to_s
- # # much later...
- # new_config = OpenSSL::Config.parse(serialized_config)
- # #=> #<OpenSSL::Config sections=["default"]>
- # puts new_config
- # #=> [ default ]
- # foo=bar
- # baz=buz
- #
def to_s
ary = []
@data.keys.sort.each do |section|
@@ -425,15 +278,6 @@ module OpenSSL
ary.join
end
- ##
- # For a block.
- #
- # Receive the section and its pairs for the current configuration.
- #
- # config.each do |section, key, value|
- # # ...
- # end
- #
def each
@data.each do |section, hash|
hash.each do |key, value|
@@ -442,16 +286,13 @@ module OpenSSL
end
end
- ##
- # String representation of this configuration object, including the class
- # name and its sections.
def inspect
"#<#{self.class.name} sections=#{sections.inspect}>"
end
protected
- def data # :nodoc:
+ def data
@data
end
diff --git a/ext/openssl/lib/openssl/digest.rb b/ext/openssl/lib/openssl/digest.rb
index a7b641fd22..1a6108df9a 100644
--- a/ext/openssl/lib/openssl/digest.rb
+++ b/ext/openssl/lib/openssl/digest.rb
@@ -31,37 +31,38 @@ module OpenSSL
#
# === Examples
#
- # OpenSSL::Digest.digest("SHA256", "abc")
+ # OpenSSL::Digest.digest("SHA256, "abc")
#
# which is equivalent to:
#
# OpenSSL::Digest::SHA256.digest("abc")
def self.digest(name, data)
- super(data, name)
+ super(data, name)
end
alg.each{|name|
- klass = Class.new(self) {
- define_method(:initialize, ->(data = nil) {super(name, data)})
+ klass = Class.new(Digest){
+ define_method(:initialize){|*data|
+ if data.length > 1
+ raise ArgumentError,
+ "wrong number of arguments (#{data.length} for 1)"
+ end
+ super(name, data.first)
+ }
}
singleton = (class << klass; self; end)
singleton.class_eval{
- define_method(:digest){|data| new.digest(data) }
- define_method(:hexdigest){|data| new.hexdigest(data) }
+ define_method(:digest){|data| Digest.digest(name, data) }
+ define_method(:hexdigest){|data| Digest.hexdigest(name, data) }
}
const_set(name, klass)
}
- # Deprecated.
- #
- # This class is only provided for backwards compatibility.
- class Digest < Digest # :nodoc:
- # Deprecated.
- #
- # See OpenSSL::Digest.new
+ # This class is only provided for backwards compatibility. Use OpenSSL::Digest in the future.
+ class Digest < Digest
def initialize(*args)
- warn('Digest::Digest is deprecated; use Digest')
+ # add warning
super(*args)
end
end
diff --git a/ext/openssl/lib/openssl/ssl.rb b/ext/openssl/lib/openssl/ssl.rb
index 014e1137bc..bc3b781e64 100644
--- a/ext/openssl/lib/openssl/ssl.rb
+++ b/ext/openssl/lib/openssl/ssl.rb
@@ -98,22 +98,14 @@ module OpenSSL
should_verify_common_name = true
cert.extensions.each{|ext|
next if ext.oid != "subjectAltName"
- ostr = OpenSSL::ASN1.decode(ext.to_der).value.last
- sequence = OpenSSL::ASN1.decode(ostr.value)
- sequence.value.each{|san|
- case san.tag
- when 2 # dNSName in GeneralName (RFC5280)
+ ext.value.split(/,\s+/).each{|general_name|
+ if /\ADNS:(.*)/ =~ general_name
should_verify_common_name = false
- reg = Regexp.escape(san.value).gsub(/\\\*/, "[^.]+")
+ reg = Regexp.escape($1).gsub(/\\\*/, "[^.]+")
return true if /\A#{reg}\z/i =~ hostname
- when 7 # iPAddress in GeneralName (RFC5280)
+ elsif /\AIP Address:(.*)/ =~ general_name
should_verify_common_name = false
- # follows GENERAL_NAME_print() in x509v3/v3_alt.c
- if san.value.size == 4
- return true if san.value.unpack('C*').join('.') == hostname
- elsif san.value.size == 16
- return true if san.value.unpack('n*').map { |e| sprintf("%X", e) }.join(':') == hostname
- end
+ return true if $1 == hostname
end
}
}
@@ -148,16 +140,10 @@ module OpenSSL
end
end
- ##
- # SSLServer represents a TCP/IP server socket with Secure Sockets Layer.
class SSLServer
include SocketForwarder
- # When true then #accept works exactly the same as TCPServer#accept
attr_accessor :start_immediately
- # Creates a new instance of SSLServer.
- # * +srv+ is an instance of TCPServer.
- # * +ctx+ is an instance of OpenSSL::SSL::SSLContext.
def initialize(svr, ctx)
@svr = svr
@ctx = ctx
@@ -170,22 +156,18 @@ module OpenSSL
@start_immediately = true
end
- # Returns the TCPServer passed to the SSLServer when initialized.
def to_io
@svr
end
- # See TCPServer#listen for details.
def listen(backlog=5)
@svr.listen(backlog)
end
- # See BasicSocket#shutdown for details.
def shutdown(how=Socket::SHUT_RDWR)
@svr.shutdown(how)
end
- # Works similar to TCPServer#accept.
def accept
sock = @svr.accept
begin
@@ -199,7 +181,6 @@ module OpenSSL
end
end
- # See IO#close for details.
def close
@svr.close
end
diff --git a/ext/openssl/openssl_missing.c b/ext/openssl/openssl_missing.c
index b5efaaf15d..f88dd403be 100644
--- a/ext/openssl/openssl_missing.c
+++ b/ext/openssl/openssl_missing.c
@@ -10,7 +10,7 @@
*/
#include RUBY_EXTCONF_H
-#if defined(HAVE_OPENSSL_ENGINE_H) && defined(HAVE_EVP_CIPHER_CTX_ENGINE)
+#if defined(HAVE_OPENSSL_ENGINE_H) && defined(HAVE_ST_ENGINE)
# include <openssl/engine.h>
#endif
#include <openssl/x509_vfy.h>
@@ -122,7 +122,7 @@ EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, EVP_CIPHER_CTX *in)
{
memcpy(out, in, sizeof(EVP_CIPHER_CTX));
-#if defined(HAVE_ENGINE_ADD) && defined(HAVE_EVP_CIPHER_CTX_ENGINE)
+#if defined(HAVE_ENGINE_ADD) && defined(HAVE_ST_ENGINE)
if (in->engine) ENGINE_add(out->engine);
if (in->cipher_data) {
out->cipher_data = OPENSSL_malloc(in->cipher->ctx_size);
diff --git a/ext/openssl/ossl.c b/ext/openssl/ossl.c
index 43ccf4c3fd..df632947d4 100644
--- a/ext/openssl/ossl.c
+++ b/ext/openssl/ossl.c
@@ -458,94 +458,6 @@ ossl_fips_mode_set(VALUE self, VALUE enabled)
#endif
}
-/**
- * Stores locks needed for OpenSSL thread safety
- */
-#include "../../thread_native.h"
-static rb_nativethread_lock_t *ossl_locks;
-
-static void
-ossl_lock_unlock(int mode, rb_nativethread_lock_t *lock)
-{
- if (mode & CRYPTO_LOCK) {
- rb_nativethread_lock_lock(lock);
- } else {
- rb_nativethread_lock_unlock(lock);
- }
-}
-
-static void
-ossl_lock_callback(int mode, int type, const char *file, int line)
-{
- ossl_lock_unlock(mode, &ossl_locks[type]);
-}
-
-struct CRYPTO_dynlock_value {
- rb_nativethread_lock_t lock;
-};
-
-static struct CRYPTO_dynlock_value *
-ossl_dyn_create_callback(const char *file, int line)
-{
- struct CRYPTO_dynlock_value *dynlock = (struct CRYPTO_dynlock_value *)OPENSSL_malloc((int)sizeof(struct CRYPTO_dynlock_value));
- rb_nativethread_lock_initialize(&dynlock->lock);
- return dynlock;
-}
-
-static void
-ossl_dyn_lock_callback(int mode, struct CRYPTO_dynlock_value *l, const char *file, int line)
-{
- ossl_lock_unlock(mode, &l->lock);
-}
-
-static void
-ossl_dyn_destroy_callback(struct CRYPTO_dynlock_value *l, const char *file, int line)
-{
- rb_nativethread_lock_destroy(&l->lock);
- OPENSSL_free(l);
-}
-
-#ifdef HAVE_CRYPTO_THREADID_PTR
-static void ossl_threadid_func(CRYPTO_THREADID *id)
-{
- /* register native thread id */
- CRYPTO_THREADID_set_pointer(id, (void *)rb_nativethread_self());
-}
-#else
-static unsigned long ossl_thread_id(void)
-{
- /* before OpenSSL 1.0, this is 'unsigned long' */
- return (unsigned long)rb_nativethread_self();
-}
-#endif
-
-static void Init_ossl_locks(void)
-{
- int i;
- int num_locks = CRYPTO_num_locks();
-
- if ((unsigned)num_locks >= INT_MAX / (int)sizeof(VALUE)) {
- rb_raise(rb_eRuntimeError, "CRYPTO_num_locks() is too big: %d", num_locks);
- }
- ossl_locks = (rb_nativethread_lock_t *) OPENSSL_malloc(num_locks * (int)sizeof(rb_nativethread_lock_t));
- if (!ossl_locks) {
- rb_raise(rb_eNoMemError, "CRYPTO_num_locks() is too big: %d", num_locks);
- }
- for (i = 0; i < num_locks; i++) {
- rb_nativethread_lock_initialize(&ossl_locks[i]);
- }
-
-#ifdef HAVE_CRYPTO_THREADID_PTR
- CRYPTO_THREADID_set_callback(ossl_threadid_func);
-#else
- CRYPTO_set_id_callback(ossl_thread_id);
-#endif
- CRYPTO_set_locking_callback(ossl_lock_callback);
- CRYPTO_set_dynlock_create_callback(ossl_dyn_create_callback);
- CRYPTO_set_dynlock_lock_callback(ossl_dyn_lock_callback);
- CRYPTO_set_dynlock_destroy_callback(ossl_dyn_destroy_callback);
-}
-
/*
* OpenSSL provides SSL, TLS and general purpose cryptography. It wraps the
* OpenSSL[http://www.openssl.org/] library.
@@ -789,18 +701,10 @@ static void Init_ossl_locks(void)
*
* extension_factory = OpenSSL::X509::ExtensionFactory.new nil, cert
*
- * cert.add_extension \
- * extension_factory.create_extension('basicConstraints', 'CA:FALSE', true)
- *
- * cert.add_extension \
- * extension_factory.create_extension(
- * 'keyUsage', 'keyEncipherment,dataEncipherment,digitalSignature')
- *
- * cert.add_extension \
- * extension_factory.create_extension('subjectKeyIdentifier', 'hash')
- *
- * The list of supported extensions (and in some cases their possible values)
- * can be derived from the "objects.h" file in the OpenSSL source code.
+ * extension_factory.create_extension 'basicConstraints', 'CA:FALSE'
+ * extension_factory.create_extension 'keyUsage',
+ * 'keyEncipherment,dataEncipherment,digitalSignature'
+ * extension_factory.create_extension 'subjectKeyIdentifier', 'hash'
*
* === Signing a Certificate
*
@@ -844,7 +748,7 @@ static void Init_ossl_locks(void)
* cipher = OpenSSL::Cipher::Cipher.new 'AES-128-CBC'
*
* open 'ca_key.pem', 'w', 0400 do |io|
- * io.write ca_key.export(cipher, pass_phrase)
+ * io.write key.export(cipher, pass_phrase)
* end
*
* === CA Certificate
@@ -868,20 +772,16 @@ static void Init_ossl_locks(void)
* extension_factory.subject_certificate = ca_cert
* extension_factory.issuer_certificate = ca_cert
*
- * ca_cert.add_extension \
- * extension_factory.create_extension('subjectKeyIdentifier', 'hash')
+ * extension_factory.create_extension 'subjectKeyIdentifier', 'hash'
*
* This extension indicates the CA's key may be used as a CA.
*
- * ca_cert.add_extension \
- * extension_factory.create_extension('basicConstraints', 'CA:TRUE', true)
+ * extension_factory.create_extension 'basicConstraints', 'CA:TRUE', true
*
* This extension indicates the CA's key may be used to verify signatures on
* both certificates and certificate revocations.
*
- * ca_cert.add_extension \
- * extension_factory.create_extension(
- * 'keyUsage', 'cRLSign,keyCertSign', true)
+ * extension_factory.create_extension 'keyUsage', 'cRLSign,keyCertSign', true
*
* Root CA certificates are self-signed.
*
@@ -937,15 +837,10 @@ static void Init_ossl_locks(void)
* extension_factory.subject_certificate = csr_cert
* extension_factory.issuer_certificate = ca_cert
*
- * csr_cert.add_extension \
- * extension_factory.create_extension('basicConstraints', 'CA:FALSE')
- *
- * csr_cert.add_extension \
- * extension_factory.create_extension(
- * 'keyUsage', 'keyEncipherment,dataEncipherment,digitalSignature')
- *
- * csr_cert.add_extension \
- * extension_factory.create_extension('subjectKeyIdentifier', 'hash')
+ * extension_factory.create_extension 'basicConstraints', 'CA:FALSE'
+ * extension_factory.create_extension 'keyUsage',
+ * 'keyEncipherment,dataEncipherment,digitalSignature'
+ * extension_factory.create_extension 'subjectKeyIdentifier', 'hash'
*
* csr_cert.sign ca_key, OpenSSL::Digest::SHA1.new
*
@@ -1065,7 +960,6 @@ Init_openssl()
* Init main module
*/
mOSSL = rb_define_module("OpenSSL");
- rb_global_variable(&mOSSL);
/*
* OpenSSL ruby extension version
@@ -1098,7 +992,6 @@ Init_openssl()
* common for all classes under OpenSSL module
*/
eOSSLError = rb_define_class_under(mOSSL,"OpenSSLError",rb_eStandardError);
- rb_global_variable(&eOSSLError);
/*
* Verify callback Proc index for ext-data
@@ -1110,8 +1003,6 @@ Init_openssl()
* Init debug core
*/
dOSSL = Qfalse;
- rb_global_variable(&dOSSL);
-
rb_define_module_function(mOSSL, "debug", ossl_debug_get, 0);
rb_define_module_function(mOSSL, "debug=", ossl_debug_set, 1);
rb_define_module_function(mOSSL, "errors", ossl_get_errors, 0);
@@ -1121,8 +1012,6 @@ Init_openssl()
*/
ossl_s_to_der = rb_intern("to_der");
- Init_ossl_locks();
-
/*
* Init components
*/
diff --git a/ext/openssl/ossl.h b/ext/openssl/ossl.h
index 96d0ade11e..88e4506fa8 100644
--- a/ext/openssl/ossl.h
+++ b/ext/openssl/ossl.h
@@ -66,7 +66,7 @@ extern "C" {
#include <openssl/conf_api.h>
#undef X509_NAME
#undef PKCS7_SIGNER_INFO
-#if defined(HAVE_OPENSSL_ENGINE_H) && defined(HAVE_EVP_CIPHER_CTX_ENGINE)
+#if defined(HAVE_OPENSSL_ENGINE_H) && defined(HAVE_ST_ENGINE)
# define OSSL_ENGINE_ENABLED
# include <openssl/engine.h>
#endif
diff --git a/ext/openssl/ossl_asn1.c b/ext/openssl/ossl_asn1.c
index e3f59bfe1e..81881517d3 100644
--- a/ext/openssl/ossl_asn1.c
+++ b/ext/openssl/ossl_asn1.c
@@ -33,22 +33,15 @@ asn1time_to_time(ASN1_TIME *time)
{
struct tm tm;
VALUE argv[6];
- int count;
if (!time || !time->data) return Qnil;
memset(&tm, 0, sizeof(struct tm));
switch (time->type) {
case V_ASN1_UTCTIME:
- count = sscanf((const char *)time->data, "%2d%2d%2d%2d%2d%2dZ",
- &tm.tm_year, &tm.tm_mon, &tm.tm_mday, &tm.tm_hour, &tm.tm_min,
- &tm.tm_sec);
-
- if (count == 5) {
- tm.tm_sec = 0;
- } else if (count != 6) {
- ossl_raise(rb_eTypeError, "bad UTCTIME format: \"%s\"",
- time->data);
+ if (sscanf((const char *)time->data, "%2d%2d%2d%2d%2d%2dZ", &tm.tm_year, &tm.tm_mon,
+ &tm.tm_mday, &tm.tm_hour, &tm.tm_min, &tm.tm_sec) != 6) {
+ ossl_raise(rb_eTypeError, "bad UTCTIME format");
}
if (tm.tm_year < 69) {
tm.tm_year += 2000;
@@ -733,7 +726,7 @@ ossl_asn1data_initialize(VALUE self, VALUE value, VALUE tag, VALUE tag_class)
}
static VALUE
-join_der_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, str))
+join_der_i(VALUE i, VALUE str)
{
i = ossl_to_der_if_possible(i);
StringValue(i);
@@ -1358,17 +1351,6 @@ ossl_asn1cons_each(VALUE self)
return self;
}
-/*
- * call-seq:
- * ObjectId.register(object_id, short_name, long_name)
- *
- * This adds a new ObjectId to the internal tables. Where +object_id+ is the
- * numerical form, +short_name+ is the short name, and +long_name+ is the long
- * name.
- *
- * Returns +true+ if successful. Raises an ASN1Error otherwise.
- *
- */
static VALUE
ossl_asn1obj_s_register(VALUE self, VALUE oid, VALUE sn, VALUE ln)
{
@@ -1382,14 +1364,6 @@ ossl_asn1obj_s_register(VALUE self, VALUE oid, VALUE sn, VALUE ln)
return Qtrue;
}
-/* Document-method: OpenSSL::ASN1::ObjectId#sn
- *
- * The short name of the ObjectId, as defined in +openssl/objects.h+.
- */
-/* Document-method: OpenSSL::ASN1::ObjectId#short_name
- *
- * #short_name is an alias to #sn
- */
static VALUE
ossl_asn1obj_get_sn(VALUE self)
{
@@ -1403,14 +1377,6 @@ ossl_asn1obj_get_sn(VALUE self)
return ret;
}
-/* Document-method: OpenSSL::ASN1::ObjectId#ln
- *
- * The long name of the ObjectId, as defined in +openssl/objects.h+.
- */
-/* Document-method: OpenSSL::ASN1::ObjectId.long_name
- *
- * #long_name is an alias to #ln
- */
static VALUE
ossl_asn1obj_get_ln(VALUE self)
{
@@ -1424,10 +1390,6 @@ ossl_asn1obj_get_ln(VALUE self)
return ret;
}
-/* Document-method: OpenSSL::ASN1::ObjectId#oid
- *
- * The object identifier as a String.
- */
static VALUE
ossl_asn1obj_get_oid(VALUE self)
{
@@ -1809,10 +1771,6 @@ Init_ossl_asn1()
*
* == OpenSSL::ASN1::ObjectId
*
- * While OpenSSL::ASN1::ObjectId.new will allocate a new ObjectId, it is
- * not typically allocated this way, but rather that are received from
- * parsed ASN1 encodings.
- *
* === Additional attributes
* * +sn+: the short name as defined in <openssl/objects.h>.
* * +ln+: the long name as defined in <openssl/objects.h>.
@@ -1952,10 +1910,6 @@ do{\
OSSL_ASN1_DEFINE_CLASS(EndOfContent, Data);
- /* Document-class: OpenSSL::ASN1::ObjectId
- *
- * Represents the primitive object id for OpenSSL::ASN1
- */
#if 0
cASN1ObjectId = rb_define_class_under(mASN1, "ObjectId", cASN1Primitive); /* let rdoc know */
#endif
diff --git a/ext/openssl/ossl_bn.c b/ext/openssl/ossl_bn.c
index 05473635ae..5d690af52d 100644
--- a/ext/openssl/ossl_bn.c
+++ b/ext/openssl/ossl_bn.c
@@ -106,7 +106,6 @@ ossl_bn_alloc(VALUE klass)
* call-seq:
* BN.new => aBN
* BN.new(bn) => aBN
- * BN.new(integer) => aBN
* BN.new(string) => aBN
* BN.new(string, 0 | 2 | 10 | 16) => aBN
*/
@@ -120,52 +119,11 @@ ossl_bn_initialize(int argc, VALUE *argv, VALUE self)
if (rb_scan_args(argc, argv, "11", &str, &bs) == 2) {
base = NUM2INT(bs);
}
-
- if (RB_TYPE_P(str, T_FIXNUM)) {
- long i;
- unsigned char bin[sizeof(long)];
- long n = FIX2LONG(str);
- unsigned long un = labs(n);
-
- for (i = sizeof(long) - 1; 0 <= i; i--) {
- bin[i] = un&0xff;
- un >>= 8;
- }
-
- GetBN(self, bn);
- if (!BN_bin2bn(bin, sizeof(bin), bn)) {
- ossl_raise(eBNError, NULL);
- }
- if (n < 0) BN_set_negative(bn, 1);
- return self;
- }
- else if (RB_TYPE_P(str, T_BIGNUM)) {
- int i, j, len = RBIGNUM_LENINT(str);
- BDIGIT *ds = RBIGNUM_DIGITS(str);
- VALUE buf;
- unsigned char *bin = (unsigned char*)ALLOCV_N(BDIGIT, buf, len);
-
- for (i = 0; len > i; i++) {
- BDIGIT v = ds[i];
- for (j = SIZEOF_BDIGITS - 1; 0 <= j; j--) {
- bin[(len-1-i)*SIZEOF_BDIGITS+j] = v&0xff;
- v >>= 8;
- }
- }
-
- GetBN(self, bn);
- if (!BN_bin2bn(bin, (int)SIZEOF_BDIGITS*len, bn)) {
- ALLOCV_END(buf);
- ossl_raise(eBNError, NULL);
- }
- ALLOCV_END(buf);
- if (!RBIGNUM_SIGN(str)) BN_set_negative(bn, 1);
- return self;
- }
+ StringValue(str);
+ GetBN(self, bn);
if (RTEST(rb_obj_is_kind_of(str, cBN))) {
BIGNUM *other;
- GetBN(self, bn);
GetBN(str, other); /* Safe - we checked kind_of? above */
if (!BN_copy(bn, other)) {
ossl_raise(eBNError, NULL);
@@ -173,8 +131,6 @@ ossl_bn_initialize(int argc, VALUE *argv, VALUE self)
return self;
}
- StringValue(str);
- GetBN(self, bn);
switch (base) {
case 0:
if (!BN_mpi2bn((unsigned char *)RSTRING_PTR(str), RSTRING_LENINT(str), bn)) {
@@ -268,10 +224,10 @@ ossl_bn_to_i(VALUE self)
GetBN(self, bn);
- if (!(txt = BN_bn2hex(bn))) {
+ if (!(txt = BN_bn2dec(bn))) {
ossl_raise(eBNError, NULL);
}
- num = rb_cstr_to_inum(txt, 16, Qtrue);
+ num = rb_cstr_to_inum(txt, 10, Qtrue);
OPENSSL_free(txt);
return num;
diff --git a/ext/openssl/ossl_config.c b/ext/openssl/ossl_config.c
index 0f25a19e50..e700833076 100644
--- a/ext/openssl/ossl_config.c
+++ b/ext/openssl/ossl_config.c
@@ -15,11 +15,6 @@
* Classes
*/
VALUE cConfig;
-/* Document-class: OpenSSL::ConfigError
- *
- * General error for openssl library configuration files. Including formating,
- * parsing errors, etc.
- */
VALUE eConfigError;
/*
@@ -60,10 +55,6 @@ GetConfigPtr(VALUE obj)
return conf;
}
-/* Document-const: DEFAULT_CONFIG_FILE
- *
- * The default system configuration file for openssl
- */
/*
* INIT
diff --git a/ext/openssl/ossl_engine.c b/ext/openssl/ossl_engine.c
index da1a3c7a74..f85454108a 100644
--- a/ext/openssl/ossl_engine.c
+++ b/ext/openssl/ossl_engine.c
@@ -32,18 +32,7 @@
/*
* Classes
*/
-/* Document-class: OpenSSL::Engine
- *
- * This class is the access to openssl's ENGINE cryptographic module
- * implementation.
- *
- * See also, https://www.openssl.org/docs/crypto/engine.html
- */
VALUE cEngine;
-/* Document-class: OpenSSL::Engine::EngineError
- *
- * This is the generic exception for OpenSSL::Engine related errors
- */
VALUE eEngineError;
/*
@@ -57,17 +46,6 @@ do{\
}\
}while(0)
-/* Document-method: OpenSSL::Engine.load
- *
- * call-seq:
- * load(enginename = nil)
- *
- * This method loads engines. If +name+ is nil, then all builtin engines are
- * loaded. Otherwise, the given +name+, as a string, is loaded if available to
- * your runtime, and returns true. If +name+ is not found, then nil is
- * returned.
- *
- */
static VALUE
ossl_engine_s_load(int argc, VALUE *argv, VALUE klass)
{
@@ -138,15 +116,6 @@ ossl_engine_s_load(int argc, VALUE *argv, VALUE klass)
#endif /* HAVE_ENGINE_LOAD_BUILTIN_ENGINES */
}
-/* Document-method: OpenSSL::Engine.cleanup
- * call-seq:
- * OpenSSL::Engine.cleanup
- *
- * It is only necessary to run cleanup when engines are loaded via
- * OpenSSL::Engine.load. However, running cleanup before exit is recommended.
- *
- * See also, https://www.openssl.org/docs/crypto/engine.html
- */
static VALUE
ossl_engine_s_cleanup(VALUE self)
{
@@ -156,10 +125,6 @@ ossl_engine_s_cleanup(VALUE self)
return Qnil;
}
-/* Document-method: OpenSSL::Engine.engines
- *
- * Returns an array of currently loaded engines.
- */
static VALUE
ossl_engine_s_engines(VALUE klass)
{
@@ -179,18 +144,6 @@ ossl_engine_s_engines(VALUE klass)
return ary;
}
-/* Document-method: OpenSSL::Engine.by_id
- *
- * call-seq:
- * by_id(name) -> engine
- *
- * Fetch the engine as specified by the +id+ String
- *
- * OpenSSL::Engine.by_id("openssl")
- * => #<OpenSSL::Engine id="openssl" name="Software engine support">
- *
- * See OpenSSL::Engine.engines for the currently loaded engines
- */
static VALUE
ossl_engine_s_by_id(VALUE klass, VALUE id)
{
@@ -226,15 +179,6 @@ ossl_engine_s_alloc(VALUE klass)
return obj;
}
-/* Document-method: OpenSSL::Engine#id
- *
- * Get the id for this engine
- *
- * OpenSSL::Engine.load
- * OpenSSL::Engine.engines #=> [#<OpenSSL::Engine#>, ...]
- * OpenSSL::Engine.engines.first.id
- * #=> "rsax"
- */
static VALUE
ossl_engine_get_id(VALUE self)
{
@@ -243,16 +187,6 @@ ossl_engine_get_id(VALUE self)
return rb_str_new2(ENGINE_get_id(e));
}
-/* Document-method: OpenSSL::Engine#name
- *
- * Get the descriptive name for this engine
- *
- * OpenSSL::Engine.load
- * OpenSSL::Engine.engines #=> [#<OpenSSL::Engine#>, ...]
- * OpenSSL::Engine.engines.first.name
- * #=> "RSAX engine support"
- *
- */
static VALUE
ossl_engine_get_name(VALUE self)
{
@@ -261,12 +195,6 @@ ossl_engine_get_name(VALUE self)
return rb_str_new2(ENGINE_get_name(e));
}
-/* Document-method: OpenSSL::Engine#finish
- *
- * Releases all internal structural references for this engine.
- *
- * May raise an EngineError if the engine is unavailable
- */
static VALUE
ossl_engine_finish(VALUE self)
{
@@ -279,22 +207,6 @@ ossl_engine_finish(VALUE self)
}
#if defined(HAVE_ENGINE_GET_CIPHER)
-/* Document-method: OpenSSL::Engine#cipher
- *
- * call-seq:
- * engine.cipher(name) -> OpenSSL::Cipher
- *
- * This returns an OpenSSL::Cipher by +name+, if it is available in this
- * engine.
- *
- * A EngineError will be raised if the cipher is unavailable.
- *
- * e = OpenSSL::Engine.by_id("openssl")
- * => #<OpenSSL::Engine id="openssl" name="Software engine support">
- * e.cipher("RC4")
- * => #<OpenSSL::Cipher:0x007fc5cacc3048>
- *
- */
static VALUE
ossl_engine_get_cipher(VALUE self, VALUE name)
{
@@ -318,22 +230,6 @@ ossl_engine_get_cipher(VALUE self, VALUE name)
#endif
#if defined(HAVE_ENGINE_GET_DIGEST)
-/* Document-method: OpenSSL::Engine#digest
- *
- * call-seq:
- * engine.digest(name) -> OpenSSL::Digest
- *
- * This returns an OpenSSL::Digest by +name+.
- *
- * Will raise an EngineError if the digest is unavailable.
- *
- * e = OpenSSL::Engine.by_id("openssl")
- * #=> #<OpenSSL::Engine id="openssl" name="Software engine support">
- * e.digest("SHA1")
- * #=> #<OpenSSL::Digest: da39a3ee5e6b4b0d3255bfef95601890afd80709>
- * e.digest("zomg")
- * #=> OpenSSL::Engine::EngineError: no such digest `zomg'
- */
static VALUE
ossl_engine_get_digest(VALUE self, VALUE name)
{
@@ -356,16 +252,6 @@ ossl_engine_get_digest(VALUE self, VALUE name)
#define ossl_engine_get_digest rb_f_notimplement
#endif
-/* Document-method: OpenSSL::Engine#load_private_key
- *
- * call-seq:
- * engine.load_private_key(id = nil, data = nil) -> OpenSSL::PKey
- *
- * Loads the given private key by +id+ and +data+.
- *
- * An EngineError is raised of the OpenSSL::PKey is unavailable.
- *
- */
static VALUE
ossl_engine_load_privkey(int argc, VALUE *argv, VALUE self)
{
@@ -390,16 +276,6 @@ ossl_engine_load_privkey(int argc, VALUE *argv, VALUE self)
return obj;
}
-/* Document-method: OpenSSL::Engine#load_public_key
- *
- * call-seq:
- * engine.load_public_key(id = nil, data = nil) -> OpenSSL::PKey
- *
- * Loads the given private key by +id+ and +data+.
- *
- * An EngineError is raised of the OpenSSL::PKey is unavailable.
- *
- */
static VALUE
ossl_engine_load_pubkey(int argc, VALUE *argv, VALUE self)
{
@@ -422,23 +298,6 @@ ossl_engine_load_pubkey(int argc, VALUE *argv, VALUE self)
return ossl_pkey_new(pkey);
}
-/* Document-method: OpenSSL::Engine#set_default
- *
- * call-seq:
- * engine.set_default(flag)
- *
- * Set the defaults for this engine with the given +flag+.
- *
- * These flags are used to control combinations of algorithm methods.
- *
- * +flag+ can be one of the following, other flags are available depending on
- * your OS.
- *
- * [All flags] 0xFFFF
- * [No flags] 0x0000
- *
- * See also <openssl/engine.h>
- */
static VALUE
ossl_engine_set_default(VALUE self, VALUE flag)
{
@@ -451,15 +310,6 @@ ossl_engine_set_default(VALUE self, VALUE flag)
return Qtrue;
}
-/* Document-method: OpenSSL::Engine#ctrl_cmd
- *
- * call-seq:
- * engine.ctrl_cmd(command, value = nil) -> engine
- *
- * Send the given +command+ to this engine.
- *
- * Raises an EngineError if the +command+ fails.
- */
static VALUE
ossl_engine_ctrl_cmd(int argc, VALUE *argv, VALUE self)
{
@@ -490,10 +340,6 @@ ossl_engine_cmd_flag_to_name(int flag)
}
}
-/* Document-method: OpenSSL::Engine#cmds
- *
- * Returns an array of command definitions for the current engine
- */
static VALUE
ossl_engine_get_cmds(VALUE self)
{
@@ -516,10 +362,6 @@ ossl_engine_get_cmds(VALUE self)
return ary;
}
-/* Document-method: OpenSSL::Engine#inspect
- *
- * Pretty print this engine
- */
static VALUE
ossl_engine_inspect(VALUE self)
{
diff --git a/ext/openssl/ossl_hmac.c b/ext/openssl/ossl_hmac.c
index 0bba44d783..5220c9e73d 100644
--- a/ext/openssl/ossl_hmac.c
+++ b/ext/openssl/ossl_hmac.c
@@ -62,36 +62,6 @@ ossl_hmac_alloc(VALUE klass)
* call-seq:
* HMAC.new(key, digest) -> hmac
*
- * Returns an instance of OpenSSL::HMAC set with the key and digest
- * algorithm to be used. The instance represents the initial state of
- * the message authentication code before any data has been processed.
- * To process data with it, use the instance method #update with your
- * data as an argument.
- *
- * === Example
- *
- * key = 'key'
- * digest = OpenSSL::Digest.new('sha1')
- * instance = OpenSSL::HMAC.new(key, digest)
- * #=> f42bb0eeb018ebbd4597ae7213711ec60760843f
- * instance.class
- * #=> OpenSSL::HMAC
- *
- * === A note about comparisons
- *
- * Two instances won't be equal when they're compared, even if they have the
- * same value. Use #to_s or #hexdigest to return the authentication code that
- * the instance represents. For example:
- *
- * other_instance = OpenSSL::HMAC.new('key', OpenSSL::Digest.new('sha1'))
- * #=> f42bb0eeb018ebbd4597ae7213711ec60760843f
- * instance
- * #=> f42bb0eeb018ebbd4597ae7213711ec60760843f
- * instance == other_instance
- * #=> false
- * instance.to_s == other_instance.to_s
- * #=> true
- *
*/
static VALUE
ossl_hmac_initialize(VALUE self, VALUE key, VALUE digest)
@@ -125,19 +95,6 @@ ossl_hmac_copy(VALUE self, VALUE other)
* call-seq:
* hmac.update(string) -> self
*
- * Returns +self+ updated with the message to be authenticated.
- * Can be called repeatedly with chunks of the message.
- *
- * === Example
- *
- * first_chunk = 'The quick brown fox jumps '
- * second_chunk = 'over the lazy dog'
- *
- * instance.update(first_chunk)
- * #=> 5b9a8038a65d571076d97fe783989e52278a492a
- * instance.update(second_chunk)
- * #=> de7c9b85b8b78aa6bc8a7a36f70a90701c9db4d9
- *
*/
static VALUE
ossl_hmac_update(VALUE self, VALUE data)
@@ -168,16 +125,7 @@ hmac_final(HMAC_CTX *ctx, unsigned char **buf, unsigned int *buf_len)
/*
* call-seq:
- * hmac.digest -> string
- *
- * Returns the authentication code an instance represents as a binary string.
- *
- * === Example
- *
- * instance = OpenSSL::HMAC.new('key', OpenSSL::Digest.new('sha1'))
- * #=> f42bb0eeb018ebbd4597ae7213711ec60760843f
- * instance.digest
- * #=> "\xF4+\xB0\xEE\xB0\x18\xEB\xBDE\x97\xAEr\x13q\x1E\xC6\a`\x84?"
+ * hmac.digest -> aString
*
*/
static VALUE
@@ -197,10 +145,7 @@ ossl_hmac_digest(VALUE self)
/*
* call-seq:
- * hmac.hexdigest -> string
- *
- * Returns the authentication code an instance represents as a hex-encoded
- * string.
+ * hmac.hexdigest -> aString
*
*/
static VALUE
@@ -228,20 +173,6 @@ ossl_hmac_hexdigest(VALUE self)
* call-seq:
* hmac.reset -> self
*
- * Returns +self+ as it was when it was first initialized, with all processed
- * data cleared from it.
- *
- * === Example
- *
- * data = "The quick brown fox jumps over the lazy dog"
- * instance = OpenSSL::HMAC.new('key', OpenSSL::Digest.new('sha1'))
- * #=> f42bb0eeb018ebbd4597ae7213711ec60760843f
- *
- * instance.update(data)
- * #=> de7c9b85b8b78aa6bc8a7a36f70a90701c9db4d9
- * instance.reset
- * #=> f42bb0eeb018ebbd4597ae7213711ec60760843f
- *
*/
static VALUE
ossl_hmac_reset(VALUE self)
@@ -258,18 +189,6 @@ ossl_hmac_reset(VALUE self)
* call-seq:
* HMAC.digest(digest, key, data) -> aString
*
- * Returns the authentication code as a binary string. The +digest+ parameter
- * must be an instance of OpenSSL::Digest.
- *
- * === Example
- *
- * key = 'key'
- * data = 'The quick brown fox jumps over the lazy dog'
- * digest = OpenSSL::Digest.new('sha1')
- *
- * hmac = OpenSSL::HMAC.digest(digest, key, data)
- * #=> "\xDE|\x9B\x85\xB8\xB7\x8A\xA6\xBC\x8Az6\xF7\n\x90p\x1C\x9D\xB4\xD9"
- *
*/
static VALUE
ossl_hmac_s_digest(VALUE klass, VALUE digest, VALUE key, VALUE data)
@@ -287,19 +206,7 @@ ossl_hmac_s_digest(VALUE klass, VALUE digest, VALUE key, VALUE data)
/*
* call-seq:
- * HMAC.hexdigest(digest, key, data) -> aString
- *
- * Returns the authentication code as a hex-encoded string. The +digest+
- * parameter must be an instance of OpenSSL::Digest.
- *
- * === Example
- *
- * key = 'key'
- * data = 'The quick brown fox jumps over the lazy dog'
- * digest = OpenSSL::Digest.new('sha1')
- *
- * hmac = OpenSSL::HMAC.hexdigest(digest, key, data)
- * #=> "de7c9b85b8b78aa6bc8a7a36f70a90701c9db4d9"
+ * HMAC.digest(digest, key, data) -> aString
*
*/
static VALUE
@@ -330,7 +237,6 @@ void
Init_ossl_hmac()
{
#if 0
- /* :nodoc: */
mOSSL = rb_define_module("OpenSSL"); /* let rdoc know about mOSSL */
#endif
diff --git a/ext/openssl/ossl_ocsp.c b/ext/openssl/ossl_ocsp.c
index 4e2e8394a4..e82c2d859a 100644
--- a/ext/openssl/ossl_ocsp.c
+++ b/ext/openssl/ossl_ocsp.c
@@ -149,7 +149,7 @@ ossl_ocspreq_add_nonce(int argc, VALUE *argv, VALUE self)
* 2: nonces both absent.
* 3: nonce present in response only.
* 0: nonces both present and not equal.
- * -1: nonce in request only.
+ * -1: nonce in request only.
*
* For most responders clients can check return > 0.
* If responder doesn't handle nonces return != 0 may be
diff --git a/ext/openssl/ossl_pkcs7.c b/ext/openssl/ossl_pkcs7.c
index 553a580923..b710280c9c 100644
--- a/ext/openssl/ossl_pkcs7.c
+++ b/ext/openssl/ossl_pkcs7.c
@@ -624,7 +624,7 @@ pkcs7_get_crls(VALUE self)
}
static VALUE
-ossl_pkcs7_set_certs_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, arg))
+ossl_pkcs7_set_certs_i(VALUE i, VALUE arg)
{
return ossl_pkcs7_add_certificate(arg, i);
}
@@ -664,7 +664,7 @@ ossl_pkcs7_add_crl(VALUE self, VALUE crl)
}
static VALUE
-ossl_pkcs7_set_crls_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, arg))
+ossl_pkcs7_set_crls_i(VALUE i, VALUE arg)
{
return ossl_pkcs7_add_crl(arg, i);
}
diff --git a/ext/openssl/ossl_pkey_dh.c b/ext/openssl/ossl_pkey_dh.c
index a6ae0063f5..c8fb40e1ff 100644
--- a/ext/openssl/ossl_pkey_dh.c
+++ b/ext/openssl/ossl_pkey_dh.c
@@ -278,9 +278,7 @@ ossl_dh_is_private(VALUE self)
/*
* call-seq:
- * dh.export -> aString
* dh.to_pem -> aString
- * dh.to_s -> aString
*
* Encodes this DH to its PEM encoding. Note that any existing per-session
* public/private keys will *not* get encoded, just the Diffie-Hellman
@@ -430,7 +428,7 @@ ossl_dh_to_public_key(VALUE self)
/*
* call-seq:
- * dh.params_ok? -> true | false
+ * dh.check_params -> true | false
*
* Validates the Diffie-Hellman parameters associated with this instance.
* It checks whether a safe prime and a suitable generator are used. If this
diff --git a/ext/openssl/ossl_pkey_dsa.c b/ext/openssl/ossl_pkey_dsa.c
index 823b9b66e5..ba28ba028d 100644
--- a/ext/openssl/ossl_pkey_dsa.c
+++ b/ext/openssl/ossl_pkey_dsa.c
@@ -291,9 +291,7 @@ ossl_dsa_is_private(VALUE self)
/*
* call-seq:
- * dsa.export([cipher, password]) -> aString
* dsa.to_pem([cipher, password]) -> aString
- * dsa.to_s([cipher, password]) -> aString
*
* Encodes this DSA to its PEM encoding.
*
diff --git a/ext/openssl/ossl_pkey_ec.c b/ext/openssl/ossl_pkey_ec.c
index 5e419bd167..8e6d88f606 100644
--- a/ext/openssl/ossl_pkey_ec.c
+++ b/ext/openssl/ossl_pkey_ec.c
@@ -533,8 +533,8 @@ static VALUE ossl_ec_key_to_string(VALUE self, VALUE ciph, VALUE pass, int forma
/*
* call-seq:
- * key.export([cipher, pass_phrase]) => String
- * key.to_pem([cipher, pass_phrase]) => String
+ * key.export => String
+ * key.export(cipher, pass_phrase) => String
*
* Outputs the EC key in PEM encoding. If +cipher+ and +pass_phrase+ are
* given they will be used to encrypt the key. +cipher+ must be an
@@ -762,10 +762,8 @@ static VALUE ossl_ec_group_initialize(int argc, VALUE *argv, VALUE self)
method = EC_GFp_mont_method();
} else if (id == s_GFp_nist) {
method = EC_GFp_nist_method();
-#if !defined(OPENSSL_NO_EC2M)
} else if (id == s_GF2m_simple) {
method = EC_GF2m_simple_method();
-#endif
}
if (method) {
@@ -819,10 +817,8 @@ static VALUE ossl_ec_group_initialize(int argc, VALUE *argv, VALUE self)
if (id == s_GFp) {
new_curve = EC_GROUP_new_curve_GFp;
-#if !defined(OPENSSL_NO_EC2M)
} else if (id == s_GF2m) {
new_curve = EC_GROUP_new_curve_GF2m;
-#endif
} else {
ossl_raise(rb_eArgError, "unknown symbol, must be :GFp or :GF2m");
}
@@ -847,7 +843,6 @@ static VALUE ossl_ec_group_initialize(int argc, VALUE *argv, VALUE self)
}
/* call-seq:
- * group1.eql?(group2) => true | false
* group1 == group2 => true | false
*
*/
@@ -1317,7 +1312,6 @@ static VALUE ossl_ec_point_initialize(int argc, VALUE *argv, VALUE self)
/*
* call-seq:
- * point1.eql?(point2) => true | false
* point1 == point2 => true | false
*
*/
diff --git a/ext/openssl/ossl_pkey_rsa.c b/ext/openssl/ossl_pkey_rsa.c
index 4c346a042f..e395e7108f 100644
--- a/ext/openssl/ossl_pkey_rsa.c
+++ b/ext/openssl/ossl_pkey_rsa.c
@@ -291,9 +291,8 @@ ossl_rsa_is_private(VALUE self)
/*
* call-seq:
- * rsa.export([cipher, pass_phrase]) => PEM-format String
- * rsa.to_pem([cipher, pass_phrase]) => PEM-format String
- * rsa.to_s([cipher, pass_phrase]) => PEM-format String
+ * rsa.to_pem => PEM-format String
+ * rsa.to_pem(cipher, pass_phrase) => PEM-format String
*
* Outputs this keypair in PEM encoding. If +cipher+ and +pass_phrase+ are
* given they will be used to encrypt the key. +cipher+ must be an
diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c
index ec7135064a..d5c07d79a9 100644
--- a/ext/openssl/ossl_ssl.c
+++ b/ext/openssl/ossl_ssl.c
@@ -29,9 +29,6 @@ VALUE eSSLError;
VALUE cSSLContext;
VALUE cSSLSocket;
-static VALUE eSSLErrorWaitReadable;
-static VALUE eSSLErrorWaitWritable;
-
#define ossl_sslctx_set_cert(o,v) rb_iv_set((o),"@cert",(v))
#define ossl_sslctx_set_key(o,v) rb_iv_set((o),"@key",(v))
#define ossl_sslctx_set_client_ca(o,v) rb_iv_set((o),"@client_ca",(v))
@@ -103,8 +100,6 @@ static const char *ossl_ssl_attrs[] = {
ID ID_callback_state;
-static VALUE sym_exception;
-
/*
* SSLContext class
*/
@@ -423,7 +418,7 @@ ossl_sslctx_session_new_cb(SSL *ssl, SSL_SESSION *sess)
}
/*
- * return 0 which means to OpenSSL that the session is still
+ * return 0 which means to OpenSSL that the the session is still
* valid (since we created Ruby Session object) and was not freed by us
* with SSL_SESSION_free(). Call SSLContext#remove_session(sess) in
* session_get_cb block if you don't want OpenSSL to cache the session
@@ -477,7 +472,7 @@ ossl_sslctx_session_remove_cb(SSL_CTX *ctx, SSL_SESSION *sess)
}
static VALUE
-ossl_sslctx_add_extra_chain_cert_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, arg))
+ossl_sslctx_add_extra_chain_cert_i(VALUE i, VALUE arg)
{
X509 *x509;
SSL_CTX *ctx;
@@ -1097,7 +1092,6 @@ ossl_sslctx_flush_sessions(int argc, VALUE *argv, VALUE self)
/*
* SSLSocket class
*/
-#ifndef OPENSSL_NO_SOCK
static void
ossl_ssl_shutdown(SSL *ssl)
{
@@ -1122,6 +1116,7 @@ ossl_ssl_shutdown(SSL *ssl)
static void
ossl_ssl_free(SSL *ssl)
{
+ ossl_ssl_shutdown(ssl);
SSL_free(ssl);
}
@@ -1137,7 +1132,7 @@ ossl_ssl_s_alloc(VALUE klass)
* SSLSocket.new(io, ctx) => aSSLSocket
*
* Creates a new SSL socket from +io+ which must be a real ruby object (not an
- * IO-like object that responds to read/write).
+ * IO-like object that responds to read/write.
*
* If +ctx+ is provided the SSL Sockets initial params will be taken from
* the context.
@@ -1235,7 +1230,8 @@ static void
write_would_block(int nonblock)
{
if (nonblock) {
- VALUE exc = ossl_exc_new(eSSLErrorWaitWritable, "write would block");
+ VALUE exc = ossl_exc_new(eSSLError, "write would block");
+ rb_extend_object(exc, rb_mWaitWritable);
rb_exc_raise(exc);
}
}
@@ -1244,7 +1240,8 @@ static void
read_would_block(int nonblock)
{
if (nonblock) {
- VALUE exc = ossl_exc_new(eSSLErrorWaitReadable, "read would block");
+ VALUE exc = ossl_exc_new(eSSLError, "read would block");
+ rb_extend_object(exc, rb_mWaitReadable);
rb_exc_raise(exc);
}
}
@@ -1375,16 +1372,10 @@ ossl_ssl_read_internal(int argc, VALUE *argv, VALUE self, int nonblock)
{
SSL *ssl;
int ilen, nread = 0;
- int no_exception = 0;
VALUE len, str;
rb_io_t *fptr;
- VALUE opts = Qnil;
-
- rb_scan_args(argc, argv, "11:", &len, &str, &opts);
-
- if (!NIL_P(opts) && Qfalse == rb_hash_aref(opts, sym_exception))
- no_exception = 1;
+ rb_scan_args(argc, argv, "11", &len, &str);
ilen = NUM2INT(len);
if(NIL_P(str)) str = rb_str_new(0, ilen);
else{
@@ -1405,23 +1396,17 @@ ossl_ssl_read_internal(int argc, VALUE *argv, VALUE self, int nonblock)
case SSL_ERROR_NONE:
goto end;
case SSL_ERROR_ZERO_RETURN:
- if (no_exception) { return Qnil; }
rb_eof_error();
case SSL_ERROR_WANT_WRITE:
- if (no_exception) { return ID2SYM(rb_intern("wait_writable")); }
write_would_block(nonblock);
rb_io_wait_writable(FPTR_TO_FD(fptr));
continue;
case SSL_ERROR_WANT_READ:
- if (no_exception) { return ID2SYM(rb_intern("wait_readable")); }
read_would_block(nonblock);
rb_io_wait_readable(FPTR_TO_FD(fptr));
continue;
case SSL_ERROR_SYSCALL:
- if(ERR_peek_error() == 0 && nread == 0) {
- if (no_exception) { return Qnil; }
- rb_eof_error();
- }
+ if(ERR_peek_error() == 0 && nread == 0) rb_eof_error();
rb_sys_fail(0);
default:
ossl_raise(eSSLError, "SSL_read");
@@ -1459,11 +1444,9 @@ ossl_ssl_read(int argc, VALUE *argv, VALUE self)
* call-seq:
* ssl.sysread_nonblock(length) => string
* ssl.sysread_nonblock(length, buffer) => buffer
- * ssl.sysread_nonblock(length[, buffer [, opts]) => buffer
*
* A non-blocking version of #sysread. Raises an SSLError if reading would
- * block. If "exception: false" is passed, this method returns a symbol of
- * :wait_readable, :wait_writable, or nil, rather than raising an exception.
+ * block.
*
* Reads +length+ bytes from the SSL connection. If a pre-allocated +buffer+
* is provided the data will be written into it.
@@ -1475,7 +1458,7 @@ ossl_ssl_read_nonblock(int argc, VALUE *argv, VALUE self)
}
static VALUE
-ossl_ssl_write_internal(VALUE self, VALUE str, int nonblock, int no_exception)
+ossl_ssl_write_internal(VALUE self, VALUE str, int nonblock)
{
SSL *ssl;
int nwrite = 0;
@@ -1492,12 +1475,10 @@ ossl_ssl_write_internal(VALUE self, VALUE str, int nonblock, int no_exception)
case SSL_ERROR_NONE:
goto end;
case SSL_ERROR_WANT_WRITE:
- if (no_exception) { return ID2SYM(rb_intern("wait_writable")); }
write_would_block(nonblock);
rb_io_wait_writable(FPTR_TO_FD(fptr));
continue;
case SSL_ERROR_WANT_READ:
- if (no_exception) { return ID2SYM(rb_intern("wait_readable")); }
read_would_block(nonblock);
rb_io_wait_readable(FPTR_TO_FD(fptr));
continue;
@@ -1527,7 +1508,7 @@ ossl_ssl_write_internal(VALUE self, VALUE str, int nonblock, int no_exception)
static VALUE
ossl_ssl_write(VALUE self, VALUE str)
{
- return ossl_ssl_write_internal(self, str, 0, 0);
+ return ossl_ssl_write_internal(self, str, 0);
}
/*
@@ -1538,18 +1519,9 @@ ossl_ssl_write(VALUE self, VALUE str)
* SSLError if writing would block.
*/
static VALUE
-ossl_ssl_write_nonblock(int argc, VALUE *argv, VALUE self)
+ossl_ssl_write_nonblock(VALUE self, VALUE str)
{
- VALUE str;
- VALUE opts = Qnil;
- int no_exception = 0;
-
- rb_scan_args(argc, argv, "1:", &str, &opts);
-
- if (!NIL_P(opts) && Qfalse == rb_hash_aref(opts, sym_exception))
- no_exception = 1;
-
- return ossl_ssl_write_internal(self, str, 1, no_exception);
+ return ossl_ssl_write_internal(self, str, 1);
}
/*
@@ -1565,16 +1537,9 @@ ossl_ssl_close(VALUE self)
ossl_ssl_data_get_struct(self, ssl);
- if (ssl) {
- VALUE io = ossl_ssl_get_io(self);
- if (!RTEST(rb_funcall(io, rb_intern("closed?"), 0))) {
- ossl_ssl_shutdown(ssl);
- SSL_free(ssl);
- DATA_PTR(self) = NULL;
- if (RTEST(ossl_ssl_get_sync_close(self)))
- rb_funcall(io, rb_intern("close"), 0);
- }
- }
+ ossl_ssl_shutdown(ssl);
+ if (RTEST(ossl_ssl_get_sync_close(self)))
+ rb_funcall(ossl_ssl_get_io(self), rb_intern("close"), 0);
return Qnil;
}
@@ -1662,7 +1627,7 @@ ossl_ssl_get_peer_cert_chain(VALUE self)
/*
* call-seq:
-* ssl.ssl_version => String
+* ssl.version => String
*
* Returns a String representing the SSL/TLS version that was negotiated
* for the connection, for example "TLSv1.2".
@@ -1823,7 +1788,7 @@ ossl_ssl_get_client_ca_list(VALUE self)
return ossl_x509name_sk2ary(ca);
}
-# ifdef HAVE_OPENSSL_NPN_NEGOTIATED
+#ifdef HAVE_OPENSSL_NPN_NEGOTIATED
/*
* call-seq:
* ssl.npn_protocol => String
@@ -1846,8 +1811,7 @@ ossl_ssl_npn_protocol(VALUE self)
else
return rb_str_new((const char *) out, outlen);
}
-# endif
-#endif /* !defined(OPENSSL_NO_SOCK) */
+#endif
void
Init_ossl_ssl()
@@ -1882,10 +1846,6 @@ Init_ossl_ssl()
* Generic error class raised by SSLSocket and SSLContext.
*/
eSSLError = rb_define_class_under(mSSL, "SSLError", eOSSLError);
- eSSLErrorWaitReadable = rb_define_class_under(mSSL, "SSLErrorWaitReadable", eSSLError);
- rb_include_module(eSSLErrorWaitReadable, rb_mWaitReadable);
- eSSLErrorWaitWritable = rb_define_class_under(mSSL, "SSLErrorWaitWritable", eSSLError);
- rb_include_module(eSSLErrorWaitWritable, rb_mWaitWritable);
Init_ossl_ssl_session();
@@ -2004,7 +1964,7 @@ Init_ossl_ssl()
/*
* Sets the context in which a session can be reused. This allows
- * sessions for multiple applications to be distinguished, for example, by
+ * sessions for multiple applications to be distinguished, for exapmle, by
* name.
*/
rb_attr(cSSLContext, rb_intern("session_id_context"), 1, 1, Qfalse);
@@ -2178,9 +2138,6 @@ Init_ossl_ssl()
*
*/
cSSLSocket = rb_define_class_under(mSSL, "SSLSocket", rb_cObject);
-#ifdef OPENSSL_NO_SOCK
- rb_define_method(cSSLSocket, "initialize", rb_notimplement, -1);
-#else
rb_define_alloc_func(cSSLSocket, ossl_ssl_s_alloc);
for(i = 0; i < numberof(ossl_ssl_attr_readers); i++)
rb_attr(cSSLSocket, rb_intern(ossl_ssl_attr_readers[i]), 1, 0, Qfalse);
@@ -2195,7 +2152,7 @@ Init_ossl_ssl()
rb_define_method(cSSLSocket, "sysread", ossl_ssl_read, -1);
rb_define_private_method(cSSLSocket, "sysread_nonblock", ossl_ssl_read_nonblock, -1);
rb_define_method(cSSLSocket, "syswrite", ossl_ssl_write, 1);
- rb_define_private_method(cSSLSocket, "syswrite_nonblock", ossl_ssl_write_nonblock, -1);
+ rb_define_private_method(cSSLSocket, "syswrite_nonblock", ossl_ssl_write_nonblock, 1);
rb_define_method(cSSLSocket, "sysclose", ossl_ssl_close, 0);
rb_define_method(cSSLSocket, "cert", ossl_ssl_get_cert, 0);
rb_define_method(cSSLSocket, "peer_cert", ossl_ssl_get_peer_cert, 0);
@@ -2209,9 +2166,8 @@ Init_ossl_ssl()
rb_define_method(cSSLSocket, "session=", ossl_ssl_set_session, 1);
rb_define_method(cSSLSocket, "verify_result", ossl_ssl_get_verify_result, 0);
rb_define_method(cSSLSocket, "client_ca", ossl_ssl_get_client_ca_list, 0);
-# ifdef HAVE_OPENSSL_NPN_NEGOTIATED
+#ifdef HAVE_OPENSSL_NPN_NEGOTIATED
rb_define_method(cSSLSocket, "npn_protocol", ossl_ssl_npn_protocol, 0);
-# endif
#endif
#define ossl_ssl_def_const(x) rb_define_const(mSSL, #x, INT2NUM(SSL_##x))
@@ -2266,6 +2222,4 @@ Init_ossl_ssl()
ossl_ssl_def_const(OP_PKCS1_CHECK_2);
ossl_ssl_def_const(OP_NETSCAPE_CA_DN_BUG);
ossl_ssl_def_const(OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG);
-
- sym_exception = ID2SYM(rb_intern("exception"));
}
diff --git a/ext/openssl/ossl_x509attr.c b/ext/openssl/ossl_x509attr.c
index d50f88c969..1f36ca8b12 100644
--- a/ext/openssl/ossl_x509attr.c
+++ b/ext/openssl/ossl_x509attr.c
@@ -165,8 +165,8 @@ ossl_x509attr_get_oid(VALUE self)
# define OSSL_X509ATTR_IS_SINGLE(attr) ((attr)->single)
# define OSSL_X509ATTR_SET_SINGLE(attr) ((attr)->single = 1)
#else
-# define OSSL_X509ATTR_IS_SINGLE(attr) (!(attr)->value.set)
-# define OSSL_X509ATTR_SET_SINGLE(attr) ((attr)->value.set = 0)
+# define OSSL_X509ATTR_IS_SINGLE(attr) (!(attr)->set)
+# define OSSL_X509ATTR_SET_SINGLE(attr) ((attr)->set = 0)
#endif
/*
diff --git a/ext/openssl/ossl_x509name.c b/ext/openssl/ossl_x509name.c
index 6de79d45e9..4b397055ab 100644
--- a/ext/openssl/ossl_x509name.c
+++ b/ext/openssl/ossl_x509name.c
@@ -92,7 +92,7 @@ static VALUE ossl_x509name_add_entry(int, VALUE*, VALUE);
#define rb_aref(obj, key) rb_funcall((obj), id_aref, 1, (key))
static VALUE
-ossl_x509name_init_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, args))
+ossl_x509name_init_i(VALUE i, VALUE args)
{
VALUE self = rb_ary_entry(args, 0);
VALUE template = rb_ary_entry(args, 1);
@@ -459,7 +459,7 @@ Init_ossl_x509name()
*/
rb_define_const(cX509Name, "DEFAULT_OBJECT_TYPE", utf8str);
hash = rb_hash_new();
- RHASH_SET_IFNONE(hash, utf8str);
+ RHASH(hash)->ifnone = utf8str;
rb_hash_aset(hash, rb_str_new2("C"), ptrstr);
rb_hash_aset(hash, rb_str_new2("countryName"), ptrstr);
rb_hash_aset(hash, rb_str_new2("serialNumber"), ptrstr);
diff --git a/ext/openssl/ossl_x509store.c b/ext/openssl/ossl_x509store.c
index f59c376574..5e3094ee9f 100644
--- a/ext/openssl/ossl_x509store.c
+++ b/ext/openssl/ossl_x509store.c
@@ -135,9 +135,9 @@ ossl_x509store_initialize(int argc, VALUE *argv, VALUE self)
ossl_x509store_set_vfy_cb(self, Qnil);
#if (OPENSSL_VERSION_NUMBER < 0x00907000L)
- rb_iv_set(self, "@flags", INT2FIX(0));
- rb_iv_set(self, "@purpose", INT2FIX(0));
- rb_iv_set(self, "@trust", INT2FIX(0));
+ rb_iv_set(self, "@flags", INT2NUM(0));
+ rb_iv_set(self, "@purpose", INT2NUM(0));
+ rb_iv_set(self, "@trust", INT2NUM(0));
#endif
/* last verification status */
@@ -257,7 +257,7 @@ ossl_x509store_add_path(VALUE self, VALUE dir)
/*
* call-seq:
- * store.set_default_paths
+ * store.set_default_path
*
* Adds the default certificates to the certificate store. These certificates
* are loaded from the default configuration directory which can usually be
diff --git a/ext/pathname/depend b/ext/pathname/depend
deleted file mode 100644
index 79b6c53f50..0000000000
--- a/ext/pathname/depend
+++ /dev/null
@@ -1,3 +0,0 @@
-$(OBJS): $(HDRS) $(ruby_headers) \
- $(hdrdir)/ruby/encoding.h \
- $(hdrdir)/ruby/oniguruma.h
diff --git a/ext/pathname/pathname.c b/ext/pathname/pathname.c
index 3db97fcf3d..2bb6ce2f3c 100644
--- a/ext/pathname/pathname.c
+++ b/ext/pathname/pathname.c
@@ -183,7 +183,7 @@ path_inspect(VALUE self)
{
const char *c = rb_obj_classname(self);
VALUE str = get_strpath(self);
- return rb_sprintf("#<%s:%"PRIsVALUE">", c, str);
+ return rb_sprintf("#<%s:%s>", c, RSTRING_PTR(str));
}
/*
@@ -346,48 +346,6 @@ path_binread(int argc, VALUE *argv, VALUE self)
/*
* call-seq:
- * pathname.write(string, [offset] ) => fixnum
- * pathname.write(string, [offset], open_args ) => fixnum
- *
- * Writes +contents+ to the file.
- *
- * See IO.write.
- *
- */
-static VALUE
-path_write(int argc, VALUE *argv, VALUE self)
-{
- VALUE args[4];
- int n;
-
- args[0] = get_strpath(self);
- n = rb_scan_args(argc, argv, "03", &args[1], &args[2], &args[3]);
- return rb_funcall2(rb_cIO, rb_intern("write"), 1+n, args);
-}
-
-/*
- * call-seq:
- * pathname.binwrite(string, [offset] ) => fixnum
- * pathname.binwrite(string, [offset], open_args ) => fixnum
- *
- * Writes +contents+ to the file, opening it in binary mode.
- *
- * See IO.binwrite.
- *
- */
-static VALUE
-path_binwrite(int argc, VALUE *argv, VALUE self)
-{
- VALUE args[4];
- int n;
-
- args[0] = get_strpath(self);
- n = rb_scan_args(argc, argv, "03", &args[1], &args[2], &args[3]);
- return rb_funcall2(rb_cIO, rb_intern("binwrite"), 1+n, args);
-}
-
-/*
- * call-seq:
* pathname.readlines(sep=$/ [, open_args]) -> array
* pathname.readlines(limit [, open_args]) -> array
* pathname.readlines(sep, limit [, open_args]) -> array
@@ -968,7 +926,7 @@ path_zero_p(VALUE self)
}
static VALUE
-glob_i(RB_BLOCK_CALL_FUNC_ARGLIST(elt, klass))
+glob_i(VALUE elt, VALUE klass, int argc, VALUE *argv)
{
return rb_yield(rb_class_new_instance(1, &elt, klass));
}
@@ -997,7 +955,7 @@ path_s_glob(int argc, VALUE *argv, VALUE klass)
ary = rb_funcall2(rb_cDir, rb_intern("glob"), n, args);
ary = rb_convert_type(ary, T_ARRAY, "Array", "to_ary");
for (i = 0; i < RARRAY_LEN(ary); i++) {
- VALUE elt = RARRAY_AREF(ary, i);
+ VALUE elt = RARRAY_PTR(ary)[i];
elt = rb_class_new_instance(1, &elt, klass);
rb_ary_store(ary, i, elt);
}
@@ -1057,7 +1015,7 @@ path_entries(VALUE self)
ary = rb_funcall(rb_cDir, rb_intern("entries"), 1, str);
ary = rb_convert_type(ary, T_ARRAY, "Array", "to_ary");
for (i = 0; i < RARRAY_LEN(ary); i++) {
- VALUE elt = RARRAY_AREF(ary, i);
+ VALUE elt = RARRAY_PTR(ary)[i];
elt = rb_class_new_instance(1, &elt, klass);
rb_ary_store(ary, i, elt);
}
@@ -1106,7 +1064,7 @@ path_opendir(VALUE self)
}
static VALUE
-each_entry_i(RB_BLOCK_CALL_FUNC_ARGLIST(elt, klass))
+each_entry_i(VALUE elt, VALUE klass, int argc, VALUE *argv)
{
return rb_yield(rb_class_new_instance(1, &elt, klass));
}
@@ -1149,20 +1107,7 @@ path_unlink(VALUE self)
}
/*
- * :call-seq:
- * Pathname(path) -> pathname
- *
- * Creates a new Pathname object from the given string, +path+, and returns
- * pathname object.
- *
- * In order to use this constructor, you must first require the Pathname
- * standard library extension.
- *
- * require 'pathname'
- * Pathname("/home/zzak")
- * #=> #<Pathname:/home/zzak>
- *
- * See also Pathname::new for more information.
+ * Creates a new Pathname object.
*/
static VALUE
path_f_pathname(VALUE self, VALUE str)
@@ -1376,8 +1321,6 @@ Init_pathname()
rb_define_method(rb_cPathname, "read", path_read, -1);
rb_define_method(rb_cPathname, "binread", path_binread, -1);
rb_define_method(rb_cPathname, "readlines", path_readlines, -1);
- rb_define_method(rb_cPathname, "write", path_write, -1);
- rb_define_method(rb_cPathname, "binwrite", path_binwrite, -1);
rb_define_method(rb_cPathname, "sysopen", path_sysopen, -1);
rb_define_method(rb_cPathname, "atime", path_atime, 0);
rb_define_method(rb_cPathname, "ctime", path_ctime, 0);
diff --git a/ext/psych/depend b/ext/psych/depend
deleted file mode 100644
index 79b6c53f50..0000000000
--- a/ext/psych/depend
+++ /dev/null
@@ -1,3 +0,0 @@
-$(OBJS): $(HDRS) $(ruby_headers) \
- $(hdrdir)/ruby/encoding.h \
- $(hdrdir)/ruby/oniguruma.h
diff --git a/ext/psych/lib/psych.rb b/ext/psych/lib/psych.rb
index 2a87f43efe..e9571b7414 100644
--- a/ext/psych/lib/psych.rb
+++ b/ext/psych/lib/psych.rb
@@ -41,74 +41,16 @@ require 'psych/handlers/document_stream'
# Psych provides a range of interfaces for parsing a YAML document ranging from
# low level to high level, depending on your parsing needs. At the lowest
# level, is an event based parser. Mid level is access to the raw YAML AST,
-# and at the highest level is the ability to unmarshal YAML to Ruby objects.
+# and at the highest level is the ability to unmarshal YAML to ruby objects.
#
-# == YAML Emitting
-#
-# Psych provides a range of interfaces ranging from low to high level for
-# producing YAML documents. Very similar to the YAML parsing interfaces, Psych
-# provides at the lowest level, an event based system, mid-level is building
-# a YAML AST, and the highest level is converting a Ruby object straight to
-# a YAML document.
-#
-# == High-level API
-#
-# === Parsing
-#
-# The high level YAML parser provided by Psych simply takes YAML as input and
-# returns a Ruby data structure. For information on using the high level parser
-# see Psych.load
-#
-# ==== Reading from a string
-#
-# Psych.load("--- a") # => 'a'
-# Psych.load("---\n - a\n - b") # => ['a', 'b']
-#
-# ==== Reading from a file
-#
-# Psych.load_file("database.yml")
-#
-# ==== Exception handling
-#
-# begin
-# # The second argument chnages only the exception contents
-# Psych.parse("--- `", "file.txt")
-# rescue Psych::SyntaxError => ex
-# ex.file # => 'file.txt'
-# ex.message # => "(file.txt): found character that cannot start any token"
-# end
-#
-# === Emitting
-#
-# The high level emitter has the easiest interface. Psych simply takes a Ruby
-# data structure and converts it to a YAML document. See Psych.dump for more
-# information on dumping a Ruby data structure.
-#
-# ==== Writing to a string
+# === Low level parsing
#
-# # Dump an array, get back a YAML string
-# Psych.dump(['a', 'b']) # => "---\n- a\n- b\n"
-#
-# # Dump an array to an IO object
-# Psych.dump(['a', 'b'], StringIO.new) # => #<StringIO:0x000001009d0890>
-#
-# # Dump an array with indentation set
-# Psych.dump(['a', ['b']], :indentation => 3) # => "---\n- a\n- - b\n"
-#
-# # Dump an array to an IO with indentation set
-# Psych.dump(['a', ['b']], StringIO.new, :indentation => 3)
-#
-# ==== Writing to a file
-#
-# Currently there is no direct API for dumping Ruby structure to file:
-#
-# File.open('database.yml', 'w') do |file|
-# file.write(Psych.dump(['a', 'b']))
-# end
-#
-# == Mid-level API
+# The lowest level parser should be used when the YAML input is already known,
+# and the developer does not want to pay the price of building an AST or
+# automatic detection and conversion to ruby objects. See Psych::Parser for
+# more information on using the event based parser.
#
-# === Parsing
+# === Mid level parsing
#
# Psych provides access to an AST produced from parsing a YAML document. This
# tree is built using the Psych::Parser and Psych::TreeBuilder. The AST can
@@ -116,33 +58,28 @@ require 'psych/handlers/document_stream'
# Psych::Nodes, and Psych::Nodes::Node for more information on dealing with
# YAML syntax trees.
#
-# ==== Reading from a string
+# === High level parsing
#
-# # Returns Psych::Nodes::Stream
-# Psych.parse_stream("---\n - a\n - b")
-#
-# # Returns Psych::Nodes::Document
-# Psych.parse("---\n - a\n - b")
-#
-# ==== Reading from a file
+# The high level YAML parser provided by Psych simply takes YAML as input and
+# returns a Ruby data structure. For information on using the high level parser
+# see Psych.load
#
-# # Returns Psych::Nodes::Stream
-# Psych.parse_stream(File.read('database.yml'))
+# == YAML Emitting
#
-# # Returns Psych::Nodes::Document
-# Psych.parse_file('database.yml')
+# Psych provides a range of interfaces ranging from low to high level for
+# producing YAML documents. Very similar to the YAML parsing interfaces, Psych
+# provides at the lowest level, an event based system, mid-level is building
+# a YAML AST, and the highest level is converting a Ruby object straight to
+# a YAML document.
#
-# ==== Exception handling
+# === Low level emitting
#
-# begin
-# # The second argument chnages only the exception contents
-# Psych.parse("--- `", "file.txt")
-# rescue Psych::SyntaxError => ex
-# ex.file # => 'file.txt'
-# ex.message # => "(file.txt): found character that cannot start any token"
-# end
+# The lowest level emitter is an event based system. Events are sent to a
+# Psych::Emitter object. That object knows how to convert the events to a YAML
+# document. This interface should be used when document format is known in
+# advance or speed is a concern. See Psych::Emitter for more information.
#
-# === Emitting
+# === Mid level emitting
#
# At the mid level is building an AST. This AST is exactly the same as the AST
# used when parsing a YAML document. Users can build an AST by hand and the
@@ -150,77 +87,25 @@ require 'psych/handlers/document_stream'
# Psych::Nodes::Node, and Psych::TreeBuilder for more information on building
# a YAML AST.
#
-# ==== Writing to a string
+# === High level emitting
#
-# # We need Psych::Nodes::Stream (not Psych::Nodes::Document)
-# stream = Psych.parse_stream("---\n - a\n - b")
-#
-# stream.to_yaml # => "---\n- a\n- b\n"
-#
-# ==== Writing to a file
-#
-# # We need Psych::Nodes::Stream (not Psych::Nodes::Document)
-# stream = Psych.parse_stream(File.read('database.yml'))
-#
-# File.open('database.yml', 'w') do |file|
-# file.write(stream.to_yaml)
-# end
-#
-# == Low-level API
-#
-# === Parsing
-#
-# The lowest level parser should be used when the YAML input is already known,
-# and the developer does not want to pay the price of building an AST or
-# automatic detection and conversion to Ruby objects. See Psych::Parser for
-# more information on using the event based parser.
-#
-# ==== Reading to Psych::Nodes::Stream structure
-#
-# parser = Psych::Parser.new(TreeBuilder.new) # => #<Psych::Parser>
-# parser = Psych.parser # it's an alias for the above
-#
-# parser.parse("---\n - a\n - b") # => #<Psych::Parser>
-# parser.handler # => #<Psych::TreeBuilder>
-# parser.handler.root # => #<Psych::Nodes::Stream>
-#
-# ==== Receiving an events stream
-#
-# parser = Psych::Parser.new(Psych::Handlers::Recorder.new)
-#
-# parser.parse("---\n - a\n - b")
-# parser.events # => [list of [event, args] lists]
-# # event is one of: Psych::Handler::EVENTS
-# # args are the arguments passed to the event
-#
-# === Emitting
-#
-# The lowest level emitter is an event based system. Events are sent to a
-# Psych::Emitter object. That object knows how to convert the events to a YAML
-# document. This interface should be used when document format is known in
-# advance or speed is a concern. See Psych::Emitter for more information.
-#
-# ==== Writing to a Ruby structure
-#
-# Psych.parser.parse("--- a") # => #<Psych::Parser>
-#
-# parser.handler.first # => #<Psych::Nodes::Stream>
-# parser.handler.first.to_ruby # => ["a"]
-#
-# parser.handler.root.first # => #<Psych::Nodes::Document>
-# parser.handler.root.first.to_ruby # => "a"
-#
-# # You can instantiate an Emitter manually
-# Psych::Visitors::ToRuby.new.accept(parser.handler.root.first)
-# # => "a"
+# The high level emitter has the easiest interface. Psych simply takes a Ruby
+# data structure and converts it to a YAML document. See Psych.dump for more
+# information on dumping a Ruby data structure.
module Psych
# The version is Psych you're using
- VERSION = '2.0.2'
+ VERSION = '2.0.0'
# The version of libyaml Psych is using
LIBYAML_VERSION = Psych.libyaml_version.join '.'
+ class Exception < RuntimeError
+ end
+
+ class BadAlias < Exception
+ end
+
###
# Load +yaml+ in to a Ruby data structure. If multiple documents are
# provided, the object contained in the first document will be returned.
@@ -246,56 +131,7 @@ module Psych
end
###
- # Safely load the yaml string in +yaml+. By default, only the following
- # classes are allowed to be deserialized:
- #
- # * TrueClass
- # * FalseClass
- # * NilClass
- # * Numeric
- # * String
- # * Array
- # * Hash
- #
- # Recursive data structures are not allowed by default. Arbitrary classes
- # can be allowed by adding those classes to the +whitelist+. They are
- # additive. For example, to allow Date deserialization:
- #
- # Psych.safe_load(yaml, [Date])
- #
- # Now the Date class can be loaded in addition to the classes listed above.
- #
- # Aliases can be explicitly allowed by changing the +aliases+ parameter.
- # For example:
- #
- # x = []
- # x << x
- # yaml = Psych.dump x
- # Psych.safe_load yaml # => raises an exception
- # Psych.safe_load yaml, [], [], true # => loads the aliases
- #
- # A Psych::DisallowedClass exception will be raised if the yaml contains a
- # class that isn't in the whitelist.
- #
- # A Psych::BadAlias exception will be raised if the yaml contains aliases
- # but the +aliases+ parameter is set to false.
- def self.safe_load yaml, whitelist_classes = [], whitelist_symbols = [], aliases = false, filename = nil
- result = parse(yaml, filename)
- return unless result
-
- class_loader = ClassLoader::Restricted.new(whitelist_classes.map(&:to_s),
- whitelist_symbols.map(&:to_s))
- scanner = ScalarScanner.new class_loader
- if aliases
- visitor = Visitors::ToRuby.new scanner, class_loader
- else
- visitor = Visitors::NoAliasRuby.new scanner, class_loader
- end
- visitor.accept result
- end
-
- ###
- # Parse a YAML string in +yaml+. Returns the Psych::Nodes::Document.
+ # Parse a YAML string in +yaml+. Returns the first object of a YAML AST.
# +filename+ is used in the exception message if a Psych::SyntaxError is
# raised.
#
@@ -303,7 +139,7 @@ module Psych
#
# Example:
#
- # Psych.parse("---\n - a\n - b") # => #<Psych::Nodes::Document:0x00>
+ # Psych.parse("---\n - a\n - b") # => #<Psych::Nodes::Sequence:0x00>
#
# begin
# Psych.parse("--- `", "file.txt")
@@ -321,7 +157,7 @@ module Psych
end
###
- # Parse a file at +filename+. Returns the Psych::Nodes::Document.
+ # Parse a file at +filename+. Returns the YAML AST.
#
# Raises a Psych::SyntaxError when a YAML syntax error is detected.
def self.parse_file filename
@@ -337,7 +173,7 @@ module Psych
end
###
- # Parse a YAML string in +yaml+. Returns the Psych::Nodes::Stream.
+ # Parse a YAML string in +yaml+. Returns the full AST for the YAML document.
# This method can handle multiple YAML documents contained in +yaml+.
# +filename+ is used in the exception message if a Psych::SyntaxError is
# raised.
@@ -404,7 +240,7 @@ module Psych
io = nil
end
- visitor = Psych::Visitors::YAMLTree.create options
+ visitor = Psych::Visitors::YAMLTree.new options
visitor << o
visitor.tree.yaml io, options
end
@@ -416,7 +252,7 @@ module Psych
#
# Psych.dump_stream("foo\n ", {}) # => "--- ! \"foo\\n \"\n--- {}\n"
def self.dump_stream *objects
- visitor = Psych::Visitors::YAMLTree.create({})
+ visitor = Psych::Visitors::YAMLTree.new {}
objects.each do |o|
visitor << o
end
@@ -424,16 +260,16 @@ module Psych
end
###
- # Dump Ruby +object+ to a JSON string.
- def self.to_json object
- visitor = Psych::Visitors::JSONTree.create
- visitor << object
+ # Dump Ruby object +o+ to a JSON string.
+ def self.to_json o
+ visitor = Psych::Visitors::JSONTree.new
+ visitor << o
visitor.tree.yaml
end
###
# Load multiple documents given in +yaml+. Returns the parsed documents
- # as a list. If a block is given, each document will be converted to Ruby
+ # as a list. If a block is given, each document will be converted to ruby
# and passed to the block during parsing
#
# Example:
@@ -458,7 +294,7 @@ module Psych
###
# Load the document contained in +filename+. Returns the yaml contained in
- # +filename+ as a Ruby object
+ # +filename+ as a ruby object
def self.load_file filename
File.open(filename, 'r:bom|utf-8') { |f| self.load f, filename }
end
@@ -484,7 +320,7 @@ module Psych
@load_tags = {}
@dump_tags = {}
def self.add_tag tag, klass
- @load_tags[tag] = klass.name
+ @load_tags[tag] = klass
@dump_tags[klass] = tag
end
diff --git a/ext/psych/lib/psych/class_loader.rb b/ext/psych/lib/psych/class_loader.rb
deleted file mode 100644
index 46c6b93627..0000000000
--- a/ext/psych/lib/psych/class_loader.rb
+++ /dev/null
@@ -1,101 +0,0 @@
-require 'psych/omap'
-require 'psych/set'
-
-module Psych
- class ClassLoader # :nodoc:
- BIG_DECIMAL = 'BigDecimal'
- COMPLEX = 'Complex'
- DATE = 'Date'
- DATE_TIME = 'DateTime'
- EXCEPTION = 'Exception'
- OBJECT = 'Object'
- PSYCH_OMAP = 'Psych::Omap'
- PSYCH_SET = 'Psych::Set'
- RANGE = 'Range'
- RATIONAL = 'Rational'
- REGEXP = 'Regexp'
- STRUCT = 'Struct'
- SYMBOL = 'Symbol'
-
- def initialize
- @cache = CACHE.dup
- end
-
- def load klassname
- return nil if !klassname || klassname.empty?
-
- find klassname
- end
-
- def symbolize sym
- symbol
- sym.to_sym
- end
-
- constants.each do |const|
- konst = const_get const
- define_method(const.to_s.downcase) do
- load konst
- end
- end
-
- private
-
- def find klassname
- @cache[klassname] ||= resolve(klassname)
- end
-
- def resolve klassname
- name = klassname
- retried = false
-
- begin
- path2class(name)
- rescue ArgumentError, NameError => ex
- unless retried
- name = "Struct::#{name}"
- retried = ex
- retry
- end
- raise retried
- end
- end
-
- CACHE = Hash[constants.map { |const|
- val = const_get const
- begin
- [val, ::Object.const_get(val)]
- rescue
- nil
- end
- }.compact]
-
- class Restricted < ClassLoader
- def initialize classes, symbols
- @classes = classes
- @symbols = symbols
- super()
- end
-
- def symbolize sym
- return super if @symbols.empty?
-
- if @symbols.include? sym
- super
- else
- raise DisallowedClass, 'Symbol'
- end
- end
-
- private
-
- def find klassname
- if @classes.include? klassname
- super
- else
- raise DisallowedClass, klassname
- end
- end
- end
- end
-end
diff --git a/ext/psych/lib/psych/deprecated.rb b/ext/psych/lib/psych/deprecated.rb
index 8c310b3207..1e42859b22 100644
--- a/ext/psych/lib/psych/deprecated.rb
+++ b/ext/psych/lib/psych/deprecated.rb
@@ -35,8 +35,7 @@ module Psych
warn "#{caller[0]}: detect_implicit is deprecated" if $VERBOSE
return '' unless String === thing
return 'null' if '' == thing
- ss = ScalarScanner.new(ClassLoader.new)
- ss.tokenize(thing).class.name.downcase
+ ScalarScanner.new.tokenize(thing).class.name.downcase
end
def self.add_ruby_type type_tag, &block
diff --git a/ext/psych/lib/psych/exception.rb b/ext/psych/lib/psych/exception.rb
deleted file mode 100644
index ce9d2caf3f..0000000000
--- a/ext/psych/lib/psych/exception.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-module Psych
- class Exception < RuntimeError
- end
-
- class BadAlias < Exception
- end
-
- class DisallowedClass < Exception
- def initialize klass_name
- super "Tried to load unspecified class: #{klass_name}"
- end
- end
-end
diff --git a/ext/psych/lib/psych/json/stream.rb b/ext/psych/lib/psych/json/stream.rb
index fe2a6e9116..be1a0a8a82 100644
--- a/ext/psych/lib/psych/json/stream.rb
+++ b/ext/psych/lib/psych/json/stream.rb
@@ -6,7 +6,6 @@ module Psych
class Stream < Psych::Visitors::JSONTree
include Psych::JSON::RubyEvents
include Psych::Streaming
- extend Psych::Streaming::ClassMethods
class Emitter < Psych::Stream::Emitter # :nodoc:
include Psych::JSON::YAMLEvents
diff --git a/ext/psych/lib/psych/nodes/node.rb b/ext/psych/lib/psych/nodes/node.rb
index 83233a61fd..0cefe44e44 100644
--- a/ext/psych/lib/psych/nodes/node.rb
+++ b/ext/psych/lib/psych/nodes/node.rb
@@ -1,6 +1,4 @@
require 'stringio'
-require 'psych/class_loader'
-require 'psych/scalar_scanner'
module Psych
module Nodes
@@ -34,7 +32,7 @@ module Psych
#
# See also Psych::Visitors::ToRuby
def to_ruby
- Visitors::ToRuby.create.accept(self)
+ Visitors::ToRuby.new.accept self
end
alias :transform :to_ruby
diff --git a/ext/psych/lib/psych/scalar_scanner.rb b/ext/psych/lib/psych/scalar_scanner.rb
index 3fc9edd25d..d0beee3626 100644
--- a/ext/psych/lib/psych/scalar_scanner.rb
+++ b/ext/psych/lib/psych/scalar_scanner.rb
@@ -5,7 +5,7 @@ module Psych
# Scan scalars for built in types
class ScalarScanner
# Taken from http://yaml.org/type/timestamp.html
- TIME = /^-?\d{4}-\d{1,2}-\d{1,2}(?:[Tt]|\s+)\d{1,2}:\d\d:\d\d(?:\.\d*)?(?:\s*(?:Z|[-+]\d{1,2}:?(?:\d\d)?))?$/
+ TIME = /^\d{4}-\d{1,2}-\d{1,2}([Tt]|\s+)\d{1,2}:\d\d:\d\d(\.\d*)?(\s*Z|[-+]\d{1,2}(:\d\d)?)?/
# Taken from http://yaml.org/type/float.html
FLOAT = /^(?:[-+]?([0-9][0-9_,]*)?\.[0-9]*([eE][-+][0-9]+)?(?# base 10)
@@ -19,16 +19,13 @@ module Psych
|[-+]?(?:0|[1-9][0-9_]*) (?# base 10)
|[-+]?0x[0-9a-fA-F_]+ (?# base 16))$/x
- attr_reader :class_loader
-
# Create a new scanner
- def initialize class_loader
+ def initialize
@string_cache = {}
@symbol_cache = {}
- @class_loader = class_loader
end
- # Tokenize +string+ returning the Ruby object
+ # Tokenize +string+ returning the ruby object
def tokenize string
return nil if string.empty?
return string if @string_cache.key?(string)
@@ -66,21 +63,21 @@ module Psych
when /^\d{4}-(?:1[012]|0\d|\d)-(?:[12]\d|3[01]|0\d|\d)$/
require 'date'
begin
- class_loader.date.strptime(string, '%Y-%m-%d')
+ Date.strptime(string, '%Y-%m-%d')
rescue ArgumentError
string
end
when /^\.inf$/i
- Float::INFINITY
+ 1 / 0.0
when /^-\.inf$/i
- -Float::INFINITY
+ -1 / 0.0
when /^\.nan$/i
- Float::NAN
+ 0.0 / 0.0
when /^:./
if string =~ /^:(["'])(.*)\1/
- @symbol_cache[string] = class_loader.symbolize($2.sub(/^:/, ''))
+ @symbol_cache[string] = $2.sub(/^:/, '').to_sym
else
- @symbol_cache[string] = class_loader.symbolize(string.sub(/^:/, ''))
+ @symbol_cache[string] = string.sub(/^:/, '').to_sym
end
when /^[-+]?[0-9][0-9_]*(:[0-5]?[0-9])+$/
i = 0
@@ -95,11 +92,11 @@ module Psych
end
i
when FLOAT
- if string =~ /\A[-+]?\.\Z/
+ if string == '.'
@string_cache[string] = true
string
else
- Float(string.gsub(/[,_]|\.$/, ''))
+ Float(string.gsub(/[,_]/, ''))
end
else
int = parse_int string.gsub(/[,_]/, '')
@@ -120,19 +117,17 @@ module Psych
###
# Parse and return a Time from +string+
def parse_time string
- klass = class_loader.load 'Time'
-
date, time = *(string.split(/[ tT]/, 2))
- (yy, m, dd) = date.match(/^(-?\d{4})-(\d{1,2})-(\d{1,2})/).captures.map { |x| x.to_i }
+ (yy, m, dd) = date.split('-').map { |x| x.to_i }
md = time.match(/(\d+:\d+:\d+)(?:\.(\d*))?\s*(Z|[-+]\d+(:\d\d)?)?/)
(hh, mm, ss) = md[1].split(':').map { |x| x.to_i }
us = (md[2] ? Rational("0.#{md[2]}") : 0) * 1000000
- time = klass.utc(yy, m, dd, hh, mm, ss, us)
+ time = Time.utc(yy, m, dd, hh, mm, ss, us)
return time if 'Z' == md[3]
- return klass.at(time.to_i, us) unless md[3]
+ return Time.at(time.to_i, us) unless md[3]
tz = md[3].match(/^([+\-]?\d{1,2})\:?(\d{1,2})?$/)[1..-1].compact.map { |digit| Integer(digit, 10) }
offset = tz.first * 3600
@@ -143,7 +138,7 @@ module Psych
offset += ((tz[1] || 0) * 60)
end
- klass.at((time - offset).to_i, us)
+ Time.at((time - offset).to_i, us)
end
end
end
diff --git a/ext/psych/lib/psych/stream.rb b/ext/psych/lib/psych/stream.rb
index 88c4c4cb4e..567c1bb790 100644
--- a/ext/psych/lib/psych/stream.rb
+++ b/ext/psych/lib/psych/stream.rb
@@ -32,6 +32,5 @@ module Psych
end
include Psych::Streaming
- extend Psych::Streaming::ClassMethods
end
end
diff --git a/ext/psych/lib/psych/streaming.rb b/ext/psych/lib/psych/streaming.rb
index 9d94eb549f..c6fa109d5a 100644
--- a/ext/psych/lib/psych/streaming.rb
+++ b/ext/psych/lib/psych/streaming.rb
@@ -1,15 +1,10 @@
module Psych
module Streaming
- module ClassMethods
- ###
- # Create a new streaming emitter. Emitter will print to +io+. See
- # Psych::Stream for an example.
- def new io
- emitter = const_get(:Emitter).new(io)
- class_loader = ClassLoader.new
- ss = ScalarScanner.new class_loader
- super(emitter, ss, {})
- end
+ ###
+ # Create a new streaming emitter. Emitter will print to +io+. See
+ # Psych::Stream for an example.
+ def initialize io
+ super({}, self.class.const_get(:Emitter).new(io))
end
###
diff --git a/ext/psych/lib/psych/syntax_error.rb b/ext/psych/lib/psych/syntax_error.rb
index e200ef0060..f972256f9e 100644
--- a/ext/psych/lib/psych/syntax_error.rb
+++ b/ext/psych/lib/psych/syntax_error.rb
@@ -1,7 +1,8 @@
-require 'psych/exception'
-
module Psych
- class SyntaxError < Psych::Exception
+ class Error < RuntimeError
+ end
+
+ class SyntaxError < Error
attr_reader :file, :line, :column, :offset, :problem, :context
def initialize file, line, col, offset, problem, context
diff --git a/ext/psych/lib/psych/visitors/json_tree.rb b/ext/psych/lib/psych/visitors/json_tree.rb
index 0127ac8aa8..0350dd1faa 100644
--- a/ext/psych/lib/psych/visitors/json_tree.rb
+++ b/ext/psych/lib/psych/visitors/json_tree.rb
@@ -5,11 +5,8 @@ module Psych
class JSONTree < YAMLTree
include Psych::JSON::RubyEvents
- def self.create options = {}
- emitter = Psych::JSON::TreeBuilder.new
- class_loader = ClassLoader.new
- ss = ScalarScanner.new class_loader
- new(emitter, ss, options)
+ def initialize options = {}, emitter = Psych::JSON::TreeBuilder.new
+ super
end
def accept target
diff --git a/ext/psych/lib/psych/visitors/to_ruby.rb b/ext/psych/lib/psych/visitors/to_ruby.rb
index 1bfffb952f..725f1f9f5d 100644
--- a/ext/psych/lib/psych/visitors/to_ruby.rb
+++ b/ext/psych/lib/psych/visitors/to_ruby.rb
@@ -1,6 +1,4 @@
require 'psych/scalar_scanner'
-require 'psych/class_loader'
-require 'psych/exception'
unless defined?(Regexp::NOENCODING)
Regexp::NOENCODING = 32
@@ -9,22 +7,13 @@ end
module Psych
module Visitors
###
- # This class walks a YAML AST, converting each node to Ruby
+ # This class walks a YAML AST, converting each node to ruby
class ToRuby < Psych::Visitors::Visitor
- def self.create
- class_loader = ClassLoader.new
- scanner = ScalarScanner.new class_loader
- new(scanner, class_loader)
- end
-
- attr_reader :class_loader
-
- def initialize ss, class_loader
+ def initialize ss = ScalarScanner.new
super()
@st = {}
@ss = ss
@domain_types = Psych.domain_types
- @class_loader = class_loader
end
def accept target
@@ -43,7 +32,7 @@ module Psych
end
def deserialize o
- if klass = resolve_class(Psych.load_tags[o.tag])
+ if klass = Psych.load_tags[o.tag]
instance = klass.allocate
if instance.respond_to?(:init_with)
@@ -70,23 +59,19 @@ module Psych
end
when '!ruby/object:BigDecimal'
require 'bigdecimal'
- class_loader.big_decimal._load o.value
+ BigDecimal._load o.value
when "!ruby/object:DateTime"
- class_loader.date_time
require 'date'
@ss.parse_time(o.value).to_datetime
when "!ruby/object:Complex"
- class_loader.complex
Complex(o.value)
when "!ruby/object:Rational"
- class_loader.rational
Rational(o.value)
when "!ruby/class", "!ruby/module"
resolve_class o.value
when "tag:yaml.org,2002:float", "!float"
Float(@ss.tokenize(o.value))
when "!ruby/regexp"
- klass = class_loader.regexp
o.value =~ /^\/(.*)\/([mixn]*)$/
source = $1
options = 0
@@ -100,16 +85,15 @@ module Psych
else lang = option
end
end
- klass.new(*[source, options, lang].compact)
+ Regexp.new(*[source, options, lang].compact)
when "!ruby/range"
- klass = class_loader.range
args = o.value.split(/([.]{2,3})/, 2).map { |s|
accept Nodes::Scalar.new(s)
}
args.push(args.delete_at(1) == '...')
- klass.new(*args)
+ Range.new(*args)
when /^!ruby\/sym(bol)?:?(.*)?$/
- class_loader.symbolize o.value
+ o.value.to_sym
else
@ss.tokenize o.value
end
@@ -121,7 +105,7 @@ module Psych
end
def visit_Psych_Nodes_Sequence o
- if klass = resolve_class(Psych.load_tags[o.tag])
+ if klass = Psych.load_tags[o.tag]
instance = klass.allocate
if instance.respond_to?(:init_with)
@@ -153,24 +137,22 @@ module Psych
end
def visit_Psych_Nodes_Mapping o
- if Psych.load_tags[o.tag]
- return revive(resolve_class(Psych.load_tags[o.tag]), o)
- end
- return revive_hash(register(o, {}), o) unless o.tag
+ return revive(Psych.load_tags[o.tag], o) if Psych.load_tags[o.tag]
+ return revive_hash({}, o) unless o.tag
case o.tag
when /^!ruby\/struct:?(.*)?$/
- klass = resolve_class($1) if $1
+ klass = resolve_class($1)
if klass
s = register(o, klass.allocate)
members = {}
- struct_members = s.members.map { |x| class_loader.symbolize x }
+ struct_members = s.members.map { |x| x.to_sym }
o.children.each_slice(2) do |k,v|
member = accept(k)
value = accept(v)
- if struct_members.include?(class_loader.symbolize(member))
+ if struct_members.include?(member.to_sym)
s.send("#{member}=", value)
else
members[member.to_s.sub(/^@/, '')] = value
@@ -178,50 +160,35 @@ module Psych
end
init_with(s, members, o)
else
- klass = class_loader.struct
members = o.children.map { |c| accept c }
h = Hash[*members]
- klass.new(*h.map { |k,v|
- class_loader.symbolize k
- }).new(*h.map { |k,v| v })
+ Struct.new(*h.map { |k,v| k.to_sym }).new(*h.map { |k,v| v })
end
when /^!ruby\/object:?(.*)?$/
name = $1 || 'Object'
if name == 'Complex'
- class_loader.complex
h = Hash[*o.children.map { |c| accept c }]
register o, Complex(h['real'], h['image'])
elsif name == 'Rational'
- class_loader.rational
h = Hash[*o.children.map { |c| accept c }]
register o, Rational(h['numerator'], h['denominator'])
else
- obj = revive((resolve_class(name) || class_loader.object), o)
+ obj = revive((resolve_class(name) || Object), o)
obj
end
when /^!(?:str|ruby\/string)(?::(.*))?/, 'tag:yaml.org,2002:str'
- klass = resolve_class($1)
- members = {}
- string = nil
-
- o.children.each_slice(2) do |k,v|
- key = accept k
- value = accept v
+ klass = resolve_class($1)
+ members = Hash[*o.children.map { |c| accept c }]
+ string = members.delete 'str'
- if key == 'str'
- if klass
- string = klass.allocate.replace value
- else
- string = value
- end
- register(o, string)
- else
- members[key] = value
- end
+ if klass
+ string = klass.allocate.replace string
+ register(o, string)
end
+
init_with(string, members.map { |k,v| [k.to_s.sub(/^@/, ''),v] }, o)
when /^!ruby\/array:(.*)$/
klass = resolve_class($1)
@@ -236,19 +203,18 @@ module Psych
list
when '!ruby/range'
- klass = class_loader.range
h = Hash[*o.children.map { |c| accept c }]
- register o, klass.new(h['begin'], h['end'], h['excl'])
+ register o, Range.new(h['begin'], h['end'], h['excl'])
when /^!ruby\/exception:?(.*)?$/
h = Hash[*o.children.map { |c| accept c }]
- e = build_exception((resolve_class($1) || class_loader.exception),
+ e = build_exception((resolve_class($1) || Exception),
h.delete('message'))
init_with(e, h, o)
when '!set', 'tag:yaml.org,2002:set'
- set = class_loader.psych_set.new
+ set = Psych::Set.new
@st[o.anchor] = set if o.anchor
o.children.each_slice(2) do |k,v|
set[accept(k)] = accept(v)
@@ -256,17 +222,17 @@ module Psych
set
when /^!map:(.*)$/, /^!ruby\/hash:(.*)$/
- revive_hash register(o, resolve_class($1).new), o
+ revive_hash resolve_class($1).new, o
when '!omap', 'tag:yaml.org,2002:omap'
- map = register(o, class_loader.psych_omap.new)
+ map = register(o, Psych::Omap.new)
o.children.each_slice(2) do |l,r|
map[accept(l)] = accept r
end
map
else
- revive_hash(register(o, {}), o)
+ revive_hash({}, o)
end
end
@@ -295,45 +261,35 @@ module Psych
end
def revive_hash hash, o
- o.children.each_slice(2) { |k,v|
+ @st[o.anchor] = hash if o.anchor
+
+ o.children.each_slice(2) { |k,v|
key = accept(k)
- val = accept(v)
if key == '<<'
case v
when Nodes::Alias
- begin
- hash.merge! val
- rescue TypeError
- hash[key] = val
- end
+ hash.merge! accept(v)
when Nodes::Sequence
- begin
- h = {}
- val.reverse_each do |value|
- h.merge! value
- end
- hash.merge! h
- rescue TypeError
- hash[key] = val
+ accept(v).reverse_each do |value|
+ hash.merge! value
end
else
- hash[key] = val
+ hash[key] = accept(v)
end
else
- hash[key] = val
+ hash[key] = accept(v)
end
}
hash
end
- def merge_key hash, key, val
- end
-
def revive klass, node
- s = register(node, klass.allocate)
- init_with(s, revive_hash({}, node), node)
+ s = klass.allocate
+ @st[node.anchor] = s if node.anchor
+ h = Hash[*node.children.map { |c| accept c }]
+ init_with(s, h, node)
end
def init_with o, h, node
@@ -355,13 +311,21 @@ module Psych
# Convert +klassname+ to a Class
def resolve_class klassname
- class_loader.load klassname
- end
- end
-
- class NoAliasRuby < ToRuby
- def visit_Psych_Nodes_Alias o
- raise BadAlias, "Unknown alias: #{o.anchor}"
+ return nil unless klassname and not klassname.empty?
+
+ name = klassname
+ retried = false
+
+ begin
+ path2class(name)
+ rescue ArgumentError, NameError => ex
+ unless retried
+ name = "Struct::#{name}"
+ retried = ex
+ retry
+ end
+ raise retried
+ end
end
end
end
diff --git a/ext/psych/lib/psych/visitors/yaml_tree.rb b/ext/psych/lib/psych/visitors/yaml_tree.rb
index 1cb2137693..5efb654aab 100644
--- a/ext/psych/lib/psych/visitors/yaml_tree.rb
+++ b/ext/psych/lib/psych/visitors/yaml_tree.rb
@@ -1,67 +1,23 @@
-require 'psych/tree_builder'
-require 'psych/scalar_scanner'
-require 'psych/class_loader'
-
module Psych
module Visitors
###
- # YAMLTree builds a YAML ast given a Ruby object. For example:
+ # YAMLTree builds a YAML ast given a ruby object. For example:
#
# builder = Psych::Visitors::YAMLTree.new
# builder << { :foo => 'bar' }
# builder.tree # => #<Psych::Nodes::Stream .. }
#
class YAMLTree < Psych::Visitors::Visitor
- class Registrar # :nodoc:
- def initialize
- @obj_to_id = {}
- @obj_to_node = {}
- @counter = 0
- end
-
- def register target, node
- @obj_to_node[target.object_id] = node
- end
-
- def key? target
- @obj_to_node.key? target.object_id
- end
-
- def id_for target
- @obj_to_id[target.object_id] ||= (@counter += 1)
- end
-
- def node_for target
- @obj_to_node[target.object_id]
- end
- end
-
attr_reader :started, :finished
alias :finished? :finished
alias :started? :started
- def self.create options = {}, emitter = nil
- emitter ||= TreeBuilder.new
- class_loader = ClassLoader.new
- ss = ScalarScanner.new class_loader
- new(emitter, ss, options)
- end
-
- def self.new emitter = nil, ss = nil, options = nil
- return super if emitter && ss && options
-
- if $VERBOSE
- warn "This API is deprecated, please pass an emitter, scalar scanner, and options or call #{self}.create() (#{caller.first})"
- end
- create emitter, ss
- end
-
- def initialize emitter, ss, options
+ def initialize options = {}, emitter = TreeBuilder.new, ss = ScalarScanner.new
super()
@started = false
@finished = false
@emitter = emitter
- @st = Registrar.new
+ @st = {}
@ss = ss
@options = options
@coders = []
@@ -116,9 +72,9 @@ module Psych
def accept target
# return any aliases we find
- if @st.key? target
- oid = @st.id_for target
- node = @st.node_for target
+ if @st.key? target.object_id
+ oid = target.object_id
+ node = @st[oid]
anchor = oid.to_s
node.anchor = anchor
return @emitter.alias anchor
@@ -209,18 +165,14 @@ module Psych
end
def visit_DateTime o
- formatted = if o.offset.zero?
- o.strftime("%Y-%m-%d %H:%M:%S.%9N Z".freeze)
- else
- o.strftime("%Y-%m-%d %H:%M:%S.%9N %:z".freeze)
- end
+ formatted = format_time o.to_time
tag = '!ruby/object:DateTime'
register o, @emitter.scalar(formatted, nil, tag, false, false, Nodes::Scalar::ANY)
end
def visit_Time o
formatted = format_time o
- register o, @emitter.scalar(formatted, nil, nil, true, false, Nodes::Scalar::ANY)
+ @emitter.scalar formatted, nil, nil, true, false, Nodes::Scalar::ANY
end
def visit_Rational o
@@ -268,10 +220,17 @@ module Psych
@emitter.scalar o._dump, nil, '!ruby/object:BigDecimal', false, false, Nodes::Scalar::ANY
end
+ def binary? string
+ string.encoding == Encoding::ASCII_8BIT ||
+ string.index("\x00") ||
+ string.count("\x00-\x7F", "^ -~\t\r\n").fdiv(string.length) > 0.3
+ end
+ private :binary?
+
def visit_String o
- plain = true
- quote = true
- style = Nodes::Scalar::PLAIN
+ plain = false
+ quote = false
+ style = Nodes::Scalar::ANY
tag = nil
str = o
@@ -280,16 +239,15 @@ module Psych
tag = '!binary' # FIXME: change to below when syck is removed
#tag = 'tag:yaml.org,2002:binary'
style = Nodes::Scalar::LITERAL
- plain = false
- quote = false
elsif o =~ /\n/
+ quote = true
style = Nodes::Scalar::LITERAL
elsif o =~ /^\W/
+ quote = true
style = Nodes::Scalar::DOUBLE_QUOTED
else
- unless String === @ss.tokenize(o)
- style = Nodes::Scalar::SINGLE_QUOTED
- end
+ quote = !(String === @ss.tokenize(o))
+ plain = !quote
end
ivars = find_ivars o
@@ -297,8 +255,6 @@ module Psych
if ivars.empty?
unless o.class == ::String
tag = "!ruby/string:#{o.class}"
- plain = false
- quote = false
end
@emitter.scalar str, nil, tag, plain, quote, style
else
@@ -377,17 +333,6 @@ module Psych
end
private
- # FIXME: Remove the index and count checks in Psych 3.0
- NULL = "\x00"
- BINARY_RANGE = "\x00-\x7F"
- WS_RANGE = "^ -~\t\r\n"
-
- def binary? string
- (string.encoding == Encoding::ASCII_8BIT && !string.ascii_only?) ||
- string.index(NULL) ||
- string.count(BINARY_RANGE, WS_RANGE).fdiv(string.length) > 0.3
- end
-
def visit_array_subclass o
tag = "!ruby/array:#{o.class}"
if o.instance_variables.empty?
@@ -464,7 +409,7 @@ module Psych
end
def register target, yaml_obj
- @st.register target, yaml_obj
+ @st[target.object_id] = yaml_obj
yaml_obj
end
@@ -494,7 +439,7 @@ module Psych
when :map
@emitter.start_mapping nil, c.tag, c.implicit, c.style
c.map.each do |k,v|
- accept k
+ @emitter.scalar k, nil, nil, true, false, Nodes::Scalar::ANY
accept v
end
@emitter.end_mapping
diff --git a/ext/psych/lib/psych/y.rb b/ext/psych/lib/psych/y.rb
index d0e049d4e5..f20d2e2a66 100644
--- a/ext/psych/lib/psych/y.rb
+++ b/ext/psych/lib/psych/y.rb
@@ -1,6 +1,4 @@
module Kernel
- ###
- # An alias for Psych.dump_stream meant to be used with IRB.
def y *objects
puts Psych.dump_stream(*objects)
end
diff --git a/ext/psych/psych.gemspec b/ext/psych/psych.gemspec
index ca751a033d..c15449c6ae 100644
--- a/ext/psych/psych.gemspec
+++ b/ext/psych/psych.gemspec
@@ -2,23 +2,23 @@
Gem::Specification.new do |s|
s.name = "psych"
- s.version = "2.0.2"
+ s.version = "2.0.0"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Aaron Patterson"]
- s.date = "2013-11-26"
+ s.date = "2012-11-28"
s.description = "Psych is a YAML parser and emitter. Psych leverages libyaml[http://pyyaml.org/wiki/LibYAML]\nfor its YAML parsing and emitting capabilities. In addition to wrapping\nlibyaml, Psych also knows how to serialize and de-serialize most Ruby objects\nto and from the YAML format."
s.email = ["aaron@tenderlovemaking.com"]
s.extensions = ["ext/psych/extconf.rb"]
s.extra_rdoc_files = ["CHANGELOG.rdoc", "Manifest.txt", "README.rdoc"]
- s.files = [".autotest", ".travis.yml", "CHANGELOG.rdoc", "Manifest.txt", "README.rdoc", "Rakefile", "ext/psych/depend", "ext/psych/extconf.rb", "ext/psych/psych.c", "ext/psych/psych.h", "ext/psych/psych_emitter.c", "ext/psych/psych_emitter.h", "ext/psych/psych_parser.c", "ext/psych/psych_parser.h", "ext/psych/psych_to_ruby.c", "ext/psych/psych_to_ruby.h", "ext/psych/psych_yaml_tree.c", "ext/psych/psych_yaml_tree.h", "ext/psych/yaml/LICENSE", "ext/psych/yaml/api.c", "ext/psych/yaml/config.h", "ext/psych/yaml/dumper.c", "ext/psych/yaml/emitter.c", "ext/psych/yaml/loader.c", "ext/psych/yaml/parser.c", "ext/psych/yaml/reader.c", "ext/psych/yaml/scanner.c", "ext/psych/yaml/writer.c", "ext/psych/yaml/yaml.h", "ext/psych/yaml/yaml_private.h", "lib/psych.rb", "lib/psych/class_loader.rb", "lib/psych/coder.rb", "lib/psych/core_ext.rb", "lib/psych/deprecated.rb", "lib/psych/exception.rb", "lib/psych/handler.rb", "lib/psych/handlers/document_stream.rb", "lib/psych/handlers/recorder.rb", "lib/psych/json/ruby_events.rb", "lib/psych/json/stream.rb", "lib/psych/json/tree_builder.rb", "lib/psych/json/yaml_events.rb", "lib/psych/nodes.rb", "lib/psych/nodes/alias.rb", "lib/psych/nodes/document.rb", "lib/psych/nodes/mapping.rb", "lib/psych/nodes/node.rb", "lib/psych/nodes/scalar.rb", "lib/psych/nodes/sequence.rb", "lib/psych/nodes/stream.rb", "lib/psych/omap.rb", "lib/psych/parser.rb", "lib/psych/scalar_scanner.rb", "lib/psych/set.rb", "lib/psych/stream.rb", "lib/psych/streaming.rb", "lib/psych/syntax_error.rb", "lib/psych/tree_builder.rb", "lib/psych/visitors.rb", "lib/psych/visitors/depth_first.rb", "lib/psych/visitors/emitter.rb", "lib/psych/visitors/json_tree.rb", "lib/psych/visitors/to_ruby.rb", "lib/psych/visitors/visitor.rb", "lib/psych/visitors/yaml_tree.rb", "lib/psych/y.rb", "test/psych/handlers/test_recorder.rb", "test/psych/helper.rb", "test/psych/json/test_stream.rb", "test/psych/nodes/test_enumerable.rb", "test/psych/test_alias_and_anchor.rb", "test/psych/test_array.rb", "test/psych/test_boolean.rb", "test/psych/test_class.rb", "test/psych/test_coder.rb", "test/psych/test_date_time.rb", "test/psych/test_deprecated.rb", "test/psych/test_document.rb", "test/psych/test_emitter.rb", "test/psych/test_encoding.rb", "test/psych/test_engine_manager.rb", "test/psych/test_exception.rb", "test/psych/test_hash.rb", "test/psych/test_json_tree.rb", "test/psych/test_merge_keys.rb", "test/psych/test_nil.rb", "test/psych/test_null.rb", "test/psych/test_numeric.rb", "test/psych/test_object.rb", "test/psych/test_object_references.rb", "test/psych/test_omap.rb", "test/psych/test_parser.rb", "test/psych/test_psych.rb", "test/psych/test_safe_load.rb", "test/psych/test_scalar.rb", "test/psych/test_scalar_scanner.rb", "test/psych/test_serialize_subclasses.rb", "test/psych/test_set.rb", "test/psych/test_stream.rb", "test/psych/test_string.rb", "test/psych/test_struct.rb", "test/psych/test_symbol.rb", "test/psych/test_tainted.rb", "test/psych/test_to_yaml_properties.rb", "test/psych/test_tree_builder.rb", "test/psych/test_yaml.rb", "test/psych/test_yamldbm.rb", "test/psych/test_yamlstore.rb", "test/psych/visitors/test_depth_first.rb", "test/psych/visitors/test_emitter.rb", "test/psych/visitors/test_to_ruby.rb", "test/psych/visitors/test_yaml_tree.rb", ".gemtest"]
+ s.files = [".autotest", ".travis.yml", "CHANGELOG.rdoc", "Manifest.txt", "README.rdoc", "Rakefile", "ext/psych/extconf.rb", "ext/psych/psych.c", "ext/psych/psych.h", "ext/psych/psych_emitter.c", "ext/psych/psych_emitter.h", "ext/psych/psych_parser.c", "ext/psych/psych_parser.h", "ext/psych/psych_to_ruby.c", "ext/psych/psych_to_ruby.h", "ext/psych/psych_yaml_tree.c", "ext/psych/psych_yaml_tree.h", "ext/psych/yaml/LICENSE", "ext/psych/yaml/api.c", "ext/psych/yaml/config.h", "ext/psych/yaml/dumper.c", "ext/psych/yaml/emitter.c", "ext/psych/yaml/loader.c", "ext/psych/yaml/parser.c", "ext/psych/yaml/reader.c", "ext/psych/yaml/scanner.c", "ext/psych/yaml/writer.c", "ext/psych/yaml/yaml.h", "ext/psych/yaml/yaml_private.h", "lib/psych.rb", "lib/psych/coder.rb", "lib/psych/core_ext.rb", "lib/psych/deprecated.rb", "lib/psych/handler.rb", "lib/psych/handlers/document_stream.rb", "lib/psych/handlers/recorder.rb", "lib/psych/json/ruby_events.rb", "lib/psych/json/stream.rb", "lib/psych/json/tree_builder.rb", "lib/psych/json/yaml_events.rb", "lib/psych/nodes.rb", "lib/psych/nodes/alias.rb", "lib/psych/nodes/document.rb", "lib/psych/nodes/mapping.rb", "lib/psych/nodes/node.rb", "lib/psych/nodes/scalar.rb", "lib/psych/nodes/sequence.rb", "lib/psych/nodes/stream.rb", "lib/psych/omap.rb", "lib/psych/parser.rb", "lib/psych/scalar_scanner.rb", "lib/psych/set.rb", "lib/psych/stream.rb", "lib/psych/streaming.rb", "lib/psych/syntax_error.rb", "lib/psych/tree_builder.rb", "lib/psych/visitors.rb", "lib/psych/visitors/depth_first.rb", "lib/psych/visitors/emitter.rb", "lib/psych/visitors/json_tree.rb", "lib/psych/visitors/to_ruby.rb", "lib/psych/visitors/visitor.rb", "lib/psych/visitors/yaml_tree.rb", "lib/psych/y.rb", "test/psych/handlers/test_recorder.rb", "test/psych/helper.rb", "test/psych/json/test_stream.rb", "test/psych/nodes/test_enumerable.rb", "test/psych/test_alias_and_anchor.rb", "test/psych/test_array.rb", "test/psych/test_boolean.rb", "test/psych/test_class.rb", "test/psych/test_coder.rb", "test/psych/test_date_time.rb", "test/psych/test_deprecated.rb", "test/psych/test_document.rb", "test/psych/test_emitter.rb", "test/psych/test_encoding.rb", "test/psych/test_engine_manager.rb", "test/psych/test_exception.rb", "test/psych/test_hash.rb", "test/psych/test_json_tree.rb", "test/psych/test_merge_keys.rb", "test/psych/test_nil.rb", "test/psych/test_null.rb", "test/psych/test_numeric.rb", "test/psych/test_object.rb", "test/psych/test_object_references.rb", "test/psych/test_omap.rb", "test/psych/test_parser.rb", "test/psych/test_psych.rb", "test/psych/test_scalar.rb", "test/psych/test_scalar_scanner.rb", "test/psych/test_serialize_subclasses.rb", "test/psych/test_set.rb", "test/psych/test_stream.rb", "test/psych/test_string.rb", "test/psych/test_struct.rb", "test/psych/test_symbol.rb", "test/psych/test_tainted.rb", "test/psych/test_to_yaml_properties.rb", "test/psych/test_tree_builder.rb", "test/psych/test_yaml.rb", "test/psych/test_yamldbm.rb", "test/psych/test_yamlstore.rb", "test/psych/visitors/test_depth_first.rb", "test/psych/visitors/test_emitter.rb", "test/psych/visitors/test_to_ruby.rb", "test/psych/visitors/test_yaml_tree.rb", ".gemtest"]
s.homepage = "http://github.com/tenderlove/psych"
- s.licenses = ["MIT"]
s.rdoc_options = ["--main", "README.rdoc"]
s.require_paths = ["lib"]
s.required_ruby_version = Gem::Requirement.new(">= 1.9.2")
s.rubyforge_project = "psych"
- s.rubygems_version = "2.0.2"
+ s.rubygems_version = "1.8.24"
s.summary = "Psych is a YAML parser and emitter"
- s.test_files = ["test/psych/handlers/test_recorder.rb", "test/psych/json/test_stream.rb", "test/psych/nodes/test_enumerable.rb", "test/psych/test_alias_and_anchor.rb", "test/psych/test_array.rb", "test/psych/test_boolean.rb", "test/psych/test_class.rb", "test/psych/test_coder.rb", "test/psych/test_date_time.rb", "test/psych/test_deprecated.rb", "test/psych/test_document.rb", "test/psych/test_emitter.rb", "test/psych/test_encoding.rb", "test/psych/test_engine_manager.rb", "test/psych/test_exception.rb", "test/psych/test_hash.rb", "test/psych/test_json_tree.rb", "test/psych/test_merge_keys.rb", "test/psych/test_nil.rb", "test/psych/test_null.rb", "test/psych/test_numeric.rb", "test/psych/test_object.rb", "test/psych/test_object_references.rb", "test/psych/test_omap.rb", "test/psych/test_parser.rb", "test/psych/test_psych.rb", "test/psych/test_safe_load.rb", "test/psych/test_scalar.rb", "test/psych/test_scalar_scanner.rb", "test/psych/test_serialize_subclasses.rb", "test/psych/test_set.rb", "test/psych/test_stream.rb", "test/psych/test_string.rb", "test/psych/test_struct.rb", "test/psych/test_symbol.rb", "test/psych/test_tainted.rb", "test/psych/test_to_yaml_properties.rb", "test/psych/test_tree_builder.rb", "test/psych/test_yaml.rb", "test/psych/test_yamldbm.rb", "test/psych/test_yamlstore.rb", "test/psych/visitors/test_depth_first.rb", "test/psych/visitors/test_emitter.rb", "test/psych/visitors/test_to_ruby.rb", "test/psych/visitors/test_yaml_tree.rb"]
+ s.test_files = ["test/psych/handlers/test_recorder.rb", "test/psych/json/test_stream.rb", "test/psych/nodes/test_enumerable.rb", "test/psych/test_alias_and_anchor.rb", "test/psych/test_array.rb", "test/psych/test_boolean.rb", "test/psych/test_class.rb", "test/psych/test_coder.rb", "test/psych/test_date_time.rb", "test/psych/test_deprecated.rb", "test/psych/test_document.rb", "test/psych/test_emitter.rb", "test/psych/test_encoding.rb", "test/psych/test_engine_manager.rb", "test/psych/test_exception.rb", "test/psych/test_hash.rb", "test/psych/test_json_tree.rb", "test/psych/test_merge_keys.rb", "test/psych/test_nil.rb", "test/psych/test_null.rb", "test/psych/test_numeric.rb", "test/psych/test_object.rb", "test/psych/test_object_references.rb", "test/psych/test_omap.rb", "test/psych/test_parser.rb", "test/psych/test_psych.rb", "test/psych/test_scalar.rb", "test/psych/test_scalar_scanner.rb", "test/psych/test_serialize_subclasses.rb", "test/psych/test_set.rb", "test/psych/test_stream.rb", "test/psych/test_string.rb", "test/psych/test_struct.rb", "test/psych/test_symbol.rb", "test/psych/test_tainted.rb", "test/psych/test_to_yaml_properties.rb", "test/psych/test_tree_builder.rb", "test/psych/test_yaml.rb", "test/psych/test_yamldbm.rb", "test/psych/test_yamlstore.rb", "test/psych/visitors/test_depth_first.rb", "test/psych/visitors/test_emitter.rb", "test/psych/visitors/test_to_ruby.rb", "test/psych/visitors/test_yaml_tree.rb"]
+
end
diff --git a/ext/psych/psych_to_ruby.c b/ext/psych/psych_to_ruby.c
index 3cc87a965e..ed5245e12e 100644
--- a/ext/psych/psych_to_ruby.c
+++ b/ext/psych/psych_to_ruby.c
@@ -31,13 +31,11 @@ static VALUE path2class(VALUE self, VALUE path)
void Init_psych_to_ruby(void)
{
VALUE psych = rb_define_module("Psych");
- VALUE class_loader = rb_define_class_under(psych, "ClassLoader", rb_cObject);
-
VALUE visitors = rb_define_module_under(psych, "Visitors");
VALUE visitor = rb_define_class_under(visitors, "Visitor", rb_cObject);
cPsychVisitorsToRuby = rb_define_class_under(visitors, "ToRuby", visitor);
rb_define_private_method(cPsychVisitorsToRuby, "build_exception", build_exception, 2);
- rb_define_private_method(class_loader, "path2class", path2class, 1);
+ rb_define_private_method(cPsychVisitorsToRuby, "path2class", path2class, 1);
}
/* vim: set noet sws=4 sw=4: */
diff --git a/ext/psych/yaml/emitter.c b/ext/psych/yaml/emitter.c
index c41a94a79f..c852f9309f 100644
--- a/ext/psych/yaml/emitter.c
+++ b/ext/psych/yaml/emitter.c
@@ -1493,7 +1493,7 @@ yaml_emitter_analyze_scalar(yaml_emitter_t *emitter,
int break_space = 0;
int space_break = 0;
- int preceded_by_whitespace = 0;
+ int preceeded_by_whitespace = 0;
int followed_by_whitespace = 0;
int previous_space = 0;
int previous_break = 0;
@@ -1524,7 +1524,7 @@ yaml_emitter_analyze_scalar(yaml_emitter_t *emitter,
flow_indicators = 1;
}
- preceded_by_whitespace = 1;
+ preceeded_by_whitespace = 1;
followed_by_whitespace = IS_BLANKZ_AT(string, WIDTH(string));
while (string.pointer != string.end)
@@ -1570,7 +1570,7 @@ yaml_emitter_analyze_scalar(yaml_emitter_t *emitter,
}
}
- if (CHECK(string, '#') && preceded_by_whitespace) {
+ if (CHECK(string, '#') && preceeded_by_whitespace) {
flow_indicators = 1;
block_indicators = 1;
}
@@ -1619,7 +1619,7 @@ yaml_emitter_analyze_scalar(yaml_emitter_t *emitter,
previous_break = 0;
}
- preceded_by_whitespace = IS_BLANKZ(string);
+ preceeded_by_whitespace = IS_BLANKZ(string);
MOVE(string);
if (string.pointer != string.end) {
followed_by_whitespace = IS_BLANKZ_AT(string, WIDTH(string));
diff --git a/ext/psych/yaml/scanner.c b/ext/psych/yaml/scanner.c
index 31fed0ed94..f7a305de8f 100644
--- a/ext/psych/yaml/scanner.c
+++ b/ext/psych/yaml/scanner.c
@@ -1248,7 +1248,7 @@ yaml_parser_roll_indent(yaml_parser_t *parser, int column,
/*
* Pop indentation levels from the indents stack until the current level
- * becomes less or equal to the column. For each indentation level, append
+ * becomes less or equal to the column. For each intendation level, append
* the BLOCK-END token.
*/
@@ -1263,7 +1263,7 @@ yaml_parser_unroll_indent(yaml_parser_t *parser, int column)
if (parser->flow_level)
return 1;
- /* Loop through the indentation levels in the stack. */
+ /* Loop through the intendation levels in the stack. */
while (parser->indent > column)
{
@@ -2769,15 +2769,15 @@ yaml_parser_scan_block_scalar(yaml_parser_t *parser, yaml_token_t *token,
if (IS_DIGIT(parser->buffer))
{
- /* Check that the indentation is greater than 0. */
+ /* Check that the intendation is greater than 0. */
if (CHECK(parser->buffer, '0')) {
yaml_parser_set_scanner_error(parser, "while scanning a block scalar",
- start_mark, "found an indentation indicator equal to 0");
+ start_mark, "found an intendation indicator equal to 0");
goto error;
}
- /* Get the indentation level and eat the indicator. */
+ /* Get the intendation level and eat the indicator. */
increment = AS_DIGIT(parser->buffer);
@@ -2791,7 +2791,7 @@ yaml_parser_scan_block_scalar(yaml_parser_t *parser, yaml_token_t *token,
{
if (CHECK(parser->buffer, '0')) {
yaml_parser_set_scanner_error(parser, "while scanning a block scalar",
- start_mark, "found an indentation indicator equal to 0");
+ start_mark, "found an intendation indicator equal to 0");
goto error;
}
@@ -2841,7 +2841,7 @@ yaml_parser_scan_block_scalar(yaml_parser_t *parser, yaml_token_t *token,
end_mark = parser->mark;
- /* Set the indentation level if it was specified. */
+ /* Set the intendation level if it was specified. */
if (increment) {
indent = parser->indent >= 0 ? parser->indent+increment : increment;
@@ -2907,7 +2907,7 @@ yaml_parser_scan_block_scalar(yaml_parser_t *parser, yaml_token_t *token,
if (!READ_LINE(parser, leading_break)) goto error;
- /* Eat the following indentation spaces and line breaks. */
+ /* Eat the following intendation spaces and line breaks. */
if (!yaml_parser_scan_block_scalar_breaks(parser,
&indent, &trailing_breaks, start_mark, &end_mark)) goto error;
@@ -2942,8 +2942,8 @@ error:
}
/*
- * Scan indentation spaces and line breaks for a block scalar. Determine the
- * indentation level if needed.
+ * Scan intendation spaces and line breaks for a block scalar. Determine the
+ * intendation level if needed.
*/
static int
@@ -2955,11 +2955,11 @@ yaml_parser_scan_block_scalar_breaks(yaml_parser_t *parser,
*end_mark = parser->mark;
- /* Eat the indentation spaces and line breaks. */
+ /* Eat the intendation spaces and line breaks. */
while (1)
{
- /* Eat the indentation spaces. */
+ /* Eat the intendation spaces. */
if (!CACHE(parser, 1)) return 0;
@@ -2972,12 +2972,12 @@ yaml_parser_scan_block_scalar_breaks(yaml_parser_t *parser,
if ((int)parser->mark.column > max_indent)
max_indent = (int)parser->mark.column;
- /* Check for a tab character messing the indentation. */
+ /* Check for a tab character messing the intendation. */
if ((!*indent || (int)parser->mark.column < *indent)
&& IS_TAB(parser->buffer)) {
return yaml_parser_set_scanner_error(parser, "while scanning a block scalar",
- start_mark, "found a tab character where an indentation space is expected");
+ start_mark, "found a tab character where an intendation space is expected");
}
/* Have we found a non-empty line? */
@@ -3498,12 +3498,12 @@ yaml_parser_scan_plain_scalar(yaml_parser_t *parser, yaml_token_t *token)
{
if (IS_BLANK(parser->buffer))
{
- /* Check for tab character that abuse indentation. */
+ /* Check for tab character that abuse intendation. */
if (leading_blanks && (int)parser->mark.column < indent
&& IS_TAB(parser->buffer)) {
yaml_parser_set_scanner_error(parser, "while scanning a plain scalar",
- start_mark, "found a tab character that violates indentation");
+ start_mark, "found a tab character that violate intendation");
goto error;
}
@@ -3536,7 +3536,7 @@ yaml_parser_scan_plain_scalar(yaml_parser_t *parser, yaml_token_t *token)
if (!CACHE(parser, 1)) goto error;
}
- /* Check indentation level. */
+ /* Check intendation level. */
if (!parser->flow_level && (int)parser->mark.column < indent)
break;
diff --git a/ext/psych/yaml/yaml.h b/ext/psych/yaml/yaml.h
index f33a152594..acd72ad3a3 100644
--- a/ext/psych/yaml/yaml.h
+++ b/ext/psych/yaml/yaml.h
@@ -1089,7 +1089,7 @@ typedef struct yaml_parser_s {
yaml_error_type_t error;
/** Error description. */
const char *problem;
- /** The byte about which the problem occurred. */
+ /** The byte about which the problem occured. */
size_t problem_offset;
/** The problematic value (@c -1 is none). */
int problem_value;
@@ -1851,7 +1851,7 @@ YAML_DECLARE(void)
yaml_emitter_set_canonical(yaml_emitter_t *emitter, int canonical);
/**
- * Set the indentation increment.
+ * Set the intendation increment.
*
* @param[in,out] emitter An emitter object.
* @param[in] indent The indentation increment (1 < . < 10).
diff --git a/ext/pty/depend b/ext/pty/depend
index cfcd3c910e..2249eb8fcd 100644
--- a/ext/pty/depend
+++ b/ext/pty/depend
@@ -1,6 +1 @@
-pty.o: pty.c $(HDRS) $(ruby_headers) \
- $(hdrdir)/ruby/io.h \
- $(hdrdir)/ruby/encoding.h \
- $(hdrdir)/ruby/oniguruma.h \
- $(hdrdir)/ruby/util.h \
- $(top_srcdir)/internal.h
+pty.o: pty.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h $(hdrdir)/io.h
diff --git a/ext/pty/lib/expect.rb b/ext/pty/lib/expect.rb
index c3f3925be7..c15044bd2a 100644
--- a/ext/pty/lib/expect.rb
+++ b/ext/pty/lib/expect.rb
@@ -1,30 +1,10 @@
$expect_verbose = false
-# Expect library adds the IO instance method #expect, which does similar act to
-# tcl's expect extension.
-#
-# In order to use this method, you must require expect:
-#
-# require 'expect'
-#
-# Please see #expect for usage.
class IO
- # call-seq:
- # IO#expect(pattern,timeout=9999999) -> Array
- # IO#expect(pattern,timeout=9999999) { |result| ... } -> nil
- #
- # Reads from the IO until the given +pattern+ matches or the +timeout+ is over.
- #
+ # Reads from the IO until pattern +pat+ matches or the +timeout+ is over.
# It returns an array with the read buffer, followed by the matches.
# If a block is given, the result is yielded to the block and returns nil.
#
- # When called without a block, it waits until the input that matches the
- # given +pattern+ is obtained from the IO or the time specified as the
- # timeout passes. An array is returned when the pattern is obtained from the
- # IO. The first element of the array is the entire string obtained from the
- # IO until the pattern matches, followed by elements indicating which the
- # pattern which matched to the anchor in the regular expression.
- #
# The optional timeout parameter defines, in seconds, the total time to wait
# for the pattern. If the timeout expires or eof is found, nil is returned
# or yielded. However, the buffer in a timeout session is kept for the next
@@ -37,7 +17,7 @@ class IO
when Regexp
e_pat = pat
else
- raise TypeError, "unsupported pattern class: #{pat.class}"
+ raise TypeError, "unsupported pattern class: #{pattern.class}"
end
@unusedBuf ||= ''
while true
diff --git a/ext/pty/pty.c b/ext/pty/pty.c
index 4ba1cba621..7ea2e1aaf5 100644
--- a/ext/pty/pty.c
+++ b/ext/pty/pty.c
@@ -22,10 +22,6 @@
#ifdef HAVE_PTY_H
#include <pty.h>
#endif
-#if defined(HAVE_SYS_PARAM_H)
- /* for __FreeBSD_version */
-# include <sys/param.h>
-#endif
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#else
@@ -144,7 +140,7 @@ chfunc(void *data, char *errbuf, size_t errbuf_len)
dup2(slave,2);
close(slave);
#if defined(HAVE_SETEUID) || defined(HAVE_SETREUID) || defined(HAVE_SETRESUID)
- if (seteuid(getuid())) ERROR_EXIT("seteuid()");
+ seteuid(getuid());
#endif
return rb_exec_async_signal_safe(carg->eargp, errbuf, sizeof(errbuf_len));
@@ -232,9 +228,9 @@ get_device_once(int *master, int *slave, char SlaveName[DEVICELEN], int nomesg,
dfl.sa_flags = 0;
sigemptyset(&dfl.sa_mask);
-#if defined(__sun) || (defined(__FreeBSD__) && __FreeBSD_version < 902000)
+#if defined(__sun) || defined(__FreeBSD__)
/* workaround for Solaris 10: grantpt() doesn't work if FD_CLOEXEC is set. [ruby-dev:44688] */
- /* FreeBSD 9.2 or later supports O_CLOEXEC
+ /* FreeBSD 8 supported O_CLOEXEC for posix_openpt, but FreeBSD 9 removed it.
* http://www.freebsd.org/cgi/query-pr.cgi?pr=162374 */
if ((masterfd = posix_openpt(O_RDWR|O_NOCTTY)) == -1) goto error;
if (sigaction(SIGCHLD, &dfl, &old) == -1) goto error;
@@ -480,29 +476,54 @@ pty_close_pty(VALUE assoc)
*
* Allocates a pty (pseudo-terminal).
*
+ * In the non-block form, returns a two element array, <tt>[master_io,
+ * slave_file]</tt>.
+ *
* In the block form, yields two arguments <tt>master_io, slave_file</tt>
* and the value of the block is returned from +open+.
*
* The IO and File are both closed after the block completes if they haven't
* been already closed.
*
- * PTY.open {|master, slave|
- * p master #=> #<IO:masterpty:/dev/pts/1>
- * p slave #=> #<File:/dev/pts/1>
- * p slave.path #=> "/dev/pts/1"
- * }
+ * The arguments in both forms are:
*
- * In the non-block form, returns a two element array, <tt>[master_io,
- * slave_file]</tt>.
+ * <tt>master_io</tt>:: the master of the pty, as an IO.
+ * <tt>slave_file</tt>:: the slave of the pty, as a File. The path to the
+ * terminal device is available via
+ * <tt>slave_file.path</tt>
*
- * master, slave = PTY.open
- * # do something with master for IO, or the slave file
+ * === Example
*
- * The arguments in both forms are:
+ * PTY.open {|m, s|
+ * p m #=> #<IO:masterpty:/dev/pts/1>
+ * p s #=> #<File:/dev/pts/1>
+ * p s.path #=> "/dev/pts/1"
+ * }
*
- * +master_io+:: the master of the pty, as an IO.
- * +slave_file+:: the slave of the pty, as a File. The path to the
- * terminal device is available via +slave_file.path+
+ * # Change the buffering type in factor command,
+ * # assuming that factor uses stdio for stdout buffering.
+ * # If IO.pipe is used instead of PTY.open,
+ * # this code deadlocks because factor's stdout is fully buffered.
+ * require 'io/console' # for IO#raw!
+ * m, s = PTY.open
+ * s.raw! # disable newline conversion.
+ * r, w = IO.pipe
+ * pid = spawn("factor", :in=>r, :out=>s)
+ * r.close
+ * s.close
+ * w.puts "42"
+ * p m.gets #=> "42: 2 3 7\n"
+ * w.puts "144"
+ * p m.gets #=> "144: 2 2 2 2 3 3\n"
+ * w.close
+ * # The result of read operation when pty slave is closed is platform
+ * # dependent.
+ * ret = begin
+ * m.gets # FreeBSD returns nil.
+ * rescue Errno::EIO # GNU/Linux raises EIO.
+ * nil
+ * end
+ * p ret #=> nil
*
*/
static VALUE
@@ -546,28 +567,31 @@ pty_detach_process(struct pty_info *info)
* call-seq:
* PTY.spawn(command_line) { |r, w, pid| ... }
* PTY.spawn(command_line) => [r, w, pid]
- * PTY.spawn(command, arguments, ...) { |r, w, pid| ... }
- * PTY.spawn(command, arguments, ...) => [r, w, pid]
+ * PTY.spawn(command, args, ...) { |r, w, pid| ... }
+ * PTY.spawn(command, args, ...) => [r, w, pid]
+ * PTY.getpty(command_line) { |r, w, pid| ... }
+ * PTY.getpty(command_line) => [r, w, pid]
+ * PTY.getpty(command, args, ...) { |r, w, pid| ... }
+ * PTY.getpty(command, args, ...) => [r, w, pid]
*
- * Spawns the specified command on a newly allocated pty. You can also use the
- * alias ::getpty.
+ * Spawns the specified command on a newly allocated pty.
*
* The command's controlling tty is set to the slave device of the pty
* and its standard input/output/error is redirected to the slave device.
*
- * +command+ and +command_line+ are the full commands to run, given a String.
- * Any additional +arguments+ will be passed to the command.
- *
- * === Return values
+ * <tt>command_line</tt>:: The full command line to run
+ * <tt>command</tt>:: The command to run, as a String.
+ * <tt>args</tt>:: Zero or more arguments, as Strings, representing
+ * the arguments to +command+
*
* In the non-block form this returns an array of size three,
- * <tt>[r, w, pid]</tt>.
+ * <tt>[r, w, pid]</tt>. In the block form the block will be called with
+ * these as arguments, <tt>|r,w,pid|</tt>:
*
- * In the block form these same values will be yielded to the block:
- *
- * +r+:: A readable IO that that contains the command's
+ * +r+:: An IO that can be read from that contains the command's
* standard output and standard error
- * +w+:: A writable IO that is the command's standard input
+ * +w+:: An IO that can be written to that is the command's
+ * standard input
* +pid+:: The process identifier for the command.
*/
static VALUE
@@ -608,9 +632,9 @@ pty_getpty(int argc, VALUE *argv, VALUE self)
return res;
}
-NORETURN(static void raise_from_check(rb_pid_t pid, int status));
+NORETURN(static void raise_from_check(pid_t pid, int status));
static void
-raise_from_check(rb_pid_t pid, int status)
+raise_from_check(pid_t pid, int status)
{
const char *state;
char buf[1024];
@@ -643,22 +667,21 @@ raise_from_check(rb_pid_t pid, int status)
* PTY.check(pid, true) => nil or raises PTY::ChildExited
*
* Checks the status of the child process specified by +pid+.
- * Returns +nil+ if the process is still alive.
- *
- * If the process is not alive, and +raise+ was true, a PTY::ChildExited
- * exception will be raised. Otherwise it will return a Process::Status
- * instance.
+ * Returns +nil+ if the process is still alive. If the process
+ * is not alive, will return a <tt>Process::Status</tt> or raise
+ * a <tt>PTY::ChildExited</tt> (if +raise+ was true).
*
* +pid+:: The process id of the process to check
- * +raise+:: If +true+ and the process identified by +pid+ is no longer
- * alive a PTY::ChildExited is raised.
+ * +raise+:: If true and the process identified by +pid+ is no longer
+ * alive a <tt>PTY::ChildExited</tt> is raised.
*
+ * Returns nil or a <tt>Process::Status</tt> when +raise+ is false.
*/
static VALUE
pty_check(int argc, VALUE *argv, VALUE self)
{
VALUE pid, exc;
- rb_pid_t cpid;
+ pid_t cpid;
int status;
rb_scan_args(argc, argv, "11", &pid, &exc);
@@ -676,7 +699,7 @@ static VALUE cPTY;
/*
* Document-class: PTY::ChildExited
*
- * Thrown when PTY::check is called for a pid that represents a process that
+ * Thrown when PTY#check is called for a pid that represents a process that
* has exited.
*/
@@ -685,65 +708,12 @@ static VALUE cPTY;
*
* Creates and managed pseudo terminals (PTYs). See also
* http://en.wikipedia.org/wiki/Pseudo_terminal
- *
- * PTY allows you to allocate new terminals using ::open or ::spawn a new
- * terminal with a specific command.
- *
- * == Example
- *
- * In this example we will change the buffering type in the +factor+ command,
- * assuming that factor uses stdio for stdout buffering.
- *
- * If IO.pipe is used instead of PTY.open, this code deadlocks because factor's
- * stdout is fully buffered.
- *
- * # start by requiring the standard library PTY
- * require 'pty'
- *
- * master, slave = PTY.open
- * read, write = IO.pipe
- * pid = spawn("factor", :in=>read, :out=>slave)
- * read.close # we dont need the read
- * slave.close # or the slave
- *
- * # pipe "42" to the factor command
- * write.puts "42"
- * # output the response from factor
- * p master.gets #=> "42: 2 3 7\n"
- *
- * # pipe "144" to factor and print out the response
- * write.puts "144"
- * p master.gets #=> "144: 2 2 2 2 3 3\n"
- * write.close # close the pipe
- *
- * # The result of read operation when pty slave is closed is platform
- * # dependent.
- * ret = begin
- * m.gets # FreeBSD returns nil.
- * rescue Errno::EIO # GNU/Linux raises EIO.
- * nil
- * end
- * p ret #=> nil
- *
- * == License
- *
- * C) Copyright 1998 by Akinori Ito.
- *
- * This software may be redistributed freely for this purpose, in full
- * or in part, provided that this entire copyright notice is included
- * on any copies of this software and applications and derivations thereof.
- *
- * This software is provided on an "as is" basis, without warranty of any
- * kind, either expressed or implied, as to any matter including, but not
- * limited to warranty of fitness of purpose, or merchantability, or
- * results obtained from use of this software.
*/
void
Init_pty()
{
cPTY = rb_define_module("PTY");
- /* :nodoc */
rb_define_module_function(cPTY,"getpty",pty_getpty,-1);
rb_define_module_function(cPTY,"spawn",pty_getpty,-1);
rb_define_singleton_method(cPTY,"check",pty_check,-1);
diff --git a/ext/racc/cparse/README b/ext/racc/cparse/README
index 7771108b84..80b4dce311 100644
--- a/ext/racc/cparse/README
+++ b/ext/racc/cparse/README
@@ -6,6 +6,5 @@ Racc parser generator. If you want to generate
your own parser, you must get Racc full package.
Get it from:
- - http://i.loveruby.net/en/projects/racc
- - https://github.com/tenderlove/racc
+ http://raa.ruby-lang.org/list.rhtml?name=racc
diff --git a/ext/racc/cparse/cparse.c b/ext/racc/cparse/cparse.c
index 9bb40e7483..10a9a030ac 100644
--- a/ext/racc/cparse/cparse.c
+++ b/ext/racc/cparse/cparse.c
@@ -91,7 +91,7 @@ num_to_long(VALUE n)
}
#define AREF(s, idx) \
- ((0 <= idx && idx < RARRAY_LEN(s)) ? rb_ary_entry(s, idx) : Qnil)
+ ((0 <= idx && idx < RARRAY_LEN(s)) ? RARRAY_PTR(s)[idx] : Qnil)
/* -----------------------------------------------------------------------
Parser Stack Interfaces
@@ -105,7 +105,7 @@ get_stack_tail(VALUE stack, long len)
{
if (len < 0) return Qnil; /* system error */
if (len > RARRAY_LEN(stack)) len = RARRAY_LEN(stack);
- return rb_ary_subseq(stack, RARRAY_LEN(stack) - len, len);
+ return rb_ary_new4(len, RARRAY_PTR(stack) + RARRAY_LEN(stack) - len);
}
static void
@@ -122,7 +122,7 @@ cut_stack_tail(VALUE stack, long len)
#define PUSH(s, i) rb_ary_store(s, RARRAY_LEN(s), i)
#define POP(s) rb_ary_pop(s)
#define LAST_I(s) \
- ((RARRAY_LEN(s) > 0) ? rb_ary_entry(s, RARRAY_LEN(s) - 1) : Qnil)
+ ((RARRAY_LEN(s) > 0) ? RARRAY_PTR(s)[RARRAY_LEN(s) - 1] : Qnil)
#define GET_TAIL(s, len) get_stack_tail(s, len)
#define CUT_TAIL(s, len) cut_stack_tail(s, len)
@@ -192,7 +192,7 @@ static VALUE racc_yyparse _((VALUE parser, VALUE lexer, VALUE lexmid,
VALUE arg, VALUE sysdebug));
static void call_lexer _((struct cparse_params *v));
-static VALUE lexer_i _((RB_BLOCK_CALL_FUNC_ARGLIST(block_args, data)));
+static VALUE lexer_i _((VALUE block_args, VALUE data, VALUE self));
static VALUE assert_array _((VALUE a));
static long assert_integer _((VALUE n));
@@ -282,7 +282,7 @@ call_lexer(struct cparse_params *v)
#endif
static VALUE
-lexer_i(RB_BLOCK_CALL_FUNC_ARGLIST(block_args, data))
+lexer_i(VALUE block_args, VALUE data, VALUE self)
{
struct cparse_params *v;
VALUE tok, val;
@@ -334,21 +334,21 @@ initialize_params(VALUE vparams, VALUE parser, VALUE arg, VALUE lexer, VALUE lex
Check_Type(arg, T_ARRAY);
if (!(13 <= RARRAY_LEN(arg) && RARRAY_LEN(arg) <= 14))
rb_raise(RaccBug, "[Racc Bug] wrong arg.size %ld", RARRAY_LEN(arg));
- v->action_table = assert_array (rb_ary_entry(arg, 0));
- v->action_check = assert_array (rb_ary_entry(arg, 1));
- v->action_default = assert_array (rb_ary_entry(arg, 2));
- v->action_pointer = assert_array (rb_ary_entry(arg, 3));
- v->goto_table = assert_array (rb_ary_entry(arg, 4));
- v->goto_check = assert_array (rb_ary_entry(arg, 5));
- v->goto_default = assert_array (rb_ary_entry(arg, 6));
- v->goto_pointer = assert_array (rb_ary_entry(arg, 7));
- v->nt_base = assert_integer(rb_ary_entry(arg, 8));
- v->reduce_table = assert_array (rb_ary_entry(arg, 9));
- v->token_table = assert_hash (rb_ary_entry(arg, 10));
- v->shift_n = assert_integer(rb_ary_entry(arg, 11));
- v->reduce_n = assert_integer(rb_ary_entry(arg, 12));
+ v->action_table = assert_array (RARRAY_PTR(arg)[ 0]);
+ v->action_check = assert_array (RARRAY_PTR(arg)[ 1]);
+ v->action_default = assert_array (RARRAY_PTR(arg)[ 2]);
+ v->action_pointer = assert_array (RARRAY_PTR(arg)[ 3]);
+ v->goto_table = assert_array (RARRAY_PTR(arg)[ 4]);
+ v->goto_check = assert_array (RARRAY_PTR(arg)[ 5]);
+ v->goto_default = assert_array (RARRAY_PTR(arg)[ 6]);
+ v->goto_pointer = assert_array (RARRAY_PTR(arg)[ 7]);
+ v->nt_base = assert_integer(RARRAY_PTR(arg)[ 8]);
+ v->reduce_table = assert_array (RARRAY_PTR(arg)[ 9]);
+ v->token_table = assert_hash (RARRAY_PTR(arg)[10]);
+ v->shift_n = assert_integer(RARRAY_PTR(arg)[11]);
+ v->reduce_n = assert_integer(RARRAY_PTR(arg)[12]);
if (RARRAY_LEN(arg) > 13) {
- v->use_result_var = RTEST(rb_ary_entry(arg, 13));
+ v->use_result_var = RTEST(RARRAY_PTR(arg)[13]);
}
else {
v->use_result_var = TRUE;
@@ -564,7 +564,7 @@ parse_main(struct cparse_params *v, VALUE tok, VALUE val, int resume)
accept:
if (v->debug) rb_funcall(v->parser, id_d_accept, 0);
- v->retval = rb_ary_entry(v->vstack, 0);
+ v->retval = RARRAY_PTR(v->vstack)[0];
v->fin = CP_FIN_ACCEPT;
return;
@@ -693,9 +693,9 @@ reduce0(VALUE val, VALUE data, VALUE self)
VALUE goto_state;
Data_Get_Struct(data, struct cparse_params, v);
- reduce_len = rb_ary_entry(v->reduce_table, v->ruleno);
- reduce_to = rb_ary_entry(v->reduce_table, v->ruleno+1);
- method_id = rb_ary_entry(v->reduce_table, v->ruleno+2);
+ reduce_len = RARRAY_PTR(v->reduce_table)[v->ruleno];
+ reduce_to = RARRAY_PTR(v->reduce_table)[v->ruleno+1];
+ method_id = RARRAY_PTR(v->reduce_table)[v->ruleno+2];
len = NUM2LONG(reduce_len);
mid = value_to_id(method_id);
@@ -710,10 +710,10 @@ reduce0(VALUE val, VALUE data, VALUE self)
else {
if (mid != id_noreduce) {
tmp_v = GET_TAIL(v->vstack, len);
- tmp = rb_ary_entry(tmp_v, 0);
+ tmp = RARRAY_PTR(tmp_v)[0];
}
else {
- tmp = rb_ary_entry(v->vstack, RARRAY_LEN(v->vstack) - len);
+ tmp = RARRAY_PTR(v->vstack)[ RARRAY_LEN(v->vstack) - len ];
}
CUT_TAIL(v->vstack, len);
if (v->debug) {
diff --git a/ext/racc/cparse/depend b/ext/racc/cparse/depend
new file mode 100644
index 0000000000..7b06a880f5
--- /dev/null
+++ b/ext/racc/cparse/depend
@@ -0,0 +1 @@
+cparse.o: cparse.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h
diff --git a/ext/rbconfig/sizeof/depend b/ext/rbconfig/sizeof/depend
deleted file mode 100644
index 360b3386d3..0000000000
--- a/ext/rbconfig/sizeof/depend
+++ /dev/null
@@ -1,3 +0,0 @@
-sizes.c: $(top_srcdir)/tool/generic_erb.rb $(top_srcdir)/template/sizes.c.tmpl $(top_srcdir)/configure.in
- $(Q) $(RUBY) $(top_srcdir)/tool/generic_erb.rb --output=$@ \
- $(top_srcdir)/template/sizes.c.tmpl $(top_srcdir)/configure.in
diff --git a/ext/rbconfig/sizeof/extconf.rb b/ext/rbconfig/sizeof/extconf.rb
deleted file mode 100644
index 619b4256f8..0000000000
--- a/ext/rbconfig/sizeof/extconf.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-$srcs = %w[sizes.c]
-create_makefile('rbconfig/sizeof')
diff --git a/ext/readline/README.ja b/ext/readline/README.ja
index 57a6ee4126..f1b42f25bc 100644
--- a/ext/readline/README.ja
+++ b/ext/readline/README.ja
@@ -25,6 +25,8 @@ GNU Readline ã®ã‚ˆã†ã«å…¥åŠ›ã®è£œå®Œã‚„Emacs ã®ã‚ˆã†ãªã‚­ãƒ¼æ“作ãªã©ã
使用ã™ã‚‹ãƒ©ã‚¤ãƒ–ラリã«ã‚ˆã‚Šã€ã„ãã¤ã‹ã®ãƒ¡ã‚½ãƒƒãƒ‰ã§ä¾‹å¤– NotImplementedError
ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+$SAFE ㌠4 ã®å ´åˆã€å¤šãã®ãƒ¡ã‚½ãƒƒãƒ‰ã§ä¾‹å¤– SecurityError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+
== Readline モジュール
=== モジュール関数
@@ -110,6 +112,8 @@ readline([prompt, [add_hist]]) -> String | nil
print "-> ", buf, "\n"
end
+ $SAFE ㌠4 ã®å ´åˆã€ä¾‹å¤– SecurityError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+
=== クラスメソッド
Readline.input = input
@@ -117,11 +121,15 @@ Readline.input = input
Readline.readline メソッドã§ä½¿ç”¨ã™ã‚‹å…¥åŠ›ç”¨ã® File オブジェクト input
を指定ã—ã¾ã™ã€‚
+ $SAFE ㌠4 ã®å ´åˆã€ä¾‹å¤– SecurityError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+
Readline.output = output
Readline.readline メソッドã§ä½¿ç”¨ã™ã‚‹å‡ºåŠ›ç”¨ã® File オブジェクト
output を指定ã—ã¾ã™ã€‚
+ $SAFE ㌠4 ã®å ´åˆã€ä¾‹å¤– SecurityError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+
Readline.completion_proc = proc
ユーザã‹ã‚‰ã®å…¥åŠ›ã‚’è£œå®Œã™ã‚‹æ™‚ã®å€™è£œã‚’å–å¾—ã™ã‚‹ Proc オブジェクト proc ã‚’
@@ -138,16 +146,22 @@ Readline.completion_proc = proc
ã®ã‚’å˜èªžã¨ã™ã‚‹ã¨ã€ã‚«ãƒ¼ã‚½ãƒ«ãŒã‚ã‚‹å˜èªžã®æœ€åˆã®æ–‡å­—ã‹ã‚‰ç¾åœ¨ã®ã‚«ãƒ¼ã‚½ãƒ«ä½
ç½®ã¾ã§ã®æ–‡å­—列㌠proc ã®å¼•æ•°ã«æ¸¡ã•れã¾ã™ã€‚
+ $SAFE ㌠4 ã®å ´åˆã€ä¾‹å¤– SecurityError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+
Readline.completion_proc -> proc
ユーザã‹ã‚‰ã®å…¥åŠ›ã‚’è£œå®Œã™ã‚‹æ™‚ã®å€™è£œã‚’å–å¾—ã™ã‚‹ Proc オブジェクト proc
ã‚’å–å¾—ã—ã¾ã™ã€‚
+ $SAFE ㌠4 ã®å ´åˆã€ä¾‹å¤– SecurityError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+
Readline.completion_case_fold = bool
ユーザã®å…¥åŠ›ã‚’è£œå®Œã™ã‚‹éš›ã€å¤§æ–‡å­—ã¨å°æ–‡å­—を区別ã™ã‚‹ï¼ã—ãªã„を指定ã—ã¾ã™ã€‚
bool ãŒçœŸãªã‚‰ã°åŒºåˆ¥ã—ã¾ã›ã‚“。bool ãŒå½ãªã‚‰ã°åŒºåˆ¥ã—ã¾ã™ã€‚
+ $SAFE ㌠4 ã®å ´åˆã€ä¾‹å¤– SecurityError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+
Readline.completion_case_fold -> bool
ユーザã®å…¥åŠ›ã‚’è£œå®Œã™ã‚‹éš›ã€å¤§æ–‡å­—ã¨å°æ–‡å­—を区別ã™ã‚‹ï¼ã—ãªã„ã‚’å–å¾—ã—ã¾ã™ã€‚
@@ -161,6 +175,8 @@ Readline.completion_case_fold -> bool
Readline.completion_case_fold = "This is a String."
p Readline.completion_case_fold # => "This is a String."
+ $SAFE ㌠4 ã®å ´åˆã€ä¾‹å¤– SecurityError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+
Readline.line_buffer -> string
入力中ã®è¡Œå…¨ä½“ã‚’è¿”ã—ã¾ã™ã€‚complete_proc ã®ä¸­ã§ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚’想定ã—
@@ -183,6 +199,8 @@ Readline.vi_editing_mode -> nil
サãƒãƒ¼ãƒˆã—ã¦ã„ãªã„環境ã§ã¯ã€ä¾‹å¤– NotImplementedError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+ $SAFE ㌠4 ã®å ´åˆã€ä¾‹å¤– SecurityError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+
Readline.vi_editing_mode? -> bool
編集モード㌠vi モードã®å ´åˆã€true ã‚’è¿”ã—ã¾ã™ã€‚ãã†ã§ãªã‘れ㰠false
@@ -190,6 +208,8 @@ Readline.vi_editing_mode? -> bool
サãƒãƒ¼ãƒˆã—ã¦ã„ãªã„環境ã§ã¯ã€ä¾‹å¤– NotImplementedError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+ $SAFE ㌠4 ã®å ´åˆã€ä¾‹å¤– SecurityError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+
Readline.emacs_editing_mode -> nil
編集モードを Emacs モードã«ã—ã¾ã™ã€‚
@@ -198,6 +218,8 @@ Readline.emacs_editing_mode -> nil
サãƒãƒ¼ãƒˆã—ã¦ã„ãªã„環境ã§ã¯ã€ä¾‹å¤– NotImplementedError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+ $SAFE ㌠4 ã®å ´åˆã€ä¾‹å¤– SecurityError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+
Readline.emacs_editing_mode? -> bool
編集モード㌠Emacs モードã®å ´åˆã€true ã‚’è¿”ã—ã¾ã™ã€‚ãã†ã§ãªã‘れ㰠false
@@ -205,6 +227,8 @@ Readline.emacs_editing_mode? -> bool
サãƒãƒ¼ãƒˆã—ã¦ã„ãªã„環境ã§ã¯ã€ä¾‹å¤– NotImplementedError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+ $SAFE ㌠4 ã®å ´åˆã€ä¾‹å¤– SecurityError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+
Readline.completion_append_character = char
ユーザã®å…¥åŠ›ã®è£œå®ŒãŒå®Œäº†ã—ãŸå ´åˆã«ã€æœ€å¾Œã«ä»˜åŠ ã™ã‚‹æ–‡å­— char を指定ã—
@@ -241,6 +265,8 @@ Readline.completion_append_character = char
サãƒãƒ¼ãƒˆã—ã¦ã„ãªã„環境ã§ã¯ã€ä¾‹å¤– NotImplementedError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+ $SAFE ㌠4 ã®å ´åˆã€ä¾‹å¤– SecurityError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+
Readline.completion_append_character -> char
ユーザã®å…¥åŠ›ã®è£œå®ŒãŒå®Œäº†ã—ãŸå ´åˆã«ã€æœ€å¾Œã«ä»˜åŠ ã™ã‚‹æ–‡å­—ã‚’å–å¾—ã—ã¾ã™ã€‚
@@ -248,6 +274,8 @@ Readline.completion_append_character -> char
サãƒãƒ¼ãƒˆã—ã¦ã„ãªã„環境ã§ã¯ã€ä¾‹å¤– NotImplementedError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+ $SAFE ㌠4 ã®å ´åˆã€ä¾‹å¤– SecurityError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+
Readline.basic_word_break_characters = string
ユーザã®å…¥åŠ›ã®è£œå®Œã‚’行ã†éš›ã€å˜èªžã®åŒºåˆ‡ã‚Šã‚’示ã™è¤‡æ•°ã®æ–‡å­—ã§æ§‹æˆã•れる
@@ -258,6 +286,8 @@ Readline.basic_word_break_characters = string
サãƒãƒ¼ãƒˆã—ã¦ã„ãªã„環境ã§ã¯ã€ä¾‹å¤– NotImplementedError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+ $SAFE ㌠4 ã®å ´åˆã€ä¾‹å¤– SecurityError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+
Readline.basic_word_break_characters -> string
ユーザã®å…¥åŠ›ã®è£œå®Œã‚’行ã†éš›ã€å˜èªžã®åŒºåˆ‡ã‚Šã‚’示ã™è¤‡æ•°ã®æ–‡å­—ã§æ§‹æˆã•れる
@@ -265,6 +295,8 @@ Readline.basic_word_break_characters -> string
サãƒãƒ¼ãƒˆã—ã¦ã„ãªã„環境ã§ã¯ã€ä¾‹å¤– NotImplementedError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+ $SAFE ㌠4 ã®å ´åˆã€ä¾‹å¤– SecurityError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+
Readline.completer_word_break_characters = string
ユーザã®å…¥åŠ›ã®è£œå®Œã‚’行ã†éš›ã€å˜èªžã®åŒºåˆ‡ã‚Šã‚’示ã™è¤‡æ•°ã®æ–‡å­—ã§æ§‹æˆã•れる
@@ -277,6 +309,8 @@ Readline.completer_word_break_characters = string
サãƒãƒ¼ãƒˆã—ã¦ã„ãªã„環境ã§ã¯ã€ä¾‹å¤– NotImplementedError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+ $SAFE ㌠4 ã®å ´åˆã€ä¾‹å¤– SecurityError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+
Readline.completer_word_break_characters -> string
ユーザã®å…¥åŠ›ã®è£œå®Œã‚’行ã†éš›ã€å˜èªžã®åŒºåˆ‡ã‚Šã‚’示ã™è¤‡æ•°ã®æ–‡å­—ã§æ§‹æˆã•れãŸ
@@ -284,6 +318,8 @@ Readline.completer_word_break_characters -> string
サãƒãƒ¼ãƒˆã—ã¦ã„ãªã„環境ã§ã¯ã€ä¾‹å¤– NotImplementedError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+ $SAFE ㌠4 ã®å ´åˆã€ä¾‹å¤– SecurityError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+
Readline.basic_quote_characters = string
スペースãªã©ã®å˜èªžã®åŒºåˆ‡ã‚Šã‚’クオートã™ã‚‹ãŸã‚ã®è¤‡æ•°ã®æ–‡å­—ã§æ§‹æˆã•れる
@@ -291,6 +327,8 @@ Readline.basic_quote_characters = string
サãƒãƒ¼ãƒˆã—ã¦ã„ãªã„環境ã§ã¯ã€ä¾‹å¤– NotImplementedError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+ $SAFE ㌠4 ã®å ´åˆã€ä¾‹å¤– SecurityError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+
Readline.basic_quote_characters -> string
スペースãªã©ã®å˜èªžã®åŒºåˆ‡ã‚Šã‚’クオートã™ã‚‹ãŸã‚ã®è¤‡æ•°ã®æ–‡å­—ã§æ§‹æˆã•れる
@@ -298,6 +336,8 @@ Readline.basic_quote_characters -> string
サãƒãƒ¼ãƒˆã—ã¦ã„ãªã„環境ã§ã¯ã€ä¾‹å¤– NotImplementedError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+ $SAFE ㌠4 ã®å ´åˆã€ä¾‹å¤– SecurityError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+
Readline.completer_quote_characters = string
ユーザã®å…¥åŠ›ã®è£œå®Œã‚’行ã†éš›ã€ã‚¹ãƒšãƒ¼ã‚¹ãªã©ã®å˜èªžã®åŒºåˆ‡ã‚Šã‚’
@@ -307,6 +347,8 @@ Readline.completer_quote_characters = string
サãƒãƒ¼ãƒˆã—ã¦ã„ãªã„環境ã§ã¯ã€ä¾‹å¤– NotImplementedError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+ $SAFE ㌠4 ã®å ´åˆã€ä¾‹å¤– SecurityError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+
Readline.completer_quote_characters -> string
ユーザã®å…¥åŠ›ã®è£œå®Œã‚’行ã†éš›ã€ã‚¹ãƒšãƒ¼ã‚¹ãªã©ã®å˜èªžã®åŒºåˆ‡ã‚Šã‚’
@@ -314,6 +356,8 @@ Readline.completer_quote_characters -> string
サãƒãƒ¼ãƒˆã—ã¦ã„ãªã„環境ã§ã¯ã€ä¾‹å¤– NotImplementedError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+ $SAFE ㌠4 ã®å ´åˆã€ä¾‹å¤– SecurityError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+
Readline.filename_quote_characters = string
ユーザã®å…¥åŠ›æ™‚ã«ãƒ•ァイルåã®è£œå®Œã‚’行ã†éš›ã€ã‚¹ãƒšãƒ¼ã‚¹ãªã©ã®å˜èªžã®åŒºåˆ‡ã‚Šã‚’
@@ -323,6 +367,8 @@ Readline.filename_quote_characters = string
サãƒãƒ¼ãƒˆã—ã¦ã„ãªã„環境ã§ã¯ã€ä¾‹å¤– NotImplementedError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+ $SAFE ㌠4 ã®å ´åˆã€ä¾‹å¤– SecurityError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+
Readline.filename_quote_characters -> string
ユーザã®å…¥åŠ›æ™‚ã«ãƒ•ァイルåã®è£œå®Œã‚’行ã†éš›ã€ã‚¹ãƒšãƒ¼ã‚¹ãªã©ã®å˜èªžã®åŒºåˆ‡ã‚Šã‚’
@@ -330,6 +376,8 @@ Readline.filename_quote_characters -> string
サãƒãƒ¼ãƒˆã—ã¦ã„ãªã„環境ã§ã¯ã€ä¾‹å¤– NotImplementedError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+ $SAFE ㌠4 ã®å ´åˆã€ä¾‹å¤– SecurityError ãŒç™ºç”Ÿã—ã¾ã™ã€‚
+
=== クラス定数
HISTORY
@@ -367,6 +415,9 @@ HISTORY
* HISTORY.delete_at(index) -> string
* HISTORY.clear -> self
+ $SAFE ㌠4 ã®å ´åˆã€ãƒ’ストリã«ã‚¢ã‚¯ã‚»ã‚¹ã—ãŸã¨ãã«ä¾‹å¤– SecurityError ãŒ
+ 発生ã—ã¾ã™ã€‚
+
FILENAME_COMPLETION_PROC
ファイルåã®è£œå®Œã‚’行ㆠcall メソッドをæŒã¤ã‚ªãƒ–ジェクトã§ã™ã€‚
diff --git a/ext/readline/depend b/ext/readline/depend
index ef0414d9b2..6570c5a036 100644
--- a/ext/readline/depend
+++ b/ext/readline/depend
@@ -1,5 +1 @@
-readline.o: readline.c $(HDRS) $(ruby_headers) \
- $(hdrdir)/ruby/io.h \
- $(hdrdir)/ruby/encoding.h \
- $(hdrdir)/ruby/oniguruma.h \
- $(hdrdir)/ruby/thread.h
+readline.o: readline.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h
diff --git a/ext/readline/extconf.rb b/ext/readline/extconf.rb
index 0b121c1ebe..c5db9b029a 100644
--- a/ext/readline/extconf.rb
+++ b/ext/readline/extconf.rb
@@ -19,6 +19,10 @@ def readline.have_func(func)
return super(func, headers)
end
+def readline.have_macro(macro)
+ return super(macro, headers)
+end
+
dir_config('curses')
dir_config('ncurses')
dir_config('termcap')
@@ -93,5 +97,6 @@ readline.have_func("remove_history")
readline.have_func("clear_history")
readline.have_func("rl_redisplay")
readline.have_func("rl_insert_text")
-readline.have_func("rl_delete_text")
+readline.have_macro("RL_PROMPT_START_IGNORE")
+readline.have_macro("RL_PROMPT_END_IGNORE")
create_makefile("readline")
diff --git a/ext/readline/readline.c b/ext/readline/readline.c
index 820c6b74be..08b61fef9d 100644
--- a/ext/readline/readline.c
+++ b/ext/readline/readline.c
@@ -6,12 +6,12 @@
created at: Wed Jan 20 13:59:32 JST 1999
Copyright (C) 1997-2008 Shugo Maeda
- Copyright (C) 2008-2013 Kouji Takao
+ Copyright (C) 2008-2009 TAKAO Kouji
$Id$
Contact:
- - Kouji Takao <kouji dot takao at gmail dot com> (current maintainer)
+ - TAKAO Kouji <kouji at takao7 dot net> (current maintainer)
************************************************/
@@ -35,7 +35,6 @@
#include "ruby/ruby.h"
#include "ruby/io.h"
-#include "ruby/thread.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
@@ -49,7 +48,7 @@ static VALUE mReadline;
#define EDIT_LINE_LIBRARY_VERSION "EditLine wrapper"
#ifndef USE_INSERT_IGNORE_ESCAPE
-# if !defined(HAVE_EDITLINE_READLINE_H) && defined(RL_PROMPT_START_IGNORE) && defined(RL_PROMPT_END_IGNORE)
+# if !defined(HAVE_EDITLINE_READLINE_H) && defined(HAVE_RL_PROMPT_START_IGNORE) && defined(HAVE_RL_PROMPT_END_IGNORE)
# define USE_INSERT_IGNORE_ESCAPE 1
# else
# define USE_INSERT_IGNORE_ESCAPE 0
@@ -124,33 +123,27 @@ static char **readline_attempted_completion_function(const char *text,
* print("-> ", buf, "\n")
* end
*
- * Documented by Kouji Takao <kouji dot takao at gmail dot com>.
+ * Most of methods raise SecurityError exception if $SAFE is 4.
+ *
+ * Documented by TAKAO Kouji <kouji at takao7 dot net>.
*/
-static VALUE readline_instream;
-static VALUE readline_outstream;
-static FILE *readline_rl_instream;
-static FILE *readline_rl_outstream;
-
#if defined HAVE_RL_GETC_FUNCTION
+static VALUE readline_instream;
#ifndef HAVE_RL_GETC
#define rl_getc(f) EOF
#endif
-struct getc_struct {
- FILE *input;
- int fd;
- int ret;
- int err;
-};
-
+static int readline_getc(FILE *);
static int
-getc_body(struct getc_struct *p)
+readline_getc(FILE *input)
{
- char ch;
- ssize_t ss;
-
+ rb_io_t *ifp = 0;
+ VALUE c;
+ if (!readline_instream) return rl_getc(input);
+ GetOpenFile(readline_instream, ifp);
+ if (rl_instream != ifp->stdio_file) return rl_getc(input);
#if defined(_WIN32)
{
INPUT_RECORD ir;
@@ -158,19 +151,19 @@ getc_body(struct getc_struct *p)
static int prior_key = '0';
for (;;) {
if (prior_key > 0xff) {
- prior_key = rl_getc(p->input);
+ prior_key = rl_getc(ifp->stdio_file);
return prior_key;
}
- if (PeekConsoleInput((HANDLE)_get_osfhandle(p->fd), &ir, 1, &n)) {
+ if (PeekConsoleInput((HANDLE)_get_osfhandle(ifp->fd), &ir, 1, &n)) {
if (n == 1) {
if (ir.EventType == KEY_EVENT && ir.Event.KeyEvent.bKeyDown) {
- prior_key = rl_getc(p->input);
+ prior_key = rl_getc(ifp->stdio_file);
return prior_key;
} else {
- ReadConsoleInput((HANDLE)_get_osfhandle(p->fd), &ir, 1, &n);
+ ReadConsoleInput((HANDLE)_get_osfhandle(ifp->fd), &ir, 1, &n);
}
} else {
- HANDLE h = (HANDLE)_get_osfhandle(p->fd);
+ HANDLE h = (HANDLE)_get_osfhandle(ifp->fd);
rb_w32_wait_events(&h, 1, INFINITE);
}
} else {
@@ -179,62 +172,22 @@ getc_body(struct getc_struct *p)
}
}
#endif
-
- ss = read(p->fd, &ch, 1);
- if (ss == 0) {
- errno = 0;
- return EOF;
+ c = rb_io_getbyte(readline_instream);
+ if (NIL_P(c)) return EOF;
+#ifdef ESC
+ if (c == INT2FIX(ESC) &&
+ RL_ISSTATE(RL_STATE_ISEARCH) && /* isn't needed in other states? */
+ rb_io_read_pending(ifp)) {
+ int meta = 0;
+ c = rb_io_getbyte(readline_instream);
+ if (FIXNUM_P(c) && isascii(FIX2INT(c))) meta = 1;
+ rb_io_ungetbyte(readline_instream, c);
+ if (meta) rl_execute_next(ESC);
+ return ESC;
}
- if (ss != 1)
- return EOF;
- return (unsigned char)ch;
-}
-
-static void *
-getc_func(void *data1)
-{
- struct getc_struct *p = data1;
- errno = 0;
- p->ret = getc_body(p);
- p->err = errno;
- return NULL;
-}
-
-static int
-readline_getc(FILE *input)
-{
- struct getc_struct data;
- if (input == NULL) /* editline may give NULL as input. */
- input = stdin;
- data.input = input;
- data.fd = fileno(input);
- again:
- data.ret = EOF;
- data.err = EINTR; /* getc_func is not called if already interrupted. */
- rb_thread_call_without_gvl2(getc_func, &data, RUBY_UBF_IO, NULL);
- if (data.ret == EOF) {
- if (data.err == 0) {
- return EOF;
- }
- if (data.err == EINTR) {
- rb_thread_check_ints();
- goto again;
- }
- if (data.err == EWOULDBLOCK || data.err == EAGAIN) {
- int ret;
- if (fileno(input) != data.fd)
- rb_bug("readline_getc: input closed unexpectedly or memory corrupted");
- ret = rb_wait_for_single_fd(data.fd, RB_WAITFD_IN, NULL);
- if (ret != -1 || errno == EINTR)
- goto again;
- rb_sys_fail("rb_wait_for_single_fd");
- }
- errno = data.err;
- rb_sys_fail("read");
- }
- return data.ret;
+#endif
+ return FIX2INT(c);
}
-
#elif defined HAVE_RL_EVENT_HOOK
#define BUSY_WAIT 0
@@ -266,56 +219,56 @@ insert_ignore_escape(VALUE self, VALUE prompt)
if (orig_prompt == prompt) return last_prompt;
len = RSTRING_LEN(prompt);
if (NIL_P(last_prompt)) {
- last_prompt = rb_str_tmp_new(len);
+ last_prompt = rb_str_tmp_new(len);
}
s = s0 = RSTRING_PTR(prompt);
e = s0 + len;
rb_str_set_len(last_prompt, 0);
while (s < e && *s) {
- switch (*s) {
- case RL_PROMPT_START_IGNORE:
- ignoring = -1;
- rb_str_cat(last_prompt, s0, ++s - s0);
- s0 = s;
- break;
- case RL_PROMPT_END_IGNORE:
- ignoring = 0;
- rb_str_cat(last_prompt, s0, ++s - s0);
- s0 = s;
- break;
- case '\033':
- if (++s < e && *s == '[') {
- rb_str_cat(last_prompt, s0, s - s0 - 1);
- s0 = s - 1;
- while (++s < e && *s) {
- if (ISALPHA(*(unsigned char *)s)) {
- if (!ignoring) {
- ignoring = 1;
- rb_str_cat(last_prompt, ignore_code+0, 1);
- }
- rb_str_cat(last_prompt, s0, ++s - s0);
- s0 = s;
- break;
- }
- else if (!(('0' <= *s && *s <= '9') || *s == ';')) {
- break;
- }
- }
- }
- break;
- default:
- if (ignoring > 0) {
- ignoring = 0;
- rb_str_cat(last_prompt, ignore_code+1, 1);
- }
- s++;
- break;
- }
+ switch (*s) {
+ case RL_PROMPT_START_IGNORE:
+ ignoring = -1;
+ rb_str_cat(last_prompt, s0, ++s - s0);
+ s0 = s;
+ break;
+ case RL_PROMPT_END_IGNORE:
+ ignoring = 0;
+ rb_str_cat(last_prompt, s0, ++s - s0);
+ s0 = s;
+ break;
+ case '\033':
+ if (++s < e && *s == '[') {
+ rb_str_cat(last_prompt, s0, s - s0 - 1);
+ s0 = s - 1;
+ while (++s < e && *s) {
+ if (ISALPHA(*s)) {
+ if (!ignoring) {
+ ignoring = 1;
+ rb_str_cat(last_prompt, ignore_code+0, 1);
+ }
+ rb_str_cat(last_prompt, s0, ++s - s0);
+ s0 = s;
+ break;
+ }
+ else if (!('0' <= *s && *s <= '9' || *s == ';')) {
+ break;
+ }
+ }
+ }
+ break;
+ default:
+ if (ignoring > 0) {
+ ignoring = 0;
+ rb_str_cat(last_prompt, ignore_code+1, 1);
+ }
+ s++;
+ break;
+ }
}
if (ignoring > 0) {
- ignoring = 0;
- rb_str_cat(last_prompt, ignore_code+1, 1);
+ ignoring = 0;
+ rb_str_cat(last_prompt, ignore_code+1, 1);
}
rb_str_cat(last_prompt, s0, s - s0);
@@ -335,30 +288,6 @@ readline_get(VALUE prompt)
return (VALUE)readline((char *)prompt);
}
-static void
-clear_rl_instream(void)
-{
- if (readline_rl_instream) {
- fclose(readline_rl_instream);
- if (rl_instream == readline_rl_instream)
- rl_instream = NULL;
- readline_rl_instream = NULL;
- }
- readline_instream = Qfalse;
-}
-
-static void
-clear_rl_outstream(void)
-{
- if (readline_rl_outstream) {
- fclose(readline_rl_outstream);
- if (rl_outstream == readline_rl_outstream)
- rl_outstream = NULL;
- readline_rl_outstream = NULL;
- }
- readline_outstream = Qfalse;
-}
-
/*
* call-seq:
* Readline.readline(prompt = "", add_hist = false) -> string or nil
@@ -369,11 +298,11 @@ clear_rl_outstream(void)
* Returns nil when the inputted line is empty and user inputs EOF
* (Presses ^D on UNIX).
*
- * Raises IOError exception if one of below conditions are satisfied.
- * 1. stdin was closed.
- * 2. stdout was closed.
+ * Raises IOError exception if below conditions are satisfied.
+ * 1. stdin is not tty.
+ * 2. stdin was closed. (errno is EBADF after called isatty(2).)
*
- * This method supports thread. Switches the thread context when waits
+ * This method supports thread. Switchs the thread context when waits
* inputting line.
*
* Supports line edit when inputs line. Provides VI and Emacs editing mode.
@@ -442,6 +371,8 @@ clear_rl_outstream(void)
* # p Readline::HISTORY.to_a
* print "-> ", buf, "\n"
* end
+ *
+ * Raises SecurityError exception if $SAFE is 4.
*/
static VALUE
readline_readline(int argc, VALUE *argv, VALUE self)
@@ -451,31 +382,23 @@ readline_readline(int argc, VALUE *argv, VALUE self)
char *buff;
int status;
+ rb_secure(4);
if (rb_scan_args(argc, argv, "02", &tmp, &add_hist) > 0) {
- OutputStringValue(tmp);
+ OutputStringValue(tmp);
#if USE_INSERT_IGNORE_ESCAPE
- tmp = insert_ignore_escape(self, tmp);
- rb_str_locktmp(tmp);
+ tmp = insert_ignore_escape(self, tmp);
+ rb_str_locktmp(tmp);
#endif
- prompt = RSTRING_PTR(tmp);
+ prompt = RSTRING_PTR(tmp);
}
- if (readline_instream) {
- rb_io_t *ifp;
- rb_io_check_initialized(ifp = RFILE(rb_io_taint_check(readline_instream))->fptr);
- if (ifp->fd < 0) {
- clear_rl_instream();
- rb_raise(rb_eIOError, "closed readline input");
- }
- }
-
- if (readline_outstream) {
- rb_io_t *ofp;
- rb_io_check_initialized(ofp = RFILE(rb_io_taint_check(readline_outstream))->fptr);
- if (ofp->fd < 0) {
- clear_rl_outstream();
- rb_raise(rb_eIOError, "closed readline output");
- }
+ if (!isatty(fileno(rl_instream)) && errno == EBADF) rb_raise(rb_eIOError, "closed stdin");
+ if (rl_outstream) {
+ struct stat stbuf;
+ int fd = fileno(rl_outstream);
+ if (fd < 0 || fstat(fd, &stbuf) != 0) {
+ rb_raise(rb_eIOError, "closed stdout");
+ }
}
#ifdef _WIN32
@@ -484,7 +407,7 @@ readline_readline(int argc, VALUE *argv, VALUE self)
buff = (char*)rb_protect(readline_get, (VALUE)prompt, &status);
#if USE_INSERT_IGNORE_ESCAPE
if (prompt) {
- rb_str_unlocktmp(tmp);
+ rb_str_unlocktmp(tmp);
}
#endif
if (status) {
@@ -496,9 +419,9 @@ readline_readline(int argc, VALUE *argv, VALUE self)
rl_cleanup_after_signal();
#elif defined HAVE_RL_DEPREP_TERM_FUNCTION
/* restore terminal mode */
- if (rl_deprep_term_function != NULL) /* NULL in libedit. [ruby-dev:29116] */
- (*rl_deprep_term_function)();
- else
+ if (rl_deprep_term_function != NULL) /* NULL in libedit. [ruby-dev:29116] */
+ (*rl_deprep_term_function)();
+ else
#else
rl_deprep_terminal();
#endif
@@ -506,13 +429,13 @@ readline_readline(int argc, VALUE *argv, VALUE self)
}
if (RTEST(add_hist) && buff) {
- add_history(buff);
+ add_history(buff);
}
if (buff) {
- result = rb_locale_str_new_cstr(buff);
+ result = rb_locale_str_new_cstr(buff);
}
else
- result = Qnil;
+ result = Qnil;
if (buff) free(buff);
return result;
}
@@ -523,34 +446,21 @@ readline_readline(int argc, VALUE *argv, VALUE self)
*
* Specifies a File object +input+ that is input stream for
* Readline.readline method.
+ *
+ * Raises SecurityError exception if $SAFE is 4.
*/
static VALUE
readline_s_set_input(VALUE self, VALUE input)
{
rb_io_t *ifp;
- int fd;
- FILE *f;
- if (NIL_P(input)) {
- clear_rl_instream();
- }
- else {
- Check_Type(input, T_FILE);
- GetOpenFile(input, ifp);
- clear_rl_instream();
- fd = rb_cloexec_dup(ifp->fd);
- if (fd == -1)
- rb_sys_fail("dup");
- f = fdopen(fd, "r");
- if (f == NULL) {
- int save_errno = errno;
- close(fd);
- errno = save_errno;
- rb_sys_fail("fdopen");
- }
- rl_instream = readline_rl_instream = f;
- readline_instream = input;
- }
+ rb_secure(4);
+ Check_Type(input, T_FILE);
+ GetOpenFile(input, ifp);
+ rl_instream = rb_io_stdio_file(ifp);
+#ifdef HAVE_RL_GETC_FUNCTION
+ readline_instream = input;
+#endif
return input;
}
@@ -560,34 +470,18 @@ readline_s_set_input(VALUE self, VALUE input)
*
* Specifies a File object +output+ that is output stream for
* Readline.readline method.
+ *
+ * Raises SecurityError exception if $SAFE is 4.
*/
static VALUE
readline_s_set_output(VALUE self, VALUE output)
{
rb_io_t *ofp;
- int fd;
- FILE *f;
- if (NIL_P(output)) {
- clear_rl_outstream();
- }
- else {
- Check_Type(output, T_FILE);
- GetOpenFile(output, ofp);
- clear_rl_outstream();
- fd = rb_cloexec_dup(ofp->fd);
- if (fd == -1)
- rb_sys_fail("dup");
- f = fdopen(fd, "w");
- if (f == NULL) {
- int save_errno = errno;
- close(fd);
- errno = save_errno;
- rb_sys_fail("fdopen");
- }
- rl_outstream = readline_rl_outstream = f;
- readline_outstream = output;
- }
+ rb_secure(4);
+ Check_Type(output, T_FILE);
+ GetOpenFile(output, ofp);
+ rl_outstream = rb_io_stdio_file(ofp);
return output;
}
@@ -604,13 +498,14 @@ readline_s_set_output(VALUE self, VALUE output)
*
* Raises ArgumentError if +proc+ does not respond to the call method.
*
- * Raises NotImplementedError if the using readline library does not support.
+ * Raises SecurityError if $SAFE is 4.
*/
static VALUE
readline_s_set_pre_input_hook(VALUE self, VALUE proc)
{
+ rb_secure(4);
if (!NIL_P(proc) && !rb_respond_to(proc, rb_intern("call")))
- rb_raise(rb_eArgError, "argument must respond to `call'");
+ rb_raise(rb_eArgError, "argument must respond to `call'");
return rb_ivar_set(mReadline, id_pre_input_hook, proc);
}
@@ -622,11 +517,12 @@ readline_s_set_pre_input_hook(VALUE self, VALUE proc)
* been printed and just before readline starts reading input
* characters. The default is nil.
*
- * Raises NotImplementedError if the using readline library does not support.
+ * Raises SecurityError if $SAFE is 4.
*/
static VALUE
readline_s_get_pre_input_hook(VALUE self)
{
+ rb_secure(4);
return rb_attr_get(mReadline, id_pre_input_hook);
}
@@ -637,7 +533,7 @@ readline_pre_input_hook(void)
proc = rb_attr_get(mReadline, id_pre_input_hook);
if (!NIL_P(proc))
- rb_funcall(proc, rb_intern("call"), 0);
+ rb_funcall(proc, rb_intern("call"), 0);
return 0;
}
#else
@@ -654,11 +550,12 @@ readline_pre_input_hook(void)
*
* See GNU Readline's rl_insert_text function.
*
- * Raises NotImplementedError if the using readline library does not support.
+ * Raises SecurityError if $SAFE is 4.
*/
static VALUE
readline_s_insert_text(VALUE self, VALUE str)
{
+ rb_secure(4);
OutputStringValue(str);
rl_insert_text(RSTRING_PTR(str));
return self;
@@ -667,57 +564,6 @@ readline_s_insert_text(VALUE self, VALUE str)
#define readline_s_insert_text rb_f_notimplement
#endif
-#if defined(HAVE_RL_DELETE_TEXT)
-/*
- * call-seq:
- * Readline.delete_text([start[, length]]) -> self
- * Readline.delete_text(start..end) -> self
- * Readline.delete_text() -> self
- *
- * Delete text between start and end in the current line.
- *
- * See GNU Readline's rl_delete_text function.
- *
- * Raises NotImplementedError if the using readline library does not support.
- */
-static VALUE
-readline_s_delete_text(int argc, VALUE *argv, VALUE self)
-{
- rb_check_arity(argc, 0, 2);
- if (rl_line_buffer) {
- char *p, *ptr = rl_line_buffer;
- long beg = 0, len = strlen(rl_line_buffer);
- struct RString fakestr;
- VALUE str = (VALUE)&fakestr;
-
- fakestr.basic.flags = T_STRING | RSTRING_NOEMBED;
- fakestr.as.heap.ptr = ptr;
- fakestr.as.heap.len = len;
- rb_enc_associate(str, rb_locale_encoding());
- OBJ_FREEZE(str);
- if (argc == 2) {
- beg = NUM2LONG(argv[0]);
- len = NUM2LONG(argv[1]);
- num_pos:
- p = rb_str_subpos(str, beg, &len);
- if (!p) rb_raise(rb_eArgError, "invalid index");
- beg = p - ptr;
- }
- else if (argc == 1) {
- len = rb_str_strlen(str);
- if (!rb_range_beg_len(argv[0], &beg, &len, len, 1)) {
- beg = NUM2LONG(argv[0]);
- goto num_pos;
- }
- }
- rl_delete_text(rb_long2int(beg), rb_long2int(beg + len));
- }
- return self;
-}
-#else
-#define readline_s_delete_text rb_f_notimplement
-#endif
-
#if defined(HAVE_RL_REDISPLAY)
/*
* call-seq:
@@ -728,11 +574,12 @@ readline_s_delete_text(int argc, VALUE *argv, VALUE self)
*
* See GNU Readline's rl_redisplay function.
*
- * Raises NotImplementedError if the using readline library does not support.
+ * Raises SecurityError if $SAFE is 4.
*/
static VALUE
readline_s_redisplay(VALUE self)
{
+ rb_secure(4);
rl_redisplay();
return self;
}
@@ -807,12 +654,15 @@ readline_s_redisplay(VALUE self)
* It may also be helpful to use the Abbrev library to generate completions.
*
* Raises ArgumentError if +proc+ does not respond to the call method.
+ *
+ * Raises SecurityError if $SAFE is 4.
*/
static VALUE
readline_s_set_completion_proc(VALUE self, VALUE proc)
{
+ rb_secure(4);
if (!NIL_P(proc) && !rb_respond_to(proc, rb_intern("call")))
- rb_raise(rb_eArgError, "argument must respond to `call'");
+ rb_raise(rb_eArgError, "argument must respond to `call'");
return rb_ivar_set(mReadline, completion_proc, proc);
}
@@ -821,10 +671,13 @@ readline_s_set_completion_proc(VALUE self, VALUE proc)
* Readline.completion_proc -> proc
*
* Returns the completion Proc object.
+ *
+ * Raises SecurityError exception if $SAFE is 4.
*/
static VALUE
readline_s_get_completion_proc(VALUE self)
{
+ rb_secure(4);
return rb_attr_get(mReadline, completion_proc);
}
@@ -833,10 +686,13 @@ readline_s_get_completion_proc(VALUE self)
* Readline.completion_case_fold = bool
*
* Sets whether or not to ignore case on completion.
+ *
+ * Raises SecurityError exception if $SAFE is 4.
*/
static VALUE
readline_s_set_completion_case_fold(VALUE self, VALUE val)
{
+ rb_secure(4);
return rb_ivar_set(mReadline, completion_case_fold, val);
}
@@ -853,10 +709,13 @@ readline_s_set_completion_case_fold(VALUE self, VALUE val)
*
* Readline.completion_case_fold = "This is a String."
* p Readline.completion_case_fold # => "This is a String."
+ *
+ * Raises SecurityError exception if $SAFE is 4.
*/
static VALUE
readline_s_get_completion_case_fold(VALUE self)
{
+ rb_secure(4);
return rb_attr_get(mReadline, completion_case_fold);
}
@@ -871,14 +730,13 @@ readline_s_get_completion_case_fold(VALUE self)
*
* The length of +Readline.line_buffer+ and GNU Readline's rl_end are
* same.
- *
- * Raises NotImplementedError if the using readline library does not support.
*/
static VALUE
readline_s_get_line_buffer(VALUE self)
{
+ rb_secure(4);
if (rl_line_buffer == NULL)
- return Qnil;
+ return Qnil;
return rb_locale_str_new_cstr(rl_line_buffer);
}
#else
@@ -898,35 +756,15 @@ readline_s_get_line_buffer(VALUE self)
* the length of input-string from +Readline.point+.
*
* start = (the length of input-string) - Readline.point
- *
- * Raises NotImplementedError if the using readline library does not support.
*/
static VALUE
readline_s_get_point(VALUE self)
{
+ rb_secure(4);
return INT2NUM(rl_point);
}
-
-/*
- * call-seq:
- * Readline.point = int
- *
- * Set the index of the current cursor position in
- * +Readline.line_buffer+.
- *
- * Raises NotImplementedError if the using readline library does not support.
- *
- * See +Readline.point+.
- */
-static VALUE
-readline_s_set_point(VALUE self, VALUE pos)
-{
- rl_point = NUM2INT(pos);
- return pos;
-}
#else
#define readline_s_get_point rb_f_notimplement
-#define readline_s_set_point rb_f_notimplement
#endif
static char **
@@ -941,7 +779,7 @@ readline_attempted_completion_function(const char *text, int start, int end)
proc = rb_attr_get(mReadline, completion_proc);
if (NIL_P(proc))
- return NULL;
+ return NULL;
#ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER
rl_completion_append_character = readline_completion_append_character;
#endif
@@ -951,7 +789,7 @@ readline_attempted_completion_function(const char *text, int start, int end)
case_fold = RTEST(rb_attr_get(mReadline, completion_case_fold));
ary = rb_funcall(proc, rb_intern("call"), 1, rb_locale_str_new_cstr(text));
if (!RB_TYPE_P(ary, T_ARRAY))
- ary = rb_Array(ary);
+ ary = rb_Array(ary);
matches = RARRAY_LEN(ary);
if (matches == 0) return NULL;
result = (char**)malloc((matches + 2)*sizeof(char*));
@@ -959,12 +797,12 @@ readline_attempted_completion_function(const char *text, int start, int end)
enc = rb_locale_encoding();
encobj = rb_enc_from_encoding(enc);
for (i = 0; i < matches; i++) {
- temp = rb_obj_as_string(RARRAY_PTR(ary)[i]);
- StringValueCStr(temp); /* must be NUL-terminated */
- rb_enc_check(encobj, temp);
- result[i + 1] = (char*)malloc(RSTRING_LEN(temp) + 1);
- if (result[i + 1] == NULL) rb_memerror();
- strcpy(result[i + 1], RSTRING_PTR(temp));
+ temp = rb_obj_as_string(RARRAY_PTR(ary)[i]);
+ StringValueCStr(temp); /* must be NUL-terminated */
+ rb_enc_check(encobj, temp);
+ result[i + 1] = (char*)malloc(RSTRING_LEN(temp) + 1);
+ if (result[i + 1] == NULL) rb_memerror();
+ strcpy(result[i + 1], RSTRING_PTR(temp));
}
result[matches + 1] = NULL;
@@ -972,32 +810,32 @@ readline_attempted_completion_function(const char *text, int start, int end)
result[0] = strdup(result[1]);
}
else {
- const char *result1 = result[1];
- long low = strlen(result1);
-
- for (i = 1; i < matches; ++i) {
- register int c1, c2;
- long i1, i2, l2;
- int n1, n2;
- const char *p2 = result[i + 1];
-
- l2 = strlen(p2);
- for (i1 = i2 = 0; i1 < low && i2 < l2; i1 += n1, i2 += n2) {
- c1 = rb_enc_codepoint_len(result1 + i1, result1 + low, &n1, enc);
- c2 = rb_enc_codepoint_len(p2 + i2, p2 + l2, &n2, enc);
- if (case_fold) {
- c1 = rb_tolower(c1);
- c2 = rb_tolower(c2);
- }
- if (c1 != c2) break;
- }
-
- low = i1;
- }
- result[0] = (char*)malloc(low + 1);
- if (result[0] == NULL) rb_memerror();
- strncpy(result[0], result[1], low);
- result[0][low] = '\0';
+ const char *result1 = result[1];
+ long low = strlen(result1);
+
+ for (i = 1; i < matches; ++i) {
+ register int c1, c2;
+ long i1, i2, l2;
+ int n1, n2;
+ const char *p2 = result[i + 1];
+
+ l2 = strlen(p2);
+ for (i1 = i2 = 0; i1 < low && i2 < l2; i1 += n1, i2 += n2) {
+ c1 = rb_enc_codepoint_len(result1 + i1, result1 + low, &n1, enc);
+ c2 = rb_enc_codepoint_len(p2 + i2, p2 + l2, &n2, enc);
+ if (case_fold) {
+ c1 = rb_tolower(c1);
+ c2 = rb_tolower(c2);
+ }
+ if (c1 != c2) break;
+ }
+
+ low = i1;
+ }
+ result[0] = (char*)malloc(low + 1);
+ if (result[0] == NULL) rb_memerror();
+ strncpy(result[0], result[1], low);
+ result[0][low] = '\0';
}
return result;
@@ -1013,10 +851,13 @@ readline_attempted_completion_function(const char *text, int start, int end)
* See GNU Readline's rl_set_screen_size function.
*
* Raises NotImplementedError if the using readline library does not support.
+ *
+ * Raises SecurityError exception if $SAFE is 4.
*/
static VALUE
readline_s_set_screen_size(VALUE self, VALUE rows, VALUE columns)
{
+ rb_secure(4);
rl_set_screen_size(NUM2INT(rows), NUM2INT(columns));
return self;
}
@@ -1034,6 +875,8 @@ readline_s_set_screen_size(VALUE self, VALUE rows, VALUE columns)
* See GNU Readline's rl_get_screen_size function.
*
* Raises NotImplementedError if the using readline library does not support.
+ *
+ * Raises SecurityError exception if $SAFE is 4.
*/
static VALUE
readline_s_get_screen_size(VALUE self)
@@ -1041,6 +884,7 @@ readline_s_get_screen_size(VALUE self)
int rows, columns;
VALUE res;
+ rb_secure(4);
rl_get_screen_size(&rows, &columns);
res = rb_ary_new();
rb_ary_push(res, INT2NUM(rows));
@@ -1060,10 +904,13 @@ readline_s_get_screen_size(VALUE self)
* details of VI editing mode.
*
* Raises NotImplementedError if the using readline library does not support.
+ *
+ * Raises SecurityError exception if $SAFE is 4.
*/
static VALUE
readline_s_vi_editing_mode(VALUE self)
{
+ rb_secure(4);
rl_vi_editing_mode(1,0);
return Qnil;
}
@@ -1079,10 +926,13 @@ readline_s_vi_editing_mode(VALUE self)
* Returns true if vi mode is active. Returns false if not.
*
* Raises NotImplementedError if the using readline library does not support.
+ *
+ * Raises SecurityError exception if $SAFE is 4.
*/
static VALUE
readline_s_vi_editing_mode_p(VALUE self)
{
+ rb_secure(4);
return rl_editing_mode == 0 ? Qtrue : Qfalse;
}
#else
@@ -1098,10 +948,13 @@ readline_s_vi_editing_mode_p(VALUE self)
* manual of GNU Readline for details of Emacs editing mode.
*
* Raises NotImplementedError if the using readline library does not support.
+ *
+ * Raises SecurityError exception if $SAFE is 4.
*/
static VALUE
readline_s_emacs_editing_mode(VALUE self)
{
+ rb_secure(4);
rl_emacs_editing_mode(1,0);
return Qnil;
}
@@ -1117,10 +970,13 @@ readline_s_emacs_editing_mode(VALUE self)
* Returns true if emacs mode is active. Returns false if not.
*
* Raises NotImplementedError if the using readline library does not support.
+ *
+ * Raises SecurityError exception if $SAFE is 4.
*/
static VALUE
readline_s_emacs_editing_mode_p(VALUE self)
{
+ rb_secure(4);
return rl_editing_mode == 1 ? Qtrue : Qfalse;
}
#else
@@ -1163,20 +1019,23 @@ readline_s_emacs_editing_mode_p(VALUE self)
* p Readline.completion_append_character # => "s"
*
* Raises NotImplementedError if the using readline library does not support.
+ *
+ * Raises SecurityError exception if $SAFE is 4.
*/
static VALUE
readline_s_set_completion_append_character(VALUE self, VALUE str)
{
+ rb_secure(4);
if (NIL_P(str)) {
- rl_completion_append_character = '\0';
+ rl_completion_append_character = '\0';
}
else {
- OutputStringValue(str);
- if (RSTRING_LEN(str) == 0) {
- rl_completion_append_character = '\0';
- } else {
- rl_completion_append_character = RSTRING_PTR(str)[0];
- }
+ OutputStringValue(str);
+ if (RSTRING_LEN(str) == 0) {
+ rl_completion_append_character = '\0';
+ } else {
+ rl_completion_append_character = RSTRING_PTR(str)[0];
+ }
}
return self;
}
@@ -1193,14 +1052,17 @@ readline_s_set_completion_append_character(VALUE self, VALUE str)
* completion. The default is a space (" ").
*
* Raises NotImplementedError if the using readline library does not support.
+ *
+ * Raises SecurityError exception if $SAFE is 4.
*/
static VALUE
readline_s_get_completion_append_character(VALUE self)
{
char buf[1];
+ rb_secure(4);
if (rl_completion_append_character == '\0')
- return Qnil;
+ return Qnil;
buf[0] = (char) rl_completion_append_character;
return rb_locale_str_new(buf, 1);
@@ -1219,22 +1081,25 @@ readline_s_get_completion_append_character(VALUE self)
* break words for completion in Bash: " \t\n\"\\'`@$><=;|&{(".
*
* Raises NotImplementedError if the using readline library does not support.
+ *
+ * Raises SecurityError exception if $SAFE is 4.
*/
static VALUE
readline_s_set_basic_word_break_characters(VALUE self, VALUE str)
{
static char *basic_word_break_characters = NULL;
+ rb_secure(4);
OutputStringValue(str);
if (basic_word_break_characters == NULL) {
- basic_word_break_characters =
- ALLOC_N(char, RSTRING_LEN(str) + 1);
+ basic_word_break_characters =
+ ALLOC_N(char, RSTRING_LEN(str) + 1);
}
else {
- REALLOC_N(basic_word_break_characters, char, RSTRING_LEN(str) + 1);
+ REALLOC_N(basic_word_break_characters, char, RSTRING_LEN(str) + 1);
}
strncpy(basic_word_break_characters,
- RSTRING_PTR(str), RSTRING_LEN(str));
+ RSTRING_PTR(str), RSTRING_LEN(str));
basic_word_break_characters[RSTRING_LEN(str)] = '\0';
rl_basic_word_break_characters = basic_word_break_characters;
return self;
@@ -1252,12 +1117,15 @@ readline_s_set_basic_word_break_characters(VALUE self, VALUE str)
* for the completer routine.
*
* Raises NotImplementedError if the using readline library does not support.
+ *
+ * Raises SecurityError exception if $SAFE is 4.
*/
static VALUE
readline_s_get_basic_word_break_characters(VALUE self, VALUE str)
{
+ rb_secure(4);
if (rl_basic_word_break_characters == NULL)
- return Qnil;
+ return Qnil;
return rb_locale_str_new_cstr(rl_basic_word_break_characters);
}
#else
@@ -1274,22 +1142,25 @@ readline_s_get_basic_word_break_characters(VALUE self, VALUE str)
* Readline.basic_word_break_characters.
*
* Raises NotImplementedError if the using readline library does not support.
+ *
+ * Raises SecurityError exception if $SAFE is 4.
*/
static VALUE
readline_s_set_completer_word_break_characters(VALUE self, VALUE str)
{
static char *completer_word_break_characters = NULL;
+ rb_secure(4);
OutputStringValue(str);
if (completer_word_break_characters == NULL) {
- completer_word_break_characters =
- ALLOC_N(char, RSTRING_LEN(str) + 1);
+ completer_word_break_characters =
+ ALLOC_N(char, RSTRING_LEN(str) + 1);
}
else {
- REALLOC_N(completer_word_break_characters, char, RSTRING_LEN(str) + 1);
+ REALLOC_N(completer_word_break_characters, char, RSTRING_LEN(str) + 1);
}
strncpy(completer_word_break_characters,
- RSTRING_PTR(str), RSTRING_LEN(str));
+ RSTRING_PTR(str), RSTRING_LEN(str));
completer_word_break_characters[RSTRING_LEN(str)] = '\0';
rl_completer_word_break_characters = completer_word_break_characters;
return self;
@@ -1307,12 +1178,15 @@ readline_s_set_completer_word_break_characters(VALUE self, VALUE str)
* for rl_complete_internal().
*
* Raises NotImplementedError if the using readline library does not support.
+ *
+ * Raises SecurityError exception if $SAFE is 4.
*/
static VALUE
readline_s_get_completer_word_break_characters(VALUE self, VALUE str)
{
+ rb_secure(4);
if (rl_completer_word_break_characters == NULL)
- return Qnil;
+ return Qnil;
return rb_locale_str_new_cstr(rl_completer_word_break_characters);
}
#else
@@ -1333,21 +1207,24 @@ readline_s_get_completer_word_break_characters(VALUE self, VALUE str)
* See GNU Readline's rl_special_prefixes variable.
*
* Raises NotImplementedError if the using readline library does not support.
+ *
+ * Raises SecurityError exception if $SAFE is 4.
*/
static VALUE
readline_s_set_special_prefixes(VALUE self, VALUE str)
{
+ rb_secure(4);
if (!NIL_P(str)) {
- OutputStringValue(str);
- str = rb_str_dup_frozen(str);
- rb_obj_hide(str);
+ OutputStringValue(str);
+ str = rb_str_dup_frozen(str);
+ RBASIC(str)->klass = 0;
}
rb_ivar_set(mReadline, id_special_prefixes, str);
if (NIL_P(str)) {
- rl_special_prefixes = NULL;
+ rl_special_prefixes = NULL;
}
else {
- rl_special_prefixes = RSTRING_PTR(str);
+ rl_special_prefixes = RSTRING_PTR(str);
}
return self;
}
@@ -1363,16 +1240,19 @@ readline_s_set_special_prefixes(VALUE self, VALUE str)
* See GNU Readline's rl_special_prefixes variable.
*
* Raises NotImplementedError if the using readline library does not support.
+ *
+ * Raises SecurityError exception if $SAFE is 4.
*/
static VALUE
readline_s_get_special_prefixes(VALUE self)
{
VALUE str;
+ rb_secure(4);
if (rl_special_prefixes == NULL) return Qnil;
str = rb_ivar_get(mReadline, id_special_prefixes);
if (!NIL_P(str)) {
- str = rb_str_dup_frozen(str);
- rb_obj_reveal(str, rb_cString);
+ str = rb_str_dup_frozen(str);
+ RBASIC(str)->klass = rb_cString;
}
return str;
}
@@ -1389,22 +1269,25 @@ readline_s_get_special_prefixes(VALUE self)
* Sets a list of quote characters which can cause a word break.
*
* Raises NotImplementedError if the using readline library does not support.
+ *
+ * Raises SecurityError exception if $SAFE is 4.
*/
static VALUE
readline_s_set_basic_quote_characters(VALUE self, VALUE str)
{
static char *basic_quote_characters = NULL;
+ rb_secure(4);
OutputStringValue(str);
if (basic_quote_characters == NULL) {
- basic_quote_characters =
- ALLOC_N(char, RSTRING_LEN(str) + 1);
+ basic_quote_characters =
+ ALLOC_N(char, RSTRING_LEN(str) + 1);
}
else {
- REALLOC_N(basic_quote_characters, char, RSTRING_LEN(str) + 1);
+ REALLOC_N(basic_quote_characters, char, RSTRING_LEN(str) + 1);
}
strncpy(basic_quote_characters,
- RSTRING_PTR(str), RSTRING_LEN(str));
+ RSTRING_PTR(str), RSTRING_LEN(str));
basic_quote_characters[RSTRING_LEN(str)] = '\0';
rl_basic_quote_characters = basic_quote_characters;
@@ -1422,12 +1305,15 @@ readline_s_set_basic_quote_characters(VALUE self, VALUE str)
* Gets a list of quote characters which can cause a word break.
*
* Raises NotImplementedError if the using readline library does not support.
+ *
+ * Raises SecurityError exception if $SAFE is 4.
*/
static VALUE
readline_s_get_basic_quote_characters(VALUE self, VALUE str)
{
+ rb_secure(4);
if (rl_basic_quote_characters == NULL)
- return Qnil;
+ return Qnil;
return rb_locale_str_new_cstr(rl_basic_quote_characters);
}
#else
@@ -1445,19 +1331,22 @@ readline_s_get_basic_quote_characters(VALUE self, VALUE str)
* as any other character, unless they also appear within this list.
*
* Raises NotImplementedError if the using readline library does not support.
+ *
+ * Raises SecurityError exception if $SAFE is 4.
*/
static VALUE
readline_s_set_completer_quote_characters(VALUE self, VALUE str)
{
static char *completer_quote_characters = NULL;
+ rb_secure(4);
OutputStringValue(str);
if (completer_quote_characters == NULL) {
- completer_quote_characters =
- ALLOC_N(char, RSTRING_LEN(str) + 1);
+ completer_quote_characters =
+ ALLOC_N(char, RSTRING_LEN(str) + 1);
}
else {
- REALLOC_N(completer_quote_characters, char, RSTRING_LEN(str) + 1);
+ REALLOC_N(completer_quote_characters, char, RSTRING_LEN(str) + 1);
}
strncpy(completer_quote_characters, RSTRING_PTR(str), RSTRING_LEN(str));
completer_quote_characters[RSTRING_LEN(str)] = '\0';
@@ -1478,12 +1367,15 @@ readline_s_set_completer_quote_characters(VALUE self, VALUE str)
* the line.
*
* Raises NotImplementedError if the using readline library does not support.
+ *
+ * Raises SecurityError exception if $SAFE is 4.
*/
static VALUE
readline_s_get_completer_quote_characters(VALUE self, VALUE str)
{
+ rb_secure(4);
if (rl_completer_quote_characters == NULL)
- return Qnil;
+ return Qnil;
return rb_locale_str_new_cstr(rl_completer_quote_characters);
}
#else
@@ -1499,19 +1391,22 @@ readline_s_get_completer_quote_characters(VALUE self, VALUE str)
* when they appear in a completed filename. The default is nil.
*
* Raises NotImplementedError if the using readline library does not support.
+ *
+ * Raises SecurityError exception if $SAFE is 4.
*/
static VALUE
readline_s_set_filename_quote_characters(VALUE self, VALUE str)
{
static char *filename_quote_characters = NULL;
+ rb_secure(4);
OutputStringValue(str);
if (filename_quote_characters == NULL) {
- filename_quote_characters =
- ALLOC_N(char, RSTRING_LEN(str) + 1);
+ filename_quote_characters =
+ ALLOC_N(char, RSTRING_LEN(str) + 1);
}
else {
- REALLOC_N(filename_quote_characters, char, RSTRING_LEN(str) + 1);
+ REALLOC_N(filename_quote_characters, char, RSTRING_LEN(str) + 1);
}
strncpy(filename_quote_characters, RSTRING_PTR(str), RSTRING_LEN(str));
filename_quote_characters[RSTRING_LEN(str)] = '\0';
@@ -1532,12 +1427,15 @@ readline_s_set_filename_quote_characters(VALUE self, VALUE str)
* when they appear in a completed filename.
*
* Raises NotImplementedError if the using readline library does not support.
+ *
+ * Raises SecurityError exception if $SAFE is 4.
*/
static VALUE
readline_s_get_filename_quote_characters(VALUE self, VALUE str)
{
+ rb_secure(4);
if (rl_filename_quote_characters == NULL)
- return Qnil;
+ return Qnil;
return rb_locale_str_new_cstr(rl_filename_quote_characters);
}
#else
@@ -1550,10 +1448,13 @@ readline_s_get_filename_quote_characters(VALUE self, VALUE str)
* Readline.refresh_line -> nil
*
* Clear the current input line.
+ *
+ * Raises SecurityError exception if $SAFE is 4.
*/
static VALUE
readline_s_refresh_line(VALUE self)
{
+ rb_secure(4);
rl_refresh_line(0, 0);
return Qnil;
}
@@ -1585,15 +1486,16 @@ hist_get(VALUE self, VALUE index)
HIST_ENTRY *entry = NULL;
int i;
+ rb_secure(4);
i = NUM2INT(index);
if (i < 0) {
i += history_length;
}
if (i >= 0) {
- entry = history_get(history_get_offset_func(i));
+ entry = history_get(history_get_offset_func(i));
}
if (entry == NULL) {
- rb_raise(rb_eIndexError, "invalid index");
+ rb_raise(rb_eIndexError, "invalid index");
}
return rb_locale_str_new_cstr(entry->line);
}
@@ -1605,16 +1507,17 @@ hist_set(VALUE self, VALUE index, VALUE str)
HIST_ENTRY *entry = NULL;
int i;
+ rb_secure(4);
i = NUM2INT(index);
OutputStringValue(str);
if (i < 0) {
i += history_length;
}
if (i >= 0) {
- entry = replace_history_entry(history_replace_offset_func(i), RSTRING_PTR(str), NULL);
+ entry = replace_history_entry(history_replace_offset_func(i), RSTRING_PTR(str), NULL);
}
if (entry == NULL) {
- rb_raise(rb_eIndexError, "invalid index");
+ rb_raise(rb_eIndexError, "invalid index");
}
return str;
}
@@ -1625,6 +1528,7 @@ hist_set(VALUE self, VALUE index, VALUE str)
static VALUE
hist_push(VALUE self, VALUE str)
{
+ rb_secure(4);
OutputStringValue(str);
add_history(RSTRING_PTR(str));
return self;
@@ -1635,10 +1539,11 @@ hist_push_method(int argc, VALUE *argv, VALUE self)
{
VALUE str;
+ rb_secure(4);
while (argc--) {
- str = *argv++;
- OutputStringValue(str);
- add_history(RSTRING_PTR(str));
+ str = *argv++;
+ OutputStringValue(str);
+ add_history(RSTRING_PTR(str));
}
return self;
}
@@ -1650,6 +1555,7 @@ rb_remove_history(int index)
HIST_ENTRY *entry;
VALUE val;
+ rb_secure(4);
entry = remove_history(index);
if (entry) {
val = rb_locale_str_new_cstr(entry->line);
@@ -1668,20 +1574,22 @@ rb_remove_history(int index)
static VALUE
hist_pop(VALUE self)
{
+ rb_secure(4);
if (history_length > 0) {
- return rb_remove_history(history_length - 1);
+ return rb_remove_history(history_length - 1);
} else {
- return Qnil;
+ return Qnil;
}
}
static VALUE
hist_shift(VALUE self)
{
+ rb_secure(4);
if (history_length > 0) {
- return rb_remove_history(0);
+ return rb_remove_history(0);
} else {
- return Qnil;
+ return Qnil;
}
}
@@ -1693,11 +1601,12 @@ hist_each(VALUE self)
RETURN_ENUMERATOR(self, 0, 0);
+ rb_secure(4);
for (i = 0; i < history_length; i++) {
entry = history_get(history_get_offset_func(i));
if (entry == NULL)
break;
- rb_yield(rb_locale_str_new_cstr(entry->line));
+ rb_yield(rb_locale_str_new_cstr(entry->line));
}
return self;
}
@@ -1705,12 +1614,14 @@ hist_each(VALUE self)
static VALUE
hist_length(VALUE self)
{
+ rb_secure(4);
return INT2NUM(history_length);
}
static VALUE
hist_empty_p(VALUE self)
{
+ rb_secure(4);
return history_length == 0 ? Qtrue : Qfalse;
}
@@ -1719,11 +1630,12 @@ hist_delete_at(VALUE self, VALUE index)
{
int i;
+ rb_secure(4);
i = NUM2INT(index);
if (i < 0)
i += history_length;
if (i < 0 || i > history_length - 1) {
- rb_raise(rb_eIndexError, "invalid index");
+ rb_raise(rb_eIndexError, "invalid index");
}
return rb_remove_history(i);
}
@@ -1732,6 +1644,7 @@ hist_delete_at(VALUE self, VALUE index)
static VALUE
hist_clear(VALUE self)
{
+ rb_secure(4);
clear_history();
return self;
}
@@ -1747,19 +1660,19 @@ filename_completion_proc_call(VALUE self, VALUE str)
int i;
matches = rl_completion_matches(StringValuePtr(str),
- rl_filename_completion_function);
+ rl_filename_completion_function);
if (matches) {
- result = rb_ary_new();
- for (i = 0; matches[i]; i++) {
- rb_ary_push(result, rb_locale_str_new_cstr(matches[i]));
- free(matches[i]);
- }
- free(matches);
- if (RARRAY_LEN(result) >= 2)
- rb_ary_shift(result);
+ result = rb_ary_new();
+ for (i = 0; matches[i]; i++) {
+ rb_ary_push(result, rb_locale_str_new_cstr(matches[i]));
+ free(matches[i]);
+ }
+ free(matches);
+ if (RARRAY_LEN(result) >= 2)
+ rb_ary_shift(result);
}
else {
- result = Qnil;
+ result = Qnil;
}
return result;
}
@@ -1772,19 +1685,19 @@ username_completion_proc_call(VALUE self, VALUE str)
int i;
matches = rl_completion_matches(StringValuePtr(str),
- rl_username_completion_function);
+ rl_username_completion_function);
if (matches) {
- result = rb_ary_new();
- for (i = 0; matches[i]; i++) {
- rb_ary_push(result, rb_locale_str_new_cstr(matches[i]));
- free(matches[i]);
- }
- free(matches);
- if (RARRAY_LEN(result) >= 2)
- rb_ary_shift(result);
+ result = rb_ary_new();
+ for (i = 0; matches[i]; i++) {
+ rb_ary_push(result, rb_locale_str_new_cstr(matches[i]));
+ free(matches[i]);
+ }
+ free(matches);
+ if (RARRAY_LEN(result) >= 2)
+ rb_ary_shift(result);
}
else {
- result = Qnil;
+ result = Qnil;
}
return result;
}
@@ -1819,77 +1732,73 @@ Init_readline()
mReadline = rb_define_module("Readline");
rb_define_module_function(mReadline, "readline",
- readline_readline, -1);
+ readline_readline, -1);
rb_define_singleton_method(mReadline, "input=",
- readline_s_set_input, 1);
+ readline_s_set_input, 1);
rb_define_singleton_method(mReadline, "output=",
- readline_s_set_output, 1);
+ readline_s_set_output, 1);
rb_define_singleton_method(mReadline, "completion_proc=",
- readline_s_set_completion_proc, 1);
+ readline_s_set_completion_proc, 1);
rb_define_singleton_method(mReadline, "completion_proc",
- readline_s_get_completion_proc, 0);
+ readline_s_get_completion_proc, 0);
rb_define_singleton_method(mReadline, "completion_case_fold=",
- readline_s_set_completion_case_fold, 1);
+ readline_s_set_completion_case_fold, 1);
rb_define_singleton_method(mReadline, "completion_case_fold",
- readline_s_get_completion_case_fold, 0);
+ readline_s_get_completion_case_fold, 0);
rb_define_singleton_method(mReadline, "line_buffer",
- readline_s_get_line_buffer, 0);
+ readline_s_get_line_buffer, 0);
rb_define_singleton_method(mReadline, "point",
- readline_s_get_point, 0);
- rb_define_singleton_method(mReadline, "point=",
- readline_s_set_point, 1);
+ readline_s_get_point, 0);
rb_define_singleton_method(mReadline, "set_screen_size",
- readline_s_set_screen_size, 2);
+ readline_s_set_screen_size, 2);
rb_define_singleton_method(mReadline, "get_screen_size",
- readline_s_get_screen_size, 0);
+ readline_s_get_screen_size, 0);
rb_define_singleton_method(mReadline, "vi_editing_mode",
- readline_s_vi_editing_mode, 0);
+ readline_s_vi_editing_mode, 0);
rb_define_singleton_method(mReadline, "vi_editing_mode?",
- readline_s_vi_editing_mode_p, 0);
+ readline_s_vi_editing_mode_p, 0);
rb_define_singleton_method(mReadline, "emacs_editing_mode",
- readline_s_emacs_editing_mode, 0);
+ readline_s_emacs_editing_mode, 0);
rb_define_singleton_method(mReadline, "emacs_editing_mode?",
- readline_s_emacs_editing_mode_p, 0);
+ readline_s_emacs_editing_mode_p, 0);
rb_define_singleton_method(mReadline, "completion_append_character=",
- readline_s_set_completion_append_character, 1);
+ readline_s_set_completion_append_character, 1);
rb_define_singleton_method(mReadline, "completion_append_character",
- readline_s_get_completion_append_character, 0);
+ readline_s_get_completion_append_character, 0);
rb_define_singleton_method(mReadline, "basic_word_break_characters=",
- readline_s_set_basic_word_break_characters, 1);
+ readline_s_set_basic_word_break_characters, 1);
rb_define_singleton_method(mReadline, "basic_word_break_characters",
- readline_s_get_basic_word_break_characters, 0);
+ readline_s_get_basic_word_break_characters, 0);
rb_define_singleton_method(mReadline, "completer_word_break_characters=",
- readline_s_set_completer_word_break_characters, 1);
+ readline_s_set_completer_word_break_characters, 1);
rb_define_singleton_method(mReadline, "completer_word_break_characters",
- readline_s_get_completer_word_break_characters, 0);
+ readline_s_get_completer_word_break_characters, 0);
rb_define_singleton_method(mReadline, "basic_quote_characters=",
- readline_s_set_basic_quote_characters, 1);
+ readline_s_set_basic_quote_characters, 1);
rb_define_singleton_method(mReadline, "basic_quote_characters",
- readline_s_get_basic_quote_characters, 0);
+ readline_s_get_basic_quote_characters, 0);
rb_define_singleton_method(mReadline, "completer_quote_characters=",
- readline_s_set_completer_quote_characters, 1);
+ readline_s_set_completer_quote_characters, 1);
rb_define_singleton_method(mReadline, "completer_quote_characters",
- readline_s_get_completer_quote_characters, 0);
+ readline_s_get_completer_quote_characters, 0);
rb_define_singleton_method(mReadline, "filename_quote_characters=",
- readline_s_set_filename_quote_characters, 1);
+ readline_s_set_filename_quote_characters, 1);
rb_define_singleton_method(mReadline, "filename_quote_characters",
- readline_s_get_filename_quote_characters, 0);
+ readline_s_get_filename_quote_characters, 0);
rb_define_singleton_method(mReadline, "refresh_line",
- readline_s_refresh_line, 0);
+ readline_s_refresh_line, 0);
rb_define_singleton_method(mReadline, "pre_input_hook=",
- readline_s_set_pre_input_hook, 1);
+ readline_s_set_pre_input_hook, 1);
rb_define_singleton_method(mReadline, "pre_input_hook",
- readline_s_get_pre_input_hook, 0);
+ readline_s_get_pre_input_hook, 0);
rb_define_singleton_method(mReadline, "insert_text",
- readline_s_insert_text, 1);
- rb_define_singleton_method(mReadline, "delete_text",
- readline_s_delete_text, -1);
+ readline_s_insert_text, 1);
rb_define_singleton_method(mReadline, "redisplay",
- readline_s_redisplay, 0);
+ readline_s_redisplay, 0);
rb_define_singleton_method(mReadline, "special_prefixes=",
- readline_s_set_special_prefixes, 1);
+ readline_s_set_special_prefixes, 1);
rb_define_singleton_method(mReadline, "special_prefixes",
- readline_s_get_special_prefixes, 0);
+ readline_s_get_special_prefixes, 0);
#if USE_INSERT_IGNORE_ESCAPE
CONST_ID(id_orig_prompt, "orig_prompt");
@@ -1922,7 +1831,7 @@ Init_readline()
fcomp = rb_obj_alloc(rb_cObject);
rb_define_singleton_method(fcomp, "call",
- filename_completion_proc_call, 1);
+ filename_completion_proc_call, 1);
/*
* The Object with the call method that is a completion for filename.
* This is sets by Readline.completion_proc= method.
@@ -1931,7 +1840,7 @@ Init_readline()
ucomp = rb_obj_alloc(rb_cObject);
rb_define_singleton_method(ucomp, "call",
- username_completion_proc_call, 1);
+ username_completion_proc_call, 1);
/*
* The Object with the call method that is a completion for usernames.
* This is sets by Readline.completion_proc= method.
@@ -1943,26 +1852,26 @@ Init_readline()
version = rb_str_new_cstr(rl_library_version);
#if defined HAVE_CLEAR_HISTORY || defined HAVE_REMOVE_HISTORY
if (strncmp(rl_library_version, EDIT_LINE_LIBRARY_VERSION,
- strlen(EDIT_LINE_LIBRARY_VERSION)) == 0) {
- add_history("1");
- if (history_get(history_get_offset_func(0)) == NULL) {
- history_get_offset_func = history_get_offset_0;
- }
+ strlen(EDIT_LINE_LIBRARY_VERSION)) == 0) {
+ add_history("1");
+ if (history_get(history_get_offset_func(0)) == NULL) {
+ history_get_offset_func = history_get_offset_0;
+ }
#ifdef HAVE_REPLACE_HISTORY_ENTRY
- if (replace_history_entry(0, "a", NULL) == NULL) {
- history_replace_offset_func = history_get_offset_history_base;
- }
+ if (replace_history_entry(0, "a", NULL) == NULL) {
+ history_replace_offset_func = history_get_offset_history_base;
+ }
#endif
#ifdef HAVE_CLEAR_HISTORY
- clear_history();
+ clear_history();
#else
- {
- HIST_ENTRY *entry = remove_history(0);
- if (entry) {
- free((char *)entry->line);
- free(entry);
- }
- }
+ {
+ HIST_ENTRY *entry = remove_history(0);
+ if (entry) {
+ free((char *)entry->line);
+ free(entry);
+ }
+ }
#endif
}
#endif
@@ -1983,6 +1892,5 @@ Init_readline()
rl_clear_signals();
#endif
- rb_gc_register_address(&readline_instream);
- rb_gc_register_address(&readline_outstream);
+ readline_s_set_input(mReadline, rb_stdin);
}
diff --git a/ext/ripper/depend b/ext/ripper/depend
index db7bea74ed..0beb489326 100644
--- a/ext/ripper/depend
+++ b/ext/ripper/depend
@@ -8,18 +8,11 @@ BISON = bison
src: ripper.c eventids1.c eventids2table.c
ripper.o: ripper.c id.c lex.c eventids1.c eventids2.c eventids2table.c \
- $(HDRS) $(ruby_headers) \
- $(hdrdir)/ruby/encoding.h \
- $(hdrdir)/ruby/oniguruma.h \
- $(hdrdir)/ruby/regex.h \
- $(hdrdir)/ruby/util.h \
- $(top_srcdir)/node.h \
- $(top_srcdir)/internal.h \
- {$(VPATH)}parse.h \
- {$(VPATH)}id.h \
- $(top_srcdir)/regenc.h \
- $(top_srcdir)/vm_opts.h \
- $(topdir)/probes.h
+ $(hdrdir)/ruby/ruby.h $(arch_hdrdir)/ruby/config.h \
+ $(hdrdir)/ruby/defines.h $(hdrdir)/ruby/intern.h \
+ $(hdrdir)/ruby/encoding.h $(hdrdir)/missing.h \
+ $(hdrdir)/../node.h $(hdrdir)/oniguruma.h \
+ $(hdrdir)/regex.h $(hdrdir)/st.h $(hdrdir)/util.h
.y.c:
$(ECHO) compiling compiler $<
@@ -32,7 +25,7 @@ static: check
ripper.y: $(srcdir)/tools/preproc.rb $(top_srcdir)/parse.y
$(ECHO) extracting $@ from $(top_srcdir)/parse.y
- $(Q) $(RUBY) $(top_srcdir)/tool/id2token.rb --path-separator=.$(PATH_SEPARATOR)./ --vpath=$(VPATH) id.h $(top_srcdir)/parse.y > ripper.tmp.y
+ $(Q) $(RUBY) $(top_srcdir)/tool/id2token.rb --vpath=$(VPATH) id.h $(top_srcdir)/parse.y > ripper.tmp.y
$(Q) $(RUBY) $(srcdir)/tools/preproc.rb ripper.tmp.y --output=$@
$(Q) $(RM) ripper.tmp.y
diff --git a/ext/ripper/eventids2.c b/ext/ripper/eventids2.c
index 423f9d7e29..841a18c583 100644
--- a/ext/ripper/eventids2.c
+++ b/ext/ripper/eventids2.c
@@ -19,7 +19,6 @@ static ID ripper_id_embvar;
static ID ripper_id_float;
static ID ripper_id_gvar;
static ID ripper_id_ident;
-static ID ripper_id_imaginary;
static ID ripper_id_int;
static ID ripper_id_ivar;
static ID ripper_id_kw;
@@ -42,7 +41,6 @@ static ID ripper_id_qwords_beg;
static ID ripper_id_qsymbols_beg;
static ID ripper_id_symbols_beg;
static ID ripper_id_words_sep;
-static ID ripper_id_rational;
static ID ripper_id_regexp_beg;
static ID ripper_id_regexp_end;
static ID ripper_id_label;
@@ -76,7 +74,6 @@ ripper_init_eventids2(void)
ripper_id_float = rb_intern_const("on_float");
ripper_id_gvar = rb_intern_const("on_gvar");
ripper_id_ident = rb_intern_const("on_ident");
- ripper_id_imaginary = rb_intern_const("on_imaginary");
ripper_id_int = rb_intern_const("on_int");
ripper_id_ivar = rb_intern_const("on_ivar");
ripper_id_kw = rb_intern_const("on_kw");
@@ -99,7 +96,6 @@ ripper_init_eventids2(void)
ripper_id_qsymbols_beg = rb_intern_const("on_qsymbols_beg");
ripper_id_symbols_beg = rb_intern_const("on_symbols_beg");
ripper_id_words_sep = rb_intern_const("on_words_sep");
- ripper_id_rational = rb_intern_const("on_rational");
ripper_id_regexp_beg = rb_intern_const("on_regexp_beg");
ripper_id_regexp_end = rb_intern_const("on_regexp_end");
ripper_id_label = rb_intern_const("on_label");
@@ -213,7 +209,6 @@ static const struct token_assoc {
{tGEQ, &ripper_id_op},
{tGVAR, &ripper_id_gvar},
{tIDENTIFIER, &ripper_id_ident},
- {tIMAGINARY, &ripper_id_imaginary},
{tINTEGER, &ripper_id_int},
{tIVAR, &ripper_id_ivar},
{tLBRACE, &ripper_id_lbrace},
@@ -239,7 +234,6 @@ static const struct token_assoc {
{tQWORDS_BEG, &ripper_id_qwords_beg},
{tQSYMBOLS_BEG, &ripper_id_qsymbols_beg},
{tSYMBOLS_BEG, &ripper_id_symbols_beg},
- {tRATIONAL, &ripper_id_rational},
{tREGEXP_BEG, &ripper_id_regexp_beg},
{tREGEXP_END, &ripper_id_regexp_end},
{tRPAREN, &ripper_id_rparen},
diff --git a/ext/sdbm/_sdbm.c b/ext/sdbm/_sdbm.c
index 847eb2aaf6..874239a276 100644
--- a/ext/sdbm/_sdbm.c
+++ b/ext/sdbm/_sdbm.c
@@ -156,7 +156,7 @@ sdbm_open(register char *file, register int flags, register int mode)
if (file == NULL || !*file)
return errno = EINVAL, (DBM *) NULL;
/*
- * need space for two separate filenames
+ * need space for two seperate filenames
*/
n = strlen(file) * 2 + strlen(DIRFEXT) + strlen(PAGFEXT) + 2;
@@ -392,7 +392,7 @@ makroom(register DBM *db, long int hash, int need)
newp = (hash & db->hmask) | (db->hmask + 1);
debug(("newp: %ld\n", newp));
/*
- * write delay, read avoidance/cache shuffle:
+ * write delay, read avoidence/cache shuffle:
* select the page for incoming pair: if key is to go to the new page,
* write out the previous one, and copy the new one over, thus making
* it the current page. If not, simply write the new page, and we are
diff --git a/ext/sdbm/depend b/ext/sdbm/depend
index 09f171a511..f205edc611 100644
--- a/ext/sdbm/depend
+++ b/ext/sdbm/depend
@@ -1,2 +1,2 @@
-_sdbm.o: _sdbm.c sdbm.h $(HDRS) $(ruby_headers)
-init.o: init.c sdbm.h $(HDRS) $(ruby_headers)
+_sdbm.o: _sdbm.c sdbm.h $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h
+init.o: init.c sdbm.h $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h
diff --git a/ext/sdbm/init.c b/ext/sdbm/init.c
index 0f26bb89ed..0fd837db31 100644
--- a/ext/sdbm/init.c
+++ b/ext/sdbm/init.c
@@ -117,11 +117,11 @@ fsdbm_close(VALUE obj)
}
/*
- * call-seq:
- * sdbm.closed? -> true or false
- *
- * Returns +true+ if the database is closed.
- */
+* call-seq:
+* sdbm.closed? -> true or false
+*
+* Returns +true+ if the database is closed.
+*/
static VALUE
fsdbm_closed(VALUE obj)
{
@@ -142,20 +142,20 @@ fsdbm_alloc(VALUE klass)
return Data_Wrap_Struct(klass, 0, free_sdbm, 0);
}
/*
- * call-seq:
- * SDBM.new(filename, mode = 0666)
- *
- * Creates a new database handle by opening the given +filename+. SDBM actually
- * uses two physical files, with extensions '.dir' and '.pag'. These extensions
- * will automatically be appended to the +filename+.
- *
- * If the file does not exist, a new file will be created using the given
- * +mode+, unless +mode+ is explicitly set to nil. In the latter case, no
- * database will be created.
- *
- * If the file exists, it will be opened in read/write mode. If this fails, it
- * will be opened in read-only mode.
- */
+* call-seq:
+* SDBM.new(filename, mode = 0666)
+*
+* Creates a new database handle by opening the given +filename+. SDBM actually
+* uses two physical files, with extensions '.dir' and '.pag'. These extensions
+* will automatically be appended to the +filename+.
+*
+* If the file does not exist, a new file will be created using the given
+* +mode+, unless +mode+ is explicitly set to nil. In the latter case, no
+* database will be created.
+*
+* If the file exists, it will be opened in read/write mode. If this fails, it
+* will be opened in read-only mode.
+*/
static VALUE
fsdbm_initialize(int argc, VALUE *argv, VALUE obj)
{
@@ -396,6 +396,7 @@ fsdbm_values_at(int argc, VALUE *argv, VALUE obj)
static void
fdbm_modify(VALUE obj)
{
+ rb_secure(4);
if (OBJ_FROZEN(obj)) rb_error_frozen("SDBM");
}
@@ -632,7 +633,7 @@ fsdbm_store(VALUE obj, VALUE keystr, VALUE valstr)
}
static VALUE
-update_i(RB_BLOCK_CALL_FUNC_ARGLIST(pair, dbm))
+update_i(VALUE pair, VALUE dbm)
{
Check_Type(pair, T_ARRAY);
if (RARRAY_LEN(pair) < 2) {
diff --git a/ext/socket/.document b/ext/socket/.document
index 53cfac0b10..0216c5aa45 100644
--- a/ext/socket/.document
+++ b/ext/socket/.document
@@ -2,7 +2,6 @@ ancdata.c
basicsocket.c
constants.c
constdefs.c
-ifaddr.c
init.c
ipsocket.c
option.c
diff --git a/ext/socket/ancdata.c b/ext/socket/ancdata.c
index 9a68a0c289..050da974c4 100644
--- a/ext/socket/ancdata.c
+++ b/ext/socket/ancdata.c
@@ -2,7 +2,7 @@
#include <time.h>
-#if defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL)
+#if defined(HAVE_ST_MSG_CONTROL)
static VALUE rb_cAncillaryData;
static VALUE
@@ -276,8 +276,8 @@ ancillary_unix_rights(VALUE self)
* returns the timestamp as a time object.
*
* _ancillarydata_ should be one of following type:
- * - SOL_SOCKET/SCM_TIMESTAMP (microsecond) GNU/Linux, FreeBSD, NetBSD, OpenBSD, Solaris, MacOS X
- * - SOL_SOCKET/SCM_TIMESTAMPNS (nanosecond) GNU/Linux
+ * - SOL_SOCKET/SCM_TIMESTAMP (micro second) GNU/Linux, FreeBSD, NetBSD, OpenBSD, Solaris, MacOS X
+ * - SOL_SOCKET/SCM_TIMESTAMPNS (nano second) GNU/Linux
* - SOL_SOCKET/SCM_BINTIME (2**(-64) second) FreeBSD
*
* Addrinfo.udp("127.0.0.1", 0).bind {|s1|
@@ -573,7 +573,9 @@ extract_ipv6_pktinfo(VALUE self, struct in6_pktinfo *pktinfo_ptr, struct sockadd
memcpy(pktinfo_ptr, RSTRING_PTR(data), sizeof(*pktinfo_ptr));
- INIT_SOCKADDR((struct sockaddr *)sa_ptr, AF_INET6, sizeof(*sa_ptr));
+ memset(sa_ptr, 0, sizeof(*sa_ptr));
+ SET_SA_LEN((struct sockaddr *)sa_ptr, sizeof(struct sockaddr_in6));
+ sa_ptr->sin6_family = AF_INET6;
memcpy(&sa_ptr->sin6_addr, &pktinfo_ptr->ipi6_addr, sizeof(sa_ptr->sin6_addr));
if (IN6_IS_ADDR_LINKLOCAL(&sa_ptr->sin6_addr))
sa_ptr->sin6_scope_id = pktinfo_ptr->ipi6_ifindex;
@@ -1052,7 +1054,7 @@ ancillary_inspect(VALUE self)
# if defined(IPPROTO_IPV6)
case IPPROTO_IPV6:
switch (type) {
-# if defined(IPV6_PKTINFO) && defined(HAVE_TYPE_STRUCT_IN6_PKTINFO) /* RFC 3542 */
+# if defined(IPV6_PKTINFO) /* RFC 3542 */
case IPV6_PKTINFO: inspected = anc_inspect_ipv6_pktinfo(level, type, data, ret); break;
# endif
}
@@ -1129,38 +1131,36 @@ bsock_sendmsg_internal(int argc, VALUE *argv, VALUE sock, int nonblock)
{
rb_io_t *fptr;
VALUE data, vflags, dest_sockaddr;
+ VALUE *controls_ptr;
int controls_num;
struct msghdr mh;
struct iovec iov;
-#if defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL)
+#if defined(HAVE_ST_MSG_CONTROL)
volatile VALUE controls_str = 0;
- VALUE *controls_ptr = NULL;
- int family;
#endif
int flags;
ssize_t ss;
+ int family;
+ rb_secure(4);
GetOpenFile(sock, fptr);
-#if defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL)
family = rsock_getfamily(fptr->fd);
-#endif
data = vflags = dest_sockaddr = Qnil;
+ controls_ptr = NULL;
+ controls_num = 0;
if (argc == 0)
rb_raise(rb_eArgError, "mesg argument required");
data = argv[0];
if (1 < argc) vflags = argv[1];
if (2 < argc) dest_sockaddr = argv[2];
- controls_num = 3 < argc ? argc - 3 : 0;
-#if defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL)
- if (3 < argc) { controls_ptr = &argv[3]; }
-#endif
+ if (3 < argc) { controls_ptr = &argv[3]; controls_num = argc - 3; }
StringValue(data);
if (controls_num) {
-#if defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL)
+#if defined(HAVE_ST_MSG_CONTROL)
int i;
size_t last_pad = 0;
#if defined(__NetBSD__)
@@ -1257,16 +1257,16 @@ bsock_sendmsg_internal(int argc, VALUE *argv, VALUE sock, int nonblock)
memset(&mh, 0, sizeof(mh));
if (!NIL_P(dest_sockaddr)) {
mh.msg_name = RSTRING_PTR(dest_sockaddr);
- mh.msg_namelen = RSTRING_SOCKLEN(dest_sockaddr);
+ mh.msg_namelen = RSTRING_LENINT(dest_sockaddr);
}
mh.msg_iovlen = 1;
mh.msg_iov = &iov;
iov.iov_base = RSTRING_PTR(data);
iov.iov_len = RSTRING_LEN(data);
-#if defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL)
+#if defined(HAVE_ST_MSG_CONTROL)
if (controls_str) {
mh.msg_control = RSTRING_PTR(controls_str);
- mh.msg_controllen = RSTRING_SOCKLEN(controls_str);
+ mh.msg_controllen = RSTRING_LENINT(controls_str);
}
else {
mh.msg_control = NULL;
@@ -1287,7 +1287,7 @@ bsock_sendmsg_internal(int argc, VALUE *argv, VALUE sock, int nonblock)
if (ss == -1) {
if (nonblock && (errno == EWOULDBLOCK || errno == EAGAIN))
- rb_readwrite_sys_fail(RB_IO_WAIT_WRITABLE, "sendmsg(2) would block");
+ rb_mod_sys_fail(rb_mWaitWritable, "sendmsg(2) would block");
rb_sys_fail("sendmsg(2)");
}
@@ -1364,17 +1364,11 @@ struct recvmsg_args_struct {
ssize_t
rsock_recvmsg(int socket, struct msghdr *message, int flags)
{
- ssize_t ret;
- socklen_t len0;
#ifdef MSG_CMSG_CLOEXEC
/* MSG_CMSG_CLOEXEC is available since Linux 2.6.23. Linux 2.6.18 silently ignore it. */
flags |= MSG_CMSG_CLOEXEC;
#endif
- len0 = message->msg_namelen;
- ret = recvmsg(socket, message, flags);
- if (ret != -1 && len0 < message->msg_namelen)
- message->msg_namelen = len0;
- return ret;
+ return recvmsg(socket, message, flags);
}
static void *
@@ -1395,7 +1389,7 @@ rb_recvmsg(int fd, struct msghdr *msg, int flags)
return (ssize_t)rb_thread_call_without_gvl(nogvl_recvmsg_func, &args, RUBY_UBF_IO, 0);
}
-#if defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL)
+#if defined(HAVE_ST_MSG_CONTROL)
static void
discard_cmsg(struct cmsghdr *cmh, char *msg_end, int msg_peek_p)
{
@@ -1427,7 +1421,7 @@ discard_cmsg(struct cmsghdr *cmh, char *msg_end, int msg_peek_p)
void
rsock_discard_cmsg_resource(struct msghdr *mh, int msg_peek_p)
{
-#if defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL)
+#if defined(HAVE_ST_MSG_CONTROL)
struct cmsghdr *cmh;
char *msg_end;
@@ -1442,7 +1436,7 @@ rsock_discard_cmsg_resource(struct msghdr *mh, int msg_peek_p)
#endif
}
-#if defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL)
+#if defined(HAVE_ST_MSG_CONTROL)
static void
make_io_for_unix_rights(VALUE ctl, struct cmsghdr *cmh, char *msg_end)
{
@@ -1477,20 +1471,19 @@ static VALUE
bsock_recvmsg_internal(int argc, VALUE *argv, VALUE sock, int nonblock)
{
rb_io_t *fptr;
- VALUE vmaxdatlen, vmaxctllen, vflags;
- VALUE vopts;
+ VALUE vmaxdatlen, vmaxctllen, vflags, vopts;
int grow_buffer;
size_t maxdatlen;
int flags, orig_flags;
+ int request_scm_rights;
struct msghdr mh;
struct iovec iov;
- union_sockaddr namebuf;
+ struct sockaddr_storage namebuf;
char datbuf0[4096], *datbuf;
VALUE dat_str = Qnil;
VALUE ret;
ssize_t ss;
- int request_scm_rights;
-#if defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL)
+#if defined(HAVE_ST_MSG_CONTROL)
struct cmsghdr *cmh;
size_t maxctllen;
union {
@@ -1503,11 +1496,16 @@ bsock_recvmsg_internal(int argc, VALUE *argv, VALUE sock, int nonblock)
int gc_done = 0;
#endif
+ rb_secure(4);
- rb_scan_args(argc, argv, "03:", &vmaxdatlen, &vflags, &vmaxctllen, &vopts);
+ vopts = Qnil;
+ if (0 < argc && RB_TYPE_P(argv[argc-1], T_HASH))
+ vopts = argv[--argc];
+
+ rb_scan_args(argc, argv, "03", &vmaxdatlen, &vflags, &vmaxctllen);
maxdatlen = NIL_P(vmaxdatlen) ? sizeof(datbuf0) : NUM2SIZET(vmaxdatlen);
-#if defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL)
+#if defined(HAVE_ST_MSG_CONTROL)
maxctllen = NIL_P(vmaxctllen) ? sizeof(ctlbuf0) : NUM2SIZET(vmaxctllen);
#else
if (!NIL_P(vmaxctllen))
@@ -1525,17 +1523,13 @@ bsock_recvmsg_internal(int argc, VALUE *argv, VALUE sock, int nonblock)
request_scm_rights = 0;
if (!NIL_P(vopts) && RTEST(rb_hash_aref(vopts, ID2SYM(rb_intern("scm_rights")))))
request_scm_rights = 1;
-#if !defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL)
- if (request_scm_rights)
- rb_raise(rb_eNotImpError, "control message for recvmsg is unimplemented");
-#endif
GetOpenFile(sock, fptr);
if (rb_io_read_pending(fptr)) {
rb_raise(rb_eIOError, "recvmsg for buffered IO");
}
-#if !defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL)
+#if !defined(HAVE_ST_MSG_CONTROL)
if (grow_buffer) {
int socktype;
socklen_t optlen = (socklen_t)sizeof(socktype);
@@ -1558,7 +1552,7 @@ bsock_recvmsg_internal(int argc, VALUE *argv, VALUE sock, int nonblock)
datbuf = RSTRING_PTR(dat_str);
}
-#if defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL)
+#if defined(HAVE_ST_MSG_CONTROL)
if (maxctllen <= sizeof(ctlbuf0))
ctlbuf = ctlbuf0.bytes;
else {
@@ -1573,7 +1567,7 @@ bsock_recvmsg_internal(int argc, VALUE *argv, VALUE sock, int nonblock)
memset(&mh, 0, sizeof(mh));
memset(&namebuf, 0, sizeof(namebuf));
- mh.msg_name = &namebuf.addr;
+ mh.msg_name = (struct sockaddr *)&namebuf;
mh.msg_namelen = (socklen_t)sizeof(namebuf);
mh.msg_iov = &iov;
@@ -1581,7 +1575,7 @@ bsock_recvmsg_internal(int argc, VALUE *argv, VALUE sock, int nonblock)
iov.iov_base = datbuf;
iov.iov_len = maxdatlen;
-#if defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL)
+#if defined(HAVE_ST_MSG_CONTROL)
mh.msg_control = ctlbuf;
mh.msg_controllen = (socklen_t)maxctllen;
#endif
@@ -1602,8 +1596,8 @@ bsock_recvmsg_internal(int argc, VALUE *argv, VALUE sock, int nonblock)
if (ss == -1) {
if (nonblock && (errno == EWOULDBLOCK || errno == EAGAIN))
- rb_readwrite_sys_fail(RB_IO_WAIT_READABLE, "recvmsg(2) would block");
-#if defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL)
+ rb_mod_sys_fail(rb_mWaitReadable, "recvmsg(2) would block");
+#if defined(HAVE_ST_MSG_CONTROL)
if (!gc_done && (errno == EMFILE || errno == EMSGSIZE)) {
/*
* When SCM_RIGHTS hit the file descriptors limit:
@@ -1622,7 +1616,7 @@ bsock_recvmsg_internal(int argc, VALUE *argv, VALUE sock, int nonblock)
if (grow_buffer) {
int grown = 0;
-#if defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL)
+#if defined(HAVE_ST_MSG_CONTROL)
if (NIL_P(vmaxdatlen) && (mh.msg_flags & MSG_TRUNC)) {
if (SIZE_MAX/2 < maxdatlen)
rb_raise(rb_eArgError, "max data length too big");
@@ -1632,7 +1626,7 @@ bsock_recvmsg_internal(int argc, VALUE *argv, VALUE sock, int nonblock)
if (NIL_P(vmaxctllen) && (mh.msg_flags & MSG_CTRUNC)) {
#define BIG_ENOUGH_SPACE 65536
if (BIG_ENOUGH_SPACE < maxctllen &&
- (socklen_t)mh.msg_controllen < (socklen_t)(maxctllen - BIG_ENOUGH_SPACE)) {
+ mh.msg_controllen < (socklen_t)(maxctllen - BIG_ENOUGH_SPACE)) {
/* there are big space bug truncated.
* file descriptors limit? */
if (!gc_done) {
@@ -1675,19 +1669,19 @@ bsock_recvmsg_internal(int argc, VALUE *argv, VALUE sock, int nonblock)
else {
rb_str_resize(dat_str, ss);
OBJ_TAINT(dat_str);
- rb_obj_reveal(dat_str, rb_cString);
+ RBASIC(dat_str)->klass = rb_cString;
}
ret = rb_ary_new3(3, dat_str,
rsock_io_socket_addrinfo(sock, mh.msg_name, mh.msg_namelen),
-#if defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL)
+#if defined(HAVE_ST_MSG_CONTROL)
INT2NUM(mh.msg_flags)
#else
Qnil
#endif
);
-#if defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL)
+#if defined(HAVE_ST_MSG_CONTROL)
family = rsock_getfamily(fptr->fd);
if (mh.msg_controllen) {
char *msg_end = (char *)mh.msg_control + mh.msg_controllen;
@@ -1797,7 +1791,7 @@ rsock_bsock_recvmsg_nonblock(int argc, VALUE *argv, VALUE sock)
void
rsock_init_ancdata(void)
{
-#if defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL)
+#if defined(HAVE_ST_MSG_CONTROL)
/*
* Document-class: Socket::AncillaryData
*
diff --git a/ext/socket/basicsocket.c b/ext/socket/basicsocket.c
index bce085b632..c1ae88d80c 100644
--- a/ext/socket/basicsocket.c
+++ b/ext/socket/basicsocket.c
@@ -80,7 +80,7 @@ bsock_shutdown(int argc, VALUE *argv, VALUE sock)
}
GetOpenFile(sock, fptr);
if (shutdown(fptr->fd, how) == -1)
- rb_sys_fail("shutdown(2)");
+ rb_sys_fail(0);
return INT2FIX(0);
}
@@ -243,13 +243,15 @@ bsock_setsockopt(int argc, VALUE *argv, VALUE sock)
default:
StringValue(val);
v = RSTRING_PTR(val);
- vlen = RSTRING_SOCKLEN(val);
+ vlen = RSTRING_LENINT(val);
break;
}
+#define rb_sys_fail_path(path) rb_sys_fail_str(path)
+
rb_io_check_closed(fptr);
if (setsockopt(fptr->fd, level, option, v, vlen) < 0)
- rsock_sys_fail_path("setsockopt(2)", fptr->pathv);
+ rb_sys_fail_path(fptr->pathv);
return INT2FIX(0);
}
@@ -330,7 +332,7 @@ bsock_getsockopt(VALUE sock, VALUE lev, VALUE optname)
rb_io_check_closed(fptr);
if (getsockopt(fptr->fd, level, option, buf, &len) < 0)
- rsock_sys_fail_path("getsockopt(2)", fptr->pathv);
+ rb_sys_fail_path(fptr->pathv);
return rsock_sockopt_new(family, level, option, rb_str_new(buf, len));
}
@@ -354,15 +356,13 @@ bsock_getsockopt(VALUE sock, VALUE lev, VALUE optname)
static VALUE
bsock_getsockname(VALUE sock)
{
- union_sockaddr buf;
+ struct sockaddr_storage buf;
socklen_t len = (socklen_t)sizeof buf;
- socklen_t len0 = len;
rb_io_t *fptr;
GetOpenFile(sock, fptr);
- if (getsockname(fptr->fd, &buf.addr, &len) < 0)
+ if (getsockname(fptr->fd, (struct sockaddr*)&buf, &len) < 0)
rb_sys_fail("getsockname(2)");
- if (len0 < len) len = len0;
return rb_str_new((char*)&buf, len);
}
@@ -385,15 +385,13 @@ bsock_getsockname(VALUE sock)
static VALUE
bsock_getpeername(VALUE sock)
{
- union_sockaddr buf;
+ struct sockaddr_storage buf;
socklen_t len = (socklen_t)sizeof buf;
- socklen_t len0 = len;
rb_io_t *fptr;
GetOpenFile(sock, fptr);
- if (getpeername(fptr->fd, &buf.addr, &len) < 0)
+ if (getpeername(fptr->fd, (struct sockaddr*)&buf, &len) < 0)
rb_sys_fail("getpeername(2)");
- if (len0 < len) len = len0;
return rb_str_new((char*)&buf, len);
}
@@ -429,7 +427,7 @@ bsock_getpeereid(VALUE self)
gid_t egid;
GetOpenFile(self, fptr);
if (getpeereid(fptr->fd, &euid, &egid) == -1)
- rb_sys_fail("getpeereid(3)");
+ rb_sys_fail("getpeereid");
return rb_assoc_new(UIDT2NUM(euid), GIDT2NUM(egid));
#elif defined(SO_PEERCRED) /* GNU/Linux */
rb_io_t *fptr;
@@ -445,7 +443,7 @@ bsock_getpeereid(VALUE self)
VALUE ret;
GetOpenFile(self, fptr);
if (getpeerucred(fptr->fd, &uc) == -1)
- rb_sys_fail("getpeerucred(3C)");
+ rb_sys_fail("getpeerucred");
ret = rb_assoc_new(UIDT2NUM(ucred_geteuid(uc)), GIDT2NUM(ucred_getegid(uc)));
ucred_free(uc);
return ret;
@@ -475,16 +473,14 @@ bsock_getpeereid(VALUE self)
static VALUE
bsock_local_address(VALUE sock)
{
- union_sockaddr buf;
+ struct sockaddr_storage buf;
socklen_t len = (socklen_t)sizeof buf;
- socklen_t len0 = len;
rb_io_t *fptr;
GetOpenFile(sock, fptr);
- if (getsockname(fptr->fd, &buf.addr, &len) < 0)
+ if (getsockname(fptr->fd, (struct sockaddr*)&buf, &len) < 0)
rb_sys_fail("getsockname(2)");
- if (len0 < len) len = len0;
- return rsock_fd_socket_addrinfo(fptr->fd, &buf.addr, len);
+ return rsock_fd_socket_addrinfo(fptr->fd, (struct sockaddr *)&buf, len);
}
/*
@@ -509,16 +505,14 @@ bsock_local_address(VALUE sock)
static VALUE
bsock_remote_address(VALUE sock)
{
- union_sockaddr buf;
+ struct sockaddr_storage buf;
socklen_t len = (socklen_t)sizeof buf;
- socklen_t len0 = len;
rb_io_t *fptr;
GetOpenFile(sock, fptr);
- if (getpeername(fptr->fd, &buf.addr, &len) < 0)
+ if (getpeername(fptr->fd, (struct sockaddr*)&buf, &len) < 0)
rb_sys_fail("getpeername(2)");
- if (len0 < len) len = len0;
- return rsock_fd_socket_addrinfo(fptr->fd, &buf.addr, len);
+ return rsock_fd_socket_addrinfo(fptr->fd, (struct sockaddr *)&buf, len);
}
/*
@@ -547,6 +541,7 @@ rsock_bsock_send(int argc, VALUE *argv, VALUE sock)
int n;
rb_blocking_function_t *func;
+ rb_secure(4);
rb_scan_args(argc, argv, "21", &arg.mesg, &flags, &to);
StringValue(arg.mesg);
@@ -554,7 +549,7 @@ rsock_bsock_send(int argc, VALUE *argv, VALUE sock)
SockAddrStringValue(to);
to = rb_str_new4(to);
arg.to = (struct sockaddr *)RSTRING_PTR(to);
- arg.tolen = RSTRING_SOCKLEN(to);
+ arg.tolen = (socklen_t)RSTRING_LENINT(to);
func = rsock_sendto_blocking;
}
else {
@@ -612,6 +607,7 @@ bsock_do_not_reverse_lookup_set(VALUE sock, VALUE state)
{
rb_io_t *fptr;
+ rb_secure(4);
GetOpenFile(sock, fptr);
if (RTEST(state)) {
fptr->mode |= FMODE_NOREVLOOKUP;
@@ -731,6 +727,7 @@ bsock_do_not_rev_lookup(void)
static VALUE
bsock_do_not_rev_lookup_set(VALUE self, VALUE val)
{
+ rb_secure(4);
rsock_do_not_reverse_lookup = RTEST(val);
return val;
}
diff --git a/ext/socket/constants.c b/ext/socket/constants.c
index bab27b23bb..39f985b316 100644
--- a/ext/socket/constants.c
+++ b/ext/socket/constants.c
@@ -105,7 +105,7 @@ rsock_cmsg_type_arg(int family, int level, VALUE type)
return constant_arg(type, rsock_scm_optname_to_int, "unknown UNIX control message");
case IPPROTO_IP:
return constant_arg(type, rsock_ip_optname_to_int, "unknown IP control message");
-#ifdef IPPROTO_IPV6
+#ifdef INET6
case IPPROTO_IPV6:
return constant_arg(type, rsock_ipv6_optname_to_int, "unknown IPv6 control message");
#endif
diff --git a/ext/socket/depend b/ext/socket/depend
index cd3fae98ea..1716f9cb89 100644
--- a/ext/socket/depend
+++ b/ext/socket/depend
@@ -1,15 +1,11 @@
-SOCK_HEADERS = $(srcdir)/rubysocket.h $(HDRS) $(ruby_headers) \
- $(hdrdir)/ruby/encoding.h \
- $(hdrdir)/ruby/oniguruma.h \
- $(hdrdir)/ruby/util.h \
- $(hdrdir)/ruby/io.h $(hdrdir)/ruby/thread.h \
+SOCK_HEADERS = $(srcdir)/rubysocket.h $(hdrdir)/ruby/ruby.h $(arch_hdrdir)/ruby/config.h \
+ $(hdrdir)/ruby/defines.h $(hdrdir)/ruby/io.h $(hdrdir)/ruby/thread.h \
$(srcdir)/addrinfo.h $(srcdir)/sockport.h constdefs.h $(top_srcdir)/internal.h
init.o: init.c $(SOCK_HEADERS)
constants.o: constants.c constdefs.c $(SOCK_HEADERS)
basicsocket.o: basicsocket.c $(SOCK_HEADERS)
socket.o: socket.c $(SOCK_HEADERS)
-ifaddr.o: ifaddr.c $(SOCK_HEADERS)
ipsocket.o: ipsocket.c $(SOCK_HEADERS)
tcpsocket.o: tcpsocket.c $(SOCK_HEADERS)
tcpserver.o: tcpserver.c $(SOCK_HEADERS)
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb
index f3be5862f0..87409394ff 100644
--- a/ext/socket/extconf.rb
+++ b/ext/socket/extconf.rb
@@ -1,6 +1,43 @@
require 'mkmf'
-AF_INET6_SOCKET_CREATION_TEST = <<EOF
+$INCFLAGS << " -I$(topdir) -I$(top_srcdir)"
+
+case RUBY_PLATFORM
+when /(ms|bcc)win(32|64)|mingw/
+ test_func = "WSACleanup"
+ have_library("ws2_32", "WSACleanup")
+when /cygwin/
+ test_func = "socket"
+when /beos/
+ test_func = "socket"
+ have_library("net", "socket")
+when /haiku/
+ test_func = "socket"
+ have_library("network", "socket")
+when /i386-os2_emx/
+ test_func = "socket"
+ have_library("socket", "socket")
+else
+ test_func = "socket"
+ have_library("nsl", "t_open")
+ have_library("socket", "socket")
+end
+
+unless $mswin or $bccwin or $mingw
+ headers = %w<sys/types.h netdb.h string.h sys/socket.h netinet/in.h>
+end
+if /solaris/ =~ RUBY_PLATFORM and !try_compile("")
+ # bug of gcc 3.0 on Solaris 8 ?
+ headers << "sys/feature_tests.h"
+end
+if have_header("arpa/inet.h")
+ headers << "arpa/inet.h"
+end
+
+ipv6 = false
+default_ipv6 = /cygwin|beos|haiku/ !~ RUBY_PLATFORM
+if enable_config("ipv6", default_ipv6)
+ if checking_for("ipv6") {try_link(<<EOF)}
#include <sys/types.h>
#ifndef _WIN32
#include <sys/socket.h>
@@ -12,116 +49,82 @@ main(void)
return 0;
}
EOF
+ $defs << "-DENABLE_IPV6" << "-DINET6"
+ ipv6 = true
+ end
+end
-GETADDRINFO_GETNAMEINFO_TEST = <<EOF
-#include <stdlib.h>
-
-#ifndef EXIT_SUCCESS
-#define EXIT_SUCCESS 0
-#endif
-#ifndef EXIT_FAILURE
-#define EXIT_FAILURE 1
-#endif
+if ipv6
+ if $mingw
+ $CPPFLAGS << " -D_WIN32_WINNT=0x501" unless $CPPFLAGS.include?("_WIN32_WINNT")
+ end
+ ipv6lib = nil
+ class << (fmt = "unknown")
+ def %(s) s || self end
+ end
+ idirs, ldirs = dir_config("inet6", %w[/usr/inet6 /usr/local/v6].find {|d| File.directory?(d)})
+ checking_for("ipv6 type", fmt) do
+ if have_macro("IPV6_INRIA_VERSION", "netinet/in.h")
+ "inria"
+ elsif have_macro("__KAME__", "netinet/in.h")
+ have_library(ipv6lib = "inet6")
+ "kame"
+ elsif have_macro("_TOSHIBA_INET6", "sys/param.h")
+ have_library(ipv6lib = "inet6") and "toshiba"
+ elsif have_macro("__V6D__", "sys/v6config.h")
+ have_library(ipv6lib = "v6") and "v6d"
+ elsif have_macro("_ZETA_MINAMI_INET6", "sys/param.h")
+ have_library(ipv6lib = "inet6") and "zeta"
+ elsif ipv6lib = with_config("ipv6-lib")
+ warn <<EOS
+--with-ipv6-lib and --with-ipv6-libdir option will be obsolete, use
+--with-inet6lib and --with-inet6-{include,lib} options instead.
+EOS
+ find_library(ipv6lib, nil, with_config("ipv6-libdir", ldirs)) and
+ ipv6lib
+ elsif have_library("inet6")
+ "inet6"
+ end
+ end or not ipv6lib or abort <<EOS
-#ifndef AF_LOCAL
-#define AF_LOCAL AF_UNIX
-#endif
+Fatal: no #{ipv6lib} library found. cannot continue.
+You need to fetch lib#{ipv6lib}.a from appropriate
+ipv6 kit and compile beforehand.
+EOS
+end
-int
-main(void)
-{
- int passive, gaierr, inet4 = 0, inet6 = 0;
- struct addrinfo hints, *ai, *aitop;
- char straddr[INET6_ADDRSTRLEN], strport[16];
-#ifdef _WIN32
- WSADATA retdata;
+if have_struct_member("struct sockaddr_in", "sin_len", headers)
+ $defs[-1] = "-DHAVE_SIN_LEN"
+end
- WSAStartup(MAKEWORD(2, 0), &retdata);
-#endif
+# doug's fix, NOW add -Dss_family... only if required!
+doug = proc {have_struct_member("struct sockaddr_storage", "ss_family", headers)}
+if (doug[] or
+ with_cppflags($CPPFLAGS + " -Dss_family=__ss_family", &doug))
+ $defs[-1] = "-DHAVE_SOCKADDR_STORAGE"
+ doug = proc {have_struct_member("struct sockaddr_storage", "ss_len", headers)}
+ doug[] or with_cppflags($CPPFLAGS + " -Dss_len=__ss_len", &doug)
+end
- for (passive = 0; passive <= 1; passive++) {
- memset(&hints, 0, sizeof(hints));
- hints.ai_family = AF_UNSPEC;
- hints.ai_protocol = IPPROTO_TCP;
- hints.ai_flags = passive ? AI_PASSIVE : 0;
- hints.ai_socktype = SOCK_STREAM;
- if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
- (void)gai_strerror(gaierr);
- goto bad;
- }
- for (ai = aitop; ai; ai = ai->ai_next) {
- if (ai->ai_family == AF_LOCAL) continue;
- if (ai->ai_addr == NULL)
- goto bad;
-#if defined(_AIX)
- if (ai->ai_family == AF_INET6 && passive) {
- inet6++;
- continue;
- }
- ai->ai_addr->sa_len = ai->ai_addrlen;
- ai->ai_addr->sa_family = ai->ai_family;
-#endif
- if (ai->ai_addrlen == 0 ||
- getnameinfo(ai->ai_addr, ai->ai_addrlen,
- straddr, sizeof(straddr), strport, sizeof(strport),
- NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
- goto bad;
- }
- if (strcmp(strport, "54321") != 0) {
- goto bad;
- }
- switch (ai->ai_family) {
- case AF_INET:
- if (passive) {
- if (strcmp(straddr, "0.0.0.0") != 0) {
- goto bad;
- }
- } else {
- if (strcmp(straddr, "127.0.0.1") != 0) {
- goto bad;
- }
- }
- inet4++;
- break;
- case AF_INET6:
- if (passive) {
- if (strcmp(straddr, "::") != 0) {
- goto bad;
- }
- } else {
- if (strcmp(straddr, "::1") != 0) {
- goto bad;
- }
- }
- inet6++;
- break;
- case AF_UNSPEC:
- goto bad;
- break;
- default:
- /* another family support? */
- break;
- }
- }
- }
+if have_struct_member("struct sockaddr", "sa_len", headers)
+ $defs[-1] = "-DHAVE_SA_LEN "
+end
- if (!(inet4 == 0 || inet4 == 2))
- goto bad;
- if (!(inet6 == 0 || inet6 == 2))
- goto bad;
+have_header("netinet/tcp.h") if /cygwin/ !~ RUBY_PLATFORM # for cygwin 1.1.5
+have_header("netinet/udp.h")
- if (aitop)
- freeaddrinfo(aitop);
- return EXIT_SUCCESS;
+if !have_macro("IPPROTO_IPV6", headers) && have_const("IPPROTO_IPV6", headers)
+ IO.read(File.join(File.dirname(__FILE__), "mkconstants.rb")).sub(/\A.*^__END__$/m, '').split(/\r?\n/).grep(/\AIPPROTO_\w*/){$&}.each {|name|
+ have_const(name, headers) unless $defs.include?("-DHAVE_CONST_#{name.upcase}")
+ }
+end
- bad:
- if (aitop)
- freeaddrinfo(aitop);
- return EXIT_FAILURE;
-}
-EOF
+if have_func("sendmsg") | have_func("recvmsg")
+ have_struct_member('struct msghdr', 'msg_control', ['sys/types.h', 'sys/socket.h'])
+ have_struct_member('struct msghdr', 'msg_accrights', ['sys/types.h', 'sys/socket.h'])
+end
-RECVMSG_WITH_MSG_PEEK_ALLOCATE_FD_TEST = <<'EOF'
+if checking_for("recvmsg() with MSG_PEEK allocate file descriptors") {try_run(cpp_include(headers) + <<'EOF')}
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -241,166 +244,147 @@ int main(int argc, char *argv[])
return EXIT_SUCCESS;
}
EOF
-
-def test_recvmsg_with_msg_peek_creates_fds(headers)
- case RUBY_PLATFORM
- when /linux/
- # Linux 2.6.38 allocate fds by recvmsg with MSG_PEEK.
- close_fds = true
- when /bsd|darwin/
- # FreeBSD 8.2.0, NetBSD 5 and MacOS X Snow Leopard doesn't
- # allocate fds by recvmsg with MSG_PEEK.
- # [ruby-dev:44189]
- # http://bugs.ruby-lang.org/issues/5075
- close_fds = false
- when /cygwin/
- # Cygwin doesn't support fd passing.
- # http://cygwin.com/ml/cygwin/2003-09/msg01808.html
- close_fds = false
- else
- close_fds = nil
- end
- if !CROSS_COMPILING
- if checking_for("recvmsg() with MSG_PEEK allocate file descriptors") {
- try_run(cpp_include(headers) + RECVMSG_WITH_MSG_PEEK_ALLOCATE_FD_TEST)
- }
- if close_fds == false
- warn "unexpected fd-passing recvmsg() with MSG_PEEK behavor on #{RUBY_PLATFORM}: fd allocation unexpected."
- elsif close_fds == nil
- puts "info: #{RUBY_PLATFORM} recvmsg() with MSG_PEEK allocates fds on fd-passing."
- end
- close_fds = true
- else
- if close_fds == true
- warn "unexpected fd-passing recvmsg() with MSG_PEEK behavor on #{RUBY_PLATFORM}: fd allocation expected."
- elsif close_fds == nil
- puts "info: #{RUBY_PLATFORM}: recvmsg() with MSG_PEEK doesn't allocates fds on fd-passing."
- end
- close_fds = false
- end
- end
- if close_fds == nil
- abort <<EOS
-Fatal: cannot test fd-passing recvmsg() with MSG_PEEK behavor
-because cross-compilation for #{RUBY_PLATFORM}.
-If recvmsg() with MSG_PEEK allocates fds on fd passing:
---enable-close-fds-by-recvmsg-with-peek
-If recvmsg() with MSG_PEEK doesn't allocate fds on fd passing:
---disable-close-fds-by-recvmsg-with-peek
-EOS
- end
- close_fds
+ $defs << "-DFD_PASSING_WORK_WITH_RECVMSG_MSG_PEEK"
end
-$INCFLAGS << " -I$(topdir) -I$(top_srcdir)"
-
-if /darwin/ =~ RUBY_PLATFORM
- # For IPv6 extension header access on OS X 10.7+ [Bug #8517]
- $CFLAGS << " -D__APPLE_USE_RFC_3542"
-end
-
-headers = []
-unless $mswin or $mingw
- headers = %w<sys/types.h netdb.h string.h sys/socket.h netinet/in.h>
-end
+getaddr_info_ok = (enable_config("wide-getaddrinfo") && :wide) ||
+ (checking_for("wide getaddrinfo") {try_run(<<EOF)} && :os)
+#{cpp_include(headers)}
+#include <stdlib.h>
-%w[
- sys/uio.h
- xti.h
- netinet/in_systm.h
- netinet/tcp.h
- netinet/udp.h
- arpa/inet.h
- netpacket/packet.h
- net/ethernet.h
- sys/un.h
- ifaddrs.h
- sys/ioctl.h
- sys/sockio.h
- net/if.h
- sys/param.h
- sys/ucred.h
- ucred.h
- net/if_dl.h
- arpa/nameser.h
- resolv.h
-].each {|h|
- if have_header(h, headers)
- headers << h
- end
-}
+#ifndef EXIT_SUCCESS
+#define EXIT_SUCCESS 0
+#endif
+#ifndef EXIT_FAILURE
+#define EXIT_FAILURE 1
+#endif
-have_struct_member("struct sockaddr", "sa_len", headers) # 4.4BSD
-have_struct_member("struct sockaddr_in", "sin_len", headers) # 4.4BSD
+#ifndef AF_LOCAL
+#define AF_LOCAL AF_UNIX
+#endif
-if have_type("struct sockaddr_un", headers) # POSIX
- have_struct_member("struct sockaddr_un", "sun_len", headers) # 4.4BSD
-end
+int
+main(void)
+{
+ int passive, gaierr, inet4 = 0, inet6 = 0;
+ struct addrinfo hints, *ai, *aitop;
+ char straddr[INET6_ADDRSTRLEN], strport[16];
+#ifdef _WIN32
+ WSADATA retdata;
-have_type("struct sockaddr_dl", headers) # AF_LINK address. 4.4BSD since Net2
+ WSAStartup(MAKEWORD(2, 0), &retdata);
+#endif
-have_type("struct sockaddr_storage", headers)
+ for (passive = 0; passive <= 1; passive++) {
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = AF_UNSPEC;
+ hints.ai_protocol = IPPROTO_TCP;
+ hints.ai_flags = passive ? AI_PASSIVE : 0;
+ hints.ai_socktype = SOCK_STREAM;
+ if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
+ (void)gai_strerror(gaierr);
+ goto bad;
+ }
+ for (ai = aitop; ai; ai = ai->ai_next) {
+ if (ai->ai_family == AF_LOCAL) continue;
+ if (ai->ai_addr == NULL)
+ goto bad;
+#if defined(_AIX)
+ if (ai->ai_family == AF_INET6 && passive) {
+ inet6++;
+ continue;
+ }
+ ai->ai_addr->sa_len = ai->ai_addrlen;
+ ai->ai_addr->sa_family = ai->ai_family;
+#endif
+ if (ai->ai_addrlen == 0 ||
+ getnameinfo(ai->ai_addr, ai->ai_addrlen,
+ straddr, sizeof(straddr), strport, sizeof(strport),
+ NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
+ goto bad;
+ }
+ if (strcmp(strport, "54321") != 0) {
+ goto bad;
+ }
+ switch (ai->ai_family) {
+ case AF_INET:
+ if (passive) {
+ if (strcmp(straddr, "0.0.0.0") != 0) {
+ goto bad;
+ }
+ } else {
+ if (strcmp(straddr, "127.0.0.1") != 0) {
+ goto bad;
+ }
+ }
+ inet4++;
+ break;
+ case AF_INET6:
+ if (passive) {
+ if (strcmp(straddr, "::") != 0) {
+ goto bad;
+ }
+ } else {
+ if (strcmp(straddr, "::1") != 0) {
+ goto bad;
+ }
+ }
+ inet6++;
+ break;
+ case AF_UNSPEC:
+ goto bad;
+ break;
+ default:
+ /* another family support? */
+ break;
+ }
+ }
+ }
-have_type("struct addrinfo", headers)
+ if (!(inet4 == 0 || inet4 == 2))
+ goto bad;
+ if (!(inet6 == 0 || inet6 == 2))
+ goto bad;
-if have_type("socklen_t", headers)
- if try_static_assert("sizeof(socklen_t) >= sizeof(long)", headers)
- $defs << "-DRSTRING_SOCKLEN=(socklen_t)RSTRING_LEN"
- end
-end
+ if (aitop)
+ freeaddrinfo(aitop);
+ return EXIT_SUCCESS;
-have_type("struct in_pktinfo", headers) {|src|
- src.sub(%r'^/\*top\*/', '\&'"\n#if defined(IPPROTO_IP) && defined(IP_PKTINFO)") <<
- "#else\n" << "#error\n" << ">>>>>> no in_pktinfo <<<<<<\n" << "#endif\n"
-} and have_struct_member("struct in_pktinfo", "ipi_spec_dst", headers)
-have_type("struct in6_pktinfo", headers) {|src|
- src.sub(%r'^/\*top\*/', '\&'"\n#if defined(IPPROTO_IPV6) && defined(IPV6_PKTINFO)") <<
- "#else\n" << "#error\n" << ">>>>>> no in6_pktinfo <<<<<<\n" << "#endif\n"
+ bad:
+ if (aitop)
+ freeaddrinfo(aitop);
+ return EXIT_FAILURE;
}
+EOF
+if ipv6 and not getaddr_info_ok
+ abort <<EOS
-have_type("struct sockcred", headers)
-have_type("struct cmsgcred", headers)
-
-have_type("struct ip_mreq", headers) # 4.4BSD
-have_type("struct ip_mreqn", headers) # Linux 2.4
-have_type("struct ipv6_mreq", headers) # RFC 3493
-
-have_msg_control = nil
-have_msg_control = have_struct_member('struct msghdr', 'msg_control', headers) unless $mswin or $mingw
-have_struct_member('struct msghdr', 'msg_accrights', headers)
-
-case RUBY_PLATFORM
-when /mswin(32|64)|mingw/
- test_func = "WSACleanup"
- have_library("ws2_32", "WSACleanup", headers)
-when /cygwin/
- test_func = "socket(0,0,0)"
-when /beos/
- test_func = "socket(0,0,0)"
- have_library("net", "socket(0,0,0)", headers)
-when /haiku/
- test_func = "socket(0,0,0)"
- have_library("network", "socket(0,0,0)", headers)
-when /i386-os2_emx/
- test_func = "socket(0,0,0)"
- have_library("socket", "socket(0,0,0)", headers)
-else
- test_func = "socket(0,0,0)"
- have_library("nsl", 't_open("", 0, (struct t_info *)NULL)', headers) # SunOS
- have_library("socket", "socket(0,0,0)", headers) # SunOS
+Fatal: --enable-ipv6 is specified, and your OS seems to support IPv6 feature.
+But your getaddrinfo() and getnameinfo() are appeared to be broken. Sorry,
+you cannot compile IPv6 socket classes with broken these functions.
+You can try --enable-wide-getaddrinfo.
+EOS
end
-if have_func(test_func, headers)
-
- have_func("sendmsg(0, (struct msghdr *)NULL, 0)", headers) # POSIX
- have_recvmsg = have_func("recvmsg(0, (struct msghdr *)NULL, 0)", headers) # POSIX
+case with_config("lookup-order-hack", "UNSPEC")
+when "INET"
+ $defs << "-DLOOKUP_ORDER_HACK_INET"
+when "INET6"
+ $defs << "-DLOOKUP_ORDER_HACK_INET6"
+when "UNSPEC"
+ # nothing special
+else
+ abort <<EOS
- have_func("freehostent((struct hostent *)NULL)", headers) # RFC 2553
- have_func("freeaddrinfo((struct addrinfo *)NULL)", headers) # RFC 2553
+Fatal: invalid value for --with-lookup-order-hack (expected INET, INET6 or UNSPEC)
+EOS
+end
- if /haiku/ !~ RUBY_PLATFORM and
- have_func("gai_strerror(0)", headers) # POSIX
- if checking_for("gai_strerror() returns const pointer") {!try_compile(<<EOF)}
+have_type("struct addrinfo", headers)
+have_func("freehostent")
+have_func("freeaddrinfo")
+if /haiku/ !~ RUBY_PLATFORM and have_func("gai_strerror")
+ if checking_for("gai_strerror() returns const pointer") {!try_compile(<<EOF)}
#{cpp_include(headers)}
#include <stdlib.h>
void
@@ -409,196 +393,103 @@ conftest_gai_strerror_is_const()
*gai_strerror(0) = 0;
}
EOF
- $defs << "-DGAI_STRERROR_CONST"
- end
+ $defs << "-DGAI_STRERROR_CONST"
end
+end
- have_func("accept4", headers)
-
- have_func('inet_ntop(0, (const void *)0, (char *)0, 0)', headers) or
- have_func("inet_ntoa(*(struct in_addr *)NULL)", headers)
- have_func('inet_pton(0, "", (void *)0)', headers) or
- have_func('inet_aton("", (struct in_addr *)0)', headers)
- have_func('getservbyport(0, "")', headers)
- have_func("getifaddrs((struct ifaddrs **)NULL)", headers)
-
- have_func("getpeereid", headers)
-
- have_func("getpeerucred(0, (ucred_t **)NULL)", headers) # SunOS
-
- have_func_decl = proc do |name, headers|
- if !checking_for("declaration of #{name}()") {!%w[int void].all? {|ret| try_compile(<<EOF)}}
-#{cpp_include(headers)}
-#{ret} #{name}(void);
-EOF
- $defs << "-DNEED_#{name.tr_cpp}_DECL"
- end
+have_func("accept4")
+
+$objs = [
+ "init.#{$OBJEXT}",
+ "constants.#{$OBJEXT}",
+ "basicsocket.#{$OBJEXT}",
+ "socket.#{$OBJEXT}",
+ "ipsocket.#{$OBJEXT}",
+ "tcpsocket.#{$OBJEXT}",
+ "tcpserver.#{$OBJEXT}",
+ "sockssocket.#{$OBJEXT}",
+ "udpsocket.#{$OBJEXT}",
+ "unixsocket.#{$OBJEXT}",
+ "unixserver.#{$OBJEXT}",
+ "option.#{$OBJEXT}",
+ "ancdata.#{$OBJEXT}",
+ "raddrinfo.#{$OBJEXT}"
+]
+
+if getaddr_info_ok == :wide or
+ !have_func("getnameinfo", headers) or !have_func("getaddrinfo", headers)
+ if have_struct_member("struct in6_addr", "s6_addr8", headers)
+ $defs[-1] = "s6_addr=s6_addr8"
end
- if have_func('if_indextoname(0, "")', headers)
- have_func_decl["if_indextoname"]
- end
- if have_func('if_nametoindex("")', headers)
- have_func_decl["if_nametoindex"]
+ if ipv6 == "kame" && have_struct_member("struct in6_addr", "s6_addr32", headers)
+ $defs[-1] = "-DFAITH"
end
+ $CPPFLAGS="-I. "+$CPPFLAGS
+ $objs += ["getaddrinfo.#{$OBJEXT}"]
+ $objs += ["getnameinfo.#{$OBJEXT}"]
+ $defs << "-DGETADDRINFO_EMU"
+end
- have_func("hsterror", headers)
- have_func('getipnodebyname("", 0, 0, (int *)0)', headers) # RFC 2553
- have_func('gethostbyname2("", 0)', headers) # RFC 2133
- have_func("socketpair(0, 0, 0, 0)", headers)
- unless have_func("gethostname((char *)0, 0)", headers)
- have_func("uname((struct utsname *)NULL)", headers)
- end
+have_func('inet_ntop(0, (const void *)0, (char *)0, 0)') or
+ have_func("inet_ntoa(*(struct in_addr *)NULL)")
+have_func('inet_pton(0, "", (void *)0)') or have_func('inet_aton("", (struct in_addr *)0)')
+have_func('getservbyport(0, "")')
+have_header("arpa/nameser.h")
+have_header("resolv.h")
- ipv6 = false
- default_ipv6 = /beos|haiku/ !~ RUBY_PLATFORM
- if enable_config("ipv6", default_ipv6)
- if checking_for("ipv6") {try_link(AF_INET6_SOCKET_CREATION_TEST)}
- $defs << "-DENABLE_IPV6" << "-DINET6"
- ipv6 = true
- end
- end
+have_header("ifaddrs.h")
+have_func("getifaddrs")
+have_header("sys/ioctl.h")
+have_header("sys/sockio.h")
+have_header("net/if.h", headers)
- if ipv6
- if $mingw
- $CPPFLAGS << " -D_WIN32_WINNT=0x501" unless $CPPFLAGS.include?("_WIN32_WINNT")
- end
- ipv6lib = nil
- class << (fmt = "unknown")
- def %(s) s || self end
- end
- idirs, ldirs = dir_config("inet6", %w[/usr/inet6 /usr/local/v6].find {|d| File.directory?(d)})
- checking_for("ipv6 type", fmt) do
- if have_macro("IPV6_INRIA_VERSION", "netinet/in.h")
- "inria"
- elsif have_macro("__KAME__", "netinet/in.h")
- have_library(ipv6lib = "inet6")
- "kame"
- elsif have_macro("_TOSHIBA_INET6", "sys/param.h")
- have_library(ipv6lib = "inet6") and "toshiba"
- elsif have_macro("__V6D__", "sys/v6config.h")
- have_library(ipv6lib = "v6") and "v6d"
- elsif have_macro("_ZETA_MINAMI_INET6", "sys/param.h")
- have_library(ipv6lib = "inet6") and "zeta"
- elsif have_library("inet6")
- "inet6"
- end
- end or not ipv6lib or abort <<EOS
+have_header("sys/param.h", headers)
+have_header("sys/ucred.h", headers)
-Fatal: no #{ipv6lib} library found. cannot continue.
-You need to fetch lib#{ipv6lib}.a from appropriate
-ipv6 kit and compile beforehand.
-EOS
- end
-
- if !have_macro("IPPROTO_IPV6", headers) && have_const("IPPROTO_IPV6", headers)
- IO.read(File.join(File.dirname(__FILE__), "mkconstants.rb")).sub(/\A.*^__END__$/m, '').split(/\r?\n/).grep(/\AIPPROTO_\w*/){$&}.each {|name|
- have_const(name, headers) unless $defs.include?("-DHAVE_CONST_#{name.upcase}")
- }
- end
-
- if enable_config("close-fds-by-recvmsg-with-peek") {
- have_msg_control && have_recvmsg &&
- have_const('AF_UNIX', headers) && have_const('SCM_RIGHTS', headers) &&
- test_recvmsg_with_msg_peek_creates_fds(headers)
- }
- $defs << "-DFD_PASSING_WORK_WITH_RECVMSG_MSG_PEEK"
- end
+unless have_type("socklen_t", headers)
+ $defs << "-Dsocklen_t=int"
+end
- case enable_config("wide-getaddrinfo")
- when true
- getaddr_info_ok = :wide
- when nil
- if have_func("getnameinfo", headers) and have_func("getaddrinfo", headers)
- getaddr_info_ok = :os
- if !CROSS_COMPILING &&
- !checking_for("system getaddrinfo working") {
- try_run(cpp_include(headers) + GETADDRINFO_GETNAMEINFO_TEST)
- }
- getaddr_info_ok = :wide
- end
- else
- getaddr_info_ok = :wide
- end
- when false
- if have_func("getnameinfo", headers) and have_func("getaddrinfo", headers)
- getaddr_info_ok = :os
- if !CROSS_COMPILING &&
- !checking_for("system getaddrinfo working") {
- try_run(cpp_include(headers) + GETADDRINFO_GETNAMEINFO_TEST)
- }
- getaddr_info_ok = nil
- end
- else
- getaddr_info_ok = nil
- end
- else
- raise "unexpected enable_config() value"
- end
+have_header("sys/un.h")
+have_header("sys/uio.h")
+have_type("struct in_pktinfo", headers) {|src|
+ src.sub(%r'^/\*top\*/', '\&'"\n#if defined(IPPROTO_IP) && defined(IP_PKTINFO)") <<
+ "#else\n" << "#error\n" << ">>>>>> no in_pktinfo <<<<<<\n" << "#endif\n"
+} and have_struct_member("struct in_pktinfo", "ipi_spec_dst", headers)
+have_type("struct in6_pktinfo", headers) {|src|
+ src.sub(%r'^/\*top\*/', '\&'"\n#if defined(IPPROTO_IPV6) && defined(IPV6_PKTINFO)") <<
+ "#else\n" << "#error\n" << ">>>>>> no in6_pktinfo <<<<<<\n" << "#endif\n"
+}
- if ipv6 and not getaddr_info_ok
- abort <<EOS
+have_type("struct sockcred", headers)
+have_type("struct cmsgcred", headers)
-Fatal: --enable-ipv6 is specified, and your OS seems to support IPv6 feature.
-But your getaddrinfo() and getnameinfo() are appeared to be broken. Sorry,
-you cannot compile IPv6 socket classes with broken these functions.
-You can try --enable-wide-getaddrinfo.
-EOS
- end
+have_func("getpeereid")
- case with_config("lookup-order-hack", "UNSPEC")
- when "INET"
- $defs << "-DLOOKUP_ORDER_HACK_INET"
- when "INET6"
- $defs << "-DLOOKUP_ORDER_HACK_INET6"
- when "UNSPEC"
- # nothing special
- else
- abort <<EOS
+have_header("ucred.h", headers)
+have_func("getpeerucred")
-Fatal: invalid value for --with-lookup-order-hack (expected INET, INET6 or UNSPEC)
-EOS
- end
+have_func("if_indextoname")
- $objs = [
- "init.#{$OBJEXT}",
- "constants.#{$OBJEXT}",
- "basicsocket.#{$OBJEXT}",
- "socket.#{$OBJEXT}",
- "ipsocket.#{$OBJEXT}",
- "tcpsocket.#{$OBJEXT}",
- "tcpserver.#{$OBJEXT}",
- "sockssocket.#{$OBJEXT}",
- "udpsocket.#{$OBJEXT}",
- "unixsocket.#{$OBJEXT}",
- "unixserver.#{$OBJEXT}",
- "option.#{$OBJEXT}",
- "ancdata.#{$OBJEXT}",
- "raddrinfo.#{$OBJEXT}",
- "ifaddr.#{$OBJEXT}"
- ]
-
- if getaddr_info_ok == :wide
- if !have_type("struct in6_addr", headers) and have_type("struct in_addr6", headers)
- $defs.pop(2)
- $defs << "-Din_addr6=in6_addr"
- end
- if have_struct_member("struct in6_addr", "s6_addr8", headers)
- $defs[-1] = "-Ds6_addr=s6_addr8"
- end
- if ipv6 == "kame" && have_struct_member("struct in6_addr", "s6_addr32", headers)
- $defs[-1] = "-DFAITH"
- end
- $CPPFLAGS="-I. "+$CPPFLAGS
- $objs += ["getaddrinfo.#{$OBJEXT}"]
- $objs += ["getnameinfo.#{$OBJEXT}"]
- $defs << "-DGETADDRINFO_EMU"
- end
+have_type("struct ip_mreq", headers) # 4.4BSD
+have_type("struct ip_mreqn", headers) # Linux 2.4
+have_type("struct ipv6_mreq", headers) # RFC 3493
- # workaround for recent Windows SDK
- $defs << "-DIPPROTO_IPV6=IPPROTO_IPV6" if $defs.include?("-DHAVE_CONST_IPPROTO_IPV6") && !have_macro("IPPROTO_IPV6")
+# workaround for recent Windows SDK
+$defs << "-DIPPROTO_IPV6=IPPROTO_IPV6" if $defs.include?("-DHAVE_CONST_IPPROTO_IPV6") && !have_macro("IPPROTO_IPV6")
- $distcleanfiles << "constants.h" << "constdefs.*"
+$distcleanfiles << "constants.h" << "constdefs.*"
+if have_func(test_func)
+ have_func("hsterror")
+ have_func("getipnodebyname") or have_func("gethostbyname2")
+ if !have_func("socketpair(0, 0, 0, 0)") and have_func("rb_w32_socketpair(0, 0, 0, 0)")
+ $defs << "-Dsocketpair(a,b,c,d)=rb_w32_socketpair((a),(b),(c),(d))"
+ $defs << "-DHAVE_SOCKETPAIR"
+ end
+ unless have_func("gethostname((char *)0, 0)")
+ have_func("uname")
+ end
if enable_config("socks", ENV["SOCKS_SERVER"])
if have_library("socks5", "SOCKSinit")
$defs << "-DSOCKS5" << "-DSOCKS"
@@ -606,30 +497,5 @@ EOS
$defs << "-DSOCKS"
end
end
-
- hdr = "netinet6/in6.h"
- if /darwin/ =~ RUBY_PLATFORM and !try_compile(<<"SRC", nil, :werror=>true)
-#include <netinet/in.h>
-int t(struct in6_addr *addr) {return IN6_IS_ADDR_UNSPECIFIED(addr);}
-SRC
- print "fixing apple's netinet6/in6.rb ..."; $stdout.flush
- in6 = File.read("/usr/include/#{hdr}")
- if in6.gsub!(/\*\(const\s+__uint32_t\s+\*\)\(const\s+void\s+\*\)\(&(\(\w+\))->s6_addr\[(\d+)\]\)/) do
- i, r = $2.to_i.divmod(4)
- if r.zero?
- "#$1->__u6_addr.__u6_addr32[#{i}]"
- else
- $&
- end
- end
- FileUtils.mkdir_p(File.dirname(hdr))
- open(hdr, "w") {|f| f.write(in6)}
- $distcleanfiles << hdr
- $distcleandirs << File.dirname(hdr)
- puts "done"
- else
- puts "not needed"
- end
- end
create_makefile("socket")
end
diff --git a/ext/socket/getaddrinfo.c b/ext/socket/getaddrinfo.c
index a17d12b705..aa966b3c52 100644
--- a/ext/socket/getaddrinfo.c
+++ b/ext/socket/getaddrinfo.c
@@ -80,10 +80,6 @@
#include <socks.h>
#endif
-#ifndef HAVE_TYPE_SOCKLEN_T
-typedef int socklen_t;
-#endif
-
#include "addrinfo.h"
#include "sockport.h"
@@ -188,9 +184,9 @@ if (pai->ai_flags & AI_CANONNAME) {\
}\
memcpy((ai), pai, sizeof(struct addrinfo));\
(ai)->ai_addr = (struct sockaddr *)((ai) + 1);\
- (ai)->ai_family = (afd)->a_af;\
- (ai)->ai_addrlen = (afd)->a_socklen;\
- INIT_SOCKADDR((ai)->ai_addr, (afd)->a_af, (afd)->a_socklen);\
+ memset((ai)->ai_addr, 0, (afd)->a_socklen);\
+ SET_SA_LEN((ai)->ai_addr, (ai)->ai_addrlen = (afd)->a_socklen);\
+ (ai)->ai_addr->sa_family = (ai)->ai_family = (afd)->a_af;\
((struct sockinet *)(ai)->ai_addr)->si_port = (port);\
p = (char *)((ai)->ai_addr);\
memcpy(p + (afd)->a_off, (addr), (afd)->a_addrlen);\
diff --git a/ext/socket/getnameinfo.c b/ext/socket/getnameinfo.c
index 4da9680ccb..d1d5ff6c73 100644
--- a/ext/socket/getnameinfo.c
+++ b/ext/socket/getnameinfo.c
@@ -71,10 +71,6 @@
#include <socks.h>
#endif
-#ifndef HAVE_TYPE_SOCKLEN_T
-typedef int socklen_t;
-#endif
-
#include "addrinfo.h"
#include "sockport.h"
@@ -155,8 +151,8 @@ getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host, socklen_t ho
if (sa == NULL)
return ENI_NOSOCKET;
- if (!VALIDATE_SOCKLEN(sa, salen)) return ENI_SALEN;
- len = salen;
+ len = SA_LEN(sa);
+ if (len != salen) return ENI_SALEN;
family = sa->sa_family;
for (i = 0; afdl[i].a_af; i++)
diff --git a/ext/socket/ifaddr.c b/ext/socket/ifaddr.c
deleted file mode 100644
index 16cd47be5a..0000000000
--- a/ext/socket/ifaddr.c
+++ /dev/null
@@ -1,457 +0,0 @@
-#include "rubysocket.h"
-
-#ifdef HAVE_GETIFADDRS
-
-/*
- * ifa_flags is usually unsigned int.
- * However it is uint64_t on SunOS 5.11 (OpenIndiana).
- */
-#ifdef HAVE_LONG_LONG
-typedef unsigned LONG_LONG ifa_flags_t;
-#define PRIxIFAFLAGS PRI_LL_PREFIX"x"
-#define IFAFLAGS2NUM(flags) ULL2NUM(flags)
-#else
-typedef unsigned int ifa_flags_t;
-#define PRIxIFAFLAGS "x"
-#define IFAFLAGS2NUM(flags) UINT2NUM(flags)
-#endif
-
-VALUE rb_cSockIfaddr;
-
-typedef struct rb_ifaddr_tag rb_ifaddr_t;
-typedef struct rb_ifaddr_root_tag rb_ifaddr_root_t;
-
-struct rb_ifaddr_tag {
- int ord;
- struct ifaddrs *ifaddr;
- rb_ifaddr_root_t *root;
-};
-
-struct rb_ifaddr_root_tag {
- int refcount;
- int numifaddrs;
- rb_ifaddr_t ary[1];
-};
-
-static rb_ifaddr_root_t *
-get_root(const rb_ifaddr_t *ifaddr)
-{
- return (rb_ifaddr_root_t *)((char *)&ifaddr[-ifaddr->ord] -
- offsetof(rb_ifaddr_root_t, ary));
-}
-
-static void
-ifaddr_mark(void *ptr)
-{
-}
-
-static void
-ifaddr_free(void *ptr)
-{
- rb_ifaddr_t *ifaddr = ptr;
- rb_ifaddr_root_t *root = get_root(ifaddr);
- root->refcount--;
- if (root->refcount == 0) {
- freeifaddrs(root->ary[0].ifaddr);
- xfree(root);
- }
-}
-
-static size_t
-ifaddr_memsize(const void *ptr)
-{
- const rb_ifaddr_t *ifaddr;
- const rb_ifaddr_root_t *root;
- if (ptr == NULL)
- return 0;
- ifaddr = ptr;
- root = get_root(ifaddr);
- return sizeof(rb_ifaddr_root_t) + (root->numifaddrs - 1) * sizeof(rb_ifaddr_t);
-}
-
-static const rb_data_type_t ifaddr_type = {
- "socket/ifaddr",
- {ifaddr_mark, ifaddr_free, ifaddr_memsize,},
-};
-
-#define IS_IFADDRS(obj) rb_typeddata_is_kind_of((obj), &ifaddr_type)
-static inline rb_ifaddr_t *
-check_ifaddr(VALUE self)
-{
- return rb_check_typeddata(self, &ifaddr_type);
-}
-
-static rb_ifaddr_t *
-get_ifaddr(VALUE self)
-{
- rb_ifaddr_t *rifaddr = check_ifaddr(self);
-
- if (!rifaddr) {
- rb_raise(rb_eTypeError, "uninitialized ifaddr");
- }
- return rifaddr;
-}
-
-static VALUE
-rsock_getifaddrs(void)
-{
- int ret;
- int numifaddrs, i;
- struct ifaddrs *ifaddrs, *ifa;
- rb_ifaddr_root_t *root;
- VALUE result;
-
- ret = getifaddrs(&ifaddrs);
- if (ret == -1)
- rb_sys_fail("getifaddrs");
-
- if (!ifaddrs) {
- return rb_ary_new();
- }
-
- numifaddrs = 0;
- for (ifa = ifaddrs; ifa != NULL; ifa = ifa->ifa_next)
- numifaddrs++;
-
- root = xmalloc(sizeof(rb_ifaddr_root_t) + (numifaddrs-1) * sizeof(rb_ifaddr_t));
- root->refcount = root->numifaddrs = numifaddrs;
-
- ifa = ifaddrs;
- for (i = 0; i < numifaddrs; i++) {
- root->ary[i].ord = i;
- root->ary[i].ifaddr = ifa;
- root->ary[i].root = root;
- ifa = ifa->ifa_next;
- }
-
- result = rb_ary_new2(numifaddrs);
- for (i = 0; i < numifaddrs; i++) {
- rb_ary_push(result, TypedData_Wrap_Struct(rb_cSockIfaddr, &ifaddr_type, &root->ary[i]));
- }
-
- return result;
-}
-
-/*
- * call-seq:
- * ifaddr.name => string
- *
- * Returns the interface name of _ifaddr_.
- */
-
-static VALUE
-ifaddr_name(VALUE self)
-{
- rb_ifaddr_t *rifaddr = get_ifaddr(self);
- struct ifaddrs *ifa = rifaddr->ifaddr;
- return rb_str_new_cstr(ifa->ifa_name);
-}
-
-#ifdef HAVE_IF_NAMETOINDEX
-/*
- * call-seq:
- * ifaddr.ifindex => integer
- *
- * Returns the interface index of _ifaddr_.
- */
-
-static VALUE
-ifaddr_ifindex(VALUE self)
-{
- rb_ifaddr_t *rifaddr = get_ifaddr(self);
- struct ifaddrs *ifa = rifaddr->ifaddr;
- unsigned int ifindex = if_nametoindex(ifa->ifa_name);
- if (ifindex == 0) {
- rb_raise(rb_eArgError, "invalid interface name: %s", ifa->ifa_name);
- }
- return UINT2NUM(ifindex);
-}
-#else
-#define ifaddr_ifindex rb_f_notimplement
-#endif
-
-/*
- * call-seq:
- * ifaddr.flags => integer
- *
- * Returns the flags of _ifaddr_.
- */
-
-static VALUE
-ifaddr_flags(VALUE self)
-{
- rb_ifaddr_t *rifaddr = get_ifaddr(self);
- struct ifaddrs *ifa = rifaddr->ifaddr;
- return IFAFLAGS2NUM(ifa->ifa_flags);
-}
-
-/*
- * call-seq:
- * ifaddr.addr => addrinfo
- *
- * Returns the address of _ifaddr_.
- * nil is returned if address is not available in _ifaddr_.
- */
-
-static VALUE
-ifaddr_addr(VALUE self)
-{
- rb_ifaddr_t *rifaddr = get_ifaddr(self);
- struct ifaddrs *ifa = rifaddr->ifaddr;
- if (ifa->ifa_addr)
- return rsock_sockaddr_obj(ifa->ifa_addr, rsock_sockaddr_len(ifa->ifa_addr));
- return Qnil;
-}
-
-/*
- * call-seq:
- * ifaddr.netmask => addrinfo
- *
- * Returns the netmask address of _ifaddr_.
- * nil is returned if netmask is not available in _ifaddr_.
- */
-
-static VALUE
-ifaddr_netmask(VALUE self)
-{
- rb_ifaddr_t *rifaddr = get_ifaddr(self);
- struct ifaddrs *ifa = rifaddr->ifaddr;
- if (ifa->ifa_netmask)
- return rsock_sockaddr_obj(ifa->ifa_netmask, rsock_sockaddr_len(ifa->ifa_netmask));
- return Qnil;
-}
-
-/*
- * call-seq:
- * ifaddr.broadaddr => addrinfo
- *
- * Returns the broadcast address of _ifaddr_.
- * nil is returned if the flags doesn't have IFF_BROADCAST.
- */
-
-static VALUE
-ifaddr_broadaddr(VALUE self)
-{
- rb_ifaddr_t *rifaddr = get_ifaddr(self);
- struct ifaddrs *ifa = rifaddr->ifaddr;
- if ((ifa->ifa_flags & IFF_BROADCAST) && ifa->ifa_broadaddr)
- return rsock_sockaddr_obj(ifa->ifa_broadaddr, rsock_sockaddr_len(ifa->ifa_broadaddr));
- return Qnil;
-}
-
-/*
- * call-seq:
- * ifaddr.dstaddr => addrinfo
- *
- * Returns the destination address of _ifaddr_.
- * nil is returned if the flags doesn't have IFF_POINTOPOINT.
- */
-
-static VALUE
-ifaddr_dstaddr(VALUE self)
-{
- rb_ifaddr_t *rifaddr = get_ifaddr(self);
- struct ifaddrs *ifa = rifaddr->ifaddr;
- if ((ifa->ifa_flags & IFF_POINTOPOINT) && ifa->ifa_dstaddr)
- return rsock_sockaddr_obj(ifa->ifa_dstaddr, rsock_sockaddr_len(ifa->ifa_dstaddr));
- return Qnil;
-}
-
-static void
-ifaddr_inspect_flags(ifa_flags_t flags, VALUE result)
-{
- const char *sep = " ";
-#define INSPECT_BIT(bit, name) \
- if (flags & (bit)) { rb_str_catf(result, "%s" name, sep); flags &= ~(ifa_flags_t)(bit); sep = ","; }
-#ifdef IFF_UP
- INSPECT_BIT(IFF_UP, "UP")
-#endif
-#ifdef IFF_BROADCAST
- INSPECT_BIT(IFF_BROADCAST, "BROADCAST")
-#endif
-#ifdef IFF_DEBUG
- INSPECT_BIT(IFF_DEBUG, "DEBUG")
-#endif
-#ifdef IFF_LOOPBACK
- INSPECT_BIT(IFF_LOOPBACK, "LOOPBACK")
-#endif
-#ifdef IFF_POINTOPOINT
- INSPECT_BIT(IFF_POINTOPOINT, "POINTOPOINT")
-#endif
-#ifdef IFF_RUNNING
- INSPECT_BIT(IFF_RUNNING, "RUNNING")
-#endif
-#ifdef IFF_NOARP
- INSPECT_BIT(IFF_NOARP, "NOARP")
-#endif
-#ifdef IFF_PROMISC
- INSPECT_BIT(IFF_PROMISC, "PROMISC")
-#endif
-#ifdef IFF_NOTRAILERS
- INSPECT_BIT(IFF_NOTRAILERS, "NOTRAILERS")
-#endif
-#ifdef IFF_ALLMULTI
- INSPECT_BIT(IFF_ALLMULTI, "ALLMULTI")
-#endif
-#ifdef IFF_MASTER
- INSPECT_BIT(IFF_MASTER, "MASTER")
-#endif
-#ifdef IFF_SLAVE
- INSPECT_BIT(IFF_SLAVE, "SLAVE")
-#endif
-#ifdef IFF_MULTICAST
- INSPECT_BIT(IFF_MULTICAST, "MULTICAST")
-#endif
-#ifdef IFF_PORTSEL
- INSPECT_BIT(IFF_PORTSEL, "PORTSEL")
-#endif
-#ifdef IFF_AUTOMEDIA
- INSPECT_BIT(IFF_AUTOMEDIA, "AUTOMEDIA")
-#endif
-#ifdef IFF_DYNAMIC
- INSPECT_BIT(IFF_DYNAMIC, "DYNAMIC")
-#endif
-#ifdef IFF_LOWER_UP
- INSPECT_BIT(IFF_LOWER_UP, "LOWER_UP")
-#endif
-#ifdef IFF_DORMANT
- INSPECT_BIT(IFF_DORMANT, "DORMANT")
-#endif
-#ifdef IFF_ECHO
- INSPECT_BIT(IFF_ECHO, "ECHO")
-#endif
-#undef INSPECT_BIT
- if (flags) {
- rb_str_catf(result, "%s%#"PRIxIFAFLAGS, sep, flags);
- }
-}
-
-/*
- * call-seq:
- * ifaddr.inspect => string
- *
- * Returns a string to show contents of _ifaddr_.
- */
-
-static VALUE
-ifaddr_inspect(VALUE self)
-{
- rb_ifaddr_t *rifaddr = get_ifaddr(self);
- struct ifaddrs *ifa;
- VALUE result;
-
- ifa = rifaddr->ifaddr;
-
- result = rb_str_new_cstr("#<");
-
- rb_str_append(result, rb_class_name(CLASS_OF(self)));
- rb_str_cat2(result, " ");
- rb_str_cat2(result, ifa->ifa_name);
-
- if (ifa->ifa_flags)
- ifaddr_inspect_flags(ifa->ifa_flags, result);
-
- if (ifa->ifa_addr) {
- rb_str_cat2(result, " ");
- rsock_inspect_sockaddr(ifa->ifa_addr,
- rsock_sockaddr_len(ifa->ifa_addr),
- result);
- }
- if (ifa->ifa_netmask) {
- rb_str_cat2(result, " netmask=");
- rsock_inspect_sockaddr(ifa->ifa_netmask,
- rsock_sockaddr_len(ifa->ifa_netmask),
- result);
- }
-
- if ((ifa->ifa_flags & IFF_BROADCAST) && ifa->ifa_broadaddr) {
- rb_str_cat2(result, " broadcast=");
- rsock_inspect_sockaddr(ifa->ifa_broadaddr,
- rsock_sockaddr_len(ifa->ifa_broadaddr),
- result);
- }
-
- if ((ifa->ifa_flags & IFF_POINTOPOINT) && ifa->ifa_dstaddr) {
- rb_str_cat2(result, " dstaddr=");
- rsock_inspect_sockaddr(ifa->ifa_dstaddr,
- rsock_sockaddr_len(ifa->ifa_dstaddr),
- result);
- }
-
- rb_str_cat2(result, ">");
- return result;
-}
-#endif
-
-#ifdef HAVE_GETIFADDRS
-/*
- * call-seq:
- * Socket.getifaddrs => [ifaddr1, ...]
- *
- * Returns an array of interface addresses.
- * An element of the array is an instance of Socket::Ifaddr.
- *
- * This method can be used to find multicast-enabled interfaces:
- *
- * pp Socket.getifaddrs.reject {|ifaddr|
- * !ifaddr.addr.ip? || (ifaddr.flags & Socket::IFF_MULTICAST == 0)
- * }.map {|ifaddr| [ifaddr.name, ifaddr.ifindex, ifaddr.addr] }
- * #=> [["eth0", 2, #<Addrinfo: 221.186.184.67>],
- * # ["eth0", 2, #<Addrinfo: fe80::216:3eff:fe95:88bb%eth0>]]
- *
- * Example result on GNU/Linux:
- * pp Socket.getifaddrs
- * #=> [#<Socket::Ifaddr lo UP,LOOPBACK,RUNNING,0x10000 PACKET[protocol=0 lo hatype=772 HOST hwaddr=00:00:00:00:00:00]>,
- * # #<Socket::Ifaddr eth0 UP,BROADCAST,RUNNING,MULTICAST,0x10000 PACKET[protocol=0 eth0 hatype=1 HOST hwaddr=00:16:3e:95:88:bb] broadcast=PACKET[protocol=0 eth0 hatype=1 HOST hwaddr=ff:ff:ff:ff:ff:ff]>,
- * # #<Socket::Ifaddr sit0 NOARP PACKET[protocol=0 sit0 hatype=776 HOST hwaddr=00:00:00:00]>,
- * # #<Socket::Ifaddr lo UP,LOOPBACK,RUNNING,0x10000 127.0.0.1 netmask=255.0.0.0>,
- * # #<Socket::Ifaddr eth0 UP,BROADCAST,RUNNING,MULTICAST,0x10000 221.186.184.67 netmask=255.255.255.240 broadcast=221.186.184.79>,
- * # #<Socket::Ifaddr lo UP,LOOPBACK,RUNNING,0x10000 ::1 netmask=ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff>,
- * # #<Socket::Ifaddr eth0 UP,BROADCAST,RUNNING,MULTICAST,0x10000 fe80::216:3eff:fe95:88bb%eth0 netmask=ffff:ffff:ffff:ffff::>]
- *
- * Example result on FreeBSD:
- * pp Socket.getifaddrs
- * #=> [#<Socket::Ifaddr usbus0 UP,0x10000 LINK[usbus0]>,
- * # #<Socket::Ifaddr re0 UP,BROADCAST,RUNNING,MULTICAST,0x800 LINK[re0 3a:d0:40:9a:fe:e8]>,
- * # #<Socket::Ifaddr re0 UP,BROADCAST,RUNNING,MULTICAST,0x800 10.250.10.18 netmask=255.255.255.? (7 bytes for 16 bytes sockaddr_in) broadcast=10.250.10.255>,
- * # #<Socket::Ifaddr re0 UP,BROADCAST,RUNNING,MULTICAST,0x800 fe80:2::38d0:40ff:fe9a:fee8 netmask=ffff:ffff:ffff:ffff::>,
- * # #<Socket::Ifaddr re0 UP,BROADCAST,RUNNING,MULTICAST,0x800 2001:2e8:408:10::12 netmask=UNSPEC>,
- * # #<Socket::Ifaddr plip0 POINTOPOINT,MULTICAST,0x800 LINK[plip0]>,
- * # #<Socket::Ifaddr lo0 UP,LOOPBACK,RUNNING,MULTICAST LINK[lo0]>,
- * # #<Socket::Ifaddr lo0 UP,LOOPBACK,RUNNING,MULTICAST ::1 netmask=ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff>,
- * # #<Socket::Ifaddr lo0 UP,LOOPBACK,RUNNING,MULTICAST fe80:4::1 netmask=ffff:ffff:ffff:ffff::>,
- * # #<Socket::Ifaddr lo0 UP,LOOPBACK,RUNNING,MULTICAST 127.0.0.1 netmask=255.?.?.? (5 bytes for 16 bytes sockaddr_in)>]
- *
- */
-
-static VALUE
-socket_s_getifaddrs(VALUE self)
-{
- return rsock_getifaddrs();
-}
-#else
-#define socket_s_getifaddrs rb_f_notimplement
-#endif
-
-void
-rsock_init_sockifaddr(void)
-{
-#ifdef HAVE_GETIFADDRS
- /*
- * Document-class: Socket::Ifaddr
- *
- * Socket::Ifaddr represents a result of getifaddrs() function.
- */
- rb_cSockIfaddr = rb_define_class_under(rb_cSocket, "Ifaddr", rb_cData);
- rb_define_method(rb_cSockIfaddr, "inspect", ifaddr_inspect, 0);
- rb_define_method(rb_cSockIfaddr, "name", ifaddr_name, 0);
- rb_define_method(rb_cSockIfaddr, "ifindex", ifaddr_ifindex, 0);
- rb_define_method(rb_cSockIfaddr, "flags", ifaddr_flags, 0);
- rb_define_method(rb_cSockIfaddr, "addr", ifaddr_addr, 0);
- rb_define_method(rb_cSockIfaddr, "netmask", ifaddr_netmask, 0);
- rb_define_method(rb_cSockIfaddr, "broadaddr", ifaddr_broadaddr, 0);
- rb_define_method(rb_cSockIfaddr, "dstaddr", ifaddr_dstaddr, 0);
-#endif
-
- rb_define_singleton_method(rb_cSocket, "getifaddrs", socket_s_getifaddrs, 0);
-}
diff --git a/ext/socket/init.c b/ext/socket/init.c
index 6d98a66d6e..696b62d82a 100644
--- a/ext/socket/init.c
+++ b/ext/socket/init.c
@@ -47,7 +47,7 @@ rsock_init_sock(VALUE sock, int fd)
struct stat sbuf;
if (fstat(fd, &sbuf) < 0)
- rb_sys_fail("fstat(2)");
+ rb_sys_fail(0);
rb_update_max_fd(fd);
if (!S_ISSOCK(sbuf.st_mode))
rb_raise(rb_eArgError, "not a socket file descriptor");
@@ -91,20 +91,15 @@ struct recvfrom_arg {
int fd, flags;
VALUE str;
socklen_t alen;
- union_sockaddr buf;
+ struct sockaddr_storage buf;
};
static VALUE
recvfrom_blocking(void *data)
{
struct recvfrom_arg *arg = data;
- socklen_t len0 = arg->alen;
- ssize_t ret;
- ret = recvfrom(arg->fd, RSTRING_PTR(arg->str), RSTRING_LEN(arg->str),
- arg->flags, &arg->buf.addr, &arg->alen);
- if (ret != -1 && len0 < arg->alen)
- arg->alen = len0;
- return (VALUE)ret;
+ return (VALUE)recvfrom(arg->fd, RSTRING_PTR(arg->str), RSTRING_LEN(arg->str),
+ arg->flags, (struct sockaddr*)&arg->buf, &arg->alen);
}
VALUE
@@ -132,7 +127,7 @@ rsock_s_recvfrom(VALUE sock, int argc, VALUE *argv, enum sock_recv_type from)
arg.str = str = rb_tainted_str_new(0, buflen);
klass = RBASIC(str)->klass;
- rb_obj_hide(str);
+ RBASIC(str)->klass = 0;
while (rb_io_check_closed(fptr),
rb_thread_wait_fd(arg.fd),
@@ -145,7 +140,7 @@ rsock_s_recvfrom(VALUE sock, int argc, VALUE *argv, enum sock_recv_type from)
}
}
- rb_obj_reveal(str, klass);
+ RBASIC(str)->klass = klass;
if (slen < RSTRING_LEN(str)) {
rb_str_set_len(str, slen);
}
@@ -160,16 +155,16 @@ rsock_s_recvfrom(VALUE sock, int argc, VALUE *argv, enum sock_recv_type from)
}
#endif
if (arg.alen && arg.alen != sizeof(arg.buf)) /* OSX doesn't return a from result for connection-oriented sockets */
- return rb_assoc_new(str, rsock_ipaddr(&arg.buf.addr, arg.alen, fptr->mode & FMODE_NOREVLOOKUP));
+ return rb_assoc_new(str, rsock_ipaddr((struct sockaddr*)&arg.buf, fptr->mode & FMODE_NOREVLOOKUP));
else
return rb_assoc_new(str, Qnil);
#ifdef HAVE_SYS_UN_H
case RECV_UNIX:
- return rb_assoc_new(str, rsock_unixaddr(&arg.buf.un, arg.alen));
+ return rb_assoc_new(str, rsock_unixaddr((struct sockaddr_un*)&arg.buf, arg.alen));
#endif
case RECV_SOCKET:
- return rb_assoc_new(str, rsock_io_socket_addrinfo(sock, &arg.buf.addr, arg.alen));
+ return rb_assoc_new(str, rsock_io_socket_addrinfo(sock, (struct sockaddr*)&arg.buf, arg.alen));
default:
rb_bug("rsock_s_recvfrom called with bad value");
}
@@ -180,14 +175,13 @@ rsock_s_recvfrom_nonblock(VALUE sock, int argc, VALUE *argv, enum sock_recv_type
{
rb_io_t *fptr;
VALUE str;
- union_sockaddr buf;
+ struct sockaddr_storage buf;
socklen_t alen = (socklen_t)sizeof buf;
VALUE len, flg;
long buflen;
long slen;
int fd, flags;
VALUE addr = Qnil;
- socklen_t len0;
rb_scan_args(argc, argv, "11", &len, &flg);
@@ -211,10 +205,7 @@ rsock_s_recvfrom_nonblock(VALUE sock, int argc, VALUE *argv, enum sock_recv_type
rb_io_check_closed(fptr);
rb_io_set_nonblock(fptr);
- len0 = alen;
- slen = recvfrom(fd, RSTRING_PTR(str), buflen, flags, &buf.addr, &alen);
- if (slen != -1 && len0 < alen)
- alen = len0;
+ slen = recvfrom(fd, RSTRING_PTR(str), buflen, flags, (struct sockaddr*)&buf, &alen);
if (slen < 0) {
switch (errno) {
@@ -222,7 +213,7 @@ rsock_s_recvfrom_nonblock(VALUE sock, int argc, VALUE *argv, enum sock_recv_type
#if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
case EWOULDBLOCK:
#endif
- rb_readwrite_sys_fail(RB_IO_WAIT_READABLE, "recvfrom(2) would block");
+ rb_mod_sys_fail(rb_mWaitReadable, "recvfrom(2) would block");
}
rb_sys_fail("recvfrom(2)");
}
@@ -236,11 +227,11 @@ rsock_s_recvfrom_nonblock(VALUE sock, int argc, VALUE *argv, enum sock_recv_type
case RECV_IP:
if (alen && alen != sizeof(buf)) /* connection-oriented socket may not return a from result */
- addr = rsock_ipaddr(&buf.addr, alen, fptr->mode & FMODE_NOREVLOOKUP);
+ addr = rsock_ipaddr((struct sockaddr*)&buf, fptr->mode & FMODE_NOREVLOOKUP);
break;
case RECV_SOCKET:
- addr = rsock_io_socket_addrinfo(sock, &buf.addr, alen);
+ addr = rsock_io_socket_addrinfo(sock, (struct sockaddr*)&buf, alen);
break;
default:
@@ -475,14 +466,14 @@ make_fd_nonblock(int fd)
#ifdef F_GETFL
flags = fcntl(fd, F_GETFL);
if (flags == -1) {
- rb_sys_fail("fnctl(2)");
+ rb_sys_fail(0);
}
#else
flags = 0;
#endif
flags |= O_NONBLOCK;
if (fcntl(fd, F_SETFL, flags) == -1) {
- rb_sys_fail("fnctl(2)");
+ rb_sys_fail(0);
}
}
@@ -490,34 +481,28 @@ static int
cloexec_accept(int socket, struct sockaddr *address, socklen_t *address_len)
{
int ret;
- socklen_t len0 = 0;
#ifdef HAVE_ACCEPT4
static int try_accept4 = 1;
-#endif
- if (address_len) len0 = *address_len;
-#ifdef HAVE_ACCEPT4
if (try_accept4) {
- int flags = 0;
-#ifdef SOCK_CLOEXEC
- flags |= SOCK_CLOEXEC;
-#endif
- ret = accept4(socket, address, address_len, flags);
+ ret = accept4(socket, address, address_len, SOCK_CLOEXEC);
/* accept4 is available since Linux 2.6.28, glibc 2.10. */
if (ret != -1) {
if (ret <= 2)
rb_maygvl_fd_fix_cloexec(ret);
- if (address_len && len0 < *address_len) *address_len = len0;
return ret;
}
- if (errno != ENOSYS) {
- return -1;
+ if (errno == ENOSYS) {
+ try_accept4 = 0;
+ ret = accept(socket, address, address_len);
}
- try_accept4 = 0;
}
-#endif
+ else {
+ ret = accept(socket, address, address_len);
+ }
+#else
ret = accept(socket, address, address_len);
+#endif
if (ret == -1) return -1;
- if (address_len && len0 < *address_len) *address_len = len0;
rb_maygvl_fd_fix_cloexec(ret);
return ret;
}
@@ -541,7 +526,7 @@ rsock_s_accept_nonblock(VALUE klass, rb_io_t *fptr, struct sockaddr *sockaddr, s
#if defined EPROTO
case EPROTO:
#endif
- rb_readwrite_sys_fail(RB_IO_WAIT_READABLE, "accept(2) would block");
+ rb_mod_sys_fail(rb_mWaitReadable, "accept(2) would block");
}
rb_sys_fail("accept(2)");
}
@@ -590,7 +575,7 @@ rsock_s_accept(VALUE klass, int fd, struct sockaddr *sockaddr, socklen_t *len)
retry = 0;
goto retry;
}
- rb_sys_fail("accept(2)");
+ rb_sys_fail(0);
}
rb_update_max_fd(fd2);
if (!klass) return INT2NUM(fd2);
@@ -600,14 +585,14 @@ rsock_s_accept(VALUE klass, int fd, struct sockaddr *sockaddr, socklen_t *len)
int
rsock_getfamily(int sockfd)
{
- union_sockaddr ss;
+ struct sockaddr_storage ss;
socklen_t sslen = (socklen_t)sizeof(ss);
- ss.addr.sa_family = AF_UNSPEC;
- if (getsockname(sockfd, &ss.addr, &sslen) < 0)
+ ss.ss_family = AF_UNSPEC;
+ if (getsockname(sockfd, (struct sockaddr*)&ss, &sslen) < 0)
return AF_UNSPEC;
- return ss.addr.sa_family;
+ return ss.ss_family;
}
void
@@ -627,6 +612,5 @@ rsock_init_socket_init()
rsock_init_sockopt();
rsock_init_ancdata();
rsock_init_addrinfo();
- rsock_init_sockifaddr();
rsock_init_socket_constants();
}
diff --git a/ext/socket/ipsocket.c b/ext/socket/ipsocket.c
index 7b198bd154..b1085cd70c 100644
--- a/ext/socket/ipsocket.c
+++ b/ext/socket/ipsocket.c
@@ -42,8 +42,8 @@ static VALUE
init_inetsock_internal(struct inetsock_arg *arg)
{
int type = arg->type;
- struct addrinfo *res, *lres;
- int fd, status = 0, local = 0;
+ struct addrinfo *res;
+ int fd, status = 0;
const char *syscall = 0;
arg->remote.res = rsock_addrinfo(arg->remote.host, arg->remote.serv, SOCK_STREAM,
@@ -62,20 +62,6 @@ init_inetsock_internal(struct inetsock_arg *arg)
if (res->ai_family == AF_INET6)
continue;
#endif
- lres = NULL;
- if (arg->local.res) {
- for (lres = arg->local.res; lres; lres = lres->ai_next) {
- if (lres->ai_family == res->ai_family)
- break;
- }
- if (!lres) {
- if (res->ai_next || status < 0)
- continue;
- /* Use a different family local address if no choice, this
- * will cause EAFNOSUPPORT. */
- lres = arg->local.res;
- }
- }
status = rsock_socket(res->ai_family,res->ai_socktype,res->ai_protocol);
syscall = "socket(2)";
fd = status;
@@ -93,9 +79,8 @@ init_inetsock_internal(struct inetsock_arg *arg)
syscall = "bind(2)";
}
else {
- if (lres) {
- status = bind(fd, lres->ai_addr, lres->ai_addrlen);
- local = status;
+ if (arg->local.res) {
+ status = bind(fd, arg->local.res->ai_addr, arg->local.res->ai_addrlen);
syscall = "bind(2)";
}
@@ -114,17 +99,7 @@ init_inetsock_internal(struct inetsock_arg *arg)
break;
}
if (status < 0) {
- VALUE host, port;
-
- if (local < 0) {
- host = arg->local.host;
- port = arg->local.serv;
- } else {
- host = arg->remote.host;
- port = arg->remote.serv;
- }
-
- rsock_sys_fail_host_port(syscall, host, port);
+ rb_sys_fail(syscall);
}
arg->fd = -1;
@@ -209,7 +184,7 @@ static VALUE
ip_addr(int argc, VALUE *argv, VALUE sock)
{
rb_io_t *fptr;
- union_sockaddr addr;
+ struct sockaddr_storage addr;
socklen_t len = (socklen_t)sizeof addr;
int norevlookup;
@@ -217,9 +192,9 @@ ip_addr(int argc, VALUE *argv, VALUE sock)
if (argc < 1 || !rsock_revlookup_flag(argv[0], &norevlookup))
norevlookup = fptr->mode & FMODE_NOREVLOOKUP;
- if (getsockname(fptr->fd, &addr.addr, &len) < 0)
+ if (getsockname(fptr->fd, (struct sockaddr*)&addr, &len) < 0)
rb_sys_fail("getsockname(2)");
- return rsock_ipaddr(&addr.addr, len, norevlookup);
+ return rsock_ipaddr((struct sockaddr*)&addr, norevlookup);
}
/*
@@ -250,7 +225,7 @@ static VALUE
ip_peeraddr(int argc, VALUE *argv, VALUE sock)
{
rb_io_t *fptr;
- union_sockaddr addr;
+ struct sockaddr_storage addr;
socklen_t len = (socklen_t)sizeof addr;
int norevlookup;
@@ -258,9 +233,9 @@ ip_peeraddr(int argc, VALUE *argv, VALUE sock)
if (argc < 1 || !rsock_revlookup_flag(argv[0], &norevlookup))
norevlookup = fptr->mode & FMODE_NOREVLOOKUP;
- if (getpeername(fptr->fd, &addr.addr, &len) < 0)
+ if (getpeername(fptr->fd, (struct sockaddr*)&addr, &len) < 0)
rb_sys_fail("getpeername(2)");
- return rsock_ipaddr(&addr.addr, len, norevlookup);
+ return rsock_ipaddr((struct sockaddr*)&addr, norevlookup);
}
/*
@@ -303,14 +278,14 @@ ip_recvfrom(int argc, VALUE *argv, VALUE sock)
static VALUE
ip_s_getaddress(VALUE obj, VALUE host)
{
- union_sockaddr addr;
+ struct sockaddr_storage addr;
struct addrinfo *res = rsock_addrinfo(host, Qnil, SOCK_STREAM, 0);
/* just take the first one */
memcpy(&addr, res->ai_addr, res->ai_addrlen);
freeaddrinfo(res);
- return rsock_make_ipaddr(&addr.addr, res->ai_addrlen);
+ return rsock_make_ipaddr((struct sockaddr*)&addr);
}
void
diff --git a/ext/socket/lib/socket.rb b/ext/socket/lib/socket.rb
index 2cd7aeadf9..10ab13b953 100644
--- a/ext/socket/lib/socket.rb
+++ b/ext/socket/lib/socket.rb
@@ -64,18 +64,13 @@ class Addrinfo
else
sock.connect(self)
end
- rescue Exception
- sock.close
- raise
- end
- if block_given?
- begin
+ if block_given?
yield sock
- ensure
- sock.close if !sock.closed?
+ else
+ sock
end
- else
- sock
+ ensure
+ sock.close if !sock.closed? && (block_given? || $!)
end
end
private :connect_internal
@@ -182,18 +177,13 @@ class Addrinfo
sock.ipv6only! if self.ipv6?
sock.setsockopt(:SOCKET, :REUSEADDR, 1)
sock.bind(self)
- rescue Exception
- sock.close
- raise
- end
- if block_given?
- begin
+ if block_given?
yield sock
- ensure
- sock.close if !sock.closed?
+ else
+ sock
end
- else
- sock
+ ensure
+ sock.close if !sock.closed? && (block_given? || $!)
end
end
@@ -205,18 +195,13 @@ class Addrinfo
sock.setsockopt(:SOCKET, :REUSEADDR, 1)
sock.bind(self)
sock.listen(backlog)
- rescue Exception
- sock.close
- raise
- end
- if block_given?
- begin
+ if block_given?
yield sock
- ensure
- sock.close if !sock.closed?
+ else
+ sock
end
- else
- sock
+ ensure
+ sock.close if !sock.closed? && (block_given? || $!)
end
end
@@ -303,6 +288,11 @@ class Socket < BasicSocket
# The value of the block is returned.
# The socket is closed when this method returns.
#
+ # The optional last argument _opts_ is options represented by a hash.
+ # _opts_ may have following options:
+ #
+ # [:timeout] specify the timeout in seconds.
+ #
# If no block is given, the socket is returned.
#
# Socket.tcp("www.ruby-lang.org", 80) {|sock|
@@ -363,9 +353,8 @@ class Socket < BasicSocket
# :stopdoc:
def self.ip_sockets_port0(ai_list, reuseaddr)
- sockets = []
begin
- sockets.clear
+ sockets = []
port = nil
ai_list.each {|ai|
begin
@@ -386,13 +375,14 @@ class Socket < BasicSocket
end
}
rescue Errno::EADDRINUSE
- sockets.each {|s| s.close }
+ sockets.each {|s|
+ s.close
+ }
retry
- rescue Exception
- sockets.each {|s| s.close }
- raise
end
sockets
+ ensure
+ sockets.each {|s| s.close if !s.closed? } if $!
end
class << self
private :ip_sockets_port0
@@ -401,15 +391,12 @@ class Socket < BasicSocket
def self.tcp_server_sockets_port0(host)
ai_list = Addrinfo.getaddrinfo(host, 0, nil, :STREAM, nil, Socket::AI_PASSIVE)
sockets = ip_sockets_port0(ai_list, true)
- begin
- sockets.each {|s|
- s.listen(Socket::SOMAXCONN)
- }
- rescue Exception
- sockets.each {|s| s.close }
- raise
- end
+ sockets.each {|s|
+ s.listen(Socket::SOMAXCONN)
+ }
sockets
+ ensure
+ sockets.each {|s| s.close if !s.closed? } if $! && sockets
end
class << self
private :tcp_server_sockets_port0
@@ -426,7 +413,7 @@ class Socket < BasicSocket
# The value of the block is returned.
# The socket is closed when this method returns.
#
- # If _port_ is 0, actual port number is chosen dynamically.
+ # If _port_ is 0, actual port number is choosen dynamically.
# However all sockets in the result has same port number.
#
# # tcp_server_sockets returns two sockets.
@@ -438,7 +425,7 @@ class Socket < BasicSocket
# #=> #<Addrinfo: [::]:1296 TCP>
# # #<Addrinfo: 0.0.0.0:1296 TCP>
#
- # # IPv6 and IPv4 socket has same port number, 53114, even if it is chosen dynamically.
+ # # IPv6 and IPv4 socket has same port number, 53114, even if it is choosen dynamically.
# sockets = Socket.tcp_server_sockets(0)
# sockets.each {|s| p s.local_address }
# #=> #<Addrinfo: [::]:53114 TCP>
@@ -453,9 +440,9 @@ class Socket < BasicSocket
if port == 0
sockets = tcp_server_sockets_port0(host)
else
- last_error = nil
- sockets = []
begin
+ last_error = nil
+ sockets = []
Addrinfo.foreach(host, port, nil, :STREAM, nil, Socket::AI_PASSIVE) {|ai|
begin
s = ai.listen
@@ -468,9 +455,8 @@ class Socket < BasicSocket
if sockets.empty?
raise last_error
end
- rescue Exception
- sockets.each {|s| s.close }
- raise
+ ensure
+ sockets.each {|s| s.close if !s.closed? } if $!
end
end
if block_given?
@@ -569,8 +555,8 @@ class Socket < BasicSocket
# The value of the block is returned.
# The sockets are closed when this method returns.
#
- # If _port_ is zero, some port is chosen.
- # But the chosen port is used for the all sockets.
+ # If _port_ is zero, some port is choosen.
+ # But the choosen port is used for the all sockets.
#
# # UDP/IP echo server
# Socket.udp_server_sockets(0) {|sockets|
@@ -732,9 +718,9 @@ class Socket < BasicSocket
# UDP/IP address information used by Socket.udp_server_loop.
class UDPSource
- # +remote_address+ is an Addrinfo object.
+ # +remote_adress+ is an Addrinfo object.
#
- # +local_address+ is an Addrinfo object.
+ # +local_adress+ is an Addrinfo object.
#
# +reply_proc+ is a Proc used to send reply back to the source.
def initialize(remote_address, local_address, &reply_proc)
@@ -805,14 +791,12 @@ class Socket < BasicSocket
# }
#
def self.unix_server_socket(path)
- if !unix_socket_abstract_name?(path)
- begin
- st = File.lstat(path)
- rescue Errno::ENOENT
- end
- if st && st.socket? && st.owned?
- File.unlink path
- end
+ begin
+ st = File.lstat(path)
+ rescue Errno::ENOENT
+ end
+ if st && st.socket? && st.owned?
+ File.unlink path
end
s = Addrinfo.unix(path).listen
if block_given?
@@ -820,23 +804,13 @@ class Socket < BasicSocket
yield s
ensure
s.close if !s.closed?
- if !unix_socket_abstract_name?(path)
- File.unlink path
- end
+ File.unlink path
end
else
s
end
end
- class << self
- private
-
- def unix_socket_abstract_name?(path)
- /linux/ =~ RUBY_PLATFORM && /\A(\0|\z)/ =~ path
- end
- end
-
# creates a UNIX socket server on _path_.
# It calls the block for each socket accepted.
#
diff --git a/ext/socket/mkconstants.rb b/ext/socket/mkconstants.rb
index d12b2a24e3..3b63c39eff 100644
--- a/ext/socket/mkconstants.rb
+++ b/ext/socket/mkconstants.rb
@@ -56,12 +56,17 @@ DEFS = h.to_a
def each_const
DEFS.each {|name, default_value|
+ if name =~ /\AINADDR_/
+ make_value = "UINT2NUM"
+ else
+ make_value = "INT2NUM"
+ end
guard = nil
if /\A(AF_INET6|PF_INET6|IPV6_.*)\z/ =~ name
- # IPv6 is not supported although AF_INET6 is defined on mingw
+ # IPv6 is not supported although AF_INET6 is defined on bcc32/mingw
guard = "defined(INET6)"
end
- yield guard, name, default_value
+ yield guard, make_value, name, default_value
}
end
@@ -73,7 +78,7 @@ def each_name(pat)
end
ERB.new(<<'EOS', nil, '%').def_method(Object, "gen_const_decls")
-% each_const {|guard, name, default_value|
+% each_const {|guard, make_value, name, default_value|
#if !defined(<%=name%>)
# if defined(HAVE_CONST_<%=name.upcase%>)
# define <%=name%> <%=name%>
@@ -86,23 +91,23 @@ ERB.new(<<'EOS', nil, '%').def_method(Object, "gen_const_decls")
% }
EOS
-ERB.new(<<'EOS', nil, '%').def_method(Object, "gen_const_defs_in_guard(name, default_value)")
+ERB.new(<<'EOS', nil, '%').def_method(Object, "gen_const_defs_in_guard(make_value, name, default_value)")
#if defined(<%=name%>)
/* <%= COMMENTS[name] %> */
- rb_define_const(rb_cSocket, <%=c_str name%>, INTEGER2NUM(<%=name%>));
+ rb_define_const(rb_cSocket, <%=c_str name%>, <%=make_value%>(<%=name%>));
/* <%= COMMENTS[name] %> */
- rb_define_const(rb_mSockConst, <%=c_str name%>, INTEGER2NUM(<%=name%>));
+ rb_define_const(rb_mSockConst, <%=c_str name%>, <%=make_value%>(<%=name%>));
#endif
EOS
ERB.new(<<'EOS', nil, '%').def_method(Object, "gen_const_defs")
-% each_const {|guard, name, default_value|
+% each_const {|guard, make_value, name, default_value|
% if guard
#if <%=guard%>
-<%= gen_const_defs_in_guard(name, default_value).chomp %>
+<%= gen_const_defs_in_guard(make_value, name, default_value).chomp %>
#endif
% else
-<%= gen_const_defs_in_guard(name, default_value).chomp %>
+<%= gen_const_defs_in_guard(make_value, name, default_value).chomp %>
% end
% }
EOS
@@ -279,18 +284,6 @@ result = ERB.new(<<'EOS', nil, '%').result(binding)
<%= INTERN_DEFS.map {|vardef, gen_hash, decl, func| vardef }.join("\n") %>
-#ifdef HAVE_LONG_LONG
-#define INTEGER2NUM(n) \
- (FIXNUM_MAX < (n) ? ULL2NUM(n) : \
- FIXNUM_MIN > (LONG_LONG)(n) ? LL2NUM(n) : \
- LONG2FIX(n))
-#else
-#define INTEGER2NUM(n) \
- (FIXNUM_MAX < (n) ? ULONG2NUM(n) : \
- FIXNUM_MIN > (long)(n) ? LONG2NUM(n) : \
- LONG2FIX(n))
-#endif
-
static void
init_constants(void)
{
@@ -453,7 +446,6 @@ MSG_RST
MSG_ERRQUEUE nil Fetch message from error queue
MSG_NOSIGNAL nil Do not generate SIGPIPE
MSG_MORE nil Sender will send more
-MSG_FASTOPEN nil Reduce step of the handshake process
SOL_SOCKET nil Socket-level options
SOL_IP nil IP socket options
@@ -623,7 +615,6 @@ TCP_NOPUSH nil Don't push the last block of write
TCP_QUICKACK nil Enable quickack mode
TCP_SYNCNT nil Number of SYN retransmits before a connection is dropped
TCP_WINDOW_CLAMP nil Clamp the size of the advertised window
-TCP_FASTOPEN nil Reduce step of the handshake process
UDP_CORK nil Don't send partial frames
@@ -712,62 +703,3 @@ SCM_UCRED nil User credentials
LOCAL_PEERCRED nil Retrieve peer credentials
LOCAL_CREDS nil Pass credentials to receiver
LOCAL_CONNWAIT nil Connect blocks until accepted
-
-IFF_802_1Q_VLAN nil 802.1Q VLAN device
-IFF_ALLMULTI nil receive all multicast packets
-IFF_ALTPHYS nil use alternate physical connection
-IFF_AUTOMEDIA nil auto media select active
-IFF_BONDING nil bonding master or slave
-IFF_BRIDGE_PORT nil device used as bridge port
-IFF_BROADCAST nil broadcast address valid
-IFF_CANTCONFIG nil unconfigurable using ioctl(2)
-IFF_DEBUG nil turn on debugging
-IFF_DISABLE_NETPOLL nil disable netpoll at run-time
-IFF_DONT_BRIDGE nil disallow bridging this ether dev
-IFF_DORMANT nil driver signals dormant
-IFF_DRV_OACTIVE nil tx hardware queue is full
-IFF_DRV_RUNNING nil resources allocated
-IFF_DYING nil interface is winding down
-IFF_DYNAMIC nil dialup device with changing addresses
-IFF_EBRIDGE nil ethernet bridging device
-IFF_ECHO nil echo sent packets
-IFF_ISATAP nil ISATAP interface (RFC4214)
-IFF_LINK0 nil per link layer defined bit 0
-IFF_LINK1 nil per link layer defined bit 1
-IFF_LINK2 nil per link layer defined bit 2
-IFF_LIVE_ADDR_CHANGE nil hardware address change when it's running
-IFF_LOOPBACK nil loopback net
-IFF_LOWER_UP nil driver signals L1 up
-IFF_MACVLAN_PORT nil device used as macvlan port
-IFF_MASTER nil master of a load balancer
-IFF_MASTER_8023AD nil bonding master, 802.3ad.
-IFF_MASTER_ALB nil bonding master, balance-alb.
-IFF_MASTER_ARPMON nil bonding master, ARP mon in use
-IFF_MONITOR nil user-requested monitor mode
-IFF_MULTICAST nil supports multicast
-IFF_NOARP nil no address resolution protocol
-IFF_NOTRAILERS nil avoid use of trailers
-IFF_OACTIVE nil transmission in progress
-IFF_OVS_DATAPATH nil device used as Open vSwitch datapath port
-IFF_POINTOPOINT nil point-to-point link
-IFF_PORTSEL nil can set media type
-IFF_PPROMISC nil user-requested promisc mode
-IFF_PROMISC nil receive all packets
-IFF_RENAMING nil interface is being renamed
-IFF_ROUTE nil routing entry installed
-IFF_RUNNING nil resources allocated
-IFF_SIMPLEX nil can't hear own transmissions
-IFF_SLAVE nil slave of a load balancer
-IFF_SLAVE_INACTIVE nil bonding slave not the curr. active
-IFF_SLAVE_NEEDARP nil need ARPs for validation
-IFF_SMART nil interface manages own routes
-IFF_STATICARP nil static ARP
-IFF_SUPP_NOFCS nil sending custom FCS
-IFF_TEAM_PORT nil used as team port
-IFF_TX_SKB_SHARING nil sharing skbs on transmit
-IFF_UNICAST_FLT nil unicast filtering
-IFF_UP nil interface is up
-IFF_WAN_HDLC nil WAN HDLC device
-IFF_XMIT_DST_RELEASE nil dev_hard_start_xmit() is allowed to release skb->dst
-IFF_VOLATILE nil volatile flags
-IFF_CANTCHANGE nil flags not changeable
diff --git a/ext/socket/option.c b/ext/socket/option.c
index 3e32230aab..e3e59cf0c5 100644
--- a/ext/socket/option.c
+++ b/ext/socket/option.c
@@ -21,7 +21,7 @@ optname_to_sym(int level, int optname)
return constant_to_sym(optname, rsock_intern_so_optname);
case IPPROTO_IP:
return constant_to_sym(optname, rsock_intern_ip_optname);
-#ifdef IPPROTO_IPV6
+#ifdef INET6
case IPPROTO_IPV6:
return constant_to_sym(optname, rsock_intern_ipv6_optname);
#endif
@@ -127,7 +127,6 @@ sockopt_optname_m(VALUE self)
/*
* call-seq:
* sockopt.data => string
- * sockopt.to_s => string
*
* returns the socket option data as a string.
*
@@ -144,50 +143,6 @@ sockopt_data(VALUE self)
/*
* call-seq:
- * Socket::Option.byte(family, level, optname, integer) => sockopt
- *
- * Creates a new Socket::Option object which contains a byte as data.
- *
- * The size and endian is dependent on the platform.
- *
- * p Socket::Option.byte(:INET, :SOCKET, :KEEPALIVE, 1)
- * #=> #<Socket::Option: INET SOCKET KEEPALIVE 1>
- */
-static VALUE
-sockopt_s_byte(VALUE klass, VALUE vfamily, VALUE vlevel, VALUE voptname, VALUE vint)
-{
- int family = rsock_family_arg(vfamily);
- int level = rsock_level_arg(family, vlevel);
- int optname = rsock_optname_arg(family, level, voptname);
- unsigned char i = (unsigned char)NUM2CHR(vint);
- return rsock_sockopt_new(family, level, optname, rb_str_new((char*)&i, sizeof(i)));
-}
-
-/*
- * call-seq:
- * sockopt.byte => integer
- *
- * Returns the data in _sockopt_ as an byte.
- *
- * The size and endian is dependent on the platform.
- *
- * sockopt = Socket::Option.byte(:INET, :SOCKET, :KEEPALIVE, 1)
- * p sockopt.byte => 1
- */
-static VALUE
-sockopt_byte(VALUE self)
-{
- unsigned char i;
- VALUE data = sockopt_data(self);
- StringValue(data);
- if (RSTRING_LEN(data) != sizeof(i))
- rb_raise(rb_eTypeError, "size differ. expected as sizeof(int)=%d but %ld",
- (int)sizeof(i), (long)RSTRING_LEN(data));
- return CHR2FIX(*RSTRING_PTR(data));
-}
-
-/*
- * call-seq:
* Socket::Option.int(family, level, optname, integer) => sockopt
*
* Creates a new Socket::Option object which contains an int as data.
@@ -338,135 +293,6 @@ sockopt_linger(VALUE self)
return rb_assoc_new(vonoff, vsecs);
}
-/*
- * call-seq:
- * Socket::Option.ipv4_multicast_loop(integer) => sockopt
- *
- * Creates a new Socket::Option object for IP_MULTICAST_LOOP.
- *
- * The size is dependent on the platform.
- *
- * sockopt = Socket::Option.int(:INET, :IPPROTO_IP, :IP_MULTICAST_LOOP, 1)
- * p sockopt.int => 1
- *
- * p Socket::Option.ipv4_multicast_loop(10)
- * #=> #<Socket::Option: INET IP MULTICAST_LOOP 10>
- *
- */
-static VALUE
-sockopt_s_ipv4_multicast_loop(VALUE klass, VALUE value)
-{
-#if defined(IPPROTO_IP) && defined(IP_MULTICAST_LOOP)
-# ifdef __NetBSD__
- unsigned char i = NUM2CHR(rb_to_int(value));
-# else
- int i = NUM2INT(rb_to_int(value));
-# endif
- return rsock_sockopt_new(AF_INET, IPPROTO_IP, IP_MULTICAST_LOOP,
- rb_str_new((char*)&i, sizeof(i)));
-#else
-# error IPPROTO_IP or IP_MULTICAST_LOOP is not implemented
-#endif
-}
-
-/*
- * call-seq:
- * sockopt.ipv4_multicast_loop => integer
- *
- * Returns the ipv4_multicast_loop data in _sockopt_ as a integer.
- *
- * sockopt = Socket::Option.ipv4_multicast_loop(10)
- * p sockopt.ipv4_multicast_loop => 10
- */
-static VALUE
-sockopt_ipv4_multicast_loop(VALUE self)
-{
- int family = NUM2INT(sockopt_family_m(self));
- int level = sockopt_level(self);
- int optname = sockopt_optname(self);
-
-#if defined(IPPROTO_IP) && defined(IP_MULTICAST_LOOP)
- if (family == AF_INET && level == IPPROTO_IP && optname == IP_MULTICAST_LOOP) {
-# ifdef __NetBSD__
- return sockopt_byte(self);
-# else
- return sockopt_int(self);
-# endif
- }
-#endif
- rb_raise(rb_eTypeError, "ipv4_multicast_loop socket option expected");
- UNREACHABLE;
-}
-
-#ifdef __NetBSD__
-# define inspect_ipv4_multicast_loop(a,b,c,d) inspect_byte(a,b,c,d)
-#else
-# define inspect_ipv4_multicast_loop(a,b,c,d) inspect_int(a,b,c,d)
-#endif
-
-/*
- * call-seq:
- * Socket::Option.ipv4_multicast_ttl(integer) => sockopt
- *
- * Creates a new Socket::Option object for IP_MULTICAST_TTL.
- *
- * The size is dependent on the platform.
- *
- * p Socket::Option.ipv4_multicast_ttl(10)
- * #=> #<Socket::Option: INET IP MULTICAST_TTL 10>
- *
- */
-static VALUE
-sockopt_s_ipv4_multicast_ttl(VALUE klass, VALUE value)
-{
-#if defined(IPPROTO_IP) && defined(IP_MULTICAST_TTL)
-# ifdef __NetBSD__
- unsigned char i = NUM2CHR(rb_to_int(value));
-# else
- int i = NUM2INT(rb_to_int(value));
-# endif
- return rsock_sockopt_new(AF_INET, IPPROTO_IP, IP_MULTICAST_TTL,
- rb_str_new((char*)&i, sizeof(i)));
-#else
-# error IPPROTO_IP or IP_MULTICAST_TTL is not implemented
-#endif
-}
-
-/*
- * call-seq:
- * sockopt.ipv4_multicast_ttl => integer
- *
- * Returns the ipv4_multicast_ttl data in _sockopt_ as a integer.
- *
- * sockopt = Socket::Option.ipv4_multicast_ttl(10)
- * p sockopt.ipv4_multicast_ttl => 10
- */
-static VALUE
-sockopt_ipv4_multicast_ttl(VALUE self)
-{
- int family = NUM2INT(sockopt_family_m(self));
- int level = sockopt_level(self);
- int optname = sockopt_optname(self);
-
-#if defined(IPPROTO_IP) && defined(IP_MULTICAST_TTL)
- if (family == AF_INET && level == IPPROTO_IP && optname == IP_MULTICAST_TTL) {
-# ifdef __NetBSD__
- return sockopt_byte(self);
-# else
- return sockopt_int(self);
-# endif
- }
-#endif
- rb_raise(rb_eTypeError, "ipv4_multicast_ttl socket option expected");
- UNREACHABLE;
-}
-
-#ifdef __NetBSD__
-# define inspect_ipv4_multicast_ttl(a,b,c,d) inspect_byte(a,b,c,d)
-#else
-# define inspect_ipv4_multicast_ttl(a,b,c,d) inspect_int(a,b,c,d)
-#endif
-
static int
inspect_int(int level, int optname, VALUE data, VALUE ret)
{
@@ -481,20 +307,6 @@ inspect_int(int level, int optname, VALUE data, VALUE ret)
}
}
-#ifdef __NetBSD__
-static int
-inspect_byte(int level, int optname, VALUE data, VALUE ret)
-{
- if (RSTRING_LEN(data) == sizeof(unsigned char)) {
- rb_str_catf(ret, " %d", (unsigned char)*RSTRING_PTR(data));
- return 1;
- }
- else {
- return 0;
- }
-}
-#endif
-
static int
inspect_errno(int level, int optname, VALUE data, VALUE ret)
{
@@ -992,12 +804,6 @@ sockopt_inspect(VALUE self)
# if defined(IP_DROP_MEMBERSHIP) /* 4.4BSD, GNU/Linux */
case IP_DROP_MEMBERSHIP: inspected = inspect_ipv4_add_drop_membership(level, optname, data, ret); break;
# endif
-# if defined(IP_MULTICAST_LOOP) /* 4.4BSD, GNU/Linux */
- case IP_MULTICAST_LOOP: inspected = inspect_ipv4_multicast_loop(level, optname, data, ret); break;
-# endif
-# if defined(IP_MULTICAST_TTL) /* 4.4BSD, GNU/Linux */
- case IP_MULTICAST_TTL: inspected = inspect_ipv4_multicast_ttl(level, optname, data, ret); break;
-# endif
}
break;
# endif
@@ -1105,21 +911,12 @@ rsock_init_sockopt(void)
rb_define_singleton_method(rb_cSockOpt, "int", sockopt_s_int, 4);
rb_define_method(rb_cSockOpt, "int", sockopt_int, 0);
- rb_define_singleton_method(rb_cSockOpt, "byte", sockopt_s_byte, 4);
- rb_define_method(rb_cSockOpt, "byte", sockopt_byte, 0);
-
rb_define_singleton_method(rb_cSockOpt, "bool", sockopt_s_bool, 4);
rb_define_method(rb_cSockOpt, "bool", sockopt_bool, 0);
rb_define_singleton_method(rb_cSockOpt, "linger", sockopt_s_linger, 2);
rb_define_method(rb_cSockOpt, "linger", sockopt_linger, 0);
- rb_define_singleton_method(rb_cSockOpt, "ipv4_multicast_ttl", sockopt_s_ipv4_multicast_ttl, 1);
- rb_define_method(rb_cSockOpt, "ipv4_multicast_ttl", sockopt_ipv4_multicast_ttl, 0);
-
- rb_define_singleton_method(rb_cSockOpt, "ipv4_multicast_loop", sockopt_s_ipv4_multicast_loop, 1);
- rb_define_method(rb_cSockOpt, "ipv4_multicast_loop", sockopt_ipv4_multicast_loop, 0);
-
rb_define_method(rb_cSockOpt, "unpack", sockopt_unpack, 1);
rb_define_method(rb_cSockOpt, "to_s", sockopt_data, 0); /* compatibility for ruby before 1.9.2 */
diff --git a/ext/socket/raddrinfo.c b/ext/socket/raddrinfo.c
index 109fcccae8..6a5129efa8 100644
--- a/ext/socket/raddrinfo.c
+++ b/ext/socket/raddrinfo.c
@@ -157,17 +157,9 @@ struct getaddrinfo_arg
static void *
nogvl_getaddrinfo(void *arg)
{
- int ret;
struct getaddrinfo_arg *ptr = arg;
- ret = getaddrinfo(ptr->node, ptr->service, ptr->hints, ptr->res);
-#ifdef __linux__
- /* On Linux (mainly Ubuntu 13.04) /etc/nsswitch.conf has mdns4 and
- * it cause getaddrinfo to return EAI_SYSTEM/ENOENT. [ruby-list:49420]
- */
- if (ret == EAI_SYSTEM && errno == ENOENT)
- ret = EAI_NONAME;
-#endif
- return (void *)(VALUE)ret;
+ return (void *)(VALUE)getaddrinfo(ptr->node, ptr->service,
+ ptr->hints, ptr->res);
}
#endif
@@ -237,33 +229,35 @@ rb_getnameinfo(const struct sockaddr *sa, socklen_t salen,
}
static void
-make_ipaddr0(struct sockaddr *addr, socklen_t addrlen, char *buf, size_t buflen)
+make_ipaddr0(struct sockaddr *addr, char *buf, size_t len)
{
int error;
- error = rb_getnameinfo(addr, addrlen, buf, buflen, NULL, 0, NI_NUMERICHOST);
+ error = rb_getnameinfo(addr, SA_LEN(addr), buf, len, NULL, 0, NI_NUMERICHOST);
if (error) {
rsock_raise_socket_error("getnameinfo", error);
}
}
VALUE
-rsock_make_ipaddr(struct sockaddr *addr, socklen_t addrlen)
+rsock_make_ipaddr(struct sockaddr *addr)
{
char hbuf[1024];
- make_ipaddr0(addr, addrlen, hbuf, sizeof(hbuf));
+ make_ipaddr0(addr, hbuf, sizeof(hbuf));
return rb_str_new2(hbuf);
}
static void
-make_inetaddr(unsigned int host, char *buf, size_t buflen)
+make_inetaddr(unsigned int host, char *buf, size_t len)
{
struct sockaddr_in sin;
- INIT_SOCKADDR_IN(&sin, sizeof(sin));
+ MEMZERO(&sin, struct sockaddr_in, 1);
+ sin.sin_family = AF_INET;
+ SET_SIN_LEN(&sin, sizeof(sin));
sin.sin_addr.s_addr = host;
- make_ipaddr0((struct sockaddr*)&sin, sizeof(sin), buf, buflen);
+ make_ipaddr0((struct sockaddr*)&sin, buf, len);
}
static int
@@ -282,7 +276,7 @@ str_is_number(const char *p)
}
static char*
-host_str(VALUE host, char *hbuf, size_t hbuflen, int *flags_ptr)
+host_str(VALUE host, char *hbuf, size_t len, int *flags_ptr)
{
if (NIL_P(host)) {
return NULL;
@@ -290,7 +284,7 @@ host_str(VALUE host, char *hbuf, size_t hbuflen, int *flags_ptr)
else if (rb_obj_is_kind_of(host, rb_cInteger)) {
unsigned int i = NUM2UINT(host);
- make_inetaddr(htonl(i), hbuf, hbuflen);
+ make_inetaddr(htonl(i), hbuf, len);
if (flags_ptr) *flags_ptr |= AI_NUMERICHOST;
return hbuf;
}
@@ -300,14 +294,14 @@ host_str(VALUE host, char *hbuf, size_t hbuflen, int *flags_ptr)
SafeStringValue(host);
name = RSTRING_PTR(host);
if (!name || *name == 0 || (name[0] == '<' && strcmp(name, "<any>") == 0)) {
- make_inetaddr(INADDR_ANY, hbuf, hbuflen);
+ make_inetaddr(INADDR_ANY, hbuf, len);
if (flags_ptr) *flags_ptr |= AI_NUMERICHOST;
}
else if (name[0] == '<' && strcmp(name, "<broadcast>") == 0) {
- make_inetaddr(INADDR_BROADCAST, hbuf, hbuflen);
+ make_inetaddr(INADDR_BROADCAST, hbuf, len);
if (flags_ptr) *flags_ptr |= AI_NUMERICHOST;
}
- else if (strlen(name) >= hbuflen) {
+ else if (strlen(name) >= len) {
rb_raise(rb_eArgError, "hostname too long (%"PRIuSIZE")",
strlen(name));
}
@@ -319,13 +313,13 @@ host_str(VALUE host, char *hbuf, size_t hbuflen, int *flags_ptr)
}
static char*
-port_str(VALUE port, char *pbuf, size_t pbuflen, int *flags_ptr)
+port_str(VALUE port, char *pbuf, size_t len, int *flags_ptr)
{
if (NIL_P(port)) {
return 0;
}
else if (FIXNUM_P(port)) {
- snprintf(pbuf, pbuflen, "%ld", FIX2LONG(port));
+ snprintf(pbuf, len, "%ld", FIX2LONG(port));
#ifdef AI_NUMERICSERV
if (flags_ptr) *flags_ptr |= AI_NUMERICSERV;
#endif
@@ -336,7 +330,7 @@ port_str(VALUE port, char *pbuf, size_t pbuflen, int *flags_ptr)
SafeStringValue(port);
serv = RSTRING_PTR(port);
- if (strlen(serv) >= pbuflen) {
+ if (strlen(serv) >= len) {
rb_raise(rb_eArgError, "service name too long (%"PRIuSIZE")",
strlen(serv));
}
@@ -386,7 +380,7 @@ rsock_addrinfo(VALUE host, VALUE port, int socktype, int flags)
}
VALUE
-rsock_ipaddr(struct sockaddr *sockaddr, socklen_t sockaddrlen, int norevlookup)
+rsock_ipaddr(struct sockaddr *sockaddr, int norevlookup)
{
VALUE family, port, addr1, addr2;
VALUE ary;
@@ -405,13 +399,13 @@ rsock_ipaddr(struct sockaddr *sockaddr, socklen_t sockaddrlen, int norevlookup)
addr1 = Qnil;
if (!norevlookup) {
- error = rb_getnameinfo(sockaddr, sockaddrlen, hbuf, sizeof(hbuf),
+ error = rb_getnameinfo(sockaddr, SA_LEN(sockaddr), hbuf, sizeof(hbuf),
NULL, 0, 0);
if (! error) {
addr1 = rb_str_new2(hbuf);
}
}
- error = rb_getnameinfo(sockaddr, sockaddrlen, hbuf, sizeof(hbuf),
+ error = rb_getnameinfo(sockaddr, SA_LEN(sockaddr), hbuf, sizeof(hbuf),
pbuf, sizeof(pbuf), NI_NUMERICHOST | NI_NUMERICSERV);
if (error) {
rsock_raise_socket_error("getnameinfo", error);
@@ -447,35 +441,12 @@ rsock_unixaddr(struct sockaddr_un *sockaddr, socklen_t len)
return rb_assoc_new(rb_str_new2("AF_UNIX"),
rsock_unixpath_str(sockaddr, len));
}
-
-socklen_t
-rsock_unix_sockaddr_len(VALUE path)
-{
-#ifdef __linux__
- if (RSTRING_LEN(path) == 0) {
- /* autobind; see unix(7) for details. */
- return (socklen_t) sizeof(sa_family_t);
- }
- else if (RSTRING_PTR(path)[0] == '\0') {
- /* abstract namespace; see unix(7) for details. */
- if (SOCKLEN_MAX - offsetof(struct sockaddr_un, sun_path) < (size_t)RSTRING_LEN(path))
- rb_raise(rb_eArgError, "Linux abstract socket too long");
- return (socklen_t) offsetof(struct sockaddr_un, sun_path) +
- RSTRING_SOCKLEN(path);
- }
- else {
-#endif
- return (socklen_t) sizeof(struct sockaddr_un);
-#ifdef __linux__
- }
-#endif
-}
#endif
struct hostent_arg {
VALUE host;
struct addrinfo* addr;
- VALUE (*ipaddr)(struct sockaddr*, socklen_t);
+ VALUE (*ipaddr)(struct sockaddr*, size_t);
};
static VALUE
@@ -483,7 +454,7 @@ make_hostent_internal(struct hostent_arg *arg)
{
VALUE host = arg->host;
struct addrinfo* addr = arg->addr;
- VALUE (*ipaddr)(struct sockaddr*, socklen_t) = arg->ipaddr;
+ VALUE (*ipaddr)(struct sockaddr*, size_t) = arg->ipaddr;
struct addrinfo *ai;
struct hostent *h;
@@ -529,7 +500,7 @@ rsock_freeaddrinfo(struct addrinfo *addr)
}
VALUE
-rsock_make_hostent(VALUE host, struct addrinfo *addr, VALUE (*ipaddr)(struct sockaddr *, socklen_t))
+rsock_make_hostent(VALUE host, struct addrinfo *addr, VALUE (*ipaddr)(struct sockaddr *, size_t))
{
struct hostent_arg arg;
@@ -547,7 +518,7 @@ typedef struct {
int socktype;
int protocol;
socklen_t sockaddr_len;
- union_sockaddr addr;
+ struct sockaddr_storage addr;
} rb_addrinfo_t;
static void
@@ -798,7 +769,6 @@ static void
init_unix_addrinfo(rb_addrinfo_t *rai, VALUE path, int socktype)
{
struct sockaddr_un un;
- socklen_t len;
StringValue(path);
@@ -807,11 +777,12 @@ init_unix_addrinfo(rb_addrinfo_t *rai, VALUE path, int socktype)
"too long unix socket path (%"PRIuSIZE" bytes given but %"PRIuSIZE" bytes max)",
(size_t)RSTRING_LEN(path), sizeof(un.sun_path));
- INIT_SOCKADDR_UN(&un, sizeof(struct sockaddr_un));
+ MEMZERO(&un, struct sockaddr_un, 1);
+
+ un.sun_family = AF_UNIX;
memcpy((void*)&un.sun_path, RSTRING_PTR(path), RSTRING_LEN(path));
- len = rsock_unix_sockaddr_len(path);
- init_addrinfo(rai, (struct sockaddr *)&un, len,
+ init_addrinfo(rai, (struct sockaddr *)&un, (socklen_t)sizeof(un),
PF_UNIX, socktype, 0, Qnil, Qnil);
}
#endif
@@ -933,7 +904,7 @@ addrinfo_initialize(int argc, VALUE *argv, VALUE self)
else {
StringValue(sockaddr_arg);
sockaddr_ptr = (struct sockaddr *)RSTRING_PTR(sockaddr_arg);
- sockaddr_len = RSTRING_SOCKLEN(sockaddr_arg);
+ sockaddr_len = RSTRING_LENINT(sockaddr_arg);
init_addrinfo(rai, sockaddr_ptr, sockaddr_len,
i_pfamily, i_socktype, i_protocol,
canonname, inspectname);
@@ -954,69 +925,41 @@ get_afamily(struct sockaddr *addr, socklen_t len)
static int
ai_get_afamily(rb_addrinfo_t *rai)
{
- return get_afamily(&rai->addr.addr, rai->sockaddr_len);
+ return get_afamily((struct sockaddr *)&rai->addr, rai->sockaddr_len);
}
static VALUE
inspect_sockaddr(VALUE addrinfo, VALUE ret)
{
rb_addrinfo_t *rai = get_addrinfo(addrinfo);
- union_sockaddr *sockaddr = &rai->addr;
- socklen_t socklen = rai->sockaddr_len;
- return rsock_inspect_sockaddr((struct sockaddr *)sockaddr, socklen, ret);
-}
-VALUE
-rsock_inspect_sockaddr(struct sockaddr *sockaddr_arg, socklen_t socklen, VALUE ret)
-{
- union_sockaddr *sockaddr = (union_sockaddr *)sockaddr_arg;
- if (socklen == 0) {
+ if (rai->sockaddr_len == 0) {
rb_str_cat2(ret, "empty-sockaddr");
}
- else if ((long)socklen < ((char*)&sockaddr->addr.sa_family + sizeof(sockaddr->addr.sa_family)) - (char*)sockaddr)
+ else if ((long)rai->sockaddr_len < ((char*)&rai->addr.ss_family + sizeof(rai->addr.ss_family)) - (char*)&rai->addr)
rb_str_cat2(ret, "too-short-sockaddr");
else {
- switch (sockaddr->addr.sa_family) {
- case AF_UNSPEC:
- {
- rb_str_cat2(ret, "UNSPEC");
- break;
- }
-
+ switch (rai->addr.ss_family) {
case AF_INET:
{
struct sockaddr_in *addr;
int port;
- addr = &sockaddr->in;
- if ((socklen_t)(((char*)&addr->sin_addr)-(char*)addr+0+1) <= socklen)
- rb_str_catf(ret, "%d", ((unsigned char*)&addr->sin_addr)[0]);
- else
- rb_str_cat2(ret, "?");
- if ((socklen_t)(((char*)&addr->sin_addr)-(char*)addr+1+1) <= socklen)
- rb_str_catf(ret, ".%d", ((unsigned char*)&addr->sin_addr)[1]);
- else
- rb_str_cat2(ret, ".?");
- if ((socklen_t)(((char*)&addr->sin_addr)-(char*)addr+2+1) <= socklen)
- rb_str_catf(ret, ".%d", ((unsigned char*)&addr->sin_addr)[2]);
- else
- rb_str_cat2(ret, ".?");
- if ((socklen_t)(((char*)&addr->sin_addr)-(char*)addr+3+1) <= socklen)
- rb_str_catf(ret, ".%d", ((unsigned char*)&addr->sin_addr)[3]);
- else
- rb_str_cat2(ret, ".?");
-
- if ((socklen_t)(((char*)&addr->sin_port)-(char*)addr+(int)sizeof(addr->sin_port)) < socklen) {
- port = ntohs(addr->sin_port);
- if (port)
- rb_str_catf(ret, ":%d", port);
- }
- else {
- rb_str_cat2(ret, ":?");
- }
- if ((socklen_t)sizeof(struct sockaddr_in) != socklen)
- rb_str_catf(ret, " (%d bytes for %d bytes sockaddr_in)",
- (int)socklen,
- (int)sizeof(struct sockaddr_in));
+ if (rai->sockaddr_len < (socklen_t)sizeof(struct sockaddr_in)) {
+ rb_str_cat2(ret, "too-short-AF_INET-sockaddr");
+ }
+ else {
+ addr = (struct sockaddr_in *)&rai->addr;
+ rb_str_catf(ret, "%d.%d.%d.%d",
+ ((unsigned char*)&addr->sin_addr)[0],
+ ((unsigned char*)&addr->sin_addr)[1],
+ ((unsigned char*)&addr->sin_addr)[2],
+ ((unsigned char*)&addr->sin_addr)[3]);
+ port = ntohs(addr->sin_port);
+ if (port)
+ rb_str_catf(ret, ":%d", port);
+ if ((socklen_t)sizeof(struct sockaddr_in) < rai->sockaddr_len)
+ rb_str_catf(ret, "(sockaddr %d bytes too long)", (int)(rai->sockaddr_len - sizeof(struct sockaddr_in)));
+ }
break;
}
@@ -1027,16 +970,16 @@ rsock_inspect_sockaddr(struct sockaddr *sockaddr_arg, socklen_t socklen, VALUE r
char hbuf[1024];
int port;
int error;
- if (socklen < (socklen_t)sizeof(struct sockaddr_in6)) {
- rb_str_catf(ret, "too-short-AF_INET6-sockaddr %d bytes", (int)socklen);
+ if (rai->sockaddr_len < (socklen_t)sizeof(struct sockaddr_in6)) {
+ rb_str_cat2(ret, "too-short-AF_INET6-sockaddr");
}
else {
- addr = &sockaddr->in6;
+ addr = (struct sockaddr_in6 *)&rai->addr;
/* use getnameinfo for scope_id.
* RFC 4007: IPv6 Scoped Address Architecture
* draft-ietf-ipv6-scope-api-00.txt: Scoped Address Extensions to the IPv6 Basic Socket API
*/
- error = getnameinfo(&sockaddr->addr, socklen,
+ error = getnameinfo((struct sockaddr *)&rai->addr, rai->sockaddr_len,
hbuf, (socklen_t)sizeof(hbuf), NULL, 0,
NI_NUMERICHOST|NI_NUMERICSERV);
if (error) {
@@ -1049,8 +992,8 @@ rsock_inspect_sockaddr(struct sockaddr *sockaddr_arg, socklen_t socklen, VALUE r
port = ntohs(addr->sin6_port);
rb_str_catf(ret, "[%s]:%d", hbuf, port);
}
- if ((socklen_t)sizeof(struct sockaddr_in6) < socklen)
- rb_str_catf(ret, "(sockaddr %d bytes too long)", (int)(socklen - sizeof(struct sockaddr_in6)));
+ if ((socklen_t)sizeof(struct sockaddr_in6) < rai->sockaddr_len)
+ rb_str_catf(ret, "(sockaddr %d bytes too long)", (int)(rai->sockaddr_len - sizeof(struct sockaddr_in6)));
}
break;
}
@@ -1059,10 +1002,10 @@ rsock_inspect_sockaddr(struct sockaddr *sockaddr_arg, socklen_t socklen, VALUE r
#ifdef HAVE_SYS_UN_H
case AF_UNIX:
{
- struct sockaddr_un *addr = &sockaddr->un;
+ struct sockaddr_un *addr = (struct sockaddr_un *)&rai->addr;
char *p, *s, *e;
s = addr->sun_path;
- e = (char*)addr + socklen;
+ e = (char*)addr + rai->sockaddr_len;
while (s < e && *(e-1) == '\0')
e--;
if (e < s)
@@ -1078,170 +1021,27 @@ rsock_inspect_sockaddr(struct sockaddr *sockaddr_arg, socklen_t socklen, VALUE r
}
if (printable_only) { /* only printable, no space */
if (s[0] != '/') /* relative path */
- rb_str_cat2(ret, "UNIX ");
+ rb_str_cat2(ret, "AF_UNIX ");
rb_str_cat(ret, s, p - s);
}
else {
- rb_str_cat2(ret, "UNIX");
+ rb_str_cat2(ret, "AF_UNIX");
while (s < e)
rb_str_catf(ret, ":%02x", (unsigned char)*s++);
}
+ if (addr->sun_path + sizeof(addr->sun_path) < (char*)&rai->addr + rai->sockaddr_len)
+ rb_str_catf(ret, "(sockaddr %d bytes too long)",
+ (int)(rai->sockaddr_len - (addr->sun_path + sizeof(addr->sun_path) - (char*)&rai->addr)));
}
break;
}
#endif
-#ifdef AF_PACKET
- /* GNU/Linux */
- case AF_PACKET:
- {
- struct sockaddr_ll *addr;
- const char *sep = "[";
-#define CATSEP do { rb_str_cat2(ret, sep); sep = " "; } while (0);
-
- addr = (struct sockaddr_ll *)sockaddr;
-
- rb_str_cat2(ret, "PACKET");
-
- if (offsetof(struct sockaddr_ll, sll_protocol) + sizeof(addr->sll_protocol) <= (size_t)socklen) {
- CATSEP;
- rb_str_catf(ret, "protocol=%d", ntohs(addr->sll_protocol));
- }
- if (offsetof(struct sockaddr_ll, sll_ifindex) + sizeof(addr->sll_ifindex) <= (size_t)socklen) {
- char buf[IFNAMSIZ];
- CATSEP;
- if (if_indextoname(addr->sll_ifindex, buf) == NULL)
- rb_str_catf(ret, "ifindex=%d", addr->sll_ifindex);
- else
- rb_str_catf(ret, "%s", buf);
- }
- if (offsetof(struct sockaddr_ll, sll_hatype) + sizeof(addr->sll_hatype) <= (size_t)socklen) {
- CATSEP;
- rb_str_catf(ret, "hatype=%d", addr->sll_hatype);
- }
- if (offsetof(struct sockaddr_ll, sll_pkttype) + sizeof(addr->sll_pkttype) <= (size_t)socklen) {
- CATSEP;
- if (addr->sll_pkttype == PACKET_HOST)
- rb_str_cat2(ret, "HOST");
- else if (addr->sll_pkttype == PACKET_BROADCAST)
- rb_str_cat2(ret, "BROADCAST");
- else if (addr->sll_pkttype == PACKET_MULTICAST)
- rb_str_cat2(ret, "MULTICAST");
- else if (addr->sll_pkttype == PACKET_OTHERHOST)
- rb_str_cat2(ret, "OTHERHOST");
- else if (addr->sll_pkttype == PACKET_OUTGOING)
- rb_str_cat2(ret, "OUTGOING");
- else
- rb_str_catf(ret, "pkttype=%d", addr->sll_pkttype);
- }
- if (socklen != (socklen_t)(offsetof(struct sockaddr_ll, sll_addr) + addr->sll_halen)) {
- CATSEP;
- if (offsetof(struct sockaddr_ll, sll_halen) + sizeof(addr->sll_halen) <= (size_t)socklen) {
- rb_str_catf(ret, "halen=%d", addr->sll_halen);
- }
- }
- if (offsetof(struct sockaddr_ll, sll_addr) < (size_t)socklen) {
- socklen_t len, i;
- CATSEP;
- rb_str_cat2(ret, "hwaddr");
- len = addr->sll_halen;
- if ((size_t)socklen < offsetof(struct sockaddr_ll, sll_addr) + len)
- len = socklen - offsetof(struct sockaddr_ll, sll_addr);
- for (i = 0; i < len; i++) {
- rb_str_cat2(ret, i == 0 ? "=" : ":");
- rb_str_catf(ret, "%02x", addr->sll_addr[i]);
- }
- }
-
- if (socklen < (socklen_t)(offsetof(struct sockaddr_ll, sll_halen) + sizeof(addr->sll_halen)) ||
- (socklen_t)(offsetof(struct sockaddr_ll, sll_addr) + addr->sll_halen) != socklen) {
- CATSEP;
- rb_str_catf(ret, "(%d bytes for %d bytes sockaddr_ll)",
- (int)socklen, (int)sizeof(struct sockaddr_ll));
- }
-
- rb_str_cat2(ret, "]");
-#undef CATSEP
-
- break;
- }
-#endif
-
-#if defined(AF_LINK) && defined(HAVE_TYPE_STRUCT_SOCKADDR_DL)
- /* AF_LINK is defined in 4.4BSD derivations since Net2.
- link_ntoa is also defined at Net2.
- However Debian GNU/kFreeBSD defines AF_LINK but
- don't have link_ntoa. */
- case AF_LINK:
- {
- /*
- * Simple implementation using link_ntoa():
- * This doesn't work on Debian GNU/kFreeBSD 6.0.7 (squeeze).
- * Also, the format is bit different.
- *
- * rb_str_catf(ret, "LINK %s", link_ntoa(&sockaddr->dl));
- * break;
- */
- struct sockaddr_dl *addr = &sockaddr->dl;
- char *np = NULL, *ap = NULL, *endp;
- int nlen = 0, alen = 0;
- int i, off;
- const char *sep = "[";
-#define CATSEP do { rb_str_cat2(ret, sep); sep = " "; } while (0);
-
- rb_str_cat2(ret, "LINK");
-
- endp = ((char *)addr) + socklen;
-
- if (offsetof(struct sockaddr_dl, sdl_data) < socklen) {
- np = addr->sdl_data;
- nlen = addr->sdl_nlen;
- if (endp - np < nlen)
- nlen = (int)(endp - np);
- }
- off = addr->sdl_nlen;
-
- if (offsetof(struct sockaddr_dl, sdl_data) + off < socklen) {
- ap = addr->sdl_data + off;
- alen = addr->sdl_alen;
- if (endp - ap < alen)
- alen = (int)(endp - ap);
- }
-
- CATSEP;
- if (np)
- rb_str_catf(ret, "%.*s", nlen, np);
- else
- rb_str_cat2(ret, "?");
-
- if (ap && 0 < alen) {
- CATSEP;
- for (i = 0; i < alen; i++)
- rb_str_catf(ret, "%s%02x", i == 0 ? "" : ":", (unsigned char)ap[i]);
- }
-
- if (socklen < (socklen_t)(offsetof(struct sockaddr_dl, sdl_nlen) + sizeof(addr->sdl_nlen)) ||
- socklen < (socklen_t)(offsetof(struct sockaddr_dl, sdl_alen) + sizeof(addr->sdl_alen)) ||
- socklen < (socklen_t)(offsetof(struct sockaddr_dl, sdl_slen) + sizeof(addr->sdl_slen)) ||
- /* longer length is possible behavior because struct sockaddr_dl has "minimum work area, can be larger" as the last field.
- * cf. Net2:/usr/src/sys/net/if_dl.h. */
- socklen < (socklen_t)(offsetof(struct sockaddr_dl, sdl_data) + addr->sdl_nlen + addr->sdl_alen + addr->sdl_slen)) {
- CATSEP;
- rb_str_catf(ret, "(%d bytes for %d bytes sockaddr_dl)",
- (int)socklen, (int)sizeof(struct sockaddr_dl));
- }
-
- rb_str_cat2(ret, "]");
-#undef CATSEP
- break;
- }
-#endif
-
default:
{
- ID id = rsock_intern_family(sockaddr->addr.sa_family);
+ ID id = rsock_intern_family(rai->addr.ss_family);
if (id == 0)
- rb_str_catf(ret, "unknown address family %d", sockaddr->addr.sa_family);
+ rb_str_catf(ret, "unknown address family %d", rai->addr.ss_family);
else
rb_str_catf(ret, "%s address format unknown", rb_id2name(id));
break;
@@ -1342,8 +1142,8 @@ addrinfo_inspect(VALUE self)
* Addrinfo.unix("/tmp/sock").inspect_sockaddr #=> "/tmp/sock"
*
*/
-VALUE
-rsock_addrinfo_inspect_sockaddr(VALUE self)
+static VALUE
+addrinfo_inspect_sockaddr(VALUE self)
{
return inspect_sockaddr(self, rb_str_new("", 0));
}
@@ -1396,7 +1196,7 @@ addrinfo_mdump(VALUE self)
#ifdef HAVE_SYS_UN_H
case AF_UNIX:
{
- struct sockaddr_un *su = &rai->addr.un;
+ struct sockaddr_un *su = (struct sockaddr_un *)&rai->addr;
char *s, *e;
s = su->sun_path;
e = (char*)su + rai->sockaddr_len;
@@ -1411,7 +1211,7 @@ addrinfo_mdump(VALUE self)
{
char hbuf[NI_MAXHOST], pbuf[NI_MAXSERV];
int error;
- error = getnameinfo(&rai->addr.addr, rai->sockaddr_len,
+ error = getnameinfo((struct sockaddr *)&rai->addr, rai->sockaddr_len,
hbuf, (socklen_t)sizeof(hbuf), pbuf, (socklen_t)sizeof(pbuf),
NI_NUMERICHOST|NI_NUMERICSERV);
if (error) {
@@ -1432,7 +1232,7 @@ addrinfo_mload(VALUE self, VALUE ary)
VALUE v;
VALUE canonname, inspectname;
int afamily, pfamily, socktype, protocol;
- union_sockaddr ss;
+ struct sockaddr_storage ss;
socklen_t len;
rb_addrinfo_t *rai;
@@ -1496,7 +1296,8 @@ addrinfo_mload(VALUE self, VALUE ary)
case AF_UNIX:
{
struct sockaddr_un uaddr;
- INIT_SOCKADDR_UN(&uaddr, sizeof(struct sockaddr_un));
+ MEMZERO(&uaddr, struct sockaddr_un, 1);
+ uaddr.sun_family = AF_UNIX;
StringValue(v);
if (sizeof(uaddr.sun_path) < (size_t)RSTRING_LEN(v))
@@ -1529,7 +1330,7 @@ addrinfo_mload(VALUE self, VALUE ary)
}
DATA_PTR(self) = rai = alloc_addrinfo();
- init_addrinfo(rai, &ss.addr, len,
+ init_addrinfo(rai, (struct sockaddr *)&ss, len,
pfamily, socktype, protocol,
canonname, inspectname);
return self;
@@ -1757,7 +1558,7 @@ addrinfo_getnameinfo(int argc, VALUE *argv, VALUE self)
if (rai->socktype == SOCK_DGRAM)
flags |= NI_DGRAM;
- error = getnameinfo(&rai->addr.addr, rai->sockaddr_len,
+ error = getnameinfo((struct sockaddr *)&rai->addr, rai->sockaddr_len,
hbuf, (socklen_t)sizeof(hbuf), pbuf, (socklen_t)sizeof(pbuf),
flags);
if (error) {
@@ -1848,14 +1649,14 @@ addrinfo_ip_port(VALUE self)
case AF_INET:
if (rai->sockaddr_len != sizeof(struct sockaddr_in))
rb_raise(rb_eSocket, "unexpected sockaddr size for IPv4");
- port = ntohs(rai->addr.in.sin_port);
+ port = ntohs(((struct sockaddr_in *)&rai->addr)->sin_port);
break;
#ifdef AF_INET6
case AF_INET6:
if (rai->sockaddr_len != sizeof(struct sockaddr_in6))
rb_raise(rb_eSocket, "unexpected sockaddr size for IPv6");
- port = ntohs(rai->addr.in6.sin6_port);
+ port = ntohs(((struct sockaddr_in6 *)&rai->addr)->sin6_port);
break;
#endif
@@ -1872,7 +1673,7 @@ extract_in_addr(VALUE self, uint32_t *addrp)
rb_addrinfo_t *rai = get_addrinfo(self);
int family = ai_get_afamily(rai);
if (family != AF_INET) return 0;
- *addrp = ntohl(rai->addr.in.sin_addr.s_addr);
+ *addrp = ntohl(((struct sockaddr_in *)&rai->addr)->sin_addr.s_addr);
return 1;
}
@@ -1928,7 +1729,7 @@ extract_in6_addr(VALUE self)
rb_addrinfo_t *rai = get_addrinfo(self);
int family = ai_get_afamily(rai);
if (family != AF_INET6) return NULL;
- return &rai->addr.in6.sin6_addr;
+ return &((struct sockaddr_in6 *)&rai->addr)->sin6_addr;
}
/*
@@ -2104,10 +1905,12 @@ addrinfo_ipv6_to_ipv4(VALUE self)
struct in6_addr *addr;
int family = ai_get_afamily(rai);
if (family != AF_INET6) return Qnil;
- addr = &rai->addr.in6.sin6_addr;
+ addr = &((struct sockaddr_in6 *)&rai->addr)->sin6_addr;
if (IN6_IS_ADDR_V4MAPPED(addr) || IN6_IS_ADDR_V4COMPAT(addr)) {
struct sockaddr_in sin4;
- INIT_SOCKADDR_IN(&sin4, sizeof(sin4));
+ MEMZERO(&sin4, struct sockaddr_in, 1);
+ sin4.sin_family = AF_INET;
+ SET_SIN_LEN(&sin4, sizeof(sin4));
memcpy(&sin4.sin_addr, (char*)addr + sizeof(*addr) - sizeof(sin4.sin_addr), sizeof(sin4.sin_addr));
return rsock_addrinfo_new((struct sockaddr *)&sin4, (socklen_t)sizeof(sin4),
PF_INET, rai->socktype, rai->protocol,
@@ -2140,7 +1943,7 @@ addrinfo_unix_path(VALUE self)
if (family != AF_UNIX)
rb_raise(rb_eSocket, "need AF_UNIX address");
- addr = &rai->addr.un;
+ addr = (struct sockaddr_un *)&rai->addr;
s = addr->sun_path;
e = (char*)addr + rai->sockaddr_len;
@@ -2311,19 +2114,6 @@ rsock_sockaddr_string_value(volatile VALUE *v)
return *v;
}
-VALUE
-rsock_sockaddr_string_value_with_addrinfo(volatile VALUE *v, VALUE *rai_ret)
-{
- VALUE val = *v;
- *rai_ret = Qnil;
- if (IS_ADDRINFO(val)) {
- *v = addrinfo_to_sockaddr(val);
- *rai_ret = val;
- }
- StringValue(*v);
- return *v;
-}
-
char *
rsock_sockaddr_string_value_ptr(volatile VALUE *v)
{
@@ -2395,7 +2185,7 @@ rsock_init_addrinfo(void)
rb_define_alloc_func(rb_cAddrinfo, addrinfo_s_allocate);
rb_define_method(rb_cAddrinfo, "initialize", addrinfo_initialize, -1);
rb_define_method(rb_cAddrinfo, "inspect", addrinfo_inspect, 0);
- rb_define_method(rb_cAddrinfo, "inspect_sockaddr", rsock_addrinfo_inspect_sockaddr, 0);
+ rb_define_method(rb_cAddrinfo, "inspect_sockaddr", addrinfo_inspect_sockaddr, 0);
rb_define_singleton_method(rb_cAddrinfo, "getaddrinfo", addrinfo_s_getaddrinfo, -1);
rb_define_singleton_method(rb_cAddrinfo, "ip", addrinfo_s_ip, 1);
rb_define_singleton_method(rb_cAddrinfo, "tcp", addrinfo_s_tcp, 2);
diff --git a/ext/socket/rubysocket.h b/ext/socket/rubysocket.h
index 97c02fc410..33cb51a5c9 100644
--- a/ext/socket/rubysocket.h
+++ b/ext/socket/rubysocket.h
@@ -11,119 +11,83 @@
#include <sys/stat.h>
#ifdef HAVE_UNISTD_H
-# include <unistd.h>
+#include <unistd.h>
#endif
#ifdef HAVE_SYS_UIO_H
-# include <sys/uio.h>
+#include <sys/uio.h>
#endif
#ifdef HAVE_XTI_H
-# include <xti.h>
+#include <xti.h>
#endif
-#ifdef _WIN32
-# if defined(_MSC_VER)
-# undef HAVE_TYPE_STRUCT_SOCKADDR_DL
-# endif
+#ifndef _WIN32
+#if defined(__BEOS__) && !defined(__HAIKU__) && !defined(BONE)
+# include <net/socket.h>
#else
-# if defined(__BEOS__) && !defined(__HAIKU__) && !defined(BONE)
-# include <net/socket.h>
-# else
-# include <sys/socket.h>
-# endif
-# include <netinet/in.h>
-# ifdef HAVE_NETINET_IN_SYSTM_H
-# include <netinet/in_systm.h>
-# endif
-# ifdef HAVE_NETINET_TCP_H
-# include <netinet/tcp.h>
-# endif
-# ifdef HAVE_NETINET_UDP_H
-# include <netinet/udp.h>
-# endif
-# ifdef HAVE_ARPA_INET_H
-# include <arpa/inet.h>
-# endif
-# include <netdb.h>
-#endif
-
-#ifdef HAVE_NETPACKET_PACKET_H
-# include <netpacket/packet.h>
-#endif
-#ifdef HAVE_NET_ETHERNET_H
-# include <net/ethernet.h>
+# include <sys/socket.h>
+#endif
+#include <netinet/in.h>
+#ifdef HAVE_NETINET_IN_SYSTM_H
+# include <netinet/in_systm.h>
+#endif
+#ifdef HAVE_NETINET_TCP_H
+# include <netinet/tcp.h>
+#endif
+#ifdef HAVE_NETINET_UDP_H
+# include <netinet/udp.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
+# include <arpa/inet.h>
+#endif
+#include <netdb.h>
#endif
-
#include <errno.h>
-
#ifdef HAVE_SYS_UN_H
-# include <sys/un.h>
+#include <sys/un.h>
#endif
#if defined(HAVE_FCNTL)
-# ifdef HAVE_SYS_SELECT_H
-# include <sys/select.h>
-# endif
-# ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-# endif
-# ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-# endif
-# ifdef HAVE_FCNTL_H
-# include <fcntl.h>
-# endif
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
#endif
#ifdef HAVE_IFADDRS_H
-# include <ifaddrs.h>
+#include <ifaddrs.h>
#endif
#ifdef HAVE_SYS_IOCTL_H
-# include <sys/ioctl.h>
+#include <sys/ioctl.h>
#endif
#ifdef HAVE_SYS_SOCKIO_H
-# include <sys/sockio.h>
+#include <sys/sockio.h>
#endif
#ifdef HAVE_NET_IF_H
-# include <net/if.h>
+#include <net/if.h>
#endif
#ifdef HAVE_SYS_PARAM_H
-# include <sys/param.h>
+#include <sys/param.h>
#endif
#ifdef HAVE_SYS_UCRED_H
-# include <sys/ucred.h>
+#include <sys/ucred.h>
#endif
#ifdef HAVE_UCRED_H
-# include <ucred.h>
-#endif
-#ifdef HAVE_NET_IF_DL_H
-# include <net/if_dl.h>
-#endif
-
-#ifndef HAVE_TYPE_SOCKLEN_T
-typedef int socklen_t;
-#endif
-
-#ifdef NEED_IF_INDEXTONAME_DECL
-char *if_indextoname(unsigned int, char *);
-#endif
-#ifdef NEED_IF_NAMETOINDEX_DECL
-unsigned int if_nametoindex(const char *);
-#endif
-
-#define SOCKLEN_MAX \
- (0 < (socklen_t)-1 ? \
- ~(socklen_t)0 : \
- (((((socklen_t)1) << (sizeof(socklen_t) * CHAR_BIT - 2)) - 1) * 2 + 1))
-
-#ifndef RSTRING_SOCKLEN
-# define RSTRING_SOCKLEN (socklen_t)RSTRING_LENINT
+#include <ucred.h>
#endif
#ifndef EWOULDBLOCK
-# define EWOULDBLOCK EAGAIN
+#define EWOULDBLOCK EAGAIN
#endif
/*
@@ -136,89 +100,72 @@ unsigned int if_nametoindex(const char *);
#define pseudo_AF_FTIP pseudo_AF_RTIP
#ifndef HAVE_GETADDRINFO
-# include "addrinfo.h"
+#include "addrinfo.h"
#endif
-
#include "sockport.h"
#ifndef NI_MAXHOST
-# define NI_MAXHOST 1025
+# define NI_MAXHOST 1025
#endif
#ifndef NI_MAXSERV
-# define NI_MAXSERV 32
+# define NI_MAXSERV 32
#endif
#ifdef AF_INET6
-# define IS_IP_FAMILY(af) ((af) == AF_INET || (af) == AF_INET6)
+# define IS_IP_FAMILY(af) ((af) == AF_INET || (af) == AF_INET6)
#else
-# define IS_IP_FAMILY(af) ((af) == AF_INET)
+# define IS_IP_FAMILY(af) ((af) == AF_INET)
#endif
#ifndef IN6_IS_ADDR_UNIQUE_LOCAL
-# define IN6_IS_ADDR_UNIQUE_LOCAL(a) (((a)->s6_addr[0] == 0xfc) || ((a)->s6_addr[0] == 0xfd))
+# define IN6_IS_ADDR_UNIQUE_LOCAL(a) (((a)->s6_addr[0] == 0xfc) || ((a)->s6_addr[0] == 0xfd))
#endif
-#ifndef HAVE_TYPE_STRUCT_SOCKADDR_STORAGE
+#ifndef HAVE_SOCKADDR_STORAGE
/*
* RFC 2553: protocol-independent placeholder for socket addresses
*/
-# define _SS_MAXSIZE 128
-# define _SS_ALIGNSIZE (sizeof(double))
-# define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(unsigned char) * 2)
-# define _SS_PAD2SIZE (_SS_MAXSIZE - sizeof(unsigned char) * 2 - \
+#define _SS_MAXSIZE 128
+#define _SS_ALIGNSIZE (sizeof(double))
+#define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(unsigned char) * 2)
+#define _SS_PAD2SIZE (_SS_MAXSIZE - sizeof(unsigned char) * 2 - \
_SS_PAD1SIZE - _SS_ALIGNSIZE)
struct sockaddr_storage {
-# ifdef HAVE_STRUCT_SOCKADDR_SA_LEN
+#ifdef HAVE_SA_LEN
unsigned char ss_len; /* address length */
unsigned char ss_family; /* address family */
-# else
+#else
unsigned short ss_family;
-# endif
+#endif
char __ss_pad1[_SS_PAD1SIZE];
double __ss_align; /* force desired structure storage alignment */
char __ss_pad2[_SS_PAD2SIZE];
};
#endif
-typedef union {
- struct sockaddr addr;
- struct sockaddr_in in;
-#ifdef AF_INET6
- struct sockaddr_in6 in6;
-#endif
-#ifdef HAVE_TYPE_STRUCT_SOCKADDR_UN
- struct sockaddr_un un;
-#endif
-#ifdef HAVE_TYPE_STRUCT_SOCKADDR_DL
- struct sockaddr_dl dl; /* AF_LINK */
-#endif
- struct sockaddr_storage storage;
- char place_holder[2048]; /* sockaddr_storage is not enough for Unix domain sockets on SunOS and Darwin. */
-} union_sockaddr;
-
#ifdef __APPLE__
/*
* CMSG_ macros are broken on 64bit darwin, because __DARWIN_ALIGN
* aligns up to __darwin_size_t which is 64bit, but CMSG_DATA is
* 32bit-aligned.
*/
-# undef __DARWIN_ALIGNBYTES
-# define __DARWIN_ALIGNBYTES (sizeof(unsigned int) - 1)
+#undef __DARWIN_ALIGNBYTES
+#define __DARWIN_ALIGNBYTES (sizeof(unsigned int) - 1)
#endif
#if defined(_AIX)
-# ifndef CMSG_SPACE
-# define CMSG_SPACE(len) (_CMSG_ALIGN(sizeof(struct cmsghdr)) + _CMSG_ALIGN(len))
-# endif
-# ifndef CMSG_LEN
-# define CMSG_LEN(len) (_CMSG_ALIGN(sizeof(struct cmsghdr)) + (len))
-# endif
+#ifndef CMSG_SPACE
+# define CMSG_SPACE(len) (_CMSG_ALIGN(sizeof(struct cmsghdr)) + _CMSG_ALIGN(len))
+#endif
+#ifndef CMSG_LEN
+# define CMSG_LEN(len) (_CMSG_ALIGN(sizeof(struct cmsghdr)) + (len))
+#endif
#endif
#ifdef __BEOS__
-# undef close
-# define close closesocket
+#undef close
+#define close closesocket
#endif
#define INET_CLIENT 0
@@ -245,12 +192,12 @@ extern VALUE rb_eSocket;
#ifdef SOCKS
extern VALUE rb_cSOCKSSocket;
-# ifdef SOCKS5
-# include <socks.h>
-# else
+#ifdef SOCKS5
+#include <socks.h>
+#else
void SOCKSinit();
int Rconnect();
-# endif
+#endif
#endif
#include "constdefs.h"
@@ -260,11 +207,8 @@ int Rconnect();
#define SockAddrStringValue(v) rsock_sockaddr_string_value(&(v))
#define SockAddrStringValuePtr(v) rsock_sockaddr_string_value_ptr(&(v))
-#define SockAddrStringValueWithAddrinfo(v, rai_ret) rsock_sockaddr_string_value_with_addrinfo(&(v), &(rai_ret))
VALUE rsock_sockaddr_string_value(volatile VALUE *);
char *rsock_sockaddr_string_value_ptr(volatile VALUE *);
-VALUE rsock_sockaddr_string_value_with_addrinfo(volatile VALUE *v, VALUE *ai_ret);
-
VALUE rb_check_sockaddr_string_type(VALUE);
NORETURN(void rsock_raise_socket_error(const char *, int));
@@ -286,21 +230,16 @@ VALUE rsock_fd_socket_addrinfo(int fd, struct sockaddr *addr, socklen_t len);
VALUE rsock_io_socket_addrinfo(VALUE io, struct sockaddr *addr, socklen_t len);
VALUE rsock_addrinfo_new(struct sockaddr *addr, socklen_t len, int family, int socktype, int protocol, VALUE canonname, VALUE inspectname);
-VALUE rsock_addrinfo_inspect_sockaddr(VALUE rai);
-VALUE rsock_make_ipaddr(struct sockaddr *addr, socklen_t addrlen);
-VALUE rsock_ipaddr(struct sockaddr *sockaddr, socklen_t sockaddrlen, int norevlookup);
-VALUE rsock_make_hostent(VALUE host, struct addrinfo *addr, VALUE (*ipaddr)(struct sockaddr *, socklen_t));
-VALUE rsock_inspect_sockaddr(struct sockaddr *addr, socklen_t socklen, VALUE ret);
-socklen_t rsock_sockaddr_len(struct sockaddr *addr);
-VALUE rsock_sockaddr_obj(struct sockaddr *addr, socklen_t len);
+VALUE rsock_make_ipaddr(struct sockaddr *addr);
+VALUE rsock_ipaddr(struct sockaddr *sockaddr, int norevlookup);
+VALUE rsock_make_hostent(VALUE host, struct addrinfo *addr, VALUE (*ipaddr)(struct sockaddr *, size_t));
int rsock_revlookup_flag(VALUE revlookup, int *norevlookup);
#ifdef HAVE_SYS_UN_H
VALUE rsock_unixpath_str(struct sockaddr_un *sockaddr, socklen_t len);
VALUE rsock_unixaddr(struct sockaddr_un *sockaddr, socklen_t len);
-socklen_t rsock_unix_sockaddr_len(VALUE path);
#endif
int rsock_socket(int domain, int type, int proto);
@@ -345,7 +284,6 @@ VALUE rsock_bsock_sendmsg_nonblock(int argc, VALUE *argv, VALUE sock);
#define rsock_bsock_sendmsg rb_f_notimplement
#define rsock_bsock_sendmsg_nonblock rb_f_notimplement
#endif
-
#if defined(HAVE_RECVMSG)
VALUE rsock_bsock_recvmsg(int argc, VALUE *argv, VALUE sock);
VALUE rsock_bsock_recvmsg_nonblock(int argc, VALUE *argv, VALUE sock);
@@ -355,7 +293,7 @@ ssize_t rsock_recvmsg(int socket, struct msghdr *message, int flags);
#define rsock_bsock_recvmsg_nonblock rb_f_notimplement
#endif
-#ifdef HAVE_STRUCT_MSGHDR_MSG_CONTROL
+#ifdef HAVE_ST_MSG_CONTROL
void rsock_discard_cmsg_resource(struct msghdr *mh, int msg_peek_p);
#endif
@@ -371,13 +309,6 @@ void rsock_init_socket_constants(void);
void rsock_init_ancdata(void);
void rsock_init_addrinfo(void);
void rsock_init_sockopt(void);
-void rsock_init_sockifaddr(void);
void rsock_init_socket_init(void);
-NORETURN(void rsock_sys_fail_host_port(const char *, VALUE, VALUE));
-NORETURN(void rsock_sys_fail_path(const char *, VALUE));
-NORETURN(void rsock_sys_fail_sockaddr(const char *, struct sockaddr *addr, socklen_t len));
-NORETURN(void rsock_sys_fail_raddrinfo(const char *, VALUE rai));
-NORETURN(void rsock_sys_fail_raddrinfo_or_sockaddr(const char *, VALUE addr, VALUE rai));
-
#endif
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index 5fd74652c6..09c22d6d69 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -10,76 +10,6 @@
#include "rubysocket.h"
-static VALUE sock_s_unpack_sockaddr_in(VALUE, VALUE);
-
-void
-rsock_sys_fail_host_port(const char *mesg, VALUE host, VALUE port)
-{
- VALUE message;
-
- port = rb_String(port);
-
- message = rb_sprintf("%s for \"%s\" port %s",
- mesg, StringValueCStr(host), StringValueCStr(port));
-
- rb_sys_fail_str(message);
-}
-
-void
-rsock_sys_fail_path(const char *mesg, VALUE path)
-{
- VALUE message;
- if (RB_TYPE_P(path, T_STRING)) {
- if (memchr(RSTRING_PTR(path), '\0', RSTRING_LEN(path))) {
- path = rb_str_inspect(path);
- message = rb_sprintf("%s for %s", mesg,
- StringValueCStr(path));
- }
- else {
- message = rb_sprintf("%s for \"%s\"", mesg,
- StringValueCStr(path));
- }
- rb_sys_fail_str(message);
- }
- else {
- rb_sys_fail(mesg);
- }
-}
-
-void
-rsock_sys_fail_sockaddr(const char *mesg, struct sockaddr *addr, socklen_t len)
-{
- VALUE rai;
-
- rai = rsock_addrinfo_new(addr, len, PF_UNSPEC, 0, 0, Qnil, Qnil);
-
- rsock_sys_fail_raddrinfo(mesg, rai);
-}
-
-void
-rsock_sys_fail_raddrinfo(const char *mesg, VALUE rai)
-{
- VALUE str, message;
-
- str = rsock_addrinfo_inspect_sockaddr(rai);
- message = rb_sprintf("%s for %s", mesg, StringValueCStr(str));
-
- rb_sys_fail_str(message);
-}
-
-void
-rsock_sys_fail_raddrinfo_or_sockaddr(const char *mesg, VALUE addr, VALUE rai)
-{
- if (NIL_P(rai)) {
- StringValue(addr);
- rsock_sys_fail_sockaddr(mesg,
- (struct sockaddr *)RSTRING_PTR(addr),
- (socklen_t)RSTRING_LEN(addr)); /* overflow should be checked already */
- }
- else
- rsock_sys_fail_raddrinfo(mesg, rai);
-}
-
static void
setup_domain_and_type(VALUE domain, int *dv, VALUE type, int *tv)
{
@@ -212,14 +142,6 @@ rsock_socketpair(int domain, int type, int protocol, int sv[2])
* _protocol_ should be a protocol defined in the domain,
* defaults to 0 for the domain.
*
- * s1, s2 = Socket.pair(:UNIX, :STREAM, 0)
- * s1.send "a", 0
- * s1.send "b", 0
- * s1.close
- * p s2.recv(10) #=> "ab"
- * p s2.recv(10) #=> ""
- * p s2.recv(10) #=> ""
- *
* s1, s2 = Socket.pair(:UNIX, :DGRAM, 0)
* s1.send "a", 0
* s1.send "b", 0
@@ -262,7 +184,7 @@ rsock_sock_s_socketpair(int argc, VALUE *argv, VALUE klass)
/*
* call-seq:
- * socket.connect(remote_sockaddr) => 0
+ * socket.connect(remote_sockaddr) => 0
*
* Requests a connection to be made on the given +remote_sockaddr+. Returns 0 if
* successful, otherwise an exception is raised.
@@ -374,17 +296,16 @@ rsock_sock_s_socketpair(int argc, VALUE *argv, VALUE klass)
static VALUE
sock_connect(VALUE sock, VALUE addr)
{
- VALUE rai;
rb_io_t *fptr;
int fd, n;
- SockAddrStringValueWithAddrinfo(addr, rai);
+ SockAddrStringValue(addr);
addr = rb_str_new4(addr);
GetOpenFile(sock, fptr);
fd = fptr->fd;
- n = rsock_connect(fd, (struct sockaddr*)RSTRING_PTR(addr), RSTRING_SOCKLEN(addr), 0);
+ n = rsock_connect(fd, (struct sockaddr*)RSTRING_PTR(addr), RSTRING_LENINT(addr), 0);
if (n < 0) {
- rsock_sys_fail_raddrinfo_or_sockaddr("connect(2)", addr, rai);
+ rb_sys_fail("connect(2)");
}
return INT2FIX(n);
@@ -392,7 +313,7 @@ sock_connect(VALUE sock, VALUE addr)
/*
* call-seq:
- * socket.connect_nonblock(remote_sockaddr) => 0
+ * socket.connect_nonblock(remote_sockaddr) => 0
*
* Requests a connection to be made on the given +remote_sockaddr+ after
* O_NONBLOCK is set for the underlying file descriptor.
@@ -435,19 +356,18 @@ sock_connect(VALUE sock, VALUE addr)
static VALUE
sock_connect_nonblock(VALUE sock, VALUE addr)
{
- VALUE rai;
rb_io_t *fptr;
int n;
- SockAddrStringValueWithAddrinfo(addr, rai);
+ SockAddrStringValue(addr);
addr = rb_str_new4(addr);
GetOpenFile(sock, fptr);
rb_io_set_nonblock(fptr);
- n = connect(fptr->fd, (struct sockaddr*)RSTRING_PTR(addr), RSTRING_SOCKLEN(addr));
+ n = connect(fptr->fd, (struct sockaddr*)RSTRING_PTR(addr), RSTRING_LENINT(addr));
if (n < 0) {
if (errno == EINPROGRESS)
- rb_readwrite_sys_fail(RB_IO_WAIT_WRITABLE, "connect(2) would block");
- rsock_sys_fail_raddrinfo_or_sockaddr("connect(2)", addr, rai);
+ rb_mod_sys_fail(rb_mWaitWritable, "connect(2) would block");
+ rb_sys_fail("connect(2)");
}
return INT2FIX(n);
@@ -455,7 +375,7 @@ sock_connect_nonblock(VALUE sock, VALUE addr)
/*
* call-seq:
- * socket.bind(local_sockaddr) => 0
+ * socket.bind(local_sockaddr) => 0
*
* Binds to the given local address.
*
@@ -542,20 +462,19 @@ sock_connect_nonblock(VALUE sock, VALUE addr)
static VALUE
sock_bind(VALUE sock, VALUE addr)
{
- VALUE rai;
rb_io_t *fptr;
- SockAddrStringValueWithAddrinfo(addr, rai);
+ SockAddrStringValue(addr);
GetOpenFile(sock, fptr);
- if (bind(fptr->fd, (struct sockaddr*)RSTRING_PTR(addr), RSTRING_SOCKLEN(addr)) < 0)
- rsock_sys_fail_raddrinfo_or_sockaddr("bind(2)", addr, rai);
+ if (bind(fptr->fd, (struct sockaddr*)RSTRING_PTR(addr), RSTRING_LENINT(addr)) < 0)
+ rb_sys_fail("bind(2)");
return INT2FIX(0);
}
/*
* call-seq:
- * socket.listen( int ) => 0
+ * socket.listen( int ) => 0
*
* Listens for connections, using the specified +int+ as the backlog. A call
* to _listen_ only applies if the +socket+ is of type SOCK_STREAM or
@@ -629,6 +548,7 @@ rsock_sock_listen(VALUE sock, VALUE log)
rb_io_t *fptr;
int backlog;
+ rb_secure(4);
backlog = NUM2INT(log);
GetOpenFile(sock, fptr);
if (listen(fptr->fd, backlog) < 0)
@@ -639,8 +559,8 @@ rsock_sock_listen(VALUE sock, VALUE log)
/*
* call-seq:
- * socket.recvfrom(maxlen) => [mesg, sender_addrinfo]
- * socket.recvfrom(maxlen, flags) => [mesg, sender_addrinfo]
+ * socket.recvfrom(maxlen) => [mesg, sender_addrinfo]
+ * socket.recvfrom(maxlen, flags) => [mesg, sender_addrinfo]
*
* Receives up to _maxlen_ bytes from +socket+. _flags_ is zero or more
* of the +MSG_+ options. The first element of the results, _mesg_, is the data
@@ -750,8 +670,8 @@ sock_recvfrom(int argc, VALUE *argv, VALUE sock)
/*
* call-seq:
- * socket.recvfrom_nonblock(maxlen) => [mesg, sender_addrinfo]
- * socket.recvfrom_nonblock(maxlen, flags) => [mesg, sender_addrinfo]
+ * socket.recvfrom_nonblock(maxlen) => [mesg, sender_addrinfo]
+ * socket.recvfrom_nonblock(maxlen, flags) => [mesg, sender_addrinfo]
*
* Receives up to _maxlen_ bytes from +socket+ using recvfrom(2) after
* O_NONBLOCK is set for the underlying file descriptor.
@@ -835,18 +755,18 @@ sock_accept(VALUE sock)
{
rb_io_t *fptr;
VALUE sock2;
- union_sockaddr buf;
+ struct sockaddr_storage buf;
socklen_t len = (socklen_t)sizeof buf;
GetOpenFile(sock, fptr);
- sock2 = rsock_s_accept(rb_cSocket,fptr->fd,&buf.addr,&len);
+ sock2 = rsock_s_accept(rb_cSocket,fptr->fd,(struct sockaddr*)&buf,&len);
- return rb_assoc_new(sock2, rsock_io_socket_addrinfo(sock2, &buf.addr, len));
+ return rb_assoc_new(sock2, rsock_io_socket_addrinfo(sock2, (struct sockaddr*)&buf, len));
}
/*
* call-seq:
- * socket.accept_nonblock => [client_socket, client_addrinfo]
+ * socket.accept_nonblock => [client_socket, client_addrinfo]
*
* Accepts an incoming connection using accept(2) after
* O_NONBLOCK is set for the underlying file descriptor.
@@ -900,17 +820,17 @@ sock_accept_nonblock(VALUE sock)
{
rb_io_t *fptr;
VALUE sock2;
- union_sockaddr buf;
+ struct sockaddr_storage buf;
socklen_t len = (socklen_t)sizeof buf;
GetOpenFile(sock, fptr);
- sock2 = rsock_s_accept_nonblock(rb_cSocket, fptr, &buf.addr, &len);
- return rb_assoc_new(sock2, rsock_io_socket_addrinfo(sock2, &buf.addr, len));
+ sock2 = rsock_s_accept_nonblock(rb_cSocket, fptr, (struct sockaddr *)&buf, &len);
+ return rb_assoc_new(sock2, rsock_io_socket_addrinfo(sock2, (struct sockaddr*)&buf, len));
}
/*
* call-seq:
- * socket.sysaccept => [client_socket_fd, client_addrinfo]
+ * socket.sysaccept => [client_socket_fd, client_addrinfo]
*
* Accepts an incoming connection returning an array containing the (integer)
* file descriptor for the incoming connection, _client_socket_fd_,
@@ -951,13 +871,13 @@ sock_sysaccept(VALUE sock)
{
rb_io_t *fptr;
VALUE sock2;
- union_sockaddr buf;
+ struct sockaddr_storage buf;
socklen_t len = (socklen_t)sizeof buf;
GetOpenFile(sock, fptr);
- sock2 = rsock_s_accept(0,fptr->fd,&buf.addr,&len);
+ sock2 = rsock_s_accept(0,fptr->fd,(struct sockaddr*)&buf,&len);
- return rb_assoc_new(sock2, rsock_io_socket_addrinfo(sock2, &buf.addr, len));
+ return rb_assoc_new(sock2, rsock_io_socket_addrinfo(sock2, (struct sockaddr*)&buf, len));
}
#ifdef HAVE_GETHOSTNAME
@@ -982,7 +902,7 @@ sock_gethostname(VALUE obj)
rb_secure(3);
if (gethostname(buf, (int)sizeof buf - 1) < 0)
- rb_sys_fail("gethostname(3)");
+ rb_sys_fail("gethostname");
buf[sizeof buf - 1] = '\0';
return rb_str_new2(buf);
@@ -1017,7 +937,7 @@ make_addrinfo(struct addrinfo *res0, int norevlookup)
}
base = rb_ary_new();
for (res = res0; res; res = res->ai_next) {
- ary = rsock_ipaddr(res->ai_addr, res->ai_addrlen, norevlookup);
+ ary = rsock_ipaddr(res->ai_addr, norevlookup);
if (res->ai_canonname) {
RARRAY_PTR(ary)[2] = rb_str_new2(res->ai_canonname);
}
@@ -1030,19 +950,19 @@ make_addrinfo(struct addrinfo *res0, int norevlookup)
}
static VALUE
-sock_sockaddr(struct sockaddr *addr, socklen_t len)
+sock_sockaddr(struct sockaddr *addr, size_t len)
{
char *ptr;
switch (addr->sa_family) {
case AF_INET:
ptr = (char*)&((struct sockaddr_in*)addr)->sin_addr.s_addr;
- len = (socklen_t)sizeof(((struct sockaddr_in*)addr)->sin_addr.s_addr);
+ len = sizeof(((struct sockaddr_in*)addr)->sin_addr.s_addr);
break;
#ifdef AF_INET6
case AF_INET6:
ptr = (char*)&((struct sockaddr_in6*)addr)->sin6_addr.s6_addr;
- len = (socklen_t)sizeof(((struct sockaddr_in6*)addr)->sin6_addr.s6_addr);
+ len = sizeof(((struct sockaddr_in6*)addr)->sin6_addr.s6_addr);
break;
#endif
default:
@@ -1096,7 +1016,7 @@ sock_s_gethostbyaddr(int argc, VALUE *argv)
t = AF_INET6;
}
#endif
- h = gethostbyaddr(RSTRING_PTR(addr), RSTRING_SOCKLEN(addr), t);
+ h = gethostbyaddr(RSTRING_PTR(addr), RSTRING_LENINT(addr), t);
if (h == NULL) {
#ifdef HAVE_HSTRERROR
extern int h_errno;
@@ -1297,9 +1217,8 @@ sock_s_getnameinfo(int argc, VALUE *argv)
int fl;
struct addrinfo hints, *res = NULL, *r;
int error;
- union_sockaddr ss;
+ struct sockaddr_storage ss;
struct sockaddr *sap;
- socklen_t salen;
sa = flags = Qnil;
rb_scan_args(argc, argv, "11", &sa, &flags);
@@ -1315,11 +1234,10 @@ sock_s_getnameinfo(int argc, VALUE *argv)
rb_raise(rb_eTypeError, "sockaddr length too big");
}
memcpy(&ss, RSTRING_PTR(sa), RSTRING_LEN(sa));
- if (!VALIDATE_SOCKLEN(&ss.addr, RSTRING_LEN(sa))) {
+ if ((size_t)RSTRING_LEN(sa) != SS_LEN(&ss)) {
rb_raise(rb_eTypeError, "sockaddr size differs - should not happen");
}
- sap = &ss.addr;
- salen = RSTRING_SOCKLEN(sa);
+ sap = (struct sockaddr*)&ss;
goto call_nameinfo;
}
tmp = rb_check_array_type(sa);
@@ -1381,14 +1299,13 @@ sock_s_getnameinfo(int argc, VALUE *argv)
error = rb_getaddrinfo(hptr, pptr, &hints, &res);
if (error) goto error_exit_addr;
sap = res->ai_addr;
- salen = res->ai_addrlen;
}
else {
rb_raise(rb_eTypeError, "expecting String or Array");
}
call_nameinfo:
- error = rb_getnameinfo(sap, salen, hbuf, sizeof(hbuf),
+ error = rb_getnameinfo(sap, SA_LEN(sap), hbuf, sizeof(hbuf),
pbuf, sizeof(pbuf), fl);
if (error) goto error_exit_name;
if (res) {
@@ -1396,8 +1313,7 @@ sock_s_getnameinfo(int argc, VALUE *argv)
char hbuf2[1024], pbuf2[1024];
sap = r->ai_addr;
- salen = r->ai_addrlen;
- error = rb_getnameinfo(sap, salen, hbuf2, sizeof(hbuf2),
+ error = rb_getnameinfo(sap, SA_LEN(sap), hbuf2, sizeof(hbuf2),
pbuf2, sizeof(pbuf2), fl);
if (error) goto error_exit_name;
if (strcmp(hbuf, hbuf2) != 0|| strcmp(pbuf, pbuf2) != 0) {
@@ -1483,7 +1399,7 @@ sock_s_unpack_sockaddr_in(VALUE self, VALUE addr)
rb_raise(rb_eArgError, "not an AF_INET sockaddr");
#endif
}
- host = rsock_make_ipaddr((struct sockaddr*)sockaddr, RSTRING_SOCKLEN(addr));
+ host = rsock_make_ipaddr((struct sockaddr*)sockaddr);
OBJ_INFECT(host, addr);
return rb_assoc_new(INT2NUM(ntohs(sockaddr->sin_port)), host);
}
@@ -1507,13 +1423,14 @@ sock_s_pack_sockaddr_un(VALUE self, VALUE path)
VALUE addr;
StringValue(path);
- INIT_SOCKADDR_UN(&sockaddr, sizeof(struct sockaddr_un));
+ MEMZERO(&sockaddr, struct sockaddr_un, 1);
+ sockaddr.sun_family = AF_UNIX;
if (sizeof(sockaddr.sun_path) < (size_t)RSTRING_LEN(path)) {
rb_raise(rb_eArgError, "too long unix socket path (%"PRIuSIZE" bytes given but %"PRIuSIZE" bytes max)",
(size_t)RSTRING_LEN(path), sizeof(sockaddr.sun_path));
}
memcpy(sockaddr.sun_path, RSTRING_PTR(path), RSTRING_LEN(path));
- addr = rb_str_new((char*)&sockaddr, rsock_unix_sockaddr_len(path));
+ addr = rb_str_new((char*)&sockaddr, sizeof(sockaddr));
OBJ_INFECT(addr, path);
return addr;
@@ -1550,58 +1467,17 @@ sock_s_unpack_sockaddr_un(VALUE self, VALUE addr)
rb_raise(rb_eTypeError, "too long sockaddr_un - %ld longer than %d",
RSTRING_LEN(addr), (int)sizeof(struct sockaddr_un));
}
- path = rsock_unixpath_str(sockaddr, RSTRING_SOCKLEN(addr));
+ path = rsock_unixpath_str(sockaddr, RSTRING_LENINT(addr));
OBJ_INFECT(path, addr);
return path;
}
#endif
#if defined(HAVE_GETIFADDRS) || defined(SIOCGLIFCONF) || defined(SIOCGIFCONF) || defined(_WIN32)
-
-static socklen_t
-sockaddr_len(struct sockaddr *addr)
-{
- if (addr == NULL)
- return 0;
-
-#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN
- if (addr->sa_len != 0)
- return addr->sa_len;
-#endif
-
- switch (addr->sa_family) {
- case AF_INET:
- return (socklen_t)sizeof(struct sockaddr_in);
-
-#ifdef AF_INET6
- case AF_INET6:
- return (socklen_t)sizeof(struct sockaddr_in6);
-#endif
-
-#ifdef HAVE_SYS_UN_H
- case AF_UNIX:
- return (socklen_t)sizeof(struct sockaddr_un);
-#endif
-
-#ifdef AF_PACKET
- case AF_PACKET:
- return (socklen_t)(offsetof(struct sockaddr_ll, sll_addr) + ((struct sockaddr_ll *)addr)->sll_halen);
-#endif
-
- default:
- return (socklen_t)(offsetof(struct sockaddr, sa_family) + sizeof(addr->sa_family));
- }
-}
-
-socklen_t
-rsock_sockaddr_len(struct sockaddr *addr)
-{
- return sockaddr_len(addr);
-}
-
static VALUE
-sockaddr_obj(struct sockaddr *addr, socklen_t len)
+sockaddr_obj(struct sockaddr *addr)
{
+ socklen_t len;
#if defined(AF_INET6) && defined(__KAME__)
struct sockaddr_in6 addr6;
#endif
@@ -1609,14 +1485,18 @@ sockaddr_obj(struct sockaddr *addr, socklen_t len)
if (addr == NULL)
return Qnil;
- len = sockaddr_len(addr);
+ switch (addr->sa_family) {
+ case AF_INET:
+ len = (socklen_t)sizeof(struct sockaddr_in);
+ break;
-#if defined(__KAME__) && defined(AF_INET6)
- if (addr->sa_family == AF_INET6) {
+#ifdef AF_INET6
+ case AF_INET6:
+ len = (socklen_t)sizeof(struct sockaddr_in6);
+# ifdef __KAME__
/* KAME uses the 2nd 16bit word of link local IPv6 address as interface index internally */
/* http://orange.kame.net/dev/cvsweb.cgi/kame/IMPLEMENTATION */
/* convert fe80:1::1 to fe80::1%1 */
- len = (socklen_t)sizeof(struct sockaddr_in6);
memcpy(&addr6, addr, len);
addr = (struct sockaddr *)&addr6;
if (IN6_IS_ADDR_LINKLOCAL(&addr6.sin6_addr) &&
@@ -1626,18 +1506,27 @@ sockaddr_obj(struct sockaddr *addr, socklen_t len)
addr6.sin6_addr.s6_addr[2] = 0;
addr6.sin6_addr.s6_addr[3] = 0;
}
+# endif
+ break;
+#endif
+
+#ifdef HAVE_SYS_UN_H
+ case AF_UNIX:
+ len = (socklen_t)sizeof(struct sockaddr_un);
+ break;
+#endif
+
+ default:
+ len = (socklen_t)sizeof(struct sockaddr_in);
+ break;
}
+#ifdef SA_LEN
+ if (len < (socklen_t)SA_LEN(addr))
+ len = (socklen_t)SA_LEN(addr);
#endif
return rsock_addrinfo_new(addr, len, addr->sa_family, 0, 0, Qnil, Qnil);
}
-
-VALUE
-rsock_sockaddr_obj(struct sockaddr *addr, socklen_t len)
-{
- return sockaddr_obj(addr, len);
-}
-
#endif
#if defined(HAVE_GETIFADDRS) || (defined(SIOCGLIFCONF) && defined(SIOCGLIFNUM) && !defined(__hpux)) || defined(SIOCGIFCONF) || defined(_WIN32)
@@ -1673,28 +1562,7 @@ socket_s_ip_address_list(VALUE self)
list = rb_ary_new();
for (p = ifp; p; p = p->ifa_next) {
if (p->ifa_addr != NULL && IS_IP_FAMILY(p->ifa_addr->sa_family)) {
- struct sockaddr *addr = p->ifa_addr;
-#if defined(AF_INET6) && defined(__sun)
- /*
- * OpenIndiana SunOS 5.11 getifaddrs() returns IPv6 link local
- * address with sin6_scope_id == 0.
- * So fill it from the interface name (ifa_name).
- */
- struct sockaddr_in6 addr6;
- if (addr->sa_family == AF_INET6) {
- socklen_t len = (socklen_t)sizeof(struct sockaddr_in6);
- memcpy(&addr6, addr, len);
- addr = (struct sockaddr *)&addr6;
- if (IN6_IS_ADDR_LINKLOCAL(&addr6.sin6_addr) &&
- addr6.sin6_scope_id == 0) {
- unsigned int ifindex = if_nametoindex(p->ifa_name);
- if (ifindex != 0) {
- addr6.sin6_scope_id = ifindex;
- }
- }
- }
-#endif
- rb_ary_push(list, sockaddr_obj(addr, sockaddr_len(addr)));
+ rb_ary_push(list, sockaddr_obj(p->ifa_addr));
}
}
@@ -1717,7 +1585,7 @@ socket_s_ip_address_list(VALUE self)
fd = socket(AF_INET, SOCK_DGRAM, 0);
if (fd == -1)
- rb_sys_fail("socket(2)");
+ rb_sys_fail("socket");
memset(&ln, 0, sizeof(ln));
ln.lifn_family = AF_UNSPEC;
@@ -1756,7 +1624,7 @@ socket_s_ip_address_list(VALUE self)
}
((struct sockaddr_in6 *)(&req->lifr_addr))->sin6_scope_id = req2.lifr_index;
}
- rb_ary_push(list, sockaddr_obj((struct sockaddr *)&req->lifr_addr, req->lifr_addrlen));
+ rb_ary_push(list, sockaddr_obj((struct sockaddr *)&req->lifr_addr));
}
}
@@ -1775,7 +1643,7 @@ socket_s_ip_address_list(VALUE self)
#elif defined(SIOCGIFCONF)
int fd = -1;
int ret;
-#define EXTRA_SPACE ((int)(sizeof(struct ifconf) + sizeof(union_sockaddr)))
+#define EXTRA_SPACE (sizeof(struct ifconf) + sizeof(struct sockaddr_storage))
char initbuf[4096+EXTRA_SPACE];
char *buf = initbuf;
int bufsize;
@@ -1787,7 +1655,7 @@ socket_s_ip_address_list(VALUE self)
fd = socket(AF_INET, SOCK_DGRAM, 0);
if (fd == -1)
- rb_sys_fail("socket(2)");
+ rb_sys_fail("socket");
bufsize = sizeof(initbuf);
buf = initbuf;
@@ -1828,9 +1696,9 @@ socket_s_ip_address_list(VALUE self)
while ((char*)req < (char*)conf.ifc_req + conf.ifc_len) {
struct sockaddr *addr = &req->ifr_addr;
if (IS_IP_FAMILY(addr->sa_family)) {
- rb_ary_push(list, sockaddr_obj(addr, sockaddr_len(addr)));
+ rb_ary_push(list, sockaddr_obj(addr));
}
-#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN
+#ifdef HAVE_SA_LEN
# ifndef _SIZEOF_ADDR_IFREQ
# define _SIZEOF_ADDR_IFREQ(r) \
(sizeof(struct ifreq) + \
@@ -1945,7 +1813,7 @@ socket_s_ip_address_list(VALUE self)
#else
if (IS_IP_FAMILY(uni->Address.lpSockaddr->sa_family))
#endif
- rb_ary_push(list, sockaddr_obj(uni->Address.lpSockaddr, uni->Address.iSockaddrLength));
+ rb_ary_push(list, sockaddr_obj(uni->Address.lpSockaddr));
}
for (any = adapters->FirstAnycastAddress; any; any = any->Next) {
#ifndef INET6
@@ -1953,7 +1821,7 @@ socket_s_ip_address_list(VALUE self)
#else
if (IS_IP_FAMILY(any->Address.lpSockaddr->sa_family))
#endif
- rb_ary_push(list, sockaddr_obj(any->Address.lpSockaddr, any->Address.iSockaddrLength));
+ rb_ary_push(list, sockaddr_obj(any->Address.lpSockaddr));
}
}
diff --git a/ext/socket/sockport.h b/ext/socket/sockport.h
index a3c698e8a4..5f2fd24530 100644
--- a/ext/socket/sockport.h
+++ b/ext/socket/sockport.h
@@ -10,59 +10,42 @@
#ifndef SOCKPORT_H
#define SOCKPORT_H
-#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN
-# define VALIDATE_SOCKLEN(addr, len) ((addr)->sa_len == (len))
+#ifdef SA_LEN
+# define SS_LEN(ss) (ss)->ss_len
#else
-# define VALIDATE_SOCKLEN(addr, len) ((void)(addr), (void)(len), 1)
+# ifdef HAVE_SA_LEN
+# define SA_LEN(sa) (sa)->sa_len
+# define SS_LEN(ss) (ss)->ss_len
+# else
+# ifdef AF_INET6
+# define SA_LEN(sa) \
+ (((sa)->sa_family == AF_INET6) ? sizeof(struct sockaddr_in6) \
+ : sizeof(struct sockaddr))
+# define SS_LEN(ss) \
+ (((ss)->ss_family == AF_INET6) ? sizeof(struct sockaddr_in6) \
+ : sizeof(struct sockaddr))
+# else
+ /* by tradition, sizeof(struct sockaddr) covers most of the sockaddrs */
+# define SA_LEN(sa) (sizeof(struct sockaddr))
+# define SS_LEN(ss) (sizeof(struct sockaddr))
+# endif
+# endif
#endif
-#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN
+#ifdef HAVE_SA_LEN
# define SET_SA_LEN(sa, len) (void)((sa)->sa_len = (len))
+# define SET_SS_LEN(ss, len) (void)((ss)->ss_len = (len))
#else
# define SET_SA_LEN(sa, len) (void)(len)
+# define SET_SS_LEN(ss, len) (void)(len)
#endif
-/* for strict-aliasing rule */
-#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN
-# define SET_SIN_LEN(sa, len) (void)((sa)->sin_len = (len))
+#ifdef HAVE_SIN_LEN
+# define SIN_LEN(si) (si)->sin_len
+# define SET_SIN_LEN(si,len) (si)->sin_len = (len)
#else
-# define SET_SIN_LEN(sa, len) SET_SA_LEN((struct sockaddr *)(sa), (len))
-#endif
-
-#define INIT_SOCKADDR(addr, family, len) \
- do { \
- struct sockaddr *init_sockaddr_ptr = (addr); \
- socklen_t init_sockaddr_len = (len); \
- memset(init_sockaddr_ptr, 0, init_sockaddr_len); \
- init_sockaddr_ptr->sa_family = (family); \
- SET_SA_LEN(init_sockaddr_ptr, init_sockaddr_len); \
- } while (0)
-
-#define INIT_SOCKADDR_IN(addr, len) \
- do { \
- struct sockaddr_in *init_sockaddr_ptr = (addr); \
- socklen_t init_sockaddr_len = (len); \
- memset(init_sockaddr_ptr, 0, init_sockaddr_len); \
- init_sockaddr_ptr->sin_family = AF_INET; \
- SET_SIN_LEN(init_sockaddr_ptr, init_sockaddr_len); \
- } while (0)
-
-
-/* for strict-aliasing rule */
-#ifdef HAVE_TYPE_STRUCT_SOCKADDR_UN
-# ifdef HAVE_STRUCT_SOCKADDR_IN_SUN_LEN
-# define SET_SUN_LEN(sa, len) (void)((sa)->sun_len = (len))
-# else
-# define SET_SUN_LEN(sa, len) SET_SA_LEN((struct sockaddr *)(sa), (len))
-# endif
-# define INIT_SOCKADDR_UN(addr, len) \
- do { \
- struct sockaddr_un *init_sockaddr_ptr = (addr); \
- socklen_t init_sockaddr_len = (len); \
- memset(init_sockaddr_ptr, 0, init_sockaddr_len); \
- init_sockaddr_ptr->sun_family = AF_UNIX; \
- SET_SUN_LEN(init_sockaddr_ptr, init_sockaddr_len); \
- } while (0)
+# define SIN_LEN(si) sizeof(struct sockaddr_in)
+# define SET_SIN_LEN(si,len)
#endif
#ifndef IN_MULTICAST
diff --git a/ext/socket/tcpserver.c b/ext/socket/tcpserver.c
index 2245a0600d..6596733239 100644
--- a/ext/socket/tcpserver.c
+++ b/ext/socket/tcpserver.c
@@ -12,7 +12,7 @@
/*
* call-seq:
- * TCPServer.new([hostname,] port) => tcpserver
+ * TCPServer.new([hostname,] port) => tcpserver
*
* Creates a new server socket bound to _port_.
*
@@ -22,13 +22,6 @@
* s = serv.accept
* s.puts Time.now
* s.close
- *
- * Internally, TCPServer.new calls getaddrinfo() function to
- * obtain addresses.
- * If getaddrinfo() returns multiple addresses,
- * TCPServer.new tries to create a server socket for each address
- * and returns first one that is successful.
- *
*/
static VALUE
tcp_svr_init(int argc, VALUE *argv, VALUE sock)
@@ -43,8 +36,6 @@ tcp_svr_init(int argc, VALUE *argv, VALUE sock)
* call-seq:
* tcpserver.accept => tcpsocket
*
- * Accepts an incoming connection. It returns a new TCPSocket object.
- *
* TCPServer.open("127.0.0.1", 14641) {|serv|
* s = serv.accept
* s.puts Time.now
@@ -56,17 +47,18 @@ static VALUE
tcp_accept(VALUE sock)
{
rb_io_t *fptr;
- union_sockaddr from;
+ struct sockaddr_storage from;
socklen_t fromlen;
GetOpenFile(sock, fptr);
fromlen = (socklen_t)sizeof(from);
- return rsock_s_accept(rb_cTCPSocket, fptr->fd, &from.addr, &fromlen);
+ return rsock_s_accept(rb_cTCPSocket, fptr->fd,
+ (struct sockaddr*)&from, &fromlen);
}
/*
* call-seq:
- * tcpserver.accept_nonblock => tcpsocket
+ * tcpserver.accept_nonblock => tcpsocket
*
* Accepts an incoming connection using accept(2) after
* O_NONBLOCK is set for the underlying file descriptor.
@@ -101,12 +93,13 @@ static VALUE
tcp_accept_nonblock(VALUE sock)
{
rb_io_t *fptr;
- union_sockaddr from;
+ struct sockaddr_storage from;
socklen_t fromlen;
GetOpenFile(sock, fptr);
fromlen = (socklen_t)sizeof(from);
- return rsock_s_accept_nonblock(rb_cTCPSocket, fptr, &from.addr, &fromlen);
+ return rsock_s_accept_nonblock(rb_cTCPSocket, fptr,
+ (struct sockaddr *)&from, &fromlen);
}
/*
@@ -127,12 +120,12 @@ static VALUE
tcp_sysaccept(VALUE sock)
{
rb_io_t *fptr;
- union_sockaddr from;
+ struct sockaddr_storage from;
socklen_t fromlen;
GetOpenFile(sock, fptr);
fromlen = (socklen_t)sizeof(from);
- return rsock_s_accept(0, fptr->fd, &from.addr, &fromlen);
+ return rsock_s_accept(0, fptr->fd, (struct sockaddr*)&from, &fromlen);
}
void
diff --git a/ext/socket/tcpsocket.c b/ext/socket/tcpsocket.c
index 6217e424d9..7eb6fc7aa2 100644
--- a/ext/socket/tcpsocket.c
+++ b/ext/socket/tcpsocket.c
@@ -32,9 +32,9 @@ tcp_init(int argc, VALUE *argv, VALUE sock)
}
static VALUE
-tcp_sockaddr(struct sockaddr *addr, socklen_t len)
+tcp_sockaddr(struct sockaddr *addr, size_t len)
{
- return rsock_make_ipaddr(addr, len);
+ return rsock_make_ipaddr(addr);
}
/*
diff --git a/ext/socket/udpsocket.c b/ext/socket/udpsocket.c
index a89c453239..0ba4371f1a 100644
--- a/ext/socket/udpsocket.c
+++ b/ext/socket/udpsocket.c
@@ -93,7 +93,7 @@ udp_connect(VALUE sock, VALUE host, VALUE port)
arg.fd = fptr->fd;
ret = rb_ensure(udp_connect_internal, (VALUE)&arg,
rsock_freeaddrinfo, (VALUE)arg.res);
- if (!ret) rsock_sys_fail_host_port("connect(2)", host, port);
+ if (!ret) rb_sys_fail("connect(2)");
return INT2FIX(0);
}
@@ -126,9 +126,7 @@ udp_bind(VALUE sock, VALUE host, VALUE port)
return INT2FIX(0);
}
freeaddrinfo(res0);
-
- rsock_sys_fail_host_port("bind(2)", host, port);
-
+ rb_sys_fail("bind(2)");
return INT2FIX(0);
}
@@ -166,6 +164,7 @@ udp_send(int argc, VALUE *argv, VALUE sock)
if (argc == 2 || argc == 3) {
return rsock_bsock_send(argc, argv, sock);
}
+ rb_secure(4);
rb_scan_args(argc, argv, "4", &arg.mesg, &flags, &host, &port);
StringValue(arg.mesg);
@@ -188,14 +187,14 @@ udp_send(int argc, VALUE *argv, VALUE sock)
}
}
freeaddrinfo(res0);
- rsock_sys_fail_host_port("sendto(2)", host, port);
+ rb_sys_fail("sendto(2)");
return INT2FIX(n);
}
/*
* call-seq:
- * udpsocket.recvfrom_nonblock(maxlen) => [mesg, sender_inet_addr]
- * udpsocket.recvfrom_nonblock(maxlen, flags) => [mesg, sender_inet_addr]
+ * udpsocket.recvfrom_nonblock(maxlen) => [mesg, sender_inet_addr]
+ * udpsocket.recvfrom_nonblock(maxlen, flags) => [mesg, sender_inet_addr]
*
* Receives up to _maxlen_ bytes from +udpsocket+ using recvfrom(2) after
* O_NONBLOCK is set for the underlying file descriptor.
diff --git a/ext/socket/unixserver.c b/ext/socket/unixserver.c
index df9849703b..9bd959d439 100644
--- a/ext/socket/unixserver.c
+++ b/ext/socket/unixserver.c
@@ -31,8 +31,8 @@ unix_svr_init(VALUE sock, VALUE path)
* call-seq:
* unixserver.accept => unixsocket
*
- * Accepts an incoming connection.
- * It returns a new UNIXSocket object.
+ * Accepts a new connection.
+ * It returns new UNIXSocket object.
*
* UNIXServer.open("/tmp/sock") {|serv|
* UNIXSocket.open("/tmp/sock") {|c|
@@ -59,7 +59,7 @@ unix_accept(VALUE sock)
/*
* call-seq:
- * unixserver.accept_nonblock => unixsocket
+ * unixserver.accept_nonblock => unixsocket
*
* Accepts an incoming connection using accept(2) after
* O_NONBLOCK is set for the underlying file descriptor.
diff --git a/ext/socket/unixsocket.c b/ext/socket/unixsocket.c
index 1742496e84..c8557cb4c9 100644
--- a/ext/socket/unixsocket.c
+++ b/ext/socket/unixsocket.c
@@ -13,7 +13,6 @@
#ifdef HAVE_SYS_UN_H
struct unixsock_arg {
struct sockaddr_un *sockaddr;
- socklen_t sockaddrlen;
int fd;
};
@@ -22,39 +21,37 @@ unixsock_connect_internal(VALUE a)
{
struct unixsock_arg *arg = (struct unixsock_arg *)a;
return (VALUE)rsock_connect(arg->fd, (struct sockaddr*)arg->sockaddr,
- arg->sockaddrlen, 0);
+ (socklen_t)sizeof(*arg->sockaddr), 0);
}
VALUE
rsock_init_unixsock(VALUE sock, VALUE path, int server)
{
struct sockaddr_un sockaddr;
- socklen_t sockaddrlen;
int fd, status;
rb_io_t *fptr;
SafeStringValue(path);
fd = rsock_socket(AF_UNIX, SOCK_STREAM, 0);
if (fd < 0) {
- rsock_sys_fail_path("socket(2)", path);
+ rb_sys_fail("socket(2)");
}
- INIT_SOCKADDR_UN(&sockaddr, sizeof(struct sockaddr_un));
+ MEMZERO(&sockaddr, struct sockaddr_un, 1);
+ sockaddr.sun_family = AF_UNIX;
if (sizeof(sockaddr.sun_path) < (size_t)RSTRING_LEN(path)) {
rb_raise(rb_eArgError, "too long unix socket path (%ldbytes given but %dbytes max)",
RSTRING_LEN(path), (int)sizeof(sockaddr.sun_path));
}
memcpy(sockaddr.sun_path, RSTRING_PTR(path), RSTRING_LEN(path));
- sockaddrlen = rsock_unix_sockaddr_len(path);
if (server) {
- status = bind(fd, (struct sockaddr*)&sockaddr, sockaddrlen);
+ status = bind(fd, (struct sockaddr*)&sockaddr, (socklen_t)sizeof(sockaddr));
}
else {
int prot;
struct unixsock_arg arg;
arg.sockaddr = &sockaddr;
- arg.sockaddrlen = sockaddrlen;
arg.fd = fd;
status = (int)rb_protect(unixsock_connect_internal, (VALUE)&arg, &prot);
if (prot) {
@@ -65,13 +62,13 @@ rsock_init_unixsock(VALUE sock, VALUE path, int server)
if (status < 0) {
close(fd);
- rsock_sys_fail_path("connect(2)", path);
+ rb_sys_fail_str(path);
}
if (server) {
if (listen(fd, SOMAXCONN) < 0) {
close(fd);
- rsock_sys_fail_path("listen(2)", path);
+ rb_sys_fail("listen(2)");
}
}
@@ -119,10 +116,8 @@ unix_path(VALUE sock)
if (NIL_P(fptr->pathv)) {
struct sockaddr_un addr;
socklen_t len = (socklen_t)sizeof(addr);
- socklen_t len0 = len;
if (getsockname(fptr->fd, (struct sockaddr*)&addr, &len) < 0)
- rsock_sys_fail_path("getsockname(2)", fptr->pathv);
- if (len0 < len) len = len0;
+ rb_sys_fail(0);
fptr->pathv = rb_obj_freeze(rsock_unixpath_str(&addr, len));
}
return rb_str_dup(fptr->pathv);
@@ -157,13 +152,13 @@ unix_recvfrom(int argc, VALUE *argv, VALUE sock)
return rsock_s_recvfrom(sock, argc, argv, RECV_UNIX);
}
-#if defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && defined(SCM_RIGHTS)
+#if defined(HAVE_ST_MSG_CONTROL) && defined(SCM_RIGHTS)
#define FD_PASSING_BY_MSG_CONTROL 1
#else
#define FD_PASSING_BY_MSG_CONTROL 0
#endif
-#if defined(HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS)
+#if defined(HAVE_ST_MSG_ACCRIGHTS)
#define FD_PASSING_BY_MSG_ACCRIGHTS 1
#else
#define FD_PASSING_BY_MSG_ACCRIGHTS 0
@@ -208,9 +203,9 @@ unix_send_io(VALUE sock, VALUE val)
char buf[1];
#if FD_PASSING_BY_MSG_CONTROL
- union {
+ struct {
struct cmsghdr hdr;
- char pad[sizeof(struct cmsghdr)+8+sizeof(int)+8];
+ char pad[8+sizeof(int)+8];
} cmsg;
#endif
@@ -255,7 +250,7 @@ unix_send_io(VALUE sock, VALUE val)
arg.fd = fptr->fd;
while ((int)BLOCKING_REGION_FD(sendmsg_blocking, &arg) == -1) {
if (!rb_io_wait_writable(arg.fd))
- rsock_sys_fail_path("sendmsg(2)", fptr->pathv);
+ rb_sys_fail("sendmsg(2)");
}
return Qnil;
@@ -303,9 +298,9 @@ unix_recv_io(int argc, VALUE *argv, VALUE sock)
int fd;
#if FD_PASSING_BY_MSG_CONTROL
- union {
+ struct {
struct cmsghdr hdr;
- char pad[sizeof(struct cmsghdr)+8+sizeof(int)+8];
+ char pad[8+sizeof(int)+8];
} cmsg;
#endif
@@ -343,7 +338,7 @@ unix_recv_io(int argc, VALUE *argv, VALUE sock)
arg.fd = fptr->fd;
while ((int)BLOCKING_REGION_FD(recvmsg_blocking, &arg) == -1) {
if (!rb_io_wait_readable(arg.fd))
- rsock_sys_fail_path("recvmsg(2)", fptr->pathv);
+ rb_sys_fail("recvmsg(2)");
}
#if FD_PASSING_BY_MSG_CONTROL
@@ -381,7 +376,7 @@ unix_recv_io(int argc, VALUE *argv, VALUE sock)
#else
if (arg.msg.msg_accrightslen != sizeof(fd)) {
rb_raise(rb_eSocket,
- "file descriptor was not passed (accrightslen=%d, %d expected)",
+ "file descriptor was not passed (accrightslen) : %d != %d",
arg.msg.msg_accrightslen, (int)sizeof(fd));
}
#endif
@@ -425,13 +420,11 @@ unix_addr(VALUE sock)
rb_io_t *fptr;
struct sockaddr_un addr;
socklen_t len = (socklen_t)sizeof addr;
- socklen_t len0 = len;
GetOpenFile(sock, fptr);
if (getsockname(fptr->fd, (struct sockaddr*)&addr, &len) < 0)
- rsock_sys_fail_path("getsockname(2)", fptr->pathv);
- if (len0 < len) len = len0;
+ rb_sys_fail("getsockname(2)");
return rsock_unixaddr(&addr, len);
}
@@ -453,13 +446,11 @@ unix_peeraddr(VALUE sock)
rb_io_t *fptr;
struct sockaddr_un addr;
socklen_t len = (socklen_t)sizeof addr;
- socklen_t len0 = len;
GetOpenFile(sock, fptr);
if (getpeername(fptr->fd, (struct sockaddr*)&addr, &len) < 0)
- rsock_sys_fail_path("getpeername(2)", fptr->pathv);
- if (len0 < len) len = len0;
+ rb_sys_fail("getpeername(2)");
return rsock_unixaddr(&addr, len);
}
diff --git a/ext/stringio/depend b/ext/stringio/depend
index db356dd6e0..e3f3409ed7 100644
--- a/ext/stringio/depend
+++ b/ext/stringio/depend
@@ -1,4 +1,3 @@
-stringio.o: stringio.c $(HDRS) $(ruby_headers) \
- $(hdrdir)/ruby/io.h \
- $(hdrdir)/ruby/encoding.h \
- $(hdrdir)/ruby/oniguruma.h
+stringio.o: stringio.c $(hdrdir)/ruby/ruby.h $(arch_hdrdir)/ruby/config.h \
+ $(hdrdir)/ruby/defines.h $(hdrdir)/ruby/intern.h $(hdrdir)/ruby/io.h \
+ $(hdrdir)/ruby/encoding.h
diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c
index 3fef619de6..26872e0978 100644
--- a/ext/stringio/stringio.c
+++ b/ext/stringio/stringio.c
@@ -78,7 +78,6 @@ static const rb_data_type_t strio_data_type = {
strio_free,
strio_memsize,
},
- NULL, NULL, RUBY_TYPED_FREE_IMMEDIATELY
};
#define check_strio(self) ((struct StringIO*)rb_check_typeddata((self), &strio_data_type))
@@ -103,7 +102,6 @@ strio_substr(struct StringIO *ptr, long pos, long len)
if (len > rlen) len = rlen;
if (len < 0) len = 0;
- if (len == 0) return rb_str_new(0,0);
return rb_enc_str_new(RSTRING_PTR(str)+pos, len, enc);
}
@@ -120,8 +118,6 @@ typedef char strio_flags_check[(STRIO_READABLE/FMODE_READABLE == STRIO_WRITABLE/
#define READABLE(strio) STRIO_MODE_SET_P(strio, READABLE)
#define WRITABLE(strio) STRIO_MODE_SET_P(strio, WRITABLE)
-static VALUE sym_exception;
-
static struct StringIO*
readable(VALUE strio)
{
@@ -140,6 +136,7 @@ writable(VALUE strio)
rb_raise(rb_eIOError, "not opened for writing");
}
if (!OBJ_TAINTED(ptr->string)) {
+ rb_secure(4);
}
return ptr;
}
@@ -497,12 +494,16 @@ strio_set_lineno(VALUE self, VALUE lineno)
return lineno;
}
+/* call-seq: strio.binmode -> true */
#define strio_binmode strio_self
+/* call-seq: strio.fcntl */
#define strio_fcntl strio_unimpl
+/* call-seq: strio.flush -> strio */
#define strio_flush strio_self
+/* call-seq: strio.fsync -> 0 */
#define strio_fsync strio_0
/*
@@ -622,6 +623,7 @@ strio_get_sync(VALUE self)
return Qtrue;
}
+/* call-seq: strio.sync = boolean -> boolean */
#define strio_set_sync strio_first
#define strio_tell strio_get_pos
@@ -648,7 +650,7 @@ strio_each_byte(VALUE self)
}
/*
- * This is a deprecated alias for #each_byte.
+ * This is a deprecated alias for <code>each_byte</code>.
*/
static VALUE
strio_bytes(VALUE self)
@@ -1186,7 +1188,7 @@ strio_write(VALUE self, VALUE str)
ptr->pos = olen;
}
if (ptr->pos == olen) {
- rb_enc_str_buf_cat(ptr->string, RSTRING_PTR(str), len, enc);
+ rb_str_cat(ptr->string, RSTRING_PTR(str), len);
}
else {
strio_extend(ptr, ptr->pos, len);
@@ -1329,7 +1331,6 @@ strio_read(int argc, VALUE *argv, VALUE self)
/*
* call-seq:
* strio.sysread(integer[, outbuf]) -> string
- * strio.readpartial(integer[, outbuf]) -> string
*
* Similar to #read, but raises +EOFError+ at end of string instead of
* returning +nil+, as well as IO#sysread does.
@@ -1344,59 +1345,24 @@ strio_sysread(int argc, VALUE *argv, VALUE self)
return val;
}
+#define strio_syswrite rb_io_write
+
/*
* call-seq:
- * strio.read_nonblock(integer[, outbuf [, opts]]) -> string
+ * strio.isatty -> nil
+ * strio.tty? -> nil
*
- * Similar to #read, but raises +EOFError+ at end of string unless the
- * +exception: false+ option is passed in.
*/
-static VALUE
-strio_read_nonblock(int argc, VALUE *argv, VALUE self)
-{
- VALUE opts = Qnil, val;
- int no_exception = 0;
-
- rb_scan_args(argc, argv, "11:", NULL, NULL, &opts);
-
- if (!NIL_P(opts)) {
- argc--;
-
- if (Qfalse == rb_hash_aref(opts, sym_exception))
- no_exception = 1;
- }
-
- val = strio_read(argc, argv, self);
- if (NIL_P(val)) {
- if (no_exception)
- return Qnil;
- else
- rb_eof_error();
- }
-
- return val;
-}
-
-#define strio_syswrite rb_io_write
-
-static VALUE
-strio_syswrite_nonblock(int argc, VALUE *argv, VALUE self)
-{
- VALUE str;
-
- rb_scan_args(argc, argv, "10:", &str, NULL);
- return strio_syswrite(self, str);
-}
-
#define strio_isatty strio_false
+/* call-seq: strio.pid -> nil */
#define strio_pid strio_nil
+/* call-seq: strio.fileno -> nil */
#define strio_fileno strio_nil
/*
* call-seq:
- * strio.length -> integer
* strio.size -> integer
*
* Returns the size of the buffer string.
@@ -1511,8 +1477,6 @@ Init_stringio()
rb_define_method(StringIO, "lineno", strio_get_lineno, 0);
rb_define_method(StringIO, "lineno=", strio_set_lineno, 1);
-
- /* call-seq: strio.binmode -> true */
rb_define_method(StringIO, "binmode", strio_binmode, 0);
rb_define_method(StringIO, "close", strio_close, 0);
rb_define_method(StringIO, "close_read", strio_close_read, 0);
@@ -1522,18 +1486,14 @@ Init_stringio()
rb_define_method(StringIO, "closed_write?", strio_closed_write, 0);
rb_define_method(StringIO, "eof", strio_eof, 0);
rb_define_method(StringIO, "eof?", strio_eof, 0);
- /* call-seq: strio.fcntl */
rb_define_method(StringIO, "fcntl", strio_fcntl, -1);
- /* call-seq: strio.flush -> strio */
rb_define_method(StringIO, "flush", strio_flush, 0);
- /* call-seq: strio.fsync -> 0 */
rb_define_method(StringIO, "fsync", strio_fsync, 0);
rb_define_method(StringIO, "pos", strio_get_pos, 0);
rb_define_method(StringIO, "pos=", strio_set_pos, 1);
rb_define_method(StringIO, "rewind", strio_rewind, 0);
rb_define_method(StringIO, "seek", strio_seek, -1);
rb_define_method(StringIO, "sync", strio_get_sync, 0);
- /* call-seq: strio.sync = boolean -> boolean */
rb_define_method(StringIO, "sync=", strio_set_sync, 1);
rb_define_method(StringIO, "tell", strio_tell, 0);
@@ -1557,19 +1517,9 @@ Init_stringio()
rb_define_method(StringIO, "write", strio_write, 1);
rb_define_method(StringIO, "putc", strio_putc, 1);
- /*
- * call-seq:
- * strio.isatty -> nil
- * strio.tty? -> nil
- *
- */
rb_define_method(StringIO, "isatty", strio_isatty, 0);
rb_define_method(StringIO, "tty?", strio_isatty, 0);
-
- /* call-seq: strio.pid -> nil */
rb_define_method(StringIO, "pid", strio_pid, 0);
-
- /* call-seq: strio.fileno -> nil */
rb_define_method(StringIO, "fileno", strio_fileno, 0);
rb_define_method(StringIO, "size", strio_size, 0);
rb_define_method(StringIO, "length", strio_size, 0);
@@ -1580,25 +1530,23 @@ Init_stringio()
rb_define_method(StringIO, "set_encoding", strio_set_encoding, -1);
{
- VALUE mReadable = rb_define_module_under(rb_cIO, "generic_readable");
+ VALUE mReadable = rb_define_module_under(rb_cIO, "readable");
rb_define_method(mReadable, "readchar", strio_readchar, 0);
rb_define_method(mReadable, "readbyte", strio_readbyte, 0);
rb_define_method(mReadable, "readline", strio_readline, -1);
rb_define_method(mReadable, "sysread", strio_sysread, -1);
rb_define_method(mReadable, "readpartial", strio_sysread, -1);
- rb_define_method(mReadable, "read_nonblock", strio_read_nonblock, -1);
+ rb_define_method(mReadable, "read_nonblock", strio_sysread, -1);
rb_include_module(StringIO, mReadable);
}
{
- VALUE mWritable = rb_define_module_under(rb_cIO, "generic_writable");
+ VALUE mWritable = rb_define_module_under(rb_cIO, "writable");
rb_define_method(mWritable, "<<", strio_addstr, 1);
rb_define_method(mWritable, "print", strio_print, -1);
rb_define_method(mWritable, "printf", strio_printf, -1);
rb_define_method(mWritable, "puts", strio_puts, -1);
rb_define_method(mWritable, "syswrite", strio_syswrite, 1);
- rb_define_method(mWritable, "write_nonblock", strio_syswrite_nonblock, -1);
+ rb_define_method(mWritable, "write_nonblock", strio_syswrite, 1);
rb_include_module(StringIO, mWritable);
}
-
- sym_exception = ID2SYM(rb_intern("exception"));
}
diff --git a/ext/strscan/depend b/ext/strscan/depend
index 689510ec66..76f6e0b18b 100644
--- a/ext/strscan/depend
+++ b/ext/strscan/depend
@@ -1,7 +1,2 @@
-strscan.o: strscan.c $(HDRS) $(ruby_headers) \
- $(hdrdir)/re.h \
- $(hdrdir)/regex.h \
- $(hdrdir)/encoding.h \
- $(hdrdir)/oniguruma.h \
- $(top_srcdir)/regint.h \
- $(top_srcdir)/regenc.h
+strscan.o: strscan.c $(hdrdir)/ruby.h $(hdrdir)/re.h $(hdrdir)/regex.h \
+ $(hdrdir)/oniguruma.h $(topdir)/config.h $(hdrdir)/defines.h
diff --git a/ext/strscan/strscan.c b/ext/strscan/strscan.c
index f020ba780d..b81e1f1833 100644
--- a/ext/strscan/strscan.c
+++ b/ext/strscan/strscan.c
@@ -38,9 +38,6 @@ struct strscanner
/* the regexp register; legal only when MATCHED_P(s) */
struct re_registers regs;
-
- /* regexp used for last scan */
- VALUE regex;
};
#define MATCHED_P(s) ((s)->flags & FLAG_MATCHED)
@@ -190,8 +187,7 @@ strscan_memsize(const void *ptr)
static const rb_data_type_t strscanner_type = {
"StringScanner",
- {strscan_mark, strscan_free, strscan_memsize},
- NULL, NULL, RUBY_TYPED_FREE_IMMEDIATELY
+ {strscan_mark, strscan_free, strscan_memsize}
};
static VALUE
@@ -460,8 +456,6 @@ strscan_do_scan(VALUE self, VALUE regex, int succptr, int getstr, int headonly)
if (S_RESTLEN(p) < 0) {
return Qnil;
}
-
- p->regex = regex;
re = rb_reg_prepare_re(regex, p->str);
tmpreg = re != RREGEXP(regex)->ptr;
if (!tmpreg) RREGEXP(regex)->usecnt++;
@@ -976,25 +970,6 @@ strscan_matched_size(VALUE self)
return INT2NUM(p->regs.end[0] - p->regs.beg[0]);
}
-static int
-name_to_backref_number(struct re_registers *regs, VALUE regexp, const char* name, const char* name_end)
-{
- int num;
-
- num = onig_name_to_backref_number(RREGEXP(regexp)->ptr,
- (const unsigned char* )name, (const unsigned char* )name_end, regs);
- if (num >= 1) {
- return num;
- }
- else {
- VALUE s = rb_str_new(name, (long )(name_end - name));
- rb_raise(rb_eIndexError, "undefined group name reference: %s",
- StringValuePtr(s));
- }
-
- UNREACHABLE;
-}
-
/*
* call-seq: [](n)
*
@@ -1008,43 +983,17 @@ name_to_backref_number(struct re_registers *regs, VALUE regexp, const char* name
* s[3] # -> "12"
* s.post_match # -> "1975 14:39"
* s.pre_match # -> ""
- *
- * s.reset
- * s.scan(/(?<wday>\w+) (?<month>\w+) (?<day>\d+) /) # -> "Fri Dec 12 "
- * s[0] # -> "Fri Dec 12 "
- * s[1] # -> "Fri"
- * s[2] # -> "Dec"
- * s[3] # -> "12"
- * s[:wday] # -> "Fri"
- * s[:month] # -> "Dec"
- * s[:day] # -> "12"
- * s.post_match # -> "1975 14:39"
- * s.pre_match # -> ""
*/
static VALUE
strscan_aref(VALUE self, VALUE idx)
{
- const char *name;
struct strscanner *p;
long i;
GET_SCANNER(self, p);
if (! MATCHED_P(p)) return Qnil;
- switch (TYPE(idx)) {
- case T_SYMBOL:
- name = rb_id2name(SYM2ID(idx));
- goto name_to_backref;
- break;
- case T_STRING:
- name = StringValuePtr(idx);
- name_to_backref:
- i = name_to_backref_number(&(p->regs), p->regex, name, name + strlen(name));
- break;
- default:
- i = NUM2LONG(idx);
- }
-
+ i = NUM2LONG(idx);
if (i < 0)
i += p->regs.num_regs;
if (i < 0) return Qnil;
diff --git a/ext/syslog/depend b/ext/syslog/depend
index 0e2d76fbf6..45cbea293a 100644
--- a/ext/syslog/depend
+++ b/ext/syslog/depend
@@ -1,2 +1,2 @@
-syslog.o: syslog.c $(HDRS) $(ruby_headers) \
- $(hdrdir)/util.h
+syslog.o: syslog.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h \
+ $(hdrdir)/intern.h
diff --git a/ext/syslog/lib/syslog/logger.rb b/ext/syslog/lib/syslog/logger.rb
index 086f83c591..a8d089a094 100644
--- a/ext/syslog/lib/syslog/logger.rb
+++ b/ext/syslog/lib/syslog/logger.rb
@@ -24,14 +24,6 @@ require 'logger'
# log = Syslog::Logger.new 'my_program'
# log.info 'this line will be logged via syslog(3)'
#
-# Also the facility may be set to specify the facility level which will be used:
-#
-# log.info 'this line will be logged using Syslog default facility level'
-#
-# log_local1 = Syslog::Logger.new 'my_program', Syslog::LOG_LOCAL1
-# log_local1.info 'this line will be logged using local1 facility level'
-#
-#
# You may need to perform some syslog.conf setup first. For a BSD machine add
# the following lines to /etc/syslog.conf:
#
@@ -71,9 +63,9 @@ class Syslog::Logger
##
# Maps Logger warning types to syslog(3) warning types.
#
- # Messages from Ruby applications are not considered as critical as messages
+ # Messages from ruby applications are not considered as critical as messages
# from other system daemons using syslog(3), so most messages are reduced by
- # one level. For example, a fatal message for Ruby's Logger is considered
+ # one level. For example, a fatal message for ruby's Logger is considered
# an error for syslog(3).
LEVEL_MAP = {
@@ -176,24 +168,17 @@ class Syslog::Logger
attr_accessor :formatter
##
- # The facility argument is used to specify what type of program is logging the message.
-
- attr_accessor :facility
-
- ##
# Fills in variables for Logger compatibility. If this is the first
# instance of Syslog::Logger, +program_name+ may be set to change the logged
- # program name. The +facility+ may be set to specify the facility level which will be used.
+ # program name.
#
# Due to the way syslog works, only one program name may be chosen.
- def initialize program_name = 'ruby', facility = nil
+ def initialize program_name = 'ruby'
@level = ::Logger::DEBUG
@formatter = Formatter.new
@@syslog ||= Syslog.open(program_name)
-
- @facility = (facility || @@syslog.facility)
end
##
@@ -202,7 +187,8 @@ class Syslog::Logger
def add severity, message = nil, progname = nil, &block
severity ||= ::Logger::UNKNOWN
@level <= severity and
- @@syslog.log( (LEVEL_MAP[severity] | @facility), '%s', formatter.call(severity, Time.now, progname, (message || block.call)) )
+ @@syslog.log LEVEL_MAP[severity], '%s', formatter.call(severity, Time.now, progname, (message || block.call))
true
end
end
+
diff --git a/ext/syslog/syslog.c b/ext/syslog/syslog.c
index 17c5ef8969..34541837c4 100644
--- a/ext/syslog/syslog.c
+++ b/ext/syslog/syslog.c
@@ -37,6 +37,7 @@ static void syslog_write(int pri, int argc, VALUE *argv)
{
VALUE str;
+ rb_secure(4);
if (argc < 1) {
rb_raise(rb_eArgError, "no log message supplied");
}
@@ -55,6 +56,7 @@ static void syslog_write(int pri, int argc, VALUE *argv)
*/
static VALUE mSyslog_close(VALUE self)
{
+ rb_secure(4);
if (!syslog_opened) {
rb_raise(rb_eRuntimeError, "syslog not opened");
}
@@ -261,6 +263,7 @@ static VALUE mSyslog_get_mask(VALUE self)
*/
static VALUE mSyslog_set_mask(VALUE self, VALUE mask)
{
+ rb_secure(4);
if (!syslog_opened) {
rb_raise(rb_eRuntimeError, "must open syslog before setting log mask");
}
@@ -443,7 +446,7 @@ void Init_syslog()
rb_define_module_function(mSyslog, "mask", mSyslog_get_mask, 0);
rb_define_module_function(mSyslog, "mask=", mSyslog_set_mask, 1);
- rb_define_singleton_method(mSyslog, "inspect", mSyslog_inspect, 0);
+ rb_define_module_function(mSyslog, "inspect", mSyslog_inspect, 0);
rb_define_module_function(mSyslog, "instance", mSyslog_instance, 0);
/* Syslog options */
diff --git a/ext/thread/extconf.rb b/ext/thread/extconf.rb
deleted file mode 100644
index f2f0890580..0000000000
--- a/ext/thread/extconf.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-require 'mkmf'
-
-create_makefile('thread')
diff --git a/ext/thread/thread.c b/ext/thread/thread.c
deleted file mode 100644
index b8be5d883f..0000000000
--- a/ext/thread/thread.c
+++ /dev/null
@@ -1,604 +0,0 @@
-#include <ruby.h>
-
-enum {
- CONDVAR_WAITERS = 0
-};
-
-enum {
- QUEUE_QUE = 0,
- QUEUE_WAITERS = 1,
- SZQUEUE_WAITERS = 2,
- SZQUEUE_MAX = 3
-};
-
-#define GET_CONDVAR_WAITERS(cv) RSTRUCT_GET((cv), CONDVAR_WAITERS)
-
-#define GET_QUEUE_QUE(q) RSTRUCT_GET((q), QUEUE_QUE)
-#define GET_QUEUE_WAITERS(q) RSTRUCT_GET((q), QUEUE_WAITERS)
-#define GET_SZQUEUE_WAITERS(q) RSTRUCT_GET((q), SZQUEUE_WAITERS)
-#define GET_SZQUEUE_MAX(q) RSTRUCT_GET((q), SZQUEUE_MAX)
-#define GET_SZQUEUE_ULONGMAX(q) NUM2ULONG(GET_SZQUEUE_MAX(q))
-
-static VALUE
-ary_buf_new(void)
-{
- return rb_ary_tmp_new(1);
-}
-
-static void
-wakeup_first_thread(VALUE list)
-{
- VALUE thread;
-
- while (!NIL_P(thread = rb_ary_shift(list))) {
- if (RTEST(rb_thread_wakeup_alive(thread))) break;
- }
-}
-
-static void
-wakeup_all_threads(VALUE list)
-{
- VALUE thread;
- long i;
-
- for (i=0; i<RARRAY_LEN(list); i++) {
- thread = RARRAY_AREF(list, i);
- rb_thread_wakeup_alive(thread);
- }
- rb_ary_clear(list);
-}
-
-/*
- * Document-class: ConditionVariable
- *
- * ConditionVariable objects augment class Mutex. Using condition variables,
- * it is possible to suspend while in the middle of a critical section until a
- * resource becomes available.
- *
- * Example:
- *
- * require 'thread'
- *
- * mutex = Mutex.new
- * resource = ConditionVariable.new
- *
- * a = Thread.new {
- * mutex.synchronize {
- * # Thread 'a' now needs the resource
- * resource.wait(mutex)
- * # 'a' can now have the resource
- * }
- * }
- *
- * b = Thread.new {
- * mutex.synchronize {
- * # Thread 'b' has finished using the resource
- * resource.signal
- * }
- * }
- */
-
-/*
- * Document-method: ConditionVariable::new
- *
- * Creates a new condition variable instance.
- */
-
-static VALUE
-rb_condvar_initialize(VALUE self)
-{
- RSTRUCT_SET(self, CONDVAR_WAITERS, ary_buf_new());
- return self;
-}
-
-struct sleep_call {
- VALUE mutex;
- VALUE timeout;
-};
-
-static ID id_sleep;
-
-static VALUE
-do_sleep(VALUE args)
-{
- struct sleep_call *p = (struct sleep_call *)args;
- return rb_funcall2(p->mutex, id_sleep, 1, &p->timeout);
-}
-
-static VALUE
-delete_current_thread(VALUE ary)
-{
- return rb_ary_delete(ary, rb_thread_current());
-}
-
-/*
- * Document-method: ConditionVariable#wait
- * call-seq: wait(mutex, timeout=nil)
- *
- * Releases the lock held in +mutex+ and waits; reacquires the lock on wakeup.
- *
- * If +timeout+ is given, this method returns after +timeout+ seconds passed,
- * even if no other thread doesn't signal.
- */
-
-static VALUE
-rb_condvar_wait(int argc, VALUE *argv, VALUE self)
-{
- VALUE waiters = GET_CONDVAR_WAITERS(self);
- VALUE mutex, timeout;
- struct sleep_call args;
-
- rb_scan_args(argc, argv, "11", &mutex, &timeout);
-
- args.mutex = mutex;
- args.timeout = timeout;
- rb_ary_push(waiters, rb_thread_current());
- rb_ensure(do_sleep, (VALUE)&args, delete_current_thread, waiters);
-
- return self;
-}
-
-/*
- * Document-method: ConditionVariable#signal
- *
- * Wakes up the first thread in line waiting for this lock.
- */
-
-static VALUE
-rb_condvar_signal(VALUE self)
-{
- wakeup_first_thread(GET_CONDVAR_WAITERS(self));
- return self;
-}
-
-/*
- * Document-method: ConditionVariable#broadcast
- *
- * Wakes up all threads waiting for this lock.
- */
-
-static VALUE
-rb_condvar_broadcast(VALUE self)
-{
- wakeup_all_threads(GET_CONDVAR_WAITERS(self));
- return self;
-}
-
-/*
- * Document-class: Queue
- *
- * This class provides a way to synchronize communication between threads.
- *
- * Example:
- *
- * require 'thread'
- * queue = Queue.new
- *
- * producer = Thread.new do
- * 5.times do |i|
- * sleep rand(i) # simulate expense
- * queue << i
- * puts "#{i} produced"
- * end
- * end
- *
- * consumer = Thread.new do
- * 5.times do |i|
- * value = queue.pop
- * sleep rand(i/2) # simulate expense
- * puts "consumed #{value}"
- * end
- * end
- *
- */
-
-/*
- * Document-method: Queue::new
- *
- * Creates a new queue instance.
- */
-
-static VALUE
-rb_queue_initialize(VALUE self)
-{
- RSTRUCT_SET(self, QUEUE_QUE, ary_buf_new());
- RSTRUCT_SET(self, QUEUE_WAITERS, ary_buf_new());
- return self;
-}
-
-static VALUE
-queue_do_push(VALUE self, VALUE obj)
-{
- rb_ary_push(GET_QUEUE_QUE(self), obj);
- wakeup_first_thread(GET_QUEUE_WAITERS(self));
- return self;
-}
-
-/*
- * Document-method: Queue#push
- * call-seq:
- * push(object)
- * enq(object)
- * <<(object)
- *
- * Pushes the given +object+ to the queue.
- */
-
-static VALUE
-rb_queue_push(VALUE self, VALUE obj)
-{
- return queue_do_push(self, obj);
-}
-
-static unsigned long
-queue_length(VALUE self)
-{
- return RARRAY_LEN(GET_QUEUE_QUE(self));
-}
-
-static unsigned long
-queue_num_waiting(VALUE self)
-{
- return RARRAY_LEN(GET_QUEUE_WAITERS(self));
-}
-
-struct waiting_delete {
- VALUE waiting;
- VALUE th;
-};
-
-static VALUE
-queue_delete_from_waiting(struct waiting_delete *p)
-{
- rb_ary_delete(p->waiting, p->th);
- return Qnil;
-}
-
-static VALUE
-queue_sleep(VALUE arg)
-{
- rb_thread_sleep_deadly();
- return Qnil;
-}
-
-static VALUE
-queue_do_pop(VALUE self, VALUE should_block)
-{
- struct waiting_delete args;
- args.waiting = GET_QUEUE_WAITERS(self);
- args.th = rb_thread_current();
-
- while (queue_length(self) == 0) {
- if (!(int)should_block) {
- rb_raise(rb_eThreadError, "queue empty");
- }
- rb_ary_push(args.waiting, args.th);
- rb_ensure(queue_sleep, (VALUE)0, queue_delete_from_waiting, (VALUE)&args);
- }
-
- return rb_ary_shift(GET_QUEUE_QUE(self));
-}
-
-static VALUE
-queue_pop_should_block(int argc, VALUE *argv)
-{
- VALUE should_block = Qtrue;
- switch (argc) {
- case 0:
- break;
- case 1:
- should_block = RTEST(argv[0]) ? Qfalse : Qtrue;
- break;
- default:
- rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)", argc);
- }
- return should_block;
-}
-
-/*
- * Document-method: Queue#pop
- * call-seq:
- * pop(non_block=false)
- * deq(non_block=false)
- * shift(non_block=false)
- *
- * Retrieves data from the queue.
- *
- * If the queue is empty, the calling thread is suspended until data is pushed
- * onto the queue. If +non_block+ is true, the thread isn't suspended, and an
- * exception is raised.
- */
-
-static VALUE
-rb_queue_pop(int argc, VALUE *argv, VALUE self)
-{
- VALUE should_block = queue_pop_should_block(argc, argv);
- return queue_do_pop(self, should_block);
-}
-
-/*
- * Document-method: Queue#empty?
- * call-seq: empty?
- *
- * Returns +true+ if the queue is empty.
- */
-
-static VALUE
-rb_queue_empty_p(VALUE self)
-{
- return queue_length(self) == 0 ? Qtrue : Qfalse;
-}
-
-/*
- * Document-method: Queue#clear
- *
- * Removes all objects from the queue.
- */
-
-static VALUE
-rb_queue_clear(VALUE self)
-{
- rb_ary_clear(GET_QUEUE_QUE(self));
- return self;
-}
-
-/*
- * Document-method: Queue#length
- * call-seq:
- * length
- * size
- *
- * Returns the length of the queue.
- */
-
-static VALUE
-rb_queue_length(VALUE self)
-{
- unsigned long len = queue_length(self);
- return ULONG2NUM(len);
-}
-
-/*
- * Document-method: Queue#num_waiting
- *
- * Returns the number of threads waiting on the queue.
- */
-
-static VALUE
-rb_queue_num_waiting(VALUE self)
-{
- unsigned long len = queue_num_waiting(self);
- return ULONG2NUM(len);
-}
-
-/*
- * Document-class: SizedQueue
- *
- * This class represents queues of specified size capacity. The push operation
- * may be blocked if the capacity is full.
- *
- * See Queue for an example of how a SizedQueue works.
- */
-
-/*
- * Document-method: SizedQueue::new
- * call-seq: new(max)
- *
- * Creates a fixed-length queue with a maximum size of +max+.
- */
-
-static VALUE
-rb_szqueue_initialize(VALUE self, VALUE vmax)
-{
- long max;
-
- max = NUM2LONG(vmax);
- if (max <= 0) {
- rb_raise(rb_eArgError, "queue size must be positive");
- }
-
- RSTRUCT_SET(self, QUEUE_QUE, ary_buf_new());
- RSTRUCT_SET(self, QUEUE_WAITERS, ary_buf_new());
- RSTRUCT_SET(self, SZQUEUE_WAITERS, ary_buf_new());
- RSTRUCT_SET(self, SZQUEUE_MAX, vmax);
-
- return self;
-}
-
-/*
- * Document-method: SizedQueue#max
- *
- * Returns the maximum size of the queue.
- */
-
-static VALUE
-rb_szqueue_max_get(VALUE self)
-{
- return GET_SZQUEUE_MAX(self);
-}
-
-/*
- * Document-method: SizedQueue#max=
- * call-seq: max=(number)
- *
- * Sets the maximum size of the queue to the given +number+.
- */
-
-static VALUE
-rb_szqueue_max_set(VALUE self, VALUE vmax)
-{
- long max = NUM2LONG(vmax), diff = 0;
- VALUE t;
-
- if (max <= 0) {
- rb_raise(rb_eArgError, "queue size must be positive");
- }
- if ((unsigned long)max > GET_SZQUEUE_ULONGMAX(self)) {
- diff = max - GET_SZQUEUE_ULONGMAX(self);
- }
- RSTRUCT_SET(self, SZQUEUE_MAX, vmax);
- while (diff > 0 && !NIL_P(t = rb_ary_shift(GET_QUEUE_QUE(self)))) {
- rb_thread_wakeup_alive(t);
- }
- return vmax;
-}
-
-/*
- * Document-method: SizedQueue#push
- * call-seq:
- * push(object)
- * enq(object)
- * <<(object)
- *
- * Pushes +object+ to the queue.
- *
- * If there is no space left in the queue, waits until space becomes available.
- */
-
-static VALUE
-rb_szqueue_push(VALUE self, VALUE obj)
-{
- struct waiting_delete args;
- args.waiting = GET_QUEUE_WAITERS(self);
- args.th = rb_thread_current();
-
- while (queue_length(self) >= GET_SZQUEUE_ULONGMAX(self)) {
- rb_ary_push(args.waiting, args.th);
- rb_ensure((VALUE (*)())rb_thread_sleep_deadly, (VALUE)0, queue_delete_from_waiting, (VALUE)&args);
- }
- return queue_do_push(self, obj);
-}
-
-static VALUE
-szqueue_do_pop(VALUE self, VALUE should_block)
-{
- VALUE retval = queue_do_pop(self, should_block);
-
- if (queue_length(self) < GET_SZQUEUE_ULONGMAX(self)) {
- wakeup_first_thread(GET_SZQUEUE_WAITERS(self));
- }
-
- return retval;
-}
-
-/*
- * Document-method: SizedQueue#pop
- * call-seq:
- * pop(non_block=false)
- * deq(non_block=false)
- * shift(non_block=false)
- *
- * Retrieves data from the queue.
- *
- * If the queue is empty, the calling thread is suspended until data is pushed
- * onto the queue. If +non_block+ is true, the thread isn't suspended, and an
- * exception is raised.
- */
-
-static VALUE
-rb_szqueue_pop(int argc, VALUE *argv, VALUE self)
-{
- VALUE should_block = queue_pop_should_block(argc, argv);
- return szqueue_do_pop(self, should_block);
-}
-
-/*
- * Document-method: SizedQueue#num_waiting
- *
- * Returns the number of threads waiting on the queue.
- */
-
-static VALUE
-rb_szqueue_num_waiting(VALUE self)
-{
- long len = queue_num_waiting(self);
- len += RARRAY_LEN(GET_SZQUEUE_WAITERS(self));
- return ULONG2NUM(len);
-}
-
-#ifndef UNDER_THREAD
-#define UNDER_THREAD 1
-#endif
-
-void
-Init_thread(void)
-{
-#if UNDER_THREAD
-#define ALIAS_GLOBAL_CONST(name) do { \
- ID id = rb_intern_const(#name); \
- if (!rb_const_defined_at(rb_cObject, id)) { \
- rb_const_set(rb_cObject, id, rb_c##name); \
- } \
- } while (0)
-#define OUTER rb_cThread
-#else
-#define ALIAS_GLOBAL_CONST(name) do { /* nothing */ } while (0)
-#define OUTER 0
-#endif
-
- VALUE rb_cConditionVariable = rb_struct_define_without_accessor_under(
- OUTER,
- "ConditionVariable", rb_cObject, rb_struct_alloc_noinit,
- "waiters", NULL);
- VALUE rb_cQueue = rb_struct_define_without_accessor_under(
- OUTER,
- "Queue", rb_cObject, rb_struct_alloc_noinit,
- "que", "waiters", NULL);
- VALUE rb_cSizedQueue = rb_struct_define_without_accessor_under(
- OUTER,
- "SizedQueue", rb_cQueue, rb_struct_alloc_noinit,
- "que", "waiters", "queue_waiters", "size", NULL);
-
-#if 0
- rb_cConditionVariable = rb_define_class("ConditionVariable", rb_cObject); /* teach rdoc ConditionVariable */
- rb_cQueue = rb_define_class("Queue", rb_cObject); /* teach rdoc Queue */
- rb_cSizedQueue = rb_define_class("SizedQueue", rb_cObject); /* teach rdoc SizedQueue */
-#endif
-
- id_sleep = rb_intern("sleep");
-
- rb_define_method(rb_cConditionVariable, "initialize", rb_condvar_initialize, 0);
- rb_define_method(rb_cConditionVariable, "wait", rb_condvar_wait, -1);
- rb_define_method(rb_cConditionVariable, "signal", rb_condvar_signal, 0);
- rb_define_method(rb_cConditionVariable, "broadcast", rb_condvar_broadcast, 0);
-
- rb_define_method(rb_cQueue, "initialize", rb_queue_initialize, 0);
- rb_define_method(rb_cQueue, "push", rb_queue_push, 1);
- rb_define_method(rb_cQueue, "pop", rb_queue_pop, -1);
- rb_define_method(rb_cQueue, "empty?", rb_queue_empty_p, 0);
- rb_define_method(rb_cQueue, "clear", rb_queue_clear, 0);
- rb_define_method(rb_cQueue, "length", rb_queue_length, 0);
- rb_define_method(rb_cQueue, "num_waiting", rb_queue_num_waiting, 0);
-
- /* Alias for #push. */
- rb_define_alias(rb_cQueue, "enq", "push");
- /* Alias for #push. */
- rb_define_alias(rb_cQueue, "<<", "push");
- /* Alias for #pop. */
- rb_define_alias(rb_cQueue, "deq", "pop");
- /* Alias for #pop. */
- rb_define_alias(rb_cQueue, "shift", "pop");
- /* Alias for #length. */
- rb_define_alias(rb_cQueue, "size", "length");
-
- rb_define_method(rb_cSizedQueue, "initialize", rb_szqueue_initialize, 1);
- rb_define_method(rb_cSizedQueue, "max", rb_szqueue_max_get, 0);
- rb_define_method(rb_cSizedQueue, "max=", rb_szqueue_max_set, 1);
- rb_define_method(rb_cSizedQueue, "push", rb_szqueue_push, 1);
- rb_define_method(rb_cSizedQueue, "pop", rb_szqueue_pop, -1);
- rb_define_method(rb_cSizedQueue, "num_waiting", rb_szqueue_num_waiting, 0);
-
- /* Alias for #push. */
- rb_define_alias(rb_cSizedQueue, "enq", "push");
- /* Alias for #push. */
- rb_define_alias(rb_cSizedQueue, "<<", "push");
- /* Alias for #pop. */
- rb_define_alias(rb_cSizedQueue, "deq", "pop");
- /* Alias for #pop. */
- rb_define_alias(rb_cSizedQueue, "shift", "pop");
-
- rb_provide("thread.rb");
- ALIAS_GLOBAL_CONST(ConditionVariable);
- ALIAS_GLOBAL_CONST(Queue);
- ALIAS_GLOBAL_CONST(SizedQueue);
-}
diff --git a/ext/tk/ChangeLog.tkextlib b/ext/tk/ChangeLog.tkextlib
index 52a0b7ea3a..b4775c55fc 100644
--- a/ext/tk/ChangeLog.tkextlib
+++ b/ext/tk/ChangeLog.tkextlib
@@ -496,7 +496,7 @@ Sat Nov 22 10:31:25 2008 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
2005-04-08 ocean <ocean@ruby-lang.org>
* sample/tkextlib/treectrl/random.rb: fixed typo. (drop node outside of
- widget, or reenter widget while dragging)
+ widget, or reenter widget while draggging)
2005-04-08 ocean <ocean@ruby-lang.org>
diff --git a/ext/tk/MANUAL_tcltklib.eng b/ext/tk/MANUAL_tcltklib.eng
index 957e8ec840..e9f6dc65ce 100644
--- a/ext/tk/MANUAL_tcltklib.eng
+++ b/ext/tk/MANUAL_tcltklib.eng
@@ -37,7 +37,7 @@ module TclTklib
: Same to 'WINDOW | FILE | TIMER | IDLE'.
DONT_WAIT
- : Without this flag, 'do_one_event' waits the occurrence of
+ : Without this flag, 'do_one_event' waits the occurence of
: a target event. With this flag, doesn't wait and returns
: false if there is no target event for processing.
@@ -145,7 +145,7 @@ module TclTklib
mainloop(check_root = true)
: Starts the eventloop. If 'check_root' is true, this method
: doesn't return when a root widget exists.
- : If 'check_root' is false, doesn't return by the other
+ : If 'check_root' is false, doen't return by the other
: reasons than exceptions.
mainloop_thread?
@@ -181,7 +181,7 @@ module TclTklib
: is based on the count of processed events.
: ( see 'set_eventloop_weight' method )
: However, if the eventloop thread is the only thread,
- : timer_tick cannot be set to 0. If 0, then is set to 100 ms
+ : timer_tick cannt be set to 0. If 0, then is set to 100 ms
: automatically (see NO_THREAD_INTERRUPT_TIME on tcltklib.c).
: On $SAFE >= 4, cannot call this method.
@@ -204,9 +204,9 @@ module TclTklib
: That is invalid when the eventloop is the only thread.
: 'loop_max' is the max events for thread-switching.
: 'no_event_tick' is the increment value of the event count
- : when no event for processing (And then, the eventloop thread
+ : when no event for processing (And then, the eventloop thead
: sleeps 'no_event_wait' mili-seconds).
- : 'loop_max == 800' and 'no_event_tick == 10' are default.
+ : 'loop_max == 800' and 'no_event_tick == 10' are defalut.
: On $SAFE >= 4, cannot call this method.
get_eventloop_weight
@@ -215,8 +215,8 @@ module TclTklib
mainloop_abort_on_exception=(bool)
: Define whether the eventloop stops on exception or not.
: If true (default value), stops on exception.
- : If false, show a waring message but ignore the exception.
- : If nil, no warning message and ignore the exception.
+ : If false, show a warinig message but ignore the exception.
+ : If nil, no warning message and ignore the excepsion.
: This parameter is sometimes useful when multiple Tk
: interpreters are working. Because the only one eventloop
: admins all Tk interpreters, sometimes exception on a
@@ -277,11 +277,11 @@ class TclTkIp
: The information is used to generate the root widget of the
: interpreter.
: ( e.g. TclTkIp.new('FOO', '-geometry 500x200 -use 0x2200009') )
- : If is given nil or false for the 'option' argument, generates
+ : If is given nil or falsr for the 'option' argument, generates
: the Tcl interpreter without Tk library. Then the interpreter
: doesn't need GUI environment. Therefore, even if a window
: system doesn't exist or cannot be used, Ruby can control the
- : Tcl interpreter and the extension libraries loaded on the
+ : Tcl interpreter and the extention libraries loaded on the
: interpreter.
[instance methods]
@@ -350,7 +350,7 @@ class TclTkIp
: So _invoke can call only the command which already
: registered on the interpreter by 'load' command and so on.
: On _eval command, auto_load mechanism words. So if succeed
- : to _eval and register the command once, after that, the
+ : to _eval and regist the command once, after that, the
: command can be called by _invoke.
_cancel_eval(str)
@@ -464,8 +464,8 @@ class TkCallbackContinue < StandardError
: 'break' code to Tk interpreter (Then the Tk interpreter will
: break the operation for the current event).
: If raise TkCallbackContinue, returns 'continue' code (Then the Tk
- : interpreter will break the operation for the current bindtag and
- : starts the operation for the next bindtag for the current event).
+ : interpreter will break the operateion for the current bindtag and
+ : starts the operation for the next buindtag for the current event).
: However, current tcltklib supports Ruby's 'break' and 'next' to
: get the same effect. That is, those classes are obsolete. Those
: exist for backward compatibility.
diff --git a/ext/tk/MANUAL_tcltklib.ja b/ext/tk/MANUAL_tcltklib.eucj
index 1de1736f9f..1de1736f9f 100644
--- a/ext/tk/MANUAL_tcltklib.ja
+++ b/ext/tk/MANUAL_tcltklib.eucj
diff --git a/ext/tk/README.1st b/ext/tk/README.1st
index 4ffef34f1d..96564cc67b 100644
--- a/ext/tk/README.1st
+++ b/ext/tk/README.1st
@@ -1,7 +1,7 @@
If you want to use Ruby/Tk (tk.rb and so on), you must have tcltklib.so
which is working correctly. When you have some troubles on compiling,
please read README.tcltklib and README.ActiveTcl.
-Even if there is a tcltklib.so on your Ruby library directory, it will not
+Even if there is a tcltklib.so on your Ruby library directry, it will not
work without Tcl/Tk libraries (e.g. libtcl8.4.so) on your environment.
You must also check that your Tcl/Tk is installed properly.
diff --git a/ext/tk/README.ActiveTcl b/ext/tk/README.ActiveTcl
index 990f612648..b7f023c91b 100644
--- a/ext/tk/README.ActiveTcl
+++ b/ext/tk/README.ActiveTcl
@@ -57,6 +57,6 @@ Based on it, the Tcl interpreter changes auto_path variable's value.
Then, you'll be able to use Tcl/Tk extension libraries included in the
ActiveTcl package (e.g. call TkPackage.require('BWidget'), and then,
-use functions/widgets of BWidget extension).
+use functions/widgets of BWidget extention).
Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
diff --git a/ext/tk/README.tcltklib b/ext/tk/README.tcltklib
index 1367189690..0064586373 100644
--- a/ext/tk/README.tcltklib
+++ b/ext/tk/README.tcltklib
@@ -52,7 +52,7 @@ some or all of the following options.
--with-tclConfig-file=<file>/--without-tclConfig-file
--with-tkConfig-file=<file>/--without-tkConfig-file
- file path of tclConfig.sh/tkConfig.sh, or don't
+ file path of tclConfig.sh/tkConfig.sh, or don't
refer those.
If you want use non-standard filenames of config
files (e.g. tclConfig-static.sh), you must use
@@ -80,11 +80,11 @@ some or all of the following options.
--with-tk-dir=<path>
equal to "--with-tk-include=<path>/include --with-tk-lib=<path>/lib"
- --with-tcl-include=<dir> the directory contains 'tcl.h'
- --with-tk-include=<dir> the directory contains 'tk.h'
+ --with-tcl-include=<dir> the directry contains 'tcl.h'
+ --with-tk-include=<dir> the directry contains 'tk.h'
- --with-tcl-lib=<dir> the directory contains 'libtcl<version>.so'
- --with-tk-lib=<dir> the directory contains 'libtk<version>.so'
+ --with-tcl-lib=<dir> the directry contains 'libtcl<version>.so'
+ --with-tk-lib=<dir> the directry contains 'libtk<version>.so'
--enable-mac-tcltk-framework (MacOS X) use Tcl/Tk framework
(Obsolete. Please use '--enable-tcltk-framework'.)
@@ -116,12 +116,12 @@ some or all of the following options.
--with-X11-dir=<path>
equal to "--with-X11-include=<path>/include --with-X11-lib=<path>/lib"
- --with-X11-include=<dir> the directory contais X11 header files
- --with-X11-lib=<dir> the directory contais X11 libraries
+ --with-X11-include=<dir> the directry contais X11 header files
+ --with-X11-lib=<dir> the directry contais X11 libraries
If you forgot to give the options when do 'configure' on toplevel
-directory of Ruby sources, please try something like as the followings.
+directry of Ruby sources, please try something like as the followings.
$ cd ext/tcltklib
$ rm Makefile
diff --git a/ext/tk/extconf.rb b/ext/tk/extconf.rb
index 6e2ddb79e6..72dd6cf21d 100644
--- a/ext/tk/extconf.rb
+++ b/ext/tk/extconf.rb
@@ -8,21 +8,12 @@ TkLib_Config = {}
TkLib_Config['search_versions'] =
# %w[8.9 8.8 8.7 8.6 8.5 8.4 8.3 8.2 8.1 8.0 7.6 4.2]
# %w[8.7 8.6 8.5 8.4 8.3 8.2 8.1 8.0]
- # %w[8.7 8.6 8.5 8.4 8.0] # to shorten search steps
- %w[8.5 8.4] # At present, Tcl/Tk8.6 is not supported.
-
-TkLib_Config['unsupported_versions'] =
- %w[8.8 8.7 8.6] # At present, Tcl/Tk8.6 is not supported.
+ %w[8.7 8.6 8.5 8.4 8.0] # to shorten search steps
TkLib_Config['major_nums'] = '87'
##############################################################
-
-TkLib_Config['enable-shared'] = enable_config("shared")
-
-
-##############################################################
# use old extconf.rb ?
##############################################################
if with_config('tk-old-extconf')
@@ -123,7 +114,7 @@ def is_macosx?
end
def maybe_64bit?
- /64|universal|s390x/ =~ RUBY_PLATFORM
+ /64|universal/ =~ RUBY_PLATFORM
end
def check_tcltk_version(version)
@@ -322,9 +313,7 @@ def find_macosx_framework
paths.reverse! unless TkLib_Config["ActiveTcl"] # system has higher priority
paths.map{|dir| dir.strip.chomp('/')}.each{|dir|
- next unless File.exist?(File.join(dir, "Tcl.framework", "Headers"))
next unless File.directory?(tcldir = File.join(dir, "Tcl.framework"))
- next unless File.exist?(File.join(dir, "Tk.framework", "Headers"))
next unless File.directory?(tkdir = File.join(dir, "Tk.framework"))
TkLib_Config["tcltk-framework"] = dir
return [tcldir, tkdir]
@@ -551,13 +540,13 @@ end
def get_ext_list()
exts = [CONFIG['DLEXT']]
- exts.concat %w(dll) if is_win32?
+ exts.concat %w(dll lib) if is_win32?
exts.concat %w(bundle dylib) if is_macosx?
- if TkLib_Config["tcltk-stubs"] || TkLib_Config['enable-shared'] == false
- exts.unshift "lib" if is_win32?
- exts.unshift "a"
- exts.unshift CONFIG['LIBEXT']
+ if enable_config("shared") == false
+ [CONFIG['LIBEXT'], "a"].concat exts
+ else
+ exts.concat [CONFIG['LIBEXT'], "a"]
end
if is_win32?
@@ -745,7 +734,6 @@ def search_tclConfig(*paths) # libdir list or [tcl-libdir|file, tk-libdir|file]
end
conf = nil
- progress_flag = false
config_dir.uniq!
config_dir.map{|dir|
@@ -756,7 +744,7 @@ def search_tclConfig(*paths) # libdir list or [tcl-libdir|file, tk-libdir|file]
dir.strip.chomp('/')
end
}.each{|dir|
- print("."); progress_flag = true # progress
+ print(".") # progress
# print("check #{dir} ==>");
if dir.kind_of? Array
tcldir, tkdir = dir
@@ -795,36 +783,10 @@ def search_tclConfig(*paths) # libdir list or [tcl-libdir|file, tk-libdir|file]
# parse tclConfig.sh/tkConfig.sh
tclconf = (tclpath)? parse_tclConfig(tclpath): nil
- if tclconf
- if tclver && ((tclver_major && tclver_major != tclconf['TCL_MAJOR_VERSION']) || (tclver_minor && tclver_minor != tclconf['TCL_MINOR_VERSION']))
- print("\n") if progress_flag
- puts "Ignore \"#{tclpath}\" (unmatch with configured version)."
- progress_flag = false
- next
- end
- if TkLib_Config['unsupported_versions'].find{|ver| ver == "#{tclconf['TCL_MAJOR_VERSION']}.#{tclconf['TCL_MINOR_VERSION']}"}
- print("\n") if progress_flag
- puts "Ignore \"#{tclpath}\" (unsupported version of Tcl/Tk)."
- progress_flag = false
- next
- end
- end
+ next if tclconf && tclver && ((tclver_major && tclver_major != tclconf['TCL_MAJOR_VERSION']) || (tclver_minor && tclver_minor != tclconf['TCL_MINOR_VERSION']))
tkconf = (tkpath)? parse_tclConfig(tkpath): nil
- if tkconf
- if tkver && ((tkver_major && tkver_major != tkconf['TK_MAJOR_VERSION']) || (tkver_minor && tkver_minor != tkconf['TK_MINOR_VERSION']))
- print("\n") if progress_flag
- puts "Ignore \"#{tkpath}\" (unmatch with configured version)."
- progress_flag = false
- next
- end
- if TkLib_Config['unsupported_versions'].find{|ver| ver == "#{tkconf['TK_MAJOR_VERSION']}.#{tkconf['TK_MINOR_VERSION']}"}
- print("\n") if progress_flag
- puts "Ignore \"#{tkpath}\" (unsupported version of Tcl/Tk)."
- progress_flag = false
- next
- end
- end
+ next if tkconf && tkver && ((tkver_major && tkver_major != tkconf['TK_MAJOR_VERSION']) || (tkver_minor && tkver_minor != tkconf['TK_MINOR_VERSION']))
# nativethread check
if !TkLib_Config["ruby_with_thread"]
@@ -1327,10 +1289,6 @@ end
def find_tcltk_library(tcllib, tklib, stubs, tclversion, tkversion,
tcl_opt_paths, tk_opt_paths)
st,path,lib,libs,*inc = find_tcl(tcllib, stubs, tclversion, *tcl_opt_paths)
- if !st && TkLib_Config['enable-shared'] == nil
- TkLib_Config['enable-shared'] = false
- st,path,lib,libs,*inc = find_tcl(tcllib, stubs, tclversion, *tcl_opt_paths)
- end
unless st
puts("Warning:: cannot find Tcl library. tcltklib will not be compiled (tcltklib is disabled on your Ruby. That is, Ruby/Tk will not work). Please check configure options.")
return false
@@ -1343,10 +1301,6 @@ def find_tcltk_library(tcllib, tklib, stubs, tclversion, tkversion,
end
st,path,lib,libs,*inc = find_tk(tklib, stubs, tkversion, *tk_opt_paths)
- if !st && TkLib_Config['enable-shared'] == nil
- TkLib_Config['enable-shared'] = false
- st,path,lib,libs,*inc = find_tk(tklib, stubs, tkversion, *tk_opt_paths)
- end
unless st
puts("Warning:: cannot find Tk library. tcltklib will not be compiled (tcltklib is disabled on your Ruby. That is, Ruby/Tk will not work). Please check configure options.")
return false
@@ -1404,15 +1358,10 @@ def find_tcltk_header(tclver, tkver)
print(".") # progress
if major && minor
# version check on tcl.h
- version_check = proc {|code|
- code << ("#if TCL_MAJOR_VERSION != #{major} || TCL_MINOR_VERSION != #{minor}\n" \
- "#error VERSION does not match\n" \
- "#endif")
- }
+ have_tcl_h = try_cpp("#include <tcl.h>\n#if TCL_MAJOR_VERSION != #{major} || TCL_MINOR_VERSION != #{minor}\n#error VERSION does not match\n#endif")
else
- version_check = nil
+ have_tcl_h = have_header('tcl.h')
end
- have_tcl_h = have_header('tcl.h', &version_check)
unless have_tcl_h
if tclver && ! tclver.empty?
versions = [tclver]
@@ -1434,19 +1383,13 @@ def find_tcltk_header(tclver, tkver)
(File.directory?(dir))? File.expand_path(dir): nil
}.compact.uniq
- if major || minor
- version_check = proc {|code|
- code << "#if TCL_MAJOR_VERSION != #{major}\n#error MAJOR_VERSION does not match\n#endif\n" if major
- code << "#if TCL_MINOR_VERSION != #{minor}\n#error MINOR_VERSION does not match\n#endif\n" if minor
- code
- }
- else
- version_check = nil
- end
+ code = "#include <tcl.h>\n"
+ code << "#if TCL_MAJOR_VERSION != #{major}\n#error MAJOR_VERSION does not match\n#endif\n" if major
+ code << "#if TCL_MINOR_VERSION != #{minor}\n#error MINOR_VERSION does not match\n#endif\n" if minor
have_tcl_h = paths.find{|path|
print(".") # progress
inc_opt = " -I#{path.quote}"
- if try_header("tcl", inc_opt, &version_check)
+ if try_cpp(code, inc_opt)
($INCFLAGS ||= "") << inc_opt
true
else
@@ -1471,15 +1414,10 @@ def find_tcltk_header(tclver, tkver)
print(".") # progress
if major && minor
# version check on tk.h
- version_check = proc {|code|
- code << ("#if TK_MAJOR_VERSION != #{major} || TK_MINOR_VERSION != #{minor}\n" \
- "#error VERSION does not match\n" \
- "#endif")
- }
+ have_tk_h = try_cpp("#include <tk.h>\n#if TK_MAJOR_VERSION != #{major} || TK_MINOR_VERSION != #{minor}\n#error VERSION does not match\n#endif")
else
- version_check = nil
+ have_tk_h = have_header('tk.h')
end
- have_tk_h = have_header('tk.h')
unless have_tk_h
if tkver && ! tkver.empty?
versions = [tkver]
@@ -1501,19 +1439,13 @@ def find_tcltk_header(tclver, tkver)
(File.directory?(dir))? File.expand_path(dir): nil
}.compact.uniq
- if major || minor
- version_check = proc {|code|
- code << "#if TK_MAJOR_VERSION != #{major}\n#error MAJOR_VERSION does not match\n#endif\n" if major
- code << "#if TK_MINOR_VERSION != #{minor}\n#error MINOR_VERSION does not match\n#endif\n" if minor
- code
- }
- else
- version_check = nil
- end
+ code = "#include <tcl.h>\n#include <tk.h>\n"
+ code << "#if TK_MAJOR_VERSION != #{major}\n#error MAJOR_VERSION does not match\n#endif\n" if major
+ code << "#if TK_MINOR_VERSION != #{minor}\n#error MINOR_VERSION does not match\n#endif\n" if minor
have_tk_h = paths.find{|path|
print(".") # progress
inc_opt = " -I#{path.quote}"
- if try_header(%w'tcl.h tk.h', inc_opt, &version_check)
+ if try_cpp(code, inc_opt)
($INCFLAGS ||= "") << inc_opt
true
else
@@ -1530,8 +1462,8 @@ end
def setup_for_macosx_framework(tclver, tkver)
# use framework, but no tclConfig.sh
- unless $LIBS && $LIBS.include?('-framework')
- ($LIBS ||= "") << ' -framework Tk -framework Tcl'
+ unless $LDFLAGS && $LDFLAGS.include?('-framework')
+ ($LDFLAGS ||= "") << ' -framework Tk -framework Tcl'
end
if TkLib_Config["tcl-framework-header"]
@@ -1792,13 +1724,23 @@ end
##############################################################
# check header file
print("check functions.")
-
-%w"ruby_native_thread_p rb_errinfo rb_safe_level rb_hash_lookup
- rb_proc_new rb_obj_untrust rb_obj_taint rb_set_safe_level_force
- rb_sourcefile rb_thread_alive_p rb_thread_check_trap_pending".each do |func|
- have_func(func, "ruby.h")
- print(".") # progress
-end
+have_func("ruby_native_thread_p", "ruby.h")
+print(".") # progress
+have_func("rb_errinfo", "ruby.h")
+print(".") # progress
+have_func("rb_safe_level", "ruby.h")
+print(".") # progress
+have_func("rb_hash_lookup", "ruby.h")
+print(".") # progress
+have_func("rb_proc_new", "ruby.h")
+print(".") # progress
+have_func("rb_obj_untrust", "ruby.h")
+print(".") # progress
+have_func("rb_obj_taint", "ruby.h")
+print(".") # progress
+have_func("rb_set_safe_level_force", "ruby.h")
+print(".") # progress
+have_func("rb_sourcefile", "ruby.h")
print("\n") # progress
print("check struct members.")
@@ -2054,6 +1996,7 @@ if TkLib_Config["tcltk-framework"]
end
end
$LDFLAGS << ' ' << libs
+ $libs << ' -ltk -ltcl'
setup_for_macosx_framework(tclver, tkver) if tcl_cfg_dir && tk_cfg_dir
end
@@ -2089,6 +2032,4 @@ if (TkLib_Config["tcltk-framework"] ||
puts "\nFind Tcl/Tk libraries. Make tcltklib.so which is required by Ruby/Tk."
else
puts "\nCan't find proper Tcl/Tk libraries. So, can't make tcltklib.so which is required by Ruby/Tk."
- puts "If you have Tcl/Tk libraries on your environment, you may be able to use them with configure options (see ext/tk/README.tcltklib)."
- puts "At present, Tcl/Tk8.6 is not supported. Although you can try to use Tcl/Tk8.6 with configure options, it will not work correctly. I recommend you to use Tcl/Tk8.5 or 8.4."
end
diff --git a/ext/tk/lib/tk/canvas.rb b/ext/tk/lib/tk/canvas.rb
index f3e9a7c229..7d3d71675c 100644
--- a/ext/tk/lib/tk/canvas.rb
+++ b/ext/tk/lib/tk/canvas.rb
@@ -77,7 +77,7 @@ class Tk::Canvas<TkWindow
if tag.kind_of?(TkcItem) || tag.kind_of?(TkcTag)
tag.id
else
- tag # maybe an Array of configure parameters
+ tag # maybe an Array of configure paramters
end
end
private :tagid
@@ -85,16 +85,11 @@ class Tk::Canvas<TkWindow
# create a canvas item without creating a TkcItem object
def create(type, *args)
- if type.kind_of?(Class) && type < TkcItem
- # do nothing
- elsif TkcItem.type2class(type.to_s)
- type = TkcItem.type2class(type.to_s)
- else
- fail ArgumentError, "type must a subclass of TkcItem class, or a string in CItemTypeToClass"
- end
+ type = TkcItem.type2class(type.to_s) unless type.kind_of?(TkcItem)
type.create(self, *args)
end
+
def addtag(tag, mode, *args)
mode = mode.to_s
if args[0] && mode =~ /^(above|below|with(tag)?)$/
diff --git a/ext/tk/lib/tk/image.rb b/ext/tk/lib/tk/image.rb
index 972383982f..d2b0305dcd 100644
--- a/ext/tk/lib/tk/image.rb
+++ b/ext/tk/lib/tk/image.rb
@@ -132,7 +132,7 @@ end
# exists to allow additional image file formats to be added easily.
#
# This class documentation is a copy from the original Tcl/Tk at
-# http://www.tcl.tk/man/tcl8.5/TkCmd/photo.htm with some rewritten parts.
+# http://www.tcl.tk/man/tcl8.5/TkCmd/photo.htm with some rewrited parts.
class TkPhotoImage<TkImage
NullArgOptionKeys = [ "shrink", "grayscale" ]
diff --git a/ext/tk/lib/tk/msgcat.rb b/ext/tk/lib/tk/msgcat.rb
index f2d0653c69..4abbcad85e 100644
--- a/ext/tk/lib/tk/msgcat.rb
+++ b/ext/tk/lib/tk/msgcat.rb
@@ -125,8 +125,6 @@ class TkMsgCatalog < TkObject
when 2 # src and trans, or, trans_list and enc
if args[0].kind_of?(Array)
- # trans_list
- self.set_translation_list(loc, *args)
else
#self.set_translation(loc, args[0], Tk::UTF8_String.new(args[1]))
self.set_translation(loc, *args)
@@ -201,11 +199,7 @@ class TkMsgCatalog < TkObject
file = File.join(dir, loc + self::MSGCAT_EXT)
if File.readable?(file)
count += 1
- if TkCore::WITH_ENCODING
- eval(IO.read(file, :encoding=>"ASCII-8BIT"))
- else
- eval(IO.read(file))
- end
+ eval(open(file){|f| f.read})
end
}
count
@@ -221,11 +215,7 @@ class TkMsgCatalog < TkObject
file = File.join(dir, loc + @msgcat_ext)
if File.readable?(file)
count += 1
- if TkCore::WITH_ENCODING
- @namespace.eval(IO.read(file, :encoding=>"ASCII-8BIT"))
- else
- @namespace.eval(IO.read(file))
- end
+ @namespace.eval(open(file){|f| f.read})
end
}
count
@@ -239,21 +229,30 @@ class TkMsgCatalog < TkObject
def self.set_translation(locale, src_str, trans_str=None, enc='utf-8')
if trans_str && trans_str != None
trans_str = Tk.UTF8_String(_toUTF8(trans_str, enc))
- Tk.UTF8_String(ip_eval_without_enc("::msgcat::mcset {#{locale}} {#{_get_eval_string(src_str, true)}} {#{trans_str}}"))
+ Tk.UTF8_String(tk_call_without_enc('::msgcat::mcset',
+ locale,
+ _get_eval_string(src_str, true),
+ trans_str))
else
- Tk.UTF8_String(ip_eval_without_enc("::msgcat::mcset {#{locale}} {#{_get_eval_string(src_str, true)}}"))
+ Tk.UTF8_String(tk_call_without_enc('::msgcat::mcset',
+ locale,
+ _get_eval_string(src_str, true)))
end
end
def set_translation(locale, src_str, trans_str=None, enc='utf-8')
if trans_str && trans_str != None
trans_str = Tk.UTF8_String(_toUTF8(trans_str, enc))
Tk.UTF8_String(@namespace.eval{
- ip_eval_without_enc("::msgcat::mcset {#{locale}} {#{_get_eval_string(src_str, true)}} {#{trans_str}}")
+ tk_call_without_enc('::msgcat::mcset',
+ locale,
+ _get_eval_string(src_str, true),
+ trans_str)
})
else
Tk.UTF8_String(@namespace.eval{
- ip_eval_without_enc("::msgcat::mcset {#{locale}} {#{_get_eval_string(src_str, true)}}")
- })
+ tk_call_without_enc('::msgcat::mcset',
+ locale,
+ _get_eval_string(src_str, true))})
end
end
@@ -263,13 +262,12 @@ class TkMsgCatalog < TkObject
trans_list.each{|src, trans|
if trans && trans != None
list << _get_eval_string(src, true)
- list << Tk.UTF8_String(_toUTF8(trans, enc))
+ list << Tk.UTF8_Stirng(_toUTF8(trans, enc))
else
list << _get_eval_string(src, true) << ''
end
}
- #number(tk_call_without_enc('::msgcat::mcmset', locale, list))
- number(ip_eval_without_enc("::msgcat::mcmset {#{locale}} {#{_get_eval_string(list)}}"))
+ number(tk_call_without_enc('::msgcat::mcmset', locale, list))
end
def set_translation_list(locale, trans_list, enc='utf-8')
# trans_list ::= [ [src, trans], [src, trans], ... ]
@@ -283,8 +281,7 @@ class TkMsgCatalog < TkObject
end
}
number(@namespace.eval{
- #tk_call_without_enc('::msgcat::mcmset', locale, list)
- ip_eval_without_enc("::msgcat::mcmset {#{locale}} {#{_get_eval_string(list)}}")
+ tk_call_without_enc('::msgcat::mcmset', locale, list)
})
end
diff --git a/ext/tk/lib/tk/namespace.rb b/ext/tk/lib/tk/namespace.rb
index 0119ba5ef7..4af891995e 100644
--- a/ext/tk/lib/tk/namespace.rb
+++ b/ext/tk/lib/tk/namespace.rb
@@ -325,7 +325,12 @@ class TkNamespace < TkObject
def code(script = Proc.new)
if script.kind_of?(String)
cmd = proc{|*args|
- ret = ScopeArgs.new(@fullname,*args).instance_eval(script)
+ if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!!
+ obj = ScopeArgs.new(@fullname,*args)
+ ret = obj.instance_exec(obj, script)
+ else
+ ret = ScopeArgs.new(@fullname,*args).instance_eval(script)
+ end
id = ret.object_id
TkNamespace::Tk_NsCode_RetObjID_TBL[id] = ret
id
diff --git a/ext/tk/lib/tk/text.rb b/ext/tk/lib/tk/text.rb
index c18b3843b4..bc2aa0a293 100644
--- a/ext/tk/lib/tk/text.rb
+++ b/ext/tk/lib/tk/text.rb
@@ -352,7 +352,7 @@ class Tk::Text<TkTextWin
|| tag.kind_of?(TkTextWindow)
tag.id
else
- tag # maybe an Array of configure parameters
+ tag # maybe an Array of configure paramters
end
end
private :tagid
diff --git a/ext/tk/lib/tkextlib/SUPPORT_STATUS b/ext/tk/lib/tkextlib/SUPPORT_STATUS
index de51c519fa..522039b11a 100644
--- a/ext/tk/lib/tkextlib/SUPPORT_STATUS
+++ b/ext/tk/lib/tkextlib/SUPPORT_STATUS
@@ -3,7 +3,7 @@
*** RELEASE_DATE of the libraries => see 'tkextlib/version.rb' ***
-The following list shows *CURRENT* status when this file was modified
+The following list shows *CURRENT* status when this file was modifyed
at last. If you want to add other Tcl/Tk extensions to the planed list
(or change its status position), please request them at the ruby-talk,
ruby-list, or ruby-dev ML. Although we cannot promise to support your
@@ -34,7 +34,7 @@ script may give you some hints about that.
If you cannot use installed Tcl/Tk extension, please check the
followings.
- (1) On your Tcl/Tk, does the extension work?
+ (1) On your Tcl/Tk, does the extention work?
(2) Do DLL libraries of the extension exist on DLL load-path?
(See also "<ruby archive>/ext/tcltklib/README.ActiveTcl")
@@ -44,8 +44,8 @@ script may give you some hints about that.
The check results may request you to do some setup operations
before using the extension. If so, then please write the step
- of setup operations into the "setup.rb" file in the directory
- of the wrapper libraries for the extension (It is the wrapper
+ of setup oprations into the "setup.rb" file in the directory
+ of the wrapper libraries for the extention (It is the wrapper
libraries have the standard structure of the libraries in this
directory). The "setup" file is required before requiring the
Tcl library package (TkPackage.require(<libname>)).
@@ -77,7 +77,10 @@ ICONS 1.0 http://www.satisoft.com/tcltk/icons/ ==> ICONS
TkImg 1.3 http://sourceforge.net/projects/tkimg ==> tkimg
-BLT 2.4z http://sourceforge.net/projects/blt ==> blt
+BLT 2.4z http://sourceforge.net/projects/blt
+ * see also tcltk-ext library on RAA
+ (http://raa.ruby-lang.org/)
+ ==> blt
TkTreeCtrl 2.2.9
http://tktreectrl.sourceforge.net/ ==> treectrl
@@ -126,6 +129,8 @@ Tkgeomap *** http://tkgeomap.sourceforge.net/index.html
===< not determined to supprt or not >========================================
Tix *** http://tixlibrary.sourceforge.net/
+ * see also tcltk-ext library on RAA
+ (http://raa.ruby-lang.org/)
TkZinc *** http://www.tkzinc.org/
diff --git a/ext/tk/lib/tkextlib/blt/component.rb b/ext/tk/lib/tkextlib/blt/component.rb
index c7ea213cee..a228a82246 100644
--- a/ext/tk/lib/tkextlib/blt/component.rb
+++ b/ext/tk/lib/tkextlib/blt/component.rb
@@ -1420,7 +1420,7 @@ module Tk::BLT
tag.kind_of?(Marker)
tag.id
else
- tag # maybe an Array of configure parameters
+ tag # maybe an Array of configure paramters
end
end
diff --git a/ext/tk/lib/tkextlib/blt/tree.rb b/ext/tk/lib/tkextlib/blt/tree.rb
index 1a3563e60d..da53a6ed04 100644
--- a/ext/tk/lib/tkextlib/blt/tree.rb
+++ b/ext/tk/lib/tkextlib/blt/tree.rb
@@ -670,7 +670,7 @@ module Tk::BLT
tag.kind_of?(Tk::BLT::Tree::Trace)
tag.id
else
- tag # maybe an Array of configure parameters
+ tag # maybe an Array of configure paramters
end
end
diff --git a/ext/tk/lib/tkextlib/blt/treeview.rb b/ext/tk/lib/tkextlib/blt/treeview.rb
index 38d90412e0..046cf7f837 100644
--- a/ext/tk/lib/tkextlib/blt/treeview.rb
+++ b/ext/tk/lib/tkextlib/blt/treeview.rb
@@ -339,7 +339,7 @@ class Tk::BLT::Treeview
|| tag.kind_of?(Tk::BLT::Treeview::Tag)
tag.id
else
- tag # maybe an Array of configure parameters
+ tag # maybe an Array of configure paramters
end
end
private :tagid
diff --git a/ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb b/ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb
index 4dea2f2d5c..935e04bbcc 100644
--- a/ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb
+++ b/ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb
@@ -64,7 +64,7 @@ class Tk::Iwidgets::Scrolledcanvas
elsif tag.kind_of?(Tk::Itk::Component)
tag.name
else
- tag # maybe an Array of configure parameters
+ tag # maybe an Array of configure paramters
end
end
private :tagid
diff --git a/ext/tk/lib/tkextlib/pkg_checker.rb b/ext/tk/lib/tkextlib/pkg_checker.rb
index e2fd97bb6a..ecc6bfa131 100755
--- a/ext/tk/lib/tkextlib/pkg_checker.rb
+++ b/ext/tk/lib/tkextlib/pkg_checker.rb
@@ -15,7 +15,7 @@ verbose = false
def help_msg
print "Usage: #{$0} [-l] [-v] [-h] [--] [dir]\n"
- print "\tIf dir is omitted, check the directory that this command exists.\n"
+ print "\tIf dir is omitted, check the directry that this command exists.\n"
print "\tAvailable options are \n"
print "\t -l : Add dir to $LOAD_PATH\n"
print "\t (If dir == '<parent>/tkextlib', add <parent> also.)\n"
diff --git a/ext/tk/lib/tkextlib/tile/style.rb b/ext/tk/lib/tkextlib/tile/style.rb
index 83a0c9a2e8..108d81f88b 100644
--- a/ext/tk/lib/tkextlib/tile/style.rb
+++ b/ext/tk/lib/tkextlib/tile/style.rb
@@ -21,8 +21,8 @@ class << Tk::Tile::Style
TkCommandNames = ['style'.freeze].freeze
# --- Tk::Tile::Style.__define_wrapper_proc_for_compatibility__! ---
- # On Ttk (Tile) extension, 'style' command has incompatible changes
- # depend on the version of the extension. It requires modifying the
+ # On Ttk (Tile) extension, 'style' command has imcompatible changes
+ # depend on the version of the extention. It requires modifying the
# Tcl/Tk scripts to define local styles. The rule for modification
# is a simple one. But, if users want to keep compatibility between
# versions of the extension, they will have to contrive to do that.
diff --git a/ext/tk/lib/tkextlib/tktable/tktable.rb b/ext/tk/lib/tkextlib/tktable/tktable.rb
index f7074655ed..bc7a6c9a2e 100644
--- a/ext/tk/lib/tkextlib/tktable/tktable.rb
+++ b/ext/tk/lib/tkextlib/tktable/tktable.rb
@@ -70,7 +70,7 @@ module Tk::TkTable::ConfigMethod
private :__item_strval_optkeys
def __item_val2ruby_optkeys(id) # { key=>method, ... }
- super(id).update('window'=>proc{|k,v| window(v)})
+ super(id).update('window'=>proc{|v| window(v)})
end
private :__item_val2ruby_optkeys
diff --git a/ext/tk/old-README.tcltklib.ja b/ext/tk/old-README.tcltklib.eucj
index e29b389402..e29b389402 100644
--- a/ext/tk/old-README.tcltklib.ja
+++ b/ext/tk/old-README.tcltklib.eucj
diff --git a/ext/tk/sample/demos-en/text.rb b/ext/tk/sample/demos-en/text.rb
index 2f72de7583..5794a85e87 100644
--- a/ext/tk/sample/demos-en/text.rb
+++ b/ext/tk/sample/demos-en/text.rb
@@ -117,7 +117,7 @@ insertion cursor. #{
end
}
-8. Resize the window. This widget has been configured with the "setGrid"
+7. Resize the window. This widget has been configured with the "setGrid"
option on, so that if you resize the window it will always resize to an
even number of characters high and wide. Also, if you make the window
narrow you can see that long lines automatically wrap around onto
diff --git a/ext/tk/sample/demos-en/tree.rb b/ext/tk/sample/demos-en/tree.rb
index 69154ee076..cd62ba8c9b 100644
--- a/ext/tk/sample/demos-en/tree.rb
+++ b/ext/tk/sample/demos-en/tree.rb
@@ -67,7 +67,7 @@ def populate_tree(tree, node)
path = tree.get(node, :fullpath)
tree.delete(tree.children(node))
Dir.glob("#{path}/*").sort.each{|f|
- type = File.ftype(f) rescue nil
+ type = File.ftype(f)
id = tree.insert(node, :end,
:text=>File.basename(f), :values=>[f, type]).id
if type == 'directory'
diff --git a/ext/tk/sample/demos-en/widget b/ext/tk/sample/demos-en/widget
index fb49a746b9..21dd41685f 100644
--- a/ext/tk/sample/demos-en/widget
+++ b/ext/tk/sample/demos-en/widget
@@ -683,7 +683,7 @@ def eval_samplecode(code, file=nil)
end
}
}
- Tk.update rescue nil
+ Tk.update
end
# invoke --
@@ -699,7 +699,7 @@ def invoke(txt, idx)
cursor = txt.cget('cursor')
txt.cursor('watch')
- Tk.update rescue nil
+ Tk.update
# eval(IO.readlines("#{[$demo_dir, tag[5..-1]].join(File::Separator)}.rb").join, _null_binding)
# Tk.update
eval_samplecode(IO.readlines("#{[$demo_dir, tag[5..-1]].join(File::Separator)}.rb").join, tag[5..-1] + '.rb')
@@ -1058,7 +1058,7 @@ if ARGV[0] == '-n'
no_launcher = true if ARGV.size > 0
else
# show the root widget to make it lower then demo windows
- Tk.update rescue nil
+ Tk.update
end
ARGV.each{|cmd|
if cmd =~ /(.*).rb/
diff --git a/ext/tk/sample/demos-jp/tree.rb b/ext/tk/sample/demos-jp/tree.rb
index 3f3b18b677..1c779391d4 100644
--- a/ext/tk/sample/demos-jp/tree.rb
+++ b/ext/tk/sample/demos-jp/tree.rb
@@ -68,7 +68,7 @@ def populate_tree(tree, node)
path = tree.get(node, :fullpath)
tree.delete(tree.children(node))
Dir.glob("#{path}/*").sort.each{|f|
- type = File.ftype(f) rescue nil
+ type = File.ftype(f)
id = tree.insert(node, :end,
:text=>File.basename(f), :values=>[f, type]).id
if type == 'directory'
diff --git a/ext/tk/sample/demos-jp/widget b/ext/tk/sample/demos-jp/widget
index 5f5dfb9d70..193c15affd 100644
--- a/ext/tk/sample/demos-jp/widget
+++ b/ext/tk/sample/demos-jp/widget
@@ -740,7 +740,7 @@ def eval_samplecode(code, file=nil)
end
}
}
- Tk.update rescue nil
+ Tk.update
end
# テキスト上ã§ã® click ã«å¯¾ã™ã‚‹å‹•作
@@ -750,7 +750,7 @@ def invoke(txt, idx)
cursor = txt.cget('cursor')
txt.cursor('watch')
- Tk.update rescue nil
+ Tk.update
# eval(IO.readlines("#{[$demo_dir, tag[5..-1]].join(File::Separator)}.rb").join, _null_binding)
# Tk.update
eval_samplecode(IO.readlines("#{[$demo_dir, tag[5..-1]].join(File::Separator)}.rb").join, tag[5..-1] + '.rb')
@@ -1094,7 +1094,7 @@ if ARGV[0] == '-n'
no_launcher = true if ARGV.size > 0
else
# show the root widget to make it lower then demo windows
- Tk.update rescue nil
+ Tk.update
end
ARGV.each{|cmd|
if cmd =~ /(.*).rb/
diff --git a/ext/tk/sample/figmemo_sample.rb b/ext/tk/sample/figmemo_sample.rb
index da6c41797e..25ec618fe8 100644
--- a/ext/tk/sample/figmemo_sample.rb
+++ b/ext/tk/sample/figmemo_sample.rb
@@ -5,7 +5,7 @@ begin
# try to use Img extension
require 'tkextlib/tkimg'
rescue Exception
- # cannot use Img extension --> ignore
+ # cannot use Img extention --> ignore
end
diff --git a/ext/tk/sample/msgs_tk/README b/ext/tk/sample/msgs_tk/README
index 949ee7a896..062ec20cf8 100644
--- a/ext/tk/sample/msgs_tk/README
+++ b/ext/tk/sample/msgs_tk/README
@@ -1,4 +1,4 @@
Almost all of Message-Catalog files in this directory are quoted
from Tcl/Tk8.5a1 source archive (only a little are modified for
'tkmsgcat-load_tk.rb'). Please read the file 'license.terms' in
-this directory (That was included in demo directory of Tcl/Tk8.5a1).
+this directry (That was included in demo directory of Tcl/Tk8.5a1).
diff --git a/ext/tk/sample/scrollframe.rb b/ext/tk/sample/scrollframe.rb
index e9d8af7ebf..e340e1da3c 100644
--- a/ext/tk/sample/scrollframe.rb
+++ b/ext/tk/sample/scrollframe.rb
@@ -13,8 +13,6 @@
#
require 'tk'
-module Tk::RbWidget; end
-
class Tk::RbWidget::ScrollFrame < TkFrame
include TkComposite
diff --git a/ext/tk/sample/tkextlib/blt/readme.txt b/ext/tk/sample/tkextlib/blt/readme.txt
index 8ac1044b0b..4183c01ecb 100644
--- a/ext/tk/sample/tkextlib/blt/readme.txt
+++ b/ext/tk/sample/tkextlib/blt/readme.txt
@@ -1,2 +1,2 @@
The scripts and image files in this directory are based on demo files
-of Tcl/Tk's BLT extension.
+of Tcl/Tk's BLT extention.
diff --git a/ext/tk/sample/tkextlib/bwidget/Orig_LICENSE.txt b/ext/tk/sample/tkextlib/bwidget/Orig_LICENSE.txt
index 16ddca4e3c..0c4c16fe47 100644
--- a/ext/tk/sample/tkextlib/bwidget/Orig_LICENSE.txt
+++ b/ext/tk/sample/tkextlib/bwidget/Orig_LICENSE.txt
@@ -2,8 +2,8 @@
######################################################################
### The following text is the original 'LICENSE.txt' of BWidget ###
### extension. ###
- ### Original Tcl source files are not include in this directory, ###
- ### because of all of them are rewritten to Ruby files. ###
+ ### Original Tcl source files are not include in this directry, ###
+ ### because of all of them are rewrited to Ruby files. ###
### However, the bitmap data files ('bwidgtet.xbm' and 'x1.xbm') ###
### included in this directory are quoted from BWidget source ###
### archive. So, those bitmaps are under the following license. ###
@@ -11,8 +11,8 @@
BWidget ToolKit
-Copyright (c) 1998-1999 UNIFIX.
-Copyright (c) 2001-2002 ActiveState Corp.
+Copyright (c) 1998-1999 UNIFIX.
+Copyright (c) 2001-2002 ActiveState Corp.
The following terms apply to all files associated with the software
unless explicitly disclaimed in individual files.
@@ -42,7 +42,7 @@ MODIFICATIONS.
GOVERNMENT USE: If you are acquiring this software on behalf of the
U.S. government, the Government shall have only "Restricted Rights"
-in the software and related documentation as defined in the Federal
+in the software and related documentation as defined in the Federal
Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
are acquiring the software on behalf of the Department of Defense, the
software shall be classified as "Commercial Computer Software" and the
@@ -50,4 +50,4 @@ Government shall have only "Restricted Rights" as defined in Clause
252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the
authors grant the U.S. Government and others acting in its behalf
permission to use and distribute the software in accordance with the
-terms specified in this license.
+terms specified in this license.
diff --git a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/Orig_LICENSE.txt b/ext/tk/sample/tkextlib/iwidgets/catalog_demo/Orig_LICENSE.txt
index 8392da7cec..22f787609d 100644
--- a/ext/tk/sample/tkextlib/iwidgets/catalog_demo/Orig_LICENSE.txt
+++ b/ext/tk/sample/tkextlib/iwidgets/catalog_demo/Orig_LICENSE.txt
@@ -1,34 +1,34 @@
#######################################################################
- ### The following text is the original 'license.terms' of iwidgets ###
+ ### The following text is the original 'license.terms' of iwidges ###
### extension. ###
- ### Original Tcl source files are not include in this directory, ###
- ### because of all of them are rewritten to Ruby files. ###
+ ### Original Tcl source files are not include in this directry, ###
+ ### because of all of them are rewrited to Ruby files. ###
### However, the image data files in the 'images' directory are ###
### quoted from iwidgets source archive. ###
#######################################################################
-This software is copyrighted by DSC Technologies and private individual
-contributors. The copyright holder is specifically listed in the header
+This software is copyrighted by DSC Technologies and private individual
+contributors. The copyright holder is specifically listed in the header
of each file. The following terms apply to all files associated with the
software unless explicitly disclaimed in individual files by private
contributors.
Copyright 1997 DSC Technologies Corporation
-Permission to use, copy, modify, distribute and license this software and
-its documentation for any purpose, and without fee or written agreement
-with DSC, is hereby granted, provided that the above copyright notice
-appears in all copies and that both the copyright notice and warranty
+Permission to use, copy, modify, distribute and license this software and
+its documentation for any purpose, and without fee or written agreement
+with DSC, is hereby granted, provided that the above copyright notice
+appears in all copies and that both the copyright notice and warranty
disclaimer below appear in supporting documentation, and that the names of
-DSC Technologies Corporation or DSC Communications Corporation not be used
-in advertising or publicity pertaining to the software without specific,
+DSC Technologies Corporation or DSC Communications Corporation not be used
+in advertising or publicity pertaining to the software without specific,
written prior permission.
DSC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, AND NON-INFRINGEMENT.
-THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND
+THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND
DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
ENHANCEMENTS, OR MODIFICATIONS. IN NO EVENT SHALL DSC BE LIABLE FOR ANY
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/notebook.rb b/ext/tk/sample/tkextlib/iwidgets/sample/notebook.rb
index 4d460e8802..055312ec96 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/notebook.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/notebook.rb
@@ -23,7 +23,7 @@ TkButton.new(page2CS, :text=>'Button Two').pack
# Select the first page of the tabnotebook.
nb.select(0)
-# Create the scrollbar and associate the scrollbar
+# Create the scrollbar and associate teh scrollbar
# and the notebook together, then pack the scrollbar
nb.scrollbar(TkScrollbar.new).pack(:fill=>:y, :expand=>true, :pady=>10)
diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/notebook2.rb b/ext/tk/sample/tkextlib/iwidgets/sample/notebook2.rb
index 576a9c18d0..41e9ce1bfc 100644
--- a/ext/tk/sample/tkextlib/iwidgets/sample/notebook2.rb
+++ b/ext/tk/sample/tkextlib/iwidgets/sample/notebook2.rb
@@ -23,7 +23,7 @@ TkButton.new(page2CS, :text=>'Button Two').pack
# Select the first page of the tabnotebook.
nb.select(0)
-# Create the scrollbar and associate the scrollbar
+# Create the scrollbar and associate teh scrollbar
# and the notebook together, then pack the scrollbar
nb.xscrollbar(TkScrollbar.new).pack(:fill=>:x, :expand=>true, :padx=>10)
diff --git a/ext/tk/sample/tkextlib/tcllib/Orig_LICENSE.txt b/ext/tk/sample/tkextlib/tcllib/Orig_LICENSE.txt
index 975f23e3f1..272853870c 100644
--- a/ext/tk/sample/tkextlib/tcllib/Orig_LICENSE.txt
+++ b/ext/tk/sample/tkextlib/tcllib/Orig_LICENSE.txt
@@ -2,8 +2,8 @@
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>>> The following text is the original 'license.term' of tklib <<<
>>> extension. <<<
- >>> Original Tcl files are not include in this directory, because <<<
- >>> of all of them are rewritten to Ruby files. <<<
+ >>> Original Tcl files are not include in this directry, because <<<
+ >>> of all of them are rewrited to Ruby files. <<<
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
This software is copyrighted by Ajuba Solutions and other parties.
@@ -35,7 +35,7 @@ MODIFICATIONS.
GOVERNMENT USE: If you are acquiring this software on behalf of the
U.S. government, the Government shall have only "Restricted Rights"
-in the software and related documentation as defined in the Federal
+in the software and related documentation as defined in the Federal
Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
are acquiring the software on behalf of the Department of Defense, the
software shall be classified as "Commercial Computer Software" and the
@@ -43,4 +43,4 @@ Government shall have only "Restricted Rights" as defined in Clause
252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the
authors grant the U.S. Government and others acting in its behalf
permission to use and distribute the software in accordance with the
-terms specified in this license.
+terms specified in this license.
diff --git a/ext/tk/sample/tkextlib/tkimg/demo.rb b/ext/tk/sample/tkextlib/tkimg/demo.rb
index 8016c263a6..d453e8ee9d 100644
--- a/ext/tk/sample/tkextlib/tkimg/demo.rb
+++ b/ext/tk/sample/tkextlib/tkimg/demo.rb
@@ -2,7 +2,7 @@
#
# Tk::Img demo
#
-# -- This script is based on demo.tcl of Tcl/Tk's 'Img' extension.
+# -- This script is based on demo.tcl of Tcl/Tk's 'Img' extention.
# Image data in this script is those of demo.tcl.
# Please read 'license_terms_of_Img_extension' file.
#
diff --git a/ext/tk/sample/tkextlib/tkimg/readme.txt b/ext/tk/sample/tkextlib/tkimg/readme.txt
index 8fd1a3e67d..8e4b0163b1 100644
--- a/ext/tk/sample/tkextlib/tkimg/readme.txt
+++ b/ext/tk/sample/tkextlib/tkimg/readme.txt
@@ -1,3 +1,3 @@
-The script 'demo.rb' is based on 'demo.tcl' of Tcl/Tk's 'Img' extension.
+The script 'demo.rb' is based on 'demo.tcl' of Tcl/Tk's 'Img' extention.
Image data in 'demo.rb' is those of 'demo.tcl'.
Please read 'license_terms_of_Img_extension' file.
diff --git a/ext/tk/sample/tkextlib/tktable/Orig_LICENSE.txt b/ext/tk/sample/tkextlib/tktable/Orig_LICENSE.txt
index b06b0b463b..dd176a7ccf 100644
--- a/ext/tk/sample/tkextlib/tktable/Orig_LICENSE.txt
+++ b/ext/tk/sample/tkextlib/tktable/Orig_LICENSE.txt
@@ -2,8 +2,8 @@
#######################################################################
### The following text is the original 'license.txt' of tktable ###
### extension. ###
- ### Original Tcl source files are not include in this directory, ###
- ### because of all of them are rewritten to Ruby files. ###
+ ### Original Tcl source files are not include in this directry, ###
+ ### because of all of them are rewrited to Ruby files. ###
### However, the image data file is quoted from iwidgets source ###
### archive. ###
#######################################################################
diff --git a/ext/tk/sample/tkextlib/treectrl/readme.txt b/ext/tk/sample/tkextlib/treectrl/readme.txt
index 81e13b24aa..bda4f63d88 100644
--- a/ext/tk/sample/tkextlib/treectrl/readme.txt
+++ b/ext/tk/sample/tkextlib/treectrl/readme.txt
@@ -1,2 +1,2 @@
The scripts and image files in this directory are based on demo files
-of Tcl/Tk's TreeCtrl extension.
+of Tcl/Tk's TreeCtrl extention.
diff --git a/ext/tk/sample/tkextlib/vu/Orig_LICENSE.txt b/ext/tk/sample/tkextlib/vu/Orig_LICENSE.txt
index f2e0edcf42..f5f2f770cf 100644
--- a/ext/tk/sample/tkextlib/vu/Orig_LICENSE.txt
+++ b/ext/tk/sample/tkextlib/vu/Orig_LICENSE.txt
@@ -1,8 +1,8 @@
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>>> The following text is the original 'license.txt' of vu extension. <<<
- >>> Original Tcl source files are not include in this directory, <<<
- >>> because of all of them are rewritten to Ruby files. <<<
+ >>> Original Tcl source files are not include in this directry, <<<
+ >>> because of all of them are rewrited to Ruby files. <<<
>>> However, the bitmap data file included in this directory is the <<<
>>> same file of vu extension. So, the bitmap data file is under the <<<
>>> following license. <<<
diff --git a/ext/tk/sample/tktextframe.rb b/ext/tk/sample/tktextframe.rb
index d6584beeb8..b2b40c9138 100644
--- a/ext/tk/sample/tktextframe.rb
+++ b/ext/tk/sample/tktextframe.rb
@@ -21,7 +21,7 @@ module Tk::ScrollbarComposite
private :create_component
def component_delegates
- # if want to override default option-methods or delegates,
+ # if want to override defalut option-methods or delegates,
# please define here.
end
private :component_delegates
diff --git a/ext/tk/tcltklib.c b/ext/tk/tcltklib.c
index d269f9c43e..02571d62fb 100644
--- a/ext/tk/tcltklib.c
+++ b/ext/tk/tcltklib.c
@@ -19,13 +19,12 @@
#define RUBY_RELEASE_DATE "unknown release-date"
#endif
-#ifdef HAVE_RB_THREAD_CHECK_TRAP_PENDING
+#ifdef RUBY_VM
static int rb_thread_critical; /* dummy */
int rb_thread_check_trap_pending();
#else
/* use rb_thread_critical on Ruby 1.8.x */
#include "rubysig.h"
-#define rb_thread_check_trap_pending() (0+rb_trap_pending)
#endif
#if !defined(RSTRING_PTR)
@@ -269,10 +268,6 @@ static CONST86 Tcl_ObjType *Tcl_ObjType_String;
#define rb_hash_lookup rb_hash_aref
#endif
-#ifndef HAVE_RB_THREAD_ALIVE_P
-#define rb_thread_alive_p(thread) rb_funcall2((thread), ID_alive_p, 0, NULL)
-#endif
-
/* safe Tcl_Eval and Tcl_GlobalEval */
static int
#ifdef HAVE_PROTOTYPES
@@ -1668,6 +1663,7 @@ set_eventloop_window_mode(self, mode)
VALUE self;
VALUE mode;
{
+ rb_secure(4);
if (RTEST(mode)) {
window_event_mode = ~0;
@@ -1697,6 +1693,7 @@ set_eventloop_tick(self, tick)
int ttick = NUM2INT(tick);
int thr_crit_bup;
+ rb_secure(4);
if (ttick < 0) {
rb_raise(rb_eArgError,
@@ -1763,6 +1760,7 @@ set_no_event_wait(self, wait)
{
int t_wait = NUM2INT(wait);
+ rb_secure(4);
if (t_wait <= 0) {
rb_raise(rb_eArgError,
@@ -1816,6 +1814,7 @@ set_eventloop_weight(self, loop_max, no_event)
int lpmax = NUM2INT(loop_max);
int no_ev = NUM2INT(no_event);
+ rb_secure(4);
if (lpmax <= 0 || no_ev <= 0) {
rb_raise(rb_eArgError, "weight parameters must be positive numbers");
@@ -1934,6 +1933,7 @@ static VALUE
lib_evloop_abort_on_exc_set(self, val)
VALUE self, val;
{
+ rb_secure(4);
if (RTEST(val)) {
event_loop_abort_on_exc = 1;
} else if (NIL_P(val)) {
@@ -1950,6 +1950,7 @@ ip_evloop_abort_on_exc_set(self, val)
{
struct tcltkip *ptr = get_ip(self);
+ rb_secure(4);
/* ip is deleted? */
if (deleted_ip(ptr)) {
@@ -2191,24 +2192,18 @@ lib_eventloop_core(check_root, update_flag, check_var, interp)
volatile VALUE current = eventloop_thread;
int found_event = 1;
int event_flag;
-#if 0
struct timeval t;
-#endif
int thr_crit_bup;
int status;
int depth = rbtk_eventloop_depth;
#if USE_EVLOOP_THREAD_ALONE_CHECK_FLAG
int thread_alone_check_flag = 1;
-#else
- enum {thread_alone_check_flag = 1};
#endif
if (update_flag) DUMP1("update loop start!!");
-#if 0
t.tv_sec = 0;
t.tv_usec = 1000 * no_event_wait;
-#endif
Tcl_DeleteTimerHandler(timer_token);
run_timer_flag = 0;
@@ -2230,7 +2225,11 @@ lib_eventloop_core(check_root, update_flag, check_var, interp)
for(;;) {
if (check_eventloop_interp()) return 0;
+#if USE_EVLOOP_THREAD_ALONE_CHECK_FLAG
if (thread_alone_check_flag && rb_thread_alone()) {
+#else
+ if (rb_thread_alone()) {
+#endif
DUMP1("no other thread");
event_loop_wait_event = 0;
@@ -2651,7 +2650,11 @@ lib_eventloop_ensure(args)
break;
}
+#ifdef RUBY_VM
+ if (RTEST(rb_funcall(eventloop_thread, ID_alive_p, 0, 0))) {
+#else
if (RTEST(rb_thread_alive_p(eventloop_thread))) {
+#endif
DUMP2("eventloop-enshure: wake up parent %lx", eventloop_thread);
rb_thread_wakeup(eventloop_thread);
@@ -2956,7 +2959,7 @@ lib_thread_callback(argc, argv, self)
{
struct thread_call_proc_arg *q;
VALUE proc, th, ret;
- int status;
+ int status, foundEvent;
if (rb_scan_args(argc, argv, "01", &proc) == 0) {
proc = rb_block_proc();
@@ -2975,10 +2978,14 @@ lib_thread_callback(argc, argv, self)
rb_thread_schedule();
/* start sub-eventloop */
- lib_eventloop_launcher(/* not check root-widget */0, 0,
- q->done, (Tcl_Interp*)NULL);
+ foundEvent = RTEST(lib_eventloop_launcher(/* not check root-widget */0, 0,
+ q->done, (Tcl_Interp*)NULL));
+#ifdef RUBY_VM
+ if (RTEST(rb_funcall(th, ID_alive_p, 0))) {
+#else
if (RTEST(rb_thread_alive_p(th))) {
+#endif
rb_funcall(th, ID_kill, 0);
ret = Qnil;
} else {
@@ -3881,6 +3888,8 @@ ip_rbUpdateCommand(clientData, interp, objc, objv)
char *objv[];
#endif
{
+ int optionIndex;
+ int ret;
int flags = 0;
static CONST char *updateOptions[] = {"idletasks", (char *) NULL};
enum updateOptions {REGEXP_IDLETASKS};
@@ -3906,7 +3915,6 @@ ip_rbUpdateCommand(clientData, interp, objc, objv)
} else if (objc == 2) {
#if TCL_MAJOR_VERSION >= 8
- int optionIndex;
if (Tcl_GetIndexFromObj(interp, objv[1], (CONST84 char **)updateOptions,
"option", 0, &optionIndex) != TCL_OK) {
return TCL_ERROR;
@@ -3950,7 +3958,7 @@ ip_rbUpdateCommand(clientData, interp, objc, objv)
/* call eventloop */
/* ret = lib_eventloop_core(0, flags, (int *)NULL);*/ /* ignore result */
- lib_eventloop_launcher(0, flags, (int *)NULL, interp); /* ignore result */
+ ret = RTEST(lib_eventloop_launcher(0, flags, (int *)NULL, interp)); /* ignore result */
/* exception check */
if (!NIL_P(rbtk_pending_exception)) {
@@ -3968,7 +3976,11 @@ ip_rbUpdateCommand(clientData, interp, objc, objv)
}
/* trap check */
+#ifdef RUBY_VM
if (rb_thread_check_trap_pending()) {
+#else
+ if (rb_trap_pending) {
+#endif
Tcl_Release(interp);
return TCL_RETURN;
@@ -4030,9 +4042,8 @@ ip_rb_threadUpdateCommand(clientData, interp, objc, objv)
char *objv[];
#endif
{
-# if 0
+ int optionIndex;
int flags = 0;
-# endif
struct th_update_param *param;
static CONST char *updateOptions[] = {"idletasks", (char *) NULL};
enum updateOptions {REGEXP_IDLETASKS};
@@ -4069,21 +4080,17 @@ ip_rb_threadUpdateCommand(clientData, interp, objc, objv)
Tcl_ResetResult(interp);
if (objc == 1) {
-# if 0
flags = TCL_DONT_WAIT;
-# endif
+
} else if (objc == 2) {
#if TCL_MAJOR_VERSION >= 8
- int optionIndex;
if (Tcl_GetIndexFromObj(interp, objv[1], (CONST84 char **)updateOptions,
"option", 0, &optionIndex) != TCL_OK) {
return TCL_ERROR;
}
switch ((enum updateOptions) optionIndex) {
case REGEXP_IDLETASKS: {
-# if 0
flags = TCL_IDLE_EVENTS;
-# endif
break;
}
default: {
@@ -4096,9 +4103,7 @@ ip_rb_threadUpdateCommand(clientData, interp, objc, objv)
"\": must be idletasks", (char *) NULL);
return TCL_ERROR;
}
-# if 0
flags = TCL_IDLE_EVENTS;
-# endif
#endif
} else {
#ifdef Tcl_WrongNumArgs
@@ -4349,7 +4354,11 @@ ip_rbVwaitCommand(clientData, interp, objc, objv)
}
/* trap check */
+#ifdef RUBY_VM
if (rb_thread_check_trap_pending()) {
+#else
+ if (rb_trap_pending) {
+#endif
#if TCL_MAJOR_VERSION >= 8
Tcl_DecrRefCount(objv[1]);
#endif
@@ -4638,7 +4647,11 @@ ip_rbTkWaitCommand(clientData, interp, objc, objv)
}
/* trap check */
+#ifdef RUBY_VM
if (rb_thread_check_trap_pending()) {
+#else
+ if (rb_trap_pending) {
+#endif
Tcl_Release(interp);
return TCL_RETURN;
@@ -4698,7 +4711,11 @@ ip_rbTkWaitCommand(clientData, interp, objc, objv)
}
/* trap check */
+#ifdef RUBY_VM
if (rb_thread_check_trap_pending()) {
+#else
+ if (rb_trap_pending) {
+#endif
#if TCL_MAJOR_VERSION >= 8
Tcl_DecrRefCount(objv[2]);
#endif
@@ -4793,7 +4810,11 @@ ip_rbTkWaitCommand(clientData, interp, objc, objv)
}
/* trap check */
+#ifdef RUBY_VM
if (rb_thread_check_trap_pending()) {
+#else
+ if (rb_trap_pending) {
+#endif
Tcl_Release(interp);
return TCL_RETURN;
@@ -6397,6 +6418,7 @@ ip_create_slave_core(interp, argc, argv)
safe = 1;
} else if (safemode == Qfalse || NIL_P(safemode)) {
safe = 0;
+ /* rb_secure(4); */ /* already checked */
} else {
safe = 1;
}
@@ -6503,6 +6525,7 @@ ip_create_slave(argc, argv, self)
}
if (Tcl_IsSafe(master->ip) != 1
&& (safemode == Qfalse || NIL_P(safemode))) {
+ rb_secure(4);
}
StringValue(name);
@@ -6709,6 +6732,7 @@ ip_allow_ruby_exit_set(self, val)
struct tcltkip *ptr = get_ip(self);
Tk_Window mainWin;
+ rb_secure(4);
/* ip is deleted? */
if (deleted_ip(ptr)) {
@@ -6992,8 +7016,13 @@ call_queue_handler(evPtr, flags)
DUMP1("process it on current event-loop");
}
+#ifdef RUBY_VM
+ if (RTEST(rb_funcall(thread, ID_alive_p, 0))
+ && ! RTEST(rb_funcall(thread, ID_stop_p, 0))) {
+#else
if (RTEST(rb_thread_alive_p(thread))
&& ! RTEST(rb_funcall(thread, ID_stop_p, 0))) {
+#endif
DUMP1("caller is not yet ready to receive the result -> pending");
return 0;
}
@@ -7042,7 +7071,11 @@ call_queue_handler(evPtr, flags)
q->thread = (VALUE)NULL;
/* back to caller */
+#ifdef RUBY_VM
+ if (RTEST(rb_funcall(thread, ID_alive_p, 0, 0))) {
+#else
if (RTEST(rb_thread_alive_p(thread))) {
+#endif
DUMP2("back to caller (caller thread:%lx)", thread);
DUMP2(" (current thread:%lx)", rb_thread_current());
#if CONTROL_BY_STATUS_OF_RB_THREAD_WAITING_FOR_VALUE
@@ -7479,8 +7512,13 @@ eval_queue_handler(evPtr, flags)
DUMP1("process it on current event-loop");
}
+#ifdef RUBY_VM
+ if (RTEST(rb_funcall(thread, ID_alive_p, 0))
+ && ! RTEST(rb_funcall(thread, ID_stop_p, 0))) {
+#else
if (RTEST(rb_thread_alive_p(thread))
&& ! RTEST(rb_funcall(thread, ID_stop_p, 0))) {
+#endif
DUMP1("caller is not yet ready to receive the result -> pending");
return 0;
}
@@ -7533,7 +7571,11 @@ eval_queue_handler(evPtr, flags)
q->thread = (VALUE)NULL;
/* back to caller */
+#ifdef RUBY_VM
+ if (RTEST(rb_funcall(thread, ID_alive_p, 0, 0))) {
+#else
if (RTEST(rb_thread_alive_p(thread))) {
+#endif
DUMP2("back to caller (caller thread:%lx)", thread);
DUMP2(" (current thread:%lx)", rb_thread_current());
#if CONTROL_BY_STATUS_OF_RB_THREAD_WAITING_FOR_VALUE
@@ -7812,6 +7854,7 @@ lib_restart_core(interp, argc, argv)
struct tcltkip *ptr = get_ip(interp);
int thr_crit_bup;
+ /* rb_secure(4); */ /* already checked */
/* tcl_stubs_check(); */ /* already checked */
@@ -7869,6 +7912,7 @@ lib_restart(self)
{
struct tcltkip *ptr = get_ip(self);
+ rb_secure(4);
tcl_stubs_check();
@@ -7887,6 +7931,7 @@ ip_restart(self)
{
struct tcltkip *ptr = get_ip(self);
+ rb_secure(4);
tcl_stubs_check();
@@ -7911,9 +7956,7 @@ lib_toUTF8_core(ip_obj, src, encodename)
volatile VALUE str = src;
#ifdef TCL_UTF_MAX
-# if 0
Tcl_Interp *interp;
-# endif
Tcl_Encoding encoding;
Tcl_DString dstr;
int taint_flag = OBJ_TAINTED(str);
@@ -7930,19 +7973,15 @@ lib_toUTF8_core(ip_obj, src, encodename)
#ifdef TCL_UTF_MAX
if (NIL_P(ip_obj)) {
-# if 0
interp = (Tcl_Interp *)NULL;
-# endif
} else {
ptr = get_ip(ip_obj);
/* ip is deleted? */
if (deleted_ip(ptr)) {
-# if 0
interp = (Tcl_Interp *)NULL;
} else {
interp = ptr->ip;
-# endif
}
}
@@ -8534,6 +8573,7 @@ ip_invoke_core(interp, argc, argv)
#if 1 /* wrap tcl-proc call */
struct invoke_info inf;
int status;
+ VALUE ret;
#else
#if TCL_MAJOR_VERSION >= 8
int argc = objc;
@@ -8645,7 +8685,7 @@ ip_invoke_core(interp, argc, argv)
#endif
/* invoke tcl-proc */
- rb_protect(invoke_tcl_proc, (VALUE)&inf, &status);
+ ret = rb_protect(invoke_tcl_proc, (VALUE)&inf, &status);
switch(status) {
case TAG_RAISE:
if (NIL_P(rb_errinfo())) {
@@ -8964,8 +9004,13 @@ invoke_queue_handler(evPtr, flags)
DUMP1("process it on current event-loop");
}
+#ifdef RUBY_VM
+ if (RTEST(rb_funcall(thread, ID_alive_p, 0))
+ && ! RTEST(rb_funcall(thread, ID_stop_p, 0))) {
+#else
if (RTEST(rb_thread_alive_p(thread))
&& ! RTEST(rb_funcall(thread, ID_stop_p, 0))) {
+#endif
DUMP1("caller is not yet ready to receive the result -> pending");
return 0;
}
@@ -9013,7 +9058,11 @@ invoke_queue_handler(evPtr, flags)
q->thread = (VALUE)NULL;
/* back to caller */
+#ifdef RUBY_VM
+ if (RTEST(rb_funcall(thread, ID_alive_p, 0, 0))) {
+#else
if (RTEST(rb_thread_alive_p(thread))) {
+#endif
DUMP2("back to caller (caller thread:%lx)", thread);
DUMP2(" (current thread:%lx)", rb_thread_current());
#if CONTROL_BY_STATUS_OF_RB_THREAD_WAITING_FOR_VALUE
@@ -9245,6 +9294,7 @@ ip_invoke_immediate(argc, argv, obj)
VALUE obj;
{
/* POTENTIALY INSECURE : can create infinite loop */
+ rb_secure(4);
return ip_invoke_with_position(argc, argv, obj, TCL_QUEUE_HEAD);
}
@@ -10048,6 +10098,7 @@ create_dummy_encoding_for_tk_core(interp, name, error_mode)
{
get_ip(interp);
+ rb_secure(4);
StringValue(name);
@@ -10505,6 +10556,7 @@ create_encoding_table_core(arg, interp)
Tcl_Obj **objv;
Tcl_Obj *enc_list;
+ rb_secure(4);
/* set 'binary' encoding */
rb_hash_aset(table, ENCODING_NAME_BINARY, ENCODING_NAME_BINARY);
@@ -10540,6 +10592,7 @@ create_encoding_table_core(arg, interp)
VALUE interp;
{
volatile VALUE table = rb_hash_new();
+ rb_secure(4);
rb_ivar_set(interp, ID_encoding_table, table);
return table;
}
@@ -10849,9 +10902,7 @@ Init_tcltklib()
ID_encoding_table = rb_intern("encoding_table");
ID_stop_p = rb_intern("stop?");
-#ifndef HAVE_RB_THREAD_ALIVE_P
ID_alive_p = rb_intern("alive?");
-#endif
ID_kill = rb_intern("kill");
ID_join = rb_intern("join");
ID_value = rb_intern("value");
diff --git a/ext/tk/tkutil/tkutil.c b/ext/tk/tkutil/tkutil.c
index fd8972645a..88f1291006 100644
--- a/ext/tk/tkutil/tkutil.c
+++ b/ext/tk/tkutil/tkutil.c
@@ -897,7 +897,8 @@ get_eval_string_core(obj, enc_flag, self)
}
}
- rb_warning("fail to convert '%+"PRIsVALUE"' to string for Tk", obj);
+ rb_warning("fail to convert '%s' to string for Tk",
+ RSTRING_PTR(rb_funcall(obj, rb_intern("inspect"), 0, 0)));
return obj;
}
@@ -935,8 +936,7 @@ tk_conv_args(argc, argv, self)
VALUE *argv; /* [0]:base_array, [1]:enc_mode, [2]..[n]:args */
VALUE self;
{
- int idx;
- long size;
+ int idx, size;
volatile VALUE dst;
int thr_crit_bup;
VALUE old_gc;
@@ -1247,7 +1247,7 @@ each_attr_def(key, value, klass)
switch(TYPE(key)) {
case T_STRING:
- key_id = rb_intern_str(key);
+ key_id = rb_intern(RSTRING_PTR(key));
break;
case T_SYMBOL:
key_id = SYM2ID(key);
@@ -1259,7 +1259,7 @@ each_attr_def(key, value, klass)
switch(TYPE(value)) {
case T_STRING:
- value_id = rb_intern_str(value);
+ value_id = rb_intern(RSTRING_PTR(value));
break;
case T_SYMBOL:
value_id = SYM2ID(value);
@@ -1299,7 +1299,7 @@ cbsubst_sym_to_subst(self, sym)
VALUE sym;
{
struct cbsubst_info *inf;
- VALUE str;
+ const char *str;
char *buf, *ptr;
int idx;
long len;
@@ -1312,12 +1312,12 @@ cbsubst_sym_to_subst(self, sym)
struct cbsubst_info, inf);
if (!NIL_P(ret = rb_hash_aref(inf->aliases, sym))) {
- str = rb_id2str(SYM2ID(ret));
+ str = rb_id2name(SYM2ID(ret));
} else {
- str = rb_id2str(SYM2ID(sym));
+ str = rb_id2name(SYM2ID(sym));
}
- id = rb_intern_str(rb_sprintf("@%"PRIsVALUE, str));
+ id = rb_intern(RSTRING_PTR(rb_str_cat2(rb_str_new2("@"), str)));
for(idx = 0; idx < CBSUBST_TBL_MAX; idx++) {
if (inf->ivar[idx] == id) break;
@@ -1354,7 +1354,7 @@ cbsubst_get_subst_arg(argc, argv, self)
VALUE self;
{
struct cbsubst_info *inf;
- VALUE str;
+ const char *str;
char *buf, *ptr;
int i, idx;
long len;
@@ -1369,28 +1369,28 @@ cbsubst_get_subst_arg(argc, argv, self)
for(i = 0; i < argc; i++) {
switch(TYPE(argv[i])) {
case T_STRING:
- str = argv[i];
- arg_sym = ID2SYM(rb_intern_str(argv[i]));
+ str = RSTRING_PTR(argv[i]);
+ arg_sym = ID2SYM(rb_intern(str));
break;
case T_SYMBOL:
arg_sym = argv[i];
- str = rb_id2str(SYM2ID(arg_sym));
+ str = rb_id2name(SYM2ID(arg_sym));
break;
default:
rb_raise(rb_eArgError, "arg #%d is not a String or a Symbol", i);
}
if (!NIL_P(ret = rb_hash_aref(inf->aliases, arg_sym))) {
- str = rb_id2str(SYM2ID(ret));
+ str = rb_id2name(SYM2ID(ret));
}
- id = rb_intern_str(rb_sprintf("@%"PRIsVALUE, str));
+ id = rb_intern(RSTRING_PTR(rb_str_cat2(rb_str_new2("@"), str)));
for(idx = 0; idx < CBSUBST_TBL_MAX; idx++) {
if (inf->ivar[idx] == id) break;
}
if (idx >= CBSUBST_TBL_MAX) {
- rb_raise(rb_eArgError, "cannot find attribute :%"PRIsVALUE, str);
+ rb_raise(rb_eArgError, "cannot find attribute :%s", str);
}
*(ptr++) = '%';
@@ -1572,7 +1572,7 @@ cbsubst_table_setup(argc, argv, self)
subst_inf->full_subst_length += 3;
id = SYM2ID(RARRAY_PTR(inf)[2]);
- subst_inf->ivar[chr] = rb_intern_str(rb_sprintf("@%"PRIsVALUE, rb_id2str(id)));
+ subst_inf->ivar[chr] = rb_intern(RSTRING_PTR(rb_str_cat2(rb_str_new2("@"), rb_id2name(id))));
rb_attr(self, id, 1, 0, Qtrue);
}
@@ -1611,7 +1611,7 @@ cbsubst_table_setup(argc, argv, self)
subst_inf->full_subst_length += (subst_inf->keylen[chr] + 2);
id = SYM2ID(RARRAY_PTR(inf)[2]);
- subst_inf->ivar[chr] = rb_intern_str(rb_sprintf("@%"PRIsVALUE, rb_id2str(id)));
+ subst_inf->ivar[chr] = rb_intern(RSTRING_PTR(rb_str_cat2(rb_str_new2("@"), rb_id2name(id))));
rb_attr(self, id, 1, 0, Qtrue);
}
diff --git a/ext/win32/extconf.rb b/ext/win32/extconf.rb
deleted file mode 100644
index 7aa2c93684..0000000000
--- a/ext/win32/extconf.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-if (compiled?('dl') or compiled?('fiddle')) and $mswin||$mingw||$cygwin
- create_makefile('win32')
-end
diff --git a/ext/win32/lib/win32/importer.rb b/ext/win32/lib/win32/importer.rb
deleted file mode 100644
index 5936bb6900..0000000000
--- a/ext/win32/lib/win32/importer.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-begin
- require 'fiddle/import'
- importer = Fiddle::Importer
-rescue LoadError
- require 'dl/import'
- importer = DL::Importer
-end
-
-module Win32
-end
-
-Win32.module_eval do
- Importer = importer
-end
diff --git a/ext/win32ole/extconf.rb b/ext/win32ole/extconf.rb
index 52c3d6bdfb..c3717316d4 100644
--- a/ext/win32ole/extconf.rb
+++ b/ext/win32ole/extconf.rb
@@ -23,14 +23,6 @@ def create_win32ole_makefile
unless have_type("IMultiLanguage2", "mlang.h")
have_type("IMultiLanguage", "mlang.h")
end
- spec = nil
- checking_for('thread_specific', '%s') do
- spec = %w[__declspec(thread) __thread].find {|th|
- try_compile("#{th} int foo;", "", :werror => true)
- }
- spec or 'no'
- end
- $defs << "-DRB_THREAD_SPECIFIC=#{spec}" if spec
create_makefile("win32ole")
end
end
@@ -38,7 +30,6 @@ end
case RUBY_PLATFORM
when /mswin/
- $CFLAGS.sub!(/((?:\A|\s)[-\/])W\d(?=\z|\s)/, '\1W3') or
- $CFLAGS += ' -W3'
+ $CFLAGS += ' /W3'
end
create_win32ole_makefile
diff --git a/ext/win32ole/lib/win32ole.rb b/ext/win32ole/lib/win32ole.rb
new file mode 100644
index 0000000000..aaf7e7cdcf
--- /dev/null
+++ b/ext/win32ole/lib/win32ole.rb
@@ -0,0 +1,22 @@
+require 'win32ole.so'
+
+# re-define Thread#initialize
+# bug #2618(ruby-core:27634)
+
+class Thread
+ alias :org_initialize :initialize
+ def initialize(*arg, &block)
+ if block
+ org_initialize(*arg) {
+ WIN32OLE.ole_initialize
+ begin
+ block.call(*arg)
+ ensure
+ WIN32OLE.ole_uninitialize
+ end
+ }
+ else
+ org_initialize(*arg)
+ end
+ end
+end
diff --git a/ext/win32ole/sample/olegen.rb b/ext/win32ole/sample/olegen.rb
index aa0288ddbb..4ec576ca50 100644
--- a/ext/win32ole/sample/olegen.rb
+++ b/ext/win32ole/sample/olegen.rb
@@ -8,7 +8,7 @@ require 'win32ole'
class WIN32COMGen
def initialize(typelib)
@typelib = typelib
- @receiver = ""
+ @reciever = ""
end
attr_reader :typelib
@@ -87,7 +87,7 @@ class WIN32COMGen
end
def generate_method_body(method, disptype, types=nil)
- " ret = #{@receiver}#{disptype}(#{method.dispid}, [" +
+ " ret = #{@reciever}#{disptype}(#{method.dispid}, [" +
generate_args(method).gsub("=nil", "") +
"], [" +
generate_argtypes(method, types) +
@@ -303,10 +303,10 @@ STR
if klass.ole_type == "Class" &&
klass.guid &&
klass.progid
- @receiver = "@dispatch."
+ @reciever = "@dispatch."
define_class(klass, io)
else
- @receiver = ""
+ @reciever = ""
define_module(klass, io)
end
generate_constants(klass, io)
diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c
index 9765929f34..acc2fea39d 100644
--- a/ext/win32ole/win32ole.c
+++ b/ext/win32ole/win32ole.c
@@ -143,7 +143,7 @@ const IID IID_IMultiLanguage2 = {0xDCCFC164, 0x2B38, 0x11d2, {0xB7, 0xEC, 0x00,
#define WC2VSTR(x) ole_wc2vstr((x), TRUE)
-#define WIN32OLE_VERSION "1.5.5"
+#define WIN32OLE_VERSION "1.5.3"
typedef HRESULT (STDAPICALLTYPE FNCOCREATEINSTANCEEX)
(REFCLSID, IUnknown*, DWORD, COSERVERINFO*, DWORD, MULTI_QI*);
@@ -214,17 +214,7 @@ VALUE cWIN32OLE_PROPERTY;
static VALUE ary_ole_event;
static ID id_events;
-#if defined(RB_THREAD_SPECIFIC) && (defined(__CYGWIN__) || defined(__MINGW32__))
-static RB_THREAD_SPECIFIC BOOL g_ole_initialized;
-# define g_ole_initialized_init() ((void)0)
-# define g_ole_initialized_set(val) (g_ole_initialized = (val))
-#else
-static volatile DWORD g_ole_initialized_key = TLS_OUT_OF_INDEXES;
-# define g_ole_initialized (BOOL)TlsGetValue(g_ole_initialized_key)
-# define g_ole_initialized_init() (g_ole_initialized_key = TlsAlloc())
-# define g_ole_initialized_set(val) TlsSetValue(g_ole_initialized_key, (void*)(val))
-#endif
-static BOOL g_uninitialize_hooked = FALSE;
+static BOOL g_ole_initialized = FALSE;
static BOOL g_cp_installed = FALSE;
static BOOL g_lcid_installed = FALSE;
static HINSTANCE ghhctrl = NULL;
@@ -319,8 +309,8 @@ static VALUE ole_hresult2msg(HRESULT hr);
static void ole_freeexceptinfo(EXCEPINFO *pExInfo);
static VALUE ole_excepinfo2msg(EXCEPINFO *pExInfo);
static void ole_raise(HRESULT hr, VALUE ecs, const char *fmt, ...);
-static void ole_initialize(void);
-static void ole_msg_loop(void);
+static void ole_initialize();
+static void ole_msg_loop();
static void ole_free(struct oledata *pole);
static void oletypelib_free(struct oletypelibdata *poletypelib);
static void oletype_free(struct oletypedata *poletype);
@@ -380,10 +370,12 @@ static BOOL CALLBACK installed_lcid_proc(LPTSTR str);
static BOOL lcid_installed(LCID lcid);
static VALUE fole_s_set_locale(VALUE self, VALUE vlcid);
static VALUE fole_s_create_guid(VALUE self);
+static void ole_pure_initialize();
static VALUE fole_s_ole_initialize(VALUE self);
+static void ole_pure_uninitialize();
static VALUE fole_s_ole_uninitialize(VALUE self);
static VALUE fole_initialize(int argc, VALUE *argv, VALUE self);
-static VALUE hash2named_arg(RB_BLOCK_CALL_FUNC_ARGLIST(pair, op));
+static VALUE hash2named_arg(VALUE pair, struct oleparam* pOp);
static VALUE set_argv(VARIANTARG* realargs, unsigned int beg, unsigned int end);
static VALUE ole_invoke(int argc, VALUE *argv, VALUE self, USHORT wFlags, BOOL is_bracket);
static VALUE fole_invoke(int argc, VALUE *argv, VALUE self);
@@ -516,7 +508,7 @@ static VALUE folemethod_visible(VALUE self);
static VALUE ole_method_event(ITypeInfo *pTypeInfo, UINT method_index, VALUE method_name);
static VALUE folemethod_event(VALUE self);
static VALUE folemethod_event_interface(VALUE self);
-static HRESULT ole_method_docinfo_from_type(ITypeInfo *pTypeInfo, UINT method_index, BSTR *name, BSTR *helpstr, DWORD *helpcontext, BSTR *helpfile);
+static VALUE ole_method_docinfo_from_type(ITypeInfo *pTypeInfo, UINT method_index, BSTR *name, BSTR *helpstr, DWORD *helpcontext, BSTR *helpfile);
static VALUE ole_method_helpstring(ITypeInfo *pTypeInfo, UINT method_index);
static VALUE folemethod_helpstring(VALUE self);
static VALUE ole_method_helpfile(ITypeInfo *pTypeInfo, UINT method_index);
@@ -580,11 +572,10 @@ static VALUE fev_get_handler(VALUE self);
static VALUE evs_push(VALUE ev);
static VALUE evs_delete(long i);
static VALUE evs_entry(long i);
-static VALUE evs_length(void);
+static VALUE evs_length();
static void olevariant_free(struct olevariantdata *pvar);
static VALUE folevariant_s_allocate(VALUE klass);
static VALUE folevariant_s_array(VALUE klass, VALUE dims, VALUE vvt);
-static void check_type_val2variant(VALUE val);
static VALUE folevariant_initialize(VALUE self, VALUE args);
static long *ary2safe_array_index(int ary_size, VALUE *ary, SAFEARRAY *psa);
static void unlock_safe_array(SAFEARRAY *psa);
@@ -595,8 +586,8 @@ static VALUE folevariant_ary_aset(int argc, VALUE *argv, VALUE self);
static VALUE folevariant_value(VALUE self);
static VALUE folevariant_vartype(VALUE self);
static VALUE folevariant_set_value(VALUE self, VALUE val);
-static void init_enc2cp(void);
-static void free_enc2cp(void);
+static void init_enc2cp();
+static void free_enc2cp();
static HRESULT (STDMETHODCALLTYPE mf_QueryInterface)(
IMessageFilter __RPC_FAR * This,
@@ -765,10 +756,8 @@ static HRESULT ( STDMETHODCALLTYPE GetIDsOfNames )(
Win32OLEIDispatch* p = (Win32OLEIDispatch*)This;
*/
char* psz = ole_wc2mb(*rgszNames); // support only one method
- ID nameid = rb_intern(psz);
+ *rgDispId = rb_intern(psz);
free(psz);
- if ((ID)(DISPID)nameid != nameid) return E_NOINTERFACE;
- *rgDispId = (DISPID)nameid;
return S_OK;
}
@@ -788,18 +777,17 @@ static /* [local] */ HRESULT ( STDMETHODCALLTYPE Invoke )(
int args = pDispParams->cArgs;
Win32OLEIDispatch* p = (Win32OLEIDispatch*)This;
VALUE* parg = ALLOCA_N(VALUE, args);
- ID mid = (ID)dispIdMember;
for (i = 0; i < args; i++) {
*(parg + i) = ole_variant2val(&pDispParams->rgvarg[args - i - 1]);
}
if (dispIdMember == DISPID_VALUE) {
if (wFlags == DISPATCH_METHOD) {
- mid = rb_intern("call");
+ dispIdMember = rb_intern("call");
} else if (wFlags & DISPATCH_PROPERTYGET) {
- mid = rb_intern("value");
+ dispIdMember = rb_intern("value");
}
}
- v = rb_funcall2(p->obj, mid, args, parg);
+ v = rb_funcall2(p->obj, dispIdMember, args, parg);
ole_val2variant(v, pVarResult);
return S_OK;
}
@@ -1068,7 +1056,7 @@ ole_cp2encoding(UINT cp)
}
static char *
-ole_wc2mb_alloc(LPWSTR pw, char *(alloc)(UINT size, void *arg), void *arg)
+ole_wc2mb(LPWSTR pw)
{
LPSTR pm;
UINT size = 0;
@@ -1080,7 +1068,7 @@ ole_wc2mb_alloc(LPWSTR pw, char *(alloc)(UINT size, void *arg), void *arg)
if (FAILED(hr)) {
ole_raise(hr, eWIN32OLERuntimeError, "fail to convert Unicode to CP%d", cWIN32OLE_cp);
}
- pm = alloc(size, arg);
+ pm = ALLOC_N(char, size + 1);
hr = pIMultiLanguage->lpVtbl->ConvertStringFromUnicode(pIMultiLanguage,
&dw, cWIN32OLE_cp, pw, NULL, pm, &size);
if (FAILED(hr)) {
@@ -1092,29 +1080,17 @@ ole_wc2mb_alloc(LPWSTR pw, char *(alloc)(UINT size, void *arg), void *arg)
}
size = WideCharToMultiByte(cWIN32OLE_cp, 0, pw, -1, NULL, 0, NULL, NULL);
if (size) {
- pm = alloc(size, arg);
+ pm = ALLOC_N(char, size + 1);
WideCharToMultiByte(cWIN32OLE_cp, 0, pw, -1, pm, size, NULL, NULL);
pm[size] = '\0';
}
else {
- pm = alloc(0, arg);
+ pm = ALLOC_N(char, 1);
*pm = '\0';
}
return pm;
}
-static char *
-ole_alloc_str(UINT size, void *arg)
-{
- return ALLOC_N(char, size + 1);
-}
-
-static char *
-ole_wc2mb(LPWSTR pw)
-{
- return ole_wc2mb_alloc(pw, ole_alloc_str, NULL);
-}
-
static VALUE
ole_hresult2msg(HRESULT hr)
{
@@ -1187,7 +1163,7 @@ ole_excepinfo2msg(EXCEPINFO *pExInfo)
}
error_msg = rb_str_new2(error_code);
if(pSource != NULL) {
- rb_str_cat2(error_msg, pSource);
+ rb_str_cat(error_msg, pSource, strlen(pSource));
}
else {
rb_str_cat(error_msg, "<Unknown>", 9);
@@ -1225,36 +1201,29 @@ ole_raise(HRESULT hr, VALUE ecs, const char *fmt, ...)
}
void
-ole_uninitialize(void)
+ole_uninitialize()
{
- if (!g_ole_initialized) return;
OleUninitialize();
- g_ole_initialized_set(FALSE);
+ g_ole_initialized = FALSE;
}
static void
-ole_uninitialize_hook(rb_event_flag_t evflag, VALUE data, VALUE self, ID mid, VALUE klass)
-{
- ole_uninitialize();
-}
-
-static void
-ole_initialize(void)
+ole_initialize()
{
HRESULT hr;
- if(!g_uninitialize_hooked) {
- rb_add_event_hook(ole_uninitialize_hook, RUBY_EVENT_THREAD_END, Qnil);
- g_uninitialize_hooked = TRUE;
- }
-
if(g_ole_initialized == FALSE) {
hr = OleInitialize(NULL);
if(FAILED(hr)) {
ole_raise(hr, rb_eRuntimeError, "fail: OLE initialize");
}
- g_ole_initialized_set(TRUE);
-
+ g_ole_initialized = TRUE;
+ /*
+ * In some situation, OleUninitialize does not work fine. ;-<
+ */
+ /*
+ atexit((void (*)(void))ole_uninitialize);
+ */
hr = CoRegisterMessageFilter(&imessage_filter, &previous_filter);
if(FAILED(hr)) {
previous_filter = NULL;
@@ -1327,7 +1296,7 @@ ole_vstr2wc(VALUE vstr)
enc = rb_enc_get(vstr);
if (st_lookup(enc2cp_table, (st_data_t)enc, &data)) {
- cp = (int)data;
+ cp = data;
} else {
cp = ole_encoding2cp(enc);
if (code_page_installed(cp) ||
@@ -1399,22 +1368,14 @@ ole_mb2wc(char *pm, int len)
return pw;
}
-static char *
-ole_alloc_vstr(UINT size, void *arg)
-{
- VALUE str = rb_enc_str_new(NULL, size, cWIN32OLE_enc);
- *(VALUE *)arg = str;
- return RSTRING_PTR(str);
-}
-
static VALUE
ole_wc2vstr(LPWSTR pw, BOOL isfree)
{
- VALUE vstr;
- ole_wc2mb_alloc(pw, ole_alloc_vstr, &vstr);
- rb_str_set_len(vstr, (long)strlen(RSTRING_PTR(vstr)));
+ char *p = ole_wc2mb(pw);
+ VALUE vstr = rb_enc_str_new(p, strlen(p), cWIN32OLE_enc);
if(isfree)
SysFreeString(pw);
+ free(p);
return vstr;
}
@@ -1855,18 +1816,14 @@ ole_set_byref(VARIANT *realvar, VARIANT *var, VARTYPE vt)
V_R8REF(var) = &V_R8(realvar);
break;
-#if (_MSC_VER >= 1300) || defined(__CYGWIN__) || defined(__MINGW32__)
-#ifdef V_I8REF
+#if (_MSC_VER >= 1300)
case VT_I8:
V_I8REF(var) = &V_I8(realvar);
break;
-#endif
-#ifdef V_UI8REF
case VT_UI8:
V_UI8REF(var) = &V_UI8(realvar);
break;
#endif
-#endif
case VT_INT:
V_INTREF(var) = &V_INT(realvar);
break;
@@ -2222,10 +2179,8 @@ ole_variant2val(VARIANT *pvar)
#if (_MSC_VER >= 1300) || defined(__CYGWIN__) || defined(__MINGW32__)
case VT_I8:
if(V_ISBYREF(pvar))
-#if (_MSC_VER >= 1300) || defined(__CYGWIN__) || defined(__MINGW32__)
-#ifdef V_I8REF
+#if (_MSC_VER >= 1300)
obj = I8_2_NUM(*V_I8REF(pvar));
-#endif
#else
obj = Qnil;
#endif
@@ -2234,10 +2189,8 @@ ole_variant2val(VARIANT *pvar)
break;
case VT_UI8:
if(V_ISBYREF(pvar))
-#if (_MSC_VER >= 1300) || defined(__CYGWIN__) || defined(__MINGW32__)
-#ifdef V_UI8REF
+#if (_MSC_VER >= 1300)
obj = UI8_2_NUM(*V_UI8REF(pvar));
-#endif
#else
obj = Qnil;
#endif
@@ -2749,6 +2702,7 @@ fole_s_connect(int argc, VALUE *argv, VALUE self)
void *p;
IUnknown *pUnknown;
+ rb_secure(4);
/* initialize to use OLE */
ole_initialize();
@@ -2832,6 +2786,7 @@ fole_s_const_load(int argc, VALUE *argv, VALUE self)
VALUE file;
LCID lcid = cWIN32OLE_lcid;
+ rb_secure(4);
rb_scan_args(argc, argv, "11", &ole, &klass);
if (TYPE(klass) != T_CLASS &&
TYPE(klass) != T_MODULE &&
@@ -2894,6 +2849,7 @@ ole_types_from_typelib(ITypeLib *pTypeLib, VALUE classes)
ITypeInfo *pTypeInfo;
VALUE type;
+ rb_secure(4);
count = pTypeLib->lpVtbl->GetTypeInfoCount(pTypeLib);
for (i = 0; i < count; i++) {
hr = pTypeLib->lpVtbl->GetDocumentation(pTypeLib, i,
@@ -3177,11 +3133,25 @@ fole_s_create_guid(VALUE self)
* You must not use thease method.
*/
+static void ole_pure_initialize()
+{
+ HRESULT hr;
+ hr = OleInitialize(NULL);
+ if(FAILED(hr)) {
+ ole_raise(hr, rb_eRuntimeError, "fail: OLE initialize");
+ }
+}
+
+static void ole_pure_uninitialize()
+{
+ OleUninitialize();
+}
+
/* :nodoc */
static VALUE
fole_s_ole_initialize(VALUE self)
{
- ole_initialize();
+ ole_pure_initialize();
return Qnil;
}
@@ -3189,7 +3159,7 @@ fole_s_ole_initialize(VALUE self)
static VALUE
fole_s_ole_uninitialize(VALUE self)
{
- ole_uninitialize();
+ ole_pure_uninitialize();
return Qnil;
}
@@ -3257,6 +3227,7 @@ fole_initialize(int argc, VALUE *argv, VALUE self)
OLECHAR *pBuf;
IDispatch *pDispatch;
void *p;
+ rb_secure(4);
rb_call_super(0, 0);
rb_scan_args(argc, argv, "11*", &svr_name, &host, &others);
@@ -3302,9 +3273,8 @@ fole_initialize(int argc, VALUE *argv, VALUE self)
}
static VALUE
-hash2named_arg(RB_BLOCK_CALL_FUNC_ARGLIST(pair, op))
+hash2named_arg(VALUE pair, struct oleparam* pOp)
{
- struct oleparam* pOp = (struct oleparam *)op;
unsigned int index, i;
VALUE key, value;
index = pOp->dp.cNamedArgs;
@@ -3985,6 +3955,7 @@ static VALUE
fole_free(VALUE self)
{
struct oledata *pole;
+ rb_secure(4);
OLEData_Get_Struct(self, pole);
OLE_FREE(pole->pDispatch);
pole->pDispatch = NULL;
@@ -4097,27 +4068,20 @@ fole_missing(int argc, VALUE *argv, VALUE self)
{
ID id;
const char* mname;
- size_t n;
- rb_check_arity(argc, 1, UNLIMITED_ARGUMENTS);
+ int n;
id = rb_to_id(argv[0]);
mname = rb_id2name(id);
if(!mname) {
rb_raise(rb_eRuntimeError, "fail: unknown method or property");
}
n = strlen(mname);
-#if SIZEOF_SIZE_T > SIZEOF_LONG
- if (n >= LONG_MAX) {
- rb_raise(rb_eRuntimeError, "too long method or property name");
- }
-#endif
if(mname[n-1] == '=') {
- rb_check_arity(argc, 2, 2);
- argv[0] = rb_enc_str_new(mname, (long)(n-1), cWIN32OLE_enc);
+ argv[0] = rb_enc_str_new(mname, n-1, cWIN32OLE_enc);
return ole_propertyput(self, argv[0], argv[1]);
}
else {
- argv[0] = rb_enc_str_new(mname, (long)n, cWIN32OLE_enc);
+ argv[0] = rb_enc_str_new(mname, n, cWIN32OLE_enc);
return ole_invoke(argc, argv, self, DISPATCH_METHOD|DISPATCH_PROPERTYGET, FALSE);
}
}
@@ -4196,6 +4160,7 @@ ole_methods_sub(ITypeInfo *pOwnerTypeInfo, ITypeInfo *pTypeInfo, VALUE methods,
HRESULT hr;
TYPEATTR *pTypeAttr;
BSTR bstr;
+ char *pstr;
FUNCDESC *pFuncDesc;
VALUE method;
WORD i;
@@ -4204,6 +4169,7 @@ ole_methods_sub(ITypeInfo *pOwnerTypeInfo, ITypeInfo *pTypeInfo, VALUE methods,
ole_raise(hr, eWIN32OLERuntimeError, "failed to GetTypeAttr");
}
for(i = 0; i < pTypeAttr->cFuncs; i++) {
+ pstr = NULL;
hr = pTypeInfo->lpVtbl->GetFuncDesc(pTypeInfo, i, &pFuncDesc);
if (FAILED(hr))
continue;
@@ -4552,6 +4518,7 @@ fole_respond_to(VALUE self, VALUE method)
BSTR wcmdname;
DISPID DispID;
HRESULT hr;
+ rb_secure(4);
if(TYPE(method) != T_STRING && TYPE(method) != T_SYMBOL) {
rb_raise(rb_eTypeError, "wrong argument type (expected String or Symbol)");
}
@@ -5311,7 +5278,7 @@ foletypelib_name(VALUE self)
ole_raise(hr, eWIN32OLERuntimeError, "failed to get name from ITypeLib");
}
name = WC2VSTR(bstr);
- return name;
+ return rb_enc_str_new(StringValuePtr(name), strlen(StringValuePtr(name)), cWIN32OLE_enc);
}
/*
@@ -5466,7 +5433,7 @@ foletypelib_path(VALUE self)
pTypeLib->lpVtbl->ReleaseTLibAttr(pTypeLib, pTLibAttr);
path = WC2VSTR(bstr);
- return path;
+ return rb_enc_str_new(StringValuePtr(path), strlen(StringValuePtr(path)), cWIN32OLE_enc);
}
/*
@@ -5776,7 +5743,7 @@ ole_type_visible(ITypeInfo *pTypeInfo)
/*
* call-seq:
- * WIN32OLE_TYPE#visible? #=> true or false
+ * WIN32OLE_TYPE#visible #=> true or false
*
* Returns true if the OLE class is public.
* tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Application')
@@ -6152,6 +6119,7 @@ ole_variables(ITypeInfo *pTypeInfo)
WORD i;
UINT len;
BSTR bstr;
+ char *pstr;
VARDESC *pVarDesc;
struct olevariabledata *pvar;
VALUE var;
@@ -6166,6 +6134,7 @@ ole_variables(ITypeInfo *pTypeInfo)
if(FAILED(hr))
continue;
len = 0;
+ pstr = NULL;
hr = pTypeInfo->lpVtbl->GetNames(pTypeInfo, pVarDesc->memid, &bstr,
1, &len);
if(FAILED(hr) || len == 0 || !bstr)
@@ -6948,7 +6917,7 @@ folemethod_event_interface(VALUE self)
return Qnil;
}
-static HRESULT
+static VALUE
ole_method_docinfo_from_type(
ITypeInfo *pTypeInfo,
UINT method_index,
@@ -7684,9 +7653,11 @@ static long
ole_search_event_at(VALUE ary, VALUE ev)
{
VALUE event;
+ VALUE def_event;
VALUE event_name;
long i, len;
long ret = -1;
+ def_event = Qnil;
len = RARRAY_LEN(ary);
for(i = 0; i < len; i++) {
event = rb_ary_entry(ary, i);
@@ -8323,6 +8294,7 @@ ev_advise(int argc, VALUE *argv, VALUE self)
struct oleeventdata *poleev;
void *p;
+ rb_secure(4);
rb_scan_args(argc, argv, "11", &ole, &itf);
if (!rb_obj_is_kind_of(ole, cWIN32OLE)) {
@@ -8530,6 +8502,7 @@ fev_off_event(int argc, VALUE *argv, VALUE self)
VALUE event = Qnil;
VALUE events;
+ rb_secure(4);
rb_scan_args(argc, argv, "01", &event);
if(!NIL_P(event)) {
if(TYPE(event) != T_STRING && TYPE(event) != T_SYMBOL) {
@@ -8597,7 +8570,7 @@ evs_entry(long i)
}
static VALUE
-evs_length(void)
+evs_length()
{
return rb_funcall(ary_ole_event, rb_intern("length"), 0);
}
@@ -8746,38 +8719,6 @@ folevariant_s_array(VALUE klass, VALUE elems, VALUE vvt)
return obj;
}
-static void
-check_type_val2variant(VALUE val)
-{
- VALUE elem;
- int len = 0;
- int i = 0;
- if(!rb_obj_is_kind_of(val, cWIN32OLE) &&
- !rb_obj_is_kind_of(val, cWIN32OLE_VARIANT) &&
- !rb_obj_is_kind_of(val, rb_cTime)) {
- switch (TYPE(val)) {
- case T_ARRAY:
- len = RARRAY_LEN(val);
- for(i = 0; i < len; i++) {
- elem = rb_ary_entry(val, i);
- check_type_val2variant(elem);
- }
- break;
- case T_STRING:
- case T_FIXNUM:
- case T_BIGNUM:
- case T_FLOAT:
- case T_TRUE:
- case T_FALSE:
- case T_NIL:
- break;
- default:
- rb_raise(rb_eTypeError, "can not convert WIN32OLE_VARIANT from type %s",
- rb_obj_classname(val));
- }
- }
-}
-
/*
* call-seq:
* WIN32OLE_VARIANT.new(val, vartype) #=> WIN32OLE_VARIANT object.
@@ -8813,7 +8754,24 @@ folevariant_initialize(VALUE self, VALUE args)
VariantInit(&var);
val = rb_ary_entry(args, 0);
- check_type_val2variant(val);
+ if(!rb_obj_is_kind_of(val, cWIN32OLE) &&
+ !rb_obj_is_kind_of(val, cWIN32OLE_VARIANT) &&
+ !rb_obj_is_kind_of(val, rb_cTime)) {
+ switch (TYPE(val)) {
+ case T_ARRAY:
+ case T_STRING:
+ case T_FIXNUM:
+ case T_BIGNUM:
+ case T_FLOAT:
+ case T_TRUE:
+ case T_FALSE:
+ case T_NIL:
+ break;
+ default:
+ rb_raise(rb_eTypeError, "can not convert WIN32OLE_VARIANT from type %s",
+ rb_obj_classname(val));
+ }
+ }
Data_Get_Struct(self, struct olevariantdata, pvar);
if (len == 1) {
@@ -9104,21 +9062,20 @@ folevariant_set_value(VALUE self, VALUE val)
}
static void
-init_enc2cp(void)
+init_enc2cp()
{
enc2cp_table = st_init_numtable();
}
static void
-free_enc2cp(void)
+free_enc2cp()
{
st_free_table(enc2cp_table);
}
void
-Init_win32ole(void)
+Init_win32ole()
{
- g_ole_initialized_init();
ary_ole_event = rb_ary_new();
rb_gc_register_mark_object(ary_ole_event);
id_events = rb_intern("events");
diff --git a/ext/zlib/depend b/ext/zlib/depend
deleted file mode 100644
index 9d47df2a8d..0000000000
--- a/ext/zlib/depend
+++ /dev/null
@@ -1,5 +0,0 @@
-$(OBJS): $(HDRS) $(ruby_headers) \
- $(hdrdir)/ruby/io.h \
- $(hdrdir)/ruby/encoding.h \
- $(hdrdir)/ruby/oniguruma.h \
- $(hdrdir)/ruby/thread.h
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index df2a2501b2..170d306162 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -633,7 +633,7 @@ zstream_expand_buffer(struct zstream *z)
VALUE self = (VALUE)z->stream.opaque;
rb_str_resize(z->buf, z->buf_filled);
- rb_obj_reveal(z->buf, rb_cString);
+ RBASIC(z->buf)->klass = rb_cString;
OBJ_INFECT(z->buf, self);
rb_protect(rb_yield, z->buf, &state);
@@ -678,7 +678,7 @@ zstream_expand_buffer_into(struct zstream *z, unsigned long size)
z->buf_filled = 0;
z->stream.next_out = (Bytef*)RSTRING_PTR(z->buf);
z->stream.avail_out = MAX_UINT(size);
- rb_obj_hide(z->buf);
+ RBASIC(z->buf)->klass = 0;
}
else if (z->stream.avail_out != size) {
rb_str_resize(z->buf, z->buf_filled + size);
@@ -740,7 +740,7 @@ zstream_append_buffer(struct zstream *z, const Bytef *src, long len)
z->buf_filled = len;
z->stream.next_out = (Bytef*)RSTRING_PTR(z->buf);
z->stream.avail_out = 0;
- rb_obj_hide(z->buf);
+ RBASIC(z->buf)->klass = 0;
return;
}
@@ -782,7 +782,7 @@ zstream_detach_buffer(struct zstream *z)
else {
dst = z->buf;
rb_str_resize(dst, z->buf_filled);
- rb_obj_reveal(dst, rb_cString);
+ RBASIC(dst)->klass = rb_cString;
}
OBJ_INFECT(dst, self);
@@ -811,7 +811,7 @@ zstream_shift_buffer(struct zstream *z, long len)
}
dst = rb_str_subseq(z->buf, 0, len);
- rb_obj_reveal(dst, rb_cString);
+ RBASIC(dst)->klass = rb_cString;
z->buf_filled -= len;
memmove(RSTRING_PTR(z->buf), RSTRING_PTR(z->buf) + len,
z->buf_filled);
@@ -866,7 +866,7 @@ zstream_append_input(struct zstream *z, const Bytef *src, long len)
if (NIL_P(z->input)) {
z->input = rb_str_buf_new(len);
rb_str_buf_cat(z->input, (const char*)src, len);
- rb_obj_hide(z->input);
+ RBASIC(z->input)->klass = 0;
}
else {
rb_str_buf_cat(z->input, (const char*)src, len);
@@ -915,10 +915,10 @@ zstream_detach_input(struct zstream *z)
}
else {
dst = z->input;
- rb_obj_reveal(dst, rb_cString);
+ RBASIC(dst)->klass = rb_cString;
}
z->input = Qnil;
- rb_obj_reveal(dst, rb_cString);
+ RBASIC(dst)->klass = rb_cString;
return dst;
}
@@ -1074,13 +1074,11 @@ loop:
}
if (err == Z_NEED_DICT) {
VALUE self = (VALUE)z->stream.opaque;
- if (self) {
- VALUE dicts = rb_ivar_get(self, id_dictionaries);
- VALUE dict = rb_hash_aref(dicts, rb_uint2inum(z->stream.adler));
- if (!NIL_P(dict)) {
- rb_inflate_set_dictionary(self, dict);
- goto loop;
- }
+ VALUE dicts = rb_ivar_get(self, id_dictionaries);
+ VALUE dict = rb_hash_aref(dicts, rb_uint2inum(z->stream.adler));
+ if (!NIL_P(dict)) {
+ rb_inflate_set_dictionary(self, dict);
+ goto loop;
}
}
raise_zlib_error(err, z->stream.msg);
@@ -1295,8 +1293,12 @@ rb_zstream_finish(VALUE obj)
/*
* call-seq:
- * flush_next_in -> input
+ * flush_next_out -> String
+ * flush_next_out { |chunk| ... } -> nil
*
+ * Flushes output buffer and returns all data in that buffer. If a block is
+ * given each chunk is yielded to the block until the current output buffer
+ * has been flushed.
*/
static VALUE
rb_zstream_flush_next_in(VALUE obj)
@@ -1311,13 +1313,7 @@ rb_zstream_flush_next_in(VALUE obj)
}
/*
- * call-seq:
- * flush_next_out -> String
- * flush_next_out { |chunk| ... } -> nil
- *
- * Flushes output buffer and returns all data in that buffer. If a block is
- * given each chunk is yielded to the block until the current output buffer
- * has been flushed.
+ * Flushes output buffer and returns all data in that buffer.
*/
static VALUE
rb_zstream_flush_next_out(VALUE obj)
@@ -1854,12 +1850,12 @@ rb_inflate_s_allocate(VALUE klass)
* == Example
*
* open "compressed.file" do |compressed_io|
- * zi = Zlib::Inflate.new(Zlib::MAX_WBITS + 32)
+ * inflate = Zlib::Inflate.new(Zlib::MAX_WBITS + 32)
*
* begin
* open "uncompressed.file", "w+" do |uncompressed_io|
* uncompressed_io << zi.inflate(compressed_io.read)
- * end
+ * }
* ensure
* zi.close
* end
@@ -2711,7 +2707,7 @@ gzfile_read(struct gzfile *gz, long len)
if (len == 0) return rb_str_new(0, 0);
if (len < 0) return Qnil;
dst = zstream_shift_buffer(&gz->z, len);
- if (!NIL_P(dst)) gzfile_calc_crc(gz, dst);
+ gzfile_calc_crc(gz, dst);
return dst;
}
@@ -2774,7 +2770,6 @@ gzfile_read_all(struct gzfile *gz)
}
dst = zstream_detach_buffer(&gz->z);
- if (NIL_P(dst)) return dst;
gzfile_calc_crc(gz, dst);
OBJ_TAINT(dst);
return gzfile_newstr(gz, dst);
@@ -2821,7 +2816,6 @@ gzfile_getc(struct gzfile *gz)
buf = gz->z.buf;
len = rb_enc_mbclen(RSTRING_PTR(buf), RSTRING_END(buf), gz->enc);
dst = gzfile_read(gz, len);
- if (NIL_P(dst)) return dst;
return gzfile_newstr(gz, dst);
}
}
@@ -3194,9 +3188,13 @@ rb_gzfile_set_mtime(VALUE obj, VALUE mtime)
rb_raise(cGzError, "header is already written");
}
- val = rb_Integer(mtime);
- gz->mtime = NUM2UINT(val);
-
+ if (FIXNUM_P(mtime)) {
+ gz->mtime = FIX2INT(mtime);
+ }
+ else {
+ val = rb_Integer(mtime);
+ gz->mtime = FIXNUM_P(val) ? FIX2UINT(val) : rb_big2ulong(val);
+ }
return mtime;
}
@@ -4043,7 +4041,6 @@ gzreader_gets(int argc, VALUE *argv, VALUE obj)
n = limit;
}
dst = zstream_shift_buffer(&gz->z, n);
- if (NIL_P(dst)) return dst;
gzfile_calc_crc(gz, dst);
dst = gzfile_newstr(gz, dst);
}
@@ -4105,7 +4102,6 @@ gzreader_gets(int argc, VALUE *argv, VALUE obj)
gz->lineno++;
dst = gzfile_read(gz, n);
- if (NIL_P(dst)) return dst;
if (rspara) {
gzreader_skip_linebreaks(gz);
}
diff --git a/file.c b/file.c
index 77facacfcf..08cd5f8dcf 100644
--- a/file.c
+++ b/file.c
@@ -19,9 +19,6 @@
#include <sys/cygwin.h>
#include <wchar.h>
#endif
-#ifdef __APPLE__
-#include <CoreFoundation/CFString.h>
-#endif
#include "ruby/ruby.h"
#include "ruby/io.h"
@@ -78,10 +75,6 @@ int flock(int, int);
#include <fcntl.h>
#endif
-#if defined(HAVE_SYS_TIME_H)
-#include <sys/time.h>
-#endif
-
#if !defined HAVE_LSTAT && !defined lstat
#define lstat stat
#endif
@@ -109,6 +102,8 @@ int flock(int, int);
#define STAT(p, s) stat((p), (s))
#endif
+#define rb_sys_fail_path(path) rb_sys_fail_str(path)
+
#if defined(__BEOS__) || defined(__HAIKU__) /* should not change ID if -1 */
static int
be_chown(const char *path, uid_t owner, gid_t group)
@@ -232,95 +227,30 @@ rb_str_encode_ospath(VALUE path)
{
#ifdef _WIN32
rb_encoding *enc = rb_enc_get(path);
- rb_encoding *utf8 = rb_utf8_encoding();
- if (enc == rb_ascii8bit_encoding()) {
- enc = rb_filesystem_encoding();
+ if (enc != rb_ascii8bit_encoding()) {
+ rb_encoding *utf8 = rb_utf8_encoding();
+ if (enc != utf8)
+ path = rb_str_encode(path, rb_enc_from_encoding(utf8), 0, Qnil);
}
- if (enc != utf8) {
- path = rb_str_conv_enc(path, enc, utf8);
+ else if (RSTRING_LEN(path) > 0) {
+ path = rb_str_dup(path);
+ rb_enc_associate(path, rb_filesystem_encoding());
+ path = rb_str_encode(path, rb_enc_from_encoding(rb_utf8_encoding()), 0, Qnil);
}
-#elif defined __APPLE__
- path = rb_str_conv_enc(path, NULL, rb_utf8_encoding());
#endif
return path;
}
-#ifdef __APPLE__
-static VALUE
-rb_str_normalize_ospath0(const char *ptr, long len)
-{
- VALUE str;
- CFIndex buflen = 0;
- CFRange all;
- CFStringRef s = CFStringCreateWithBytesNoCopy(kCFAllocatorDefault,
- (const UInt8 *)ptr, len,
- kCFStringEncodingUTF8, FALSE,
- kCFAllocatorNull);
- CFMutableStringRef m = CFStringCreateMutableCopy(kCFAllocatorDefault, len, s);
-
- CFStringNormalize(m, kCFStringNormalizationFormC);
- all = CFRangeMake(0, CFStringGetLength(m));
- CFStringGetBytes(m, all, kCFStringEncodingUTF8, '?', FALSE, NULL, 0, &buflen);
- str = rb_enc_str_new(0, buflen, rb_utf8_encoding());
- CFStringGetBytes(m, all, kCFStringEncodingUTF8, '?', FALSE, (UInt8 *)RSTRING_PTR(str),
- buflen, &buflen);
- rb_str_set_len(str, buflen);
- CFRelease(m);
- CFRelease(s);
- return str;
-}
-
-VALUE
-rb_str_normalize_ospath(const char *ptr, long len)
-{
- const char *p = ptr;
- const char *e = ptr + len;
- const char *p1 = p;
- VALUE str = rb_str_buf_new(len);
- rb_encoding *enc = rb_utf8_encoding();
- rb_enc_associate(str, enc);
-
- while (p < e) {
- int l, c;
- int r = rb_enc_precise_mbclen(p, e, enc);
- if (!MBCLEN_CHARFOUND_P(r)) {
- /* invalid byte shall not happen but */
- rb_str_append(str, rb_str_normalize_ospath0(p1, p-p1));
- rb_str_cat2(str, "\xEF\xBF\xBD");
- p += 1;
- }
- l = MBCLEN_CHARFOUND_LEN(r);
- c = rb_enc_mbc_to_codepoint(p, e, enc);
- if ((0x2000 <= c && c <= 0x2FFF) || (0xF900 <= c && c <= 0xFAFF) ||
- (0x2F800 <= c && c <= 0x2FAFF)) {
- if (p - p1 > 0) {
- rb_str_append(str, rb_str_normalize_ospath0(p1, p-p1));
- }
- rb_str_cat(str, p, l);
- p += l;
- p1 = p;
- }
- else {
- p += l;
- }
- }
- if (p - p1 > 0) {
- rb_str_append(str, rb_str_normalize_ospath0(p1, p-p1));
- }
-
- return str;
-}
-#endif
-
static long
apply2files(void (*func)(const char *, VALUE, void *), VALUE vargs, void *arg)
{
long i;
volatile VALUE path;
+ rb_secure(4);
for (i=0; i<RARRAY_LEN(vargs); i++) {
const char *s;
- path = rb_get_path(RARRAY_AREF(vargs, i));
+ path = rb_get_path(RARRAY_PTR(vargs)[i]);
path = rb_str_encode_ospath(path);
s = RSTRING_PTR(path);
(*func)(s, path, arg);
@@ -332,7 +262,6 @@ apply2files(void (*func)(const char *, VALUE, void *), VALUE vargs, void *arg)
/*
* call-seq:
* file.path -> filename
- * file.to_path -> filename
*
* Returns the pathname used to create <i>file</i> as a string. Does
* not normalize the name.
@@ -362,11 +291,10 @@ stat_memsize(const void *p)
static const rb_data_type_t stat_data_type = {
"stat",
{NULL, RUBY_TYPED_DEFAULT_FREE, stat_memsize,},
- NULL, NULL, RUBY_TYPED_FREE_IMMEDIATELY
};
static VALUE
-stat_new_0(VALUE klass, const struct stat *st)
+stat_new_0(VALUE klass, struct stat *st)
{
struct stat *nst = 0;
@@ -377,8 +305,8 @@ stat_new_0(VALUE klass, const struct stat *st)
return TypedData_Wrap_Struct(klass, &stat_data_type, nst);
}
-VALUE
-rb_stat_new(const struct stat *st)
+static VALUE
+stat_new(struct stat *st)
{
return stat_new_0(rb_cStat, st);
}
@@ -398,10 +326,8 @@ static struct timespec stat_mtimespec(struct stat *st);
* call-seq:
* stat <=> other_stat -> -1, 0, 1, nil
*
- * Compares File::Stat objects by comparing their respective modification
- * times.
- *
- * +nil+ is returned if the two values are incomparable.
+ * Compares <code>File::Stat</code> objects by comparing their
+ * respective modification times.
*
* f1 = File.new("f1", "w")
* sleep 1
@@ -600,7 +526,7 @@ rb_stat_gid(VALUE self)
static VALUE
rb_stat_rdev(VALUE self)
{
-#ifdef HAVE_STRUCT_STAT_ST_RDEV
+#ifdef HAVE_ST_RDEV
return DEVT2NUM(get_stat(self)->st_rdev);
#else
return Qnil;
@@ -621,7 +547,7 @@ rb_stat_rdev(VALUE self)
static VALUE
rb_stat_rdev_major(VALUE self)
{
-#if defined(HAVE_STRUCT_STAT_ST_RDEV) && defined(major)
+#if defined(HAVE_ST_RDEV) && defined(major)
return DEVT2NUM(major(get_stat(self)->st_rdev));
#else
return Qnil;
@@ -642,7 +568,7 @@ rb_stat_rdev_major(VALUE self)
static VALUE
rb_stat_rdev_minor(VALUE self)
{
-#if defined(HAVE_STRUCT_STAT_ST_RDEV) && defined(minor)
+#if defined(HAVE_ST_RDEV) && defined(minor)
return DEVT2NUM(minor(get_stat(self)->st_rdev));
#else
return Qnil;
@@ -678,7 +604,7 @@ rb_stat_size(VALUE self)
static VALUE
rb_stat_blksize(VALUE self)
{
-#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE
+#ifdef HAVE_ST_BLKSIZE
return ULONG2NUM(get_stat(self)->st_blksize);
#else
return Qnil;
@@ -984,11 +910,12 @@ rb_file_s_stat(VALUE klass, VALUE fname)
{
struct stat st;
+ rb_secure(4);
FilePathValue(fname);
if (rb_stat(fname, &st) < 0) {
rb_sys_fail_path(fname);
}
- return rb_stat_new(&st);
+ return stat_new(&st);
}
/*
@@ -1016,7 +943,7 @@ rb_io_stat(VALUE obj)
if (fstat(fptr->fd, &st) == -1) {
rb_sys_fail_path(fptr->pathv);
}
- return rb_stat_new(&st);
+ return stat_new(&st);
}
/*
@@ -1045,7 +972,7 @@ rb_file_s_lstat(VALUE klass, VALUE fname)
if (lstat(StringValueCStr(fname), &st) == -1) {
rb_sys_fail_path(fname);
}
- return rb_stat_new(&st);
+ return stat_new(&st);
#else
return rb_file_s_stat(klass, fname);
#endif
@@ -1080,7 +1007,7 @@ rb_file_lstat(VALUE obj)
if (lstat(RSTRING_PTR(path), &st) == -1) {
rb_sys_fail_path(fptr->pathv);
}
- return rb_stat_new(&st);
+ return stat_new(&st);
#else
return rb_io_stat(obj);
#endif
@@ -1089,48 +1016,36 @@ rb_file_lstat(VALUE obj)
static int
rb_group_member(GETGROUPS_T gid)
{
-#ifdef _WIN32
- return FALSE;
-#else
int rv = FALSE;
- int groups = 16;
- VALUE v = 0;
- GETGROUPS_T *gary;
- int anum = -1;
-
+#ifndef _WIN32
if (getgid() == gid || getegid() == gid)
return TRUE;
- /*
- * On Mac OS X (Mountain Lion), NGROUPS is 16. But libc and kernel
- * accept more larger value.
- * So we don't trunk NGROUPS anymore.
- */
- while (groups <= RB_MAX_GROUPS) {
- gary = ALLOCV_N(GETGROUPS_T, v, groups);
- anum = getgroups(groups, gary);
- if (anum != -1 && anum != groups)
- break;
- groups *= 2;
- if (v) {
- ALLOCV_END(v);
- v = 0;
- }
- }
- if (anum == -1)
- return FALSE;
-
- while (--anum >= 0) {
- if (gary[anum] == gid) {
- rv = TRUE;
- break;
+# ifdef HAVE_GETGROUPS
+# ifndef NGROUPS
+# ifdef NGROUPS_MAX
+# define NGROUPS NGROUPS_MAX
+# else
+# define NGROUPS 32
+# endif
+# endif
+ {
+ GETGROUPS_T *gary;
+ int anum;
+
+ gary = xmalloc(NGROUPS * sizeof(GETGROUPS_T));
+ anum = getgroups(NGROUPS, gary);
+ while (--anum >= 0) {
+ if (gary[anum] == gid) {
+ rv = TRUE;
+ break;
+ }
}
+ xfree(gary);
}
- if (v)
- ALLOCV_END(v);
-
- return rv;
+# endif
#endif
+ return rv;
}
#ifndef S_IXUGO
@@ -1149,15 +1064,11 @@ eaccess(const char *path, int mode)
struct stat st;
rb_uid_t euid;
- euid = geteuid();
-
- /* no setuid nor setgid. run shortcut. */
- if (getuid() == euid && getgid() == getegid())
- return access(path, mode);
-
if (STAT(path, &st) < 0)
return -1;
+ euid = geteuid();
+
if (euid == 0) {
/* Root can read or write any file. */
if (!(mode & X_OK))
@@ -1185,6 +1096,12 @@ eaccess(const char *path, int mode)
}
#endif
+static inline int
+access_internal(const char *path, int mode)
+{
+ return access(path, mode);
+}
+
/*
* Document-class: FileTest
@@ -1206,8 +1123,6 @@ eaccess(const char *path, int mode)
* or a symlink that points at a directory, and <code>false</code>
* otherwise.
*
- * _file_name_ can be an IO object.
- *
* File.directory?(".")
*/
@@ -1230,8 +1145,6 @@ rb_file_directory_p(VALUE obj, VALUE fname)
* File.pipe?(file_name) -> true or false
*
* Returns <code>true</code> if the named file is a pipe.
- *
- * _file_name_ can be an IO object.
*/
static VALUE
@@ -1293,8 +1206,6 @@ rb_file_symlink_p(VALUE obj, VALUE fname)
* File.socket?(file_name) -> true or false
*
* Returns <code>true</code> if the named file is a socket.
- *
- * _file_name_ can be an IO object.
*/
static VALUE
@@ -1329,8 +1240,6 @@ rb_file_socket_p(VALUE obj, VALUE fname)
* File.blockdev?(file_name) -> true or false
*
* Returns <code>true</code> if the named file is a block device.
- *
- * _file_name_ can be an IO object.
*/
static VALUE
@@ -1359,8 +1268,6 @@ rb_file_blockdev_p(VALUE obj, VALUE fname)
* File.chardev?(file_name) -> true or false
*
* Returns <code>true</code> if the named file is a character device.
- *
- * _file_name_ can be an IO object.
*/
static VALUE
rb_file_chardev_p(VALUE obj, VALUE fname)
@@ -1383,10 +1290,6 @@ rb_file_chardev_p(VALUE obj, VALUE fname)
* File.exists?(file_name) -> true or false
*
* Return <code>true</code> if the named file exists.
- *
- * _file_name_ can be an IO object.
- *
- * "file exists" means that stat() or fstat() system call is successful.
*/
static VALUE
@@ -1398,22 +1301,6 @@ rb_file_exist_p(VALUE obj, VALUE fname)
return Qtrue;
}
-static VALUE
-rb_file_exists_p(VALUE obj, VALUE fname)
-{
- const char *s = "FileTest#";
- if (obj == rb_mFileTest) {
- s = "FileTest.";
- }
- else if (obj == rb_cFile ||
- (RB_TYPE_P(obj, T_CLASS) &&
- RTEST(rb_class_inherited_p(obj, rb_cFile)))) {
- s = "File.";
- }
- rb_warning("%sexists? is a deprecated name, use %sexist? instead", s, s);
- return rb_file_exist_p(obj, fname);
-}
-
/*
* call-seq:
* File.readable?(file_name) -> true or false
@@ -1446,7 +1333,7 @@ rb_file_readable_real_p(VALUE obj, VALUE fname)
rb_secure(2);
FilePathValue(fname);
fname = rb_str_encode_ospath(fname);
- if (access(StringValueCStr(fname), R_OK) < 0) return Qfalse;
+ if (access_internal(StringValueCStr(fname), R_OK) < 0) return Qfalse;
return Qtrue;
}
@@ -1467,8 +1354,6 @@ rb_file_readable_real_p(VALUE obj, VALUE fname)
* <code>nil</code> otherwise. The meaning of the bits is platform
* dependent; on Unix systems, see <code>stat(2)</code>.
*
- * _file_name_ can be an IO object.
- *
* File.world_readable?("/etc/passwd") #=> 420
* m = File.world_readable?("/etc/passwd")
* sprintf("%o", m) #=> "644"
@@ -1520,7 +1405,7 @@ rb_file_writable_real_p(VALUE obj, VALUE fname)
rb_secure(2);
FilePathValue(fname);
fname = rb_str_encode_ospath(fname);
- if (access(StringValueCStr(fname), W_OK) < 0) return Qfalse;
+ if (access_internal(StringValueCStr(fname), W_OK) < 0) return Qfalse;
return Qtrue;
}
@@ -1533,8 +1418,6 @@ rb_file_writable_real_p(VALUE obj, VALUE fname)
* <code>nil</code> otherwise. The meaning of the bits is platform
* dependent; on Unix systems, see <code>stat(2)</code>.
*
- * _file_name_ can be an IO object.
- *
* File.world_writable?("/tmp") #=> 511
* m = File.world_writable?("/tmp")
* sprintf("%o", m) #=> "777"
@@ -1586,7 +1469,7 @@ rb_file_executable_real_p(VALUE obj, VALUE fname)
rb_secure(2);
FilePathValue(fname);
fname = rb_str_encode_ospath(fname);
- if (access(StringValueCStr(fname), X_OK) < 0) return Qfalse;
+ if (access_internal(StringValueCStr(fname), X_OK) < 0) return Qfalse;
return Qtrue;
}
@@ -1600,8 +1483,6 @@ rb_file_executable_real_p(VALUE obj, VALUE fname)
*
* Returns <code>true</code> if the named file exists and is a
* regular file.
- *
- * _file_name_ can be an IO object.
*/
static VALUE
@@ -1620,8 +1501,6 @@ rb_file_file_p(VALUE obj, VALUE fname)
*
* Returns <code>true</code> if the named file exists and has
* a zero size.
- *
- * _file_name_ can be an IO object.
*/
static VALUE
@@ -1640,8 +1519,6 @@ rb_file_zero_p(VALUE obj, VALUE fname)
*
* Returns +nil+ if +file_name+ doesn't exist or has zero size, the size of the
* file otherwise.
- *
- * _file_name_ can be an IO object.
*/
static VALUE
@@ -1661,8 +1538,6 @@ rb_file_size_p(VALUE obj, VALUE fname)
* Returns <code>true</code> if the named file exists and the
* effective used id of the calling process is the owner of
* the file.
- *
- * _file_name_ can be an IO object.
*/
static VALUE
@@ -1692,8 +1567,6 @@ rb_file_rowned_p(VALUE obj, VALUE fname)
* Returns <code>true</code> if the named file exists and the
* effective group id of the calling process is the owner of
* the file. Returns <code>false</code> on Windows.
- *
- * _file_name_ can be an IO object.
*/
static VALUE
@@ -1780,8 +1653,6 @@ rb_file_sticky_p(VALUE obj, VALUE fname)
*
* Returns <code>true</code> if the named files are identical.
*
- * _file_1_ and _file_2_ can be an IO object.
- *
* open("a", "w") {}
* p File.identical?("a", "a") #=> true
* p File.identical?("a", "./a") #=> true
@@ -1846,8 +1717,6 @@ rb_file_identical_p(VALUE obj, VALUE fname1, VALUE fname2)
* File.size(file_name) -> integer
*
* Returns the size of <code>file_name</code>.
- *
- * _file_name_ can be an IO object.
*/
static VALUE
@@ -1939,8 +1808,6 @@ rb_file_s_ftype(VALUE klass, VALUE fname)
*
* Returns the last access time for the named file as a Time object).
*
- * _file_name_ can be an IO object.
- *
* File.atime("testfile") #=> Wed Apr 09 08:51:48 CDT 2003
*
*/
@@ -1987,8 +1854,6 @@ rb_file_atime(VALUE obj)
*
* Returns the modification time for the named file as a Time object.
*
- * _file_name_ can be an IO object.
- *
* File.mtime("testfile") #=> Tue Apr 08 12:58:04 CDT 2003
*
*/
@@ -2036,8 +1901,6 @@ rb_file_mtime(VALUE obj)
* directory information about the file was changed, not the file
* itself).
*
- * _file_name_ can be an IO object.
- *
* Note that on Windows (NTFS), returns creation time (birth time).
*
* File.ctime("testfile") #=> Wed Apr 09 08:53:13 CDT 2003
@@ -2100,7 +1963,7 @@ rb_file_size(VALUE obj)
GetOpenFile(obj, fptr);
if (fptr->mode & FMODE_WRITABLE) {
- rb_io_flush_raw(obj, 0);
+ rb_io_flush(obj);
}
if (fstat(fptr->fd, &st) == -1) {
rb_sys_fail_path(fptr->pathv);
@@ -2325,7 +2188,7 @@ lchown_internal(const char *path, VALUE pathv, void *arg)
/*
* call-seq:
- * File.lchown(owner_int, group_int, file_name,..) -> integer
+ * file.lchown(owner_int, group_int, file_name,..) -> integer
*
* Equivalent to <code>File::chown</code>, but does not follow symbolic
* links (so it will change the owner associated with the link, not the
@@ -2618,7 +2481,6 @@ rb_readlink(VALUE path)
) {
rb_str_modify_expand(v, size);
size *= 2;
- rb_str_set_len(v, size);
}
if (rv < 0) {
rb_str_resize(v, 0);
@@ -2972,9 +2834,10 @@ ntfs_tail(const char *path, const char *end, rb_encoding *enc)
buflen = RSTRING_LEN(result),\
pend = p + buflen)
-static VALUE
-copy_home_path(VALUE result, const char *dir)
+VALUE
+rb_home_dir(const char *user, VALUE result)
{
+ const char *dir;
char *buf;
#if defined DOSISH || defined __CYGWIN__
char *p, *bend;
@@ -2982,9 +2845,29 @@ copy_home_path(VALUE result, const char *dir)
long dirlen;
rb_encoding *enc;
- dirlen = strlen(dir);
- rb_str_resize(result, dirlen);
- memcpy(buf = RSTRING_PTR(result), dir, dirlen);
+ if (!user || !*user) {
+ if (!(dir = getenv("HOME"))) {
+ rb_raise(rb_eArgError, "couldn't find HOME environment -- expanding `~'");
+ }
+ dirlen = strlen(dir);
+ rb_str_resize(result, dirlen);
+ memcpy(buf = RSTRING_PTR(result), dir, dirlen);
+ }
+ else {
+#ifdef HAVE_PWD_H
+ struct passwd *pwPtr = getpwnam(user);
+ if (!pwPtr) {
+ endpwent();
+ rb_raise(rb_eArgError, "user %s doesn't exist", user);
+ }
+ dirlen = strlen(pwPtr->pw_dir);
+ rb_str_resize(result, dirlen);
+ memcpy(buf = RSTRING_PTR(result), pwPtr->pw_dir, dirlen + 1);
+ endpwent();
+#else
+ return Qnil;
+#endif
+ }
enc = rb_filesystem_encoding();
rb_enc_associate(result, enc);
#if defined DOSISH || defined __CYGWIN__
@@ -2997,33 +2880,6 @@ copy_home_path(VALUE result, const char *dir)
return result;
}
-VALUE
-rb_home_dir_of(VALUE user, VALUE result)
-{
-#ifdef HAVE_PWD_H
- struct passwd *pwPtr = getpwnam(RSTRING_PTR(user));
- if (!pwPtr) {
- endpwent();
-#endif
- rb_raise(rb_eArgError, "user %"PRIsVALUE" doesn't exist", user);
-#ifdef HAVE_PWD_H
- }
- copy_home_path(result, pwPtr->pw_dir);
- endpwent();
-#endif
- return result;
-}
-
-VALUE
-rb_default_home_dir(VALUE result)
-{
- const char *dir = getenv("HOME");
- if (!dir) {
- rb_raise(rb_eArgError, "couldn't find HOME environment -- expanding `~'");
- }
- return copy_home_path(result, dir);
-}
-
#ifndef _WIN32
static char *
append_fspath(VALUE result, VALUE fname, char *dir, rb_encoding **enc, rb_encoding *fsenc)
@@ -3073,25 +2929,22 @@ rb_file_expand_path_internal(VALUE fname, VALUE dname, int abs_mode, int long_na
b = 0;
rb_str_set_len(result, 0);
if (*++s) ++s;
- rb_default_home_dir(result);
}
else {
s = nextdirsep(b = s, fend, enc);
- b++; /* b[0] is '~' */
userlen = s - b;
BUFCHECK(bdiff + userlen >= buflen);
memcpy(p, b, userlen);
- ENC_CODERANGE_CLEAR(result);
rb_str_set_len(result, userlen);
- rb_enc_associate(result, enc);
- rb_home_dir_of(result, result);
buf = p + 1;
p += userlen;
}
+ if (NIL_P(rb_home_dir(buf, result))) {
+ rb_raise(rb_eArgError, "can't find user %s", buf);
+ }
if (!rb_is_absolute_path(RSTRING_PTR(result))) {
if (userlen) {
- rb_enc_raise(enc, rb_eArgError, "non-absolute home of %.*s%.0"PRIsVALUE,
- (int)userlen, b, fname);
+ rb_raise(rb_eArgError, "non-absolute home of %.*s", (int)userlen, b);
}
else {
rb_raise(rb_eArgError, "non-absolute home");
@@ -3426,26 +3279,15 @@ rb_file_expand_path_fast(VALUE fname, VALUE dname)
*
* Converts a pathname to an absolute pathname. Relative paths are
* referenced from the current working directory of the process unless
- * +dir_string+ is given, in which case it will be used as the
+ * <i>dir_string</i> is given, in which case it will be used as the
* starting point. The given pathname may start with a
* ``<code>~</code>'', which expands to the process owner's home
- * directory (the environment variable +HOME+ must be set
+ * directory (the environment variable <code>HOME</code> must be set
* correctly). ``<code>~</code><i>user</i>'' expands to the named
* user's home directory.
*
* File.expand_path("~oracle/bin") #=> "/home/oracle/bin"
- *
- * A simple example of using +dir_string+ is as follows.
- * File.expand_path("ruby", "/usr/bin") #=> "/usr/bin/ruby"
- *
- * A more complex example which also resolves parent directory is as follows.
- * Suppose we are in bin/mygem and want the absolute path of lib/mygem.rb.
- *
- * File.expand_path("../../lib/mygem.rb", __FILE__)
- * #=> ".../path/to/project/lib/mygem.rb"
- *
- * So first it resolves the parent of __FILE__, that is bin/, then go to the
- * parent, the root of the project and appends +lib/mygem.rb+.
+ * File.expand_path("../../bin", "/tmp/x") #=> "/bin"
*/
VALUE
@@ -3827,7 +3669,7 @@ ruby_enc_find_basename(const char *name, long *baselen, long *alllen, rb_encodin
*
* Returns the last component of the filename given in <i>file_name</i>,
* which can be formed using both <code>File::SEPARATOR</code> and
- * <code>File::ALT_SEPARATOR</code> as the separator when
+ * <code>File::ALT_SEPARETOR</code> as the separator when
* <code>File::ALT_SEPARATOR</code> is not <code>nil</code>. If
* <i>suffix</i> is given and present at the end of <i>file_name</i>,
* it is removed.
@@ -3880,11 +3722,11 @@ rb_file_s_basename(int argc, VALUE *argv)
/*
* call-seq:
- * File.dirname(file_name) -> dir_name
+ * File.dirname(file_name ) -> dir_name
*
* Returns all components of the filename given in <i>file_name</i>
* except the last one. The filename can be formed using both
- * <code>File::SEPARATOR</code> and <code>File::ALT_SEPARATOR</code> as the
+ * <code>File::SEPARATOR</code> and <code>File::ALT_SEPARETOR</code> as the
* separator when <code>File::ALT_SEPARATOR</code> is not <code>nil</code>.
*
* File.dirname("/home/gumby/work/ruby.rb") #=> "/home/gumby/work"
@@ -4104,7 +3946,7 @@ rb_file_join(VALUE ary, VALUE sep)
len = 1;
for (i=0; i<RARRAY_LEN(ary); i++) {
- tmp = RARRAY_AREF(ary, i);
+ tmp = RARRAY_PTR(ary)[i];
if (RB_TYPE_P(tmp, T_STRING)) {
check_path_encoding(tmp);
len += RSTRING_LEN(tmp);
@@ -4118,10 +3960,10 @@ rb_file_join(VALUE ary, VALUE sep)
len += RSTRING_LEN(sep) * (RARRAY_LEN(ary) - 1);
}
result = rb_str_buf_new(len);
- RBASIC_CLEAR_CLASS(result);
+ RBASIC(result)->klass = 0;
OBJ_INFECT(result, ary);
for (i=0; i<RARRAY_LEN(ary); i++) {
- tmp = RARRAY_AREF(ary, i);
+ tmp = RARRAY_PTR(ary)[i];
switch (TYPE(tmp)) {
case T_STRING:
if (!checked) check_path_encoding(tmp);
@@ -4162,7 +4004,7 @@ rb_file_join(VALUE ary, VALUE sep)
rb_str_buf_append(result, tmp);
rb_enc_associate(result, enc);
}
- RBASIC_SET_CLASS_RAW(result, rb_cString);
+ RBASIC(result)->klass = rb_cString;
return result;
}
@@ -4203,16 +4045,10 @@ rb_file_s_join(VALUE klass, VALUE args)
static VALUE
rb_file_s_truncate(VALUE klass, VALUE path, VALUE len)
{
-#ifdef HAVE_TRUNCATE
-#define NUM2POS(n) NUM2OFFT(n)
off_t pos;
-#else
-#define NUM2POS(n) NUM2LONG(n)
- long pos;
-#endif
rb_secure(2);
- pos = NUM2POS(len);
+ pos = NUM2OFFT(len);
FilePathValue(path);
path = rb_str_encode_ospath(path);
#ifdef HAVE_TRUNCATE
@@ -4234,7 +4070,6 @@ rb_file_s_truncate(VALUE klass, VALUE path, VALUE len)
}
#endif
return INT2FIX(0);
-#undef NUM2POS
}
#else
#define rb_file_s_truncate rb_f_notimplement
@@ -4259,21 +4094,15 @@ static VALUE
rb_file_truncate(VALUE obj, VALUE len)
{
rb_io_t *fptr;
-#if defined(HAVE_FTRUNCATE)
-#define NUM2POS(n) NUM2OFFT(n)
off_t pos;
-#else
-#define NUM2POS(n) NUM2LONG(n)
- long pos;
-#endif
rb_secure(2);
- pos = NUM2POS(len);
+ pos = NUM2OFFT(len);
GetOpenFile(obj, fptr);
if (!(fptr->mode & FMODE_WRITABLE)) {
rb_raise(rb_eIOError, "not opened for writing");
}
- rb_io_flush_raw(obj, 0);
+ rb_io_flush(obj);
#ifdef HAVE_FTRUNCATE
if (ftruncate(fptr->fd, pos) < 0)
rb_sys_fail_path(fptr->pathv);
@@ -4282,7 +4111,6 @@ rb_file_truncate(VALUE obj, VALUE len)
rb_sys_fail_path(fptr->pathv);
#endif
return INT2FIX(0);
-#undef NUM2POS
}
#else
#define rb_file_truncate rb_f_notimplement
@@ -4303,6 +4131,7 @@ rb_file_truncate(VALUE obj, VALUE len)
#ifdef __CYGWIN__
#include <winerror.h>
+extern unsigned long __attribute__((stdcall)) GetLastError(void);
#endif
static VALUE
@@ -4324,7 +4153,7 @@ rb_thread_flock(void *data)
/*
* call-seq:
- * file.flock(locking_constant) -> 0 or false
+ * file.flock (locking_constant )-> 0 or false
*
* Locks or unlocks a file according to <i>locking_constant</i> (a
* logical <em>or</em> of the values in the table below).
@@ -4379,7 +4208,7 @@ rb_file_flock(VALUE obj, VALUE operation)
op[0] = fptr->fd;
if (fptr->mode & FMODE_WRITABLE) {
- rb_io_flush_raw(obj, 0);
+ rb_io_flush(obj);
}
while ((int)rb_thread_io_blocking_region(rb_thread_flock, op, fptr->fd) < 0) {
switch (errno) {
@@ -4429,14 +4258,14 @@ test_check(int n, int argc, VALUE *argv)
/*
* call-seq:
- * test(cmd, file1 [, file2] ) -> obj
+ * test(int_cmd, file1 [, file2] ) -> obj
*
- * Uses the integer +cmd+ to perform various tests on +file1+ (first
+ * Uses the integer +int_cmd+ to perform various tests on +file1+ (first
* table below) or on +file1+ and +file2+ (second table).
*
* File tests on a single file:
*
- * Cmd Returns Meaning
+ * Test Returns Meaning
* "A" | Time | Last access time for file1
* "b" | boolean | True if file1 is a block device
* "c" | boolean | True if file1 is a character device
@@ -5408,7 +5237,7 @@ is_explicit_relative(const char *path)
static VALUE
copy_path_class(VALUE path, VALUE orig)
{
- RBASIC_SET_CLASS(path, rb_obj_class(orig));
+ RBASIC(path)->klass = rb_obj_class(orig);
OBJ_FREEZE(path);
return path;
}
@@ -5456,18 +5285,22 @@ rb_find_file_ext_safe(VALUE *filep, const char *const *ext, int safe_level)
return 0;
}
+ if (safe_level >= 4) {
+ rb_raise(rb_eSecurityError, "loading from non-absolute path %s", f);
+ }
+
RB_GC_GUARD(load_path) = rb_get_expanded_load_path();
if (!load_path) return 0;
fname = rb_str_dup(*filep);
- RBASIC_CLEAR_CLASS(fname);
+ RBASIC(fname)->klass = 0;
fnlen = RSTRING_LEN(fname);
tmp = rb_str_tmp_new(MAXPATHLEN + 2);
rb_enc_associate_index(tmp, rb_usascii_encindex());
for (j=0; ext[j]; j++) {
rb_str_cat2(fname, ext[j]);
for (i = 0; i < RARRAY_LEN(load_path); i++) {
- VALUE str = RARRAY_AREF(load_path, i);
+ VALUE str = RARRAY_PTR(load_path)[i];
RB_GC_GUARD(str) = rb_get_path_check(str, safe_level);
if (RSTRING_LEN(str) == 0) continue;
@@ -5476,7 +5309,7 @@ rb_find_file_ext_safe(VALUE *filep, const char *const *ext, int safe_level)
*filep = copy_path_class(tmp, *filep);
return (int)(j+1);
}
- FL_UNSET(tmp, FL_TAINT);
+ FL_UNSET(tmp, FL_TAINT | FL_UNTRUSTED);
}
rb_str_set_len(fname, fnlen);
}
@@ -5517,6 +5350,10 @@ rb_find_file_safe(VALUE path, int safe_level)
return path;
}
+ if (safe_level >= 4) {
+ rb_raise(rb_eSecurityError, "loading from non-absolute path %s", f);
+ }
+
RB_GC_GUARD(load_path) = rb_get_expanded_load_path();
if (load_path) {
long i;
@@ -5524,7 +5361,7 @@ rb_find_file_safe(VALUE path, int safe_level)
tmp = rb_str_tmp_new(MAXPATHLEN + 2);
rb_enc_associate_index(tmp, rb_usascii_encindex());
for (i = 0; i < RARRAY_LEN(load_path); i++) {
- VALUE str = RARRAY_AREF(load_path, i);
+ VALUE str = RARRAY_PTR(load_path)[i];
RB_GC_GUARD(str) = rb_get_path_check(str, safe_level);
if (RSTRING_LEN(str) > 0) {
rb_file_expand_path_internal(path, str, 0, 0, tmp);
@@ -5595,8 +5432,6 @@ static const char null_device[] =
* <code>0644</code>, which means read/write for owner, read-only for
* all others. The only change that can be made is to make the file
* read-only, which is reported as <code>0444</code>.
- *
- * Various constants for the methods in File can be found in File::Constants.
*/
void
@@ -5607,7 +5442,7 @@ Init_File(void)
define_filetest_function("directory?", rb_file_directory_p, 1);
define_filetest_function("exist?", rb_file_exist_p, 1);
- define_filetest_function("exists?", rb_file_exists_p, 1);
+ define_filetest_function("exists?", rb_file_exist_p, 1);
define_filetest_function("readable?", rb_file_readable_p, 1);
define_filetest_function("readable_real?", rb_file_readable_real_p, 1);
define_filetest_function("world_readable?", rb_file_world_readable_p, 1);
@@ -5669,19 +5504,16 @@ Init_File(void)
rb_define_singleton_method(rb_cFile, "path", rb_file_s_path, 1);
separator = rb_obj_freeze(rb_usascii_str_new2("/"));
- /* separates directory parts in path */
rb_define_const(rb_cFile, "Separator", separator);
rb_define_const(rb_cFile, "SEPARATOR", separator);
rb_define_singleton_method(rb_cFile, "split", rb_file_s_split, 1);
rb_define_singleton_method(rb_cFile, "join", rb_file_s_join, -2);
#ifdef DOSISH
- /* platform specific alternative separator */
rb_define_const(rb_cFile, "ALT_SEPARATOR", rb_obj_freeze(rb_usascii_str_new2(file_alt_separator)));
#else
rb_define_const(rb_cFile, "ALT_SEPARATOR", Qnil);
#endif
- /* path list separator */
rb_define_const(rb_cFile, "PATH_SEPARATOR", rb_obj_freeze(rb_str_new2(PATH_SEP)));
rb_define_method(rb_cIO, "stat", rb_io_stat, 0); /* this is IO's method */
@@ -5841,4 +5673,8 @@ Init_File(void)
rb_define_method(rb_cStat, "setuid?", rb_stat_suid, 0);
rb_define_method(rb_cStat, "setgid?", rb_stat_sgid, 0);
rb_define_method(rb_cStat, "sticky?", rb_stat_sticky, 0);
+
+#ifdef _WIN32
+ rb_w32_init_file();
+#endif
}
diff --git a/gc.c b/gc.c
index 19e942d77d..341863d8d4 100644
--- a/gc.c
+++ b/gc.c
@@ -17,7 +17,6 @@
#include "ruby/io.h"
#include "ruby/thread.h"
#include "ruby/util.h"
-#include "ruby/debug.h"
#include "eval_intern.h"
#include "vm_core.h"
#include "internal.h"
@@ -26,44 +25,10 @@
#include "ruby_atomic.h"
#include "probes.h"
#include <stdio.h>
-#include <stdarg.h>
#include <setjmp.h>
#include <sys/types.h>
#include <assert.h>
-#ifndef __has_feature
-# define __has_feature(x) 0
-#endif
-
-#ifndef HAVE_MALLOC_USABLE_SIZE
-# ifdef _WIN32
-# define HAVE_MALLOC_USABLE_SIZE
-# define malloc_usable_size(a) _msize(a)
-# elif defined HAVE_MALLOC_SIZE
-# define HAVE_MALLOC_USABLE_SIZE
-# define malloc_usable_size(a) malloc_size(a)
-# endif
-#endif
-#ifdef HAVE_MALLOC_USABLE_SIZE
-# ifdef HAVE_MALLOC_H
-# include <malloc.h>
-# elif defined(HAVE_MALLOC_NP_H)
-# include <malloc_np.h>
-# elif defined(HAVE_MALLOC_MALLOC_H)
-# include <malloc/malloc.h>
-# endif
-#endif
-
-#if /* is ASAN enabled? */ \
- __has_feature(address_sanitizer) /* Clang */ || \
- defined(__SANITIZE_ADDRESS__) /* GCC 4.8.x */
- #define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS \
- __attribute__((no_address_safety_analysis)) \
- __attribute__((noinline))
-#else
- #define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS
-#endif
-
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
@@ -85,201 +50,53 @@
#include <malloc.h>
#endif
-#define rb_setjmp(env) RUBY_SETJMP(env)
-#define rb_jmp_buf rb_jmpbuf_t
-
-#if defined(HAVE_RB_GC_GUARDED_PTR) && HAVE_RB_GC_GUARDED_PTR
-volatile VALUE *
-rb_gc_guarded_ptr(volatile VALUE *ptr)
-{
- return ptr;
-}
-#endif
-
-#ifndef GC_HEAP_FREE_SLOTS
-#define GC_HEAP_FREE_SLOTS 4096
-#endif
-#ifndef GC_HEAP_INIT_SLOTS
-#define GC_HEAP_INIT_SLOTS 10000
-#endif
-#ifndef GC_HEAP_GROWTH_FACTOR
-#define GC_HEAP_GROWTH_FACTOR 1.8
-#endif
-#ifndef GC_HEAP_GROWTH_MAX_SLOTS
-#define GC_HEAP_GROWTH_MAX_SLOTS 0 /* 0 is disable */
+#ifdef HAVE_VALGRIND_MEMCHECK_H
+# include <valgrind/memcheck.h>
+# ifndef VALGRIND_MAKE_MEM_DEFINED
+# define VALGRIND_MAKE_MEM_DEFINED(p, n) VALGRIND_MAKE_READABLE((p), (n))
+# endif
+# ifndef VALGRIND_MAKE_MEM_UNDEFINED
+# define VALGRIND_MAKE_MEM_UNDEFINED(p, n) VALGRIND_MAKE_WRITABLE((p), (n))
+# endif
+#else
+# define VALGRIND_MAKE_MEM_DEFINED(p, n) 0
+# define VALGRIND_MAKE_MEM_UNDEFINED(p, n) 0
#endif
-#ifndef GC_MALLOC_LIMIT_MIN
-#define GC_MALLOC_LIMIT_MIN (16 * 1024 * 1024 /* 16MB */)
-#endif
-#ifndef GC_MALLOC_LIMIT_MAX
-#define GC_MALLOC_LIMIT_MAX (32 * 1024 * 1024 /* 32MB */)
-#endif
-#ifndef GC_MALLOC_LIMIT_GROWTH_FACTOR
-#define GC_MALLOC_LIMIT_GROWTH_FACTOR 1.4
-#endif
+#define rb_setjmp(env) RUBY_SETJMP(env)
+#define rb_jmp_buf rb_jmpbuf_t
-#ifndef GC_OLDMALLOC_LIMIT_MIN
-#define GC_OLDMALLOC_LIMIT_MIN (16 * 1024 * 1024 /* 16MB */)
-#endif
-#ifndef GC_OLDMALLOC_LIMIT_GROWTH_FACTOR
-#define GC_OLDMALLOC_LIMIT_GROWTH_FACTOR 1.2
-#endif
-#ifndef GC_OLDMALLOC_LIMIT_MAX
-#define GC_OLDMALLOC_LIMIT_MAX (128 * 1024 * 1024 /* 128MB */)
+#ifndef GC_MALLOC_LIMIT
+#define GC_MALLOC_LIMIT 8000000
#endif
+#define HEAP_MIN_SLOTS 10000
+#define FREE_MIN 4096
typedef struct {
- unsigned int heap_init_slots;
- unsigned int heap_free_slots;
- double growth_factor;
- unsigned int growth_max_slots;
- unsigned int malloc_limit_min;
- unsigned int malloc_limit_max;
- double malloc_limit_growth_factor;
- unsigned int oldmalloc_limit_min;
- unsigned int oldmalloc_limit_max;
- double oldmalloc_limit_growth_factor;
+ unsigned int initial_malloc_limit;
+ unsigned int initial_heap_min_slots;
+ unsigned int initial_free_min;
#if defined(ENABLE_VM_OBJSPACE) && ENABLE_VM_OBJSPACE
- VALUE gc_stress;
+ int gc_stress;
#endif
} ruby_gc_params_t;
-static ruby_gc_params_t gc_params = {
- GC_HEAP_FREE_SLOTS,
- GC_HEAP_INIT_SLOTS,
- GC_HEAP_GROWTH_FACTOR,
- GC_HEAP_GROWTH_MAX_SLOTS,
- GC_MALLOC_LIMIT_MIN,
- GC_MALLOC_LIMIT_MAX,
- GC_MALLOC_LIMIT_GROWTH_FACTOR,
- GC_OLDMALLOC_LIMIT_MIN,
- GC_OLDMALLOC_LIMIT_MAX,
- GC_OLDMALLOC_LIMIT_GROWTH_FACTOR,
+static ruby_gc_params_t initial_params = {
+ GC_MALLOC_LIMIT,
+ HEAP_MIN_SLOTS,
+ FREE_MIN,
#if defined(ENABLE_VM_OBJSPACE) && ENABLE_VM_OBJSPACE
FALSE,
#endif
};
-/* GC_DEBUG:
- * enable to embed GC debugging information.
- */
-#ifndef GC_DEBUG
-#define GC_DEBUG 0
-#endif
-
-#if USE_RGENGC
-/* RGENGC_DEBUG:
- * 1: basic information
- * 2: remember set operation
- * 3: mark
- * 4:
- * 5: sweep
- */
-#ifndef RGENGC_DEBUG
-#define RGENGC_DEBUG 0
-#endif
-
-/* RGENGC_CHECK_MODE
- * 0: disable all assertions
- * 1: enable assertions (to debug RGenGC)
- * 2: enable generational bits check (for debugging)
- * 3: enable livness check
- * 4: show all references
- */
-#ifndef RGENGC_CHECK_MODE
-#define RGENGC_CHECK_MODE 0
-#endif
-
-/* RGENGC_PROFILE
- * 0: disable RGenGC profiling
- * 1: enable profiling for basic information
- * 2: enable profiling for each types
- */
-#ifndef RGENGC_PROFILE
-#define RGENGC_PROFILE 0
-#endif
-
-/* RGENGC_THREEGEN
- * Enable/disable three gen GC.
- * 0: Infant gen -> Old gen
- * 1: Infant gen -> Young -> Old gen
- */
-#ifndef RGENGC_THREEGEN
-#define RGENGC_THREEGEN 0
-#endif
-
-/* RGENGC_ESTIMATE_OLDMALLOC
- * Enable/disable to estimate increase size of malloc'ed size by old objects.
- * If estimation exceeds threashold, then will invoke full GC.
- * 0: disable estimation.
- * 1: enable estimation.
- */
-#ifndef RGENGC_ESTIMATE_OLDMALLOC
-#define RGENGC_ESTIMATE_OLDMALLOC 1
-#endif
-
-#else /* USE_RGENGC */
-
-#define RGENGC_DEBUG 0
-#define RGENGC_CHECK_MODE 0
-#define RGENGC_PROFILE 0
-#define RGENGC_THREEGEN 0
-#define RGENGC_ESTIMATE_OLDMALLOC 0
-
-#endif /* USE_RGENGC */
+#define nomem_error GET_VM()->special_exceptions[ruby_error_nomemory]
#ifndef GC_PROFILE_MORE_DETAIL
#define GC_PROFILE_MORE_DETAIL 0
#endif
-#ifndef GC_PROFILE_DETAIL_MEMORY
-#define GC_PROFILE_DETAIL_MEMORY 0
-#endif
-#ifndef GC_ENABLE_LAZY_SWEEP
-#define GC_ENABLE_LAZY_SWEEP 1
-#endif
-#ifndef CALC_EXACT_MALLOC_SIZE
-#define CALC_EXACT_MALLOC_SIZE 0
-#endif
-#if defined(HAVE_MALLOC_USABLE_SIZE) || CALC_EXACT_MALLOC_SIZE > 0
-#ifndef MALLOC_ALLOCATED_SIZE
-#define MALLOC_ALLOCATED_SIZE 0
-#endif
-#else
-#define MALLOC_ALLOCATED_SIZE 0
-#endif
-#ifndef MALLOC_ALLOCATED_SIZE_CHECK
-#define MALLOC_ALLOCATED_SIZE_CHECK 0
-#endif
-
-typedef enum {
- GPR_FLAG_NONE = 0x000,
- /* major reason */
- GPR_FLAG_MAJOR_BY_NOFREE = 0x001,
- GPR_FLAG_MAJOR_BY_OLDGEN = 0x002,
- GPR_FLAG_MAJOR_BY_SHADY = 0x004,
- GPR_FLAG_MAJOR_BY_RESCAN = 0x008,
- GPR_FLAG_MAJOR_BY_STRESS = 0x010,
-#if RGENGC_ESTIMATE_OLDMALLOC
- GPR_FLAG_MAJOR_BY_OLDMALLOC = 0x020,
-#endif
- GPR_FLAG_MAJOR_MASK = 0x0ff,
-
- /* gc reason */
- GPR_FLAG_NEWOBJ = 0x100,
- GPR_FLAG_MALLOC = 0x200,
- GPR_FLAG_METHOD = 0x400,
- GPR_FLAG_CAPI = 0x800,
- GPR_FLAG_STRESS = 0x1000,
-
- /* others */
- GPR_FLAG_IMMEDIATE_SWEEP = 0x2000,
- GPR_FLAG_HAVE_FINALIZE = 0x4000
-} gc_profile_record_flag;
typedef struct gc_profile_record {
- int flags;
-
double gc_time;
double gc_invoke_time;
@@ -287,34 +104,20 @@ typedef struct gc_profile_record {
size_t heap_use_size;
size_t heap_total_size;
+ int is_marked;
+
#if GC_PROFILE_MORE_DETAIL
double gc_mark_time;
double gc_sweep_time;
- size_t heap_use_pages;
+ size_t heap_use_slots;
size_t heap_live_objects;
size_t heap_free_objects;
+ int have_finalize;
+
size_t allocate_increase;
size_t allocate_limit;
-
- double prepare_time;
- size_t removing_objects;
- size_t empty_objects;
-#if GC_PROFILE_DETAIL_MEMORY
- long maxrss;
- long minflt;
- long majflt;
-#endif
-#endif
-#if MALLOC_ALLOCATED_SIZE
- size_t allocated_size;
-#endif
-
-#if RGENGC_PROFILE > 0
- size_t old_objects;
- size_t remembered_normal_objects;
- size_t remembered_shady_objects;
#endif
} gc_profile_record;
@@ -345,16 +148,10 @@ typedef struct RVALUE {
struct RMatch match;
struct RRational rational;
struct RComplex complex;
- struct {
- struct RBasic basic;
- VALUE v1;
- VALUE v2;
- VALUE v3;
- } values;
} as;
-#if GC_DEBUG
+#ifdef GC_DEBUG
const char *file;
- VALUE line;
+ int line;
#endif
} RVALUE;
@@ -362,20 +159,25 @@ typedef struct RVALUE {
#pragma pack(pop)
#endif
-typedef uintptr_t bits_t;
-enum {
- BITS_SIZE = sizeof(bits_t),
- BITS_BITLENGTH = ( BITS_SIZE * CHAR_BIT )
+struct heaps_slot {
+ struct heaps_header *header;
+ uintptr_t *bits;
+ RVALUE *freelist;
+ struct heaps_slot *next;
+ struct heaps_slot *prev;
+ struct heaps_slot *free_next;
};
-struct heap_page_header {
- struct heap_page *page;
+struct heaps_header {
+ struct heaps_slot *base;
+ uintptr_t *bits;
+ RVALUE *start;
+ RVALUE *end;
+ size_t limit;
};
-struct heap_page_body {
- struct heap_page_header header;
- /* char gap[]; */
- /* RVALUE values[]; */
+struct heaps_free_bitmap {
+ struct heaps_free_bitmap *next;
};
struct gc_list {
@@ -399,229 +201,95 @@ typedef struct mark_stack {
size_t unused_cache_size;
} mark_stack_t;
-typedef struct rb_heap_struct {
- struct heap_page *pages;
- struct heap_page *free_pages;
- struct heap_page *using_page;
- struct heap_page *sweep_pages;
- RVALUE *freelist;
- size_t page_length; /* total page count in a heap */
- size_t total_slots; /* total slot count (page_length * HEAP_OBJ_LIMIT) */
-} rb_heap_t;
+#ifndef CALC_EXACT_MALLOC_SIZE
+#define CALC_EXACT_MALLOC_SIZE 0
+#endif
typedef struct rb_objspace {
struct {
size_t limit;
size_t increase;
-#if MALLOC_ALLOCATED_SIZE
+#if CALC_EXACT_MALLOC_SIZE
size_t allocated_size;
size_t allocations;
#endif
} malloc_params;
-
- rb_heap_t eden_heap;
- rb_heap_t tomb_heap; /* heap for zombies and ghosts */
-
struct {
- struct heap_page **sorted;
- size_t used;
+ size_t increment;
+ struct heaps_slot *ptr;
+ struct heaps_slot *sweep_slots;
+ struct heaps_slot *free_slots;
+ struct heaps_header **sorted;
size_t length;
+ size_t used;
+ struct heaps_free_bitmap *free_bitmap;
RVALUE *range[2];
-
- size_t limit;
- size_t increment;
-
- size_t swept_slots;
- size_t min_free_slots;
- size_t max_free_slots;
-
- /* final */
- size_t final_slots;
- RVALUE *deferred_final;
- } heap_pages;
-
+ struct heaps_header *freed;
+ size_t free_num;
+ size_t free_min;
+ size_t final_num;
+ size_t do_heap_free;
+ } heap;
struct {
int dont_gc;
int dont_lazy_sweep;
int during_gc;
rb_atomic_t finalizing;
} flags;
- st_table *finalizer_table;
+ struct {
+ st_table *table;
+ RVALUE *deferred;
+ } final;
mark_stack_t mark_stack;
struct {
int run;
- gc_profile_record *records;
- gc_profile_record *current_record;
- size_t next_index;
+ gc_profile_record *record;
+ size_t count;
size_t size;
-
-#if GC_PROFILE_MORE_DETAIL
- double prepare_time;
-#endif
double invoke_time;
-
-#if USE_RGENGC
- size_t minor_gc_count;
- size_t major_gc_count;
-#if RGENGC_PROFILE > 0
- size_t generated_normal_object_count;
- size_t generated_shady_object_count;
- size_t shade_operation_count;
- size_t promote_infant_count;
-#if RGENGC_THREEGEN
- size_t promote_young_count;
-#endif
- size_t remembered_normal_object_count;
- size_t remembered_shady_object_count;
-
-#if RGENGC_PROFILE >= 2
- size_t generated_normal_object_count_types[RUBY_T_MASK];
- size_t generated_shady_object_count_types[RUBY_T_MASK];
- size_t shade_operation_count_types[RUBY_T_MASK];
- size_t promote_infant_types[RUBY_T_MASK];
-#if RGENGC_THREEGEN
- size_t promote_young_types[RUBY_T_MASK];
-#endif
- size_t remembered_normal_object_count_types[RUBY_T_MASK];
- size_t remembered_shady_object_count_types[RUBY_T_MASK];
-#endif
-#endif /* RGENGC_PROFILE */
-#endif /* USE_RGENGC */
-
- /* temporary profiling space */
- double gc_sweep_start_time;
- size_t total_allocated_object_num_at_gc_start;
- size_t heap_used_at_gc_start;
-
- /* basic statistics */
- size_t count;
- size_t total_allocated_object_num;
- size_t total_freed_object_num;
- int latest_gc_info;
} profile;
struct gc_list *global_list;
- rb_event_flag_t hook_events; /* this place may be affinity with memory cache */
- VALUE gc_stress;
+ size_t count;
+ size_t total_allocated_object_num;
+ size_t total_freed_object_num;
+ int gc_stress;
struct mark_func_data_struct {
void *data;
void (*mark_func)(VALUE v, void *data);
} *mark_func_data;
-
-#if USE_RGENGC
- struct {
- int during_minor_gc;
- int parent_object_is_old;
-
- int need_major_gc;
- size_t remembered_shady_object_count;
- size_t remembered_shady_object_limit;
- size_t old_object_count;
- size_t old_object_limit;
-#if RGENGC_THREEGEN
- size_t young_object_count;
-#endif
-
-#if RGENGC_ESTIMATE_OLDMALLOC
- size_t oldmalloc_increase;
- size_t oldmalloc_increase_limit;
-#endif
-
-#if RGENGC_CHECK_MODE >= 2
- struct st_table *allrefs_table;
- size_t error_count;
-#endif
- } rgengc;
-#endif /* USE_RGENGC */
} rb_objspace_t;
-
-#ifndef HEAP_ALIGN_LOG
-/* default tiny heap size: 16KB */
-#define HEAP_ALIGN_LOG 14
-#endif
-#define CEILDIV(i, mod) (((i) + (mod) - 1)/(mod))
-enum {
- HEAP_ALIGN = (1UL << HEAP_ALIGN_LOG),
- HEAP_ALIGN_MASK = (~(~0UL << HEAP_ALIGN_LOG)),
- REQUIRED_SIZE_BY_MALLOC = (sizeof(size_t) * 5),
- HEAP_SIZE = (HEAP_ALIGN - REQUIRED_SIZE_BY_MALLOC),
- HEAP_OBJ_LIMIT = (unsigned int)((HEAP_SIZE - sizeof(struct heap_page_header))/sizeof(struct RVALUE)),
- HEAP_BITMAP_LIMIT = CEILDIV(CEILDIV(HEAP_SIZE, sizeof(struct RVALUE)), BITS_BITLENGTH),
- HEAP_BITMAP_SIZE = ( BITS_SIZE * HEAP_BITMAP_LIMIT),
- HEAP_BITMAP_PLANES = USE_RGENGC ? 3 : 1 /* RGENGC: mark bits, rememberset bits and oldgen bits */
-};
-
-struct heap_page {
- struct heap_page_body *body;
- RVALUE *freelist;
- RVALUE *start;
- size_t final_slots;
- size_t limit;
- struct heap_page *next;
- struct heap_page *prev;
- struct heap_page *free_next;
- rb_heap_t *heap;
- int before_sweep;
-
- bits_t mark_bits[HEAP_BITMAP_LIMIT];
-#if USE_RGENGC
- bits_t rememberset_bits[HEAP_BITMAP_LIMIT];
- bits_t oldgen_bits[HEAP_BITMAP_LIMIT];
-#endif
-};
-
-#define GET_PAGE_BODY(x) ((struct heap_page_body *)((bits_t)(x) & ~(HEAP_ALIGN_MASK)))
-#define GET_PAGE_HEADER(x) (&GET_PAGE_BODY(x)->header)
-#define GET_HEAP_PAGE(x) (GET_PAGE_HEADER(x)->page)
-#define GET_HEAP_MARK_BITS(x) (&GET_HEAP_PAGE(x)->mark_bits[0])
-#define GET_HEAP_REMEMBERSET_BITS(x) (&GET_HEAP_PAGE(x)->rememberset_bits[0])
-#define GET_HEAP_OLDGEN_BITS(x) (&GET_HEAP_PAGE(x)->oldgen_bits[0])
-#define NUM_IN_PAGE(p) (((bits_t)(p) & HEAP_ALIGN_MASK)/sizeof(RVALUE))
-#define BITMAP_INDEX(p) (NUM_IN_PAGE(p) / BITS_BITLENGTH )
-#define BITMAP_OFFSET(p) (NUM_IN_PAGE(p) & (BITS_BITLENGTH-1))
-#define BITMAP_BIT(p) ((bits_t)1 << BITMAP_OFFSET(p))
-/* Bitmap Operations */
-#define MARKED_IN_BITMAP(bits, p) ((bits)[BITMAP_INDEX(p)] & BITMAP_BIT(p))
-#define MARK_IN_BITMAP(bits, p) ((bits)[BITMAP_INDEX(p)] = (bits)[BITMAP_INDEX(p)] | BITMAP_BIT(p))
-#define CLEAR_IN_BITMAP(bits, p) ((bits)[BITMAP_INDEX(p)] = (bits)[BITMAP_INDEX(p)] & ~BITMAP_BIT(p))
-
-/* Aliases */
#if defined(ENABLE_VM_OBJSPACE) && ENABLE_VM_OBJSPACE
#define rb_objspace (*GET_VM()->objspace)
-#define ruby_initial_gc_stress gc_params.gc_stress
-VALUE *ruby_initial_gc_stress_ptr = &ruby_initial_gc_stress;
+#define ruby_initial_gc_stress initial_params.gc_stress
+int *ruby_initial_gc_stress_ptr = &ruby_initial_gc_stress;
#else
-static rb_objspace_t rb_objspace = {{GC_MALLOC_LIMIT_MIN}};
-VALUE *ruby_initial_gc_stress_ptr = &rb_objspace.gc_stress;
+static rb_objspace_t rb_objspace = {{GC_MALLOC_LIMIT}};
+int *ruby_initial_gc_stress_ptr = &rb_objspace.gc_stress;
#endif
-
#define malloc_limit objspace->malloc_params.limit
#define malloc_increase objspace->malloc_params.increase
-#define malloc_allocated_size objspace->malloc_params.allocated_size
-#define heap_pages_sorted objspace->heap_pages.sorted
-#define heap_pages_used objspace->heap_pages.used
-#define heap_pages_length objspace->heap_pages.length
-#define heap_pages_lomem objspace->heap_pages.range[0]
-#define heap_pages_himem objspace->heap_pages.range[1]
-#define heap_pages_swept_slots objspace->heap_pages.swept_slots
-#define heap_pages_increment objspace->heap_pages.increment
-#define heap_pages_min_free_slots objspace->heap_pages.min_free_slots
-#define heap_pages_max_free_slots objspace->heap_pages.max_free_slots
-#define heap_pages_final_slots objspace->heap_pages.final_slots
-#define heap_pages_deferred_final objspace->heap_pages.deferred_final
-#define heap_eden (&objspace->eden_heap)
-#define heap_tomb (&objspace->tomb_heap)
+#define heaps objspace->heap.ptr
+#define heaps_length objspace->heap.length
+#define heaps_used objspace->heap.used
+#define lomem objspace->heap.range[0]
+#define himem objspace->heap.range[1]
+#define heaps_inc objspace->heap.increment
+#define heaps_freed objspace->heap.freed
#define dont_gc objspace->flags.dont_gc
#define during_gc objspace->flags.during_gc
#define finalizing objspace->flags.finalizing
-#define finalizer_table objspace->finalizer_table
+#define finalizer_table objspace->final.table
+#define deferred_final_list objspace->final.deferred
#define global_List objspace->global_list
#define ruby_gc_stress objspace->gc_stress
-#define monitor_level objspace->rgengc.monitor_level
-#define monitored_object_table objspace->rgengc.monitored_object_table
+#define initial_malloc_limit initial_params.initial_malloc_limit
+#define initial_heap_min_slots initial_params.initial_heap_min_slots
+#define initial_free_min initial_params.initial_free_min
+
+#define is_lazy_sweeping(objspace) ((objspace)->heap.sweep_slots != 0)
-#define is_lazy_sweeping(heap) ((heap)->sweep_pages != 0)
#if SIZEOF_LONG == SIZEOF_VOIDP
# define nonspecial_obj_id(obj) (VALUE)((SIGNED_VALUE)(obj)|FIXNUM_FLAG)
# define obj_id_to_ref(objid) ((objid) ^ FIXNUM_FLAG) /* unset FIXNUM_FLAG */
@@ -634,17 +302,44 @@ VALUE *ruby_initial_gc_stress_ptr = &rb_objspace.gc_stress;
#endif
#define RANY(o) ((RVALUE*)(o))
+#define has_free_object (objspace->heap.free_slots && objspace->heap.free_slots->freelist)
-#define nomem_error GET_VM()->special_exceptions[ruby_error_nomemory]
+#define HEAP_HEADER(p) ((struct heaps_header *)(p))
+#define GET_HEAP_HEADER(x) (HEAP_HEADER((uintptr_t)(x) & ~(HEAP_ALIGN_MASK)))
+#define GET_HEAP_SLOT(x) (GET_HEAP_HEADER(x)->base)
+#define GET_HEAP_BITMAP(x) (GET_HEAP_HEADER(x)->bits)
+#define NUM_IN_SLOT(p) (((uintptr_t)(p) & HEAP_ALIGN_MASK)/sizeof(RVALUE))
+#define BITMAP_INDEX(p) (NUM_IN_SLOT(p) / (sizeof(uintptr_t) * CHAR_BIT))
+#define BITMAP_OFFSET(p) (NUM_IN_SLOT(p) & ((sizeof(uintptr_t) * CHAR_BIT)-1))
+#define MARKED_IN_BITMAP(bits, p) (bits[BITMAP_INDEX(p)] & ((uintptr_t)1 << BITMAP_OFFSET(p)))
+
+#ifndef HEAP_ALIGN_LOG
+/* default tiny heap size: 16KB */
+#define HEAP_ALIGN_LOG 14
+#endif
+
+#define CEILDIV(i, mod) (((i) + (mod) - 1)/(mod))
+
+enum {
+ HEAP_ALIGN = (1UL << HEAP_ALIGN_LOG),
+ HEAP_ALIGN_MASK = (~(~0UL << HEAP_ALIGN_LOG)),
+ REQUIRED_SIZE_BY_MALLOC = (sizeof(size_t) * 5),
+ HEAP_SIZE = (HEAP_ALIGN - REQUIRED_SIZE_BY_MALLOC),
+ HEAP_OBJ_LIMIT = (unsigned int)((HEAP_SIZE - sizeof(struct heaps_header))/sizeof(struct RVALUE)),
+ HEAP_BITMAP_LIMIT = CEILDIV(CEILDIV(HEAP_SIZE, sizeof(struct RVALUE)), sizeof(uintptr_t) * CHAR_BIT)
+};
int ruby_gc_debug_indent = 0;
VALUE rb_mGC;
+extern st_table *rb_class_tbl;
int ruby_disable_gc_stress = 0;
-void rb_gcdebug_print_obj_condition(VALUE obj);
-
static void rb_objspace_call_finalizer(rb_objspace_t *objspace);
static VALUE define_final0(VALUE obj, VALUE block);
+VALUE rb_define_final(VALUE obj, VALUE block);
+VALUE rb_undefine_final(VALUE obj);
+static void run_final(rb_objspace_t *objspace, VALUE obj);
+static void initial_expand_heap(rb_objspace_t *objspace);
static void negative_size_allocation_error(const char *);
static void *aligned_malloc(size_t, size_t);
@@ -653,208 +348,21 @@ static void aligned_free(void *);
static void init_mark_stack(mark_stack_t *stack);
static VALUE lazy_sweep_enable(void);
-static int ready_to_gc(rb_objspace_t *objspace);
-static int heap_ready_to_gc(rb_objspace_t *objspace, rb_heap_t *heap);
-static int garbage_collect(rb_objspace_t *, int full_mark, int immediate_sweep, int reason);
-static int garbage_collect_body(rb_objspace_t *, int full_mark, int immediate_sweep, int reason);
-static int gc_heap_lazy_sweep(rb_objspace_t *objspace, rb_heap_t *heap);
-static void gc_rest_sweep(rb_objspace_t *objspace);
-static void gc_heap_rest_sweep(rb_objspace_t *objspace, rb_heap_t *heap);
-
+static int garbage_collect(rb_objspace_t *);
+static int gc_prepare_free_objects(rb_objspace_t *);
+static void mark_tbl(rb_objspace_t *, st_table *);
+static void rest_sweep(rb_objspace_t *);
static void gc_mark_stacked_objects(rb_objspace_t *);
-static void gc_mark(rb_objspace_t *objspace, VALUE ptr);
-static void gc_mark_maybe(rb_objspace_t *objspace, VALUE ptr);
-static void gc_mark_children(rb_objspace_t *objspace, VALUE ptr);
-
-static size_t obj_memsize_of(VALUE obj, int use_tdata);
static double getrusage_time(void);
-static inline void gc_prof_setup_new_record(rb_objspace_t *objspace, int reason);
static inline void gc_prof_timer_start(rb_objspace_t *);
-static inline void gc_prof_timer_stop(rb_objspace_t *);
+static inline void gc_prof_timer_stop(rb_objspace_t *, int);
static inline void gc_prof_mark_timer_start(rb_objspace_t *);
static inline void gc_prof_mark_timer_stop(rb_objspace_t *);
static inline void gc_prof_sweep_timer_start(rb_objspace_t *);
static inline void gc_prof_sweep_timer_stop(rb_objspace_t *);
static inline void gc_prof_set_malloc_info(rb_objspace_t *);
-static inline void gc_prof_set_heap_info(rb_objspace_t *);
-
-#define gc_prof_record(objspace) (objspace)->profile.current_record
-#define gc_prof_enabled(objspace) ((objspace)->profile.run && (objspace)->profile.current_record)
-
-#define rgengc_report if (RGENGC_DEBUG) rgengc_report_body
-static void rgengc_report_body(int level, rb_objspace_t *objspace, const char *fmt, ...);
-static const char * type_name(int type, VALUE obj);
-static const char *obj_type_name(VALUE obj);
-
-#if USE_RGENGC
-static int rgengc_remembered(rb_objspace_t *objspace, VALUE obj);
-static int rgengc_remember(rb_objspace_t *objspace, VALUE obj);
-static void rgengc_mark_and_rememberset_clear(rb_objspace_t *objspace, rb_heap_t *heap);
-static void rgengc_rememberset_mark(rb_objspace_t *objspace, rb_heap_t *heap);
-
-#define FL_TEST2(x,f) ((RGENGC_CHECK_MODE && SPECIAL_CONST_P(x)) ? (rb_bug("FL_TEST2: SPECIAL_CONST"), 0) : FL_TEST_RAW((x),(f)) != 0)
-#define FL_SET2(x,f) do {if (RGENGC_CHECK_MODE && SPECIAL_CONST_P(x)) rb_bug("FL_SET2: SPECIAL_CONST"); RBASIC(x)->flags |= (f);} while (0)
-#define FL_UNSET2(x,f) do {if (RGENGC_CHECK_MODE && SPECIAL_CONST_P(x)) rb_bug("FL_UNSET2: SPECIAL_CONST"); RBASIC(x)->flags &= ~(f);} while (0)
-
-#define RVALUE_WB_PROTECTED_RAW(obj) FL_TEST2((obj), FL_WB_PROTECTED)
-#define RVALUE_WB_PROTECTED(obj) RVALUE_WB_PROTECTED_RAW(check_gen_consistency((VALUE)obj))
-
-#define RVALUE_OLDGEN_BITMAP(obj) MARKED_IN_BITMAP(GET_HEAP_OLDGEN_BITS(obj), (obj))
-
-static inline int is_pointer_to_heap(rb_objspace_t *objspace, void *ptr);
-static inline int gc_marked(rb_objspace_t *objspace, VALUE ptr);
-
-static inline VALUE
-check_gen_consistency(VALUE obj)
-{
- if (RGENGC_CHECK_MODE > 0) {
- int old_flag = RVALUE_OLDGEN_BITMAP(obj) != 0;
- int promoted_flag = FL_TEST2(obj, FL_PROMOTED);
- rb_objspace_t *objspace = &rb_objspace;
-
- obj_memsize_of((VALUE)obj, FALSE);
-
- if (!is_pointer_to_heap(objspace, (void *)obj)) {
- rb_bug("check_gen_consistency: %p (%s) is not Ruby object.", (void *)obj, obj_type_name(obj));
- }
-
- if (promoted_flag) {
- if (!RVALUE_WB_PROTECTED_RAW(obj)) {
- const char *type = old_flag ? "old" : "young";
- rb_bug("check_gen_consistency: %p (%s) is not WB protected, but %s object.", (void *)obj, obj_type_name(obj), type);
- }
-
-#if !RGENGC_THREEGEN
- if (!old_flag) {
- rb_bug("check_gen_consistency: %p (%s) is not infant, but is not old (on 2gen).", (void *)obj, obj_type_name(obj));
- }
-#endif
-
- if (old_flag && objspace->rgengc.during_minor_gc && !gc_marked(objspace, obj)) {
- rb_bug("check_gen_consistency: %p (%s) is old, but is not marked while minor marking.", (void *)obj, obj_type_name(obj));
- }
- }
- else {
- if (old_flag) {
- rb_bug("check_gen_consistency: %p (%s) is not infant, but is old.", (void *)obj, obj_type_name(obj));
- }
- }
- }
- return obj;
-}
-
-static inline VALUE
-RVALUE_INFANT_P(VALUE obj)
-{
- check_gen_consistency(obj);
- return !FL_TEST2(obj, FL_PROMOTED);
-}
-
-static inline VALUE
-RVALUE_OLD_BITMAP_P(VALUE obj)
-{
- check_gen_consistency(obj);
- return (RVALUE_OLDGEN_BITMAP(obj) != 0);
-}
-
-static inline VALUE
-RVALUE_OLD_P(VALUE obj)
-{
- check_gen_consistency(obj);
-#if RGENGC_THREEGEN
- return FL_TEST2(obj, FL_PROMOTED) && RVALUE_OLD_BITMAP_P(obj);
-#else
- return FL_TEST2(obj, FL_PROMOTED);
-#endif
-}
-
-static inline VALUE
-RVALUE_PROMOTED_P(VALUE obj)
-{
- check_gen_consistency(obj);
- return FL_TEST2(obj, FL_PROMOTED);
-}
-
-static inline void
-RVALUE_PROMOTE_INFANT(VALUE obj)
-{
- check_gen_consistency(obj);
- if (RGENGC_CHECK_MODE && !RVALUE_INFANT_P(obj)) rb_bug("RVALUE_PROMOTE_INFANT: %p (%s) is not infant object.", (void *)obj, obj_type_name(obj));
- FL_SET2(obj, FL_PROMOTED);
-#if !RGENGC_THREEGEN
- MARK_IN_BITMAP(GET_HEAP_OLDGEN_BITS(obj), obj);
-#endif
- check_gen_consistency(obj);
-
-#if RGENGC_PROFILE >= 1
- {
- rb_objspace_t *objspace = &rb_objspace;
- objspace->profile.promote_infant_count++;
-
-#if RGENGC_PROFILE >= 2
- objspace->profile.promote_infant_types[BUILTIN_TYPE(obj)]++;
-#endif
- }
-#endif
-}
-
-#if RGENGC_THREEGEN
-/*
- * Two gen: Infant -> Old.
- * Three gen: Infant -> Young -> Old.
- */
-static inline VALUE
-RVALUE_YOUNG_P(VALUE obj)
-{
- check_gen_consistency(obj);
- return FL_TEST2(obj, FL_PROMOTED) && (RVALUE_OLDGEN_BITMAP(obj) == 0);
-}
-static inline void
-RVALUE_PROMOTE_YOUNG(VALUE obj)
-{
- check_gen_consistency(obj);
- if (RGENGC_CHECK_MODE && !RVALUE_YOUNG_P(obj)) rb_bug("RVALUE_PROMOTE_YOUNG: %p (%s) is not young object.", (void *)obj, obj_type_name(obj));
- MARK_IN_BITMAP(GET_HEAP_OLDGEN_BITS(obj), obj);
- check_gen_consistency(obj);
-
-#if RGENGC_PROFILE >= 1
- {
- rb_objspace_t *objspace = &rb_objspace;
- objspace->profile.promote_young_count++;
-#if RGENGC_PROFILE >= 2
- objspace->profile.promote_young_types[BUILTIN_TYPE(obj)]++;
-#endif
- }
-#endif
-}
-
-static inline void
-RVALUE_DEMOTE_FROM_YOUNG(VALUE obj)
-{
- if (RGENGC_CHECK_MODE && !RVALUE_YOUNG_P(obj))
- rb_bug("RVALUE_DEMOTE_FROM_YOUNG: %p (%s) is not young object.", (void *)obj, obj_type_name(obj));
-
- check_gen_consistency(obj);
- FL_UNSET2(obj, FL_PROMOTED);
- check_gen_consistency(obj);
-}
-#endif
-
-static inline void
-RVALUE_DEMOTE_FROM_OLD(VALUE obj)
-{
- if (RGENGC_CHECK_MODE && !RVALUE_OLD_P(obj))
- rb_bug("RVALUE_DEMOTE_FROM_OLD: %p (%s) is not old object.", (void *)obj, obj_type_name(obj));
-
- check_gen_consistency(obj);
- FL_UNSET2(obj, FL_PROMOTED);
- CLEAR_IN_BITMAP(GET_HEAP_OLDGEN_BITS(obj), obj);
- check_gen_consistency(obj);
-}
-
-#endif /* USE_RGENGC */
/*
--------------------------- ObjectSpace -----------------------------
@@ -866,28 +374,24 @@ rb_objspace_alloc(void)
{
rb_objspace_t *objspace = malloc(sizeof(rb_objspace_t));
memset(objspace, 0, sizeof(*objspace));
+ malloc_limit = initial_malloc_limit;
ruby_gc_stress = ruby_initial_gc_stress;
- malloc_limit = gc_params.malloc_limit_min;
-
return objspace;
}
#endif
#if defined(ENABLE_VM_OBJSPACE) && ENABLE_VM_OBJSPACE
static void free_stack_chunks(mark_stack_t *);
-static void heap_page_free(rb_objspace_t *objspace, struct heap_page *page);
void
rb_objspace_free(rb_objspace_t *objspace)
{
- gc_rest_sweep(objspace);
-
- if (objspace->profile.records) {
- free(objspace->profile.records);
- objspace->profile.records = 0;
+ rest_sweep(objspace);
+ if (objspace->profile.record) {
+ free(objspace->profile.record);
+ objspace->profile.record = 0;
}
-
if (global_List) {
struct gc_list *list, *next;
for (list = global_List; list; list = next) {
@@ -895,386 +399,239 @@ rb_objspace_free(rb_objspace_t *objspace)
xfree(list);
}
}
- if (heap_pages_sorted) {
+ if (objspace->heap.free_bitmap) {
+ struct heaps_free_bitmap *list, *next;
+ for (list = objspace->heap.free_bitmap; list; list = next) {
+ next = list->next;
+ free(list);
+ }
+ }
+ if (objspace->heap.sorted) {
size_t i;
- for (i = 0; i < heap_pages_used; ++i) {
- heap_page_free(objspace, heap_pages_sorted[i]);
+ for (i = 0; i < heaps_used; ++i) {
+ free(objspace->heap.sorted[i]->bits);
+ aligned_free(objspace->heap.sorted[i]);
}
- free(heap_pages_sorted);
- heap_pages_used = 0;
- heap_pages_length = 0;
- heap_pages_lomem = 0;
- heap_pages_himem = 0;
-
- objspace->eden_heap.page_length = 0;
- objspace->eden_heap.total_slots = 0;
- objspace->eden_heap.pages = NULL;
+ free(objspace->heap.sorted);
+ heaps_used = 0;
+ heaps = 0;
}
free_stack_chunks(&objspace->mark_stack);
free(objspace);
}
#endif
-static void
-heap_pages_expand_sorted(rb_objspace_t *objspace)
+void
+rb_global_variable(VALUE *var)
{
- size_t next_length = heap_pages_increment;
- next_length += heap_eden->page_length;
- next_length += heap_tomb->page_length;
-
- if (next_length > heap_pages_length) {
- struct heap_page **sorted;
- size_t size = next_length * sizeof(struct heap_page *);
+ rb_gc_register_address(var);
+}
- rgengc_report(3, objspace, "heap_pages_expand_sorted: next_length: %d, size: %d\n", (int)next_length, (int)size);
+static void
+allocate_sorted_heaps(rb_objspace_t *objspace, size_t next_heaps_length)
+{
+ struct heaps_header **p;
+ struct heaps_free_bitmap *bits;
+ size_t size, add, i;
- if (heap_pages_length > 0) {
- sorted = (struct heap_page **)realloc(heap_pages_sorted, size);
- if (sorted) heap_pages_sorted = sorted;
- }
- else {
- sorted = heap_pages_sorted = (struct heap_page **)malloc(size);
- }
+ size = next_heaps_length*sizeof(struct heaps_header *);
+ add = next_heaps_length - heaps_used;
- if (sorted == 0) {
- during_gc = 0;
- rb_memerror();
- }
-
- heap_pages_length = next_length;
+ if (heaps_used > 0) {
+ p = (struct heaps_header **)realloc(objspace->heap.sorted, size);
+ if (p) objspace->heap.sorted = p;
+ }
+ else {
+ p = objspace->heap.sorted = (struct heaps_header **)malloc(size);
}
-}
-static inline void
-heap_page_add_freeobj(rb_objspace_t *objspace, struct heap_page *page, VALUE obj)
-{
- RVALUE *p = (RVALUE *)obj;
- p->as.free.flags = 0;
- p->as.free.next = page->freelist;
- page->freelist = p;
- rgengc_report(3, objspace, "heap_page_add_freeobj: %p (%s) is added to freelist\n", p, obj_type_name(obj));
-}
+ if (p == 0) {
+ during_gc = 0;
+ rb_memerror();
+ }
-static inline void
-heap_add_freepage(rb_objspace_t *objspace, rb_heap_t *heap, struct heap_page *page)
-{
- if (page->freelist) {
- page->free_next = heap->free_pages;
- heap->free_pages = page;
+ for (i = 0; i < add; i++) {
+ bits = (struct heaps_free_bitmap *)malloc(HEAP_BITMAP_LIMIT * sizeof(uintptr_t));
+ if (bits == 0) {
+ during_gc = 0;
+ rb_memerror();
+ return;
+ }
+ bits->next = objspace->heap.free_bitmap;
+ objspace->heap.free_bitmap = bits;
}
}
static void
-heap_unlink_page(rb_objspace_t *objspace, rb_heap_t *heap, struct heap_page *page)
+link_free_heap_slot(rb_objspace_t *objspace, struct heaps_slot *slot)
{
- if (page->prev) page->prev->next = page->next;
- if (page->next) page->next->prev = page->prev;
- if (heap->pages == page) heap->pages = page->next;
- page->prev = NULL;
- page->next = NULL;
- page->heap = NULL;
- heap->page_length--;
- heap->total_slots -= page->limit;
+ slot->free_next = objspace->heap.free_slots;
+ objspace->heap.free_slots = slot;
}
static void
-heap_page_free(rb_objspace_t *objspace, struct heap_page *page)
+unlink_free_heap_slot(rb_objspace_t *objspace, struct heaps_slot *slot)
{
- heap_pages_used--;
- aligned_free(page->body);
- free(page);
+ objspace->heap.free_slots = slot->free_next;
+ slot->free_next = NULL;
}
static void
-heap_pages_free_unused_pages(rb_objspace_t *objspace)
+assign_heap_slot(rb_objspace_t *objspace)
{
- size_t i, j;
-
- for (i = j = 1; j < heap_pages_used; i++) {
- struct heap_page *page = heap_pages_sorted[i];
-
- if (page->heap == heap_tomb && page->final_slots == 0) {
- if (heap_pages_swept_slots - page->limit > heap_pages_max_free_slots) {
- if (0) fprintf(stderr, "heap_pages_free_unused_pages: %d free page %p, heap_pages_swept_slots: %d, heap_pages_max_free_slots: %d\n",
- (int)i, page, (int)heap_pages_swept_slots, (int)heap_pages_max_free_slots);
- heap_pages_swept_slots -= page->limit;
- heap_unlink_page(objspace, heap_tomb, page);
- heap_page_free(objspace, page);
- continue;
- }
- else {
- /* fprintf(stderr, "heap_pages_free_unused_pages: remain!!\n"); */
- }
- }
- if (i != j) {
- heap_pages_sorted[j] = page;
- }
- j++;
- }
- assert(j == heap_pages_used);
-}
-
-static struct heap_page *
-heap_page_allocate(rb_objspace_t *objspace)
-{
- RVALUE *start, *end, *p;
- struct heap_page *page;
- struct heap_page_body *page_body = 0;
+ RVALUE *p, *pend, *membase;
+ struct heaps_slot *slot;
size_t hi, lo, mid;
- size_t limit = HEAP_OBJ_LIMIT;
+ size_t objs;
- /* assign heap_page body (contains heap_page_header and RVALUEs) */
- page_body = (struct heap_page_body *)aligned_malloc(HEAP_ALIGN, HEAP_SIZE);
- if (page_body == 0) {
+ objs = HEAP_OBJ_LIMIT;
+ p = (RVALUE*)aligned_malloc(HEAP_ALIGN, HEAP_SIZE);
+ if (p == 0) {
during_gc = 0;
rb_memerror();
}
-
- /* assign heap_page entry */
- page = (struct heap_page *)malloc(sizeof(struct heap_page));
- if (page == 0) {
- aligned_free(page_body);
- during_gc = 0;
- rb_memerror();
+ slot = (struct heaps_slot *)malloc(sizeof(struct heaps_slot));
+ if (slot == 0) {
+ aligned_free(p);
+ during_gc = 0;
+ rb_memerror();
}
- MEMZERO((void*)page, struct heap_page, 1);
+ MEMZERO((void*)slot, struct heaps_slot, 1);
- page->body = page_body;
+ slot->next = heaps;
+ if (heaps) heaps->prev = slot;
+ heaps = slot;
+
+ membase = p;
+ p = (RVALUE*)((VALUE)p + sizeof(struct heaps_header));
+ if ((VALUE)p % sizeof(RVALUE) != 0) {
+ p = (RVALUE*)((VALUE)p + sizeof(RVALUE) - ((VALUE)p % sizeof(RVALUE)));
+ objs = (HEAP_SIZE - (size_t)((VALUE)p - (VALUE)membase))/sizeof(RVALUE);
+ }
- /* setup heap_pages_sorted */
lo = 0;
- hi = heap_pages_used;
+ hi = heaps_used;
while (lo < hi) {
- struct heap_page *mid_page;
-
+ register RVALUE *mid_membase;
mid = (lo + hi) / 2;
- mid_page = heap_pages_sorted[mid];
- if (mid_page->body < page_body) {
+ mid_membase = (RVALUE *)objspace->heap.sorted[mid];
+ if (mid_membase < membase) {
lo = mid + 1;
}
- else if (mid_page->body > page_body) {
+ else if (mid_membase > membase) {
hi = mid;
}
else {
- rb_bug("same heap page is allocated: %p at %"PRIuVALUE, (void *)page_body, (VALUE)mid);
+ rb_bug("same heap slot is allocated: %p at %"PRIuVALUE, (void *)membase, (VALUE)mid);
}
}
- if (hi < heap_pages_used) {
- MEMMOVE(&heap_pages_sorted[hi+1], &heap_pages_sorted[hi], struct heap_page_header*, heap_pages_used - hi);
- }
-
- heap_pages_sorted[hi] = page;
-
- heap_pages_used++;
- assert(heap_pages_used <= heap_pages_length);
-
- /* adjust obj_limit (object number available in this page) */
- start = (RVALUE*)((VALUE)page_body + sizeof(struct heap_page_header));
- if ((VALUE)start % sizeof(RVALUE) != 0) {
- int delta = (int)(sizeof(RVALUE) - ((VALUE)start % sizeof(RVALUE)));
- start = (RVALUE*)((VALUE)start + delta);
- limit = (HEAP_SIZE - (size_t)((VALUE)start - (VALUE)page_body))/sizeof(RVALUE);
- }
- end = start + limit;
-
- if (heap_pages_lomem == 0 || heap_pages_lomem > start) heap_pages_lomem = start;
- if (heap_pages_himem < end) heap_pages_himem = end;
-
- page->start = start;
- page->limit = limit;
- page_body->header.page = page;
-
- for (p = start; p != end; p++) {
- rgengc_report(3, objspace, "assign_heap_page: %p is added to freelist\n");
- heap_page_add_freeobj(objspace, page, (VALUE)p);
- }
-
- return page;
-}
-
-static struct heap_page *
-heap_page_resurrect(rb_objspace_t *objspace)
-{
- struct heap_page *page;
-
- if ((page = heap_tomb->pages) != NULL) {
- heap_unlink_page(objspace, heap_tomb, page);
- return page;
+ if (hi < heaps_used) {
+ MEMMOVE(&objspace->heap.sorted[hi+1], &objspace->heap.sorted[hi], struct heaps_header*, heaps_used - hi);
}
- return NULL;
-}
+ heaps->header = (struct heaps_header *)membase;
+ objspace->heap.sorted[hi] = heaps->header;
+ objspace->heap.sorted[hi]->start = p;
+ objspace->heap.sorted[hi]->end = (p + objs);
+ objspace->heap.sorted[hi]->base = heaps;
+ objspace->heap.sorted[hi]->limit = objs;
+ assert(objspace->heap.free_bitmap != NULL);
+ heaps->bits = (uintptr_t *)objspace->heap.free_bitmap;
+ objspace->heap.sorted[hi]->bits = (uintptr_t *)objspace->heap.free_bitmap;
+ objspace->heap.free_bitmap = objspace->heap.free_bitmap->next;
+ memset(heaps->bits, 0, HEAP_BITMAP_LIMIT * sizeof(uintptr_t));
+ pend = p + objs;
+ if (lomem == 0 || lomem > p) lomem = p;
+ if (himem < pend) himem = pend;
+ heaps_used++;
-static struct heap_page *
-heap_page_create(rb_objspace_t *objspace)
-{
- struct heap_page *page = heap_page_resurrect(objspace);
- const char *method = "recycle";
- if (page == NULL) {
- page = heap_page_allocate(objspace);
- method = "allocate";
+ while (p < pend) {
+ p->as.free.flags = 0;
+ p->as.free.next = heaps->freelist;
+ heaps->freelist = p;
+ p++;
}
- if (0) fprintf(stderr, "heap_page_create: %s - %p, heap_pages_used: %d, heap_pages_used: %d, tomb->page_length: %d\n",
- method, page, (int)heap_pages_length, (int)heap_pages_used, (int)heap_tomb->page_length);
- return page;
+ link_free_heap_slot(objspace, heaps);
}
static void
-heap_add_page(rb_objspace_t *objspace, rb_heap_t *heap, struct heap_page *page)
+add_heap_slots(rb_objspace_t *objspace, size_t add)
{
- page->heap = heap;
- page->next = heap->pages;
- if (heap->pages) heap->pages->prev = page;
- heap->pages = page;
- heap->page_length++;
- heap->total_slots += page->limit;
-}
+ size_t i;
+ size_t next_heaps_length;
-static void
-heap_assign_page(rb_objspace_t *objspace, rb_heap_t *heap)
-{
- struct heap_page *page = heap_page_create(objspace);
- heap_add_page(objspace, heap, page);
- heap_add_freepage(objspace, heap, page);
-}
+ next_heaps_length = heaps_used + add;
-static void
-heap_add_pages(rb_objspace_t *objspace, rb_heap_t *heap, size_t add)
-{
- size_t i;
+ if (next_heaps_length > heaps_length) {
+ allocate_sorted_heaps(objspace, next_heaps_length);
+ heaps_length = next_heaps_length;
+ }
- heap_pages_increment = add;
- heap_pages_expand_sorted(objspace);
for (i = 0; i < add; i++) {
- heap_assign_page(objspace, heap);
+ assign_heap_slot(objspace);
}
- heap_pages_increment = 0;
+ heaps_inc = 0;
}
static void
-heap_set_increment(rb_objspace_t *objspace, size_t minimum_limit)
+init_heap(rb_objspace_t *objspace)
{
- size_t used = heap_pages_used - heap_tomb->page_length;
- size_t next_used_limit = (size_t)(used * gc_params.growth_factor);
- if (gc_params.growth_max_slots > 0) {
- size_t max_used_limit = (size_t)(used + gc_params.growth_max_slots/HEAP_OBJ_LIMIT);
- if (next_used_limit > max_used_limit) next_used_limit = max_used_limit;
- }
- if (next_used_limit == heap_pages_used) next_used_limit++;
+ add_heap_slots(objspace, HEAP_MIN_SLOTS / HEAP_OBJ_LIMIT);
+ init_mark_stack(&objspace->mark_stack);
- if (next_used_limit < minimum_limit) {
- next_used_limit = minimum_limit;
+#ifdef USE_SIGALTSTACK
+ {
+ /* altstack of another threads are allocated in another place */
+ rb_thread_t *th = GET_THREAD();
+ void *tmp = th->altstack;
+ th->altstack = malloc(rb_sigaltstack_size());
+ free(tmp); /* free previously allocated area */
}
+#endif
- heap_pages_increment = next_used_limit - used;
- heap_pages_expand_sorted(objspace);
-
- if (0) fprintf(stderr, "heap_set_increment: heap_pages_length: %d, heap_pages_used: %d, heap_pages_increment: %d, next_used_limit: %d\n",
- (int)heap_pages_length, (int)heap_pages_used, (int)heap_pages_increment, (int)next_used_limit);
+ objspace->profile.invoke_time = getrusage_time();
+ finalizer_table = st_init_numtable();
}
-static int
-heap_increment(rb_objspace_t *objspace, rb_heap_t *heap)
+static void
+initial_expand_heap(rb_objspace_t *objspace)
{
- rgengc_report(5, objspace, "heap_increment: heap_pages_length: %d, heap_pages_inc: %d, heap->page_length: %d\n",
- (int)heap_pages_length, (int)heap_pages_increment, (int)heap->page_length);
+ size_t min_size = initial_heap_min_slots / HEAP_OBJ_LIMIT;
- if (heap_pages_increment > 0) {
- heap_pages_increment--;
- heap_assign_page(objspace, heap);
- return TRUE;
+ if (min_size > heaps_used) {
+ add_heap_slots(objspace, min_size - heaps_used);
}
- return FALSE;
}
-static struct heap_page *
-heap_prepare_freepage(rb_objspace_t *objspace, rb_heap_t *heap)
+static void
+set_heaps_increment(rb_objspace_t *objspace)
{
- if (!GC_ENABLE_LAZY_SWEEP && objspace->flags.dont_lazy_sweep) {
- if (heap_increment(objspace, heap) == 0 &&
- garbage_collect(objspace, FALSE, TRUE, GPR_FLAG_NEWOBJ) == 0) {
- goto err;
- }
- goto ok;
- }
-
- if (!heap_ready_to_gc(objspace, heap)) return heap->free_pages;
-
- during_gc++;
+ size_t next_heaps_length = (size_t)(heaps_used * 1.8);
- if ((is_lazy_sweeping(heap) && gc_heap_lazy_sweep(objspace, heap)) || heap_increment(objspace, heap)) {
- goto ok;
+ if (next_heaps_length == heaps_used) {
+ next_heaps_length++;
}
-#if GC_PROFILE_MORE_DETAIL
- objspace->profile.prepare_time = 0;
-#endif
- if (garbage_collect_body(objspace, 0, 0, GPR_FLAG_NEWOBJ) == 0) {
- err:
- during_gc = 0;
- rb_memerror();
- }
- ok:
- during_gc = 0;
- return heap->free_pages;
-}
+ heaps_inc = next_heaps_length - heaps_used;
-static RVALUE *
-heap_get_freeobj_from_next_freepage(rb_objspace_t *objspace, rb_heap_t *heap)
-{
- struct heap_page *page;
- RVALUE *p;
-
- page = heap->free_pages;
- while (page == NULL) {
- page = heap_prepare_freepage(objspace, heap);
+ if (next_heaps_length > heaps_length) {
+ allocate_sorted_heaps(objspace, next_heaps_length);
+ heaps_length = next_heaps_length;
}
- heap->free_pages = page->free_next;
- heap->using_page = page;
-
- p = page->freelist;
- page->freelist = NULL;
-
- return p;
}
-static inline VALUE
-heap_get_freeobj(rb_objspace_t *objspace, rb_heap_t *heap)
+static int
+heaps_increment(rb_objspace_t *objspace)
{
- RVALUE *p = heap->freelist;
-
- while (1) {
- if (p) {
- heap->freelist = p->as.free.next;
- return (VALUE)p;
- }
- else {
- p = heap_get_freeobj_from_next_freepage(objspace, heap);
- }
+ if (heaps_inc > 0) {
+ assign_heap_slot(objspace);
+ heaps_inc--;
+ return TRUE;
}
+ return FALSE;
}
-void
-rb_objspace_set_event_hook(const rb_event_flag_t event)
-{
- rb_objspace_t *objspace = &rb_objspace;
- objspace->hook_events = event & RUBY_INTERNAL_EVENT_OBJSPACE_MASK;
-}
-
-static void
-gc_event_hook_body(rb_objspace_t *objspace, const rb_event_flag_t event, VALUE data)
-{
- rb_thread_t *th = GET_THREAD();
- EXEC_EVENT_HOOK(th, event, th->cfp->self, 0, 0, data);
-}
-
-#define gc_event_hook(objspace, event, data) do { \
- if (UNLIKELY((objspace)->hook_events & (event))) { \
- gc_event_hook_body((objspace), (event), (data)); \
- } \
-} while (0)
-
static VALUE
-newobj_of(VALUE klass, VALUE flags, VALUE v1, VALUE v2, VALUE v3)
+newobj(VALUE klass, VALUE flags)
{
rb_objspace_t *objspace = &rb_objspace;
VALUE obj;
@@ -1286,52 +643,31 @@ newobj_of(VALUE klass, VALUE flags, VALUE v1, VALUE v2, VALUE v3)
}
if (UNLIKELY(ruby_gc_stress && !ruby_disable_gc_stress)) {
- if (!garbage_collect(objspace, FALSE, FALSE, GPR_FLAG_NEWOBJ)) {
+ if (!garbage_collect(objspace)) {
during_gc = 0;
rb_memerror();
}
}
- obj = heap_get_freeobj(objspace, heap_eden);
+ if (UNLIKELY(!has_free_object)) {
+ if (!gc_prepare_free_objects(objspace)) {
+ during_gc = 0;
+ rb_memerror();
+ }
+ }
- /* OBJSETUP */
- RBASIC(obj)->flags = flags;
- RBASIC_SET_CLASS_RAW(obj, klass);
- if (rb_safe_level() >= 3) FL_SET((obj), FL_TAINT);
- RANY(obj)->as.values.v1 = v1;
- RANY(obj)->as.values.v2 = v2;
- RANY(obj)->as.values.v3 = v3;
+ obj = (VALUE)objspace->heap.free_slots->freelist;
+ objspace->heap.free_slots->freelist = RANY(obj)->as.free.next;
+ if (objspace->heap.free_slots->freelist == NULL) {
+ unlink_free_heap_slot(objspace, objspace->heap.free_slots);
+ }
-#if GC_DEBUG
+ MEMZERO((void*)obj, RVALUE, 1);
+#ifdef GC_DEBUG
RANY(obj)->file = rb_sourcefile();
RANY(obj)->line = rb_sourceline();
- assert(!SPECIAL_CONST_P(obj)); /* check alignment */
-#endif
-
-#if RGENGC_PROFILE
- if (flags & FL_WB_PROTECTED) {
- objspace->profile.generated_normal_object_count++;
-#if RGENGC_PROFILE >= 2
- objspace->profile.generated_normal_object_count_types[BUILTIN_TYPE(obj)]++;
-#endif
- }
- else {
- objspace->profile.generated_shady_object_count++;
-#if RGENGC_PROFILE >= 2
- objspace->profile.generated_shady_object_count_types[BUILTIN_TYPE(obj)]++;
-#endif
- }
#endif
-
- rgengc_report(5, objspace, "newobj: %p (%s)\n", (void *)obj, obj_type_name(obj));
-
-#if USE_RGENGC && RGENGC_CHECK_MODE
- if (RVALUE_PROMOTED_P(obj)) rb_bug("newobj: %p (%s) is promoted.\n", (void *)obj, obj_type_name(obj));
- if (rgengc_remembered(objspace, (VALUE)obj)) rb_bug("newobj: %p (%s) is remembered.\n", (void *)obj, obj_type_name(obj));
-#endif
-
- objspace->profile.total_allocated_object_num++;
- gc_event_hook(objspace, RUBY_INTERNAL_EVENT_NEWOBJ, obj);
+ objspace->total_allocated_object_num++;
return obj;
}
@@ -1339,36 +675,62 @@ newobj_of(VALUE klass, VALUE flags, VALUE v1, VALUE v2, VALUE v3)
VALUE
rb_newobj(void)
{
- return newobj_of(0, T_NONE, 0, 0, 0);
+ return newobj(0, T_NONE);
}
VALUE
rb_newobj_of(VALUE klass, VALUE flags)
{
- return newobj_of(klass, flags, 0, 0, 0);
+ VALUE obj;
+
+ obj = newobj(klass, flags);
+ OBJSETUP(obj, klass, flags);
+
+ return obj;
}
NODE*
rb_node_newnode(enum node_type type, VALUE a0, VALUE a1, VALUE a2)
{
- VALUE flags = (RGENGC_WB_PROTECTED_NODE_CREF && type == NODE_CREF ? FL_WB_PROTECTED : 0);
- NODE *n = (NODE *)newobj_of(0, T_NODE | flags, a0, a1, a2);
+ NODE *n = (NODE*)rb_newobj();
+
+ n->flags |= T_NODE;
nd_set_type(n, type);
+
+ n->u1.value = a0;
+ n->u2.value = a1;
+ n->u3.value = a2;
+
return n;
}
VALUE
rb_data_object_alloc(VALUE klass, void *datap, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree)
{
+ NEWOBJ(data, struct RData);
if (klass) Check_Type(klass, T_CLASS);
- return newobj_of(klass, T_DATA, (VALUE)dmark, (VALUE)dfree, (VALUE)datap);
+ OBJSETUP(data, klass, T_DATA);
+ data->data = datap;
+ data->dfree = dfree;
+ data->dmark = dmark;
+
+ return (VALUE)data;
}
VALUE
rb_data_typed_object_alloc(VALUE klass, void *datap, const rb_data_type_t *type)
{
+ NEWOBJ(data, struct RTypedData);
+
if (klass) Check_Type(klass, T_CLASS);
- return newobj_of(klass, T_DATA | (type->flags & ~T_MASK), (VALUE)type, (VALUE)1, (VALUE)datap);
+
+ OBJSETUP(data, klass, T_DATA);
+
+ data->data = datap;
+ data->typed_flag = 1;
+ data->type = type;
+
+ return (VALUE)data;
}
size_t
@@ -1393,26 +755,28 @@ rb_objspace_data_type_name(VALUE obj)
}
}
+static void gc_mark(rb_objspace_t *objspace, VALUE ptr);
+static void gc_mark_children(rb_objspace_t *objspace, VALUE ptr);
+
static inline int
is_pointer_to_heap(rb_objspace_t *objspace, void *ptr)
{
register RVALUE *p = RANY(ptr);
- register struct heap_page *page;
+ register struct heaps_header *heap;
register size_t hi, lo, mid;
- if (p < heap_pages_lomem || p > heap_pages_himem) return FALSE;
+ if (p < lomem || p > himem) return FALSE;
if ((VALUE)p % sizeof(RVALUE) != 0) return FALSE;
/* check if p looks like a pointer using bsearch*/
lo = 0;
- hi = heap_pages_used;
+ hi = heaps_used;
while (lo < hi) {
mid = (lo + hi) / 2;
- page = heap_pages_sorted[mid];
- if (page->start <= p) {
- if (p < page->start + page->limit) {
+ heap = objspace->heap.sorted[mid];
+ if (heap->start <= p) {
+ if (p < heap->end)
return TRUE;
- }
lo = mid + 1;
}
else {
@@ -1432,21 +796,12 @@ free_method_entry_i(ID key, rb_method_entry_t *me, st_data_t data)
}
void
-rb_free_m_tbl(st_table *tbl)
+rb_free_m_table(st_table *tbl)
{
st_foreach(tbl, free_method_entry_i, 0);
st_free_table(tbl);
}
-void
-rb_free_m_tbl_wrapper(struct method_table_wrapper *wrapper)
-{
- if (wrapper->tbl) {
- rb_free_m_tbl(wrapper->tbl);
- }
- xfree(wrapper);
-}
-
static int
free_const_entry_i(ID key, rb_const_entry_t *ce, st_data_t data)
{
@@ -1461,19 +816,85 @@ rb_free_const_table(st_table *tbl)
st_free_table(tbl);
}
+static int obj_free(rb_objspace_t *, VALUE);
+
+static inline struct heaps_slot *
+add_slot_local_freelist(rb_objspace_t *objspace, RVALUE *p)
+{
+ struct heaps_slot *slot;
+
+ (void)VALGRIND_MAKE_MEM_UNDEFINED((void*)p, sizeof(RVALUE));
+ p->as.free.flags = 0;
+ slot = GET_HEAP_SLOT(p);
+ p->as.free.next = slot->freelist;
+ slot->freelist = p;
+
+ return slot;
+}
+
+static void
+unlink_heap_slot(rb_objspace_t *objspace, struct heaps_slot *slot)
+{
+ if (slot->prev)
+ slot->prev->next = slot->next;
+ if (slot->next)
+ slot->next->prev = slot->prev;
+ if (heaps == slot)
+ heaps = slot->next;
+ if (objspace->heap.sweep_slots == slot)
+ objspace->heap.sweep_slots = slot->next;
+ slot->prev = NULL;
+ slot->next = NULL;
+}
+
+static void
+free_unused_heaps(rb_objspace_t *objspace)
+{
+ size_t i, j;
+ struct heaps_header *last = 0;
+
+ for (i = j = 1; j < heaps_used; i++) {
+ if (objspace->heap.sorted[i]->limit == 0) {
+ struct heaps_header* h = objspace->heap.sorted[i];
+ ((struct heaps_free_bitmap *)(h->bits))->next =
+ objspace->heap.free_bitmap;
+ objspace->heap.free_bitmap = (struct heaps_free_bitmap *)h->bits;
+ if (!last) {
+ last = objspace->heap.sorted[i];
+ }
+ else {
+ aligned_free(objspace->heap.sorted[i]);
+ }
+ heaps_used--;
+ }
+ else {
+ if (i != j) {
+ objspace->heap.sorted[j] = objspace->heap.sorted[i];
+ }
+ j++;
+ }
+ }
+ if (last) {
+ if (last < heaps_freed) {
+ aligned_free(heaps_freed);
+ heaps_freed = last;
+ }
+ else {
+ aligned_free(last);
+ }
+ }
+}
static inline void
-make_deferred(rb_objspace_t *objspace,RVALUE *p)
+make_deferred(RVALUE *p)
{
- p->as.basic.flags = T_ZOMBIE;
- p->as.free.next = heap_pages_deferred_final;
- heap_pages_deferred_final = p;
+ p->as.basic.flags = (p->as.basic.flags & ~T_MASK) | T_ZOMBIE;
}
static inline void
-make_io_deferred(rb_objspace_t *objspace,RVALUE *p)
+make_io_deferred(RVALUE *p)
{
rb_io_t *fptr = p->as.file.fptr;
- make_deferred(objspace, p);
+ make_deferred(p);
p->as.data.dfree = (void (*)(void*))rb_io_fptr_finalize;
p->as.data.data = fptr;
}
@@ -1481,8 +902,6 @@ make_io_deferred(rb_objspace_t *objspace,RVALUE *p)
static int
obj_free(rb_objspace_t *objspace, VALUE obj)
{
- gc_event_hook(objspace, RUBY_INTERNAL_EVENT_FREEOBJ, obj);
-
switch (BUILTIN_TYPE(obj)) {
case T_NIL:
case T_FIXNUM:
@@ -1497,11 +916,6 @@ obj_free(rb_objspace_t *objspace, VALUE obj)
FL_UNSET(obj, FL_EXIVAR);
}
-#if USE_RGENGC
- if (MARKED_IN_BITMAP(GET_HEAP_OLDGEN_BITS(obj),obj))
- CLEAR_IN_BITMAP(GET_HEAP_OLDGEN_BITS(obj),obj);
-#endif
-
switch (BUILTIN_TYPE(obj)) {
case T_OBJECT:
if (!(RANY(obj)->as.basic.flags & ROBJECT_EMBED) &&
@@ -1511,8 +925,9 @@ obj_free(rb_objspace_t *objspace, VALUE obj)
break;
case T_MODULE:
case T_CLASS:
- if (RCLASS_M_TBL_WRAPPER(obj)) {
- rb_free_m_tbl_wrapper(RCLASS_M_TBL_WRAPPER(obj));
+ rb_clear_cache_by_class((VALUE)obj);
+ if (RCLASS_M_TBL(obj)) {
+ rb_free_m_table(RCLASS_M_TBL(obj));
}
if (RCLASS_IV_TBL(obj)) {
st_free_table(RCLASS_IV_TBL(obj));
@@ -1523,20 +938,7 @@ obj_free(rb_objspace_t *objspace, VALUE obj)
if (RCLASS_IV_INDEX_TBL(obj)) {
st_free_table(RCLASS_IV_INDEX_TBL(obj));
}
- if (RCLASS_EXT(obj)->subclasses) {
- if (BUILTIN_TYPE(obj) == T_MODULE) {
- rb_class_detach_module_subclasses(obj);
- }
- else {
- rb_class_detach_subclasses(obj);
- }
- RCLASS_EXT(obj)->subclasses = NULL;
- }
- rb_class_remove_from_module_subclasses(obj);
- rb_class_remove_from_super_subclasses(obj);
- if (RANY(obj)->as.klass.ptr)
- xfree(RANY(obj)->as.klass.ptr);
- RANY(obj)->as.klass.ptr = NULL;
+ xfree(RANY(obj)->as.klass.ptr);
break;
case T_STRING:
rb_str_free(obj);
@@ -1556,25 +958,15 @@ obj_free(rb_objspace_t *objspace, VALUE obj)
break;
case T_DATA:
if (DATA_PTR(obj)) {
- int free_immediately = FALSE;
-
if (RTYPEDDATA_P(obj)) {
- free_immediately = (RANY(obj)->as.typeddata.type->flags & RUBY_TYPED_FREE_IMMEDIATELY) != 0;
RDATA(obj)->dfree = RANY(obj)->as.typeddata.type->function.dfree;
- if (0 && free_immediately == 0) /* to expose non-free-immediate T_DATA */
- fprintf(stderr, "not immediate -> %s\n", RANY(obj)->as.typeddata.type->wrap_struct_name);
}
- if (RANY(obj)->as.data.dfree == RUBY_DEFAULT_FREE) {
+ if (RANY(obj)->as.data.dfree == (RUBY_DATA_FUNC)-1) {
xfree(DATA_PTR(obj));
}
else if (RANY(obj)->as.data.dfree) {
- if (free_immediately) {
- (RDATA(obj)->dfree)(DATA_PTR(obj));
- }
- else {
- make_deferred(objspace, RANY(obj));
- return 1;
- }
+ make_deferred(RANY(obj));
+ return 1;
}
}
break;
@@ -1589,7 +981,7 @@ obj_free(rb_objspace_t *objspace, VALUE obj)
break;
case T_FILE:
if (RANY(obj)->as.file.fptr) {
- make_io_deferred(objspace, RANY(obj));
+ make_io_deferred(RANY(obj));
return 1;
}
break;
@@ -1598,14 +990,7 @@ obj_free(rb_objspace_t *objspace, VALUE obj)
break;
case T_ICLASS:
/* iClass shares table with the module */
- if (RCLASS_EXT(obj)->subclasses) {
- rb_class_detach_subclasses(obj);
- RCLASS_EXT(obj)->subclasses = NULL;
- }
- rb_class_remove_from_module_subclasses(obj);
- rb_class_remove_from_super_subclasses(obj);
xfree(RANY(obj)->as.klass.ptr);
- RANY(obj)->as.klass.ptr = NULL;
break;
case T_FLOAT:
@@ -1637,7 +1022,7 @@ obj_free(rb_objspace_t *objspace, VALUE obj)
case T_STRUCT:
if ((RBASIC(obj)->flags & RSTRUCT_EMBED_LEN_MASK) == 0 &&
RANY(obj)->as.rstruct.as.heap.ptr) {
- xfree((void *)RANY(obj)->as.rstruct.as.heap.ptr);
+ xfree(RANY(obj)->as.rstruct.as.heap.ptr);
}
break;
@@ -1652,28 +1037,7 @@ obj_free(rb_objspace_t *objspace, VALUE obj)
void
Init_heap(void)
{
- rb_objspace_t *objspace = &rb_objspace;
-
-#if RGENGC_ESTIMATE_OLDMALLOC
- objspace->rgengc.oldmalloc_increase_limit = gc_params.oldmalloc_limit_min;
-#endif
-
- heap_add_pages(objspace, heap_eden, gc_params.heap_init_slots / HEAP_OBJ_LIMIT);
-
- init_mark_stack(&objspace->mark_stack);
-
-#ifdef USE_SIGALTSTACK
- {
- /* altstack of another threads are allocated in another place */
- rb_thread_t *th = GET_THREAD();
- void *tmp = th->altstack;
- th->altstack = malloc(rb_sigaltstack_size());
- free(tmp); /* free previously allocated area */
- }
-#endif
-
- objspace->profile.invoke_time = getrusage_time();
- finalizer_table = st_init_numtable();
+ init_heap(&rb_objspace);
}
typedef int each_obj_callback(void *, void *, size_t, void *);
@@ -1687,28 +1051,38 @@ static VALUE
objspace_each_objects(VALUE arg)
{
size_t i;
- struct heap_page_body *last_body = 0;
- struct heap_page *page;
+ RVALUE *membase = 0;
RVALUE *pstart, *pend;
rb_objspace_t *objspace = &rb_objspace;
struct each_obj_args *args = (struct each_obj_args *)arg;
+ volatile VALUE v;
i = 0;
- while (i < heap_pages_used) {
- while (0 < i && last_body < heap_pages_sorted[i-1]->body) i--;
- while (i < heap_pages_used && heap_pages_sorted[i]->body <= last_body) i++;
- if (heap_pages_used <= i) break;
-
- page = heap_pages_sorted[i];
- last_body = page->body;
-
- pstart = page->start;
- pend = pstart + page->limit;
-
- if ((*args->callback)(pstart, pend, sizeof(RVALUE), args->data)) {
- break;
+ while (i < heaps_used) {
+ while (0 < i && (uintptr_t)membase < (uintptr_t)objspace->heap.sorted[i-1])
+ i--;
+ while (i < heaps_used && (uintptr_t)objspace->heap.sorted[i] <= (uintptr_t)membase)
+ i++;
+ if (heaps_used <= i)
+ break;
+ membase = (RVALUE *)objspace->heap.sorted[i];
+
+ pstart = objspace->heap.sorted[i]->start;
+ pend = pstart + objspace->heap.sorted[i]->limit;
+
+ for (; pstart != pend; pstart++) {
+ if (pstart->as.basic.flags) {
+ v = (VALUE)pstart; /* acquire to save this object */
+ break;
+ }
+ }
+ if (pstart != pend) {
+ if ((*args->callback)(pstart, pend, sizeof(RVALUE), args->data)) {
+ break;
+ }
}
}
+ RB_GC_GUARD(v);
return Qnil;
}
@@ -1719,10 +1093,10 @@ objspace_each_objects(VALUE arg)
* To be frank, you should not use it. Or you need to read the
* source code of this function and understand what this function does.
*
- * 'callback' will be called several times (the number of heap page,
+ * 'callback' will be called several times (the number of heap slot,
* at current implementation) with:
- * vstart: a pointer to the first living object of the heap_page.
- * vend: a pointer to next to the valid heap_page area.
+ * vstart: a pointer to the first living object of the heap_slot.
+ * vend: a pointer to next to the valid heap_slot area.
* stride: a distance to next VALUE.
*
* If callback() returns non-zero, the iteration will be stopped.
@@ -1739,10 +1113,10 @@ objspace_each_objects(VALUE arg)
* return 0; // continue to iteration
* }
*
- * Note: 'vstart' is not a top of heap_page. This point the first
+ * Note: 'vstart' is not a top of heap_slot. This point the first
* living object to grasp at least one object to avoid GC issue.
- * This means that you can not walk through all Ruby object page
- * including freed object page.
+ * This means that you can not walk through all Ruby object slot
+ * including freed object slot.
*
* Note: On this implementation, 'stride' is same as sizeof(RVALUE).
* However, there are possibilities to pass variable values with
@@ -1754,20 +1128,13 @@ rb_objspace_each_objects(each_obj_callback *callback, void *data)
{
struct each_obj_args args;
rb_objspace_t *objspace = &rb_objspace;
- int prev_dont_lazy_sweep = objspace->flags.dont_lazy_sweep;
- gc_rest_sweep(objspace);
+ rest_sweep(objspace);
objspace->flags.dont_lazy_sweep = TRUE;
args.callback = callback;
args.data = data;
-
- if (prev_dont_lazy_sweep) {
- objspace_each_objects((VALUE)&args);
- }
- else {
- rb_ensure(objspace_each_objects, (VALUE)&args, lazy_sweep_enable, Qnil);
- }
+ rb_ensure(objspace_each_objects, (VALUE)&args, lazy_sweep_enable, Qnil);
}
struct os_each_struct {
@@ -1875,6 +1242,7 @@ os_each_obj(int argc, VALUE *argv, VALUE os)
{
VALUE of;
+ rb_secure(4);
if (argc == 0) {
of = 0;
}
@@ -1896,11 +1264,11 @@ os_each_obj(int argc, VALUE *argv, VALUE os)
static VALUE
undefine_final(VALUE os, VALUE obj)
{
- return rb_undefine_finalizer(obj);
+ return rb_undefine_final(obj);
}
VALUE
-rb_undefine_finalizer(VALUE obj)
+rb_undefine_final(VALUE obj)
{
rb_objspace_t *objspace = &rb_objspace;
st_data_t data = obj;
@@ -1910,24 +1278,6 @@ rb_undefine_finalizer(VALUE obj)
return obj;
}
-static void
-should_be_callable(VALUE block)
-{
- if (!rb_obj_respond_to(block, rb_intern("call"), TRUE)) {
- rb_raise(rb_eArgError, "wrong type argument %s (should be callable)",
- rb_obj_classname(block));
- }
-}
-static void
-should_be_finalizable(VALUE obj)
-{
- rb_check_frozen(obj);
- if (!FL_ABLE(obj)) {
- rb_raise(rb_eArgError, "cannot define finalizer for %s",
- rb_obj_classname(obj));
- }
-}
-
/*
* call-seq:
* ObjectSpace.define_finalizer(obj, aProc=proc())
@@ -1943,12 +1293,13 @@ define_final(int argc, VALUE *argv, VALUE os)
VALUE obj, block;
rb_scan_args(argc, argv, "11", &obj, &block);
- should_be_finalizable(obj);
+ rb_check_frozen(obj);
if (argc == 1) {
block = rb_block_proc();
}
- else {
- should_be_callable(block);
+ else if (!rb_respond_to(block, rb_intern("call"))) {
+ rb_raise(rb_eArgError, "wrong type argument %s (should be callable)",
+ rb_obj_classname(block));
}
return define_final0(obj, block);
@@ -1961,6 +1312,10 @@ define_final0(VALUE obj, VALUE block)
VALUE table;
st_data_t data;
+ if (!FL_ABLE(obj)) {
+ rb_raise(rb_eArgError, "cannot define finalizer for %s",
+ rb_obj_classname(obj));
+ }
RBASIC(obj)->flags |= FL_FINALIZE;
block = rb_ary_new3(2, INT2FIX(rb_safe_level()), block);
@@ -1972,17 +1327,20 @@ define_final0(VALUE obj, VALUE block)
}
else {
table = rb_ary_new3(1, block);
- RBASIC_CLEAR_CLASS(table);
+ RBASIC(table)->klass = 0;
st_add_direct(finalizer_table, obj, table);
}
return block;
}
VALUE
-rb_define_finalizer(VALUE obj, VALUE block)
+rb_define_final(VALUE obj, VALUE block)
{
- should_be_finalizable(obj);
- should_be_callable(block);
+ rb_check_frozen(obj);
+ if (!rb_respond_to(block, rb_intern("call"))) {
+ rb_raise(rb_eArgError, "wrong type argument %s (should be callable)",
+ rb_obj_classname(block));
+ }
return define_final0(obj, block);
}
@@ -2026,9 +1384,9 @@ run_finalizer(rb_objspace_t *objspace, VALUE obj, VALUE table)
args[2] = (VALUE)rb_safe_level();
for (i=0; i<RARRAY_LEN(table); i++) {
- VALUE final = RARRAY_AREF(table, i);
- args[0] = RARRAY_AREF(final, 1);
- args[2] = FIX2INT(RARRAY_AREF(final, 0));
+ VALUE final = RARRAY_PTR(table)[i];
+ args[0] = RARRAY_PTR(final)[1];
+ args[2] = FIX2INT(RARRAY_PTR(final)[0]);
status = 0;
rb_protect(run_single_final, (VALUE)args, &status);
if (status)
@@ -2042,9 +1400,9 @@ run_final(rb_objspace_t *objspace, VALUE obj)
RUBY_DATA_FUNC free_func = 0;
st_data_t key, table;
- heap_pages_final_slots--;
+ objspace->heap.final_num--;
- RBASIC_CLEAR_CLASS(obj);
+ RBASIC(obj)->klass = 0;
if (RTYPEDDATA_P(obj)) {
free_func = RTYPEDDATA_TYPE(obj)->function.dfree;
@@ -2067,15 +1425,18 @@ finalize_list(rb_objspace_t *objspace, RVALUE *p)
{
while (p) {
RVALUE *tmp = p->as.free.next;
- struct heap_page *page = GET_HEAP_PAGE(p);
-
run_final(objspace, (VALUE)p);
- objspace->profile.total_freed_object_num++;
-
- page->final_slots--;
- heap_page_add_freeobj(objspace, GET_HEAP_PAGE(p), (VALUE)p);
- heap_pages_swept_slots++;
-
+ if (!FL_TEST(p, FL_SINGLETON)) { /* not freeing page */
+ add_slot_local_freelist(objspace, p);
+ if (!is_lazy_sweeping(objspace)) {
+ objspace->total_freed_object_num++;
+ objspace->heap.free_num++;
+ }
+ }
+ else {
+ struct heaps_slot *slot = (struct heaps_slot *)(VALUE)RDATA(p)->dmark;
+ slot->header->limit--;
+ }
p = tmp;
}
}
@@ -2083,15 +1444,16 @@ finalize_list(rb_objspace_t *objspace, RVALUE *p)
static void
finalize_deferred(rb_objspace_t *objspace)
{
- RVALUE *p;
+ RVALUE *p = deferred_final_list;
+ deferred_final_list = 0;
- while ((p = ATOMIC_PTR_EXCHANGE(heap_pages_deferred_final, 0)) != 0) {
+ if (p) {
finalize_list(objspace, p);
}
}
-static void
-gc_finalize_deferred(void *dmy)
+void
+rb_gc_finalize_deferred(void)
{
rb_objspace_t *objspace = &rb_objspace;
if (ATOMIC_EXCHANGE(finalizing, 1)) return;
@@ -2099,21 +1461,6 @@ gc_finalize_deferred(void *dmy)
ATOMIC_SET(finalizing, 0);
}
-/* TODO: to keep compatibility, maybe unused. */
-void
-rb_gc_finalize_deferred(void)
-{
- gc_finalize_deferred(0);
-}
-
-static void
-gc_finalize_deferred_register(void)
-{
- if (rb_postponed_job_register_one(0, gc_finalize_deferred, 0) == 0) {
- rb_bug("gc_finalize_deferred_register: can't register finalizer.");
- }
-}
-
struct force_finalize_list {
VALUE obj;
VALUE table;
@@ -2142,15 +1489,16 @@ static void
rb_objspace_call_finalizer(rb_objspace_t *objspace)
{
RVALUE *p, *pend;
+ RVALUE *final_list = 0;
size_t i;
- gc_rest_sweep(objspace);
+ rest_sweep(objspace);
if (ATOMIC_EXCHANGE(finalizing, 1)) return;
/* run finalizers */
finalize_deferred(objspace);
- assert(heap_pages_deferred_final == 0);
+ assert(deferred_final_list == 0);
/* force to run finalizer */
while (finalizer_table->num_entries) {
@@ -2170,15 +1518,13 @@ rb_objspace_call_finalizer(rb_objspace_t *objspace)
during_gc++;
/* run data object's finalizers */
- for (i = 0; i < heap_pages_used; i++) {
- p = heap_pages_sorted[i]->start; pend = p + heap_pages_sorted[i]->limit;
+ for (i = 0; i < heaps_used; i++) {
+ p = objspace->heap.sorted[i]->start; pend = p + objspace->heap.sorted[i]->limit;
while (p < pend) {
- switch (BUILTIN_TYPE(p)) {
- case T_DATA:
- if (!DATA_PTR(p) || !RANY(p)->as.data.dfree) break;
- if (rb_obj_is_thread((VALUE)p)) break;
- if (rb_obj_is_mutex((VALUE)p)) break;
- if (rb_obj_is_fiber((VALUE)p)) break;
+ if (BUILTIN_TYPE(p) == T_DATA &&
+ DATA_PTR(p) && RANY(p)->as.data.dfree &&
+ !rb_obj_is_thread((VALUE)p) && !rb_obj_is_mutex((VALUE)p) &&
+ !rb_obj_is_fiber((VALUE)p)) {
p->as.free.flags = 0;
if (RTYPEDDATA_P(p)) {
RDATA(p)->dfree = RANY(p)->as.typeddata.type->function.dfree;
@@ -2187,21 +1533,24 @@ rb_objspace_call_finalizer(rb_objspace_t *objspace)
xfree(DATA_PTR(p));
}
else if (RANY(p)->as.data.dfree) {
- make_deferred(objspace, RANY(p));
+ make_deferred(RANY(p));
+ RANY(p)->as.free.next = final_list;
+ final_list = p;
}
- break;
- case T_FILE:
+ }
+ else if (BUILTIN_TYPE(p) == T_FILE) {
if (RANY(p)->as.file.fptr) {
- make_io_deferred(objspace, RANY(p));
+ make_io_deferred(RANY(p));
+ RANY(p)->as.free.next = final_list;
+ final_list = p;
}
- break;
}
p++;
}
}
during_gc = 0;
- if (heap_pages_deferred_final) {
- finalize_list(objspace, heap_pages_deferred_final);
+ if (final_list) {
+ finalize_list(objspace, final_list);
}
st_free_table(finalizer_table);
@@ -2219,63 +1568,37 @@ is_id_value(rb_objspace_t *objspace, VALUE ptr)
}
static inline int
-heap_is_swept_object(rb_objspace_t *objspace, rb_heap_t *heap, VALUE ptr)
-{
- struct heap_page *page = GET_HEAP_PAGE(ptr);
- return page->before_sweep ? FALSE : TRUE;
-}
-
-static inline int
is_swept_object(rb_objspace_t *objspace, VALUE ptr)
{
- if (heap_is_swept_object(objspace, heap_eden, ptr)) {
- return TRUE;
- }
- else {
- return FALSE;
+ struct heaps_slot *slot = objspace->heap.sweep_slots;
+
+ while (slot) {
+ if ((VALUE)slot->header->start <= ptr && ptr < (VALUE)(slot->header->end))
+ return FALSE;
+ slot = slot->next;
}
+ return TRUE;
}
static inline int
is_dead_object(rb_objspace_t *objspace, VALUE ptr)
{
- if (!is_lazy_sweeping(heap_eden) || MARKED_IN_BITMAP(GET_HEAP_MARK_BITS(ptr), ptr)) return FALSE;
- if (!is_swept_object(objspace, ptr)) return TRUE;
+ if (!is_lazy_sweeping(objspace) || MARKED_IN_BITMAP(GET_HEAP_BITMAP(ptr), ptr))
+ return FALSE;
+ if (!is_swept_object(objspace, ptr))
+ return TRUE;
return FALSE;
}
static inline int
is_live_object(rb_objspace_t *objspace, VALUE ptr)
{
- switch (BUILTIN_TYPE(ptr)) {
- case 0: case T_ZOMBIE:
- return FALSE;
- }
+ if (BUILTIN_TYPE(ptr) == 0) return FALSE;
+ if (RBASIC(ptr)->klass == 0) return FALSE;
if (is_dead_object(objspace, ptr)) return FALSE;
return TRUE;
}
-static inline int
-is_markable_object(rb_objspace_t *objspace, VALUE obj)
-{
- if (rb_special_const_p(obj)) return 0; /* special const is not markable */
-
- if (RGENGC_CHECK_MODE) {
- if (!is_pointer_to_heap(objspace, (void *)obj)) rb_bug("is_markable_object: %p is not pointer to heap", (void *)obj);
- if (BUILTIN_TYPE(obj) == T_NONE) rb_bug("is_markable_object: %p is T_NONE", (void *)obj);
- if (BUILTIN_TYPE(obj) == T_ZOMBIE) rb_bug("is_markable_object: %p is T_ZOMBIE", (void *)obj);
- }
-
- return 1;
-}
-
-int
-rb_objspace_markable_object_p(VALUE obj)
-{
- rb_objspace_t *objspace = &rb_objspace;
- return is_markable_object(objspace, obj) && is_live_object(objspace, obj);
-}
-
/*
* call-seq:
* ObjectSpace._id2ref(object_id) -> an_object
@@ -2301,6 +1624,7 @@ id2ref(VALUE obj, VALUE objid)
VALUE ptr;
void *p0;
+ rb_secure(4);
ptr = NUM2PTR(objid);
p0 = (void *)ptr;
@@ -2408,140 +1732,6 @@ rb_obj_id(VALUE obj)
return nonspecial_obj_id(obj);
}
-size_t rb_str_memsize(VALUE);
-size_t rb_ary_memsize(VALUE);
-size_t rb_io_memsize(const rb_io_t *);
-size_t rb_generic_ivar_memsize(VALUE);
-#include "regint.h"
-
-static size_t
-obj_memsize_of(VALUE obj, int use_tdata)
-{
- size_t size = 0;
-
- if (SPECIAL_CONST_P(obj)) {
- return 0;
- }
-
- if (FL_TEST(obj, FL_EXIVAR)) {
- size += rb_generic_ivar_memsize(obj);
- }
-
- switch (BUILTIN_TYPE(obj)) {
- case T_OBJECT:
- if (!(RBASIC(obj)->flags & ROBJECT_EMBED) &&
- ROBJECT(obj)->as.heap.ivptr) {
- size += ROBJECT(obj)->as.heap.numiv * sizeof(VALUE);
- }
- break;
- case T_MODULE:
- case T_CLASS:
- if (RCLASS_M_TBL_WRAPPER(obj)) {
- size += sizeof(struct method_table_wrapper);
- }
- if (RCLASS_M_TBL(obj)) {
- size += st_memsize(RCLASS_M_TBL(obj));
- }
- if (RCLASS_EXT(obj)) {
- if (RCLASS_IV_TBL(obj)) {
- size += st_memsize(RCLASS_IV_TBL(obj));
- }
- if (RCLASS_IV_INDEX_TBL(obj)) {
- size += st_memsize(RCLASS_IV_INDEX_TBL(obj));
- }
- if (RCLASS(obj)->ptr->iv_tbl) {
- size += st_memsize(RCLASS(obj)->ptr->iv_tbl);
- }
- if (RCLASS(obj)->ptr->const_tbl) {
- size += st_memsize(RCLASS(obj)->ptr->const_tbl);
- }
- size += sizeof(rb_classext_t);
- }
- break;
- case T_STRING:
- size += rb_str_memsize(obj);
- break;
- case T_ARRAY:
- size += rb_ary_memsize(obj);
- break;
- case T_HASH:
- if (RHASH(obj)->ntbl) {
- size += st_memsize(RHASH(obj)->ntbl);
- }
- break;
- case T_REGEXP:
- if (RREGEXP(obj)->ptr) {
- size += onig_memsize(RREGEXP(obj)->ptr);
- }
- break;
- case T_DATA:
- if (use_tdata) size += rb_objspace_data_type_memsize(obj);
- break;
- case T_MATCH:
- if (RMATCH(obj)->rmatch) {
- struct rmatch *rm = RMATCH(obj)->rmatch;
- size += onig_region_memsize(&rm->regs);
- size += sizeof(struct rmatch_offset) * rm->char_offset_num_allocated;
- size += sizeof(struct rmatch);
- }
- break;
- case T_FILE:
- if (RFILE(obj)->fptr) {
- size += rb_io_memsize(RFILE(obj)->fptr);
- }
- break;
- case T_RATIONAL:
- case T_COMPLEX:
- break;
- case T_ICLASS:
- /* iClass shares table with the module */
- break;
-
- case T_FLOAT:
- break;
-
- case T_BIGNUM:
- if (!(RBASIC(obj)->flags & RBIGNUM_EMBED_FLAG) && RBIGNUM_DIGITS(obj)) {
- size += RBIGNUM_LEN(obj) * sizeof(BDIGIT);
- }
- break;
- case T_NODE:
- switch (nd_type(obj)) {
- case NODE_SCOPE:
- if (RNODE(obj)->u1.tbl) {
- /* TODO: xfree(RANY(obj)->as.node.u1.tbl); */
- }
- break;
- case NODE_ALLOCA:
- /* TODO: xfree(RANY(obj)->as.node.u1.node); */
- ;
- }
- break; /* no need to free iv_tbl */
-
- case T_STRUCT:
- if ((RBASIC(obj)->flags & RSTRUCT_EMBED_LEN_MASK) == 0 &&
- RSTRUCT(obj)->as.heap.ptr) {
- size += sizeof(VALUE) * RSTRUCT_LEN(obj);
- }
- break;
-
- case T_ZOMBIE:
- break;
-
- default:
- rb_bug("objspace/memsize_of(): unknown data type 0x%x(%p)",
- BUILTIN_TYPE(obj), (void*)obj);
- }
-
- return size;
-}
-
-size_t
-rb_obj_memsize_of(VALUE obj)
-{
- return obj_memsize_of(obj, TRUE);
-}
-
static int
set_zero(st_data_t key, st_data_t val, st_data_t arg)
{
@@ -2595,27 +1785,26 @@ count_objects(int argc, VALUE *argv, VALUE os)
counts[i] = 0;
}
- for (i = 0; i < heap_pages_used; i++) {
- struct heap_page *page = heap_pages_sorted[i];
- RVALUE *p, *pend;
+ for (i = 0; i < heaps_used; i++) {
+ RVALUE *p, *pend;
- p = page->start; pend = p + page->limit;
- for (;p < pend; p++) {
- if (p->as.basic.flags) {
- counts[BUILTIN_TYPE(p)]++;
- }
- else {
- freed++;
- }
- }
- total += page->limit;
+ p = objspace->heap.sorted[i]->start; pend = p + objspace->heap.sorted[i]->limit;
+ for (;p < pend; p++) {
+ if (p->as.basic.flags) {
+ counts[BUILTIN_TYPE(p)]++;
+ }
+ else {
+ freed++;
+ }
+ }
+ total += objspace->heap.sorted[i]->limit;
}
if (hash == Qnil) {
hash = rb_hash_new();
}
else if (!RHASH_EMPTY_P(hash)) {
- st_foreach(RHASH_TBL_RAW(hash), set_zero, hash);
+ st_foreach(RHASH_TBL(hash), set_zero, hash);
}
rb_hash_aset(hash, ID2SYM(rb_intern("TOTAL")), SIZET2NUM(total));
rb_hash_aset(hash, ID2SYM(rb_intern("FREE")), SIZET2NUM(freed));
@@ -2659,6 +1848,8 @@ count_objects(int argc, VALUE *argv, VALUE os)
return hash;
}
+
+
/*
------------------------ Garbage Collection ------------------------
*/
@@ -2674,401 +1865,247 @@ lazy_sweep_enable(void)
return Qnil;
}
-static size_t
-objspace_live_slot(rb_objspace_t *objspace)
-{
- return objspace->profile.total_allocated_object_num - objspace->profile.total_freed_object_num;
-}
-
-static size_t
-objspace_total_slot(rb_objspace_t *objspace)
+static void
+gc_clear_slot_bits(struct heaps_slot *slot)
{
- return heap_eden->total_slots + heap_tomb->total_slots;
+ memset(slot->bits, 0, HEAP_BITMAP_LIMIT * sizeof(uintptr_t));
}
static size_t
-objspace_free_slot(rb_objspace_t *objspace)
+objspace_live_num(rb_objspace_t *objspace)
{
- return objspace_total_slot(objspace) - (objspace_live_slot(objspace) - heap_pages_final_slots);
+ return objspace->total_allocated_object_num - objspace->total_freed_object_num;
}
static void
-gc_setup_mark_bits(struct heap_page *page)
+slot_sweep(rb_objspace_t *objspace, struct heaps_slot *sweep_slot)
{
-#if USE_RGENGC
- /* copy oldgen bitmap to mark bitmap */
- memcpy(&page->mark_bits[0], &page->oldgen_bits[0], HEAP_BITMAP_SIZE);
-#else
- /* clear mark bitmap */
- memset(&page->mark_bits[0], 0, HEAP_BITMAP_SIZE);
-#endif
-}
-
-static inline void
-gc_page_sweep(rb_objspace_t *objspace, rb_heap_t *heap, struct heap_page *sweep_page)
-{
- int i;
- size_t empty_slots = 0, freed_slots = 0, final_slots = 0;
- RVALUE *p, *pend,*offset;
- bits_t *bits, bitset;
-
- rgengc_report(1, objspace, "page_sweep: start.\n");
-
- sweep_page->before_sweep = 0;
-
- p = sweep_page->start; pend = p + sweep_page->limit;
- offset = p - NUM_IN_PAGE(p);
- bits = sweep_page->mark_bits;
-
- /* create guard : fill 1 out-of-range */
- bits[BITMAP_INDEX(p)] |= BITMAP_BIT(p)-1;
- bits[BITMAP_INDEX(pend)] |= ~(BITMAP_BIT(pend) - 1);
-
- for (i=0; i < HEAP_BITMAP_LIMIT; i++) {
- bitset = ~bits[i];
- if (bitset) {
- p = offset + i * BITS_BITLENGTH;
- do {
- if ((bitset & 1) && BUILTIN_TYPE(p) != T_ZOMBIE) {
- if (p->as.basic.flags) {
- rgengc_report(3, objspace, "page_sweep: free %p (%s)\n", p, obj_type_name((VALUE)p));
-#if USE_RGENGC && RGENGC_CHECK_MODE
- if (objspace->rgengc.during_minor_gc && RVALUE_OLD_P((VALUE)p)) rb_bug("page_sweep: %p (%s) is old while minor GC.\n", p, obj_type_name((VALUE)p));
- if (rgengc_remembered(objspace, (VALUE)p)) rb_bug("page_sweep: %p (%s) is remembered.\n", p, obj_type_name((VALUE)p));
-#endif
- if (obj_free(objspace, (VALUE)p)) {
- final_slots++;
- }
- else if (FL_TEST(p, FL_FINALIZE)) {
- RDATA(p)->dfree = 0;
- make_deferred(objspace,p);
- final_slots++;
- }
- else {
- (void)VALGRIND_MAKE_MEM_UNDEFINED((void*)p, sizeof(RVALUE));
- heap_page_add_freeobj(objspace, sweep_page, (VALUE)p);
- rgengc_report(3, objspace, "page_sweep: %p (%s) is added to freelist\n", p, obj_type_name((VALUE)p));
- freed_slots++;
- }
- }
- else {
- empty_slots++;
- }
- }
- p++;
- bitset >>= 1;
- } while (bitset);
- }
- }
-
- gc_setup_mark_bits(sweep_page);
-
-#if GC_PROFILE_MORE_DETAIL
- if (gc_prof_enabled(objspace)) {
- gc_profile_record *record = gc_prof_record(objspace);
- record->removing_objects += final_slots + freed_slots;
- record->empty_objects += empty_slots;
+ size_t empty_num = 0, freed_num = 0, final_num = 0;
+ RVALUE *p, *pend;
+ RVALUE *final = deferred_final_list;
+ int deferred;
+ uintptr_t *bits;
+
+ p = sweep_slot->header->start; pend = p + sweep_slot->header->limit;
+ bits = GET_HEAP_BITMAP(p);
+ while (p < pend) {
+ if ((!(MARKED_IN_BITMAP(bits, p))) && BUILTIN_TYPE(p) != T_ZOMBIE) {
+ if (p->as.basic.flags) {
+ if ((deferred = obj_free(objspace, (VALUE)p)) ||
+ (FL_TEST(p, FL_FINALIZE))) {
+ if (!deferred) {
+ p->as.free.flags = T_ZOMBIE;
+ RDATA(p)->dfree = 0;
+ }
+ p->as.free.next = deferred_final_list;
+ deferred_final_list = p;
+ assert(BUILTIN_TYPE(p) == T_ZOMBIE);
+ final_num++;
+ }
+ else {
+ (void)VALGRIND_MAKE_MEM_UNDEFINED((void*)p, sizeof(RVALUE));
+ p->as.free.flags = 0;
+ p->as.free.next = sweep_slot->freelist;
+ sweep_slot->freelist = p;
+ freed_num++;
+ }
+ }
+ else {
+ empty_num++;
+ }
+ }
+ p++;
}
-#endif
+ gc_clear_slot_bits(sweep_slot);
+ if (final_num + freed_num + empty_num == sweep_slot->header->limit &&
+ objspace->heap.free_num > objspace->heap.do_heap_free) {
+ RVALUE *pp;
- if (final_slots + freed_slots + empty_slots == sweep_page->limit) {
- /* there are no living objects -> move this page to tomb heap */
- heap_unlink_page(objspace, heap, sweep_page);
- heap_add_page(objspace, heap_tomb, sweep_page);
+ for (pp = deferred_final_list; pp != final; pp = pp->as.free.next) {
+ RDATA(pp)->dmark = (void (*)(void *))(VALUE)sweep_slot;
+ pp->as.free.flags |= FL_SINGLETON; /* freeing page mark */
+ }
+ sweep_slot->header->limit = final_num;
+ unlink_heap_slot(objspace, sweep_slot);
}
else {
- if (freed_slots + empty_slots > 0) {
- heap_add_freepage(objspace, heap, sweep_page);
- }
- else {
- sweep_page->free_next = NULL;
- }
+ if (freed_num + empty_num > 0) {
+ link_free_heap_slot(objspace, sweep_slot);
+ }
+ else {
+ sweep_slot->free_next = NULL;
+ }
+ objspace->total_freed_object_num += freed_num;
+ objspace->heap.free_num += freed_num + empty_num;
}
- heap_pages_swept_slots += freed_slots + empty_slots;
- objspace->profile.total_freed_object_num += freed_slots;
- heap_pages_final_slots += final_slots;
- sweep_page->final_slots = final_slots;
+ objspace->heap.final_num += final_num;
- if (0) fprintf(stderr, "gc_page_sweep(%d): freed?: %d, limt: %d, freed_slots: %d, empty_slots: %d, final_slots: %d\n",
- (int)rb_gc_count(),
- final_slots + freed_slots + empty_slots == sweep_page->limit,
- (int)sweep_page->limit, (int)freed_slots, (int)empty_slots, (int)final_slots);
-
- if (heap_pages_deferred_final && !finalizing) {
+ if (deferred_final_list && !finalizing) {
rb_thread_t *th = GET_THREAD();
if (th) {
- gc_finalize_deferred_register();
+ RUBY_VM_SET_FINALIZER_INTERRUPT(th);
}
}
-
- rgengc_report(1, objspace, "page_sweep: end.\n");
}
-/* allocate additional minimum page to work */
-static void
-gc_heap_prepare_minimum_pages(rb_objspace_t *objspace, rb_heap_t *heap)
+static int
+ready_to_gc(rb_objspace_t *objspace)
{
- if (!heap->free_pages) {
- /* there is no free after page_sweep() */
- heap_set_increment(objspace, 0);
- if (!heap_increment(objspace, heap)) { /* can't allocate additional free objects */
- during_gc = 0;
- rb_memerror();
+ if (dont_gc || during_gc) {
+ if (!has_free_object) {
+ if (!heaps_increment(objspace)) {
+ set_heaps_increment(objspace);
+ heaps_increment(objspace);
+ }
}
+ return FALSE;
}
+ return TRUE;
}
static void
-gc_before_heap_sweep(rb_objspace_t *objspace, rb_heap_t *heap)
+before_gc_sweep(rb_objspace_t *objspace)
{
- heap->sweep_pages = heap->pages;
- heap->free_pages = NULL;
-
- if (heap->using_page) {
- RVALUE **p = &heap->using_page->freelist;
- while (*p) {
- p = &(*p)->as.free.next;
- }
- *p = heap->freelist;
- heap->using_page = NULL;
+ objspace->heap.do_heap_free = (size_t)((heaps_used * HEAP_OBJ_LIMIT) * 0.65);
+ objspace->heap.free_min = (size_t)((heaps_used * HEAP_OBJ_LIMIT) * 0.2);
+ if (objspace->heap.free_min < initial_free_min) {
+ objspace->heap.do_heap_free = heaps_used * HEAP_OBJ_LIMIT;
+ objspace->heap.free_min = initial_free_min;
}
- heap->freelist = NULL;
-}
-
-#if defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ == 4
-__attribute__((noinline))
-#endif
-static void
-gc_before_sweep(rb_objspace_t *objspace)
-{
- rb_heap_t *heap;
- size_t total_limit_slot;
-
- rgengc_report(1, objspace, "gc_before_sweep\n");
+ objspace->heap.sweep_slots = heaps;
+ objspace->heap.free_num = 0;
+ objspace->heap.free_slots = NULL;
/* sweep unlinked method entries */
if (GET_VM()->unlinked_method_entry_list) {
rb_sweep_method_entry(GET_VM());
}
+}
- heap_pages_swept_slots = 0;
- total_limit_slot = objspace_total_slot(objspace);
-
- heap_pages_min_free_slots = (size_t)(total_limit_slot * 0.30);
- if (heap_pages_min_free_slots < gc_params.heap_free_slots) {
- heap_pages_min_free_slots = gc_params.heap_free_slots;
- }
- heap_pages_max_free_slots = (size_t)(total_limit_slot * 0.80);
- if (heap_pages_max_free_slots < gc_params.heap_init_slots) {
- heap_pages_max_free_slots = gc_params.heap_init_slots;
- }
- if (0) fprintf(stderr, "heap_pages_min_free_slots: %d, heap_pages_max_free_slots: %d\n",
- (int)heap_pages_min_free_slots, (int)heap_pages_max_free_slots);
-
- heap = heap_eden;
- gc_before_heap_sweep(objspace, heap);
+static void
+after_gc_sweep(rb_objspace_t *objspace)
+{
+ size_t inc;
gc_prof_set_malloc_info(objspace);
-
- /* reset malloc info */
- if (0) fprintf(stderr, "%d\t%d\t%d\n", (int)rb_gc_count(), (int)malloc_increase, (int)malloc_limit);
-
- {
- size_t inc = ATOMIC_SIZE_EXCHANGE(malloc_increase, 0);
- size_t old_limit = malloc_limit;
-
- if (inc > malloc_limit) {
- malloc_limit = (size_t)(inc * gc_params.malloc_limit_growth_factor);
- if (gc_params.malloc_limit_max > 0 && /* ignore max-check if 0 */
- malloc_limit > gc_params.malloc_limit_max) {
- malloc_limit = inc;
- }
- }
- else {
- malloc_limit = (size_t)(malloc_limit * 0.98); /* magic number */
- if (malloc_limit < gc_params.malloc_limit_min) {
- malloc_limit = gc_params.malloc_limit_min;
- }
- }
-
- if (0) {
- if (old_limit != malloc_limit) {
- fprintf(stderr, "[%"PRIuSIZE"] malloc_limit: %"PRIuSIZE" -> %"PRIuSIZE"\n",
- rb_gc_count(), old_limit, malloc_limit);
- }
- else {
- fprintf(stderr, "[%"PRIuSIZE"] malloc_limit: not changed (%"PRIuSIZE")\n",
- rb_gc_count(), malloc_limit);
- }
- }
+ if (objspace->heap.free_num < objspace->heap.free_min) {
+ set_heaps_increment(objspace);
+ heaps_increment(objspace);
}
- /* reset oldmalloc info */
-#if RGENGC_ESTIMATE_OLDMALLOC
- if (objspace->rgengc.during_minor_gc) {
- if (objspace->rgengc.oldmalloc_increase > objspace->rgengc.oldmalloc_increase_limit) {
- objspace->rgengc.need_major_gc = GPR_FLAG_MAJOR_BY_OLDMALLOC;;
- objspace->rgengc.oldmalloc_increase_limit =
- (size_t)(objspace->rgengc.oldmalloc_increase_limit * gc_params.oldmalloc_limit_growth_factor);
-
- if (objspace->rgengc.oldmalloc_increase_limit > gc_params.oldmalloc_limit_max) {
- objspace->rgengc.oldmalloc_increase_limit = gc_params.oldmalloc_limit_max;
- }
- }
-
- if (0) fprintf(stderr, "%d\t%d\t%u\t%u\t%d\n", (int)rb_gc_count(), objspace->rgengc.need_major_gc,
- (unsigned int)objspace->rgengc.oldmalloc_increase,
- (unsigned int)objspace->rgengc.oldmalloc_increase_limit,
- (unsigned int)gc_params.oldmalloc_limit_max);
- }
- else {
- /* major GC */
- objspace->rgengc.oldmalloc_increase = 0;
-
- if ((objspace->profile.latest_gc_info & GPR_FLAG_MAJOR_BY_OLDMALLOC) == 0) {
- objspace->rgengc.oldmalloc_increase_limit =
- (size_t)(objspace->rgengc.oldmalloc_increase_limit / ((gc_params.oldmalloc_limit_growth_factor - 1)/10 + 1));
- if (objspace->rgengc.oldmalloc_increase_limit < gc_params.oldmalloc_limit_min) {
- objspace->rgengc.oldmalloc_increase_limit = gc_params.oldmalloc_limit_min;
- }
- }
+ inc = ATOMIC_SIZE_EXCHANGE(malloc_increase, 0);
+ if (inc > malloc_limit) {
+ malloc_limit +=
+ (size_t)((inc - malloc_limit) * (double)objspace_live_num(objspace) / (heaps_used * HEAP_OBJ_LIMIT));
+ if (malloc_limit < initial_malloc_limit) malloc_limit = initial_malloc_limit;
}
-#endif
+ free_unused_heaps(objspace);
+}
+static int
+lazy_sweep(rb_objspace_t *objspace)
+{
+ struct heaps_slot *next;
+
+ heaps_increment(objspace);
+ while (objspace->heap.sweep_slots) {
+ next = objspace->heap.sweep_slots->next;
+ slot_sweep(objspace, objspace->heap.sweep_slots);
+ objspace->heap.sweep_slots = next;
+ if (has_free_object) {
+ during_gc = 0;
+ return TRUE;
+ }
+ }
+ return FALSE;
}
static void
-gc_after_sweep(rb_objspace_t *objspace)
+rest_sweep(rb_objspace_t *objspace)
{
- rb_heap_t *heap = heap_eden;
-
- rgengc_report(1, objspace, "after_gc_sweep: heap->total_slots: %d, heap->swept_slots: %d, min_free_slots: %d\n",
- (int)heap->total_slots, (int)heap_pages_swept_slots, (int)heap_pages_min_free_slots);
-
- if (heap_pages_swept_slots < heap_pages_min_free_slots) {
- heap_set_increment(objspace, (heap_pages_min_free_slots - heap_pages_swept_slots) / HEAP_OBJ_LIMIT);
- heap_increment(objspace, heap);
-
-#if USE_RGENGC
- if (objspace->rgengc.remembered_shady_object_count + objspace->rgengc.old_object_count > (heap_pages_length * HEAP_OBJ_LIMIT) / 2) {
- /* if [old]+[remembered shady] > [all object count]/2, then do major GC */
- objspace->rgengc.need_major_gc = GPR_FLAG_MAJOR_BY_RESCAN;
+ if (objspace->heap.sweep_slots) {
+ while (objspace->heap.sweep_slots) {
+ lazy_sweep(objspace);
}
-#endif
- }
-
- gc_prof_set_heap_info(objspace);
-
- heap_pages_free_unused_pages(objspace);
-
- /* if heap_pages has unused pages, then assign them to increment */
- if (heap_pages_increment < heap_tomb->page_length) {
- heap_pages_increment = heap_tomb->page_length;
- heap_pages_expand_sorted(objspace);
+ after_gc_sweep(objspace);
}
-
-#if RGENGC_PROFILE > 0
- if (0) {
- fprintf(stderr, "%d\t%d\t%d\t%d\t%d\t%d\t%d\n",
- (int)rb_gc_count(),
- (int)objspace->profile.major_gc_count,
- (int)objspace->profile.minor_gc_count,
- (int)objspace->profile.promote_infant_count,
-#if RGENGC_THREEGEN
- (int)objspace->profile.promote_young_count,
-#else
- 0,
-#endif
- (int)objspace->profile.remembered_normal_object_count,
- (int)objspace->rgengc.remembered_shady_object_count);
- }
-#endif
-
- gc_event_hook(objspace, RUBY_INTERNAL_EVENT_GC_END_SWEEP, 0);
}
+static void gc_marks(rb_objspace_t *objspace);
+
static int
-gc_heap_lazy_sweep(rb_objspace_t *objspace, rb_heap_t *heap)
+gc_prepare_free_objects(rb_objspace_t *objspace)
{
- struct heap_page *page = heap->sweep_pages, *next;
- int result = FALSE;
+ int res;
- if (page == NULL) return FALSE;
-
-#if GC_ENABLE_LAZY_SWEEP
- gc_prof_sweep_timer_start(objspace);
-#endif
+ if (objspace->flags.dont_lazy_sweep)
+ return garbage_collect(objspace);
- while (page) {
- heap->sweep_pages = next = page->next;
- gc_page_sweep(objspace, heap, page);
+ if (!ready_to_gc(objspace)) return TRUE;
- if (!next) gc_after_sweep(objspace);
+ during_gc++;
+ gc_prof_timer_start(objspace);
+ gc_prof_sweep_timer_start(objspace);
- if (heap->free_pages) {
- result = TRUE;
- break;
+ if (objspace->heap.sweep_slots) {
+ res = lazy_sweep(objspace);
+ if (res) {
+ gc_prof_sweep_timer_stop(objspace);
+ gc_prof_set_malloc_info(objspace);
+ gc_prof_timer_stop(objspace, Qfalse);
+ return res;
+ }
+ after_gc_sweep(objspace);
+ }
+ else {
+ if (heaps_increment(objspace)) {
+ during_gc = 0;
+ return TRUE;
}
+ }
+
+ gc_marks(objspace);
- page = next;
+ before_gc_sweep(objspace);
+ if (objspace->heap.free_min > (heaps_used * HEAP_OBJ_LIMIT - objspace_live_num(objspace))) {
+ set_heaps_increment(objspace);
}
-#if GC_ENABLE_LAZY_SWEEP
+ gc_prof_sweep_timer_start(objspace);
+ if (!(res = lazy_sweep(objspace))) {
+ after_gc_sweep(objspace);
+ if (has_free_object) {
+ res = TRUE;
+ during_gc = 0;
+ }
+ }
gc_prof_sweep_timer_stop(objspace);
-#endif
- return result;
+ gc_prof_timer_stop(objspace, Qtrue);
+ return res;
}
static void
-gc_heap_rest_sweep(rb_objspace_t *objspace, rb_heap_t *heap)
+gc_sweep(rb_objspace_t *objspace)
{
- if (is_lazy_sweeping(heap)) {
- during_gc++;
- while (is_lazy_sweeping(heap)) {
- gc_heap_lazy_sweep(objspace, heap);
- }
- during_gc = 0;
- }
-}
+ struct heaps_slot *next;
-static void
-gc_rest_sweep(rb_objspace_t *objspace)
-{
- rb_heap_t *heap = heap_eden; /* lazy sweep only for eden */
- gc_heap_rest_sweep(objspace, heap);
-}
+ before_gc_sweep(objspace);
-static void
-gc_sweep(rb_objspace_t *objspace, int immediate_sweep)
-{
- if (immediate_sweep) {
-#if !GC_ENABLE_LAZY_SWEEP
- gc_prof_sweep_timer_start(objspace);
-#endif
- gc_before_sweep(objspace);
- gc_heap_rest_sweep(objspace, heap_eden);
-#if !GC_ENABLE_LAZY_SWEEP
- gc_prof_sweep_timer_stop(objspace);
-#endif
- }
- else {
- struct heap_page *page;
- gc_before_sweep(objspace);
- page = heap_eden->sweep_pages;
- while (page) {
- page->before_sweep = 1;
- page = page->next;
- }
- gc_heap_lazy_sweep(objspace, heap_eden);
+ while (objspace->heap.sweep_slots) {
+ next = objspace->heap.sweep_slots->next;
+ slot_sweep(objspace, objspace->heap.sweep_slots);
+ objspace->heap.sweep_slots = next;
}
- gc_heap_prepare_minimum_pages(objspace, heap_eden);
+ after_gc_sweep(objspace);
+
+ during_gc = 0;
}
-/* Marking - Marking stack */
+/* Marking stack */
static void push_mark_stack(mark_stack_t *, VALUE);
static int pop_mark_stack(mark_stack_t *, VALUE *);
@@ -3087,7 +2124,7 @@ stack_chunk_alloc(void)
}
static inline int
-is_mark_stack_empty(mark_stack_t *stack)
+is_mark_stask_empty(mark_stack_t *stack)
{
return stack->chunk == NULL;
}
@@ -3174,16 +2211,15 @@ push_mark_stack(mark_stack_t *stack, VALUE data)
static int
pop_mark_stack(mark_stack_t *stack, VALUE *data)
{
- if (is_mark_stack_empty(stack)) {
+ if (is_mark_stask_empty(stack)) {
return FALSE;
}
if (stack->index == 1) {
*data = stack->chunk->data[--stack->index];
pop_mark_stack_chunk(stack);
+ return TRUE;
}
- else {
- *data = stack->chunk->data[--stack->index];
- }
+ *data = stack->chunk->data[--stack->index];
return TRUE;
}
@@ -3192,8 +2228,8 @@ init_mark_stack(mark_stack_t *stack)
{
int i;
- if (0) push_mark_stack_chunk(stack);
- stack->index = stack->limit = STACK_CHUNK_SIZE;
+ push_mark_stack_chunk(stack);
+ stack->limit = STACK_CHUNK_SIZE;
for (i=0; i < 4; i++) {
add_stack_chunk_cache(stack, stack_chunk_alloc());
@@ -3201,8 +2237,12 @@ init_mark_stack(mark_stack_t *stack)
stack->unused_cache_size = stack->cache_size;
}
+
/* Marking */
+#define MARK_IN_BITMAP(bits, p) (bits[BITMAP_INDEX(p)] = bits[BITMAP_INDEX(p)] | ((uintptr_t)1 << BITMAP_OFFSET(p)))
+
+
#ifdef __ia64
#define SET_STACK_END (SET_MACHINE_STACK_END(&th->machine_stack_end), th->machine_register_stack_end = rb_ia64_bsp())
#else
@@ -3273,14 +2313,16 @@ ruby_stack_check(void)
#endif
}
-ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS
static void
mark_locations_array(rb_objspace_t *objspace, register VALUE *x, register long n)
{
VALUE v;
while (n--) {
v = *x;
- gc_mark_maybe(objspace, v);
+ (void)VALGRIND_MAKE_MEM_DEFINED(&v, sizeof(v));
+ if (is_pointer_to_heap(objspace, (void *)v)) {
+ gc_mark(objspace, v);
+ }
x++;
}
}
@@ -3416,19 +2458,12 @@ mark_method_entry_i(ID key, const rb_method_entry_t *me, st_data_t data)
}
static void
-mark_m_tbl_wrapper(rb_objspace_t *objspace, struct method_table_wrapper *wrapper)
+mark_m_tbl(rb_objspace_t *objspace, st_table *tbl)
{
struct mark_tbl_arg arg;
- if (!wrapper || !wrapper->tbl) return;
- if (LIKELY(objspace->mark_func_data == 0)) {
- /* prevent multiple marking during same GC cycle,
- * since m_tbl is shared between several T_ICLASS */
- size_t serial = rb_gc_count();
- if (wrapper->serial == serial) return;
- wrapper->serial = serial;
- }
+ if (!tbl) return;
arg.objspace = objspace;
- st_foreach(wrapper->tbl, mark_method_entry_i, (st_data_t)&arg);
+ st_foreach(tbl, mark_method_entry_i, (st_data_t)&arg);
}
static int
@@ -3459,6 +2494,8 @@ mark_const_tbl(rb_objspace_t *objspace, st_table *tbl)
((start) = STACK_END, (end) = STACK_START) : ((start) = STACK_START, (end) = STACK_END+(appendix)))
#endif
+#define numberof(array) (int)(sizeof(array) / sizeof((array)[0]))
+
static void
mark_current_machine_context(rb_objspace_t *objspace, rb_thread_t *th)
{
@@ -3472,6 +2509,7 @@ mark_current_machine_context(rb_objspace_t *objspace, rb_thread_t *th)
/* This assumes that all registers are saved into the jmp_buf (and stack) */
rb_setjmp(save_regs_gc_mark.j);
+ SET_STACK_END;
GET_STACK_BOUNDS(stack_start, stack_end, 1);
mark_locations_array(objspace, save_regs_gc_mark.v, numberof(save_regs_gc_mark.v));
@@ -3505,77 +2543,48 @@ rb_mark_tbl(st_table *tbl)
mark_tbl(&rb_objspace, tbl);
}
-static void
-gc_mark_maybe(rb_objspace_t *objspace, VALUE obj)
-{
- (void)VALGRIND_MAKE_MEM_DEFINED(&obj, sizeof(obj));
- if (is_pointer_to_heap(objspace, (void *)obj)) {
- int type = BUILTIN_TYPE(obj);
- if (type != T_ZOMBIE && type != T_NONE) {
- gc_mark(objspace, obj);
- }
- }
-}
-
void
rb_gc_mark_maybe(VALUE obj)
{
- gc_mark_maybe(&rb_objspace, obj);
+ if (is_pointer_to_heap(&rb_objspace, (void *)obj)) {
+ gc_mark(&rb_objspace, obj);
+ }
}
-static inline int
-gc_marked(rb_objspace_t *objspace, VALUE ptr)
+static int
+gc_mark_ptr(rb_objspace_t *objspace, VALUE ptr)
{
- register bits_t *bits = GET_HEAP_MARK_BITS(ptr);
- if (MARKED_IN_BITMAP(bits, ptr)) return 1;
- return 0;
+ register uintptr_t *bits = GET_HEAP_BITMAP(ptr);
+ if (MARKED_IN_BITMAP(bits, ptr)) return 0;
+ MARK_IN_BITMAP(bits, ptr);
+ return 1;
}
-static inline int
-gc_mark_ptr(rb_objspace_t *objspace, VALUE ptr)
+static int
+markable_object_p(rb_objspace_t *objspace, VALUE ptr)
{
- register bits_t *bits = GET_HEAP_MARK_BITS(ptr);
- if (gc_marked(objspace, ptr)) return 0;
- MARK_IN_BITMAP(bits, ptr);
+ register RVALUE *obj = RANY(ptr);
+
+ if (rb_special_const_p(ptr)) return 0; /* special const not marked */
+ if (obj->as.basic.flags == 0) return 0 ; /* free cell */
+
return 1;
}
-static void
-rgengc_check_relation(rb_objspace_t *objspace, VALUE obj)
+int
+rb_objspace_markable_object_p(VALUE obj)
{
-#if USE_RGENGC
- if (objspace->rgengc.parent_object_is_old) {
- if (!RVALUE_WB_PROTECTED(obj)) {
- if (rgengc_remember(objspace, obj)) {
- objspace->rgengc.remembered_shady_object_count++;
- }
- }
-#if RGENGC_THREEGEN
- else {
- if (gc_marked(objspace, obj)) {
- if (!RVALUE_OLD_P(obj)) {
- /* An object pointed from an OLD object should be OLD. */
- rgengc_remember(objspace, obj);
- }
- }
- else {
- if (RVALUE_INFANT_P(obj)) {
- RVALUE_PROMOTE_INFANT(obj);
- }
- }
- }
-#endif
- }
-#endif
+ return markable_object_p(/* now it doesn't use &rb_objspace */ 0, obj);
}
static void
gc_mark(rb_objspace_t *objspace, VALUE ptr)
{
- if (!is_markable_object(objspace, ptr)) return;
+ if (!markable_object_p(objspace, ptr)) {
+ return;
+ }
if (LIKELY(objspace->mark_func_data == 0)) {
- rgengc_check_relation(objspace, ptr);
if (!gc_mark_ptr(objspace, ptr)) return; /* already marked */
push_mark_stack(&objspace->mark_stack, ptr);
}
@@ -3590,20 +2599,6 @@ rb_gc_mark(VALUE ptr)
gc_mark(&rb_objspace, ptr);
}
-/* resurrect non-marked `obj' if obj is before swept */
-
-void
-rb_gc_resurrect(VALUE obj)
-{
- rb_objspace_t *objspace = &rb_objspace;
-
- if (is_lazy_sweeping(heap_eden) &&
- !gc_marked(objspace, obj) &&
- !is_swept_object(objspace, obj)) {
- gc_mark_ptr(objspace, obj);
- }
-}
-
static void
gc_mark_children(rb_objspace_t *objspace, VALUE ptr)
{
@@ -3614,8 +2609,7 @@ gc_mark_children(rb_objspace_t *objspace, VALUE ptr)
again:
if (LIKELY(objspace->mark_func_data == 0)) {
obj = RANY(ptr);
- if (!is_markable_object(objspace, ptr)) return;
- rgengc_check_relation(objspace, ptr);
+ if (!markable_object_p(objspace, ptr)) return;
if (!gc_mark_ptr(objspace, ptr)) return; /* already marked */
}
else {
@@ -3624,57 +2618,6 @@ gc_mark_children(rb_objspace_t *objspace, VALUE ptr)
}
marking:
-
-#if USE_RGENGC
- check_gen_consistency((VALUE)obj);
-
- if (LIKELY(objspace->mark_func_data == 0)) {
- /* minor/major common */
- if (RVALUE_WB_PROTECTED(obj)) {
- if (RVALUE_INFANT_P((VALUE)obj)) {
- /* infant -> young */
- RVALUE_PROMOTE_INFANT((VALUE)obj);
-#if RGENGC_THREEGEN
- /* infant -> young */
- objspace->rgengc.young_object_count++;
- objspace->rgengc.parent_object_is_old = FALSE;
-#else
- /* infant -> old */
- objspace->rgengc.old_object_count++;
- objspace->rgengc.parent_object_is_old = TRUE;
-#endif
- rgengc_report(3, objspace, "gc_mark_children: promote infant -> young %p (%s).\n", (void *)obj, obj_type_name((VALUE)obj));
- }
- else {
- objspace->rgengc.parent_object_is_old = TRUE;
-
-#if RGENGC_THREEGEN
- if (RVALUE_YOUNG_P((VALUE)obj)) {
- /* young -> old */
- RVALUE_PROMOTE_YOUNG((VALUE)obj);
- objspace->rgengc.old_object_count++;
- rgengc_report(3, objspace, "gc_mark_children: promote young -> old %p (%s).\n", (void *)obj, obj_type_name((VALUE)obj));
- }
- else {
-#endif
- if (!objspace->rgengc.during_minor_gc) {
- /* major/full GC */
- objspace->rgengc.old_object_count++;
- }
-#if RGENGC_THREEGEN
- }
-#endif
- }
- }
- else {
- rgengc_report(3, objspace, "gc_mark_children: do not promote non-WB-protected %p (%s).\n", (void *)obj, obj_type_name((VALUE)obj));
- objspace->rgengc.parent_object_is_old = FALSE;
- }
- }
-
- check_gen_consistency((VALUE)obj);
-#endif /* USE_RGENGC */
-
if (FL_TEST(obj, FL_EXIVAR)) {
rb_mark_generic_ivar(ptr);
}
@@ -3817,14 +2760,20 @@ gc_mark_children(rb_objspace_t *objspace, VALUE ptr)
case NODE_CREF:
gc_mark(objspace, obj->as.node.nd_refinements);
- gc_mark(objspace, (VALUE)obj->as.node.nd_clss);
- ptr = (VALUE)obj->as.node.nd_next;
+ gc_mark(objspace, (VALUE)obj->as.node.u1.node);
+ ptr = (VALUE)obj->as.node.u3.node;
goto again;
default: /* unlisted NODE */
- gc_mark_maybe(objspace, (VALUE)obj->as.node.u1.node);
- gc_mark_maybe(objspace, (VALUE)obj->as.node.u2.node);
- gc_mark_maybe(objspace, (VALUE)obj->as.node.u3.node);
+ if (is_pointer_to_heap(objspace, obj->as.node.u1.node)) {
+ gc_mark(objspace, (VALUE)obj->as.node.u1.node);
+ }
+ if (is_pointer_to_heap(objspace, obj->as.node.u2.node)) {
+ gc_mark(objspace, (VALUE)obj->as.node.u2.node);
+ }
+ if (is_pointer_to_heap(objspace, obj->as.node.u3.node)) {
+ gc_mark(objspace, (VALUE)obj->as.node.u3.node);
+ }
}
return; /* no need to mark class. */
}
@@ -3834,11 +2783,11 @@ gc_mark_children(rb_objspace_t *objspace, VALUE ptr)
case T_ICLASS:
case T_CLASS:
case T_MODULE:
- mark_m_tbl_wrapper(objspace, RCLASS_M_TBL_WRAPPER(obj));
+ mark_m_tbl(objspace, RCLASS_M_TBL(obj));
if (!RCLASS_EXT(obj)) break;
mark_tbl(objspace, RCLASS_IV_TBL(obj));
mark_const_tbl(objspace, RCLASS_CONST_TBL(obj));
- ptr = RCLASS_SUPER((VALUE)obj);
+ ptr = RCLASS_SUPER(obj);
goto again;
case T_ARRAY:
@@ -3848,7 +2797,7 @@ gc_mark_children(rb_objspace_t *objspace, VALUE ptr)
}
else {
long i, len = RARRAY_LEN(obj);
- const VALUE *ptr = RARRAY_CONST_PTR(obj);
+ VALUE *ptr = RARRAY_PTR(obj);
for (i=0; i < len; i++) {
gc_mark(objspace, *ptr++);
}
@@ -3905,6 +2854,7 @@ gc_mark_children(rb_objspace_t *objspace, VALUE ptr)
case T_FLOAT:
case T_BIGNUM:
+ case T_ZOMBIE:
break;
case T_MATCH:
@@ -3928,7 +2878,7 @@ gc_mark_children(rb_objspace_t *objspace, VALUE ptr)
case T_STRUCT:
{
long len = RSTRUCT_LEN(obj);
- const VALUE *ptr = RSTRUCT_CONST_PTR(obj);
+ VALUE *ptr = RSTRUCT_PTR(obj);
while (len--) {
gc_mark(objspace, *ptr++);
@@ -3937,11 +2887,6 @@ gc_mark_children(rb_objspace_t *objspace, VALUE ptr)
break;
default:
-#if GC_DEBUG
- rb_gcdebug_print_obj_condition((VALUE)obj);
-#endif
- if (BUILTIN_TYPE(obj) == T_NONE) rb_bug("rb_gc_mark(): %p is T_NONE", (void *)obj);
- if (BUILTIN_TYPE(obj) == T_ZOMBIE) rb_bug("rb_gc_mark(): %p is T_ZOMBIE", (void *)obj);
rb_bug("rb_gc_mark(): unknown data type 0x%x(%p) %s",
BUILTIN_TYPE(obj), (void *)obj,
is_pointer_to_heap(objspace, obj) ? "corrupted object" : "non object");
@@ -3956,932 +2901,56 @@ gc_mark_stacked_objects(rb_objspace_t *objspace)
if (!mstack->index) return;
while (pop_mark_stack(mstack, &obj)) {
- if (RGENGC_CHECK_MODE > 0 && !gc_marked(objspace, obj)) {
- rb_bug("gc_mark_stacked_objects: %p (%s) is infant, but not marked.", (void *)obj, obj_type_name(obj));
- }
gc_mark_children(objspace, obj);
}
shrink_stack_chunk_cache(mstack);
}
-#ifndef RGENGC_PRINT_TICK
-#define RGENGC_PRINT_TICK 0
-#endif
-/* the following code is only for internal tuning. */
-
-/* Source code to use RDTSC is quoted and modified from
- * http://www.mcs.anl.gov/~kazutomo/rdtsc.html
- * written by Kazutomo Yoshii <kazutomo@mcs.anl.gov>
- */
-
-#if RGENGC_PRINT_TICK
-#if defined(__GNUC__) && defined(__i386__)
-typedef unsigned long long tick_t;
-
-static inline tick_t
-tick(void)
-{
- unsigned long long int x;
- __asm__ __volatile__ ("rdtsc" : "=A" (x));
- return x;
-}
-
-#elif defined(__GNUC__) && defined(__x86_64__)
-typedef unsigned long long tick_t;
-
-static __inline__ tick_t
-tick(void)
-{
- unsigned long hi, lo;
- __asm__ __volatile__ ("rdtsc" : "=a"(lo), "=d"(hi));
- return ((unsigned long long)lo)|( ((unsigned long long)hi)<<32);
-}
-
-#elif defined(_WIN32) && defined(_MSC_VER)
-#include <intrin.h>
-typedef unsigned __int64 tick_t;
-
-static inline tick_t
-tick(void)
-{
- return __rdtsc();
-}
-
-#else /* use clock */
-typedef clock_t tick_t;
-static inline tick_t
-tick(void)
-{
- return clock();
-}
-#endif
-
-#define MAX_TICKS 0x100
-static tick_t mark_ticks[MAX_TICKS];
-static const char *mark_ticks_categories[MAX_TICKS];
-
-static void
-show_mark_ticks(void)
-{
- int i;
- fprintf(stderr, "mark ticks result:\n");
- for (i=0; i<MAX_TICKS; i++) {
- const char *category = mark_ticks_categories[i];
- if (category) {
- fprintf(stderr, "%s\t%8lu\n", category, (unsigned long)mark_ticks[i]);
- }
- else {
- break;
- }
- }
-}
-
-#endif /* RGENGC_PRINT_TICK */
-
static void
-gc_mark_roots(rb_objspace_t *objspace, int full_mark, const char **categoryp)
+gc_marks(rb_objspace_t *objspace)
{
struct gc_list *list;
rb_thread_t *th = GET_THREAD();
- if (categoryp) *categoryp = "xxx";
-
-#if RGENGC_PRINT_TICK
- tick_t start_tick = tick();
- int tick_count = 0;
- const char *prev_category = 0;
-
- if (mark_ticks_categories[0] == 0) {
- atexit(show_mark_ticks);
- }
-#endif
+ struct mark_func_data_struct *prev_mark_func_data;
-#if RGENGC_PRINT_TICK
-#define MARK_CHECKPOINT_PRINT_TICK(category) do { \
- if (prev_category) { \
- tick_t t = tick(); \
- mark_ticks[tick_count] = t - start_tick; \
- mark_ticks_categories[tick_count] = prev_category; \
- tick_count++; \
- } \
- prev_category = category; \
- start_tick = tick(); \
-} while (0)
-#else /* RGENGC_PRINT_TICK */
-#define MARK_CHECKPOINT_PRINT_TICK(category)
-#endif
+ prev_mark_func_data = objspace->mark_func_data;
+ objspace->mark_func_data = 0;
-#define MARK_CHECKPOINT(category) do { \
- if (categoryp) *categoryp = category; \
- MARK_CHECKPOINT_PRINT_TICK(category); \
-} while (0)
+ gc_prof_mark_timer_start(objspace);
+ objspace->count++;
- MARK_CHECKPOINT("vm");
SET_STACK_END;
+
th->vm->self ? rb_gc_mark(th->vm->self) : rb_vm_mark(th->vm);
- MARK_CHECKPOINT("finalizers");
mark_tbl(objspace, finalizer_table);
-
- MARK_CHECKPOINT("machine_context");
mark_current_machine_context(objspace, th);
- MARK_CHECKPOINT("symbols");
-#if USE_RGENGC
- objspace->rgengc.parent_object_is_old = TRUE;
- rb_gc_mark_symbols(full_mark);
- objspace->rgengc.parent_object_is_old = FALSE;
-#else
- rb_gc_mark_symbols(full_mark);
-#endif
-
- MARK_CHECKPOINT("encodings");
+ rb_gc_mark_symbols();
rb_gc_mark_encodings();
/* mark protected global variables */
- MARK_CHECKPOINT("global_list");
for (list = global_List; list; list = list->next) {
rb_gc_mark_maybe(*list->varptr);
}
-
- MARK_CHECKPOINT("end_proc");
rb_mark_end_proc();
-
- MARK_CHECKPOINT("global_tbl");
rb_gc_mark_global_tbl();
+ mark_tbl(objspace, rb_class_tbl);
+
/* mark generic instance variables for special constants */
- MARK_CHECKPOINT("generic_ivars");
rb_mark_generic_ivar_tbl();
- MARK_CHECKPOINT("parser");
rb_gc_mark_parser();
- MARK_CHECKPOINT("live_method_entries");
rb_gc_mark_unlinked_live_method_entries(th->vm);
- MARK_CHECKPOINT("finish");
-#undef MARK_CHECKPOINT
-}
-
-static void
-gc_marks_body(rb_objspace_t *objspace, int full_mark)
-{
- /* start marking */
- rgengc_report(1, objspace, "gc_marks_body: start (%s)\n", full_mark ? "full" : "minor");
-
-#if USE_RGENGC
- objspace->rgengc.parent_object_is_old = FALSE;
- objspace->rgengc.during_minor_gc = full_mark ? FALSE : TRUE;
-
- if (objspace->rgengc.during_minor_gc) {
- objspace->profile.minor_gc_count++;
- rgengc_rememberset_mark(objspace, heap_eden);
- }
- else {
- objspace->profile.major_gc_count++;
- rgengc_mark_and_rememberset_clear(objspace, heap_eden);
- }
-#endif
- gc_mark_roots(objspace, full_mark, 0);
+ /* marking-loop */
gc_mark_stacked_objects(objspace);
- gc_event_hook(objspace, RUBY_INTERNAL_EVENT_GC_END_MARK, 0);
- rgengc_report(1, objspace, "gc_marks_body: end (%s)\n", full_mark ? "full" : "minor");
-}
-
-struct verify_internal_consistency_struct {
- rb_objspace_t *objspace;
- int err_count;
- VALUE parent;
-};
-
-#if USE_RGENGC
-static void
-verify_internal_consistency_reachable_i(VALUE child, void *ptr)
-{
- struct verify_internal_consistency_struct *data = (struct verify_internal_consistency_struct *)ptr;
-
- assert(RVALUE_OLD_P(data->parent));
-
- if (!RVALUE_OLD_P(child)) {
- if (!MARKED_IN_BITMAP(GET_HEAP_PAGE(data->parent)->rememberset_bits, data->parent) &&
- !MARKED_IN_BITMAP(GET_HEAP_PAGE(child)->rememberset_bits, child)) {
- fprintf(stderr, "verify_internal_consistency_reachable_i: WB miss %p (%s) -> %p (%s)\n",
- (void *)data->parent, obj_type_name(data->parent),
- (void *)child, obj_type_name(child));
- data->err_count++;
- }
- }
-}
-
-static int
-verify_internal_consistency_i(void *page_start, void *page_end, size_t stride, void *ptr)
-{
- struct verify_internal_consistency_struct *data = (struct verify_internal_consistency_struct *)ptr;
- VALUE v;
-
- for (v = (VALUE)page_start; v != (VALUE)page_end; v += stride) {
- if (is_live_object(data->objspace, v)) {
- if (RVALUE_OLD_P(v)) {
- data->parent = v;
- /* reachable objects from an oldgen object should be old or (young with remember) */
- rb_objspace_reachable_objects_from(v, verify_internal_consistency_reachable_i, (void *)data);
- }
- }
- }
-
- return 0;
-}
-#endif /* USE_RGENGC */
-
-/*
- * call-seq:
- * GC.verify_internal_consistency -> nil
- *
- * Verify internal consistency.
- *
- * This method is implementation specific.
- * Now this method checks generatioanl consistency
- * if RGenGC is supported.
- */
-static VALUE
-gc_verify_internal_consistency(VALUE self)
-{
- struct verify_internal_consistency_struct data;
- data.objspace = &rb_objspace;
- data.err_count = 0;
-
-#if USE_RGENGC
- {
- struct each_obj_args eo_args;
- eo_args.callback = verify_internal_consistency_i;
- eo_args.data = (void *)&data;
- objspace_each_objects((VALUE)&eo_args);
- }
-#endif
- if (data.err_count != 0) {
- rb_bug("gc_verify_internal_consistency: found internal consistency.\n");
- }
- return Qnil;
-}
-
-#if RGENGC_CHECK_MODE >= 3
-
-#define MAKE_ROOTSIG(obj) (((VALUE)(obj) << 1) | 0x01)
-#define IS_ROOTSIG(obj) ((VALUE)(obj) & 0x01)
-#define GET_ROOTSIG(obj) ((const char *)((VALUE)(obj) >> 1))
-
-struct reflist {
- VALUE *list;
- int pos;
- int size;
-};
-
-static struct reflist *
-reflist_create(VALUE obj)
-{
- struct reflist *refs = xmalloc(sizeof(struct reflist));
- refs->size = 1;
- refs->list = ALLOC_N(VALUE, refs->size);
- refs->list[0] = obj;
- refs->pos = 1;
- return refs;
-}
-
-static void
-reflist_destruct(struct reflist *refs)
-{
- xfree(refs->list);
- xfree(refs);
-}
-
-static void
-reflist_add(struct reflist *refs, VALUE obj)
-{
- if (refs->pos == refs->size) {
- refs->size *= 2;
- SIZED_REALLOC_N(refs->list, VALUE, refs->size, refs->size/2);
- }
-
- refs->list[refs->pos++] = obj;
-}
-
-static void
-reflist_dump(struct reflist *refs)
-{
- int i;
- for (i=0; i<refs->pos; i++) {
- VALUE obj = refs->list[i];
- if (IS_ROOTSIG(obj)) { /* root */
- fprintf(stderr, "<root@%s>", GET_ROOTSIG(obj));
- }
- else {
- fprintf(stderr, "<%p@%s>", (void *)obj, obj_type_name(obj));
- }
- if (i+1 < refs->pos) fprintf(stderr, ", ");
- }
-}
-
-#if RGENGC_CHECK_MODE >= 3
-static int
-reflist_refered_from_machine_context(struct reflist *refs)
-{
- int i;
- for (i=0; i<refs->pos; i++) {
- VALUE obj = refs->list[i];
- if (IS_ROOTSIG(obj) && strcmp(GET_ROOTSIG(obj), "machine_context") == 0) return 1;
- }
- return 0;
-}
-#endif
-
-struct allrefs {
- rb_objspace_t *objspace;
- /* a -> obj1
- * b -> obj1
- * c -> obj1
- * c -> obj2
- * d -> obj3
- * #=> {obj1 => [a, b, c], obj2 => [c, d]}
- */
- struct st_table *references;
- const char *category;
- VALUE root_obj;
-};
-
-static int
-allrefs_add(struct allrefs *data, VALUE obj)
-{
- struct reflist *refs;
-
- if (st_lookup(data->references, obj, (st_data_t *)&refs)) {
- reflist_add(refs, data->root_obj);
- return 0;
- }
- else {
- refs = reflist_create(data->root_obj);
- st_insert(data->references, obj, (st_data_t)refs);
- return 1;
- }
-}
-
-static void
-allrefs_i(VALUE obj, void *ptr)
-{
- struct allrefs *data = (struct allrefs *)ptr;
-
- if (allrefs_add(data, obj)) {
- push_mark_stack(&data->objspace->mark_stack, obj);
- }
-}
-
-static void
-allrefs_roots_i(VALUE obj, void *ptr)
-{
- struct allrefs *data = (struct allrefs *)ptr;
- if (strlen(data->category) == 0) rb_bug("!!!");
- data->root_obj = MAKE_ROOTSIG(data->category);
-
- if (allrefs_add(data, obj)) {
- push_mark_stack(&data->objspace->mark_stack, obj);
- }
-}
-
-static st_table *
-objspace_allrefs(rb_objspace_t *objspace)
-{
- struct allrefs data;
- struct mark_func_data_struct mfd;
- VALUE obj;
-
- data.objspace = objspace;
- data.references = st_init_numtable();
-
- mfd.mark_func = allrefs_roots_i;
- mfd.data = &data;
-
- /* traverse root objects */
- objspace->mark_func_data = &mfd;
- gc_mark_roots(objspace, TRUE, &data.category);
- objspace->mark_func_data = 0;
-
- /* traverse rest objects reachable from root objects */
- while (pop_mark_stack(&objspace->mark_stack, &obj)) {
- rb_objspace_reachable_objects_from(data.root_obj = obj, allrefs_i, &data);
- }
- shrink_stack_chunk_cache(&objspace->mark_stack);
-
- return data.references;
-}
-
-static int
-objspaec_allrefs_destruct_i(st_data_t key, st_data_t value, void *ptr)
-{
- struct reflist *refs = (struct reflist *)value;
- reflist_destruct(refs);
- return ST_CONTINUE;
-}
-
-static void
-objspace_allrefs_destruct(struct st_table *refs)
-{
- st_foreach(refs, objspaec_allrefs_destruct_i, 0);
- st_free_table(refs);
-}
-
-#if RGENGC_CHECK_MODE >= 4
-static int
-allrefs_dump_i(st_data_t k, st_data_t v, st_data_t ptr)
-{
- VALUE obj = (VALUE)k;
- struct reflist *refs = (struct reflist *)v;
- fprintf(stderr, "[allrefs_dump_i] %p (%s%s%s%s) <- ",
- (void *)obj, obj_type_name(obj),
- RVALUE_OLD_P(obj) ? "[O]" : "[Y]",
- RVALUE_WB_PROTECTED(obj) ? "[W]" : "",
- MARKED_IN_BITMAP(GET_HEAP_REMEMBERSET_BITS(obj), obj) ? "[R]" : "");
- reflist_dump(refs);
- fprintf(stderr, "\n");
- return ST_CONTINUE;
-}
-
-static void
-allrefs_dump(rb_objspace_t *objspace)
-{
- fprintf(stderr, "[all refs] (size: %d)\n", (int)objspace->rgengc.allrefs_table->num_entries);
- st_foreach(objspace->rgengc.allrefs_table, allrefs_dump_i, 0);
-}
-#endif
-
-#if RGENGC_CHECK_MODE >= 3
-static int
-gc_check_after_marks_i(st_data_t k, st_data_t v, void *ptr)
-{
- VALUE obj = k;
- struct reflist *refs = (struct reflist *)v;
- rb_objspace_t *objspace = (rb_objspace_t *)ptr;
-
- /* object should be marked or oldgen */
- if (!MARKED_IN_BITMAP(GET_HEAP_MARK_BITS(obj), obj)) {
- fprintf(stderr, "gc_check_after_marks_i: %p (%s) is not marked and not oldgen.\n", (void *)obj, obj_type_name(obj));
- fprintf(stderr, "gc_check_after_marks_i: %p is referred from ", (void *)obj);
- reflist_dump(refs);
-
- if (reflist_refered_from_machine_context(refs)) {
- fprintf(stderr, " (marked from machine stack).\n");
- /* marked from machine context can be false positive */
- }
- else {
- objspace->rgengc.error_count++;
- fprintf(stderr, "\n");
- }
- }
- return ST_CONTINUE;
-}
-#endif
-
-static void
-gc_marks_check(rb_objspace_t *objspace, int (*checker_func)(ANYARGS), const char *checker_name)
-{
-
- size_t saved_malloc_increase = objspace->malloc_params.increase;
-#if RGENGC_ESTIMATE_OLDMALLOC
- size_t saved_oldmalloc_increase = objspace->rgengc.oldmalloc_increase;
-#endif
- VALUE already_disabled = rb_gc_disable();
-
- objspace->rgengc.allrefs_table = objspace_allrefs(objspace);
- st_foreach(objspace->rgengc.allrefs_table, checker_func, (st_data_t)objspace);
-
- if (objspace->rgengc.error_count > 0) {
-#if RGENGC_CHECK_MODE >= 4
- allrefs_dump(objspace);
-#endif
- rb_bug("%s: GC has problem.", checker_name);
- }
-
- objspace_allrefs_destruct(objspace->rgengc.allrefs_table);
- objspace->rgengc.allrefs_table = 0;
-
- if (already_disabled == Qfalse) rb_gc_enable();
- objspace->malloc_params.increase = saved_malloc_increase;
-#if RGENGC_ESTIMATE_OLDMALLOC
- objspace->rgengc.oldmalloc_increase = saved_oldmalloc_increase;
-#endif
-}
-
-#endif /* RGENGC_CHECK_MODE >= 2 */
-
-static void
-gc_marks(rb_objspace_t *objspace, int full_mark)
-{
- struct mark_func_data_struct *prev_mark_func_data;
-
- gc_prof_mark_timer_start(objspace);
- {
- /* setup marking */
- prev_mark_func_data = objspace->mark_func_data;
- objspace->mark_func_data = 0;
-
-#if USE_RGENGC
-
-#if RGENGC_CHECK_MODE >= 2
- gc_verify_internal_consistency(Qnil);
-#endif
- if (full_mark == TRUE) { /* major/full GC */
- objspace->rgengc.remembered_shady_object_count = 0;
- objspace->rgengc.old_object_count = 0;
-#if RGENGC_THREEGEN
- objspace->rgengc.young_object_count = 0;
-#endif
-
- gc_marks_body(objspace, TRUE);
-
- /* Do full GC if old/remembered_shady object counts is greater than counts two times at last full GC counts */
- objspace->rgengc.remembered_shady_object_limit = objspace->rgengc.remembered_shady_object_count * 2;
- objspace->rgengc.old_object_limit = objspace->rgengc.old_object_count * 2;
- }
- else { /* minor GC */
- gc_marks_body(objspace, FALSE);
- }
-
-#if RGENGC_PROFILE > 0
- if (gc_prof_record(objspace)) {
- gc_profile_record *record = gc_prof_record(objspace);
- record->old_objects = objspace->rgengc.old_object_count;
- }
-#endif
-
-#if RGENGC_CHECK_MODE >= 3
- gc_marks_check(objspace, gc_check_after_marks_i, "after_marks");
-#endif
-
-#else /* USE_RGENGC */
- gc_marks_body(objspace, TRUE);
-#endif
-
- objspace->mark_func_data = prev_mark_func_data;
- }
gc_prof_mark_timer_stop(objspace);
-}
-
-/* RGENGC */
-
-static void
-rgengc_report_body(int level, rb_objspace_t *objspace, const char *fmt, ...)
-{
- if (level <= RGENGC_DEBUG) {
- char buf[1024];
- FILE *out = stderr;
- va_list args;
- const char *status = " ";
-
-#if USE_RGENGC
- if (during_gc) {
- status = objspace->rgengc.during_minor_gc ? "-" : "+";
- }
-#endif
-
- va_start(args, fmt);
- vsnprintf(buf, 1024, fmt, args);
- va_end(args);
-
- fprintf(out, "%s|", status);
- fputs(buf, out);
- }
-}
-
-#if USE_RGENGC
-
-/* bit operations */
-
-static int
-rgengc_remembersetbits_get(rb_objspace_t *objspace, VALUE obj)
-{
- bits_t *bits = GET_HEAP_REMEMBERSET_BITS(obj);
- return MARKED_IN_BITMAP(bits, obj) ? 1 : 0;
-}
-
-static int
-rgengc_remembersetbits_set(rb_objspace_t *objspace, VALUE obj)
-{
- bits_t *bits = GET_HEAP_REMEMBERSET_BITS(obj);
- if (MARKED_IN_BITMAP(bits, obj)) {
- return FALSE;
- }
- else {
- MARK_IN_BITMAP(bits, obj);
- return TRUE;
- }
-}
-
-/* wb, etc */
-
-/* return FALSE if already remembered */
-static int
-rgengc_remember(rb_objspace_t *objspace, VALUE obj)
-{
- rgengc_report(2, objspace, "rgengc_remember: %p (%s, %s) %s\n", (void *)obj, obj_type_name(obj),
- RVALUE_WB_PROTECTED(obj) ? "WB-protected" : "non-WB-protected",
- rgengc_remembersetbits_get(objspace, obj) ? "was already remembered" : "is remembered now");
-
-#if RGENGC_CHECK_MODE > 0
- {
- switch (BUILTIN_TYPE(obj)) {
- case T_NONE:
- case T_ZOMBIE:
- rb_bug("rgengc_remember: should not remember %p (%s)\n",
- (void *)obj, obj_type_name(obj));
- default:
- ;
- }
- }
-#endif
-
- if (RGENGC_PROFILE) {
- if (!rgengc_remembered(objspace, obj)) {
-#if RGENGC_PROFILE > 0
- if (RVALUE_WB_PROTECTED(obj)) {
- objspace->profile.remembered_normal_object_count++;
-#if RGENGC_PROFILE >= 2
- objspace->profile.remembered_normal_object_count_types[BUILTIN_TYPE(obj)]++;
-#endif
- }
- else {
- objspace->profile.remembered_shady_object_count++;
-#if RGENGC_PROFILE >= 2
- objspace->profile.remembered_shady_object_count_types[BUILTIN_TYPE(obj)]++;
-#endif
- }
-#endif /* RGENGC_PROFILE > 0 */
- }
- }
-
- return rgengc_remembersetbits_set(objspace, obj);
-}
-static int
-rgengc_remembered(rb_objspace_t *objspace, VALUE obj)
-{
- int result = rgengc_remembersetbits_get(objspace, obj);
- check_gen_consistency(obj);
- rgengc_report(6, objspace, "gc_remembered: %p (%s) => %d\n", (void *)obj, obj_type_name(obj), result);
- return result;
-}
-
-static void
-rgengc_rememberset_mark(rb_objspace_t *objspace, rb_heap_t *heap)
-{
- size_t j;
- RVALUE *p, *offset;
- bits_t *bits, bitset;
- struct heap_page *page = heap->pages;
-
-#if RGENGC_PROFILE > 0
- size_t shady_object_count = 0, clear_count = 0;
-#endif
-
- while (page) {
- p = page->start;
- bits = page->rememberset_bits;
- offset = p - NUM_IN_PAGE(p);
-
- for (j=0; j < HEAP_BITMAP_LIMIT; j++) {
- if (bits[j]) {
- p = offset + j * BITS_BITLENGTH;
- bitset = bits[j];
- do {
- if (bitset & 1) {
- /* mark before RVALUE_PROMOTE_... */
- gc_mark_ptr(objspace, (VALUE)p);
-
- if (RVALUE_WB_PROTECTED(p)) {
- rgengc_report(2, objspace, "rgengc_rememberset_mark: clear %p (%s)\n", p, obj_type_name((VALUE)p));
-#if RGENGC_THREEGEN
- if (RVALUE_INFANT_P((VALUE)p)) RVALUE_PROMOTE_INFANT((VALUE)p);
- if (RVALUE_YOUNG_P((VALUE)p)) RVALUE_PROMOTE_YOUNG((VALUE)p);
-#endif
- CLEAR_IN_BITMAP(bits, p);
-#if RGENGC_PROFILE > 0
- clear_count++;
-#endif
- }
- else {
-#if RGENGC_PROFILE > 0
- shady_object_count++;
-#endif
- }
-
- rgengc_report(2, objspace, "rgengc_rememberset_mark: mark %p (%s)\n", p, obj_type_name((VALUE)p));
- gc_mark_children(objspace, (VALUE) p);
- }
- p++;
- bitset >>= 1;
- } while (bitset);
- }
- }
- page = page->next;
- }
-
- rgengc_report(2, objspace, "rgengc_rememberset_mark: finished\n");
-
-#if RGENGC_PROFILE > 0
- rgengc_report(2, objspace, "rgengc_rememberset_mark: clear_count: %"PRIdSIZE", shady_object_count: %"PRIdSIZE"\n", clear_count, shady_object_count);
- if (gc_prof_record(objspace)) {
- gc_profile_record *record = gc_prof_record(objspace);
- record->remembered_normal_objects = clear_count;
- record->remembered_shady_objects = shady_object_count;
- }
-#endif
-}
-
-static void
-rgengc_mark_and_rememberset_clear(rb_objspace_t *objspace, rb_heap_t *heap)
-{
- struct heap_page *page = heap->pages;
-
- while (page) {
- memset(&page->mark_bits[0], 0, HEAP_BITMAP_SIZE);
- memset(&page->rememberset_bits[0], 0, HEAP_BITMAP_SIZE);
- page = page->next;
- }
-}
-
-/* RGENGC: APIs */
-
-void
-rb_gc_writebarrier(VALUE a, VALUE b)
-{
- if (RGENGC_CHECK_MODE) {
- if (!RVALUE_PROMOTED_P(a)) rb_bug("rb_gc_writebarrier: referer object %p (%s) is not promoted.\n", (void *)a, obj_type_name(a));
- }
-
- if (!RVALUE_OLD_P(b) && RVALUE_OLD_BITMAP_P(a)) {
- rb_objspace_t *objspace = &rb_objspace;
-
- if (!rgengc_remembered(objspace, a)) {
- int type = BUILTIN_TYPE(a);
- /* TODO: 2 << 16 is just a magic number. */
- if ((type == T_ARRAY && RARRAY_LEN(a) >= 2 << 16) ||
- (type == T_HASH && RHASH_SIZE(a) >= 2 << 16)) {
- if (!rgengc_remembered(objspace, b)) {
- rgengc_report(2, objspace, "rb_gc_wb: %p (%s) -> %p (%s)\n", (void *)a, obj_type_name(a), (void *)b, obj_type_name(b));
- rgengc_remember(objspace, b);
- }
- }
- else {
- rgengc_report(2, objspace, "rb_gc_wb: %p (%s) -> %p (%s)\n",
- (void *)a, obj_type_name(a), (void *)b, obj_type_name(b));
- rgengc_remember(objspace, a);
- }
- }
- }
-}
-
-void
-rb_gc_writebarrier_unprotect_promoted(VALUE obj)
-{
- rb_objspace_t *objspace = &rb_objspace;
-
- if (RGENGC_CHECK_MODE) {
- if (!RVALUE_PROMOTED_P(obj)) rb_bug("rb_gc_writebarrier_unprotect_promoted: called on non-promoted object");
- if (!RVALUE_WB_PROTECTED(obj)) rb_bug("rb_gc_writebarrier_unprotect_promoted: called on shady object");
- }
-
- rgengc_report(0, objspace, "rb_gc_writebarrier_unprotect_promoted: %p (%s)%s\n", (void *)obj, obj_type_name(obj),
- rgengc_remembered(objspace, obj) ? " (already remembered)" : "");
-
- if (RVALUE_OLD_P(obj)) {
- RVALUE_DEMOTE_FROM_OLD(obj);
-
- rgengc_remember(objspace, obj);
- objspace->rgengc.remembered_shady_object_count++;
-
-#if RGENGC_PROFILE
- objspace->profile.shade_operation_count++;
-#if RGENGC_PROFILE >= 2
- objspace->profile.shade_operation_count_types[BUILTIN_TYPE(obj)]++;
-#endif /* RGENGC_PROFILE >= 2 */
-#endif /* RGENGC_PROFILE */
- }
-#if RGENGC_THREEGEN
- else {
- RVALUE_DEMOTE_FROM_YOUNG(obj);
- }
-#endif
-}
-
-void
-rb_gc_writebarrier_remember_promoted(VALUE obj)
-{
- rb_objspace_t *objspace = &rb_objspace;
- rgengc_remember(objspace, obj);
-}
-
-static st_table *rgengc_unprotect_logging_table;
-
-static int
-rgengc_unprotect_logging_exit_func_i(st_data_t key, st_data_t val)
-{
- fprintf(stderr, "%s\t%d\n", (char *)key, (int)val);
- return ST_CONTINUE;
-}
-
-static void
-rgengc_unprotect_logging_exit_func(void)
-{
- st_foreach(rgengc_unprotect_logging_table, rgengc_unprotect_logging_exit_func_i, 0);
-}
-
-void
-rb_gc_unprotect_logging(void *objptr, const char *filename, int line)
-{
- VALUE obj = (VALUE)objptr;
-
- if (rgengc_unprotect_logging_table == 0) {
- rgengc_unprotect_logging_table = st_init_strtable();
- atexit(rgengc_unprotect_logging_exit_func);
- }
-
- if (OBJ_WB_PROTECTED(obj)) {
- char buff[0x100];
- st_data_t cnt = 1;
- char *ptr = buff;
-
- snprintf(ptr, 0x100 - 1, "%s|%s:%d", obj_type_name(obj), filename, line);
-
- if (st_lookup(rgengc_unprotect_logging_table, (st_data_t)ptr, &cnt)) {
- cnt++;
- }
- else {
- ptr = (char *)malloc(strlen(buff) + 1);
- strcpy(ptr, buff);
- }
- st_insert(rgengc_unprotect_logging_table, (st_data_t)ptr, cnt);
- }
-}
-
-#endif /* USE_RGENGC */
-
-/* RGENGC analysis information */
-
-VALUE
-rb_obj_rgengc_writebarrier_protected_p(VALUE obj)
-{
- return OBJ_WB_PROTECTED(obj) ? Qtrue : Qfalse;
-}
-
-VALUE
-rb_obj_rgengc_promoted_p(VALUE obj)
-{
- return OBJ_PROMOTED(obj) ? Qtrue : Qfalse;
-}
-
-size_t
-rb_obj_gc_flags(VALUE obj, ID* flags, size_t max)
-{
- size_t n = 0;
- static ID ID_marked;
-#if USE_RGENGC
- static ID ID_wb_protected, ID_old, ID_remembered;
-#if RGENGC_THREEGEN
- static ID ID_young, ID_infant;
-#endif
-#endif
-
- if (!ID_marked) {
-#define I(s) ID_##s = rb_intern(#s);
- I(marked);
-#if USE_RGENGC
- I(wb_protected);
- I(old);
- I(remembered);
-#if RGENGC_THREEGEN
- I(young);
- I(infant);
-#endif
-#endif
-#undef I
- }
-
-#if USE_RGENGC
- if (OBJ_WB_PROTECTED(obj) && n<max)
- flags[n++] = ID_wb_protected;
- if (RVALUE_OLD_P(obj) && n<max)
- flags[n++] = ID_old;
-#if RGENGC_THREEGEN
- if (RVALUE_YOUNG_P(obj) && n<max)
- flags[n++] = ID_young;
- if (RVALUE_INFANT_P(obj) && n<max)
- flags[n++] = ID_infant;
-#endif
- if (MARKED_IN_BITMAP(GET_HEAP_REMEMBERSET_BITS(obj), obj) && n<max)
- flags[n++] = ID_remembered;
-#endif
- if (MARKED_IN_BITMAP(GET_HEAP_MARK_BITS(obj), obj) && n<max)
- flags[n++] = ID_marked;
-
- return n;
+ objspace->mark_func_data = prev_mark_func_data;
}
/* GC */
@@ -4890,23 +2959,19 @@ void
rb_gc_force_recycle(VALUE p)
{
rb_objspace_t *objspace = &rb_objspace;
+ struct heaps_slot *slot;
-#if USE_RGENGC
- CLEAR_IN_BITMAP(GET_HEAP_REMEMBERSET_BITS(p), p);
- CLEAR_IN_BITMAP(GET_HEAP_OLDGEN_BITS(p), p);
- if (!GET_HEAP_PAGE(p)->before_sweep) {
- CLEAR_IN_BITMAP(GET_HEAP_MARK_BITS(p), p);
+ if (MARKED_IN_BITMAP(GET_HEAP_BITMAP(p), p)) {
+ add_slot_local_freelist(objspace, (RVALUE *)p);
+ }
+ else {
+ objspace->total_freed_object_num++;
+ objspace->heap.free_num++;
+ slot = add_slot_local_freelist(objspace, (RVALUE *)p);
+ if (slot->free_next == NULL) {
+ link_free_heap_slot(objspace, slot);
+ }
}
-#endif
-
- objspace->profile.total_freed_object_num++;
- heap_page_add_freeobj(objspace, GET_HEAP_PAGE(p), p);
-
- /* Disable counting swept_slots because there are no meaning.
- * if (!MARKED_IN_BITMAP(GET_HEAP_MARK_BITS(p), p)) {
- * objspace->heap.swept_slots++;
- * }
- */
}
void
@@ -4951,151 +3016,52 @@ rb_gc_unregister_address(VALUE *addr)
}
}
-void
-rb_global_variable(VALUE *var)
-{
- rb_gc_register_address(var);
-}
-
#define GC_NOTIFY 0
static int
-garbage_collect_body(rb_objspace_t *objspace, int full_mark, int immediate_sweep, int reason)
-{
- if (ruby_gc_stress && !ruby_disable_gc_stress) {
- int flag = FIXNUM_P(ruby_gc_stress) ? FIX2INT(ruby_gc_stress) : 0;
-
- if (flag & 0x01)
- reason &= ~GPR_FLAG_MAJOR_MASK;
- else
- reason |= GPR_FLAG_MAJOR_BY_STRESS;
- immediate_sweep = !(flag & 0x02);
- }
- else {
- if (!GC_ENABLE_LAZY_SWEEP || objspace->flags.dont_lazy_sweep) {
- immediate_sweep = TRUE;
- }
-#if USE_RGENGC
- if (full_mark) {
- reason |= GPR_FLAG_MAJOR_BY_NOFREE;
- }
- if (objspace->rgengc.need_major_gc) {
- reason |= objspace->rgengc.need_major_gc;
- objspace->rgengc.need_major_gc = GPR_FLAG_NONE;
- }
- if (objspace->rgengc.remembered_shady_object_count > objspace->rgengc.remembered_shady_object_limit) {
- reason |= GPR_FLAG_MAJOR_BY_SHADY;
- }
- if (objspace->rgengc.old_object_count > objspace->rgengc.old_object_limit) {
- reason |= GPR_FLAG_MAJOR_BY_OLDGEN;
- }
-#endif
- }
-
- if (immediate_sweep) reason |= GPR_FLAG_IMMEDIATE_SWEEP;
- full_mark = (reason & GPR_FLAG_MAJOR_MASK) ? TRUE : FALSE;
-
- if (GC_NOTIFY) fprintf(stderr, "start garbage_collect(%d, %d, %d)\n", full_mark, immediate_sweep, reason);
-
- objspace->profile.count++;
- objspace->profile.latest_gc_info = reason;
-
- gc_event_hook(objspace, RUBY_INTERNAL_EVENT_GC_START, 0 /* TODO: pass minor/immediate flag? */);
-
- objspace->profile.total_allocated_object_num_at_gc_start = objspace->profile.total_allocated_object_num;
- objspace->profile.heap_used_at_gc_start = heap_pages_used;
-
- gc_prof_setup_new_record(objspace, reason);
- gc_prof_timer_start(objspace);
- {
- if (during_gc == 0) {
- rb_bug("during_gc should not be 0. RUBY_INTERNAL_EVENT_GC_START user should not cause GC in events.");
- }
- gc_marks(objspace, full_mark);
- gc_sweep(objspace, immediate_sweep);
- during_gc = 0;
- }
- gc_prof_timer_stop(objspace);
-
- if (GC_NOTIFY) fprintf(stderr, "end garbage_collect()\n");
- return TRUE;
-}
-
-static int
-heap_ready_to_gc(rb_objspace_t *objspace, rb_heap_t *heap)
+garbage_collect(rb_objspace_t *objspace)
{
- if (dont_gc || during_gc) {
- if (!heap->freelist && !heap->free_pages) {
- if (!heap_increment(objspace, heap)) {
- heap_set_increment(objspace, 0);
- heap_increment(objspace, heap);
- }
- }
- return FALSE;
- }
- return TRUE;
-}
+ if (GC_NOTIFY) printf("start garbage_collect()\n");
-static int
-ready_to_gc(rb_objspace_t *objspace)
-{
- return heap_ready_to_gc(objspace, heap_eden);
-}
-
-static int
-garbage_collect(rb_objspace_t *objspace, int full_mark, int immediate_sweep, int reason)
-{
- if (!heap_pages_used) {
- during_gc = 0;
+ if (!heaps) {
return FALSE;
}
if (!ready_to_gc(objspace)) {
- during_gc = 0;
- return TRUE;
+ return TRUE;
}
-#if GC_PROFILE_MORE_DETAIL
- objspace->profile.prepare_time = getrusage_time();
-#endif
- gc_rest_sweep(objspace);
-#if GC_PROFILE_MORE_DETAIL
- objspace->profile.prepare_time = getrusage_time() - objspace->profile.prepare_time;
-#endif
+ gc_prof_timer_start(objspace);
+
+ rest_sweep(objspace);
during_gc++;
+ gc_marks(objspace);
- return garbage_collect_body(objspace, full_mark, immediate_sweep, reason);
-}
+ gc_prof_sweep_timer_start(objspace);
+ gc_sweep(objspace);
+ gc_prof_sweep_timer_stop(objspace);
-struct objspace_and_reason {
- rb_objspace_t *objspace;
- int reason;
- int full_mark;
- int immediate_sweep;
-};
+ gc_prof_timer_stop(objspace, Qtrue);
+ if (GC_NOTIFY) printf("end garbage_collect()\n");
+ return TRUE;
+}
static void *
gc_with_gvl(void *ptr)
{
- struct objspace_and_reason *oar = (struct objspace_and_reason *)ptr;
- return (void *)(VALUE)garbage_collect(oar->objspace, oar->full_mark, oar->immediate_sweep, oar->reason);
+ return (void *)(VALUE)garbage_collect((rb_objspace_t *)ptr);
}
static int
-garbage_collect_with_gvl(rb_objspace_t *objspace, int full_mark, int immediate_sweep, int reason)
+garbage_collect_with_gvl(rb_objspace_t *objspace)
{
if (dont_gc) return TRUE;
if (ruby_thread_has_gvl_p()) {
- return garbage_collect(objspace, full_mark, immediate_sweep, reason);
+ return garbage_collect(objspace);
}
else {
if (ruby_native_thread_p()) {
- struct objspace_and_reason oar;
- oar.objspace = objspace;
- oar.reason = reason;
- oar.full_mark = full_mark;
- oar.immediate_sweep = immediate_sweep;
- return (int)(VALUE)rb_thread_call_with_gvl(gc_with_gvl, (void *)&oar);
+ return (int)(VALUE)rb_thread_call_with_gvl(gc_with_gvl, (void *)objspace);
}
else {
/* no ruby thread */
@@ -5108,7 +3074,7 @@ garbage_collect_with_gvl(rb_objspace_t *objspace, int full_mark, int immediate_s
int
rb_garbage_collect(void)
{
- return garbage_collect(&rb_objspace, TRUE, TRUE, GPR_FLAG_CAPI);
+ return garbage_collect(&rb_objspace);
}
#undef Init_stack
@@ -5122,56 +3088,13 @@ Init_stack(volatile VALUE *addr)
/*
* call-seq:
* GC.start -> nil
- * GC.garbage_collect -> nil
+ * gc.garbage_collect -> nil
* ObjectSpace.garbage_collect -> nil
- * GC.start(full_mark: false) -> nil
*
* Initiates garbage collection, unless manually disabled.
*
- * This method is defined with keyword arguments that default to true:
- *
- * def GC.start(full_mark: true, immediate_sweep: true) end
- *
- * Use full_mark: false to perform a minor GC.
- * Use immediate_sweep: false to defer sweeping (use lazy sweep).
- *
- * Note: These keyword arguments are implementation and version dependent. They
- * are not guaranteed to be future-compatible, and may be ignored if the
- * underlying implementation does not support them.
*/
-static VALUE
-gc_start_internal(int argc, VALUE *argv, VALUE self)
-{
- rb_objspace_t *objspace = &rb_objspace;
- int full_mark = TRUE, immediate_sweep = TRUE;
- VALUE opt = Qnil;
- static ID keyword_ids[2];
-
- rb_scan_args(argc, argv, "0:", &opt);
-
- if (!NIL_P(opt)) {
- VALUE kwvals[2];
-
- if (!keyword_ids[0]) {
- keyword_ids[0] = rb_intern("full_mark");
- keyword_ids[1] = rb_intern("immediate_sweep");
- }
-
- rb_get_kwargs(opt, keyword_ids, 0, 2, kwvals);
-
- if (kwvals[0] != Qundef)
- full_mark = RTEST(kwvals[0]);
- if (kwvals[1] != Qundef)
- immediate_sweep = RTEST(kwvals[1]);
- }
-
- garbage_collect(objspace, full_mark, immediate_sweep, GPR_FLAG_METHOD);
- if (!finalizing) finalize_deferred(objspace);
-
- return Qnil;
-}
-
VALUE
rb_gc_start(void)
{
@@ -5183,8 +3106,9 @@ void
rb_gc(void)
{
rb_objspace_t *objspace = &rb_objspace;
- garbage_collect(objspace, TRUE, TRUE, GPR_FLAG_CAPI);
+ garbage_collect(objspace);
if (!finalizing) finalize_deferred(objspace);
+ free_unused_heaps(objspace);
}
int
@@ -5194,26 +3118,6 @@ rb_during_gc(void)
return during_gc;
}
-#if RGENGC_PROFILE >= 2
-static void
-gc_count_add_each_types(VALUE hash, const char *name, const size_t *types)
-{
- VALUE result = rb_hash_new();
- int i;
- for (i=0; i<T_MASK; i++) {
- const char *type = type_name(i, 0);
- rb_hash_aset(result, ID2SYM(rb_intern(type)), SIZET2NUM(types[i]));
- }
- rb_hash_aset(hash, ID2SYM(rb_intern(name)), result);
-}
-#endif
-
-size_t
-rb_gc_count(void)
-{
- return rb_objspace.profile.count;
-}
-
/*
* call-seq:
* GC.count -> Integer
@@ -5227,292 +3131,27 @@ rb_gc_count(void)
static VALUE
gc_count(VALUE self)
{
- return SIZET2NUM(rb_gc_count());
-}
-
-static VALUE
-gc_info_decode(int flags, VALUE hash_or_key)
-{
- static VALUE sym_major_by = Qnil, sym_gc_by, sym_immediate_sweep, sym_have_finalizer;
- static VALUE sym_nofree, sym_oldgen, sym_shady, sym_rescan, sym_stress;
-#if RGENGC_ESTIMATE_OLDMALLOC
- static VALUE sym_oldmalloc;
-#endif
- static VALUE sym_newobj, sym_malloc, sym_method, sym_capi;
- VALUE hash = Qnil, key = Qnil;
- VALUE major_by;
-
- if (SYMBOL_P(hash_or_key))
- key = hash_or_key;
- else if (RB_TYPE_P(hash_or_key, T_HASH))
- hash = hash_or_key;
- else
- rb_raise(rb_eTypeError, "non-hash or symbol given");
-
- if (sym_major_by == Qnil) {
-#define S(s) sym_##s = ID2SYM(rb_intern_const(#s))
- S(major_by);
- S(gc_by);
- S(immediate_sweep);
- S(have_finalizer);
- S(nofree);
- S(oldgen);
- S(shady);
- S(rescan);
- S(stress);
-#if RGENGC_ESTIMATE_OLDMALLOC
- S(oldmalloc);
-#endif
- S(newobj);
- S(malloc);
- S(method);
- S(capi);
-#undef S
- }
-
-#define SET(name, attr) \
- if (key == sym_##name) \
- return (attr); \
- else if (hash != Qnil) \
- rb_hash_aset(hash, sym_##name, (attr));
-
- major_by =
- (flags & GPR_FLAG_MAJOR_BY_OLDGEN) ? sym_oldgen :
- (flags & GPR_FLAG_MAJOR_BY_SHADY) ? sym_shady :
- (flags & GPR_FLAG_MAJOR_BY_RESCAN) ? sym_rescan :
- (flags & GPR_FLAG_MAJOR_BY_STRESS) ? sym_stress :
-#if RGENGC_ESTIMATE_OLDMALLOC
- (flags & GPR_FLAG_MAJOR_BY_OLDMALLOC) ? sym_oldmalloc :
-#endif
- (flags & GPR_FLAG_MAJOR_BY_NOFREE) ? sym_nofree :
- Qnil;
- SET(major_by, major_by);
-
- SET(gc_by,
- (flags & GPR_FLAG_NEWOBJ) ? sym_newobj :
- (flags & GPR_FLAG_MALLOC) ? sym_malloc :
- (flags & GPR_FLAG_METHOD) ? sym_method :
- (flags & GPR_FLAG_CAPI) ? sym_capi :
- (flags & GPR_FLAG_STRESS) ? sym_stress :
- Qnil
- );
-
- SET(have_finalizer, (flags & GPR_FLAG_HAVE_FINALIZE) ? Qtrue : Qfalse);
- SET(immediate_sweep, (flags & GPR_FLAG_IMMEDIATE_SWEEP) ? Qtrue : Qfalse);
-#undef SET
-
- if (key != Qnil) /* matched key should return above */
- rb_raise(rb_eArgError, "unknown key: %s", RSTRING_PTR(rb_id2str(SYM2ID(key))));
-
- return hash;
-}
-
-VALUE
-rb_gc_latest_gc_info(VALUE key)
-{
- rb_objspace_t *objspace = &rb_objspace;
- return gc_info_decode(objspace->profile.latest_gc_info, key);
-}
-
-/*
- * call-seq:
- * GC.latest_gc_info -> {:gc_by=>:newobj}
- * GC.latest_gc_info(hash) -> hash
- * GC.latest_gc_info(:major_by) -> :malloc
- *
- * Returns information about the most recent garbage collection.
- */
-
-static VALUE
-gc_latest_gc_info(int argc, VALUE *argv, VALUE self)
-{
- rb_objspace_t *objspace = &rb_objspace;
- VALUE arg = Qnil;
-
- if (rb_scan_args(argc, argv, "01", &arg) == 1) {
- if (!SYMBOL_P(arg) && !RB_TYPE_P(arg, T_HASH)) {
- rb_raise(rb_eTypeError, "non-hash or symbol given");
- }
- }
-
- if (arg == Qnil)
- arg = rb_hash_new();
-
- return gc_info_decode(objspace->profile.latest_gc_info, arg);
-}
-
-static VALUE
-gc_stat_internal(VALUE hash_or_sym, size_t *out)
-{
- static VALUE sym_count;
- static VALUE sym_heap_used, sym_heap_length, sym_heap_increment;
- static VALUE sym_heap_live_slot, sym_heap_free_slot, sym_heap_final_slot, sym_heap_swept_slot;
- static VALUE sym_heap_eden_page_length, sym_heap_tomb_page_length;
- static VALUE sym_total_allocated_object, sym_total_freed_object;
- static VALUE sym_malloc_increase, sym_malloc_limit;
-#if USE_RGENGC
- static VALUE sym_minor_gc_count, sym_major_gc_count;
- static VALUE sym_remembered_shady_object, sym_remembered_shady_object_limit;
- static VALUE sym_old_object, sym_old_object_limit;
-#if RGENGC_ESTIMATE_OLDMALLOC
- static VALUE sym_oldmalloc_increase, sym_oldmalloc_limit;
-#endif
-#if RGENGC_PROFILE
- static VALUE sym_generated_normal_object_count, sym_generated_shady_object_count;
- static VALUE sym_shade_operation_count, sym_promote_infant_count, sym_promote_young_count;
- static VALUE sym_remembered_normal_object_count, sym_remembered_shady_object_count;
-#endif /* RGENGC_PROFILE */
-#endif /* USE_RGENGC */
-
- rb_objspace_t *objspace = &rb_objspace;
- VALUE hash = Qnil, key = Qnil;
-
- if (RB_TYPE_P(hash_or_sym, T_HASH))
- hash = hash_or_sym;
- else if (SYMBOL_P(hash_or_sym) && out)
- key = hash_or_sym;
- else
- rb_raise(rb_eTypeError, "non-hash or symbol argument");
-
- if (sym_count == 0) {
-#define S(s) sym_##s = ID2SYM(rb_intern_const(#s))
- S(count);
- S(heap_used);
- S(heap_length);
- S(heap_increment);
- S(heap_live_slot);
- S(heap_free_slot);
- S(heap_final_slot);
- S(heap_swept_slot);
- S(heap_eden_page_length);
- S(heap_tomb_page_length);
- S(total_allocated_object);
- S(total_freed_object);
- S(malloc_increase);
- S(malloc_limit);
-#if USE_RGENGC
- S(minor_gc_count);
- S(major_gc_count);
- S(remembered_shady_object);
- S(remembered_shady_object_limit);
- S(old_object);
- S(old_object_limit);
-#if RGENGC_ESTIMATE_OLDMALLOC
- S(oldmalloc_increase);
- S(oldmalloc_limit);
-#endif
-#if RGENGC_PROFILE
- S(generated_normal_object_count);
- S(generated_shady_object_count);
- S(shade_operation_count);
- S(promote_infant_count);
- S(promote_young_count);
- S(remembered_normal_object_count);
- S(remembered_shady_object_count);
-#endif /* USE_RGENGC */
-#endif /* RGENGC_PROFILE */
-#undef S
- }
-
-#define SET(name, attr) \
- if (key == sym_##name) \
- return (*out = attr, Qnil); \
- else if (hash != Qnil) \
- rb_hash_aset(hash, sym_##name, SIZET2NUM(attr));
-
- SET(count, objspace->profile.count);
-
- /* implementation dependent counters */
- SET(heap_used, heap_pages_used);
- SET(heap_length, heap_pages_length);
- SET(heap_increment, heap_pages_increment);
- SET(heap_live_slot, objspace_live_slot(objspace));
- SET(heap_free_slot, objspace_free_slot(objspace));
- SET(heap_final_slot, heap_pages_final_slots);
- SET(heap_swept_slot, heap_pages_swept_slots);
- SET(heap_eden_page_length, heap_eden->page_length);
- SET(heap_tomb_page_length, heap_tomb->page_length);
- SET(total_allocated_object, objspace->profile.total_allocated_object_num);
- SET(total_freed_object, objspace->profile.total_freed_object_num);
- SET(malloc_increase, malloc_increase);
- SET(malloc_limit, malloc_limit);
-#if USE_RGENGC
- SET(minor_gc_count, objspace->profile.minor_gc_count);
- SET(major_gc_count, objspace->profile.major_gc_count);
- SET(remembered_shady_object, objspace->rgengc.remembered_shady_object_count);
- SET(remembered_shady_object_limit, objspace->rgengc.remembered_shady_object_limit);
- SET(old_object, objspace->rgengc.old_object_count);
- SET(old_object_limit, objspace->rgengc.old_object_limit);
-#if RGENGC_ESTIMATE_OLDMALLOC
- SET(oldmalloc_increase, objspace->rgengc.oldmalloc_increase);
- SET(oldmalloc_limit, objspace->rgengc.oldmalloc_increase_limit);
-#endif
-
-#if RGENGC_PROFILE
- SET(generated_normal_object_count, objspace->profile.generated_normal_object_count);
- SET(generated_shady_object_count, objspace->profile.generated_shady_object_count);
- SET(shade_operation_count, objspace->profile.shade_operation_count);
- SET(promote_infant_count, objspace->profile.promote_infant_count);
-#if RGENGC_THREEGEN
- SET(promote_young_count, objspace->profile.promote_young_count);
-#endif
- SET(remembered_normal_object_count, objspace->profile.remembered_normal_object_count);
- SET(remembered_shady_object_count, objspace->profile.remembered_shady_object_count);
-#endif /* RGENGC_PROFILE */
-#endif /* USE_RGENGC */
-#undef SET
-
- if (key != Qnil) /* matched key should return above */
- rb_raise(rb_eArgError, "unknown key: %s", RSTRING_PTR(rb_id2str(SYM2ID(key))));
-
-#if defined(RGENGC_PROFILE) && RGENGC_PROFILE >= 2
- if (hash != Qnil) {
- gc_count_add_each_types(hash, "generated_normal_object_count_types", objspace->profile.generated_normal_object_count_types);
- gc_count_add_each_types(hash, "generated_shady_object_count_types", objspace->profile.generated_shady_object_count_types);
- gc_count_add_each_types(hash, "shade_operation_count_types", objspace->profile.shade_operation_count_types);
- gc_count_add_each_types(hash, "promote_infant_types", objspace->profile.promote_infant_types);
-#if RGENGC_THREEGEN
- gc_count_add_each_types(hash, "promote_young_types", objspace->profile.promote_young_types);
-#endif
- gc_count_add_each_types(hash, "remembered_normal_object_count_types", objspace->profile.remembered_normal_object_count_types);
- gc_count_add_each_types(hash, "remembered_shady_object_count_types", objspace->profile.remembered_shady_object_count_types);
- }
-#endif
-
- return hash;
+ return UINT2NUM(rb_objspace.count);
}
/*
* call-seq:
* GC.stat -> Hash
- * GC.stat(hash) -> hash
- * GC.stat(:key) -> Numeric
*
* Returns a Hash containing information about the GC.
*
* The hash includes information about internal statistics about GC such as:
*
* {
- * :count=>2,
- * :heap_used=>9,
- * :heap_length=>11,
- * :heap_increment=>2,
- * :heap_live_slot=>6836,
- * :heap_free_slot=>519,
- * :heap_final_slot=>0,
- * :heap_swept_slot=>818,
- * :total_allocated_object=>7674,
- * :total_freed_object=>838,
- * :malloc_increase=>181034,
- * :malloc_limit=>16777216,
- * :minor_gc_count=>2,
- * :major_gc_count=>0,
- * :remembered_shady_object=>55,
- * :remembered_shady_object_limit=>0,
- * :old_object=>2422,
- * :old_object_limit=>0,
- * :oldmalloc_increase=>277386,
- * :oldmalloc_limit=>16777216
+ * :count=>0,
+ * :heap_used=>12,
+ * :heap_length=>12,
+ * :heap_increment=>0,
+ * :heap_live_num=>7539,
+ * :heap_free_num=>88,
+ * :heap_final_num=>0,
+ * :total_allocated_object=>7630,
+ * :total_freed_object=>88
* }
*
* The contents of the hash are implementation specific and may be changed in
@@ -5525,41 +3164,52 @@ gc_stat_internal(VALUE hash_or_sym, size_t *out)
static VALUE
gc_stat(int argc, VALUE *argv, VALUE self)
{
- VALUE arg = Qnil;
-
- if (rb_scan_args(argc, argv, "01", &arg) == 1) {
- if (SYMBOL_P(arg)) {
- size_t value = 0;
- gc_stat_internal(arg, &value);
- return SIZET2NUM(value);
- } else if (!RB_TYPE_P(arg, T_HASH)) {
- rb_raise(rb_eTypeError, "non-hash or symbol given");
- }
+ rb_objspace_t *objspace = &rb_objspace;
+ VALUE hash;
+ static VALUE sym_count;
+ static VALUE sym_heap_used, sym_heap_length, sym_heap_increment;
+ static VALUE sym_heap_live_num, sym_heap_free_num, sym_heap_final_num;
+ static VALUE sym_total_allocated_object, sym_total_freed_object;
+ if (sym_count == 0) {
+ sym_count = ID2SYM(rb_intern_const("count"));
+ sym_heap_used = ID2SYM(rb_intern_const("heap_used"));
+ sym_heap_length = ID2SYM(rb_intern_const("heap_length"));
+ sym_heap_increment = ID2SYM(rb_intern_const("heap_increment"));
+ sym_heap_live_num = ID2SYM(rb_intern_const("heap_live_num"));
+ sym_heap_free_num = ID2SYM(rb_intern_const("heap_free_num"));
+ sym_heap_final_num = ID2SYM(rb_intern_const("heap_final_num"));
+ sym_total_allocated_object = ID2SYM(rb_intern_const("total_allocated_object"));
+ sym_total_freed_object = ID2SYM(rb_intern_const("total_freed_object"));
}
- if (arg == Qnil) {
- arg = rb_hash_new();
+ if (rb_scan_args(argc, argv, "01", &hash) == 1) {
+ if (!RB_TYPE_P(hash, T_HASH))
+ rb_raise(rb_eTypeError, "non-hash given");
}
- gc_stat_internal(arg, 0);
- return arg;
-}
-size_t
-rb_gc_stat(VALUE key)
-{
- if (SYMBOL_P(key)) {
- size_t value = 0;
- gc_stat_internal(key, &value);
- return value;
- } else {
- gc_stat_internal(key, 0);
- return 0;
+ if (hash == Qnil) {
+ hash = rb_hash_new();
}
+
+ rest_sweep(objspace);
+
+ rb_hash_aset(hash, sym_count, SIZET2NUM(objspace->count));
+ /* implementation dependent counters */
+ rb_hash_aset(hash, sym_heap_used, SIZET2NUM(objspace->heap.used));
+ rb_hash_aset(hash, sym_heap_length, SIZET2NUM(objspace->heap.length));
+ rb_hash_aset(hash, sym_heap_increment, SIZET2NUM(objspace->heap.increment));
+ rb_hash_aset(hash, sym_heap_live_num, SIZET2NUM(objspace_live_num(objspace)));
+ rb_hash_aset(hash, sym_heap_free_num, SIZET2NUM(objspace->heap.free_num));
+ rb_hash_aset(hash, sym_heap_final_num, SIZET2NUM(objspace->heap.final_num));
+ rb_hash_aset(hash, sym_total_allocated_object, SIZET2NUM(objspace->total_allocated_object_num));
+ rb_hash_aset(hash, sym_total_freed_object, SIZET2NUM(objspace->total_freed_object_num));
+
+ return hash;
}
/*
* call-seq:
- * GC.stress -> fixnum, true or false
+ * GC.stress -> true or false
*
* Returns current status of GC stress mode.
*/
@@ -5568,7 +3218,7 @@ static VALUE
gc_stress_get(VALUE self)
{
rb_objspace_t *objspace = &rb_objspace;
- return ruby_gc_stress;
+ return ruby_gc_stress ? Qtrue : Qfalse;
}
/*
@@ -5588,7 +3238,7 @@ gc_stress_set(VALUE self, VALUE flag)
{
rb_objspace_t *objspace = &rb_objspace;
rb_secure(2);
- ruby_gc_stress = FIXNUM_P(flag) ? flag : (RTEST(flag) ? Qtrue : Qfalse);
+ ruby_gc_stress = RTEST(flag);
return flag;
}
@@ -5633,129 +3283,49 @@ rb_gc_disable(void)
rb_objspace_t *objspace = &rb_objspace;
int old = dont_gc;
- gc_rest_sweep(objspace);
-
dont_gc = TRUE;
return old ? Qtrue : Qfalse;
}
-static int
-get_envparam_int(const char *name, unsigned int *default_value, int lower_bound)
+void
+rb_gc_set_params(void)
{
- char *ptr = getenv(name);
- int val;
-
- if (ptr != NULL) {
- val = atoi(ptr);
- if (val > lower_bound) {
- if (RTEST(ruby_verbose)) fprintf(stderr, "%s=%d (%d)\n", name, val, *default_value);
- *default_value = val;
- return 1;
- }
- else {
- if (RTEST(ruby_verbose)) fprintf(stderr, "%s=%d (%d), but ignored because lower than %d\n", name, val, *default_value, lower_bound);
- }
- }
- return 0;
-}
+ char *malloc_limit_ptr, *heap_min_slots_ptr, *free_min_ptr;
-static int
-get_envparam_double(const char *name, double *default_value, double lower_bound)
-{
- char *ptr = getenv(name);
- double val;
+ if (rb_safe_level() > 0) return;
- if (ptr != NULL) {
- val = strtod(ptr, NULL);
- if (val > lower_bound) {
- if (RTEST(ruby_verbose)) fprintf(stderr, "%s=%f (%f)\n", name, val, *default_value);
- *default_value = val;
- return 1;
- }
- else {
- if (RTEST(ruby_verbose)) fprintf(stderr, "%s=%f (%f), but ignored because lower than %f\n", name, val, *default_value, lower_bound);
+ malloc_limit_ptr = getenv("RUBY_GC_MALLOC_LIMIT");
+ if (malloc_limit_ptr != NULL) {
+ int malloc_limit_i = atoi(malloc_limit_ptr);
+ if (RTEST(ruby_verbose))
+ fprintf(stderr, "malloc_limit=%d (%d)\n",
+ malloc_limit_i, initial_malloc_limit);
+ if (malloc_limit_i > 0) {
+ initial_malloc_limit = malloc_limit_i;
}
}
- return 0;
-}
-
-static void
-gc_set_initial_pages(void)
-{
- size_t min_pages;
- rb_objspace_t *objspace = &rb_objspace;
-
- min_pages = gc_params.heap_init_slots / HEAP_OBJ_LIMIT;
- if (min_pages > heap_eden->page_length) {
- heap_add_pages(objspace, heap_eden, min_pages - heap_eden->page_length);
- }
-}
-
-/*
- * GC tuning environment variables
- *
- * * RUBY_GC_HEAP_INIT_SLOTS
- * - Initial allocation slots.
- * * RUBY_GC_HEAP_FREE_SLOTS
- * - Prepare at least this ammount of slots after GC.
- * - Allocate slots if there are not enough slots.
- * * RUBY_GC_HEAP_GROWTH_FACTOR (new from 2.1)
- * - Allocate slots by this factor.
- * - (next slots number) = (current slots number) * (this factor)
- * * RUBY_GC_HEAP_GROWTH_MAX_SLOTS (new from 2.1)
- * - Allocation rate is limited to this factor.
- *
- * * obsolete
- * * RUBY_FREE_MIN -> RUBY_GC_HEAP_FREE_SLOTS (from 2.1)
- * * RUBY_HEAP_MIN_SLOTS -> RUBY_GC_HEAP_INIT_SLOTS (from 2.1)
- *
- * * RUBY_GC_MALLOC_LIMIT
- * * RUBY_GC_MALLOC_LIMIT_MAX (new from 2.1)
- * * RUBY_GC_MALLOC_LIMIT_GROWTH_FACTOR (new from 2.1)
- *
- * * RUBY_GC_OLDMALLOC_LIMIT (new from 2.1)
- * * RUBY_GC_OLDMALLOC_LIMIT_MAX (new from 2.1)
- * * RUBY_GC_OLDMALLOC_LIMIT_GROWTH_FACTOR (new from 2.1)
- */
-
-void
-ruby_gc_set_params(int safe_level)
-{
- if (safe_level > 0) return;
- /* RUBY_GC_HEAP_FREE_SLOTS */
- if (get_envparam_int ("RUBY_FREE_MIN", &gc_params.heap_free_slots, 0)) {
- rb_warn("RUBY_FREE_MIN is obsolete. Use RUBY_GC_HEAP_FREE_SLOTS instead.");
+ heap_min_slots_ptr = getenv("RUBY_HEAP_MIN_SLOTS");
+ if (heap_min_slots_ptr != NULL) {
+ int heap_min_slots_i = atoi(heap_min_slots_ptr);
+ if (RTEST(ruby_verbose))
+ fprintf(stderr, "heap_min_slots=%d (%d)\n",
+ heap_min_slots_i, initial_heap_min_slots);
+ if (heap_min_slots_i > 0) {
+ initial_heap_min_slots = heap_min_slots_i;
+ initial_expand_heap(&rb_objspace);
+ }
}
- get_envparam_int ("RUBY_GC_HEAP_FREE_SLOTS", &gc_params.heap_free_slots, 0);
- /* RUBY_GC_HEAP_INIT_SLOTS */
- if (get_envparam_int("RUBY_HEAP_MIN_SLOTS", &gc_params.heap_init_slots, 0)) {
- rb_warn("RUBY_HEAP_MIN_SLOTS is obsolete. Use RUBY_GC_HEAP_INIT_SLOTS instead.");
- gc_set_initial_pages();
- }
- if (get_envparam_int("RUBY_GC_HEAP_INIT_SLOTS", &gc_params.heap_init_slots, 0)) {
- gc_set_initial_pages();
+ free_min_ptr = getenv("RUBY_FREE_MIN");
+ if (free_min_ptr != NULL) {
+ int free_min_i = atoi(free_min_ptr);
+ if (RTEST(ruby_verbose))
+ fprintf(stderr, "free_min=%d (%d)\n", free_min_i, initial_free_min);
+ if (free_min_i > 0) {
+ initial_free_min = free_min_i;
+ }
}
-
- get_envparam_double("RUBY_GC_HEAP_GROWTH_FACTOR", &gc_params.growth_factor, 1.0);
- get_envparam_int ("RUBY_GC_HEAP_GROWTH_MAX_SLOTS", &gc_params.growth_max_slots, 0);
-
- get_envparam_int("RUBY_GC_MALLOC_LIMIT", &gc_params.malloc_limit_min, 0);
- get_envparam_int("RUBY_GC_MALLOC_LIMIT_MAX", &gc_params.malloc_limit_max, 0);
- get_envparam_double("RUBY_GC_MALLOC_LIMIT_GROWTH_FACTOR", &gc_params.malloc_limit_growth_factor, 1.0);
-
-#ifdef RGENGC_ESTIMATE_OLDMALLOC
- get_envparam_int("RUBY_GC_OLDMALLOC_LIMIT", &gc_params.oldmalloc_limit_min, 0);
- get_envparam_int("RUBY_GC_OLDMALLOC_LIMIT_MAX", &gc_params.oldmalloc_limit_max, 0);
- get_envparam_double("RUBY_GC_OLDMALLOC_LIMIT_GROWTH_FACTOR", &gc_params.oldmalloc_limit_growth_factor, 1.0);
-#endif
-}
-
-void
-rb_gc_set_params(void)
-{
- ruby_gc_set_params(rb_safe_level());
}
void
@@ -5763,7 +3333,7 @@ rb_objspace_reachable_objects_from(VALUE obj, void (func)(VALUE, void *), void *
{
rb_objspace_t *objspace = &rb_objspace;
- if (is_markable_object(objspace, obj)) {
+ if (markable_object_p(objspace, obj)) {
struct mark_func_data_struct mfd;
mfd.mark_func = func;
mfd.data = data;
@@ -5773,44 +3343,11 @@ rb_objspace_reachable_objects_from(VALUE obj, void (func)(VALUE, void *), void *
}
}
-struct root_objects_data {
- const char *category;
- void (*func)(const char *category, VALUE, void *);
- void *data;
-};
-
-static void
-root_objects_from(VALUE obj, void *ptr)
-{
- const struct root_objects_data *data = (struct root_objects_data *)ptr;
- (*data->func)(data->category, obj, data->data);
-}
-
-void
-rb_objspace_reachable_objects_from_root(void (func)(const char *category, VALUE, void *), void *passing_data)
-{
- rb_objspace_t *objspace = &rb_objspace;
- struct root_objects_data data;
- struct mark_func_data_struct mfd;
-
- data.func = func;
- data.data = passing_data;
-
- mfd.mark_func = root_objects_from;
- mfd.data = &data;
-
- objspace->mark_func_data = &mfd;
- {
- gc_mark_roots(objspace, TRUE, &data.category);
- }
- objspace->mark_func_data = 0;
-}
-
/*
------------------------ Extended allocator ------------------------
*/
-static void objspace_xfree(rb_objspace_t *objspace, void *ptr, size_t size);
+static void vm_xfree(rb_objspace_t *objspace, void *ptr);
static void *
negative_size_allocation_error_with_gvl(void *ptr)
@@ -5866,7 +3403,7 @@ rb_memerror(void)
{
rb_thread_t *th = GET_THREAD();
if (!nomem_error ||
- rb_thread_raised_p(th, RAISED_NOMEMORY)) {
+ (rb_thread_raised_p(th, RAISED_NOMEMORY) && rb_safe_level() < 4)) {
fprintf(stderr, "[FATAL] failed to allocate memory\n");
exit(EXIT_FAILURE);
}
@@ -5887,7 +3424,6 @@ aligned_malloc(size_t alignment, size_t size)
#if defined __MINGW32__
res = __mingw_aligned_malloc(size, alignment);
#elif defined _WIN32 && !defined __CYGWIN__
- void *_aligned_malloc(size_t, size_t);
res = _aligned_malloc(size, alignment);
#elif defined(HAVE_POSIX_MEMALIGN)
if (posix_memalign(&res, alignment, size) == 0) {
@@ -5907,9 +3443,9 @@ aligned_malloc(size_t alignment, size_t size)
res = (void*)aligned;
#endif
-#if defined(_DEBUG) || GC_DEBUG
+#if defined(_DEBUG) || defined(GC_DEBUG)
/* alignment must be a power of 2 */
- assert(((alignment - 1) & alignment) == 0);
+ assert((alignment - 1) & alignment == 0);
assert(alignment % sizeof(void*) == 0);
#endif
return res;
@@ -5930,112 +3466,7 @@ aligned_free(void *ptr)
}
static inline size_t
-objspace_malloc_size(rb_objspace_t *objspace, void *ptr, size_t hint)
-{
-#ifdef HAVE_MALLOC_USABLE_SIZE
- return malloc_usable_size(ptr);
-#else
- return hint;
-#endif
-}
-
-enum memop_type {
- MEMOP_TYPE_MALLOC = 1,
- MEMOP_TYPE_FREE = 2,
- MEMOP_TYPE_REALLOC = 3
-};
-
-static inline void
-atomic_sub_nounderflow(size_t *var, size_t sub)
-{
- if (sub == 0) return;
-
- while (1) {
- size_t val = *var;
- if (val < sub) sub = val;
- if (ATOMIC_SIZE_CAS(*var, val, val-sub) == val) break;
- }
-}
-
-static void
-objspace_malloc_increase(rb_objspace_t *objspace, void *mem, size_t new_size, size_t old_size, enum memop_type type)
-{
- if (new_size > old_size) {
- ATOMIC_SIZE_ADD(malloc_increase, new_size - old_size);
-#if RGENGC_ESTIMATE_OLDMALLOC
- ATOMIC_SIZE_ADD(objspace->rgengc.oldmalloc_increase, new_size - old_size);
-#endif
- }
- else {
- atomic_sub_nounderflow(&malloc_increase, old_size - new_size);
-#if RGENGC_ESTIMATE_OLDMALLOC
- atomic_sub_nounderflow(&objspace->rgengc.oldmalloc_increase, old_size - new_size);
-#endif
- }
-
- if (type == MEMOP_TYPE_MALLOC) {
- if (ruby_gc_stress && !ruby_disable_gc_stress) {
- garbage_collect_with_gvl(objspace, FALSE, TRUE, GPR_FLAG_MALLOC);
- }
- else {
- retry:
- if (malloc_increase > malloc_limit) {
- if (ruby_thread_has_gvl_p() && is_lazy_sweeping(heap_eden)) {
- gc_rest_sweep(objspace); /* rest_sweep can reduce malloc_increase */
- goto retry;
- }
- garbage_collect_with_gvl(objspace, FALSE, TRUE, GPR_FLAG_MALLOC);
- }
- }
- }
-
-#if MALLOC_ALLOCATED_SIZE
- if (new_size >= old_size) {
- ATOMIC_SIZE_ADD(objspace->malloc_params.allocated_size, new_size - old_size);
- }
- else {
- size_t dec_size = old_size - new_size;
- size_t allocated_size = objspace->malloc_params.allocated_size;
-
-#if MALLOC_ALLOCATED_SIZE_CHECK
- if (allocated_size < dec_size) {
- rb_bug("objspace_malloc_increase: underflow malloc_params.allocated_size.");
- }
-#endif
- atomic_sub_nounderflow(objspace->malloc_params.allocated_size, dec_size);
- }
-
- if (0) fprintf(stderr, "incraese - ptr: %p, type: %s, new_size: %d, old_size: %d\n",
- mem,
- type == MEMOP_TYPE_MALLOC ? "malloc" :
- type == MEMOP_TYPE_FREE ? "free " :
- type == MEMOP_TYPE_REALLOC ? "realloc": "error",
- (int)new_size, (int)old_size);
-
- switch (type) {
- case MEMOP_TYPE_MALLOC:
- ATOMIC_SIZE_INC(objspace->malloc_params.allocations);
- break;
- case MEMOP_TYPE_FREE:
- {
- size_t allocations = objspace->malloc_params.allocations;
- if (allocations > 0) {
- atomic_sub_nounderflow(objspace->malloc_params.allocations, 1);
- }
-#if MALLOC_ALLOCATED_SIZE_CHECK
- else {
- assert(objspace->malloc_params.allocations > 0);
- }
-#endif
- }
- break;
- case MEMOP_TYPE_REALLOC: /* ignore */ break;
- }
-#endif
-}
-
-static inline size_t
-objspace_malloc_prepare(rb_objspace_t *objspace, size_t size)
+vm_malloc_prepare(rb_objspace_t *objspace, size_t size)
{
if ((ssize_t)size < 0) {
negative_size_allocation_error("negative allocation size (or too big)");
@@ -6046,13 +3477,22 @@ objspace_malloc_prepare(rb_objspace_t *objspace, size_t size)
size += sizeof(size_t);
#endif
+ if ((ruby_gc_stress && !ruby_disable_gc_stress) ||
+ (malloc_increase+size) > malloc_limit) {
+ garbage_collect_with_gvl(objspace);
+ }
+
return size;
}
static inline void *
-objspace_malloc_fixup(rb_objspace_t *objspace, void *mem, size_t size)
+vm_malloc_fixup(rb_objspace_t *objspace, void *mem, size_t size)
{
+ ATOMIC_SIZE_ADD(malloc_increase, size);
+
#if CALC_EXACT_MALLOC_SIZE
+ ATOMIC_SIZE_ADD(objspace->malloc_params.allocated_size, size);
+ ATOMIC_SIZE_INC(objspace->malloc_params.allocations);
((size_t *)mem)[0] = size;
mem = (size_t *)mem + 1;
#endif
@@ -6062,83 +3502,94 @@ objspace_malloc_fixup(rb_objspace_t *objspace, void *mem, size_t size)
#define TRY_WITH_GC(alloc) do { \
if (!(alloc) && \
- (!garbage_collect_with_gvl(objspace, 1, 1, GPR_FLAG_MALLOC) || /* full mark && immediate sweep */ \
+ (!garbage_collect_with_gvl(objspace) || \
!(alloc))) { \
ruby_memerror(); \
} \
} while (0)
static void *
-objspace_xmalloc(rb_objspace_t *objspace, size_t size)
+vm_xmalloc(rb_objspace_t *objspace, size_t size)
{
void *mem;
- size = objspace_malloc_prepare(objspace, size);
+ size = vm_malloc_prepare(objspace, size);
TRY_WITH_GC(mem = malloc(size));
- size = objspace_malloc_size(objspace, mem, size);
- objspace_malloc_increase(objspace, mem, size, 0, MEMOP_TYPE_MALLOC);
- return objspace_malloc_fixup(objspace, mem, size);
+ return vm_malloc_fixup(objspace, mem, size);
}
static void *
-objspace_xrealloc(rb_objspace_t *objspace, void *ptr, size_t new_size, size_t old_size)
+vm_xrealloc(rb_objspace_t *objspace, void *ptr, size_t size)
{
void *mem;
+#if CALC_EXACT_MALLOC_SIZE
+ size_t oldsize;
+#endif
- if ((ssize_t)new_size < 0) {
+ if ((ssize_t)size < 0) {
negative_size_allocation_error("negative re-allocation size");
}
- if (!ptr) return objspace_xmalloc(objspace, new_size);
+ if (!ptr) return vm_xmalloc(objspace, size);
/*
* The behavior of realloc(ptr, 0) is implementation defined.
* Therefore we don't use realloc(ptr, 0) for portability reason.
* see http://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_400.htm
*/
- if (new_size == 0) {
- objspace_xfree(objspace, ptr, old_size);
+ if (size == 0) {
+ vm_xfree(objspace, ptr);
return 0;
}
+ if (ruby_gc_stress && !ruby_disable_gc_stress)
+ garbage_collect_with_gvl(objspace);
#if CALC_EXACT_MALLOC_SIZE
- new_size += sizeof(size_t);
+ size += sizeof(size_t);
ptr = (size_t *)ptr - 1;
oldsize = ((size_t *)ptr)[0];
#endif
- old_size = objspace_malloc_size(objspace, ptr, old_size);
- TRY_WITH_GC(mem = realloc(ptr, new_size));
- new_size = objspace_malloc_size(objspace, mem, new_size);
+ mem = realloc(ptr, size);
+ if (!mem) {
+ if (garbage_collect_with_gvl(objspace)) {
+ mem = realloc(ptr, size);
+ }
+ if (!mem) {
+ ruby_memerror();
+ }
+ }
+ ATOMIC_SIZE_ADD(malloc_increase, size);
#if CALC_EXACT_MALLOC_SIZE
- ((size_t *)mem)[0] = new_size;
+ ATOMIC_SIZE_ADD(objspace->malloc_params.allocated_size, size - oldsize);
+ ((size_t *)mem)[0] = size;
mem = (size_t *)mem + 1;
#endif
- objspace_malloc_increase(objspace, mem, new_size, old_size, MEMOP_TYPE_REALLOC);
-
return mem;
}
static void
-objspace_xfree(rb_objspace_t *objspace, void *ptr, size_t old_size)
+vm_xfree(rb_objspace_t *objspace, void *ptr)
{
#if CALC_EXACT_MALLOC_SIZE
+ size_t size;
ptr = ((size_t *)ptr) - 1;
- oldsize = ((size_t*)ptr)[0];
+ size = ((size_t*)ptr)[0];
+ if (size) {
+ ATOMIC_SIZE_SUB(objspace->malloc_params.allocated_size, size);
+ ATOMIC_SIZE_DEC(objspace->malloc_params.allocations);
+ }
#endif
- old_size = objspace_malloc_size(objspace, ptr, old_size);
free(ptr);
-
- objspace_malloc_increase(objspace, ptr, 0, old_size, MEMOP_TYPE_FREE);
}
void *
ruby_xmalloc(size_t size)
{
- return objspace_xmalloc(&rb_objspace, size);
+ return vm_xmalloc(&rb_objspace, size);
}
static inline size_t
@@ -6154,79 +3605,52 @@ xmalloc2_size(size_t n, size_t size)
void *
ruby_xmalloc2(size_t n, size_t size)
{
- return objspace_xmalloc(&rb_objspace, xmalloc2_size(n, size));
+ return vm_xmalloc(&rb_objspace, xmalloc2_size(n, size));
}
static void *
-objspace_xcalloc(rb_objspace_t *objspace, size_t count, size_t elsize)
+vm_xcalloc(rb_objspace_t *objspace, size_t count, size_t elsize)
{
void *mem;
size_t size;
size = xmalloc2_size(count, elsize);
- size = objspace_malloc_prepare(objspace, size);
+ size = vm_malloc_prepare(objspace, size);
TRY_WITH_GC(mem = calloc(1, size));
- return objspace_malloc_fixup(objspace, mem, size);
+ return vm_malloc_fixup(objspace, mem, size);
}
void *
ruby_xcalloc(size_t n, size_t size)
{
- return objspace_xcalloc(&rb_objspace, n, size);
+ return vm_xcalloc(&rb_objspace, n, size);
}
-#ifdef ruby_sized_xrealloc
-#undef ruby_sized_xrealloc
-#endif
void *
-ruby_sized_xrealloc(void *ptr, size_t new_size, size_t old_size)
+ruby_xrealloc(void *ptr, size_t size)
{
- return objspace_xrealloc(&rb_objspace, ptr, new_size, old_size);
+ return vm_xrealloc(&rb_objspace, ptr, size);
}
void *
-ruby_xrealloc(void *ptr, size_t new_size)
-{
- return ruby_sized_xrealloc(ptr, new_size, 0);
-}
-
-#ifdef ruby_sized_xrealloc2
-#undef ruby_sized_xrealloc2
-#endif
-void *
-ruby_sized_xrealloc2(void *ptr, size_t n, size_t size, size_t old_n)
+ruby_xrealloc2(void *ptr, size_t n, size_t size)
{
size_t len = size * n;
if (n != 0 && size != len / n) {
rb_raise(rb_eArgError, "realloc: possible integer overflow");
}
- return objspace_xrealloc(&rb_objspace, ptr, len, old_n * size);
-}
-
-void *
-ruby_xrealloc2(void *ptr, size_t n, size_t size)
-{
- return ruby_sized_xrealloc2(ptr, n, size, 0);
-}
-
-#ifdef ruby_sized_xfree
-#undef ruby_sized_xfree
-#endif
-void
-ruby_sized_xfree(void *x, size_t size)
-{
- if (x) {
- objspace_xfree(&rb_objspace, x, size);
- }
+ return ruby_xrealloc(ptr, len);
}
void
ruby_xfree(void *x)
{
- ruby_sized_xfree(x, 0);
+ if (x)
+ vm_xfree(&rb_objspace, x);
}
+
/* Mimic ruby_xmalloc, but need not rb_objspace.
* should return pointer suitable for ruby_xfree
*/
@@ -6246,17 +3670,7 @@ ruby_mimmalloc(size_t size)
return mem;
}
-void
-ruby_mimfree(void *ptr)
-{
- size_t *mem = (size_t *)ptr;
#if CALC_EXACT_MALLOC_SIZE
- mem = mem - 1;
-#endif
- free(mem);
-}
-
-#if MALLOC_ALLOCATED_SIZE
/*
* call-seq:
* GC.malloc_allocated_size -> Integer
@@ -6298,34 +3712,25 @@ struct weakmap {
VALUE final;
};
-#define WMAP_DELETE_DEAD_OBJECT_IN_MARK 0
-
-#if WMAP_DELETE_DEAD_OBJECT_IN_MARK
static int
wmap_mark_map(st_data_t key, st_data_t val, st_data_t arg)
{
- rb_objspace_t *objspace = (rb_objspace_t *)arg;
- VALUE obj = (VALUE)val;
- if (!is_live_object(objspace, obj)) return ST_DELETE;
+ gc_mark_ptr((rb_objspace_t *)arg, (VALUE)val);
return ST_CONTINUE;
}
-#endif
static void
wmap_mark(void *ptr)
{
struct weakmap *w = ptr;
-#if WMAP_DELETE_DEAD_OBJECT_IN_MARK
- if (w->obj2wmap) st_foreach(w->obj2wmap, wmap_mark_map, (st_data_t)&rb_objspace);
-#endif
+ st_foreach(w->obj2wmap, wmap_mark_map, (st_data_t)&rb_objspace);
rb_gc_mark(w->final);
}
static int
wmap_free_map(st_data_t key, st_data_t val, st_data_t arg)
{
- VALUE *ptr = (VALUE *)val;
- ruby_sized_xfree(ptr, (ptr[0] + 1) * sizeof(VALUE));
+ rb_ary_resize((VALUE)val, 0);
return ST_CONTINUE;
}
@@ -6338,11 +3743,11 @@ wmap_free(void *ptr)
st_free_table(w->wmap2obj);
}
+size_t rb_ary_memsize(VALUE ary);
static int
wmap_memsize_map(st_data_t key, st_data_t val, st_data_t arg)
{
- VALUE *ptr = (VALUE *)val;
- *(size_t *)arg += (ptr[0] + 1) * sizeof(VALUE);
+ *(size_t *)arg += rb_ary_memsize((VALUE)val);
return ST_CONTINUE;
}
@@ -6365,8 +3770,7 @@ static const rb_data_type_t weakmap_type = {
wmap_mark,
wmap_free,
wmap_memsize,
- },
- NULL, NULL, RUBY_TYPED_FREE_IMMEDIATELY
+ }
};
static VALUE
@@ -6383,23 +3787,11 @@ wmap_allocate(VALUE klass)
static int
wmap_final_func(st_data_t *key, st_data_t *value, st_data_t arg, int existing)
{
- VALUE wmap, *ptr, size, i, j;
+ VALUE wmap, ary;
if (!existing) return ST_STOP;
- wmap = (VALUE)arg, ptr = (VALUE *)*value;
- for (i = j = 1, size = ptr[0]; i <= size; ++i) {
- if (ptr[i] != wmap) {
- ptr[j++] = ptr[i];
- }
- }
- if (j == 1) {
- ruby_sized_xfree(ptr, i * sizeof(VALUE));
- return ST_DELETE;
- }
- if (j < i) {
- ptr = ruby_sized_xrealloc2(ptr, j, sizeof(VALUE), i);
- ptr[0] = j;
- *value = (st_data_t)ptr;
- }
+ wmap = (VALUE)arg, ary = (VALUE)*value;
+ rb_ary_delete_same(ary, wmap);
+ if (!RARRAY_LEN(ary)) return ST_DELETE;
return ST_CONTINUE;
}
@@ -6407,7 +3799,8 @@ static VALUE
wmap_finalize(VALUE self, VALUE objid)
{
st_data_t orig, wmap, data;
- VALUE obj, *rids, i, size;
+ VALUE obj, rids;
+ long i;
struct weakmap *w;
TypedData_Get_Struct(self, struct weakmap, &weakmap_type, w);
@@ -6417,13 +3810,11 @@ wmap_finalize(VALUE self, VALUE objid)
/* obj is original referenced object and/or weak reference. */
orig = (st_data_t)obj;
if (st_delete(w->obj2wmap, &orig, &data)) {
- rids = (VALUE *)data;
- size = *rids++;
- for (i = 0; i < size; ++i) {
- wmap = (st_data_t)rids[i];
+ rids = (VALUE)data;
+ for (i = 0; i < RARRAY_LEN(rids); ++i) {
+ wmap = (st_data_t)RARRAY_PTR(rids)[i];
st_delete(w->wmap2obj, &wmap, NULL);
}
- ruby_sized_xfree((VALUE *)data, (size + 1) * sizeof(VALUE));
}
wmap = (st_data_t)obj;
@@ -6434,208 +3825,25 @@ wmap_finalize(VALUE self, VALUE objid)
return self;
}
-struct wmap_iter_arg {
- rb_objspace_t *objspace;
- VALUE value;
-};
-
-static int
-wmap_inspect_i(st_data_t key, st_data_t val, st_data_t arg)
-{
- VALUE str = (VALUE)arg;
- VALUE k = (VALUE)key, v = (VALUE)val;
-
- if (RSTRING_PTR(str)[0] == '#') {
- rb_str_cat2(str, ", ");
- }
- else {
- rb_str_cat2(str, ": ");
- RSTRING_PTR(str)[0] = '#';
- }
- k = SPECIAL_CONST_P(k) ? rb_inspect(k) : rb_any_to_s(k);
- rb_str_append(str, k);
- rb_str_cat2(str, " => ");
- v = SPECIAL_CONST_P(v) ? rb_inspect(v) : rb_any_to_s(v);
- rb_str_append(str, v);
- OBJ_INFECT(str, k);
- OBJ_INFECT(str, v);
-
- return ST_CONTINUE;
-}
-
-static VALUE
-wmap_inspect(VALUE self)
-{
- VALUE str;
- VALUE c = rb_class_name(CLASS_OF(self));
- struct weakmap *w;
-
- TypedData_Get_Struct(self, struct weakmap, &weakmap_type, w);
- str = rb_sprintf("-<%"PRIsVALUE":%p", c, (void *)self);
- if (w->wmap2obj) {
- st_foreach(w->wmap2obj, wmap_inspect_i, str);
- }
- RSTRING_PTR(str)[0] = '#';
- rb_str_cat2(str, ">");
- return str;
-}
-
-static int
-wmap_each_i(st_data_t key, st_data_t val, st_data_t arg)
-{
- rb_objspace_t *objspace = (rb_objspace_t *)arg;
- VALUE obj = (VALUE)val;
- if (is_id_value(objspace, obj) && is_live_object(objspace, obj)) {
- rb_yield_values(2, (VALUE)key, obj);
- }
- return ST_CONTINUE;
-}
-
-/* Iterates over keys and objects in a weakly referenced object */
-static VALUE
-wmap_each(VALUE self)
-{
- struct weakmap *w;
- rb_objspace_t *objspace = &rb_objspace;
-
- TypedData_Get_Struct(self, struct weakmap, &weakmap_type, w);
- st_foreach(w->wmap2obj, wmap_each_i, (st_data_t)objspace);
- return self;
-}
-
-static int
-wmap_each_key_i(st_data_t key, st_data_t val, st_data_t arg)
-{
- rb_objspace_t *objspace = (rb_objspace_t *)arg;
- VALUE obj = (VALUE)val;
- if (is_id_value(objspace, obj) && is_live_object(objspace, obj)) {
- rb_yield((VALUE)key);
- }
- return ST_CONTINUE;
-}
-
-/* Iterates over keys and objects in a weakly referenced object */
-static VALUE
-wmap_each_key(VALUE self)
-{
- struct weakmap *w;
- rb_objspace_t *objspace = &rb_objspace;
-
- TypedData_Get_Struct(self, struct weakmap, &weakmap_type, w);
- st_foreach(w->wmap2obj, wmap_each_key_i, (st_data_t)objspace);
- return self;
-}
-
-static int
-wmap_each_value_i(st_data_t key, st_data_t val, st_data_t arg)
-{
- rb_objspace_t *objspace = (rb_objspace_t *)arg;
- VALUE obj = (VALUE)val;
- if (is_id_value(objspace, obj) && is_live_object(objspace, obj)) {
- rb_yield(obj);
- }
- return ST_CONTINUE;
-}
-
-/* Iterates over keys and objects in a weakly referenced object */
-static VALUE
-wmap_each_value(VALUE self)
-{
- struct weakmap *w;
- rb_objspace_t *objspace = &rb_objspace;
-
- TypedData_Get_Struct(self, struct weakmap, &weakmap_type, w);
- st_foreach(w->wmap2obj, wmap_each_value_i, (st_data_t)objspace);
- return self;
-}
-
-static int
-wmap_keys_i(st_data_t key, st_data_t val, st_data_t arg)
-{
- struct wmap_iter_arg *argp = (struct wmap_iter_arg *)arg;
- rb_objspace_t *objspace = argp->objspace;
- VALUE ary = argp->value;
- VALUE obj = (VALUE)val;
- if (is_id_value(objspace, obj) && is_live_object(objspace, obj)) {
- rb_ary_push(ary, (VALUE)key);
- }
- return ST_CONTINUE;
-}
-
-/* Iterates over keys and objects in a weakly referenced object */
-static VALUE
-wmap_keys(VALUE self)
-{
- struct weakmap *w;
- struct wmap_iter_arg args;
-
- TypedData_Get_Struct(self, struct weakmap, &weakmap_type, w);
- args.objspace = &rb_objspace;
- args.value = rb_ary_new();
- st_foreach(w->wmap2obj, wmap_keys_i, (st_data_t)&args);
- return args.value;
-}
-
-static int
-wmap_values_i(st_data_t key, st_data_t val, st_data_t arg)
-{
- struct wmap_iter_arg *argp = (struct wmap_iter_arg *)arg;
- rb_objspace_t *objspace = argp->objspace;
- VALUE ary = argp->value;
- VALUE obj = (VALUE)val;
- if (is_id_value(objspace, obj) && is_live_object(objspace, obj)) {
- rb_ary_push(ary, obj);
- }
- return ST_CONTINUE;
-}
-
-/* Iterates over values and objects in a weakly referenced object */
-static VALUE
-wmap_values(VALUE self)
-{
- struct weakmap *w;
- struct wmap_iter_arg args;
-
- TypedData_Get_Struct(self, struct weakmap, &weakmap_type, w);
- args.objspace = &rb_objspace;
- args.value = rb_ary_new();
- st_foreach(w->wmap2obj, wmap_values_i, (st_data_t)&args);
- return args.value;
-}
-
-static int
-wmap_aset_update(st_data_t *key, st_data_t *val, st_data_t arg, int existing)
-{
- VALUE size, *ptr, *optr;
- if (existing) {
- size = (ptr = optr = (VALUE *)*val)[0];
- ++size;
- ptr = ruby_sized_xrealloc2(ptr, size + 1, sizeof(VALUE), size);
- }
- else {
- optr = 0;
- size = 1;
- ptr = ruby_xmalloc2(2, sizeof(VALUE));
- }
- ptr[0] = size;
- ptr[size] = (VALUE)arg;
- if (ptr == optr) return ST_STOP;
- *val = (st_data_t)ptr;
- return ST_CONTINUE;
-}
-
/* Creates a weak reference from the given key to the given value */
static VALUE
wmap_aset(VALUE self, VALUE wmap, VALUE orig)
{
+ st_data_t data;
+ VALUE rids;
struct weakmap *w;
TypedData_Get_Struct(self, struct weakmap, &weakmap_type, w);
- should_be_finalizable(orig);
- should_be_finalizable(wmap);
- define_final0(orig, w->final);
- define_final0(wmap, w->final);
- st_update(w->obj2wmap, (st_data_t)orig, wmap_aset_update, wmap);
+ rb_define_final(orig, w->final);
+ rb_define_final(wmap, w->final);
+ if (st_lookup(w->obj2wmap, (st_data_t)orig, &data)) {
+ rids = (VALUE)data;
+ }
+ else {
+ rids = rb_ary_tmp_new(1);
+ st_insert(w->obj2wmap, (st_data_t)orig, (st_data_t)rids);
+ }
+ rb_ary_push(rids, wmap);
st_insert(w->wmap2obj, (st_data_t)wmap, (st_data_t)orig);
return nonspecial_obj_id(orig);
}
@@ -6657,178 +3865,161 @@ wmap_aref(VALUE self, VALUE wmap)
return obj;
}
-/* Returns +true+ if +key+ is registered */
-static VALUE
-wmap_has_key(VALUE self, VALUE key)
-{
- return NIL_P(wmap_aref(self, key)) ? Qfalse : Qtrue;
-}
-
-static VALUE
-wmap_size(VALUE self)
-{
- struct weakmap *w;
- st_index_t n;
-
- TypedData_Get_Struct(self, struct weakmap, &weakmap_type, w);
- n = w->wmap2obj->num_entries;
-#if SIZEOF_ST_INDEX_T <= SIZEOF_LONG
- return ULONG2NUM(n);
-#else
- return ULL2NUM(n);
-#endif
-}
/*
------------------------------ GC profiler ------------------------------
*/
+static inline void gc_prof_set_heap_info(rb_objspace_t *, gc_profile_record *);
#define GC_PROFILE_RECORD_DEFAULT_SIZE 100
static double
getrusage_time(void)
{
#if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_PROCESS_CPUTIME_ID)
- {
- static int try_clock_gettime = 1;
- struct timespec ts;
- if (try_clock_gettime && clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts) == 0) {
- return ts.tv_sec + ts.tv_nsec * 1e-9;
- }
- else {
- try_clock_gettime = 0;
- }
- }
-#endif
+ struct timespec ts;
-#ifdef RUSAGE_SELF
- {
- struct rusage usage;
- struct timeval time;
- if (getrusage(RUSAGE_SELF, &usage) == 0) {
- time = usage.ru_utime;
- return time.tv_sec + time.tv_usec * 1e-6;
- }
+ if (clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts) == 0) {
+ return ts.tv_sec + ts.tv_nsec * 1e-9;
}
-#endif
-
-#ifdef _WIN32
+ return 0.0;
+#elif defined RUSAGE_SELF
+ struct rusage usage;
+ struct timeval time;
+ getrusage(RUSAGE_SELF, &usage);
+ time = usage.ru_utime;
+ return time.tv_sec + time.tv_usec * 1e-6;
+#elif defined _WIN32
+ FILETIME creation_time, exit_time, kernel_time, user_time;
+ ULARGE_INTEGER ui;
+ LONG_LONG q;
+ double t;
+
+ if (GetProcessTimes(GetCurrentProcess(),
+ &creation_time, &exit_time, &kernel_time, &user_time) == 0)
{
- FILETIME creation_time, exit_time, kernel_time, user_time;
- ULARGE_INTEGER ui;
- LONG_LONG q;
- double t;
-
- if (GetProcessTimes(GetCurrentProcess(),
- &creation_time, &exit_time, &kernel_time, &user_time) != 0) {
- memcpy(&ui, &user_time, sizeof(FILETIME));
- q = ui.QuadPart / 10L;
- t = (DWORD)(q % 1000000L) * 1e-6;
- q /= 1000000L;
+ return 0.0;
+ }
+ memcpy(&ui, &user_time, sizeof(FILETIME));
+ q = ui.QuadPart / 10L;
+ t = (DWORD)(q % 1000000L) * 1e-6;
+ q /= 1000000L;
#ifdef __GNUC__
- t += q;
+ t += q;
#else
- t += (double)(DWORD)(q >> 16) * (1 << 16);
- t += (DWORD)q & ~(~0 << 16);
+ t += (double)(DWORD)(q >> 16) * (1 << 16);
+ t += (DWORD)q & ~(~0 << 16);
#endif
- return t;
- }
- }
-#endif
-
+ return t;
+#else
return 0.0;
+#endif
}
static inline void
-gc_prof_setup_new_record(rb_objspace_t *objspace, int reason)
+gc_prof_timer_start(rb_objspace_t *objspace)
{
if (objspace->profile.run) {
- size_t index = objspace->profile.next_index;
- gc_profile_record *record;
+ size_t count = objspace->profile.count;
- /* create new record */
- objspace->profile.next_index++;
+ if (!objspace->profile.record) {
+ objspace->profile.size = GC_PROFILE_RECORD_DEFAULT_SIZE;
+ objspace->profile.record = malloc(sizeof(gc_profile_record) * objspace->profile.size);
+ }
+ if (count >= objspace->profile.size) {
+ objspace->profile.size += 1000;
+ objspace->profile.record = realloc(objspace->profile.record, sizeof(gc_profile_record) * objspace->profile.size);
+ }
+ if (!objspace->profile.record) {
+ rb_bug("gc_profile malloc or realloc miss");
+ }
+ MEMZERO(&objspace->profile.record[count], gc_profile_record, 1);
+ objspace->profile.record[count].gc_time = getrusage_time();
+ objspace->profile.record[objspace->profile.count].gc_invoke_time =
+ objspace->profile.record[count].gc_time - objspace->profile.invoke_time;
+ }
+}
- if (!objspace->profile.records) {
- objspace->profile.size = GC_PROFILE_RECORD_DEFAULT_SIZE;
- objspace->profile.records = malloc(sizeof(gc_profile_record) * objspace->profile.size);
- }
- if (index >= objspace->profile.size) {
- objspace->profile.size += 1000;
- objspace->profile.records = realloc(objspace->profile.records, sizeof(gc_profile_record) * objspace->profile.size);
- }
- if (!objspace->profile.records) {
- rb_bug("gc_profile malloc or realloc miss");
- }
- record = objspace->profile.current_record = &objspace->profile.records[objspace->profile.next_index - 1];
- MEMZERO(record, gc_profile_record, 1);
+static inline void
+gc_prof_timer_stop(rb_objspace_t *objspace, int marked)
+{
+ if (objspace->profile.run) {
+ double gc_time = 0;
+ size_t count = objspace->profile.count;
+ gc_profile_record *record = &objspace->profile.record[count];
- /* setup before-GC parameter */
- record->flags = reason | ((ruby_gc_stress && !ruby_disable_gc_stress) ? GPR_FLAG_STRESS : 0);
-#if MALLOC_ALLOCATED_SIZE
- record->allocated_size = malloc_allocated_size;
-#endif
-#if GC_PROFILE_DETAIL_MEMORY
-#ifdef RUSAGE_SELF
- {
- struct rusage usage;
- if (getrusage(RUSAGE_SELF, &usage) == 0) {
- record->maxrss = usage.ru_maxrss;
- record->minflt = usage.ru_minflt;
- record->majflt = usage.ru_majflt;
- }
- }
-#endif
-#endif
+ gc_time = getrusage_time() - record->gc_time;
+ if (gc_time < 0) gc_time = 0;
+ record->gc_time = gc_time;
+ record->is_marked = !!(marked);
+ gc_prof_set_heap_info(objspace, record);
+ objspace->profile.count++;
}
}
+#if !GC_PROFILE_MORE_DETAIL
+
static inline void
-gc_prof_timer_start(rb_objspace_t *objspace)
+gc_prof_mark_timer_start(rb_objspace_t *objspace)
{
- if (gc_prof_enabled(objspace)) {
- gc_profile_record *record = gc_prof_record(objspace);
-#if GC_PROFILE_MORE_DETAIL
- record->prepare_time = objspace->profile.prepare_time;
-#endif
- record->gc_time = 0;
- record->gc_invoke_time = getrusage_time();
+ if (RUBY_DTRACE_GC_MARK_BEGIN_ENABLED()) {
+ RUBY_DTRACE_GC_MARK_BEGIN();
}
}
-static double
-elapsed_time_from(double time)
+static inline void
+gc_prof_mark_timer_stop(rb_objspace_t *objspace)
{
- double now = getrusage_time();
- if (now > time) {
- return now - time;
+ if (RUBY_DTRACE_GC_MARK_END_ENABLED()) {
+ RUBY_DTRACE_GC_MARK_END();
}
- else {
- return 0;
+}
+
+static inline void
+gc_prof_sweep_timer_start(rb_objspace_t *objspace)
+{
+ if (RUBY_DTRACE_GC_SWEEP_BEGIN_ENABLED()) {
+ RUBY_DTRACE_GC_SWEEP_BEGIN();
}
}
static inline void
-gc_prof_timer_stop(rb_objspace_t *objspace)
+gc_prof_sweep_timer_stop(rb_objspace_t *objspace)
{
- if (gc_prof_enabled(objspace)) {
- gc_profile_record *record = gc_prof_record(objspace);
- record->gc_time = elapsed_time_from(record->gc_invoke_time);
- record->gc_invoke_time -= objspace->profile.invoke_time;
+ if (RUBY_DTRACE_GC_SWEEP_END_ENABLED()) {
+ RUBY_DTRACE_GC_SWEEP_END();
}
}
static inline void
+gc_prof_set_malloc_info(rb_objspace_t *objspace)
+{
+}
+
+static inline void
+gc_prof_set_heap_info(rb_objspace_t *objspace, gc_profile_record *record)
+{
+ size_t live = objspace_live_num(objspace);
+ size_t total = heaps_used * HEAP_OBJ_LIMIT;
+
+ record->heap_total_objects = total;
+ record->heap_use_size = live * sizeof(RVALUE);
+ record->heap_total_size = total * sizeof(RVALUE);
+}
+
+#else
+
+static inline void
gc_prof_mark_timer_start(rb_objspace_t *objspace)
{
if (RUBY_DTRACE_GC_MARK_BEGIN_ENABLED()) {
RUBY_DTRACE_GC_MARK_BEGIN();
}
-#if GC_PROFILE_MORE_DETAIL
- if (gc_prof_enabled(objspace)) {
- gc_prof_record(objspace)->gc_mark_time = getrusage_time();
+ if (objspace->profile.run) {
+ size_t count = objspace->profile.count;
+
+ objspace->profile.record[count].gc_mark_time = getrusage_time();
}
-#endif
}
static inline void
@@ -6837,12 +4028,15 @@ gc_prof_mark_timer_stop(rb_objspace_t *objspace)
if (RUBY_DTRACE_GC_MARK_END_ENABLED()) {
RUBY_DTRACE_GC_MARK_END();
}
-#if GC_PROFILE_MORE_DETAIL
- if (gc_prof_enabled(objspace)) {
- gc_profile_record *record = gc_prof_record(objspace);
- record->gc_mark_time = elapsed_time_from(record->gc_mark_time);
+ if (objspace->profile.run) {
+ double mark_time = 0;
+ size_t count = objspace->profile.count;
+ gc_profile_record *record = &objspace->profile.record[count];
+
+ mark_time = getrusage_time() - record->gc_mark_time;
+ if (mark_time < 0) mark_time = 0;
+ record->gc_mark_time = mark_time;
}
-#endif
}
static inline void
@@ -6851,12 +4045,10 @@ gc_prof_sweep_timer_start(rb_objspace_t *objspace)
if (RUBY_DTRACE_GC_SWEEP_BEGIN_ENABLED()) {
RUBY_DTRACE_GC_SWEEP_BEGIN();
}
- if (gc_prof_enabled(objspace)) {
- gc_profile_record *record = gc_prof_record(objspace);
+ if (objspace->profile.run) {
+ size_t count = objspace->profile.count;
- if (record->gc_time > 0 || GC_PROFILE_MORE_DETAIL) {
- objspace->profile.gc_sweep_start_time = getrusage_time();
- }
+ objspace->profile.record[count].gc_sweep_time = getrusage_time();
}
}
@@ -6866,60 +4058,47 @@ gc_prof_sweep_timer_stop(rb_objspace_t *objspace)
if (RUBY_DTRACE_GC_SWEEP_END_ENABLED()) {
RUBY_DTRACE_GC_SWEEP_END();
}
+ if (objspace->profile.run) {
+ double sweep_time = 0;
+ size_t count = objspace->profile.count;
+ gc_profile_record *record = &objspace->profile.record[count];
- if (gc_prof_enabled(objspace)) {
- double sweep_time;
- gc_profile_record *record = gc_prof_record(objspace);
-
- if (record->gc_time > 0) {
- sweep_time = elapsed_time_from(objspace->profile.gc_sweep_start_time);
- /* need to accumulate GC time for lazy sweep after gc() */
- record->gc_time += sweep_time;
- }
- else if (GC_PROFILE_MORE_DETAIL) {
- sweep_time = elapsed_time_from(objspace->profile.gc_sweep_start_time);
- }
-
-#if GC_PROFILE_MORE_DETAIL
- record->gc_sweep_time += sweep_time;
- if (heap_pages_deferred_final) record->flags |= GPR_FLAG_HAVE_FINALIZE;
-#endif
- if (heap_pages_deferred_final) objspace->profile.latest_gc_info |= GPR_FLAG_HAVE_FINALIZE;
+ sweep_time = getrusage_time() - record->gc_sweep_time;\
+ if (sweep_time < 0) sweep_time = 0;\
+ record->gc_sweep_time = sweep_time;
}
}
static inline void
gc_prof_set_malloc_info(rb_objspace_t *objspace)
{
-#if GC_PROFILE_MORE_DETAIL
- if (gc_prof_enabled(objspace)) {
- gc_profile_record *record = gc_prof_record(objspace);
- record->allocate_increase = malloc_increase;
- record->allocate_limit = malloc_limit;
+ if (objspace->profile.run) {
+ gc_profile_record *record = &objspace->profile.record[objspace->profile.count];
+ if (record) {
+ record->allocate_increase = malloc_increase;
+ record->allocate_limit = malloc_limit;
+ }
}
-#endif
}
static inline void
-gc_prof_set_heap_info(rb_objspace_t *objspace)
+gc_prof_set_heap_info(rb_objspace_t *objspace, gc_profile_record *record)
{
- if (gc_prof_enabled(objspace)) {
- gc_profile_record *record = gc_prof_record(objspace);
- size_t live = objspace->profile.total_allocated_object_num_at_gc_start - objspace->profile.total_freed_object_num;
- size_t total = objspace->profile.heap_used_at_gc_start * HEAP_OBJ_LIMIT;
+ size_t live = objspace->heap.live_num;
+ size_t total = heaps_used * HEAP_OBJ_LIMIT;
-#if GC_PROFILE_MORE_DETAIL
- record->heap_use_pages = objspace->profile.heap_used_at_gc_start;
- record->heap_live_objects = live;
- record->heap_free_objects = total - live;
-#endif
-
- record->heap_total_objects = total;
- record->heap_use_size = live * sizeof(RVALUE);
- record->heap_total_size = total * sizeof(RVALUE);
- }
+ record->heap_use_slots = heaps_used;
+ record->heap_live_objects = live;
+ record->heap_free_objects = total - live;
+ record->heap_total_objects = total;
+ record->have_finalize = deferred_final_list ? Qtrue : Qfalse;
+ record->heap_use_size = live * sizeof(RVALUE);
+ record->heap_total_size = total * sizeof(RVALUE);
}
+#endif /* !GC_PROFILE_MORE_DETAIL */
+
+
/*
* call-seq:
* GC::Profiler.clear -> nil
@@ -6932,16 +4111,16 @@ static VALUE
gc_profile_clear(void)
{
rb_objspace_t *objspace = &rb_objspace;
+
if (GC_PROFILE_RECORD_DEFAULT_SIZE * 2 < objspace->profile.size) {
objspace->profile.size = GC_PROFILE_RECORD_DEFAULT_SIZE * 2;
- objspace->profile.records = realloc(objspace->profile.records, sizeof(gc_profile_record) * objspace->profile.size);
- if (!objspace->profile.records) {
+ objspace->profile.record = realloc(objspace->profile.record, sizeof(gc_profile_record) * objspace->profile.size);
+ if (!objspace->profile.record) {
rb_memerror();
}
}
- MEMZERO(objspace->profile.records, gc_profile_record, objspace->profile.size);
- objspace->profile.next_index = 0;
- objspace->profile.current_record = 0;
+ MEMZERO(objspace->profile.record, gc_profile_record, objspace->profile.size);
+ objspace->profile.count = 0;
return Qnil;
}
@@ -6988,7 +4167,7 @@ gc_profile_clear(void)
* +:GC_SWEEP_TIME+::
* +:ALLOCATE_INCREASE+::
* +:ALLOCATE_LIMIT+::
- * +:HEAP_USE_PAGES+::
+ * +:HEAP_USE_SLOTS+::
* +:HEAP_LIVE_OBJECTS+::
* +:HEAP_FREE_OBJECTS+::
* +:HAVE_FINALIZE+::
@@ -7007,36 +4186,23 @@ gc_profile_record_get(void)
return Qnil;
}
- for (i =0; i < objspace->profile.next_index; i++) {
- gc_profile_record *record = &objspace->profile.records[i];
-
+ for (i =0; i < objspace->profile.count; i++) {
prof = rb_hash_new();
- rb_hash_aset(prof, ID2SYM(rb_intern("GC_FLAGS")), gc_info_decode(record->flags, rb_hash_new()));
- rb_hash_aset(prof, ID2SYM(rb_intern("GC_TIME")), DBL2NUM(record->gc_time));
- rb_hash_aset(prof, ID2SYM(rb_intern("GC_INVOKE_TIME")), DBL2NUM(record->gc_invoke_time));
- rb_hash_aset(prof, ID2SYM(rb_intern("HEAP_USE_SIZE")), SIZET2NUM(record->heap_use_size));
- rb_hash_aset(prof, ID2SYM(rb_intern("HEAP_TOTAL_SIZE")), SIZET2NUM(record->heap_total_size));
- rb_hash_aset(prof, ID2SYM(rb_intern("HEAP_TOTAL_OBJECTS")), SIZET2NUM(record->heap_total_objects));
- rb_hash_aset(prof, ID2SYM(rb_intern("GC_IS_MARKED")), Qtrue);
+ rb_hash_aset(prof, ID2SYM(rb_intern("GC_TIME")), DBL2NUM(objspace->profile.record[i].gc_time));
+ rb_hash_aset(prof, ID2SYM(rb_intern("GC_INVOKE_TIME")), DBL2NUM(objspace->profile.record[i].gc_invoke_time));
+ rb_hash_aset(prof, ID2SYM(rb_intern("HEAP_USE_SIZE")), SIZET2NUM(objspace->profile.record[i].heap_use_size));
+ rb_hash_aset(prof, ID2SYM(rb_intern("HEAP_TOTAL_SIZE")), SIZET2NUM(objspace->profile.record[i].heap_total_size));
+ rb_hash_aset(prof, ID2SYM(rb_intern("HEAP_TOTAL_OBJECTS")), SIZET2NUM(objspace->profile.record[i].heap_total_objects));
+ rb_hash_aset(prof, ID2SYM(rb_intern("GC_IS_MARKED")), objspace->profile.record[i].is_marked);
#if GC_PROFILE_MORE_DETAIL
- rb_hash_aset(prof, ID2SYM(rb_intern("GC_MARK_TIME")), DBL2NUM(record->gc_mark_time));
- rb_hash_aset(prof, ID2SYM(rb_intern("GC_SWEEP_TIME")), DBL2NUM(record->gc_sweep_time));
- rb_hash_aset(prof, ID2SYM(rb_intern("ALLOCATE_INCREASE")), SIZET2NUM(record->allocate_increase));
- rb_hash_aset(prof, ID2SYM(rb_intern("ALLOCATE_LIMIT")), SIZET2NUM(record->allocate_limit));
- rb_hash_aset(prof, ID2SYM(rb_intern("HEAP_USE_PAGES")), SIZET2NUM(record->heap_use_pages));
- rb_hash_aset(prof, ID2SYM(rb_intern("HEAP_LIVE_OBJECTS")), SIZET2NUM(record->heap_live_objects));
- rb_hash_aset(prof, ID2SYM(rb_intern("HEAP_FREE_OBJECTS")), SIZET2NUM(record->heap_free_objects));
-
- rb_hash_aset(prof, ID2SYM(rb_intern("REMOVING_OBJECTS")), SIZET2NUM(record->removing_objects));
- rb_hash_aset(prof, ID2SYM(rb_intern("EMPTY_OBJECTS")), SIZET2NUM(record->empty_objects));
-
- rb_hash_aset(prof, ID2SYM(rb_intern("HAVE_FINALIZE")), (record->flags & GPR_FLAG_HAVE_FINALIZE) ? Qtrue : Qfalse);
-#endif
-
-#if RGENGC_PROFILE > 0
- rb_hash_aset(prof, ID2SYM(rb_intern("OLD_OBJECTS")), SIZET2NUM(record->old_objects));
- rb_hash_aset(prof, ID2SYM(rb_intern("REMEMBED_NORMAL_OBJECTS")), SIZET2NUM(record->remembered_normal_objects));
- rb_hash_aset(prof, ID2SYM(rb_intern("REMEMBED_SHADY_OBJECTS")), SIZET2NUM(record->remembered_shady_objects));
+ rb_hash_aset(prof, ID2SYM(rb_intern("GC_MARK_TIME")), DBL2NUM(objspace->profile.record[i].gc_mark_time));
+ rb_hash_aset(prof, ID2SYM(rb_intern("GC_SWEEP_TIME")), DBL2NUM(objspace->profile.record[i].gc_sweep_time));
+ rb_hash_aset(prof, ID2SYM(rb_intern("ALLOCATE_INCREASE")), SIZET2NUM(objspace->profile.record[i].allocate_increase));
+ rb_hash_aset(prof, ID2SYM(rb_intern("ALLOCATE_LIMIT")), SIZET2NUM(objspace->profile.record[i].allocate_limit));
+ rb_hash_aset(prof, ID2SYM(rb_intern("HEAP_USE_SLOTS")), SIZET2NUM(objspace->profile.record[i].heap_use_slots));
+ rb_hash_aset(prof, ID2SYM(rb_intern("HEAP_LIVE_OBJECTS")), SIZET2NUM(objspace->profile.record[i].heap_live_objects));
+ rb_hash_aset(prof, ID2SYM(rb_intern("HEAP_FREE_OBJECTS")), SIZET2NUM(objspace->profile.record[i].heap_free_objects));
+ rb_hash_aset(prof, ID2SYM(rb_intern("HAVE_FINALIZE")), objspace->profile.record[i].have_finalize);
#endif
rb_ary_push(gc_profile, prof);
}
@@ -7044,130 +4210,41 @@ gc_profile_record_get(void)
return gc_profile;
}
-#if GC_PROFILE_MORE_DETAIL
-#define MAJOR_REASON_MAX 0x10
-
-static char *
-gc_profile_dump_major_reason(int flags, char *buff)
-{
- int reason = flags & GPR_FLAG_MAJOR_MASK;
- int i = 0;
-
- if (reason == GPR_FLAG_NONE) {
- buff[0] = '-';
- buff[1] = 0;
- }
- else {
-#define C(x, s) \
- if (reason & GPR_FLAG_MAJOR_BY_##x) { \
- buff[i++] = #x[0]; \
- if (i >= MAJOR_REASON_MAX) rb_bug("gc_profile_dump_major_reason: overflow"); \
- buff[i] = 0; \
- }
- C(NOFREE, N);
- C(OLDGEN, O);
- C(SHADY, S);
- C(RESCAN, R);
- C(STRESS, T);
-#if RGENGC_ESTIMATE_OLDMALLOC
- C(OLDMALLOC, M);
-#endif
-#undef C
- }
- return buff;
-}
-#endif
-
static void
gc_profile_dump_on(VALUE out, VALUE (*append)(VALUE, VALUE))
{
rb_objspace_t *objspace = &rb_objspace;
- size_t count = objspace->profile.next_index;
-#ifdef MAJOR_REASON_MAX
- char reason_str[MAJOR_REASON_MAX];
-#endif
+ size_t count = objspace->profile.count;
- if (objspace->profile.run && count /* > 1 */) {
+ if (objspace->profile.run && count) {
+ int index = 1;
size_t i;
- const gc_profile_record *record;
-
- append(out, rb_sprintf("GC %"PRIuSIZE" invokes.\n", objspace->profile.count));
+ gc_profile_record r;
+ append(out, rb_sprintf("GC %"PRIuSIZE" invokes.\n", objspace->count));
append(out, rb_str_new_cstr("Index Invoke Time(sec) Use Size(byte) Total Size(byte) Total Object GC Time(ms)\n"));
-
for (i = 0; i < count; i++) {
- record = &objspace->profile.records[i];
- append(out, rb_sprintf("%5"PRIdSIZE" %19.3f %20"PRIuSIZE" %20"PRIuSIZE" %20"PRIuSIZE" %30.20f\n",
- i+1, record->gc_invoke_time, record->heap_use_size,
- record->heap_total_size, record->heap_total_objects, record->gc_time*1000));
+ r = objspace->profile.record[i];
+#if !GC_PROFILE_MORE_DETAIL
+ if (r.is_marked) {
+#endif
+ append(out, rb_sprintf("%5d %19.3f %20"PRIuSIZE" %20"PRIuSIZE" %20"PRIuSIZE" %30.20f\n",
+ index++, r.gc_invoke_time, r.heap_use_size,
+ r.heap_total_size, r.heap_total_objects, r.gc_time*1000));
+#if !GC_PROFILE_MORE_DETAIL
+ }
+#endif
}
-
#if GC_PROFILE_MORE_DETAIL
append(out, rb_str_new_cstr("\n\n" \
- "More detail.\n" \
- "Prepare Time = Previously GC's rest sweep time\n"
- "Index Flags Allocate Inc. Allocate Limit"
-#if CALC_EXACT_MALLOC_SIZE
- " Allocated Size"
-#endif
- " Use Page Mark Time(ms) Sweep Time(ms) Prepare Time(ms) LivingObj FreeObj RemovedObj EmptyObj"
-#if RGENGC_PROFILE
- " OldgenObj RemNormObj RemShadObj"
-#endif
-#if GC_PROFILE_DETAIL_MEMORY
- " MaxRSS(KB) MinorFLT MajorFLT"
-#endif
- "\n"));
-
+ "More detail.\n" \
+ "Index Allocate Increase Allocate Limit Use Slot Have Finalize Mark Time(ms) Sweep Time(ms)\n"));
+ index = 1;
for (i = 0; i < count; i++) {
- record = &objspace->profile.records[i];
- append(out, rb_sprintf("%5"PRIdSIZE" %4s/%c/%6s%c %13"PRIuSIZE" %15"PRIuSIZE
-#if CALC_EXACT_MALLOC_SIZE
- " %15"PRIuSIZE
-#endif
- " %9"PRIuSIZE" %17.12f %17.12f %17.12f %10"PRIuSIZE" %10"PRIuSIZE" %10"PRIuSIZE" %10"PRIuSIZE
-#if RGENGC_PROFILE
- "%10"PRIuSIZE" %10"PRIuSIZE" %10"PRIuSIZE
-#endif
-#if GC_PROFILE_DETAIL_MEMORY
- "%11ld %8ld %8ld"
-#endif
-
- "\n",
- i+1,
- gc_profile_dump_major_reason(record->flags, reason_str),
- (record->flags & GPR_FLAG_HAVE_FINALIZE) ? 'F' : '.',
- (record->flags & GPR_FLAG_NEWOBJ) ? "NEWOBJ" :
- (record->flags & GPR_FLAG_MALLOC) ? "MALLOC" :
- (record->flags & GPR_FLAG_METHOD) ? "METHOD" :
- (record->flags & GPR_FLAG_CAPI) ? "CAPI__" : "??????",
- (record->flags & GPR_FLAG_STRESS) ? '!' : ' ',
- record->allocate_increase, record->allocate_limit,
-#if CALC_EXACT_MALLOC_SIZE
- record->allocated_size,
-#endif
- record->heap_use_pages,
- record->gc_mark_time*1000,
- record->gc_sweep_time*1000,
- record->prepare_time*1000,
-
- record->heap_live_objects,
- record->heap_free_objects,
- record->removing_objects,
- record->empty_objects
-#if RGENGC_PROFILE
- ,
- record->old_objects,
- record->remembered_normal_objects,
- record->remembered_shady_objects
-#endif
-#if GC_PROFILE_DETAIL_MEMORY
- ,
- record->maxrss / 1024,
- record->minflt,
- record->majflt
-#endif
-
- ));
+ r = objspace->profile.record[i];
+ append(out, rb_sprintf("%5d %17"PRIuSIZE" %17"PRIuSIZE" %9"PRIuSIZE" %14s %25.20f %25.20f\n",
+ index++, r.allocate_increase, r.allocate_limit,
+ r.heap_use_slots, (r.have_finalize ? "true" : "false"),
+ r.gc_mark_time*1000, r.gc_sweep_time*1000));
}
#endif
}
@@ -7229,13 +4306,11 @@ gc_profile_total_time(VALUE self)
{
double time = 0;
rb_objspace_t *objspace = &rb_objspace;
+ size_t i;
- if (objspace->profile.run && objspace->profile.next_index > 0) {
- size_t i;
- size_t count = objspace->profile.next_index;
-
- for (i = 0; i < count; i++) {
- time += objspace->profile.records[i].gc_time;
+ if (objspace->profile.run && objspace->profile.count) {
+ for (i = 0; i < objspace->profile.count; i++) {
+ time += objspace->profile.record[i].gc_time;
}
}
return DBL2NUM(time);
@@ -7267,8 +4342,8 @@ static VALUE
gc_profile_enable(void)
{
rb_objspace_t *objspace = &rb_objspace;
+
objspace->profile.run = TRUE;
- objspace->profile.current_record = 0;
return Qnil;
}
@@ -7286,68 +4361,20 @@ gc_profile_disable(void)
rb_objspace_t *objspace = &rb_objspace;
objspace->profile.run = FALSE;
- objspace->profile.current_record = 0;
return Qnil;
}
+#ifdef GC_DEBUG
+
/*
------------------------------ DEBUG ------------------------------
*/
-static const char *
-type_name(int type, VALUE obj)
-{
- switch (type) {
-#define TYPE_NAME(t) case (t): return #t;
- TYPE_NAME(T_NONE);
- TYPE_NAME(T_OBJECT);
- TYPE_NAME(T_CLASS);
- TYPE_NAME(T_MODULE);
- TYPE_NAME(T_FLOAT);
- TYPE_NAME(T_STRING);
- TYPE_NAME(T_REGEXP);
- TYPE_NAME(T_ARRAY);
- TYPE_NAME(T_HASH);
- TYPE_NAME(T_STRUCT);
- TYPE_NAME(T_BIGNUM);
- TYPE_NAME(T_FILE);
- TYPE_NAME(T_MATCH);
- TYPE_NAME(T_COMPLEX);
- TYPE_NAME(T_RATIONAL);
- TYPE_NAME(T_NIL);
- TYPE_NAME(T_TRUE);
- TYPE_NAME(T_FALSE);
- TYPE_NAME(T_SYMBOL);
- TYPE_NAME(T_FIXNUM);
- TYPE_NAME(T_UNDEF);
- TYPE_NAME(T_NODE);
- TYPE_NAME(T_ICLASS);
- TYPE_NAME(T_ZOMBIE);
- case T_DATA:
- if (obj && rb_objspace_data_type_name(obj)) {
- return rb_objspace_data_type_name(obj);
- }
- return "T_DATA";
-#undef TYPE_NAME
- }
- return "unknown";
-}
-
-static const char *
-obj_type_name(VALUE obj)
-{
- return type_name(TYPE(obj), obj);
-}
-
-#if GC_DEBUG
-
void
rb_gcdebug_print_obj_condition(VALUE obj)
{
rb_objspace_t *objspace = &rb_objspace;
- fprintf(stderr, "created at: %s:%d\n", RSTRING_PTR(RANY(obj)->file), FIX2INT(RANY(obj)->line));
-
if (is_pointer_to_heap(objspace, (void *)obj)) {
fprintf(stderr, "pointer to heap?: true\n");
}
@@ -7355,20 +4382,12 @@ rb_gcdebug_print_obj_condition(VALUE obj)
fprintf(stderr, "pointer to heap?: false\n");
return;
}
-
- fprintf(stderr, "marked? : %s\n", MARKED_IN_BITMAP(GET_HEAP_MARK_BITS(obj), obj) ? "true" : "false");
-#if USE_RGENGC
-#if RGENGC_THREEGEN
- fprintf(stderr, "young? : %s\n", RVALUE_YOUNG_P(obj) ? "true" : "false");
-#endif
- fprintf(stderr, "old? : %s\n", RVALUE_OLD_P(obj) ? "true" : "false");
- fprintf(stderr, "WB-protected?: %s\n", RVALUE_WB_PROTECTED(obj) ? "true" : "false");
- fprintf(stderr, "remembered? : %s\n", MARKED_IN_BITMAP(GET_HEAP_REMEMBERSET_BITS(obj), obj) ? "true" : "false");
-#endif
-
- if (is_lazy_sweeping(heap_eden)) {
+ fprintf(stderr, "marked?: %s\n",
+ MARKED_IN_BITMAP(GET_HEAP_BITMAP(obj), obj) ? "true" : "false");
+ if (is_lazy_sweeping(objspace)) {
fprintf(stderr, "lazy sweeping?: true\n");
- fprintf(stderr, "swept?: %s\n", is_swept_object(objspace, obj) ? "done" : "not yet");
+ fprintf(stderr, "swept?: %s\n",
+ is_swept_object(objspace, obj) ? "done" : "not yet");
}
else {
fprintf(stderr, "lazy sweeping?: false\n");
@@ -7385,12 +4404,13 @@ gcdebug_sential(VALUE obj, VALUE name)
void
rb_gcdebug_sentinel(VALUE obj, const char *name)
{
- rb_define_finalizer(obj, rb_proc_new(gcdebug_sential, (VALUE)name));
+ rb_define_final(obj, rb_proc_new(gcdebug_sential, (VALUE)name));
}
#endif /* GC_DEBUG */
+
/*
- * Document-module: ObjectSpace
+ * Document-class: ObjectSpace
*
* The ObjectSpace module contains a number of routines
* that interact with the garbage collection facility and allow you to
@@ -7400,23 +4420,29 @@ rb_gcdebug_sentinel(VALUE obj, const char *name)
* called when a specific object is about to be destroyed by garbage
* collection.
*
+ * include ObjectSpace
+ *
* a = "A"
* b = "B"
+ * c = "C"
*
- * ObjectSpace.define_finalizer(a, proc {|id| puts "Finalizer one on #{id}" })
- * ObjectSpace.define_finalizer(b, proc {|id| puts "Finalizer two on #{id}" })
+ * define_finalizer(a, proc {|id| puts "Finalizer one on #{id}" })
+ * define_finalizer(a, proc {|id| puts "Finalizer two on #{id}" })
+ * define_finalizer(b, proc {|id| puts "Finalizer three on #{id}" })
*
* _produces:_
*
- * Finalizer two on 537763470
+ * Finalizer three on 537763470
* Finalizer one on 537763480
+ * Finalizer two on 537763480
+ *
*/
/*
* Document-class: ObjectSpace::WeakMap
*
* An ObjectSpace::WeakMap object holds references to
- * any objects, but those objects can get garbage collected.
+ * any objects, but those objects can get be garbage collected.
*
* This class is mostly used internally by WeakRef, please use
* +lib/weakref.rb+ for the public interface.
@@ -7454,28 +4480,18 @@ rb_gcdebug_sentinel(VALUE obj, const char *name)
void
Init_GC(void)
{
- VALUE rb_mObjSpace;
+ VALUE rb_mObSpace;
VALUE rb_mProfiler;
- VALUE gc_constants;
rb_mGC = rb_define_module("GC");
- rb_define_singleton_method(rb_mGC, "start", gc_start_internal, -1);
+ rb_define_singleton_method(rb_mGC, "start", rb_gc_start, 0);
rb_define_singleton_method(rb_mGC, "enable", rb_gc_enable, 0);
rb_define_singleton_method(rb_mGC, "disable", rb_gc_disable, 0);
rb_define_singleton_method(rb_mGC, "stress", gc_stress_get, 0);
rb_define_singleton_method(rb_mGC, "stress=", gc_stress_set, 1);
rb_define_singleton_method(rb_mGC, "count", gc_count, 0);
rb_define_singleton_method(rb_mGC, "stat", gc_stat, -1);
- rb_define_singleton_method(rb_mGC, "latest_gc_info", gc_latest_gc_info, -1);
- rb_define_method(rb_mGC, "garbage_collect", gc_start_internal, -1);
-
- gc_constants = rb_hash_new();
- rb_hash_aset(gc_constants, ID2SYM(rb_intern("RVALUE_SIZE")), SIZET2NUM(sizeof(RVALUE)));
- rb_hash_aset(gc_constants, ID2SYM(rb_intern("HEAP_OBJ_LIMIT")), SIZET2NUM(HEAP_OBJ_LIMIT));
- rb_hash_aset(gc_constants, ID2SYM(rb_intern("HEAP_BITMAP_SIZE")), SIZET2NUM(HEAP_BITMAP_SIZE));
- rb_hash_aset(gc_constants, ID2SYM(rb_intern("HEAP_BITMAP_PLANES")), SIZET2NUM(HEAP_BITMAP_PLANES));
- OBJ_FREEZE(gc_constants);
- rb_define_const(rb_mGC, "INTERNAL_CONSTANTS", gc_constants);
+ rb_define_method(rb_mGC, "garbage_collect", rb_gc_start, 0);
rb_mProfiler = rb_define_module_under(rb_mGC, "Profiler");
rb_define_singleton_method(rb_mProfiler, "enabled?", gc_profile_enable_get, 0);
@@ -7487,14 +4503,14 @@ Init_GC(void)
rb_define_singleton_method(rb_mProfiler, "report", gc_profile_report, -1);
rb_define_singleton_method(rb_mProfiler, "total_time", gc_profile_total_time, 0);
- rb_mObjSpace = rb_define_module("ObjectSpace");
- rb_define_module_function(rb_mObjSpace, "each_object", os_each_obj, -1);
- rb_define_module_function(rb_mObjSpace, "garbage_collect", gc_start_internal, -1);
+ rb_mObSpace = rb_define_module("ObjectSpace");
+ rb_define_module_function(rb_mObSpace, "each_object", os_each_obj, -1);
+ rb_define_module_function(rb_mObSpace, "garbage_collect", rb_gc_start, 0);
- rb_define_module_function(rb_mObjSpace, "define_finalizer", define_final, -1);
- rb_define_module_function(rb_mObjSpace, "undefine_finalizer", undefine_final, 1);
+ rb_define_module_function(rb_mObSpace, "define_finalizer", define_final, -1);
+ rb_define_module_function(rb_mObSpace, "undefine_finalizer", undefine_final, 1);
- rb_define_module_function(rb_mObjSpace, "_id2ref", id2ref, 1);
+ rb_define_module_function(rb_mObSpace, "_id2ref", id2ref, 1);
nomem_error = rb_exc_new3(rb_eNoMemError,
rb_obj_freeze(rb_str_new2("failed to allocate memory")));
@@ -7504,54 +4520,18 @@ Init_GC(void)
rb_define_method(rb_cBasicObject, "__id__", rb_obj_id, 0);
rb_define_method(rb_mKernel, "object_id", rb_obj_id, 0);
- rb_define_module_function(rb_mObjSpace, "count_objects", count_objects, -1);
+ rb_define_module_function(rb_mObSpace, "count_objects", count_objects, -1);
{
- VALUE rb_cWeakMap = rb_define_class_under(rb_mObjSpace, "WeakMap", rb_cObject);
+ VALUE rb_cWeakMap = rb_define_class_under(rb_mObSpace, "WeakMap", rb_cObject);
rb_define_alloc_func(rb_cWeakMap, wmap_allocate);
rb_define_method(rb_cWeakMap, "[]=", wmap_aset, 2);
rb_define_method(rb_cWeakMap, "[]", wmap_aref, 1);
- rb_define_method(rb_cWeakMap, "include?", wmap_has_key, 1);
- rb_define_method(rb_cWeakMap, "member?", wmap_has_key, 1);
- rb_define_method(rb_cWeakMap, "key?", wmap_has_key, 1);
- rb_define_method(rb_cWeakMap, "inspect", wmap_inspect, 0);
- rb_define_method(rb_cWeakMap, "each", wmap_each, 0);
- rb_define_method(rb_cWeakMap, "each_pair", wmap_each, 0);
- rb_define_method(rb_cWeakMap, "each_key", wmap_each_key, 0);
- rb_define_method(rb_cWeakMap, "each_value", wmap_each_value, 0);
- rb_define_method(rb_cWeakMap, "keys", wmap_keys, 0);
- rb_define_method(rb_cWeakMap, "values", wmap_values, 0);
- rb_define_method(rb_cWeakMap, "size", wmap_size, 0);
- rb_define_method(rb_cWeakMap, "length", wmap_size, 0);
rb_define_private_method(rb_cWeakMap, "finalize", wmap_finalize, 1);
- rb_include_module(rb_cWeakMap, rb_mEnumerable);
}
- /* internal methods */
- rb_define_singleton_method(rb_mGC, "verify_internal_consistency", gc_verify_internal_consistency, 0);
-#if MALLOC_ALLOCATED_SIZE
+#if CALC_EXACT_MALLOC_SIZE
rb_define_singleton_method(rb_mGC, "malloc_allocated_size", gc_malloc_allocated_size, 0);
rb_define_singleton_method(rb_mGC, "malloc_allocations", gc_malloc_allocations, 0);
#endif
-
- /* ::GC::OPTS, which shows GC build options */
- {
- VALUE opts;
- rb_define_const(rb_mGC, "OPTS", opts = rb_ary_new());
-#define OPT(o) if (o) rb_ary_push(opts, rb_str_new2(#o))
- OPT(GC_DEBUG);
- OPT(USE_RGENGC);
- OPT(RGENGC_DEBUG);
- OPT(RGENGC_CHECK_MODE);
- OPT(RGENGC_PROFILE);
- OPT(RGENGC_THREEGEN);
- OPT(RGENGC_ESTIMATE_OLDMALLOC);
- OPT(GC_PROFILE_MORE_DETAIL);
- OPT(GC_ENABLE_LAZY_SWEEP);
- OPT(CALC_EXACT_MALLOC_SIZE);
- OPT(MALLOC_ALLOCATED_SIZE);
- OPT(MALLOC_ALLOCATED_SIZE_CHECK);
- OPT(GC_PROFILE_DETAIL_MEMORY);
-#undef OPT
- }
}
diff --git a/gc.h b/gc.h
index 09edafa027..10f634e346 100644
--- a/gc.h
+++ b/gc.h
@@ -2,10 +2,10 @@
#ifndef RUBY_GC_H
#define RUBY_GC_H 1
-#if defined(__x86_64__) && !defined(_ILP32) && defined(__GNUC__) && !defined(__native_client__)
-#define SET_MACHINE_STACK_END(p) __asm__ __volatile__ ("movq\t%%rsp, %0" : "=r" (*(p)))
+#if defined(__x86_64__) && defined(__GNUC__) && !defined(__native_client__)
+#define SET_MACHINE_STACK_END(p) __asm__ volatile ("movq\t%%rsp, %0" : "=r" (*(p)))
#elif defined(__i386) && defined(__GNUC__) && !defined(__native_client__)
-#define SET_MACHINE_STACK_END(p) __asm__ __volatile__ ("movl\t%%esp, %0" : "=r" (*(p)))
+#define SET_MACHINE_STACK_END(p) __asm__ volatile ("movl\t%%esp, %0" : "=r" (*(p)))
#else
NOINLINE(void rb_gc_set_stack_end(VALUE **stack_end_p));
#define SET_MACHINE_STACK_END(p) rb_gc_set_stack_end(p)
@@ -83,12 +83,13 @@ int ruby_get_stack_grow_direction(volatile VALUE *addr);
#endif
#define IS_STACK_DIR_UPPER() STACK_DIR_UPPER(1,0)
-RUBY_SYMBOL_EXPORT_BEGIN
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility push(default)
+#endif
/* exports for objspace module */
size_t rb_objspace_data_type_memsize(VALUE obj);
void rb_objspace_reachable_objects_from(VALUE obj, void (func)(VALUE, void *), void *data);
-void rb_objspace_reachable_objects_from_root(void (func)(const char *category, VALUE, void *), void *data);
int rb_objspace_markable_object_p(VALUE obj);
int rb_objspace_internal_object_p(VALUE obj);
@@ -96,6 +97,8 @@ void rb_objspace_each_objects(
int (*callback)(void *start, void *end, size_t stride, void *data),
void *data);
-RUBY_SYMBOL_EXPORT_END
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility pop
+#endif
#endif /* RUBY_GC_H */
diff --git a/golf_prelude.rb b/golf_prelude.rb
index 8034601287..b090503213 100644
--- a/golf_prelude.rb
+++ b/golf_prelude.rb
@@ -1,8 +1,7 @@
class Object
@@golf_hash = {}
-
def method_missing m, *a, &b
- t = @@golf_hash[ [m, self.class] ] ||= matching_methods(m)[0]
+ t = @@golf_hash[ [m,self.class] ] ||= matching_methods(m)[0]
if t && b
__send__(t, *a) {|*args|
b.binding.eval("proc{|golf_matchdata| $~ = golf_matchdata }").call($~) if $~
@@ -13,27 +12,27 @@ class Object
end
end
- def matching_methods(s = '', m = callable_methods)
- r = /^#{s.to_s.gsub(/./){"(.*?)" + Regexp.escape($&)}}/
+ def matching_methods(s='', m=callable_methods)
+ r=/^#{s.to_s.gsub(/./){"(.*?)"+Regexp.escape($&)}}/
m.grep(r).sort_by do |i|
i.to_s.match(r).captures.map(&:size) << i
end
end
def self.const_missing c
- t = @@golf_hash[ [c,self.class] ] ||= matching_methods(c, constants)[0]
+ t = @@golf_hash[ [c,self.class] ] ||= matching_methods(c,constants)[0]
t and return const_get(t)
raise NameError, "uninitialized constant #{c}", caller(1)
end
- def shortest_abbreviation(s = '', m = callable_methods)
- s = s.to_s
- our_case = (?A..?Z) === s[0]
+ def shortest_abbreviation(s='', m=callable_methods)
+ s=s.to_s
+ our_case = (?A..?Z)===s[0]
if m.index(s.to_sym)
- 1.upto(s.size){|z| s.scan(/./).combination(z).map{|trial|
- next unless ((?A..?Z) === trial[0]) == our_case
- trial *= ''
- return trial if matching_methods(trial, m)[0].to_s == s
+ 1.upto(s.size){|z|s.scan(/./).combination(z).map{|trial|
+ next unless ((?A..?Z)===trial[0]) == our_case
+ trial*=''
+ return trial if matching_methods(trial,m)[0].to_s==s
}}
else
nil
@@ -46,7 +45,7 @@ class Object
private
- def h(a = 'H', b = 'w', c = '!')
+ def h(a='H', b='w', c='!')
puts "#{a}ello, #{b}orld#{c}"
end
@@ -85,14 +84,14 @@ class String
split('')
end
- (Array.instance_methods - instance_methods - [:to_ary, :transpose, :flatten, :flatten!, :compact, :compact!, :assoc, :rassoc]).each{|meth|
- eval "
+ (Array.instance_methods-instance_methods-[:to_ary,:transpose,:flatten,:flatten!,:compact,:compact!,:assoc,:rassoc]).each{|meth|
+ eval"
def #{meth}(*args, &block)
- a = to_a
+ a=to_a
result = a.#{meth}(*args, &block)
replace(a.join)
if result.class == Array
- Integer === result[0] ? result.pack('c*') : result.join
+ Integer===result[0] ? result.pack('c*') : result.join
elsif result.class == Enumerator
result.map(&:join).to_enum
else
@@ -104,8 +103,8 @@ end
class Enumerator
alias old_to_s to_s
- (Array.instance_methods - instance_methods - [:replace] + [:to_s]).each{|meth|
- eval "
+ (Array.instance_methods-instance_methods-[:replace]+[:to_s]).each{|meth|
+ eval"
def #{meth}(*args, &block)
to_a.#{meth}(*args, &block)
end"
diff --git a/goruby.c b/goruby.c
index 8f7cf30be4..6095fc0894 100644
--- a/goruby.c
+++ b/goruby.c
@@ -20,7 +20,7 @@ RUBY_EXTERN void ruby_init_ext(const char *name, void (*init)(void));
static VALUE
init_golf(VALUE arg)
{
- ruby_init_ext("golf.so", Init_golf);
+ ruby_init_ext("golf", Init_golf);
return arg;
}
diff --git a/hash.c b/hash.c
index 1fa40b1bba..df0adb19fb 100644
--- a/hash.c
+++ b/hash.c
@@ -27,24 +27,10 @@
# endif
#endif
-#define HAS_MISC_ATTRIBUTES(hash, klass) ( \
- (klass = rb_obj_class(hash)) != rb_cHash || \
- (klass = 0, \
- FL_TEST((hash), FL_EXIVAR|FL_TAINT|HASH_PROC_DEFAULT) || \
- !NIL_P(RHASH_IFNONE(hash))))
-#define HASH_REJECT_COPY_MISC_ATTRIBUTES 1
-
static VALUE rb_hash_s_try_convert(VALUE, VALUE);
-/*
- * Hash WB strategy:
- * 1. Check mutate st_* functions
- * * st_insert()
- * * st_insert2()
- * * st_update()
- * * st_add_direct()
- * 2. Insert WBs
- */
+#define HASH_DELETED FL_USER1
+#define HASH_PROC_DEFAULT FL_USER2
VALUE
rb_hash_freeze(VALUE hash)
@@ -57,13 +43,6 @@ VALUE rb_cHash;
static VALUE envtbl;
static ID id_hash, id_yield, id_default;
-VALUE
-rb_hash_set_ifnone(VALUE hash, VALUE ifnone)
-{
- RB_OBJ_WRITE(hash, (&RHASH(hash)->ifnone), ifnone);
- return hash;
-}
-
static int
rb_any_cmp(VALUE a, VALUE b)
{
@@ -83,32 +62,22 @@ rb_any_cmp(VALUE a, VALUE b)
return !rb_eql(a, b);
}
-static VALUE
-hash_recursive(VALUE obj, VALUE arg, int recurse)
-{
- if (recurse) return INT2FIX(0);
- return rb_funcallv(obj, id_hash, 0, 0);
-}
-
VALUE
rb_hash(VALUE obj)
{
- VALUE hval = rb_exec_recursive_outer(hash_recursive, obj, 0);
-
- while (!FIXNUM_P(hval)) {
- if (RB_TYPE_P(hval, T_BIGNUM)) {
- int sign;
- unsigned long ul;
- sign = rb_integer_pack(hval, &ul, 1, sizeof(ul), 0,
- INTEGER_PACK_NATIVE_BYTE_ORDER);
- ul &= (1UL << (sizeof(long)*CHAR_BIT-1)) - 1;
- if (sign < 0)
- return LONG2FIX(-(long)ul);
- return LONG2FIX((long)ul);
- }
+ VALUE hval = rb_funcall(obj, id_hash, 0);
+ retry:
+ switch (TYPE(hval)) {
+ case T_FIXNUM:
+ return hval;
+
+ case T_BIGNUM:
+ return LONG2FIX(((long*)(RBIGNUM_DIGITS(hval)))[0]);
+
+ default:
hval = rb_to_int(hval);
+ goto retry;
}
- return hval;
}
static st_index_t
@@ -119,9 +88,7 @@ rb_any_hash(VALUE a)
if (SPECIAL_CONST_P(a)) {
if (a == Qundef) return 0;
- hnum = rb_hash_start((st_index_t)a);
- hnum = rb_hash_uint(hnum, (st_index_t)rb_any_hash);
- hnum = rb_hash_end(hnum);
+ hnum = rb_hash_end(rb_hash_start((st_index_t)a));
}
else if (BUILTIN_TYPE(a) == T_STRING) {
hnum = rb_str_hash(a);
@@ -151,12 +118,10 @@ struct foreach_safe_arg {
};
static int
-foreach_safe_i(st_data_t key, st_data_t value, st_data_t args, int error)
+foreach_safe_i(st_data_t key, st_data_t value, struct foreach_safe_arg *arg)
{
int status;
- struct foreach_safe_arg *arg = (void *)args;
- if (error) return ST_STOP;
status = (*arg->func)(key, value, arg->arg);
if (status == ST_CONTINUE) {
return ST_CHECK;
@@ -186,13 +151,12 @@ struct hash_foreach_arg {
};
static int
-hash_foreach_iter(st_data_t key, st_data_t value, st_data_t argp, int error)
+hash_foreach_iter(st_data_t key, st_data_t value, st_data_t argp)
{
struct hash_foreach_arg *arg = (struct hash_foreach_arg *)argp;
int status;
st_table *tbl;
- if (error) return ST_STOP;
tbl = RHASH(arg->hash)->ntbl;
status = (*arg->func)((VALUE)key, (VALUE)value, arg->arg);
if (RHASH(arg->hash)->ntbl != tbl) {
@@ -211,13 +175,6 @@ hash_foreach_iter(st_data_t key, st_data_t value, st_data_t argp, int error)
}
static VALUE
-hash_foreach_ensure_rollback(VALUE hash)
-{
- RHASH_ITER_LEV(hash)++;
- return 0;
-}
-
-static VALUE
hash_foreach_ensure(VALUE hash)
{
if (--RHASH_ITER_LEV(hash) == 0) {
@@ -256,9 +213,9 @@ rb_hash_foreach(VALUE hash, int (*func)(ANYARGS), VALUE farg)
static VALUE
hash_alloc(VALUE klass)
{
- NEWOBJ_OF(hash, struct RHash, klass, T_HASH | (RGENGC_WB_PROTECTED_HASH ? FL_WB_PROTECTED : 0));
+ NEWOBJ_OF(hash, struct RHash, klass, T_HASH);
- RHASH_SET_IFNONE((VALUE)hash, Qnil);
+ RHASH_IFNONE(hash) = Qnil;
return (VALUE)hash;
}
@@ -279,39 +236,34 @@ rb_hash_new(void)
return hash_alloc(rb_cHash);
}
-static VALUE
-rb_hash_dup_empty(VALUE hash)
+VALUE
+rb_hash_dup(VALUE hash)
{
NEWOBJ_OF(ret, struct RHash,
rb_obj_class(hash),
- (RBASIC(hash)->flags)&(T_MASK|FL_EXIVAR|FL_TAINT));
+ (RBASIC(hash)->flags)&(T_MASK|FL_EXIVAR|FL_TAINT|FL_UNTRUSTED));
if (FL_TEST((hash), FL_EXIVAR))
rb_copy_generic_ivar((VALUE)(ret),(VALUE)(hash));
+ if (!RHASH_EMPTY_P(hash))
+ ret->ntbl = st_copy(RHASH(hash)->ntbl);
if (FL_TEST(hash, HASH_PROC_DEFAULT)) {
FL_SET(ret, HASH_PROC_DEFAULT);
}
- RHASH_SET_IFNONE(ret, RHASH_IFNONE(hash));
+ RHASH_IFNONE(ret) = RHASH_IFNONE(hash);
return (VALUE)ret;
}
-VALUE
-rb_hash_dup(VALUE hash)
-{
- VALUE ret = rb_hash_dup_empty(hash);
- if (!RHASH_EMPTY_P(hash))
- RHASH(ret)->ntbl = st_copy(RHASH(hash)->ntbl);
- return ret;
-}
-
static void
rb_hash_modify_check(VALUE hash)
{
rb_check_frozen(hash);
+ if (!OBJ_UNTRUSTED(hash) && rb_safe_level() >= 4)
+ rb_raise(rb_eSecurityError, "Insecure: can't modify hash");
}
-static struct st_table *
-hash_tbl(VALUE hash)
+struct st_table *
+rb_hash_tbl(VALUE hash)
{
if (!RHASH(hash)->ntbl) {
RHASH(hash)->ntbl = st_init_table(&objhash);
@@ -319,24 +271,11 @@ hash_tbl(VALUE hash)
return RHASH(hash)->ntbl;
}
-struct st_table *
-rb_hash_tbl(VALUE hash)
-{
- OBJ_WB_UNPROTECT(hash);
- return hash_tbl(hash);
-}
-
-struct st_table *
-rb_hash_tbl_raw(VALUE hash)
-{
- return hash_tbl(hash);
-}
-
static void
rb_hash_modify(VALUE hash)
{
rb_hash_modify_check(hash);
- hash_tbl(hash);
+ rb_hash_tbl(hash);
}
NORETURN(static void no_new_key(void));
@@ -346,62 +285,20 @@ no_new_key(void)
rb_raise(rb_eRuntimeError, "can't add a new key into hash during iteration");
}
-struct update_callback_arg {
- VALUE hash;
- st_data_t arg;
-};
-
-#define NOINSERT_UPDATE_CALLBACK(func) \
-static int \
+#define NOINSERT_UPDATE_CALLBACK(func) \
+int \
func##_noinsert(st_data_t *key, st_data_t *val, st_data_t arg, int existing) \
-{ \
- if (!existing) no_new_key(); \
- return func(key, val, (struct update_arg *)arg, existing); \
-} \
- \
-static int \
-func##_insert(st_data_t *key, st_data_t *val, st_data_t arg, int existing) \
-{ \
- return func(key, val, (struct update_arg *)arg, existing); \
-}
-
-struct update_arg {
- st_data_t arg;
- VALUE hash;
- VALUE new_key;
- VALUE old_key;
- VALUE new_value;
- VALUE old_value;
-};
-
-static int
-tbl_update(VALUE hash, VALUE key, int (*func)(st_data_t *key, st_data_t *val, st_data_t arg, int existing), st_data_t optional_arg)
-{
- struct update_arg arg;
- int result;
-
- arg.arg = optional_arg;
- arg.hash = hash;
- arg.new_key = 0;
- arg.old_key = Qundef;
- arg.new_value = 0;
- arg.old_value = Qundef;
-
- result = st_update(RHASH(hash)->ntbl, (st_data_t)key, func, (st_data_t)&arg);
-
- /* write barrier */
- if (arg.new_key) RB_OBJ_WRITTEN(hash, arg.old_key, arg.new_key);
- if (arg.new_value) RB_OBJ_WRITTEN(hash, arg.old_value, arg.new_value);
-
- return result;
+{ \
+ if (!existing) no_new_key(); \
+ return func(key, val, arg, existing); \
}
-#define UPDATE_CALLBACK(iter_lev, func) ((iter_lev) > 0 ? func##_noinsert : func##_insert)
-
-#define RHASH_UPDATE_ITER(h, iter_lev, key, func, a) do { \
- tbl_update((h), (key), UPDATE_CALLBACK((iter_lev), func), (st_data_t)(a)); \
-} while (0)
+#define UPDATE_CALLBACK(iter_lev, func) ((iter_lev) > 0 ? func##_noinsert : func)
+#define RHASH_UPDATE_ITER(hash, iter_lev, key, func, arg) \
+ st_update(RHASH(hash)->ntbl, (st_data_t)(key), \
+ UPDATE_CALLBACK((iter_lev), func), \
+ (st_data_t)(arg))
#define RHASH_UPDATE(hash, key, func, arg) \
RHASH_UPDATE_ITER(hash, RHASH_ITER_LEV(hash), key, func, arg)
@@ -461,12 +358,12 @@ rb_hash_initialize(int argc, VALUE *argv, VALUE hash)
rb_check_arity(argc, 0, 0);
ifnone = rb_block_proc();
default_proc_arity_check(ifnone);
- RHASH_SET_IFNONE(hash, ifnone);
+ RHASH_IFNONE(hash) = ifnone;
FL_SET(hash, HASH_PROC_DEFAULT);
}
else {
rb_scan_args(argc, argv, "01", &ifnone);
- RHASH_SET_IFNONE(hash, ifnone);
+ RHASH_IFNONE(hash) = ifnone;
}
return hash;
@@ -478,14 +375,11 @@ rb_hash_initialize(int argc, VALUE *argv, VALUE hash)
* Hash[ [ [key, value], ... ] ] -> new_hash
* Hash[ object ] -> new_hash
*
- * Creates a new hash populated with the given objects.
- *
- * Similar to the literal <code>{ _key_ => _value_, ... }</code>. In the first
- * form, keys and values occur in pairs, so there must be an even number of
- * arguments.
- *
- * The second and third form take a single argument which is either an array
- * of key-value pairs or an object convertible to a hash.
+ * Creates a new hash populated with the given objects. Equivalent to
+ * the literal <code>{ <i>key</i> => <i>value</i>, ... }</code>. In the first
+ * form, keys and values occur in pairs, so there must be an even number of arguments.
+ * The second and third form take a single argument which is either
+ * an array of key-value pairs or an object convertible to a hash.
*
* Hash["a", 100, "b", 200] #=> {"a"=>100, "b"=>200}
* Hash[ [ ["a", 100], ["b", 200] ] ] #=> {"a"=>100, "b"=>200}
@@ -514,7 +408,7 @@ rb_hash_s_create(int argc, VALUE *argv, VALUE klass)
hash = hash_alloc(klass);
for (i = 0; i < RARRAY_LEN(tmp); ++i) {
- VALUE e = RARRAY_AREF(tmp, i);
+ VALUE e = RARRAY_PTR(tmp)[i];
VALUE v = rb_check_array_type(e);
VALUE key, val = Qnil;
@@ -536,9 +430,9 @@ rb_hash_s_create(int argc, VALUE *argv, VALUE klass)
rb_raise(rb_eArgError, "invalid number of elements (%ld for 1..2)",
RARRAY_LEN(v));
case 2:
- val = RARRAY_AREF(v, 1);
+ val = RARRAY_PTR(v)[1];
case 1:
- key = RARRAY_AREF(v, 0);
+ key = RARRAY_PTR(v)[0];
rb_hash_aset(hash, key, val);
}
}
@@ -586,11 +480,6 @@ rb_hash_s_try_convert(VALUE dummy, VALUE hash)
return rb_check_hash_type(hash);
}
-struct rehash_arg {
- VALUE hash;
- st_table *tbl;
-};
-
static int
rb_hash_rehash_i(VALUE key, VALUE value, VALUE arg)
{
@@ -623,7 +512,6 @@ rb_hash_rehash_i(VALUE key, VALUE value, VALUE arg)
static VALUE
rb_hash_rehash(VALUE hash)
{
- VALUE tmp;
st_table *tbl;
if (RHASH_ITER_LEV(hash) > 0) {
@@ -632,14 +520,10 @@ rb_hash_rehash(VALUE hash)
rb_hash_modify_check(hash);
if (!RHASH(hash)->ntbl)
return hash;
- tmp = hash_alloc(0);
tbl = st_init_table_with_size(RHASH(hash)->ntbl->type, RHASH(hash)->ntbl->num_entries);
- RHASH(tmp)->ntbl = tbl;
-
rb_hash_foreach(hash, rb_hash_rehash_i, (VALUE)tbl);
st_free_table(RHASH(hash)->ntbl);
RHASH(hash)->ntbl = tbl;
- RHASH(tmp)->ntbl = 0;
return hash;
}
@@ -750,7 +634,7 @@ rb_hash_fetch_m(int argc, VALUE *argv, VALUE hash)
desc = rb_any_to_s(key);
}
desc = rb_str_ellipsize(desc, 65);
- rb_raise(rb_eKeyError, "key not found: %"PRIsVALUE, desc);
+ rb_raise(rb_eKeyError, "key not found: %s", RSTRING_PTR(desc));
}
return if_none;
}
@@ -822,7 +706,7 @@ static VALUE
rb_hash_set_default(VALUE hash, VALUE ifnone)
{
rb_hash_modify_check(hash);
- RHASH_SET_IFNONE(hash, ifnone);
+ RHASH_IFNONE(hash) = ifnone;
FL_UNSET(hash, HASH_PROC_DEFAULT);
return ifnone;
}
@@ -872,7 +756,7 @@ rb_hash_set_default_proc(VALUE hash, VALUE proc)
rb_hash_modify_check(hash);
if (NIL_P(proc)) {
FL_UNSET(hash, HASH_PROC_DEFAULT);
- RHASH_SET_IFNONE(hash, proc);
+ RHASH_IFNONE(hash) = proc;
return proc;
}
b = rb_check_convert_type(proc, T_DATA, "Proc", "to_proc");
@@ -883,7 +767,7 @@ rb_hash_set_default_proc(VALUE hash, VALUE proc)
}
proc = b;
default_proc_arity_check(proc);
- RHASH_SET_IFNONE(hash, proc);
+ RHASH_IFNONE(hash) = proc;
FL_SET(hash, HASH_PROC_DEFAULT);
return proc;
}
@@ -991,6 +875,17 @@ struct shift_var {
};
static int
+shift_i(VALUE key, VALUE value, VALUE arg)
+{
+ struct shift_var *var = (struct shift_var *)arg;
+
+ if (var->key != Qundef) return ST_STOP;
+ var->key = key;
+ var->val = value;
+ return ST_DELETE;
+}
+
+static int
shift_i_safe(VALUE key, VALUE value, VALUE arg)
{
struct shift_var *var = (struct shift_var *)arg;
@@ -1021,17 +916,14 @@ rb_hash_shift(VALUE hash)
rb_hash_modify_check(hash);
if (RHASH(hash)->ntbl) {
var.key = Qundef;
- if (RHASH_ITER_LEV(hash) == 0) {
- if (st_shift(RHASH(hash)->ntbl, &var.key, &var.val)) {
- return rb_assoc_new(var.key, var.val);
- }
- }
- else {
- rb_hash_foreach(hash, shift_i_safe, (VALUE)&var);
- if (var.key != Qundef) {
+ rb_hash_foreach(hash, RHASH_ITER_LEV(hash) > 0 ? shift_i_safe : shift_i,
+ (VALUE)&var);
+
+ if (var.key != Qundef) {
+ if (RHASH_ITER_LEV(hash) > 0) {
rb_hash_delete_key(hash, var.key);
- return rb_assoc_new(var.key, var.val);
}
+ return rb_assoc_new(var.key, var.val);
}
}
return hash_default_value(hash, Qnil);
@@ -1041,19 +933,13 @@ static int
delete_if_i(VALUE key, VALUE value, VALUE hash)
{
if (RTEST(rb_yield_values(2, key, value))) {
- return ST_DELETE;
+ rb_hash_delete_key(hash, key);
}
return ST_CONTINUE;
}
static VALUE rb_hash_size(VALUE hash);
-static VALUE
-hash_enum_size(VALUE hash, VALUE args, VALUE eobj)
-{
- return rb_hash_size(hash);
-}
-
/*
* call-seq:
* hsh.delete_if {| key, value | block } -> hsh
@@ -1072,7 +958,7 @@ hash_enum_size(VALUE hash, VALUE args, VALUE eobj)
VALUE
rb_hash_delete_if(VALUE hash)
{
- RETURN_SIZED_ENUMERATOR(hash, 0, 0, hash_enum_size);
+ RETURN_SIZED_ENUMERATOR(hash, 0, 0, rb_hash_size);
rb_hash_modify_check(hash);
if (RHASH(hash)->ntbl)
rb_hash_foreach(hash, delete_if_i, hash);
@@ -1093,80 +979,31 @@ rb_hash_reject_bang(VALUE hash)
{
st_index_t n;
- RETURN_SIZED_ENUMERATOR(hash, 0, 0, hash_enum_size);
+ RETURN_SIZED_ENUMERATOR(hash, 0, 0, rb_hash_size);
rb_hash_modify(hash);
- n = RHASH_SIZE(hash);
- if (!n) return Qnil;
+ if (!RHASH(hash)->ntbl)
+ return Qnil;
+ n = RHASH(hash)->ntbl->num_entries;
rb_hash_foreach(hash, delete_if_i, hash);
if (n == RHASH(hash)->ntbl->num_entries) return Qnil;
return hash;
}
-static int
-reject_i(VALUE key, VALUE value, VALUE result)
-{
- if (!RTEST(rb_yield_values(2, key, value))) {
- rb_hash_aset(result, key, value);
- }
- return ST_CONTINUE;
-}
-
/*
* call-seq:
- * hsh.reject {|key, value| block} -> a_hash
- * hsh.reject -> an_enumerator
- *
- * Returns a new hash consisting of entries for which the block returns false.
+ * hsh.reject {| key, value | block } -> a_hash
+ * hsh.reject -> an_enumerator
*
- * If no block is given, an enumerator is returned instead.
+ * Same as <code>Hash#delete_if</code>, but works on (and returns) a
+ * copy of the <i>hsh</i>. Equivalent to
+ * <code><i>hsh</i>.dup.delete_if</code>.
*
- * h = { "a" => 100, "b" => 200, "c" => 300 }
- * h.reject {|k,v| k < "b"} #=> {"b" => 200, "c" => 300}
- * h.reject {|k,v| v > 100} #=> {"a" => 100}
*/
-VALUE
+static VALUE
rb_hash_reject(VALUE hash)
{
- VALUE result;
-
- RETURN_SIZED_ENUMERATOR(hash, 0, 0, hash_enum_size);
- if (RTEST(ruby_verbose)) {
- VALUE klass;
- if (HAS_MISC_ATTRIBUTES(hash, klass)) {
-#if HASH_REJECT_COPY_MISC_ATTRIBUTES
- rb_warn("copying unguaranteed attributes: %+"PRIsVALUE, hash);
- rb_warn("following atributes will not be copied in the future version:");
- if (klass != rb_cHash) {
- rb_warn(" subclass: %+"PRIsVALUE, klass);
- }
- if (FL_TEST(hash, FL_EXIVAR)) {
- rb_warn(" instance variables: %+"PRIsVALUE,
- rb_obj_instance_variables(hash));
- }
- if (FL_TEST(hash, FL_TAINT)) {
- rb_warn(" taintedness");
- }
- if (FL_TEST(hash, HASH_PROC_DEFAULT)) {
- rb_warn(" default proc: %+"PRIsVALUE, RHASH_IFNONE(hash));
- }
- else if (!NIL_P(RHASH_IFNONE(hash)))
- rb_warn(" default value: %+"PRIsVALUE, RHASH_IFNONE(hash));
-#else
- rb_warn("unguaranteed attributes are not copied: %+"PRIsVALUE, hash);
- rb_warn("following atributes are ignored now:");
-#endif
- }
- }
-#if HASH_REJECT_COPY_MISC_ATTRIBUTES
- result = rb_hash_dup_empty(hash);
-#else
- result = rb_hash_new();
-#endif
- if (!RHASH_EMPTY_P(hash)) {
- rb_hash_foreach(hash, reject_i, result);
- }
- return result;
+ return rb_hash_delete_if(rb_obj_dup(hash));
}
/*
@@ -1195,9 +1032,8 @@ rb_hash_values_at(int argc, VALUE *argv, VALUE hash)
static int
select_i(VALUE key, VALUE value, VALUE result)
{
- if (RTEST(rb_yield_values(2, key, value))) {
+ if (RTEST(rb_yield_values(2, key, value)))
rb_hash_aset(result, key, value);
- }
return ST_CONTINUE;
}
@@ -1220,11 +1056,9 @@ rb_hash_select(VALUE hash)
{
VALUE result;
- RETURN_SIZED_ENUMERATOR(hash, 0, 0, hash_enum_size);
+ RETURN_SIZED_ENUMERATOR(hash, 0, 0, rb_hash_size);
result = rb_hash_new();
- if (!RHASH_EMPTY_P(hash)) {
- rb_hash_foreach(hash, select_i, result);
- }
+ rb_hash_foreach(hash, select_i, result);
return result;
}
@@ -1251,7 +1085,7 @@ rb_hash_select_bang(VALUE hash)
{
st_index_t n;
- RETURN_SIZED_ENUMERATOR(hash, 0, 0, hash_enum_size);
+ RETURN_SIZED_ENUMERATOR(hash, 0, 0, rb_hash_size);
rb_hash_modify_check(hash);
if (!RHASH(hash)->ntbl)
return Qnil;
@@ -1276,7 +1110,7 @@ rb_hash_select_bang(VALUE hash)
VALUE
rb_hash_keep_if(VALUE hash)
{
- RETURN_SIZED_ENUMERATOR(hash, 0, 0, hash_enum_size);
+ RETURN_SIZED_ENUMERATOR(hash, 0, 0, rb_hash_size);
rb_hash_modify_check(hash);
if (RHASH(hash)->ntbl)
rb_hash_foreach(hash, keep_if_i, hash);
@@ -1317,55 +1151,37 @@ rb_hash_clear(VALUE hash)
}
static int
-hash_aset(st_data_t *key, st_data_t *val, struct update_arg *arg, int existing)
+hash_aset(st_data_t *key, st_data_t *val, st_data_t arg, int existing)
{
- if (existing) {
- arg->new_value = arg->arg;
- arg->old_value = *val;
- }
- else {
- arg->new_key = *key;
- arg->new_value = arg->arg;
- }
- *val = arg->arg;
+ *val = arg;
return ST_CONTINUE;
}
static int
-hash_aset_str(st_data_t *key, st_data_t *val, struct update_arg *arg, int existing)
+hash_aset_str(st_data_t *key, st_data_t *val, st_data_t arg, int existing)
{
- if (!existing) {
- *key = rb_str_new_frozen(*key);
- }
+ *key = (st_data_t)rb_str_new_frozen((VALUE)*key);
return hash_aset(key, val, arg, existing);
}
-NOINSERT_UPDATE_CALLBACK(hash_aset);
-NOINSERT_UPDATE_CALLBACK(hash_aset_str);
+static NOINSERT_UPDATE_CALLBACK(hash_aset)
+static NOINSERT_UPDATE_CALLBACK(hash_aset_str)
/*
* call-seq:
* hsh[key] = value -> value
* hsh.store(key, value) -> value
*
- * == Element Assignment
- *
- * Associates the value given by +value+ with the key given by +key+.
+ * Element Assignment---Associates the value given by
+ * <i>value</i> with the key given by <i>key</i>.
+ * <i>key</i> should not have its value changed while it is in
+ * use as a key (a <code>String</code> passed as a key will be
+ * duplicated and frozen).
*
* h = { "a" => 100, "b" => 200 }
* h["a"] = 9
* h["c"] = 4
* h #=> {"a"=>9, "b"=>200, "c"=>4}
- * h.store("d", 42) #=> {"a"=>9, "b"=>200, "c"=>4, "d"=>42}
- *
- * +key+ should not have its value changed while it is in use as a key (an
- * <tt>unfrozen String</tt> passed as a key will be duplicated and frozen).
- *
- * a = "a"
- * b = "b".freeze
- * h = { a => 100, b => 200 }
- * h.key(100).equal? a #=> false
- * h.key(200).equal? b #=> true
*
*/
@@ -1378,7 +1194,7 @@ rb_hash_aset(VALUE hash, VALUE key, VALUE val)
rb_hash_modify(hash);
if (!tbl) {
if (iter_lev > 0) no_new_key();
- tbl = hash_tbl(hash);
+ tbl = RHASH_TBL(hash);
}
if (tbl->type == &identhash || rb_obj_class(key) != rb_cString) {
RHASH_UPDATE_ITER(hash, iter_lev, key, hash_aset, val);
@@ -1397,26 +1213,17 @@ replace_i(VALUE key, VALUE val, VALUE hash)
return ST_CONTINUE;
}
-/* :nodoc: */
static VALUE
rb_hash_initialize_copy(VALUE hash, VALUE hash2)
{
- st_table *ntbl;
-
rb_hash_modify_check(hash);
hash2 = to_hash(hash2);
Check_Type(hash2, T_HASH);
- ntbl = RHASH(hash)->ntbl;
- if (RHASH(hash2)->ntbl) {
- if (ntbl) st_free_table(ntbl);
+ if (!RHASH_EMPTY_P(hash2)) {
RHASH(hash)->ntbl = st_copy(RHASH(hash2)->ntbl);
- if (RHASH(hash)->ntbl->num_entries)
- rb_hash_rehash(hash);
- }
- else if (ntbl) {
- st_clear(ntbl);
+ rb_hash_rehash(hash);
}
if (FL_TEST(hash2, HASH_PROC_DEFAULT)) {
@@ -1425,7 +1232,7 @@ rb_hash_initialize_copy(VALUE hash, VALUE hash2)
else {
FL_UNSET(hash, HASH_PROC_DEFAULT);
}
- RHASH_SET_IFNONE(hash, RHASH_IFNONE(hash2));
+ RHASH_IFNONE(hash) = RHASH_IFNONE(hash2);
return hash;
}
@@ -1445,23 +1252,22 @@ rb_hash_initialize_copy(VALUE hash, VALUE hash2)
static VALUE
rb_hash_replace(VALUE hash, VALUE hash2)
{
- st_table *table2;
-
rb_hash_modify_check(hash);
- if (hash == hash2) return hash;
hash2 = to_hash(hash2);
-
- RHASH_SET_IFNONE(hash, RHASH_IFNONE(hash2));
- if (FL_TEST(hash2, HASH_PROC_DEFAULT))
- FL_SET(hash, HASH_PROC_DEFAULT);
- else
- FL_UNSET(hash, HASH_PROC_DEFAULT);
-
- table2 = RHASH(hash2)->ntbl;
-
+ if (hash == hash2) return hash;
rb_hash_clear(hash);
- if (table2) hash_tbl(hash)->type = table2->type;
+ if (RHASH(hash2)->ntbl) {
+ rb_hash_tbl(hash);
+ RHASH(hash)->ntbl->type = RHASH(hash2)->ntbl->type;
+ }
rb_hash_foreach(hash2, replace_i, hash);
+ RHASH_IFNONE(hash) = RHASH_IFNONE(hash2);
+ if (FL_TEST(hash2, HASH_PROC_DEFAULT)) {
+ FL_SET(hash, HASH_PROC_DEFAULT);
+ }
+ else {
+ FL_UNSET(hash, HASH_PROC_DEFAULT);
+ }
return hash;
}
@@ -1482,7 +1288,9 @@ rb_hash_replace(VALUE hash, VALUE hash2)
static VALUE
rb_hash_size(VALUE hash)
{
- return INT2FIX(RHASH_SIZE(hash));
+ if (!RHASH(hash)->ntbl)
+ return INT2FIX(0);
+ return INT2FIX(RHASH(hash)->ntbl->num_entries);
}
@@ -1531,7 +1339,7 @@ each_value_i(VALUE key, VALUE value)
static VALUE
rb_hash_each_value(VALUE hash)
{
- RETURN_SIZED_ENUMERATOR(hash, 0, 0, hash_enum_size);
+ RETURN_SIZED_ENUMERATOR(hash, 0, 0, rb_hash_size);
rb_hash_foreach(hash, each_value_i, 0);
return hash;
}
@@ -1564,7 +1372,7 @@ each_key_i(VALUE key, VALUE value)
static VALUE
rb_hash_each_key(VALUE hash)
{
- RETURN_SIZED_ENUMERATOR(hash, 0, 0, hash_enum_size);
+ RETURN_SIZED_ENUMERATOR(hash, 0, 0, rb_hash_size);
rb_hash_foreach(hash, each_key_i, 0);
return hash;
}
@@ -1576,13 +1384,6 @@ each_pair_i(VALUE key, VALUE value)
return ST_CONTINUE;
}
-static int
-each_pair_i_fast(VALUE key, VALUE value)
-{
- rb_yield_values(2, key, value);
- return ST_CONTINUE;
-}
-
/*
* call-seq:
* hsh.each {| key, value | block } -> hsh
@@ -1608,11 +1409,8 @@ each_pair_i_fast(VALUE key, VALUE value)
static VALUE
rb_hash_each_pair(VALUE hash)
{
- RETURN_SIZED_ENUMERATOR(hash, 0, 0, hash_enum_size);
- if (rb_block_arity() > 1)
- rb_hash_foreach(hash, each_pair_i_fast, 0);
- else
- rb_hash_foreach(hash, each_pair_i, 0);
+ RETURN_SIZED_ENUMERATOR(hash, 0, 0, rb_hash_size);
+ rb_hash_foreach(hash, each_pair_i, 0);
return hash;
}
@@ -1639,7 +1437,7 @@ rb_hash_to_a(VALUE hash)
{
VALUE ary;
- ary = rb_ary_new_capa(RHASH_SIZE(hash));
+ ary = rb_ary_new();
rb_hash_foreach(hash, to_a_i, ary);
OBJ_INFECT(ary, hash);
@@ -1732,7 +1530,7 @@ rb_hash_to_h(VALUE hash)
if (FL_TEST(hash, HASH_PROC_DEFAULT)) {
FL_SET(ret, HASH_PROC_DEFAULT);
}
- RHASH_SET_IFNONE(ret, RHASH_IFNONE(hash));
+ RHASH_IFNONE(ret) = RHASH_IFNONE(hash);
return ret;
}
return hash;
@@ -1757,29 +1555,15 @@ keys_i(VALUE key, VALUE value, VALUE ary)
*
*/
-VALUE
+static VALUE
rb_hash_keys(VALUE hash)
{
- VALUE keys;
- st_index_t size = RHASH_SIZE(hash);
-
- keys = rb_ary_new_capa(size);
- if (size == 0) return keys;
-
- if (ST_DATA_COMPATIBLE_P(VALUE)) {
- st_table *table = RHASH(hash)->ntbl;
+ VALUE ary;
- if (OBJ_PROMOTED(keys)) rb_gc_writebarrier_remember_promoted(keys);
- RARRAY_PTR_USE(keys, ptr, {
- size = st_keys_check(table, ptr, size, Qundef);
- });
- rb_ary_set_len(keys, size);
- }
- else {
- rb_hash_foreach(hash, keys_i, keys);
- }
+ ary = rb_ary_new();
+ rb_hash_foreach(hash, keys_i, ary);
- return keys;
+ return ary;
}
static int
@@ -1801,29 +1585,15 @@ values_i(VALUE key, VALUE value, VALUE ary)
*
*/
-VALUE
+static VALUE
rb_hash_values(VALUE hash)
{
- VALUE values;
- st_index_t size = RHASH_SIZE(hash);
-
- values = rb_ary_new_capa(size);
- if (size == 0) return values;
-
- if (ST_DATA_COMPATIBLE_P(VALUE)) {
- st_table *table = RHASH(hash)->ntbl;
+ VALUE ary;
- if (OBJ_PROMOTED(values)) rb_gc_writebarrier_remember_promoted(values);
- RARRAY_PTR_USE(values, ptr, {
- size = st_values_check(table, ptr, size, Qundef);
- });
- rb_ary_set_len(values, size);
- }
- else {
- rb_hash_foreach(hash, values_i, values);
- }
+ ary = rb_ary_new();
+ rb_hash_foreach(hash, values_i, ary);
- return values;
+ return ary;
}
/*
@@ -2007,6 +1777,23 @@ hash_i(VALUE key, VALUE val, VALUE arg)
return ST_CONTINUE;
}
+static VALUE
+recursive_hash(VALUE hash, VALUE dummy, int recur)
+{
+ st_index_t hval;
+
+ if (!RHASH(hash)->ntbl)
+ return LONG2FIX(0);
+ hval = RHASH(hash)->ntbl->num_entries;
+ if (!hval) return LONG2FIX(0);
+ if (recur)
+ hval = rb_hash_uint(rb_hash_start(rb_hash(rb_cHash)), hval);
+ else
+ rb_hash_foreach(hash, hash_i, (VALUE)&hval);
+ hval = rb_hash_end(hval);
+ return INT2FIX(hval);
+}
+
/*
* call-seq:
* hsh.hash -> fixnum
@@ -2018,14 +1805,7 @@ hash_i(VALUE key, VALUE val, VALUE arg)
static VALUE
rb_hash_hash(VALUE hash)
{
- st_index_t size = RHASH_SIZE(hash);
- st_index_t hval = rb_hash_start(size);
- hval = rb_hash_uint(hval, (st_index_t)rb_hash_hash);
- if (size) {
- rb_hash_foreach(hash, hash_i, (VALUE)&hval);
- }
- hval = rb_hash_end(hval);
- return INT2FIX(hval);
+ return rb_exec_recursive_outer(recursive_hash, hash, 0);
}
static int
@@ -2057,21 +1837,13 @@ rb_hash_invert(VALUE hash)
}
static int
-rb_hash_update_callback(st_data_t *key, st_data_t *value, struct update_arg *arg, int existing)
+rb_hash_update_callback(st_data_t *key, st_data_t *value, st_data_t arg, int existing)
{
- if (existing) {
- arg->old_value = *value;
- arg->new_value = arg->arg;
- }
- else {
- arg->new_key = *key;
- arg->new_value = arg->arg;
- }
- *value = arg->arg;
+ *value = arg;
return ST_CONTINUE;
}
-NOINSERT_UPDATE_CALLBACK(rb_hash_update_callback);
+static NOINSERT_UPDATE_CALLBACK(rb_hash_update_callback)
static int
rb_hash_update_i(VALUE key, VALUE value, VALUE hash)
@@ -2081,24 +1853,17 @@ rb_hash_update_i(VALUE key, VALUE value, VALUE hash)
}
static int
-rb_hash_update_block_callback(st_data_t *key, st_data_t *value, struct update_arg *arg, int existing)
+rb_hash_update_block_callback(st_data_t *key, st_data_t *value, st_data_t arg, int existing)
{
- VALUE newvalue = (VALUE)arg->arg;
-
+ VALUE newvalue = (VALUE)arg;
if (existing) {
newvalue = rb_yield_values(3, (VALUE)*key, (VALUE)*value, newvalue);
- arg->old_value = *value;
- arg->new_value = newvalue;
- }
- else {
- arg->new_key = *key;
- arg->new_value = newvalue;
}
- *value = newvalue;
+ *value = (st_data_t)newvalue;
return ST_CONTINUE;
}
-NOINSERT_UPDATE_CALLBACK(rb_hash_update_block_callback);
+static NOINSERT_UPDATE_CALLBACK(rb_hash_update_block_callback)
static int
rb_hash_update_block_i(VALUE key, VALUE value, VALUE hash)
@@ -2144,41 +1909,34 @@ rb_hash_update(VALUE hash1, VALUE hash2)
return hash1;
}
-struct update_func_arg {
+struct update_arg {
VALUE hash;
VALUE value;
rb_hash_update_func *func;
};
static int
-rb_hash_update_func_callback(st_data_t *key, st_data_t *value, struct update_arg *arg, int existing)
+rb_hash_update_func_callback(st_data_t *key, st_data_t *value, st_data_t arg0, int existing)
{
- struct update_func_arg *uf_arg = (struct update_func_arg *)arg->arg;
- VALUE newvalue = uf_arg->value;
-
+ struct update_arg *arg = (struct update_arg *)arg0;
+ VALUE newvalue = arg->value;
if (existing) {
- newvalue = (*uf_arg->func)((VALUE)*key, (VALUE)*value, newvalue);
- arg->old_value = *value;
- arg->new_value = newvalue;
+ newvalue = (*arg->func)((VALUE)*key, (VALUE)*value, newvalue);
}
- else {
- arg->new_key = *key;
- arg->new_value = newvalue;
- }
- *value = newvalue;
+ *value = (st_data_t)newvalue;
return ST_CONTINUE;
}
-NOINSERT_UPDATE_CALLBACK(rb_hash_update_func_callback);
+static NOINSERT_UPDATE_CALLBACK(rb_hash_update_func_callback)
static int
rb_hash_update_func_i(VALUE key, VALUE value, VALUE arg0)
{
- struct update_func_arg *arg = (struct update_func_arg *)arg0;
+ struct update_arg *arg = (struct update_arg *)arg0;
VALUE hash = arg->hash;
arg->value = value;
- RHASH_UPDATE(hash, key, rb_hash_update_func_callback, (VALUE)arg);
+ RHASH_UPDATE(hash, key, rb_hash_update_func_callback, arg);
return ST_CONTINUE;
}
@@ -2188,7 +1946,7 @@ rb_hash_update_by(VALUE hash1, VALUE hash2, rb_hash_update_func *func)
rb_hash_modify(hash1);
hash2 = to_hash(hash2);
if (func) {
- struct update_func_arg arg;
+ struct update_arg arg;
arg.hash = hash1;
arg.func = func;
rb_hash_foreach(hash2, rb_hash_update_func_i, (VALUE)&arg);
@@ -2226,32 +1984,6 @@ rb_hash_merge(VALUE hash1, VALUE hash2)
}
static int
-assoc_cmp(VALUE a, VALUE b)
-{
- return !RTEST(rb_equal(a, b));
-}
-
-static VALUE
-lookup2_call(VALUE arg)
-{
- VALUE *args = (VALUE *)arg;
- return rb_hash_lookup2(args[0], args[1], Qundef);
-}
-
-struct reset_hash_type_arg {
- VALUE hash;
- const struct st_hash_type *orighash;
-};
-
-static VALUE
-reset_hash_type(VALUE arg)
-{
- struct reset_hash_type_arg *p = (struct reset_hash_type_arg *)arg;
- RHASH(p->hash)->ntbl->type = p->orighash;
- return Qundef;
-}
-
-static int
assoc_i(VALUE key, VALUE val, VALUE arg)
{
VALUE *args = (VALUE *)arg;
@@ -2278,33 +2010,11 @@ assoc_i(VALUE key, VALUE val, VALUE arg)
*/
VALUE
-rb_hash_assoc(VALUE hash, VALUE key)
+rb_hash_assoc(VALUE hash, VALUE obj)
{
- st_table *table;
- const struct st_hash_type *orighash;
VALUE args[2];
- if (RHASH_EMPTY_P(hash)) return Qnil;
- table = RHASH(hash)->ntbl;
- orighash = table->type;
-
- if (orighash != &identhash) {
- VALUE value;
- struct reset_hash_type_arg ensure_arg;
- struct st_hash_type assochash;
-
- assochash.compare = assoc_cmp;
- assochash.hash = orighash->hash;
- table->type = &assochash;
- args[0] = hash;
- args[1] = key;
- ensure_arg.hash = hash;
- ensure_arg.orighash = orighash;
- value = rb_ensure(lookup2_call, (VALUE)&args, reset_hash_type, (VALUE)&ensure_arg);
- if (value != Qundef) return rb_assoc_new(key, value);
- }
-
- args[0] = key;
+ args[0] = obj;
args[1] = Qnil;
rb_hash_foreach(hash, assoc_i, (VALUE)args);
return args[1];
@@ -2346,18 +2056,6 @@ rb_hash_rassoc(VALUE hash, VALUE obj)
return args[1];
}
-static int
-flatten_i(VALUE key, VALUE val, VALUE ary)
-{
- VALUE pair[2];
-
- pair[0] = key;
- pair[1] = val;
- rb_ary_cat(ary, pair, 2);
-
- return ST_CONTINUE;
-}
-
/*
* call-seq:
* hash.flatten -> an_array
@@ -2377,22 +2075,18 @@ flatten_i(VALUE key, VALUE val, VALUE ary)
static VALUE
rb_hash_flatten(int argc, VALUE *argv, VALUE hash)
{
- VALUE ary;
+ VALUE ary, tmp;
- ary = rb_ary_new_capa(RHASH_SIZE(hash) * 2);
- rb_hash_foreach(hash, flatten_i, ary);
- if (argc) {
- int level = NUM2INT(*argv) - 1;
- if (level > 0) {
- *argv = INT2FIX(level);
- rb_funcall2(ary, rb_intern("flatten!"), argc, argv);
- }
+ ary = rb_hash_to_a(hash);
+ if (argc == 0) {
+ argc = 1;
+ tmp = INT2FIX(1);
+ argv = &tmp;
}
+ rb_funcall2(ary, rb_intern("flatten!"), argc, argv);
return ary;
}
-static VALUE rb_hash_compare_by_id_p(VALUE hash);
-
/*
* call-seq:
* hsh.compare_by_identity -> hsh
@@ -2412,7 +2106,6 @@ static VALUE rb_hash_compare_by_id_p(VALUE hash);
static VALUE
rb_hash_compare_by_id(VALUE hash)
{
- if (rb_hash_compare_by_id_p(hash)) return hash;
rb_hash_modify(hash);
RHASH(hash)->ntbl->type = &identhash;
rb_hash_rehash(hash);
@@ -2449,18 +2142,7 @@ static char **my_environ;
#undef environ
#define environ my_environ
#undef getenv
-static inline char *
-w32_getenv(const char *name)
-{
- static int binary = -1;
- static int locale = -1;
- if (binary < 0) {
- binary = rb_ascii8bit_encindex();
- locale = rb_locale_encindex();
- }
- return locale == binary ? rb_w32_getenv(name) : rb_w32_ugetenv(name);
-}
-#define getenv(n) w32_getenv(n)
+#define getenv(n) rb_w32_ugetenv(n)
#elif defined(__APPLE__)
#undef environ
#define environ (*_NSGetEnviron())
@@ -2504,6 +2186,7 @@ env_delete(VALUE obj, VALUE name)
{
char *nam, *val;
+ rb_secure(4);
SafeStringValue(name);
nam = RSTRING_PTR(name);
if (memchr(nam, '\0', RSTRING_LEN(name))) {
@@ -2555,6 +2238,7 @@ rb_f_getenv(VALUE obj, VALUE name)
{
char *nam, *env;
+ rb_secure(4);
SafeStringValue(name);
nam = RSTRING_PTR(name);
if (memchr(nam, '\0', RSTRING_LEN(name))) {
@@ -2598,6 +2282,7 @@ env_fetch(int argc, VALUE *argv)
long block_given;
char *nam, *env;
+ rb_secure(4);
rb_scan_args(argc, argv, "11", &key, &if_none);
block_given = rb_block_given_p();
if (block_given && argc == 2) {
@@ -2612,7 +2297,7 @@ env_fetch(int argc, VALUE *argv)
if (!env) {
if (block_given) return rb_yield(key);
if (argc == 1) {
- rb_raise(rb_eKeyError, "key not found: \"%"PRIsVALUE"\"", key);
+ rb_raise(rb_eKeyError, "key not found");
}
return if_none;
}
@@ -2692,32 +2377,17 @@ getenvblocksize()
}
#endif
-#if !defined(HAVE_SETENV) || !defined(HAVE_UNSETENV)
-NORETURN(static void invalid_envname(const char *name));
-
-static void
-invalid_envname(const char *name)
-{
- rb_syserr_fail_str(EINVAL, rb_sprintf("ruby_setenv(%s)", name));
-}
-
-static const char *
-check_envname(const char *name)
-{
- if (strchr(name, '=')) {
- invalid_envname(name);
- }
- return name;
-}
-#endif
-
void
ruby_setenv(const char *name, const char *value)
{
#if defined(_WIN32)
VALUE buf;
int failed = 0;
- check_envname(name);
+ if (strchr(name, '=')) {
+ fail:
+ errno = EINVAL;
+ rb_sys_fail("ruby_setenv");
+ }
if (value) {
const char* p = GetEnvironmentStringsA();
if (!p) goto fail; /* never happen */
@@ -2738,29 +2408,28 @@ ruby_setenv(const char *name, const char *value)
if (!SetEnvironmentVariable(name, value) &&
GetLastError() != ERROR_ENVVAR_NOT_FOUND) goto fail;
}
- if (failed) {
- fail:
- invalid_envname(name);
- }
+ if (failed) goto fail;
#elif defined(HAVE_SETENV) && defined(HAVE_UNSETENV)
#undef setenv
#undef unsetenv
if (value) {
if (setenv(name, value, 1))
- rb_sys_fail_str(rb_sprintf("setenv(%s)", name));
- }
- else {
+ rb_sys_fail("setenv");
+ } else {
#ifdef VOID_UNSETENV
unsetenv(name);
#else
if (unsetenv(name))
- rb_sys_fail_str(rb_sprintf("unsetenv(%s)", name));
+ rb_sys_fail("unsetenv");
#endif
}
#elif defined __sun
size_t len;
char **env_ptr, *str;
-
+ if (strchr(name, '=')) {
+ errno = EINVAL;
+ rb_sys_fail("ruby_setenv");
+ }
len = strlen(name);
for (env_ptr = GET_ENVIRON(environ); (str = *env_ptr) != 0; ++env_ptr) {
if (!strncmp(str, name, len) && str[len] == '=') {
@@ -2773,12 +2442,15 @@ ruby_setenv(const char *name, const char *value)
str = malloc(len += strlen(value) + 2);
snprintf(str, len, "%s=%s", name, value);
if (putenv(str))
- rb_sys_fail_str(rb_sprintf("putenv(%s)", name));
+ rb_sys_fail("putenv");
}
#else /* WIN32 */
size_t len;
int i;
-
+ if (strchr(name, '=')) {
+ errno = EINVAL;
+ rb_sys_fail("ruby_setenv");
+ }
i=envix(name); /* where does it go? */
if (environ == origenviron) { /* need we copy environment? */
@@ -2837,6 +2509,10 @@ env_aset(VALUE obj, VALUE nm, VALUE val)
{
char *name, *value;
+ if (rb_safe_level() >= 4) {
+ rb_raise(rb_eSecurityError, "can't change environment variable");
+ }
+
if (NIL_P(val)) {
env_delete(obj, nm);
return Qnil;
@@ -2876,6 +2552,7 @@ env_keys(void)
char **env;
VALUE ary;
+ rb_secure(4);
ary = rb_ary_new();
env = GET_ENVIRON(environ);
while (*env) {
@@ -2889,12 +2566,23 @@ env_keys(void)
return ary;
}
+/*
+ * call-seq:
+ * ENV.each_key { |name| } -> Hash
+ * ENV.each_key -> Enumerator
+ *
+ * Yields each environment variable name.
+ *
+ * An Enumerator is returned if no block is given.
+ */
static VALUE
-rb_env_size(VALUE ehash, VALUE args, VALUE eobj)
+rb_env_size(VALUE ehash)
{
char **env;
long cnt = 0;
+ rb_secure(4);
+
env = GET_ENVIRON(environ);
for (; *env ; ++env) {
if (strchr(*env, '=')) {
@@ -2905,15 +2593,6 @@ rb_env_size(VALUE ehash, VALUE args, VALUE eobj)
return LONG2FIX(cnt);
}
-/*
- * call-seq:
- * ENV.each_key { |name| } -> Hash
- * ENV.each_key -> Enumerator
- *
- * Yields each environment variable name.
- *
- * An Enumerator is returned if no block is given.
- */
static VALUE
env_each_key(VALUE ehash)
{
@@ -2921,9 +2600,9 @@ env_each_key(VALUE ehash)
long i;
RETURN_SIZED_ENUMERATOR(ehash, 0, 0, rb_env_size);
- keys = env_keys();
+ keys = env_keys(); /* rb_secure(4); */
for (i=0; i<RARRAY_LEN(keys); i++) {
- rb_yield(RARRAY_AREF(keys, i));
+ rb_yield(RARRAY_PTR(keys)[i]);
}
return ehash;
}
@@ -2940,6 +2619,7 @@ env_values(void)
VALUE ary;
char **env;
+ rb_secure(4);
ary = rb_ary_new();
env = GET_ENVIRON(environ);
while (*env) {
@@ -2969,9 +2649,9 @@ env_each_value(VALUE ehash)
long i;
RETURN_SIZED_ENUMERATOR(ehash, 0, 0, rb_env_size);
- values = env_values();
+ values = env_values(); /* rb_secure(4); */
for (i=0; i<RARRAY_LEN(values); i++) {
- rb_yield(RARRAY_AREF(values, i));
+ rb_yield(RARRAY_PTR(values)[i]);
}
return ehash;
}
@@ -2996,6 +2676,7 @@ env_each_pair(VALUE ehash)
RETURN_SIZED_ENUMERATOR(ehash, 0, 0, rb_env_size);
+ rb_secure(4);
ary = rb_ary_new();
env = GET_ENVIRON(environ);
while (*env) {
@@ -3008,22 +2689,15 @@ env_each_pair(VALUE ehash)
}
FREE_ENVIRON(environ);
- if (rb_block_arity() > 1) {
- for (i=0; i<RARRAY_LEN(ary); i+=2) {
- rb_yield_values(2, RARRAY_AREF(ary, i), RARRAY_AREF(ary, i+1));
- }
- }
- else {
- for (i=0; i<RARRAY_LEN(ary); i+=2) {
- rb_yield(rb_assoc_new(RARRAY_AREF(ary, i), RARRAY_AREF(ary, i+1)));
- }
+ for (i=0; i<RARRAY_LEN(ary); i+=2) {
+ rb_yield(rb_assoc_new(RARRAY_PTR(ary)[i], RARRAY_PTR(ary)[i+1]));
}
return ehash;
}
/*
* call-seq:
- * ENV.reject! { |name, value| } -> ENV or nil
+ * ENV.reject! { |name, value| } -> Hash or nil
* ENV.reject! -> Enumerator
*
* Equivalent to ENV#delete_if but returns +nil+ if no changes were made.
@@ -3038,14 +2712,13 @@ env_reject_bang(VALUE ehash)
int del = 0;
RETURN_SIZED_ENUMERATOR(ehash, 0, 0, rb_env_size);
- keys = env_keys();
- RBASIC_CLEAR_CLASS(keys);
+ keys = env_keys(); /* rb_secure(4); */
for (i=0; i<RARRAY_LEN(keys); i++) {
- VALUE val = rb_f_getenv(Qnil, RARRAY_AREF(keys, i));
+ VALUE val = rb_f_getenv(Qnil, RARRAY_PTR(keys)[i]);
if (!NIL_P(val)) {
- if (RTEST(rb_yield_values(2, RARRAY_AREF(keys, i), val))) {
- FL_UNSET(RARRAY_AREF(keys, i), FL_TAINT);
- env_delete(Qnil, RARRAY_AREF(keys, i));
+ if (RTEST(rb_yield_values(2, RARRAY_PTR(keys)[i], val))) {
+ FL_UNSET(RARRAY_PTR(keys)[i], FL_TAINT);
+ env_delete(Qnil, RARRAY_PTR(keys)[i]);
del++;
}
}
@@ -3084,6 +2757,7 @@ env_values_at(int argc, VALUE *argv)
VALUE result;
long i;
+ rb_secure(4);
result = rb_ary_new();
for (i=0; i<argc; i++) {
rb_ary_push(result, rb_f_getenv(Qnil, argv[i]));
@@ -3107,6 +2781,7 @@ env_select(VALUE ehash)
char **env;
RETURN_SIZED_ENUMERATOR(ehash, 0, 0, rb_env_size);
+ rb_secure(4);
result = rb_hash_new();
env = GET_ENVIRON(environ);
while (*env) {
@@ -3140,14 +2815,13 @@ env_select_bang(VALUE ehash)
int del = 0;
RETURN_SIZED_ENUMERATOR(ehash, 0, 0, rb_env_size);
- keys = env_keys();
- RBASIC_CLEAR_CLASS(keys);
+ keys = env_keys(); /* rb_secure(4); */
for (i=0; i<RARRAY_LEN(keys); i++) {
- VALUE val = rb_f_getenv(Qnil, RARRAY_AREF(keys, i));
+ VALUE val = rb_f_getenv(Qnil, RARRAY_PTR(keys)[i]);
if (!NIL_P(val)) {
- if (!RTEST(rb_yield_values(2, RARRAY_AREF(keys, i), val))) {
- FL_UNSET(RARRAY_AREF(keys, i), FL_TAINT);
- env_delete(Qnil, RARRAY_AREF(keys, i));
+ if (!RTEST(rb_yield_values(2, RARRAY_PTR(keys)[i], val))) {
+ FL_UNSET(RARRAY_PTR(keys)[i], FL_TAINT);
+ env_delete(Qnil, RARRAY_PTR(keys)[i]);
del++;
}
}
@@ -3185,11 +2859,11 @@ rb_env_clear(void)
volatile VALUE keys;
long i;
- keys = env_keys();
+ keys = env_keys(); /* rb_secure(4); */
for (i=0; i<RARRAY_LEN(keys); i++) {
- VALUE val = rb_f_getenv(Qnil, RARRAY_AREF(keys, i));
+ VALUE val = rb_f_getenv(Qnil, RARRAY_PTR(keys)[i]);
if (!NIL_P(val)) {
- env_delete(Qnil, RARRAY_AREF(keys, i));
+ env_delete(Qnil, RARRAY_PTR(keys)[i]);
}
}
return envtbl;
@@ -3219,6 +2893,7 @@ env_inspect(void)
char **env;
VALUE str, i;
+ rb_secure(4);
str = rb_str_buf_new2("{");
env = GET_ENVIRON(environ);
while (*env) {
@@ -3249,7 +2924,7 @@ env_inspect(void)
*
* Converts the environment variables into an array of names and value arrays.
*
- * ENV.to_a # => [["TERM", "xterm-color"], ["SHELL", "/bin/bash"], ...]
+ * ENV.to_a # => [["TERM" => "xterm-color"], ["SHELL" => "/bin/bash"], ...]
*
*/
static VALUE
@@ -3258,6 +2933,7 @@ env_to_a(void)
char **env;
VALUE ary;
+ rb_secure(4);
ary = rb_ary_new();
env = GET_ENVIRON(environ);
while (*env) {
@@ -3298,6 +2974,7 @@ env_size(void)
int i;
char **env;
+ rb_secure(4);
env = GET_ENVIRON(environ);
for (i=0; env[i]; i++)
;
@@ -3316,6 +2993,7 @@ env_empty_p(void)
{
char **env;
+ rb_secure(4);
env = GET_ENVIRON(environ);
if (env[0] == 0) {
FREE_ENVIRON(environ);
@@ -3339,6 +3017,7 @@ env_has_key(VALUE env, VALUE key)
{
char *s;
+ rb_secure(4);
s = StringValuePtr(key);
if (memchr(s, '\0', RSTRING_LEN(key)))
rb_raise(rb_eArgError, "bad environment variable name");
@@ -3358,6 +3037,7 @@ env_assoc(VALUE env, VALUE key)
{
char *s, *e;
+ rb_secure(4);
s = StringValuePtr(key);
if (memchr(s, '\0', RSTRING_LEN(key)))
rb_raise(rb_eArgError, "bad environment variable name");
@@ -3378,6 +3058,7 @@ env_has_value(VALUE dmy, VALUE obj)
{
char **env;
+ rb_secure(4);
obj = rb_check_string_type(obj);
if (NIL_P(obj)) return Qnil;
env = GET_ENVIRON(environ);
@@ -3408,6 +3089,7 @@ env_rassoc(VALUE dmy, VALUE obj)
{
char **env;
+ rb_secure(4);
obj = rb_check_string_type(obj);
if (NIL_P(obj)) return Qnil;
env = GET_ENVIRON(environ);
@@ -3440,6 +3122,7 @@ env_key(VALUE dmy, VALUE value)
char **env;
VALUE str;
+ rb_secure(4);
StringValue(value);
env = GET_ENVIRON(environ);
while (*env) {
@@ -3485,6 +3168,7 @@ env_to_hash(void)
char **env;
VALUE hash;
+ rb_secure(4);
hash = rb_hash_new();
env = GET_ENVIRON(environ);
while (*env) {
@@ -3525,6 +3209,7 @@ env_shift(void)
{
char **env;
+ rb_secure(4);
env = GET_ENVIRON(environ);
if (*env) {
char *s = strchr(*env, '=');
@@ -3575,13 +3260,13 @@ env_replace(VALUE env, VALUE hash)
volatile VALUE keys;
long i;
- keys = env_keys();
+ keys = env_keys(); /* rb_secure(4); */
if (env == hash) return env;
hash = to_hash(hash);
rb_hash_foreach(hash, env_replace_i, keys);
for (i=0; i<RARRAY_LEN(keys); i++) {
- env_delete(env, RARRAY_AREF(keys, i));
+ env_delete(env, RARRAY_PTR(keys)[i]);
}
return env;
}
@@ -3609,6 +3294,7 @@ env_update_i(VALUE key, VALUE val)
static VALUE
env_update(VALUE env, VALUE hash)
{
+ rb_secure(4);
if (env == hash) return env;
hash = to_hash(hash);
rb_hash_foreach(hash, env_update_i, 0);
@@ -3659,7 +3345,7 @@ env_update(VALUE env, VALUE hash)
*
* Accessing a value in a Hash requires using its key:
*
- * puts grades["Jane Doe"] # => 0
+ * puts grades["Jane Doe"] # => 10
*
* === Common Uses
*
@@ -3871,7 +3557,4 @@ Init_Hash(void)
* See ENV (the class) for more details.
*/
rb_define_global_const("ENV", envtbl);
-
- /* for callcc */
- ruby_register_rollback_func_for_ensure(hash_foreach_ensure, hash_foreach_ensure_rollback);
}
diff --git a/include/ruby/backward/classext.h b/include/ruby/backward/classext.h
index 33f3b014b8..615e6f6858 100644
--- a/include/ruby/backward/classext.h
+++ b/include/ruby/backward/classext.h
@@ -13,6 +13,6 @@ typedef struct rb_deprecated_classext_struct {
#undef RCLASS_SUPER(c)
#define RCLASS_EXT(c) ((rb_deprecated_classext_t *)RCLASS(c)->ptr)
-#define RCLASS_SUPER(c) (RCLASS(c)->super)
+#define RCLASS_SUPER(c) (RCLASS_EXT(c)->super)
#endif /* RUBY_BACKWARD_CLASSEXT_H */
diff --git a/include/ruby/backward/rubysig.h b/include/ruby/backward/rubysig.h
index 945a09a8c8..f46679ae67 100644
--- a/include/ruby/backward/rubysig.h
+++ b/include/ruby/backward/rubysig.h
@@ -27,7 +27,9 @@ extern "C" {
#endif
#endif
-RUBY_SYMBOL_EXPORT_BEGIN
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility push(default)
+#endif
struct rb_blocking_region_buffer;
DEPRECATED(RUBY_EXTERN struct rb_blocking_region_buffer *rb_thread_blocking_region_begin(void));
@@ -40,7 +42,9 @@ DEPRECATED(RUBY_EXTERN void rb_thread_blocking_region_end(struct rb_blocking_reg
#define ALLOW_INTS do {CHECK_INTS;} while (0)
#define CHECK_INTS rb_thread_check_ints()
-RUBY_SYMBOL_EXPORT_END
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility pop
+#endif
#if defined(__cplusplus)
#if 0
diff --git a/include/ruby/debug.h b/include/ruby/debug.h
index 9bfc9b9a83..855aba88ce 100644
--- a/include/ruby/debug.h
+++ b/include/ruby/debug.h
@@ -19,34 +19,21 @@ extern "C" {
#endif
#endif
-RUBY_SYMBOL_EXPORT_BEGIN
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility push(default)
+#endif
/* Note: This file contains experimental APIs. */
/* APIs can be replaced at Ruby 2.0.1 or later */
-
-/* profile frames APIs */
-int rb_profile_frames(int start, int limit, VALUE *buff, int *lines);
-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_full_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);
-VALUE rb_profile_frame_method_name(VALUE frame);
-VALUE rb_profile_frame_qualified_method_name(VALUE frame);
-
/* debug inspector APIs */
typedef struct rb_debug_inspector_struct rb_debug_inspector_t;
typedef VALUE (*rb_debug_inspector_func_t)(const rb_debug_inspector_t *, void *);
VALUE rb_debug_inspector_open(rb_debug_inspector_func_t func, void *data);
-VALUE rb_debug_inspector_frame_self_get(const rb_debug_inspector_t *dc, long index);
-VALUE rb_debug_inspector_frame_class_get(const rb_debug_inspector_t *dc, long index);
-VALUE rb_debug_inspector_frame_binding_get(const rb_debug_inspector_t *dc, long index);
-VALUE rb_debug_inspector_frame_iseq_get(const rb_debug_inspector_t *dc, long index);
+VALUE rb_debug_inspector_frame_binding_get(const rb_debug_inspector_t *dc, int index);
+VALUE rb_debug_inspector_frame_class_get(const rb_debug_inspector_t *dc, int index);
+VALUE rb_debug_inspector_frame_iseq_get(const rb_debug_inspector_t *dc, int index);
VALUE rb_debug_inspector_backtrace_locations(const rb_debug_inspector_t *dc);
/* Old style set_trace_func APIs */
@@ -70,7 +57,6 @@ VALUE rb_tracepoint_enabled_p(VALUE tpval);
typedef struct rb_trace_arg_struct rb_trace_arg_t;
rb_trace_arg_t *rb_tracearg_from_tracepoint(VALUE tpval);
-rb_event_flag_t rb_tracearg_event_flag(rb_trace_arg_t *trace_arg);
VALUE rb_tracearg_event(rb_trace_arg_t *trace_arg);
VALUE rb_tracearg_lineno(rb_trace_arg_t *trace_arg);
VALUE rb_tracearg_path(rb_trace_arg_t *trace_arg);
@@ -80,12 +66,6 @@ VALUE rb_tracearg_binding(rb_trace_arg_t *trace_arg);
VALUE rb_tracearg_self(rb_trace_arg_t *trace_arg);
VALUE rb_tracearg_return_value(rb_trace_arg_t *trace_arg);
VALUE rb_tracearg_raised_exception(rb_trace_arg_t *trace_arg);
-VALUE rb_tracearg_object(rb_trace_arg_t *trace_arg);
-
-/* Postponed Job API */
-typedef void (*rb_postponed_job_func_t)(void *arg);
-int rb_postponed_job_register(unsigned int flags, rb_postponed_job_func_t func, void *data);
-int rb_postponed_job_register_one(unsigned int flags, rb_postponed_job_func_t func, void *data);
/* undocumented advanced tracing APIs */
@@ -98,7 +78,9 @@ typedef enum {
void rb_add_event_hook2(rb_event_hook_func_t func, rb_event_flag_t events, VALUE data, rb_event_hook_flag_t hook_flag);
void rb_thread_add_event_hook2(VALUE thval, rb_event_hook_func_t func, rb_event_flag_t events, VALUE data, rb_event_hook_flag_t hook_flag);
-RUBY_SYMBOL_EXPORT_END
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility pop
+#endif
#if defined(__cplusplus)
#if 0
diff --git a/include/ruby/defines.h b/include/ruby/defines.h
index 9659db7ef6..de0883d2c9 100644
--- a/include/ruby/defines.h
+++ b/include/ruby/defines.h
@@ -22,53 +22,12 @@ extern "C" {
#include RUBY_EXTCONF_H
#endif
-/* AC_INCLUDES_DEFAULT */
-#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-# include <stddef.h>
-#else
-# ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-# endif
-#endif
-#ifdef HAVE_STRING_H
-# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-# include <memory.h>
-# endif
-# include <string.h>
-#endif
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-# include <inttypes.h>
-#endif
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#ifdef HAVE_SYS_SELECT_H
-# include <sys/select.h>
-#endif
-
-#if defined HAVE_SETJMPEX_H && defined HAVE__SETJMPEX
-#include <setjmpex.h>
-#endif
-
-#include "ruby/missing.h"
-
#define RUBY
+# include <stddef.h>
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
#ifdef __cplusplus
# ifndef HAVE_PROTOTYPES
# define HAVE_PROTOTYPES 1
@@ -98,13 +57,10 @@ extern "C" {
#define ANYARGS
#endif
-#ifndef RUBY_SYMBOL_EXPORT_BEGIN
-# define RUBY_SYMBOL_EXPORT_BEGIN /* begin */
-# define RUBY_SYMBOL_EXPORT_END /* end */
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility push(default)
#endif
-RUBY_SYMBOL_EXPORT_BEGIN
-
#define xmalloc ruby_xmalloc
#define xmalloc2 ruby_xmalloc2
#define xcalloc ruby_xcalloc
@@ -112,17 +68,11 @@ RUBY_SYMBOL_EXPORT_BEGIN
#define xrealloc2 ruby_xrealloc2
#define xfree ruby_xfree
-#if defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 3
-# define RUBY_ATTR_ALLOC_SIZE(params) __attribute__ ((__alloc_size__ params))
-#else
-# define RUBY_ATTR_ALLOC_SIZE(params)
-#endif
-
-void *xmalloc(size_t) RUBY_ATTR_ALLOC_SIZE((1));
-void *xmalloc2(size_t,size_t) RUBY_ATTR_ALLOC_SIZE((1,2));
-void *xcalloc(size_t,size_t) RUBY_ATTR_ALLOC_SIZE((1,2));
-void *xrealloc(void*,size_t) RUBY_ATTR_ALLOC_SIZE((2));
-void *xrealloc2(void*,size_t,size_t) RUBY_ATTR_ALLOC_SIZE((2,3));
+void *xmalloc(size_t);
+void *xmalloc2(size_t,size_t);
+void *xcalloc(size_t,size_t);
+void *xrealloc(void*,size_t);
+void *xrealloc2(void*,size_t,size_t);
void xfree(void*);
#define STRINGIZE(expr) STRINGIZE0(expr)
@@ -130,10 +80,6 @@ void xfree(void*);
#define STRINGIZE0(expr) #expr
#endif
-#ifdef HAVE_LONG_LONG
-# define HAVE_TRUE_LONG_LONG 1
-#endif
-
#if SIZEOF_LONG_LONG > 0
# define LONG_LONG long long
#elif SIZEOF___INT64 > 0
@@ -143,59 +89,49 @@ void xfree(void*);
# define SIZEOF_LONG_LONG SIZEOF___INT64
#endif
-#ifndef BDIGIT
-# if SIZEOF_INT*2 <= SIZEOF_LONG_LONG
-# define BDIGIT unsigned int
-# define SIZEOF_BDIGITS SIZEOF_INT
-# define BDIGIT_DBL unsigned LONG_LONG
-# define BDIGIT_DBL_SIGNED LONG_LONG
-# define PRI_BDIGIT_PREFIX ""
-# define PRI_BDIGIT_DBL_PREFIX PRI_LL_PREFIX
-# elif SIZEOF_INT*2 <= SIZEOF_LONG
-# define BDIGIT unsigned int
-# define SIZEOF_BDIGITS SIZEOF_INT
-# define BDIGIT_DBL unsigned long
-# define BDIGIT_DBL_SIGNED long
-# define PRI_BDIGIT_PREFIX ""
-# define PRI_BDIGIT_DBL_PREFIX "l"
-# elif SIZEOF_SHORT*2 <= SIZEOF_LONG
-# define BDIGIT unsigned short
-# define SIZEOF_BDIGITS SIZEOF_SHORT
-# define BDIGIT_DBL unsigned long
-# define BDIGIT_DBL_SIGNED long
-# define PRI_BDIGIT_PREFIX "h"
-# define PRI_BDIGIT_DBL_PREFIX "l"
-# else
-# define BDIGIT unsigned short
-# define SIZEOF_BDIGITS (SIZEOF_LONG/2)
-# define SIZEOF_ACTUAL_BDIGIT SIZEOF_LONG
-# define BDIGIT_DBL unsigned long
-# define BDIGIT_DBL_SIGNED long
-# define PRI_BDIGIT_PREFIX "h"
-# define PRI_BDIGIT_DBL_PREFIX "l"
-# endif
-#endif
-#ifndef SIZEOF_ACTUAL_BDIGIT
-# define SIZEOF_ACTUAL_BDIGIT SIZEOF_BDIGITS
-#endif
-
-#ifdef PRI_BDIGIT_PREFIX
-# define PRIdBDIGIT PRI_BDIGIT_PREFIX"d"
-# define PRIiBDIGIT PRI_BDIGIT_PREFIX"i"
-# define PRIoBDIGIT PRI_BDIGIT_PREFIX"o"
-# define PRIuBDIGIT PRI_BDIGIT_PREFIX"u"
-# define PRIxBDIGIT PRI_BDIGIT_PREFIX"x"
-# define PRIXBDIGIT PRI_BDIGIT_PREFIX"X"
-#endif
-
-#ifdef PRI_BDIGIT_DBL_PREFIX
-# define PRIdBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"d"
-# define PRIiBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"i"
-# define PRIoBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"o"
-# define PRIuBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"u"
-# define PRIxBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"x"
-# define PRIXBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"X"
-#endif
+#if SIZEOF_INT*2 <= SIZEOF_LONG_LONG
+# define BDIGIT unsigned int
+# define SIZEOF_BDIGITS SIZEOF_INT
+# define BDIGIT_DBL unsigned LONG_LONG
+# define BDIGIT_DBL_SIGNED LONG_LONG
+# define PRI_BDIGIT_PREFIX ""
+# define PRI_BDIGIT_DBL_PREFIX PRI_LL_PREFIX
+#elif SIZEOF_INT*2 <= SIZEOF_LONG
+# define BDIGIT unsigned int
+# define SIZEOF_BDIGITS SIZEOF_INT
+# define BDIGIT_DBL unsigned long
+# define BDIGIT_DBL_SIGNED long
+# define PRI_BDIGIT_PREFIX ""
+# define PRI_BDIGIT_DBL_PREFIX "l"
+#elif SIZEOF_SHORT*2 <= SIZEOF_LONG
+# define BDIGIT unsigned short
+# define SIZEOF_BDIGITS SIZEOF_SHORT
+# define BDIGIT_DBL unsigned long
+# define BDIGIT_DBL_SIGNED long
+# define PRI_BDIGIT_PREFIX "h"
+# define PRI_BDIGIT_DBL_PREFIX "l"
+#else
+# define BDIGIT unsigned short
+# define SIZEOF_BDIGITS (SIZEOF_LONG/2)
+# define BDIGIT_DBL unsigned long
+# define BDIGIT_DBL_SIGNED long
+# define PRI_BDIGIT_PREFIX "h"
+# define PRI_BDIGIT_DBL_PREFIX "l"
+#endif
+
+#define PRIdBDIGIT PRI_BDIGIT_PREFIX"d"
+#define PRIiBDIGIT PRI_BDIGIT_PREFIX"i"
+#define PRIoBDIGIT PRI_BDIGIT_PREFIX"o"
+#define PRIuBDIGIT PRI_BDIGIT_PREFIX"u"
+#define PRIxBDIGIT PRI_BDIGIT_PREFIX"x"
+#define PRIXBDIGIT PRI_BDIGIT_PREFIX"X"
+
+#define PRIdBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"d"
+#define PRIiBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"i"
+#define PRIoBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"o"
+#define PRIuBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"u"
+#define PRIxBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"x"
+#define PRIXBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"X"
#ifdef __CYGWIN__
#undef _WIN32
@@ -219,6 +155,8 @@ void xfree(void*);
#if defined(__BEOS__) && !defined(__HAIKU__) && !defined(BONE)
#include <net/socket.h> /* intern.h needs fd_set definition */
+#elif defined (__SYMBIAN32__) && defined (HAVE_SYS_SELECT_H)
+# include <sys/select.h>
#endif
#ifdef __SYMBIAN32__
@@ -312,7 +250,9 @@ void rb_ia64_flushrs(void);
RUBY_ALIAS_FUNCTION_TYPE(VALUE, prot, name, args)
#endif
-RUBY_SYMBOL_EXPORT_END
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility pop
+#endif
#if defined(__cplusplus)
#if 0
diff --git a/include/ruby/encoding.h b/include/ruby/encoding.h
index 1c5d8da015..41640ec7e0 100644
--- a/include/ruby/encoding.h
+++ b/include/ruby/encoding.h
@@ -22,17 +22,26 @@ extern "C" {
#include <stdarg.h>
#include "ruby/oniguruma.h"
-RUBY_SYMBOL_EXPORT_BEGIN
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility push(default)
+#endif
-#define ENCODING_INLINE_MAX 127
+#define ENCODING_INLINE_MAX 1023
#define ENCODING_SHIFT (FL_USHIFT+10)
-#define ENCODING_MASK (((VALUE)ENCODING_INLINE_MAX)<<ENCODING_SHIFT) /* FL_USER10|FL_USER11|FL_USER12|FL_USER13|FL_USER14|FL_USER15|FL_USER16 */
+#define ENCODING_MASK (((VALUE)ENCODING_INLINE_MAX)<<ENCODING_SHIFT)
#define ENCODING_SET_INLINED(obj,i) do {\
RBASIC(obj)->flags &= ~ENCODING_MASK;\
RBASIC(obj)->flags |= (VALUE)(i) << ENCODING_SHIFT;\
} while (0)
-#define ENCODING_SET(obj,i) rb_enc_set_index((obj), (i))
+#define ENCODING_SET(obj,i) do {\
+ VALUE rb_encoding_set_obj = (obj); \
+ int encoding_set_enc_index = (i); \
+ if (encoding_set_enc_index < ENCODING_INLINE_MAX) \
+ ENCODING_SET_INLINED(rb_encoding_set_obj, encoding_set_enc_index); \
+ else \
+ rb_enc_set_index(rb_encoding_set_obj, encoding_set_enc_index); \
+} while (0)
#define ENCODING_GET_INLINED(obj) (int)((RBASIC(obj)->flags & ENCODING_MASK)>>ENCODING_SHIFT)
#define ENCODING_GET(obj) \
@@ -89,7 +98,6 @@ VALUE rb_enc_associate(VALUE, rb_encoding*);
void rb_enc_copy(VALUE dst, VALUE src);
VALUE rb_enc_str_new(const char*, long, rb_encoding*);
-VALUE rb_enc_str_new_cstr(const char*, rb_encoding*);
VALUE rb_enc_reg_new(const char*, long, rb_encoding*, int);
PRINTF_ARGS(VALUE rb_enc_sprintf(rb_encoding *, const char*, ...), 2, 3);
VALUE rb_enc_vsprintf(rb_encoding *, const char*, va_list);
@@ -104,15 +112,6 @@ VALUE rb_str_export_to_enc(VALUE, rb_encoding *);
VALUE rb_str_conv_enc(VALUE str, rb_encoding *from, rb_encoding *to);
VALUE rb_str_conv_enc_opts(VALUE str, rb_encoding *from, rb_encoding *to, int ecflags, VALUE ecopts);
-#if defined(__GNUC__) && !defined(__PCC__)
-#define rb_enc_str_new_cstr(str, enc) __extension__ ( \
-{ \
- (__builtin_constant_p(str)) ? \
- rb_enc_str_new((str), (long)strlen(str), (enc)) : \
- rb_enc_str_new_cstr((str), (enc)); \
-})
-#endif
-
PRINTF_ARGS(NORETURN(void rb_enc_raise(rb_encoding *, VALUE, const char*, ...)), 3, 4);
/* index -> rb_encoding */
@@ -157,9 +156,6 @@ unsigned int rb_enc_codepoint(const char *p, const char *e, rb_encoding *enc);
/* -> codelen>0 or raise exception */
int rb_enc_codelen(int code, rb_encoding *enc);
-/* -> 0 for invalid codepoint */
-int rb_enc_code_to_mbclen(int code, rb_encoding *enc);
-#define rb_enc_code_to_mbclen(c, enc) ONIGENC_CODE_TO_MBCLEN((enc), (c));
/* code,ptr,encoding -> write buf */
#define rb_enc_mbcput(c,buf,enc) ONIGENC_CODE_TO_MBC((enc),(c),(UChar*)(buf))
@@ -207,15 +203,9 @@ rb_encoding *rb_locale_encoding(void);
rb_encoding *rb_filesystem_encoding(void);
rb_encoding *rb_default_external_encoding(void);
rb_encoding *rb_default_internal_encoding(void);
-#ifndef rb_ascii8bit_encindex
int rb_ascii8bit_encindex(void);
-#endif
-#ifndef rb_utf8_encindex
int rb_utf8_encindex(void);
-#endif
-#ifndef rb_usascii_encindex
int rb_usascii_encindex(void);
-#endif
int rb_locale_encindex(void);
int rb_filesystem_encindex(void);
VALUE rb_enc_default_external(void);
@@ -309,7 +299,6 @@ VALUE rb_econv_str_convert(rb_econv_t *ec, VALUE src, int flags);
VALUE rb_econv_substr_convert(rb_econv_t *ec, VALUE src, long byteoff, long bytesize, int flags);
VALUE rb_econv_str_append(rb_econv_t *ec, VALUE src, VALUE dst, int flags);
VALUE rb_econv_substr_append(rb_econv_t *ec, VALUE src, long byteoff, long bytesize, VALUE dst, int flags);
-VALUE rb_econv_append(rb_econv_t *ec, const char *bytesrc, long bytesize, VALUE dst, int flags);
void rb_econv_binmode(rb_econv_t *ec);
@@ -351,7 +340,9 @@ void rb_econv_binmode(rb_econv_t *ec);
#define ECONV_AFTER_OUTPUT 0x00020000
/* end of flags for rb_econv_convert */
-RUBY_SYMBOL_EXPORT_END
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility pop
+#endif
#if defined(__cplusplus)
#if 0
diff --git a/include/ruby/intern.h b/include/ruby/intern.h
index 6200e77a63..5ff17a4971 100644
--- a/include/ruby/intern.h
+++ b/include/ruby/intern.h
@@ -31,10 +31,11 @@ extern "C" {
#else
# include <varargs.h>
#endif
-
#include "ruby/st.h"
-RUBY_SYMBOL_EXPORT_BEGIN
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility push(default)
+#endif
/*
* Functions and variables that are used by more than one source file of
@@ -48,9 +49,9 @@ void rb_mem_clear(register VALUE*, register long);
VALUE rb_assoc_new(VALUE, VALUE);
VALUE rb_check_array_type(VALUE);
VALUE rb_ary_new(void);
-VALUE rb_ary_new_capa(long capa);
-VALUE rb_ary_new_from_args(long n, ...);
-VALUE rb_ary_new_from_values(long n, const VALUE *elts);
+VALUE rb_ary_new2(long);
+VALUE rb_ary_new3(long,...);
+VALUE rb_ary_new4(long, const VALUE *);
VALUE rb_ary_tmp_new(long);
void rb_ary_free(VALUE);
void rb_ary_modify(VALUE);
@@ -63,7 +64,6 @@ VALUE rb_ary_dup(VALUE);
VALUE rb_ary_resurrect(VALUE ary);
VALUE rb_ary_to_ary(VALUE);
VALUE rb_ary_to_s(VALUE);
-VALUE rb_ary_cat(VALUE, const VALUE *, long);
VALUE rb_ary_push(VALUE, VALUE);
VALUE rb_ary_pop(VALUE);
VALUE rb_ary_shift(VALUE);
@@ -87,9 +87,6 @@ VALUE rb_ary_cmp(VALUE, VALUE);
VALUE rb_ary_replace(VALUE copy, VALUE orig);
VALUE rb_get_values_at(VALUE, long, int, VALUE*, VALUE(*)(VALUE,long));
VALUE rb_ary_resize(VALUE ary, long len);
-#define rb_ary_new2 rb_ary_new_capa
-#define rb_ary_new3 rb_ary_new_from_args
-#define rb_ary_new4 rb_ary_new_from_values
/* bignum.c */
VALUE rb_big_new(long, int);
int rb_bigzero_p(VALUE x);
@@ -97,18 +94,24 @@ VALUE rb_big_clone(VALUE);
void rb_big_2comp(VALUE);
VALUE rb_big_norm(VALUE);
void rb_big_resize(VALUE big, long len);
+VALUE rb_uint2big(VALUE);
+VALUE rb_int2big(SIGNED_VALUE);
+VALUE rb_uint2inum(VALUE);
+VALUE rb_int2inum(SIGNED_VALUE);
VALUE rb_cstr_to_inum(const char*, int, int);
VALUE rb_str_to_inum(VALUE, int, int);
VALUE rb_cstr2inum(const char*, int);
VALUE rb_str2inum(VALUE, int);
VALUE rb_big2str(VALUE, int);
-DEPRECATED(VALUE rb_big2str0(VALUE, int, int));
+VALUE rb_big2str0(VALUE, int, int);
SIGNED_VALUE rb_big2long(VALUE);
#define rb_big2int(x) rb_big2long(x)
VALUE rb_big2ulong(VALUE);
#define rb_big2uint(x) rb_big2ulong(x)
-DEPRECATED(VALUE rb_big2ulong_pack(VALUE x));
+VALUE rb_big2ulong_pack(VALUE x);
#if HAVE_LONG_LONG
+VALUE rb_ll2inum(LONG_LONG);
+VALUE rb_ull2inum(unsigned LONG_LONG);
LONG_LONG rb_big2ll(VALUE);
unsigned LONG_LONG rb_big2ull(VALUE);
#endif /* HAVE_LONG_LONG */
@@ -135,33 +138,6 @@ VALUE rb_big_or(VALUE, VALUE);
VALUE rb_big_xor(VALUE, VALUE);
VALUE rb_big_lshift(VALUE, VALUE);
VALUE rb_big_rshift(VALUE, VALUE);
-
-/* For rb_integer_pack and rb_integer_unpack: */
-/* "MS" in MSWORD and MSBYTE means "most significant" */
-/* "LS" in LSWORD and LSBYTE means "least significant" */
-#define INTEGER_PACK_MSWORD_FIRST 0x01
-#define INTEGER_PACK_LSWORD_FIRST 0x02
-#define INTEGER_PACK_MSBYTE_FIRST 0x10
-#define INTEGER_PACK_LSBYTE_FIRST 0x20
-#define INTEGER_PACK_NATIVE_BYTE_ORDER 0x40
-#define INTEGER_PACK_2COMP 0x80
-#define INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION 0x400
-/* For rb_integer_unpack: */
-#define INTEGER_PACK_FORCE_BIGNUM 0x100
-#define INTEGER_PACK_NEGATIVE 0x200
-/* Combinations: */
-#define INTEGER_PACK_LITTLE_ENDIAN \
- (INTEGER_PACK_LSWORD_FIRST | \
- INTEGER_PACK_LSBYTE_FIRST)
-#define INTEGER_PACK_BIG_ENDIAN \
- (INTEGER_PACK_MSWORD_FIRST | \
- INTEGER_PACK_MSBYTE_FIRST)
-int rb_integer_pack(VALUE val, void *words, size_t numwords, size_t wordsize, size_t nails, int flags);
-VALUE rb_integer_unpack(const void *words, size_t numwords, size_t wordsize, size_t nails, int flags);
-size_t rb_absint_size(VALUE val, int *nlz_bits_ret);
-size_t rb_absint_numwords(VALUE val, size_t word_numbits, size_t *nlz_bits_ret);
-int rb_absint_singlebit_p(VALUE val);
-
/* rational.c */
VALUE rb_rational_raw(VALUE, VALUE);
#define rb_rational_raw1(x) rb_rational_raw((x), INT2FIX(1))
@@ -172,8 +148,6 @@ VALUE rb_rational_new(VALUE, VALUE);
VALUE rb_Rational(VALUE, VALUE);
#define rb_Rational1(x) rb_Rational((x), INT2FIX(1))
#define rb_Rational2(x,y) rb_Rational((x), (y))
-VALUE rb_flt_rationalize_with_prec(VALUE, VALUE);
-VALUE rb_flt_rationalize(VALUE);
/* complex.c */
VALUE rb_complex_raw(VALUE, VALUE);
#define rb_complex_raw1(x) rb_complex_raw((x), INT2FIX(0))
@@ -189,6 +163,7 @@ VALUE rb_Complex(VALUE, VALUE);
VALUE rb_class_boot(VALUE);
VALUE rb_class_new(VALUE);
VALUE rb_mod_init_copy(VALUE, VALUE);
+VALUE rb_class_init_copy(VALUE, VALUE);
VALUE rb_singleton_class_clone(VALUE);
void rb_singleton_class_attached(VALUE,VALUE);
VALUE rb_make_metaclass(VALUE, VALUE);
@@ -225,15 +200,10 @@ VALUE rb_fiber_yield(int argc, VALUE *args);
VALUE rb_fiber_current(void);
VALUE rb_fiber_alive_p(VALUE);
/* enum.c */
-VALUE rb_enum_values_pack(int, const VALUE*);
+VALUE rb_enum_values_pack(int, VALUE*);
/* enumerator.c */
VALUE rb_enumeratorize(VALUE, VALUE, int, VALUE *);
-typedef VALUE rb_enumerator_size_func(VALUE, VALUE, VALUE);
-VALUE rb_enumeratorize_with_size(VALUE, VALUE, int, VALUE *, rb_enumerator_size_func *);
-#ifndef RUBY_EXPORT
-#define rb_enumeratorize_with_size(obj, id, argc, argv, size_fn) \
- rb_enumeratorize_with_size(obj, id, argc, argv, (rb_enumerator_size_func *)(size_fn))
-#endif
+VALUE rb_enumeratorize_with_size(VALUE, VALUE, int, VALUE *, VALUE (*)(ANYARGS));
#define RETURN_SIZED_ENUMERATOR(obj, argc, argv, size_fn) do { \
if (!rb_block_given_p()) \
return rb_enumeratorize_with_size((obj), ID2SYM(rb_frame_this_func()),\
@@ -242,10 +212,8 @@ VALUE rb_enumeratorize_with_size(VALUE, VALUE, int, VALUE *, rb_enumerator_size_
#define RETURN_ENUMERATOR(obj, argc, argv) RETURN_SIZED_ENUMERATOR(obj, argc, argv, 0)
/* error.c */
VALUE rb_exc_new(VALUE, const char*, long);
-VALUE rb_exc_new_cstr(VALUE, const char*);
-VALUE rb_exc_new_str(VALUE, VALUE);
-#define rb_exc_new2 rb_exc_new_cstr
-#define rb_exc_new3 rb_exc_new_str
+VALUE rb_exc_new2(VALUE, const char*);
+VALUE rb_exc_new3(VALUE, VALUE);
PRINTF_ARGS(NORETURN(void rb_loaderror(const char*, ...)), 1, 2);
PRINTF_ARGS(NORETURN(void rb_loaderror_with_path(VALUE path, const char*, ...)), 2, 3);
PRINTF_ARGS(NORETURN(void rb_name_error(ID, const char*, ...)), 2, 3);
@@ -264,7 +232,12 @@ void rb_check_trusted(VALUE);
rb_error_frozen(rb_obj_classname(frozen_obj)); \
} \
} while (0)
-#define rb_check_trusted_internal(obj) ((void) 0)
+#define rb_check_trusted_internal(obj) do { \
+ VALUE untrusted_obj = (obj); \
+ if (!OBJ_UNTRUSTED(untrusted_obj)) { \
+ rb_error_untrusted(untrusted_obj); \
+ } \
+ } while (0)
#ifdef __GNUC__
#define rb_check_frozen(obj) __extension__({rb_check_frozen_internal(obj);})
#define rb_check_trusted(obj) __extension__({rb_check_trusted_internal(obj);})
@@ -290,16 +263,13 @@ void rb_check_copyable(VALUE obj, VALUE orig);
/* eval.c */
int rb_sourceline(void);
const char *rb_sourcefile(void);
-VALUE rb_check_funcall(VALUE, ID, int, const VALUE*);
+VALUE rb_check_funcall(VALUE, ID, int, VALUE*);
NORETURN(void rb_error_arity(int, int, int));
-#define rb_check_arity rb_check_arity /* for ifdef */
-static inline void
-rb_check_arity(int argc, int min, int max)
-{
- if ((argc < min) || (max != UNLIMITED_ARGUMENTS && argc > max))
- rb_error_arity(argc, min, max);
-}
+#define rb_check_arity(argc, min, max) do { \
+ if (((argc) < (min)) || ((argc) > (max) && (max) != UNLIMITED_ARGUMENTS)) \
+ rb_error_arity(argc, min, max); \
+ } while(0)
#if defined(NFDBITS) && defined(HAVE_RB_FD_INIT)
typedef struct {
@@ -376,8 +346,7 @@ void rb_define_alloc_func(VALUE, rb_alloc_func_t);
void rb_undef_alloc_func(VALUE);
rb_alloc_func_t rb_get_alloc_func(VALUE);
void rb_clear_cache(void);
-void rb_clear_constant_cache(void);
-void rb_clear_method_cache_by_class(VALUE);
+void rb_clear_cache_by_class(VALUE);
void rb_alias(VALUE, ID, ID);
void rb_attr(VALUE,ID,int,int,int);
int rb_method_boundp(VALUE, ID, int);
@@ -405,18 +374,17 @@ VALUE rb_require_safe(VALUE, int);
void rb_obj_call_init(VALUE, int, VALUE*);
VALUE rb_class_new_instance(int, VALUE*, VALUE);
VALUE rb_block_proc(void);
-VALUE rb_block_lambda(void);
+VALUE rb_f_lambda(void);
VALUE rb_proc_new(VALUE (*)(ANYARGS/* VALUE yieldarg[, VALUE procarg] */), VALUE);
VALUE rb_obj_is_proc(VALUE);
VALUE rb_proc_call(VALUE, VALUE);
-VALUE rb_proc_call_with_block(VALUE, int argc, const VALUE *argv, VALUE);
+VALUE rb_proc_call_with_block(VALUE, int argc, VALUE *argv, VALUE);
int rb_proc_arity(VALUE);
VALUE rb_proc_lambda_p(VALUE);
VALUE rb_binding_new(void);
VALUE rb_obj_method(VALUE, VALUE);
VALUE rb_obj_is_method(VALUE);
VALUE rb_method_call(int, VALUE*, VALUE);
-VALUE rb_method_call_with_block(int, VALUE *, VALUE, VALUE);
int rb_mod_method_arity(VALUE, ID);
int rb_obj_method_arity(VALUE, ID);
VALUE rb_protect(VALUE (*)(VALUE), VALUE, int*);
@@ -430,7 +398,6 @@ int rb_thread_alone(void);
DEPRECATED(void rb_thread_polling(void));
void rb_thread_sleep(int);
void rb_thread_sleep_forever(void);
-void rb_thread_sleep_deadly(void);
VALUE rb_thread_stop(void);
VALUE rb_thread_wakeup(VALUE);
VALUE rb_thread_wakeup_alive(VALUE);
@@ -449,7 +416,6 @@ void rb_thread_atfork_before_exec(void);
VALUE rb_exec_recursive(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE);
VALUE rb_exec_recursive_paired(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE,VALUE);
VALUE rb_exec_recursive_outer(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE);
-VALUE rb_exec_recursive_paired_outer(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE,VALUE);
/* dir.c */
VALUE rb_dir_getwd(void);
/* file.c */
@@ -482,12 +448,7 @@ void rb_gc_call_finalizer_at_exit(void);
VALUE rb_gc_enable(void);
VALUE rb_gc_disable(void);
VALUE rb_gc_start(void);
-DEPRECATED(void rb_gc_set_params(void));
-VALUE rb_define_finalizer(VALUE, VALUE);
-VALUE rb_undefine_finalizer(VALUE);
-size_t rb_gc_count(void);
-size_t rb_gc_stat(VALUE);
-VALUE rb_gc_latest_gc_info(VALUE);
+void rb_gc_set_params(void);
/* hash.c */
void st_foreach_safe(struct st_table *, int (*)(ANYARGS), st_data_t);
VALUE rb_check_hash_type(VALUE);
@@ -504,7 +465,6 @@ VALUE rb_hash_aset(VALUE, VALUE, VALUE);
VALUE rb_hash_clear(VALUE);
VALUE rb_hash_delete_if(VALUE);
VALUE rb_hash_delete(VALUE,VALUE);
-VALUE rb_hash_set_ifnone(VALUE hash, VALUE ifnone);
typedef VALUE rb_hash_update_func(VALUE newkey, VALUE oldkey, VALUE value);
VALUE rb_hash_update_by(VALUE hash1, VALUE hash2, rb_hash_update_func *func);
struct st_table *rb_hash_tbl(VALUE);
@@ -682,7 +642,6 @@ int rb_reg_options(VALUE);
RUBY_EXTERN VALUE rb_argv0;
VALUE rb_get_argv(void);
void *rb_load_file(const char*);
-void *rb_load_file_str(VALUE);
/* signal.c */
VALUE rb_f_kill(int, VALUE*);
#ifdef POSIX_SIGNAL
@@ -703,11 +662,16 @@ VALUE rb_str_format(int, const VALUE *, VALUE);
/* string.c */
VALUE rb_str_new(const char*, long);
VALUE rb_str_new_cstr(const char*);
+VALUE rb_str_new2(const char*);
VALUE rb_str_new_shared(VALUE);
+VALUE rb_str_new3(VALUE);
VALUE rb_str_new_frozen(VALUE);
+VALUE rb_str_new4(VALUE);
VALUE rb_str_new_with_class(VALUE, const char*, long);
+VALUE rb_str_new5(VALUE, const char*, long);
VALUE rb_tainted_str_new_cstr(const char*);
VALUE rb_tainted_str_new(const char*, long);
+VALUE rb_tainted_str_new2(const char*);
VALUE rb_external_str_new(const char*, long);
VALUE rb_external_str_new_cstr(const char*);
VALUE rb_locale_str_new(const char*, long);
@@ -720,6 +684,7 @@ VALUE rb_str_buf_new2(const char*);
VALUE rb_str_tmp_new(long);
VALUE rb_usascii_str_new(const char*, long);
VALUE rb_usascii_str_new_cstr(const char*);
+VALUE rb_usascii_str_new2(const char*);
void rb_str_free(VALUE);
void rb_str_shared_replace(VALUE, VALUE);
VALUE rb_str_buf_append(VALUE, VALUE);
@@ -740,7 +705,6 @@ VALUE rb_str_times(VALUE, VALUE);
long rb_str_sublen(VALUE, long);
VALUE rb_str_substr(VALUE, long, long);
VALUE rb_str_subseq(VALUE, long, long);
-char *rb_str_subpos(VALUE, long, long*);
void rb_str_modify(VALUE);
void rb_str_modify_expand(VALUE, long);
VALUE rb_str_freeze(VALUE);
@@ -779,7 +743,6 @@ VALUE rb_str_length(VALUE);
long rb_str_offset(VALUE, long);
size_t rb_str_capacity(VALUE);
VALUE rb_str_ellipsize(VALUE, long);
-VALUE rb_str_scrub(VALUE, VALUE);
#if defined(__GNUC__) && !defined(__PCC__)
#define rb_str_new_cstr(str) __extension__ ( \
{ \
@@ -830,11 +793,11 @@ VALUE rb_str_scrub(VALUE, VALUE);
rb_str_cat((str), (ptr), (long)strlen(ptr)) : \
rb_str_cat2((str), (ptr)); \
})
-#define rb_exc_new_cstr(klass, ptr) __extension__ ( \
+#define rb_exc_new2(klass, ptr) __extension__ ( \
{ \
(__builtin_constant_p(ptr)) ? \
rb_exc_new((klass), (ptr), (long)strlen(ptr)) : \
- rb_exc_new_cstr((klass), (ptr)); \
+ rb_exc_new2((klass), (ptr)); \
})
#endif
#define rb_str_new2 rb_str_new_cstr
@@ -847,7 +810,6 @@ VALUE rb_str_scrub(VALUE, VALUE);
/* struct.c */
VALUE rb_struct_new(VALUE, ...);
VALUE rb_struct_define(const char*, ...);
-VALUE rb_struct_define_under(VALUE, const char*, ...);
VALUE rb_struct_alloc(VALUE, VALUE);
VALUE rb_struct_initialize(VALUE, VALUE);
VALUE rb_struct_aref(VALUE, VALUE);
@@ -858,8 +820,6 @@ VALUE rb_struct_s_members(VALUE);
VALUE rb_struct_members(VALUE);
VALUE rb_struct_alloc_noinit(VALUE);
VALUE rb_struct_define_without_accessor(const char *, VALUE, rb_alloc_func_t, ...);
-VALUE rb_struct_define_without_accessor_under(VALUE outer, const char *class_name, VALUE super, rb_alloc_func_t alloc, ...);
-
/* thread.c */
typedef void rb_unblock_function_t(void *);
typedef VALUE rb_blocking_function_t(void *);
@@ -888,7 +848,6 @@ struct timespec rb_time_timespec(VALUE time);
/* variable.c */
VALUE rb_mod_name(VALUE);
VALUE rb_class_path(VALUE);
-VALUE rb_class_path_cached(VALUE);
void rb_set_class_path(VALUE, VALUE, const char*);
void rb_set_class_path_string(VALUE, VALUE, VALUE);
VALUE rb_path_to_class(VALUE);
@@ -910,6 +869,8 @@ VALUE rb_ivar_set(VALUE, ID, VALUE);
VALUE rb_ivar_defined(VALUE, ID);
void rb_ivar_foreach(VALUE, int (*)(ANYARGS), st_data_t);
st_index_t rb_ivar_count(VALUE);
+VALUE rb_iv_set(VALUE, const char*, VALUE);
+VALUE rb_iv_get(VALUE, const char*);
VALUE rb_attr_get(VALUE, ID);
VALUE rb_obj_instance_variables(VALUE);
VALUE rb_obj_remove_instance_variable(VALUE, VALUE);
@@ -944,7 +905,9 @@ int rb_frame_method_id_and_class(ID *idp, VALUE *klassp);
VALUE rb_make_backtrace(void);
VALUE rb_make_exception(int, VALUE*);
-RUBY_SYMBOL_EXPORT_END
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility pop
+#endif
#if defined(__cplusplus)
#if 0
diff --git a/include/ruby/io.h b/include/ruby/io.h
index 23337679f0..07be55c46c 100644
--- a/include/ruby/io.h
+++ b/include/ruby/io.h
@@ -29,17 +29,7 @@ extern "C" {
#include "ruby/config.h"
#if defined(HAVE_POLL)
-# ifdef _AIX
-# define reqevents events
-# define rtnevents revents
-# endif
# include <poll.h>
-# ifdef _AIX
-# undef reqevents
-# undef rtnevents
-# undef events
-# undef revents
-# endif
# define RB_WAITFD_IN POLLIN
# define RB_WAITFD_PRI POLLPRI
# define RB_WAITFD_OUT POLLOUT
@@ -49,7 +39,9 @@ extern "C" {
# define RB_WAITFD_OUT 0x004
#endif
-RUBY_SYMBOL_EXPORT_BEGIN
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility push(default)
+#endif
typedef struct {
char *ptr; /* off + len <= capa */
@@ -197,12 +189,9 @@ void rb_io_read_check(rb_io_t*);
int rb_io_read_pending(rb_io_t*);
DEPRECATED(void rb_read_check(FILE*));
-struct stat;
-VALUE rb_stat_new(const struct stat *);
-
-/* gc.c */
-
-RUBY_SYMBOL_EXPORT_END
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility pop
+#endif
#if defined(__cplusplus)
#if 0
diff --git a/include/ruby/missing.h b/include/ruby/missing.h
index 5dba4edda7..1297c43a7a 100644
--- a/include/ruby/missing.h
+++ b/include/ruby/missing.h
@@ -25,26 +25,18 @@ extern "C" {
#include RUBY_EXTCONF_H
#endif
-#if !defined(HAVE_STRUCT_TIMEVAL) || !defined(HAVE_STRUCT_TIMESPEC)
-#if defined(HAVE_TIME_H)
-# include <time.h>
-#endif
#if defined(HAVE_SYS_TIME_H)
-# include <sys/time.h>
-#endif
-#endif
-
-#ifndef RUBY_SYMBOL_EXPORT_BEGIN
-# define RUBY_SYMBOL_EXPORT_BEGIN /* begin */
-# define RUBY_SYMBOL_EXPORT_END /* end */
-#endif
-
-#if !defined(HAVE_STRUCT_TIMEVAL)
+# include <sys/time.h>
+#elif !defined(_WIN32)
+# define time_t long
struct timeval {
time_t tv_sec; /* seconds */
long tv_usec; /* microseconds */
};
-#endif /* HAVE_STRUCT_TIMEVAL */
+#endif
+#if defined(HAVE_SYS_TYPES_H)
+# include <sys/types.h>
+#endif
#if !defined(HAVE_STRUCT_TIMESPEC)
struct timespec {
@@ -60,6 +52,11 @@ struct timezone {
};
#endif
+#if defined(HAVE___SYSCALL) && (defined(__APPLE__) || defined(__OpenBSD__))
+/* Mac OS X and OpenBSD have __syscall but don't define it in headers */
+off_t __syscall(quad_t number, ...);
+#endif
+
#ifdef RUBY_EXPORT
#undef RUBY_EXTERN
#endif
@@ -67,7 +64,9 @@ struct timezone {
#define RUBY_EXTERN extern
#endif
-RUBY_SYMBOL_EXPORT_BEGIN
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility push(default)
+#endif
#ifndef HAVE_ACOSH
RUBY_EXTERN double acosh(double);
@@ -232,7 +231,9 @@ RUBY_EXTERN int ruby_close(int);
RUBY_EXTERN void setproctitle(const char *fmt, ...);
#endif
-RUBY_SYMBOL_EXPORT_END
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility pop
+#endif
#if defined(__cplusplus)
#if 0
diff --git a/include/ruby/oniguruma.h b/include/ruby/oniguruma.h
index 6a26ee4aaa..c01b6f7bb4 100644
--- a/include/ruby/oniguruma.h
+++ b/include/ruby/oniguruma.h
@@ -5,7 +5,7 @@
**********************************************************************/
/*-
* Copyright (c) 2002-2009 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
- * Copyright (c) 2011-2013 K.Takata <kentkt AT csc DOT jp>
+ * Copyright (c) 2011-2012 K.Takata <kentkt AT csc DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -40,7 +40,7 @@ extern "C" {
#define ONIGURUMA
#define ONIGURUMA_VERSION_MAJOR 5
#define ONIGURUMA_VERSION_MINOR 13
-#define ONIGURUMA_VERSION_TEENY 5
+#define ONIGURUMA_VERSION_TEENY 1
#ifdef __cplusplus
# ifndef HAVE_PROTOTYPES
@@ -98,7 +98,9 @@ extern "C" {
#define ONIG_EXTERN extern
#endif
-RUBY_SYMBOL_EXPORT_BEGIN
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility push(default)
+#endif
#include <stddef.h> /* for size_t */
@@ -823,7 +825,9 @@ const char* onig_version P_((void));
ONIG_EXTERN
const char* onig_copyright P_((void));
-RUBY_SYMBOL_EXPORT_END
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility pop
+#endif
#ifdef __cplusplus
#if 0
diff --git a/include/ruby/re.h b/include/ruby/re.h
index 41b3e492f8..4039ba1800 100644
--- a/include/ruby/re.h
+++ b/include/ruby/re.h
@@ -24,7 +24,9 @@ extern "C" {
#include "ruby/regex.h"
-RUBY_SYMBOL_EXPORT_BEGIN
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility push(default)
+#endif
typedef struct re_pattern_buffer Regexp;
@@ -59,7 +61,9 @@ void rb_match_busy(VALUE);
VALUE rb_reg_quote(VALUE);
regex_t *rb_reg_prepare_re(VALUE re, VALUE str);
-RUBY_SYMBOL_EXPORT_END
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility pop
+#endif
#if defined(__cplusplus)
#if 0
diff --git a/include/ruby/regex.h b/include/ruby/regex.h
index 024bed4a4e..aeb6418d0a 100644
--- a/include/ruby/regex.h
+++ b/include/ruby/regex.h
@@ -24,7 +24,9 @@ extern "C" {
#include "oniguruma.h"
#endif
-RUBY_SYMBOL_EXPORT_BEGIN
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility push(default)
+#endif
#ifndef ONIG_RUBY_M17N
@@ -34,7 +36,9 @@ ONIG_EXTERN OnigEncoding OnigEncDefaultCharEncoding;
#endif /* ifndef ONIG_RUBY_M17N */
-RUBY_SYMBOL_EXPORT_END
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility pop
+#endif
#if defined(__cplusplus)
#if 0
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index 95965d6b6a..d80eaed681 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -26,8 +26,6 @@ extern "C" {
#include RUBY_EXTCONF_H
#endif
-#include "defines.h"
-
#define NORETURN_STYLE_NEW 1
#ifndef NORETURN
# define NORETURN(x) x
@@ -49,13 +47,31 @@ extern "C" {
#define PRINTF_ARGS(decl, string_index, first_to_check) decl
#endif
+#ifdef HAVE_STRING_H
+# include <string.h>
+#else
+# include <strings.h>
+#endif
+
#ifdef HAVE_INTRINSICS_H
# include <intrinsics.h>
#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+
#include <stdarg.h>
+#include <stdio.h>
-RUBY_SYMBOL_EXPORT_BEGIN
+#include "defines.h"
+
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility push(default)
+#endif
/* Make alloca work the best possible way. */
#ifdef __GNUC__
@@ -103,7 +119,7 @@ typedef unsigned LONG_LONG ID;
typedef char ruby_check_sizeof_int[SIZEOF_INT == sizeof(int) ? 1 : -1];
typedef char ruby_check_sizeof_long[SIZEOF_LONG == sizeof(long) ? 1 : -1];
-#ifdef HAVE_LONG_LONG
+#ifdef SIZEOF_LONG_LONG
typedef char ruby_check_sizeof_long_long[SIZEOF_LONG_LONG == sizeof(LONG_LONG) ? 1 : -1];
#endif
typedef char ruby_check_sizeof_voidp[SIZEOF_VOIDP == sizeof(void*) ? 1 : -1];
@@ -115,12 +131,6 @@ typedef char ruby_check_sizeof_voidp[SIZEOF_VOIDP == sizeof(void*) ? 1 : -1];
#define PRI_LONG_PREFIX "l"
#endif
-#if SIZEOF_LONG == 8
-#define PRI_64_PREFIX PRI_LONG_PREFIX
-#elif SIZEOF_LONG_LONG == 8
-#define PRI_64_PREFIX PRI_LL_PREFIX
-#endif
-
#if defined PRIdPTR && !defined PRI_VALUE_PREFIX
#define PRIdVALUE PRIdPTR
#define PRIoVALUE PRIoPTR
@@ -187,7 +197,7 @@ typedef char ruby_check_sizeof_voidp[SIZEOF_VOIDP == sizeof(void*) ? 1 : -1];
# ifdef HAVE_LIMITS_H
# include <limits.h>
# else
- /* assuming 32bit(2's complement) long */
+ /* assuming 32bit(2's compliment) long */
# define LONG_MAX 2147483647
# endif
# endif
@@ -245,7 +255,6 @@ VALUE rb_ull2inum(unsigned LONG_LONG);
#define ULL2NUM(v) rb_ull2inum(v)
#endif
-#ifndef OFFT2NUM
#if SIZEOF_OFF_T > SIZEOF_LONG && defined(HAVE_LONG_LONG)
# define OFFT2NUM(v) LL2NUM(v)
#elif SIZEOF_OFF_T == SIZEOF_LONG
@@ -253,7 +262,6 @@ VALUE rb_ull2inum(unsigned LONG_LONG);
#else
# define OFFT2NUM(v) INT2NUM(v)
#endif
-#endif
#if SIZEOF_SIZE_T > SIZEOF_LONG && defined(HAVE_LONG_LONG)
# define SIZET2NUM(v) ULL2NUM(v)
@@ -342,8 +350,8 @@ rb_long2int_inline(long n)
#define MODET2NUM(v) INT2NUM(v)
#endif
-#define FIX2LONG(x) ((long)RSHIFT((SIGNED_VALUE)(x),1))
-#define FIX2ULONG(x) ((unsigned long)FIX2LONG(x))
+#define FIX2LONG(x) (long)RSHIFT((SIGNED_VALUE)(x),1)
+#define FIX2ULONG(x) ((((VALUE)(x))>>1)&LONG_MAX)
#define FIXNUM_P(f) (((int)(SIGNED_VALUE)(f))&FIXNUM_FLAG)
#define POSFIXABLE(f) ((f) < FIXNUM_MAX+1)
#define NEGFIXABLE(f) ((f) >= FIXNUM_MIN)
@@ -351,7 +359,7 @@ rb_long2int_inline(long n)
#define IMMEDIATE_P(x) ((VALUE)(x) & IMMEDIATE_MASK)
-#define SYMBOL_P(x) (((VALUE)(x)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT))==SYMBOL_FLAG)
+#define SYMBOL_P(x) (((VALUE)(x)&~(~(VALUE)0<<RUBY_SPECIAL_SHIFT))==SYMBOL_FLAG)
#define ID2SYM(x) (((VALUE)(x)<<RUBY_SPECIAL_SHIFT)|SYMBOL_FLAG)
#define SYM2ID(x) RSHIFT((unsigned long)(x),RUBY_SPECIAL_SHIFT)
@@ -388,7 +396,7 @@ USE_FLONUM
...xxxx xx10 Flonum
...0000 1100 Symbol
...0000 0000 Qfalse 0x00 = 0
-...0000 1000 Qnil 0x08 = 8
+...0000 1000 Qnil 0x08 = 8
...0001 0100 Qtrue 0x14 = 20
...0011 0100 Qundef 0x34 = 52
*/
@@ -512,18 +520,17 @@ static inline int rb_type(VALUE obj);
#else
#ifdef _MSC_VER
#pragma optimize("", off)
+#endif
static inline volatile VALUE *rb_gc_guarded_ptr(volatile VALUE *ptr) {return ptr;}
+#ifdef _MSC_VER
#pragma optimize("", on)
-#else
-volatile VALUE *rb_gc_guarded_ptr(volatile VALUE *ptr);
-#define HAVE_RB_GC_GUARDED_PTR 1
#endif
#define RB_GC_GUARD_PTR(ptr) rb_gc_guarded_ptr(ptr)
#endif
#define RB_GC_GUARD(v) (*RB_GC_GUARD_PTR(&(v)))
#ifdef __GNUC__
-#define RB_UNUSED_VAR(x) x __attribute__ ((unused))
+#define RB_UNUSED_VAR(x) x __attribute__ ((unused))
#else
#define RB_UNUSED_VAR(x) x
#endif
@@ -562,24 +569,9 @@ VALUE rb_get_path(VALUE);
VALUE rb_get_path_no_checksafe(VALUE);
#define FilePathStringValue(v) ((v) = rb_get_path_no_checksafe(v))
-#define RUBY_SAFE_LEVEL_MAX 3
void rb_secure(int);
int rb_safe_level(void);
void rb_set_safe_level(int);
-#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
-int ruby_safe_level_4_error(void) __attribute__((error("$SAFE=4 is obsolete")));
-int ruby_safe_level_4_warning(void) __attribute__((warning("$SAFE=4 is obsolete")));
-# ifdef RUBY_EXPORT
-# define ruby_safe_level_4_warning() ruby_safe_level_4_error()
-# endif
-#define RUBY_SAFE_LEVEL_INVALID_P(level) \
- __extension__(__builtin_constant_p(level) && \
- ((level) < 0 || RUBY_SAFE_LEVEL_MAX < (level)))
-#define RUBY_SAFE_LEVEL_CHECK(level, type) \
- (RUBY_SAFE_LEVEL_INVALID_P(level) ? ruby_safe_level_4_##type() : (level))
-#define rb_secure(level) rb_secure(RUBY_SAFE_LEVEL_CHECK(level, warning))
-#define rb_set_safe_level(level) rb_set_safe_level(RUBY_SAFE_LEVEL_CHECK(level, error))
-#endif
void rb_set_safe_level_force(int);
void rb_secure_update(VALUE);
NORETURN(void rb_insecure_operation(void));
@@ -665,12 +657,10 @@ rb_num2ll_inline(VALUE x)
# define NUM2ULL(x) rb_num2ull(x)
#endif
-#if !defined(NUM2OFFT)
-# if defined(HAVE_LONG_LONG) && SIZEOF_OFF_T > SIZEOF_LONG
-# define NUM2OFFT(x) ((off_t)NUM2LL(x))
-# else
-# define NUM2OFFT(x) NUM2LONG(x)
-# endif
+#if defined(HAVE_LONG_LONG) && SIZEOF_OFF_T > SIZEOF_LONG
+# define NUM2OFFT(x) ((off_t)NUM2LL(x))
+#else
+# define NUM2OFFT(x) NUM2LONG(x)
#endif
#if defined(HAVE_LONG_LONG) && SIZEOF_SIZE_T > SIZEOF_LONG
@@ -689,74 +679,27 @@ VALUE rb_int2big(SIGNED_VALUE);
VALUE rb_newobj(void);
VALUE rb_newobj_of(VALUE, VALUE);
-VALUE rb_obj_setup(VALUE obj, VALUE klass, VALUE type);
#define NEWOBJ(obj,type) type *(obj) = (type*)rb_newobj()
#define NEWOBJ_OF(obj,type,klass,flags) type *(obj) = (type*)rb_newobj_of(klass, flags)
-#define OBJSETUP(obj,c,t) rb_obj_setup(obj, c, t) /* use NEWOBJ_OF instead of NEWOBJ()+OBJSETUP() */
+#define OBJSETUP(obj,c,t) do {\
+ RBASIC(obj)->flags = (t);\
+ RBASIC(obj)->klass = (c);\
+ if (rb_safe_level() >= 3) FL_SET((obj), FL_TAINT | FL_UNTRUSTED);\
+} while (0)
#define CLONESETUP(clone,obj) do {\
OBJSETUP((clone),rb_singleton_class_clone((VALUE)(obj)),RBASIC(obj)->flags);\
rb_singleton_class_attached(RBASIC(clone)->klass, (VALUE)(clone));\
if (FL_TEST((obj), FL_EXIVAR)) rb_copy_generic_ivar((VALUE)(clone),(VALUE)(obj));\
} while (0)
#define DUPSETUP(dup,obj) do {\
- OBJSETUP((dup),rb_obj_class(obj), (RBASIC(obj)->flags)&(T_MASK|FL_EXIVAR|FL_TAINT)); \
+ OBJSETUP((dup),rb_obj_class(obj), (RBASIC(obj)->flags)&(T_MASK|FL_EXIVAR|FL_TAINT|FL_UNTRUSTED)); \
if (FL_TEST((obj), FL_EXIVAR)) rb_copy_generic_ivar((VALUE)(dup),(VALUE)(obj));\
} while (0)
-#ifndef USE_RGENGC
-#define USE_RGENGC 1
-#endif
-
-#ifndef RGENGC_WB_PROTECTED_ARRAY
-#define RGENGC_WB_PROTECTED_ARRAY 1
-#endif
-#ifndef RGENGC_WB_PROTECTED_HASH
-#define RGENGC_WB_PROTECTED_HASH 1
-#endif
-#ifndef RGENGC_WB_PROTECTED_STRUCT
-#define RGENGC_WB_PROTECTED_STRUCT 1
-#endif
-#ifndef RGENGC_WB_PROTECTED_STRING
-#define RGENGC_WB_PROTECTED_STRING 1
-#endif
-#ifndef RGENGC_WB_PROTECTED_OBJECT
-#define RGENGC_WB_PROTECTED_OBJECT 1
-#endif
-#ifndef RGENGC_WB_PROTECTED_REGEXP
-#define RGENGC_WB_PROTECTED_REGEXP 1
-#endif
-#ifndef RGENGC_WB_PROTECTED_CLASS
-#define RGENGC_WB_PROTECTED_CLASS 1
-#endif
-#ifndef RGENGC_WB_PROTECTED_FLOAT
-#define RGENGC_WB_PROTECTED_FLOAT 1
-#endif
-#ifndef RGENGC_WB_PROTECTED_COMPLEX
-#define RGENGC_WB_PROTECTED_COMPLEX 1
-#endif
-#ifndef RGENGC_WB_PROTECTED_RATIONAL
-#define RGENGC_WB_PROTECTED_RATIONAL 1
-#endif
-#ifndef RGENGC_WB_PROTECTED_BIGNUM
-#define RGENGC_WB_PROTECTED_BIGNUM 1
-#endif
-#ifndef RGENGC_WB_PROTECTED_NODE_CREF
-#define RGENGC_WB_PROTECTED_NODE_CREF 1
-#endif
-
struct RBasic {
VALUE flags;
- const VALUE klass;
-}
-#ifdef __GNUC__
- __attribute__((aligned(sizeof(VALUE))))
-#endif
-;
-
-VALUE rb_obj_hide(VALUE obj);
-VALUE rb_obj_reveal(VALUE obj, VALUE klass); /* do not use this API to change klass information */
-
-#define RBASIC_CLASS(obj) (RBASIC(obj)->klass)
+ VALUE klass;
+};
#define ROBJECT_EMBED_LEN_MAX 3
struct RObject {
@@ -789,9 +732,9 @@ typedef struct rb_classext_struct rb_classext_t;
struct RClass {
struct RBasic basic;
- VALUE super;
rb_classext_t *ptr;
- struct method_table_wrapper *m_tbl_wrapper;
+ struct st_table *m_tbl;
+ struct st_table *iv_index_tbl;
};
#define RCLASS_SUPER(c) rb_class_get_superclass(c)
#define RMODULE_IV_TBL(m) RCLASS_IV_TBL(m)
@@ -807,10 +750,85 @@ struct RFloat {
double float_value;
};
-double rb_float_value(VALUE);
-VALUE rb_float_new(double);
VALUE rb_float_new_in_heap(double);
+#if USE_FLONUM
+#define RUBY_BIT_ROTL(v, n) (((v) << (n)) | ((v) >> ((sizeof(v) * 8) - n)))
+#define RUBY_BIT_ROTR(v, n) (((v) >> (n)) | ((v) << ((sizeof(v) * 8) - n)))
+
+static inline double
+rb_float_value(VALUE v)
+{
+ if (FLONUM_P(v)) {
+ if (v != (VALUE)0x8000000000000002) { /* LIKELY */
+ union {
+ double d;
+ VALUE v;
+ } t;
+
+ VALUE b63 = (v >> 63);
+ /* e: xx1... -> 011... */
+ /* xx0... -> 100... */
+ /* ^b63 */
+ t.v = RUBY_BIT_ROTR((2 - b63) | (v & ~0x03), 3);
+ return t.d;
+ }
+ else {
+ return 0.0;
+ }
+ }
+ else {
+ return ((struct RFloat *)v)->float_value;
+ }
+}
+
+static inline VALUE
+rb_float_new(double d)
+{
+ union {
+ double d;
+ VALUE v;
+ } t;
+ int bits;
+
+ t.d = d;
+ bits = (int)((VALUE)(t.v >> 60) & 0x7);
+ /* bits contains 3 bits of b62..b60. */
+ /* bits - 3 = */
+ /* b011 -> b000 */
+ /* b100 -> b001 */
+
+ if (t.v != 0x3000000000000000 /* 1.72723e-77 */ &&
+ !((bits-3) & ~0x01)) {
+ return (RUBY_BIT_ROTL(t.v, 3) & ~(VALUE)0x01) | 0x02;
+ }
+ else {
+ if (t.v == (VALUE)0) {
+ /* +0.0 */
+ return 0x8000000000000002;
+ }
+ else {
+ /* out of range */
+ return rb_float_new_in_heap(d);
+ }
+ }
+}
+
+#else /* USE_FLONUM */
+
+static inline double
+rb_float_value(VALUE v)
+{
+ return ((struct RFloat *)v)->float_value;
+}
+
+static inline VALUE
+rb_float_new(double d)
+{
+ return rb_float_new_in_heap(d);
+}
+#endif
+
#define RFLOAT_VALUE(v) rb_float_value(v)
#define DBL2NUM(dbl) rb_float_new(dbl)
@@ -832,7 +850,6 @@ struct RString {
} as;
};
#define RSTRING_NOEMBED FL_USER1
-#define RSTRING_FSTR FL_USER17
#define RSTRING_EMBED_LEN_MASK (FL_USER2|FL_USER3|FL_USER4|FL_USER5|FL_USER6)
#define RSTRING_EMBED_LEN_SHIFT (FL_USHIFT+2)
#define RSTRING_EMBED_LEN(str) \
@@ -866,9 +883,9 @@ struct RArray {
long capa;
VALUE shared;
} aux;
- const VALUE *ptr;
+ VALUE *ptr;
} heap;
- const VALUE ary[RARRAY_EMBED_LEN_MAX];
+ VALUE ary[RARRAY_EMBED_LEN_MAX];
} as;
};
#define RARRAY_EMBED_FLAG FL_USER1
@@ -880,36 +897,16 @@ struct RArray {
(long)((RBASIC(a)->flags >> RARRAY_EMBED_LEN_SHIFT) & \
(RARRAY_EMBED_LEN_MASK >> RARRAY_EMBED_LEN_SHIFT)) : \
RARRAY(a)->as.heap.len)
-
+#define RARRAY_PTR(a) \
+ ((RBASIC(a)->flags & RARRAY_EMBED_FLAG) ? \
+ RARRAY(a)->as.ary : \
+ RARRAY(a)->as.heap.ptr)
#define RARRAY_LENINT(ary) rb_long2int(RARRAY_LEN(ary))
-#define RARRAY_CONST_PTR(a) \
- ((const VALUE *)((RBASIC(a)->flags & RARRAY_EMBED_FLAG) ? \
- RARRAY(a)->as.ary : \
- RARRAY(a)->as.heap.ptr))
-
-#define RARRAY_PTR_USE_START(a) ((VALUE *)RARRAY_CONST_PTR(a))
-#define RARRAY_PTR_USE_END(a) /* */
-
-#define RARRAY_PTR_USE(ary, ptr_name, expr) do { \
- const VALUE _ary = (ary); \
- VALUE *ptr_name = (VALUE *)RARRAY_PTR_USE_START(_ary); \
- expr; \
- RARRAY_PTR_USE_END(_ary); \
-} while (0)
-
-#define RARRAY_AREF(a, i) (RARRAY_CONST_PTR(a)[i])
-#define RARRAY_ASET(a, i, v) do { \
- const VALUE _ary_ = (a); \
- RB_OBJ_WRITE(_ary_, &RARRAY_CONST_PTR(_ary_)[i], (v)); \
-} while (0)
-
-#define RARRAY_PTR(a) ((VALUE *)RARRAY_CONST_PTR(RGENGC_WB_PROTECTED_ARRAY ? OBJ_WB_UNPROTECT((VALUE)a) : ((VALUE)a)))
-
struct RRegexp {
struct RBasic basic;
struct re_pattern_buffer *ptr;
- const VALUE src;
+ VALUE src;
unsigned long usecnt;
};
#define RREGEXP_SRC(r) RREGEXP(r)->src
@@ -921,15 +918,14 @@ struct RHash {
struct RBasic basic;
struct st_table *ntbl; /* possibly 0 */
int iter_lev;
- const VALUE ifnone;
+ VALUE ifnone;
};
/* RHASH_TBL allocates st_table if not available. */
#define RHASH_TBL(h) rb_hash_tbl(h)
#define RHASH_ITER_LEV(h) (RHASH(h)->iter_lev)
#define RHASH_IFNONE(h) (RHASH(h)->ifnone)
-#define RHASH_SIZE(h) (RHASH(h)->ntbl ? (st_index_t)RHASH(h)->ntbl->num_entries : 0)
+#define RHASH_SIZE(h) (RHASH(h)->ntbl ? RHASH(h)->ntbl->num_entries : 0)
#define RHASH_EMPTY_P(h) (RHASH_SIZE(h) == 0)
-#define RHASH_SET_IFNONE(h, ifnone) rb_hash_set_ifnone((VALUE)h, ifnone)
struct RFile {
struct RBasic basic;
@@ -938,22 +934,16 @@ struct RFile {
struct RRational {
struct RBasic basic;
- const VALUE num;
- const VALUE den;
+ VALUE num;
+ VALUE den;
};
-#define RRATIONAL_SET_NUM(rat, n) RB_OBJ_WRITE((rat), &((struct RRational *)(rat))->num,(n))
-#define RRATIONAL_SET_DEN(rat, d) RB_OBJ_WRITE((rat), &((struct RRational *)(rat))->den,(d))
-
struct RComplex {
struct RBasic basic;
- const VALUE real;
- const VALUE imag;
+ VALUE real;
+ VALUE imag;
};
-#define RCOMPLEX_SET_REAL(cmp, r) RB_OBJ_WRITE((cmp), &((struct RComplex *)(cmp))->real,(r))
-#define RCOMPLEX_SET_IMAG(cmp, i) RB_OBJ_WRITE((cmp), &((struct RComplex *)(cmp))->imag,(i))
-
struct RData {
struct RBasic basic;
void (*dmark)(void*);
@@ -975,7 +965,6 @@ struct rb_data_type_struct {
const rb_data_type_t *parent;
void *data; /* This area can be used for any purpose
by a programmer who define the type. */
- VALUE flags; /* FL_WB_PROTECTED */
};
#define HAVE_TYPE_RB_DATA_TYPE_T 1
@@ -1011,10 +1000,6 @@ void *rb_check_typeddata(VALUE, const rb_data_type_t *);
#define RUBY_TYPED_DEFAULT_FREE RUBY_DEFAULT_FREE
#define RUBY_TYPED_NEVER_FREE RUBY_NEVER_FREE
-/* bits for rb_data_type_struct::flags */
-#define RUBY_TYPED_FREE_IMMEDIATELY 1 /* TYPE field */
-#define RUBY_TYPED_WB_PROTECTED FL_WB_PROTECTED
-
#define Data_Wrap_Struct(klass,mark,free,sval)\
rb_data_object_alloc((klass),(sval),(RUBY_DATA_FUNC)(mark),(RUBY_DATA_FUNC)(free))
@@ -1048,9 +1033,9 @@ struct RStruct {
union {
struct {
long len;
- const VALUE *ptr;
+ VALUE *ptr;
} heap;
- const VALUE ary[RSTRUCT_EMBED_LEN_MAX];
+ VALUE ary[RSTRUCT_EMBED_LEN_MAX];
} as;
};
#define RSTRUCT_EMBED_LEN_MASK (FL_USER2|FL_USER1)
@@ -1060,24 +1045,13 @@ struct RStruct {
(long)((RBASIC(st)->flags >> RSTRUCT_EMBED_LEN_SHIFT) & \
(RSTRUCT_EMBED_LEN_MASK >> RSTRUCT_EMBED_LEN_SHIFT)) : \
RSTRUCT(st)->as.heap.len)
+#define RSTRUCT_PTR(st) \
+ ((RBASIC(st)->flags & RSTRUCT_EMBED_LEN_MASK) ? \
+ RSTRUCT(st)->as.ary : \
+ RSTRUCT(st)->as.heap.ptr)
#define RSTRUCT_LENINT(st) rb_long2int(RSTRUCT_LEN(st))
-#define RSTRUCT_CONST_PTR(st) \
- ((RBASIC(st)->flags & RSTRUCT_EMBED_LEN_MASK) ? \
- RSTRUCT(st)->as.ary : \
- RSTRUCT(st)->as.heap.ptr)
-#define RSTRUCT_PTR(st) ((VALUE *)RSTRUCT_CONST_PTR(RGENGC_WB_PROTECTED_STRUCT ? OBJ_WB_UNPROTECT((VALUE)st) : (VALUE)st))
-
-#define RSTRUCT_SET(st, idx, v) RB_OBJ_WRITE(st, &RSTRUCT_CONST_PTR(st)[idx], (v))
-#define RSTRUCT_GET(st, idx) (RSTRUCT_CONST_PTR(st)[idx])
-
-#define RBIGNUM_EMBED_LEN_NUMBITS 3
-#ifndef RBIGNUM_EMBED_LEN_MAX
-# if (SIZEOF_VALUE*3/SIZEOF_ACTUAL_BDIGIT) < (1 << RBIGNUM_EMBED_LEN_NUMBITS)-1
-# define RBIGNUM_EMBED_LEN_MAX (SIZEOF_VALUE*3/SIZEOF_ACTUAL_BDIGIT)
-# else
-# define RBIGNUM_EMBED_LEN_MAX ((1 << RBIGNUM_EMBED_LEN_NUMBITS)-1)
-# endif
-#endif
+
+#define RBIGNUM_EMBED_LEN_MAX ((int)((sizeof(VALUE)*3)/sizeof(BDIGIT)))
struct RBignum {
struct RBasic basic;
union {
@@ -1099,7 +1073,7 @@ struct RBignum {
#define RBIGNUM_EMBED_FLAG FL_USER2
#define RBIGNUM_EMBED_LEN_MASK (FL_USER5|FL_USER4|FL_USER3)
-#define RBIGNUM_EMBED_LEN_SHIFT (FL_USHIFT+RBIGNUM_EMBED_LEN_NUMBITS)
+#define RBIGNUM_EMBED_LEN_SHIFT (FL_USHIFT+3)
#define RBIGNUM_LEN(b) \
((RBASIC(b)->flags & RBIGNUM_EMBED_FLAG) ? \
(long)((RBASIC(b)->flags >> RBIGNUM_EMBED_LEN_SHIFT) & \
@@ -1131,11 +1105,11 @@ struct RBignum {
#define RCOMPLEX(obj) (R_CAST(RComplex)(obj))
#define FL_SINGLETON FL_USER0
-#define FL_WB_PROTECTED (((VALUE)1)<<5)
-#define FL_PROMOTED (((VALUE)1)<<6)
+#define FL_RESERVED1 (((VALUE)1)<<5)
+#define FL_RESERVED2 (((VALUE)1)<<6) /* will be used in the future GC */
#define FL_FINALIZE (((VALUE)1)<<7)
#define FL_TAINT (((VALUE)1)<<8)
-#define FL_UNTRUSTED FL_TAINT
+#define FL_UNTRUSTED (((VALUE)1)<<9)
#define FL_EXIVAR (((VALUE)1)<<10)
#define FL_FREEZE (((VALUE)1)<<11)
@@ -1165,8 +1139,7 @@ struct RBignum {
#define SPECIAL_CONST_P(x) (IMMEDIATE_P(x) || !RTEST(x))
#define FL_ABLE(x) (!SPECIAL_CONST_P(x) && BUILTIN_TYPE(x) != T_NODE)
-#define FL_TEST_RAW(x,f) (RBASIC(x)->flags&(f))
-#define FL_TEST(x,f) (FL_ABLE(x)?FL_TEST_RAW((x),(f)):0)
+#define FL_TEST(x,f) (FL_ABLE(x)?(RBASIC(x)->flags&(f)):0)
#define FL_ANY(x,f) FL_TEST((x),(f))
#define FL_ALL(x,f) (FL_TEST((x),(f)) == (f))
#define FL_SET(x,f) do {if (FL_ABLE(x)) RBASIC(x)->flags |= (f);} while (0)
@@ -1175,104 +1148,17 @@ struct RBignum {
#define OBJ_TAINTED(x) (!!FL_TEST((x), FL_TAINT))
#define OBJ_TAINT(x) FL_SET((x), FL_TAINT)
-#define OBJ_UNTRUSTED(x) OBJ_TAINTED(x)
-#define OBJ_UNTRUST(x) OBJ_TAINT(x)
+#define OBJ_UNTRUSTED(x) (!!FL_TEST((x), FL_UNTRUSTED))
+#define OBJ_UNTRUST(x) FL_SET((x), FL_UNTRUSTED)
#define OBJ_INFECT(x,s) do { \
if (FL_ABLE(x) && FL_ABLE(s)) \
- RBASIC(x)->flags |= RBASIC(s)->flags & FL_TAINT; \
+ RBASIC(x)->flags |= RBASIC(s)->flags & \
+ (FL_TAINT | FL_UNTRUSTED); \
} while (0)
-#define OBJ_FROZEN(x) (!!(FL_ABLE(x)?(RBASIC(x)->flags&(FL_FREEZE)):(FIXNUM_P(x)||FLONUM_P(x)||SYMBOL_P(x))))
+#define OBJ_FROZEN(x) (!!(FL_ABLE(x)?(RBASIC(x)->flags&(FL_FREEZE)):(FIXNUM_P(x)||FLONUM_P(x))))
#define OBJ_FREEZE(x) FL_SET((x), FL_FREEZE)
-#if USE_RGENGC
-#define OBJ_PROMOTED(x) (SPECIAL_CONST_P(x) ? 0 : FL_TEST_RAW((x), FL_PROMOTED))
-#define OBJ_WB_PROTECTED(x) (SPECIAL_CONST_P(x) ? 1 : FL_TEST_RAW((x), FL_WB_PROTECTED))
-#define OBJ_WB_UNPROTECT(x) rb_obj_wb_unprotect(x, __FILE__, __LINE__)
-
-void rb_gc_writebarrier(VALUE a, VALUE b);
-void rb_gc_writebarrier_unprotect_promoted(VALUE obj);
-
-#else /* USE_RGENGC */
-#define OBJ_PROMOTED(x) 0
-#define OBJ_WB_PROTECTED(x) 0
-#define OBJ_WB_UNPROTECT(x) rb_obj_wb_unprotect(x, __FILE__, __LINE__)
-#endif
-
-/* Write barrier (WB) interfaces:
- * - RB_OBJ_WRITE(a, slot, b): WB for new reference from `a' to `b'.
- * Write `b' into `*slot'. `slot' is a pointer in `a'.
- * - RB_OBJ_WRITTEN(a, oldv, b): WB for new reference from `a' to `b'.
- * This doesn't write any values, but only a WB declaration.
- * `oldv' is replaced value with `b' (not used in current Ruby).
- *
- * NOTE: The following core interfaces can be changed in the future.
- * Please catch up if you want to insert WB into C-extensions
- * correctly.
- */
-#define RB_OBJ_WRITE(a, slot, b) rb_obj_write((VALUE)(a), (VALUE *)(slot), (VALUE)(b), __FILE__, __LINE__)
-#define RB_OBJ_WRITTEN(a, oldv, b) rb_obj_written((VALUE)(a), (VALUE)(oldv), (VALUE)(b), __FILE__, __LINE__)
-
-#ifndef USE_RGENGC_LOGGING_WB_UNPROTECT
-#define USE_RGENGC_LOGGING_WB_UNPROTECT 0
-#endif
-
-#if USE_RGENGC_LOGGING_WB_UNPROTECT
-void rb_gc_unprotect_logging(void *objptr, const char *filename, int line);
-#define RGENGC_LOGGING_WB_UNPROTECT rb_gc_unprotect_logging
-#endif
-
-static inline VALUE
-rb_obj_wb_unprotect(VALUE x, RB_UNUSED_VAR(const char *filename), RB_UNUSED_VAR(int line))
-{
-#ifdef RGENGC_LOGGING_WB_UNPROTECT
- RGENGC_LOGGING_WB_UNPROTECT((void *)x, filename, line);
-#endif
-
-#if USE_RGENGC
- /* `x' should be an RVALUE object */
- if (FL_TEST_RAW((x), FL_WB_PROTECTED)) {
- if (FL_TEST_RAW((x), FL_PROMOTED)) {
- rb_gc_writebarrier_unprotect_promoted(x);
- }
- RBASIC(x)->flags &= ~FL_WB_PROTECTED;
- }
-#endif
- return x;
-}
-
-static inline VALUE
-rb_obj_written(VALUE a, RB_UNUSED_VAR(VALUE oldv), VALUE b, RB_UNUSED_VAR(const char *filename), RB_UNUSED_VAR(int line))
-{
-#ifdef RGENGC_LOGGING_OBJ_WRITTEN
- RGENGC_LOGGING_OBJ_WRITTEN(a, oldv, b, filename, line);
-#endif
-
-#if USE_RGENGC
- /* `a' should be an RVALUE object */
- if (FL_TEST_RAW((a), FL_PROMOTED) && !SPECIAL_CONST_P(b)) {
- rb_gc_writebarrier(a, b);
- }
-#endif
-
- return a;
-}
-
-static inline VALUE
-rb_obj_write(VALUE a, VALUE *slot, VALUE b, RB_UNUSED_VAR(const char *filename), RB_UNUSED_VAR(int line))
-{
-#ifdef RGENGC_LOGGING_WRITE
- RGENGC_LOGGING_WRITE(a, slot, b, filename, line);
-#endif
-
- *slot = b;
-
-#if USE_RGENGC
- rb_obj_written(a, Qundef /* ignore `oldv' now */, b, filename, line);
-#endif
- return a;
-}
-
#if SIZEOF_INT < SIZEOF_LONG
# define INT2NUM(v) INT2FIX((int)(v))
# define UINT2NUM(v) LONG2FIX((unsigned int)(v))
@@ -1336,7 +1222,7 @@ rb_num2char_inline(VALUE x)
#define ALLOCA_N(type,n) ((type*)alloca(sizeof(type)*(n)))
-void *rb_alloc_tmp_buffer(volatile VALUE *store, long len) RUBY_ATTR_ALLOC_SIZE((2));
+void *rb_alloc_tmp_buffer(volatile VALUE *store, long len);
void rb_free_tmp_buffer(volatile VALUE *store);
/* allocates _n_ bytes temporary buffer and stores VALUE including it
* in _v_. _n_ may be evaluated twice. */
@@ -1451,18 +1337,12 @@ VALUE rb_eval_string(const char*);
VALUE rb_eval_string_protect(const char*, int*);
VALUE rb_eval_string_wrap(const char*, int*);
VALUE rb_funcall(VALUE, ID, int, ...);
-VALUE rb_funcallv(VALUE, ID, int, const VALUE*);
-VALUE rb_funcallv_public(VALUE, ID, int, const VALUE*);
-#define rb_funcall2 rb_funcallv
-#define rb_funcall3 rb_funcallv_public
+VALUE rb_funcall2(VALUE, ID, int, const VALUE*);
+VALUE rb_funcall3(VALUE, ID, int, const VALUE*);
VALUE rb_funcall_passing_block(VALUE, ID, int, const VALUE*);
-VALUE rb_funcall_with_block(VALUE, ID, int, const VALUE*, VALUE);
int rb_scan_args(int, const VALUE*, const char*, ...);
VALUE rb_call_super(int, const VALUE*);
-/* rb_scan_args() format allows ':' for optional hash */
-#define HAVE_RB_SCAN_ARGS_OPTIONAL_HASH 1
-
VALUE rb_gv_set(const char*, VALUE);
VALUE rb_gv_get(const char*);
VALUE rb_iv_get(VALUE, const char*);
@@ -1483,7 +1363,6 @@ NORETURN(void rb_sys_fail(const char*));
NORETURN(void rb_sys_fail_str(VALUE));
NORETURN(void rb_mod_sys_fail(VALUE, const char*));
NORETURN(void rb_mod_sys_fail_str(VALUE, VALUE));
-NORETURN(void rb_readwrite_sys_fail(int, const char*));
NORETURN(void rb_iter_break(void));
NORETURN(void rb_iter_break_value(VALUE));
NORETURN(void rb_exit(int));
@@ -1503,31 +1382,17 @@ PRINTF_ARGS(void rb_sys_warning(const char*, ...), 1, 2);
PRINTF_ARGS(void rb_warn(const char*, ...), 1, 2);
PRINTF_ARGS(void rb_compile_warn(const char *, int, const char*, ...), 3, 4);
-/* for rb_readwrite_sys_fail first argument */
-#define RB_IO_WAIT_READABLE 0
-#define RB_IO_WAIT_WRITABLE 1
-
-#define RUBY_BLOCK_CALL_FUNC_TAKES_BLOCKARG 1
-#define RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg, callback_arg) \
- VALUE yielded_arg, VALUE callback_arg, int argc, const VALUE *argv, VALUE blockarg
-typedef VALUE rb_block_call_func(RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg, callback_arg));
-
-#if defined RB_BLOCK_CALL_FUNC_STRICT && RB_BLOCK_CALL_FUNC_STRICT
-typedef rb_block_call_func *rb_block_call_func_t;
-#else
-typedef VALUE (*rb_block_call_func_t)(ANYARGS);
-#endif
+typedef VALUE rb_block_call_func(VALUE, VALUE, int, VALUE*);
VALUE rb_each(VALUE);
VALUE rb_yield(VALUE);
VALUE rb_yield_values(int n, ...);
VALUE rb_yield_values2(int n, const VALUE *argv);
VALUE rb_yield_splat(VALUE);
-VALUE rb_yield_block(VALUE, VALUE, int, const VALUE *, VALUE); /* rb_block_call_func */
int rb_block_given_p(void);
void rb_need_block(void);
VALUE rb_iterate(VALUE(*)(VALUE),VALUE,VALUE(*)(ANYARGS),VALUE);
-VALUE rb_block_call(VALUE,ID,int,const VALUE*,rb_block_call_func_t,VALUE);
+VALUE rb_block_call(VALUE,ID,int,VALUE*,VALUE(*)(ANYARGS),VALUE);
VALUE rb_rescue(VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE);
VALUE rb_rescue2(VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE,...);
VALUE rb_ensure(VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE);
@@ -1691,6 +1556,7 @@ rb_special_const_p(VALUE obj)
}
#endif
+#include "ruby/missing.h"
#include "ruby/intern.h"
#if defined(EXTLIB) && defined(USE_DLN_A_OUT)
@@ -1715,27 +1581,16 @@ int ruby_native_thread_p(void);
#define RUBY_EVENT_ALL 0x00ff
/* for TracePoint extended events */
-#define RUBY_EVENT_B_CALL 0x0100
-#define RUBY_EVENT_B_RETURN 0x0200
-#define RUBY_EVENT_THREAD_BEGIN 0x0400
-#define RUBY_EVENT_THREAD_END 0x0800
-#define RUBY_EVENT_TRACEPOINT_ALL 0xffff
+#define RUBY_EVENT_B_CALL 0x0100
+#define RUBY_EVENT_B_RETURN 0x0200
+#define RUBY_EVENT_THREAD_BEGIN 0x0400
+#define RUBY_EVENT_THREAD_END 0x0800
+#define RUBY_EVENT_TRACEPOINT_ALL 0xFFFF
/* special events */
-#define RUBY_EVENT_SPECIFIED_LINE 0x010000
-#define RUBY_EVENT_COVERAGE 0x020000
-
-/* internal events */
-#define RUBY_INTERNAL_EVENT_SWITCH 0x040000
-#define RUBY_EVENT_SWITCH 0x040000 /* obsolete name. this macro is for compatibility */
- /* 0x080000 */
-#define RUBY_INTERNAL_EVENT_NEWOBJ 0x100000
-#define RUBY_INTERNAL_EVENT_FREEOBJ 0x200000
-#define RUBY_INTERNAL_EVENT_GC_START 0x400000
-#define RUBY_INTERNAL_EVENT_GC_END_MARK 0x800000
-#define RUBY_INTERNAL_EVENT_GC_END_SWEEP 0x1000000
-#define RUBY_INTERNAL_EVENT_OBJSPACE_MASK 0x1f00000
-#define RUBY_INTERNAL_EVENT_MASK 0xfffe0000
+#define RUBY_EVENT_SPECIFIED_LINE 0x10000
+#define RUBY_EVENT_SWITCH 0x20000
+#define RUBY_EVENT_COVERAGE 0x40000
typedef unsigned long rb_event_flag_t;
typedef void (*rb_event_hook_func_t)(rb_event_flag_t evflag, VALUE data, VALUE self, ID mid, VALUE klass);
@@ -1766,7 +1621,6 @@ int rb_toupper(int c);
#define ISASCII(c) rb_isascii((unsigned char)(c))
#undef ISPRINT
#define ISPRINT(c) rb_isprint((unsigned char)(c))
-#define ISGRAPH(c) rb_isgraph((unsigned char)(c))
#define ISSPACE(c) rb_isspace((unsigned char)(c))
#define ISUPPER(c) rb_isupper((unsigned char)(c))
#define ISLOWER(c) rb_islower((unsigned char)(c))
@@ -1778,10 +1632,10 @@ int rb_toupper(int c);
#define TOUPPER(c) rb_toupper((unsigned char)(c))
#define TOLOWER(c) rb_tolower((unsigned char)(c))
-int st_locale_insensitive_strcasecmp(const char *s1, const char *s2);
-int st_locale_insensitive_strncasecmp(const char *s1, const char *s2, size_t n);
-#define STRCASECMP(s1, s2) (st_locale_insensitive_strcasecmp((s1), (s2)))
-#define STRNCASECMP(s1, s2, n) (st_locale_insensitive_strncasecmp((s1), (s2), (n)))
+int st_strcasecmp(const char *s1, const char *s2);
+int st_strncasecmp(const char *s1, const char *s2, size_t n);
+#define STRCASECMP(s1, s2) (st_strcasecmp((s1), (s2)))
+#define STRNCASECMP(s1, s2, n) (st_strncasecmp((s1), (s2), (n)))
unsigned long ruby_strtoul(const char *str, char **endptr, int base);
#define STRTOUL(str, endptr, base) (ruby_strtoul((str), (endptr), (base)))
@@ -1799,7 +1653,7 @@ int ruby_vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
* @defgroup embed CRuby Embedding APIs
* CRuby interpreter APIs. These are APIs to embed MRI interpreter into your
* program.
- * These functions are not a part of Ruby extension library API.
+ * These functions are not a part of Ruby extention library API.
* Extension libraries of Ruby should not depend on these functions.
* @{
*/
@@ -1861,7 +1715,9 @@ void ruby_sig_finalize(void);
/*! @} */
-RUBY_SYMBOL_EXPORT_END
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility pop
+#endif
#if defined(__cplusplus)
#if 0
diff --git a/include/ruby/st.h b/include/ruby/st.h
index 975da655bf..c2294a92c1 100644
--- a/include/ruby/st.h
+++ b/include/ruby/st.h
@@ -14,7 +14,22 @@ extern "C" {
#include "ruby/defines.h"
-RUBY_SYMBOL_EXPORT_BEGIN
+#if defined STDC_HEADERS
+#include <stddef.h>
+#elif defined HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility push(default)
+#endif
#if SIZEOF_LONG == SIZEOF_VOIDP
typedef unsigned long st_data_t;
@@ -59,13 +74,6 @@ struct st_hash_type {
#define ST_INDEX_BITS (sizeof(st_index_t) * CHAR_BIT)
-#if defined(HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR) && defined(HAVE_BUILTIN___BUILTIN_TYPES_COMPATIBLE_P)
-# define ST_DATA_COMPATIBLE_P(type) \
- __builtin_choose_expr(__builtin_types_compatible_p(type, st_data_t), 1, 0)
-#else
-# define ST_DATA_COMPATIBLE_P(type) 0
-#endif
-
struct st_table {
const struct st_hash_type *type;
st_index_t num_bins;
@@ -109,7 +117,6 @@ st_table *st_init_strcasetable(void);
st_table *st_init_strcasetable_with_size(st_index_t);
int st_delete(st_table *, st_data_t *, st_data_t *); /* returns 0:notfound 1:deleted */
int st_delete_safe(st_table *, st_data_t *, st_data_t *, st_data_t);
-int st_shift(st_table *, st_data_t *, st_data_t *); /* returns 0:notfound 1:deleted */
int st_insert(st_table *, st_data_t, st_data_t);
int st_insert2(st_table *, st_data_t, st_data_t, st_data_t (*)(st_data_t));
int st_lookup(st_table *, st_data_t, st_data_t *);
@@ -119,10 +126,6 @@ int st_update(st_table *table, st_data_t key, st_update_callback_func *func, st_
int st_foreach(st_table *, int (*)(ANYARGS), st_data_t);
int st_foreach_check(st_table *, int (*)(ANYARGS), st_data_t, st_data_t);
int st_reverse_foreach(st_table *, int (*)(ANYARGS), st_data_t);
-st_index_t st_keys(st_table *table, st_data_t *keys, st_index_t size);
-st_index_t st_keys_check(st_table *table, st_data_t *keys, st_index_t size, st_data_t never);
-st_index_t st_values(st_table *table, st_data_t *values, st_index_t size);
-st_index_t st_values_check(st_table *table, st_data_t *values, st_index_t size, st_data_t never);
void st_add_direct(st_table *, st_data_t, st_data_t);
void st_free_table(st_table *);
void st_cleanup_safe(st_table *, st_data_t);
@@ -130,10 +133,8 @@ void st_clear(st_table *);
st_table *st_copy(st_table *);
int st_numcmp(st_data_t, st_data_t);
st_index_t st_numhash(st_data_t);
-int st_locale_insensitive_strcasecmp(const char *s1, const char *s2);
-int st_locale_insensitive_strncasecmp(const char *s1, const char *s2, size_t n);
-#define st_strcasecmp st_locale_insensitive_strcasecmp
-#define st_strncasecmp st_locale_insensitive_strncasecmp
+int st_strcasecmp(const char *s1, const char *s2);
+int st_strncasecmp(const char *s1, const char *s2, size_t n);
size_t st_memsize(const st_table *);
st_index_t st_hash(const void *ptr, size_t len, st_index_t h);
st_index_t st_hash_uint32(st_index_t h, uint32_t i);
@@ -142,7 +143,9 @@ st_index_t st_hash_end(st_index_t h);
st_index_t st_hash_start(st_index_t h);
#define st_hash_start(h) ((st_index_t)(h))
-RUBY_SYMBOL_EXPORT_END
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility pop
+#endif
#if defined(__cplusplus)
#if 0
diff --git a/include/ruby/thread.h b/include/ruby/thread.h
index 550f678e54..fb9057c70f 100644
--- a/include/ruby/thread.h
+++ b/include/ruby/thread.h
@@ -21,7 +21,9 @@ extern "C" {
#include "ruby/intern.h"
-RUBY_SYMBOL_EXPORT_BEGIN
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility push(default)
+#endif
void *rb_thread_call_with_gvl(void *(*func)(void *), void *data1);
@@ -33,7 +35,9 @@ void *rb_thread_call_without_gvl2(void *(*func)(void *), void *data1,
#define RUBY_CALL_WO_GVL_FLAG_SKIP_CHECK_INTS_AFTER 0x01
#define RUBY_CALL_WO_GVL_FLAG_SKIP_CHECK_INTS_
-RUBY_SYMBOL_EXPORT_END
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility pop
+#endif
#if defined(__cplusplus)
#if 0
diff --git a/include/ruby/util.h b/include/ruby/util.h
index 5be5f2e0b4..02aa643916 100644
--- a/include/ruby/util.h
+++ b/include/ruby/util.h
@@ -45,7 +45,9 @@ extern "C" {
#endif
#endif
-RUBY_SYMBOL_EXPORT_BEGIN
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility push(default)
+#endif
#define scan_oct(s,l,e) ((int)ruby_scan_oct((s),(l),(e)))
unsigned long ruby_scan_oct(const char *, size_t, size_t *);
@@ -83,7 +85,9 @@ double ruby_strtod(const char *, char **);
void ruby_each_words(const char *, void (*)(const char*, int, void*), void *);
-RUBY_SYMBOL_EXPORT_END
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility pop
+#endif
#if defined(__cplusplus)
#if 0
diff --git a/include/ruby/version.h b/include/ruby/version.h
index 4ffcc7a9ad..b41b64fe66 100644
--- a/include/ruby/version.h
+++ b/include/ruby/version.h
@@ -31,7 +31,7 @@
/* API version */
#define RUBY_API_VERSION_MAJOR 2
-#define RUBY_API_VERSION_MINOR 1
+#define RUBY_API_VERSION_MINOR 0
#define RUBY_API_VERSION_TEENY 0
#define RUBY_API_VERSION_CODE (RUBY_API_VERSION_MAJOR*10000+RUBY_API_VERSION_MINOR*100+RUBY_API_VERSION_TEENY)
@@ -43,7 +43,9 @@ extern "C" {
#endif
#endif
-RUBY_SYMBOL_EXPORT_BEGIN
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility push(default)
+#endif
/*
* Interfaces from extension libraries.
@@ -61,7 +63,9 @@ RUBY_EXTERN const char ruby_description[];
RUBY_EXTERN const char ruby_copyright[];
RUBY_EXTERN const char ruby_engine[];
-RUBY_SYMBOL_EXPORT_END
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility pop
+#endif
#if defined(__cplusplus)
#if 0
diff --git a/include/ruby/vm.h b/include/ruby/vm.h
index 73345264bd..1146bf5426 100644
--- a/include/ruby/vm.h
+++ b/include/ruby/vm.h
@@ -19,7 +19,9 @@ extern "C" {
#endif
#endif
-RUBY_SYMBOL_EXPORT_BEGIN
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility push(default)
+#endif
/* Place holder.
*
@@ -52,7 +54,9 @@ int ruby_vm_destruct(ruby_vm_t *vm);
*/
void ruby_vm_at_exit(void(*func)(ruby_vm_t *));
-RUBY_SYMBOL_EXPORT_END
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility pop
+#endif
#if defined(__cplusplus)
#if 0
diff --git a/include/ruby/win32.h b/include/ruby/win32.h
index 070bab28f9..9645cc888d 100644
--- a/include/ruby/win32.h
+++ b/include/ruby/win32.h
@@ -8,7 +8,9 @@ extern "C" {
#endif
#endif
-RUBY_SYMBOL_EXPORT_BEGIN
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility push(default)
+#endif
/*
* Copyright (c) 1993, Intergraph Corporation
@@ -37,9 +39,6 @@ extern "C++" { /* template without extern "C++" */
#endif
#include <winsock2.h>
#include <ws2tcpip.h>
-#if !defined(_MSC_VER) || _MSC_VER >= 1400
-#include <iphlpapi.h>
-#endif
#if defined(__cplusplus) && defined(_MSC_VER)
}
#endif
@@ -88,14 +87,6 @@ typedef int intptr_t;
# endif
# define _INTPTR_T_DEFINED
# endif
-# if !defined(INTPTR_MAX)
-# ifdef _WIN64
-# define INTPTR_MAX 9223372036854775807I64
-# else
-# define INTPTR_MAX 2147483647
-# endif
-# define INTPTR_MIN (-INTPTR_MAX-1)
-# endif
# if !defined(_UINTPTR_T_DEFINED)
# ifdef _WIN64
typedef unsigned __int64 uintptr_t;
@@ -104,13 +95,6 @@ typedef unsigned int uintptr_t;
# endif
# define _UINTPTR_T_DEFINED
# endif
-# if !defined(UINTPTR_MAX)
-# ifdef _WIN64
-# define UINTPTR_MAX 18446744073709551615UI64
-# else
-# define UINTPTR_MAX 4294967295U
-# endif
-# endif
#endif
#ifndef __MINGW32__
# define mode_t int
@@ -124,10 +108,6 @@ typedef unsigned int uintptr_t;
#define WNOHANG -1
-typedef int clockid_t;
-#define CLOCK_REALTIME 0
-#define CLOCK_MONOTONIC 1
-
#undef getc
#undef putc
#undef fgetc
@@ -197,7 +177,7 @@ typedef int clockid_t;
#if SIZEOF_OFF_T == 8
#define off_t __int64
#define stat stati64
-#define fstat(fd,st) fstati64(fd,st)
+#define fstat(fd,st) _fstati64(fd,st)
#if defined(__BORLANDC__)
#define stati64(path, st) rb_w32_stati64(path, st)
#elif !defined(_MSC_VER) || RT_VER < 80
@@ -242,26 +222,6 @@ struct msghdr {
int msg_flags;
};
-/* for getifaddrs() and others */
-struct ifaddrs {
- struct ifaddrs *ifa_next;
- char *ifa_name;
- u_int ifa_flags;
- struct sockaddr *ifa_addr;
- struct sockaddr *ifa_netmask;
- struct sockaddr *ifa_broadaddr;
- struct sockaddr *ifa_dstaddr;
- void *ifa_data;
-};
-#ifdef IF_NAMESIZE
-#define IFNAMSIZ IF_NAMESIZE
-#else
-#define IFNAMSIZ 256
-#endif
-#ifdef IFF_POINTTOPOINT
-#define IFF_POINTOPOINT IFF_POINTTOPOINT
-#endif
-
extern DWORD rb_w32_osid(void);
extern int rb_w32_cmdvector(const char *, char ***);
extern rb_pid_t rb_w32_pipe_exec(const char *, const char *, int, int *, int *);
@@ -297,9 +257,7 @@ extern struct protoent *WSAAPI rb_w32_getprotobyname(const char *);
extern struct protoent *WSAAPI rb_w32_getprotobynumber(int);
extern struct servent *WSAAPI rb_w32_getservbyname(const char *, const char *);
extern struct servent *WSAAPI rb_w32_getservbyport(int, const char *);
-extern int socketpair(int, int, int, int *);
-extern int getifaddrs(struct ifaddrs **);
-extern void freeifaddrs(struct ifaddrs *);
+extern int rb_w32_socketpair(int, int, int, int *);
extern char * rb_w32_getcwd(char *, int);
extern char * rb_w32_ugetenv(const char *);
extern char * rb_w32_getenv(const char *);
@@ -316,15 +274,10 @@ extern int rb_w32_uchown(const char *, int, int);
extern int link(const char *, const char *);
extern int rb_w32_ulink(const char *, const char *);
extern int gettimeofday(struct timeval *, struct timezone *);
-extern int clock_gettime(clockid_t, struct timespec *);
-extern int clock_getres(clockid_t, struct timespec *);
extern rb_pid_t waitpid (rb_pid_t, int *, int);
extern rb_pid_t rb_w32_spawn(int, const char *, const char*);
extern rb_pid_t rb_w32_aspawn(int, const char *, char *const *);
extern rb_pid_t rb_w32_aspawn_flags(int, const char *, char *const *, DWORD);
-extern rb_pid_t rb_w32_uspawn(int, const char *, const char*);
-extern rb_pid_t rb_w32_uaspawn(int, const char *, char *const *);
-extern rb_pid_t rb_w32_uaspawn_flags(int, const char *, char *const *, DWORD);
extern int kill(int, int);
extern int fcntl(int, int, ...);
extern rb_pid_t rb_w32_getpid(void);
@@ -346,7 +299,6 @@ extern int rb_w32_access(const char *, int);
extern int rb_w32_uaccess(const char *, int);
extern char rb_w32_fd_is_text(int);
extern int rb_w32_fstati64(int, struct stati64 *);
-extern int rb_w32_dup2(int, int);
#ifdef __BORLANDC__
extern off_t _lseeki64(int, off_t, int);
@@ -356,20 +308,6 @@ extern FILE *rb_w32_fsopen(const char *, const char *, int);
#endif
#include <float.h>
-
-#if defined _MSC_VER && _MSC_VER >= 1800 && defined INFINITY
-#pragma warning(push)
-#pragma warning(disable:4756)
-static inline float
-rb_infinity_float(void)
-{
- return INFINITY;
-}
-#pragma warning(pop)
-#undef INFINITY
-#define INFINITY rb_infinity_float()
-#endif
-
#if !defined __MINGW32__ || defined __NO_ISOCEXT
#ifndef isnan
#define isnan(x) _isnan(x)
@@ -387,8 +325,6 @@ scalb(double a, long b)
{
return _scalb(a, b);
}
-#else
-__declspec(dllimport) extern int finite(double);
#endif
#if !defined S_IFIFO && defined _S_IFIFO
@@ -446,6 +382,8 @@ __declspec(dllimport) extern int finite(double);
extern int rb_w32_ftruncate(int fd, off_t length);
extern int rb_w32_truncate(const char *path, off_t length);
+extern off_t rb_w32_ftello(FILE *stream);
+extern int rb_w32_fseeko(FILE *stream, off_t offset, int whence);
#undef HAVE_FTRUNCATE
#define HAVE_FTRUNCATE 1
@@ -463,6 +401,22 @@ extern int rb_w32_truncate(const char *path, off_t length);
#define truncate rb_w32_truncate
#endif
+#undef HAVE_FSEEKO
+#define HAVE_FSEEKO 1
+#if defined HAVE_FSEEKO64
+#define fseeko fseeko64
+#else
+#define fseeko rb_w32_fseeko
+#endif
+
+#undef HAVE_FTELLO
+#define HAVE_FTELLO 1
+#if defined HAVE_FTELLO64
+#define ftello ftello64
+#else
+#define ftello rb_w32_ftello
+#endif
+
/*
* stubs
*/
@@ -474,8 +428,6 @@ extern rb_gid_t getegid (void);
extern int setuid (rb_uid_t);
extern int setgid (rb_gid_t);
-extern int fstati64(int, struct stati64 *);
-
extern char *rb_w32_strerror(int);
#ifdef RUBY_EXPORT
@@ -721,6 +673,9 @@ extern char *rb_w32_strerror(int);
#undef getservbyport
#define getservbyport(p, pr) rb_w32_getservbyport(p, pr)
+#undef socketpair
+#define socketpair(a, t, p, s) rb_w32_socketpair(a, t, p, s)
+
#undef get_osfhandle
#define get_osfhandle(h) rb_w32_get_osfhandle(h)
@@ -735,9 +690,6 @@ extern char *rb_w32_strerror(int);
#undef times
#define times(t) rb_w32_times(t)
-
-#undef dup2
-#define dup2(o, n) rb_w32_dup2(o, n)
#endif
struct tms {
@@ -783,7 +735,9 @@ in asynchronous_func_t.
typedef uintptr_t (*asynchronous_func_t)(uintptr_t self, int argc, uintptr_t* argv);
uintptr_t rb_w32_asynchronize(asynchronous_func_t func, uintptr_t self, int argc, uintptr_t* argv, uintptr_t intrval);
-RUBY_SYMBOL_EXPORT_END
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility pop
+#endif
#ifdef __MINGW_ATTRIB_PURE
/* License: Ruby's */
@@ -822,7 +776,21 @@ rb_w32_pow(double x, double y)
return powl(x, y);
}
#elif defined(__MINGW64_VERSION_MAJOR)
-double rb_w32_pow(double x, double y);
+/*
+ * Set floating point precision for pow() of mingw-w64 x86.
+ * With default precision the result is not proper on WinXP.
+ */
+static inline double
+rb_w32_pow(double x, double y)
+{
+ double r;
+ unsigned int default_control = _controlfp(0, 0);
+ _controlfp(_PC_64, _MCW_PC);
+ r = pow(x, y);
+ /* Restore setting */
+ _controlfp(default_control, _MCW_PC);
+ return r;
+}
#endif
#if defined(__MINGW64_VERSION_MAJOR) || defined(__MINGW64__)
#define pow rb_w32_pow
diff --git a/insns.def b/insns.def
index ad4bba6912..c339180589 100644
--- a/insns.def
+++ b/insns.def
@@ -61,7 +61,7 @@ getlocal
VALUE *ep = GET_EP();
for (i = 0; i < lev; i++) {
- ep = GET_PREV_EP(ep);
+ ep = GET_PREV_EP(ep);
}
val = *(ep - idx);
}
@@ -218,6 +218,7 @@ setconstant
{
vm_check_if_namespace(cbase);
rb_const_set(cbase, id, val);
+ INC_VM_STATE_VERSION();
}
/**
@@ -713,14 +714,15 @@ defined
expr_type = DEFINED_GVAR;
}
break;
- case DEFINED_CVAR: {
+ case DEFINED_CVAR:
+ {
NODE *cref = rb_vm_get_cref(GET_ISEQ(), GET_EP());
klass = vm_get_cvar_base(cref, GET_CFP());
if (rb_cvar_defined(klass, SYM2ID(obj))) {
expr_type = DEFINED_CVAR;
}
break;
- }
+ }
case DEFINED_CONST:
klass = v;
if (vm_get_ev_const(th, GET_ISEQ(), klass, SYM2ID(obj), 1)) {
@@ -763,10 +765,10 @@ defined
}
break;
case DEFINED_ZSUPER:{
- rb_call_info_t cit;
- if (vm_search_superclass(GET_CFP(), GET_ISEQ(), Qnil, &cit) == 0) {
- VALUE klass = cit.klass;
- ID id = cit.mid;
+ const rb_method_entry_t *me = GET_CFP()->me;
+ if (me) {
+ VALUE klass = vm_search_normal_superclass(GET_CFP()->klass);
+ ID id = me->def ? me->def->original_id : me->called_id;
if (rb_method_boundp(klass, id, 0)) {
expr_type = DEFINED_ZSUPER;
}
@@ -817,7 +819,7 @@ checkmatch
if (flag & VM_CHECKMATCH_ARRAY) {
int i;
for (i = 0; i < RARRAY_LEN(pattern); i++) {
- if (RTEST(check_match(RARRAY_AREF(pattern, i), target, checkmatch_type))) {
+ if (RTEST(check_match(RARRAY_PTR(pattern)[i], target, checkmatch_type))) {
result = Qtrue;
break;
}
@@ -865,7 +867,7 @@ trace
}
EXEC_EVENT_HOOK(th, flag, GET_SELF(), 0, 0 /* id and klass are resolved at callee */,
- (flag & (RUBY_EVENT_RETURN | RUBY_EVENT_B_RETURN)) ? TOPN(0) : Qundef);
+ (flag & RUBY_EVENT_RETURN | RUBY_EVENT_B_RETURN) ? TOPN(0) : Qundef);
}
/**********************************************************/
@@ -948,7 +950,7 @@ defineclass
/* find klass */
if ((klass = vm_search_const_defined_class(cbase, id)) != 0) {
klass = VM_DEFINECLASS_SCOPED_P(flags) ?
- rb_public_const_get_at(klass, id) : rb_const_get_at(klass, id);
+ rb_const_get_at(klass, id) : rb_public_const_get_at(klass, id);
/* already exist */
if (!RB_TYPE_P(klass, T_MODULE)) {
rb_raise(rb_eTypeError, "%s is not a module", rb_id2name(id));
@@ -971,8 +973,10 @@ defineclass
vm_push_frame(th, class_iseq, VM_FRAME_MAGIC_CLASS,
klass, 0, VM_ENVVAL_BLOCK_PTR(GET_BLOCK_PTR()),
class_iseq->iseq_encoded, GET_SP(),
- class_iseq->local_size, 0, class_iseq->stack_max);
+ class_iseq->local_size, 0);
RESTORE_REGS();
+
+ INC_VM_STATE_VERSION();
NEXT_INSN();
}
@@ -999,20 +1003,6 @@ send
CALL_METHOD(ci);
}
-DEFINE_INSN
-opt_str_freeze
-(VALUE str)
-()
-(VALUE val)
-{
- if (BASIC_OP_UNREDEFINED_P(BOP_FREEZE, STRING_REDEFINED_OP_FLAG)) {
- val = str;
- }
- else {
- val = rb_funcall(rb_str_resurrect(str), idFreeze, 0);
- }
-}
-
/**
@c optimize
@e Invoke method without block, splat
@@ -1188,7 +1178,7 @@ branchunless
/**
@c optimize
- @e push inline-cached value and go to dst if it is valid
+ @e inline cache
@j ã‚¤ãƒ³ãƒ©ã‚¤ãƒ³ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãŒæœ‰åйãªã‚‰ã€å€¤ã‚’スタックã«ãƒ—ッシュã—㦠dst ã¸ã‚¸ãƒ£ãƒ³ãƒ—ã™ã‚‹ã€‚
*/
DEFINE_INSN
@@ -1197,7 +1187,7 @@ getinlinecache
()
(VALUE val)
{
- if (ic->ic_serial == GET_GLOBAL_CONSTANT_STATE()) {
+ if (ic->ic_vmstat == GET_VM_STATE_VERSION()) {
val = ic->ic_value.value;
JUMP(dst);
}
@@ -1209,64 +1199,55 @@ getinlinecache
/**
@c optimize
- @e set inline cache
- @j インラインキャッシュã®å€¤ã‚’設定ã™ã‚‹ã€‚
+ @e inline cache (once)
+ @j once を実ç¾ã™ã‚‹ã€‚
*/
DEFINE_INSN
-setinlinecache
-(IC ic)
-(VALUE val)
+onceinlinecache
+(OFFSET dst, IC ic)
+()
(VALUE val)
{
- if (ic->ic_value.value == Qundef) {
- rb_iseq_add_mark_object(GET_ISEQ(), val);
+ retry:
+ if (ic->ic_vmstat) {
+ val = ic->ic_value.value;
+ JUMP(dst);
+ }
+ else if (ic->ic_value.value == Qundef)
+ {
+ RUBY_VM_CHECK_INTS(th);
+ rb_thread_schedule();
+ goto retry;
+ }
+ else {
+ /* none */
+ ic->ic_value.value = Qundef;
+ val = Qnil;
}
- ic->ic_value.value = val;
- ic->ic_serial = GET_GLOBAL_CONSTANT_STATE() - ruby_vm_const_missing_count;
- ruby_vm_const_missing_count = 0;
}
/**
@c optimize
- @e run iseq only once
- @j once を実ç¾ã™ã‚‹ã€‚
+ @e set inline cache
+ @j インラインキャッシュã®å€¤ã‚’設定ã™ã‚‹ã€‚
*/
DEFINE_INSN
-once
-(ISEQ iseq, IC ic)
-()
+setinlinecache
+(IC ic)
+(VALUE val)
(VALUE val)
{
- union iseq_inline_storage_entry *is = (union iseq_inline_storage_entry *)ic;
-
- retry:
- if (is->once.done == Qfalse) {
- if (is->once.running_thread == NULL) {
- is->once.running_thread = th;
- val = is->once.value = rb_ensure(vm_once_exec, (VALUE)iseq, vm_once_clear, (VALUE)is);
- /* is->once.running_thread is cleared by vm_once_clear() */
- is->once.done = Qtrue;
- rb_iseq_add_mark_object(GET_ISEQ(), val);
- }
- else if (is->once.running_thread == th) {
- /* recursive once */
- val = vm_once_exec(iseq);
- }
- else {
- /* waiting for finish */
- RUBY_VM_CHECK_INTS(th);
- rb_thread_schedule();
- goto retry;
- }
- }
- else {
- val = is->once.value;
+ if (ic->ic_value.value == Qundef) {
+ rb_ary_push(GET_ISEQ()->mark_ary, val);
}
+ ic->ic_value.value = val;
+ ic->ic_vmstat = GET_VM_STATE_VERSION() - ruby_vm_const_missing_count;
+ ruby_vm_const_missing_count = 0;
}
/**
@c optimize
- @e case dispatcher, jump by table if possible
+ @e case dispatcher
@j case æ–‡ã§ã€å¯èƒ½ãªã‚‰è¡¨å¼•ãã§ã‚¸ãƒ£ãƒ³ãƒ—ã™ã‚‹ã€‚
*/
DEFINE_INSN
@@ -1292,7 +1273,7 @@ opt_case_dispatch
BIGNUM_REDEFINED_OP_FLAG |
STRING_REDEFINED_OP_FLAG)) {
st_data_t val;
- if (st_lookup(RHASH_TBL_RAW(hash), key, &val)) {
+ if (st_lookup(RHASH_TBL(hash), key, &val)) {
JUMP(FIX2INT((VALUE)val));
}
else {
@@ -1346,15 +1327,15 @@ opt_plus
val = DBL2NUM(RFLOAT_VALUE(recv) + RFLOAT_VALUE(obj));
}
else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
- if (RBASIC_CLASS(recv) == rb_cFloat && RBASIC_CLASS(obj) == rb_cFloat &&
+ if (HEAP_CLASS_OF(recv) == rb_cFloat && HEAP_CLASS_OF(obj) == rb_cFloat &&
BASIC_OP_UNREDEFINED_P(BOP_PLUS, FLOAT_REDEFINED_OP_FLAG)) {
val = DBL2NUM(RFLOAT_VALUE(recv) + RFLOAT_VALUE(obj));
}
- else if (RBASIC_CLASS(recv) == rb_cString && RBASIC_CLASS(obj) == rb_cString &&
+ else if (HEAP_CLASS_OF(recv) == rb_cString && HEAP_CLASS_OF(obj) == rb_cString &&
BASIC_OP_UNREDEFINED_P(BOP_PLUS, STRING_REDEFINED_OP_FLAG)) {
val = rb_str_plus(recv, obj);
}
- else if (RBASIC_CLASS(recv) == rb_cArray &&
+ else if (HEAP_CLASS_OF(recv) == rb_cArray &&
BASIC_OP_UNREDEFINED_P(BOP_PLUS, ARRAY_REDEFINED_OP_FLAG)) {
val = rb_ary_plus(recv, obj);
}
@@ -1401,7 +1382,7 @@ opt_minus
val = DBL2NUM(RFLOAT_VALUE(recv) - RFLOAT_VALUE(obj));
}
else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
- if (RBASIC_CLASS(recv) == rb_cFloat && RBASIC_CLASS(obj) == rb_cFloat &&
+ if (HEAP_CLASS_OF(recv) == rb_cFloat && HEAP_CLASS_OF(obj) == rb_cFloat &&
BASIC_OP_UNREDEFINED_P(BOP_MINUS, FLOAT_REDEFINED_OP_FLAG)) {
val = DBL2NUM(RFLOAT_VALUE(recv) - RFLOAT_VALUE(obj));
}
@@ -1438,13 +1419,16 @@ opt_mult
val = recv;
}
else {
+ volatile long c;
b = FIX2LONG(obj);
- if (MUL_OVERFLOW_FIXNUM_P(a, b)) {
+ c = a * b;
+
+ if (FIXABLE(c) && c / a == b) {
+ val = LONG2FIX(c);
+ }
+ else {
val = rb_big_mul(rb_int2big(a), rb_int2big(b));
- }
- else {
- val = LONG2FIX(a * b);
- }
+ }
}
}
else if (FLONUM_2_P(recv, obj) &&
@@ -1452,7 +1436,7 @@ opt_mult
val = DBL2NUM(RFLOAT_VALUE(recv) * RFLOAT_VALUE(obj));
}
else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
- if (RBASIC_CLASS(recv) == rb_cFloat && RBASIC_CLASS(obj) == rb_cFloat &&
+ if (HEAP_CLASS_OF(recv) == rb_cFloat && HEAP_CLASS_OF(obj) == rb_cFloat &&
BASIC_OP_UNREDEFINED_P(BOP_MULT, FLOAT_REDEFINED_OP_FLAG)) {
val = DBL2NUM(RFLOAT_VALUE(recv) * RFLOAT_VALUE(obj));
}
@@ -1511,11 +1495,11 @@ opt_div
val = LONG2NUM(div);
}
else if (FLONUM_2_P(recv, obj) &&
- BASIC_OP_UNREDEFINED_P(BOP_DIV, FLOAT_REDEFINED_OP_FLAG)) {
+ BASIC_OP_UNREDEFINED_P(BOP_MULT, FLOAT_REDEFINED_OP_FLAG)) {
val = DBL2NUM(RFLOAT_VALUE(recv) / RFLOAT_VALUE(obj));
}
else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
- if (RBASIC_CLASS(recv) == rb_cFloat && RBASIC_CLASS(obj) == rb_cFloat &&
+ if (HEAP_CLASS_OF(recv) == rb_cFloat && HEAP_CLASS_OF(obj) == rb_cFloat &&
BASIC_OP_UNREDEFINED_P(BOP_DIV, FLOAT_REDEFINED_OP_FLAG)) {
val = DBL2NUM(RFLOAT_VALUE(recv) / RFLOAT_VALUE(obj));
}
@@ -1544,15 +1528,13 @@ opt_mod
{
if (FIXNUM_2_P(recv, obj) &&
BASIC_OP_UNREDEFINED_P(BOP_MOD, FIXNUM_REDEFINED_OP_FLAG )) {
- long x, y;
+ long x, y, mod;
x = FIX2LONG(recv);
y = FIX2LONG(obj);
- if (x > 0 && y > 0) {
- val = LONG2FIX(x % y);
- } else {
+ {
/* copied from numeric.c#fixdivmod */
- long div, mod;
+ long div;
if (y == 0)
rb_num_zerodiv();
@@ -1573,15 +1555,15 @@ opt_mod
mod += y;
div -= 1;
}
- val = LONG2FIX(mod);
}
+ val = LONG2FIX(mod);
}
else if (FLONUM_2_P(recv, obj) &&
BASIC_OP_UNREDEFINED_P(BOP_MOD, FLOAT_REDEFINED_OP_FLAG)) {
val = DBL2NUM(ruby_float_mod(RFLOAT_VALUE(recv), RFLOAT_VALUE(obj)));
}
else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
- if (RBASIC_CLASS(recv) == rb_cFloat && RBASIC_CLASS(obj) == rb_cFloat &&
+ if (HEAP_CLASS_OF(recv) == rb_cFloat && HEAP_CLASS_OF(obj) == rb_cFloat &&
BASIC_OP_UNREDEFINED_P(BOP_MOD, FLOAT_REDEFINED_OP_FLAG)) {
val = DBL2NUM(ruby_float_mod(RFLOAT_VALUE(recv), RFLOAT_VALUE(obj)));
}
@@ -1677,7 +1659,7 @@ opt_lt
val = RFLOAT_VALUE(recv) < RFLOAT_VALUE(obj) ? Qtrue : Qfalse;
}
else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
- if (RBASIC_CLASS(recv) == rb_cFloat && RBASIC_CLASS(obj) == rb_cFloat &&
+ if (HEAP_CLASS_OF(recv) == rb_cFloat && HEAP_CLASS_OF(obj) == rb_cFloat &&
BASIC_OP_UNREDEFINED_P(BOP_LT, FLOAT_REDEFINED_OP_FLAG)) {
val = double_cmp_lt(RFLOAT_VALUE(recv), RFLOAT_VALUE(obj));
}
@@ -1756,7 +1738,7 @@ opt_gt
val = RFLOAT_VALUE(recv) > RFLOAT_VALUE(obj) ? Qtrue : Qfalse;
}
else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
- if (RBASIC_CLASS(recv) == rb_cFloat && RBASIC_CLASS(obj) == rb_cFloat &&
+ if (HEAP_CLASS_OF(recv) == rb_cFloat && HEAP_CLASS_OF(obj) == rb_cFloat &&
BASIC_OP_UNREDEFINED_P(BOP_GT, FLOAT_REDEFINED_OP_FLAG)) {
val = double_cmp_gt(RFLOAT_VALUE(recv), RFLOAT_VALUE(obj));
}
@@ -1818,11 +1800,11 @@ opt_ltlt
(VALUE val)
{
if (!SPECIAL_CONST_P(recv)) {
- if (RBASIC_CLASS(recv) == rb_cString &&
+ if (HEAP_CLASS_OF(recv) == rb_cString &&
BASIC_OP_UNREDEFINED_P(BOP_LTLT, STRING_REDEFINED_OP_FLAG)) {
val = rb_str_concat(recv, obj);
}
- else if (RBASIC_CLASS(recv) == rb_cArray &&
+ else if (HEAP_CLASS_OF(recv) == rb_cArray &&
BASIC_OP_UNREDEFINED_P(BOP_LTLT, ARRAY_REDEFINED_OP_FLAG)) {
val = rb_ary_push(recv, obj);
}
@@ -1850,10 +1832,10 @@ opt_aref
(VALUE val)
{
if (!SPECIAL_CONST_P(recv)) {
- if (RBASIC_CLASS(recv) == rb_cArray && BASIC_OP_UNREDEFINED_P(BOP_AREF, ARRAY_REDEFINED_OP_FLAG) && FIXNUM_P(obj)) {
+ if (HEAP_CLASS_OF(recv) == rb_cArray && BASIC_OP_UNREDEFINED_P(BOP_AREF, ARRAY_REDEFINED_OP_FLAG) && FIXNUM_P(obj)) {
val = rb_ary_entry(recv, FIX2LONG(obj));
}
- else if (RBASIC_CLASS(recv) == rb_cHash && BASIC_OP_UNREDEFINED_P(BOP_AREF, HASH_REDEFINED_OP_FLAG)) {
+ else if (HEAP_CLASS_OF(recv) == rb_cHash && BASIC_OP_UNREDEFINED_P(BOP_AREF, HASH_REDEFINED_OP_FLAG)) {
val = rb_hash_aref(recv, obj);
}
else {
@@ -1880,11 +1862,11 @@ opt_aset
(VALUE val)
{
if (!SPECIAL_CONST_P(recv)) {
- if (RBASIC_CLASS(recv) == rb_cArray && BASIC_OP_UNREDEFINED_P(BOP_ASET, ARRAY_REDEFINED_OP_FLAG) && FIXNUM_P(obj)) {
+ if (HEAP_CLASS_OF(recv) == rb_cArray && BASIC_OP_UNREDEFINED_P(BOP_ASET, ARRAY_REDEFINED_OP_FLAG) && FIXNUM_P(obj)) {
rb_ary_store(recv, FIX2LONG(obj), set);
val = set;
}
- else if (RBASIC_CLASS(recv) == rb_cHash && BASIC_OP_UNREDEFINED_P(BOP_ASET, HASH_REDEFINED_OP_FLAG)) {
+ else if (HEAP_CLASS_OF(recv) == rb_cHash && BASIC_OP_UNREDEFINED_P(BOP_ASET, HASH_REDEFINED_OP_FLAG)) {
rb_hash_aset(recv, obj, set);
val = set;
}
@@ -1913,15 +1895,15 @@ opt_length
(VALUE val)
{
if (!SPECIAL_CONST_P(recv)) {
- if (RBASIC_CLASS(recv) == rb_cString &&
+ if (HEAP_CLASS_OF(recv) == rb_cString &&
BASIC_OP_UNREDEFINED_P(BOP_LENGTH, STRING_REDEFINED_OP_FLAG)) {
val = rb_str_length(recv);
}
- else if (RBASIC_CLASS(recv) == rb_cArray &&
+ else if (HEAP_CLASS_OF(recv) == rb_cArray &&
BASIC_OP_UNREDEFINED_P(BOP_LENGTH, ARRAY_REDEFINED_OP_FLAG)) {
val = LONG2NUM(RARRAY_LEN(recv));
}
- else if (RBASIC_CLASS(recv) == rb_cHash &&
+ else if (HEAP_CLASS_OF(recv) == rb_cHash &&
BASIC_OP_UNREDEFINED_P(BOP_LENGTH, HASH_REDEFINED_OP_FLAG)) {
val = INT2FIX(RHASH_SIZE(recv));
}
@@ -1948,15 +1930,15 @@ opt_size
(VALUE val)
{
if (!SPECIAL_CONST_P(recv)) {
- if (RBASIC_CLASS(recv) == rb_cString &&
+ if (HEAP_CLASS_OF(recv) == rb_cString &&
BASIC_OP_UNREDEFINED_P(BOP_SIZE, STRING_REDEFINED_OP_FLAG)) {
val = rb_str_length(recv);
}
- else if (RBASIC_CLASS(recv) == rb_cArray &&
+ else if (HEAP_CLASS_OF(recv) == rb_cArray &&
BASIC_OP_UNREDEFINED_P(BOP_SIZE, ARRAY_REDEFINED_OP_FLAG)) {
val = LONG2NUM(RARRAY_LEN(recv));
}
- else if (RBASIC_CLASS(recv) == rb_cHash &&
+ else if (HEAP_CLASS_OF(recv) == rb_cHash &&
BASIC_OP_UNREDEFINED_P(BOP_SIZE, HASH_REDEFINED_OP_FLAG)) {
val = INT2FIX(RHASH_SIZE(recv));
}
@@ -1983,17 +1965,17 @@ opt_empty_p
(VALUE val)
{
if (!SPECIAL_CONST_P(recv)) {
- if (RBASIC_CLASS(recv) == rb_cString &&
+ if (HEAP_CLASS_OF(recv) == rb_cString &&
BASIC_OP_UNREDEFINED_P(BOP_EMPTY_P, STRING_REDEFINED_OP_FLAG)) {
if (RSTRING_LEN(recv) == 0) val = Qtrue;
else val = Qfalse;
}
- else if (RBASIC_CLASS(recv) == rb_cArray &&
+ else if (HEAP_CLASS_OF(recv) == rb_cArray &&
BASIC_OP_UNREDEFINED_P(BOP_EMPTY_P, ARRAY_REDEFINED_OP_FLAG)) {
if (RARRAY_LEN(recv) == 0) val = Qtrue;
else val = Qfalse;
}
- else if (RBASIC_CLASS(recv) == rb_cHash &&
+ else if (HEAP_CLASS_OF(recv) == rb_cHash &&
BASIC_OP_UNREDEFINED_P(BOP_EMPTY_P, HASH_REDEFINED_OP_FLAG)) {
if (RHASH_EMPTY_P(recv)) val = Qtrue;
else val = Qfalse;
@@ -2036,11 +2018,11 @@ opt_succ
}
}
else {
- if (RBASIC_CLASS(recv) == rb_cString &&
+ if (HEAP_CLASS_OF(recv) == rb_cString &&
BASIC_OP_UNREDEFINED_P(BOP_SUCC, STRING_REDEFINED_OP_FLAG)) {
val = rb_str_succ(recv);
}
- else if (RBASIC_CLASS(recv) == rb_cTime &&
+ else if (HEAP_CLASS_OF(recv) == rb_cTime &&
BASIC_OP_UNREDEFINED_P(BOP_SUCC, TIME_REDEFINED_OP_FLAG)) {
val = rb_time_succ(recv);
}
@@ -2091,11 +2073,7 @@ opt_regexpmatch1
(VALUE obj)
(VALUE val)
{
- if (BASIC_OP_UNREDEFINED_P(BOP_MATCH, REGEXP_REDEFINED_OP_FLAG)) {
- val = rb_reg_match(r, obj);
- } else {
- val = rb_funcall(r, idEqTilde, 1, obj);
- }
+ val = rb_reg_match(r, obj);
}
/**
@@ -2105,18 +2083,15 @@ opt_regexpmatch1
*/
DEFINE_INSN
opt_regexpmatch2
-(CALL_INFO ci)
+()
(VALUE obj2, VALUE obj1)
(VALUE val)
{
- if (RB_TYPE_P(obj2, T_STRING) &&
- BASIC_OP_UNREDEFINED_P(BOP_MATCH, STRING_REDEFINED_OP_FLAG)) {
+ if (RB_TYPE_P(obj2, T_STRING)) {
val = rb_reg_match(obj1, obj2);
}
else {
- PUSH(obj2);
- PUSH(obj1);
- CALL_SIMPLE_METHOD(obj2);
+ val = rb_funcall(obj2, idEqTilde, 1, obj1);
}
}
diff --git a/internal.h b/internal.h
index 40916a59a2..c8317a51e8 100644
--- a/internal.h
+++ b/internal.h
@@ -19,318 +19,35 @@ extern "C" {
#endif
#endif
-#ifdef HAVE_VALGRIND_MEMCHECK_H
-# include <valgrind/memcheck.h>
-# ifndef VALGRIND_MAKE_MEM_DEFINED
-# define VALGRIND_MAKE_MEM_DEFINED(p, n) VALGRIND_MAKE_READABLE((p), (n))
-# endif
-# ifndef VALGRIND_MAKE_MEM_UNDEFINED
-# define VALGRIND_MAKE_MEM_UNDEFINED(p, n) VALGRIND_MAKE_WRITABLE((p), (n))
-# endif
-#else
-# define VALGRIND_MAKE_MEM_DEFINED(p, n) 0
-# define VALGRIND_MAKE_MEM_UNDEFINED(p, n) 0
-#endif
-
-#define numberof(array) ((int)(sizeof(array) / sizeof((array)[0])))
-
-#define STATIC_ASSERT(name, expr) typedef int static_assert_##name##_check[1 - 2*!(expr)]
-
-#define GCC_VERSION_SINCE(major, minor, patchlevel) \
- (defined(__GNUC__) && !defined(__INTEL_COMPILER) && \
- ((__GNUC__ > (major)) || \
- (__GNUC__ == (major) && __GNUC_MINOR__ > (minor)) || \
- (__GNUC__ == (major) && __GNUC_MINOR__ == (minor) && __GNUC_PATCHLEVEL__ >= (patchlevel))))
-
-#define SIGNED_INTEGER_TYPE_P(int_type) (0 > ((int_type)0)-1)
-#define SIGNED_INTEGER_MAX(sint_type) \
- (sint_type) \
- ((((sint_type)1) << (sizeof(sint_type) * CHAR_BIT - 2)) | \
- ((((sint_type)1) << (sizeof(sint_type) * CHAR_BIT - 2)) - 1))
-#define SIGNED_INTEGER_MIN(sint_type) (-SIGNED_INTEGER_MAX(sint_type)-1)
-#define UNSIGNED_INTEGER_MAX(uint_type) (~(uint_type)0)
-
-#if SIGNEDNESS_OF_TIME_T < 0 /* signed */
-# define TIMET_MAX SIGNED_INTEGER_MAX(time_t)
-# define TIMET_MIN SIGNED_INTEGER_MIN(time_t)
-#elif SIGNEDNESS_OF_TIME_T > 0 /* unsigned */
-# define TIMET_MAX UNSIGNED_INTEGER_MAX(time_t)
-# define TIMET_MIN ((time_t)0)
-#endif
-#define TIMET_MAX_PLUS_ONE (2*(double)(TIMET_MAX/2+1))
-
-#define MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, min, max) ( \
- (a) == 0 ? 0 : \
- (a) == -1 ? (b) < -(max) : \
- (a) > 0 ? \
- ((b) > 0 ? (max) / (a) < (b) : (min) / (a) > (b)) : \
- ((b) > 0 ? (min) / (a) < (b) : (max) / (a) > (b)))
-#define MUL_OVERFLOW_FIXNUM_P(a, b) MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, FIXNUM_MIN, FIXNUM_MAX)
-#define MUL_OVERFLOW_LONG_P(a, b) MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, LONG_MIN, LONG_MAX)
-#define MUL_OVERFLOW_INT_P(a, b) MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, INT_MIN, INT_MAX)
-
-#ifndef swap16
-# ifdef HAVE_BUILTIN___BUILTIN_BSWAP16
-# define swap16(x) __builtin_bswap16(x)
-# endif
-#endif
-
-#ifndef swap16
-# define swap16(x) ((uint16_t)((((x)&0xFF)<<8) | (((x)>>8)&0xFF)))
-#endif
-
-#ifndef swap32
-# ifdef HAVE_BUILTIN___BUILTIN_BSWAP32
-# define swap32(x) __builtin_bswap32(x)
-# endif
-#endif
-
-#ifndef swap32
-# define swap32(x) ((uint32_t)((((x)&0xFF)<<24) \
- |(((x)>>24)&0xFF) \
- |(((x)&0x0000FF00)<<8) \
- |(((x)&0x00FF0000)>>8) ))
-#endif
-
-#ifndef swap64
-# ifdef HAVE_BUILTIN___BUILTIN_BSWAP64
-# define swap64(x) __builtin_bswap64(x)
-# endif
-#endif
-
-#ifndef swap64
-# ifdef HAVE_INT64_T
-# define byte_in_64bit(n) ((uint64_t)0xff << (n))
-# define swap64(x) ((uint64_t)((((x)&byte_in_64bit(0))<<56) \
- |(((x)>>56)&0xFF) \
- |(((x)&byte_in_64bit(8))<<40) \
- |(((x)&byte_in_64bit(48))>>40) \
- |(((x)&byte_in_64bit(16))<<24) \
- |(((x)&byte_in_64bit(40))>>24) \
- |(((x)&byte_in_64bit(24))<<8) \
- |(((x)&byte_in_64bit(32))>>8)))
-# endif
-#endif
-
-static inline int
-nlz_int(unsigned int x)
-{
-#if defined(HAVE_BUILTIN___BUILTIN_CLZ)
- if (x == 0) return SIZEOF_INT * CHAR_BIT;
- return __builtin_clz(x);
-#else
- unsigned int y;
-# if 64 < SIZEOF_INT * CHAR_BIT
- int n = 128;
-# elif 32 < SIZEOF_INT * CHAR_BIT
- int n = 64;
-# else
- int n = 32;
-# endif
-# if 64 < SIZEOF_INT * CHAR_BIT
- y = x >> 64; if (y) {n -= 64; x = y;}
-# endif
-# if 32 < SIZEOF_INT * CHAR_BIT
- y = x >> 32; if (y) {n -= 32; x = y;}
-# endif
- y = x >> 16; if (y) {n -= 16; x = y;}
- y = x >> 8; if (y) {n -= 8; x = y;}
- y = x >> 4; if (y) {n -= 4; x = y;}
- y = x >> 2; if (y) {n -= 2; x = y;}
- y = x >> 1; if (y) {return n - 2;}
- return (int)(n - x);
-#endif
-}
-
-static inline int
-nlz_long(unsigned long x)
-{
-#if defined(HAVE_BUILTIN___BUILTIN_CLZL)
- if (x == 0) return SIZEOF_LONG * CHAR_BIT;
- return __builtin_clzl(x);
-#else
- unsigned long y;
-# if 64 < SIZEOF_LONG * CHAR_BIT
- int n = 128;
-# elif 32 < SIZEOF_LONG * CHAR_BIT
- int n = 64;
-# else
- int n = 32;
-# endif
-# if 64 < SIZEOF_LONG * CHAR_BIT
- y = x >> 64; if (y) {n -= 64; x = y;}
-# endif
-# if 32 < SIZEOF_LONG * CHAR_BIT
- y = x >> 32; if (y) {n -= 32; x = y;}
-# endif
- y = x >> 16; if (y) {n -= 16; x = y;}
- y = x >> 8; if (y) {n -= 8; x = y;}
- y = x >> 4; if (y) {n -= 4; x = y;}
- y = x >> 2; if (y) {n -= 2; x = y;}
- y = x >> 1; if (y) {return n - 2;}
- return (int)(n - x);
-#endif
-}
-
-#ifdef HAVE_LONG_LONG
-static inline int
-nlz_long_long(unsigned LONG_LONG x)
-{
-#if defined(HAVE_BUILTIN___BUILTIN_CLZLL)
- if (x == 0) return SIZEOF_LONG_LONG * CHAR_BIT;
- return __builtin_clzll(x);
-#else
- unsigned LONG_LONG y;
-# if 64 < SIZEOF_LONG_LONG * CHAR_BIT
- int n = 128;
-# elif 32 < SIZEOF_LONG_LONG * CHAR_BIT
- int n = 64;
-# else
- int n = 32;
-# endif
-# if 64 < SIZEOF_LONG_LONG * CHAR_BIT
- y = x >> 64; if (y) {n -= 64; x = y;}
-# endif
-# if 32 < SIZEOF_LONG_LONG * CHAR_BIT
- y = x >> 32; if (y) {n -= 32; x = y;}
-# endif
- y = x >> 16; if (y) {n -= 16; x = y;}
- y = x >> 8; if (y) {n -= 8; x = y;}
- y = x >> 4; if (y) {n -= 4; x = y;}
- y = x >> 2; if (y) {n -= 2; x = y;}
- y = x >> 1; if (y) {return n - 2;}
- return (int)(n - x);
-#endif
-}
-#endif
-
-#ifdef HAVE_UINT128_T
-static inline int
-nlz_int128(uint128_t x)
-{
- uint128_t y;
- int n = 128;
- y = x >> 64; if (y) {n -= 64; x = y;}
- y = x >> 32; if (y) {n -= 32; x = y;}
- y = x >> 16; if (y) {n -= 16; x = y;}
- y = x >> 8; if (y) {n -= 8; x = y;}
- y = x >> 4; if (y) {n -= 4; x = y;}
- y = x >> 2; if (y) {n -= 2; x = y;}
- y = x >> 1; if (y) {return n - 2;}
- return (int)(n - x);
-}
-#endif
-
-#if defined(HAVE_UINT128_T)
-# define bit_length(x) \
- (sizeof(x) <= SIZEOF_INT ? SIZEOF_INT * CHAR_BIT - nlz_int((unsigned int)(x)) : \
- sizeof(x) <= SIZEOF_LONG ? SIZEOF_LONG * CHAR_BIT - nlz_long((unsigned long)(x)) : \
- sizeof(x) <= SIZEOF_LONG_LONG ? SIZEOF_LONG_LONG * CHAR_BIT - nlz_long_long((unsigned LONG_LONG)(x)) : \
- SIZEOF_INT128_T * CHAR_BIT - nlz_int128((uint128_t)(x)))
-#elif defined(HAVE_LONG_LONG)
-# define bit_length(x) \
- (sizeof(x) <= SIZEOF_INT ? SIZEOF_INT * CHAR_BIT - nlz_int((unsigned int)(x)) : \
- sizeof(x) <= SIZEOF_LONG ? SIZEOF_LONG * CHAR_BIT - nlz_long((unsigned long)(x)) : \
- SIZEOF_LONG_LONG * CHAR_BIT - nlz_long_long((unsigned LONG_LONG)(x)))
-#else
-# define bit_length(x) \
- (sizeof(x) <= SIZEOF_INT ? SIZEOF_INT * CHAR_BIT - nlz_int((unsigned int)(x)) : \
- SIZEOF_LONG * CHAR_BIT - nlz_long((unsigned long)(x)))
-#endif
-
struct rb_deprecated_classext_struct {
char conflict[sizeof(VALUE) * 3];
};
-struct rb_subclass_entry;
-typedef struct rb_subclass_entry rb_subclass_entry_t;
-
-struct rb_subclass_entry {
- VALUE klass;
- rb_subclass_entry_t *next;
-};
-
-#if defined(HAVE_LONG_LONG)
-typedef unsigned LONG_LONG rb_serial_t;
-#define SERIALT2NUM ULL2NUM
-#elif defined(HAVE_UINT64_T)
-typedef uint64_t rb_serial_t;
-#define SERIALT2NUM SIZET2NUM
-#else
-typedef unsigned long rb_serial_t;
-#define SERIALT2NUM ULONG2NUM
-#endif
-
struct rb_classext_struct {
- struct st_table *iv_index_tbl;
+ VALUE super;
struct st_table *iv_tbl;
struct st_table *const_tbl;
- rb_subclass_entry_t *subclasses;
- rb_subclass_entry_t **parent_subclasses;
- /**
- * In the case that this is an `ICLASS`, `module_subclasses` points to the link
- * in the module's `subclasses` list that indicates that the klass has been
- * included. Hopefully that makes sense.
- */
- rb_subclass_entry_t **module_subclasses;
- rb_serial_t class_serial;
VALUE origin;
VALUE refined_class;
rb_alloc_func_t allocator;
};
-struct method_table_wrapper {
- st_table *tbl;
- size_t serial;
-};
-
-/* class.c */
-void rb_class_subclass_add(VALUE super, VALUE klass);
-void rb_class_remove_from_super_subclasses(VALUE);
-
+#undef RCLASS_SUPER
#define RCLASS_EXT(c) (RCLASS(c)->ptr)
+#define RCLASS_SUPER(c) (RCLASS_EXT(c)->super)
#define RCLASS_IV_TBL(c) (RCLASS_EXT(c)->iv_tbl)
#define RCLASS_CONST_TBL(c) (RCLASS_EXT(c)->const_tbl)
-#define RCLASS_M_TBL_WRAPPER(c) (RCLASS(c)->m_tbl_wrapper)
-#define RCLASS_M_TBL(c) (RCLASS_M_TBL_WRAPPER(c) ? RCLASS_M_TBL_WRAPPER(c)->tbl : 0)
-#define RCLASS_IV_INDEX_TBL(c) (RCLASS_EXT(c)->iv_index_tbl)
+#define RCLASS_M_TBL(c) (RCLASS(c)->m_tbl)
+#define RCLASS_IV_INDEX_TBL(c) (RCLASS(c)->iv_index_tbl)
#define RCLASS_ORIGIN(c) (RCLASS_EXT(c)->origin)
#define RCLASS_REFINED_CLASS(c) (RCLASS_EXT(c)->refined_class)
-#define RCLASS_SERIAL(c) (RCLASS_EXT(c)->class_serial)
-
-static inline void
-RCLASS_M_TBL_INIT(VALUE c)
-{
- struct method_table_wrapper *wrapper;
- wrapper = ALLOC(struct method_table_wrapper);
- wrapper->tbl = st_init_numtable();
- wrapper->serial = 0;
- RCLASS_M_TBL_WRAPPER(c) = wrapper;
-}
-
-#undef RCLASS_SUPER
-static inline VALUE
-RCLASS_SUPER(VALUE klass)
-{
- return RCLASS(klass)->super;
-}
-
-static inline VALUE
-RCLASS_SET_SUPER(VALUE klass, VALUE super)
-{
- if (super) {
- rb_class_remove_from_super_subclasses(klass);
- rb_class_subclass_add(super, klass);
- }
- RB_OBJ_WRITE(klass, &RCLASS(klass)->super, super);
- return super;
-}
struct vtm; /* defined by timev.h */
/* array.c */
VALUE rb_ary_last(int, VALUE *, VALUE);
void rb_ary_set_len(VALUE, long);
+VALUE rb_ary_cat(VALUE, const VALUE *, long);
void rb_ary_delete_same(VALUE, VALUE);
/* bignum.c */
@@ -340,10 +57,6 @@ VALUE rb_integer_float_cmp(VALUE x, VALUE y);
VALUE rb_integer_float_eq(VALUE x, VALUE y);
/* class.c */
-void rb_class_foreach_subclass(VALUE klass, void(*f)(VALUE));
-void rb_class_detach_subclasses(VALUE);
-void rb_class_detach_module_subclasses(VALUE);
-void rb_class_remove_from_module_subclasses(VALUE);
VALUE rb_obj_methods(int argc, VALUE *argv, VALUE obj);
VALUE rb_obj_protected_methods(int argc, VALUE *argv, VALUE obj);
VALUE rb_obj_private_methods(int argc, VALUE *argv, VALUE obj);
@@ -351,12 +64,8 @@ VALUE rb_obj_public_methods(int argc, VALUE *argv, VALUE obj);
int rb_obj_basic_to_s_p(VALUE);
VALUE rb_special_singleton_class(VALUE);
VALUE rb_singleton_class_clone_and_attach(VALUE obj, VALUE attach);
-VALUE rb_singleton_class_get(VALUE obj);
void Init_class_hierarchy(void);
-/* compar.c */
-VALUE rb_invcmp(VALUE, VALUE);
-
/* compile.c */
int rb_dvar_defined(ID);
int rb_local_defined(ID);
@@ -368,7 +77,6 @@ VALUE rb_insns_name_array(void);
/* cont.c */
VALUE rb_obj_is_fiber(VALUE);
void rb_fiber_reset_root_local_storage(VALUE);
-void ruby_register_rollback_func_for_ensure(VALUE (*ensure_func)(ANYARGS), VALUE (*rollback_func)(ANYARGS));
/* debug.c */
PRINTF_ARGS(void ruby_debug_printf(const char*, ...), 1, 2);
@@ -377,34 +85,14 @@ PRINTF_ARGS(void ruby_debug_printf(const char*, ...), 1, 2);
void Init_ext(void);
/* encoding.c */
-#ifdef RUBY_ENCODING_H
-enum ruby_preserved_encindex {
- ENCINDEX_ASCII,
- ENCINDEX_UTF_8,
- ENCINDEX_US_ASCII,
-
- /* preserved indexes */
- ENCINDEX_UTF_16BE,
- ENCINDEX_UTF_16LE,
- ENCINDEX_UTF_32BE,
- ENCINDEX_UTF_32LE,
- ENCINDEX_UTF_16,
- ENCINDEX_UTF_32,
- ENCINDEX_UTF8_MAC,
-
- /* for old options of regexp */
- ENCINDEX_EUC_JP,
- ENCINDEX_Windows_31J,
-
- ENCINDEX_BUILTIN_MAX
-};
-#endif
-#define rb_ascii8bit_encindex() ENCINDEX_ASCII
-#define rb_utf8_encindex() ENCINDEX_UTF_8
-#define rb_usascii_encindex() ENCINDEX_US_ASCII
ID rb_id_encoding(void);
+
+/* encoding.c */
void rb_gc_mark_encodings(void);
+/* enum.c */
+VALUE rb_enum_cycle_size(VALUE self, VALUE args);
+
/* error.c */
NORETURN(PRINTF_ARGS(void rb_compile_bug(const char*, int, const char*, ...), 3, 4));
VALUE rb_check_backtrace(VALUE);
@@ -424,8 +112,7 @@ void rb_call_end_proc(VALUE data);
void rb_mark_end_proc(void);
/* file.c */
-VALUE rb_home_dir_of(VALUE user, VALUE result);
-VALUE rb_default_home_dir(VALUE result);
+VALUE rb_home_dir(const char *user, VALUE result);
VALUE rb_realpath_internal(VALUE basedir, VALUE path, int strict);
void rb_file_const(const char*, VALUE);
int rb_file_load_ok(const char *);
@@ -435,51 +122,14 @@ VALUE rb_get_path_check_to_string(VALUE, int);
VALUE rb_get_path_check_convert(VALUE, VALUE, int);
void Init_File(void);
-#ifdef RUBY_FUNCTION_NAME_STRING
-# if defined __GNUC__ && __GNUC__ >= 4
-# pragma GCC visibility push(default)
-# endif
-NORETURN(void rb_sys_fail_path_in(const char *func_name, VALUE path));
-NORETURN(void rb_syserr_fail_path_in(const char *func_name, int err, VALUE path));
-# if defined __GNUC__ && __GNUC__ >= 4
-# pragma GCC visibility pop
-# endif
-# define rb_sys_fail_path(path) rb_sys_fail_path_in(RUBY_FUNCTION_NAME_STRING, path)
-# define rb_syserr_fail_path(err, path) rb_syserr_fail_path_in(RUBY_FUNCTION_NAME_STRING, (err), (path))
-#else
-# define rb_sys_fail_path(path) rb_sys_fail_str(path)
-# define rb_syserr_fail_path(err, path) rb_syserr_fail_str((err), (path))
+#ifdef _WIN32
+/* file.c, win32/file.c */
+void rb_w32_init_file(void);
#endif
/* gc.c */
void Init_heap(void);
void *ruby_mimmalloc(size_t size);
-void ruby_mimfree(void *ptr);
-void rb_objspace_set_event_hook(const rb_event_flag_t event);
-void rb_gc_writebarrier_remember_promoted(VALUE obj);
-void ruby_gc_set_params(int safe_level);
-
-#if defined(HAVE_MALLOC_USABLE_SIZE) || defined(HAVE_MALLOC_SIZE) || defined(_WIN32)
-#define ruby_sized_xrealloc(ptr, new_size, old_size) ruby_xrealloc(ptr, new_size)
-#define ruby_sized_xrealloc2(ptr, new_count, element_size, old_count) ruby_xrealloc(ptr, new_count, element_size)
-#define ruby_sized_xfree(ptr, size) ruby_xfree(ptr)
-#define SIZED_REALLOC_N(var,type,n,old_n) REALLOC_N(var, type, n)
-#else
-void *ruby_sized_xrealloc(void *ptr, size_t new_size, size_t old_size) RUBY_ATTR_ALLOC_SIZE((2));
-void *ruby_sized_xrealloc2(void *ptr, size_t new_count, size_t element_size, size_t old_count) RUBY_ATTR_ALLOC_SIZE((2, 3));
-void ruby_sized_xfree(void *x, size_t size);
-#define SIZED_REALLOC_N(var,type,n,old_n) ((var)=(type*)ruby_sized_xrealloc((char*)(var), (n) * sizeof(type), (old_n) * sizeof(type)))
-#endif
-
-void rb_gc_resurrect(VALUE ptr);
-
-/* hash.c */
-struct st_table *rb_hash_tbl_raw(VALUE hash);
-#define RHASH_TBL_RAW(h) rb_hash_tbl_raw(h)
-VALUE rb_hash_keys(VALUE hash);
-VALUE rb_hash_values(VALUE hash);
-#define HASH_DELETED FL_USER1
-#define HASH_PROC_DEFAULT FL_USER2
/* inits.c */
void rb_call_inits(void);
@@ -490,17 +140,9 @@ void ruby_set_inplace_mode(const char *);
ssize_t rb_io_bufread(VALUE io, void *buf, size_t size);
void rb_stdio_set_default_encoding(void);
void rb_write_error_str(VALUE mesg);
-VALUE rb_io_flush_raw(VALUE, int);
/* iseq.c */
VALUE rb_iseq_clone(VALUE iseqval, VALUE newcbase);
-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);
-VALUE rb_iseq_klass(VALUE iseqval); /* completely temporary fucntion */
-VALUE rb_iseq_method_name(VALUE self);
/* load.c */
VALUE rb_get_load_path(void);
@@ -523,92 +165,13 @@ void Init_newline(void);
/* numeric.c */
int rb_num_to_uint(VALUE val, unsigned int *ret);
-VALUE ruby_num_interval_step_size(VALUE from, VALUE to, VALUE step, int excl);
+VALUE num_interval_step_size(VALUE from, VALUE to, VALUE step, int excl);
int ruby_float_step(VALUE from, VALUE to, VALUE step, int excl);
double ruby_float_mod(double x, double y);
-int rb_num_negative_p(VALUE);
-VALUE rb_int_succ(VALUE num);
-VALUE rb_int_pred(VALUE num);
-
-#if USE_FLONUM
-#define RUBY_BIT_ROTL(v, n) (((v) << (n)) | ((v) >> ((sizeof(v) * 8) - n)))
-#define RUBY_BIT_ROTR(v, n) (((v) >> (n)) | ((v) << ((sizeof(v) * 8) - n)))
-#endif
-
-static inline double
-rb_float_value_inline(VALUE v)
-{
-#if USE_FLONUM
- if (FLONUM_P(v)) {
- if (v != (VALUE)0x8000000000000002) { /* LIKELY */
- union {
- double d;
- VALUE v;
- } t;
-
- VALUE b63 = (v >> 63);
- /* e: xx1... -> 011... */
- /* xx0... -> 100... */
- /* ^b63 */
- t.v = RUBY_BIT_ROTR((2 - b63) | (v & ~0x03), 3);
- return t.d;
- }
- else {
- return 0.0;
- }
- }
-#endif
- return ((struct RFloat *)v)->float_value;
-}
-
-static inline VALUE
-rb_float_new_inline(double d)
-{
-#if USE_FLONUM
- union {
- double d;
- VALUE v;
- } t;
- int bits;
-
- t.d = d;
- bits = (int)((VALUE)(t.v >> 60) & 0x7);
- /* bits contains 3 bits of b62..b60. */
- /* bits - 3 = */
- /* b011 -> b000 */
- /* b100 -> b001 */
-
- if (t.v != 0x3000000000000000 /* 1.72723e-77 */ &&
- !((bits-3) & ~0x01)) {
- return (RUBY_BIT_ROTL(t.v, 3) & ~(VALUE)0x01) | 0x02;
- }
- else if (t.v == (VALUE)0) {
- /* +0.0 */
- return 0x8000000000000002;
- }
- /* out of range */
-#endif
- return rb_float_new_in_heap(d);
-}
-
-#define rb_float_value(v) rb_float_value_inline(v)
-#define rb_float_new(d) rb_float_new_inline(d)
/* object.c */
VALUE rb_obj_equal(VALUE obj1, VALUE obj2);
-struct RBasicRaw {
- VALUE flags;
- VALUE klass;
-};
-
-#define RBASIC_CLEAR_CLASS(obj) (((struct RBasicRaw *)((VALUE)(obj)))->klass = 0)
-#define RBASIC_SET_CLASS_RAW(obj, cls) (((struct RBasicRaw *)((VALUE)(obj)))->klass = (cls))
-#define RBASIC_SET_CLASS(obj, cls) do { \
- VALUE _obj_ = (obj); \
- RB_OBJ_WRITE(_obj_, &((struct RBasicRaw *)(_obj_))->klass, cls); \
-} while (0)
-
/* parse.y */
VALUE rb_parser_get_yydebug(VALUE);
VALUE rb_parser_set_yydebug(VALUE, VALUE);
@@ -621,15 +184,13 @@ int rb_is_local_name(VALUE name);
int rb_is_method_name(VALUE name);
int rb_is_junk_name(VALUE name);
void rb_gc_mark_parser(void);
-void rb_gc_mark_symbols(int full_mark);
+void rb_gc_mark_symbols(void);
/* proc.c */
VALUE rb_proc_location(VALUE self);
st_index_t rb_hash_proc(st_index_t hash, VALUE proc);
-int rb_block_arity(void);
/* process.c */
-#define RB_MAX_GROUPS (65536)
struct rb_execarg {
int use_shell;
@@ -704,28 +265,12 @@ size_t rb_strftime(char *s, size_t maxsize, const char *format, rb_encoding *enc
#endif
/* string.c */
-VALUE rb_fstring(VALUE);
int rb_str_buf_cat_escaped_char(VALUE result, unsigned int c, int unicode_p);
int rb_str_symname_p(VALUE);
VALUE rb_str_quote_unprintable(VALUE);
VALUE rb_id_quote_unprintable(ID);
#define QUOTE(str) rb_str_quote_unprintable(str)
#define QUOTE_ID(id) rb_id_quote_unprintable(id)
-void rb_str_fill_terminator(VALUE str, const int termlen);
-VALUE rb_str_locktmp_ensure(VALUE str, VALUE (*func)(VALUE), VALUE arg);
-#ifdef RUBY_ENCODING_H
-VALUE rb_external_str_with_enc(VALUE str, rb_encoding *eenc);
-#endif
-#define STR_NOEMBED FL_USER1
-#define STR_SHARED FL_USER2 /* = ELTS_SHARED */
-#define STR_ASSOC FL_USER3
-#define STR_SHARED_P(s) FL_ALL((s), STR_NOEMBED|ELTS_SHARED)
-#define STR_ASSOC_P(s) FL_ALL((s), STR_NOEMBED|STR_ASSOC)
-#define STR_NOCAPA (STR_NOEMBED|ELTS_SHARED|STR_ASSOC)
-#define STR_NOCAPA_P(s) (FL_TEST((s),STR_NOEMBED) && FL_ANY((s),ELTS_SHARED|STR_ASSOC))
-#define STR_EMBED_P(str) (!FL_TEST((str), STR_NOEMBED))
-#define is_ascii_string(str) (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT)
-#define is_broken_string(str) (rb_enc_str_coderange(str) == ENC_CODERANGE_BROKEN)
/* struct.c */
VALUE rb_struct_init_copy(VALUE copy, VALUE s);
@@ -746,14 +291,10 @@ VALUE rb_thread_shield_destroy(VALUE self);
void rb_mutex_allow_trap(VALUE self, int val);
VALUE rb_uninterruptible(VALUE (*b_proc)(ANYARGS), VALUE data);
VALUE rb_mutex_owned_p(VALUE self);
-void ruby_kill(rb_pid_t pid, int sig);
/* thread_pthread.c, thread_win32.c */
void Init_native_thread(void);
-/* vm_insnhelper.h */
-rb_serial_t rb_next_class_serial(void);
-
/* vm.c */
VALUE rb_obj_is_thread(VALUE obj);
void rb_vm_mark(void *ptr);
@@ -768,21 +309,14 @@ VALUE rb_sourcefilename(void);
/* vm_dump.c */
void rb_vm_bugreport(void);
-void rb_print_backtrace(void);
/* vm_eval.c */
void Init_vm_eval(void);
VALUE rb_current_realfilepath(void);
-VALUE rb_check_block_call(VALUE, ID, int, const VALUE *, rb_block_call_func_t, VALUE);
-typedef void rb_check_funcall_hook(int, VALUE, ID, int, const VALUE *, VALUE);
-VALUE rb_check_funcall_with_hook(VALUE recv, ID mid, int argc, const VALUE *argv,
+VALUE rb_check_block_call(VALUE, ID, int, VALUE *, VALUE (*)(ANYARGS), VALUE);
+typedef void rb_check_funcall_hook(int, VALUE, ID, int, VALUE *, VALUE);
+VALUE rb_check_funcall_with_hook(VALUE recv, ID mid, int argc, VALUE *argv,
rb_check_funcall_hook *hook, VALUE arg);
-VALUE rb_catch_protect(VALUE t, rb_block_call_func *func, VALUE data, int *stateptr);
-
-/* vm_insnhelper.c */
-VALUE rb_equal_opt(VALUE obj1, VALUE obj2);
-int rb_get_kwargs(VALUE keyword_hash, const ID *table, int required, int optional, VALUE *);
-VALUE rb_extract_keywords(VALUE *orighash);
/* vm_method.c */
void Init_eval_method(void);
@@ -793,56 +327,26 @@ void Init_prelude(void);
/* vm_backtrace.c */
void Init_vm_backtrace(void);
-VALUE rb_vm_thread_backtrace(int argc, VALUE *argv, VALUE thval);
-VALUE rb_vm_thread_backtrace_locations(int argc, VALUE *argv, VALUE thval);
+VALUE vm_thread_backtrace(int argc, VALUE *argv, VALUE thval);
+VALUE vm_thread_backtrace_locations(int argc, VALUE *argv, VALUE thval);
VALUE rb_make_backtrace(void);
void rb_backtrace_print_as_bugreport(void);
int rb_backtrace_p(VALUE obj);
VALUE rb_backtrace_to_str_ary(VALUE obj);
-VALUE rb_backtrace_to_location_ary(VALUE obj);
-void rb_backtrace_print_to(VALUE output);
-VALUE rb_vm_backtrace_object(void);
+VALUE rb_vm_backtrace_object();
-RUBY_SYMBOL_EXPORT_BEGIN
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility push(default)
+#endif
const char *rb_objspace_data_type_name(VALUE obj);
/* Temporary. This API will be removed (renamed). */
VALUE rb_thread_io_blocking_region(rb_blocking_function_t *func, void *data1, int fd);
-/* bignum.c */
-VALUE rb_big_mul_normal(VALUE x, VALUE y);
-VALUE rb_big_mul_balance(VALUE x, VALUE y);
-VALUE rb_big_mul_karatsuba(VALUE x, VALUE y);
-VALUE rb_big_mul_toom3(VALUE x, VALUE y);
-VALUE rb_big_sq_fast(VALUE x);
-VALUE rb_big_divrem_normal(VALUE x, VALUE y);
-VALUE rb_big2str_poweroftwo(VALUE x, int base);
-VALUE rb_big2str_generic(VALUE x, int base);
-VALUE rb_str2big_poweroftwo(VALUE arg, int base, int badcheck);
-VALUE rb_str2big_normal(VALUE arg, int base, int badcheck);
-VALUE rb_str2big_karatsuba(VALUE arg, int base, int badcheck);
-#if defined(HAVE_LIBGMP) && defined(HAVE_GMP_H)
-VALUE rb_big_mul_gmp(VALUE x, VALUE y);
-VALUE rb_big_divrem_gmp(VALUE x, VALUE y);
-VALUE rb_big2str_gmp(VALUE x, int base);
-VALUE rb_str2big_gmp(VALUE arg, int base, int badcheck);
-#endif
-
-/* error.c */
-int rb_bug_reporter_add(void (*func)(FILE *, void *), void *data);
-
-/* file.c */
-#ifdef __APPLE__
-VALUE rb_str_normalize_ospath(const char *ptr, long len);
-#endif
-
/* io.c */
void rb_maygvl_fd_fix_cloexec(int fd);
-/* numeric.c */
-VALUE rb_int_positive_pow(long x, unsigned long y);
-
/* process.c */
int rb_exec_async_signal_safe(const struct rb_execarg *e, char *errmsg, size_t errmsg_buflen);
rb_pid_t rb_fork_async_signal_safe(int *status, int (*chfunc)(void*, char *, size_t), void *charg, VALUE fds, char *errmsg, size_t errmsg_buflen);
@@ -855,29 +359,14 @@ int rb_execarg_run_options(const struct rb_execarg *e, struct rb_execarg *s, cha
VALUE rb_execarg_extract_options(VALUE execarg_obj, VALUE opthash);
void rb_execarg_setenv(VALUE execarg_obj, VALUE env);
-/* rational.c */
-VALUE rb_gcd_normal(VALUE self, VALUE other);
-#if defined(HAVE_LIBGMP) && defined(HAVE_GMP_H)
-VALUE rb_gcd_gmp(VALUE x, VALUE y);
-#endif
-
-/* util.c */
-extern const signed char ruby_digit36_to_number_table[];
-
/* variable.c */
void rb_gc_mark_global_tbl(void);
void rb_mark_generic_ivar(VALUE);
void rb_mark_generic_ivar_tbl(void);
-int rb_st_insert_id_and_value(VALUE obj, st_table *tbl, ID key, VALUE value);
-st_table *rb_st_copy(VALUE obj, struct st_table *orig_tbl);
-
-/* gc.c */
-size_t rb_obj_memsize_of(VALUE);
-#define RB_OBJ_GC_FLAGS_MAX 5
-size_t rb_obj_gc_flags(VALUE, ID[], size_t);
-
-RUBY_SYMBOL_EXPORT_END
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility pop
+#endif
#if defined(__cplusplus)
#if 0
diff --git a/io.c b/io.c
index 5aa720b6a7..bd21de0102 100644
--- a/io.c
+++ b/io.c
@@ -19,7 +19,6 @@
#include "id.h"
#include <ctype.h>
#include <errno.h>
-#include "ruby_atomic.h"
#define free(x) xfree(x)
@@ -110,14 +109,7 @@
# endif
#endif
-#ifndef EWOULDBLOCK
-# define EWOULDBLOCK EAGAIN
-#endif
-
-#if defined(HAVE___SYSCALL) && (defined(__APPLE__) || defined(__OpenBSD__))
-/* Mac OS X and OpenBSD have __syscall but don't define it in headers */
-off_t __syscall(quad_t number, ...);
-#endif
+#define numberof(array) (int)(sizeof(array) / sizeof((array)[0]))
#define IO_RBUF_CAPA_MIN 8192
#define IO_CBUF_CAPA_MIN (128*1024)
@@ -135,16 +127,6 @@ VALUE rb_eEOFError;
VALUE rb_eIOError;
VALUE rb_mWaitReadable;
VALUE rb_mWaitWritable;
-extern VALUE rb_eEAGAIN;
-extern VALUE rb_eEWOULDBLOCK;
-extern VALUE rb_eEINPROGRESS;
-
-static VALUE rb_eEAGAINWaitReadable;
-static VALUE rb_eEAGAINWaitWritable;
-static VALUE rb_eEWOULDBLOCKWaitReadable;
-static VALUE rb_eEWOULDBLOCKWaitWritable;
-static VALUE rb_eEINPROGRESSWaitWritable;
-static VALUE rb_eEINPROGRESSWaitReadable;
VALUE rb_stdin, rb_stdout, rb_stderr;
VALUE rb_deferr; /* rescue VIM plugin */
@@ -159,14 +141,7 @@ static VALUE argf;
static ID id_write, id_read, id_getc, id_flush, id_readpartial, id_set_encoding;
static VALUE sym_mode, sym_perm, sym_extenc, sym_intenc, sym_encoding, sym_open_args;
-static VALUE sym_textmode, sym_binmode, sym_autoclose, sym_exception;
-static VALUE sym_SET, sym_CUR, sym_END;
-#ifdef SEEK_DATA
-static VALUE sym_DATA;
-#endif
-#ifdef SEEK_HOLE
-static VALUE sym_HOLE;
-#endif
+static VALUE sym_textmode, sym_binmode, sym_autoclose;
struct argf {
VALUE filename, current_file;
@@ -178,20 +153,15 @@ struct argf {
int8_t init_p, next_p, binmode;
};
-static rb_atomic_t max_file_descriptor = NOFILE;
+static int max_file_descriptor = NOFILE;
void
rb_update_max_fd(int fd)
{
struct stat buf;
- rb_atomic_t afd = (rb_atomic_t)fd;
-
if (fstat(fd, &buf) != 0 && errno == EBADF) {
rb_bug("rb_update_max_fd: invalid fd (%d) given.", fd);
}
-
- while (max_file_descriptor < afd) {
- ATOMIC_CAS(max_file_descriptor, max_file_descriptor, afd);
- }
+ if (max_file_descriptor < fd) max_file_descriptor = fd;
}
void
@@ -221,7 +191,7 @@ void
rb_fd_fix_cloexec(int fd)
{
rb_maygvl_fd_fix_cloexec(fd);
- rb_update_max_fd(fd);
+ if (max_file_descriptor < fd) max_file_descriptor = fd;
}
int
@@ -275,6 +245,10 @@ rb_cloexec_dup2(int oldfd, int newfd)
}
#else
ret = dup2(oldfd, newfd);
+# ifdef _WIN32
+ if (newfd >= 0 && newfd <= 2)
+ SetStdHandle(newfd == 0 ? STD_INPUT_HANDLE : newfd == 1 ? STD_OUTPUT_HANDLE : STD_ERROR_HANDLE, (HANDLE)rb_w32_get_osfhandle(newfd));
+# endif
#endif
if (ret == -1) return -1;
}
@@ -420,6 +394,8 @@ rb_cloexec_fcntl_dupfd(int fd, int minfd)
# endif
#endif
+#define rb_sys_fail_path(path) rb_sys_fail_str(path)
+
static int io_fflush(rb_io_t *);
static rb_io_t *flush_before_seek(rb_io_t *fptr);
@@ -599,6 +575,8 @@ rb_eof_error(void)
VALUE
rb_io_taint_check(VALUE io)
{
+ if (!OBJ_UNTRUSTED(io) && rb_safe_level() >= 4)
+ rb_raise(rb_eSecurityError, "Insecure: operation on trusted IO");
rb_check_frozen(io);
return io;
}
@@ -1376,6 +1354,7 @@ io_write(VALUE io, VALUE str, int nosync)
long n;
VALUE tmp;
+ rb_secure(4);
io = GetWriteIO(io);
str = rb_obj_as_string(str);
tmp = rb_io_check_io(io);
@@ -1424,7 +1403,7 @@ io_write_m(VALUE io, VALUE str)
VALUE
rb_io_write(VALUE io, VALUE str)
{
- return rb_funcallv(io, id_write, 1, &str);
+ return rb_funcall(io, id_write, 1, str);
}
/*
@@ -1460,8 +1439,24 @@ nogvl_fsync(void *ptr)
}
#endif
+/*
+ * call-seq:
+ * ios.flush -> ios
+ *
+ * Flushes any buffered data within <em>ios</em> to the underlying
+ * operating system (note that this is Ruby internal buffering only;
+ * the OS may buffer the data as well).
+ *
+ * $stdout.print "no newline"
+ * $stdout.flush
+ *
+ * <em>produces:</em>
+ *
+ * no newline
+ */
+
VALUE
-rb_io_flush_raw(VALUE io, int sync)
+rb_io_flush(VALUE io)
{
rb_io_t *fptr;
@@ -1476,7 +1471,7 @@ rb_io_flush_raw(VALUE io, int sync)
if (io_fflush(fptr) < 0)
rb_sys_fail(0);
#ifdef _WIN32
- if (sync && GetFileType((HANDLE)rb_w32_get_osfhandle(fptr->fd)) == FILE_TYPE_DISK) {
+ if (GetFileType((HANDLE)rb_w32_get_osfhandle(fptr->fd)) == FILE_TYPE_DISK) {
rb_thread_io_blocking_region(nogvl_fsync, fptr, fptr->fd);
}
#endif
@@ -1490,28 +1485,6 @@ rb_io_flush_raw(VALUE io, int sync)
/*
* call-seq:
- * ios.flush -> ios
- *
- * Flushes any buffered data within <em>ios</em> to the underlying
- * operating system (note that this is Ruby internal buffering only;
- * the OS may buffer the data as well).
- *
- * $stdout.print "no newline"
- * $stdout.flush
- *
- * <em>produces:</em>
- *
- * no newline
- */
-
-VALUE
-rb_io_flush(VALUE io)
-{
- return rb_io_flush_raw(io, 1);
-}
-
-/*
- * call-seq:
* ios.pos -> integer
* ios.tell -> integer
*
@@ -1550,26 +1523,6 @@ rb_io_seek(VALUE io, VALUE offset, int whence)
return INT2FIX(0);
}
-static int
-interpret_seek_whence(VALUE vwhence)
-{
- if (vwhence == sym_SET)
- return SEEK_SET;
- if (vwhence == sym_CUR)
- return SEEK_CUR;
- if (vwhence == sym_END)
- return SEEK_END;
-#ifdef SEEK_DATA
- if (vwhence == sym_DATA)
- return SEEK_DATA;
-#endif
-#ifdef SEEK_HOLE
- if (vwhence == sym_HOLE)
- return SEEK_HOLE;
-#endif
- return NUM2INT(vwhence);
-}
-
/*
* call-seq:
* ios.seek(amount, whence=IO::SEEK_SET) -> 0
@@ -1577,12 +1530,12 @@ interpret_seek_whence(VALUE vwhence)
* Seeks to a given offset <i>anInteger</i> in the stream according to
* the value of <i>whence</i>:
*
- * :CUR or IO::SEEK_CUR | Seeks to _amount_ plus current position
- * ----------------------+--------------------------------------------------
- * :END or IO::SEEK_END | Seeks to _amount_ plus end of stream (you
- * | probably want a negative value for _amount_)
- * ----------------------+--------------------------------------------------
- * :SET or IO::SEEK_SET | Seeks to the absolute location given by _amount_
+ * IO::SEEK_CUR | Seeks to _amount_ plus current position
+ * --------------+----------------------------------------------------
+ * IO::SEEK_END | Seeks to _amount_ plus end of stream (you probably
+ * | want a negative value for _amount_)
+ * --------------+----------------------------------------------------
+ * IO::SEEK_SET | Seeks to the absolute location given by _amount_
*
* Example:
*
@@ -1598,7 +1551,7 @@ rb_io_seek_m(int argc, VALUE *argv, VALUE io)
int whence = SEEK_SET;
if (rb_scan_args(argc, argv, "11", &offset, &ptrname) == 2) {
- whence = interpret_seek_whence(ptrname);
+ whence = NUM2INT(ptrname);
}
return rb_io_seek(io, offset, whence);
@@ -1609,7 +1562,7 @@ rb_io_seek_m(int argc, VALUE *argv, VALUE io)
* ios.pos = integer -> integer
*
* Seeks to the given position (in bytes) in <em>ios</em>.
- * It is not guaranteed that seeking to the right position when <em>ios</em>
+ * It is not guranteed that seeking to the right position when <em>ios</em>
* is textmode.
*
* f = File.new("testfile")
@@ -1656,6 +1609,11 @@ rb_io_rewind(VALUE io)
GetOpenFile(io, fptr);
if (io_seek(fptr, 0L, 0) < 0 && errno) rb_sys_fail_path(fptr->pathv);
+#ifdef _WIN32
+ if (GetFileType((HANDLE)rb_w32_get_osfhandle(fptr->fd)) == FILE_TYPE_DISK) {
+ fsync(fptr->fd);
+ }
+#endif
if (io == ARGF.current_file) {
ARGF.lineno -= fptr->lineno;
}
@@ -1689,13 +1647,7 @@ io_fillbuf(rb_io_t *fptr)
if (r < 0) {
if (rb_io_wait_readable(fptr->fd))
goto retry;
- {
- VALUE path = rb_sprintf("fd:%d ", fptr->fd);
- if (!NIL_P(fptr->pathv)) {
- rb_str_append(path, fptr->pathv);
- }
- rb_sys_fail_path(path);
- }
+ rb_sys_fail_path(fptr->pathv);
}
fptr->rbuf.off = 0;
fptr->rbuf.len = (int)r; /* r should be <= rbuf_capa */
@@ -2058,32 +2010,15 @@ io_bufread(char *ptr, long len, rb_io_t *fptr)
static void io_setstrbuf(VALUE *str, long len);
-struct bufread_arg {
- char *str_ptr;
- long len;
- rb_io_t *fptr;
-};
-
-static VALUE
-bufread_call(VALUE arg)
-{
- struct bufread_arg *p = (struct bufread_arg *)arg;
- p->len = io_bufread(p->str_ptr, p->len, p->fptr);
- return Qundef;
-}
-
static long
io_fread(VALUE str, long offset, long size, rb_io_t *fptr)
{
long len;
- struct bufread_arg arg;
io_setstrbuf(&str, offset + size);
- arg.str_ptr = RSTRING_PTR(str) + offset;
- arg.len = size;
- arg.fptr = fptr;
- rb_str_locktmp_ensure(str, bufread_call, (VALUE)&arg);
- len = arg.len;
+ rb_str_locktmp(str);
+ len = io_bufread(RSTRING_PTR(str) + offset, size, fptr);
+ rb_str_unlocktmp(str);
if (len < 0) rb_sys_fail_path(fptr->pathv);
return len;
}
@@ -2391,32 +2326,14 @@ rb_io_set_nonblock(rb_io_t *fptr)
}
}
-void
-rb_readwrite_sys_fail(int writable, const char *mesg);
-
-struct read_internal_arg {
- int fd;
- char *str_ptr;
- long len;
-};
-
-static VALUE
-read_internal_call(VALUE arg)
-{
- struct read_internal_arg *p = (struct read_internal_arg *)arg;
- p->len = rb_read_internal(p->fd, p->str_ptr, p->len);
- return Qundef;
-}
-
static VALUE
-io_getpartial(int argc, VALUE *argv, VALUE io, int nonblock, int no_exception)
+io_getpartial(int argc, VALUE *argv, VALUE io, int nonblock)
{
rb_io_t *fptr;
VALUE length, str;
long n, len;
- struct read_internal_arg arg;
- rb_scan_args(argc, argv, "11:", &length, &str, NULL);
+ rb_scan_args(argc, argv, "11", &length, &str);
if ((len = NUM2LONG(length)) < 0) {
rb_raise(rb_eArgError, "negative length %ld given", len);
@@ -2440,20 +2357,14 @@ io_getpartial(int argc, VALUE *argv, VALUE io, int nonblock, int no_exception)
rb_io_set_nonblock(fptr);
}
io_setstrbuf(&str, len);
- arg.fd = fptr->fd;
- arg.str_ptr = RSTRING_PTR(str);
- arg.len = len;
- rb_str_locktmp_ensure(str, read_internal_call, (VALUE)&arg);
- n = arg.len;
+ rb_str_locktmp(str);
+ n = rb_read_internal(fptr->fd, RSTRING_PTR(str), len);
+ rb_str_unlocktmp(str);
if (n < 0) {
if (!nonblock && rb_io_wait_readable(fptr->fd))
goto again;
- if (nonblock && (errno == EWOULDBLOCK || errno == EAGAIN)) {
- if (no_exception)
- return ID2SYM(rb_intern("wait_readable"));
- else
- rb_readwrite_sys_fail(RB_IO_WAIT_READABLE, "read would block");
- }
+ if (nonblock && (errno == EWOULDBLOCK || errno == EAGAIN))
+ rb_mod_sys_fail(rb_mWaitReadable, "read would block");
rb_sys_fail_path(fptr->pathv);
}
}
@@ -2529,7 +2440,7 @@ io_readpartial(int argc, VALUE *argv, VALUE io)
{
VALUE ret;
- ret = io_getpartial(argc, argv, io, 0, 0);
+ ret = io_getpartial(argc, argv, io, 0);
if (NIL_P(ret))
rb_eof_error();
return ret;
@@ -2590,62 +2501,16 @@ static VALUE
io_read_nonblock(int argc, VALUE *argv, VALUE io)
{
VALUE ret;
- VALUE opts = Qnil;
- int no_exception = 0;
-
- rb_scan_args(argc, argv, "11:", NULL, NULL, &opts);
-
- if (!NIL_P(opts) && Qfalse == rb_hash_aref(opts, sym_exception))
- no_exception = 1;
- ret = io_getpartial(argc, argv, io, 1, no_exception);
-
- if (NIL_P(ret)) {
- if (no_exception)
- return Qnil;
- else
- rb_eof_error();
- }
+ ret = io_getpartial(argc, argv, io, 1);
+ if (NIL_P(ret))
+ rb_eof_error();
return ret;
}
-static VALUE
-io_write_nonblock(VALUE io, VALUE str, int no_exception)
-{
- rb_io_t *fptr;
- long n;
-
- if (!RB_TYPE_P(str, T_STRING))
- str = rb_obj_as_string(str);
-
- io = GetWriteIO(io);
- GetOpenFile(io, fptr);
- rb_io_check_writable(fptr);
-
- if (io_fflush(fptr) < 0)
- rb_sys_fail(0);
-
- rb_io_set_nonblock(fptr);
- n = write(fptr->fd, RSTRING_PTR(str), RSTRING_LEN(str));
-
- if (n == -1) {
- if (errno == EWOULDBLOCK || errno == EAGAIN) {
- if (no_exception) {
- return ID2SYM(rb_intern("wait_writable"));
- } else {
- rb_readwrite_sys_fail(RB_IO_WAIT_WRITABLE, "write would block");
- }
- }
- rb_sys_fail_path(fptr->pathv);
- }
-
- return LONG2FIX(n);
-}
-
/*
* call-seq:
* ios.write_nonblock(string) -> integer
- * ios.write_nonblock(string [, options]) -> integer
*
* Writes the given string to <em>ios</em> using
* the write(2) system call after O_NONBLOCK is set for
@@ -2694,25 +2559,35 @@ io_write_nonblock(VALUE io, VALUE str, int no_exception)
* according to the kind of the IO object.
* In such cases, write_nonblock raises <code>Errno::EBADF</code>.
*
- * By specifying `exception: false`, the options hash allows you to indicate
- * that write_nonblock should not raise an IO::WaitWritable exception, but
- * return the symbol :wait_writable instead.
- *
*/
static VALUE
-rb_io_write_nonblock(int argc, VALUE *argv, VALUE io)
+rb_io_write_nonblock(VALUE io, VALUE str)
{
- VALUE str;
- VALUE opts = Qnil;
- int no_exceptions = 0;
+ rb_io_t *fptr;
+ long n;
+
+ rb_secure(4);
+ if (!RB_TYPE_P(str, T_STRING))
+ str = rb_obj_as_string(str);
- rb_scan_args(argc, argv, "10:", &str, &opts);
+ io = GetWriteIO(io);
+ GetOpenFile(io, fptr);
+ rb_io_check_writable(fptr);
+
+ if (io_fflush(fptr) < 0)
+ rb_sys_fail(0);
+
+ rb_io_set_nonblock(fptr);
+ n = write(fptr->fd, RSTRING_PTR(str), RSTRING_LEN(str));
- if (!NIL_P(opts) && Qfalse == rb_hash_aref(opts, sym_exception))
- no_exceptions = 1;
+ if (n == -1) {
+ if (errno == EWOULDBLOCK || errno == EAGAIN)
+ rb_mod_sys_fail(rb_mWaitWritable, "write would block");
+ rb_sys_fail_path(fptr->pathv);
+ }
- return io_write_nonblock(io, str, no_exceptions);
+ return LONG2FIX(n);
}
/*
@@ -2845,9 +2720,10 @@ appendline(rb_io_t *fptr, int delim, VALUE *strp, long *lp)
make_readconv(fptr, 0);
do {
const char *p, *e;
- int searchlen = READ_CHAR_PENDING_COUNT(fptr);
- if (searchlen) {
- p = READ_CHAR_PENDING_PTR(fptr);
+ int searchlen;
+ if (fptr->cbuf.len) {
+ p = fptr->cbuf.ptr+fptr->cbuf.off;
+ searchlen = fptr->cbuf.len;
if (0 < limit && limit < searchlen)
searchlen = (int)limit;
e = memchr(p, delim, searchlen);
@@ -2973,7 +2849,7 @@ rb_io_getline_fast(rb_io_t *fptr, rb_encoding *enc, VALUE io)
long pos = 0;
int cr = 0;
- do {
+ for (;;) {
int pending = READ_DATA_PENDING_COUNT(fptr);
if (pending > 0) {
@@ -2999,8 +2875,11 @@ rb_io_getline_fast(rb_io_t *fptr, rb_encoding *enc, VALUE io)
if (e) break;
}
READ_CHECK(fptr);
- } while (io_fillbuf(fptr) >= 0);
- if (NIL_P(str)) return Qnil;
+ if (io_fillbuf(fptr) < 0) {
+ if (NIL_P(str)) return Qnil;
+ break;
+ }
+ }
str = io_enc_str(str, fptr);
ENC_CODERANGE_SET(str, cr);
@@ -3122,7 +3001,7 @@ rb_io_getline_1(VALUE rs, long limit, VALUE io)
if (c == newline) {
if (RSTRING_LEN(str) < rslen) continue;
s = RSTRING_PTR(str);
- e = RSTRING_END(str);
+ e = s + RSTRING_LEN(str);
p = e - rslen;
pp = rb_enc_left_char_head(s, p, e, enc);
if (pp != p) continue;
@@ -3131,7 +3010,7 @@ rb_io_getline_1(VALUE rs, long limit, VALUE io)
}
if (limit == 0) {
s = RSTRING_PTR(str);
- p = RSTRING_END(str);
+ p = s + RSTRING_LEN(str);
pp = rb_enc_left_char_head(s, p-1, p, enc);
if (extra_limit &&
MBCLEN_NEEDMORE_P(rb_enc_precise_mbclen(pp, p, enc))) {
@@ -3147,20 +3026,25 @@ rb_io_getline_1(VALUE rs, long limit, VALUE io)
}
}
- if (rspara && c != EOF)
- swallow(fptr, '\n');
+ if (rspara) {
+ if (c != EOF) {
+ swallow(fptr, '\n');
+ }
+ }
if (!NIL_P(str))
str = io_enc_str(str, fptr);
}
- if (!NIL_P(str) && !nolimit) {
- fptr->lineno++;
- if (io == ARGF.current_file) {
- ARGF.lineno++;
- ARGF.last_lineno = ARGF.lineno;
- }
- else {
- ARGF.last_lineno = fptr->lineno;
+ if (!NIL_P(str)) {
+ if (!nolimit) {
+ fptr->lineno++;
+ if (io == ARGF.current_file) {
+ ARGF.lineno++;
+ ARGF.last_lineno = ARGF.lineno;
+ }
+ else {
+ ARGF.last_lineno = fptr->lineno;
+ }
}
}
@@ -3413,7 +3297,7 @@ rb_io_each_byte(VALUE io)
RETURN_ENUMERATOR(io, 0, 0);
GetOpenFile(io, fptr);
- do {
+ for (;;) {
while (fptr->rbuf.len > 0) {
char *p = fptr->rbuf.ptr + fptr->rbuf.off++;
fptr->rbuf.len--;
@@ -3422,7 +3306,10 @@ rb_io_each_byte(VALUE io)
}
rb_io_check_byte_readable(fptr);
READ_CHECK(fptr);
- } while (io_fillbuf(fptr) >= 0);
+ if (io_fillbuf(fptr) < 0) {
+ break;
+ }
+ }
return io;
}
@@ -3487,11 +3374,7 @@ io_getc(rb_io_t *fptr, rb_encoding *enc)
}
else {
io_shift_cbuf(fptr, MBCLEN_CHARFOUND_LEN(r), &str);
- cr = ENC_CODERANGE_VALID;
- if (MBCLEN_CHARFOUND_LEN(r) == 1 && rb_enc_asciicompat(read_enc) &&
- ISASCII(RSTRING_PTR(str)[0])) {
- cr = ENC_CODERANGE_7BIT;
- }
+ cr = ISASCII(r) ? ENC_CODERANGE_7BIT : ENC_CODERANGE_VALID;
}
str = io_enc_str(str, fptr);
ENC_CODERANGE_SET(str, cr);
@@ -3666,7 +3549,10 @@ rb_io_each_codepoint(VALUE io)
}
NEED_NEWLINE_DECORATOR_ON_READ_CHECK(fptr);
enc = io_input_encoding(fptr);
- while (io_fillbuf(fptr) >= 0) {
+ for (;;) {
+ if (io_fillbuf(fptr) < 0) {
+ return io;
+ }
r = rb_enc_precise_mbclen(fptr->rbuf.ptr+fptr->rbuf.off,
fptr->rbuf.ptr+fptr->rbuf.off+fptr->rbuf.len, enc);
if (MBCLEN_CHARFOUND_P(r) &&
@@ -3979,14 +3865,6 @@ rb_io_close_on_exec_p(VALUE io)
* f.close_on_exec = true
* system("cat", "/proc/self/fd/#{f.fileno}") # cat: /proc/self/fd/3: No such file or directory
* f.closed? #=> false
- *
- * Ruby sets close-on-exec flags of all file descriptors by default
- * since Ruby 2.0.0.
- * So you don't need to set by yourself.
- * Also, unsetting a close-on-exec flag can cause file descriptor leak
- * if another thread use fork() and exec() (via system() method for example).
- * If you really needs file descriptor inheritance to child process,
- * use spawn()'s argument such as fd=>fd.
*/
static VALUE
@@ -4332,6 +4210,9 @@ rb_io_close(VALUE io)
static VALUE
rb_io_close_m(VALUE io)
{
+ if (rb_safe_level() >= 4 && !OBJ_UNTRUSTED(io)) {
+ rb_raise(rb_eSecurityError, "Insecure: can't close");
+ }
rb_io_check_closed(RFILE(io)->fptr);
rb_io_close(io);
return Qnil;
@@ -4412,6 +4293,9 @@ rb_io_close_read(VALUE io)
rb_io_t *fptr;
VALUE write_io;
+ if (rb_safe_level() >= 4 && !OBJ_UNTRUSTED(io)) {
+ rb_raise(rb_eSecurityError, "Insecure: can't close");
+ }
GetOpenFile(io, fptr);
if (is_socket(fptr->fd, fptr->pathv)) {
#ifndef SHUT_RD
@@ -4428,16 +4312,11 @@ rb_io_close_read(VALUE io)
write_io = GetWriteIO(io);
if (io != write_io) {
rb_io_t *wfptr;
+ rb_io_fptr_cleanup(fptr, FALSE);
GetOpenFile(write_io, wfptr);
- wfptr->pid = fptr->pid;
- fptr->pid = 0;
RFILE(io)->fptr = wfptr;
- /* bind to write_io temporarily to get rid of memory/fd leak */
- fptr->tied_io_for_writing = 0;
- fptr->mode &= ~FMODE_DUPLEX;
- RFILE(write_io)->fptr = fptr;
- rb_io_fptr_cleanup(fptr, FALSE);
- /* should not finalize fptr because another thread may be reading it */
+ RFILE(write_io)->fptr = NULL;
+ rb_io_fptr_finalize(fptr);
return Qnil;
}
@@ -4472,6 +4351,9 @@ rb_io_close_write(VALUE io)
rb_io_t *fptr;
VALUE write_io;
+ if (rb_safe_level() >= 4 && !OBJ_UNTRUSTED(io)) {
+ rb_raise(rb_eSecurityError, "Insecure: can't close");
+ }
write_io = GetWriteIO(io);
GetOpenFile(write_io, fptr);
if (is_socket(fptr->fd, fptr->pathv)) {
@@ -4490,12 +4372,12 @@ rb_io_close_write(VALUE io)
rb_raise(rb_eIOError, "closing non-duplex IO for writing");
}
+ rb_io_close(write_io);
if (io != write_io) {
GetOpenFile(io, fptr);
fptr->tied_io_for_writing = 0;
fptr->mode &= ~FMODE_DUPLEX;
}
- rb_io_close(write_io);
return Qnil;
}
@@ -4521,7 +4403,7 @@ rb_io_sysseek(int argc, VALUE *argv, VALUE io)
off_t pos;
if (rb_scan_args(argc, argv, "11", &offset, &ptrname) == 2) {
- whence = interpret_seek_whence(ptrname);
+ whence = NUM2INT(ptrname);
}
pos = NUM2OFFT(offset);
GetOpenFile(io, fptr);
@@ -4558,6 +4440,7 @@ rb_io_syswrite(VALUE io, VALUE str)
rb_io_t *fptr;
long n;
+ rb_secure(4);
if (!RB_TYPE_P(str, T_STRING))
str = rb_obj_as_string(str);
@@ -4602,7 +4485,6 @@ rb_io_sysread(int argc, VALUE *argv, VALUE io)
VALUE len, str;
rb_io_t *fptr;
long n, ilen;
- struct read_internal_arg arg;
rb_scan_args(argc, argv, "11", &len, &str);
ilen = NUM2LONG(len);
@@ -4632,11 +4514,8 @@ rb_io_sysread(int argc, VALUE *argv, VALUE io)
io_setstrbuf(&str, ilen);
rb_str_locktmp(str);
- arg.fd = fptr->fd;
- arg.str_ptr = RSTRING_PTR(str);
- arg.len = ilen;
- rb_ensure(read_internal_call, (VALUE)&arg, rb_str_unlocktmp, str);
- n = arg.len;
+ n = rb_read_internal(fptr->fd, RSTRING_PTR(str), ilen);
+ rb_str_unlocktmp(str);
if (n == -1) {
rb_sys_fail_path(fptr->pathv);
@@ -4674,9 +4553,12 @@ rb_io_binmode(VALUE io)
return io;
}
-static void
-io_ascii8bit_binmode(rb_io_t *fptr)
+VALUE
+rb_io_ascii8bit_binmode(VALUE io)
{
+ rb_io_t *fptr;
+
+ GetOpenFile(io, fptr);
if (fptr->readconv) {
rb_econv_close(fptr->readconv);
fptr->readconv = NULL;
@@ -4694,15 +4576,6 @@ io_ascii8bit_binmode(rb_io_t *fptr)
fptr->encs.ecflags = 0;
fptr->encs.ecopts = Qnil;
clear_codeconv(fptr);
-}
-
-VALUE
-rb_io_ascii8bit_binmode(VALUE io)
-{
- rb_io_t *fptr;
-
- GetOpenFile(io, fptr);
- io_ascii8bit_binmode(fptr);
return io;
}
@@ -4943,7 +4816,7 @@ rb_io_oflags_modestr(int oflags)
* Qnil => no encoding specified (internal only)
*/
static void
-rb_io_ext_int_to_encs(rb_encoding *ext, rb_encoding *intern, rb_encoding **enc, rb_encoding **enc2, int fmode)
+rb_io_ext_int_to_encs(rb_encoding *ext, rb_encoding *intern, rb_encoding **enc, rb_encoding **enc2)
{
int default_ext = 0;
@@ -4951,15 +4824,10 @@ rb_io_ext_int_to_encs(rb_encoding *ext, rb_encoding *intern, rb_encoding **enc,
ext = rb_default_external_encoding();
default_ext = 1;
}
- if (ext == rb_ascii8bit_encoding()) {
- /* If external is ASCII-8BIT, no transcoding */
- intern = NULL;
- }
- else if (intern == NULL) {
+ if (intern == NULL && ext != rb_ascii8bit_encoding())
+ /* If external is ASCII-8BIT, no default transcoding */
intern = rb_default_internal_encoding();
- }
- if (intern == NULL || intern == (rb_encoding *)Qnil ||
- (!(fmode & FMODE_SETENC_BY_BOM) && (intern == ext))) {
+ if (intern == NULL || intern == (rb_encoding *)Qnil || intern == ext) {
/* No internal encoding => use external + no transcoding */
*enc = (default_ext && intern != ext) ? NULL : ext;
*enc2 = NULL;
@@ -4982,7 +4850,6 @@ parse_mode_enc(const char *estr, rb_encoding **enc_p, rb_encoding **enc2_p, int
const char *p;
char encname[ENCODING_MAXNAMELEN+1];
int idx, idx2;
- int fmode = fmode_p ? *fmode_p : 0;
rb_encoding *ext_enc, *int_enc;
/* parse estr as "enc" or "enc2:enc" or "enc:-" */
@@ -4994,7 +4861,7 @@ parse_mode_enc(const char *estr, rb_encoding **enc_p, rb_encoding **enc2_p, int
idx = -1;
else {
if (io_encname_bom_p(estr, len)) {
- fmode |= FMODE_SETENC_BY_BOM;
+ if (fmode_p) *fmode_p |= FMODE_SETENC_BY_BOM;
estr += 4;
len -= 4;
}
@@ -5007,7 +4874,7 @@ parse_mode_enc(const char *estr, rb_encoding **enc_p, rb_encoding **enc2_p, int
else {
long len = strlen(estr);
if (io_encname_bom_p(estr, len)) {
- fmode |= FMODE_SETENC_BY_BOM;
+ if (fmode_p) *fmode_p |= FMODE_SETENC_BY_BOM;
estr += 4;
len -= 4;
memcpy(encname, estr, len);
@@ -5016,7 +4883,6 @@ parse_mode_enc(const char *estr, rb_encoding **enc_p, rb_encoding **enc2_p, int
}
idx = rb_enc_find_index(estr);
}
- if (fmode_p) *fmode_p = fmode;
if (idx >= 0)
ext_enc = rb_enc_from_index(idx);
@@ -5036,7 +4902,7 @@ parse_mode_enc(const char *estr, rb_encoding **enc_p, rb_encoding **enc2_p, int
idx2 = rb_enc_find_index(p);
if (idx2 < 0)
unsupported_encoding(p);
- else if (!(fmode & FMODE_SETENC_BY_BOM) && (idx2 == idx)) {
+ else if (idx2 == idx) {
int_enc = (rb_encoding *)Qnil;
}
else
@@ -5044,7 +4910,7 @@ parse_mode_enc(const char *estr, rb_encoding **enc_p, rb_encoding **enc2_p, int
}
}
- rb_io_ext_int_to_encs(ext_enc, int_enc, enc_p, enc2_p, fmode);
+ rb_io_ext_int_to_encs(ext_enc, int_enc, enc_p, enc2_p);
}
int
@@ -5105,12 +4971,12 @@ rb_io_extract_encoding_option(VALUE opt, rb_encoding **enc_p, rb_encoding **enc2
parse_mode_enc(StringValueCStr(tmp), enc_p, enc2_p, fmode_p);
}
else {
- rb_io_ext_int_to_encs(rb_to_encoding(encoding), NULL, enc_p, enc2_p, 0);
+ rb_io_ext_int_to_encs(rb_to_encoding(encoding), NULL, enc_p, enc2_p);
}
}
else if (extenc != Qundef || intenc != Qundef) {
extracted = 1;
- rb_io_ext_int_to_encs(extencoding, intencoding, enc_p, enc2_p, 0);
+ rb_io_ext_int_to_encs(extencoding, intencoding, enc_p, enc2_p);
}
return extracted;
}
@@ -5150,8 +5016,6 @@ extract_binmode(VALUE opthash, int *fmode)
if (!NIL_P(v)) {
if (*fmode & FMODE_TEXTMODE)
rb_raise(rb_eArgError, "textmode specified twice");
- if (*fmode & FMODE_BINMODE)
- rb_raise(rb_eArgError, "both textmode and binmode specified");
if (RTEST(v))
*fmode |= FMODE_TEXTMODE;
}
@@ -5159,8 +5023,6 @@ extract_binmode(VALUE opthash, int *fmode)
if (!NIL_P(v)) {
if (*fmode & FMODE_BINMODE)
rb_raise(rb_eArgError, "binmode specified twice");
- if (*fmode & FMODE_TEXTMODE)
- rb_raise(rb_eArgError, "both textmode and binmode specified");
if (RTEST(v))
*fmode |= FMODE_BINMODE;
}
@@ -5185,7 +5047,7 @@ rb_io_extract_modeenc(VALUE *vmode_p, VALUE *vperm_p, VALUE opthash,
vmode = *vmode_p;
/* Set to defaults */
- rb_io_ext_int_to_encs(NULL, NULL, &enc, &enc2, 0);
+ rb_io_ext_int_to_encs(NULL, NULL, &enc, &enc2);
vmode_handle:
if (NIL_P(vmode)) {
@@ -5213,7 +5075,7 @@ rb_io_extract_modeenc(VALUE *vmode_p, VALUE *vperm_p, VALUE opthash,
rb_encoding *e;
e = (fmode & FMODE_BINMODE) ? rb_ascii8bit_encoding() : NULL;
- rb_io_ext_int_to_encs(e, NULL, &enc, &enc2, fmode);
+ rb_io_ext_int_to_encs(e, NULL, &enc, &enc2);
}
}
@@ -5237,7 +5099,7 @@ rb_io_extract_modeenc(VALUE *vmode_p, VALUE *vperm_p, VALUE opthash,
oflags |= O_BINARY;
#endif
if (!has_enc)
- rb_io_ext_int_to_encs(rb_ascii8bit_encoding(), NULL, &enc, &enc2, fmode);
+ rb_io_ext_int_to_encs(rb_ascii8bit_encoding(), NULL, &enc, &enc2);
}
#if DEFAULT_TEXTMODE
else if (NIL_P(vmode)) {
@@ -5414,7 +5276,7 @@ io_strip_bom(VALUE io)
case INT2FIX(0xFE):
if (NIL_P(b2 = rb_io_getbyte(io))) break;
if (b2 == INT2FIX(0xFF)) {
- return ENCINDEX_UTF_16BE;
+ return rb_enc_find_index("UTF-16BE");
}
rb_io_ungetbyte(io, b2);
break;
@@ -5425,14 +5287,14 @@ io_strip_bom(VALUE io)
b3 = rb_io_getbyte(io);
if (b3 == INT2FIX(0) && !NIL_P(b4 = rb_io_getbyte(io))) {
if (b4 == INT2FIX(0)) {
- return ENCINDEX_UTF_32LE;
+ return rb_enc_find_index("UTF-32LE");
}
rb_io_ungetbyte(io, b4);
rb_io_ungetbyte(io, b3);
}
else {
rb_io_ungetbyte(io, b3);
- return ENCINDEX_UTF_16LE;
+ return rb_enc_find_index("UTF-16LE");
}
}
rb_io_ungetbyte(io, b2);
@@ -5443,7 +5305,7 @@ io_strip_bom(VALUE io)
if (b2 == INT2FIX(0) && !NIL_P(b3 = rb_io_getbyte(io))) {
if (b3 == INT2FIX(0xFE) && !NIL_P(b4 = rb_io_getbyte(io))) {
if (b4 == INT2FIX(0xFF)) {
- return ENCINDEX_UTF_32BE;
+ return rb_enc_find_index("UTF-32BE");
}
rb_io_ungetbyte(io, b4);
}
@@ -5460,16 +5322,13 @@ static void
io_set_encoding_by_bom(VALUE io)
{
int idx = io_strip_bom(io);
- rb_io_t *fptr;
- GetOpenFile(io, fptr);
if (idx) {
+ rb_io_t *fptr;
+ GetOpenFile(io, fptr);
io_encoding_set(fptr, rb_enc_from_encoding(rb_enc_from_index(idx)),
rb_io_internal_encoding(io), Qnil);
}
- else {
- fptr->encs.enc2 = NULL;
- }
}
static VALUE
@@ -5479,7 +5338,7 @@ rb_file_open_generic(VALUE io, VALUE filename, int oflags, int fmode, convconfig
convconfig_t cc;
if (!convconfig) {
/* Set to default encodings */
- rb_io_ext_int_to_encs(NULL, NULL, &cc.enc, &cc.enc2, fmode);
+ rb_io_ext_int_to_encs(NULL, NULL, &cc.enc, &cc.enc2);
cc.ecflags = 0;
cc.ecopts = Qnil;
convconfig = &cc;
@@ -5513,7 +5372,7 @@ rb_file_open_internal(VALUE io, VALUE filename, const char *modestr)
/* Set to default encodings */
e = (fmode & FMODE_BINMODE) ? rb_ascii8bit_encoding() : NULL;
- rb_io_ext_int_to_encs(e, NULL, &convconfig.enc, &convconfig.enc2, fmode);
+ rb_io_ext_int_to_encs(e, NULL, &convconfig.enc, &convconfig.enc2);
convconfig.ecflags = 0;
convconfig.ecopts = Qnil;
}
@@ -5642,8 +5501,8 @@ rb_pipe(int *pipes)
#ifdef _WIN32
#define HAVE_SPAWNV 1
-#define spawnv(mode, cmd, args) rb_w32_uaspawn((mode), (cmd), (args))
-#define spawn(mode, cmd) rb_w32_uspawn((mode), (cmd), 0)
+#define spawnv(mode, cmd, args) rb_w32_aspawn((mode), (cmd), (args))
+#define spawn(mode, cmd) rb_w32_spawn((mode), (cmd), 0)
#endif
#if defined(HAVE_FORK) || defined(HAVE_SPAWNV)
@@ -5735,7 +5594,7 @@ void
rb_close_before_exec(int lowfd, int maxhint, VALUE noclose_fds)
{
int fd, ret;
- int max = (int)max_file_descriptor;
+ int max = max_file_descriptor;
#ifdef F_MAXFD
/* F_MAXFD is available since NetBSD 2.0. */
ret = fcntl(0, F_MAXFD); /* async-signal-safe */
@@ -5804,9 +5663,7 @@ pipe_open(VALUE execarg_obj, const char *modestr, int fmode, convconfig_t *convc
# endif
# if !defined(HAVE_FORK)
char **args = NULL;
-# if defined(HAVE_SPAWNVE)
char **envp = NULL;
-# endif
# endif
#endif
#if !defined(HAVE_FORK)
@@ -5874,9 +5731,7 @@ pipe_open(VALUE execarg_obj, const char *modestr, int fmode, convconfig_t *convc
pid = rb_fork_async_signal_safe(&status, popen_exec, &arg, arg.eargp->redirect_fds, errmsg, sizeof(errmsg));
# else
rb_execarg_run_options(eargp, sargp, NULL, 0);
-# if defined(HAVE_SPAWNVE)
if (eargp->envp_str) envp = (char **)RSTRING_PTR(eargp->envp_str);
-# endif
while ((pid = DO_SPAWN(cmd, args, envp)) == -1) {
/* exec failed */
switch (e = errno) {
@@ -6144,7 +5999,7 @@ rb_io_s_popen(int argc, VALUE *argv, VALUE klass)
}
#endif
tmp = rb_ary_dup(tmp);
- RBASIC_CLEAR_CLASS(tmp);
+ RBASIC(tmp)->klass = 0;
execarg_obj = rb_execarg_new((int)len, RARRAY_PTR(tmp), FALSE);
rb_ary_clear(tmp);
}
@@ -6174,7 +6029,7 @@ rb_io_s_popen(int argc, VALUE *argv, VALUE klass)
}
return Qnil;
}
- RBASIC_SET_CLASS(port, klass);
+ RBASIC(port)->klass = klass;
if (rb_block_given_p()) {
return rb_ensure(rb_yield, port, io_close, port);
}
@@ -6182,7 +6037,7 @@ rb_io_s_popen(int argc, VALUE *argv, VALUE klass)
}
static void
-rb_scan_open_args(int argc, const VALUE *argv,
+rb_scan_open_args(int argc, VALUE *argv,
VALUE *fname_p, int *oflags_p, int *fmode_p,
convconfig_t *convconfig_p, mode_t *perm_p)
{
@@ -6204,7 +6059,7 @@ rb_scan_open_args(int argc, const VALUE *argv,
}
static VALUE
-rb_open_file(int argc, const VALUE *argv, VALUE io)
+rb_open_file(int argc, VALUE *argv, VALUE io)
{
VALUE fname;
int oflags, fmode;
@@ -6475,7 +6330,7 @@ rb_io_open(VALUE filename, VALUE vmode, VALUE vperm, VALUE opt)
}
static VALUE
-rb_io_open_with_args(int argc, const VALUE *argv)
+rb_io_open_with_args(int argc, VALUE *argv)
{
VALUE io;
@@ -6492,6 +6347,10 @@ io_reopen(VALUE io, VALUE nfile)
off_t pos = 0;
nfile = rb_io_get_io(nfile);
+ if (rb_safe_level() >= 4 &&
+ (!OBJ_UNTRUSTED(io) || !OBJ_UNTRUSTED(nfile))) {
+ rb_raise(rb_eSecurityError, "Insecure: can't reopen");
+ }
GetOpenFile(io, fptr);
GetOpenFile(nfile, orig);
@@ -6566,7 +6425,7 @@ io_reopen(VALUE io, VALUE nfile)
rb_io_binmode(io);
}
- RBASIC_SET_CLASS(io, rb_obj_class(nfile));
+ RBASIC(io)->klass = rb_obj_class(nfile);
return io;
}
@@ -6593,6 +6452,7 @@ rb_io_reopen(int argc, VALUE *argv, VALUE file)
int oflags;
rb_io_t *fptr;
+ rb_secure(4);
if (rb_scan_args(argc, argv, "11:", &fname, &nmode, &opt) == 1) {
VALUE tmp = rb_io_check_io(fname);
if (!NIL_P(tmp)) {
@@ -6649,26 +6509,22 @@ rb_io_reopen(int argc, VALUE *argv, VALUE file)
rb_fd_fix_cloexec(fptr->fd);
#ifdef USE_SETVBUF
if (setvbuf(fptr->stdio_file, NULL, _IOFBF, 0) != 0)
- rb_warn("setvbuf() can't be honoured for %"PRIsVALUE, fptr->pathv);
+ rb_warn("setvbuf() can't be honoured for %s", RSTRING_PTR(fptr->pathv));
#endif
if (fptr->stdio_file == stderr) {
if (setvbuf(fptr->stdio_file, NULL, _IONBF, BUFSIZ) != 0)
- rb_warn("setvbuf() can't be honoured for %"PRIsVALUE, fptr->pathv);
+ rb_warn("setvbuf() can't be honoured for %s", RSTRING_PTR(fptr->pathv));
}
else if (fptr->stdio_file == stdout && isatty(fptr->fd)) {
if (setvbuf(fptr->stdio_file, NULL, _IOLBF, BUFSIZ) != 0)
- rb_warn("setvbuf() can't be honoured for %"PRIsVALUE, fptr->pathv);
+ rb_warn("setvbuf() can't be honoured for %s", RSTRING_PTR(fptr->pathv));
}
}
else {
- int tmpfd = rb_sysopen(fptr->pathv, oflags, 0666);
- int err = 0;
- if (rb_cloexec_dup2(tmpfd, fptr->fd) < 0)
- err = errno;
- (void)close(tmpfd);
- if (err) {
- rb_syserr_fail_path(err, fptr->pathv);
- }
+ if (close(fptr->fd) < 0)
+ rb_sys_fail_path(fptr->pathv);
+ fptr->fd = -1;
+ fptr->fd = rb_sysopen(fptr->pathv, oflags, 0666);
}
return file;
@@ -6743,9 +6599,9 @@ rb_io_printf(int argc, VALUE *argv, VALUE out)
* printf(string [, obj ... ]) -> nil
*
* Equivalent to:
- * io.write(sprintf(string, obj, ...))
+ * io.write(sprintf(string, obj, ...)
* or
- * $stdout.write(sprintf(string, obj, ...))
+ * $stdout.write(sprintf(string, obj, ...)
*/
static VALUE
@@ -6928,7 +6784,7 @@ io_puts_ary(VALUE ary, VALUE out, int recur)
ary = rb_check_array_type(ary);
if (NIL_P(ary)) return Qfalse;
for (i=0; i<RARRAY_LEN(ary); i++) {
- tmp = RARRAY_AREF(ary, i);
+ tmp = RARRAY_PTR(ary)[i];
rb_io_puts(1, &tmp, out);
}
return Qtrue;
@@ -7388,6 +7244,7 @@ rb_io_initialize(int argc, VALUE *argv, VALUE io)
struct stat st;
#endif
+ rb_secure(4);
argc = rb_scan_args(argc, argv, "11:", &fnum, &vmode, &opt);
rb_io_extract_modeenc(&vmode, 0, opt, &oflags, &fmode, &convconfig);
@@ -7515,6 +7372,7 @@ static VALUE
rb_io_autoclose_p(VALUE io)
{
rb_io_t *fptr;
+ rb_secure(4);
GetOpenFile(io, fptr);
return (fptr->mode & FMODE_PREP) ? Qfalse : Qtrue;
}
@@ -7540,6 +7398,7 @@ static VALUE
rb_io_set_autoclose(VALUE io, VALUE autoclose)
{
rb_io_t *fptr;
+ rb_secure(4);
GetOpenFile(io, fptr);
if (!RTEST(autoclose))
fptr->mode |= FMODE_PREP;
@@ -7579,7 +7438,6 @@ argf_memsize(const void *ptr)
static const rb_data_type_t argf_type = {
"ARGF",
{argf_mark, argf_free, argf_memsize},
- NULL, NULL, RUBY_TYPED_FREE_IMMEDIATELY
};
static inline void
@@ -7692,15 +7550,13 @@ argf_forward(int argc, VALUE *argv, VALUE argf)
} while (0)
static void
-argf_close(VALUE argf)
+argf_close(VALUE file)
{
- VALUE file = ARGF.current_file;
if (file == rb_stdin) return;
if (RB_TYPE_P(file, T_FILE)) {
rb_io_set_write_io(file, Qnil);
}
rb_funcall3(file, rb_intern("close"), 0, 0);
- ARGF.init_p = -1;
}
static int
@@ -7865,7 +7721,6 @@ argf_next_argv(VALUE argf)
rb_stdout = orig_stdout;
}
}
- if (ARGF.init_p == -1) ARGF.init_p = 1;
return TRUE;
}
@@ -7888,7 +7743,7 @@ argf_getline(int argc, VALUE *argv, VALUE argf)
line = rb_io_getline(argc, argv, ARGF.current_file);
}
if (NIL_P(line) && ARGF.next_p != -1) {
- argf_close(argf);
+ argf_close(ARGF.current_file);
ARGF.next_p = 1;
goto retry;
}
@@ -7961,16 +7816,16 @@ rb_f_gets(int argc, VALUE *argv, VALUE recv)
/*
* call-seq:
- * ARGF.gets(sep=$/) -> string or nil
- * ARGF.gets(limit) -> string or nil
- * ARGF.gets(sep, limit) -> string or nil
+ * ARGF.gets(sep=$/) -> string
+ * ARGF.gets(limit) -> string
+ * ARGF.gets(sep, limit) -> string
*
* Returns the next line from the current file in +ARGF+.
*
* By default lines are assumed to be separated by +$/+; to use a different
* character as a separator, supply it as a +String+ for the _sep_ argument.
*
- * The optional _limit_ argument specifies how many characters of each line
+ * The optional _limit_ argument specifies how many characters of each line
* to return. By default all characters are returned.
*
*/
@@ -8114,7 +7969,7 @@ argf_readlines(int argc, VALUE *argv, VALUE argf)
}
else {
lines = rb_io_readlines(argc, argv, ARGF.current_file);
- argf_close(argf);
+ argf_close(ARGF.current_file);
}
ARGF.next_p = 1;
rb_ary_concat(ary, lines);
@@ -8176,7 +8031,7 @@ select_internal(VALUE read, VALUE write, VALUE except, struct timeval *tp, rb_fd
if (!NIL_P(read)) {
Check_Type(read, T_ARRAY);
for (i=0; i<RARRAY_LEN(read); i++) {
- GetOpenFile(rb_io_get_io(RARRAY_AREF(read, i)), fptr);
+ GetOpenFile(rb_io_get_io(RARRAY_PTR(read)[i]), fptr);
rb_fd_set(fptr->fd, &fds[0]);
if (READ_DATA_PENDING(fptr) || READ_CHAR_PENDING(fptr)) { /* check for buffered data */
pending++;
@@ -8196,7 +8051,7 @@ select_internal(VALUE read, VALUE write, VALUE except, struct timeval *tp, rb_fd
if (!NIL_P(write)) {
Check_Type(write, T_ARRAY);
for (i=0; i<RARRAY_LEN(write); i++) {
- VALUE write_io = GetWriteIO(rb_io_get_io(RARRAY_AREF(write, i)));
+ VALUE write_io = GetWriteIO(rb_io_get_io(RARRAY_PTR(write)[i]));
GetOpenFile(write_io, fptr);
rb_fd_set(fptr->fd, &fds[1]);
if (max < fptr->fd) max = fptr->fd;
@@ -8209,7 +8064,7 @@ select_internal(VALUE read, VALUE write, VALUE except, struct timeval *tp, rb_fd
if (!NIL_P(except)) {
Check_Type(except, T_ARRAY);
for (i=0; i<RARRAY_LEN(except); i++) {
- VALUE io = rb_io_get_io(RARRAY_AREF(except, i));
+ VALUE io = rb_io_get_io(RARRAY_PTR(except)[i]);
VALUE write_io = GetWriteIO(io);
GetOpenFile(io, fptr);
rb_fd_set(fptr->fd, &fds[2]);
@@ -8240,7 +8095,7 @@ select_internal(VALUE read, VALUE write, VALUE except, struct timeval *tp, rb_fd
rb_ary_push(res, ep?rb_ary_new():rb_ary_new2(0));
if (rp) {
- list = RARRAY_AREF(res, 0);
+ list = RARRAY_PTR(res)[0];
for (i=0; i< RARRAY_LEN(read); i++) {
VALUE obj = rb_ary_entry(read, i);
VALUE io = rb_io_get_io(obj);
@@ -8253,7 +8108,7 @@ select_internal(VALUE read, VALUE write, VALUE except, struct timeval *tp, rb_fd
}
if (wp) {
- list = RARRAY_AREF(res, 1);
+ list = RARRAY_PTR(res)[1];
for (i=0; i< RARRAY_LEN(write); i++) {
VALUE obj = rb_ary_entry(write, i);
VALUE io = rb_io_get_io(obj);
@@ -8266,7 +8121,7 @@ select_internal(VALUE read, VALUE write, VALUE except, struct timeval *tp, rb_fd
}
if (ep) {
- list = RARRAY_AREF(res, 2);
+ list = RARRAY_PTR(res)[2];
for (i=0; i< RARRAY_LEN(except); i++) {
VALUE obj = rb_ary_entry(except, i);
VALUE io = rb_io_get_io(obj);
@@ -8425,18 +8280,18 @@ advice_arg_check(VALUE advice)
* specific pattern. On platforms that do not support the
* <em>posix_fadvise(2)</em> system call, this method is a no-op.
*
- * _advice_ is one of the following symbols:
+ * _advice_ is one of the following symbols:
*
- * :normal:: No advice to give; the default assumption for an open file.
- * :sequential:: The data will be accessed sequentially
- * with lower offsets read before higher ones.
- * :random:: The data will be accessed in random order.
- * :willneed:: The data will be accessed in the near future.
- * :dontneed:: The data will not be accessed in the near future.
- * :noreuse:: The data will only be accessed once.
+ * * :normal - No advice to give; the default assumption for an open file.
+ * * :sequential - The data will be accessed sequentially:
+ * with lower offsets read before higher ones.
+ * * :random - The data will be accessed in random order.
+ * * :willneed - The data will be accessed in the near future.
+ * * :dontneed - The data will not be accessed in the near future.
+ * * :noreuse - The data will only be accessed once.
*
- * The semantics of a piece of advice are platform-dependent. See
- * <em>man 2 posix_fadvise</em> for details.
+ * The semantics of a piece of advice are platform-dependent. See
+ * <em>man 2 posix_fadvise</em> for details.
*
* "data" means the region of the current file that begins at
* _offset_ and extends for _len_ bytes. If _len_ is 0, the region
@@ -8445,19 +8300,18 @@ advice_arg_check(VALUE advice)
*
* If an error occurs, one of the following exceptions will be raised:
*
- * <code>IOError</code>:: The <code>IO</code> stream is closed.
- * <code>Errno::EBADF</code>::
- * The file descriptor of the current file is invalid.
- * <code>Errno::EINVAL</code>:: An invalid value for _advice_ was given.
- * <code>Errno::ESPIPE</code>::
- * The file descriptor of the current file refers to a FIFO or
- * pipe. (Linux raises <code>Errno::EINVAL</code> in this case).
- * <code>TypeError</code>::
- * Either _advice_ was not a Symbol, or one of the
- * other arguments was not an <code>Integer</code>.
- * <code>RangeError</code>:: One of the arguments given was too big/small.
+ * * <code>IOError</code> - The <code>IO</code> stream is closed.
+ * * <code>Errno::EBADF</code> - The file descriptor of the current file is
+ invalid.
+ * * <code>Errno::EINVAL</code> - An invalid value for _advice_ was given.
+ * * <code>Errno::ESPIPE</code> - The file descriptor of the current
+ * * file refers to a FIFO or pipe. (Linux raises <code>Errno::EINVAL</code>
+ * * in this case).
+ * * <code>TypeError</code> - Either _advice_ was not a Symbol, or one of the
+ other arguments was not an <code>Integer</code>.
+ * * <code>RangeError</code> - One of the arguments given was too big/small.
*
- * This list is not exhaustive; other Errno:: exceptions are also possible.
+ * This list is not exhaustive; other Errno:: exceptions are also possible.
*/
static VALUE
rb_io_advise(int argc, VALUE *argv, VALUE io)
@@ -8493,103 +8347,11 @@ rb_io_advise(int argc, VALUE *argv, VALUE io)
* Calls select(2) system call.
* It monitors given arrays of <code>IO</code> objects, waits one or more
* of <code>IO</code> objects ready for reading, are ready for writing,
- * and have pending exceptions respectively, and returns an array that
+ * and have pending exceptions respectably, and returns an array that
* contains arrays of those IO objects. It will return <code>nil</code>
* if optional <i>timeout</i> value is given and no <code>IO</code> object
* is ready in <i>timeout</i> seconds.
*
- * <code>IO.select</code> peeks the buffer of <code>IO</code> objects for testing readability.
- * If the <code>IO</code> buffer is not empty,
- * <code>IO.select</code> immediately notify readability.
- * This "peek" is only happen for <code>IO</code> objects.
- * It is not happen for IO-like objects such as OpenSSL::SSL::SSLSocket.
- *
- * The best way to use <code>IO.select</code> is invoking it
- * after nonblocking methods such as <code>read_nonblock</code>, <code>write_nonblock</code>, etc.
- * The methods raises an exception which is extended by
- * <code>IO::WaitReadable</code> or <code>IO::WaitWritable</code>.
- * The modules notify how the caller should wait with <code>IO.select</code>.
- * If <code>IO::WaitReadable</code> is raised, the caller should wait for reading.
- * If <code>IO::WaitWritable</code> is raised, the caller should wait for writing.
- *
- * So, blocking read (<code>readpartial</code>) can be emulated using
- * <code>read_nonblock</code> and <code>IO.select</code> as follows:
- *
- * begin
- * result = io_like.read_nonblock(maxlen)
- * rescue IO::WaitReadable
- * IO.select([io_like])
- * retry
- * rescue IO::WaitWritable
- * IO.select(nil, [io_like])
- * retry
- * end
- *
- * Especially, the combination of nonblocking methods and
- * <code>IO.select</code> is preferred for <code>IO</code> like
- * objects such as <code>OpenSSL::SSL::SSLSocket</code>.
- * It has <code>to_io</code> method to return underlying <code>IO</code> object.
- * <code>IO.select</code> calls <code>to_io</code> to obtain the file descriptor to wait.
- *
- * This means that readability notified by <code>IO.select</code> doesn't mean
- * readability from <code>OpenSSL::SSL::SSLSocket</code> object.
- *
- * Most possible situation is <code>OpenSSL::SSL::SSLSocket</code> buffers some data.
- * <code>IO.select</code> doesn't see the buffer.
- * So <code>IO.select</code> can block when <code>OpenSSL::SSL::SSLSocket#readpartial</code> doesn't block.
- *
- * However several more complicated situation exists.
- *
- * SSL is a protocol which is sequence of records.
- * The record consists multiple bytes.
- * So, the remote side of SSL sends a partial record,
- * <code>IO.select</code> notifies readability but
- * <code>OpenSSL::SSL::SSLSocket</code> cannot decrypt a byte and
- * <code>OpenSSL::SSL::SSLSocket#readpartial</code> will blocks.
- *
- * Also, the remote side can request SSL renegotiation which forces
- * the local SSL engine writes some data.
- * This means <code>OpenSSL::SSL::SSLSocket#readpartial</code> may
- * invoke <code>write</code> system call and it can block.
- * In such situation, <code>OpenSSL::SSL::SSLSocket#read_nonblock</code>
- * raises IO::WaitWritable instead of blocking.
- * So, the caller should wait for ready for writability as above example.
- *
- * The combination of nonblocking methods and <code>IO.select</code> is
- * also useful for streams such as tty, pipe socket socket when
- * multiple process read form a stream.
- *
- * Finally, Linux kernel developers doesn't guarantee that
- * readability of select(2) means readability of following read(2) even
- * for single process.
- * See select(2) manual on GNU/Linux system.
- *
- * Invoking <code>IO.select</code> before <code>IO#readpartial</code> works well in usual.
- * However it is not the best way to use <code>IO.select</code>.
- *
- * The writability notified by select(2) doesn't show
- * how many bytes writable.
- * <code>IO#write</code> method blocks until given whole string is written.
- * So, <code>IO#write(two or more bytes)</code> can block after writability is notified by <code>IO.select</code>.
- * <code>IO#write_nonblock</code> is required to avoid the blocking.
- *
- * Blocking write (<code>write</code>) can be emulated using
- * <code>write_nonblock</code> and <code>IO.select</code> as follows:
- * IO::WaitReadable should also be rescued for SSL renegotiation in <code>OpenSSL::SSL::SSLSocket</code>.
- *
- * while 0 < string.bytesize
- * begin
- * written = io_like.write_nonblock(string)
- * rescue IO::WaitReadable
- * IO.select([io_like])
- * retry
- * rescue IO::WaitWritable
- * IO.select(nil, [io_like])
- * retry
- * end
- * string = string.byteslice(written..-1)
- * end
- *
* === Parameters
* read_array:: an array of <code>IO</code> objects that wait until ready for read
* write_array:: an array of <code>IO</code> objects that wait until ready for write
@@ -8601,7 +8363,6 @@ rb_io_advise(int argc, VALUE *argv, VALUE io)
* rp, wp = IO.pipe
* mesg = "ping "
* 100.times {
- * # IO.select follows IO#read. Not the best way to use IO.select.
* rs, ws, = IO.select([rp], [wp])
* if r = rs[0]
* ret = r.read(5)
@@ -8689,7 +8450,7 @@ do_ioctl(int fd, ioctl_req_t cmd, long narg)
#define DEFULT_IOCTL_NARG_LEN (256)
-#if defined(__linux__) && defined(_IOC_SIZE)
+#ifdef __linux__
static long
linux_iocparm_len(ioctl_req_t cmd)
{
@@ -8722,7 +8483,7 @@ ioctl_narg_len(ioctl_req_t cmd)
#endif
#ifdef IOCPARM_LEN
len = IOCPARM_LEN(cmd); /* on BSDish systems we're safe */
-#elif defined(__linux__) && defined(_IOC_SIZE)
+#elif defined(__linux__)
len = linux_iocparm_len(cmd);
#else
/* otherwise guess at what's safe */
@@ -9262,7 +9023,7 @@ io_encoding_set(rb_io_t *fptr, VALUE v1, VALUE v2, VALUE opt)
else {
if (NIL_P(v1)) {
/* Set to default encodings */
- rb_io_ext_int_to_encs(NULL, NULL, &enc, &enc2, 0);
+ rb_io_ext_int_to_encs(NULL, NULL, &enc, &enc2);
SET_UNIVERSAL_NEWLINE_DECORATOR_IF_ENC2(enc2, ecflags);
ecopts = Qnil;
}
@@ -9274,7 +9035,7 @@ io_encoding_set(rb_io_t *fptr, VALUE v1, VALUE v2, VALUE opt)
ecflags = rb_econv_prepare_options(opt, &ecopts, ecflags);
}
else {
- rb_io_ext_int_to_encs(find_encoding(v1), NULL, &enc, &enc2, 0);
+ rb_io_ext_int_to_encs(find_encoding(v1), NULL, &enc, &enc2);
SET_UNIVERSAL_NEWLINE_DECORATOR_IF_ENC2(enc2, ecflags);
ecopts = Qnil;
}
@@ -9459,7 +9220,7 @@ open_key_args(int argc, VALUE *argv, VALUE opt, struct foreach_arg *arg)
args = rb_ary_tmp_new(n);
rb_ary_push(args, path);
rb_ary_concat(args, v);
- arg->io = rb_io_open_with_args((int)n, RARRAY_CONST_PTR(args));
+ arg->io = rb_io_open_with_args((int)n, RARRAY_PTR(args));
rb_ary_clear(args); /* prevent from GC */
return;
}
@@ -10266,31 +10027,31 @@ static VALUE
copy_stream_body(VALUE arg)
{
struct copy_stream_struct *stp = (struct copy_stream_struct *)arg;
- VALUE src_io = stp->src, dst_io = stp->dst;
+ VALUE src_io, dst_io;
rb_io_t *src_fptr = 0, *dst_fptr = 0;
int src_fd, dst_fd;
- const int common_oflags = 0
-#ifdef O_NOCTTY
- | O_NOCTTY
-#endif
- ;
stp->th = rb_thread_current();
stp->total = 0;
- if (src_io == argf ||
- !(RB_TYPE_P(src_io, T_FILE) ||
- RB_TYPE_P(src_io, T_STRING) ||
- rb_respond_to(src_io, rb_intern("to_path")))) {
+ if (stp->src == argf ||
+ !(RB_TYPE_P(stp->src, T_FILE) ||
+ RB_TYPE_P(stp->src, T_STRING) ||
+ rb_respond_to(stp->src, rb_intern("to_path")))) {
src_fd = -1;
}
else {
- if (!RB_TYPE_P(src_io, T_FILE)) {
+ src_io = RB_TYPE_P(stp->src, T_FILE) ? stp->src : Qnil;
+ if (NIL_P(src_io)) {
VALUE args[2];
- FilePathValue(src_io);
- args[0] = src_io;
- args[1] = INT2NUM(O_RDONLY|common_oflags);
+ int oflags = O_RDONLY;
+#ifdef O_NOCTTY
+ oflags |= O_NOCTTY;
+#endif
+ FilePathValue(stp->src);
+ args[0] = stp->src;
+ args[1] = INT2NUM(oflags);
src_io = rb_class_new_instance(2, args, rb_cFile);
stp->src = src_io;
stp->close_src = 1;
@@ -10301,18 +10062,23 @@ copy_stream_body(VALUE arg)
}
stp->src_fd = src_fd;
- if (dst_io == argf ||
- !(RB_TYPE_P(dst_io, T_FILE) ||
- RB_TYPE_P(dst_io, T_STRING) ||
- rb_respond_to(dst_io, rb_intern("to_path")))) {
+ if (stp->dst == argf ||
+ !(RB_TYPE_P(stp->dst, T_FILE) ||
+ RB_TYPE_P(stp->dst, T_STRING) ||
+ rb_respond_to(stp->dst, rb_intern("to_path")))) {
dst_fd = -1;
}
else {
- if (!RB_TYPE_P(dst_io, T_FILE)) {
+ dst_io = RB_TYPE_P(stp->dst, T_FILE) ? stp->dst : Qnil;
+ if (NIL_P(dst_io)) {
VALUE args[3];
- FilePathValue(dst_io);
- args[0] = dst_io;
- args[1] = INT2NUM(O_WRONLY|O_CREAT|O_TRUNC|common_oflags);
+ int oflags = O_WRONLY|O_CREAT|O_TRUNC;
+#ifdef O_NOCTTY
+ oflags |= O_NOCTTY;
+#endif
+ FilePathValue(stp->dst);
+ args[0] = stp->dst;
+ args[1] = INT2NUM(oflags);
args[2] = INT2FIX(0666);
dst_io = rb_class_new_instance(3, args, rb_cFile);
stp->dst = dst_io;
@@ -10331,9 +10097,9 @@ copy_stream_body(VALUE arg)
#ifdef O_BINARY
if (src_fptr)
SET_BINARY_MODE_WITH_SEEK_CUR(src_fptr);
-#endif
if (dst_fptr)
- io_ascii8bit_binmode(dst_fptr);
+ setmode(dst_fd, O_BINARY);
+#endif
if (stp->src_offset == (off_t)-1 && src_fptr && src_fptr->rbuf.len) {
size_t len = src_fptr->rbuf.len;
@@ -10349,7 +10115,7 @@ copy_stream_body(VALUE arg)
rb_sys_fail(0);
}
else /* others such as StringIO */
- rb_io_write(dst_io, str);
+ rb_io_write(stp->dst, str);
stp->total += len;
if (stp->copy_length != (off_t)-1)
stp->copy_length -= len;
@@ -10856,7 +10622,7 @@ argf_read(int argc, VALUE *argv, VALUE argf)
else if (!NIL_P(tmp)) rb_str_append(str, tmp);
if (NIL_P(tmp) || NIL_P(length)) {
if (ARGF.next_p != -1) {
- argf_close(argf);
+ argf_close(ARGF.current_file);
ARGF.next_p = 1;
goto retry;
}
@@ -10892,19 +10658,30 @@ static VALUE argf_getpartial(int argc, VALUE *argv, VALUE argf, int nonblock);
* ARGF.readpartial(maxlen) -> string
* ARGF.readpartial(maxlen, outbuf) -> outbuf
*
- * Reads at most _maxlen_ bytes from the ARGF stream.
- *
- * If the optional _outbuf_ argument is present,
- * it must reference a String, which will receive the data.
+ * Reads at most _maxlen_ bytes from the ARGF stream. It blocks only if
+ * +ARGF+ has no data immediately available. If the optional _outbuf_
+ * argument is present, it must reference a String, which will receive the
+ * data.
* The <i>outbuf</i> will contain only the received data after the method call
* even if it is not empty at the beginning.
+ * It raises <code>EOFError</code> on end of file.
+ *
+ * +readpartial+ is designed for streams such as pipes, sockets, and ttys. It
+ * blocks only when no data is immediately available. This means that it
+ * blocks only when following all conditions hold:
+ *
+ * * The byte buffer in the +IO+ object is empty.
+ * * The content of the stream is empty.
+ * * The stream has not reached EOF.
*
- * It raises <code>EOFError</code> on end of ARGF stream.
- * Since ARGF stream is a concatenation of multiple files,
- * internally EOF is occur for each file.
- * ARGF.readpartial returns empty strings for EOFs except the last one and
- * raises <code>EOFError</code> for the last one.
+ * When +readpartial+ blocks, it waits for data or EOF. If some data is read,
+ * +readpartial+ returns with the data. If EOF is reached, readpartial raises
+ * an +EOFError+.
*
+ * When +readpartial+ doesn't block, it returns or raises immediately. If
+ * the byte buffer is not empty, it returns the data in the buffer. Otherwise, if
+ * the stream has some content, it returns the data in the stream. If the
+ * stream reaches EOF an +EOFError+ is raised.
*/
static VALUE
@@ -10951,13 +10728,13 @@ argf_getpartial(int argc, VALUE *argv, VALUE argf, int nonblock)
RUBY_METHOD_FUNC(0), Qnil, rb_eEOFError, (VALUE)0);
}
else {
- tmp = io_getpartial(argc, argv, ARGF.current_file, nonblock, 0);
+ tmp = io_getpartial(argc, argv, ARGF.current_file, nonblock);
}
if (NIL_P(tmp)) {
if (ARGF.next_p == -1) {
rb_eof_error();
}
- argf_close(argf);
+ argf_close(ARGF.current_file);
ARGF.next_p = 1;
if (RARRAY_LEN(ARGF.argv) == 0)
rb_eof_error();
@@ -11005,7 +10782,7 @@ argf_getc(VALUE argf)
ch = rb_io_getc(ARGF.current_file);
}
if (NIL_P(ch) && ARGF.next_p != -1) {
- argf_close(argf);
+ argf_close(ARGF.current_file);
ARGF.next_p = 1;
goto retry;
}
@@ -11045,7 +10822,7 @@ argf_getbyte(VALUE argf)
ch = rb_io_getbyte(ARGF.current_file);
}
if (NIL_P(ch) && ARGF.next_p != -1) {
- argf_close(argf);
+ argf_close(ARGF.current_file);
ARGF.next_p = 1;
goto retry;
}
@@ -11085,7 +10862,7 @@ argf_readchar(VALUE argf)
ch = rb_io_getc(ARGF.current_file);
}
if (NIL_P(ch) && ARGF.next_p != -1) {
- argf_close(argf);
+ argf_close(ARGF.current_file);
ARGF.next_p = 1;
goto retry;
}
@@ -11124,26 +10901,6 @@ argf_readbyte(VALUE argf)
return c;
}
-#define FOREACH_ARGF() while (next_argv())
-
-static VALUE
-argf_block_call_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, argf))
-{
- const VALUE current = ARGF.current_file;
- rb_yield_values2(argc, argv);
- if (ARGF.init_p == -1 || current != ARGF.current_file) {
- rb_iter_break_value(Qundef);
- }
- return Qnil;
-}
-
-static void
-argf_block_call(ID mid, int argc, VALUE *argv, VALUE argf)
-{
- VALUE ret = rb_block_call(ARGF.current_file, mid, argc, argv, argf_block_call_i, argf);
- if (ret != Qundef) ARGF.next_p = 1;
-}
-
/*
* call-seq:
* ARGF.each(sep=$/) {|line| block } -> ARGF
@@ -11180,10 +10937,11 @@ static VALUE
argf_each_line(int argc, VALUE *argv, VALUE argf)
{
RETURN_ENUMERATOR(argf, argc, argv);
- FOREACH_ARGF() {
- argf_block_call(rb_intern("each_line"), argc, argv, argf);
+ for (;;) {
+ if (!next_argv()) return argf;
+ rb_block_call(ARGF.current_file, rb_intern("each_line"), argc, argv, 0, 0);
+ ARGF.next_p = 1;
}
- return argf;
}
/*
@@ -11227,10 +10985,11 @@ static VALUE
argf_each_byte(VALUE argf)
{
RETURN_ENUMERATOR(argf, 0, 0);
- FOREACH_ARGF() {
- argf_block_call(rb_intern("each_byte"), 0, 0, argf);
+ for (;;) {
+ if (!next_argv()) return argf;
+ rb_block_call(ARGF.current_file, rb_intern("each_byte"), 0, 0, 0, 0);
+ ARGF.next_p = 1;
}
- return argf;
}
/*
@@ -11266,10 +11025,11 @@ static VALUE
argf_each_char(VALUE argf)
{
RETURN_ENUMERATOR(argf, 0, 0);
- FOREACH_ARGF() {
- argf_block_call(rb_intern("each_char"), 0, 0, argf);
+ for (;;) {
+ if (!next_argv()) return argf;
+ rb_block_call(ARGF.current_file, rb_intern("each_char"), 0, 0, 0, 0);
+ ARGF.next_p = 1;
}
- return argf;
}
/*
@@ -11305,10 +11065,11 @@ static VALUE
argf_each_codepoint(VALUE argf)
{
RETURN_ENUMERATOR(argf, 0, 0);
- FOREACH_ARGF() {
- argf_block_call(rb_intern("each_codepoint"), 0, 0, argf);
+ for (;;) {
+ if (!next_argv()) return argf;
+ rb_block_call(ARGF.current_file, rb_intern("each_codepoint"), 0, 0, 0, 0);
+ ARGF.next_p = 1;
}
- return argf;
}
/*
@@ -11442,7 +11203,7 @@ static VALUE
argf_skip(VALUE argf)
{
if (ARGF.init_p && ARGF.next_p == 0) {
- argf_close(argf);
+ argf_close(ARGF.current_file);
ARGF.next_p = 1;
}
return argf;
@@ -11470,7 +11231,7 @@ static VALUE
argf_close_m(VALUE argf)
{
next_argv();
- argf_close(argf);
+ argf_close(ARGF.current_file);
if (ARGF.next_p != -1) {
ARGF.next_p = 1;
}
@@ -11645,51 +11406,6 @@ argf_write(VALUE argf, VALUE str)
return rb_io_write(argf_write_io(argf), str);
}
-void
-rb_readwrite_sys_fail(int writable, const char *mesg)
-{
- VALUE arg;
- int n = errno;
- arg = mesg ? rb_str_new2(mesg) : Qnil;
- if (writable == RB_IO_WAIT_WRITABLE) {
- switch (n) {
- case EAGAIN:
- rb_exc_raise(rb_class_new_instance(1, &arg, rb_eEAGAINWaitWritable));
- break;
-#if EAGAIN != EWOULDBLOCK
- case EWOULDBLOCK:
- rb_exc_raise(rb_class_new_instance(1, &arg, rb_eEWOULDBLOCKWaitWritable));
- break;
-#endif
- case EINPROGRESS:
- rb_exc_raise(rb_class_new_instance(1, &arg, rb_eEINPROGRESSWaitWritable));
- break;
- default:
- rb_mod_sys_fail_str(rb_mWaitWritable, arg);
- }
- }
- else if (writable == RB_IO_WAIT_READABLE) {
- switch (n) {
- case EAGAIN:
- rb_exc_raise(rb_class_new_instance(1, &arg, rb_eEAGAINWaitReadable));
- break;
-#if EAGAIN != EWOULDBLOCK
- case EWOULDBLOCK:
- rb_exc_raise(rb_class_new_instance(1, &arg, rb_eEWOULDBLOCKWaitReadable));
- break;
-#endif
- case EINPROGRESS:
- rb_exc_raise(rb_class_new_instance(1, &arg, rb_eEINPROGRESSWaitReadable));
- break;
- default:
- rb_mod_sys_fail_str(rb_mWaitReadable, arg);
- }
- }
- else {
- rb_bug("invalid read/write type passed to rb_readwrite_sys_fail: %d", writable);
- }
-}
-
/*
* Document-class: IOError
*
@@ -11898,27 +11614,6 @@ Init_IO(void)
rb_mWaitReadable = rb_define_module_under(rb_cIO, "WaitReadable");
rb_mWaitWritable = rb_define_module_under(rb_cIO, "WaitWritable");
- rb_eEAGAINWaitReadable = rb_define_class_under(rb_cIO, "EAGAINWaitReadable", rb_eEAGAIN);
- rb_include_module(rb_eEAGAINWaitReadable, rb_mWaitReadable);
- rb_eEAGAINWaitWritable = rb_define_class_under(rb_cIO, "EAGAINWaitWritable", rb_eEAGAIN);
- rb_include_module(rb_eEAGAINWaitWritable, rb_mWaitWritable);
-#if EAGAIN == EWOULDBLOCK
- rb_eEWOULDBLOCKWaitReadable = rb_eEAGAINWaitReadable;
- /* same as IO::EAGAINWaitReadable */
- rb_define_const(rb_cIO, "EWOULDBLOCKWaitReadable", rb_eEAGAINWaitReadable);
- rb_eEWOULDBLOCKWaitWritable = rb_eEAGAINWaitWritable;
- /* same as IO::EAGAINWaitWritable */
- rb_define_const(rb_cIO, "EWOULDBLOCKWaitWritable", rb_eEAGAINWaitWritable);
-#else
- rb_eEWOULDBLOCKWaitReadable = rb_define_class_under(rb_cIO, "EWOULDBLOCKWaitReadable", rb_eEWOULDBLOCK);
- rb_include_module(rb_eEWOULDBLOCKWaitReadable, rb_mWaitReadable);
- rb_eEWOULDBLOCKWaitWritable = rb_define_class_under(rb_cIO, "EWOULDBLOCKWaitWritable", rb_eEWOULDBLOCK);
- rb_include_module(rb_eEWOULDBLOCKWaitWritable, rb_mWaitWritable);
-#endif
- rb_eEINPROGRESSWaitReadable = rb_define_class_under(rb_cIO, "EINPROGRESSWaitReadable", rb_eEINPROGRESS);
- rb_include_module(rb_eEINPROGRESSWaitReadable, rb_mWaitReadable);
- rb_eEINPROGRESSWaitWritable = rb_define_class_under(rb_cIO, "EINPROGRESSWaitWritable", rb_eEINPROGRESS);
- rb_include_module(rb_eEINPROGRESSWaitWritable, rb_mWaitWritable);
#if 0
/* This is necessary only for forcing rdoc handle File::open */
@@ -11993,7 +11688,7 @@ Init_IO(void)
rb_define_method(rb_cIO, "readlines", rb_io_readlines, -1);
rb_define_method(rb_cIO, "read_nonblock", io_read_nonblock, -1);
- rb_define_method(rb_cIO, "write_nonblock", rb_io_write_nonblock, -1);
+ rb_define_method(rb_cIO, "write_nonblock", rb_io_write_nonblock, 1);
rb_define_method(rb_cIO, "readpartial", io_readpartial, -1);
rb_define_method(rb_cIO, "read", io_read, -1);
rb_define_method(rb_cIO, "write", io_write_m, 1);
@@ -12009,20 +11704,9 @@ Init_IO(void)
rb_define_method(rb_cIO, "flush", rb_io_flush, 0);
rb_define_method(rb_cIO, "tell", rb_io_tell, 0);
rb_define_method(rb_cIO, "seek", rb_io_seek_m, -1);
- /* Set I/O position from the beginning */
rb_define_const(rb_cIO, "SEEK_SET", INT2FIX(SEEK_SET));
- /* Set I/O position from the current position */
rb_define_const(rb_cIO, "SEEK_CUR", INT2FIX(SEEK_CUR));
- /* Set I/O position from the end */
rb_define_const(rb_cIO, "SEEK_END", INT2FIX(SEEK_END));
-#ifdef SEEK_DATA
- /* Set I/O position to the next location containing data */
- rb_define_const(rb_cIO, "SEEK_DATA", INT2FIX(SEEK_DATA));
-#endif
-#ifdef SEEK_HOLE
- /* Set I/O position to the next hole */
- rb_define_const(rb_cIO, "SEEK_HOLE", INT2FIX(SEEK_HOLE));
-#endif
rb_define_method(rb_cIO, "rewind", rb_io_rewind, 0);
rb_define_method(rb_cIO, "pos", rb_io_tell, 0);
rb_define_method(rb_cIO, "pos=", rb_io_set_pos, 1);
@@ -12189,14 +11873,4 @@ Init_IO(void)
sym_willneed = ID2SYM(rb_intern("willneed"));
sym_dontneed = ID2SYM(rb_intern("dontneed"));
sym_noreuse = ID2SYM(rb_intern("noreuse"));
- sym_SET = ID2SYM(rb_intern("SET"));
- sym_CUR = ID2SYM(rb_intern("CUR"));
- sym_END = ID2SYM(rb_intern("END"));
-#ifdef SEEK_DATA
- sym_DATA = ID2SYM(rb_intern("DATA"));
-#endif
-#ifdef SEEK_HOLE
- sym_HOLE = ID2SYM(rb_intern("HOLE"));
-#endif
- sym_exception = ID2SYM(rb_intern("exception"));
}
diff --git a/iseq.c b/iseq.c
index 679bdb7a2d..a296544320 100644
--- a/iseq.c
+++ b/iseq.c
@@ -18,11 +18,13 @@
#include "vm_core.h"
#include "iseq.h"
+#define numberof(array) (int)(sizeof(array) / sizeof((array)[0]))
+
#include "insns.inc"
#include "insns_info.inc"
#define ISEQ_MAJOR_VERSION 2
-#define ISEQ_MINOR_VERSION 1
+#define ISEQ_MINOR_VERSION 0
VALUE rb_cISeq;
@@ -81,7 +83,7 @@ iseq_free(void *ptr)
RUBY_FREE_UNLESS_NULL(iseq->iseq);
RUBY_FREE_UNLESS_NULL(iseq->line_info_table);
RUBY_FREE_UNLESS_NULL(iseq->local_table);
- RUBY_FREE_UNLESS_NULL(iseq->is_entries);
+ RUBY_FREE_UNLESS_NULL(iseq->ic_entries);
RUBY_FREE_UNLESS_NULL(iseq->callinfo_entries);
RUBY_FREE_UNLESS_NULL(iseq->catch_table);
RUBY_FREE_UNLESS_NULL(iseq->arg_opt_table);
@@ -112,6 +114,10 @@ iseq_mark(void *ptr)
RUBY_MARK_UNLESS_NULL((VALUE)iseq->cref_stack);
RUBY_MARK_UNLESS_NULL(iseq->klass);
RUBY_MARK_UNLESS_NULL(iseq->coverage);
+#if 0
+ RUBY_MARK_UNLESS_NULL((VALUE)iseq->node);
+ RUBY_MARK_UNLESS_NULL(iseq->cached_special_block);
+#endif
RUBY_MARK_UNLESS_NULL(iseq->orig);
if (iseq->compile_data != 0) {
@@ -142,7 +148,7 @@ iseq_memsize(const void *ptr)
size += iseq->local_table_size * sizeof(ID);
size += iseq->catch_table_size * sizeof(struct iseq_catch_table_entry);
size += iseq->arg_opts * sizeof(VALUE);
- size += iseq->is_size * sizeof(union iseq_inline_storage_entry);
+ size += iseq->ic_size * sizeof(struct iseq_inline_cache_entry);
size += iseq->callinfo_size * sizeof(rb_call_info_t);
if (iseq->compile_data) {
@@ -167,9 +173,7 @@ static const rb_data_type_t iseq_data_type = {
iseq_mark,
iseq_free,
iseq_memsize,
- }, /* functions */
- NULL, NULL,
- RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED
+ },
};
static VALUE
@@ -183,21 +187,13 @@ static rb_iseq_location_t *
iseq_location_setup(rb_iseq_t *iseq, VALUE path, VALUE absolute_path, VALUE name, size_t first_lineno)
{
rb_iseq_location_t *loc = &iseq->location;
- RB_OBJ_WRITE(iseq->self, &loc->path, path);
- if (RTEST(absolute_path) && rb_str_cmp(path, absolute_path) == 0) {
- RB_OBJ_WRITE(iseq->self, &loc->absolute_path, path);
- }
- else {
- RB_OBJ_WRITE(iseq->self, &loc->absolute_path, absolute_path);
- }
- RB_OBJ_WRITE(iseq->self, &loc->label, name);
- RB_OBJ_WRITE(iseq->self, &loc->base_label, name);
+ loc->path = path;
+ loc->absolute_path = absolute_path;
+ loc->label = loc->base_label = name;
loc->first_lineno = first_lineno;
return loc;
}
-#define ISEQ_SET_CREF(iseq, cref) RB_OBJ_WRITE((iseq)->self, &(iseq)->cref_stack, (cref))
-
static void
set_relation(rb_iseq_t *iseq, const VALUE parent)
{
@@ -208,26 +204,26 @@ set_relation(rb_iseq_t *iseq, const VALUE parent)
/* set class nest stack */
if (type == ISEQ_TYPE_TOP) {
/* toplevel is private */
- RB_OBJ_WRITE(iseq->self, &iseq->cref_stack, NEW_CREF(rb_cObject));
+ iseq->cref_stack = NEW_CREF(rb_cObject);
iseq->cref_stack->nd_refinements = Qnil;
iseq->cref_stack->nd_visi = NOEX_PRIVATE;
if (th->top_wrapper) {
NODE *cref = NEW_CREF(th->top_wrapper);
cref->nd_refinements = Qnil;
cref->nd_visi = NOEX_PRIVATE;
- RB_OBJ_WRITE(cref, &cref->nd_next, iseq->cref_stack);
- ISEQ_SET_CREF(iseq, cref);
+ cref->nd_next = iseq->cref_stack;
+ iseq->cref_stack = cref;
}
iseq->local_iseq = iseq;
}
else if (type == ISEQ_TYPE_METHOD || type == ISEQ_TYPE_CLASS) {
- ISEQ_SET_CREF(iseq, NEW_CREF(0)); /* place holder */
+ iseq->cref_stack = NEW_CREF(0); /* place holder */
iseq->cref_stack->nd_refinements = Qnil;
iseq->local_iseq = iseq;
}
else if (RTEST(parent)) {
GetISeqPtr(parent, piseq);
- ISEQ_SET_CREF(iseq, piseq->cref_stack);
+ iseq->cref_stack = piseq->cref_stack;
iseq->local_iseq = piseq->local_iseq;
}
@@ -241,16 +237,6 @@ set_relation(rb_iseq_t *iseq, const VALUE parent)
}
}
-void
-rb_iseq_add_mark_object(rb_iseq_t *iseq, VALUE obj)
-{
- if (!RTEST(iseq->mark_ary)) {
- RB_OBJ_WRITE(iseq->self, &iseq->mark_ary, rb_ary_tmp_new(3));
- RBASIC_CLEAR_CLASS(iseq->mark_ary);
- }
- rb_ary_push(iseq->mark_ary, obj);
-}
-
static VALUE
prepare_iseq_build(rb_iseq_t *iseq,
VALUE name, VALUE path, VALUE absolute_path, VALUE first_lineno,
@@ -261,21 +247,22 @@ prepare_iseq_build(rb_iseq_t *iseq,
iseq->arg_rest = -1;
iseq->arg_block = -1;
iseq->arg_keyword = -1;
- RB_OBJ_WRITE(iseq->self, &iseq->klass, 0);
+ iseq->klass = 0;
set_relation(iseq, parent);
- name = rb_fstring(name);
- path = rb_fstring(path);
- if (RTEST(absolute_path))
- absolute_path = rb_fstring(absolute_path);
+ OBJ_FREEZE(name);
+ OBJ_FREEZE(path);
iseq_location_setup(iseq, path, absolute_path, name, first_lineno);
if (iseq != iseq->local_iseq) {
- RB_OBJ_WRITE(iseq->self, &iseq->location.base_label, iseq->local_iseq->location.label);
+ iseq->location.base_label = iseq->local_iseq->location.label;
}
iseq->defined_method_id = 0;
- RB_OBJ_WRITE(iseq->self, &iseq->mark_ary, 0);
+ iseq->mark_ary = rb_ary_tmp_new(3);
+ OBJ_UNTRUST(iseq->mark_ary);
+ RBASIC(iseq->mark_ary)->klass = 0;
+
/*
* iseq->special_block_builder = GC_GUARDED_PTR_REF(block_opt);
@@ -285,15 +272,15 @@ prepare_iseq_build(rb_iseq_t *iseq,
iseq->compile_data = ALLOC(struct iseq_compile_data);
MEMZERO(iseq->compile_data, struct iseq_compile_data, 1);
- RB_OBJ_WRITE(iseq->self, &iseq->compile_data->err_info, Qnil);
- RB_OBJ_WRITE(iseq->self, &iseq->compile_data->mark_ary, rb_ary_tmp_new(3));
+ iseq->compile_data->err_info = Qnil;
+ iseq->compile_data->mark_ary = rb_ary_tmp_new(3);
iseq->compile_data->storage_head = iseq->compile_data->storage_current =
(struct iseq_compile_data_storage *)
ALLOC_N(char, INITIAL_ISEQ_COMPILE_DATA_STORAGE_BUFF_SIZE +
sizeof(struct iseq_compile_data_storage));
- RB_OBJ_WRITE(iseq->self, &iseq->compile_data->catch_table_ary, rb_ary_new());
+ iseq->compile_data->catch_table_ary = rb_ary_new();
iseq->compile_data->storage_head->pos = 0;
iseq->compile_data->storage_head->next = 0;
iseq->compile_data->storage_head->size =
@@ -303,12 +290,12 @@ prepare_iseq_build(rb_iseq_t *iseq,
iseq->compile_data->option = option;
iseq->compile_data->last_coverable_line = -1;
- RB_OBJ_WRITE(iseq->self, &iseq->coverage, Qfalse);
+ iseq->coverage = Qfalse;
if (!GET_THREAD()->parse_in_eval) {
VALUE coverages = rb_get_coverages();
if (RTEST(coverages)) {
- RB_OBJ_WRITE(iseq->self, &iseq->coverage, rb_hash_lookup(coverages, path));
- if (NIL_P(iseq->coverage)) RB_OBJ_WRITE(iseq->self, &iseq->coverage, Qfalse);
+ iseq->coverage = rb_hash_lookup(coverages, path);
+ if (NIL_P(iseq->coverage)) iseq->coverage = Qfalse;
}
}
@@ -352,9 +339,7 @@ make_compile_option(rb_compile_option_t *option, VALUE opt)
*option = COMPILE_OPTION_FALSE;
}
else if (opt == Qtrue) {
- int i;
- for (i = 0; i < (int)(sizeof(rb_compile_option_t) / sizeof(int)); ++i)
- ((int *)option)[i] = 1;
+ memset(option, 1, sizeof(rb_compile_option_t));
}
else if (CLASS_OF(opt) == rb_cHash) {
*option = COMPILE_OPTION_DEFAULT;
@@ -521,7 +506,6 @@ iseq_load(VALUE self, VALUE data, VALUE parent, VALUE opt)
GetISeqPtr(iseqval, iseq);
iseq->self = iseqval;
- iseq->local_iseq = iseq;
if (type_map == 0) {
type_map = st_init_numtable();
@@ -577,6 +561,18 @@ rb_iseq_load(VALUE data, VALUE parent, VALUE opt)
return iseq_load(rb_cISeq, data, parent, opt);
}
+static NODE *
+parse_string(VALUE str, const char *file, int line)
+{
+ VALUE parser = rb_parser_new();
+ NODE *node = rb_parser_compile_string(parser, file, str, line);
+
+ if (!node) {
+ rb_exc_raise(GET_THREAD()->errinfo); /* TODO: check err */
+ }
+ return node;
+}
+
VALUE
rb_iseq_compile_with_option(VALUE src, VALUE file, VALUE absolute_path, VALUE line, rb_block_t *base_block, VALUE opt)
{
@@ -589,25 +585,17 @@ rb_iseq_compile_with_option(VALUE src, VALUE file, VALUE absolute_path, VALUE li
TH_PUSH_TAG(th);
if ((state = EXEC_TAG()) == 0) {
- VALUE parser;
int ln = NUM2INT(line);
+ const char *fn = StringValueCStr(file);
NODE *node;
rb_compile_option_t option;
- StringValueCStr(file);
make_compile_option(&option, opt);
- parser = rb_parser_new();
-
if (RB_TYPE_P((src), T_FILE))
- node = rb_parser_compile_file_path(parser, file, src, ln);
- else {
- node = rb_parser_compile_string_path(parser, file, src, ln);
-
- if (!node) {
- rb_exc_raise(GET_THREAD()->errinfo); /* TODO: check err */
- }
- }
+ node = rb_compile_file(fn, src, ln);
+ else
+ node = parse_string(StringValue(src), fn, ln);
if (base_block && base_block->iseq) {
iseqval = rb_iseq_new_with_opt(node, base_block->iseq->location.label,
@@ -845,8 +833,8 @@ iseq_inspect(VALUE self)
* > iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb')
* > iseq.path #=> /tmp/method.rb
*/
-VALUE
-rb_iseq_path(VALUE self)
+static VALUE
+iseq_path(VALUE self)
{
rb_iseq_t *iseq;
GetISeqPtr(self, iseq);
@@ -869,8 +857,8 @@ rb_iseq_path(VALUE self)
* > iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb')
* > iseq.absolute_path #=> /tmp/method.rb
*/
-VALUE
-rb_iseq_absolute_path(VALUE self)
+static VALUE
+iseq_absolute_path(VALUE self)
{
rb_iseq_t *iseq;
GetISeqPtr(self, iseq);
@@ -900,8 +888,8 @@ rb_iseq_absolute_path(VALUE self)
* > iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb')
* > iseq.label #=> <main>
*/
-VALUE
-rb_iseq_label(VALUE self)
+static VALUE
+iseq_label(VALUE self)
{
rb_iseq_t *iseq;
GetISeqPtr(self, iseq);
@@ -928,8 +916,8 @@ rb_iseq_label(VALUE self)
* > iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb')
* > iseq.base_label #=> <main>
*/
-VALUE
-rb_iseq_base_label(VALUE self)
+static VALUE
+iseq_base_label(VALUE self)
{
rb_iseq_t *iseq;
GetISeqPtr(self, iseq);
@@ -946,36 +934,14 @@ rb_iseq_base_label(VALUE self)
* iseq.first_lineno
* #=> 1
*/
-VALUE
-rb_iseq_first_lineno(VALUE self)
+static VALUE
+iseq_first_lineno(VALUE self)
{
rb_iseq_t *iseq;
GetISeqPtr(self, iseq);
return iseq->location.first_lineno;
}
-VALUE
-rb_iseq_klass(VALUE self)
-{
- rb_iseq_t *iseq;
- GetISeqPtr(self, iseq);
- return iseq->local_iseq->klass;
-}
-
-VALUE
-rb_iseq_method_name(VALUE self)
-{
- rb_iseq_t *iseq, *local_iseq;
- GetISeqPtr(self, iseq);
- local_iseq = iseq->local_iseq;
- if (local_iseq->type == ISEQ_TYPE_METHOD) {
- return local_iseq->location.base_label;
- }
- else {
- return Qnil;
- }
-}
-
static
VALUE iseq_data_to_ary(rb_iseq_t *iseq);
@@ -1072,6 +1038,12 @@ iseq_to_a(VALUE self)
return iseq_data_to_ary(iseq);
}
+int
+rb_iseq_first_lineno(const rb_iseq_t *iseq)
+{
+ return FIX2INT(iseq->location.first_lineno);
+}
+
/* TODO: search algorithm is brute force.
this should be binary search or so. */
@@ -1147,9 +1119,9 @@ id_to_name(ID id, VALUE default_value)
}
VALUE
-rb_insn_operand_intern(rb_iseq_t *iseq,
- VALUE insn, int op_no, VALUE op,
- int len, size_t pos, VALUE *pnop, VALUE child)
+insn_operand_intern(rb_iseq_t *iseq,
+ VALUE insn, int op_no, VALUE op,
+ int len, size_t pos, VALUE *pnop, VALUE child)
{
const char *types = insn_op_types(insn);
char type = types[op_no];
@@ -1219,7 +1191,7 @@ rb_insn_operand_intern(rb_iseq_t *iseq,
break;
case TS_IC:
- ret = rb_sprintf("<is:%"PRIdPTRDIFF">", (union iseq_inline_storage_entry *)op - iseq->is_entries);
+ ret = rb_sprintf("<ic:%"PRIdPTRDIFF">", (struct iseq_inline_cache_entry *)op - iseq->ic_entries);
break;
case TS_CALLINFO:
@@ -1296,9 +1268,9 @@ rb_iseq_disasm_insn(VALUE ret, VALUE *iseq, size_t pos,
for (j = 0; types[j]; j++) {
const char *types = insn_op_types(insn);
- VALUE opstr = rb_insn_operand_intern(iseqdat, insn, j, iseq[pos + j + 1],
- len, pos, &iseq[pos + j + 2],
- child);
+ VALUE opstr = insn_operand_intern(iseqdat, insn, j, iseq[pos + j + 1],
+ len, pos, &iseq[pos + j + 2],
+ child);
rb_str_concat(str, opstr);
if (types[j + 1]) {
@@ -1419,11 +1391,10 @@ rb_iseq_disasm(VALUE self)
if (tbl) {
rb_str_catf(str,
"local table (size: %d, argc: %d "
- "[opts: %d, rest: %d, post: %d, block: %d, keyword: %d@%d] s%d)\n",
+ "[opts: %d, rest: %d, post: %d, block: %d] s%d)\n",
iseqdat->local_size, iseqdat->argc,
iseqdat->arg_opts, iseqdat->arg_rest,
iseqdat->arg_post_len, iseqdat->arg_block,
- iseqdat->arg_keywords, iseqdat->local_size-iseqdat->arg_keyword,
iseqdat->arg_simple);
for (i = 0; i < iseqdat->local_table_size; i++) {
@@ -1792,11 +1763,10 @@ iseq_data_to_ary(rb_iseq_t *iseq)
rb_ary_push(ary, ID2SYM(entry->id));
}
break;
- case TS_IC:
- {
- union iseq_inline_storage_entry *is = (union iseq_inline_storage_entry *)*seq;
- rb_ary_push(ary, INT2FIX(is - iseq->is_entries));
- }
+ case TS_IC: {
+ struct iseq_inline_cache_entry *ic = (struct iseq_inline_cache_entry *)*seq;
+ rb_ary_push(ary, INT2FIX(ic - iseq->ic_entries));
+ }
break;
case TS_CALLINFO:
{
@@ -1864,14 +1834,14 @@ iseq_data_to_ary(rb_iseq_t *iseq)
ti = 0;
for (i=0, pos=0; i<RARRAY_LEN(nbody); i++) {
- VALUE ary = RARRAY_AREF(nbody, i);
+ VALUE ary = RARRAY_PTR(nbody)[i];
st_data_t label;
if (st_lookup(labels_table, pos, &label)) {
rb_ary_push(body, (VALUE)label);
}
- if (ti < iseq->line_info_size && iseq->line_info_table[ti].position == pos) {
+ if (iseq->line_info_size < ti && iseq->line_info_table[ti].position == pos) {
line = iseq->line_info_table[ti].line_no;
rb_ary_push(body, INT2FIX(line));
ti++;
@@ -1919,23 +1889,22 @@ rb_iseq_clone(VALUE iseqval, VALUE newcbase)
GetISeqPtr(iseqval, iseq0);
GetISeqPtr(newiseq, iseq1);
- MEMCPY(iseq1, iseq0, rb_iseq_t, 1); /* TODO: write barrier? */
-
+ *iseq1 = *iseq0;
iseq1->self = newiseq;
if (!iseq1->orig) {
- RB_OBJ_WRITE(iseq1->self, &iseq1->orig, iseqval);
+ iseq1->orig = iseqval;
}
if (iseq0->local_iseq == iseq0) {
iseq1->local_iseq = iseq1;
}
if (newcbase) {
- ISEQ_SET_CREF(iseq1, NEW_CREF(newcbase));
- RB_OBJ_WRITE(iseq1->cref_stack, &iseq1->cref_stack->nd_refinements, iseq0->cref_stack->nd_refinements);
+ iseq1->cref_stack = NEW_CREF(newcbase);
+ iseq1->cref_stack->nd_refinements = iseq0->cref_stack->nd_refinements;
iseq1->cref_stack->nd_visi = iseq0->cref_stack->nd_visi;
if (iseq0->cref_stack->nd_next) {
- RB_OBJ_WRITE(iseq1->cref_stack, &iseq1->cref_stack->nd_next, iseq0->cref_stack->nd_next);
+ iseq1->cref_stack->nd_next = iseq0->cref_stack->nd_next;
}
- RB_OBJ_WRITE(iseq1, &iseq1->klass, newcbase);
+ iseq1->klass = newcbase;
}
return newiseq;
@@ -1995,20 +1964,8 @@ rb_iseq_parameters(const rb_iseq_t *iseq, int is_proc)
}
}
if (iseq->arg_keyword != -1) {
- i = 0;
- if (iseq->arg_keyword_required) {
- ID keyreq;
- CONST_ID(keyreq, "keyreq");
- for (; i < iseq->arg_keyword_required; i++) {
- PARAM_TYPE(keyreq);
- if (rb_id2str(iseq->arg_keyword_table[i])) {
- rb_ary_push(a, ID2SYM(iseq->arg_keyword_table[i]));
- }
- rb_ary_push(args, a);
- }
- }
CONST_ID(key, "key");
- for (; i < iseq->arg_keywords; i++) {
+ for (i = 0; i < iseq->arg_keywords; i++) {
PARAM_TYPE(key);
if (rb_id2str(iseq->arg_keyword_table[i])) {
rb_ary_push(a, ID2SYM(iseq->arg_keyword_table[i]));
@@ -2086,11 +2043,12 @@ rb_iseq_build_for_ruby2cext(
GetISeqPtr(iseqval, iseq);
/* copy iseq */
- MEMCPY(iseq, iseq_template, rb_iseq_t, 1); /* TODO: write barrier, *iseq = *iseq_template; */
- RB_OBJ_WRITE(iseq->self, &iseq->location.label, rb_str_new2(name));
- RB_OBJ_WRITE(iseq->self, &iseq->location.path, rb_str_new2(path));
+ *iseq = *iseq_template;
+ iseq->location.label = rb_str_new2(name);
+ iseq->location.path = rb_str_new2(path);
iseq->location.first_lineno = first_lineno;
- RB_OBJ_WRITE(iseq->self, &iseq->mark_ary, 0);
+ iseq->mark_ary = rb_ary_tmp_new(3);
+ OBJ_UNTRUST(iseq->mark_ary);
iseq->self = iseqval;
iseq->iseq = ALLOC_N(VALUE, iseq->iseq_size);
@@ -2278,11 +2236,11 @@ Init_ISeq(void)
rb_define_method(rb_cISeq, "eval", iseq_eval, 0);
/* location APIs */
- rb_define_method(rb_cISeq, "path", rb_iseq_path, 0);
- rb_define_method(rb_cISeq, "absolute_path", rb_iseq_absolute_path, 0);
- rb_define_method(rb_cISeq, "label", rb_iseq_label, 0);
- rb_define_method(rb_cISeq, "base_label", rb_iseq_base_label, 0);
- rb_define_method(rb_cISeq, "first_lineno", rb_iseq_first_lineno, 0);
+ rb_define_method(rb_cISeq, "path", iseq_path, 0);
+ rb_define_method(rb_cISeq, "absolute_path", iseq_absolute_path, 0);
+ rb_define_method(rb_cISeq, "label", iseq_label, 0);
+ rb_define_method(rb_cISeq, "base_label", iseq_base_label, 0);
+ rb_define_method(rb_cISeq, "first_lineno", iseq_first_lineno, 0);
#if 0
/* Now, it is experimental. No discussions, no tests. */
diff --git a/iseq.h b/iseq.h
index 5487d86f7b..4a7965adf9 100644
--- a/iseq.h
+++ b/iseq.h
@@ -12,7 +12,9 @@
#ifndef RUBY_COMPILE_H
#define RUBY_COMPILE_H
-RUBY_SYMBOL_EXPORT_BEGIN
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility push(default)
+#endif
/* compile.c */
VALUE rb_iseq_compile_node(VALUE self, NODE *node);
@@ -21,7 +23,6 @@ VALUE rb_iseq_build_from_ary(rb_iseq_t *iseq, VALUE locals, VALUE args,
VALUE exception, VALUE body);
/* iseq.c */
-void rb_iseq_add_mark_object(rb_iseq_t *iseq, VALUE obj);
VALUE rb_iseq_load(VALUE data, VALUE parent, VALUE opt);
VALUE rb_iseq_parameters(const rb_iseq_t *iseq, int is_proc);
struct st_table *ruby_insn_make_insn_table(void);
@@ -79,9 +80,9 @@ struct iseq_compile_data_storage {
struct iseq_compile_data {
/* GC is needed */
- const VALUE err_info;
+ VALUE err_info;
VALUE mark_ary;
- const VALUE catch_table_ary; /* Array */
+ VALUE catch_table_ary; /* Array */
/* GC is not needed */
struct iseq_label_data *start_label;
@@ -97,6 +98,7 @@ struct iseq_compile_data {
struct iseq_compile_data_storage *storage_current;
int last_line;
int last_coverable_line;
+ int flip_cnt;
int label_no;
int node_level;
const rb_compile_option_t *option;
@@ -131,6 +133,8 @@ VALUE rb_iseq_defined_string(enum defined_type type);
#define DEFAULT_SPECIAL_VAR_COUNT 2
-RUBY_SYMBOL_EXPORT_END
+#if defined __GNUC__ && __GNUC__ >= 4
+#pragma GCC visibility pop
+#endif
#endif /* RUBY_COMPILE_H */
diff --git a/lib/English.rb b/lib/English.rb
index 32769fb18b..4fd53c5ec6 100644
--- a/lib/English.rb
+++ b/lib/English.rb
@@ -15,37 +15,7 @@
# $OUTPUT_FIELD_SEPARATOR = ' -- '
# "waterbuffalo" =~ /buff/
# print $LOADED_FEATURES, $POSTMATCH, $PID, "\n"
-#
-# Below is a full list of descriptive aliases and their associated global
-# variable:
-#
-# $ERROR_INFO:: $!
-# $ERROR_POSITION:: $@
-# $FS:: $;
-# $FIELD_SEPARATOR:: $;
-# $OFS:: $,
-# $OUTPUT_FIELD_SEPARATOR:: $,
-# $RS:: $/
-# $INPUT_RECORD_SEPARATOR:: $/
-# $ORS:: $\
-# $OUTPUT_RECORD_SEPARATOR:: $\
-# $INPUT_LINE_NUMBER:: $.
-# $NR:: $.
-# $LAST_READ_LINE:: $_
-# $DEFAULT_OUTPUT:: $>
-# $DEFAULT_INPUT:: $<
-# $PID:: $$
-# $PROCESS_ID:: $$
-# $CHILD_STATUS:: $?
-# $LAST_MATCH_INFO:: $~
-# $IGNORECASE:: $=
-# $ARGV:: $*
-# $MATCH:: $&
-# $PREMATCH:: $`
-# $POSTMATCH:: $'
-# $LAST_PAREN_MATCH:: $+
-#
-module English end if false
+
# The exception object passed to +raise+.
alias $ERROR_INFO $!
@@ -149,7 +119,7 @@ alias $CHILD_STATUS $?
# and <tt>$1</tt> to <tt>$9</tt> are all derived from
# <tt>$~</tt>. Assigning to <tt>$~</tt> changes the values of these
# derived variables. This variable is local to the current
-# scope.
+# scope. Thread local.
alias $LAST_MATCH_INFO $~
# If set to any value apart from +nil+ or +false+, all pattern matches
@@ -165,21 +135,21 @@ alias $ARGV $*
# The string matched by the last successful pattern
# match. This variable is local to the current
-# scope. Read only.
+# scope. Read only. Thread local.
alias $MATCH $&
# The string preceding the match in the last
# successful pattern match. This variable is local to
-# the current scope. Read only.
+# the current scope. Read only. Thread local.
alias $PREMATCH $`
# The string following the match in the last
# successful pattern match. This variable is local to
-# the current scope. Read only.
+# the current scope. Read only. Thread local.
alias $POSTMATCH $'
# The contents of the highest-numbered group matched in the last
# successful pattern match. Thus, in <tt>"cat" =~ /(c|a)(t|z)/</tt>,
# <tt>$+</tt> will be set to "t". This variable is local to the
-# current scope. Read only.
+# current scope. Read only. Thread local.
alias $LAST_PAREN_MATCH $+
diff --git a/lib/README b/lib/README
new file mode 100644
index 0000000000..4767189e64
--- /dev/null
+++ b/lib/README
@@ -0,0 +1,93 @@
+# lib/README - -*- RDoc -*-
+
+English.rb:: lets Perl'ish global variables have English names
+README:: this file
+abbrev.rb:: abbreviation calculator
+base64.rb:: Base64 de- and encoder
+benchmark.rb:: a benchmark utility
+cgi.rb:: CGI support library
+cgi/session.rb:: CGI session class
+cmath.rb:: math support for complex numbers
+complex.rb:: includes cmath and set complex arithemtic as default (obsolete)
+csv.rb:: CSV parser/generator
+debug.rb:: ruby debugger
+delegate.rb:: delegates messages to other object
+drb.rb:: distributed Ruby
+e2mmap.rb:: exception utilities
+erb.rb:: tiny eRuby library
+fileutils.rb:: file utilities
+find.rb:: traverses directory tree
+forwardable.rb:: explicit delegation library
+gauntlet_rubygems.rb:: Gem package validator
+getoptlong.rb:: GNU getoptlong compatible
+gserver.rb:: general TCP server
+ipaddr.rb:: defines the IPAddr class
+irb.rb:: interactive ruby
+logger.rb:: simple logging utility
+mathn.rb:: extended math operation (obsolete)
+matrix.rb:: matrix calculation library
+minitest/unit:: minimal drop-in replacement for test-unit
+mkmf.rb:: Makefile maker
+monitor.rb:: exclusive region monitor for thread
+mutex_m.rb:: mutex mixin
+net/ftp.rb:: ftp access
+net/http.rb:: HTTP access
+net/https.rb:: HTTPS access
+net/imap.rb:: IMAP4 access
+net/pop.rb:: POP3 access
+net/protocol.rb:: abstract class for net library (DO NOT USE)
+net/smtp.rb:: SMTP access
+net/telnet.rb:: telnet library
+observer.rb:: observer desing pattern library (provides Observable)
+open-uri.rb:: easy-to-use network interface using URI and Net
+open3.rb:: opens subprocess connection stdin/stdout/stderr
+optparse.rb:: command line option analysis
+ostruct.rb:: python style object
+pathname.rb:: Object-Oriented Pathname Class
+pp.rb:: pretty print objects
+prettyprint.rb:: pretty printing algorithm
+prime.rb prime numbers and factorization
+profile.rb:: runs ruby profiler
+profiler.rb:: ruby profiler module
+pstore.rb:: persistent object strage using marshal
+racc/parser.rb:: racc (Ruby yACC) runtime
+rake.rb:: Ruby Make
+rational.rb:: rational number support (obsolete)
+rdoc:: source-code documentation tool
+resolv-replace.rb:: replace Socket DNS by resolve.rb
+resolv.rb:: DNS resolver in Ruby
+rexml:: an XML parser for Ruby, in Ruby
+rinda/rinda.rb:: Linda distributed computing paradigm for drb
+rinda/ring.rb:: RingServer for tuplespace
+rinda/tuplespace.rb:: tuplespace for drb
+rss.rb:: RSS parser/generator
+rubygems:: Ruby package management system
+scanf.rb:: scanf for Ruby
+securerandom.rb:: Secure random number generator interface
+set.rb:: defines the Set class
+shell.rb:: runs commands and does pipeline operations like shell
+shellwords.rb:: split into words like shell
+singleton.rb:: singleton design pattern library
+sync.rb:: 2 phase lock
+tempfile.rb:: temporary file with automatic removal
+test/unit:: Ruby Unit Testing Framework
+thread.rb:: thread support
+thwait.rb:: thread syncronization class
+time.rb:: RFC2822, RFC2616, ISO8601 style time formatting/parsing
+timeout.rb:: provides timeout
+tmpdir.rb:: retrieve temporary directory path
+tracer.rb:: execution tracer
+tsort.rb:: topological sorting
+rubygems.rb:: command line shortcut for RubyGems
+un.rb:: Utilities to replace common UNIX commands in Makefiles etc
+uri.rb:: URI support
+uri/ftp.rb:: ftp scheme support
+uri/http.rb:: http scheme support
+uri/https.rb:: https scheme support
+uri/ldap.rb:: ldap scheme support
+uri/ldaps.rb:: ldaps scheme support
+uri/mailto.rb:: mailto scheme support
+weakref.rb:: weak reference class
+webrick.rb:: WEB server toolkit
+xmlrpc:: XML-RPC implementation
+yaml.rb:: YAML implementation
diff --git a/lib/abbrev.rb b/lib/abbrev.rb
index 841f6d980e..d4f8196f49 100755
--- a/lib/abbrev.rb
+++ b/lib/abbrev.rb
@@ -49,8 +49,8 @@ module Abbrev
# are all the possible abbreviations and the values are the full
# strings.
#
- # Thus, given +words+ is "car" and "cone", the keys pointing to "car" would
- # be "ca" and "car", while those pointing to "cone" would be "co", "con", and
+ # Thus, given input of "car" and "cone", the keys pointing to "car" would be
+ # "ca" and "car", while those pointing to "cone" would be "co", "con", and
# "cone".
#
# require 'abbrev'
diff --git a/lib/base64.rb b/lib/base64.rb
index 98829f0d96..a240b730b4 100644
--- a/lib/base64.rb
+++ b/lib/base64.rb
@@ -25,7 +25,7 @@ module Base64
# Returns the Base64-encoded version of +bin+.
# This method complies with RFC 2045.
- # Line feeds are added to every 60 encoded characters.
+ # Line feeds are added to every 60 encoded charactors.
#
# require 'base64'
# Base64.encode64("Now is the time for all good coders\nto learn Ruby")
diff --git a/lib/benchmark.rb b/lib/benchmark.rb
index 81ca0bcede..f52ba7df34 100644
--- a/lib/benchmark.rb
+++ b/lib/benchmark.rb
@@ -19,15 +19,15 @@
# used to execute Ruby code.
#
# * Measure the time to construct the string given by the expression
-# <code>"a"*1_000_000_000</code>:
+# <code>"a"*1_000_000</code>:
#
# require 'benchmark'
#
-# puts Benchmark.measure { "a"*1_000_000_000 }
+# puts Benchmark.measure { "a"*1_000_000 }
#
-# On my machine (OSX 10.8.3 on i5 1.7 Ghz) this generates:
+# On my machine (FreeBSD 3.2 on P5, 100MHz) this generates:
#
-# 0.350000 0.400000 0.750000 ( 0.835234)
+# 1.166667 0.050000 1.216667 ( 0.571355)
#
# This report shows the user CPU time, system CPU time, the sum of
# the user and system CPU times, and the elapsed real time. The unit
@@ -37,7 +37,7 @@
#
# require 'benchmark'
#
-# n = 5000000
+# n = 50000
# Benchmark.bm do |x|
# x.report { for i in 1..n; a = "1"; end }
# x.report { n.times do ; a = "1"; end }
@@ -47,15 +47,15 @@
# The result:
#
# user system total real
-# 1.010000 0.000000 1.010000 ( 1.014479)
-# 1.000000 0.000000 1.000000 ( 0.998261)
-# 0.980000 0.000000 0.980000 ( 0.981335)
+# 1.033333 0.016667 1.016667 ( 0.492106)
+# 1.483333 0.000000 1.483333 ( 0.694605)
+# 1.516667 0.000000 1.516667 ( 0.711077)
#
# * Continuing the previous example, put a label in each report:
#
# require 'benchmark'
#
-# n = 5000000
+# n = 50000
# Benchmark.bm(7) do |x|
# x.report("for:") { for i in 1..n; a = "1"; end }
# x.report("times:") { n.times do ; a = "1"; end }
@@ -65,9 +65,10 @@
# The result:
#
# user system total real
-# for: 1.010000 0.000000 1.010000 ( 1.015688)
-# times: 1.000000 0.000000 1.000000 ( 1.003611)
-# upto: 1.030000 0.000000 1.030000 ( 1.028098)
+# for: 1.050000 0.000000 1.050000 ( 0.503462)
+# times: 1.533333 0.016667 1.550000 ( 0.735473)
+# upto: 1.500000 0.016667 1.516667 ( 0.711239)
+#
#
# * The times for some benchmarks depend on the order in which items
# are run. These differences are due to the cost of memory
@@ -87,13 +88,14 @@
# The result:
#
# Rehearsal -----------------------------------------
-# sort! 1.490000 0.010000 1.500000 ( 1.490520)
-# sort 1.460000 0.000000 1.460000 ( 1.463025)
-# -------------------------------- total: 2.960000sec
+# sort! 11.928000 0.010000 11.938000 ( 12.756000)
+# sort 13.048000 0.020000 13.068000 ( 13.857000)
+# ------------------------------- total: 25.006000sec
#
# user system total real
-# sort! 1.460000 0.000000 1.460000 ( 1.460465)
-# sort 1.450000 0.010000 1.460000 ( 1.448327)
+# sort! 12.959000 0.010000 12.969000 ( 13.793000)
+# sort 12.007000 0.000000 12.007000 ( 12.791000)
+#
#
# * Report statistics of sequential experiments with unique labels,
# using the #benchmark method:
@@ -101,7 +103,7 @@
# require 'benchmark'
# include Benchmark # we need the CAPTION and FORMAT constants
#
-# n = 5000000
+# n = 50000
# Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x|
# tf = x.report("for:") { for i in 1..n; a = "1"; end }
# tt = x.report("times:") { n.times do ; a = "1"; end }
@@ -112,11 +114,11 @@
# The result:
#
# user system total real
-# for: 0.950000 0.000000 0.950000 ( 0.952039)
-# times: 0.980000 0.000000 0.980000 ( 0.984938)
-# upto: 0.950000 0.000000 0.950000 ( 0.946787)
-# >total: 2.880000 0.000000 2.880000 ( 2.883764)
-# >avg: 0.960000 0.000000 0.960000 ( 0.961255)
+# for: 1.016667 0.016667 1.033333 ( 0.485749)
+# times: 1.450000 0.016667 1.466667 ( 0.681367)
+# upto: 1.533333 0.000000 1.533333 ( 0.722166)
+# >total: 4.000000 0.033333 4.033333 ( 1.889282)
+# >avg: 1.333333 0.011111 1.344444 ( 0.629761)
module Benchmark
@@ -143,7 +145,7 @@ module Benchmark
# require 'benchmark'
# include Benchmark # we need the CAPTION and FORMAT constants
#
- # n = 5000000
+ # n = 50000
# Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x|
# tf = x.report("for:") { for i in 1..n; a = "1"; end }
# tt = x.report("times:") { n.times do ; a = "1"; end }
@@ -154,11 +156,11 @@ module Benchmark
# Generates:
#
# user system total real
- # for: 0.970000 0.000000 0.970000 ( 0.970493)
- # times: 0.990000 0.000000 0.990000 ( 0.989542)
- # upto: 0.970000 0.000000 0.970000 ( 0.972854)
- # >total: 2.930000 0.000000 2.930000 ( 2.932889)
- # >avg: 0.976667 0.000000 0.976667 ( 0.977630)
+ # for: 1.016667 0.016667 1.033333 ( 0.485749)
+ # times: 1.450000 0.016667 1.466667 ( 0.681367)
+ # upto: 1.533333 0.000000 1.533333 ( 0.722166)
+ # >total: 4.000000 0.033333 4.033333 ( 1.889282)
+ # >avg: 1.333333 0.011111 1.344444 ( 0.629761)
#
def benchmark(caption = "", label_width = nil, format = nil, *labels) # :yield: report
@@ -179,13 +181,13 @@ module Benchmark
end
- # A simple interface to the #benchmark method, #bm generates sequential
+ # A simple interface to the #benchmark method, #bm is generates sequential
# reports with labels. The parameters have the same meaning as for
# #benchmark.
#
# require 'benchmark'
#
- # n = 5000000
+ # n = 50000
# Benchmark.bm(7) do |x|
# x.report("for:") { for i in 1..n; a = "1"; end }
# x.report("times:") { n.times do ; a = "1"; end }
@@ -195,9 +197,9 @@ module Benchmark
# Generates:
#
# user system total real
- # for: 0.960000 0.000000 0.960000 ( 0.957966)
- # times: 0.960000 0.000000 0.960000 ( 0.960423)
- # upto: 0.950000 0.000000 0.950000 ( 0.954864)
+ # for: 1.050000 0.000000 1.050000 ( 0.503462)
+ # times: 1.533333 0.016667 1.550000 ( 0.735473)
+ # upto: 1.500000 0.016667 1.516667 ( 0.711239)
#
def bm(label_width = 0, *labels, &blk) # :yield: report
@@ -231,13 +233,13 @@ module Benchmark
# Generates:
#
# Rehearsal -----------------------------------------
- # sort! 1.440000 0.010000 1.450000 ( 1.446833)
- # sort 1.440000 0.000000 1.440000 ( 1.448257)
- # -------------------------------- total: 2.890000sec
+ # sort! 11.928000 0.010000 11.938000 ( 12.756000)
+ # sort 13.048000 0.020000 13.068000 ( 13.857000)
+ # ------------------------------- total: 25.006000sec
#
# user system total real
- # sort! 1.460000 0.000000 1.460000 ( 1.458065)
- # sort 1.450000 0.000000 1.450000 ( 1.455963)
+ # sort! 12.959000 0.010000 12.969000 ( 13.793000)
+ # sort 12.007000 0.000000 12.007000 ( 12.791000)
#
# #bmbm yields a Benchmark::Job object and returns an array of
# Benchmark::Tms objects.
diff --git a/lib/cgi.rb b/lib/cgi.rb
index 15676eab5f..1c5ccd369f 100644
--- a/lib/cgi.rb
+++ b/lib/cgi.rb
@@ -143,11 +143,6 @@ raise "Please, use ruby 1.9.0 or later." if RUBY_VERSION < "1.9.0"
# take particular attributes where the attributes can be directly specified
# as arguments, rather than via a hash.
#
-# === Utility HTML escape and other methods like a function.
-#
-# There are some utility tool defined in cgi/util.rb .
-# And when include, you can use utility methods like a function.
-#
# == Examples of use
#
# === Get form values
@@ -164,7 +159,7 @@ raise "Please, use ruby 1.9.0 or later." if RUBY_VERSION < "1.9.0"
# cgi.include?('field_name')
#
# CAUTION! cgi['field_name'] returned an Array with the old
-# cgi.rb(included in Ruby 1.6)
+# cgi.rb(included in ruby 1.6)
#
# === Get form values as hash
#
@@ -273,20 +268,6 @@ raise "Please, use ruby 1.9.0 or later." if RUBY_VERSION < "1.9.0"
# CGI.new("html4Fr") # html4.01 Frameset
# CGI.new("html5") # html5
#
-# === Some utility methods
-#
-# require 'cgi/util'
-# CGI.escapeHTML('Usage: foo "bar" <baz>')
-#
-#
-# === Some utility methods like a function
-#
-# require 'cgi/util'
-# include CGI::Util
-# escapeHTML('Usage: foo "bar" <baz>')
-# h('Usage: foo "bar" <baz>') # alias
-#
-#
class CGI
end
diff --git a/lib/cgi/cookie.rb b/lib/cgi/cookie.rb
index 3ec884dffb..c2526931d5 100644
--- a/lib/cgi/cookie.rb
+++ b/lib/cgi/cookie.rb
@@ -1,5 +1,5 @@
-require 'cgi/util'
class CGI
+ @@accept_charset="UTF-8" unless defined?(@@accept_charset)
# Class representing an HTTP cookie.
#
# In addition to its specific fields and methods, a Cookie instance
@@ -8,9 +8,9 @@ class CGI
# See RFC 2965.
#
# == Examples of use
- # cookie1 = CGI::Cookie.new("name", "value1", "value2", ...)
- # cookie1 = CGI::Cookie.new("name" => "name", "value" => "value")
- # cookie1 = CGI::Cookie.new('name' => 'name',
+ # cookie1 = CGI::Cookie::new("name", "value1", "value2", ...)
+ # cookie1 = CGI::Cookie::new("name" => "name", "value" => "value")
+ # cookie1 = CGI::Cookie::new('name' => 'name',
# 'value' => ['value1', 'value2', ...],
# 'path' => 'path', # optional
# 'domain' => 'domain', # optional
@@ -34,7 +34,6 @@ class CGI
# cookie1.expires = Time.now + 30
# cookie1.secure = true
class Cookie < Array
- @@accept_charset="UTF-8" unless defined?(@@accept_charset)
# Create a new CGI::Cookie object.
#
@@ -125,7 +124,7 @@ class CGI
# Convert the Cookie to its string representation.
def to_s
- val = collect{|v| CGI.escape(v) }.join("&")
+ val = collect{|v| CGI::escape(v) }.join("&")
buf = "#{@name}=#{val}"
buf << "; domain=#{@domain}" if @domain
buf << "; path=#{@path}" if @path
@@ -134,37 +133,32 @@ class CGI
buf
end
- # Parse a raw cookie string into a hash of cookie-name=>Cookie
- # pairs.
- #
- # cookies = CGI::Cookie.parse("raw_cookie_string")
- # # { "name1" => cookie1, "name2" => cookie2, ... }
- #
- def self.parse(raw_cookie)
- cookies = Hash.new([])
- return cookies unless raw_cookie
+ end # class Cookie
- raw_cookie.split(/[;,]\s?/).each do |pairs|
- name, values = pairs.split('=',2)
- next unless name and values
- name = CGI.unescape(name)
- values ||= ""
- values = values.split('&').collect{|v| CGI.unescape(v,@@accept_charset) }
- if cookies.has_key?(name)
- values = cookies[name].value + values
- end
- cookies[name] = Cookie.new(name, *values)
+ # Parse a raw cookie string into a hash of cookie-name=>Cookie
+ # pairs.
+ #
+ # cookies = CGI::Cookie::parse("raw_cookie_string")
+ # # { "name1" => cookie1, "name2" => cookie2, ... }
+ #
+ def Cookie::parse(raw_cookie)
+ cookies = Hash.new([])
+ return cookies unless raw_cookie
+
+ raw_cookie.split(/[;,]\s?/).each do |pairs|
+ name, values = pairs.split('=',2)
+ next unless name and values
+ name = CGI::unescape(name)
+ values ||= ""
+ values = values.split('&').collect{|v| CGI::unescape(v,@@accept_charset) }
+ if cookies.has_key?(name)
+ values = cookies[name].value + values
end
-
- cookies
- end
-
- # A summary of cookie string.
- def inspect
- "#<CGI::Cookie: #{self.to_s.inspect}>"
+ cookies[name] = Cookie::new(name, *values)
end
- end # class Cookie
+ cookies
+ end
end
diff --git a/lib/cgi/core.rb b/lib/cgi/core.rb
index 241f817278..27137a2032 100644
--- a/lib/cgi/core.rb
+++ b/lib/cgi/core.rb
@@ -238,7 +238,7 @@ class CGI
arr.each {|c| buf << "Set-Cookie: #{c}#{EOL}" }
when Hash
hash = cookie
- hash.each_value {|c| buf << "Set-Cookie: #{c}#{EOL}" }
+ hash.each {|name, c| buf << "Set-Cookie: #{c}#{EOL}" }
end
end
if @output_cookies
@@ -574,28 +574,27 @@ class CGI
raise EOFError, "bad boundary end of body part" unless boundary_end =~ /--/
params.default = []
params
- rescue Exception
- if tempfiles
+ ensure
+ if $! && tempfiles
tempfiles.each {|t|
if t.path
t.unlink
end
}
end
- raise
end # read_multipart
private :read_multipart
def create_body(is_large) #:nodoc:
if is_large
require 'tempfile'
- body = Tempfile.new('CGI', encoding: Encoding::ASCII_8BIT)
+ body = Tempfile.new('CGI', encoding: "ascii-8bit")
else
begin
require 'stringio'
- body = StringIO.new("".force_encoding(Encoding::ASCII_8BIT))
+ body = StringIO.new("".force_encoding("ascii-8bit"))
rescue LoadError
require 'tempfile'
- body = Tempfile.new('CGI', encoding: Encoding::ASCII_8BIT)
+ body = Tempfile.new('CGI', encoding: "ascii-8bit")
end
end
body.binmode if defined? body.binmode
@@ -702,9 +701,9 @@ class CGI
if value
return value
elsif defined? StringIO
- StringIO.new("".force_encoding(Encoding::ASCII_8BIT))
+ StringIO.new("".force_encoding("ascii-8bit"))
else
- Tempfile.new("CGI",encoding: Encoding::ASCII_8BIT)
+ Tempfile.new("CGI",encoding:"ascii-8bit")
end
else
str = if value then value.dup else "" end
@@ -833,23 +832,29 @@ class CGI
when "html3"
require 'cgi/html'
extend Html3
+ element_init()
extend HtmlExtension
when "html4"
require 'cgi/html'
extend Html4
+ element_init()
extend HtmlExtension
when "html4Tr"
require 'cgi/html'
extend Html4Tr
+ element_init()
extend HtmlExtension
when "html4Fr"
require 'cgi/html'
extend Html4Tr
+ element_init()
extend Html4Fr
+ element_init()
extend HtmlExtension
when "html5"
require 'cgi/html'
extend Html5
+ element_init()
extend HtmlExtension
end
end
diff --git a/lib/cgi/html.rb b/lib/cgi/html.rb
index 4c4f698a2b..ba19e3d603 100644
--- a/lib/cgi/html.rb
+++ b/lib/cgi/html.rb
@@ -8,62 +8,55 @@ class CGI
# Generate code for an element with required start and end tags.
#
# - -
- def nn_element(element, attributes = {})
- s = nOE_element(element, attributes)
- if block_given?
- s << yield.to_s
- end
- s << "</#{element.upcase}>"
- end
-
- def nn_element_def(attributes = {}, &block)
- nn_element(__callee__, attributes, &block)
+ def nn_element_def(element)
+ nOE_element_def(element, <<-END)
+ if block_given?
+ yield.to_s
+ else
+ ""
+ end +
+ "</#{element.upcase}>"
+ END
end
# Generate code for an empty element.
#
# - O EMPTY
- def nOE_element(element, attributes = {})
- attributes={attributes=>nil} if attributes.kind_of?(String)
- s = "<#{element.upcase}"
- attributes.each do|name, value|
- next unless value
- s << " "
- s << CGI::escapeHTML(name.to_s)
- if value != true
- s << '="'
- s << CGI::escapeHTML(value.to_s)
- s << '"'
- end
- end
- s << ">"
- end
-
- def nOE_element_def(attributes = {}, &block)
- nOE_element(__callee__, attributes, &block)
+ def nOE_element_def(element, append = nil)
+ s = <<-END
+ attributes={attributes=>nil} if attributes.kind_of?(String)
+ "<#{element.upcase}" + attributes.collect{|name, value|
+ next unless value
+ " " + CGI::escapeHTML(name.to_s) +
+ if true == value
+ ""
+ else
+ '="' + CGI::escapeHTML(value.to_s) + '"'
+ end
+ }.join + ">"
+ END
+ s.sub!(/\Z/, " +") << append if append
+ s
end
-
# Generate code for an element for which the end (and possibly the
# start) tag is optional.
#
# O O or - O
- def nO_element(element, attributes = {})
- s = nOE_element(element, attributes)
- if block_given?
- s << yield.to_s
- s << "</#{element.upcase}>"
- end
- s
- end
-
- def nO_element_def(attributes = {}, &block)
- nO_element(__callee__, attributes, &block)
+ def nO_element_def(element)
+ nOE_element_def(element, <<-END)
+ if block_given?
+ yield.to_s + "</#{element.upcase}>"
+ else
+ ""
+ end
+ END
end
end # TagMaker
+ #
# Mixin module providing HTML generation methods.
#
# For example,
@@ -99,7 +92,11 @@ class CGI
else
href
end
- super(attributes)
+ if block_given?
+ super(attributes){ yield }
+ else
+ super(attributes)
+ end
end
# Generate a Document Base URI element as a String.
@@ -117,7 +114,11 @@ class CGI
else
href
end
- super(attributes)
+ if block_given?
+ super(attributes){ yield }
+ else
+ super(attributes)
+ end
end
# Generate a BlockQuote element as a string.
@@ -136,7 +137,11 @@ class CGI
else
cite
end
- super(attributes)
+ if block_given?
+ super(attributes){ yield }
+ else
+ super(attributes)
+ end
end
@@ -156,7 +161,11 @@ class CGI
else
align
end
- super(attributes)
+ if block_given?
+ super(attributes){ yield }
+ else
+ super(attributes)
+ end
end
@@ -419,7 +428,11 @@ class CGI
buf << doctype
end
- buf << super(attributes)
+ if block_given?
+ buf << super(attributes){ yield }
+ else
+ buf << super(attributes)
+ end
if pretty
CGI::pretty(buf, pretty)
@@ -811,7 +824,11 @@ class CGI
else
name
end
- super(attributes)
+ if block_given?
+ super(attributes){ yield }
+ else
+ super(attributes)
+ end
end
end # HtmlExtension
@@ -819,38 +836,50 @@ class CGI
# Mixin module for HTML version 3 generation methods.
module Html3 # :nodoc:
- include TagMaker
# The DOCTYPE declaration for this version of HTML
def doctype
%|<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">|
end
- instance_method(:nn_element_def).tap do |m|
+ # Initialise the HTML generation methods for this version.
+ def element_init
+ extend TagMaker
+ return if defined?(html)
+ methods = ""
# - -
for element in %w[ A TT I B U STRIKE BIG SMALL SUB SUP EM STRONG
DFN CODE SAMP KBD VAR CITE FONT ADDRESS DIV CENTER MAP
APPLET PRE XMP LISTING DL OL UL DIR MENU SELECT TABLE TITLE
STYLE SCRIPT H1 H2 H3 H4 H5 H6 TEXTAREA FORM BLOCKQUOTE
CAPTION ]
- define_method(element.downcase, m)
+ methods << <<-BEGIN + nn_element_def(element) + <<-END
+ def #{element.downcase}(attributes = {})
+ BEGIN
+ end
+ END
end
- end
- instance_method(:nOE_element_def).tap do |m|
# - O EMPTY
for element in %w[ IMG BASE BASEFONT BR AREA LINK PARAM HR INPUT
ISINDEX META ]
- define_method(element.downcase, m)
+ methods << <<-BEGIN + nOE_element_def(element) + <<-END
+ def #{element.downcase}(attributes = {})
+ BEGIN
+ end
+ END
end
- end
- instance_method(:nO_element_def).tap do |m|
# O O or - O
for element in %w[ HTML HEAD BODY P PLAINTEXT DT DD LI OPTION TR
TH TD ]
- define_method(element.downcase, m)
+ methods << <<-BEGIN + nO_element_def(element) + <<-END
+ def #{element.downcase}(attributes = {})
+ BEGIN
+ end
+ END
end
+ eval(methods)
end
end # Html3
@@ -858,7 +887,6 @@ class CGI
# Mixin module for HTML version 4 generation methods.
module Html4 # :nodoc:
- include TagMaker
# The DOCTYPE declaration for this version of HTML
def doctype
@@ -866,30 +894,42 @@ class CGI
end
# Initialise the HTML generation methods for this version.
- # - -
- instance_method(:nn_element_def).tap do |m|
+ def element_init
+ extend TagMaker
+ return if defined?(html)
+ methods = ""
+ # - -
for element in %w[ TT I B BIG SMALL EM STRONG DFN CODE SAMP KBD
VAR CITE ABBR ACRONYM SUB SUP SPAN BDO ADDRESS DIV MAP OBJECT
H1 H2 H3 H4 H5 H6 PRE Q INS DEL DL OL UL LABEL SELECT OPTGROUP
FIELDSET LEGEND BUTTON TABLE TITLE STYLE SCRIPT NOSCRIPT
TEXTAREA FORM A BLOCKQUOTE CAPTION ]
- define_method(element.downcase, m)
+ methods << <<-BEGIN + nn_element_def(element) + <<-END
+ def #{element.downcase}(attributes = {})
+ BEGIN
+ end
+ END
end
- end
- # - O EMPTY
- instance_method(:nOE_element_def).tap do |m|
+ # - O EMPTY
for element in %w[ IMG BASE BR AREA LINK PARAM HR INPUT COL META ]
- define_method(element.downcase, m)
+ methods << <<-BEGIN + nOE_element_def(element) + <<-END
+ def #{element.downcase}(attributes = {})
+ BEGIN
+ end
+ END
end
- end
- # O O or - O
- instance_method(:nO_element_def).tap do |m|
+ # O O or - O
for element in %w[ HTML BODY P DT DD LI OPTION THEAD TFOOT TBODY
COLGROUP TR TH TD HEAD ]
- define_method(element.downcase, m)
+ methods << <<-BEGIN + nO_element_def(element) + <<-END
+ def #{element.downcase}(attributes = {})
+ BEGIN
+ end
+ END
end
+ eval(methods)
end
end # Html4
@@ -897,7 +937,6 @@ class CGI
# Mixin module for HTML version 4 transitional generation methods.
module Html4Tr # :nodoc:
- include TagMaker
# The DOCTYPE declaration for this version of HTML
def doctype
@@ -905,32 +944,44 @@ class CGI
end
# Initialise the HTML generation methods for this version.
- # - -
- instance_method(:nn_element_def).tap do |m|
+ def element_init
+ extend TagMaker
+ return if defined?(html)
+ methods = ""
+ # - -
for element in %w[ TT I B U S STRIKE BIG SMALL EM STRONG DFN
CODE SAMP KBD VAR CITE ABBR ACRONYM FONT SUB SUP SPAN BDO
ADDRESS DIV CENTER MAP OBJECT APPLET H1 H2 H3 H4 H5 H6 PRE Q
INS DEL DL OL UL DIR MENU LABEL SELECT OPTGROUP FIELDSET
LEGEND BUTTON TABLE IFRAME NOFRAMES TITLE STYLE SCRIPT
NOSCRIPT TEXTAREA FORM A BLOCKQUOTE CAPTION ]
- define_method(element.downcase, m)
+ methods << <<-BEGIN + nn_element_def(element) + <<-END
+ def #{element.downcase}(attributes = {})
+ BEGIN
+ end
+ END
end
- end
- # - O EMPTY
- instance_method(:nOE_element_def).tap do |m|
+ # - O EMPTY
for element in %w[ IMG BASE BASEFONT BR AREA LINK PARAM HR INPUT
COL ISINDEX META ]
- define_method(element.downcase, m)
+ methods << <<-BEGIN + nOE_element_def(element) + <<-END
+ def #{element.downcase}(attributes = {})
+ BEGIN
+ end
+ END
end
- end
- # O O or - O
- instance_method(:nO_element_def).tap do |m|
+ # O O or - O
for element in %w[ HTML BODY P DT DD LI OPTION THEAD TFOOT TBODY
COLGROUP TR TH TD HEAD ]
- define_method(element.downcase, m)
+ methods << <<-BEGIN + nO_element_def(element) + <<-END
+ def #{element.downcase}(attributes = {})
+ BEGIN
+ end
+ END
end
+ eval(methods)
end
end # Html4Tr
@@ -938,7 +989,6 @@ class CGI
# Mixin module for generating HTML version 4 with framesets.
module Html4Fr # :nodoc:
- include TagMaker
# The DOCTYPE declaration for this version of HTML
def doctype
@@ -946,18 +996,27 @@ class CGI
end
# Initialise the HTML generation methods for this version.
- # - -
- instance_method(:nn_element_def).tap do |m|
+ def element_init
+ return if defined?(frameset)
+ methods = ""
+ # - -
for element in %w[ FRAMESET ]
- define_method(element.downcase, m)
+ methods << <<-BEGIN + nn_element_def(element) + <<-END
+ def #{element.downcase}(attributes = {})
+ BEGIN
+ end
+ END
end
- end
- # - O EMPTY
- instance_method(:nOE_element_def).tap do |m|
+ # - O EMPTY
for element in %w[ FRAME ]
- define_method(element.downcase, m)
+ methods << <<-BEGIN + nOE_element_def(element) + <<-END
+ def #{element.downcase}(attributes = {})
+ BEGIN
+ end
+ END
end
+ eval(methods)
end
end # Html4Fr
@@ -965,7 +1024,6 @@ class CGI
# Mixin module for HTML version 5 generation methods.
module Html5 # :nodoc:
- include TagMaker
# The DOCTYPE declaration for this version of HTML
def doctype
@@ -973,8 +1031,11 @@ class CGI
end
# Initialise the HTML generation methods for this version.
- # - -
- instance_method(:nn_element_def).tap do |m|
+ def element_init
+ extend TagMaker
+ return if defined?(html)
+ methods = ""
+ # - -
for element in %w[ SECTION NAV ARTICLE ASIDE HGROUP HEADER
FOOTER FIGURE FIGCAPTION S TIME U MARK RUBY BDI IFRAME
VIDEO AUDIO CANVAS DATALIST OUTPUT PROGRESS METER DETAILS
@@ -983,52 +1044,34 @@ class CGI
H1 H2 H3 H4 H5 H6 PRE Q INS DEL DL OL UL LABEL SELECT
FIELDSET LEGEND BUTTON TABLE TITLE STYLE SCRIPT NOSCRIPT
TEXTAREA FORM A BLOCKQUOTE CAPTION ]
- define_method(element.downcase, m)
+ methods += <<-BEGIN + nn_element_def(element) + <<-END
+ def #{element.downcase}(attributes = {})
+ BEGIN
+ end
+ END
end
- end
- # - O EMPTY
- instance_method(:nOE_element_def).tap do |m|
+ # - O EMPTY
for element in %w[ IMG BASE BR AREA LINK PARAM HR INPUT COL META
COMMAND EMBED KEYGEN SOURCE TRACK WBR ]
- define_method(element.downcase, m)
+ methods += <<-BEGIN + nOE_element_def(element) + <<-END
+ def #{element.downcase}(attributes = {})
+ BEGIN
+ end
+ END
end
- end
- # O O or - O
- instance_method(:nO_element_def).tap do |m|
+ # O O or - O
for element in %w[ HTML HEAD BODY P DT DD LI OPTION THEAD TFOOT TBODY
OPTGROUP COLGROUP RT RP TR TH TD ]
- define_method(element.downcase, m)
+ methods += <<-BEGIN + nO_element_def(element) + <<-END
+ def #{element.downcase}(attributes = {})
+ BEGIN
+ end
+ END
end
+ eval(methods)
end
end # Html5
-
- class HTML3
- include Html3
- include HtmlExtension
- end
-
- class HTML4
- include Html4
- include HtmlExtension
- end
-
- class HTML4Tr
- include Html4Tr
- include HtmlExtension
- end
-
- class HTML4Fr
- include Html4Tr
- include Html4Fr
- include HtmlExtension
- end
-
- class HTML5
- include Html5
- include HtmlExtension
- end
-
end
diff --git a/lib/cgi/session.rb b/lib/cgi/session.rb
index 606d5bc541..42b5ead81a 100644
--- a/lib/cgi/session.rb
+++ b/lib/cgi/session.rb
@@ -62,7 +62,7 @@ class CGI
# works with String data. This is the default
# storage type.
# CGI::Session::MemoryStore:: stores data in an in-memory hash. The data
- # only persists for as long as the current Ruby
+ # only persists for as long as the current ruby
# interpreter instance does.
# CGI::Session::PStore:: stores data in Marshalled format. Provided by
# cgi/session/pstore.rb. Supports data of any type,
@@ -308,7 +308,7 @@ class CGI
@data[key]
end
- # Set the session data for key +key+.
+ # Set the session date for key +key+.
def []=(key, val)
@write_lock ||= true
@data ||= @dbman.restore
@@ -437,14 +437,14 @@ class CGI
def delete
File::unlink @path+".lock" rescue nil
File::unlink @path+".new" rescue nil
- File::unlink @path rescue nil
+ File::unlink @path rescue Errno::ENOENT
end
end
# In-memory session storage class.
#
# Implements session storage as a global in-memory hash. Session
- # data will only persist for as long as the Ruby interpreter
+ # data will only persist for as long as the ruby interpreter
# instance does.
class MemoryStore
GLOBAL_HASH_TABLE = {} #:nodoc:
diff --git a/lib/cgi/util.rb b/lib/cgi/util.rb
index 199e17bbbc..41ae724c8c 100644
--- a/lib/cgi/util.rb
+++ b/lib/cgi/util.rb
@@ -1,22 +1,21 @@
-class CGI; module Util; end; extend Util; end
-module CGI::Util
+class CGI
@@accept_charset="UTF-8" unless defined?(@@accept_charset)
# URL-encode a string.
# url_encoded_string = CGI::escape("'Stop!' said Fred")
# # => "%27Stop%21%27+said+Fred"
- def escape(string)
+ def CGI::escape(string)
encoding = string.encoding
- string.b.gsub(/([^ a-zA-Z0-9_.-]+)/) do |m|
- '%' + m.unpack('H2' * m.bytesize).join('%').upcase
+ string.dup.force_encoding('ASCII-8BIT').gsub(/([^ a-zA-Z0-9_.-]+)/) do
+ '%' + $1.unpack('H2' * $1.bytesize).join('%').upcase
end.tr(' ', '+').force_encoding(encoding)
end
# URL-decode a string with encoding(optional).
# string = CGI::unescape("%27Stop%21%27+said+Fred")
# # => "'Stop!' said Fred"
- def unescape(string,encoding=@@accept_charset)
- str=string.tr('+', ' ').b.gsub(/((?:%[0-9a-fA-F]{2})+)/) do |m|
- [m.delete('%')].pack('H*')
+ def CGI::unescape(string,encoding=@@accept_charset)
+ str=string.tr('+', ' ').force_encoding(Encoding::ASCII_8BIT).gsub(/((?:%[0-9a-fA-F]{2})+)/) do
+ [$1.delete('%')].pack('H*')
end.force_encoding(encoding)
str.valid_encoding? ? str : str.force_encoding(string.encoding)
end
@@ -33,19 +32,18 @@ module CGI::Util
# Escape special characters in HTML, namely &\"<>
# CGI::escapeHTML('Usage: foo "bar" <baz>')
# # => "Usage: foo &quot;bar&quot; &lt;baz&gt;"
- def escapeHTML(string)
+ def CGI::escapeHTML(string)
string.gsub(/['&\"<>]/, TABLE_FOR_ESCAPE_HTML__)
end
# Unescape a string that has been HTML-escaped
# CGI::unescapeHTML("Usage: foo &quot;bar&quot; &lt;baz&gt;")
# # => "Usage: foo \"bar\" <baz>"
- def unescapeHTML(string)
- return string unless string.include? '&'
+ def CGI::unescapeHTML(string)
enc = string.encoding
- if enc != Encoding::UTF_8 && [Encoding::UTF_16BE, Encoding::UTF_16LE, Encoding::UTF_32BE, Encoding::UTF_32LE].include?(enc)
+ if [Encoding::UTF_16BE, Encoding::UTF_16LE, Encoding::UTF_32BE, Encoding::UTF_32LE].include?(enc)
return string.gsub(Regexp.new('&(apos|amp|quot|gt|lt|#[0-9]+|#x[0-9A-Fa-f]+);'.encode(enc))) do
- case $1.encode(Encoding::US_ASCII)
+ case $1.encode("US-ASCII")
when 'apos' then "'".encode(enc)
when 'amp' then '&'.encode(enc)
when 'quot' then '"'.encode(enc)
@@ -57,7 +55,7 @@ module CGI::Util
end
end
asciicompat = Encoding.compatible?(string, "a")
- string.gsub(/&(apos|amp|quot|gt|lt|\#[0-9]+|\#[xX][0-9A-Fa-f]+);/) do
+ string.gsub(/&(apos|amp|quot|gt|lt|\#[0-9]+|\#x[0-9A-Fa-f]+);/) do
match = $1.dup
case match
when 'apos' then "'"
@@ -90,12 +88,12 @@ module CGI::Util
end
# Synonym for CGI::escapeHTML(str)
- def escape_html(str)
+ def CGI::escape_html(str)
escapeHTML(str)
end
# Synonym for CGI::unescapeHTML(str)
- def unescape_html(str)
+ def CGI::unescape_html(str)
unescapeHTML(str)
end
@@ -112,7 +110,7 @@ module CGI::Util
#
# print CGI::escapeElement('<BR><A HREF="url"></A>', ["A", "IMG"])
# # "<BR>&lt;A HREF=&quot;url&quot;&gt;&lt;/A&gt"
- def escapeElement(string, *elements)
+ def CGI::escapeElement(string, *elements)
elements = elements[0] if elements[0].kind_of?(Array)
unless elements.empty?
string.gsub(/<\/?(?:#{elements.join("|")})(?!\w)(?:.|\n)*?>/i) do
@@ -132,11 +130,11 @@ module CGI::Util
# print CGI::unescapeElement(
# CGI::escapeHTML('<BR><A HREF="url"></A>'), ["A", "IMG"])
# # "&lt;BR&gt;<A HREF="url"></A>"
- def unescapeElement(string, *elements)
+ def CGI::unescapeElement(string, *elements)
elements = elements[0] if elements[0].kind_of?(Array)
unless elements.empty?
string.gsub(/&lt;\/?(?:#{elements.join("|")})(?!\w)(?:.|\n)*?&gt;/i) do
- unescapeHTML($&)
+ CGI::unescapeHTML($&)
end
else
string
@@ -144,12 +142,12 @@ module CGI::Util
end
# Synonym for CGI::escapeElement(str)
- def escape_element(str)
+ def CGI::escape_element(str)
escapeElement(str)
end
# Synonym for CGI::unescapeElement(str)
- def unescape_element(str)
+ def CGI::unescape_element(str)
unescapeElement(str)
end
@@ -163,11 +161,11 @@ module CGI::Util
#
# CGI::rfc1123_date(Time.now)
# # Sat, 01 Jan 2000 00:00:00 GMT
- def rfc1123_date(time)
+ def CGI::rfc1123_date(time)
t = time.clone.gmtime
return format("%s, %.2d %s %.4d %.2d:%.2d:%.2d GMT",
- RFC822_DAYS[t.wday], t.day, RFC822_MONTHS[t.month-1], t.year,
- t.hour, t.min, t.sec)
+ RFC822_DAYS[t.wday], t.day, RFC822_MONTHS[t.month-1], t.year,
+ t.hour, t.min, t.sec)
end
# Prettify (indent) an HTML string.
@@ -187,7 +185,7 @@ module CGI::Util
# # </BODY>
# # </HTML>
#
- def pretty(string, shift = " ")
+ def CGI::pretty(string, shift = " ")
lines = string.gsub(/(?!\A)<.*?>/m, "\n\\0").gsub(/<.*?>(?!\n)/m, "\\0\n")
end_pos = 0
while end_pos = lines.index(/^<\/(\w+)/, end_pos)
@@ -197,6 +195,4 @@ module CGI::Util
end
lines.gsub(/^((?:#{Regexp::quote(shift)})*)__(?=<\/?\w)/, '\1')
end
-
- alias h escapeHTML
end
diff --git a/lib/cmath.rb b/lib/cmath.rb
index 337c2e063a..d613a3f6f9 100644
--- a/lib/cmath.rb
+++ b/lib/cmath.rb
@@ -1,4 +1,6 @@
##
+# = CMath
+#
# CMath is a library that provides trigonometric and transcendental
# functions for complex numbers.
#
diff --git a/lib/csv.rb b/lib/csv.rb
index e5ecf5c9a8..279890e7e0 100644
--- a/lib/csv.rb
+++ b/lib/csv.rb
@@ -235,7 +235,6 @@ class CSV
#
def initialize(headers, fields, header_row = false)
@header_row = header_row
- headers.each { |h| h.freeze if h.is_a? String }
# handle extra headers or fields
@row = if headers.size > fields.size
@@ -278,7 +277,7 @@ class CSV
# This method will return the field value by +header+ or +index+. If a field
# is not found, +nil+ is returned.
#
- # When provided, +offset+ ensures that a header match occurs on or later
+ # When provided, +offset+ ensures that a header match occurrs on or later
# than the +offset+ index. You can use this to find duplicate headers,
# without resorting to hard-coding exact indices.
#
@@ -812,7 +811,7 @@ class CSV
#
# Removes any column or row for which the block returns +true+. In the
# default mixed mode or row mode, iteration is the standard row major
- # walking of rows. In column mode, iteration will +yield+ two element
+ # walking of rows. In column mode, interation will +yield+ two element
# tuples containing the column name and an Array of values for that column.
#
# This method returns the table for chaining.
@@ -835,7 +834,7 @@ class CSV
#
# In the default mixed mode or row mode, iteration is the standard row major
- # walking of rows. In column mode, iteration will +yield+ two element
+ # walking of rows. In column mode, interation will +yield+ two element
# tuples containing the column name and an Array of values for that column.
#
# This method returns the table for chaining.
@@ -983,7 +982,7 @@ class CSV
# attempting a conversion. If your data cannot be transcoded to UTF-8 the
# conversion will fail and the header will remain unchanged.
#
- # This Hash is intentionally left unfrozen and users should feel free to add
+ # This Hash is intetionally left unfrozen and users should feel free to add
# values to it that can be accessed by all CSV objects.
#
# To add a combo field, the value should be an Array of names. Combo fields
@@ -1052,6 +1051,133 @@ class CSV
end
#
+ # This method allows you to serialize an Array of Ruby objects to a String or
+ # File of CSV data. This is not as powerful as Marshal or YAML, but perhaps
+ # useful for spreadsheet and database interaction.
+ #
+ # Out of the box, this method is intended to work with simple data objects or
+ # Structs. It will serialize a list of instance variables and/or
+ # Struct.members().
+ #
+ # If you need need more complicated serialization, you can control the process
+ # by adding methods to the class to be serialized.
+ #
+ # A class method csv_meta() is responsible for returning the first row of the
+ # document (as an Array). This row is considered to be a Hash of the form
+ # key_1,value_1,key_2,value_2,... CSV::load() expects to find a class key
+ # with a value of the stringified class name and CSV::dump() will create this,
+ # if you do not define this method. This method is only called on the first
+ # object of the Array.
+ #
+ # The next method you can provide is an instance method called csv_headers().
+ # This method is expected to return the second line of the document (again as
+ # an Array), which is to be used to give each column a header. By default,
+ # CSV::load() will set an instance variable if the field header starts with an
+ # @ character or call send() passing the header as the method name and
+ # the field value as an argument. This method is only called on the first
+ # object of the Array.
+ #
+ # Finally, you can provide an instance method called csv_dump(), which will
+ # be passed the headers. This should return an Array of fields that can be
+ # serialized for this object. This method is called once for every object in
+ # the Array.
+ #
+ # The +io+ parameter can be used to serialize to a File, and +options+ can be
+ # anything CSV::new() accepts.
+ #
+ def self.dump(ary_of_objs, io = "", options = Hash.new)
+ obj_template = ary_of_objs.first
+
+ csv = new(io, options)
+
+ # write meta information
+ begin
+ csv << obj_template.class.csv_meta
+ rescue NoMethodError
+ csv << [:class, obj_template.class]
+ end
+
+ # write headers
+ begin
+ headers = obj_template.csv_headers
+ rescue NoMethodError
+ headers = obj_template.instance_variables.sort
+ if obj_template.class.ancestors.find { |cls| cls.to_s =~ /\AStruct\b/ }
+ headers += obj_template.members.map { |mem| "#{mem}=" }.sort
+ end
+ end
+ csv << headers
+
+ # serialize each object
+ ary_of_objs.each do |obj|
+ begin
+ csv << obj.csv_dump(headers)
+ rescue NoMethodError
+ csv << headers.map do |var|
+ if var[0] == ?@
+ obj.instance_variable_get(var)
+ else
+ obj[var[0..-2]]
+ end
+ end
+ end
+ end
+
+ if io.is_a? String
+ csv.string
+ else
+ csv.close
+ end
+ end
+
+ #
+ # This method is the reading counterpart to CSV::dump(). See that method for
+ # a detailed description of the process.
+ #
+ # You can customize loading by adding a class method called csv_load() which
+ # will be passed a Hash of meta information, an Array of headers, and an Array
+ # of fields for the object the method is expected to return.
+ #
+ # Remember that all fields will be Strings after this load. If you need
+ # something else, use +options+ to setup converters or provide a custom
+ # csv_load() implementation.
+ #
+ def self.load(io_or_str, options = Hash.new)
+ csv = new(io_or_str, options)
+
+ # load meta information
+ meta = Hash[*csv.shift]
+ cls = meta["class".encode(csv.encoding)].split("::".encode(csv.encoding)).
+ inject(Object) do |c, const|
+ c.const_get(const)
+ end
+
+ # load headers
+ headers = csv.shift
+
+ # unserialize each object stored in the file
+ results = csv.inject(Array.new) do |all, row|
+ begin
+ obj = cls.csv_load(meta, headers, row)
+ rescue NoMethodError
+ obj = cls.allocate
+ headers.zip(row) do |name, value|
+ if name[0] == ?@
+ obj.instance_variable_set(name, value)
+ else
+ obj.send(name, value)
+ end
+ end
+ end
+ all << obj
+ end
+
+ csv.close unless io_or_str.is_a? String
+
+ results
+ end
+
+ #
# :call-seq:
# filter( options = Hash.new ) { |row| ... }
# filter( input, options = Hash.new ) { |row| ... }
@@ -1117,7 +1243,6 @@ class CSV
# but transcode it to UTF-8 before CSV parses it.
#
def self.foreach(path, options = Hash.new, &block)
- return to_enum(__method__, path, options) unless block
open(path, options) do |csv|
csv.each(&block)
end
@@ -1133,7 +1258,7 @@ class CSV
# append CSV rows to the String and when the block exits, the final String
# will be returned.
#
- # Note that a passed String *is* modified by this method. Call dup() before
+ # Note that a passed String *is* modfied by this method. Call dup() before
# passing if you need a new String.
#
# The +options+ parameter can be anything CSV::new() understands. This method
@@ -1301,8 +1426,8 @@ class CSV
#
# This method is a shortcut for converting a single line of a CSV String into
- # an Array. Note that if +line+ contains multiple rows, anything beyond the
- # first row is ignored.
+ # a into an Array. Note that if +line+ contains multiple rows, anything
+ # beyond the first row is ignored.
#
# The +options+ parameter can be anything CSV::new() understands.
#
@@ -1471,12 +1596,11 @@ class CSV
# <b><tt>:skip_lines</tt></b>:: When set to an object responding to
# <tt>match</tt>, every line matching
# it is considered a comment and ignored
- # during parsing. When set to a String,
- # it is first converted to a Regexp.
- # When set to +nil+ no line is considered
- # a comment. If the passed object does
- # not respond to <tt>match</tt>,
- # <tt>ArgumentError</tt> is thrown.
+ # during parsing. When set to +nil+
+ # no line is considered a comment.
+ # If the passed object does not respond
+ # to <tt>match</tt>, <tt>ArgumentError</tt>
+ # is thrown.
#
# See CSV::DEFAULT_OPTIONS for the default settings.
#
@@ -1658,7 +1782,7 @@ class CSV
if @io.is_a?(StringIO) and
output.encoding != raw_encoding and
(compatible_encoding = Encoding.compatible?(@io.string, output))
- @io.set_encoding(compatible_encoding)
+ @io = StringIO.new(@io.string.force_encoding(compatible_encoding))
@io.seek(0, IO::SEEK_END)
end
@io << output
@@ -1969,7 +2093,7 @@ class CSV
else
begin
#
- # remember where we were (pos() will raise an exception if @io is pipe
+ # remember where we were (pos() will raise an axception if @io is pipe
# or not opened for reading)
#
saved_pos = @io.pos
@@ -2122,12 +2246,10 @@ class CSV
# Stores the pattern of comments to skip from the provided options.
#
# The pattern must respond to +.match+, else ArgumentError is raised.
- # Strings are converted to a Regexp.
#
# See also CSV.new
def init_comments(options)
@skip_lines = options.delete(:skip_lines)
- @skip_lines = Regexp.new(@skip_lines) if @skip_lines.is_a? String
if @skip_lines and not @skip_lines.respond_to?(:match)
raise ArgumentError, ":skip_lines has to respond to matches"
end
@@ -2175,7 +2297,7 @@ class CSV
header = @use_headers && !headers ? @headers[index] : nil
converter[field, FieldInfo.new(index, lineno, header)]
end
- break unless field.is_a? String # short-circuit pipeline for speed
+ break unless field.is_a? String # short-curcuit pipeline for speed
end
field # final state of each field, converted or original
end
@@ -2209,7 +2331,6 @@ class CSV
# prepare converted and unconverted copies
row = @headers if row.nil?
@headers = convert_fields(@headers, true)
- @headers.each { |h| h.freeze if h.is_a? String }
if @return_headers # return headers
return self.class::Row.new(@headers, row, true)
diff --git a/lib/debug.rb b/lib/debug.rb
index fcbf849f0d..0cf81c0885 100644
--- a/lib/debug.rb
+++ b/lib/debug.rb
@@ -752,18 +752,9 @@ EOHELP
(id ? ":in `#{id.id2name}'" : "")
end
- def script_lines(file, line)
- unless (lines = SCRIPT_LINES__[file]) and lines != true
- Tracer::Single.get_line(file, line) if File.exist?(file)
- lines = SCRIPT_LINES__[file]
- lines = nil if lines == true
- end
- lines
- end
-
def display_list(b, e, file, line)
- if lines = script_lines(file, line)
- stdout.printf "[%d, %d] in %s\n", b, e, file
+ stdout.printf "[%d, %d] in %s\n", b, e, file
+ if lines = SCRIPT_LINES__[file] and lines != true
b.upto(e) do |n|
if n > 0 && lines[n-1]
if n == line
@@ -779,8 +770,11 @@ EOHELP
end
def line_at(file, line)
- lines = script_lines(file, line)
- if lines and line = lines[line-1]
+ lines = SCRIPT_LINES__[file]
+ if lines
+ return "\n" if lines == true
+ line = lines[line-1]
+ return "\n" unless line
return line
end
return "\n"
@@ -897,34 +891,22 @@ EOHELP
@stdout = STDOUT
class << DEBUGGER__
- # Returns the IO used as stdout. Defaults to STDOUT
def stdout
@stdout
end
- # Sets the IO used as stdout. Defaults to STDOUT
def stdout=(s)
@stdout = s
end
- # Returns the display expression list
- #
- # See DEBUGGER__ for more usage
def display
@display
end
- # Returns the list of break points where execution will be stopped.
- #
- # See DEBUGGER__ for more usage
def break_points
@break_points
end
- # Returns the list of waiting threads.
- #
- # When stepping through the traces of a function, thread gets suspended, to
- # be resumed later.
def waiting
@waiting
end
diff --git a/lib/delegate.rb b/lib/delegate.rb
index c33f7e40df..e46e4f8c23 100644
--- a/lib/delegate.rb
+++ b/lib/delegate.rb
@@ -43,16 +43,9 @@
class Delegator < BasicObject
kernel = ::Kernel.dup
kernel.class_eval do
- alias __raise__ raise
[:to_s,:inspect,:=~,:!~,:===,:<=>,:eql?,:hash].each do |m|
undef_method m
end
- private_instance_methods.each do |m|
- if /\Ablock_given\?\z|iterator\?\z|\A__raise__\z/ =~ m
- next
- end
- undef_method m
- end
end
include kernel
@@ -74,18 +67,11 @@ class Delegator < BasicObject
# Handles the magic of delegation through \_\_getobj\_\_.
#
def method_missing(m, *args, &block)
- r = true
- target = self.__getobj__ {r = false}
+ target = self.__getobj__
begin
- if r && target.respond_to?(m)
- target.__send__(m, *args, &block)
- elsif ::Kernel.respond_to?(m, true)
- ::Kernel.instance_method(m).bind(self).(*args, &block)
- else
- super(m, *args, &block)
- end
+ target.respond_to?(m) ? target.__send__(m, *args, &block) : super(m, *args, &block)
ensure
- $@.delete_if {|t| %r"\A#{Regexp.quote(__FILE__)}:(?:#{[__LINE__-7, __LINE__-5, __LINE__-3].join('|')}):"o =~ t} if $@
+ $@.delete_if {|t| %r"\A#{Regexp.quote(__FILE__)}:#{__LINE__-2}:"o =~ t} if $@
end
end
@@ -94,10 +80,8 @@ class Delegator < BasicObject
# call through \_\_getobj\_\_.
#
def respond_to_missing?(m, include_private)
- r = true
- target = self.__getobj__ {r = false}
- r &&= target.respond_to?(m, include_private)
- if r && include_private && !target.respond_to?(m, false)
+ r = self.__getobj__.respond_to?(m, include_private)
+ if r && include_private && !self.__getobj__.respond_to?(m, false)
warn "#{caller(3)[0]}: delegator does not forward private method \##{m}"
return false
end
@@ -158,7 +142,7 @@ class Delegator < BasicObject
# method calls are being delegated to.
#
def __getobj__
- __raise__ ::NotImplementedError, "need to define `__getobj__'"
+ raise NotImplementedError, "need to define `__getobj__'"
end
#
@@ -166,7 +150,7 @@ class Delegator < BasicObject
# to _obj_.
#
def __setobj__(obj)
- __raise__ ::NotImplementedError, "need to define `__setobj__'"
+ raise NotImplementedError, "need to define `__setobj__'"
end
#
@@ -246,34 +230,6 @@ end
# and even to change the object being delegated to at a later time with
# #__setobj__.
#
-# class User
-# def born_on
-# Date.new(1989, 09, 10)
-# end
-# end
-#
-# class UserDecorator < SimpleDelegator
-# def birth_year
-# born_on.year
-# end
-# end
-#
-# decorated_user = UserDecorator.new(User.new)
-# decorated_user.birth_year #=> 1989
-# decorated_user.__getobj__ #=> #<User: ...>
-#
-# A SimpleDelegator instance can take advantage of the fact that SimpleDelegator
-# is a subclass of +Delegator+ to call <tt>super</tt> to have methods called on
-# the object being delegated to.
-#
-# class SuperArray < SimpleDelegator
-# def [](*args)
-# super + 1
-# end
-# end
-#
-# SuperArray.new([1])[0] #=> 2
-#
# Here's a simple example that takes advantage of the fact that
# SimpleDelegator's delegation object can be changed at any time.
#
@@ -309,10 +265,6 @@ end
class SimpleDelegator<Delegator
# Returns the current object method calls are being delegated to.
def __getobj__
- unless defined?(@delegate_sd_obj)
- return yield if block_given?
- __raise__ ::ArgumentError, "not delegated"
- end
@delegate_sd_obj
end
@@ -331,7 +283,7 @@ class SimpleDelegator<Delegator
# puts names[1] # => Sinclair
#
def __setobj__(obj)
- __raise__ ::ArgumentError, "cannot delegate to self" if self.equal?(obj)
+ raise ArgumentError, "cannot delegate to self" if self.equal?(obj)
@delegate_sd_obj = obj
end
end
@@ -387,14 +339,10 @@ def DelegateClass(superclass)
methods -= [:to_s,:inspect,:=~,:!~,:===]
klass.module_eval do
def __getobj__ # :nodoc:
- unless defined?(@delegate_dc_obj)
- return yield if block_given?
- __raise__ ::ArgumentError, "not delegated"
- end
@delegate_dc_obj
end
def __setobj__(obj) # :nodoc:
- __raise__ ::ArgumentError, "cannot delegate to self" if self.equal?(obj)
+ raise ArgumentError, "cannot delegate to self" if self.equal?(obj)
@delegate_dc_obj = obj
end
methods.each do |method|
diff --git a/lib/drb/drb.rb b/lib/drb/drb.rb
index 97965228bb..fa914f877d 100644
--- a/lib/drb/drb.rb
+++ b/lib/drb/drb.rb
@@ -231,7 +231,7 @@ require 'drb/eq'
# def get_logger(name)
# if !@loggers.has_key? name
# # make the filename safe, then declare it to be so
-# fname = name.gsub(/[.\/\\\:]/, "_").untaint
+# fname = name.gsub(/[.\/]/, "_").untaint
# @loggers[name] = Logger.new(name, @basedir + "/" + fname)
# end
# return @loggers[name]
@@ -426,8 +426,6 @@ module DRb
# An exception wrapping an error object
class DRbRemoteError < DRbError
-
- # Creates a new remote error that wraps the Exception +error+
def initialize(error)
@reason = error.class.to_s
super("#{error.message} (#{error.class})")
@@ -507,16 +505,7 @@ module DRb
end
end
- # An Array wrapper that can be sent to another server via DRb.
- #
- # All entries in the array will be dumped or be references that point to
- # the local server.
-
class DRbArray
-
- # Creates a new DRbArray that either dumps or wraps all the items in the
- # Array +ary+ so they can be loaded by a remote DRb server.
-
def initialize(ary)
@ary = ary.collect { |obj|
if obj.kind_of? DRbUndumped
@@ -532,11 +521,11 @@ module DRb
}
end
- def self._load(s) # :nodoc:
+ def self._load(s)
Marshal::load(s)
end
- def _dump(lv) # :nodoc:
+ def _dump(lv)
Marshal.dump(@ary)
end
end
@@ -640,7 +629,7 @@ module DRb
end
private
- def make_proxy(obj, error=false) # :nodoc:
+ def make_proxy(obj, error=false)
if error
DRbRemoteError.new(obj)
else
@@ -804,13 +793,10 @@ module DRb
module_function :auto_load
end
- # The default drb protocol which communicates over a TCP socket.
+ # The default drb protocol.
#
- # The DRb TCP protocol URI looks like:
- # <code>druby://<host>:<port>?<option></code>. The option is optional.
-
+ # Communicates over a TCP socket.
class DRbTCPSocket
- # :stopdoc:
private
def self.parse_uri(uri)
if uri =~ /^druby:\/\/(.*?):(\d+)(\?(.*))?$/
@@ -826,12 +812,7 @@ module DRb
public
- # Open a client connection to +uri+ (DRb URI string) using configuration
- # +config+.
- #
- # This can raise DRb::DRbBadScheme or DRb::DRbBadURI if +uri+ is not for a
- # recognized protocol. See DRb::DRbServer.new for information on built-in
- # URI protocols.
+ # Open a client connection to +uri+ using configuration +config+.
def self.open(uri, config)
host, port, = parse_uri(uri)
host.untaint
@@ -840,7 +821,6 @@ module DRb
self.new(uri, soc, config)
end
- # Returns the hostname of this server
def self.getservername
host = Socket::gethostname
begin
@@ -850,9 +830,6 @@ module DRb
end
end
- # For the families available for +host+, returns a TCPServer on +port+.
- # If +port+ is 0 the first available port is used. IPv4 servers are
- # preferred over IPv6 servers.
def self.open_server_inaddr_any(host, port)
infos = Socket::getaddrinfo(host, nil,
Socket::AF_UNSPEC,
@@ -863,7 +840,6 @@ module DRb
return TCPServer.open('0.0.0.0', port) if families.has_key?('AF_INET')
return TCPServer.open('::', port) if families.has_key?('AF_INET6')
return TCPServer.open(port)
- # :stopdoc:
end
# Open a server listening for connections at +uri+ using
@@ -1032,9 +1008,6 @@ module DRb
self.new_with(uri, ref)
end
- # Creates a DRb::DRbObject given the reference information to the remote
- # host +uri+ and object +ref+.
-
def self.new_with(uri, ref)
it = self.allocate
it.instance_variable_set(:@uri, uri)
@@ -1085,7 +1058,6 @@ module DRb
undef :to_s
undef :to_a if respond_to?(:to_a)
- # Routes respond_to? to the referenced remote object.
def respond_to?(msg_id, priv=false)
case msg_id
when :_dump
@@ -1097,7 +1069,7 @@ module DRb
end
end
- # Routes method calls to the referenced remote object.
+ # Routes method calls to the referenced object.
def method_missing(msg_id, *a, &b)
if DRb.here?(@uri)
obj = DRb.to_obj(@ref)
@@ -1122,8 +1094,7 @@ module DRb
end
end
- # Given the +uri+ of another host executes the block provided.
- def self.with_friend(uri) # :nodoc:
+ def self.with_friend(uri)
friend = DRb.fetch_server(uri)
return yield() unless friend
@@ -1134,9 +1105,7 @@ module DRb
Thread.current['DRb'] = save if friend
end
- # Returns a modified backtrace from +result+ with the +uri+ where each call
- # in the backtrace came from.
- def self.prepare_backtrace(uri, result) # :nodoc:
+ def self.prepare_backtrace(uri, result)
prefix = "(#{uri}) "
bt = []
result.backtrace.each do |x|
@@ -1267,9 +1236,9 @@ module DRb
@@load_limit = sz
end
- # Set the default access control list to +acl+. The default ACL is +nil+.
+ # Set the default value for the :acl option.
#
- # See also DRb::ACL and #new()
+ # See #new(). The initial default value is nil.
def self.default_acl(acl)
@@acl = acl
end
@@ -1281,9 +1250,6 @@ module DRb
@@idconv = idconv
end
- # Set the default safe level to +level+. The default safe level is 0
- #
- # See #new for more information.
def self.default_safe_level(level)
@@safe_level = level
end
@@ -1341,9 +1307,6 @@ module DRb
# :argc_limit :: the maximum number of arguments to a remote
# method accepted by the server. Defaults to
# 256.
- # :safe_level :: The safe level of the DRbServer. The attribute
- # sets $SAFE for methods performed in the main_loop.
- # Defaults to 0.
#
# The default values of these options can be modified on
# a class-wide basis by the class methods #default_argc_limit,
@@ -1403,10 +1366,6 @@ module DRb
# The configuration of this DRbServer
attr_reader :config
- # The safe level for this server. This is a number corresponding to
- # $SAFE.
- #
- # The default safe_level is 0
attr_reader :safe_level
# Set whether to operate in verbose mode.
@@ -1424,7 +1383,6 @@ module DRb
@thread.alive?
end
- # Is +uri+ the URI for this server?
def here?(uri)
@exported_uri.include?(uri)
end
@@ -1453,10 +1411,6 @@ module DRb
end
private
-
- ##
- # Starts the DRb main loop in a new thread.
-
def run
Thread.start do
begin
@@ -1766,10 +1720,7 @@ module DRb
end
module_function :thread
- # Set the default id conversion object.
- #
- # This is expected to be an instance such as DRb::DRbIdConv that responds to
- # #to_id and #to_obj that can convert objects to and from DRb references.
+ # Set the default id conv object.
#
# See DRbServer#default_id_conv.
def install_id_conv(idconv)
@@ -1777,7 +1728,7 @@ module DRb
end
module_function :install_id_conv
- # Set the default ACL to +acl+.
+ # Set the default acl.
#
# See DRb::DRbServer.default_acl.
def install_acl(acl)
@@ -1786,24 +1737,12 @@ module DRb
module_function :install_acl
@mutex = Mutex.new
- def mutex # :nodoc:
+ def mutex
@mutex
end
module_function :mutex
@server = {}
- # Registers +server+ with DRb.
- #
- # This is called when a new DRb::DRbServer is created.
- #
- # If there is no primary server then +server+ becomes the primary server.
- #
- # Example:
- #
- # require 'drb'
- #
- # s = DRb::DRbServer.new # automatically calls regist_server
- # DRb.fetch_server s.uri #=> #<DRb::DRbServer:0x...>
def regist_server(server)
@server[server.uri] = server
mutex.synchronize do
@@ -1812,15 +1751,11 @@ module DRb
end
module_function :regist_server
- # Removes +server+ from the list of registered servers.
def remove_server(server)
@server.delete(server.uri)
end
module_function :remove_server
- # Retrieves the server with the given +uri+.
- #
- # See also regist_server and remove_server.
def fetch_server(uri)
@server[uri]
end
diff --git a/lib/drb/eq.rb b/lib/drb/eq.rb
index 553f30c598..6328c81202 100644
--- a/lib/drb/eq.rb
+++ b/lib/drb/eq.rb
@@ -1,5 +1,5 @@
module DRb
- class DRbObject # :nodoc:
+ class DRbObject
def ==(other)
return false unless DRbObject === other
(@ref == other.__drbref) && (@uri == other.__drburi)
diff --git a/lib/drb/extserv.rb b/lib/drb/extserv.rb
index c70ced877c..bb11211cd1 100644
--- a/lib/drb/extserv.rb
+++ b/lib/drb/extserv.rb
@@ -42,8 +42,6 @@ module DRb
end
end
-# :stopdoc:
-
if __FILE__ == $0
class Foo
include DRbUndumped
diff --git a/lib/drb/gw.rb b/lib/drb/gw.rb
index b3568ab08d..b7a5f5383f 100644
--- a/lib/drb/gw.rb
+++ b/lib/drb/gw.rb
@@ -2,36 +2,8 @@ require 'drb/drb'
require 'monitor'
module DRb
-
- # Gateway id conversion forms a gateway between different DRb protocols or
- # networks.
- #
- # The gateway needs to install this id conversion and create servers for
- # each of the protocols or networks it will be a gateway between. It then
- # needs to create a server that attaches to each of these networks. For
- # example:
- #
- # require 'drb/drb'
- # require 'drb/unix'
- # require 'drb/gw'
- #
- # DRb.install_id_conv DRb::GWIdConv.new
- # gw = DRb::GW.new
- # s1 = DRb::DRbServer.new 'drbunix:/path/to/gateway', gw
- # s2 = DRb::DRbServer.new 'druby://example:10000', gw
- #
- # s1.thread.join
- # s2.thread.join
- #
- # Each client must register services with the gateway, for example:
- #
- # DRb.start_service 'drbunix:', nil # an anonymous server
- # gw = DRbObject.new nil, 'drbunix:/path/to/gateway'
- # gw[:unix] = some_service
- # DRb.thread.join
-
class GWIdConv < DRbIdConv
- def to_obj(ref) # :nodoc:
+ def to_obj(ref)
if Array === ref && ref[0] == :DRbObject
return DRbObject.new_with(ref[1], ref[2])
end
@@ -39,29 +11,19 @@ module DRb
end
end
- # The GW provides a synchronized store for participants in the gateway to
- # communicate.
-
class GW
include MonitorMixin
-
- # Creates a new GW
-
def initialize
super()
@hash = {}
end
- # Retrieves +key+ from the GW
-
def [](key)
synchronize do
@hash[key]
end
end
- # Stores value +v+ at +key+ in the GW
-
def []=(key, v)
synchronize do
@hash[key] = v
@@ -69,7 +31,7 @@ module DRb
end
end
- class DRbObject # :nodoc:
+ class DRbObject
def self._load(s)
uri, ref = Marshal.load(s)
if DRb.uri == uri
diff --git a/lib/drb/invokemethod.rb b/lib/drb/invokemethod.rb
index 71ebec11f6..353dbd00d8 100644
--- a/lib/drb/invokemethod.rb
+++ b/lib/drb/invokemethod.rb
@@ -1,6 +1,6 @@
# for ruby-1.8.0
-module DRb # :nodoc: all
+module DRb
class DRbServer
module InvokeMethod18Mixin
def block_yield(x)
diff --git a/lib/drb/observer.rb b/lib/drb/observer.rb
index cab9ebc60b..149426db7b 100644
--- a/lib/drb/observer.rb
+++ b/lib/drb/observer.rb
@@ -1,12 +1,9 @@
require 'observer'
module DRb
- # The Observable module extended to DRb. See Observable for details.
module DRbObservable
include Observable
- # Notifies observers of a change in state. See also
- # Observable#notify_observers
def notify_observers(*arg)
if defined? @observer_state and @observer_state
if defined? @observer_peers
diff --git a/lib/drb/ssl.rb b/lib/drb/ssl.rb
index 78c0038abc..c4f76987de 100644
--- a/lib/drb/ssl.rb
+++ b/lib/drb/ssl.rb
@@ -5,24 +5,10 @@ require 'singleton'
module DRb
- # The protocol for DRb over an SSL socket
- #
- # The URI for a DRb socket over SSL is:
- # <code>drbssl://<host>:<port>?<option></code>. The option is optional
class DRbSSLSocket < DRbTCPSocket
- # SSLConfig handles the needed SSL information for establishing a
- # DRbSSLSocket connection, including generating the X509 / RSA pair.
- #
- # An instance of this config can be passed to DRbSSLSocket.new,
- # DRbSSLSocket.open and DRbSSLSocket.open_server
- #
- # See DRb::DRbSSLSocket::SSLConfig.new for more details
class SSLConfig
- # Default values for a SSLConfig instance.
- #
- # See DRb::DRbSSLSocket::SSLConfig.new for more details
DEFAULT = {
:SSLCertificate => nil,
:SSLPrivateKey => nil,
@@ -39,90 +25,6 @@ module DRb
:SSLCertComment => "Generated by Ruby/OpenSSL"
}
- # Create a new DRb::DRbSSLSocket::SSLConfig instance
- #
- # The DRb::DRbSSLSocket will take either a +config+ Hash or an instance
- # of SSLConfig, and will setup the certificate for its session for the
- # configuration. If want it to generate a generic certificate, the bare
- # minimum is to provide the :SSLCertName
- #
- # === Config options
- #
- # From +config+ Hash:
- #
- # :SSLCertificate ::
- # An instance of OpenSSL::X509::Certificate. If this is not provided,
- # then a generic X509 is generated, with a correspond :SSLPrivateKey
- #
- # :SSLPrivateKey ::
- # A private key instance, like OpenSSL::PKey::RSA. This key must be
- # the key that signed the :SSLCertificate
- #
- # :SSLClientCA ::
- # An OpenSSL::X509::Certificate, or Array of certificates that will
- # used as ClientCAs in the SSL Context
- #
- # :SSLCACertificatePath ::
- # A path to the directory of CA certificates. The certificates must
- # be in PEM format.
- #
- # :SSLCACertificateFile ::
- # A path to a CA certificate file, in PEM format.
- #
- # :SSLTmpDhCallback ::
- # A DH callback. See OpenSSL::SSL::SSLContext.tmp_dh_callback
- #
- # :SSLVerifyMode ::
- # This is the SSL verification mode. See OpenSSL::SSL::VERIFY_* for
- # available modes. The default is OpenSSL::SSL::VERIFY_NONE
- #
- # :SSLVerifyDepth ::
- # Number of CA certificates to walk, when verifying a certificate
- # chain.
- #
- # :SSLVerifyCallback ::
- # A callback to be used for additional verification. See
- # OpenSSL::SSL::SSLContext.verify_callback
- #
- # :SSLCertificateStore ::
- # A OpenSSL::X509::Store used for verification of certificates
- #
- # :SSLCertName ::
- # Issuer name for the certificate. This is required when generating
- # the certificate (if :SSLCertificate and :SSLPrivateKey were not
- # given). The value of this is to be an Array of pairs:
- #
- # [["C", "Raleigh"], ["ST","North Carolina"],
- # ["CN","fqdn.example.com"]]
- #
- # See also OpenSSL::X509::Name
- #
- # :SSLCertComment ::
- # A comment to be used for generating the certificate. The default is
- # "Generated by Ruby/OpenSSL"
- #
- #
- # === Example
- #
- # These values can be added after the fact, like a Hash.
- #
- # require 'drb/ssl'
- # c = DRb::DRbSSLSocket::SSLConfig.new {}
- # c[:SSLCertificate] =
- # OpenSSL::X509::Certificate.new(File.read('mycert.crt'))
- # c[:SSLPrivateKey] = OpenSSL::PKey::RSA.new(File.read('mycert.key'))
- # c[:SSLVerifyMode] = OpenSSL::SSL::VERIFY_PEER
- # c[:SSLCACertificatePath] = "/etc/ssl/certs/"
- # c.setup_certificate
- #
- # or
- #
- # require 'drb/ssl'
- # c = DRb::DRbSSLSocket::SSLConfig.new({
- # :SSLCertName => [["CN" => DRb::DRbSSLSocket.getservername]]
- # })
- # c.setup_certificate
- #
def initialize(config)
@config = config
@cert = config[:SSLCertificate]
@@ -130,13 +32,10 @@ module DRb
@ssl_ctx = nil
end
- # A convenience method to access the values like a Hash
def [](key);
@config[key] || DEFAULT[key]
end
- # Connect to IO +tcp+, with context of the current certificate
- # configuration
def connect(tcp)
ssl = ::OpenSSL::SSL::SSLSocket.new(tcp, @ssl_ctx)
ssl.sync = true
@@ -144,8 +43,6 @@ module DRb
ssl
end
- # Accept connection to IO +tcp+, with context of the current certificate
- # configuration
def accept(tcp)
ssl = OpenSSL::SSL::SSLSocket.new(tcp, @ssl_ctx)
ssl.sync = true
@@ -153,9 +50,6 @@ module DRb
ssl
end
- # Ensures that :SSLCertificate and :SSLPrivateKey have been provided
- # or that a new certificate is generated with the other parameters
- # provided.
def setup_certificate
if @cert && @pkey
return
@@ -201,8 +95,6 @@ module DRb
@pkey = rsa
end
- # Establish the OpenSSL::SSL::SSLContext with the configuration
- # parameters provided.
def setup_ssl_context
ctx = ::OpenSSL::SSL::SSLContext.new
ctx.cert = @cert
@@ -219,12 +111,7 @@ module DRb
end
end
- # Parse the dRuby +uri+ for an SSL connection.
- #
- # Expects drbssl://...
- #
- # Raises DRbBadScheme or DRbBadURI if +uri+ is not matching or malformed
- def self.parse_uri(uri) # :nodoc:
+ def self.parse_uri(uri)
if uri =~ /^drbssl:\/\/(.*?):(\d+)(\?(.*))?$/
host = $1
port = $2.to_i
@@ -236,15 +123,6 @@ module DRb
end
end
- # Return an DRb::DRbSSLSocket instance as a client-side connection,
- # with the SSL connected. This is called from DRb::start_service or while
- # connecting to a remote object:
- #
- # DRb.start_service 'drbssl://localhost:0', front, config
- #
- # +uri+ is the URI we are connected to,
- # <code>'drbssl://localhost:0'</code> above, +config+ is our
- # configuration. Either a Hash or DRb::DRbSSLSocket::SSLConfig
def self.open(uri, config)
host, port, = parse_uri(uri)
host.untaint
@@ -256,15 +134,6 @@ module DRb
self.new(uri, ssl, ssl_conf, true)
end
- # Returns a DRb::DRbSSLSocket instance as a server-side connection, with
- # the SSL connected. This is called from DRb::start_service or while
- # connecting to a remote object:
- #
- # DRb.start_service 'drbssl://localhost:0', front, config
- #
- # +uri+ is the URI we are connected to,
- # <code>'drbssl://localhost:0'</code> above, +config+ is our
- # configuration. Either a Hash or DRb::DRbSSLSocket::SSLConfig
def self.open_server(uri, config)
uri = 'drbssl://:0' unless uri
host, port, = parse_uri(uri)
@@ -283,35 +152,19 @@ module DRb
self.new(@uri, soc, ssl_conf, false)
end
- # This is a convenience method to parse +uri+ and separate out any
- # additional options appended in the +uri+.
- #
- # Returns an option-less uri and the option => [uri,option]
- #
- # The +config+ is completely unused, so passing nil is sufficient.
- def self.uri_option(uri, config) # :nodoc:
+ def self.uri_option(uri, config)
host, port, option = parse_uri(uri)
return "drbssl://#{host}:#{port}", option
end
- # Create a DRb::DRbSSLSocket instance.
- #
- # +uri+ is the URI we are connected to.
- # +soc+ is the tcp socket we are bound to.
- # +config+ is our configuration. Either a Hash or SSLConfig
- # +is_established+ is a boolean of whether +soc+ is currently established
- #
- # This is called automatically based on the DRb protocol.
def initialize(uri, soc, config, is_established)
@ssl = is_established ? soc : nil
super(uri, soc.to_io, config)
end
- # Returns the SSL stream
- def stream; @ssl; end # :nodoc:
+ def stream; @ssl; end
- # Closes the SSL stream before closing the dRuby connection.
- def close # :nodoc:
+ def close
if @ssl
@ssl.close
@ssl = nil
@@ -319,7 +172,7 @@ module DRb
super
end
- def accept # :nodoc:
+ def accept
begin
while true
soc = @socket.accept
@@ -328,9 +181,8 @@ module DRb
end
begin
ssl = @config.accept(soc)
- rescue Exception
- soc.close
- raise
+ ensure
+ soc.close if $!
end
self.class.new(uri, ssl, @config, true)
rescue OpenSSL::SSL::SSLError
diff --git a/lib/drb/timeridconv.rb b/lib/drb/timeridconv.rb
index 4ea3035f39..b460e2c987 100644
--- a/lib/drb/timeridconv.rb
+++ b/lib/drb/timeridconv.rb
@@ -2,17 +2,8 @@ require 'drb/drb'
require 'monitor'
module DRb
-
- # Timer id conversion keeps objects alive for a certain amount of time after
- # their last access. The default time period is 600 seconds and can be
- # changed upon initialization.
- #
- # To use TimerIdConv:
- #
- # DRb.install_id_conv TimerIdConv.new 60 # one minute
-
class TimerIdConv < DRbIdConv
- class TimerHolder2 # :nodoc:
+ class TimerHolder2
include MonitorMixin
class InvalidIndexError < RuntimeError; end
@@ -80,19 +71,18 @@ module DRb
end
end
- # Creates a new TimerIdConv which will hold objects for +timeout+ seconds.
def initialize(timeout=600)
@holder = TimerHolder2.new(timeout)
end
- def to_obj(ref) # :nodoc:
+ def to_obj(ref)
return super if ref.nil?
@holder.fetch(ref)
rescue TimerHolder2::InvalidIndexError
raise "invalid reference"
end
- def to_id(obj) # :nodoc:
+ def to_id(obj)
return @holder.add(obj)
end
end
diff --git a/lib/drb/unix.rb b/lib/drb/unix.rb
index 4d245780a5..6de5052451 100644
--- a/lib/drb/unix.rb
+++ b/lib/drb/unix.rb
@@ -6,13 +6,7 @@ raise(LoadError, "UNIXServer is required") unless defined?(UNIXServer)
module DRb
- # Implements DRb over a UNIX socket
- #
- # DRb UNIX socket URIs look like <code>drbunix:<path>?<option></code>. The
- # option is optional.
-
class DRbUNIXSocket < DRbTCPSocket
- # :stopdoc:
def self.parse_uri(uri)
if /^drbunix:(.*?)(\?(.*))?$/ =~ uri
filename = $1
@@ -111,5 +105,4 @@ module DRb
end
DRbProtocol.add_protocol(DRbUNIXSocket)
- # :startdoc:
end
diff --git a/lib/e2mmap.rb b/lib/e2mmap.rb
index b75c431f92..18a7ca003d 100644
--- a/lib/e2mmap.rb
+++ b/lib/e2mmap.rb
@@ -1,17 +1,13 @@
#
-#--
-# e2mmap.rb - for Ruby 1.1
+# e2mmap.rb - for ruby 1.1
# $Release Version: 2.0$
# $Revision: 1.10 $
# by Keiju ISHITSUKA
#
-#++
+# --
+# Usage:
#
-# Helper module for easily defining exceptions with predefined messages.
-#
-# == Usage
-#
-# 1.
+# U1)
# class Foo
# extend Exception2MessageMapper
# def_e2message ExistingExceptionClass, "message..."
@@ -19,10 +15,10 @@
# ...
# end
#
-# 2.
+# U2)
# module Error
# extend Exception2MessageMapper
-# def_e2message ExistingExceptionClass, "message..."
+# def_e2meggage ExistingExceptionClass, "message..."
# def_exception :NewExceptionClass, "message..."[, superclass]
# ...
# end
@@ -34,7 +30,7 @@
# foo = Foo.new
# foo.Fail ....
#
-# 3.
+# U3)
# module Error
# extend Exception2MessageMapper
# def_e2message ExistingExceptionClass, "message..."
@@ -54,7 +50,7 @@
module Exception2MessageMapper
@RCS_ID='-$Id: e2mmap.rb,v 1.10 1999/02/17 12:33:17 keiju Exp keiju $-'
- E2MM = Exception2MessageMapper # :nodoc:
+ E2MM = Exception2MessageMapper
def E2MM.extend_object(cl)
super
@@ -170,7 +166,7 @@ module Exception2MessageMapper
E2MM.def_exception(E2MM,
:ErrNotRegisteredException,
- "not registered exception(%s)")
+ "not registerd exception(%s)")
end
diff --git a/lib/erb.rb b/lib/erb.rb
index 5d32c47774..b1c200af13 100644
--- a/lib/erb.rb
+++ b/lib/erb.rb
@@ -63,7 +63,7 @@ require "cgi/util"
#
# == Character encodings
#
-# ERB (or Ruby code generated by ERB) returns a string in the same
+# ERB (or ruby code generated by ERB) returns a string in the same
# character encoding as the input string. When the input string has
# a magic comment, however, it returns a string in the encoding specified
# by the magic comment.
@@ -252,13 +252,12 @@ require "cgi/util"
# * Amrita (smart at producing HTML/XML);
# * cs/Template (written in C for speed);
# * RDoc, distributed with Ruby, uses its own template engine, which can be reused elsewhere;
-# * and others; search {RubyGems.org}[https://rubygems.org/] or
-# {The Ruby Toolbox}[https://www.ruby-toolbox.com/].
+# * and others; search the RAA.
#
# Rails, the web application framework, uses ERB to create views.
#
class ERB
- Revision = '$Date:: $' # :nodoc: #'
+ Revision = '$Date:: $' #'
# Returns revision information for the erb.rb module.
def self.version
@@ -597,7 +596,7 @@ class ERB
def compile(s)
enc = s.encoding
raise ArgumentError, "#{enc} is not ASCII compatible" if enc.dummy?
- s = s.b # see String#b
+ s = s.dup.force_encoding("ASCII-8BIT") # don't use constant Enoding::ASCII_8BIT for miniruby
enc = detect_magic_comment(s) || enc
out = Buffer.new(self, enc)
@@ -801,9 +800,6 @@ class ERB
@filename = nil
end
- ##
- # Creates a new compiler for ERB. See ERB::Compiler.new for details
-
def make_compiler(trim_mode)
ERB::Compiler.new(trim_mode)
end
@@ -851,16 +847,13 @@ class ERB
end
end
- ##
- # Returns a new binding each time *near* TOPLEVEL_BINDING for runs that do
- # not specify a binding.
-
def new_toplevel
+ # New binding each time *near* toplevel for unspecified runs
TOPLEVEL_BINDING.dup
end
private :new_toplevel
- # Define _methodname_ as instance method of _mod_ from compiled Ruby source.
+ # Define _methodname_ as instance method of _mod_ from compiled ruby source.
#
# example:
# filename = 'example.rhtml' # 'arg1' and 'arg2' are used in example.rhtml
@@ -949,8 +942,8 @@ class ERB
# Programming%20Ruby%3A%20%20The%20Pragmatic%20Programmer%27s%20Guide
#
def url_encode(s)
- s.to_s.b.gsub(/[^a-zA-Z0-9_\-.]/n) { |m|
- sprintf("%%%02X", m.unpack("C")[0])
+ s.to_s.dup.force_encoding("ASCII-8BIT").gsub(/[^a-zA-Z0-9_\-.]/n) {
+ sprintf("%%%02X", $&.unpack("C")[0])
}
end
alias u url_encode
diff --git a/lib/fileutils.rb b/lib/fileutils.rb
index 3b4e30213e..af2d19ac61 100644
--- a/lib/fileutils.rb
+++ b/lib/fileutils.rb
@@ -83,16 +83,96 @@
#
module FileUtils
+ @fileutils_output = $stderr
+ @fileutils_label = ''
+ extend self
- def self.private_module_function(name) #:nodoc:
- module_function name
- private_class_method name
+ #
+ # This module has all methods of FileUtils module, but it outputs messages
+ # before acting. This equates to passing the <tt>:verbose</tt> flag to
+ # methods in FileUtils.
+ #
+ module Verbose
+ include FileUtils
+ @fileutils_output = $stderr
+ @fileutils_label = ''
+ extend self
+ end
+
+ #
+ # This module has all methods of FileUtils module, but never changes
+ # files/directories. This equates to passing the <tt>:noop</tt> flag
+ # to methods in FileUtils.
+ #
+ module NoWrite
+ include FileUtils
+ @fileutils_output = $stderr
+ @fileutils_label = ''
+ extend self
+ end
+
+ #
+ # This module has all methods of FileUtils module, but never changes
+ # files/directories, with printing message before acting.
+ # This equates to passing the <tt>:noop</tt> and <tt>:verbose</tt> flag
+ # to methods in FileUtils.
+ #
+ module DryRun
+ include FileUtils
+ @fileutils_output = $stderr
+ @fileutils_label = ''
+ extend self
end
# This hash table holds command options.
OPT_TABLE = {} #:nodoc: internal use only
#
+ def self.define_command(name, *options)
+ OPT_TABLE[name.to_s] = options
+
+ if options.include?(:verbose)
+ Verbose.module_eval(<<-EOS, __FILE__, __LINE__ + 1)
+ def #{name}(*args)
+ super(*fu_update_option(args, :verbose => true))
+ end
+ EOS
+ end
+ if options.include?(:noop)
+ NoWrite.module_eval(<<-EOS, __FILE__, __LINE__ + 1)
+ def #{name}(*args)
+ super(*fu_update_option(args, :noop => true))
+ end
+ EOS
+ DryRun.module_eval(<<-EOS, __FILE__, __LINE__ + 1)
+ def #{name}(*args)
+ super(*fu_update_option(args, :noop => true, :verbose => true))
+ end
+ EOS
+ else
+ NoWrite.module_eval(<<-EOS, __FILE__, __LINE__ + 1)
+ def #{name}(*); end
+ EOS
+ DryRun.module_eval(<<-EOS, __FILE__, __LINE__ + 1)
+ def #{name}(*); end
+ EOS
+ end
+
+ [self, Verbose, DryRun, NoWrite].each do |mod|
+ mod.module_eval(<<-EOS, __FILE__, __LINE__ + 1)
+ private :#{name}
+ class << self; public :#{name}; end
+ EOS
+ end
+ end
+
+ class << self
+ private :define_command
+ end
+
+public
+
+ #
# Options: (none)
#
# Returns the name of the current directory.
@@ -100,10 +180,11 @@ module FileUtils
def pwd
Dir.pwd
end
- module_function :pwd
alias getwd pwd
- module_function :getwd
+
+ define_command('pwd')
+ define_command('getwd')
#
# Options: verbose
@@ -125,13 +206,11 @@ module FileUtils
Dir.chdir(dir, &block)
fu_output_message 'cd -' if options[:verbose] and block
end
- module_function :cd
alias chdir cd
- module_function :chdir
- OPT_TABLE['cd'] =
- OPT_TABLE['chdir'] = [:verbose]
+ define_command('cd', :verbose)
+ define_command('chdir', :verbose)
#
# Options: (none)
@@ -152,12 +231,8 @@ module FileUtils
end
true
end
- module_function :uptodate?
- def remove_tailing_slash(dir)
- dir == '/' ? dir : dir.chomp(?/)
- end
- private_module_function :remove_tailing_slash
+ define_command('uptodate?')
#
# Options: mode noop verbose
@@ -179,9 +254,8 @@ module FileUtils
fu_mkdir dir, options[:mode]
end
end
- module_function :mkdir
- OPT_TABLE['mkdir'] = [:mode, :noop, :verbose]
+ define_command('mkdir', :mode, :noop, :verbose)
#
# Options: mode noop verbose
@@ -205,7 +279,7 @@ module FileUtils
fu_output_message "mkdir -p #{options[:mode] ? ('-m %03o ' % options[:mode]) : ''}#{list.join ' '}" if options[:verbose]
return *list if options[:noop]
- list.map {|path| remove_tailing_slash(path)}.each do |path|
+ list.map {|path| path.chomp(?/) }.each do |path|
# optimize for the most common case
begin
fu_mkdir path, options[:mode]
@@ -230,19 +304,18 @@ module FileUtils
return *list
end
- module_function :mkdir_p
alias mkpath mkdir_p
alias makedirs mkdir_p
- module_function :mkpath
- module_function :makedirs
- OPT_TABLE['mkdir_p'] =
- OPT_TABLE['mkpath'] =
- OPT_TABLE['makedirs'] = [:mode, :noop, :verbose]
+ define_command('mkdir_p', :mode, :noop, :verbose)
+ define_command('mkpath', :mode, :noop, :verbose)
+ define_command('makedirs', :mode, :noop, :verbose)
+
+private
def fu_mkdir(path, mode) #:nodoc:
- path = remove_tailing_slash(path)
+ path = path.chomp(?/)
if mode
Dir.mkdir path, mode
File.chmod mode, path
@@ -250,7 +323,8 @@ module FileUtils
Dir.mkdir path
end
end
- private_module_function :fu_mkdir
+
+public
#
# Options: noop, verbose
@@ -270,10 +344,9 @@ module FileUtils
return if options[:noop]
list.each do |dir|
begin
- Dir.rmdir(dir = remove_tailing_slash(dir))
+ Dir.rmdir(dir = dir.chomp(?/))
if parents
until (parent = File.dirname(dir)) == '.' or parent == dir
- dir = parent
Dir.rmdir(dir)
end
end
@@ -281,9 +354,8 @@ module FileUtils
end
end
end
- module_function :rmdir
- OPT_TABLE['rmdir'] = [:parents, :noop, :verbose]
+ define_command('rmdir', :parents, :noop, :verbose)
#
# Options: force noop verbose
@@ -316,13 +388,11 @@ module FileUtils
File.link s, d
end
end
- module_function :ln
alias link ln
- module_function :link
- OPT_TABLE['ln'] =
- OPT_TABLE['link'] = [:force, :noop, :verbose]
+ define_command('ln', :force, :noop, :verbose)
+ define_command('link', :force, :noop, :verbose)
#
# Options: force noop verbose
@@ -355,13 +425,11 @@ module FileUtils
File.symlink s, d
end
end
- module_function :ln_s
alias symlink ln_s
- module_function :symlink
- OPT_TABLE['ln_s'] =
- OPT_TABLE['symlink'] = [:force, :noop, :verbose]
+ define_command('ln_s', :force, :noop, :verbose)
+ define_command('symlink', :force, :noop, :verbose)
#
# Options: noop verbose
@@ -375,9 +443,8 @@ module FileUtils
options[:force] = true
ln_s src, dest, options
end
- module_function :ln_sf
- OPT_TABLE['ln_sf'] = [:noop, :verbose]
+ define_command('ln_sf', :noop, :verbose)
#
# Options: preserve noop verbose
@@ -400,13 +467,11 @@ module FileUtils
copy_file s, d, options[:preserve]
end
end
- module_function :cp
alias copy cp
- module_function :copy
- OPT_TABLE['cp'] =
- OPT_TABLE['copy'] = [:preserve, :noop, :verbose]
+ define_command('cp', :preserve, :noop, :verbose)
+ define_command('copy', :preserve, :noop, :verbose)
#
# Options: preserve noop verbose dereference_root remove_destination
@@ -417,7 +482,7 @@ module FileUtils
#
# +src+ can be a list of files.
#
- # # Installing Ruby library "mylib" under the site_ruby
+ # # Installing ruby library "mylib" under the site_ruby
# FileUtils.rm_r site_ruby + '/mylib', :force
# FileUtils.cp_r 'lib/', site_ruby + '/mylib'
#
@@ -441,10 +506,8 @@ module FileUtils
copy_entry s, d, options[:preserve], options[:dereference_root], options[:remove_destination]
end
end
- module_function :cp_r
- OPT_TABLE['cp_r'] = [:preserve, :noop, :verbose,
- :dereference_root, :remove_destination]
+ define_command('cp_r', :preserve, :noop, :verbose, :dereference_root, :remove_destination)
#
# Copies a file system entry +src+ to +dest+.
@@ -463,16 +526,15 @@ module FileUtils
# If +remove_destination+ is true, this method removes each destination file before copy.
#
def copy_entry(src, dest, preserve = false, dereference_root = false, remove_destination = false)
- Entry_.new(src, nil, dereference_root).wrap_traverse(proc do |ent|
+ Entry_.new(src, nil, dereference_root).traverse do |ent|
destent = Entry_.new(dest, ent.rel, false)
File.unlink destent.path if remove_destination && File.file?(destent.path)
ent.copy destent.path
- end, proc do |ent|
- destent = Entry_.new(dest, ent.rel, false)
ent.copy_metadata destent.path if preserve
- end)
+ end
end
- module_function :copy_entry
+
+ define_command(:copy_entry)
#
# Copies file contents of +src+ to +dest+.
@@ -483,7 +545,8 @@ module FileUtils
ent.copy_file dest
ent.copy_metadata dest if preserve
end
- module_function :copy_file
+
+ define_command(:copy_file)
#
# Copies stream +src+ to +dest+.
@@ -493,7 +556,8 @@ module FileUtils
def copy_stream(src, dest)
IO.copy_stream(src, dest)
end
- module_function :copy_stream
+
+ define_command(:copy_stream)
#
# Options: force noop verbose
@@ -536,18 +600,19 @@ module FileUtils
end
end
end
- module_function :mv
alias move mv
- module_function :move
- OPT_TABLE['mv'] =
- OPT_TABLE['move'] = [:force, :noop, :verbose, :secure]
+ define_command('mv', :force, :noop, :verbose, :secure)
+ define_command('move', :force, :noop, :verbose, :secure)
+
+private
def rename_cannot_overwrite_file? #:nodoc:
/cygwin|mswin|mingw|bccwin|emx/ =~ RUBY_PLATFORM
end
- private_module_function :rename_cannot_overwrite_file?
+
+public
#
# Options: force noop verbose
@@ -569,13 +634,11 @@ module FileUtils
remove_file path, options[:force]
end
end
- module_function :rm
alias remove rm
- module_function :remove
- OPT_TABLE['rm'] =
- OPT_TABLE['remove'] = [:force, :noop, :verbose]
+ define_command('rm', :force, :noop, :verbose)
+ define_command('remove', :force, :noop, :verbose)
#
# Options: noop verbose
@@ -590,13 +653,11 @@ module FileUtils
options[:force] = true
rm list, options
end
- module_function :rm_f
alias safe_unlink rm_f
- module_function :safe_unlink
- OPT_TABLE['rm_f'] =
- OPT_TABLE['safe_unlink'] = [:noop, :verbose]
+ define_command('rm_f', :noop, :verbose)
+ define_command('safe_unlink', :noop, :verbose)
#
# Options: force noop verbose secure
@@ -633,9 +694,8 @@ module FileUtils
end
end
end
- module_function :rm_r
- OPT_TABLE['rm_r'] = [:force, :noop, :verbose, :secure]
+ define_command('rm_r', :force, :noop, :verbose, :secure)
#
# Options: noop verbose secure
@@ -653,13 +713,11 @@ module FileUtils
options[:force] = true
rm_r list, options
end
- module_function :rm_rf
alias rmtree rm_rf
- module_function :rmtree
- OPT_TABLE['rm_rf'] =
- OPT_TABLE['rmtree'] = [:noop, :verbose, :secure]
+ define_command('rm_rf', :noop, :verbose, :secure)
+ define_command('rmtree', :noop, :verbose, :secure)
#
# This method removes a file system entry +path+. +path+ shall be a
@@ -747,7 +805,10 @@ module FileUtils
rescue
raise unless force
end
- module_function :remove_entry_secure
+
+ define_command(:remove_entry_secure)
+
+private
def fu_have_symlink? #:nodoc:
File.symlink nil, nil
@@ -756,12 +817,12 @@ module FileUtils
rescue TypeError
return true
end
- private_module_function :fu_have_symlink?
def fu_stat_identical_entry?(a, b) #:nodoc:
a.dev == b.dev and a.ino == b.ino
end
- private_module_function :fu_stat_identical_entry?
+
+public
#
# This method removes a file system entry +path+.
@@ -781,7 +842,8 @@ module FileUtils
rescue
raise unless force
end
- module_function :remove_entry
+
+ define_command(:remove_entry)
#
# Removes a file +path+.
@@ -792,7 +854,8 @@ module FileUtils
rescue
raise unless force
end
- module_function :remove_file
+
+ define_command(:remove_file)
#
# Removes a directory +dir+ and its contents recursively.
@@ -801,7 +864,8 @@ module FileUtils
def remove_dir(path, force = false)
remove_entry path, force # FIXME?? check if it is a directory
end
- module_function :remove_dir
+
+ define_command(:remove_dir)
#
# Returns true if the contents of a file A and a file B are identical.
@@ -817,12 +881,13 @@ module FileUtils
}
}
end
- module_function :compare_file
alias identical? compare_file
alias cmp compare_file
- module_function :identical?
- module_function :cmp
+
+ define_command(:compare_file)
+ define_command(:identical?)
+ define_command(:cmp)
#
# Returns true if the contents of a stream +a+ and +b+ are identical.
@@ -838,7 +903,8 @@ module FileUtils
end while sa == sb
false
end
- module_function :compare_stream
+
+ define_command(:compare_stream)
#
# Options: mode preserve noop verbose
@@ -863,96 +929,74 @@ module FileUtils
end
end
end
- module_function :install
- OPT_TABLE['install'] = [:mode, :preserve, :noop, :verbose]
+ define_command('install', :mode, :preserve, :noop, :verbose)
+
+private
def user_mask(target) #:nodoc:
- target.each_char.inject(0) do |mask, chr|
- case chr
- when "u"
- mask | 04700
- when "g"
- mask | 02070
- when "o"
- mask | 01007
- when "a"
- mask | 07777
- else
- raise ArgumentError, "invalid `who' symbol in file mode: #{chr}"
+ mask = 0
+ target.each_byte do |byte_chr|
+ case byte_chr.chr
+ when "u"
+ mask |= 04700
+ when "g"
+ mask |= 02070
+ when "o"
+ mask |= 01007
+ when "a"
+ mask |= 07777
end
end
+ mask
end
- private_module_function :user_mask
- def apply_mask(mode, user_mask, op, mode_mask)
- case op
- when '='
- (mode & ~user_mask) | (user_mask & mode_mask)
- when '+'
- mode | (user_mask & mode_mask)
- when '-'
- mode & ~(user_mask & mode_mask)
+ def mode_mask(mode, path) #:nodoc:
+ mask = 0
+ mode.each_byte do |byte_chr|
+ case byte_chr.chr
+ when "r"
+ mask |= 0444
+ when "w"
+ mask |= 0222
+ when "x"
+ mask |= 0111
+ when "X"
+ mask |= 0111 if FileTest::directory? path
+ when "s"
+ mask |= 06000
+ when "t"
+ mask |= 01000
+ end
end
+ mask
end
- private_module_function :apply_mask
- def symbolic_modes_to_i(mode_sym, path) #:nodoc:
- mode_sym.split(/,/).inject(File.stat(path).mode & 07777) do |current_mode, clause|
- target, *actions = clause.split(/([=+-])/)
- raise ArgumentError, "invalid file mode: #{mode_sym}" if actions.empty?
- target = 'a' if target.empty?
+ def symbolic_modes_to_i(modes, path) #:nodoc:
+ current_mode = (File.stat(path).mode & 07777)
+ modes.split(/,/).inject(0) do |mode, mode_sym|
+ mode_sym = "a#{mode_sym}" if mode_sym =~ %r!^[+-=]!
+ target, mode = mode_sym.split %r![+-=]!
user_mask = user_mask(target)
- actions.each_slice(2) do |op, perm|
- need_apply = op == '='
- mode_mask = (perm || '').each_char.inject(0) do |mask, chr|
- case chr
- when "r"
- mask | 0444
- when "w"
- mask | 0222
- when "x"
- mask | 0111
- when "X"
- if FileTest.directory? path
- mask | 0111
- else
- mask
- end
- when "s"
- mask | 06000
- when "t"
- mask | 01000
- when "u", "g", "o"
- if mask.nonzero?
- current_mode = apply_mask(current_mode, user_mask, op, mask)
- end
- need_apply = false
- copy_mask = user_mask(chr)
- (current_mode & copy_mask) / (copy_mask & 0111) * (user_mask & 0111)
- else
- raise ArgumentError, "invalid `perm' symbol in file mode: #{chr}"
- end
- end
-
- if mode_mask.nonzero? || need_apply
- current_mode = apply_mask(current_mode, user_mask, op, mode_mask)
- end
+ mode_mask = mode_mask(mode ? mode : "", path)
+
+ case mode_sym
+ when /=/
+ current_mode &= ~(user_mask)
+ current_mode |= user_mask & mode_mask
+ when /\+/
+ current_mode |= user_mask & mode_mask
+ when /-/
+ current_mode &= ~(user_mask & mode_mask)
end
- current_mode
end
end
- private_module_function :symbolic_modes_to_i
def fu_mode(mode, path) #:nodoc:
mode.is_a?(String) ? symbolic_modes_to_i(mode, path) : mode
end
- private_module_function :fu_mode
- def mode_to_s(mode) #:nodoc:
- mode.is_a?(String) ? mode : "%o" % mode
- end
- private_module_function :mode_to_s
+public
#
# Options: noop verbose
@@ -990,15 +1034,14 @@ module FileUtils
def chmod(mode, list, options = {})
fu_check_options options, OPT_TABLE['chmod']
list = fu_list(list)
- fu_output_message sprintf('chmod %s %s', mode_to_s(mode), list.join(' ')) if options[:verbose]
+ fu_output_message sprintf('chmod %o %s', mode, list.join(' ')) if options[:verbose]
return if options[:noop]
list.each do |path|
Entry_.new(path).chmod(fu_mode(mode, path))
end
end
- module_function :chmod
- OPT_TABLE['chmod'] = [:noop, :verbose]
+ define_command('chmod', :noop, :verbose)
#
# Options: noop verbose force
@@ -1012,9 +1055,9 @@ module FileUtils
def chmod_R(mode, list, options = {})
fu_check_options options, OPT_TABLE['chmod_R']
list = fu_list(list)
- fu_output_message sprintf('chmod -R%s %s %s',
+ fu_output_message sprintf('chmod -R%s %o %s',
(options[:force] ? 'f' : ''),
- mode_to_s(mode), list.join(' ')) if options[:verbose]
+ mode, list.join(' ')) if options[:verbose]
return if options[:noop]
list.each do |root|
Entry_.new(root).traverse do |ent|
@@ -1026,9 +1069,8 @@ module FileUtils
end
end
end
- module_function :chmod_R
- OPT_TABLE['chmod_R'] = [:noop, :verbose, :force]
+ define_command('chmod_R', :noop, :verbose, :force)
#
# Options: noop verbose
@@ -1045,8 +1087,8 @@ module FileUtils
def chown(user, group, list, options = {})
fu_check_options options, OPT_TABLE['chown']
list = fu_list(list)
- fu_output_message sprintf('chown %s %s',
- (group ? "#{user}:#{group}" : user || ':'),
+ fu_output_message sprintf('chown %s%s',
+ [user,group].compact.join(':') + ' ',
list.join(' ')) if options[:verbose]
return if options[:noop]
uid = fu_get_uid(user)
@@ -1055,9 +1097,8 @@ module FileUtils
Entry_.new(path).chown uid, gid
end
end
- module_function :chown
- OPT_TABLE['chown'] = [:noop, :verbose]
+ define_command('chown', :noop, :verbose)
#
# Options: noop verbose force
@@ -1074,13 +1115,14 @@ module FileUtils
def chown_R(user, group, list, options = {})
fu_check_options options, OPT_TABLE['chown_R']
list = fu_list(list)
- fu_output_message sprintf('chown -R%s %s %s',
+ fu_output_message sprintf('chown -R%s %s%s',
(options[:force] ? 'f' : ''),
- (group ? "#{user}:#{group}" : user || ':'),
+ [user,group].compact.join(':') + ' ',
list.join(' ')) if options[:verbose]
return if options[:noop]
uid = fu_get_uid(user)
gid = fu_get_gid(group)
+ return unless uid or gid
list.each do |root|
Entry_.new(root).traverse do |ent|
begin
@@ -1091,9 +1133,10 @@ module FileUtils
end
end
end
- module_function :chown_R
- OPT_TABLE['chown_R'] = [:noop, :verbose, :force]
+ define_command('chown_R', :noop, :verbose, :force)
+
+private
begin
require 'etc'
@@ -1109,7 +1152,6 @@ module FileUtils
Etc.getpwnam(user).uid
end
end
- private_module_function :fu_get_uid
def fu_get_gid(group) #:nodoc:
return nil unless group
@@ -1122,7 +1164,6 @@ module FileUtils
Etc.getgrnam(group).gid
end
end
- private_module_function :fu_get_gid
rescue LoadError
# need Win32 support???
@@ -1130,14 +1171,14 @@ module FileUtils
def fu_get_uid(user) #:nodoc:
user # FIXME
end
- private_module_function :fu_get_uid
def fu_get_gid(group) #:nodoc:
group # FIXME
end
- private_module_function :fu_get_gid
end
+public
+
#
# Options: noop verbose
#
@@ -1150,7 +1191,7 @@ module FileUtils
def touch(list, options = {})
fu_check_options options, OPT_TABLE['touch']
list = fu_list(list)
- nocreate = options[:nocreate]
+ created = nocreate = options[:nocreate]
t = options[:mtime]
if options[:verbose]
fu_output_message "touch #{nocreate ? '-c ' : ''}#{t ? t.strftime('-t %Y%m%d%H%M.%S ') : ''}#{list.join ' '}"
@@ -1170,11 +1211,10 @@ module FileUtils
end
end
end
- module_function :touch
- OPT_TABLE['touch'] = [:noop, :verbose, :mtime, :nocreate]
+ define_command('touch', :noop, :verbose, :mtime, :nocreate)
- private
+private
module StreamUtils_
private
@@ -1496,17 +1536,7 @@ module FileUtils
yield self
end
- def wrap_traverse(pre, post)
- pre.call self
- if directory?
- entries.each do |ent|
- ent.wrap_traverse pre, post
- end
- end
- post.call self
- end
-
- private
+ private
$fileutils_rb_have_lchmod = nil
@@ -1562,10 +1592,11 @@ module FileUtils
end
end # class Entry_
+private
+
def fu_list(arg) #:nodoc:
[arg].flatten.map {|path| File.path(path) }
end
- private_module_function :fu_list
def fu_each_src_dest(src, dest) #:nodoc:
fu_each_src_dest0(src, dest) do |s, d|
@@ -1573,7 +1604,6 @@ module FileUtils
yield s, d, File.stat(s)
end
end
- private_module_function :fu_each_src_dest
def fu_each_src_dest0(src, dest) #:nodoc:
if tmp = Array.try_convert(src)
@@ -1590,12 +1620,10 @@ module FileUtils
end
end
end
- private_module_function :fu_each_src_dest0
def fu_same?(a, b) #:nodoc:
File.identical?(a, b)
end
- private_module_function :fu_same?
def fu_check_options(options, optdecl) #:nodoc:
h = options.dup
@@ -1604,7 +1632,6 @@ module FileUtils
end
raise ArgumentError, "no such option: #{h.keys.join(' ')}" unless h.empty?
end
- private_module_function :fu_check_options
def fu_update_option(args, new) #:nodoc:
if tmp = Hash.try_convert(args.last)
@@ -1614,17 +1641,12 @@ module FileUtils
end
args
end
- private_module_function :fu_update_option
-
- @fileutils_output = $stderr
- @fileutils_label = ''
def fu_output_message(msg) #:nodoc:
@fileutils_output ||= $stderr
@fileutils_label ||= ''
@fileutils_output.puts @fileutils_label + msg
end
- private_module_function :fu_output_message
#
# Returns an Array of method names which have any options.
@@ -1649,7 +1671,7 @@ module FileUtils
#
# p FileUtils.have_option?(:cp, :noop) #=> true
# p FileUtils.have_option?(:rm, :force) #=> true
- # p FileUtils.have_option?(:rm, :preserve) #=> false
+ # p FileUtils.have_option?(:rm, :perserve) #=> false
#
def FileUtils.have_option?(mid, opt)
li = OPT_TABLE[mid.to_s] or raise ArgumentError, "no such method: #{mid}"
@@ -1674,91 +1696,27 @@ module FileUtils
OPT_TABLE.keys.select {|m| OPT_TABLE[m].include?(opt) }
end
- LOW_METHODS = singleton_methods(false) - collect_method(:noop).map(&:intern)
- module LowMethods
- module_eval("private\n" + ::FileUtils::LOW_METHODS.map {|name| "def #{name}(*)end"}.join("\n"),
- __FILE__, __LINE__)
- end
-
- METHODS = singleton_methods() - [:private_module_function,
- :commands, :options, :have_option?, :options_of, :collect_method]
-
+ # LOW_METHODS
#
- # This module has all methods of FileUtils module, but it outputs messages
- # before acting. This equates to passing the <tt>:verbose</tt> flag to
- # methods in FileUtils.
+ # :pwd, :getwd, :cd, :chdir,
+ # :uptodate?, :copy_entry, :copy_file, :copy_stream, :remove_entry_secure,
+ # :remove_entry, :remove_file, :remove_dir, :compare_file, :identical?,
+ # :cmp, :compare_stream
#
- module Verbose
- include FileUtils
- @fileutils_output = $stderr
- @fileutils_label = ''
- ::FileUtils.collect_method(:verbose).each do |name|
- module_eval(<<-EOS, __FILE__, __LINE__ + 1)
- def #{name}(*args)
- super(*fu_update_option(args, :verbose => true))
- end
- private :#{name}
- EOS
- end
- extend self
- class << self
- ::FileUtils::METHODS.each do |m|
- public m
- end
- end
- end
+ # DEPRECATED - Only here for backward compatibility.
+ LOW_METHODS = (commands - collect_method(:noop)).map(&:to_sym)
- #
- # This module has all methods of FileUtils module, but never changes
- # files/directories. This equates to passing the <tt>:noop</tt> flag
- # to methods in FileUtils.
- #
- module NoWrite
- include FileUtils
- include LowMethods
- @fileutils_output = $stderr
- @fileutils_label = ''
- ::FileUtils.collect_method(:noop).each do |name|
- module_eval(<<-EOS, __FILE__, __LINE__ + 1)
- def #{name}(*args)
- super(*fu_update_option(args, :noop => true))
- end
- private :#{name}
- EOS
- end
- extend self
- class << self
- ::FileUtils::METHODS.each do |m|
- public m
- end
- end
- end
+ # METHODS
#
- # This module has all methods of FileUtils module, but never changes
- # files/directories, with printing message before acting.
- # This equates to passing the <tt>:noop</tt> and <tt>:verbose</tt> flag
- # to methods in FileUtils.
+ # :pwd, :getwd, :cd, :chdir, :uptodate?, :mkdir, :mkdir_p, :mkpath, :makedirs,
+ # :rmdir, :ln, :link, :ln_s, :symlink, :ln_sf, :cp, :copy, :cp_r, :copy_entry,
+ # :copy_file, :copy_stream, :mv, :move, :rm, :remove, :rm_f, :safe_unlink,
+ # :rm_r, :rm_rf, :rmtree, :remove_entry_secure, :remove_entry, :remove_file,
+ # :remove_dir, :compare_file, :identical?, :cmp, :compare_stream, :install,
+ # :chmod, :chmod_R, :chown, :chown_R, :touch
#
- module DryRun
- include FileUtils
- include LowMethods
- @fileutils_output = $stderr
- @fileutils_label = ''
- ::FileUtils.collect_method(:noop).each do |name|
- module_eval(<<-EOS, __FILE__, __LINE__ + 1)
- def #{name}(*args)
- super(*fu_update_option(args, :noop => true, :verbose => true))
- end
- private :#{name}
- EOS
- end
- extend self
- class << self
- ::FileUtils::METHODS.each do |m|
- public m
- end
- end
- end
+ # DEPRECATED - Only here for backward compatibility.
+ METHODS = commands.map(&:to_sym)
end
diff --git a/lib/find.rb b/lib/find.rb
index 6f3e4282ed..571609cdef 100644
--- a/lib/find.rb
+++ b/lib/find.rb
@@ -37,36 +37,30 @@ module Find
def find(*paths) # :yield: path
block_given? or return enum_for(__method__, *paths)
- fs_encoding = Encoding.find("filesystem")
-
- paths.collect!{|d| raise Errno::ENOENT unless File.exist?(d); d.dup}.each do |path|
- enc = path.encoding == Encoding::US_ASCII ? fs_encoding : path.encoding
- ps = [path]
- while file = ps.shift
- catch(:prune) do
- yield file.dup.taint
+ paths.collect!{|d| raise Errno::ENOENT unless File.exist?(d); d.dup}
+ while file = paths.shift
+ catch(:prune) do
+ yield file.dup.taint
+ begin
+ s = File.lstat(file)
+ rescue Errno::ENOENT, Errno::EACCES, Errno::ENOTDIR, Errno::ELOOP, Errno::ENAMETOOLONG
+ next
+ end
+ if s.directory? then
begin
- s = File.lstat(file)
+ fs = Dir.entries(file)
rescue Errno::ENOENT, Errno::EACCES, Errno::ENOTDIR, Errno::ELOOP, Errno::ENAMETOOLONG
next
end
- if s.directory? then
- begin
- fs = Dir.entries(file, encoding: enc)
- rescue Errno::ENOENT, Errno::EACCES, Errno::ENOTDIR, Errno::ELOOP, Errno::ENAMETOOLONG
- next
- end
- fs.sort!
- fs.reverse_each {|f|
- next if f == "." or f == ".."
- f = File.join(file, f)
- ps.unshift f.untaint
- }
- end
+ fs.sort!
+ fs.reverse_each {|f|
+ next if f == "." or f == ".."
+ f = File.join(file, f)
+ paths.unshift f.untaint
+ }
end
end
end
- nil
end
#
diff --git a/lib/forwardable.rb b/lib/forwardable.rb
index ecc5f03843..d7116ed1bc 100644
--- a/lib/forwardable.rb
+++ b/lib/forwardable.rb
@@ -19,40 +19,30 @@
# #record_number(), which simply calls #[] on the <tt>@records</tt>
# array, like this:
#
-# require 'forwardable'
-#
# class RecordCollection
-# attr_accessor :records
# extend Forwardable
# def_delegator :@records, :[], :record_number
# end
#
-# We can use the lookup method like so:
-#
-# r = RecordCollection.new
-# r.records = [4,5,6]
-# r.record_number(0) # => 4
-#
# Further, if you wish to provide the methods #size, #<<, and #map,
# all of which delegate to @records, this is how you can do it:
#
-# class RecordCollection # re-open RecordCollection class
+# class RecordCollection
+# # extend Forwardable, but we did that above
# def_delegators :@records, :size, :<<, :map
# end
+# f = Foo.new
+# f.printf ...
+# f.gets
+# f.content_at(1)
#
-# r = RecordCollection.new
-# r.records = [1,2,3]
-# r.record_number(0) # => 1
-# r.size # => 3
-# r << 4 # => [1, 2, 3, 4]
-# r.map { |x| x * 2 } # => [2, 4, 6, 8]
+# If the object isn't a Module and Class, You can too extend Forwardable
+# module.
#
-# You can even extend regular objects with Forwardable.
-#
-# my_hash = Hash.new
-# my_hash.extend Forwardable # prepare object for delegation
-# my_hash.def_delegator "STDOUT", "puts" # add delegation for STDOUT.puts()
-# my_hash.puts "Howdy!"
+# printer = String.new
+# printer.extend Forwardable # prepare object for delegation
+# printer.def_delegator "STDOUT", "puts" # add delegation for STDOUT.puts()
+# printer.puts "Howdy!"
#
# == Another example
#
@@ -112,8 +102,6 @@ module Forwardable
# Version of +forwardable.rb+
FORWARDABLE_VERSION = "1.1.0"
- FILE_REGEXP = %r"#{Regexp.quote(__FILE__)}"
-
@debug = nil
class << self
# If true, <tt>__FILE__</tt> will remain in the backtrace in the event an
@@ -182,7 +170,7 @@ module Forwardable
begin
#{accessor}.__send__(:#{method}, *args, &block)
rescue Exception
- $@.delete_if{|s| Forwardable::FILE_REGEXP =~ s} unless Forwardable::debug
+ $@.delete_if{|s| %r"#{Regexp.quote(__FILE__)}"o =~ s} unless Forwardable::debug
::Kernel::raise
end
end
@@ -215,14 +203,14 @@ end
# puts "serviced!"
# end
# end
-#
+#
# module Facade
# extend SingleForwardable
# def_delegator :Implementation, :service
# end
#
# Facade.service #=> serviced!
-#
+#
# If you want to use both Forwardable and SingleForwardable, you can
# use methods def_instance_delegator and def_single_delegator, etc.
module SingleForwardable
@@ -274,7 +262,7 @@ module SingleForwardable
begin
#{accessor}.__send__(:#{method}, *args, &block)
rescue Exception
- $@.delete_if{|s| Forwardable::FILE_REGEXP =~ s} unless Forwardable::debug
+ $@.delete_if{|s| %r"#{Regexp.quote(__FILE__)}"o =~ s} unless Forwardable::debug
::Kernel::raise
end
end
diff --git a/lib/getoptlong.rb b/lib/getoptlong.rb
index cf635f0438..259382e8ec 100644
--- a/lib/getoptlong.rb
+++ b/lib/getoptlong.rb
@@ -356,7 +356,7 @@ class GetoptLong
#
def terminate
return nil if @status == STATUS_TERMINATED
- raise RuntimeError, "an error has occurred" if @error != nil
+ raise RuntimeError, "an error has occured" if @error != nil
@status = STATUS_TERMINATED
@non_option_arguments.reverse_each do |argument|
diff --git a/lib/gserver.rb b/lib/gserver.rb
index 4d566fcf2e..f6f37d3a89 100644
--- a/lib/gserver.rb
+++ b/lib/gserver.rb
@@ -3,7 +3,7 @@
#
# Author:: John W. Small
# Documentation:: Gavin Sinclair
-# Licence:: Ruby License
+# Licence:: Freeware.
require "socket"
require "thread"
@@ -92,7 +92,7 @@ class GServer
# Stop the server running on the given port, bound to the given host
#
- # +port+:: port, as a Fixnum, of the server to stop
+ # +port+:: port, as a FixNum, of the server to stop
# +host+:: host on which to find the server to stop
def GServer.stop(port, host = DEFAULT_HOST)
@@servicesMutex.synchronize {
@@ -102,7 +102,7 @@ class GServer
# Check if a server is running on the given port and host
#
- # +port+:: port, as a Fixnum, of the server to check
+ # +port+:: port, as a FixNum, of the server to check
# +host+:: host on which to find the server to check
#
# Returns true if a server is running on that port and host.
@@ -140,11 +140,11 @@ class GServer
@tcpServerThread.join if @tcpServerThread
end
- # Port on which to listen, as a Fixnum
+ # Port on which to listen, as a FixNum
attr_reader :port
# Host on which to bind, as a String
attr_reader :host
- # Maximum number of connections to accept at at ime, as a Fixnum
+ # Maximum number of connections to accept at at ime, as a FixNum
attr_reader :maxConnections
# IO Device on which log messages should be written
attr_accessor :stdlog
@@ -212,7 +212,7 @@ class GServer
# Create a new server
#
- # +port+:: the port, as a Fixnum, on which to listen.
+ # +port+:: the port, as a FixNum, on which to listen.
# +host+:: the host to bind to
# +maxConnections+:: The maximum number of simultaneous connections to
# accept
@@ -261,8 +261,7 @@ class GServer
end
}
client = @tcpServer.accept
- Thread.new(client) { |myClient|
- @connections << Thread.current
+ @connections << Thread.new(client) { |myClient|
begin
myPort = myClient.peeraddr[1]
serve(myClient) if !@audit or connecting(myClient)
diff --git a/lib/ipaddr.rb b/lib/ipaddr.rb
index 13016fcbba..933ba7f90b 100644
--- a/lib/ipaddr.rb
+++ b/lib/ipaddr.rb
@@ -549,8 +549,7 @@ class IPAddr
left = $1
right = $3 + '0:0'
else
- left.count(':') <= ($1.empty? || $2.empty? ? 8 : 7) or
- raise InvalidAddressError, "invalid address"
+ left.count(':') <= 7 or raise InvalidAddressError, "invalid address"
left = $1
right = $2
addr = 0
@@ -672,8 +671,6 @@ class TC_IPAddr < Test::Unit::TestCase
["0:0:0:1::"],
["2001:200:300::/48"],
["2001:200:300::192.168.1.2/48"],
- ["1:2:3:4:5:6:7::"],
- ["::2:3:4:5:6:7:8"],
].each { |args|
assert_nothing_raised {
IPAddr.new(*args)
@@ -730,8 +727,6 @@ class TC_IPAddr < Test::Unit::TestCase
assert_equal("2001:200:300::", IPAddr.new("2001:200:300::/48").to_s)
assert_equal("2001:200:300::", IPAddr.new("[2001:200:300::]/48").to_s)
- assert_equal("1:2:3:4:5:6:7:0", IPAddr.new("1:2:3:4:5:6:7::").to_s)
- assert_equal("0:2:3:4:5:6:7:8", IPAddr.new("::2:3:4:5:6:7:8").to_s)
assert_raises(IPAddr::InvalidAddressError) { IPAddr.new("192.168.0.256") }
assert_raises(IPAddr::InvalidAddressError) { IPAddr.new("192.168.0.011") }
diff --git a/lib/irb.rb b/lib/irb.rb
index 20390d2205..5c8cb7043d 100644
--- a/lib/irb.rb
+++ b/lib/irb.rb
@@ -21,16 +21,16 @@ require "irb/locale"
STDOUT.sync = true
-# IRB stands for "interactive Ruby" and is a tool to interactively execute Ruby
+# IRB stands for "interactive ruby" and is a tool to interactively execute ruby
# expressions read from the standard input.
#
# The +irb+ command from your shell will start the interpreter.
#
# == Usage
#
-# Use of irb is easy if you know Ruby.
+# Use of irb is easy if you know ruby.
#
-# When executing irb, prompts are displayed as follows. Then, enter the Ruby
+# When executing irb, prompts are displayed as follows. Then, enter the ruby
# expression. An input is executed when it is syntactically complete.
#
# $ irb
@@ -101,34 +101,10 @@ STDOUT.sync = true
# IRB.conf[:USE_TRACER] = false
# IRB.conf[:IGNORE_SIGINT] = true
# IRB.conf[:IGNORE_EOF] = false
-# IRB.conf[:PROMPT_MODE] = :DEFAULT
+# IRB.conf[:PROMPT_MODE] = :DEFALUT
# IRB.conf[:PROMPT] = {...}
# IRB.conf[:DEBUG_LEVEL]=0
#
-# === Auto indentation
-#
-# To enable auto-indent mode in irb, add the following to your +.irbrc+:
-#
-# IRB.conf[:AUTO_INDENT] = true
-#
-# === Autocompletion
-#
-# To enable autocompletion for irb, add the following to your +.irbrc+:
-#
-# require 'irb/completion'
-#
-# === History
-#
-# By default, irb disables history and will not store any commands you used.
-#
-# If you want to enable history, add the following to your +.irbrc+:
-#
-# IRB.conf[:SAVE_HISTORY] = 1000
-#
-# This will now store the last 1000 commands in <code>~/.irb_history</code>.
-#
-# See IRB::Context#save_history= for more information.
-#
# == Customizing the IRB Prompt
#
# In order to customize the prompt, you can change the following Hash:
@@ -138,20 +114,21 @@ STDOUT.sync = true
# This example can be used in your +.irbrc+
#
# IRB.conf[:PROMPT][:MY_PROMPT] = { # name of prompt mode
-# :AUTO_INDENT => true # enables auto-indent mode
# :PROMPT_I => nil, # normal prompt
# :PROMPT_S => nil, # prompt for continuated strings
# :PROMPT_C => nil, # prompt for continuated statement
# :RETURN => " ==>%s\n" # format to return value
# }
#
-# IRB.conf[:PROMPT_MODE] = :MY_PROMPT
-#
-# Or, invoke irb with the above prompt mode by:
+# Then, invoke irb with the above prompt mode by:
#
# irb --prompt my-prompt
#
-# Constants +PROMPT_I+, +PROMPT_S+ and +PROMPT_C+ specify the format. In the
+# Or, add the following in your +.irbrc+:
+#
+# IRB.conf[:PROMPT_MODE] = :MY_PROMPT
+#
+# Contants +PROMPT_I+, +PROMPT_S+ and +PROMPT_C+ specify the format. In the
# prompt specification, some special strings are available:
#
# %N # command name which is running
@@ -221,7 +198,17 @@ STDOUT.sync = true
# == Restrictions
#
# Because irb evaluates input immediately after it is syntactically complete,
-# the results may be slightly different than directly using Ruby.
+# the results may be slightly different than directly using ruby.
+#
+# One of the obvious differences is how irb handles symbols as continuated
+# statements:
+#
+# ruby -e 'p :+' #=> :+
+# irb
+# irb(main):001:0> p :+
+# irb(main):002:0*
+#
+# irb tries to contiue the statement 'p :+' on the next line.
#
# == IRB Sessions
#
diff --git a/lib/irb/completion.rb b/lib/irb/completion.rb
index c6f8a5889f..3be0610c6e 100644
--- a/lib/irb/completion.rb
+++ b/lib/irb/completion.rb
@@ -15,24 +15,24 @@ module IRB
# Set of reserved words used by Ruby, you should not use these for
# constants or variables
- ReservedWords = %w[
- BEGIN END
- alias and
- begin break
- case class
- def defined do
- else elsif end ensure
- false for
- if in
- module
- next nil not
- or
- redo rescue retry return
- self super
- then true
- undef unless until
- when while
- yield
+ ReservedWords = [
+ "BEGIN", "END",
+ "alias", "and",
+ "begin", "break",
+ "case", "class",
+ "def", "defined", "do",
+ "else", "elsif", "end", "ensure",
+ "false", "for",
+ "if", "in",
+ "module",
+ "next", "nil", "not",
+ "or",
+ "redo", "rescue", "retry", "return",
+ "self", "super",
+ "then", "true",
+ "undef", "unless", "until",
+ "when", "while",
+ "yield",
]
CompletionProc = proc { |input|
@@ -211,7 +211,9 @@ module IRB
}
# Set of available operators in Ruby
- Operators = %w[% & * ** + - / < << <= <=> == === =~ > >= >> [] []= ^ ! != !~]
+ Operators = ["%", "&", "*", "**", "+", "-", "/",
+ "<", "<<", "<=", "<=>", "==", "===", "=~", ">", ">=", ">>",
+ "[]", "[]=", "^", "!", "!=", "!~"]
def self.select_message(receiver, message, candidates, sep = ".")
candidates.grep(/^#{message}/).collect do |e|
diff --git a/lib/irb/context.rb b/lib/irb/context.rb
index 72b36307d5..d6dfa1847a 100644
--- a/lib/irb/context.rb
+++ b/lib/irb/context.rb
@@ -161,22 +161,8 @@ module IRB
attr_accessor :prompt_c
# See IRB@Customizing+the+IRB+Prompt for more information.
attr_accessor :prompt_n
- # Can be either the default <code>IRB.conf[:AUTO_INDENT]</code>, or the
+ # Can be either the deafult <code>IRB.conf[:AUTO_INDENT]</code>, or the
# mode set by #prompt_mode=
- #
- # To enable auto-indentation in irb:
- #
- # IRB.conf[:AUTO_INDENT] = true
- #
- # or
- #
- # irb_context.auto_indent_mode = true
- #
- # or
- #
- # IRB.CurrentContext.auto_indent_mode = true
- #
- # See IRB@Configuration for more information.
attr_accessor :auto_indent_mode
# The format of the return statement, set by #prompt_mode= using the
# +:RETURN+ of the +mode+ passed to set the current #prompt_mode.
diff --git a/lib/irb/ext/save-history.rb b/lib/irb/ext/save-history.rb
index 7b3fcbbeec..3e0740d6fa 100644
--- a/lib/irb/ext/save-history.rb
+++ b/lib/irb/ext/save-history.rb
@@ -29,13 +29,6 @@ module IRB
# Sets <code>IRB.conf[:SAVE_HISTORY]</code> to the given +val+ and calls
# #init_save_history with this context.
- #
- # Will store the number of +val+ entries of history in the #history_file
- #
- # Add the following to your +.irbrc+ to change the number of history
- # entries stored to 1000:
- #
- # IRB.conf[:SAVE_HISTORY] = 1000
def save_history=(val)
IRB.conf[:SAVE_HISTORY] = val
if val
@@ -99,18 +92,7 @@ module IRB
history_file = File.expand_path(history_file)
end
history_file = IRB.rc_file("_history") unless history_file
-
- # Change the permission of a file that already exists[BUG #7694]
- begin
- if File.stat(history_file).mode & 066 != 0
- File.chmod(0600, history_file)
- end
- rescue Errno::ENOENT
- rescue
- raise
- end
-
- open(history_file, 'w', 0600 ) do |f|
+ open(history_file, 'w' ) do |f|
hist = HISTORY.to_a
f.puts(hist[-num..-1] || hist)
end
diff --git a/lib/irb/inspector.rb b/lib/irb/inspector.rb
index cdd90d4081..eaff44fc0b 100644
--- a/lib/irb/inspector.rb
+++ b/lib/irb/inspector.rb
@@ -105,7 +105,7 @@ module IRB # :nodoc:
end
# Proc to call when the inspector is activated, good for requiring
- # dependent libraries.
+ # dependant libraries.
def init
@init.call if @init
end
diff --git a/lib/irb/lc/.document b/lib/irb/lc/.document
deleted file mode 100644
index 524bb9430b..0000000000
--- a/lib/irb/lc/.document
+++ /dev/null
@@ -1,4 +0,0 @@
-# hide help-message files which contain usage information
-error.rb
-ja/encoding_aliases.rb
-ja/error.rb
diff --git a/lib/irb/lc/help-message b/lib/irb/lc/help-message
index 5853693eb0..c01cdaab93 100644
--- a/lib/irb/lc/help-message
+++ b/lib/irb/lc/help-message
@@ -1,4 +1,4 @@
-# -*- coding: utf-8 -*-
+# -*- coding: US-ASCII -*-
#
# irb/lc/help-message.rb -
# $Release Version: 0.9.6$
@@ -19,32 +19,22 @@ Usage: irb.rb [options] [programfile] [arguments]
-E enc Same as `ruby -E`
-w Same as `ruby -w`
-W[level=2] Same as `ruby -W`
- --context-mode n Set n[0-3] to method to create Binding Object,
- when new workspace was created
- --echo Show result(default)
- --noecho Don't show result
--inspect Use `inspect' for output (default except for bc mode)
--noinspect Don't use inspect for output
- --readline Use Readline extension module
+ --readline Use Readline extension module
--noreadline Don't use Readline extension module
- --prompt prompt-mode/--prompt-mode prompt-mode
+ --prompt prompt-mode
+ --prompt-mode prompt-mode
Switch prompt mode. Pre-defined prompt modes are
`default', `simple', `xmp' and `inf-ruby'
--inf-ruby-mode Use prompt appropriate for inf-ruby-mode on emacs.
Suppresses --readline.
- --sample-book-mode/--simple-prompt
- Simple prompt mode
- --noprompt No prompt mode
- --single-irb Share self with sub-irb.
- --tracer Display trace for each execution of commands.
+ --simple-prompt Simple prompt mode
+ --noprompt No prompt mode
+ --tracer Display trace for each execution of commands.
--back-trace-limit n
Display backtrace top n and tail n. The default
value is 16.
--irb_debug n Set internal debug level to n (not for popular use)
- --verbose Show details
- --noverbose Don't show details
-v, --version Print the version of irb
- -h, --help Print help
- -- Separate options of irb from the list of command-line args
-
-# vim:fileencoding=utf-8
+# vim:fileencoding=us-ascii
diff --git a/lib/irb/lc/ja/help-message b/lib/irb/lc/ja/help-message
index 288eb5245c..57e8f23edf 100644
--- a/lib/irb/lc/ja/help-message
+++ b/lib/irb/lc/ja/help-message
@@ -18,10 +18,6 @@ Usage: irb.rb [options] [programfile] [arguments]
-E enc ruby -E ã¨åŒã˜.
-w ruby -w ã¨åŒã˜.
-W[level=2] ruby -W ã¨åŒã˜.
- --context-mode n æ–°ã—ã„ワークスペースを作æˆã—ãŸæ™‚ã«é–¢é€£ã™ã‚‹ Binding
- オブジェクトã®ä½œæˆæ–¹æ³•ã‚’ 0 ã‹ã‚‰ 3 ã®ã„ãšã‚Œã‹ã«è¨­å®šã™ã‚‹.
- --echo å®Ÿè¡Œçµæžœã‚’表示ã™ã‚‹(デフォルト).
- --noecho å®Ÿè¡Œçµæžœã‚’表示ã—ãªã„.
--inspect çµæžœå‡ºåŠ›ã«inspectを用ã„ã‚‹(bcモード以外ã¯ãƒ‡ãƒ•ォルト).
--noinspect çµæžœå‡ºåŠ›ã«inspectを用ã„ãªã„.
--readline readlineライブラリを利用ã™ã‚‹.
@@ -32,22 +28,14 @@ Usage: irb.rb [options] [programfile] [arguments]
用æ„ã•れã¦ã„ã¾ã™.
--inf-ruby-mode emacsã®inf-ruby-mode用ã®ãƒ—ロンプト表示を行ãªã†. 特
ã«æŒ‡å®šãŒãªã„é™ã‚Š, readlineライブラリã¯ä½¿ã‚ãªããªã‚‹.
- --sample-book-mode/--simple-prompt
- éžå¸¸ã«ã‚·ãƒ³ãƒ—ルãªãƒ—ロンプトを用ã„るモードã§ã™.
+ --simple-prompt éžå¸¸ã«ã‚·ãƒ³ãƒ—ルãªãƒ—ロンプトを用ã„るモードã§ã™.
--noprompt プロンプト表示を行ãªã‚ãªã„.
- --single-irb irb 中㧠self を実行ã—ã¦å¾—られるオブジェクトをサ
- ブ irb ã¨å…±æœ‰ã™ã‚‹.
--tracer コマンド実行時ã«ãƒˆãƒ¬ãƒ¼ã‚¹ã‚’行ãªã†.
--back-trace-limit n
ãƒãƒƒã‚¯ãƒˆãƒ¬ãƒ¼ã‚¹è¡¨ç¤ºã‚’ãƒãƒƒã‚¯ãƒˆãƒ¬ãƒ¼ã‚¹ã®é ­ã‹ã‚‰ n, 後ã‚
ã‹ã‚‰nã ã‘行ãªã†. デフォルトã¯16
-
- --irb_debug n irbã®ãƒ‡ãƒãƒƒã‚°ãƒ¬ãƒ™ãƒ«ã‚’nã«è¨­å®šã™ã‚‹(éžæŽ¨å¥¨).
-
- --verbose 詳細ãªãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’出力ã™ã‚‹.
- --noverbose 詳細ãªãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’出力ã—ãªã„(デフォルト).
- -v, --version irbã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’表示ã™ã‚‹.
- -h, --help irb ã®ãƒ˜ãƒ«ãƒ—を表示ã™ã‚‹.
- -- 以é™ã®ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³å¼•数をオプションã¨ã—ã¦æ‰±ã‚ãªã„.
+ --irb_debug n irbã®ãƒ‡ãƒãƒƒã‚°ãƒ‡ãƒãƒƒã‚°ãƒ¬ãƒ™ãƒ«ã‚’nã«è¨­å®šã™ã‚‹(利用ã—ãª
+ ã„æ–¹ãŒç„¡é›£ã§ã—ょã†).
+ -v, --version irbã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’表示ã™ã‚‹
# vim:fileencoding=utf-8
diff --git a/lib/irb/notifier.rb b/lib/irb/notifier.rb
index 8207c6c06a..effb12c30d 100644
--- a/lib/irb/notifier.rb
+++ b/lib/irb/notifier.rb
@@ -26,7 +26,7 @@ module IRB
#
# The optional +prefix+ will be appended to all objects being inspected
# during output, using the given +output_method+ as the output source. If
- # no +output_method+ is given, StdioOutputMethod will be used, and all
+ # no +output_method+ is given, StdioOuputMethod will be used, and all
# expressions will be sent directly to STDOUT without any additional
# formatting.
def def_notifier(prefix = "", output_method = StdioOutputMethod.new)
@@ -161,7 +161,7 @@ module IRB
@level_notifier = value
when Integer
l = @notifiers[value]
- Notifier.Raise ErrUndefinedNotifier, value unless l
+ Notifier.Raise ErrUndefinedNotifer, value unless l
@level_notifier = l
else
Notifier.Raise ErrUnrecognizedLevel, value unless l
diff --git a/lib/irb/workspace.rb b/lib/irb/workspace.rb
index a627e7f3c2..65214a2217 100644
--- a/lib/irb/workspace.rb
+++ b/lib/irb/workspace.rb
@@ -49,7 +49,7 @@ EOF
end
@binding = BINDING_QUEUE.pop
- when 3 # binding in function on TOPLEVEL_BINDING(default)
+ when 3 # binging in function on TOPLEVEL_BINDING(default)
@binding = eval("def irb_binding; private; binding; end; irb_binding",
TOPLEVEL_BINDING,
__FILE__,
diff --git a/lib/logger.rb b/lib/logger.rb
index 3c50cb2313..3376cf8216 100644
--- a/lib/logger.rb
+++ b/lib/logger.rb
@@ -289,7 +289,8 @@ class Logger
def fatal?; @level <= FATAL; end
#
- # :call-seq:
+ # === Synopsis
+ #
# Logger.new(name, shift_age = 7, shift_size = 1048576)
# Logger.new(name, shift_age = 'weekly')
#
@@ -321,7 +322,8 @@ class Logger
end
#
- # :call-seq:
+ # === Synopsis
+ #
# Logger#add(severity, message = nil, progname = nil) { ... }
#
# === Args
@@ -339,6 +341,8 @@ class Logger
#
# === Return
#
+ # +true+ if successful, +false+ otherwise.
+ #
# When the given severity is not high enough (for this particular logger),
# log no message, and return +true+.
#
@@ -588,32 +592,24 @@ private
private
def open_logfile(filename)
- begin
+ if (FileTest.exist?(filename))
open(filename, (File::WRONLY | File::APPEND))
- rescue Errno::ENOENT
+ else
create_logfile(filename)
end
end
def create_logfile(filename)
- begin
- logdev = open(filename, (File::WRONLY | File::APPEND | File::CREAT | File::EXCL))
- logdev.flock(File::LOCK_EX)
- logdev.sync = true
- add_log_header(logdev)
- logdev.flock(File::LOCK_UN)
- rescue Errno::EEXIST
- # file is created by another process
- logdev = open_logfile(filename)
- logdev.sync = true
- end
+ logdev = open(filename, (File::WRONLY | File::APPEND | File::CREAT))
+ logdev.sync = true
+ add_log_header(logdev)
logdev
end
def add_log_header(file)
file.write(
"# Logfile created on %s by %s\n" % [Time.now.to_s, Logger::ProgName]
- ) if file.size == 0
+ )
end
SiD = 24 * 60 * 60
@@ -622,53 +618,17 @@ private
if @shift_age.is_a?(Integer)
# Note: always returns false if '0'.
if @filename && (@shift_age > 0) && (@dev.stat.size > @shift_size)
- lock_shift_log { shift_log_age }
+ shift_log_age
end
else
now = Time.now
period_end = previous_period_end(now)
if @dev.stat.mtime <= period_end
- lock_shift_log { shift_log_period(period_end) }
+ shift_log_period(period_end)
end
end
end
- if /mswin|mingw/ =~ RUBY_PLATFORM
- def lock_shift_log
- yield
- end
- else
- def lock_shift_log
- retry_limit = 8
- retry_sleep = 0.1
- begin
- File.open(@filename, File::WRONLY | File::APPEND) do |lock|
- lock.flock(File::LOCK_EX) # inter-process locking. will be unlocked at closing file
- if File.identical?(@filename, lock) and File.identical?(lock, @dev)
- yield # log shifting
- else
- # log shifted by another process (i-node before locking and i-node after locking are different)
- @dev.close rescue nil
- @dev = open_logfile(@filename)
- @dev.sync = true
- end
- end
- rescue Errno::ENOENT
- # @filename file would not exist right after #rename and before #create_logfile
- if retry_limit <= 0
- warn("log rotation inter-process lock failed. #{$!}")
- else
- sleep retry_sleep
- retry_limit -= 1
- retry_sleep *= 2
- retry
- end
- end
- rescue
- warn("log rotation inter-process lock failed. #{$!}")
- end
- end
-
def shift_log_age
(@shift_age-3).downto(0) do |i|
if FileTest.exist?("#{@filename}.#{i}")
@@ -722,7 +682,7 @@ private
#
# == Description
#
- # Logger::Application --- Add logging support to your application.
+ # Application --- Add logging support to your application.
#
# == Usage
#
@@ -732,7 +692,7 @@ private
#
# == Example
#
- # class FooApp < Logger::Application
+ # class FooApp < Application
# def initialize(foo_app, application_specific, arguments)
# super('FooApp') # Name of the application.
# end
@@ -755,8 +715,9 @@ private
attr_reader :appname
#
- # :call-seq:
- # Logger::Application.new(appname = '')
+ # == Synopsis
+ #
+ # Application.new(appname = '')
#
# == Args
#
diff --git a/lib/matrix.rb b/lib/matrix.rb
index f82ed65979..cf23d4159d 100644
--- a/lib/matrix.rb
+++ b/lib/matrix.rb
@@ -156,7 +156,7 @@ class Matrix
end
size = (rows[0] || []).size
rows.each do |row|
- raise ErrDimensionMismatch, "row size differs (#{row.size} should be #{size})" unless row.size == size
+ Matrix.Raise ErrDimensionMismatch, "row size differs (#{row.size} should be #{size})" unless row.size == size
end
new rows, size
end
@@ -286,8 +286,8 @@ class Matrix
# => Matrix[[0, 0, 0], [0, 0, 0]]
#
def Matrix.empty(row_count = 0, column_count = 0)
- raise ArgumentError, "One size must be 0" if column_count != 0 && row_count != 0
- raise ArgumentError, "Negative size" if column_count < 0 || row_count < 0
+ Matrix.Raise ArgumentError, "One size must be 0" if column_count != 0 && row_count != 0
+ Matrix.Raise ArgumentError, "Negative size" if column_count < 0 || row_count < 0
new([[]]*row_count, column_count)
end
@@ -446,7 +446,7 @@ class Matrix
end
end
else
- raise ArgumentError, "expected #{which.inspect} to be one of :all, :diagonal, :off_diagonal, :lower, :strict_lower, :strict_upper or :upper"
+ Matrix.Raise ArgumentError, "expected #{which.inspect} to be one of :all, :diagonal, :off_diagonal, :lower, :strict_lower, :strict_upper or :upper"
end
self
end
@@ -508,7 +508,7 @@ class Matrix
end
end
else
- raise ArgumentError, "expected #{which.inspect} to be one of :all, :diagonal, :off_diagonal, :lower, :strict_lower, :strict_upper or :upper"
+ Matrix.Raise ArgumentError, "expected #{which.inspect} to be one of :all, :diagonal, :off_diagonal, :lower, :strict_lower, :strict_upper or :upper"
end
self
end
@@ -579,7 +579,7 @@ class Matrix
from_row += row_count if from_row < 0
from_col += column_count if from_col < 0
else
- raise ArgumentError, param.inspect
+ Matrix.Raise ArgumentError, param.inspect
end
return nil if from_row > row_count || from_col > column_count || from_row < 0 || from_col < 0
@@ -1519,7 +1519,6 @@ end
#
# Vector functions:
# * #inner_product(v)
-# * #cross_product(v)
# * #collect
# * #magnitude
# * #map
@@ -1753,23 +1752,12 @@ class Vector
p = 0
each2(v) {|v1, v2|
- p += v1 * v2.conj
+ p += v1 * v2
}
p
end
#
- # Returns the cross product of this vector with the other.
- # Vector[1, 0, 0].cross_product Vector[0, 1, 0] => Vector[0, 0, 1]
- #
- def cross_product(v)
- Vector.Raise ErrDimensionMismatch unless size == v.size && v.size == 3
- Vector[ v[1]*@elements[2] - v[2]*@elements[1],
- v[2]*@elements[0] - v[0]*@elements[2],
- v[0]*@elements[1] - v[1]*@elements[0] ]
- end
-
- #
# Like Array#collect.
#
def collect(&block) # :yield: e
diff --git a/lib/matrix/eigenvalue_decomposition.rb b/lib/matrix/eigenvalue_decomposition.rb
index 0dd9d42f29..ab5888ff37 100644
--- a/lib/matrix/eigenvalue_decomposition.rb
+++ b/lib/matrix/eigenvalue_decomposition.rb
@@ -84,14 +84,14 @@ class Matrix
private
def build_eigenvectors
# JAMA stores complex eigenvectors in a strange way
- # See http://web.archive.org/web/20111016032731/http://cio.nist.gov/esd/emaildir/lists/jama/msg01021.html
+ # See http://cio.nist.gov/esd/emaildir/lists/jama/msg01021.html
@e.each_with_index.map do |imag, i|
if imag == 0
Array.new(@size){|j| @v[j][i]}
elsif imag > 0
Array.new(@size){|j| Complex(@v[j][i], @v[j][i+1])}
else
- Array.new(@size){|j| Complex(@v[j][i-1], -@v[j][i])}
+ Array.new(@size){|j| Complex(@v[j][i], -@v[j][i-1])}
end
end
end
@@ -659,10 +659,14 @@ class Matrix
q = @h[k+1][k-1]
r = (notlast ? @h[k+2][k-1] : 0.0)
x = p.abs + q.abs + r.abs
- next if x == 0
- p /= x
- q /= x
- r /= x
+ if (x != 0.0)
+ p /= x
+ q /= x
+ r /= x
+ end
+ end
+ if (x == 0.0)
+ break
end
s = Math.sqrt(p * p + q * q + r * r)
if (p < 0)
diff --git a/lib/matrix/lup_decomposition.rb b/lib/matrix/lup_decomposition.rb
index 30f3276253..cf3897e922 100644
--- a/lib/matrix/lup_decomposition.rb
+++ b/lib/matrix/lup_decomposition.rb
@@ -19,7 +19,7 @@ class Matrix
include Matrix::ConversionHelper
def l
- Matrix.build(@row_count, [@column_count, @row_count].min) do |i, j|
+ Matrix.build(@row_count, @column_count) do |i, j|
if (i > j)
@lu[i][j]
elsif (i == j)
@@ -33,7 +33,7 @@ class Matrix
# Returns the upper triangular factor +U+
def u
- Matrix.build([@column_count, @row_count].min, @column_count) do |i, j|
+ Matrix.build(@column_count, @column_count) do |i, j|
if (i <= j)
@lu[i][j]
else
@@ -45,9 +45,9 @@ class Matrix
# Returns the permutation matrix +P+
def p
- rows = Array.new(@row_count){Array.new(@row_count, 0)}
+ rows = Array.new(@row_count){Array.new(@column_count, 0)}
@pivots.each_with_index{|p, i| rows[i][p] = 1}
- Matrix.send :new, rows, @row_count
+ Matrix.send :new, rows, @column_count
end
# Returns +L+, +U+, +P+ in an array
@@ -77,7 +77,7 @@ class Matrix
def det
if (@row_count != @column_count)
- Matrix.Raise Matrix::ErrDimensionMismatch
+ Matrix.Raise Matrix::ErrDimensionMismatch unless square?
end
d = @pivot_sign
@column_count.times do |j|
diff --git a/lib/minitest/.document b/lib/minitest/.document
deleted file mode 100644
index 6850e5befb..0000000000
--- a/lib/minitest/.document
+++ /dev/null
@@ -1,2 +0,0 @@
-# Ignore README.txt, it is included in the minitest documentation.
-*.rb
diff --git a/lib/minitest/README.txt b/lib/minitest/README.txt
index 368cc3aa4e..6430c1b442 100644
--- a/lib/minitest/README.txt
+++ b/lib/minitest/README.txt
@@ -104,7 +104,7 @@ Given that you'd like to test the following class:
def test_that_it_will_not_blend
refute_match /^no/i, @meme.will_it_blend?
end
-
+
def test_that_will_be_skipped
skip "test this later"
end
@@ -221,14 +221,6 @@ Output is tab-delimited to make it easy to paste into a spreadsheet.
end
end
-A note on stubbing: In order to stub a method, the method must
-actually exist prior to stubbing. Use a singleton method to create a
-new non-existing method:
-
- def obj_under_test.fake_method
- ...
- end
-
=== Customizable Test Runner Types:
MiniTest::Unit.runner=(runner) provides an easy way of creating custom
@@ -281,113 +273,54 @@ fixture loading:
MiniTest::Unit.runner = MiniTestWithTransactions::Unit.new
-== FAQ
-
-=== How to test SimpleDelegates?
-
-The following implementation and test:
-
- class Worker < SimpleDelegator
- def work
- end
- end
-
- describe Worker do
- before do
- @worker = Worker.new(Object.new)
- end
-
- it "must respond to work" do
- @worker.must_respond_to :work
- end
- end
-
-outputs a failure:
-
- 1) Failure:
- Worker#test_0001_must respond to work [bug11.rb:16]:
- Expected #<Object:0x007f9e7184f0a0> (Object) to respond to #work.
-
-Worker is a SimpleDelegate which in 1.9+ is a subclass of BasicObject.
-Expectations are put on Object (one level down) so the Worker
-(SimpleDelegate) hits `method_missing` and delegates down to the
-`Object.new` instance. That object doesn't respond to work so the test
-fails.
-
-You can bypass `SimpleDelegate#method_missing` by extending the worker
-with `MiniTest::Expectations`. You can either do that in your setup at
-the instance level, like:
-
- before do
- @worker = Worker.new(Object.new)
- @worker.extend MiniTest::Expectations
- end
-
-or you can extend the Worker class (within the test file!), like:
-
- class Worker
- include ::MiniTest::Expectations
- end
-
== Known Extensions:
-capybara_minitest_spec :: Bridge between Capybara RSpec matchers and MiniTest::Spec expectations (e.g. page.must_have_content('Title')).
-minispec-metadata :: Metadata for describe/it blocks
- (e.g. `it 'requires JS driver', js: true do`)
-minitest-ansi :: Colorize minitest output with ANSI colors.
-minitest-around :: Around block for minitest. An alternative to setup/teardown dance.
-minitest-capistrano :: Assertions and expectations for testing Capistrano recipes
-minitest-capybara :: Capybara matchers support for minitest unit and spec
-minitest-chef-handler :: Run Minitest suites as Chef report handlers
-minitest-ci :: CI reporter plugin for MiniTest.
-minitest-colorize :: Colorize MiniTest output and show failing tests instantly.
-minitest-context :: Defines contexts for code reuse in MiniTest
- specs that share common expectations.
-minitest-debugger :: Wraps assert so failed assertions drop into
- the ruby debugger.
-minitest-display :: Patches MiniTest to allow for an easily configurable output.
-minitest-emoji :: Print out emoji for your test passes, fails, and skips.
-minitest-english :: Semantically symmetric aliases for assertions and expectations.
-minitest-excludes :: Clean API for excluding certain tests you
- don't want to run under certain conditions.
-minitest-firemock :: Makes your MiniTest mocks more resilient.
-minitest-great_expectations :: Generally useful additions to minitest's assertions and expectations
-minitest-growl :: Test notifier for minitest via growl.
-minitest-implicit-subject :: Implicit declaration of the test subject.
-minitest-instrument :: Instrument ActiveSupport::Notifications when
- test method is executed
-minitest-instrument-db :: Store information about speed of test
- execution provided by minitest-instrument in database
-minitest-libnotify :: Test notifier for minitest via libnotify.
-minitest-macruby :: Provides extensions to minitest for macruby UI testing.
-minitest-matchers :: Adds support for RSpec-style matchers to minitest.
-minitest-metadata :: Annotate tests with metadata (key-value).
-minitest-mongoid :: Mongoid assertion matchers for MiniTest
-minitest-must_not :: Provides must_not as an alias for wont in MiniTest
-minitest-nc :: Test notifier for minitest via Mountain Lion's Notification Center
-minitest-predicates :: Adds support for .predicate? methods
-minitest-rails :: MiniTest integration for Rails 3.x
-minitest-rails-capybara :: Capybara integration for MiniTest::Rails
-minitest-reporters :: Create customizable MiniTest output formats
-minitest-should_syntax :: RSpec-style +x.should == y+ assertions for MiniTest
-minitest-shouldify :: Adding all manner of shoulds to MiniTest (bad idea)
-minitest-spec-context :: Provides rspec-ish context method to MiniTest::Spec
-minitest-spec-magic :: Minitest::Spec extensions for Rails and beyond
-minitest-spec-rails :: Drop in MiniTest::Spec superclass for ActiveSupport::TestCase.
-minitest-stub-const :: Stub constants for the duration of a block
-minitest-tags :: add tags for minitest
-minitest-wscolor :: Yet another test colorizer.
-minitest_owrapper :: Get tests results as a TestResult object.
-minitest_should :: Shoulda style syntax for minitest test::unit.
-minitest_tu_shim :: minitest_tu_shim bridges between test/unit and minitest.
-mongoid-minitest :: MiniTest matchers for Mongoid.
-pry-rescue :: A pry plugin w/ minitest support. See pry-rescue/minitest.rb.
+minitest-capistrano :: Assertions and expectations for testing Capistrano recipes
+minitest-capybara :: Capybara matchers support for minitest unit and spec
+minitest-chef-handler :: Run Minitest suites as Chef report handlers
+minitest-ci :: CI reporter plugin for MiniTest.
+minitest-colorize :: Colorize MiniTest output and show failing tests instantly.
+minitest-context :: Defines contexts for code reuse in MiniTest
+ specs that share common expectations.
+minitest-debugger :: Wraps assert so failed assertions drop into
+ the ruby debugger.
+minitest-display :: Patches MiniTest to allow for an easily configurable output.
+minitest-emoji :: Print out emoji for your test passes, fails, and skips.
+minitest-excludes :: Clean API for excluding certain tests you
+ don't want to run under certain conditions.
+minitest-firemock :: Makes your MiniTest mocks more resilient.
+minitest-growl :: Test notifier for minitest via growl.
+minitest-instrument :: Instrument ActiveSupport::Notifications when
+ test method is executed
+minitest-instrument-db :: Store information about speed of test
+ execution provided by minitest-instrument in database
+minitest-libnotify :: Test notifier for minitest via libnotify.
+minitest-macruby :: Provides extensions to minitest for macruby UI testing.
+minitest-matchers :: Adds support for RSpec-style matchers to minitest.
+minitest-metadata :: Annotate tests with metadata (key-value).
+minitest-mongoid :: Mongoid assertion matchers for MiniTest
+minitest-must_not :: Provides must_not as an alias for wont in MiniTest
+minitest-predicates :: Adds support for .predicate? methods
+minitest-rails :: MiniTest integration for Rails 3.x
+minitest-rails-capybara :: Capybara integration for MiniTest::Rails
+minitest-reporters :: Create customizable MiniTest output formats
+minitest-rg :: redgreen minitest
+minitest-shouldify :: Adding all manner of shoulds to MiniTest (bad idea)
+minitest-spec-magic :: Minitest::Spec extensions for Rails and beyond
+minitest-tags :: add tags for minitest
+minitest-wscolor :: Yet another test colorizer.
+minitest_owrapper :: Get tests results as a TestResult object.
+minitest_should :: Shoulda style syntax for minitest test::unit.
+minitest_tu_shim :: minitest_tu_shim bridges between test/unit and minitest.
+mongoid-minitest :: MiniTest matchers for Mongoid.
+pry-rescue :: A pry plugin w/ minitest support. See pry-rescue/minitest.rb.
== Unknown Extensions:
Authors... Please send me a pull request with a description of your minitest extension.
* assay-minitest
+* capybara_minitest_spec
* detroit-minitest
* em-minitest-spec
* flexmock-minitest
@@ -395,12 +328,16 @@ Authors... Please send me a pull request with a description of your minitest ext
* guard-minitest-decisiv
* minitest-activemodel
* minitest-ar-assertions
+* minitest-around
* minitest-capybara-unit
* minitest-colorer
* minitest-deluxe
* minitest-extra-assertions
+* minitest-nc
* minitest-rails-shoulda
* minitest-spec
+* minitest-spec-context
+* minitest-spec-rails
* minitest-spec-should
* minitest-sugar
* minitest_should
@@ -421,7 +358,7 @@ the gem, but you'll need to activate the gem explicitly to use it:
require 'rubygems'
gem 'minitest' # ensures you're using the gem, and not the built in MT
require 'minitest/autorun'
-
+
# ... usual testing stuffs ...
DO NOTE: There is a serious problem with the way that ruby 1.9/2.0
diff --git a/lib/minitest/benchmark.rb b/lib/minitest/benchmark.rb
index e233282b0a..02121db340 100644
--- a/lib/minitest/benchmark.rb
+++ b/lib/minitest/benchmark.rb
@@ -163,26 +163,6 @@ class MiniTest::Unit # :nodoc:
##
# Runs the given +work+ and asserts that the times gathered fit to
- # match a logarithmic curve within a given error +threshold+.
- #
- # Fit is calculated by #fit_logarithmic.
- #
- # Ranges are specified by ::bench_range.
- #
- # Eg:
- #
- # def bench_algorithm
- # assert_performance_logarithmic 0.9999 do |n|
- # @obj.algorithm(n)
- # end
- # end
-
- def assert_performance_logarithmic threshold = 0.99, &work
- assert_performance validation_for_fit(:logarithmic, threshold), &work
- end
-
- ##
- # Runs the given +work+ and asserts that the times gathered fit to
# match a straight line within a given error +threshold+.
#
# Fit is calculated by #fit_linear.
@@ -257,29 +237,6 @@ class MiniTest::Unit # :nodoc:
end
##
- # To fit a functional form: y = a + b*ln(x).
- #
- # Takes x and y values and returns [a, b, r^2].
- #
- # See: http://mathworld.wolfram.com/LeastSquaresFittingLogarithmic.html
-
- def fit_logarithmic xs, ys
- n = xs.size
- xys = xs.zip(ys)
- slnx2 = sigma(xys) { |x,y| Math.log(x) ** 2 }
- slnx = sigma(xys) { |x,y| Math.log(x) }
- sylnx = sigma(xys) { |x,y| y * Math.log(x) }
- sy = sigma(xys) { |x,y| y }
-
- c = n * slnx2 - slnx ** 2
- b = ( n * sylnx - sy * slnx ) / c
- a = (sy - b * slnx) / n
-
- return a, b, fit_error(xys) { |x| a + b * Math.log(x) }
- end
-
-
- ##
# Fits the functional form: a + bx.
#
# Takes x and y values and returns [a, b, r^2].
diff --git a/lib/minitest/hell.rb b/lib/minitest/hell.rb
index 827bf0e320..b1c602c875 100644
--- a/lib/minitest/hell.rb
+++ b/lib/minitest/hell.rb
@@ -5,16 +5,12 @@
# File a patch instead and assign it to Ryan Davis.
######################################################################
-require "minitest/parallel_each"
-
-# :stopdoc:
class Minitest::Unit::TestCase
class << self
alias :old_test_order :test_order
- def test_order
+ def test_order # :nodoc:
:parallel
end
end
end
-# :startdoc:
diff --git a/lib/minitest/mock.rb b/lib/minitest/mock.rb
index a5b0f602f5..4c1b604425 100644
--- a/lib/minitest/mock.rb
+++ b/lib/minitest/mock.rb
@@ -5,12 +5,13 @@
# File a patch instead and assign it to Ryan Davis.
######################################################################
-class MockExpectationError < StandardError; end # :nodoc:
+class MockExpectationError < StandardError # :nodoc:
+end # omg... worst bug ever. rdoc doesn't allow 1-liners
##
# A simple and clean mock object framework.
-module MiniTest # :nodoc:
+module MiniTest
##
# All mock objects are an instance of Mock
@@ -158,8 +159,7 @@ class Object # :nodoc:
# Add a temporary stubbed method replacing +name+ for the duration
# of the +block+. If +val_or_callable+ responds to #call, then it
# returns the result of calling it, otherwise returns the value
- # as-is. Cleans up the stub at the end of the +block+. The method
- # +name+ must exist before stubbing.
+ # as-is. Cleans up the stub at the end of the +block+.
#
# def test_stale_eh
# obj_under_test = Something.new
diff --git a/lib/minitest/parallel_each.rb b/lib/minitest/parallel_each.rb
index e1020b35a0..d501aa34ef 100644
--- a/lib/minitest/parallel_each.rb
+++ b/lib/minitest/parallel_each.rb
@@ -5,24 +5,12 @@
# File a patch instead and assign it to Ryan Davis.
######################################################################
-##
-# Provides a parallel #each that lets you enumerate using N threads.
-# Use environment variable N to customize. Defaults to 2. Enumerable,
-# so all the goodies come along (tho not all are wrapped yet to
-# return another ParallelEach instance).
-
class ParallelEach
require 'thread'
include Enumerable
- ##
- # How many Threads to use for this parallel #each.
-
N = (ENV['N'] || 2).to_i
- ##
- # Create a new ParallelEach instance over +list+.
-
def initialize list
@queue = Queue.new # *sigh*... the Queue api sucks sooo much...
@@ -30,20 +18,10 @@ class ParallelEach
N.times { @queue << nil }
end
- def grep pattern # :nodoc:
+ def grep pattern
self.class.new super
end
- def select(&block) # :nodoc:
- self.class.new super
- end
-
- alias find_all select # :nodoc:
-
- ##
- # Starts N threads that yield each element to your block. Joins the
- # threads at the end.
-
def each
threads = N.times.map {
Thread.new do
@@ -55,26 +33,4 @@ class ParallelEach
}
threads.map(&:join)
end
-
- def count
- [@queue.size - N, 0].max
- end
-
- alias_method :size, :count
-end
-
-class MiniTest::Unit
- alias _old_run_suites _run_suites
-
- ##
- # Runs all the +suites+ for a given +type+. Runs suites declaring
- # a test_order of +:parallel+ in parallel, and everything else
- # serial.
-
- def _run_suites suites, type
- parallel, serial = suites.partition { |s| s.test_order == :parallel }
-
- ParallelEach.new(parallel).map { |suite| _run_suite suite, type } +
- serial.map { |suite| _run_suite suite, type }
- end
end
diff --git a/lib/minitest/spec.rb b/lib/minitest/spec.rb
index d91fccf5bc..7588982038 100644
--- a/lib/minitest/spec.rb
+++ b/lib/minitest/spec.rb
@@ -66,7 +66,7 @@ module Kernel # :nodoc:
def describe desc, additional_desc = nil, &block # :doc:
stack = MiniTest::Spec.describe_stack
name = [stack.last, desc, additional_desc].compact.join("::")
- sclas = stack.last || if Class === self && is_a?(MiniTest::Spec::DSL) then
+ sclas = stack.last || if Class === self && self < MiniTest::Spec then
self
else
MiniTest::Spec.spec_type desc
@@ -88,183 +88,173 @@ end
# For a list of expectations, see MiniTest::Expectations.
class MiniTest::Spec < MiniTest::Unit::TestCase
+ ##
+ # Contains pairs of matchers and Spec classes to be used to
+ # calculate the superclass of a top-level describe. This allows for
+ # automatically customizable spec types.
+ #
+ # See: register_spec_type and spec_type
+
+ TYPES = [[//, MiniTest::Spec]]
##
- # Oh look! A MiniTest::Spec::DSL module! Eat your heart out DHH.
-
- module DSL
- ##
- # Contains pairs of matchers and Spec classes to be used to
- # calculate the superclass of a top-level describe. This allows for
- # automatically customizable spec types.
- #
- # See: register_spec_type and spec_type
-
- TYPES = [[//, MiniTest::Spec]]
-
- ##
- # Register a new type of spec that matches the spec's description.
- # This method can take either a Regexp and a spec class or a spec
- # class and a block that takes the description and returns true if
- # it matches.
- #
- # Eg:
- #
- # register_spec_type(/Controller$/, MiniTest::Spec::Rails)
- #
- # or:
- #
- # register_spec_type(MiniTest::Spec::RailsModel) do |desc|
- # desc.superclass == ActiveRecord::Base
- # end
-
- def register_spec_type(*args, &block)
- if block then
- matcher, klass = block, args.first
- else
- matcher, klass = *args
- end
- TYPES.unshift [matcher, klass]
+ # Register a new type of spec that matches the spec's description.
+ # This method can take either a Regexp and a spec class or a spec
+ # class and a block that takes the description and returns true if
+ # it matches.
+ #
+ # Eg:
+ #
+ # register_spec_type(/Controller$/, MiniTest::Spec::Rails)
+ #
+ # or:
+ #
+ # register_spec_type(MiniTest::Spec::RailsModel) do |desc|
+ # desc.superclass == ActiveRecord::Base
+ # end
+
+ def self.register_spec_type(*args, &block)
+ if block then
+ matcher, klass = block, args.first
+ else
+ matcher, klass = *args
end
+ TYPES.unshift [matcher, klass]
+ end
- ##
- # Figure out the spec class to use based on a spec's description. Eg:
- #
- # spec_type("BlahController") # => MiniTest::Spec::Rails
+ ##
+ # Figure out the spec class to use based on a spec's description. Eg:
+ #
+ # spec_type("BlahController") # => MiniTest::Spec::Rails
- def spec_type desc
- TYPES.find { |matcher, klass|
- if matcher.respond_to? :call then
- matcher.call desc
- else
- matcher === desc.to_s
- end
- }.last
- end
+ def self.spec_type desc
+ TYPES.find { |matcher, klass|
+ if matcher.respond_to? :call then
+ matcher.call desc
+ else
+ matcher === desc.to_s
+ end
+ }.last
+ end
- def describe_stack # :nodoc:
- Thread.current[:describe_stack] ||= []
- end
+ @@describe_stack = []
+ def self.describe_stack # :nodoc:
+ @@describe_stack
+ end
- ##
- # Returns the children of this spec.
+ ##
+ # Returns the children of this spec.
- def children
- @children ||= []
- end
+ def self.children
+ @children ||= []
+ end
- def nuke_test_methods! # :nodoc:
- self.public_instance_methods.grep(/^test_/).each do |name|
- self.send :undef_method, name
- end
+ def self.nuke_test_methods! # :nodoc:
+ self.public_instance_methods.grep(/^test_/).each do |name|
+ self.send :undef_method, name
end
+ end
- ##
- # Define a 'before' action. Inherits the way normal methods should.
- #
- # NOTE: +type+ is ignored and is only there to make porting easier.
- #
- # Equivalent to MiniTest::Unit::TestCase#setup.
-
- def before type = nil, &block
- define_method :setup do
- super()
- self.instance_eval(&block)
- end
- end
+ ##
+ # Define a 'before' action. Inherits the way normal methods should.
+ #
+ # NOTE: +type+ is ignored and is only there to make porting easier.
+ #
+ # Equivalent to MiniTest::Unit::TestCase#setup.
- ##
- # Define an 'after' action. Inherits the way normal methods should.
- #
- # NOTE: +type+ is ignored and is only there to make porting easier.
- #
- # Equivalent to MiniTest::Unit::TestCase#teardown.
-
- def after type = nil, &block
- define_method :teardown do
- self.instance_eval(&block)
- super()
- end
+ def self.before type = nil, &block
+ define_method :setup do
+ super()
+ self.instance_eval(&block)
end
+ end
- ##
- # Define an expectation with name +desc+. Name gets morphed to a
- # proper test method name. For some freakish reason, people who
- # write specs don't like class inheritance, so this goes way out of
- # its way to make sure that expectations aren't inherited.
- #
- # This is also aliased to #specify and doesn't require a +desc+ arg.
- #
- # Hint: If you _do_ want inheritence, use minitest/unit. You can mix
- # and match between assertions and expectations as much as you want.
-
- def it desc = "anonymous", &block
- block ||= proc { skip "(no tests defined)" }
+ ##
+ # Define an 'after' action. Inherits the way normal methods should.
+ #
+ # NOTE: +type+ is ignored and is only there to make porting easier.
+ #
+ # Equivalent to MiniTest::Unit::TestCase#teardown.
- @specs ||= 0
- @specs += 1
+ def self.after type = nil, &block
+ define_method :teardown do
+ self.instance_eval(&block)
+ super()
+ end
+ end
- name = "test_%04d_%s" % [ @specs, desc ]
+ ##
+ # Define an expectation with name +desc+. Name gets morphed to a
+ # proper test method name. For some freakish reason, people who
+ # write specs don't like class inheritence, so this goes way out of
+ # its way to make sure that expectations aren't inherited.
+ #
+ # This is also aliased to #specify and doesn't require a +desc+ arg.
+ #
+ # Hint: If you _do_ want inheritence, use minitest/unit. You can mix
+ # and match between assertions and expectations as much as you want.
- define_method name, &block
+ def self.it desc = "anonymous", &block
+ block ||= proc { skip "(no tests defined)" }
- self.children.each do |mod|
- mod.send :undef_method, name if mod.public_method_defined? name
- end
+ @specs ||= 0
+ @specs += 1
- name
- end
+ name = "test_%04d_%s" % [ @specs, desc ]
- ##
- # Essentially, define an accessor for +name+ with +block+.
- #
- # Why use let instead of def? I honestly don't know.
+ define_method name, &block
- def let name, &block
- define_method name do
- @_memoized ||= {}
- @_memoized.fetch(name) { |k| @_memoized[k] = instance_eval(&block) }
- end
+ self.children.each do |mod|
+ mod.send :undef_method, name if mod.public_method_defined? name
end
- ##
- # Another lazy man's accessor generator. Made even more lazy by
- # setting the name for you to +subject+.
+ name
+ end
- def subject &block
- let :subject, &block
+ ##
+ # Essentially, define an accessor for +name+ with +block+.
+ #
+ # Why use let instead of def? I honestly don't know.
+
+ def self.let name, &block
+ define_method name do
+ @_memoized ||= {}
+ @_memoized.fetch(name) { |k| @_memoized[k] = instance_eval(&block) }
end
+ end
- def create name, desc # :nodoc:
- cls = Class.new(self) do
- @name = name
- @desc = desc
+ ##
+ # Another lazy man's accessor generator. Made even more lazy by
+ # setting the name for you to +subject+.
- nuke_test_methods!
- end
+ def self.subject &block
+ let :subject, &block
+ end
- children << cls
+ def self.create name, desc # :nodoc:
+ cls = Class.new(self) do
+ @name = name
+ @desc = desc
- cls
+ nuke_test_methods!
end
- def name # :nodoc:
- defined?(@name) ? @name : super
- end
+ children << cls
- def to_s # :nodoc:
- name # Can't alias due to 1.8.7, not sure why
- end
+ cls
+ end
- # :stopdoc:
+ def self.to_s # :nodoc:
+ defined?(@name) ? @name : super
+ end
+
+ # :stopdoc:
+ class << self
attr_reader :desc
alias :specify :it
- # :startdoc:
+ alias :name :to_s
end
-
- extend DSL
-
- TYPES = DSL::TYPES # :nodoc:
+ # :startdoc:
end
##
diff --git a/lib/minitest/unit.rb b/lib/minitest/unit.rb
index 465e5b4c98..a221dda4b4 100644
--- a/lib/minitest/unit.rb
+++ b/lib/minitest/unit.rb
@@ -5,8 +5,10 @@
# File a patch instead and assign it to Ryan Davis.
######################################################################
-require "optparse"
-require "rbconfig"
+require 'optparse'
+require 'rbconfig'
+require 'thread' # required for 1.8
+require 'minitest/parallel_each'
##
# Minimal (mostly drop-in) replacement for test-unit.
@@ -38,9 +40,6 @@ module MiniTest
class Skip < Assertion; end
class << self
- ##
- # Filter object for backtraces.
-
attr_accessor :backtrace_filter
end
@@ -88,17 +87,16 @@ module MiniTest
# figure out what diff to use.
def self.diff
- @diff = if (RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ &&
- system("diff.exe", __FILE__, __FILE__)) then
+ @diff = if RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ then
"diff.exe -u"
- elsif Minitest::Unit::Guard.maglev? then # HACK
- "diff -u"
- elsif system("gdiff", __FILE__, __FILE__)
- "gdiff -u" # solaris and kin suck
- elsif system("diff", __FILE__, __FILE__)
- "diff -u"
else
- nil
+ if system("gdiff", __FILE__, __FILE__)
+ "gdiff -u" # solaris and kin suck
+ elsif system("diff", __FILE__, __FILE__)
+ "diff -u"
+ else
+ nil
+ end
end unless defined? @diff
@diff
@@ -179,8 +177,8 @@ module MiniTest
# newlines and makes hex-values generic (like object_ids). This
# uses mu_pp to do the first pass and then cleans it up.
- def mu_pp_for_diff obj
- mu_pp(obj).gsub(/\\n/, "\n").gsub(/:0x[a-fA-F0-9]{4,}/m, ':0xXXXXXX')
+ def mu_pp_for_diff obj # TODO: possibly rename
+ mu_pp(obj).gsub(/\\n/, "\n").gsub(/0x[a-f0-9]+/m, '0xXXXXXX')
end
def _assertions= n # :nodoc:
@@ -205,6 +203,18 @@ module MiniTest
end
##
+ # Fails unless the block returns a true value.
+ #
+ # NOTE: This method is deprecated, use assert. It will be removed
+ # on 2013-01-01."
+
+ def assert_block msg = nil
+ warn "NOTE: MiniTest::Unit::TestCase#assert_block is deprecated, use assert. It will be removed on 2013-01-01. Called from #{caller.first}"
+ msg = message(msg) { "Expected block to return true value" }
+ assert yield, msg
+ end
+
+ ##
# Fails unless +obj+ is empty.
def assert_empty obj, msg = nil
@@ -227,7 +237,7 @@ module MiniTest
def assert_equal exp, act, msg = nil
msg = message(msg, "") { diff exp, act }
- assert exp == act, msg
+ assert(exp == act, msg)
end
##
@@ -238,9 +248,7 @@ module MiniTest
def assert_in_delta exp, act, delta = 0.001, msg = nil
n = (exp - act).abs
- msg = message(msg) {
- "Expected |#{exp} - #{act}| (#{n}) to be <= #{delta}"
- }
+ msg = message(msg) { "Expected |#{exp} - #{act}| (#{n}) to be < #{delta}"}
assert delta >= n, msg
end
@@ -554,7 +562,6 @@ module MiniTest
def message msg = nil, ending = ".", &default
proc {
- msg = msg.call.chomp(".") if Proc === msg
custom_message = "#{msg}.\n" unless msg.nil? or msg.to_s.empty?
"#{custom_message}#{default.call}#{ending}"
}
@@ -604,9 +611,9 @@ module MiniTest
def refute_in_delta exp, act, delta = 0.001, msg = nil
n = (exp - act).abs
msg = message(msg) {
- "Expected |#{exp} - #{act}| (#{n}) to not be <= #{delta}"
+ "Expected |#{exp} - #{act}| (#{n}) to not be < #{delta}"
}
- refute delta >= n, msg
+ refute delta > n, msg
end
##
@@ -716,18 +723,10 @@ module MiniTest
def skip msg = nil, bt = caller
msg ||= "Skipped, no message given"
- @skip = true
raise MiniTest::Skip, msg, bt
end
##
- # Was this testcase skipped? Meant for #teardown.
-
- def skipped?
- defined?(@skip) and @skip
- end
-
- ##
# Takes a block and wraps it with the runner's shared mutex.
def synchronize
@@ -738,28 +737,16 @@ module MiniTest
end
class Unit # :nodoc:
- VERSION = "4.7.5" # :nodoc:
+ VERSION = "4.3.2" # :nodoc:
attr_accessor :report, :failures, :errors, :skips # :nodoc:
- attr_accessor :assertion_count # :nodoc:
- attr_writer :test_count # :nodoc:
+ attr_accessor :test_count, :assertion_count # :nodoc:
attr_accessor :start_time # :nodoc:
attr_accessor :help # :nodoc:
attr_accessor :verbose # :nodoc:
attr_writer :options # :nodoc:
##
- # :attr:
- #
- # if true, installs an "INFO" signal handler (only available to BSD and
- # OS X users) which prints diagnostic information about the test run.
- #
- # This is auto-detected by default but may be overridden by custom
- # runners.
-
- attr_accessor :info_signal
-
- ##
# Lazy accessor for options.
def options
@@ -860,10 +847,6 @@ module MiniTest
output.print(*a)
end
- def test_count # :nodoc:
- @test_count ||= 0
- end
-
##
# Runner for a given +type+ (eg, test vs bench).
@@ -905,13 +888,15 @@ module MiniTest
end
##
- # Runs all the +suites+ for a given +type+.
- #
- # NOTE: this method is redefined in parallel_each.rb, which is
- # loaded if a test-suite calls parallelize_me!.
+ # Runs all the +suites+ for a given +type+. Runs suites declaring
+ # a test_order of +:parallel+ in parallel, and everything else
+ # serial.
def _run_suites suites, type
- suites.map { |suite| _run_suite suite, type }
+ parallel, serial = suites.partition { |s| s.test_order == :parallel }
+
+ ParallelEach.new(parallel).map { |suite| _run_suite suite, type } +
+ serial.map { |suite| _run_suite suite, type }
end
##
@@ -924,13 +909,7 @@ module MiniTest
filter = options[:filter] || '/./'
filter = Regexp.new $1 if filter =~ /\/(.*)\//
- all_test_methods = suite.send "#{type}_methods"
-
- filtered_test_methods = all_test_methods.find_all { |m|
- filter === m || filter === "#{suite}##{m}"
- }
-
- assertions = filtered_test_methods.map { |method|
+ assertions = suite.send("#{type}_methods").grep(filter).map { |method|
inst = suite.new method
inst._assertions = 0
@@ -950,7 +929,7 @@ module MiniTest
end
##
- # Record the result of a single test. Makes it very easy to gather
+ # Record the result of a single run. Makes it very easy to gather
# information. Eg:
#
# class StatisticsRecorder < MiniTest::Unit
@@ -960,11 +939,6 @@ module MiniTest
# end
#
# MiniTest::Unit.runner = StatisticsRecorder.new
- #
- # NOTE: record might be sent more than once per test. It will be
- # sent once with the results from the test itself. If there is a
- # failure or error in teardown, it will be sent again with the
- # error or failure.
def record suite, method, assertions, time, error
end
@@ -987,14 +961,14 @@ module MiniTest
when MiniTest::Skip then
@skips += 1
return "S" unless @verbose
- "Skipped:\n#{klass}##{meth} [#{location e}]:\n#{e.message}\n"
+ "Skipped:\n#{meth}(#{klass}) [#{location e}]:\n#{e.message}\n"
when MiniTest::Assertion then
@failures += 1
- "Failure:\n#{klass}##{meth} [#{location e}]:\n#{e.message}\n"
+ "Failure:\n#{meth}(#{klass}) [#{location e}]:\n#{e.message}\n"
else
@errors += 1
bt = MiniTest::filter_backtrace(e.backtrace).join "\n "
- "Error:\n#{klass}##{meth}:\n#{e.class}: #{e.message}\n #{bt}\n"
+ "Error:\n#{meth}(#{klass}):\n#{e.class}: #{e.message}\n #{bt}\n"
end
@report << e
e[0, 1]
@@ -1004,16 +978,11 @@ module MiniTest
@report = []
@errors = @failures = @skips = 0
@verbose = false
- @mutex = defined?(Mutex) ? Mutex.new : nil
- @info_signal = Signal.list['INFO']
+ @mutex = Mutex.new
end
def synchronize # :nodoc:
- if @mutex then
- @mutex.synchronize { yield }
- else
- yield
- end
+ @mutex.synchronize { yield }
end
def process_args args = [] # :nodoc:
@@ -1070,8 +1039,7 @@ module MiniTest
# Top level driver, controls all output and filtering.
def _run args = []
- args = process_args args # ARGH!! blame test/unit process_args
- self.options.merge! args
+ self.options = process_args args
puts "Run options: #{help}"
@@ -1080,7 +1048,7 @@ module MiniTest
break unless report.empty?
end
- return failures + errors if self.test_count > 0 # or return nil...
+ return failures + errors if @test_count > 0 # or return nil...
rescue Interrupt
abort 'Interrupted'
end
@@ -1127,15 +1095,6 @@ module MiniTest
##
# Is this running on mri?
- def maglev? platform = defined?(RUBY_ENGINE) && RUBY_ENGINE
- "maglev" == platform
- end
-
- module_function :maglev?
-
- ##
- # Is this running on mri?
-
def mri? platform = RUBY_DESCRIPTION
/^ruby/ =~ platform
end
@@ -1224,6 +1183,79 @@ module MiniTest
def after_teardown; end
end
+ module Deprecated # :nodoc:
+
+ ##
+ # This entire module is deprecated and slated for removal on 2013-01-01.
+
+ module Hooks
+ def run_setup_hooks # :nodoc:
+ _run_hooks self.class.setup_hooks
+ end
+
+ def _run_hooks hooks # :nodoc:
+ hooks.each do |hook|
+ if hook.respond_to?(:arity) && hook.arity == 1
+ hook.call(self)
+ else
+ hook.call
+ end
+ end
+ end
+
+ def run_teardown_hooks # :nodoc:
+ _run_hooks self.class.teardown_hooks.reverse
+ end
+ end
+
+ ##
+ # This entire module is deprecated and slated for removal on 2013-01-01.
+
+ module HooksCM
+ ##
+ # Adds a block of code that will be executed before every
+ # TestCase is run.
+ #
+ # NOTE: This method is deprecated, use before/after_setup. It
+ # will be removed on 2013-01-01.
+
+ def add_setup_hook arg=nil, &block
+ warn "NOTE: MiniTest::Unit::TestCase.add_setup_hook is deprecated, use before/after_setup via a module (and call super!). It will be removed on 2013-01-01. Called from #{caller.first}"
+ hook = arg || block
+ @setup_hooks << hook
+ end
+
+ def setup_hooks # :nodoc:
+ if superclass.respond_to? :setup_hooks then
+ superclass.setup_hooks
+ else
+ []
+ end + @setup_hooks
+ end
+
+ ##
+ # Adds a block of code that will be executed after every
+ # TestCase is run.
+ #
+ # NOTE: This method is deprecated, use before/after_teardown. It
+ # will be removed on 2013-01-01.
+
+ def add_teardown_hook arg=nil, &block
+ warn "NOTE: MiniTest::Unit::TestCase#add_teardown_hook is deprecated, use before/after_teardown. It will be removed on 2013-01-01. Called from #{caller.first}"
+ hook = arg || block
+ @teardown_hooks << hook
+ end
+
+ def teardown_hooks # :nodoc:
+ if superclass.respond_to? :teardown_hooks then
+ superclass.teardown_hooks
+ else
+ []
+ end + @teardown_hooks
+ end
+ end
+ end
+
##
# Subclass TestCase to create your own tests. Typically you'll want a
# TestCase subclass per implementation class.
@@ -1232,6 +1264,8 @@ module MiniTest
class TestCase
include LifecycleHooks
+ include Deprecated::Hooks
+ extend Deprecated::HooksCM # UGH... I can't wait 'til 2013!
include Guard
extend Guard
@@ -1240,6 +1274,8 @@ module MiniTest
PASSTHROUGH_EXCEPTIONS = [NoMemoryError, SignalException,
Interrupt, SystemExit] # :nodoc:
+ SUPPORTS_INFO_SIGNAL = Signal.list['INFO'] # :nodoc:
+
##
# Runs the tests reporting the status to +runner+
@@ -1252,7 +1288,7 @@ module MiniTest
time = runner.start_time ? Time.now - runner.start_time : 0
warn "Current Test: %s#%s %.2fs" % [self.class, self.__name__, time]
runner.status $stderr
- end if runner.info_signal
+ end if SUPPORTS_INFO_SIGNAL
start_time = Time.now
@@ -1270,7 +1306,7 @@ module MiniTest
rescue *PASSTHROUGH_EXCEPTIONS
raise
rescue Exception => e
- @passed = Skip === e
+ @passed = false
time = Time.now - start_time
runner.record self.class, self.__name__, self._assertions, time, e
result = runner.puke self.class, self.__name__, e
@@ -1282,11 +1318,10 @@ module MiniTest
raise
rescue Exception => e
@passed = false
- runner.record self.class, self.__name__, self._assertions, time, e
result = runner.puke self.class, self.__name__, e
end
end
- trap 'INFO', 'DEFAULT' if runner.info_signal
+ trap 'INFO', 'DEFAULT' if SUPPORTS_INFO_SIGNAL
end
result
end
@@ -1297,11 +1332,11 @@ module MiniTest
@__name__ = name
@__io__ = nil
@passed = nil
- @@current = self # FIX: make thread local
+ @@current = self
end
def self.current # :nodoc:
- @@current # FIX: make thread local
+ @@current
end
##
@@ -1357,8 +1392,6 @@ module MiniTest
# and your tests are awesome.
def self.parallelize_me!
- require "minitest/parallel_each"
-
class << self
undef_method :test_order if method_defined? :test_order
define_method :test_order do :parallel end
@@ -1367,6 +1400,7 @@ module MiniTest
def self.inherited klass # :nodoc:
@@test_suites[klass] = true
+ klass.reset_setup_teardown_hooks
super
end
@@ -1414,9 +1448,30 @@ module MiniTest
def teardown; end
+ def self.reset_setup_teardown_hooks # :nodoc:
+ # also deprecated... believe it.
+ @setup_hooks = []
+ @teardown_hooks = []
+ end
+
+ reset_setup_teardown_hooks
+
include MiniTest::Assertions
end # class TestCase
end # class Unit
end # module MiniTest
Minitest = MiniTest # :nodoc: because ugh... I typo this all the time
+
+if $DEBUG then
+ module Test # :nodoc:
+ module Unit # :nodoc:
+ class TestCase # :nodoc:
+ def self.inherited x # :nodoc:
+ # this helps me ferret out porting issues
+ raise "Using minitest and test/unit in the same process: #{x}"
+ end
+ end
+ end
+ end
+end
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index c4e2e5a900..55e4b4a71c 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -41,48 +41,20 @@ end
# :startdoc:
##
-# mkmf.rb is used by Ruby C extensions to generate a Makefile which will
-# correctly compile and link the C extension to Ruby and a third-party
+# mkmf.rb is used by ruby C extensions to generate a Makefile which will
+# correctly compile and link the C extension to ruby and a third-party
# library.
module MakeMakefile
- #### defer until this module become global-state free.
- # def self.extended(obj)
- # obj.init_mkmf
- # super
- # end
- #
- # def initialize(*args, rbconfig: RbConfig, **rest)
- # init_mkmf(rbconfig::MAKEFILE_CONFIG, rbconfig::CONFIG)
- # super(*args, **rest)
- # end
-
- ##
- # The makefile configuration using the defaults from when Ruby was built.
CONFIG = RbConfig::MAKEFILE_CONFIG
ORIG_LIBPATH = ENV['LIB']
- ##
- # Extensions for files compiled with a C compiler
-
C_EXT = %w[c m]
-
- ##
- # Extensions for files complied with a C++ compiler
-
CXX_EXT = %w[cc mm cxx cpp]
if File::FNM_SYSCASE.zero?
CXX_EXT.concat(%w[C])
end
-
- ##
- # Extensions for source files
-
SRC_EXT = C_EXT + CXX_EXT
-
- ##
- # Extensions for header files
-
HDR_EXT = %w[h hpp]
$static = nil
$config_h = '$(arch_hdrdir)/ruby/config.h'
@@ -227,18 +199,14 @@ module MakeMakefile
topdir = File.dirname(File.dirname(__FILE__))
path = File.expand_path($0)
- until (dir = File.dirname(path)) == path
- if File.identical?(dir, topdir)
- $extmk = true if %r"\A(?:ext|enc|tool|test)\z" =~ File.basename(path)
- break
- end
- path = dir
- end
- $extmk ||= false
- if not $extmk and File.exist?(($hdrdir = RbConfig::CONFIG["rubyhdrdir"]) + "/ruby/ruby.h")
+ $extmk = path[0, topdir.size+1] == topdir+"/"
+ $extmk &&= %r"\A(?:ext|enc|tool|test(?:/.+)?)\z" =~ File.dirname(path[topdir.size+1..-1])
+ $extmk &&= true
+ if not $extmk and File.exist?(RbConfig::CONFIG["rubyhdrdir"] + "/ruby/ruby.h")
+ $hdrdir = CONFIG["rubyhdrdir"]
$topdir = $hdrdir
$top_srcdir = $hdrdir
- $arch_hdrdir = RbConfig::CONFIG["rubyarchhdrdir"]
+ $arch_hdrdir = "$(hdrdir)/$(arch)"
elsif File.exist?(($hdrdir = ($top_srcdir ||= topdir) + "/include") + "/ruby.h")
$topdir ||= RbConfig::CONFIG["topdir"]
$arch_hdrdir = "$(extout)/include/$(arch)"
@@ -246,12 +214,11 @@ module MakeMakefile
abort "mkmf.rb can't find header files for ruby at #{$hdrdir}/ruby.h"
end
- CONFTEST = "conftest".freeze
- CONFTEST_C = "#{CONFTEST}.c"
-
OUTFLAG = CONFIG['OUTFLAG']
COUTFLAG = CONFIG['COUTFLAG']
- CPPOUTFILE = config_string('CPPOUTFILE') {|str| str.sub(/\bconftest\b/, CONFTEST)}
+ CPPOUTFILE = CONFIG['CPPOUTFILE']
+
+ CONFTEST_C = "conftest.c".freeze
def rm_f(*files)
opt = (Hash === files.last ? [files.pop] : [])
@@ -279,15 +246,17 @@ module MakeMakefile
def merge_libs(*libs)
libs.inject([]) do |x, y|
+ xy = x & y
+ xn = yn = 0
y = y.inject([]) {|ary, e| ary.last == e ? ary : ary << e}
y.each_with_index do |v, yi|
- if xi = x.rindex(v)
- x[(xi+1)..-1] = merge_libs(y[(yi+1)..-1], x[(xi+1)..-1])
- x[xi, 0] = y[0...yi]
- break
+ if xy.include?(v)
+ xi = [x.index(v), xn].max()
+ x[xi, 1] = y[yn..yi]
+ xn, yn = xi + (yi - yn + 1), yi + 1
end
- end and x.concat(y)
- x
+ end
+ x.concat(y[yn..-1] || [])
end
end
@@ -310,10 +279,6 @@ module MakeMakefile
@log.sync = true
end
- def self::log_opened?
- @log and not @log.closed?
- end
-
def self::open
log_open
$stderr.reopen(@log)
@@ -364,21 +329,10 @@ module MakeMakefile
end
end
- def libpath_env
- # used only if native compiling
- if libpathenv = config_string("LIBPATHENV")
- pathenv = ENV[libpathenv]
- libpath = RbConfig.expand($DEFLIBPATH.join(File::PATH_SEPARATOR))
- {libpathenv => [libpath, pathenv].compact.join(File::PATH_SEPARATOR)}
- else
- {}
- end
- end
-
def xsystem command, opts = nil
varpat = /\$\((\w+)\)|\$\{(\w+)\}/
if varpat =~ command
- vars = Hash.new {|h, k| h[k] = ENV[k]}
+ vars = Hash.new {|h, k| h[k] = ''; ENV[k]}
command = command.dup
nil while command.gsub!(varpat) {vars[$1||$2]}
end
@@ -387,12 +341,12 @@ module MakeMakefile
if opts and opts[:werror]
result = nil
Logging.postpone do |log|
- result = (system(libpath_env, command) and File.zero?(log.path))
+ result = (system(command) and File.zero?(log.path))
""
end
result
else
- system(libpath_env, command)
+ system(command)
end
end
end
@@ -405,7 +359,7 @@ module MakeMakefile
else
puts "| #{command}"
end
- IO.popen(libpath_env, command, *mode, &block)
+ IO.popen(command, *mode, &block)
end
end
@@ -463,7 +417,7 @@ MSG
xsystem(command, *opts)
ensure
log_src(src)
- MakeMakefile.rm_rf "#{CONFTEST}.dSYM"
+ MakeMakefile.rm_rf 'conftest.dSYM'
end
end
@@ -539,7 +493,7 @@ MSG
end
else
try_do(src, cmd, *opts, &b)
- end and File.executable?(CONFTEST+$EXEEXT)
+ end and File.executable?("conftest#{$EXEEXT}")
end
# Returns whether or not the +src+ can be compiled as a C source and linked
@@ -555,7 +509,7 @@ MSG
def try_link(src, opt="", *opts, &b)
try_link0(src, opt, *opts, &b)
ensure
- MakeMakefile.rm_f "#{CONFTEST}*", "c0x32*"
+ MakeMakefile.rm_f "conftest*", "c0x32*"
end
# Returns whether or not the +src+ can be compiled as a C source. +opt+ is
@@ -569,9 +523,9 @@ MSG
# [+opt+] a String which contains compiler options
def try_compile(src, opt="", *opts, &b)
with_werror(opt, *opts) {|_opt, *_opts| try_do(src, cc_command(_opt), *_opts, &b)} and
- File.file?("#{CONFTEST}.#{$OBJEXT}")
+ File.file?("conftest.#{$OBJEXT}")
ensure
- MakeMakefile.rm_f "#{CONFTEST}*"
+ MakeMakefile.rm_f "conftest*"
end
# Returns whether or not the +src+ can be preprocessed with the C
@@ -585,9 +539,9 @@ MSG
# [+opt+] a String which contains preprocessor options
def try_cpp(src, opt="", *opts, &b)
try_do(src, cpp_command(CPPOUTFILE, opt), *opts, &b) and
- File.file?("#{CONFTEST}.i")
+ File.file?("conftest.i")
ensure
- MakeMakefile.rm_f "#{CONFTEST}*"
+ MakeMakefile.rm_f "conftest*"
end
alias_method :try_header, (config_string('try_header') || :try_cpp)
@@ -654,12 +608,12 @@ SRC
def try_constant(const, headers = nil, opt = "", &b)
includes = cpp_include(headers)
- neg = try_static_assert("#{const} < 0", headers, opt)
if CROSS_COMPILING
- if neg
- const = "-(#{const})"
- elsif try_static_assert("#{const} > 0", headers, opt)
+ if try_static_assert("#{const} > 0", headers, opt)
# positive constant
+ elsif try_static_assert("#{const} < 0", headers, opt)
+ neg = true
+ const = "-(#{const})"
elsif try_static_assert("#{const} == 0", headers, opt)
return 0
else
@@ -687,26 +641,17 @@ SRC
src = %{#{includes}
#include <stdio.h>
/*top*/
-typedef#{neg ? '' : ' unsigned'}
-#ifdef PRI_LL_PREFIX
-#define PRI_CONFTEST_PREFIX PRI_LL_PREFIX
-LONG_LONG
-#else
-#define PRI_CONFTEST_PREFIX "l"
-long
-#endif
-conftest_type;
-conftest_type conftest_const = (conftest_type)(#{const});
-int main() {printf("%"PRI_CONFTEST_PREFIX"#{neg ? 'd' : 'u'}\\n", conftest_const); return 0;}
+int conftest_const = (int)(#{const});
+int main() {printf("%d\\n", conftest_const); return 0;}
}
begin
if try_link0(src, opt, &b)
- xpopen("./#{CONFTEST}") do |f|
+ xpopen("./conftest") do |f|
return Integer(f.gets)
end
end
ensure
- MakeMakefile.rm_f "#{CONFTEST}*"
+ MakeMakefile.rm_f "conftest*"
end
end
nil
@@ -742,15 +687,15 @@ int main() {printf("%"PRI_CONFTEST_PREFIX"#{neg ? 'd' : 'u'}\\n", conftest_const
decltype && try_link(<<"SRC", opt, &b) or
#{headers}
/*top*/
+#{MAIN_DOES_NOTHING}
extern int t(void);
-#{MAIN_DOES_NOTHING 't'}
int t(void) { #{decltype["volatile p"]}; p = (#{decltype[]})#{func}; return 0; }
SRC
call && try_link(<<"SRC", opt, &b)
#{headers}
/*top*/
+#{MAIN_DOES_NOTHING}
extern int t(void);
-#{MAIN_DOES_NOTHING 't'}
int t(void) { #{call}; return 0; }
SRC
end
@@ -761,8 +706,8 @@ SRC
try_compile(<<"SRC", opt, &b)
#{headers}
/*top*/
+#{MAIN_DOES_NOTHING}
extern int t(void);
-#{MAIN_DOES_NOTHING 't'}
int t(void) { const volatile void *volatile p; p = &(&#{var})[0]; return 0; }
SRC
end
@@ -801,7 +746,7 @@ SRC
end
end
ensure
- MakeMakefile.rm_f "#{CONFTEST}*"
+ MakeMakefile.rm_f "conftest*"
log_src(src)
end
@@ -836,14 +781,13 @@ SRC
# Returns true when the executable exits successfully, false when it fails,
# or nil when preprocessing, compilation or link fails.
def try_run(src, opt = "", &b)
- raise "cannot run test program while cross compiling" if CROSS_COMPILING
if try_link0(src, opt, &b)
- xsystem("./#{CONFTEST}")
+ xsystem("./conftest")
else
nil
end
ensure
- MakeMakefile.rm_f "#{CONFTEST}*"
+ MakeMakefile.rm_f "conftest*"
end
def install_files(mfile, ifiles, map = nil, srcprefix = nil)
@@ -992,7 +936,7 @@ SRC
func = "main" if !func or func.empty?
lib = with_config(lib+'lib', lib)
paths = paths.collect {|path| path.split(File::PATH_SEPARATOR)}.flatten
- checking_for checking_message(func.funcall_style, LIBARG%lib) do
+ checking_for(func.funcall_style, LIBARG%lib) do
libpath = $LIBPATH
libs = append_library($libs, lib)
begin
@@ -1081,24 +1025,16 @@ SRC
# the +HAVE_FRAMEWORK_RUBY+ preprocessor macro would be passed to the
# compiler.
#
- # If +fw+ is a pair of the framework name and its header file name
- # that header file is checked, instead of the normally used header
- # file which is named same as the framework.
def have_framework(fw, &b)
- if Array === fw
- fw, header = *fw
- else
- header = "#{fw}.h"
- end
checking_for fw do
- src = cpp_include("#{fw}/#{header}") << "\n" "int main(void){return 0;}"
+ src = cpp_include("#{fw}/#{fw}.h") << "\n" "int main(void){return 0;}"
opt = " -framework #{fw}"
if try_link(src, "-ObjC#{opt}", &b)
$defs.push(format("-DHAVE_FRAMEWORK_%s", fw.tr_cpp))
# TODO: non-worse way than this hack, to get rid of separating
# option and its argument.
$LDFLAGS << " -ObjC" unless /(\A|\s)-ObjC(\s|\z)/ =~ $LDFLAGS
- $LIBS << opt
+ $LDFLAGS << opt
true
else
false
@@ -1154,8 +1090,8 @@ SRC
if try_compile(<<"SRC", opt, &b)
#{cpp_include(headers)}
/*top*/
-int s = (char *)&((#{type}*)0)->#{member} - (char *)0;
#{MAIN_DOES_NOTHING}
+int s = (char *)&((#{type}*)0)->#{member} - (char *)0;
SRC
$defs.push(format("-DHAVE_%s_%s", type.tr_cpp, member.tr_cpp))
$defs.push(format("-DHAVE_ST_%s", member.tr_cpp)) # backward compatibility
@@ -1266,7 +1202,7 @@ SRC
# :stopdoc:
STRING_OR_FAILED_FORMAT = "%s"
- def STRING_OR_FAILED_FORMAT.%(x) # :nodoc:
+ def STRING_OR_FAILED_FORMAT.%(x)
x ? super : "failed"
end
@@ -1408,8 +1344,8 @@ SRC
#{cpp_include(headers)}
/*top*/
volatile #{type} conftestval;
+#{MAIN_DOES_NOTHING}
extern int t(void);
-#{MAIN_DOES_NOTHING 't'}
int t(void) {return (int)(1-*(conftestval#{member ? ".#{member}" : ""}));}
SRC
end
@@ -1421,8 +1357,8 @@ SRC
#{cpp_include(headers)}
/*top*/
volatile #{type} conftestval;
+#{MAIN_DOES_NOTHING}
extern int t(void);
-#{MAIN_DOES_NOTHING 't'}
int t(void) {return (int)(1-(conftestval#{member ? ".#{member}" : ""}));}
SRC
end
@@ -1698,7 +1634,7 @@ SRC
idir = with_config(target + "-include", idefault)
$arg_config.last[1] ||= "${#{target}-dir}/include"
ldir = with_config(target + "-lib", ldefault)
- $arg_config.last[1] ||= "${#{target}-dir}/#{_libdir_basename}"
+ $arg_config.last[1] ||= "${#{target}-dir}/#{@libdir_basename}"
idirs = idir ? Array === idir ? idir.dup : idir.split(File::PATH_SEPARATOR) : []
if defaults
@@ -1715,7 +1651,7 @@ SRC
ldirs = ldir ? Array === ldir ? ldir.dup : ldir.split(File::PATH_SEPARATOR) : []
if defaults
- ldirs.concat(defaults.collect {|d| "#{d}/#{_libdir_basename}"})
+ ldirs.concat(defaults.collect {|d| "#{d}/#{@libdir_basename}"})
ldir = ([ldir] + ldirs).compact.join(File::PATH_SEPARATOR)
end
$LIBPATH = ldirs | $LIBPATH
@@ -1723,26 +1659,14 @@ SRC
[idir, ldir]
end
- # Returns compile/link information about an installed library in a
- # tuple of <code>[cflags, ldflags, libs]</code>, by using the
- # command found first in the following commands:
- #
- # 1. If <code>--with-{pkg}-config={command}</code> is given via
- # command line option: <code>{command} {option}</code>
- #
- # 2. <code>{pkg}-config {option}</code>
- #
- # 3. <code>pkg-config {option} {pkg}</code>
- #
- # Where {option} is, for instance, <code>--cflags</code>.
- #
- # The values obtained are appended to +$CFLAGS+, +$LDFLAGS+ and
- # +$libs+.
+ # :stopdoc:
+
+ # Handles meta information about installed libraries. Uses your platform's
+ # pkg-config program if it has one.
#
- # If an <code>option</code> argument is given, the config command is
- # invoked with the option and a stripped output string is returned
- # without modifying any of the global values mentioned above.
- def pkg_config(pkg, option=nil)
+ # The actual command name can be overridden by
+ # <code>--with-pkg-config</code> command line option.
+ def pkg_config(pkg)
if pkgconfig = with_config("#{pkg}-config") and find_executable0(pkgconfig)
# iff package specific config command is given
get = proc {|opt| `#{pkgconfig} --#{opt}`.strip}
@@ -1756,15 +1680,12 @@ SRC
# default to package specific config command, as a last resort.
get = proc {|opt| `#{pkgconfig} --#{opt}`.strip}
end
- orig_ldflags = $LDFLAGS
- if get and option
- get[option]
- elsif get and try_ldflags(ldflags = get['libs'])
+ if get and try_ldflags(ldflags = get['libs'])
cflags = get['cflags']
libs = get['libs-only-l']
ldflags = (Shellwords.shellwords(ldflags) - Shellwords.shellwords(libs)).quote.join(" ")
$CFLAGS += " " << cflags
- $LDFLAGS = [orig_ldflags, ldflags].join(' ')
+ $LDFLAGS += " " << ldflags
$libs += " " << libs
Logging::message "package configuration for %s\n", pkg
Logging::message "cflags: %s\nldflags: %s\nlibs: %s\n\n",
@@ -1776,8 +1697,6 @@ SRC
end
end
- # :stopdoc:
-
def with_destdir(dir)
dir = dir.sub($dest_prefix_pattern, '')
/\A\$[\(\{]/ =~ dir ? dir : "$(DESTDIR)"+dir
@@ -1837,10 +1756,9 @@ ECHO = $(ECHO1:0=@echo)
#### Start of system configuration section. ####
#{"top_srcdir = " + $top_srcdir.sub(%r"\A#{Regexp.quote($topdir)}/", "$(topdir)/") if $extmk}
srcdir = #{srcdir.gsub(/\$\((srcdir)\)|\$\{(srcdir)\}/) {mkintpath(CONFIG[$1||$2]).unspace}}
-topdir = #{mkintpath(topdir = $extmk ? CONFIG["topdir"] : $topdir).unspace}
-hdrdir = #{(hdrdir = CONFIG["hdrdir"]) == topdir ? "$(topdir)" : mkintpath(hdrdir).unspace}
+topdir = #{mkintpath($extmk ? CONFIG["topdir"] : $topdir).unspace}
+hdrdir = #{mkintpath(CONFIG["hdrdir"]).unspace}
arch_hdrdir = #{$arch_hdrdir.quote}
-PATH_SEPARATOR = #{CONFIG['PATH_SEPARATOR']}
VPATH = #{vpath.join(CONFIG['PATH_SEPARATOR'])}
}
if $extmk
@@ -1849,7 +1767,6 @@ VPATH = #{vpath.join(CONFIG['PATH_SEPARATOR'])}
prefix = mkintpath(CONFIG["prefix"])
if destdir = prefix[$dest_prefix_pattern, 1]
mk << "\nDESTDIR = #{destdir}\n"
- prefix = prefix[destdir.size..-1]
end
mk << "prefix = #{with_destdir(prefix).unspace}\n"
CONFIG.each do |key, var|
@@ -1869,15 +1786,7 @@ VPATH = #{vpath.join(CONFIG['PATH_SEPARATOR'])}
end
possible_command = (proc {|s| s if /top_srcdir/ !~ s} unless $extmk)
extconf_h = $extconf_h ? "-DRUBY_EXTCONF_H=\\\"$(RUBY_EXTCONF_H)\\\" " : $defs.join(" ") << " "
- headers = %w[
- $(hdrdir)/ruby.h
- $(hdrdir)/ruby/ruby.h
- $(hdrdir)/ruby/defines.h
- $(hdrdir)/ruby/missing.h
- $(hdrdir)/ruby/intern.h
- $(hdrdir)/ruby/st.h
- $(hdrdir)/ruby/subst.h
- ]
+ headers = %w[$(hdrdir)/ruby.h $(hdrdir)/ruby/defines.h]
if RULE_SUBST
headers.each {|h| h.sub!(/.*/, &RULE_SUBST.method(:%))}
end
@@ -1900,12 +1809,11 @@ cflags = #{CONFIG['cflags']}
optflags = #{CONFIG['optflags']}
debugflags = #{CONFIG['debugflags']}
warnflags = #{$warnflags}
-CCDLFLAGS = #{$static ? '' : CONFIG['CCDLFLAGS']}
-CFLAGS = $(CCDLFLAGS) #$CFLAGS $(ARCH_FLAG)
+CFLAGS = #{$static ? '' : CONFIG['CCDLFLAGS']} #$CFLAGS $(ARCH_FLAG)
INCFLAGS = -I. #$INCFLAGS
DEFS = #{CONFIG['DEFS']}
CPPFLAGS = #{extconf_h}#{$CPPFLAGS}
-CXXFLAGS = $(CCDLFLAGS) #{CONFIG['CXXFLAGS']} $(ARCH_FLAG)
+CXXFLAGS = $(CFLAGS) #{CONFIG['CXXFLAGS']}
ldflags = #{$LDFLAGS}
dldflags = #{$DLDFLAGS} #{CONFIG['EXTDLDFLAGS']}
ARCH_FLAG = #{$ARCH_FLAG}
@@ -1915,11 +1823,9 @@ LDSHAREDXX = #{config_string('LDSHAREDXX') || '$(LDSHARED)'}
AR = #{CONFIG['AR']}
EXEEXT = #{CONFIG['EXEEXT']}
-}
- CONFIG.each do |key, val|
- mk << "#{key} = #{val}\n" if /^RUBY.*NAME/ =~ key
- end
- mk << %{
+RUBY_BASE_NAME = #{CONFIG['RUBY_BASE_NAME']}
+RUBY_INSTALL_NAME = #{CONFIG['RUBY_INSTALL_NAME']}
+RUBY_SO_NAME = #{CONFIG['RUBY_SO_NAME']}
arch = #{CONFIG['arch']}
sitearch = #{CONFIG['sitearch']}
ruby_version = #{RbConfig::CONFIG['ruby_version']}
@@ -1953,16 +1859,9 @@ preload = #{defined?($preload) && $preload ? $preload.join(' ') : ''}
mk
end
- def timestamp_file(name, target_prefix = nil)
- if target_prefix
- pat = []
- install_dirs.each do |n, d|
- pat << n if /\$\(target_prefix\)\z/ =~ d
- end
- name = name.gsub(/\$\((#{pat.join("|")})\)/) {$&+target_prefix}
- end
+ def timestamp_file(name)
name = name.gsub(/(\$[({]|[})])|(\/+)|[^-.\w]+/) {$1 ? "" : $2 ? ".-." : "_"}
- "$(TIMESTAMP_DIR)/.#{name}.time"
+ "./.#{name}.time"
end
# :startdoc:
@@ -1980,7 +1879,7 @@ all install static install-so install-rb: Makefile
RULES
end
- def each_compile_rules # :nodoc:
+ def each_compile_rules
vpath_splat = /\$\(\*VPATH\*\)/
COMPILE_RULES.each do |rule|
if vpath_splat =~ rule
@@ -2026,7 +1925,6 @@ RULES
end
depend.each_line do |line|
line.gsub!(/\.o\b/, ".#{$OBJEXT}")
- line.gsub!(/\{\$\(VPATH\)\}/, "") unless $nmake
line.gsub!(/\$\((?:hdr|top)dir\)\/config.h/, $config_h)
line.gsub!(%r"\$\(hdrdir\)/(?!ruby(?![^:;/\s]))(?=[-\w]+\.h)", '\&ruby/')
if $nmake && /\A\s*\$\(RM|COPY\)/ =~ line
@@ -2112,7 +2010,7 @@ RULES
$target = target
libpath = $DEFLIBPATH|$LIBPATH
message "creating Makefile\n"
- MakeMakefile.rm_f "#{CONFTEST}*"
+ MakeMakefile.rm_f "conftest*"
if CONFIG["DLEXT"] == $OBJEXT
for lib in libs = $libs.split
lib.sub!(/-l(.*)/, %%"lib\\1.#{$LIBEXT}"%)
@@ -2174,10 +2072,6 @@ RULES
$distcleandirs.concat($INSTALLFILES.collect {|files, dir| dir})
end
- if $extmk and $static
- $defs << "-DRUBY_EXPORT=1"
- end
-
if $extmk and not $extconf_h
create_header
end
@@ -2215,7 +2109,6 @@ DLLIB = #{dllib}
EXTSTATIC = #{$static || ""}
STATIC_LIB = #{staticlib unless $static.nil?}
#{!$extout && defined?($installed_list) ? "INSTALLED_LIST = #{$installed_list}\n" : ""}
-TIMESTAMP_DIR = #{$extout ? '$(extout)/.timestamp' : '.'}
" #"
# TODO: fixme
install_dirs.each {|d| mfile.print("%-14s= %s\n" % d) if /^[[:upper:]]/ =~ d[0]}
@@ -2258,7 +2151,7 @@ static: $(STATIC_LIB)#{$extout ? " install-rb" : ""}
mfile.print "\t-$(Q)$(RM) #{fseprepl[dest]}\n"
mfile.print "\t-$(Q)$(RMDIRS) #{fseprepl[dir]}#{$ignore_error}\n"
else
- mfile.print "#{f} #{timestamp_file(dir, target_prefix)}\n"
+ mfile.print "#{f} #{timestamp_file(dir)}\n"
mfile.print "\t$(INSTALL_PROG) #{fseprepl[f]} #{dir}\n"
if defined?($installed_list)
mfile.print "\t@echo #{dir}/#{File.basename(f)}>>$(INSTALLED_LIST)\n"
@@ -2278,12 +2171,12 @@ static: $(STATIC_LIB)#{$extout ? " install-rb" : ""}
for dir, *files in files
unless dirs.include?(dir)
dirs << dir
- mfile.print "pre-install-rb#{sfx}: #{timestamp_file(dir, target_prefix)}\n"
+ mfile.print "pre-install-rb#{sfx}: #{timestamp_file(dir)}\n"
end
for f in files
dest = "#{dir}/#{File.basename(f)}"
mfile.print("install-rb#{sfx}: #{dest}\n")
- mfile.print("#{dest}: #{f} #{timestamp_file(dir, target_prefix)}\n")
+ mfile.print("#{dest}: #{f} #{timestamp_file(dir)}\n")
mfile.print("\t$(Q) $(#{$extout ? 'COPY' : 'INSTALL_DATA'}) #{f} $(@D#{sep})\n")
if defined?($installed_list) and !$extout
mfile.print("\t@echo #{dest}>>$(INSTALLED_LIST)\n")
@@ -2308,8 +2201,8 @@ static: $(STATIC_LIB)#{$extout ? " install-rb" : ""}
end
dirs.unshift(sodir) if target and !dirs.include?(sodir)
dirs.each do |d|
- t = timestamp_file(d, target_prefix)
- mfile.print "#{t}:\n\t$(Q) $(MAKEDIRS) $(@D) #{d}\n\t$(Q) $(TOUCH) $@\n"
+ t = timestamp_file(d)
+ mfile.print "#{t}:\n\t$(Q) $(MAKEDIRS) #{d}\n\t$(Q) $(TOUCH) $@\n"
end
mfile.print <<-SITEINSTALL
@@ -2344,7 +2237,7 @@ site-install-rb: install-rb
mfile.print "$(DLLIB): "
mfile.print "$(DEFFILE) " if makedef
mfile.print "$(OBJS) Makefile"
- mfile.print " #{timestamp_file('$(RUBYARCHDIR)', target_prefix)}" if $extout
+ mfile.print " #{timestamp_file('$(RUBYARCHDIR)')}" if $extout
mfile.print "\n"
mfile.print "\t$(ECHO) linking shared-object #{target_prefix.sub(/\A\/(.*)/, '\1/')}$(DLLIB)\n"
mfile.print "\t-$(Q)$(RM) $(@#{sep})\n"
@@ -2358,7 +2251,7 @@ site-install-rb: install-rb
mfile.print "$(ECHO) linking static-library $(@#{rsep})\n\t$(Q) "
mfile.print "$(AR) #{config_string('ARFLAGS') || 'cru '}$@ $(OBJS)"
config_string('RANLIB') do |ranlib|
- mfile.print "\n\t-$(Q)#{ranlib} $(@) 2> /dev/null || true"
+ mfile.print "\n\t-$(Q)#{ranlib} $(DLLIB) 2> /dev/null || true"
end
end
mfile.print "\n\n"
@@ -2412,12 +2305,12 @@ site-install-rb: install-rb
$LIBRUBYARG = ""
$LIBRUBYARG_STATIC = config['LIBRUBYARG_STATIC']
$LIBRUBYARG_SHARED = config['LIBRUBYARG_SHARED']
- $DEFLIBPATH = [$extmk ? "$(topdir)" : "$(#{config["libdirname"] || "libdir"})"]
+ $DEFLIBPATH = [$extmk ? "$(topdir)" : "$(libdir)"]
$DEFLIBPATH.unshift(".")
$LIBPATH = []
$INSTALLFILES = []
$NONINSTALLFILES = [/~\z/, /\A#.*#\z/, /\A\.#/, /\.bak\z/i, /\.orig\z/, /\.rej\z/, /\.l[ao]\z/, /\.o\z/]
- $VPATH = %w[$(srcdir) $(arch_hdrdir)/ruby $(hdrdir)/ruby]
+ $VPATH = %w[$(srcdir) $(topdir) $(arch_hdrdir)/ruby $(hdrdir)/ruby]
$objs = nil
$srcs = nil
@@ -2436,6 +2329,8 @@ site-install-rb: install-rb
$extout ||= nil
$extout_prefix ||= nil
+ @libdir_basename = config["libdir"] && config["libdir"][/\A\$\(exec_prefix\)\/(.*)/, 1] or "lib"
+
$arg_config.clear
dir_config("opt")
end
@@ -2460,25 +2355,6 @@ MESSAGE
end
end
- private
-
- def _libdir_basename
- @libdir_basename ||= config_string("libdir") {|name| name[/\A\$\(exec_prefix\)\/(.*)/, 1]} || "lib"
- end
-
- def MAIN_DOES_NOTHING(*refs)
- src = MAIN_DOES_NOTHING
- unless refs.empty?
- src = src.sub(/\{/) do
- $& +
- "\n if (argc > 1000000) {\n" +
- refs.map {|n|" printf(\"%p\", &#{n});\n"}.join("") +
- " }\n"
- end
- end
- src
- end
-
extend self
init_mkmf
@@ -2526,43 +2402,16 @@ MESSAGE
config_string('COMMON_HEADERS') do |s|
Shellwords.shellwords(s).each {|w| hdr << "#include <#{w}>"}
end
-
- ##
- # Common headers for Ruby C extensions
-
COMMON_HEADERS = hdr.join("\n")
-
- ##
- # Common libraries for Ruby C extensions
-
COMMON_LIBS = config_string('COMMON_LIBS', &split) || []
- ##
- # make compile rules
-
COMPILE_RULES = config_string('COMPILE_RULES', &split) || %w[.%s.%s:]
RULE_SUBST = config_string('RULE_SUBST')
-
- ##
- # Command which will compile C files in the generated Makefile
-
COMPILE_C = config_string('COMPILE_C') || '$(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $<'
-
- ##
- # Command which will compile C++ files in the generated Makefile
-
COMPILE_CXX = config_string('COMPILE_CXX') || '$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<'
-
- ##
- # Command which will compile a program in order to test linking a library
-
TRY_LINK = config_string('TRY_LINK') ||
- "$(CC) #{OUTFLAG}#{CONFTEST}#{$EXEEXT} $(INCFLAGS) $(CPPFLAGS) " \
+ "$(CC) #{OUTFLAG}conftest#{$EXEEXT} $(INCFLAGS) $(CPPFLAGS) " \
"$(CFLAGS) $(src) $(LIBPATH) $(LDFLAGS) $(ARCH_FLAG) $(LOCAL_LIBS) $(LIBS)"
-
- ##
- # Command which will link a shared library
-
LINK_SO = (config_string('LINK_SO') || "").sub(/^$/) do
if CONFIG["DLEXT"] == $OBJEXT
"ld $(DLDFLAGS) -r -o $@ $(OBJS)\n"
@@ -2571,30 +2420,14 @@ MESSAGE
"$(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)"
end
end
-
- ##
- # Argument which will add a library path to the linker
-
LIBPATHFLAG = config_string('LIBPATHFLAG') || ' -L%s'
RPATHFLAG = config_string('RPATHFLAG') || ''
-
- ##
- # Argument which will add a library to the linker
-
LIBARG = config_string('LIBARG') || '-l%s'
-
- ##
- # A C main function which does no work
-
- MAIN_DOES_NOTHING = config_string('MAIN_DOES_NOTHING') || "int main(int argc, char **argv)\n{\n return 0;\n}"
+ MAIN_DOES_NOTHING = config_string('MAIN_DOES_NOTHING') || 'int main(void) {return 0;}'
UNIVERSAL_INTS = config_string('UNIVERSAL_INTS') {|s| Shellwords.shellwords(s)} ||
%w[int short long long\ long]
sep = config_string('BUILD_FILE_SEPARATOR') {|s| ":/=#{s}" if s != "/"} || ""
-
- ##
- # Makefile rules that will clean the extension build directory
-
CLEANINGS = "
clean-static::
clean-rb-default::
@@ -2608,7 +2441,7 @@ distclean-rb::
distclean-so::
distclean-static::
distclean: clean distclean-so distclean-static distclean-rb-default distclean-rb
-\t\t-$(Q)$(RM) Makefile $(RUBY_EXTCONF_H) #{CONFTEST}.* mkmf.log
+\t\t-$(Q)$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
\t\t-$(Q)$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES#{sep})
\t\t-$(Q)$(RMDIRS) $(DISTCLEANDIRS#{sep})#{$ignore_error}
diff --git a/lib/mutex_m.rb b/lib/mutex_m.rb
index 6698cb5ac6..722754b8d5 100644
--- a/lib/mutex_m.rb
+++ b/lib/mutex_m.rb
@@ -8,36 +8,25 @@
# patched by akira yamada
#
# --
-
+# Usage:
+# require "mutex_m.rb"
+# obj = Object.new
+# obj.extend Mutex_m
+# ...
+# extended object can be handled like Mutex
+# or
+# class Foo
+# include Mutex_m
+# ...
+# end
+# obj = Foo.new
+# this obj can be handled like Mutex
+#
require 'thread'
-# = mutex_m.rb
-#
-# When 'mutex_m' is required, any object that extends or includes Mutex_m will
-# be treated like a Mutex.
-#
-# Start by requiring the standard library Mutex_m:
-#
-# require "mutex_m.rb"
-#
-# From here you can extend an object with Mutex instance methods:
-#
-# obj = Object.new
-# obj.extend Mutex_m
-#
-# Or mixin Mutex_m into your module to your class inherit Mutex instance
-# methods.
-#
-# class Foo
-# include Mutex_m
-# # ...
-# end
-# obj = Foo.new
-# # this obj can be handled like Mutex
-#
module Mutex_m
- def Mutex_m.define_aliases(cl) # :nodoc:
+ def Mutex_m.define_aliases(cl)
cl.module_eval %q{
alias locked? mu_locked?
alias lock mu_lock
@@ -47,17 +36,17 @@ module Mutex_m
}
end
- def Mutex_m.append_features(cl) # :nodoc:
+ def Mutex_m.append_features(cl)
super
define_aliases(cl) unless cl.instance_of?(Module)
end
- def Mutex_m.extend_object(obj) # :nodoc:
+ def Mutex_m.extend_object(obj)
super
obj.mu_extended
end
- def mu_extended # :nodoc:
+ def mu_extended
unless (defined? locked? and
defined? lock and
defined? unlock and
@@ -68,43 +57,38 @@ module Mutex_m
mu_initialize
end
- # See Mutex#synchronize
+ # locking
def mu_synchronize(&block)
@_mutex.synchronize(&block)
end
- # See Mutex#locked?
def mu_locked?
@_mutex.locked?
end
- # See Mutex#try_lock
def mu_try_lock
@_mutex.try_lock
end
- # See Mutex#lock
def mu_lock
@_mutex.lock
end
- # See Mutex#unlock
def mu_unlock
@_mutex.unlock
end
- # See Mutex#sleep
def sleep(timeout = nil)
@_mutex.sleep(timeout)
end
private
- def mu_initialize # :nodoc:
+ def mu_initialize
@_mutex = Mutex.new
end
- def initialize(*args) # :nodoc:
+ def initialize(*args)
mu_initialize
super
end
diff --git a/lib/net/ftp.rb b/lib/net/ftp.rb
index c22b9636d5..502783955b 100644
--- a/lib/net/ftp.rb
+++ b/lib/net/ftp.rb
@@ -97,13 +97,13 @@ module Net
# Number of seconds to wait for the connection to open. Any number
# may be used, including Floats for fractional seconds. If the FTP
# object cannot open a connection in this many seconds, it raises a
- # Net::OpenTimeout exception. The default value is +nil+.
+ # Net::OpenTimeout exception.
attr_accessor :open_timeout
# Number of seconds to wait for one block to be read (via one read(2)
# call). Any number may be used, including Floats for fractional
# seconds. If the FTP object cannot read data in this many seconds,
- # it raises a TimeoutError exception. The default value is 60 seconds.
+ # it raises a TimeoutError exception.
attr_reader :read_timeout
# Setter for the read_timeout attribute.
@@ -214,7 +214,7 @@ module Net
$stderr.puts("warning: Net::FTP#return_code= is obsolete and do nothing")
end
- # Constructs a socket with +host+ and +port+.
+ # Contructs a socket with +host+ and +port+.
#
# If SOCKSSocket is defined and the environment (ENV) defines
# SOCKS_SERVER, then a SOCKSSocket is returned, else a TCPSocket is
@@ -251,9 +251,8 @@ module Net
end
#
- # Set the socket used to connect to the FTP server.
+ # WRITEME or make private
#
- # May raise FTPReplyError if +get_greeting+ is false.
def set_socket(sock, get_greeting = true)
synchronize do
@sock = sock
@@ -311,7 +310,7 @@ module Net
end
private :getmultiline
- # Receives a response from the destination host.
+ # Recieves a response from the destination host.
#
# Returns the response code or raises FTPTempError, FTPPermError, or
# FTPProtoError
@@ -331,7 +330,7 @@ module Net
end
private :getresp
- # Receives a response.
+ # Recieves a response.
#
# Raises FTPReplyError if the first position of the response code is not
# equal 2.
@@ -898,10 +897,7 @@ module Net
end
#
- # Returns the raw last modification time of the (remote) file in the format
- # "YYYYMMDDhhmmss" (MDTM command).
- #
- # Use +mtime+ if you want a parsed Time instance.
+ # Issues the MDTM command. TODO: more info.
#
def mdtm(filename)
resp = sendcmd("MDTM " + filename)
@@ -1000,6 +996,7 @@ module Net
else
raise FTPProtoError, resp
end
+ return host, port
end
private :parse228
@@ -1118,3 +1115,5 @@ end
# Documentation comments:
# - sourced from pickaxe and nutshell, with improvements (hopefully)
+# - three methods should be private (search WRITEME)
+# - two methods need more information (search TODO)
diff --git a/lib/net/http.rb b/lib/net/http.rb
index a1b8d691bb..7ae99a7ae5 100644
--- a/lib/net/http.rb
+++ b/lib/net/http.rb
@@ -266,7 +266,7 @@ module Net #:nodoc:
# response = http.request request # Net::HTTPResponse object
# end
#
- # In previous versions of Ruby you would need to require 'net/https' to use
+ # In previous versions of ruby you would need to require 'net/https' to use
# HTTPS. This is no longer true.
#
# === Proxies
@@ -334,7 +334,6 @@ module Net #:nodoc:
# HTTPResetContent:: 205
# HTTPPartialContent:: 206
# HTTPMultiStatus:: 207
- # HTTPIMUsed:: 226
# HTTPRedirection:: 3xx
# HTTPMultipleChoices:: 300
# HTTPMovedPermanently:: 301
@@ -396,8 +395,8 @@ module Net #:nodoc:
end
# :startdoc:
- # Turns on net/http 1.2 (Ruby 1.8) features.
- # Defaults to ON in Ruby 1.8 or later.
+ # Turns on net/http 1.2 (ruby 1.8) features.
+ # Defaults to ON in ruby 1.8 or later.
def HTTP.version_1_2
true
end
@@ -497,8 +496,8 @@ module Net #:nodoc:
# require 'net/http'
# require 'uri'
#
- # Net::HTTP.post_form URI('http://www.example.com/search.cgi'),
- # { "q" => "ruby", "max" => "50" }
+ # HTTP.post_form URI('http://www.example.com/search.cgi'),
+ # { "q" => "ruby", "max" => "50" }
#
def HTTP.post_form(url, params)
req = Post.new(url)
@@ -672,7 +671,7 @@ module Net #:nodoc:
#
# Sets an output stream for debugging.
#
- # http = Net::HTTP.new(hostname)
+ # http = Net::HTTP.new
# http.set_debug_output $stderr
# http.start { .... }
#
@@ -702,13 +701,13 @@ module Net #:nodoc:
# Number of seconds to wait for the connection to open. Any number
# may be used, including Floats for fractional seconds. If the HTTP
# object cannot open a connection in this many seconds, it raises a
- # Net::OpenTimeout exception. The default value is +nil+.
+ # Net::OpenTimeout exception.
attr_accessor :open_timeout
# Number of seconds to wait for one block to be read (via one read(2)
# call). Any number may be used, including Floats for fractional
# seconds. If the HTTP object cannot read data in this many seconds,
- # it raises a Net::ReadTimeout exception. The default value is 60 seconds.
+ # it raises a Net::ReadTimeout exception.
attr_reader :read_timeout
# Setter for the read_timeout attribute.
@@ -717,9 +716,8 @@ module Net #:nodoc:
@read_timeout = sec
end
- # Seconds to wait for 100 Continue response. If the HTTP object does not
- # receive a response in this many seconds it sends the request body. The
- # default value is +nil+.
+ # Seconds to wait for 100 Continue response. If the HTTP object does not
+ # receive a response in this many seconds it sends the request body.
attr_reader :continue_timeout
# Setter for the continue_timeout attribute.
@@ -878,7 +876,6 @@ module Net #:nodoc:
s = Timeout.timeout(@open_timeout, Net::OpenTimeout) {
TCPSocket.open(conn_address, conn_port, @local_host, @local_port)
}
- s.setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1)
D "opened"
if use_ssl?
ssl_parameters = Hash.new
@@ -1125,6 +1122,13 @@ module Net #:nodoc:
#
def get(path, initheader = {}, dest = nil, &block) # :yield: +body_segment+
res = nil
+ if HAVE_ZLIB
+ unless initheader.keys.any?{|k| k.downcase == "accept-encoding"}
+ initheader = initheader.merge({
+ "accept-encoding" => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3"
+ })
+ end
+ end
request(Get.new(path, initheader)) {|r|
r.read_body dest, &block
res = r
@@ -1406,7 +1410,6 @@ module Net #:nodoc:
req.exec @socket, @curr_http_version, edit_path(req.path)
begin
res = HTTPResponse.read_new(@socket)
- res.decode_content = req.decode_content
end while res.kind_of?(HTTPContinue)
res.uri = req.uri
@@ -1420,9 +1423,7 @@ module Net #:nodoc:
raise
rescue Net::ReadTimeout, IOError, EOFError,
Errno::ECONNRESET, Errno::ECONNABORTED, Errno::EPIPE,
- # avoid a dependency on OpenSSL
- defined?(OpenSSL::SSL) ? OpenSSL::SSL::SSLError : IOError,
- Timeout::Error => exception
+ OpenSSL::SSL::SSLError, Timeout::Error => exception
if count == 0 && IDEMPOTENT_METHODS_.include?(req.method)
count += 1
@socket.close if @socket and not @socket.closed?
diff --git a/lib/net/http/generic_request.rb b/lib/net/http/generic_request.rb
index b51034c7ea..568131fe8d 100644
--- a/lib/net/http/generic_request.rb
+++ b/lib/net/http/generic_request.rb
@@ -27,14 +27,11 @@ class Net::HTTPGenericRequest
raise ArgumentError, "HTTP request path is empty" if path.empty?
@path = path
- @decode_content = false
-
if @response_has_body and Net::HTTP::HAVE_ZLIB then
if !initheader ||
!initheader.keys.any? { |k|
%w[accept-encoding range].include? k.downcase
} then
- @decode_content = true
initheader = initheader ? initheader.dup : {}
initheader["accept-encoding"] =
"gzip;q=1.0,deflate;q=0.6,identity;q=0.3"
@@ -54,25 +51,10 @@ class Net::HTTPGenericRequest
attr_reader :path
attr_reader :uri
- # Automatically set to false if the user sets the Accept-Encoding header.
- # This indicates they wish to handle Content-encoding in responses
- # themselves.
- attr_reader :decode_content
-
def inspect
"\#<#{self.class} #{@method}>"
end
- ##
- # Don't automatically decode response content-encoding if the user indicates
- # they want to handle it.
-
- def []=(key, val) # :nodoc:
- @decode_content = false if key.downcase == 'accept-encoding'
-
- super key, val
- end
-
def request_body_permitted?
@request_has_body
end
@@ -225,7 +207,6 @@ class Net::HTTPGenericRequest
self.content_length = file.size
write_header sock, ver, path
IO.copy_stream(file, sock)
- file.close(true)
end
end
@@ -282,7 +263,7 @@ class Net::HTTPGenericRequest
def quote_string(str, charset)
str = str.encode(charset, fallback:->(c){'&#%d;'%c.encode("UTF-8").ord}) if charset
- str.gsub(/[\\"]/, '\\\\\&')
+ str = str.gsub(/[\\"]/, '\\\\\&')
end
def flush_buffer(out, buf, chunked_p)
@@ -309,7 +290,6 @@ class Net::HTTPGenericRequest
if IO.select([sock.io], nil, nil, sock.continue_timeout)
res = Net::HTTPResponse.read_new(sock)
unless res.kind_of?(Net::HTTPContinue)
- res.decode_content = @decode_content
throw :response, res
end
end
diff --git a/lib/net/http/header.rb b/lib/net/http/header.rb
index 912419df55..7e46e04395 100644
--- a/lib/net/http/header.rb
+++ b/lib/net/http/header.rb
@@ -145,11 +145,11 @@ module Net::HTTPHeader
@header.key?(key.downcase)
end
- # Returns a Hash consisting of header names and array of values.
+ # Returns a Hash consisting of header names and values.
# e.g.
- # {"cache-control" => ["private"],
- # "content-type" => ["text/html"],
- # "date" => ["Wed, 22 Jun 2005 22:11:50 GMT"]}
+ # {"cache-control" => "private",
+ # "content-type" => "text/html",
+ # "date" => "Wed, 22 Jun 2005 22:11:50 GMT"}
def to_hash
@header.dup
end
@@ -237,7 +237,7 @@ module Net::HTTPHeader
rangestr = (n > 0 ? "0-#{n-1}" : "-#{-n}")
when Range
first = r.first
- last = r.end
+ last = r.last
last -= 1 if r.exclude_end?
if last == -1
rangestr = (first > 0 ? "#{first}-" : "-#{-first}")
diff --git a/lib/net/http/response.rb b/lib/net/http/response.rb
index da3e4b4c8c..bde3b5b440 100644
--- a/lib/net/http/response.rb
+++ b/lib/net/http/response.rb
@@ -80,7 +80,6 @@ class Net::HTTPResponse
@body = nil
@read = false
@uri = nil
- @decode_content = false
end
# The HTTP version supported by the server.
@@ -99,10 +98,6 @@ class Net::HTTPResponse
# if a URI was used to create the request.
attr_reader :uri
- # Set to true automatically when the request did not contain an
- # Accept-Encoding header from the user.
- attr_accessor :decode_content
-
def inspect
"#<#{self.class} #{@code} #{@message} readbody=#{@read}>"
end
@@ -247,7 +242,6 @@ class Net::HTTPResponse
def inflater # :nodoc:
return yield @socket unless Net::HTTP::HAVE_ZLIB
- return yield @socket unless @decode_content
return yield @socket if self['content-range']
case self['content-encoding']
diff --git a/lib/net/http/responses.rb b/lib/net/http/responses.rb
index bc7642c7f3..38a5da2443 100644
--- a/lib/net/http/responses.rb
+++ b/lib/net/http/responses.rb
@@ -57,9 +57,7 @@ class Net::HTTPMultiStatus < Net::HTTPSuccess # 207 - RFC 4918
HAS_BODY = true
end
# 208 Already Reported - RFC 5842; experimental
-class Net::HTTPIMUsed < Net::HTTPSuccess # 226 - RFC 3229
- HAS_BODY = true
-end
+# 226 IM Used - RFC 3229; no famous implementation known
class Net::HTTPMultipleChoices < Net::HTTPRedirection # 300
HAS_BODY = true
@@ -220,7 +218,6 @@ class Net::HTTPResponse
'205' => Net::HTTPResetContent,
'206' => Net::HTTPPartialContent,
'207' => Net::HTTPMultiStatus,
- '226' => Net::HTTPIMUsed,
'300' => Net::HTTPMultipleChoices,
'301' => Net::HTTPMovedPermanently,
diff --git a/lib/net/imap.rb b/lib/net/imap.rb
index 55c611b9c6..a83f455163 100644
--- a/lib/net/imap.rb
+++ b/lib/net/imap.rb
@@ -1740,7 +1740,7 @@ module Net
# rights:: The access rights the indicated user has to the
# mailbox.
#
- MailboxACLItem = Struct.new(:user, :rights, :mailbox)
+ MailboxACLItem = Struct.new(:user, :rights)
# Net::IMAP::StatusData represents contents of the STATUS response.
#
@@ -2411,26 +2411,27 @@ module Net
match(T_SPACE)
param, content_id, desc, enc, size = body_fields
+ # If this is not message/rfc822, we shouldn't apply the RFC822 spec
+ # to it.
+ # We should handle anything other than message/rfc822 using
+ # multipart extension data [rfc3501] (i.e. the data itself won't be
+ # returned, we would have to retrieve it with BODYSTRUCTURE instead
+ # of with BODY
+ if "#{mtype}/#{msubtype}" != 'MESSAGE/RFC822' then
+ return BodyTypeExtension.new(mtype, msubtype,
+ param, content_id,
+ desc, enc, size)
+ end
+
+ # Also, sometimes a message/rfc822 is included as a large
+ # attachment instead of having all of the other details
+ # (e.g. attaching a .eml file to an email)
+
token = lookahead
- if token.symbol == T_RPAR
- # If this is not message/rfc822, we shouldn't apply the RFC822
- # spec to it. We should handle anything other than
- # message/rfc822 using multipart extension data [rfc3501] (i.e.
- # the data itself won't be returned, we would have to retrieve it
- # with BODYSTRUCTURE instead of with BODY
-
- # Also, sometimes a message/rfc822 is included as a large
- # attachment instead of having all of the other details
- # (e.g. attaching a .eml file to an email)
- if msubtype == "RFC822"
- return BodyTypeMessage.new(mtype, msubtype, param, content_id,
- desc, enc, size, nil, nil, nil, nil,
- nil, nil, nil)
- else
- return BodyTypeExtension.new(mtype, msubtype,
- param, content_id,
- desc, enc, size)
- end
+ if token.symbol == T_RPAR then
+ return BodyTypeMessage.new(mtype, msubtype, param, content_id,
+ desc, enc, size, nil, nil, nil, nil,
+ nil, nil, nil)
end
match(T_SPACE)
@@ -2806,7 +2807,6 @@ module Net
token = match(T_ATOM)
name = token.value.upcase
match(T_SPACE)
- mailbox = astring
data = []
token = lookahead
if token.symbol == T_SPACE
@@ -2822,7 +2822,8 @@ module Net
user = astring
match(T_SPACE)
rights = astring
- data.push(MailboxACLItem.new(user, rights, mailbox))
+ ##XXX data.push([user, rights])
+ data.push(MailboxACLItem.new(user, rights))
end
end
return UntaggedResponse.new(name, data, @str)
@@ -2953,7 +2954,6 @@ module Net
break
when T_SPACE
shift_token
- next
end
data.push(atom.upcase)
end
diff --git a/lib/net/pop.rb b/lib/net/pop.rb
index db7192c95a..fd869b6985 100644
--- a/lib/net/pop.rb
+++ b/lib/net/pop.rb
@@ -42,6 +42,8 @@ module Net
class POPBadResponse < POPError; end
#
+ # = Net::POP3
+ #
# == What is This Library?
#
# This library provides functionality for retrieving
@@ -496,12 +498,12 @@ module Net
# Seconds to wait until a connection is opened.
# If the POP3 object cannot open a connection within this time,
- # it raises a Net::OpenTimeout exception. The default value is 30 seconds.
+ # it raises a Net::OpenTimeout exception.
attr_accessor :open_timeout
# Seconds to wait until reading one block (by one read(1) call).
# If the POP3 object cannot complete a read() within this time,
- # it raises a Net::ReadTimeout exception. The default value is 60 seconds.
+ # it raises a Net::ReadTimeout exception.
attr_reader :read_timeout
# Set the read timeout.
@@ -707,7 +709,7 @@ module Net
@mails.each {|m| m.uid = uidl[m.number] }
end
- # debugging output for +msg+
+ # deguging output for +msg+
def logging(msg)
@debug_output << msg + "\n" if @debug_output
end
@@ -715,9 +717,9 @@ module Net
end # class POP3
# class aliases
- POP = POP3 # :nodoc:
- POPSession = POP3 # :nodoc:
- POP3Session = POP3 # :nodoc:
+ POP = POP3
+ POPSession = POP3
+ POP3Session = POP3
#
# This class is equivalent to POP3, except that it uses APOP authentication.
@@ -889,7 +891,7 @@ module Net
def initialize(sock)
@socket = sock
- @error_occurred = false
+ @error_occured = false
res = check_response(critical { recv_response() })
@apop_stamp = res.slice(/<[!-~]+@[!-~]+>/)
end
@@ -1007,11 +1009,11 @@ module Net
end
def critical
- return '+OK dummy ok response' if @error_occurred
+ return '+OK dummy ok response' if @error_occured
begin
return yield()
rescue Exception
- @error_occurred = true
+ @error_occured = true
raise
end
end
diff --git a/lib/net/smtp.rb b/lib/net/smtp.rb
index f49e38b283..27d4557c0e 100644
--- a/lib/net/smtp.rb
+++ b/lib/net/smtp.rb
@@ -66,6 +66,8 @@ module Net
end
#
+ # = Net::SMTP
+ #
# == What is This Library?
#
# This library provides functionality to send internet
@@ -215,7 +217,7 @@ module Net
@started = false
@open_timeout = 30
@read_timeout = 60
- @error_occurred = false
+ @error_occured = false
@debug_output = nil
@tls = false
@starttls = false
@@ -362,12 +364,12 @@ module Net
# Seconds to wait while attempting to open a connection.
# If the connection cannot be opened within this time, a
- # Net::OpenTimeout is raised. The default value is 30 seconds.
+ # Net::OpenTimeout is raised.
attr_accessor :open_timeout
# Seconds to wait while reading one block (by one read(2) call).
# If the read(2) call does not complete within this time, a
- # Net::ReadTimeout is raised. The default value is 60 seconds.
+ # Net::ReadTimeout is raised.
attr_reader :read_timeout
# Set the number of seconds to wait until timing-out a read(2)
@@ -605,17 +607,17 @@ module Net
rescue SMTPError
if @esmtp
@esmtp = false
- @error_occurred = false
+ @error_occured = false
retry
end
raise
end
def do_finish
- quit if @socket and not @socket.closed? and not @error_occurred
+ quit if @socket and not @socket.closed? and not @error_occured
ensure
@started = false
- @error_occurred = false
+ @error_occured = false
@socket.close if @socket and not @socket.closed?
@socket = nil
end
@@ -815,12 +817,6 @@ module Net
public
- # Aborts the current mail transaction
-
- def rset
- getok('RSET')
- end
-
def starttls
getok('STARTTLS')
end
@@ -942,11 +938,11 @@ module Net
end
def critical
- return Response.parse('200 dummy reply code') if @error_occurred
+ return '200 dummy reply code' if @error_occured
begin
return yield()
rescue Exception
- @error_occurred = true
+ @error_occured = true
raise
end
end
@@ -1041,7 +1037,7 @@ module Net
h
end
- # Determines whether there was an error and raises the appropriate error
+ # Determines whether there was an error and raies the appropriate error
# based on the reply code of the response
def exception_class
case @status
@@ -1060,6 +1056,6 @@ module Net
end # class SMTP
- SMTPSession = SMTP # :nodoc:
+ SMTPSession = SMTP
end
diff --git a/lib/observer.rb b/lib/observer.rb
index 99610f7505..208d8ed6ed 100644
--- a/lib/observer.rb
+++ b/lib/observer.rb
@@ -15,14 +15,13 @@
# module, which provides the methods for managing the associated observer
# objects.
#
+# The observers must implement a method called +update+ to receive
+# notifications.
+#
# The observable object must:
# * assert that it has +#changed+
# * call +#notify_observers+
#
-# An observer subscribes to updates using Observable#add_observer, which also
-# specifies the method called via #notify_observers. The default method for
-# #notify_observers is #update.
-#
# === Example
#
# The following example demonstrates this nicely. A +Ticker+, when run,
@@ -50,13 +49,13 @@
# end
#
# def run
-# last_price = nil
+# lastPrice = nil
# loop do
# price = Price.fetch(@symbol)
# print "Current price: #{price}\n"
-# if price != last_price
+# if price != lastPrice
# changed # notify observers
-# last_price = price
+# lastPrice = price
# notify_observers(Time.now, price)
# end
# sleep 1
@@ -65,7 +64,7 @@
# end
#
# class Price ### A mock class to fetch a stock price (60 - 140).
-# def self.fetch(symbol)
+# def Price.fetch(symbol)
# 60 + rand(80)
# end
# end
diff --git a/lib/open-uri.rb b/lib/open-uri.rb
index b1a253841d..47a9b90fd0 100644
--- a/lib/open-uri.rb
+++ b/lib/open-uri.rb
@@ -336,7 +336,7 @@ module OpenURI
io = buf.io
io.rewind
io.status = [resp.code, resp.message]
- resp.each_name {|name| buf.io.meta_add_field2 name, resp.get_fields(name) }
+ resp.each {|name,value| buf.io.meta_add_field name, value }
case resp
when Net::HTTPSuccess
when Net::HTTPMovedPermanently, # 301
@@ -405,14 +405,13 @@ module OpenURI
obj.extend Meta
obj.instance_eval {
@base_uri = nil
- @meta = {} # name to string. legacy.
- @metas = {} # name to array of strings.
+ @meta = {}
}
if src
obj.status = src.status
obj.base_uri = src.base_uri
- src.metas.each {|name, values|
- obj.meta_add_field2(name, values)
+ src.meta.each {|name, value|
+ obj.meta_add_field(name, value)
}
end
end
@@ -426,16 +425,8 @@ module OpenURI
# returns a Hash that represents header fields.
# The Hash keys are downcased for canonicalization.
- # The Hash values are a field body.
- # If there are multiple field with same field name,
- # the field values are concatenated with a comma.
attr_reader :meta
- # returns a Hash that represents header fields.
- # The Hash keys are downcased for canonicalization.
- # The Hash value are an array of field values.
- attr_reader :metas
-
def meta_setup_encoding # :nodoc:
charset = self.charset
enc = nil
@@ -455,21 +446,15 @@ module OpenURI
end
end
- def meta_add_field2(name, values) # :nodoc:
+ def meta_add_field(name, value) # :nodoc:
name = name.downcase
- @metas[name] = values
- @meta[name] = values.join(', ')
+ @meta[name] = value
meta_setup_encoding if name == 'content-type'
end
- def meta_add_field(name, value) # :nodoc:
- meta_add_field2(name, [value])
- end
-
# returns a Time that represents the Last-Modified field.
def last_modified
- if vs = @metas['last-modified']
- v = vs.join(', ')
+ if v = @meta['last-modified']
Time.httpdate(v)
else
nil
@@ -484,9 +469,9 @@ module OpenURI
# :startdoc:
def content_type_parse # :nodoc:
- vs = @metas['content-type']
+ v = @meta['content-type']
# The last (?:;#{RE_LWS}?)? matches extra ";" which violates RFC2045.
- if vs && %r{\A#{RE_LWS}?(#{RE_TOKEN})#{RE_LWS}?/(#{RE_TOKEN})#{RE_LWS}?(#{RE_PARAMETERS})(?:;#{RE_LWS}?)?\z}no =~ vs.join(', ')
+ if v && %r{\A#{RE_LWS}?(#{RE_TOKEN})#{RE_LWS}?/(#{RE_TOKEN})#{RE_LWS}?(#{RE_PARAMETERS})(?:;#{RE_LWS}?)?\z}no =~ v
type = $1.downcase
subtype = $2.downcase
parameters = []
@@ -538,8 +523,8 @@ module OpenURI
# as an Array of String.
# The encodings are downcased for canonicalization.
def content_encoding
- vs = @metas['content-encoding']
- if vs && %r{\A#{RE_LWS}?#{RE_TOKEN}#{RE_LWS}?(?:,#{RE_LWS}?#{RE_TOKEN}#{RE_LWS}?)*}o =~ (v = vs.join(', '))
+ v = @meta['content-encoding']
+ if v && %r{\A#{RE_LWS}?#{RE_TOKEN}#{RE_LWS}?(?:,#{RE_LWS}?#{RE_TOKEN}#{RE_LWS}?)*}o =~ v
v.scan(RE_TOKEN).map {|content_coding| content_coding.downcase}
else
[]
diff --git a/lib/open3.rb b/lib/open3.rb
index a54e1b3886..36211f042c 100644
--- a/lib/open3.rb
+++ b/lib/open3.rb
@@ -9,29 +9,29 @@
#
#
-# Open3 grants you access to stdin, stdout, stderr and a thread to wait for the
+# Open3 grants you access to stdin, stdout, stderr and a thread to wait the
# child process when running another program.
# You can specify various attributes, redirections, current directory, etc., of
-# the program in the same way as for Process.spawn.
+# the program as Process.spawn.
#
# - Open3.popen3 : pipes for stdin, stdout, stderr
# - Open3.popen2 : pipes for stdin, stdout
# - Open3.popen2e : pipes for stdin, merged stdout and stderr
-# - Open3.capture3 : give a string for stdin; get strings for stdout, stderr
-# - Open3.capture2 : give a string for stdin; get a string for stdout
-# - Open3.capture2e : give a string for stdin; get a string for merged stdout and stderr
+# - Open3.capture3 : give a string for stdin. get strings for stdout, stderr
+# - Open3.capture2 : give a string for stdin. get a string for stdout
+# - Open3.capture2e : give a string for stdin. get a string for merged stdout and stderr
# - Open3.pipeline_rw : pipes for first stdin and last stdout of a pipeline
# - Open3.pipeline_r : pipe for last stdout of a pipeline
# - Open3.pipeline_w : pipe for first stdin of a pipeline
-# - Open3.pipeline_start : run a pipeline without waiting
-# - Open3.pipeline : run a pipeline and wait for its completion
+# - Open3.pipeline_start : run a pipeline and don't wait
+# - Open3.pipeline : run a pipline and wait
#
module Open3
# Open stdin, stdout, and stderr streams and start external executable.
- # In addition, a thread to wait for the started process is created.
- # The thread has a pid method and a thread variable :pid which is the pid of
+ # In addition, a thread for waiting the started process is noticed.
+ # The thread has a pid method and thread variable :pid which is the pid of
# the started process.
#
# Block form:
@@ -45,15 +45,15 @@ module Open3
# Non-block form:
#
# stdin, stdout, stderr, wait_thr = Open3.popen3([env,] cmd... [, opts])
- # pid = wait_thr[:pid] # pid of the started process
+ # pid = wait_thr[:pid] # pid of the started process.
# ...
# stdin.close # stdin, stdout and stderr should be closed explicitly in this form.
# stdout.close
# stderr.close
# exit_status = wait_thr.value # Process::Status object returned.
#
- # The parameters env, cmd, and opts are passed to Process.spawn.
- # A commandline string and a list of argument strings can be accepted as follows:
+ # The parameters +cmd...+ is passed to Process.spawn.
+ # So a commandline string and list of argument strings can be accepted as follows.
#
# Open3.popen3("echo abc") {|i, o, e, t| ... }
# Open3.popen3("echo", "abc") {|i, o, e, t| ... }
@@ -65,21 +65,27 @@ module Open3
# p o.read.chomp #=> "/"
# }
#
- # wait_thr.value waits for the termination of the process.
- # The block form also waits for the process when it returns.
+ # wait_thr.value waits the termination of the process.
+ # The block form also waits the process when it returns.
#
- # Closing stdin, stdout and stderr does not wait for the process to complete.
+ # Closing stdin, stdout and stderr does not wait the process.
#
# You should be careful to avoid deadlocks.
- # Since pipes are fixed length buffers,
+ # Since pipes are fixed length buffer,
# Open3.popen3("prog") {|i, o, e, t| o.read } deadlocks if
- # the program generates too much output on stderr.
- # You should read stdout and stderr simultaneously (using threads or IO.select).
- # However, if you don't need stderr output, you can use Open3.popen2.
+ # the program generates many output on stderr.
+ # You should be read stdout and stderr simultaneously (using thread or IO.select).
+ # However if you don't need stderr output, Open3.popen2 can be used.
# If merged stdout and stderr output is not a problem, you can use Open3.popen2e.
- # If you really need stdout and stderr output as separate strings, you can consider Open3.capture3.
+ # If you really needs stdout and stderr output as separate strings, you can consider Open3.capture3.
#
- def popen3(*cmd, **opts, &block)
+ def popen3(*cmd, &block)
+ if Hash === cmd.last
+ opts = cmd.pop.dup
+ else
+ opts = {}
+ end
+
in_r, in_w = IO.pipe
opts[:in] = in_r
in_w.sync = true
@@ -94,7 +100,7 @@ module Open3
end
module_function :popen3
- # Open3.popen2 is similar to Open3.popen3 except that it doesn't create a pipe for
+ # Open3.popen2 is similer to Open3.popen3 except it doesn't make a pipe for
# the standard error stream.
#
# Block form:
@@ -134,7 +140,13 @@ module Open3
# p o.read #=> "*"
# }
#
- def popen2(*cmd, **opts, &block)
+ def popen2(*cmd, &block)
+ if Hash === cmd.last
+ opts = cmd.pop.dup
+ else
+ opts = {}
+ end
+
in_r, in_w = IO.pipe
opts[:in] = in_r
in_w.sync = true
@@ -146,7 +158,7 @@ module Open3
end
module_function :popen2
- # Open3.popen2e is similar to Open3.popen3 except that it merges
+ # Open3.popen2e is similer to Open3.popen3 except it merges
# the standard output stream and the standard error stream.
#
# Block form:
@@ -177,7 +189,13 @@ module Open3
# }
# }
#
- def popen2e(*cmd, **opts, &block)
+ def popen2e(*cmd, &block)
+ if Hash === cmd.last
+ opts = cmd.pop.dup
+ else
+ opts = {}
+ end
+
in_r, in_w = IO.pipe
opts[:in] = in_r
in_w.sync = true
@@ -220,7 +238,7 @@ module Open3
#
# If opts[:binmode] is true, internal pipes are set to binary mode.
#
- # Examples:
+ # Example:
#
# # dot is a command of graphviz.
# graph = <<'End'
@@ -228,27 +246,36 @@ module Open3
# a -> b
# }
# End
- # drawn_graph, dot_log = Open3.capture3("dot -v", :stdin_data=>graph)
+ # layouted_graph, dot_log = Open3.capture3("dot -v", :stdin_data=>graph)
#
# o, e, s = Open3.capture3("echo abc; sort >&2", :stdin_data=>"foo\nbar\nbaz\n")
# p o #=> "abc\n"
# p e #=> "bar\nbaz\nfoo\n"
# p s #=> #<Process::Status: pid 32682 exit 0>
#
- # # generate a thumbnail image using the convert command of ImageMagick.
- # # However, if the image is really stored in a file,
+ # # generate a thumnail image using the convert command of ImageMagick.
+ # # However, if the image stored really in a file,
# # system("convert", "-thumbnail", "80", "png:#{filename}", "png:-") is better
- # # because of reduced memory consumption.
- # # But if the image is stored in a DB or generated by the gnuplot Open3.capture2 example,
- # # Open3.capture3 should be considered.
+ # # because memory consumption.
+ # # But if the image is stored in a DB or generated by gnuplot Open3.capture2 example,
+ # # Open3.capture3 is considerable.
# #
# image = File.read("/usr/share/openclipart/png/animals/mammals/sheep-md-v0.1.png", :binmode=>true)
- # thumbnail, err, s = Open3.capture3("convert -thumbnail 80 png:- png:-", :stdin_data=>image, :binmode=>true)
+ # thumnail, err, s = Open3.capture3("convert -thumbnail 80 png:- png:-", :stdin_data=>image, :binmode=>true)
# if s.success?
- # STDOUT.binmode; print thumbnail
+ # STDOUT.binmode; print thumnail
# end
#
- def capture3(*cmd, stdin_data: '', binmode: false, **opts)
+ def capture3(*cmd)
+ if Hash === cmd.last
+ opts = cmd.pop.dup
+ else
+ opts = {}
+ end
+
+ stdin_data = opts.delete(:stdin_data) || ''
+ binmode = opts.delete(:binmode)
+
popen3(*cmd, opts) {|i, o, e, t|
if binmode
i.binmode
@@ -293,7 +320,16 @@ module Open3
# End
# image, s = Open3.capture2("gnuplot", :stdin_data=>gnuplot_commands, :binmode=>true)
#
- def capture2(*cmd, stdin_data: '', binmode: false, **opts)
+ def capture2(*cmd)
+ if Hash === cmd.last
+ opts = cmd.pop.dup
+ else
+ opts = {}
+ end
+
+ stdin_data = opts.delete(:stdin_data) || ''
+ binmode = opts.delete(:binmode)
+
popen2(*cmd, opts) {|i, o, t|
if binmode
i.binmode
@@ -323,7 +359,16 @@ module Open3
# # capture make log
# make_log, s = Open3.capture2e("make")
#
- def capture2e(*cmd, stdin_data: '', binmode: false, **opts)
+ def capture2e(*cmd)
+ if Hash === cmd.last
+ opts = cmd.pop.dup
+ else
+ opts = {}
+ end
+
+ stdin_data = opts.delete(:stdin_data) || ''
+ binmode = opts.delete(:binmode)
+
popen2e(*cmd, opts) {|i, oe, t|
if binmode
i.binmode
@@ -338,7 +383,7 @@ module Open3
module_function :capture2e
# Open3.pipeline_rw starts a list of commands as a pipeline with pipes
- # which connect to stdin of the first command and stdout of the last command.
+ # which connects stdin of the first command and stdout of the last command.
#
# Open3.pipeline_rw(cmd1, cmd2, ... [, opts]) {|first_stdin, last_stdout, wait_threads|
# ...
@@ -358,15 +403,15 @@ module Open3
# [env, cmdname, arg1, ..., opts] command name and one or more arguments (no shell)
# [env, [cmdname, argv0], arg1, ..., opts] command name and arguments including argv[0] (no shell)
#
- # Note that env and opts are optional, as for Process.spawn.
+ # Note that env and opts are optional, as Process.spawn.
#
- # The options to pass to Process.spawn are constructed by merging
- # +opts+, the last hash element of the array, and
- # specifications for the pipes between each of the commands.
+ # The option to pass Process.spawn is constructed by merging
+ # +opts+, the last hash element of the array and
+ # specification for the pipe between each commands.
#
# Example:
#
- # Open3.pipeline_rw("tr -dc A-Za-z", "wc -c") {|i, o, ts|
+ # Open3.pipeline_rw("tr -dc A-Za-z", "wc -c") {|i,o,ts|
# i.puts "All persons more than a mile high to leave the court."
# i.close
# p o.gets #=> "42\n"
@@ -379,7 +424,13 @@ module Open3
# stdin.close # send EOF to sort.
# p stdout.read #=> " 1\tbar\n 2\tbaz\n 3\tfoo\n"
# }
- def pipeline_rw(*cmds, **opts, &block)
+ def pipeline_rw(*cmds, &block)
+ if Hash === cmds.last
+ opts = cmds.pop.dup
+ else
+ opts = {}
+ end
+
in_r, in_w = IO.pipe
opts[:in] = in_r
in_w.sync = true
@@ -392,7 +443,7 @@ module Open3
module_function :pipeline_rw
# Open3.pipeline_r starts a list of commands as a pipeline with a pipe
- # which connects to stdout of the last command.
+ # which connects stdout of the last command.
#
# Open3.pipeline_r(cmd1, cmd2, ... [, opts]) {|last_stdout, wait_threads|
# ...
@@ -411,7 +462,7 @@ module Open3
# [env, cmdname, arg1, ..., opts] command name and one or more arguments (no shell)
# [env, [cmdname, argv0], arg1, ..., opts] command name and arguments including argv[0] (no shell)
#
- # Note that env and opts are optional, as for Process.spawn.
+ # Note that env and opts are optional, as Process.spawn.
#
# Example:
#
@@ -429,7 +480,13 @@ module Open3
# p ts[1].value #=> #<Process::Status: pid 24913 exit 0>
# }
#
- def pipeline_r(*cmds, **opts, &block)
+ def pipeline_r(*cmds, &block)
+ if Hash === cmds.last
+ opts = cmds.pop.dup
+ else
+ opts = {}
+ end
+
out_r, out_w = IO.pipe
opts[:out] = out_w
@@ -438,7 +495,7 @@ module Open3
module_function :pipeline_r
# Open3.pipeline_w starts a list of commands as a pipeline with a pipe
- # which connects to stdin of the first command.
+ # which connects stdin of the first command.
#
# Open3.pipeline_w(cmd1, cmd2, ... [, opts]) {|first_stdin, wait_threads|
# ...
@@ -457,7 +514,7 @@ module Open3
# [env, cmdname, arg1, ..., opts] command name and one or more arguments (no shell)
# [env, [cmdname, argv0], arg1, ..., opts] command name and arguments including argv[0] (no shell)
#
- # Note that env and opts are optional, as for Process.spawn.
+ # Note that env and opts are optional, as Process.spawn.
#
# Example:
#
@@ -465,7 +522,13 @@ module Open3
# i.puts "hello"
# }
#
- def pipeline_w(*cmds, **opts, &block)
+ def pipeline_w(*cmds, &block)
+ if Hash === cmds.last
+ opts = cmds.pop.dup
+ else
+ opts = {}
+ end
+
in_r, in_w = IO.pipe
opts[:in] = in_r
in_w.sync = true
@@ -475,7 +538,7 @@ module Open3
module_function :pipeline_w
# Open3.pipeline_start starts a list of commands as a pipeline.
- # No pipes are created for stdin of the first command and
+ # No pipe made for stdin of the first command and
# stdout of the last command.
#
# Open3.pipeline_start(cmd1, cmd2, ... [, opts]) {|wait_threads|
@@ -494,11 +557,11 @@ module Open3
# [env, cmdname, arg1, ..., opts] command name and one or more arguments (no shell)
# [env, [cmdname, argv0], arg1, ..., opts] command name and arguments including argv[0] (no shell)
#
- # Note that env and opts are optional, as for Process.spawn.
+ # Note that env and opts are optional, as Process.spawn.
#
# Example:
#
- # # Run xeyes in 10 seconds.
+ # # run xeyes in 10 seconds.
# Open3.pipeline_start("xeyes") {|ts|
# sleep 10
# t = ts[0]
@@ -506,8 +569,8 @@ module Open3
# p t.value #=> #<Process::Status: pid 911 SIGTERM (signal 15)>
# }
#
- # # Convert pdf to ps and send it to a printer.
- # # Collect error message of pdftops and lpr.
+ # # convert pdf to ps and send it to a printer.
+ # # collect error message of pdftops and lpr.
# pdf_file = "paper.pdf"
# printer = "printer-name"
# err_r, err_w = IO.pipe
@@ -518,7 +581,13 @@ module Open3
# p err_r.read # error messages of pdftops and lpr.
# }
#
- def pipeline_start(*cmds, **opts, &block)
+ def pipeline_start(*cmds, &block)
+ if Hash === cmds.last
+ opts = cmds.pop.dup
+ else
+ opts = {}
+ end
+
if block
pipeline_run(cmds, opts, [], [], &block)
else
@@ -529,8 +598,8 @@ module Open3
module_function :pipeline_start
# Open3.pipeline starts a list of commands as a pipeline.
- # It waits for the completion of the commands.
- # No pipes are created for stdin of the first command and
+ # It waits the finish of the commands.
+ # No pipe made for stdin of the first command and
# stdout of the last command.
#
# status_list = Open3.pipeline(cmd1, cmd2, ... [, opts])
@@ -580,7 +649,13 @@ module Open3
# # 106
# # 202
#
- def pipeline(*cmds, **opts)
+ def pipeline(*cmds)
+ if Hash === cmds.last
+ opts = cmds.pop.dup
+ else
+ opts = {}
+ end
+
pipeline_run(cmds, opts, [], []) {|ts|
ts.map {|t| t.value }
}
diff --git a/lib/optparse.rb b/lib/optparse.rb
index 6c4560f749..469fde29ae 100644
--- a/lib/optparse.rb
+++ b/lib/optparse.rb
@@ -185,7 +185,7 @@
#
# # Another typical switch to print the version.
# opts.on_tail("--version", "Show version") do
-# puts ::Version.join('.')
+# puts OptionParser::Version.join('.')
# exit
# end
# end
@@ -212,6 +212,11 @@
#
class OptionParser
# :stopdoc:
+ RCSID = %w$Id$[1..-1].each {|s| s.freeze}.freeze
+ Version = (RCSID[1].split('.').collect {|s| s.to_i}.extend(Comparable).freeze if RCSID[1])
+ LastModified = (Time.gm(*RCSID[2, 2].join('-').scan(/\d+/).collect {|s| s.to_i}) if RCSID[2])
+ Release = RCSID[2]
+
NoArgument = [NO_ARGUMENT = :NONE, nil].freeze
RequiredArgument = [REQUIRED_ARGUMENT = :REQUIRED, true].freeze
OptionalArgument = [OPTIONAL_ARGUMENT = :OPTIONAL, false].freeze
@@ -447,7 +452,7 @@ class OptionParser
(sopts+lopts).each do |opt|
# "(-x -c -r)-l[left justify]" \
- if /^--\[no-\](.+)$/ =~ opt
+ if opt =~ /^--\[no-\](.+)$/
o = $1
yield("--#{o}", desc.join(""))
yield("--no-#{o}", desc.join(""))
@@ -732,7 +737,7 @@ class OptionParser
# OPTIONAL_ARGUMENT:: The switch requires an optional argument. (:OPTIONAL)
#
# Use like --switch=argument (long style) or -Xargument (short style). For
- # short style, only portion matched to argument pattern is treated as
+ # short style, only portion matched to argument pattern is dealed as
# argument.
#
ArgumentStyle = {}
@@ -1088,7 +1093,7 @@ XXX
end
private :notwice
- SPLAT_PROC = proc {|*a| a.length <= 1 ? a.first : a} # :nodoc:
+ SPLAT_PROC = proc {|*a| a.length <= 1 ? a.first : a}
#
# Creates an OptionParser::Switch from the parameters. The parsed argument
# value is passed to the given block, where it can be processed.
@@ -1632,22 +1637,15 @@ XXX
decimal = '\d+(?:_\d+)*'
binary = 'b[01]+(?:_[01]+)*'
hex = 'x[\da-f]+(?:_[\da-f]+)*'
- octal = "0(?:[0-7]+(?:_[0-7]+)*|#{binary}|#{hex})?"
+ octal = "0(?:[0-7]*(?:_[0-7]+)*|#{binary}|#{hex})"
integer = "#{octal}|#{decimal}"
-
- accept(Integer, %r"\A[-+]?(?:#{integer})\z"io) {|s,|
- begin
- Integer(s)
- rescue ArgumentError
- raise OptionParser::InvalidArgument, s
- end if s
- }
+ accept(Integer, %r"\A[-+]?(?:#{integer})"io) {|s,| Integer(s) if s}
#
# Float number format, and converts to Float.
#
float = "(?:#{decimal}(?:\\.(?:#{decimal})?)?|\\.#{decimal})(?:E[-+]?#{decimal})?"
- floatpat = %r"\A[-+]?#{float}\z"io
+ floatpat = %r"\A[-+]?#{float}"io
accept(Float, floatpat) {|s,| s.to_f if s}
#
@@ -1655,7 +1653,7 @@ XXX
# for float format, and Rational for rational format.
#
real = "[-+]?(?:#{octal}|#{float})"
- accept(Numeric, /\A(#{real})(?:\/(#{real}))?\z/io) {|s, d, n|
+ accept(Numeric, /\A(#{real})(?:\/(#{real}))?/io) {|s, d, n|
if n
Rational(d, n)
elsif s
@@ -1666,40 +1664,22 @@ XXX
#
# Decimal integer format, to be converted to Integer.
#
- DecimalInteger = /\A[-+]?#{decimal}\z/io
- accept(DecimalInteger, DecimalInteger) {|s,|
- begin
- Integer(s)
- rescue ArgumentError
- raise OptionParser::InvalidArgument, s
- end if s
- }
+ DecimalInteger = /\A[-+]?#{decimal}/io
+ accept(DecimalInteger) {|s,| s.to_i if s}
#
# Ruby/C like octal/hexadecimal/binary integer format, to be converted to
# Integer.
#
- OctalInteger = /\A[-+]?(?:[0-7]+(?:_[0-7]+)*|0(?:#{binary}|#{hex}))\z/io
- accept(OctalInteger, OctalInteger) {|s,|
- begin
- Integer(s, 8)
- rescue ArgumentError
- raise OptionParser::InvalidArgument, s
- end if s
- }
+ OctalInteger = /\A[-+]?(?:[0-7]+(?:_[0-7]+)*|0(?:#{binary}|#{hex}))/io
+ accept(OctalInteger) {|s,| s.oct if s}
#
# Decimal integer/float number format, to be converted to Integer for
# integer format, Float for float format.
#
DecimalNumeric = floatpat # decimal integer is allowed as float also.
- accept(DecimalNumeric, floatpat) {|s,|
- begin
- eval(s)
- rescue SyntaxError
- raise OptionParser::InvalidArgument, s
- end if s
- }
+ accept(DecimalNumeric) {|s,| eval(s) if s}
#
# Boolean switch, which means whether it is present or not, whether it is
@@ -1954,3 +1934,10 @@ end
# ARGV is arguable by OptionParser
ARGV.extend(OptionParser::Arguable)
+
+if $0 == __FILE__
+ Version = OptionParser::Version
+ ARGV.options {|q|
+ q.parse!.empty? or print "what's #{ARGV.join(' ')}?\n"
+ } or abort(ARGV.options.to_s)
+end
diff --git a/lib/ostruct.rb b/lib/ostruct.rb
index f51eb7b5db..b291f08308 100644
--- a/lib/ostruct.rb
+++ b/lib/ostruct.rb
@@ -61,8 +61,8 @@
#
# == Implementation:
#
-# An OpenStruct utilizes Ruby's method lookup structure to find and define the
-# necessary methods for properties. This is accomplished through the method
+# An OpenStruct utilizes Ruby's method lookup structure to and find and define
+# the necessary methods for properties. This is accomplished through the method
# method_missing and define_method.
#
# This should be a consideration if there is a concern about the performance of
@@ -125,7 +125,7 @@ class OpenStruct
# data.each_pair.to_a # => [[:country, "Australia"], [:population, 20000000]]
#
def each_pair
- return to_enum(__method__) { @table.size } unless block_given?
+ return to_enum __method__ unless block_given?
@table.each_pair{|p| yield p}
end
@@ -152,7 +152,7 @@ class OpenStruct
begin
@modifiable = true
rescue
- raise RuntimeError, "can't modify frozen #{self.class}", caller(3)
+ raise TypeError, "can't modify frozen #{self.class}", caller(3)
end
@table
end
@@ -184,9 +184,7 @@ class OpenStruct
elsif len == 0
@table[mid]
else
- err = NoMethodError.new "undefined method `#{mid}' for #{self}", mid, args
- err.set_backtrace caller(1)
- raise err
+ raise NoMethodError, "undefined method `#{mid}' for #{self}", caller(1)
end
end
@@ -222,7 +220,7 @@ class OpenStruct
#
def delete_field(name)
sym = name.to_sym
- singleton_class.__send__(:remove_method, sym, "#{sym}=")
+ singleton_class.__send__(:remove_method, sym, "#{name}=")
@table.delete sym
end
diff --git a/lib/pp.rb b/lib/pp.rb
index 0091ddf74c..6e0c797d2e 100644
--- a/lib/pp.rb
+++ b/lib/pp.rb
@@ -1,13 +1,7 @@
require 'prettyprint'
module Kernel
- # Returns a pretty printed object as a string.
- #
- # In order to use this method you must first require the PP module:
- #
- # require 'pp'
- #
- # See the PP module for more information.
+ # returns a pretty printed object as a string.
def pretty_inspect
PP.pp(self, '')
end
@@ -16,28 +10,23 @@ module Kernel
# prints arguments in pretty form.
#
# pp returns argument(s).
- def pp(*objs) # :nodoc:
+ def pp(*objs) # :doc:
objs.each {|obj|
PP.pp(obj)
}
objs.size <= 1 ? objs.first : objs
end
- module_function :pp # :nodoc:
+ module_function :pp
end
-##
-# A pretty-printer for Ruby objects.
+# == Pretty-printer for Ruby objects.
#
-# All examples assume you have loaded the PP class with:
-# require 'pp'
+# = Which seems better?
#
-##
-# == What PP Does
-#
-# Standard output by #p returns this:
+# non-pretty-printed output by #p is:
# #<PP:0x81fedf0 @genspace=#<Proc:0x81feda0>, @group_queue=#<PrettyPrint::GroupQueue:0x81fed3c @queue=[[#<PrettyPrint::Group:0x81fed78 @breakables=[], @depth=0, @break=false>], []]>, @buffer=[], @newline="\n", @group_stack=[#<PrettyPrint::Group:0x81fed78 @breakables=[], @depth=0, @break=false>], @buffer_width=0, @indent=0, @maxwidth=79, @output_width=2, @output=#<IO:0x8114ee4>>
#
-# Pretty-printed output returns this:
+# pretty-printed output by #pp is:
# #<PP:0x81fedf0
# @buffer=[],
# @buffer_width=0,
@@ -55,42 +44,32 @@ end
# @output=#<IO:0x8114ee4>,
# @output_width=2>
#
-##
-# == Usage
+# I like the latter. If you do too, this library is for you.
+#
+# = Usage
#
# pp(obj) #=> obj
-# pp obj #=> obj
# pp(obj1, obj2, ...) #=> [obj1, obj2, ...]
# pp() #=> nil
#
-# Output <tt>obj(s)</tt> to <tt>$></tt> in pretty printed format.
-#
-# It returns <tt>obj(s)</tt>.
-#
-##
-# == Output Customization
-#
-# To define a customized pretty printing function for your classes,
-# redefine method <code>#pretty_print(pp)</code> in the class.
-#
-# <code>#pretty_print</code> takes the +pp+ argument, which is an instance of the PP class.
-# The method uses #text, #breakable, #nest, #group and #pp to print the
-# object.
+# output +obj(s)+ to +$>+ in pretty printed format.
#
-##
-# == Pretty-Print JSON
+# It returns +obj(s)+.
#
-# To pretty-print JSON refer to JSON#pretty_generate.
+# = Output Customization
+# To define your customized pretty printing function for your classes,
+# redefine a method #pretty_print(+pp+) in the class.
+# It takes an argument +pp+ which is an instance of the class PP.
+# The method should use PP#text, PP#breakable, PP#nest, PP#group and
+# PP#pp to print the object.
#
-##
-# == Author
-# Tanaka Akira <akr@fsij.org>
-
+# = Author
+# Tanaka Akira <akr@m17n.org>
class PP < PrettyPrint
# Outputs +obj+ to +out+ in pretty printed format of
# +width+ columns in width.
#
- # If +out+ is omitted, <code>$></code> is assumed.
+ # If +out+ is omitted, +$>+ is assumed.
# If +width+ is omitted, 79 is assumed.
#
# PP.pp returns +out+.
@@ -127,44 +106,33 @@ class PP < PrettyPrint
end
module PPMethods
-
- # Yields to a block
- # and preserves the previous set of objects being printed.
def guard_inspect_key
if Thread.current[:__recursive_key__] == nil
- Thread.current[:__recursive_key__] = {}.taint
+ Thread.current[:__recursive_key__] = {}.untrust
end
if Thread.current[:__recursive_key__][:inspect] == nil
- Thread.current[:__recursive_key__][:inspect] = {}.taint
+ Thread.current[:__recursive_key__][:inspect] = {}.untrust
end
save = Thread.current[:__recursive_key__][:inspect]
begin
- Thread.current[:__recursive_key__][:inspect] = {}.taint
+ Thread.current[:__recursive_key__][:inspect] = {}.untrust
yield
ensure
Thread.current[:__recursive_key__][:inspect] = save
end
end
- # Check whether the object_id +id+ is in the current buffer of objects
- # to be pretty printed. Used to break cycles in chains of objects to be
- # pretty printed.
def check_inspect_key(id)
Thread.current[:__recursive_key__] &&
Thread.current[:__recursive_key__][:inspect] &&
Thread.current[:__recursive_key__][:inspect].include?(id)
end
-
- # Adds the object_id +id+ to the set of objects being pretty printed, so
- # as to not repeat objects.
def push_inspect_key(id)
Thread.current[:__recursive_key__][:inspect][id] = true
end
-
- # Removes an object from the set of objects being pretty printed.
def pop_inspect_key(id)
Thread.current[:__recursive_key__][:inspect].delete id
end
@@ -197,12 +165,18 @@ class PP < PrettyPrint
group(1, '#<' + obj.class.name, '>', &block)
end
- # A convenience method, like object_group, but also reformats the Object's
- # object_id.
+ PointerMask = (1 << ([""].pack("p").size * 8)) - 1
+
+ case Object.new.inspect
+ when /\A\#<Object:0x([0-9a-f]+)>\z/
+ PointerFormat = "%0#{$1.length}x"
+ else
+ PointerFormat = "%x"
+ end
+
def object_address_group(obj, &block)
- str = Kernel.instance_method(:to_s).bind(obj).call
- str.chomp!('>')
- group(1, str, '>', &block)
+ id = PointerFormat % (obj.object_id * 2 & PointerMask)
+ group(1, "\#<#{obj.class}:0x#{id}", '>', &block)
end
# A convenience method which is same as follows:
@@ -251,7 +225,6 @@ class PP < PrettyPrint
}
end
- # A present standard failsafe for pretty printing any given Object
def pp_object(obj)
object_address_group(obj) {
seplist(obj.pretty_print_instance_variables, lambda { text ',' }) {|v|
@@ -267,7 +240,6 @@ class PP < PrettyPrint
}
end
- # A pretty print for a Hash
def pp_hash(obj)
group(1, '{', '}') {
seplist(obj, nil, :each_pair) {|k, v|
@@ -286,11 +258,11 @@ class PP < PrettyPrint
include PPMethods
- class SingleLine < PrettyPrint::SingleLine # :nodoc:
+ class SingleLine < PrettyPrint::SingleLine
include PPMethods
end
- module ObjectMixin # :nodoc:
+ module ObjectMixin
# 1. specific pretty_print
# 2. specific inspect
# 3. generic pretty_print
@@ -352,8 +324,8 @@ class PP < PrettyPrint
end
end
-class Array # :nodoc:
- def pretty_print(q) # :nodoc:
+class Array
+ def pretty_print(q)
q.group(1, '[', ']') {
q.seplist(self) {|v|
q.pp v
@@ -361,23 +333,23 @@ class Array # :nodoc:
}
end
- def pretty_print_cycle(q) # :nodoc:
+ def pretty_print_cycle(q)
q.text(empty? ? '[]' : '[...]')
end
end
-class Hash # :nodoc:
- def pretty_print(q) # :nodoc:
+class Hash
+ def pretty_print(q)
q.pp_hash self
end
- def pretty_print_cycle(q) # :nodoc:
+ def pretty_print_cycle(q)
q.text(empty? ? '{}' : '{...}')
end
end
-class << ENV # :nodoc:
- def pretty_print(q) # :nodoc:
+class << ENV
+ def pretty_print(q)
h = {}
ENV.keys.sort.each {|k|
h[k] = ENV[k]
@@ -386,8 +358,8 @@ class << ENV # :nodoc:
end
end
-class Struct # :nodoc:
- def pretty_print(q) # :nodoc:
+class Struct
+ def pretty_print(q)
q.group(1, sprintf("#<struct %s", PP.mcall(self, Kernel, :class).name), '>') {
q.seplist(PP.mcall(self, Struct, :members), lambda { q.text "," }) {|member|
q.breakable
@@ -401,13 +373,13 @@ class Struct # :nodoc:
}
end
- def pretty_print_cycle(q) # :nodoc:
+ def pretty_print_cycle(q)
q.text sprintf("#<struct %s:...>", PP.mcall(self, Kernel, :class).name)
end
end
-class Range # :nodoc:
- def pretty_print(q) # :nodoc:
+class Range
+ def pretty_print(q)
q.pp self.begin
q.breakable ''
q.text(self.exclude_end? ? '...' : '..')
@@ -416,9 +388,9 @@ class Range # :nodoc:
end
end
-class File < IO # :nodoc:
- class Stat # :nodoc:
- def pretty_print(q) # :nodoc:
+class File < IO
+ class Stat
+ def pretty_print(q)
require 'etc.so'
q.object_group(self) {
q.breakable
@@ -498,8 +470,8 @@ class File < IO # :nodoc:
end
end
-class MatchData # :nodoc:
- def pretty_print(q) # :nodoc:
+class MatchData
+ def pretty_print(q)
nc = []
self.regexp.named_captures.each {|name, indexes|
indexes.each {|i| nc[i] = name }
@@ -523,7 +495,7 @@ class MatchData # :nodoc:
end
end
-class Object < BasicObject # :nodoc:
+class Object < BasicObject
include PP::ObjectMixin
end
diff --git a/lib/prettyprint.rb b/lib/prettyprint.rb
index 5b1da330dd..9a90713a4d 100644
--- a/lib/prettyprint.rb
+++ b/lib/prettyprint.rb
@@ -17,8 +17,6 @@
# * Box based formatting?
# * Other (better) model/algorithm?
#
-# Report any bugs at http://bugs.ruby-lang.org
-#
# == References
# Christian Lindig, Strictly Pretty, March 2000,
# http://www.st.cs.uni-sb.de/~lindig/papers/#pretty
@@ -27,7 +25,7 @@
# http://homepages.inf.ed.ac.uk/wadler/topics/language-design.html#prettier
#
# == Author
-# Tanaka Akira <akr@fsij.org>
+# Tanaka Akira <akr@m17n.org>
#
class PrettyPrint
@@ -92,64 +90,10 @@ class PrettyPrint
@group_queue = GroupQueue.new(root_group)
@indent = 0
end
-
- # The output object.
- #
- # This defaults to '', and should accept the << method
- attr_reader :output
-
- # The maximum width of a line, before it is separated in to a newline
- #
- # This defaults to 79, and should be a Fixnum
- attr_reader :maxwidth
-
- # The value that is appended to +output+ to add a new line.
- #
- # This defaults to "\n", and should be String
- attr_reader :newline
-
- # A lambda or Proc, that takes one argument, of a Fixnum, and returns
- # the corresponding number of spaces.
- #
- # By default this is:
- # lambda {|n| ' ' * n}
- attr_reader :genspace
-
- # The number of spaces to be indented
- attr_reader :indent
-
- # The PrettyPrint::GroupQueue of groups in stack to be pretty printed
- attr_reader :group_queue
+ attr_reader :output, :maxwidth, :newline, :genspace
+ attr_reader :indent, :group_queue
# Returns the group most recently added to the stack.
- #
- # Contrived example:
- # out = ""
- # => ""
- # q = PrettyPrint.new(out)
- # => #<PrettyPrint:0x82f85c0 @output="", @maxwidth=79, @newline="\n", @genspace=#<Proc:0x82f8368@/home/vbatts/.rvm/rubies/ruby-head/lib/ruby/2.0.0/prettyprint.rb:82 (lambda)>, @output_width=0, @buffer_width=0, @buffer=[], @group_stack=[#<PrettyPrint::Group:0x82f8138 @depth=0, @breakables=[], @break=false>], @group_queue=#<PrettyPrint::GroupQueue:0x82fb7c0 @queue=[[#<PrettyPrint::Group:0x82f8138 @depth=0, @breakables=[], @break=false>]]>, @indent=0>
- # q.group {
- # q.text q.current_group.inspect
- # q.text q.newline
- # q.group(q.current_group.depth + 1) {
- # q.text q.current_group.inspect
- # q.text q.newline
- # q.group(q.current_group.depth + 1) {
- # q.text q.current_group.inspect
- # q.text q.newline
- # q.group(q.current_group.depth + 1) {
- # q.text q.current_group.inspect
- # q.text q.newline
- # }
- # }
- # }
- # }
- # => 284
- # puts out
- # #<PrettyPrint::Group:0x8354758 @depth=1, @breakables=[], @break=false>
- # #<PrettyPrint::Group:0x8354550 @depth=2, @breakables=[], @break=false>
- # #<PrettyPrint::Group:0x83541cc @depth=3, @breakables=[], @break=false>
- # #<PrettyPrint::Group:0x8347e54 @depth=4, @breakables=[], @break=false>
def current_group
@group_stack.last
end
@@ -222,7 +166,7 @@ class PrettyPrint
# may cause 2 results:
# (break,break), (non-break,non-break).
#
- # The text +sep+ is inserted if a line is not broken at this point.
+ # The text sep+ is inserted if a line is not broken at this point.
#
# If +sep+ is not specified, " " is used.
#
@@ -276,7 +220,6 @@ class PrettyPrint
text close_obj, close_width
end
- # Takes a block and queues a new group that is indented 1 level further.
def group_sub
group = Group.new(@group_stack.last.depth + 1)
@group_stack.push group
@@ -313,55 +256,25 @@ class PrettyPrint
@buffer_width = 0
end
- # The Text class is the means by which to collect strings from objects.
- #
- # This class is intended for internal use of the PrettyPrint buffers.
- class Text # :nodoc:
-
- # Creates a new text object.
- #
- # This constructor takes no arguments.
- #
- # The workflow is to append a PrettyPrint::Text object to the buffer, and
- # being able to call the buffer.last() to reference it.
- #
- # As there are objects, use PrettyPrint::Text#add to include the objects
- # and the width to utilized by the String version of this object.
+ class Text
def initialize
@objs = []
@width = 0
end
-
- # The total width of the objects included in this Text object.
attr_reader :width
- # Render the String text of the objects that have been added to this Text object.
- #
- # Output the text to +out+, and increment the width to +output_width+
def output(out, output_width)
@objs.each {|obj| out << obj}
output_width + @width
end
- # Include +obj+ in the objects to be pretty printed, and increment
- # this Text object's total width by +width+
def add(obj, width)
@objs << obj
@width += width
end
end
- # The Breakable class is used for breaking up object information
- #
- # This class is intended for internal use of the PrettyPrint buffers.
- class Breakable # :nodoc:
-
- # Create a new Breakable object.
- #
- # Arguments:
- # * +sep+ String of the separator
- # * +width+ Fixnum width of the +sep+
- # * +q+ parent PrettyPrint object, to base from
+ class Breakable
def initialize(sep, width, q)
@obj = sep
@width = width
@@ -370,24 +283,8 @@ class PrettyPrint
@group = q.current_group
@group.breakables.push self
end
+ attr_reader :obj, :width, :indent
- # Holds the separator String
- #
- # The +sep+ argument from ::new
- attr_reader :obj
-
- # The width of +obj+ / +sep+
- attr_reader :width
-
- # The number of spaces to indent.
- #
- # This is inferred from +q+ within PrettyPrint, passed in ::new
- attr_reader :indent
-
- # Render the String text of the objects that have been added to this
- # Breakable object.
- #
- # Output the text to +out+, and increment the width to +output_width+
def output(out, output_width)
@group.breakables.shift
if @group.break?
@@ -402,45 +299,22 @@ class PrettyPrint
end
end
- # The Group class is used for making indentation easier.
- #
- # While this class does neither the breaking into newlines nor indentation,
- # it is used in a stack (as well as a queue) within PrettyPrint, to group
- # objects.
- #
- # For information on using groups, see PrettyPrint#group
- #
- # This class is intended for internal use of the PrettyPrint buffers.
- class Group # :nodoc:
- # Create a Group object
- #
- # Arguments:
- # * +depth+ - this group's relation to previous groups
+ class Group
def initialize(depth)
@depth = depth
@breakables = []
@break = false
end
+ attr_reader :depth, :breakables
- # This group's relation to previous groups
- attr_reader :depth
-
- # Array to hold the Breakable objects for this Group
- attr_reader :breakables
-
- # Makes a break for this Group, and returns true
def break
@break = true
end
- # Boolean of whether this Group has made a break
def break?
@break
end
- # Boolean of whether this Group has been queried for being first
- #
- # This is used as a predicate, and ought to be called first.
def first?
if defined? @first
false
@@ -451,33 +325,18 @@ class PrettyPrint
end
end
- # The GroupQueue class is used for managing the queue of Group to be pretty
- # printed.
- #
- # This queue groups the Group objects, based on their depth.
- #
- # This class is intended for internal use of the PrettyPrint buffers.
- class GroupQueue # :nodoc:
- # Create a GroupQueue object
- #
- # Arguments:
- # * +groups+ - one or more PrettyPrint::Group objects
+ class GroupQueue
def initialize(*groups)
@queue = []
groups.each {|g| enq g}
end
- # Enqueue +group+
- #
- # This does not strictly append the group to the end of the queue,
- # but instead adds it in line, base on the +group.depth+
def enq(group)
depth = group.depth
@queue << [] until depth < @queue.length
@queue[depth] << group
end
- # Returns the outer group of the queue
def deq
@queue.each {|gs|
(gs.length-1).downto(0) {|i|
@@ -493,67 +352,29 @@ class PrettyPrint
return nil
end
- # Remote +group+ from this queue
def delete(group)
@queue[group.depth].delete(group)
end
end
- # PrettyPrint::SingleLine is used by PrettyPrint.singleline_format
- #
- # It is passed to be similar to a PrettyPrint object itself, by responding to:
- # * #text
- # * #breakable
- # * #nest
- # * #group
- # * #flush
- # * #first?
- #
- # but instead, the output has no line breaks
- #
class SingleLine
- # Create a PrettyPrint::SingleLine object
- #
- # Arguments:
- # * +output+ - String (or similar) to store rendered text. Needs to respond to '<<'
- # * +maxwidth+ - Argument position expected to be here for compatibility.
- # This argument is a noop.
- # * +newline+ - Argument position expected to be here for compatibility.
- # This argument is a noop.
def initialize(output, maxwidth=nil, newline=nil)
@output = output
@first = [true]
end
- # Add +obj+ to the text to be output.
- #
- # +width+ argument is here for compatibility. It is a noop argument.
def text(obj, width=nil)
@output << obj
end
- # Appends +sep+ to the text to be output. By default +sep+ is ' '
- #
- # +width+ argument is here for compatibility. It is a noop argument.
def breakable(sep=' ', width=nil)
@output << sep
end
- # Takes +indent+ arg, but does nothing with it.
- #
- # Yields to a block.
- def nest(indent) # :nodoc:
+ def nest(indent)
yield
end
- # Opens a block for grouping objects to be pretty printed.
- #
- # Arguments:
- # * +indent+ - noop argument. Present for compatibility.
- # * +open_obj+ - text appended before the &blok. Default is ''
- # * +close_obj+ - text appended after the &blok. Default is ''
- # * +open_width+ - noop argument. Present for compatibility.
- # * +close_width+ - noop argument. Present for compatibility.
def group(indent=nil, open_obj='', close_obj='', open_width=nil, close_width=nil)
@first.push true
@output << open_obj
@@ -562,11 +383,9 @@ class PrettyPrint
@first.pop
end
- # Method present for compatibility, but is a noop
- def flush # :nodoc:
+ def flush
end
- # This is used as a predicate, and ought to be called first.
def first?
result = @first[-1]
@first[-1] = false
diff --git a/lib/prime.rb b/lib/prime.rb
index f359c12693..4a20d93fb7 100644
--- a/lib/prime.rb
+++ b/lib/prime.rb
@@ -71,20 +71,20 @@ end
#
# A "generator" provides an implementation of enumerating pseudo-prime
# numbers and it remembers the position of enumeration and upper bound.
-# Furthermore, it is an external iterator of prime enumeration which is
-# compatible with an Enumerator.
+# Futhermore, it is a external iterator of prime enumeration which is
+# compatible to an Enumerator.
#
# +Prime+::+PseudoPrimeGenerator+ is the base class for generators.
# There are few implementations of generator.
#
# [+Prime+::+EratosthenesGenerator+]
-# Uses eratosthenes' sieve.
+# Uses eratosthenes's sieve.
# [+Prime+::+TrialDivisionGenerator+]
# Uses the trial division method.
# [+Prime+::+Generator23+]
-# Generates all positive integers which are not divisible by either 2 or 3.
+# Generates all positive integers which is not divided by 2 nor 3.
# This sequence is very bad as a pseudo-prime sequence. But this
-# is faster and uses much less memory than the other generators. So,
+# is faster and uses much less memory than other generators. So,
# it is suitable for factorizing an integer which is not large but
# has many prime factors. e.g. for Prime#prime? .
@@ -133,13 +133,13 @@ class Prime
# a parameter.
#
# +ubound+::
- # Upper bound of prime numbers. The iterator stops after it
+ # Upper bound of prime numbers. The iterator stops after
# yields all prime numbers p <= +ubound+.
#
# == Note
#
- # +Prime+.+new+ returns an object extended by +Prime+::+OldCompatibility+
- # in order to be compatible with Ruby 1.8, and +Prime+#each is overwritten
+ # +Prime+.+new+ returns a object extended by +Prime+::+OldCompatibility+
+ # in order to compatibility to Ruby 1.8, and +Prime+#each is overwritten
# by +Prime+::+OldCompatibility+#+each+.
#
# +Prime+.+new+ is now obsolete. Use +Prime+.+instance+.+each+ or simply
@@ -191,9 +191,9 @@ class Prime
# +value+:: An arbitrary integer.
# +generator+:: Optional. A pseudo-prime generator.
# +generator+.succ must return the next
- # pseudo-prime number in the ascending
+ # pseudo-prime number in the ascendent
# order. It must generate all prime numbers,
- # but may also generate non prime numbers too.
+ # but may generate non prime numbers.
#
# === Exceptions
# +ZeroDivisionError+:: when +value+ is zero.
@@ -209,7 +209,7 @@ class Prime
#
# Prime.prime_division(12) #=> [[2,2], [3,1]]
#
- def prime_division(value, generator = Prime::Generator23.new)
+ def prime_division(value, generator= Prime::Generator23.new)
raise ZeroDivisionError if value == 0
if value < 0
value = -value
@@ -272,7 +272,7 @@ class Prime
raise NotImplementedError, "need to define `rewind'"
end
- # Iterates the given block for each prime number.
+ # Iterates the given block for each prime numbers.
def each(&block)
return self.dup unless block
if @ubound
@@ -306,13 +306,12 @@ class Prime
# Uses +EratosthenesSieve+.
class EratosthenesGenerator < PseudoPrimeGenerator
def initialize
- @last_prime_index = -1
+ @last_prime = nil
super
end
def succ
- @last_prime_index += 1
- EratosthenesSieve.instance.get_nth_prime(@last_prime_index)
+ @last_prime = @last_prime ? EratosthenesSieve.instance.next_to(@last_prime) : 2
end
def rewind
initialize
@@ -337,11 +336,11 @@ class Prime
alias next succ
end
- # Generates all integers which are greater than 2 and
- # are not divisible by either 2 or 3.
+ # Generates all integer which are greater than 2 and
+ # are not divided by 2 nor 3.
#
# This is a pseudo-prime generator, suitable on
- # checking primality of an integer by brute force
+ # checking primality of a integer by brute force
# method.
class Generator23<PseudoPrimeGenerator
def initialize
@@ -419,52 +418,72 @@ class Prime
end
end
- # Internal use. An implementation of eratosthenes' sieve
+ # Internal use. An implementation of eratosthenes's sieve
class EratosthenesSieve
include Singleton
- def initialize
- @primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101]
- # @max_checked must be an even number
- @max_checked = @primes.last + 1
+ BITS_PER_ENTRY = 16 # each entry is a set of 16-bits in a Fixnum
+ NUMS_PER_ENTRY = BITS_PER_ENTRY * 2 # twiced because even numbers are omitted
+ ENTRIES_PER_TABLE = 8
+ NUMS_PER_TABLE = NUMS_PER_ENTRY * ENTRIES_PER_TABLE
+ FILLED_ENTRY = (1 << NUMS_PER_ENTRY) - 1
+
+ def initialize # :nodoc:
+ # bitmap for odd prime numbers less than 256.
+ # For an arbitrary odd number n, @tables[i][j][k] is
+ # * 1 if n is prime,
+ # * 0 if n is composite,
+ # where i,j,k = indices(n)
+ @tables = [[0xcb6e, 0x64b4, 0x129a, 0x816d, 0x4c32, 0x864a, 0x820d, 0x2196].freeze]
end
- def get_nth_prime(n)
- compute_primes while @primes.size <= n
- @primes[n]
+ # returns the least odd prime number which is greater than +n+.
+ def next_to(n)
+ n = (n-1).div(2)*2+3 # the next odd number to given n
+ table_index, integer_index, bit_index = indices(n)
+ loop do
+ extend_table until @tables.length > table_index
+ for j in integer_index...ENTRIES_PER_TABLE
+ if !@tables[table_index][j].zero?
+ for k in bit_index...BITS_PER_ENTRY
+ return NUMS_PER_TABLE*table_index + NUMS_PER_ENTRY*j + 2*k+1 if !@tables[table_index][j][k].zero?
+ end
+ end
+ bit_index = 0
+ end
+ table_index += 1; integer_index = 0
+ end
end
private
- def compute_primes
- # max_segment_size must be an even number
- max_segment_size = 1e6.to_i
- max_cached_prime = @primes.last
- # do not double count primes if #compute_primes is interrupted
- # by Timeout.timeout
- @max_checked = max_cached_prime + 1 if max_cached_prime > @max_checked
-
- segment_min = @max_checked
- segment_max = [segment_min + max_segment_size, max_cached_prime * 2].min
- root = Integer(Math.sqrt(segment_max).floor)
-
- sieving_primes = @primes[1 .. -1].take_while { |prime| prime <= root }
- offsets = Array.new(sieving_primes.size) do |i|
- (-(segment_min + 1 + sieving_primes[i]) / 2) % sieving_primes[i]
- end
+ # for an odd number +n+, returns (i, j, k) such that @tables[i][j][k] represents primarity of the number
+ def indices(n)
+ # binary digits of n: |0|1|2|3|4|5|6|7|8|9|10|11|....
+ # indices: |-| k | j | i
+ # because of NUMS_PER_ENTRY, NUMS_PER_TABLE
+
+ k = (n & 0b00011111) >> 1
+ j = (n & 0b11100000) >> 5
+ i = n >> 8
+ return i, j, k
+ end
- segment = ((segment_min + 1) .. segment_max).step(2).to_a
- sieving_primes.each_with_index do |prime, index|
- composite_index = offsets[index]
- while composite_index < segment.size do
- segment[composite_index] = nil
- composite_index += prime
+ def extend_table
+ lbound = NUMS_PER_TABLE * @tables.length
+ ubound = lbound + NUMS_PER_TABLE
+ new_table = [FILLED_ENTRY] * ENTRIES_PER_TABLE # which represents primarity in lbound...ubound
+ (3..Integer(Math.sqrt(ubound))).step(2) do |p|
+ i, j, k = indices(p)
+ next if @tables[i][j][k].zero?
+
+ start = (lbound.div(p)+1)*p # least multiple of p which is >= lbound
+ start += p if start.even?
+ (start...ubound).step(2*p) do |n|
+ _, j, k = indices(n)
+ new_table[j] &= FILLED_ENTRY^(1<<k)
end
end
-
- segment.each do |prime|
- @primes.push prime unless prime.nil?
- end
- @max_checked = segment_max
+ @tables << new_table.freeze
end
end
diff --git a/lib/profiler.rb b/lib/profiler.rb
index e53951cbe6..d68bd71c49 100644
--- a/lib/profiler.rb
+++ b/lib/profiler.rb
@@ -76,46 +76,37 @@ module Profiler__
@@start = nil # the start time that profiling began
@@stacks = nil # the map of stacks keyed by thread
@@maps = nil # the map of call data keyed by thread, class and id. Call data contains the call count, total time,
- PROFILE_CALL_PROC = TracePoint.new(*%i[call c_call b_call]) {|tp| # :nodoc:
- now = Process.times[0]
- stack = (@@stacks[Thread.current] ||= [])
- stack.push [now, 0.0]
- }
- PROFILE_RETURN_PROC = TracePoint.new(*%i[return c_return b_return]) {|tp| # :nodoc:
- now = Process.times[0]
- key = Wrapper.new(tp.defined_class, tp.method_id)
- stack = (@@stacks[Thread.current] ||= [])
- if tick = stack.pop
- threadmap = (@@maps[Thread.current] ||= {})
- data = (threadmap[key] ||= [0, 0.0, 0.0, key])
- data[0] += 1
- cost = now - tick[0]
- data[1] += cost
- data[2] += cost - tick[1]
- stack[-1][1] += cost if stack[-1]
+ PROFILE_PROC = TracePoint.new(:call, :c_call, :return, :c_return) {|tp|
+ case tp.event
+ when :call, :c_call
+ now = Process.times[0]
+ stack = (@@stacks[Thread.current] ||= [])
+ stack.push [now, 0.0]
+ when :return, :c_return
+ now = Process.times[0]
+ key = Wrapper.new(tp.defined_class, tp.method_id)
+ stack = (@@stacks[Thread.current] ||= [])
+ if tick = stack.pop
+ threadmap = (@@maps[Thread.current] ||= {})
+ data = (threadmap[key] ||= [0, 0.0, 0.0, key])
+ data[0] += 1
+ cost = now - tick[0]
+ data[1] += cost
+ data[2] += cost - tick[1]
+ stack[-1][1] += cost if stack[-1]
+ end
end
}
module_function
- # Starts the profiler.
- #
- # See Profiler__ for more information.
def start_profile
@@start = Process.times[0]
@@stacks = {}
@@maps = {}
- PROFILE_CALL_PROC.enable
- PROFILE_RETURN_PROC.enable
+ PROFILE_PROC.enable
end
- # Stops the profiler.
- #
- # See Profiler__ for more information.
def stop_profile
- PROFILE_CALL_PROC.disable
- PROFILE_RETURN_PROC.disable
+ PROFILE_PROC.disable
end
- # Outputs the results from the profiler.
- #
- # See Profiler__ for more information.
def print_profile(f)
stop_profile
total = Process.times[0] - @@start
diff --git a/lib/racc/parser.rb b/lib/racc/parser.rb
index 9e6de03dd5..e0b77f157e 100644
--- a/lib/racc/parser.rb
+++ b/lib/racc/parser.rb
@@ -1,4 +1,4 @@
-#--
+#
# $originalId: parser.rb,v 1.8 2006/07/06 11:42:07 aamine Exp $
#
# Copyright (c) 1999-2006 Minero Aoki
@@ -9,7 +9,7 @@
# As a special exception, when this code is copied by Racc
# into a Racc output file, you may use that output file
# without restriction.
-#++
+#
module Racc
class ParseError < StandardError; end
@@ -18,164 +18,10 @@ unless defined?(::ParseError)
ParseError = Racc::ParseError
end
-# Racc is a LALR(1) parser generator.
-# It is written in Ruby itself, and generates Ruby programs.
-#
-# == Command-line Reference
-#
-# racc [-o<var>filename</var>] [--output-file=<var>filename</var>]
-# [-e<var>rubypath</var>] [--embedded=<var>rubypath</var>]
-# [-v] [--verbose]
-# [-O<var>filename</var>] [--log-file=<var>filename</var>]
-# [-g] [--debug]
-# [-E] [--embedded]
-# [-l] [--no-line-convert]
-# [-c] [--line-convert-all]
-# [-a] [--no-omit-actions]
-# [-C] [--check-only]
-# [-S] [--output-status]
-# [--version] [--copyright] [--help] <var>grammarfile</var>
-#
-# [+filename+]
-# Racc grammar file. Any extension is permitted.
-# [-o+outfile+, --output-file=+outfile+]
-# A filename for output. default is <+filename+>.tab.rb
-# [-O+filename+, --log-file=+filename+]
-# Place logging output in file +filename+.
-# Default log file name is <+filename+>.output.
-# [-e+rubypath+, --executable=+rubypath+]
-# output executable file(mode 755). where +path+ is the Ruby interpreter.
-# [-v, --verbose]
-# verbose mode. create +filename+.output file, like yacc's y.output file.
-# [-g, --debug]
-# add debug code to parser class. To display debugging information,
-# use this '-g' option and set @yydebug true in parser class.
-# [-E, --embedded]
-# Output parser which doesn't need runtime files (racc/parser.rb).
-# [-C, --check-only]
-# Check syntax of racc grammar file and quit.
-# [-S, --output-status]
-# Print messages time to time while compiling.
-# [-l, --no-line-convert]
-# turns off line number converting.
-# [-c, --line-convert-all]
-# Convert line number of actions, inner, header and footer.
-# [-a, --no-omit-actions]
-# Call all actions, even if an action is empty.
-# [--version]
-# print Racc version and quit.
-# [--copyright]
-# Print copyright and quit.
-# [--help]
-# Print usage and quit.
-#
-# == Generating Parser Using Racc
-#
-# To compile Racc grammar file, simply type:
-#
-# $ racc parse.y
-#
-# This creates Ruby script file "parse.tab.y". The -o option can change the output filename.
-#
-# == Writing A Racc Grammar File
-#
-# If you want your own parser, you have to write a grammar file.
-# A grammar file contains the name of your parser class, grammar for the parser,
-# user code, and anything else.
-# When writing a grammar file, yacc's knowledge is helpful.
-# If you have not used yacc before, Racc is not too difficult.
-#
-# Here's an example Racc grammar file.
-#
-# class Calcparser
-# rule
-# target: exp { print val[0] }
-#
-# exp: exp '+' exp
-# | exp '*' exp
-# | '(' exp ')'
-# | NUMBER
-# end
-#
-# Racc grammar files resemble yacc files.
-# But (of course), this is Ruby code.
-# yacc's $$ is the 'result', $0, $1... is
-# an array called 'val', and $-1, $-2... is an array called '_values'.
-#
-# See the {Grammar File Reference}[rdoc-ref:lib/racc/rdoc/grammar.en.rdoc] for
-# more information on grammar files.
-#
-# == Parser
-#
-# Then you must prepare the parse entry method. There are two types of
-# parse methods in Racc, Racc::Parser#do_parse and Racc::Parser#yyparse
-#
-# Racc::Parser#do_parse is simple.
-#
-# It's yyparse() of yacc, and Racc::Parser#next_token is yylex().
-# This method must returns an array like [TOKENSYMBOL, ITS_VALUE].
-# EOF is [false, false].
-# (TOKENSYMBOL is a Ruby symbol (taken from String#intern) by default.
-# If you want to change this, see the grammar reference.
-#
-# Racc::Parser#yyparse is little complicated, but useful.
-# It does not use Racc::Parser#next_token, instead it gets tokens from any iterator.
-#
-# For example, <code>yyparse(obj, :scan)</code> causes
-# calling +obj#scan+, and you can return tokens by yielding them from +obj#scan+.
-#
-# == Debugging
-#
-# When debugging, "-v" or/and the "-g" option is helpful.
-#
-# "-v" creates verbose log file (.output).
-# "-g" creates a "Verbose Parser".
-# Verbose Parser prints the internal status when parsing.
-# But it's _not_ automatic.
-# You must use -g option and set +@yydebug+ to +true+ in order to get output.
-# -g option only creates the verbose parser.
-#
-# === Racc reported syntax error.
-#
-# Isn't there too many "end"?
-# grammar of racc file is changed in v0.10.
-#
-# Racc does not use '%' mark, while yacc uses huge number of '%' marks..
-#
-# === Racc reported "XXXX conflicts".
-#
-# Try "racc -v xxxx.y".
-# It causes producing racc's internal log file, xxxx.output.
-#
-# === Generated parsers does not work correctly
-#
-# Try "racc -g xxxx.y".
-# This command let racc generate "debugging parser".
-# Then set @yydebug=true in your parser.
-# It produces a working log of your parser.
-#
-# == Re-distributing Racc runtime
-#
-# A parser, which is created by Racc, requires the Racc runtime module;
-# racc/parser.rb.
-#
-# Ruby 1.8.x comes with Racc runtime module,
-# you need NOT distribute Racc runtime files.
-#
-# If you want to include the Racc runtime module with your parser.
-# This can be done by using '-E' option:
-#
-# $ racc -E -omyparser.rb myparser.y
-#
-# This command creates myparser.rb which `includes' Racc runtime.
-# Only you must do is to distribute your parser file (myparser.rb).
-#
-# Note: parser.rb is LGPL, but your parser is not.
-# Your own parser is completely yours.
module Racc
- unless defined?(Racc_No_Extensions)
- Racc_No_Extensions = false # :nodoc:
+ unless defined?(Racc_No_Extentions)
+ Racc_No_Extentions = false
end
class Parser
@@ -187,20 +33,20 @@ module Racc
Racc_Runtime_Core_Revision_R = %w$originalRevision: 1.8 $[1]
begin
require 'racc/cparse'
- # Racc_Runtime_Core_Version_C = (defined in extension)
+ # Racc_Runtime_Core_Version_C = (defined in extention)
Racc_Runtime_Core_Revision_C = Racc_Runtime_Core_Id_C.split[2]
unless new.respond_to?(:_racc_do_parse_c, true)
raise LoadError, 'old cparse.so'
end
- if Racc_No_Extensions
+ if Racc_No_Extentions
raise LoadError, 'selecting ruby version of racc runtime core'
end
- Racc_Main_Parsing_Routine = :_racc_do_parse_c # :nodoc:
- Racc_YY_Parse_Method = :_racc_yyparse_c # :nodoc:
- Racc_Runtime_Core_Version = Racc_Runtime_Core_Version_C # :nodoc:
- Racc_Runtime_Core_Revision = Racc_Runtime_Core_Revision_C # :nodoc:
- Racc_Runtime_Type = 'c' # :nodoc:
+ Racc_Main_Parsing_Routine = :_racc_do_parse_c
+ Racc_YY_Parse_Method = :_racc_yyparse_c
+ Racc_Runtime_Core_Version = Racc_Runtime_Core_Version_C
+ Racc_Runtime_Core_Revision = Racc_Runtime_Core_Revision_C
+ Racc_Runtime_Type = 'c'
rescue LoadError
Racc_Main_Parsing_Routine = :_racc_do_parse_rb
Racc_YY_Parse_Method = :_racc_yyparse_rb
@@ -209,10 +55,12 @@ module Racc
Racc_Runtime_Type = 'ruby'
end
- def Parser.racc_runtime_type # :nodoc:
+ def Parser.racc_runtime_type
Racc_Runtime_Type
end
+ private
+
def _racc_setup
@yydebug = false unless self.class::Racc_debug_parser
@yydebug = false unless defined?(@yydebug)
@@ -239,33 +87,16 @@ module Racc
@racc_error_status = 0
end
- # The entry point of the parser. This method is used with #next_token.
- # If Racc wants to get token (and its value), calls next_token.
- #
- # Example:
- # def parse
- # @q = [[1,1],
- # [2,2],
- # [3,3],
- # [false, '$']]
- # do_parse
- # end
- #
- # def next_token
- # @q.shift
- # end
+ ###
+ ### do_parse
+ ###
+
+ class_eval %{
def do_parse
- __send__(Racc_Main_Parsing_Routine, _racc_setup(), false)
+ #{Racc_Main_Parsing_Routine}(_racc_setup(), false)
end
+ }
- # The method to fetch next token.
- # If you use #do_parse method, you must implement #next_token.
- #
- # The format of return value is [TOKEN_SYMBOL, VALUE].
- # +token-symbol+ is represented by Ruby's symbol by default, e.g. :IDENT
- # for 'IDENT'. ";" (String) for ';'.
- #
- # The final symbol (End of file) must be false.
def next_token
raise NotImplementedError, "#{self.class}\#next_token is not defined"
end
@@ -310,14 +141,15 @@ module Racc
}
end
- # Another entry point for the parser.
- # If you use this method, you must implement RECEIVER#METHOD_ID method.
- #
- # RECEIVER#METHOD_ID is a method to get next token.
- # It must 'yield' the token, which format is [TOKEN-SYMBOL, VALUE].
+ ###
+ ### yyparse
+ ###
+
+ class_eval %{
def yyparse(recv, mid)
- __send__(Racc_YY_Parse_Method, recv, mid, _racc_setup(), true)
+ #{Racc_YY_Parse_Method}(recv, mid, _racc_setup(), true)
end
+ }
def _racc_yyparse_rb(recv, mid, arg, c_debug)
action_table, action_check, action_default, action_pointer,
@@ -511,43 +343,27 @@ module Racc
goto_default[k1]
end
- # This method is called when a parse error is found.
- #
- # ERROR_TOKEN_ID is an internal ID of token which caused error.
- # You can get string representation of this ID by calling
- # #token_to_str.
- #
- # ERROR_VALUE is a value of error token.
- #
- # value_stack is a stack of symbol values.
- # DO NOT MODIFY this object.
- #
- # This method raises ParseError by default.
- #
- # If this method returns, parsers enter "error recovering mode".
def on_error(t, val, vstack)
raise ParseError, sprintf("\nparse error on value %s (%s)",
val.inspect, token_to_str(t) || '?')
end
- # Enter error recovering mode.
- # This method does not call #on_error.
def yyerror
throw :racc_jump, 1
end
- # Exit parser.
- # Return value is Symbol_Value_Stack[0].
def yyaccept
throw :racc_jump, 2
end
- # Leave error recovering mode.
def yyerrok
@racc_error_status = 0
end
- # For debugging output
+ #
+ # for debugging output
+ #
+
def racc_read_token(t, tok, val)
@racc_debug_out.print 'read '
@racc_debug_out.print tok.inspect, '(', racc_token2str(t), ') '
@@ -614,7 +430,6 @@ module Racc
raise "[Racc Bug] can't convert token #{tok} to string"
end
- # Convert internal ID of token symbol to the string.
def token_to_str(t)
self.class::Racc_token_to_s_table[t]
end
diff --git a/lib/racc/rdoc/grammar.en.rdoc b/lib/racc/rdoc/grammar.en.rdoc
deleted file mode 100644
index b667a7cb5e..0000000000
--- a/lib/racc/rdoc/grammar.en.rdoc
+++ /dev/null
@@ -1,226 +0,0 @@
-= Racc Grammar File Reference
-
-== Global Structure
-
-== Class Block and User Code Block
-
-There's two block on toplevel.
-one is 'class' block, another is 'user code' block. 'user code' block MUST
-places after 'class' block.
-
-== Comment
-
-You can insert comment about all places. Two style comment can be used,
-Ruby style (#.....) and C style (/*......*/) .
-
-== Class Block
-
-The class block is formed like this:
-
- class CLASS_NAME
- [precedance table]
- [token declearations]
- [expected number of S/R conflict]
- [options]
- [semantic value convertion]
- [start rule]
- rule
- GRAMMARS
-
-CLASS_NAME is a name of parser class.
-This is the name of generating parser class.
-
-If CLASS_NAME includes '::', Racc outputs module clause.
-For example, writing "class M::C" causes creating the code bellow:
-
- module M
- class C
- :
- :
- end
- end
-
-== Grammar Block
-
-The grammar block discripts grammar which is able
-to be understood by parser. Syntax is:
-
- (token): (token) (token) (token).... (action)
-
- (token): (token) (token) (token).... (action)
- | (token) (token) (token).... (action)
- | (token) (token) (token).... (action)
-
-(action) is an action which is executed when its (token)s are found.
-(action) is a ruby code block, which is surrounded by braces:
-
- { print val[0]
- puts val[1] }
-
-Note that you cannot use '%' string, here document, '%r' regexp in action.
-
-Actions can be omitted.
-When it is omitted, '' (empty string) is used.
-
-A return value of action is a value of left side value ($$).
-It is value of result, or returned value by "return" statement.
-
-Here is an example of whole grammar block.
-
- rule
- goal: definition ruls source { result = val }
-
- definition: /* none */ { result = [] }
- | definition startdesig { result[0] = val[1] }
- | definition
- precrule # this line continue from upper line
- {
- result[1] = val[1]
- }
-
- startdesig: START TOKEN
-
-You can use following special local variables in action.
-
-* result ($$)
-
-The value of left-hand side (lhs). A default value is val[0].
-
-* val ($1,$2,$3...)
-
-An array of value of right-hand side (rhs).
-
-* _values (...$-2,$-1,$0)
-
-A stack of values.
-DO NOT MODIFY this stack unless you know what you are doing.
-
-== Operator Precedence
-
-This function is equal to '%prec' in yacc.
-To designate this block:
-
- prechigh
- nonassoc '++'
- left '*' '/'
- left '+' '-'
- right '='
- preclow
-
-`right' is yacc's %right, `left' is yacc's %left.
-
-`=' + (symbol) means yacc's %prec:
-
- prechigh
- nonassoc UMINUS
- left '*' '/'
- left '+' '-'
- preclow
-
- rule
- exp: exp '*' exp
- | exp '-' exp
- | '-' exp =UMINUS # equals to "%prec UMINUS"
- :
- :
-
-== expect
-
-Racc has bison's "expect" directive.
-
- # Example
-
- class MyParser
- rule
- expect 3
- :
- :
-
-This directive declears "expected" number of shift/reduce conflict.
-If "expected" number is equal to real number of conflicts,
-racc does not print confliction warning message.
-
-== Declaring Tokens
-
-By declaring tokens, you can avoid many meanless bugs.
-If decleared token does not exist/existing token does not decleared,
-Racc output warnings. Declearation syntax is:
-
- token TOKEN_NAME AND_IS_THIS
- ALSO_THIS_IS AGAIN_AND_AGAIN THIS_IS_LAST
-
-== Options
-
-You can write options for racc command in your racc file.
-
- options OPTION OPTION ...
-
-Options are:
-
-* omit_action_call
-
-omit empty action call or not.
-
-* result_var
-
-use/does not use local variable "result"
-
-You can use 'no_' prefix to invert its meanings.
-
-== Converting Token Symbol
-
-Token symbols are, as default,
-
- * naked token string in racc file (TOK, XFILE, this_is_token, ...)
- --> symbol (:TOK, :XFILE, :this_is_token, ...)
- * quoted string (':', '.', '(', ...)
- --> same string (':', '.', '(', ...)
-
-You can change this default by "convert" block.
-Here is an example:
-
- convert
- PLUS 'PlusClass' # We use PlusClass for symbol of `PLUS'
- MIN 'MinusClass' # We use MinusClass for symbol of `MIN'
- end
-
-We can use almost all ruby value can be used by token symbol,
-except 'false' and 'nil'. These are causes unexpected parse error.
-
-If you want to use String as token symbol, special care is required.
-For example:
-
- convert
- class '"cls"' # in code, "cls"
- PLUS '"plus\n"' # in code, "plus\n"
- MIN "\"minus#{val}\"" # in code, \"minus#{val}\"
- end
-
-== Start Rule
-
-'%start' in yacc. This changes start rule.
-
- start real_target
-
-This statement will not be used forever, I think.
-
-== User Code Block
-
-"User Code Block" is a Ruby source code which is copied to output.
-There are three user code block, "header" "inner" and "footer".
-
-Format of user code is like this:
-
- ---- header
- ruby statement
- ruby statement
- ruby statement
-
- ---- inner
- ruby statement
- :
- :
-
-If four '-' exist on line head,
-racc treat it as beginning of user code block.
-A name of user code must be one word.
diff --git a/lib/rake.rb b/lib/rake.rb
index 531cfc82b8..fff13fe460 100644
--- a/lib/rake.rb
+++ b/lib/rake.rb
@@ -40,8 +40,6 @@ require 'rake/ext/time'
require 'rake/win32'
-require 'rake/linked_list'
-require 'rake/scope'
require 'rake/task_argument_error'
require 'rake/rule_recursion_overflow_error'
require 'rake/rake_module'
diff --git a/lib/rake/alt_system.rb b/lib/rake/alt_system.rb
index a42597bf09..05af19863a 100644
--- a/lib/rake/alt_system.rb
+++ b/lib/rake/alt_system.rb
@@ -39,7 +39,7 @@ module Rake::AltSystem
end
end
- if WINDOWS && RUBY_VERSION < "1.9.0"
+ if WINDOWS and RUBY_VERSION < "1.9.0"
RUNNABLE_EXTS = %w[com exe bat cmd]
RUNNABLE_PATTERN = %r!\.(#{RUNNABLE_EXTS.join('|')})\Z!i
@@ -73,8 +73,9 @@ module Rake::AltSystem
file
else
RUNNABLE_EXTS.each { |ext|
- test = "#{file}.#{ext}"
- return test if File.exist?(test)
+ if File.exist?(test = "#{file}.#{ext}")
+ return test
+ end
}
nil
end
diff --git a/lib/rake/application.rb b/lib/rake/application.rb
index b76244b7a3..734e20ac31 100644
--- a/lib/rake/application.rb
+++ b/lib/rake/application.rb
@@ -35,12 +35,7 @@ module Rake
# List of the top level task names (task names from the command line).
attr_reader :top_level_tasks
- DEFAULT_RAKEFILES = [
- 'rakefile',
- 'Rakefile',
- 'rakefile.rb',
- 'Rakefile.rb'
- ].freeze
+ DEFAULT_RAKEFILES = ['rakefile', 'Rakefile', 'rakefile.rb', 'Rakefile.rb'].freeze
# Initialize a Rake::Application object.
def initialize
@@ -120,8 +115,7 @@ module Rake
puts "Maximum active threads: #{stats[:max_active_threads]}"
puts "Total threads in play: #{stats[:total_threads_in_play]}"
end
- ThreadHistoryDisplay.new(thread_pool.history).show if
- options.job_stats == :history
+ ThreadHistoryDisplay.new(thread_pool.history).show if options.job_stats == :history
end
# Add a loader to handle imported files ending in the extension
@@ -138,7 +132,7 @@ module Rake
# Return the thread pool used for multithreaded processing.
def thread_pool # :nodoc:
- @thread_pool ||= ThreadPool.new(options.thread_pool_size || FIXNUM_MAX)
+ @thread_pool ||= ThreadPool.new(options.thread_pool_size||FIXNUM_MAX)
end
# private ----------------------------------------------------------------
@@ -162,23 +156,19 @@ module Rake
# Provide standard exception handling for the given block.
def standard_exception_handling
- yield
- rescue SystemExit
- # Exit silently with current status
- raise
- rescue OptionParser::InvalidOption => ex
- $stderr.puts ex.message
- exit(false)
- rescue Exception => ex
- # Exit with error message
- display_error_message(ex)
- exit_because_of_exception(ex)
- end
-
- # Exit the program because of an unhandle exception.
- # (may be overridden by subclasses)
- def exit_because_of_exception(ex)
- exit(false)
+ begin
+ yield
+ rescue SystemExit => ex
+ # Exit silently with current status
+ raise
+ rescue OptionParser::InvalidOption => ex
+ $stderr.puts ex.message
+ exit(false)
+ rescue Exception => ex
+ # Exit with error message
+ display_error_message(ex)
+ exit(false)
+ end
end
# Display the error message that caused the exception.
@@ -191,8 +181,7 @@ module Rake
trace Backtrace.collapse(ex.backtrace).join("\n")
end
trace "Tasks: #{ex.chain}" if has_chain?(ex)
- trace "(See full trace by running task with --trace)" unless
- options.backtrace
+ trace "(See full trace by running task with --trace)" unless options.backtrace
end
# Warn about deprecated usage.
@@ -201,11 +190,10 @@ module Rake
# Rake.application.deprecate("import", "Rake.import", caller.first)
#
def deprecate(old_usage, new_usage, call_site)
- unless options.ignore_deprecate
- $stderr.puts "WARNING: '#{old_usage}' is deprecated. " +
- "Please use '#{new_usage}' instead.\n" +
- " at #{call_site}"
- end
+ return if options.ignore_deprecate
+ $stderr.puts "WARNING: '#{old_usage}' is deprecated. " +
+ "Please use '#{new_usage}' instead.\n" +
+ " at #{call_site}"
end
# Does the exception have a task invocation chain?
@@ -234,7 +222,7 @@ module Rake
end
# Override the detected TTY output state (mostly for testing)
- def tty_output=(tty_output_state)
+ def tty_output=( tty_output_state )
@tty_output = tty_output_state
end
@@ -247,22 +235,16 @@ module Rake
# Display the tasks and comments.
def display_tasks_and_comments
displayable_tasks = tasks.select { |t|
- (options.show_all_tasks || t.comment) &&
- t.name =~ options.show_task_pattern
+ (options.show_all_tasks || t.comment) && t.name =~ options.show_task_pattern
}
case options.show_tasks
when :tasks
- width = displayable_tasks.map { |t| t.name_with_args.length }.max || 10
- if truncate_output?
- max_column = terminal_width - name.size - width - 7
- else
- max_column = nil
- end
+ width = displayable_tasks.collect { |t| t.name_with_args.length }.max || 10
+ max_column = truncate_output? ? terminal_width - name.size - width - 7 : nil
displayable_tasks.each do |t|
- printf("#{name} %-#{width}s # %s\n",
- t.name_with_args,
- max_column ? truncate(t.comment, max_column) : t.comment)
+ printf "#{name} %-#{width}s # %s\n",
+ t.name_with_args, max_column ? truncate(t.comment, max_column) : t.comment
end
when :describe
displayable_tasks.each do |t|
@@ -276,7 +258,7 @@ module Rake
when :lines
displayable_tasks.each do |t|
t.locations.each do |loc|
- printf "#{name} %-30s %s\n", t.name_with_args, loc
+ printf "#{name} %-30s %s\n",t.name_with_args, loc
end
end
else
@@ -309,8 +291,7 @@ module Rake
end
def unix?
- RbConfig::CONFIG['host_os'] =~
- /(aix|darwin|linux|(net|free|open)bsd|cygwin|solaris|irix|hpux)/i
+ RbConfig::CONFIG['host_os'] =~ /(aix|darwin|linux|(net|free|open)bsd|cygwin|solaris|irix|hpux)/i
end
def windows?
@@ -323,7 +304,7 @@ module Rake
elsif string.length <= width
string
else
- (string[0, width - 3] || "") + "..."
+ ( string[0, width-3] || "" ) + "..."
end
end
@@ -352,33 +333,34 @@ module Rake
def standard_rake_options
sort_options(
[
- ['--all', '-A',
- "Show all tasks, even uncommented ones",
+ ['--all', '-A', "Show all tasks, even uncommented ones",
lambda { |value|
options.show_all_tasks = value
}
],
- ['--backtrace=[OUT]',
- "Enable full backtrace. OUT can be stderr (default) or stdout.",
+ ['--backtrace=[OUT]', "Enable full backtrace. OUT can be stderr (default) or stdout.",
lambda { |value|
options.backtrace = true
select_trace_output(options, 'backtrace', value)
}
],
- ['--comments',
- "Show commented tasks only",
+ ['--classic-namespace', '-C', "Put Task and FileTask in the top level namespace",
+ lambda { |value|
+ require 'rake/classic_namespace'
+ options.classic_namespace = true
+ }
+ ],
+ ['--comments', "Show commented tasks only",
lambda { |value|
options.show_all_tasks = !value
}
],
- ['--describe', '-D [PATTERN]',
- "Describe the tasks (matching optional PATTERN), then exit.",
+ ['--describe', '-D [PATTERN]', "Describe the tasks (matching optional PATTERN), then exit.",
lambda { |value|
select_tasks_to_show(options, :describe, value)
}
],
- ['--dry-run', '-n',
- "Do a dry run without executing actions.",
+ ['--dry-run', '-n', "Do a dry run without executing actions.",
lambda { |value|
Rake.verbose(true)
Rake.nowrite(true)
@@ -386,35 +368,28 @@ module Rake
options.trace = true
}
],
- ['--execute', '-e CODE',
- "Execute some Ruby code and exit.",
+ ['--execute', '-e CODE', "Execute some Ruby code and exit.",
lambda { |value|
eval(value)
exit
}
],
- ['--execute-print', '-p CODE',
- "Execute some Ruby code, print the result, then exit.",
+ ['--execute-print', '-p CODE', "Execute some Ruby code, print the result, then exit.",
lambda { |value|
puts eval(value)
exit
}
],
['--execute-continue', '-E CODE',
- "Execute some Ruby code, " +
- "then continue with normal task processing.",
+ "Execute some Ruby code, then continue with normal task processing.",
lambda { |value| eval(value) }
],
['--jobs', '-j [NUMBER]',
- "Specifies the maximum number of tasks to execute in parallel. " +
- "(default is 2)",
- lambda { |value|
- options.thread_pool_size = [(value || 2).to_i, 2].max
- }
+ "Specifies the maximum number of tasks to execute in parallel. (default:2)",
+ lambda { |value| options.thread_pool_size = [(value || 2).to_i,2].max }
],
['--job-stats [LEVEL]',
- "Display job statistics. " +
- "LEVEL=history displays a complete job list",
+ "Display job statistics. LEVEL=history displays a complete job list",
lambda { |value|
if value =~ /^history/i
options.job_stats = :history
@@ -423,28 +398,22 @@ module Rake
end
}
],
- ['--libdir', '-I LIBDIR',
- "Include LIBDIR in the search path for required modules.",
+ ['--libdir', '-I LIBDIR', "Include LIBDIR in the search path for required modules.",
lambda { |value| $:.push(value) }
],
- ['--multitask', '-m',
- "Treat all tasks as multitasks.",
+ ['--multitask', '-m', "Treat all tasks as multitasks.",
lambda { |value| options.always_multitask = true }
],
- ['--no-search', '--nosearch',
- '-N', "Do not search parent directories for the Rakefile.",
+ ['--no-search', '--nosearch', '-N', "Do not search parent directories for the Rakefile.",
lambda { |value| options.nosearch = true }
],
- ['--prereqs', '-P',
- "Display the tasks and dependencies, then exit.",
+ ['--prereqs', '-P', "Display the tasks and dependencies, then exit.",
lambda { |value| options.show_prereqs = true }
],
- ['--quiet', '-q',
- "Do not log messages to standard output.",
+ ['--quiet', '-q', "Do not log messages to standard output.",
lambda { |value| Rake.verbose(false) }
],
- ['--rakefile', '-f [FILE]',
- "Use FILE as the rakefile.",
+ ['--rakefile', '-f [FILE]', "Use FILE as the rakefile.",
lambda { |value|
value ||= ''
@rakefiles.clear
@@ -452,14 +421,15 @@ module Rake
}
],
['--rakelibdir', '--rakelib', '-R RAKELIBDIR',
- "Auto-import any .rake files in RAKELIBDIR. " +
- "(default is 'rakelib')",
- lambda { |value|
- options.rakelib = value.split(File::PATH_SEPARATOR)
- }
+ "Auto-import any .rake files in RAKELIBDIR. (default is 'rakelib')",
+ lambda { |value| options.rakelib = value.split(File::PATH_SEPARATOR) }
+ ],
+ ['--reduce-compat', "Remove DSL in Object; remove Module#const_missing which defines ::Task etc.",
+ # Load-time option.
+ # Handled in bin/rake where Rake::REDUCE_COMPAT is defined (or not).
+ lambda { |_| }
],
- ['--require', '-r MODULE',
- "Require MODULE before executing rakefile.",
+ ['--require', '-r MODULE', "Require MODULE before executing rakefile.",
lambda { |value|
begin
require value
@@ -472,45 +442,34 @@ module Rake
end
}
],
- ['--rules',
- "Trace the rules resolution.",
+ ['--rules', "Trace the rules resolution.",
lambda { |value| options.trace_rules = true }
],
- ['--silent', '-s',
- "Like --quiet, but also suppresses the " +
- "'in directory' announcement.",
+ ['--silent', '-s', "Like --quiet, but also suppresses the 'in directory' announcement.",
lambda { |value|
Rake.verbose(false)
options.silent = true
}
],
- ['--suppress-backtrace PATTERN',
- "Suppress backtrace lines matching regexp PATTERN. " +
- "Ignored if --trace is on.",
+ ['--suppress-backtrace PATTERN', "Suppress backtrace lines matching regexp PATTERN. Ignored if --trace is on.",
lambda { |value|
options.suppress_backtrace_pattern = Regexp.new(value)
}
],
['--system', '-g',
- "Using system wide (global) rakefiles " +
- "(usually '~/.rake/*.rake').",
+ "Using system wide (global) rakefiles (usually '~/.rake/*.rake').",
lambda { |value| options.load_system = true }
],
['--no-system', '--nosystem', '-G',
- "Use standard project Rakefile search paths, " +
- "ignore system wide rakefiles.",
+ "Use standard project Rakefile search paths, ignore system wide rakefiles.",
lambda { |value| options.ignore_system = true }
],
- ['--tasks', '-T [PATTERN]',
- "Display the tasks (matching optional PATTERN) " +
- "with descriptions, then exit.",
+ ['--tasks', '-T [PATTERN]', "Display the tasks (matching optional PATTERN) with descriptions, then exit.",
lambda { |value|
select_tasks_to_show(options, :tasks, value)
}
],
- ['--trace=[OUT]', '-t',
- "Turn on invoke/execute tracing, enable full backtrace. " +
- "OUT can be stderr (default) or stdout.",
+ ['--trace=[OUT]', '-t', "Turn on invoke/execute tracing, enable full backtrace. OUT can be stderr (default) or stdout.",
lambda { |value|
options.trace = true
options.backtrace = true
@@ -518,26 +477,22 @@ module Rake
Rake.verbose(true)
}
],
- ['--verbose', '-v',
- "Log message to standard output.",
+ ['--verbose', '-v', "Log message to standard output.",
lambda { |value| Rake.verbose(true) }
],
- ['--version', '-V',
- "Display the program version.",
+ ['--version', '-V', "Display the program version.",
lambda { |value|
puts "rake, version #{RAKEVERSION}"
exit
}
],
- ['--where', '-W [PATTERN]',
- "Describe the tasks (matching optional PATTERN), then exit.",
+ ['--where', '-W [PATTERN]', "Describe the tasks (matching optional PATTERN), then exit.",
lambda { |value|
select_tasks_to_show(options, :lines, value)
options.show_all_tasks = true
}
],
- ['--no-deprecation-warnings', '-X',
- "Disable the deprecation warnings.",
+ ['--no-deprecation-warnings', '-X', "Disable the deprecation warnings.",
lambda { |value|
options.ignore_deprecate = true
}
@@ -560,8 +515,7 @@ module Rake
when 'stderr', nil
options.trace_output = $stderr
else
- fail CommandLineOptionError,
- "Unrecognized --#{trace_option} option '#{value}'"
+ fail CommandLineOptionError, "Unrecognized --#{trace_option} option '#{value}'"
end
end
private :select_trace_output
@@ -572,7 +526,7 @@ module Rake
options.trace_output = $stderr
OptionParser.new do |opts|
- opts.banner = "#{Rake.application.name} [-f rakefile] {options} targets..."
+ opts.banner = "rake [-f rakefile] {options} targets..."
opts.separator ""
opts.separator "Options are ..."
@@ -584,6 +538,16 @@ module Rake
standard_rake_options.each { |args| opts.on(*args) }
opts.environment('RAKEOPT')
end.parse!
+
+ # If class namespaces are requested, set the global options
+ # according to the values in the options structure.
+ if options.classic_namespace
+ $show_tasks = options.show_tasks
+ $show_prereqs = options.show_prereqs
+ $trace = options.trace
+ $dryrun = options.dryrun
+ $silent = options.silent
+ end
end
# Similar to the regular Ruby +require+ command, but will check
@@ -604,9 +568,11 @@ module Rake
def find_rakefile_location
here = Dir.pwd
- until (fn = have_rakefile)
+ while ! (fn = have_rakefile)
Dir.chdir("..")
- return nil if Dir.pwd == here || options.nosearch
+ if Dir.pwd == here || options.nosearch
+ return nil
+ end
here = Dir.pwd
end
[fn, here]
@@ -634,8 +600,8 @@ module Rake
@rakefile = rakefile
Dir.chdir(location)
print_rakefile_directory(location)
- Rake.load_rakefile(File.expand_path(@rakefile)) if
- @rakefile && @rakefile != ''
+ $rakefile = @rakefile if options.classic_namespace
+ Rake.load_rakefile(File.expand_path(@rakefile)) if @rakefile && @rakefile != ''
options.rakelib.each do |rlib|
glob("#{rlib}/*.rake") do |name|
add_import name
@@ -680,19 +646,13 @@ module Rake
def collect_tasks
@top_level_tasks = []
ARGV.each do |arg|
- if arg =~ /^(\w+)=(.*)$/m
+ if arg =~ /^(\w+)=(.*)$/
ENV[$1] = $2
else
@top_level_tasks << arg unless arg =~ /^-/
end
end
- @top_level_tasks.push(default_task_name) if @top_level_tasks.empty?
- end
-
- # Default task name ("default").
- # (May be overridden by subclasses)
- def default_task_name
- "default"
+ @top_level_tasks.push("default") if @top_level_tasks.size == 0
end
# Add a file to the list of files to be imported.
@@ -704,7 +664,9 @@ module Rake
def load_imports
while fn = @pending_imports.shift
next if @imported.member?(fn)
- fn_task = lookup(fn) and fn_task.invoke
+ if fn_task = lookup(fn)
+ fn_task.invoke
+ end
ext = File.extname(fn)
loader = @loaders[ext] || @default_loader
loader.load(fn)
@@ -712,8 +674,20 @@ module Rake
end
end
+ # Warn about deprecated use of top level constant names.
+ def const_warning(const_name)
+ @const_warning ||= false
+ if ! @const_warning
+ $stderr.puts %{WARNING: Deprecated reference to top-level constant '#{const_name}' } +
+ %{found at: #{rakefile_location}} # '
+ $stderr.puts %{ Use --classic-namespace on rake command}
+ $stderr.puts %{ or 'require "rake/classic_namespace"' in Rakefile}
+ end
+ @const_warning = true
+ end
+
def rakefile_location(backtrace=caller)
- backtrace.map { |t| t[/([^:]+):/, 1] }
+ backtrace.map { |t| t[/([^:]+):/,1] }
re = /^#{@rakefile}$/
re = /#{re.source}/i if windows?
diff --git a/lib/rake/backtrace.rb b/lib/rake/backtrace.rb
index 9b2ba6157f..e67132f67a 100644
--- a/lib/rake/backtrace.rb
+++ b/lib/rake/backtrace.rb
@@ -1,15 +1,13 @@
module Rake
module Backtrace
- SYS_KEYS = RbConfig::CONFIG.keys.grep(/(prefix|libdir)/)
- SYS_PATHS = RbConfig::CONFIG.values_at(*SYS_KEYS).uniq +
- [ File.join(File.dirname(__FILE__), "..") ]
+ SUPPRESSED_PATHS =
+ RbConfig::CONFIG.values_at(*RbConfig::CONFIG.
+ keys.grep(/(prefix|libdir)/)).uniq + [
+ File.join(File.dirname(__FILE__), ".."),
+ ].map { |f| Regexp.quote(File.expand_path(f)) }
+ SUPPRESSED_PATHS.reject! { |s| s.nil? || s =~ /^ *$/ }
- SUPPRESSED_PATHS = SYS_PATHS.
- map { |s| s.gsub("\\", "/") }.
- map { |f| File.expand_path(f) }.
- reject { |s| s.nil? || s =~ /^ *$/ }
- SUPPRESSED_PATHS_RE = SUPPRESSED_PATHS.map { |f| Regexp.quote(f) }.join("|")
- SUPPRESS_PATTERN = %r!(\A(#{SUPPRESSED_PATHS_RE})|bin/rake:\d+)!i
+ SUPPRESS_PATTERN = %r!(\A#{SUPPRESSED_PATHS.join('|')}|bin/rake:\d+)!i
def self.collapse(backtrace)
pattern = Rake.application.options.suppress_backtrace_pattern ||
diff --git a/lib/rake/classic_namespace.rb b/lib/rake/classic_namespace.rb
new file mode 100644
index 0000000000..6e71012da4
--- /dev/null
+++ b/lib/rake/classic_namespace.rb
@@ -0,0 +1,11 @@
+# The following classes used to be in the top level namespace.
+# Loading this file enables compatibility with older Rakefile that
+# referenced Task from the top level.
+
+warn "WARNING: Classic namespaces are deprecated and will be removed from future versions of Rake."
+# :stopdoc:
+Task = Rake::Task
+FileTask = Rake::FileTask
+FileCreationTask = Rake::FileCreationTask
+RakeApp = Rake::Application
+# :startdoc:
diff --git a/lib/rake/clean.rb b/lib/rake/clean.rb
index 8001ce569a..32846d4a6d 100644
--- a/lib/rake/clean.rb
+++ b/lib/rake/clean.rb
@@ -14,42 +14,19 @@
require 'rake'
# :stopdoc:
-
-module Rake
- module Cleaner
- extend FileUtils
-
- module_function
-
- def cleanup_files(file_names)
- file_names.each do |file_name|
- cleanup(file_name)
- end
- end
-
- def cleanup(file_name, opts={})
- begin
- rm_r file_name, opts
- rescue StandardError => ex
- puts "Failed to remove #{file_name}: #{ex}"
- end
- end
- end
-end
-
-CLEAN = ::Rake::FileList["**/*~", "**/*.bak", "**/core"]
+CLEAN = Rake::FileList["**/*~", "**/*.bak", "**/core"]
CLEAN.clear_exclude.exclude { |fn|
fn.pathmap("%f").downcase == 'core' && File.directory?(fn)
}
desc "Remove any temporary products."
task :clean do
- Rake::Cleaner.cleanup_files(CLEAN)
+ CLEAN.each { |fn| rm_r fn rescue nil }
end
-CLOBBER = ::Rake::FileList.new
+CLOBBER = Rake::FileList.new
desc "Remove any generated file."
task :clobber => [:clean] do
- Rake::Cleaner.cleanup_files(CLOBBER)
+ CLOBBER.each { |fn| rm_r fn rescue nil }
end
diff --git a/lib/rake/contrib/ftptools.rb b/lib/rake/contrib/ftptools.rb
index 0dd50fdc8d..d39cde8ed9 100644
--- a/lib/rake/contrib/ftptools.rb
+++ b/lib/rake/contrib/ftptools.rb
@@ -50,21 +50,33 @@ module Rake # :nodoc:
def parse_mode(m)
result = 0
(1..9).each do |i|
- result = 2 * result + ((m[i] == ?-) ? 0 : 1)
+ result = 2*result + ((m[i]==?-) ? 0 : 1)
end
result
end
def determine_time(d1, d2, d3)
now = self.class.time.now
- if /:/ !~ d3
- result = Time.parse("#{d1} #{d2} #{d3}")
- else
+ if /:/ =~ d3
result = Time.parse("#{d1} #{d2} #{now.year} #{d3}")
- result = Time.parse("#{d1} #{d2} #{now.year - 1} #{d3}") if
- result > now
+ if result > now
+ result = Time.parse("#{d1} #{d2} #{now.year-1} #{d3}")
+ end
+ else
+ result = Time.parse("#{d1} #{d2} #{d3}")
end
result
+# elements = ParseDate.parsedate("#{d1} #{d2} #{d3}")
+# if elements[0].nil?
+# today = self.class.date.today
+# if elements[1] > today.month
+# elements[0] = today.year - 1
+# else
+# elements[0] = today.year
+# end
+# end
+# elements = elements.collect { |el| el.nil? ? 0 : el }
+# Time.mktime(*elements[0,7])
end
end
diff --git a/lib/rake/contrib/sys.rb b/lib/rake/contrib/sys.rb
index a3a9f69e25..5e31ea81b4 100644
--- a/lib/rake/contrib/sys.rb
+++ b/lib/rake/contrib/sys.rb
@@ -1,2 +1,192 @@
-fail "ERROR: 'rake/contrib/sys' is obsolete and no longer supported. " +
- "Use 'FileUtils' instead."
+warn 'Sys has been deprecated in favor of FileUtils'
+
+#--
+# Copyright 2003-2010 by Jim Weirich (jim.weirich@gmail.com)
+# All rights reserved.
+#++
+#
+begin
+ require 'ftools'
+rescue LoadError
+end
+require 'rbconfig'
+require 'rake/file_list'
+
+######################################################################
+# Sys provides a number of file manipulation tools for the convenience
+# of writing Rakefiles. All commands in this module will announce
+# their activity on standard output if the $verbose flag is set
+# ($verbose = true is the default). You can control this by globally
+# setting $verbose or by using the +verbose+ and +quiet+ methods.
+#
+# Sys has been deprecated in favor of the FileUtils module available
+# in Ruby 1.8.
+#
+module Sys
+ RUBY = RbConfig::CONFIG['ruby_install_name']
+
+ # Install all the files matching +wildcard+ into the +dest_dir+
+ # directory. The permission mode is set to +mode+.
+ def install(wildcard, dest_dir, mode)
+ FileList.glob(wildcard).each do |fn|
+ File.install(fn, dest_dir, mode, $verbose)
+ end
+ end
+
+ # Run the system command +cmd+.
+ def run(cmd)
+ log cmd
+ system(cmd) or fail "Command Failed: [#{cmd}]"
+ end
+
+ # Run a Ruby interpreter with the given arguments.
+ def ruby(*args)
+ run "#{RUBY} #{args.join(' ')}"
+ end
+
+ # Copy a single file from +file_name+ to +dest_file+.
+ def copy(file_name, dest_file)
+ log "Copying file #{file_name} to #{dest_file}"
+ File.copy(file_name, dest_file)
+ end
+
+ # Copy all files matching +wildcard+ into the directory +dest_dir+.
+ def copy_files(wildcard, dest_dir)
+ for_matching_files(wildcard, dest_dir) { |from, to| copy(from, to) }
+ end
+
+ # Link +file_name+ to +dest_file+.
+ def link(file_name, dest_file)
+ log "Linking file #{file_name} to #{dest_file}"
+ File.link(file_name, dest_file)
+ end
+
+ # Link all files matching +wildcard+ into the directory +dest_dir+.
+ def link_files(wildcard, dest_dir)
+ for_matching_files(wildcard, dest_dir) { |from, to| link(from, to) }
+ end
+
+ # Symlink +file_name+ to +dest_file+.
+ def symlink(file_name, dest_file)
+ log "Symlinking file #{file_name} to #{dest_file}"
+ File.symlink(file_name, dest_file)
+ end
+
+ # Symlink all files matching +wildcard+ into the directory +dest_dir+.
+ def symlink_files(wildcard, dest_dir)
+ for_matching_files(wildcard, dest_dir) { |from, to| link(from, to) }
+ end
+
+ # Remove all files matching +wildcard+. If a matching file is a
+ # directory, it must be empty to be removed. used +delete_all+ to
+ # recursively delete directories.
+ def delete(*wildcards)
+ wildcards.each do |wildcard|
+ FileList.glob(wildcard).each do |fn|
+ if File.directory?(fn)
+ log "Deleting directory #{fn}"
+ Dir.delete(fn)
+ else
+ log "Deleting file #{fn}"
+ File.delete(fn)
+ end
+ end
+ end
+ end
+
+ # Recursively delete all files and directories matching +wildcard+.
+ def delete_all(*wildcards)
+ wildcards.each do |wildcard|
+ FileList.glob(wildcard).each do |fn|
+ next if ! File.exist?(fn)
+ if File.directory?(fn)
+ FileList.glob("#{fn}/*").each do |subfn|
+ next if subfn=='.' || subfn=='..'
+ delete_all(subfn)
+ end
+ log "Deleting directory #{fn}"
+ Dir.delete(fn)
+ else
+ log "Deleting file #{fn}"
+ File.delete(fn)
+ end
+ end
+ end
+ end
+
+ # Make the directories given in +dirs+.
+ def makedirs(*dirs)
+ dirs.each do |fn|
+ log "Making directory #{fn}"
+ File.makedirs(fn)
+ end
+ end
+
+ # Make +dir+ the current working directory for the duration of
+ # executing the given block.
+ def indir(dir)
+ olddir = Dir.pwd
+ Dir.chdir(dir)
+ yield
+ ensure
+ Dir.chdir(olddir)
+ end
+
+ # Split a file path into individual directory names.
+ #
+ # For example:
+ # split_all("a/b/c") => ['a', 'b', 'c']
+ def split_all(path)
+ head, tail = File.split(path)
+ return [tail] if head == '.' || tail == '/'
+ return [head, tail] if head == '/'
+ return split_all(head) + [tail]
+ end
+
+ # Write a message to standard error if $verbose is enabled.
+ def log(msg)
+ print " " if $trace && $verbose
+ $stderr.puts msg if $verbose
+ end
+
+ # Perform a block with $verbose disabled.
+ def quiet(&block)
+ with_verbose(false, &block)
+ end
+
+ # Perform a block with $verbose enabled.
+ def verbose(&block)
+ with_verbose(true, &block)
+ end
+
+ # Perform a block with each file matching a set of wildcards.
+ def for_files(*wildcards)
+ wildcards.each do |wildcard|
+ FileList.glob(wildcard).each do |fn|
+ yield(fn)
+ end
+ end
+ end
+
+ extend(self)
+
+ private # ----------------------------------------------------------
+
+ def for_matching_files(wildcard, dest_dir)
+ FileList.glob(wildcard).each do |fn|
+ dest_file = File.join(dest_dir, fn)
+ parent = File.dirname(dest_file)
+ makedirs(parent) if ! File.directory?(parent)
+ yield(fn, dest_file)
+ end
+ end
+
+ def with_verbose(v)
+ oldverbose = $verbose
+ $verbose = v
+ yield
+ ensure
+ $verbose = oldverbose
+ end
+
+end
diff --git a/lib/rake/dsl_definition.rb b/lib/rake/dsl_definition.rb
index b24a821386..143b0bcf7a 100644
--- a/lib/rake/dsl_definition.rb
+++ b/lib/rake/dsl_definition.rb
@@ -32,6 +32,7 @@ module Rake
Rake::Task.define_task(*args, &block)
end
+
# Declare a file task.
#
# Example:
@@ -66,7 +67,7 @@ module Rake
dir, _ = *Rake.application.resolve_args(args)
Rake.each_dir_parent(dir) do |d|
file_create d do |t|
- mkdir_p t.name unless File.exist?(t.name)
+ mkdir_p t.name if ! File.exist?(t.name)
end
end
result
@@ -116,7 +117,6 @@ module Rake
end
# Describe the next rake task.
- # Duplicate descriptions are discarded.
#
# Example:
# desc "Run the Unit Tests"
@@ -147,7 +147,31 @@ module Rake
Rake.application.add_import(fn)
end
end
+
end
+
+ DeprecatedCommands = Object.new.extend(DSL)
+
+ module DeprecatedObjectDSL # :nodoc:
+ DSL.private_instance_methods(false).each do |name|
+ line = __LINE__+1
+ class_eval %{
+ def #{name}(*args, &block)
+ unless Rake.application.options.ignore_deprecate
+ unless @rake_dsl_warning
+ $stderr.puts "WARNING: Global access to Rake DSL methods is deprecated. Please include"
+ $stderr.puts " ... Rake::DSL into classes and modules which use the Rake DSL methods."
+ @rake_dsl_warning = true
+ end
+ $stderr.puts "WARNING: DSL method \#{self.class}##{name} called at \#{caller.first}"
+ end
+ Rake::DeprecatedCommands.send(:#{name}, *args, &block)
+ end
+ private :#{name}
+ }, __FILE__, line
+ end
+ end unless defined? Rake::REDUCE_COMPAT
+
extend FileUtilsExt
end
@@ -155,3 +179,4 @@ end
# calls to task, etc. to work from a Rakefile without polluting the
# object inheritance tree.
self.extend Rake::DSL
+include Rake::DeprecatedObjectDSL unless defined? Rake::REDUCE_COMPAT
diff --git a/lib/rake/ext/core.rb b/lib/rake/ext/core.rb
index c924c7eaba..1f3a738906 100644
--- a/lib/rake/ext/core.rb
+++ b/lib/rake/ext/core.rb
@@ -19,8 +19,7 @@ class Module
#
def rake_extension(method)
if method_defined?(method)
- $stderr.puts "WARNING: Possible conflict with Rake extension: " +
- "#{self}##{method} already exists"
+ $stderr.puts "WARNING: Possible conflict with Rake extension: #{self}##{method} already exists"
else
yield
end
diff --git a/lib/rake/ext/module.rb b/lib/rake/ext/module.rb
index 8b13789179..fc61bea555 100644
--- a/lib/rake/ext/module.rb
+++ b/lib/rake/ext/module.rb
@@ -1 +1,39 @@
+require 'rake/ext/core'
+require 'rake/task'
+require 'rake/file_task'
+require 'rake/file_creation_task'
+require 'rake/application'
+require 'rake/task_manager'
+######################################################################
+# Rake extensions to Module.
+#
+class Module
+
+ # Rename the original handler to make it available.
+ alias :rake_original_const_missing :const_missing
+
+ # Check for deprecated uses of top level (i.e. in Object) uses of
+ # Rake class names. If someone tries to reference the constant
+ # name, display a warning and return the proper object. Using the
+ # --classic-namespace command line option will define these
+ # constants in Object and avoid this handler.
+ def const_missing(const_name)
+ case const_name
+ when :Task
+ Rake.application.const_warning(const_name)
+ Rake::Task
+ when :FileTask
+ Rake.application.const_warning(const_name)
+ Rake::FileTask
+ when :FileCreationTask
+ Rake.application.const_warning(const_name)
+ Rake::FileCreationTask
+ when :RakeApp
+ Rake.application.const_warning(const_name)
+ Rake::Application
+ else
+ rake_original_const_missing(const_name)
+ end
+ end
+end unless defined? Rake::REDUCE_COMPAT
diff --git a/lib/rake/ext/string.rb b/lib/rake/ext/string.rb
index 07ef167f82..be8b463e1a 100644
--- a/lib/rake/ext/string.rb
+++ b/lib/rake/ext/string.rb
@@ -13,7 +13,9 @@ class String
# +ext+ is a user added method for the String class.
def ext(newext='')
return self.dup if ['.', '..'].include? self
- newext = (newext =~ /^\./) ? newext : ("." + newext) if newext != ''
+ if newext != ''
+ newext = (newext =~ /^\./) ? newext : ("." + newext)
+ end
self.chomp(File.extname(self)) << newext
end
end
diff --git a/lib/rake/file_list.rb b/lib/rake/file_list.rb
index 0b60925f09..3eae5fb0d7 100644
--- a/lib/rake/file_list.rb
+++ b/lib/rake/file_list.rb
@@ -41,11 +41,10 @@ module Rake
# List of array methods (that are not in +Object+) that need to be
# delegated.
- ARRAY_METHODS = (Array.instance_methods - Object.instance_methods).
- map { |n| n.to_s }
+ ARRAY_METHODS = (Array.instance_methods - Object.instance_methods).map { |n| n.to_s }
# List of additional methods that must be delegated.
- MUST_DEFINE = %w[inspect <=>]
+ MUST_DEFINE = %w[to_a inspect <=>]
# List of methods that should not be delegated here (we define special
# versions of them explicitly below).
@@ -59,13 +58,12 @@ module Rake
+ - & |
]
- DELEGATING_METHODS = (ARRAY_METHODS + MUST_DEFINE - MUST_NOT_DEFINE).
- map { |s| s.to_s }.sort.uniq
+ DELEGATING_METHODS = (ARRAY_METHODS + MUST_DEFINE - MUST_NOT_DEFINE).collect{ |s| s.to_s }.sort.uniq
# Now do the delegation.
- DELEGATING_METHODS.each do |sym|
+ DELEGATING_METHODS.each_with_index do |sym, i|
if SPECIAL_RETURN.include?(sym)
- ln = __LINE__ + 1
+ ln = __LINE__+1
class_eval %{
def #{sym}(*args, &block)
resolve
@@ -74,7 +72,7 @@ module Rake
end
}, __FILE__, ln
else
- ln = __LINE__ + 1
+ ln = __LINE__+1
class_eval %{
def #{sym}(*args, &block)
resolve
@@ -151,8 +149,10 @@ module Rake
patterns.each do |pat|
@exclude_patterns << pat
end
- @exclude_procs << block if block_given?
- resolve_exclude unless @pending
+ if block_given?
+ @exclude_procs << block
+ end
+ resolve_exclude if ! @pending
self
end
@@ -219,7 +219,7 @@ module Rake
private :resolve_add
def resolve_exclude
- reject! { |fn| excluded_from_list?(fn) }
+ reject! { |fn| exclude?(fn) }
self
end
private :resolve_exclude
@@ -231,7 +231,7 @@ module Rake
# FileList['a.c', 'b.c'].sub(/\.c$/, '.o') => ['a.o', 'b.o']
#
def sub(pat, rep)
- inject(FileList.new) { |res, fn| res << fn.sub(pat, rep) }
+ inject(FileList.new) { |res, fn| res << fn.sub(pat,rep) }
end
# Return a new FileList with the results of running +gsub+ against each
@@ -242,18 +242,18 @@ module Rake
# => ['lib\\test\\file', 'x\\y']
#
def gsub(pat, rep)
- inject(FileList.new) { |res, fn| res << fn.gsub(pat, rep) }
+ inject(FileList.new) { |res, fn| res << fn.gsub(pat,rep) }
end
# Same as +sub+ except that the original file list is modified.
def sub!(pat, rep)
- each_with_index { |fn, i| self[i] = fn.sub(pat, rep) }
+ each_with_index { |fn, i| self[i] = fn.sub(pat,rep) }
self
end
# Same as +gsub+ except that the original file list is modified.
def gsub!(pat, rep)
- each_with_index { |fn, i| self[i] = fn.gsub(pat, rep) }
+ each_with_index { |fn, i| self[i] = fn.gsub(pat,rep) }
self
end
@@ -341,19 +341,13 @@ module Rake
# Add matching glob patterns.
def add_matching(pattern)
FileList.glob(pattern).each do |fn|
- self << fn unless excluded_from_list?(fn)
+ self << fn unless exclude?(fn)
end
end
private :add_matching
- # Should the given file name be excluded from the list?
- #
- # NOTE: This method was formally named "exclude?", but Rails
- # introduced an exclude? method as an array method and setup a
- # conflict with file list. We renamed the method to avoid
- # confusion. If you were using "FileList#exclude?" in your user
- # code, you will need to update.
- def excluded_from_list?(fn)
+ # Should the given file name be excluded?
+ def exclude?(fn)
return true if @exclude_patterns.any? do |pat|
case pat
when Regexp
diff --git a/lib/rake/file_task.rb b/lib/rake/file_task.rb
index 3e717c24b7..78902a86fd 100644
--- a/lib/rake/file_task.rb
+++ b/lib/rake/file_task.rb
@@ -29,7 +29,7 @@ module Rake
# Are there any prerequisites with a later time than the given time stamp?
def out_of_date?(stamp)
- @prerequisites.any? { |n| application[n, @scope].timestamp > stamp }
+ @prerequisites.any? { |n| application[n, @scope].timestamp > stamp}
end
# ----------------------------------------------------------------
@@ -44,3 +44,4 @@ module Rake
end
end
end
+
diff --git a/lib/rake/file_utils.rb b/lib/rake/file_utils.rb
index 0f7f459d87..606bfb65b5 100644
--- a/lib/rake/file_utils.rb
+++ b/lib/rake/file_utils.rb
@@ -41,26 +41,24 @@ module FileUtils
unless options[:noop]
res = rake_system(*cmd)
status = $?
- status = Rake::PseudoStatus.new(1) if !res && status.nil?
+ status = PseudoStatus.new(1) if !res && status.nil?
shell_runner.call(res, status)
end
end
def create_shell_runner(cmd) # :nodoc:
show_command = cmd.join(" ")
- show_command = show_command[0, 42] + "..." unless $trace
- lambda do |ok, status|
- ok or
- fail "Command failed with status (#{status.exitstatus}): " +
- "[#{show_command}]"
- end
+ show_command = show_command[0,42] + "..." unless $trace
+ lambda { |ok, status|
+ ok or fail "Command failed with status (#{status.exitstatus}): [#{show_command}]"
+ }
end
private :create_shell_runner
def set_verbose_option(options) # :nodoc:
unless options.key? :verbose
options[:verbose] =
- (Rake::FileUtilsExt.verbose_flag == Rake::FileUtilsExt::DEFAULT) ||
+ Rake::FileUtilsExt.verbose_flag == Rake::FileUtilsExt::DEFAULT ||
Rake::FileUtilsExt.verbose_flag
end
end
@@ -76,9 +74,9 @@ module FileUtils
# Example:
# ruby %{-pe '$_.upcase!' <README}
#
- def ruby(*args, &block)
+ def ruby(*args,&block)
options = (Hash === args.last) ? args.pop : {}
- if args.length > 1
+ if args.length > 1 then
sh(*([RUBY] + args + [options]), &block)
else
sh("#{RUBY} #{args.first}", options, &block)
@@ -90,7 +88,7 @@ module FileUtils
# Attempt to do a normal file link, but fall back to a copy if the link
# fails.
def safe_ln(*args)
- if ! LN_SUPPORTED[0]
+ unless LN_SUPPORTED[0]
cp(*args)
else
begin
diff --git a/lib/rake/file_utils_ext.rb b/lib/rake/file_utils_ext.rb
index 309159aec1..386af441d8 100644
--- a/lib/rake/file_utils_ext.rb
+++ b/lib/rake/file_utils_ext.rb
@@ -18,6 +18,9 @@ module Rake
FileUtilsExt.verbose_flag = DEFAULT
FileUtilsExt.nowrite_flag = false
+ $fileutils_verbose = true
+ $fileutils_nowrite = false
+
FileUtils.commands.each do |name|
opts = FileUtils.options_of name
default_options = []
@@ -135,8 +138,7 @@ module Rake
optdecl.each do |name|
h.delete name
end
- raise ArgumentError, "no such option: #{h.keys.join(' ')}" unless
- h.empty?
+ raise ArgumentError, "no such option: #{h.keys.join(' ')}" unless h.empty?
end
extend self
diff --git a/lib/rake/gempackagetask.rb b/lib/rake/gempackagetask.rb
index 4ace0a6f0e..5f1fc4def8 100644
--- a/lib/rake/gempackagetask.rb
+++ b/lib/rake/gempackagetask.rb
@@ -1,2 +1,15 @@
-fail "ERROR: 'rake/gempackagetask' is obsolete and no longer supported. " +
- "Use 'rubygems/packagetask' instead."
+# rake/gempackagetask is deprecated in favor of rubygems/package_task
+
+warn 'rake/gempackagetask is deprecated. Use rubygems/package_task instead'
+
+require 'rubygems'
+require 'rubygems/package_task'
+
+require 'rake'
+
+# :stopdoc:
+
+module Rake
+ GemPackageTask = Gem::PackageTask
+end
+
diff --git a/lib/rake/invocation_chain.rb b/lib/rake/invocation_chain.rb
index dae9a35915..8a01ab4c29 100644
--- a/lib/rake/invocation_chain.rb
+++ b/lib/rake/invocation_chain.rb
@@ -3,50 +3,44 @@ module Rake
####################################################################
# InvocationChain tracks the chain of task invocations to detect
# circular dependencies.
- class InvocationChain < LinkedList
+ class InvocationChain
+ def initialize(value, tail)
+ @value = value
+ @tail = tail
+ end
- # Is the invocation already in the chain?
- def member?(invocation)
- head == invocation || tail.member?(invocation)
+ def member?(obj)
+ @value == obj || @tail.member?(obj)
end
- # Append an invocation to the chain of invocations. It is an error
- # if the invocation already listed.
- def append(invocation)
- if member?(invocation)
- fail RuntimeError, "Circular dependency detected: #{to_s} => #{invocation}"
+ def append(value)
+ if member?(value)
+ fail RuntimeError, "Circular dependency detected: #{to_s} => #{value}"
end
- conj(invocation)
+ self.class.new(value, self)
end
- # Convert to string, ie: TOP => invocation => invocation
def to_s
- "#{prefix}#{head}"
+ "#{prefix}#{@value}"
end
- # Class level append.
- def self.append(invocation, chain)
- chain.append(invocation)
+ def self.append(value, chain)
+ chain.append(value)
end
private
def prefix
- "#{tail.to_s} => "
+ "#{@tail.to_s} => "
end
- # Null object for an empty chain.
- class EmptyInvocationChain < LinkedList::EmptyLinkedList
- @parent = InvocationChain
-
+ class EmptyInvocationChain
def member?(obj)
false
end
-
- def append(invocation)
- conj(invocation)
+ def append(value)
+ InvocationChain.new(value, self)
end
-
def to_s
"TOP"
end
diff --git a/lib/rake/lib/.document b/lib/rake/lib/.document
deleted file mode 100644
index 098e64716e..0000000000
--- a/lib/rake/lib/.document
+++ /dev/null
@@ -1 +0,0 @@
-# Ignore project.rake
diff --git a/lib/rake/linked_list.rb b/lib/rake/linked_list.rb
deleted file mode 100644
index 26483703f4..0000000000
--- a/lib/rake/linked_list.rb
+++ /dev/null
@@ -1,103 +0,0 @@
-module Rake
-
- # Polylithic linked list structure used to implement several data
- # structures in Rake.
- class LinkedList
- include Enumerable
-
- attr_reader :head, :tail
-
- def initialize(head, tail=EMPTY)
- @head = head
- @tail = tail
- end
-
- # Polymorphically add a new element to the head of a list. The
- # type of head node will be the same list type has the tail.
- def conj(item)
- self.class.cons(item, self)
- end
-
- # Is the list empty?
- def empty?
- false
- end
-
- # Lists are structurally equivalent.
- def ==(other)
- current = self
- while ! current.empty? && ! other.empty?
- return false if current.head != other.head
- current = current.tail
- other = other.tail
- end
- current.empty? && other.empty?
- end
-
- # Convert to string: LL(item, item...)
- def to_s
- items = map { |item| item.to_s }.join(", ")
- "LL(#{items})"
- end
-
- # Same as +to_s+, but with inspected items.
- def inspect
- items = map { |item| item.inspect }.join(", ")
- "LL(#{items})"
- end
-
- # For each item in the list.
- def each
- current = self
- while ! current.empty?
- yield(current.head)
- current = current.tail
- end
- self
- end
-
- # Make a list out of the given arguments. This method is
- # polymorphic
- def self.make(*args)
- result = empty
- args.reverse_each do |item|
- result = cons(item, result)
- end
- result
- end
-
- # Cons a new head onto the tail list.
- def self.cons(head, tail)
- new(head, tail)
- end
-
- # The standard empty list class for the given LinkedList class.
- def self.empty
- self::EMPTY
- end
-
- # Represent an empty list, using the Null Object Pattern.
- #
- # When inheriting from the LinkedList class, you should implement
- # a type specific Empty class as well. Make sure you set the class
- # instance variable @parent to the assocated list class (this
- # allows conj, cons and make to work polymorphically).
- class EmptyLinkedList < LinkedList
- @parent = LinkedList
-
- def initialize
- end
-
- def empty?
- true
- end
-
- def self.cons(head, tail)
- @parent.cons(head, tail)
- end
- end
-
- EMPTY = EmptyLinkedList.new
- end
-
-end
diff --git a/lib/rake/packagetask.rb b/lib/rake/packagetask.rb
index 029caa6d49..08c1a8c025 100644
--- a/lib/rake/packagetask.rb
+++ b/lib/rake/packagetask.rb
@@ -51,16 +51,13 @@ module Rake
# Directory used to store the package files (default is 'pkg').
attr_accessor :package_dir
- # True if a gzipped tar file (tgz) should be produced (default is
- # false).
+ # True if a gzipped tar file (tgz) should be produced (default is false).
attr_accessor :need_tar
- # True if a gzipped tar file (tar.gz) should be produced (default
- # is false).
+ # True if a gzipped tar file (tar.gz) should be produced (default is false).
attr_accessor :need_tar_gz
- # True if a bzip2'd tar file (tar.bz2) should be produced (default
- # is false).
+ # True if a bzip2'd tar file (tar.bz2) should be produced (default is false).
attr_accessor :need_tar_bz2
# True if a zip file should be produced (default is false)
@@ -124,8 +121,7 @@ module Rake
].each do |(need, file, flag)|
if need
task :package => ["#{package_dir}/#{file}"]
- file "#{package_dir}/#{file}" =>
- [package_dir_path] + package_files do
+ file "#{package_dir}/#{file}" => [package_dir_path] + package_files do
chdir(package_dir) do
sh %{#{@tar_command} #{flag}cvf #{file} #{package_name}}
end
@@ -135,8 +131,7 @@ module Rake
if need_zip
task :package => ["#{package_dir}/#{zip_file}"]
- file "#{package_dir}/#{zip_file}" =>
- [package_dir_path] + package_files do
+ file "#{package_dir}/#{zip_file}" => [package_dir_path] + package_files do
chdir(package_dir) do
sh %{#{@zip_command} -r #{zip_file} #{package_name}}
end
@@ -150,7 +145,7 @@ module Rake
@package_files.each do |fn|
f = File.join(package_dir_path, fn)
fdir = File.dirname(f)
- mkdir_p(fdir) unless File.exist?(fdir)
+ mkdir_p(fdir) if !File.exist?(fdir)
if File.directory?(fn)
mkdir_p(f)
else
diff --git a/lib/rake/promise.rb b/lib/rake/promise.rb
index 31c4563476..3258b91139 100644
--- a/lib/rake/promise.rb
+++ b/lib/rake/promise.rb
@@ -17,7 +17,7 @@ module Rake
@mutex = Mutex.new
@result = NOT_SET
@error = NOT_SET
- @args = args
+ @args = args.collect { |a| begin; a.dup; rescue; a; end }
@block = block
end
diff --git a/lib/rake/pseudo_status.rb b/lib/rake/pseudo_status.rb
index 09d5c88c7e..b58df3da18 100644
--- a/lib/rake/pseudo_status.rb
+++ b/lib/rake/pseudo_status.rb
@@ -4,23 +4,18 @@ module Rake
# Exit status class for times the system just gives us a nil.
class PseudoStatus
attr_reader :exitstatus
-
def initialize(code=0)
@exitstatus = code
end
-
def to_i
@exitstatus << 8
end
-
def >>(n)
to_i >> n
end
-
def stopped?
false
end
-
def exited?
true
end
diff --git a/lib/rake/rdoctask.rb b/lib/rake/rdoctask.rb
index 50b7e269d5..261fa69b4d 100644
--- a/lib/rake/rdoctask.rb
+++ b/lib/rake/rdoctask.rb
@@ -1,2 +1,234 @@
-fail "ERROR: 'rake/rdoctask' is obsolete and no longer supported. " +
- "Use 'rdoc/task' (available in RDoc 2.4.2+) instead."
+# rake/rdoctask is deprecated in favor of rdoc/task
+
+if Rake.application
+ Rake.application.deprecate('require \'rake/rdoctask\'', 'require \'rdoc/task\' (in RDoc 2.4.2+)', caller.first)
+end
+
+require 'rubygems'
+
+begin
+ gem 'rdoc'
+ require 'rdoc'
+ require 'rdoc/task'
+rescue LoadError, Gem::LoadError
+end
+
+# :stopdoc:
+
+if defined?(RDoc::Task) then
+ module Rake
+ RDocTask = RDoc::Task unless const_defined? :RDocTask
+ end
+else
+ require 'rake'
+ require 'rake/tasklib'
+
+ module Rake
+
+ # NOTE: Rake::RDocTask is deprecated in favor of RDoc:Task which is included
+ # in RDoc 2.4.2+. Use require 'rdoc/task' to require it.
+ #
+ # Create a documentation task that will generate the RDoc files for
+ # a project.
+ #
+ # The RDocTask will create the following targets:
+ #
+ # [<b><em>rdoc</em></b>]
+ # Main task for this RDOC task.
+ #
+ # [<b>:clobber_<em>rdoc</em></b>]
+ # Delete all the rdoc files. This target is automatically
+ # added to the main clobber target.
+ #
+ # [<b>:re<em>rdoc</em></b>]
+ # Rebuild the rdoc files from scratch, even if they are not out
+ # of date.
+ #
+ # Simple Example:
+ #
+ # Rake::RDocTask.new do |rd|
+ # rd.main = "README.rdoc"
+ # rd.rdoc_files.include("README.rdoc", "lib/**/*.rb")
+ # end
+ #
+ # The +rd+ object passed to the block is an RDocTask object. See the
+ # attributes list for the RDocTask class for available customization options.
+ #
+ # == Specifying different task names
+ #
+ # You may wish to give the task a different name, such as if you are
+ # generating two sets of documentation. For instance, if you want to have a
+ # development set of documentation including private methods:
+ #
+ # Rake::RDocTask.new(:rdoc_dev) do |rd|
+ # rd.main = "README.doc"
+ # rd.rdoc_files.include("README.rdoc", "lib/**/*.rb")
+ # rd.options << "--all"
+ # end
+ #
+ # The tasks would then be named :<em>rdoc_dev</em>, :clobber_<em>rdoc_dev</em>, and
+ # :re<em>rdoc_dev</em>.
+ #
+ # If you wish to have completely different task names, then pass a Hash as
+ # first argument. With the <tt>:rdoc</tt>, <tt>:clobber_rdoc</tt> and
+ # <tt>:rerdoc</tt> options, you can customize the task names to your liking.
+ # For example:
+ #
+ # Rake::RDocTask.new(:rdoc => "rdoc", :clobber_rdoc => "rdoc:clean", :rerdoc => "rdoc:force")
+ #
+ # This will create the tasks <tt>:rdoc</tt>, <tt>:rdoc_clean</tt> and
+ # <tt>:rdoc:force</tt>.
+ #
+ class RDocTask < TaskLib
+ # Name of the main, top level task. (default is :rdoc)
+ attr_accessor :name
+
+ # Name of directory to receive the html output files. (default is "html")
+ attr_accessor :rdoc_dir
+
+ # Title of RDoc documentation. (defaults to rdoc's default)
+ attr_accessor :title
+
+ # Name of file to be used as the main, top level file of the
+ # RDoc. (default is none)
+ attr_accessor :main
+
+ # Name of template to be used by rdoc. (defaults to rdoc's default)
+ attr_accessor :template
+
+ # List of files to be included in the rdoc generation. (default is [])
+ attr_accessor :rdoc_files
+
+ # Additional list of options to be passed rdoc. (default is [])
+ attr_accessor :options
+
+ # Whether to run the rdoc process as an external shell (default is false)
+ attr_accessor :external
+
+ attr_accessor :inline_source
+
+ # Create an RDoc task with the given name. See the RDocTask class overview
+ # for documentation.
+ def initialize(name = :rdoc) # :yield: self
+ if name.is_a?(Hash)
+ invalid_options = name.keys.map { |k| k.to_sym } - [:rdoc, :clobber_rdoc, :rerdoc]
+ if !invalid_options.empty?
+ raise ArgumentError, "Invalid option(s) passed to RDocTask.new: #{invalid_options.join(", ")}"
+ end
+ end
+
+ @name = name
+ @rdoc_files = Rake::FileList.new
+ @rdoc_dir = 'html'
+ @main = nil
+ @title = nil
+ @template = nil
+ @external = false
+ @inline_source = true
+ @options = []
+ yield self if block_given?
+ define
+ end
+
+ # Create the tasks defined by this task lib.
+ def define
+ if rdoc_task_name != "rdoc"
+ desc "Build the RDOC HTML Files"
+ else
+ desc "Build the #{rdoc_task_name} HTML Files"
+ end
+ task rdoc_task_name
+
+ desc "Force a rebuild of the RDOC files"
+ task rerdoc_task_name => [clobber_task_name, rdoc_task_name]
+
+ desc "Remove rdoc products"
+ task clobber_task_name do
+ rm_r rdoc_dir rescue nil
+ end
+
+ task :clobber => [clobber_task_name]
+
+ directory @rdoc_dir
+ task rdoc_task_name => [rdoc_target]
+ file rdoc_target => @rdoc_files + [Rake.application.rakefile] do
+ rm_r @rdoc_dir rescue nil
+ @before_running_rdoc.call if @before_running_rdoc
+ args = option_list + @rdoc_files
+ if @external
+ argstring = args.join(' ')
+ sh %{ruby -Ivendor vendor/rd #{argstring}}
+ else
+ require 'rdoc/rdoc'
+ RDoc::RDoc.new.document(args)
+ end
+ end
+ self
+ end
+
+ def option_list
+ result = @options.dup
+ result << "-o" << @rdoc_dir
+ result << "--main" << quote(main) if main
+ result << "--title" << quote(title) if title
+ result << "-T" << quote(template) if template
+ result << "--inline-source" if inline_source && !@options.include?("--inline-source") && !@options.include?("-S")
+ result
+ end
+
+ def quote(str)
+ if @external
+ "'#{str}'"
+ else
+ str
+ end
+ end
+
+ def option_string
+ option_list.join(' ')
+ end
+
+ # The block passed to this method will be called just before running the
+ # RDoc generator. It is allowed to modify RDocTask attributes inside the
+ # block.
+ def before_running_rdoc(&block)
+ @before_running_rdoc = block
+ end
+
+ private
+
+ def rdoc_target
+ "#{rdoc_dir}/index.html"
+ end
+
+ def rdoc_task_name
+ case name
+ when Hash
+ (name[:rdoc] || "rdoc").to_s
+ else
+ name.to_s
+ end
+ end
+
+ def clobber_task_name
+ case name
+ when Hash
+ (name[:clobber_rdoc] || "clobber_rdoc").to_s
+ else
+ "clobber_#{name}"
+ end
+ end
+
+ def rerdoc_task_name
+ case name
+ when Hash
+ (name[:rerdoc] || "rerdoc").to_s
+ else
+ "re#{name}"
+ end
+ end
+
+ end
+ end
+end
+
diff --git a/lib/rake/ruby182_test_unit_fix.rb b/lib/rake/ruby182_test_unit_fix.rb
index e47feeb09c..9e411ed51a 100644
--- a/lib/rake/ruby182_test_unit_fix.rb
+++ b/lib/rake/ruby182_test_unit_fix.rb
@@ -10,14 +10,12 @@ module Test # :nodoc:
def collect_file(name, suites, already_gathered) # :nodoc:
dir = File.dirname(File.expand_path(name))
$:.unshift(dir) unless $:.first == dir
- if @req
+ if(@req)
@req.require(name)
else
require(name)
end
- find_test_cases(already_gathered).each do |t|
- add_suite(suites, t.suite)
- end
+ find_test_cases(already_gathered).each{|t| add_suite(suites, t.suite)}
ensure
$:.delete_at $:.rindex(dir)
end
diff --git a/lib/rake/runtest.rb b/lib/rake/runtest.rb
index 3f01b28cad..bd816ccfde 100644
--- a/lib/rake/runtest.rb
+++ b/lib/rake/runtest.rb
@@ -6,7 +6,7 @@ module Rake
include Test::Unit::Assertions
def run_tests(pattern='test/test*.rb', log_enabled=false)
- FileList.glob(pattern).each do |fn|
+ FileList.glob(pattern).each { |fn|
$stderr.puts fn if log_enabled
begin
require fn
@@ -15,7 +15,7 @@ module Rake
$stderr.puts ex.backtrace
assert false
end
- end
+ }
end
extend self
diff --git a/lib/rake/scope.rb b/lib/rake/scope.rb
deleted file mode 100644
index 33e1c08e7b..0000000000
--- a/lib/rake/scope.rb
+++ /dev/null
@@ -1,42 +0,0 @@
-module Rake
- class Scope < LinkedList
-
- # Path for the scope.
- def path
- map { |item| item.to_s }.reverse.join(":")
- end
-
- # Path for the scope + the named path.
- def path_with_task_name(task_name)
- "#{path}:#{task_name}"
- end
-
- # Trim +n+ innermost scope levels from the scope. In no case will
- # this trim beyond the toplevel scope.
- def trim(n)
- result = self
- while n > 0 && ! result.empty?
- result = result.tail
- n -= 1
- end
- result
- end
-
- # Scope lists always end with an EmptyScope object. See Null
- # Object Pattern)
- class EmptyScope < EmptyLinkedList
- @parent = Scope
-
- def path
- ""
- end
-
- def path_with_task_name(task_name)
- task_name
- end
- end
-
- # Singleton null object for an empty scope.
- EMPTY = EmptyScope.new
- end
-end
diff --git a/lib/rake/task.rb b/lib/rake/task.rb
index 5e4dd64d4e..ac0ce68c60 100644
--- a/lib/rake/task.rb
+++ b/lib/rake/task.rb
@@ -21,6 +21,13 @@ module Rake
# Application owning this task.
attr_accessor :application
+ # Comment for this task. Restricted to a single line of no more than 50
+ # characters.
+ attr_reader :comment
+
+ # Full text of the (possibly multi-line) comment.
+ attr_reader :full_comment
+
# Array of nested namespaces names used for task lookup by this task.
attr_reader :scope
@@ -46,7 +53,7 @@ module Rake
# List of prerequisite tasks
def prerequisite_tasks
- prerequisites.map { |pre| lookup_prerequisite(pre) }
+ prerequisites.collect { |pre| lookup_prerequisite(pre) }
end
def lookup_prerequisite(prerequisite_name)
@@ -54,24 +61,6 @@ module Rake
end
private :lookup_prerequisite
- # List of all unique prerequisite tasks including prerequisite tasks'
- # prerequisites.
- # Includes self when cyclic dependencies are found.
- def all_prerequisite_tasks
- seen = {}
- collect_prerequisites(seen)
- seen.values
- end
-
- def collect_prerequisites(seen)
- prerequisite_tasks.each do |pre|
- next if seen[pre.name]
- seen[pre.name] = pre
- pre.collect_prerequisites(seen)
- end
- end
- protected :collect_prerequisites
-
# First source from a rule (nil if no sources)
def source
@sources.first if defined?(@sources)
@@ -80,16 +69,17 @@ module Rake
# Create a task named +task_name+ with no actions or prerequisites. Use
# +enhance+ to add actions and prerequisites.
def initialize(task_name, app)
- @name = task_name.to_s
- @prerequisites = []
- @actions = []
+ @name = task_name.to_s
+ @prerequisites = []
+ @actions = []
@already_invoked = false
- @comments = []
- @lock = Monitor.new
- @application = app
- @scope = app.current_scope
- @arg_names = nil
- @locations = []
+ @full_comment = nil
+ @comment = nil
+ @lock = Monitor.new
+ @application = app
+ @scope = app.current_scope
+ @arg_names = nil
+ @locations = []
end
# Enhance a task with prerequisites or actions. Returns self.
@@ -151,7 +141,8 @@ module Rake
# Clear the existing comments on a rake task.
def clear_comments
- @comments = []
+ @full_comment = nil
+ @comment = nil
self
end
@@ -181,8 +172,7 @@ module Rake
protected :invoke_with_call_chain
def add_chain_to(exception, new_chain)
- exception.extend(InvocationExceptionMixin) unless
- exception.respond_to?(:chain)
+ exception.extend(InvocationExceptionMixin) unless exception.respond_to?(:chain)
exception.chain = new_chain if exception.chain.nil?
end
private :add_chain_to
@@ -200,8 +190,8 @@ module Rake
end
# Invoke all the prerequisites of a task in parallel.
- def invoke_prerequisites_concurrently(task_args, invocation_chain)# :nodoc:
- futures = prerequisite_tasks.map do |p|
+ def invoke_prerequisites_concurrently(task_args, invocation_chain) # :nodoc:
+ futures = prerequisite_tasks.collect do |p|
prereq_args = task_args.new_scope(p.arg_names)
application.thread_pool.future(p) do |r|
r.invoke_with_call_chain(prereq_args, invocation_chain)
@@ -226,7 +216,9 @@ module Rake
application.trace "** Execute (dry run) #{name}"
return
end
- application.trace "** Execute #{name}" if application.options.trace
+ if application.options.trace
+ application.trace "** Execute #{name}"
+ end
application.enhance_with_matching_rule(name) if @actions.empty?
@actions.each do |act|
case act.arity
@@ -246,57 +238,38 @@ module Rake
# Timestamp for this task. Basic tasks return the current time for their
# time stamp. Other tasks can be more sophisticated.
def timestamp
- Time.now
+ prerequisite_tasks.collect { |pre| pre.timestamp }.max || Time.now
end
# Add a description to the task. The description can consist of an option
# argument list (enclosed brackets) and an optional comment.
def add_description(description)
- return unless description
+ return if ! description
comment = description.strip
add_comment(comment) if comment && ! comment.empty?
end
- def comment=(comment)
- add_comment(comment)
+ # Writing to the comment attribute is the same as adding a description.
+ def comment=(description)
+ add_description(description)
end
+ # Add a comment to the task. If a comment already exists, separate
+ # the new comment with " / ".
def add_comment(comment)
- @comments << comment unless @comments.include?(comment)
- end
- private :add_comment
-
- # Full collection of comments. Multiple comments are separated by
- # newlines.
- def full_comment
- transform_comments("\n")
- end
-
- # First line (or sentence) of all comments. Multiple comments are
- # separated by a "/".
- def comment
- transform_comments(" / ") { |c| first_sentence(c) }
- end
-
- # Transform the list of comments as specified by the block and
- # join with the separator.
- def transform_comments(separator, &block)
- if @comments.empty?
- nil
+ if @full_comment
+ @full_comment << " / "
else
- block ||= lambda { |c| c }
- @comments.map(&block).join(separator)
+ @full_comment = ''
+ end
+ @full_comment << comment
+ if @full_comment =~ /\A([^.]+?\.)( |$)/
+ @comment = $1
+ else
+ @comment = @full_comment
end
end
- private :transform_comments
-
- # Get the first sentence in a string. The sentence is terminated
- # by the first period or the end of the line. Decimal points do
- # not count as periods.
- def first_sentence(string)
- string.split(/\.[ \t]|\.$|\n/).first
- end
- private :first_sentence
+ private :add_comment
# Set the names of the arguments for this task. +args+ should be
# an array of symbols, one for each argument name.
@@ -314,11 +287,11 @@ module Rake
result << "timestamp: #{timestamp}\n"
result << "pre-requisites: \n"
prereqs = prerequisite_tasks
- prereqs.sort! { |a, b| a.timestamp <=> b.timestamp }
+ prereqs.sort! {|a,b| a.timestamp <=> b.timestamp}
prereqs.each do |p|
result << "--#{p.name} (#{p.timestamp})\n"
end
- latest_prereq = prerequisite_tasks.map { |pre| pre.timestamp }.max
+ latest_prereq = prerequisite_tasks.collect { |pre| pre.timestamp }.max
result << "latest-prerequisite time: #{latest_prereq}\n"
result << "................................\n\n"
return result
@@ -369,8 +342,7 @@ module Rake
# this kind of task. Generic tasks will accept the scope as
# part of the name.
def scope_name(scope, task_name)
-# (scope + [task_name]).join(':')
- scope.path_with_task_name(task_name)
+ (scope + [task_name]).join(':')
end
end # class << Rake::Task
diff --git a/lib/rake/task_arguments.rb b/lib/rake/task_arguments.rb
index 0094682579..4417af2f8e 100644
--- a/lib/rake/task_arguments.rb
+++ b/lib/rake/task_arguments.rb
@@ -15,27 +15,16 @@ module Rake
@names = names
@parent = parent
@hash = {}
- @values = values
names.each_with_index { |name, i|
@hash[name.to_sym] = values[i] unless values[i].nil?
}
end
- # Retrive the complete array of sequential values
- def to_a
- @values.dup
- end
-
- # Retrive the list of values not associated with named arguments
- def extras
- @values[@names.length..-1] || []
- end
-
# Create a new argument scope using the prerequisite argument
# names.
def new_scope(names)
- values = names.map { |n| self[n] }
- self.class.new(names, values + extras, self)
+ values = names.collect { |n| self[n] }
+ self.class.new(names, values, self)
end
# Find an argument value by name or index.
diff --git a/lib/rake/task_manager.rb b/lib/rake/task_manager.rb
index 06c243a7b2..5a9419d536 100644
--- a/lib/rake/task_manager.rb
+++ b/lib/rake/task_manager.rb
@@ -10,21 +10,21 @@ module Rake
super
@tasks = Hash.new
@rules = Array.new
- @scope = Scope.make
+ @scope = Array.new
@last_description = nil
end
def create_rule(*args, &block)
- pattern, args, deps = resolve_args(args)
+ pattern, _, deps = resolve_args(args)
pattern = Regexp.new(Regexp.quote(pattern) + '$') if String === pattern
- @rules << [pattern, args, deps, block]
+ @rules << [pattern, deps, block]
end
def define_task(task_class, *args, &block)
task_name, arg_names, deps = resolve_args(args)
task_name = task_class.scope_name(@scope, task_name)
deps = [deps] unless deps.respond_to?(:to_ary)
- deps = deps.map { |d| d.to_s }
+ deps = deps.collect {|d| d.to_s }
task = intern(task_class, task_name)
task.set_arg_names(arg_names) unless arg_names.empty?
if Rake::TaskManager.record_task_metadata
@@ -72,6 +72,7 @@ module Rake
#
# task :t
# task :t, [:a]
+ # task :t, :a (deprecated)
#
def resolve_args_without_dependencies(args)
task_name = args.shift
@@ -91,14 +92,24 @@ module Rake
#
# task :t => [:d]
# task :t, [a] => [:d]
+ # task :t, :needs => [:d] (deprecated)
+ # task :t, :a, :needs => [:d] (deprecated)
#
def resolve_args_with_dependencies(args, hash) # :nodoc:
fail "Task Argument Error" if hash.size != 1
- key, value = hash.map { |k, v| [k, v] }.first
+ key, value = hash.map { |k, v| [k,v] }.first
if args.empty?
task_name = key
arg_names = []
deps = value
+ elsif key == :needs
+ Rake.application.deprecate(
+ "task :t, arg, :needs => [deps]",
+ "task :t, [args] => [deps]",
+ caller.detect { |c| c !~ /\blib\/rake\b/ })
+ task_name = args.shift
+ arg_names = args
+ deps = value
else
task_name = args.shift
arg_names = key
@@ -116,9 +127,9 @@ module Rake
def enhance_with_matching_rule(task_name, level=0)
fail Rake::RuleRecursionOverflowError,
"Rule Recursion Too Deep" if level >= 16
- @rules.each do |pattern, args, extensions, block|
+ @rules.each do |pattern, extensions, block|
if pattern.match(task_name)
- task = attempt_rule(task_name, args, extensions, block, level)
+ task = attempt_rule(task_name, extensions, block, level)
return task if task
end
end
@@ -136,7 +147,7 @@ module Rake
# List of all the tasks defined in the given scope (and its
# sub-scopes).
def tasks_in_scope(scope)
- prefix = scope.path
+ prefix = scope.join(":")
tasks.select { |t|
/^#{prefix}:/ =~ t.name
}
@@ -157,10 +168,10 @@ module Rake
initial_scope ||= @scope
task_name = task_name.to_s
if task_name =~ /^rake:/
- scopes = Scope.make
+ scopes = []
task_name = task_name.sub(/^rake:/, '')
elsif task_name =~ /^(\^+)/
- scopes = initial_scope.trim($1.size)
+ scopes = initial_scope[0, initial_scope.size - $1.size]
task_name = task_name.sub(/^(\^+)/, '')
else
scopes = initial_scope
@@ -170,12 +181,12 @@ module Rake
# Lookup the task name
def lookup_in_scope(name, scope)
- loop do
- tn = scope.path_with_task_name(name)
+ n = scope.size
+ while n >= 0
+ tn = (scope[0,n] + [name]).join(':')
task = @tasks[tn]
return task if task
- break if scope.empty?
- scope = scope.tail
+ n -= 1
end
nil
end
@@ -184,19 +195,19 @@ module Rake
# Return the list of scope names currently active in the task
# manager.
def current_scope
- @scope
+ @scope.dup
end
# Evaluate the block in a nested namespace named +name+. Create
# an anonymous namespace if +name+ is nil.
def in_namespace(name)
name ||= generate_name
- @scope = Scope.new(name, @scope)
+ @scope.push(name)
ns = NameSpace.new(self, @scope)
yield(ns)
ns
ensure
- @scope = @scope.tail
+ @scope.pop
end
private
@@ -213,7 +224,7 @@ module Rake
locations = caller
i = 0
while locations[i]
- return locations[i + 1] if locations[i] =~ /rake\/dsl_definition.rb/
+ return locations[i+1] if locations[i] =~ /rake\/dsl_definition.rb/
i += 1
end
nil
@@ -227,19 +238,18 @@ module Rake
end
def trace_rule(level, message)
- options.trace_output.puts "#{" " * level}#{message}" if
- Rake.application.options.trace_rules
+ options.trace_output.puts "#{" "*level}#{message}" if Rake.application.options.trace_rules
end
# Attempt to create a rule given the list of prerequisites.
- def attempt_rule(task_name, args, extensions, block, level)
+ def attempt_rule(task_name, extensions, block, level)
sources = make_sources(task_name, extensions)
- prereqs = sources.map { |source|
+ prereqs = sources.collect { |source|
trace_rule level, "Attempting Rule #{task_name} => #{source}"
if File.exist?(source) || Rake::Task.task_defined?(source)
trace_rule level, "(#{task_name} => #{source} ... EXIST)"
source
- elsif parent = enhance_with_matching_rule(source, level + 1)
+ elsif parent = enhance_with_matching_rule(source, level+1)
trace_rule level, "(#{task_name} => #{source} ... ENHANCE)"
parent.name
else
@@ -247,7 +257,7 @@ module Rake
return nil
end
}
- task = FileTask.define_task(task_name, {args => prereqs}, &block)
+ task = FileTask.define_task({task_name => prereqs}, &block)
task.sources = prereqs
task
end
@@ -255,7 +265,7 @@ module Rake
# Make a list of sources from the list of file name extensions /
# translation procs.
def make_sources(task_name, extensions)
- result = extensions.map { |ext|
+ result = extensions.collect { |ext|
case ext
when /%/
task_name.pathmap(ext)
diff --git a/lib/rake/tasklib.rb b/lib/rake/tasklib.rb
index 48d27df9ed..f1e17dad31 100644
--- a/lib/rake/tasklib.rb
+++ b/lib/rake/tasklib.rb
@@ -14,7 +14,7 @@ module Rake
# libraries depend on this so I can't remove it without breaking
# other people's code. So for now it stays for backwards
# compatibility. BUT DON'T USE IT.
- def paste(a, b) # :nodoc:
+ def paste(a,b) # :nodoc:
(a.to_s + b.to_s).intern
end
end
diff --git a/lib/rake/testtask.rb b/lib/rake/testtask.rb
index c693dd2626..19592d80c8 100644
--- a/lib/rake/testtask.rb
+++ b/lib/rake/testtask.rb
@@ -93,18 +93,15 @@ module Rake
# Create the tasks defined by this task lib.
def define
- desc "Run tests" + (@name == :test ? "" : " for #{@name}")
+ desc "Run tests" + (@name==:test ? "" : " for #{@name}")
task @name do
FileUtilsExt.verbose(@verbose) do
- args =
- "#{ruby_opts_string} #{run_code} " +
- "#{file_list_string} #{option_list}"
+ args = "#{ruby_opts_string} #{run_code} #{file_list_string} #{option_list}"
ruby args do |ok, status|
if !ok && status.respond_to?(:signaled?) && status.signaled?
raise SignalException.new(status.termsig)
elsif !ok
- fail "Command failed with status (#{status.exitstatus}): " +
- "[ruby #{args}]"
+ fail "Command failed with status (#{status.exitstatus}): [ruby #{args}]"
end
end
end
@@ -123,8 +120,8 @@ module Rake
def ruby_opts_string
opts = @ruby_opts.dup
- opts.unshift("-I\"#{lib_path}\"") unless @libs.empty?
- opts.unshift("-w") if @warning
+ opts.unshift( "-I\"#{lib_path}\"" ) unless @libs.empty?
+ opts.unshift( "-w" ) if @warning
opts.join(" ")
end
@@ -133,12 +130,12 @@ module Rake
end
def file_list_string
- file_list.map { |fn| "\"#{fn}\"" }.join(' ')
+ file_list.collect { |fn| "\"#{fn}\"" }.join(' ')
end
def file_list # :nodoc:
if ENV['TEST']
- FileList[ENV['TEST']]
+ FileList[ ENV['TEST'] ]
else
result = []
result += @test_files.to_a if @test_files
diff --git a/lib/rake/thread_history_display.rb b/lib/rake/thread_history_display.rb